/* Commands.c generated by valac 0.36.6, the Vala compiler
 * generated from Commands.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.
 */
/* PageCommand stores the current page when a Command is created.  Subclasses can call return_to_page()*/
/* if it's appropriate to return to that page when executing an undo() or redo().*/

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


#define TYPE_COMMAND_DESCRIPTION (command_description_get_type ())
#define COMMAND_DESCRIPTION(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_COMMAND_DESCRIPTION, CommandDescription))
#define IS_COMMAND_DESCRIPTION(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_COMMAND_DESCRIPTION))
#define COMMAND_DESCRIPTION_GET_INTERFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE ((obj), TYPE_COMMAND_DESCRIPTION, CommandDescriptionIface))

typedef struct _CommandDescription CommandDescription;
typedef struct _CommandDescriptionIface CommandDescriptionIface;

#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;
typedef struct _CommandPrivate CommandPrivate;

#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;
typedef struct _PageCommandPrivate PageCommandPrivate;

#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_DATA_OBJECT (data_object_get_type ())
#define DATA_OBJECT(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_DATA_OBJECT, DataObject))
#define DATA_OBJECT_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_DATA_OBJECT, DataObjectClass))
#define IS_DATA_OBJECT(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_DATA_OBJECT))
#define IS_DATA_OBJECT_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_DATA_OBJECT))
#define DATA_OBJECT_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_DATA_OBJECT, DataObjectClass))

typedef struct _DataObject DataObject;
typedef struct _DataObjectClass DataObjectClass;

#define TYPE_DATA_SOURCE (data_source_get_type ())
#define DATA_SOURCE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_DATA_SOURCE, DataSource))
#define DATA_SOURCE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_DATA_SOURCE, DataSourceClass))
#define IS_DATA_SOURCE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_DATA_SOURCE))
#define IS_DATA_SOURCE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_DATA_SOURCE))
#define DATA_SOURCE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_DATA_SOURCE, DataSourceClass))

typedef struct _DataSource DataSource;
typedef struct _DataSourceClass DataSourceClass;

#define TYPE_THUMBNAIL_SOURCE (thumbnail_source_get_type ())
#define THUMBNAIL_SOURCE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_THUMBNAIL_SOURCE, ThumbnailSource))
#define THUMBNAIL_SOURCE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_THUMBNAIL_SOURCE, ThumbnailSourceClass))
#define IS_THUMBNAIL_SOURCE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_THUMBNAIL_SOURCE))
#define IS_THUMBNAIL_SOURCE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_THUMBNAIL_SOURCE))
#define THUMBNAIL_SOURCE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_THUMBNAIL_SOURCE, ThumbnailSourceClass))

typedef struct _ThumbnailSource ThumbnailSource;
typedef struct _ThumbnailSourceClass ThumbnailSourceClass;

#define TYPE_MEDIA_SOURCE (media_source_get_type ())
#define MEDIA_SOURCE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_MEDIA_SOURCE, MediaSource))
#define MEDIA_SOURCE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_MEDIA_SOURCE, MediaSourceClass))
#define IS_MEDIA_SOURCE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_MEDIA_SOURCE))
#define IS_MEDIA_SOURCE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_MEDIA_SOURCE))
#define MEDIA_SOURCE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_MEDIA_SOURCE, MediaSourceClass))

typedef struct _MediaSource MediaSource;
typedef struct _MediaSourceClass MediaSourceClass;

#define TYPE_PHOTO_SOURCE (photo_source_get_type ())
#define PHOTO_SOURCE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_PHOTO_SOURCE, PhotoSource))
#define PHOTO_SOURCE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_PHOTO_SOURCE, PhotoSourceClass))
#define IS_PHOTO_SOURCE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_PHOTO_SOURCE))
#define IS_PHOTO_SOURCE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_PHOTO_SOURCE))
#define PHOTO_SOURCE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_PHOTO_SOURCE, PhotoSourceClass))

typedef struct _PhotoSource PhotoSource;
typedef struct _PhotoSourceClass PhotoSourceClass;

#define TYPE_PHOTO (photo_get_type ())
#define PHOTO(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_PHOTO, Photo))
#define PHOTO_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_PHOTO, PhotoClass))
#define IS_PHOTO(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_PHOTO))
#define IS_PHOTO_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_PHOTO))
#define PHOTO_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_PHOTO, PhotoClass))

typedef struct _Photo Photo;
typedef struct _PhotoClass PhotoClass;

#define TYPE_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 _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL)))

#define TYPE_PAGE_WINDOW (page_window_get_type ())
#define PAGE_WINDOW(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_PAGE_WINDOW, PageWindow))
#define PAGE_WINDOW_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_PAGE_WINDOW, PageWindowClass))
#define IS_PAGE_WINDOW(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_PAGE_WINDOW))
#define IS_PAGE_WINDOW_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_PAGE_WINDOW))
#define PAGE_WINDOW_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_PAGE_WINDOW, PageWindowClass))

typedef struct _PageWindow PageWindow;
typedef struct _PageWindowClass PageWindowClass;

#define TYPE_APP_WINDOW (app_window_get_type ())
#define APP_WINDOW(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_APP_WINDOW, AppWindow))
#define APP_WINDOW_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_APP_WINDOW, AppWindowClass))
#define IS_APP_WINDOW(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_APP_WINDOW))
#define IS_APP_WINDOW_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_APP_WINDOW))
#define APP_WINDOW_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_APP_WINDOW, AppWindowClass))

typedef struct _AppWindow AppWindow;
typedef struct _AppWindowClass AppWindowClass;

#define TYPE_SINGLE_PHOTO_PAGE (single_photo_page_get_type ())
#define SINGLE_PHOTO_PAGE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_SINGLE_PHOTO_PAGE, SinglePhotoPage))
#define SINGLE_PHOTO_PAGE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_SINGLE_PHOTO_PAGE, SinglePhotoPageClass))
#define IS_SINGLE_PHOTO_PAGE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_SINGLE_PHOTO_PAGE))
#define IS_SINGLE_PHOTO_PAGE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_SINGLE_PHOTO_PAGE))
#define SINGLE_PHOTO_PAGE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_SINGLE_PHOTO_PAGE, SinglePhotoPageClass))

typedef struct _SinglePhotoPage SinglePhotoPage;
typedef struct _SinglePhotoPageClass SinglePhotoPageClass;

#define TYPE_EDITING_HOST_PAGE (editing_host_page_get_type ())
#define EDITING_HOST_PAGE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_EDITING_HOST_PAGE, EditingHostPage))
#define EDITING_HOST_PAGE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_EDITING_HOST_PAGE, EditingHostPageClass))
#define IS_EDITING_HOST_PAGE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_EDITING_HOST_PAGE))
#define IS_EDITING_HOST_PAGE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_EDITING_HOST_PAGE))
#define EDITING_HOST_PAGE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_EDITING_HOST_PAGE, EditingHostPageClass))

typedef struct _EditingHostPage EditingHostPage;
typedef struct _EditingHostPageClass EditingHostPageClass;

#define TYPE_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;

#define TYPE_DATA_COLLECTION (data_collection_get_type ())
#define DATA_COLLECTION(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_DATA_COLLECTION, DataCollection))
#define DATA_COLLECTION_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_DATA_COLLECTION, DataCollectionClass))
#define IS_DATA_COLLECTION(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_DATA_COLLECTION))
#define IS_DATA_COLLECTION_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_DATA_COLLECTION))
#define DATA_COLLECTION_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_DATA_COLLECTION, DataCollectionClass))

typedef struct _DataCollection DataCollection;
typedef struct _DataCollectionClass DataCollectionClass;

#define TYPE_VIEW_COLLECTION (view_collection_get_type ())
#define VIEW_COLLECTION(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_VIEW_COLLECTION, ViewCollection))
#define VIEW_COLLECTION_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_VIEW_COLLECTION, ViewCollectionClass))
#define IS_VIEW_COLLECTION(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_VIEW_COLLECTION))
#define IS_VIEW_COLLECTION_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_VIEW_COLLECTION))
#define VIEW_COLLECTION_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_VIEW_COLLECTION, ViewCollectionClass))

typedef struct _ViewCollection ViewCollection;
typedef struct _ViewCollectionClass ViewCollectionClass;
#define _data_collection_unref0(var) ((var == NULL) ? NULL : (var = (data_collection_unref (var), NULL)))

#define TYPE_DATA_VIEW (data_view_get_type ())
#define DATA_VIEW(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_DATA_VIEW, DataView))
#define DATA_VIEW_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_DATA_VIEW, DataViewClass))
#define IS_DATA_VIEW(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_DATA_VIEW))
#define IS_DATA_VIEW_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_DATA_VIEW))
#define DATA_VIEW_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_DATA_VIEW, DataViewClass))

typedef struct _DataView DataView;
typedef struct _DataViewClass DataViewClass;

#define 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_CHECKERBOARD_ITEM (checkerboard_item_get_type ())
#define CHECKERBOARD_ITEM(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_CHECKERBOARD_ITEM, CheckerboardItem))
#define CHECKERBOARD_ITEM_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_CHECKERBOARD_ITEM, CheckerboardItemClass))
#define IS_CHECKERBOARD_ITEM(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_CHECKERBOARD_ITEM))
#define IS_CHECKERBOARD_ITEM_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_CHECKERBOARD_ITEM))
#define CHECKERBOARD_ITEM_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_CHECKERBOARD_ITEM, CheckerboardItemClass))

typedef struct _CheckerboardItem CheckerboardItem;
typedef struct _CheckerboardItemClass CheckerboardItemClass;

#define TYPE_MEDIA_SOURCE_ITEM (media_source_item_get_type ())
#define MEDIA_SOURCE_ITEM(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_MEDIA_SOURCE_ITEM, MediaSourceItem))
#define MEDIA_SOURCE_ITEM_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_MEDIA_SOURCE_ITEM, MediaSourceItemClass))
#define IS_MEDIA_SOURCE_ITEM(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_MEDIA_SOURCE_ITEM))
#define IS_MEDIA_SOURCE_ITEM_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_MEDIA_SOURCE_ITEM))
#define MEDIA_SOURCE_ITEM_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_MEDIA_SOURCE_ITEM, MediaSourceItemClass))

typedef struct _MediaSourceItem MediaSourceItem;
typedef struct _MediaSourceItemClass MediaSourceItemClass;

#define TYPE_THUMBNAIL (thumbnail_get_type ())
#define THUMBNAIL(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_THUMBNAIL, Thumbnail))
#define THUMBNAIL_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_THUMBNAIL, ThumbnailClass))
#define IS_THUMBNAIL(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_THUMBNAIL))
#define IS_THUMBNAIL_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_THUMBNAIL))
#define THUMBNAIL_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_THUMBNAIL, ThumbnailClass))

typedef struct _Thumbnail Thumbnail;
typedef struct _ThumbnailClass ThumbnailClass;

#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_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;
typedef struct _SingleDataSourceCommandPrivate SingleDataSourceCommandPrivate;

#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_SIMPLE_PROXYABLE_COMMAND (simple_proxyable_command_get_type ())
#define SIMPLE_PROXYABLE_COMMAND(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_SIMPLE_PROXYABLE_COMMAND, SimpleProxyableCommand))
#define SIMPLE_PROXYABLE_COMMAND_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_SIMPLE_PROXYABLE_COMMAND, SimpleProxyableCommandClass))
#define IS_SIMPLE_PROXYABLE_COMMAND(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_SIMPLE_PROXYABLE_COMMAND))
#define IS_SIMPLE_PROXYABLE_COMMAND_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_SIMPLE_PROXYABLE_COMMAND))
#define SIMPLE_PROXYABLE_COMMAND_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_SIMPLE_PROXYABLE_COMMAND, SimpleProxyableCommandClass))

typedef struct _SimpleProxyableCommand SimpleProxyableCommand;
typedef struct _SimpleProxyableCommandClass SimpleProxyableCommandClass;
typedef struct _SimpleProxyableCommandPrivate SimpleProxyableCommandPrivate;

#define TYPE_SOURCE_PROXY (source_proxy_get_type ())
#define SOURCE_PROXY(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_SOURCE_PROXY, SourceProxy))
#define SOURCE_PROXY_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_SOURCE_PROXY, SourceProxyClass))
#define IS_SOURCE_PROXY(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_SOURCE_PROXY))
#define IS_SOURCE_PROXY_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_SOURCE_PROXY))
#define SOURCE_PROXY_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_SOURCE_PROXY, SourceProxyClass))

typedef struct _SourceProxy SourceProxy;
typedef struct _SourceProxyClass SourceProxyClass;
#define _source_proxy_unref0(var) ((var == NULL) ? NULL : (var = (source_proxy_unref (var), NULL)))

#define TYPE_PROXYABLE (proxyable_get_type ())
#define PROXYABLE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_PROXYABLE, Proxyable))
#define IS_PROXYABLE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_PROXYABLE))
#define PROXYABLE_GET_INTERFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE ((obj), TYPE_PROXYABLE, ProxyableIface))

typedef struct _Proxyable Proxyable;
typedef struct _ProxyableIface ProxyableIface;

#define TYPE_SINGLE_PHOTO_TRANSFORMATION_COMMAND (single_photo_transformation_command_get_type ())
#define SINGLE_PHOTO_TRANSFORMATION_COMMAND(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_SINGLE_PHOTO_TRANSFORMATION_COMMAND, SinglePhotoTransformationCommand))
#define SINGLE_PHOTO_TRANSFORMATION_COMMAND_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_SINGLE_PHOTO_TRANSFORMATION_COMMAND, SinglePhotoTransformationCommandClass))
#define IS_SINGLE_PHOTO_TRANSFORMATION_COMMAND(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_SINGLE_PHOTO_TRANSFORMATION_COMMAND))
#define IS_SINGLE_PHOTO_TRANSFORMATION_COMMAND_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_SINGLE_PHOTO_TRANSFORMATION_COMMAND))
#define SINGLE_PHOTO_TRANSFORMATION_COMMAND_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_SINGLE_PHOTO_TRANSFORMATION_COMMAND, SinglePhotoTransformationCommandClass))

typedef struct _SinglePhotoTransformationCommand SinglePhotoTransformationCommand;
typedef struct _SinglePhotoTransformationCommandClass SinglePhotoTransformationCommandClass;
typedef struct _SinglePhotoTransformationCommandPrivate SinglePhotoTransformationCommandPrivate;

#define TYPE_PHOTO_TRANSFORMATION_STATE (photo_transformation_state_get_type ())
#define PHOTO_TRANSFORMATION_STATE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_PHOTO_TRANSFORMATION_STATE, PhotoTransformationState))
#define PHOTO_TRANSFORMATION_STATE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_PHOTO_TRANSFORMATION_STATE, PhotoTransformationStateClass))
#define IS_PHOTO_TRANSFORMATION_STATE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_PHOTO_TRANSFORMATION_STATE))
#define IS_PHOTO_TRANSFORMATION_STATE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_PHOTO_TRANSFORMATION_STATE))
#define PHOTO_TRANSFORMATION_STATE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_PHOTO_TRANSFORMATION_STATE, PhotoTransformationStateClass))

typedef struct _PhotoTransformationState PhotoTransformationState;
typedef struct _PhotoTransformationStateClass PhotoTransformationStateClass;

#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;
typedef struct _GenericPhotoTransformationCommandPrivate GenericPhotoTransformationCommandPrivate;

#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;
typedef struct _MultipleDataSourceCommandPrivate MultipleDataSourceCommandPrivate;

#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 _g_free0(var) (var = (g_free (var), NULL))

#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_TRANSACTION_CONTROLLER (transaction_controller_get_type ())
#define TRANSACTION_CONTROLLER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_TRANSACTION_CONTROLLER, TransactionController))
#define TRANSACTION_CONTROLLER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_TRANSACTION_CONTROLLER, TransactionControllerClass))
#define IS_TRANSACTION_CONTROLLER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_TRANSACTION_CONTROLLER))
#define IS_TRANSACTION_CONTROLLER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_TRANSACTION_CONTROLLER))
#define TRANSACTION_CONTROLLER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_TRANSACTION_CONTROLLER, TransactionControllerClass))

typedef struct _TransactionController TransactionController;
typedef struct _TransactionControllerClass TransactionControllerClass;

#define TYPE_PROGRESS_DIALOG (progress_dialog_get_type ())
#define PROGRESS_DIALOG(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_PROGRESS_DIALOG, ProgressDialog))
#define PROGRESS_DIALOG_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_PROGRESS_DIALOG, ProgressDialogClass))
#define IS_PROGRESS_DIALOG(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_PROGRESS_DIALOG))
#define IS_PROGRESS_DIALOG_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_PROGRESS_DIALOG))
#define PROGRESS_DIALOG_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_PROGRESS_DIALOG, ProgressDialogClass))

typedef struct _ProgressDialog ProgressDialog;
typedef struct _ProgressDialogClass ProgressDialogClass;

#define TYPE_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;
typedef struct _MultipleDataSourceAtOnceCommandPrivate MultipleDataSourceAtOnceCommandPrivate;

#define TYPE_MEDIA_COLLECTION_REGISTRY (media_collection_registry_get_type ())
#define MEDIA_COLLECTION_REGISTRY(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_MEDIA_COLLECTION_REGISTRY, MediaCollectionRegistry))
#define MEDIA_COLLECTION_REGISTRY_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_MEDIA_COLLECTION_REGISTRY, MediaCollectionRegistryClass))
#define IS_MEDIA_COLLECTION_REGISTRY(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_MEDIA_COLLECTION_REGISTRY))
#define IS_MEDIA_COLLECTION_REGISTRY_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_MEDIA_COLLECTION_REGISTRY))
#define MEDIA_COLLECTION_REGISTRY_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_MEDIA_COLLECTION_REGISTRY, MediaCollectionRegistryClass))

typedef struct _MediaCollectionRegistry MediaCollectionRegistry;
typedef struct _MediaCollectionRegistryClass MediaCollectionRegistryClass;
#define _media_collection_registry_unref0(var) ((var == NULL) ? NULL : (var = (media_collection_registry_unref (var), NULL)))
#define _g_error_free0(var) ((var == NULL) ? NULL : (var = (g_error_free (var), NULL)))

#define TYPE_MULTIPLE_PHOTO_TRANSFORMATION_COMMAND (multiple_photo_transformation_command_get_type ())
#define MULTIPLE_PHOTO_TRANSFORMATION_COMMAND(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_MULTIPLE_PHOTO_TRANSFORMATION_COMMAND, MultiplePhotoTransformationCommand))
#define MULTIPLE_PHOTO_TRANSFORMATION_COMMAND_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_MULTIPLE_PHOTO_TRANSFORMATION_COMMAND, MultiplePhotoTransformationCommandClass))
#define IS_MULTIPLE_PHOTO_TRANSFORMATION_COMMAND(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_MULTIPLE_PHOTO_TRANSFORMATION_COMMAND))
#define IS_MULTIPLE_PHOTO_TRANSFORMATION_COMMAND_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_MULTIPLE_PHOTO_TRANSFORMATION_COMMAND))
#define MULTIPLE_PHOTO_TRANSFORMATION_COMMAND_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_MULTIPLE_PHOTO_TRANSFORMATION_COMMAND, MultiplePhotoTransformationCommandClass))

typedef struct _MultiplePhotoTransformationCommand MultiplePhotoTransformationCommand;
typedef struct _MultiplePhotoTransformationCommandClass MultiplePhotoTransformationCommandClass;
typedef struct _MultiplePhotoTransformationCommandPrivate MultiplePhotoTransformationCommandPrivate;

#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;
typedef struct _RotateSingleCommandPrivate RotateSingleCommandPrivate;

#define TYPE_ROTATION (rotation_get_type ())

#define TYPE_ROTATE_MULTIPLE_COMMAND (rotate_multiple_command_get_type ())
#define ROTATE_MULTIPLE_COMMAND(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_ROTATE_MULTIPLE_COMMAND, RotateMultipleCommand))
#define ROTATE_MULTIPLE_COMMAND_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_ROTATE_MULTIPLE_COMMAND, RotateMultipleCommandClass))
#define IS_ROTATE_MULTIPLE_COMMAND(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_ROTATE_MULTIPLE_COMMAND))
#define IS_ROTATE_MULTIPLE_COMMAND_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_ROTATE_MULTIPLE_COMMAND))
#define ROTATE_MULTIPLE_COMMAND_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_ROTATE_MULTIPLE_COMMAND, RotateMultipleCommandClass))

typedef struct _RotateMultipleCommand RotateMultipleCommand;
typedef struct _RotateMultipleCommandClass RotateMultipleCommandClass;
typedef struct _RotateMultipleCommandPrivate RotateMultipleCommandPrivate;

#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;
typedef struct _EditTitleCommandPrivate EditTitleCommandPrivate;

#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;
typedef struct _EditCommentCommandPrivate EditCommentCommandPrivate;

#define TYPE_EDIT_MULTIPLE_TITLES_COMMAND (edit_multiple_titles_command_get_type ())
#define EDIT_MULTIPLE_TITLES_COMMAND(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_EDIT_MULTIPLE_TITLES_COMMAND, EditMultipleTitlesCommand))
#define EDIT_MULTIPLE_TITLES_COMMAND_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_EDIT_MULTIPLE_TITLES_COMMAND, EditMultipleTitlesCommandClass))
#define IS_EDIT_MULTIPLE_TITLES_COMMAND(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_EDIT_MULTIPLE_TITLES_COMMAND))
#define IS_EDIT_MULTIPLE_TITLES_COMMAND_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_EDIT_MULTIPLE_TITLES_COMMAND))
#define EDIT_MULTIPLE_TITLES_COMMAND_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_EDIT_MULTIPLE_TITLES_COMMAND, EditMultipleTitlesCommandClass))

typedef struct _EditMultipleTitlesCommand EditMultipleTitlesCommand;
typedef struct _EditMultipleTitlesCommandClass EditMultipleTitlesCommandClass;
typedef struct _EditMultipleTitlesCommandPrivate EditMultipleTitlesCommandPrivate;

#define TYPE_EDIT_MULTIPLE_COMMENTS_COMMAND (edit_multiple_comments_command_get_type ())
#define EDIT_MULTIPLE_COMMENTS_COMMAND(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_EDIT_MULTIPLE_COMMENTS_COMMAND, EditMultipleCommentsCommand))
#define EDIT_MULTIPLE_COMMENTS_COMMAND_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_EDIT_MULTIPLE_COMMENTS_COMMAND, EditMultipleCommentsCommandClass))
#define IS_EDIT_MULTIPLE_COMMENTS_COMMAND(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_EDIT_MULTIPLE_COMMENTS_COMMAND))
#define IS_EDIT_MULTIPLE_COMMENTS_COMMAND_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_EDIT_MULTIPLE_COMMENTS_COMMAND))
#define EDIT_MULTIPLE_COMMENTS_COMMAND_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_EDIT_MULTIPLE_COMMENTS_COMMAND, EditMultipleCommentsCommandClass))

typedef struct _EditMultipleCommentsCommand EditMultipleCommentsCommand;
typedef struct _EditMultipleCommentsCommandClass EditMultipleCommentsCommandClass;
typedef struct _EditMultipleCommentsCommandPrivate EditMultipleCommentsCommandPrivate;

#define TYPE_RENAME_EVENT_COMMAND (rename_event_command_get_type ())
#define RENAME_EVENT_COMMAND(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_RENAME_EVENT_COMMAND, RenameEventCommand))
#define RENAME_EVENT_COMMAND_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_RENAME_EVENT_COMMAND, RenameEventCommandClass))
#define IS_RENAME_EVENT_COMMAND(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_RENAME_EVENT_COMMAND))
#define IS_RENAME_EVENT_COMMAND_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_RENAME_EVENT_COMMAND))
#define RENAME_EVENT_COMMAND_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_RENAME_EVENT_COMMAND, RenameEventCommandClass))

typedef struct _RenameEventCommand RenameEventCommand;
typedef struct _RenameEventCommandClass RenameEventCommandClass;
typedef struct _RenameEventCommandPrivate RenameEventCommandPrivate;

#define TYPE_EVENT_SOURCE (event_source_get_type ())
#define EVENT_SOURCE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_EVENT_SOURCE, EventSource))
#define EVENT_SOURCE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_EVENT_SOURCE, EventSourceClass))
#define IS_EVENT_SOURCE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_EVENT_SOURCE))
#define IS_EVENT_SOURCE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_EVENT_SOURCE))
#define EVENT_SOURCE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_EVENT_SOURCE, EventSourceClass))

typedef struct _EventSource EventSource;
typedef struct _EventSourceClass EventSourceClass;

#define TYPE_EVENT (event_get_type ())
#define EVENT(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_EVENT, Event))
#define EVENT_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_EVENT, EventClass))
#define IS_EVENT(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_EVENT))
#define IS_EVENT_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_EVENT))
#define EVENT_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_EVENT, EventClass))

typedef struct _Event Event;
typedef struct _EventClass EventClass;

#define TYPE_EDIT_EVENT_COMMENT_COMMAND (edit_event_comment_command_get_type ())
#define EDIT_EVENT_COMMENT_COMMAND(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_EDIT_EVENT_COMMENT_COMMAND, EditEventCommentCommand))
#define EDIT_EVENT_COMMENT_COMMAND_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_EDIT_EVENT_COMMENT_COMMAND, EditEventCommentCommandClass))
#define IS_EDIT_EVENT_COMMENT_COMMAND(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_EDIT_EVENT_COMMENT_COMMAND))
#define IS_EDIT_EVENT_COMMENT_COMMAND_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_EDIT_EVENT_COMMENT_COMMAND))
#define EDIT_EVENT_COMMENT_COMMAND_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_EDIT_EVENT_COMMENT_COMMAND, EditEventCommentCommandClass))

typedef struct _EditEventCommentCommand EditEventCommentCommand;
typedef struct _EditEventCommentCommandClass EditEventCommentCommandClass;
typedef struct _EditEventCommentCommandPrivate EditEventCommentCommandPrivate;

#define TYPE_SET_KEY_PHOTO_COMMAND (set_key_photo_command_get_type ())
#define SET_KEY_PHOTO_COMMAND(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_SET_KEY_PHOTO_COMMAND, SetKeyPhotoCommand))
#define SET_KEY_PHOTO_COMMAND_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_SET_KEY_PHOTO_COMMAND, SetKeyPhotoCommandClass))
#define IS_SET_KEY_PHOTO_COMMAND(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_SET_KEY_PHOTO_COMMAND))
#define IS_SET_KEY_PHOTO_COMMAND_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_SET_KEY_PHOTO_COMMAND))
#define SET_KEY_PHOTO_COMMAND_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_SET_KEY_PHOTO_COMMAND, SetKeyPhotoCommandClass))

typedef struct _SetKeyPhotoCommand SetKeyPhotoCommand;
typedef struct _SetKeyPhotoCommandClass SetKeyPhotoCommandClass;
typedef struct _SetKeyPhotoCommandPrivate SetKeyPhotoCommandPrivate;

#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;
typedef struct _RevertSingleCommandPrivate RevertSingleCommandPrivate;

#define TYPE_REVERT_MULTIPLE_COMMAND (revert_multiple_command_get_type ())
#define REVERT_MULTIPLE_COMMAND(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_REVERT_MULTIPLE_COMMAND, RevertMultipleCommand))
#define REVERT_MULTIPLE_COMMAND_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_REVERT_MULTIPLE_COMMAND, RevertMultipleCommandClass))
#define IS_REVERT_MULTIPLE_COMMAND(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_REVERT_MULTIPLE_COMMAND))
#define IS_REVERT_MULTIPLE_COMMAND_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_REVERT_MULTIPLE_COMMAND))
#define REVERT_MULTIPLE_COMMAND_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_REVERT_MULTIPLE_COMMAND, RevertMultipleCommandClass))

typedef struct _RevertMultipleCommand RevertMultipleCommand;
typedef struct _RevertMultipleCommandClass RevertMultipleCommandClass;
typedef struct _RevertMultipleCommandPrivate RevertMultipleCommandPrivate;

#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;
typedef struct _EnhanceSingleCommandPrivate EnhanceSingleCommandPrivate;

#define TYPE_ENHANCE_MULTIPLE_COMMAND (enhance_multiple_command_get_type ())
#define ENHANCE_MULTIPLE_COMMAND(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_ENHANCE_MULTIPLE_COMMAND, EnhanceMultipleCommand))
#define ENHANCE_MULTIPLE_COMMAND_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_ENHANCE_MULTIPLE_COMMAND, EnhanceMultipleCommandClass))
#define IS_ENHANCE_MULTIPLE_COMMAND(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_ENHANCE_MULTIPLE_COMMAND))
#define IS_ENHANCE_MULTIPLE_COMMAND_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_ENHANCE_MULTIPLE_COMMAND))
#define ENHANCE_MULTIPLE_COMMAND_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_ENHANCE_MULTIPLE_COMMAND, EnhanceMultipleCommandClass))

typedef struct _EnhanceMultipleCommand EnhanceMultipleCommand;
typedef struct _EnhanceMultipleCommandClass EnhanceMultipleCommandClass;
typedef struct _EnhanceMultipleCommandPrivate EnhanceMultipleCommandPrivate;

#define TYPE_STRAIGHTEN_COMMAND (straighten_command_get_type ())
#define STRAIGHTEN_COMMAND(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_STRAIGHTEN_COMMAND, StraightenCommand))
#define STRAIGHTEN_COMMAND_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_STRAIGHTEN_COMMAND, StraightenCommandClass))
#define IS_STRAIGHTEN_COMMAND(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_STRAIGHTEN_COMMAND))
#define IS_STRAIGHTEN_COMMAND_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_STRAIGHTEN_COMMAND))
#define STRAIGHTEN_COMMAND_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_STRAIGHTEN_COMMAND, StraightenCommandClass))

typedef struct _StraightenCommand StraightenCommand;
typedef struct _StraightenCommandClass StraightenCommandClass;
typedef struct _StraightenCommandPrivate StraightenCommandPrivate;

#define TYPE_BOX (box_get_type ())
typedef struct _Box Box;

#define TYPE_CROP_COMMAND (crop_command_get_type ())
#define CROP_COMMAND(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_CROP_COMMAND, CropCommand))
#define CROP_COMMAND_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_CROP_COMMAND, CropCommandClass))
#define IS_CROP_COMMAND(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_CROP_COMMAND))
#define IS_CROP_COMMAND_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_CROP_COMMAND))
#define CROP_COMMAND_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_CROP_COMMAND, CropCommandClass))

typedef struct _CropCommand CropCommand;
typedef struct _CropCommandClass CropCommandClass;
typedef struct _CropCommandPrivate CropCommandPrivate;

#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 _AdjustColorsSingleCommandPrivate AdjustColorsSingleCommandPrivate;

#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_MULTIPLE_COMMAND (adjust_colors_multiple_command_get_type ())
#define ADJUST_COLORS_MULTIPLE_COMMAND(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_ADJUST_COLORS_MULTIPLE_COMMAND, AdjustColorsMultipleCommand))
#define ADJUST_COLORS_MULTIPLE_COMMAND_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_ADJUST_COLORS_MULTIPLE_COMMAND, AdjustColorsMultipleCommandClass))
#define IS_ADJUST_COLORS_MULTIPLE_COMMAND(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_ADJUST_COLORS_MULTIPLE_COMMAND))
#define IS_ADJUST_COLORS_MULTIPLE_COMMAND_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_ADJUST_COLORS_MULTIPLE_COMMAND))
#define ADJUST_COLORS_MULTIPLE_COMMAND_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_ADJUST_COLORS_MULTIPLE_COMMAND, AdjustColorsMultipleCommandClass))

typedef struct _AdjustColorsMultipleCommand AdjustColorsMultipleCommand;
typedef struct _AdjustColorsMultipleCommandClass AdjustColorsMultipleCommandClass;
typedef struct _AdjustColorsMultipleCommandPrivate AdjustColorsMultipleCommandPrivate;

#define TYPE_REDEYE_COMMAND (redeye_command_get_type ())
#define REDEYE_COMMAND(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_REDEYE_COMMAND, RedeyeCommand))
#define REDEYE_COMMAND_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_REDEYE_COMMAND, RedeyeCommandClass))
#define IS_REDEYE_COMMAND(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_REDEYE_COMMAND))
#define IS_REDEYE_COMMAND_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_REDEYE_COMMAND))
#define REDEYE_COMMAND_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_REDEYE_COMMAND, RedeyeCommandClass))

typedef struct _RedeyeCommand RedeyeCommand;
typedef struct _RedeyeCommandClass RedeyeCommandClass;
typedef struct _RedeyeCommandPrivate RedeyeCommandPrivate;

#define EDITING_TOOLS_TYPE_REDEYE_INSTANCE (editing_tools_redeye_instance_get_type ())
typedef struct _EditingToolsRedeyeInstance EditingToolsRedeyeInstance;

#define TYPE_MOVE_PHOTOS_COMMAND (move_photos_command_get_type ())
#define MOVE_PHOTOS_COMMAND(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_MOVE_PHOTOS_COMMAND, MovePhotosCommand))
#define MOVE_PHOTOS_COMMAND_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_MOVE_PHOTOS_COMMAND, MovePhotosCommandClass))
#define IS_MOVE_PHOTOS_COMMAND(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_MOVE_PHOTOS_COMMAND))
#define IS_MOVE_PHOTOS_COMMAND_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_MOVE_PHOTOS_COMMAND))
#define MOVE_PHOTOS_COMMAND_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_MOVE_PHOTOS_COMMAND, MovePhotosCommandClass))

typedef struct _MovePhotosCommand MovePhotosCommand;
typedef struct _MovePhotosCommandClass MovePhotosCommandClass;
typedef struct _MovePhotosCommandPrivate MovePhotosCommandPrivate;

#define MOVE_PHOTOS_COMMAND_TYPE_REAL_MOVE_PHOTOS_COMMAND (move_photos_command_real_move_photos_command_get_type ())
#define MOVE_PHOTOS_COMMAND_REAL_MOVE_PHOTOS_COMMAND(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), MOVE_PHOTOS_COMMAND_TYPE_REAL_MOVE_PHOTOS_COMMAND, MovePhotosCommandRealMovePhotosCommand))
#define MOVE_PHOTOS_COMMAND_REAL_MOVE_PHOTOS_COMMAND_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), MOVE_PHOTOS_COMMAND_TYPE_REAL_MOVE_PHOTOS_COMMAND, MovePhotosCommandRealMovePhotosCommandClass))
#define MOVE_PHOTOS_COMMAND_IS_REAL_MOVE_PHOTOS_COMMAND(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), MOVE_PHOTOS_COMMAND_TYPE_REAL_MOVE_PHOTOS_COMMAND))
#define MOVE_PHOTOS_COMMAND_IS_REAL_MOVE_PHOTOS_COMMAND_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), MOVE_PHOTOS_COMMAND_TYPE_REAL_MOVE_PHOTOS_COMMAND))
#define MOVE_PHOTOS_COMMAND_REAL_MOVE_PHOTOS_COMMAND_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), MOVE_PHOTOS_COMMAND_TYPE_REAL_MOVE_PHOTOS_COMMAND, MovePhotosCommandRealMovePhotosCommandClass))

typedef struct _MovePhotosCommandRealMovePhotosCommand MovePhotosCommandRealMovePhotosCommand;
typedef struct _MovePhotosCommandRealMovePhotosCommandClass MovePhotosCommandRealMovePhotosCommandClass;
typedef struct _MovePhotosCommandRealMovePhotosCommandPrivate MovePhotosCommandRealMovePhotosCommandPrivate;

#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_NEW_EVENT_COMMAND (new_event_command_get_type ())
#define NEW_EVENT_COMMAND(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_NEW_EVENT_COMMAND, NewEventCommand))
#define NEW_EVENT_COMMAND_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_NEW_EVENT_COMMAND, NewEventCommandClass))
#define IS_NEW_EVENT_COMMAND(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_NEW_EVENT_COMMAND))
#define IS_NEW_EVENT_COMMAND_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_NEW_EVENT_COMMAND))
#define NEW_EVENT_COMMAND_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_NEW_EVENT_COMMAND, NewEventCommandClass))

typedef struct _NewEventCommand NewEventCommand;
typedef struct _NewEventCommandClass NewEventCommandClass;
typedef struct _NewEventCommandPrivate NewEventCommandPrivate;

#define TYPE_SET_EVENT_COMMAND (set_event_command_get_type ())
#define SET_EVENT_COMMAND(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_SET_EVENT_COMMAND, SetEventCommand))
#define SET_EVENT_COMMAND_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_SET_EVENT_COMMAND, SetEventCommandClass))
#define IS_SET_EVENT_COMMAND(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_SET_EVENT_COMMAND))
#define IS_SET_EVENT_COMMAND_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_SET_EVENT_COMMAND))
#define SET_EVENT_COMMAND_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_SET_EVENT_COMMAND, SetEventCommandClass))

typedef struct _SetEventCommand SetEventCommand;
typedef struct _SetEventCommandClass SetEventCommandClass;
typedef struct _SetEventCommandPrivate SetEventCommandPrivate;

#define TYPE_MERGE_EVENTS_COMMAND (merge_events_command_get_type ())
#define MERGE_EVENTS_COMMAND(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_MERGE_EVENTS_COMMAND, MergeEventsCommand))
#define MERGE_EVENTS_COMMAND_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_MERGE_EVENTS_COMMAND, MergeEventsCommandClass))
#define IS_MERGE_EVENTS_COMMAND(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_MERGE_EVENTS_COMMAND))
#define IS_MERGE_EVENTS_COMMAND_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_MERGE_EVENTS_COMMAND))
#define MERGE_EVENTS_COMMAND_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_MERGE_EVENTS_COMMAND, MergeEventsCommandClass))

typedef struct _MergeEventsCommand MergeEventsCommand;
typedef struct _MergeEventsCommandClass MergeEventsCommandClass;
typedef struct _MergeEventsCommandPrivate MergeEventsCommandPrivate;

#define TYPE_DUPLICATE_MULTIPLE_PHOTOS_COMMAND (duplicate_multiple_photos_command_get_type ())
#define DUPLICATE_MULTIPLE_PHOTOS_COMMAND(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_DUPLICATE_MULTIPLE_PHOTOS_COMMAND, DuplicateMultiplePhotosCommand))
#define DUPLICATE_MULTIPLE_PHOTOS_COMMAND_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_DUPLICATE_MULTIPLE_PHOTOS_COMMAND, DuplicateMultiplePhotosCommandClass))
#define IS_DUPLICATE_MULTIPLE_PHOTOS_COMMAND(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_DUPLICATE_MULTIPLE_PHOTOS_COMMAND))
#define IS_DUPLICATE_MULTIPLE_PHOTOS_COMMAND_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_DUPLICATE_MULTIPLE_PHOTOS_COMMAND))
#define DUPLICATE_MULTIPLE_PHOTOS_COMMAND_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_DUPLICATE_MULTIPLE_PHOTOS_COMMAND, DuplicateMultiplePhotosCommandClass))

typedef struct _DuplicateMultiplePhotosCommand DuplicateMultiplePhotosCommand;
typedef struct _DuplicateMultiplePhotosCommandClass DuplicateMultiplePhotosCommandClass;
typedef struct _DuplicateMultiplePhotosCommandPrivate DuplicateMultiplePhotosCommandPrivate;

#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_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_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_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;
typedef struct _SetRatingSingleCommandPrivate SetRatingSingleCommandPrivate;

#define TYPE_RATING (rating_get_type ())

#define TYPE_SET_RATING_COMMAND (set_rating_command_get_type ())
#define SET_RATING_COMMAND(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_SET_RATING_COMMAND, SetRatingCommand))
#define SET_RATING_COMMAND_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_SET_RATING_COMMAND, SetRatingCommandClass))
#define IS_SET_RATING_COMMAND(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_SET_RATING_COMMAND))
#define IS_SET_RATING_COMMAND_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_SET_RATING_COMMAND))
#define SET_RATING_COMMAND_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_SET_RATING_COMMAND, SetRatingCommandClass))

typedef struct _SetRatingCommand SetRatingCommand;
typedef struct _SetRatingCommandClass SetRatingCommandClass;
typedef struct _SetRatingCommandPrivate SetRatingCommandPrivate;

#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;
typedef struct _SetRawDeveloperCommandPrivate SetRawDeveloperCommandPrivate;

#define TYPE_RAW_DEVELOPER (raw_developer_get_type ())

#define TYPE_PHOTO_FILE_FORMAT (photo_file_format_get_type ())

#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;
typedef struct _AdjustDateTimePhotoCommandPrivate AdjustDateTimePhotoCommandPrivate;

#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_CONTAINER_SOURCE_COLLECTION (container_source_collection_get_type ())
#define CONTAINER_SOURCE_COLLECTION(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_CONTAINER_SOURCE_COLLECTION, ContainerSourceCollection))
#define CONTAINER_SOURCE_COLLECTION_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_CONTAINER_SOURCE_COLLECTION, ContainerSourceCollectionClass))
#define IS_CONTAINER_SOURCE_COLLECTION(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_CONTAINER_SOURCE_COLLECTION))
#define IS_CONTAINER_SOURCE_COLLECTION_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_CONTAINER_SOURCE_COLLECTION))
#define CONTAINER_SOURCE_COLLECTION_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_CONTAINER_SOURCE_COLLECTION, ContainerSourceCollectionClass))

typedef struct _ContainerSourceCollection ContainerSourceCollection;
typedef struct _ContainerSourceCollectionClass ContainerSourceCollectionClass;

#define TYPE_EVENT_SOURCE_COLLECTION (event_source_collection_get_type ())
#define EVENT_SOURCE_COLLECTION(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_EVENT_SOURCE_COLLECTION, EventSourceCollection))
#define EVENT_SOURCE_COLLECTION_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_EVENT_SOURCE_COLLECTION, EventSourceCollectionClass))
#define IS_EVENT_SOURCE_COLLECTION(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_EVENT_SOURCE_COLLECTION))
#define IS_EVENT_SOURCE_COLLECTION_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_EVENT_SOURCE_COLLECTION))
#define EVENT_SOURCE_COLLECTION_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_EVENT_SOURCE_COLLECTION, EventSourceCollectionClass))

typedef struct _EventSourceCollection EventSourceCollection;
typedef struct _EventSourceCollectionClass EventSourceCollectionClass;

#define TYPE_EVENT_VIEW (event_view_get_type ())
#define EVENT_VIEW(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_EVENT_VIEW, EventView))
#define EVENT_VIEW_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_EVENT_VIEW, EventViewClass))
#define IS_EVENT_VIEW(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_EVENT_VIEW))
#define IS_EVENT_VIEW_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_EVENT_VIEW))
#define EVENT_VIEW_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_EVENT_VIEW, EventViewClass))

typedef struct _EventView EventView;
typedef struct _EventViewClass EventViewClass;

#define TYPE_ADJUST_DATE_TIME_PHOTOS_COMMAND (adjust_date_time_photos_command_get_type ())
#define ADJUST_DATE_TIME_PHOTOS_COMMAND(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_ADJUST_DATE_TIME_PHOTOS_COMMAND, AdjustDateTimePhotosCommand))
#define ADJUST_DATE_TIME_PHOTOS_COMMAND_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_ADJUST_DATE_TIME_PHOTOS_COMMAND, AdjustDateTimePhotosCommandClass))
#define IS_ADJUST_DATE_TIME_PHOTOS_COMMAND(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_ADJUST_DATE_TIME_PHOTOS_COMMAND))
#define IS_ADJUST_DATE_TIME_PHOTOS_COMMAND_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_ADJUST_DATE_TIME_PHOTOS_COMMAND))
#define ADJUST_DATE_TIME_PHOTOS_COMMAND_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_ADJUST_DATE_TIME_PHOTOS_COMMAND, AdjustDateTimePhotosCommandClass))

typedef struct _AdjustDateTimePhotosCommand AdjustDateTimePhotosCommand;
typedef struct _AdjustDateTimePhotosCommandClass AdjustDateTimePhotosCommandClass;
typedef struct _AdjustDateTimePhotosCommandPrivate AdjustDateTimePhotosCommandPrivate;

#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;
typedef struct _AddTagsCommandPrivate AddTagsCommandPrivate;

#define TYPE_VIDEO_SOURCE_COLLECTION (video_source_collection_get_type ())
#define VIDEO_SOURCE_COLLECTION(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_VIDEO_SOURCE_COLLECTION, VideoSourceCollection))
#define VIDEO_SOURCE_COLLECTION_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_VIDEO_SOURCE_COLLECTION, VideoSourceCollectionClass))
#define IS_VIDEO_SOURCE_COLLECTION(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_VIDEO_SOURCE_COLLECTION))
#define IS_VIDEO_SOURCE_COLLECTION_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_VIDEO_SOURCE_COLLECTION))
#define VIDEO_SOURCE_COLLECTION_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_VIDEO_SOURCE_COLLECTION, VideoSourceCollectionClass))

typedef struct _VideoSourceCollection VideoSourceCollection;
typedef struct _VideoSourceCollectionClass VideoSourceCollectionClass;

#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_RENAME_TAG_COMMAND (rename_tag_command_get_type ())
#define RENAME_TAG_COMMAND(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_RENAME_TAG_COMMAND, RenameTagCommand))
#define RENAME_TAG_COMMAND_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_RENAME_TAG_COMMAND, RenameTagCommandClass))
#define IS_RENAME_TAG_COMMAND(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_RENAME_TAG_COMMAND))
#define IS_RENAME_TAG_COMMAND_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_RENAME_TAG_COMMAND))
#define RENAME_TAG_COMMAND_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_RENAME_TAG_COMMAND, RenameTagCommandClass))

typedef struct _RenameTagCommand RenameTagCommand;
typedef struct _RenameTagCommandClass RenameTagCommandClass;
typedef struct _RenameTagCommandPrivate RenameTagCommandPrivate;

#define TYPE_DELETE_TAG_COMMAND (delete_tag_command_get_type ())
#define DELETE_TAG_COMMAND(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_DELETE_TAG_COMMAND, DeleteTagCommand))
#define DELETE_TAG_COMMAND_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_DELETE_TAG_COMMAND, DeleteTagCommandClass))
#define IS_DELETE_TAG_COMMAND(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_DELETE_TAG_COMMAND))
#define IS_DELETE_TAG_COMMAND_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_DELETE_TAG_COMMAND))
#define DELETE_TAG_COMMAND_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_DELETE_TAG_COMMAND, DeleteTagCommandClass))

typedef struct _DeleteTagCommand DeleteTagCommand;
typedef struct _DeleteTagCommandClass DeleteTagCommandClass;
typedef struct _DeleteTagCommandPrivate DeleteTagCommandPrivate;

#define TYPE_TAG_SOURCE_COLLECTION (tag_source_collection_get_type ())
#define TAG_SOURCE_COLLECTION(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_TAG_SOURCE_COLLECTION, TagSourceCollection))
#define TAG_SOURCE_COLLECTION_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_TAG_SOURCE_COLLECTION, TagSourceCollectionClass))
#define IS_TAG_SOURCE_COLLECTION(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_TAG_SOURCE_COLLECTION))
#define IS_TAG_SOURCE_COLLECTION_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_TAG_SOURCE_COLLECTION))
#define TAG_SOURCE_COLLECTION_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_TAG_SOURCE_COLLECTION, TagSourceCollectionClass))

typedef struct _TagSourceCollection TagSourceCollection;
typedef struct _TagSourceCollectionClass TagSourceCollectionClass;

#define TYPE_NEW_CHILD_TAG_COMMAND (new_child_tag_command_get_type ())
#define NEW_CHILD_TAG_COMMAND(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_NEW_CHILD_TAG_COMMAND, NewChildTagCommand))
#define NEW_CHILD_TAG_COMMAND_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_NEW_CHILD_TAG_COMMAND, NewChildTagCommandClass))
#define IS_NEW_CHILD_TAG_COMMAND(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_NEW_CHILD_TAG_COMMAND))
#define IS_NEW_CHILD_TAG_COMMAND_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_NEW_CHILD_TAG_COMMAND))
#define NEW_CHILD_TAG_COMMAND_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_NEW_CHILD_TAG_COMMAND, NewChildTagCommandClass))

typedef struct _NewChildTagCommand NewChildTagCommand;
typedef struct _NewChildTagCommandClass NewChildTagCommandClass;
typedef struct _NewChildTagCommandPrivate NewChildTagCommandPrivate;

#define TYPE_NEW_ROOT_TAG_COMMAND (new_root_tag_command_get_type ())
#define NEW_ROOT_TAG_COMMAND(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_NEW_ROOT_TAG_COMMAND, NewRootTagCommand))
#define NEW_ROOT_TAG_COMMAND_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_NEW_ROOT_TAG_COMMAND, NewRootTagCommandClass))
#define IS_NEW_ROOT_TAG_COMMAND(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_NEW_ROOT_TAG_COMMAND))
#define IS_NEW_ROOT_TAG_COMMAND_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_NEW_ROOT_TAG_COMMAND))
#define NEW_ROOT_TAG_COMMAND_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_NEW_ROOT_TAG_COMMAND, NewRootTagCommandClass))

typedef struct _NewRootTagCommand NewRootTagCommand;
typedef struct _NewRootTagCommandClass NewRootTagCommandClass;
typedef struct _NewRootTagCommandPrivate NewRootTagCommandPrivate;

#define TYPE_REPARENT_TAG_COMMAND (reparent_tag_command_get_type ())
#define REPARENT_TAG_COMMAND(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_REPARENT_TAG_COMMAND, ReparentTagCommand))
#define REPARENT_TAG_COMMAND_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_REPARENT_TAG_COMMAND, ReparentTagCommandClass))
#define IS_REPARENT_TAG_COMMAND(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_REPARENT_TAG_COMMAND))
#define IS_REPARENT_TAG_COMMAND_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_REPARENT_TAG_COMMAND))
#define REPARENT_TAG_COMMAND_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_REPARENT_TAG_COMMAND, ReparentTagCommandClass))

typedef struct _ReparentTagCommand ReparentTagCommand;
typedef struct _ReparentTagCommandClass ReparentTagCommandClass;
typedef struct _ReparentTagCommandPrivate ReparentTagCommandPrivate;
#define _g_regex_unref0(var) ((var == NULL) ? NULL : (var = (g_regex_unref (var), NULL)))

#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 _ModifyTagsCommandPrivate ModifyTagsCommandPrivate;

#define TYPE_TAG_UNTAG_PHOTOS_COMMAND (tag_untag_photos_command_get_type ())
#define TAG_UNTAG_PHOTOS_COMMAND(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_TAG_UNTAG_PHOTOS_COMMAND, TagUntagPhotosCommand))
#define TAG_UNTAG_PHOTOS_COMMAND_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_TAG_UNTAG_PHOTOS_COMMAND, TagUntagPhotosCommandClass))
#define IS_TAG_UNTAG_PHOTOS_COMMAND(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_TAG_UNTAG_PHOTOS_COMMAND))
#define IS_TAG_UNTAG_PHOTOS_COMMAND_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_TAG_UNTAG_PHOTOS_COMMAND))
#define TAG_UNTAG_PHOTOS_COMMAND_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_TAG_UNTAG_PHOTOS_COMMAND, TagUntagPhotosCommandClass))

typedef struct _TagUntagPhotosCommand TagUntagPhotosCommand;
typedef struct _TagUntagPhotosCommandClass TagUntagPhotosCommandClass;
typedef struct _TagUntagPhotosCommandPrivate TagUntagPhotosCommandPrivate;

#define TYPE_RENAME_SAVED_SEARCH_COMMAND (rename_saved_search_command_get_type ())
#define RENAME_SAVED_SEARCH_COMMAND(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_RENAME_SAVED_SEARCH_COMMAND, RenameSavedSearchCommand))
#define RENAME_SAVED_SEARCH_COMMAND_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_RENAME_SAVED_SEARCH_COMMAND, RenameSavedSearchCommandClass))
#define IS_RENAME_SAVED_SEARCH_COMMAND(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_RENAME_SAVED_SEARCH_COMMAND))
#define IS_RENAME_SAVED_SEARCH_COMMAND_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_RENAME_SAVED_SEARCH_COMMAND))
#define RENAME_SAVED_SEARCH_COMMAND_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_RENAME_SAVED_SEARCH_COMMAND, RenameSavedSearchCommandClass))

typedef struct _RenameSavedSearchCommand RenameSavedSearchCommand;
typedef struct _RenameSavedSearchCommandClass RenameSavedSearchCommandClass;
typedef struct _RenameSavedSearchCommandPrivate RenameSavedSearchCommandPrivate;

#define TYPE_SAVED_SEARCH (saved_search_get_type ())
#define SAVED_SEARCH(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_SAVED_SEARCH, SavedSearch))
#define SAVED_SEARCH_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_SAVED_SEARCH, SavedSearchClass))
#define IS_SAVED_SEARCH(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_SAVED_SEARCH))
#define IS_SAVED_SEARCH_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_SAVED_SEARCH))
#define SAVED_SEARCH_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_SAVED_SEARCH, SavedSearchClass))

typedef struct _SavedSearch SavedSearch;
typedef struct _SavedSearchClass SavedSearchClass;

#define TYPE_DELETE_SAVED_SEARCH_COMMAND (delete_saved_search_command_get_type ())
#define DELETE_SAVED_SEARCH_COMMAND(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_DELETE_SAVED_SEARCH_COMMAND, DeleteSavedSearchCommand))
#define DELETE_SAVED_SEARCH_COMMAND_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_DELETE_SAVED_SEARCH_COMMAND, DeleteSavedSearchCommandClass))
#define IS_DELETE_SAVED_SEARCH_COMMAND(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_DELETE_SAVED_SEARCH_COMMAND))
#define IS_DELETE_SAVED_SEARCH_COMMAND_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_DELETE_SAVED_SEARCH_COMMAND))
#define DELETE_SAVED_SEARCH_COMMAND_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_DELETE_SAVED_SEARCH_COMMAND, DeleteSavedSearchCommandClass))

typedef struct _DeleteSavedSearchCommand DeleteSavedSearchCommand;
typedef struct _DeleteSavedSearchCommandClass DeleteSavedSearchCommandClass;
typedef struct _DeleteSavedSearchCommandPrivate DeleteSavedSearchCommandPrivate;

#define TYPE_SAVED_SEARCH_TABLE (saved_search_table_get_type ())
#define SAVED_SEARCH_TABLE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_SAVED_SEARCH_TABLE, SavedSearchTable))
#define SAVED_SEARCH_TABLE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_SAVED_SEARCH_TABLE, SavedSearchTableClass))
#define IS_SAVED_SEARCH_TABLE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_SAVED_SEARCH_TABLE))
#define IS_SAVED_SEARCH_TABLE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_SAVED_SEARCH_TABLE))
#define SAVED_SEARCH_TABLE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_SAVED_SEARCH_TABLE, SavedSearchTableClass))

typedef struct _SavedSearchTable SavedSearchTable;
typedef struct _SavedSearchTableClass SavedSearchTableClass;
#define _saved_search_table_unref0(var) ((var == NULL) ? NULL : (var = (saved_search_table_unref (var), NULL)))

#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;
typedef struct _TrashUntrashPhotosCommandPrivate TrashUntrashPhotosCommandPrivate;

#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;
typedef struct _FlagUnflagCommandPrivate FlagUnflagCommandPrivate;

#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 _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 _CommandDescriptionIface {
	GTypeInterface parent_iface;
	gchar* (*get_name) (CommandDescription* self);
	gchar* (*get_explanation) (CommandDescription* self);
};

struct _Command {
	GObject parent_instance;
	CommandPrivate * priv;
};

struct _CommandClass {
	GObjectClass parent_class;
	void (*prepare) (Command* self);
	void (*execute) (Command* self);
	void (*undo) (Command* self);
	void (*redo) (Command* self);
	gboolean (*compress) (Command* self, Command* command);
	gchar* (*get_name) (Command* self);
	gchar* (*get_explanation) (Command* self);
};

struct _PageCommand {
	Command parent_instance;
	PageCommandPrivate * priv;
};

struct _PageCommandClass {
	CommandClass parent_class;
};

struct _PageCommandPrivate {
	Page* page;
	gboolean auto_return;
	Photo* library_photo;
	CollectionPage* collection_page;
};

struct _SingleDataSourceCommand {
	PageCommand parent_instance;
	SingleDataSourceCommandPrivate * priv;
	DataSource* source;
};

struct _SingleDataSourceCommandClass {
	PageCommandClass parent_class;
};

struct _SimpleProxyableCommand {
	PageCommand parent_instance;
	SimpleProxyableCommandPrivate * priv;
};

struct _SimpleProxyableCommandClass {
	PageCommandClass parent_class;
	void (*execute_on_source) (SimpleProxyableCommand* self, DataSource* source);
	void (*undo_on_source) (SimpleProxyableCommand* self, DataSource* source);
};

struct _SimpleProxyableCommandPrivate {
	SourceProxy* proxy;
	GeeHashSet* proxies;
};

struct _ProxyableIface {
	GTypeInterface parent_iface;
	SourceProxy* (*get_proxy) (Proxyable* self);
};

struct _SinglePhotoTransformationCommand {
	SingleDataSourceCommand parent_instance;
	SinglePhotoTransformationCommandPrivate * priv;
};

struct _SinglePhotoTransformationCommandClass {
	SingleDataSourceCommandClass parent_class;
};

struct _SinglePhotoTransformationCommandPrivate {
	PhotoTransformationState* state;
};

struct _GenericPhotoTransformationCommand {
	SingleDataSourceCommand parent_instance;
	GenericPhotoTransformationCommandPrivate * priv;
};

struct _GenericPhotoTransformationCommandClass {
	SingleDataSourceCommandClass parent_class;
	void (*execute_on_photo) (GenericPhotoTransformationCommand* self, Photo* photo);
	gboolean (*can_compress) (GenericPhotoTransformationCommand* self, Command* command);
};

struct _GenericPhotoTransformationCommandPrivate {
	PhotoTransformationState* original_state;
	PhotoTransformationState* transformed_state;
};

struct _MultipleDataSourceCommand {
	PageCommand parent_instance;
	MultipleDataSourceCommandPrivate * priv;
	GeeArrayList* source_list;
};

struct _MultipleDataSourceCommandClass {
	PageCommandClass parent_class;
	void (*execute_on_source) (MultipleDataSourceCommand* self, DataSource* source);
	void (*undo_on_source) (MultipleDataSourceCommand* self, DataSource* source);
};

struct _MultipleDataSourceCommandPrivate {
	gchar* progress_text;
	gchar* undo_progress_text;
	GeeArrayList* acted_upon;
	GeeHashSet* hooked_collections;
};

struct _MultipleDataSourceAtOnceCommand {
	PageCommand parent_instance;
	MultipleDataSourceAtOnceCommandPrivate * priv;
};

struct _MultipleDataSourceAtOnceCommandClass {
	PageCommandClass parent_class;
	void (*execute_on_all) (MultipleDataSourceAtOnceCommand* self, GeeCollection* sources);
	void (*undo_on_all) (MultipleDataSourceAtOnceCommand* self, GeeCollection* sources);
};

struct _MultipleDataSourceAtOnceCommandPrivate {
	GeeHashSet* sources;
	GeeHashSet* hooked_collections;
};

typedef enum  {
	DATABASE_ERROR_ERROR,
	DATABASE_ERROR_BACKING,
	DATABASE_ERROR_MEMORY,
	DATABASE_ERROR_ABORT,
	DATABASE_ERROR_LIMITS,
	DATABASE_ERROR_TYPESPEC
} DatabaseError;
#define DATABASE_ERROR database_error_quark ()
struct _MultiplePhotoTransformationCommand {
	MultipleDataSourceCommand parent_instance;
	MultiplePhotoTransformationCommandPrivate * priv;
};

struct _MultiplePhotoTransformationCommandClass {
	MultipleDataSourceCommandClass parent_class;
};

struct _MultiplePhotoTransformationCommandPrivate {
	GeeHashMap* map;
};

struct _RotateSingleCommand {
	SingleDataSourceCommand parent_instance;
	RotateSingleCommandPrivate * priv;
};

struct _RotateSingleCommandClass {
	SingleDataSourceCommandClass parent_class;
};

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

struct _RotateSingleCommandPrivate {
	Rotation rotation;
};

struct _RotateMultipleCommand {
	MultipleDataSourceCommand parent_instance;
	RotateMultipleCommandPrivate * priv;
};

struct _RotateMultipleCommandClass {
	MultipleDataSourceCommandClass parent_class;
};

struct _RotateMultipleCommandPrivate {
	Rotation rotation;
};

struct _EditTitleCommand {
	SingleDataSourceCommand parent_instance;
	EditTitleCommandPrivate * priv;
};

struct _EditTitleCommandClass {
	SingleDataSourceCommandClass parent_class;
};

struct _EditTitleCommandPrivate {
	gchar* new_title;
	gchar* old_title;
};

struct _EditCommentCommand {
	SingleDataSourceCommand parent_instance;
	EditCommentCommandPrivate * priv;
};

struct _EditCommentCommandClass {
	SingleDataSourceCommandClass parent_class;
};

struct _EditCommentCommandPrivate {
	gchar* new_comment;
	gchar* old_comment;
};

struct _EditMultipleTitlesCommand {
	MultipleDataSourceAtOnceCommand parent_instance;
	EditMultipleTitlesCommandPrivate * priv;
	gchar* new_title;
	GeeHashMap* old_titles;
};

struct _EditMultipleTitlesCommandClass {
	MultipleDataSourceAtOnceCommandClass parent_class;
};

struct _EditMultipleCommentsCommand {
	MultipleDataSourceAtOnceCommand parent_instance;
	EditMultipleCommentsCommandPrivate * priv;
	gchar* new_comment;
	GeeHashMap* old_comments;
};

struct _EditMultipleCommentsCommandClass {
	MultipleDataSourceAtOnceCommandClass parent_class;
};

struct _RenameEventCommand {
	SimpleProxyableCommand parent_instance;
	RenameEventCommandPrivate * priv;
};

struct _RenameEventCommandClass {
	SimpleProxyableCommandClass parent_class;
};

struct _RenameEventCommandPrivate {
	gchar* new_name;
	gchar* old_name;
};

struct _EditEventCommentCommand {
	SimpleProxyableCommand parent_instance;
	EditEventCommentCommandPrivate * priv;
};

struct _EditEventCommentCommandClass {
	SimpleProxyableCommandClass parent_class;
};

struct _EditEventCommentCommandPrivate {
	gchar* new_comment;
	gchar* old_comment;
};

struct _SetKeyPhotoCommand {
	SingleDataSourceCommand parent_instance;
	SetKeyPhotoCommandPrivate * priv;
};

struct _SetKeyPhotoCommandClass {
	SingleDataSourceCommandClass parent_class;
};

struct _SetKeyPhotoCommandPrivate {
	MediaSource* new_primary_source;
	MediaSource* old_primary_source;
};

struct _RevertSingleCommand {
	GenericPhotoTransformationCommand parent_instance;
	RevertSingleCommandPrivate * priv;
};

struct _RevertSingleCommandClass {
	GenericPhotoTransformationCommandClass parent_class;
};

struct _RevertMultipleCommand {
	MultiplePhotoTransformationCommand parent_instance;
	RevertMultipleCommandPrivate * priv;
};

struct _RevertMultipleCommandClass {
	MultiplePhotoTransformationCommandClass parent_class;
};

struct _EnhanceSingleCommand {
	GenericPhotoTransformationCommand parent_instance;
	EnhanceSingleCommandPrivate * priv;
};

struct _EnhanceSingleCommandClass {
	GenericPhotoTransformationCommandClass parent_class;
};

struct _EnhanceMultipleCommand {
	MultiplePhotoTransformationCommand parent_instance;
	EnhanceMultipleCommandPrivate * priv;
};

struct _EnhanceMultipleCommandClass {
	MultiplePhotoTransformationCommandClass parent_class;
};

struct _StraightenCommand {
	GenericPhotoTransformationCommand parent_instance;
	StraightenCommandPrivate * priv;
};

struct _StraightenCommandClass {
	GenericPhotoTransformationCommandClass parent_class;
};

struct _Box {
	gint left;
	gint top;
	gint right;
	gint bottom;
};

struct _StraightenCommandPrivate {
	gdouble theta;
	Box crop;
};

struct _CropCommand {
	GenericPhotoTransformationCommand parent_instance;
	CropCommandPrivate * priv;
};

struct _CropCommandClass {
	GenericPhotoTransformationCommandClass parent_class;
};

struct _CropCommandPrivate {
	Box crop;
};

struct _AdjustColorsSingleCommand {
	GenericPhotoTransformationCommand parent_instance;
	AdjustColorsSingleCommandPrivate * priv;
};

struct _AdjustColorsSingleCommandClass {
	GenericPhotoTransformationCommandClass parent_class;
};

struct _AdjustColorsSingleCommandPrivate {
	PixelTransformationBundle* transformations;
};

struct _AdjustColorsMultipleCommand {
	MultiplePhotoTransformationCommand parent_instance;
	AdjustColorsMultipleCommandPrivate * priv;
};

struct _AdjustColorsMultipleCommandClass {
	MultiplePhotoTransformationCommandClass parent_class;
};

struct _AdjustColorsMultipleCommandPrivate {
	PixelTransformationBundle* transformations;
};

struct _RedeyeCommand {
	GenericPhotoTransformationCommand parent_instance;
	RedeyeCommandPrivate * priv;
};

struct _RedeyeCommandClass {
	GenericPhotoTransformationCommandClass parent_class;
};

struct _EditingToolsRedeyeInstance {
	GdkPoint center;
	gint radius;
};

struct _RedeyeCommandPrivate {
	EditingToolsRedeyeInstance redeye_instance;
};

struct _MovePhotosCommand {
	Command parent_instance;
	MovePhotosCommandPrivate * priv;
	MovePhotosCommandRealMovePhotosCommand* real_command;
};

struct _MovePhotosCommandClass {
	CommandClass parent_class;
};

struct _MovePhotosCommandRealMovePhotosCommand {
	MultipleDataSourceCommand parent_instance;
	MovePhotosCommandRealMovePhotosCommandPrivate * priv;
};

struct _MovePhotosCommandRealMovePhotosCommandClass {
	MultipleDataSourceCommandClass parent_class;
};

struct _MovePhotosCommandRealMovePhotosCommandPrivate {
	SourceProxy* new_event_proxy;
	GeeHashMap* old_events;
};

struct _NewEventCommand {
	MovePhotosCommand parent_instance;
	NewEventCommandPrivate * priv;
};

struct _NewEventCommandClass {
	MovePhotosCommandClass parent_class;
};

struct _SetEventCommand {
	MovePhotosCommand parent_instance;
	SetEventCommandPrivate * priv;
};

struct _SetEventCommandClass {
	MovePhotosCommandClass parent_class;
};

struct _MergeEventsCommand {
	MovePhotosCommand parent_instance;
	MergeEventsCommandPrivate * priv;
};

struct _MergeEventsCommandClass {
	MovePhotosCommandClass parent_class;
};

struct _DuplicateMultiplePhotosCommand {
	MultipleDataSourceCommand parent_instance;
	DuplicateMultiplePhotosCommandPrivate * priv;
};

struct _DuplicateMultiplePhotosCommandClass {
	MultipleDataSourceCommandClass parent_class;
};

struct _DuplicateMultiplePhotosCommandPrivate {
	GeeHashMap* dupes;
	gint failed;
};

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 gboolean (*ProgressMonitor) (guint64 current, guint64 total, gboolean do_event_loop, void* user_data);
struct _SetRatingSingleCommand {
	SingleDataSourceCommand parent_instance;
	SetRatingSingleCommandPrivate * priv;
};

struct _SetRatingSingleCommandClass {
	SingleDataSourceCommandClass parent_class;
};

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 _SetRatingSingleCommandPrivate {
	Rating last_rating;
	Rating new_rating;
	gboolean set_direct;
	gboolean incrementing;
};

struct _SetRatingCommand {
	MultipleDataSourceCommand parent_instance;
	SetRatingCommandPrivate * priv;
};

struct _SetRatingCommandClass {
	MultipleDataSourceCommandClass parent_class;
};

struct _SetRatingCommandPrivate {
	GeeHashMap* last_rating_map;
	Rating new_rating;
	gboolean set_direct;
	gboolean incrementing;
	gint action_count;
};

struct _SetRawDeveloperCommand {
	MultipleDataSourceCommand parent_instance;
	SetRawDeveloperCommandPrivate * priv;
};

struct _SetRawDeveloperCommandClass {
	MultipleDataSourceCommandClass parent_class;
};

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

struct _SetRawDeveloperCommandPrivate {
	GeeHashMap* last_developer_map;
	GeeHashMap* last_transformation_map;
	RawDeveloper new_developer;
};

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 _AdjustDateTimePhotoCommand {
	SingleDataSourceCommand parent_instance;
	AdjustDateTimePhotoCommandPrivate * priv;
};

struct _AdjustDateTimePhotoCommandClass {
	SingleDataSourceCommandClass parent_class;
};

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

struct _AdjustDateTimePhotoCommandPrivate {
	Dateable* dateable;
	Event* prev_event;
	gint64 time_shift;
	gboolean modify_original;
};

struct _AdjustDateTimePhotosCommand {
	MultipleDataSourceCommand parent_instance;
	AdjustDateTimePhotosCommandPrivate * priv;
};

struct _AdjustDateTimePhotosCommandClass {
	MultipleDataSourceCommandClass parent_class;
};

struct _AdjustDateTimePhotosCommandPrivate {
	gint64 time_shift;
	gboolean keep_relativity;
	gboolean modify_originals;
	GeeMap* prev_events;
	time_t* new_time;
	GeeHashMap* old_times;
	GeeArrayList* error_list;
};

struct _AddTagsCommand {
	PageCommand parent_instance;
	AddTagsCommandPrivate * priv;
};

struct _AddTagsCommandClass {
	PageCommandClass parent_class;
};

struct _AddTagsCommandPrivate {
	GeeHashMap* map;
};

struct _RenameTagCommand {
	SimpleProxyableCommand parent_instance;
	RenameTagCommandPrivate * priv;
};

struct _RenameTagCommandClass {
	SimpleProxyableCommandClass parent_class;
};

struct _RenameTagCommandPrivate {
	gchar* old_name;
	gchar* new_name;
};

struct _DeleteTagCommand {
	SimpleProxyableCommand parent_instance;
	DeleteTagCommandPrivate * priv;
};

struct _DeleteTagCommandClass {
	SimpleProxyableCommandClass parent_class;
};

struct _DeleteTagCommandPrivate {
	GeeList* recursive_victim_proxies;
};

struct _NewChildTagCommand {
	SimpleProxyableCommand parent_instance;
	NewChildTagCommandPrivate * priv;
};

struct _NewChildTagCommandClass {
	SimpleProxyableCommandClass parent_class;
};

struct _NewChildTagCommandPrivate {
	Tag* created_child;
};

struct _NewRootTagCommand {
	PageCommand parent_instance;
	NewRootTagCommandPrivate * priv;
};

struct _NewRootTagCommandClass {
	PageCommandClass parent_class;
};

struct _NewRootTagCommandPrivate {
	SourceProxy* created_proxy;
};

struct _ReparentTagCommand {
	PageCommand parent_instance;
	ReparentTagCommandPrivate * priv;
};

struct _ReparentTagCommandClass {
	PageCommandClass parent_class;
};

struct _ReparentTagCommandPrivate {
	gchar* from_path;
	gchar* to_path;
	gchar* to_path_parent_path;
	GeeList* src_before_state;
	GeeList* dest_before_state;
	GeeList* after_state;
	GeeHashSet* sources_in_play;
	GeeMap* dest_parent_attachments;
	GeeMap* src_parent_detachments;
	GeeMap* in_play_child_structure;
	GeeMap* existing_dest_child_structure;
	GeeSet* existing_dest_membership;
	gboolean to_path_exists;
};

struct _ModifyTagsCommand {
	SingleDataSourceCommand parent_instance;
	ModifyTagsCommandPrivate * priv;
};

struct _ModifyTagsCommandClass {
	SingleDataSourceCommandClass parent_class;
};

struct _ModifyTagsCommandPrivate {
	MediaSource* media;
	GeeArrayList* to_add;
	GeeArrayList* to_remove;
};

struct _TagUntagPhotosCommand {
	SimpleProxyableCommand parent_instance;
	TagUntagPhotosCommandPrivate * priv;
};

struct _TagUntagPhotosCommandClass {
	SimpleProxyableCommandClass parent_class;
};

struct _TagUntagPhotosCommandPrivate {
	GeeCollection* sources;
	gboolean attach;
	GeeMultiMap* detached_from;
	GeeList* attached_to;
};

struct _RenameSavedSearchCommand {
	SingleDataSourceCommand parent_instance;
	RenameSavedSearchCommandPrivate * priv;
};

struct _RenameSavedSearchCommandClass {
	SingleDataSourceCommandClass parent_class;
};

struct _RenameSavedSearchCommandPrivate {
	SavedSearch* search;
	gchar* old_name;
	gchar* new_name;
};

struct _DeleteSavedSearchCommand {
	SingleDataSourceCommand parent_instance;
	DeleteSavedSearchCommandPrivate * priv;
};

struct _DeleteSavedSearchCommandClass {
	SingleDataSourceCommandClass parent_class;
};

struct _DeleteSavedSearchCommandPrivate {
	SavedSearch* search;
};

struct _TrashUntrashPhotosCommand {
	PageCommand parent_instance;
	TrashUntrashPhotosCommandPrivate * priv;
};

struct _TrashUntrashPhotosCommandClass {
	PageCommandClass parent_class;
};

struct _TrashUntrashPhotosCommandPrivate {
	GeeCollection* sources;
	gboolean to_trash;
};

struct _FlagUnflagCommand {
	MultipleDataSourceAtOnceCommand parent_instance;
	FlagUnflagCommandPrivate * priv;
};

struct _FlagUnflagCommandClass {
	MultipleDataSourceAtOnceCommandClass parent_class;
};

struct _FlagUnflagCommandPrivate {
	gboolean flag;
	ProgressDialog* progress_dialog;
};

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


static gpointer page_command_parent_class = NULL;
static gpointer single_data_source_command_parent_class = NULL;
static gpointer simple_proxyable_command_parent_class = NULL;
static gpointer single_photo_transformation_command_parent_class = NULL;
static gpointer generic_photo_transformation_command_parent_class = NULL;
static gpointer multiple_data_source_command_parent_class = NULL;
static gpointer multiple_data_source_at_once_command_parent_class = NULL;
static gpointer multiple_photo_transformation_command_parent_class = NULL;
static gpointer rotate_single_command_parent_class = NULL;
static gpointer rotate_multiple_command_parent_class = NULL;
static gpointer edit_title_command_parent_class = NULL;
static gpointer edit_comment_command_parent_class = NULL;
static gpointer edit_multiple_titles_command_parent_class = NULL;
static gpointer edit_multiple_comments_command_parent_class = NULL;
static gpointer rename_event_command_parent_class = NULL;
static gpointer edit_event_comment_command_parent_class = NULL;
static gpointer set_key_photo_command_parent_class = NULL;
static gpointer revert_single_command_parent_class = NULL;
static gpointer revert_multiple_command_parent_class = NULL;
static gpointer enhance_single_command_parent_class = NULL;
static gpointer enhance_multiple_command_parent_class = NULL;
static gpointer straighten_command_parent_class = NULL;
static gpointer crop_command_parent_class = NULL;
static gpointer adjust_colors_single_command_parent_class = NULL;
static gpointer adjust_colors_multiple_command_parent_class = NULL;
static gpointer redeye_command_parent_class = NULL;
static gpointer move_photos_command_parent_class = NULL;
static gpointer move_photos_command_real_move_photos_command_parent_class = NULL;
static gpointer new_event_command_parent_class = NULL;
static gpointer set_event_command_parent_class = NULL;
static gpointer merge_events_command_parent_class = NULL;
static gpointer duplicate_multiple_photos_command_parent_class = NULL;
extern LibraryPhotoSourceCollection* library_photo_global;
static gpointer set_rating_single_command_parent_class = NULL;
static gpointer set_rating_command_parent_class = NULL;
static gpointer set_raw_developer_command_parent_class = NULL;
static gpointer adjust_date_time_photo_command_parent_class = NULL;
extern EventSourceCollection* event_global;
static gpointer adjust_date_time_photos_command_parent_class = NULL;
static gpointer add_tags_command_parent_class = NULL;
extern VideoSourceCollection* video_global;
static gpointer rename_tag_command_parent_class = NULL;
static gpointer delete_tag_command_parent_class = NULL;
extern TagSourceCollection* tag_global;
static gpointer new_child_tag_command_parent_class = NULL;
static gpointer new_root_tag_command_parent_class = NULL;
static gpointer reparent_tag_command_parent_class = NULL;
static gpointer modify_tags_command_parent_class = NULL;
static gpointer tag_untag_photos_command_parent_class = NULL;
static gpointer rename_saved_search_command_parent_class = NULL;
static gpointer delete_saved_search_command_parent_class = NULL;
static gpointer trash_untrash_photos_command_parent_class = NULL;
static gpointer flag_unflag_command_parent_class = NULL;

GType command_description_get_type (void) G_GNUC_CONST;
GType command_get_type (void) G_GNUC_CONST;
GType page_command_get_type (void) G_GNUC_CONST;
GType page_get_type (void) G_GNUC_CONST;
GType data_object_get_type (void) G_GNUC_CONST;
GType data_source_get_type (void) G_GNUC_CONST;
GType thumbnail_source_get_type (void) G_GNUC_CONST;
GType media_source_get_type (void) G_GNUC_CONST;
GType photo_source_get_type (void) G_GNUC_CONST;
GType photo_get_type (void) G_GNUC_CONST;
GType 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;
#define PAGE_COMMAND_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), TYPE_PAGE_COMMAND, PageCommandPrivate))
enum  {
	PAGE_COMMAND_DUMMY_PROPERTY
};
static void page_command_on_page_destroyed (PageCommand* self);
static void _page_command_on_page_destroyed_gtk_widget_destroy (GtkWidget* _sender, gpointer self);
static void page_command_on_photo_destroyed (PageCommand* self);
static void _page_command_on_photo_destroyed_data_source_destroyed (DataSource* _sender, gpointer self);
static void page_command_on_controller_destroyed (PageCommand* self);
static void _page_command_on_controller_destroyed_gtk_widget_destroy (GtkWidget* _sender, gpointer self);
PageCommand* page_command_construct (GType object_type, const gchar* name, const gchar* explanation);
Command* command_construct (GType object_type, const gchar* name, const gchar* explanation);
GType page_window_get_type (void) G_GNUC_CONST;
GType app_window_get_type (void) G_GNUC_CONST;
AppWindow* app_window_get_instance (void);
Page* page_window_get_current_page (PageWindow* self);
GType single_photo_page_get_type (void) G_GNUC_CONST;
GType editing_host_page_get_type (void) G_GNUC_CONST;
GType library_photo_page_get_type (void) G_GNUC_CONST;
Photo* editing_host_page_get_photo (EditingHostPage* self);
CollectionPage* library_photo_page_get_controller_page (LibraryPhotoPage* self);
void page_command_set_auto_return_to_page (PageCommand* self, gboolean auto_return);
static void page_command_real_prepare (Command* base);
void page_command_return_to_page (PageCommand* self);
void command_prepare (Command* self);
gpointer data_collection_ref (gpointer instance);
void data_collection_unref (gpointer instance);
GParamSpec* param_spec_data_collection (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags);
void value_set_data_collection (GValue* value, gpointer v_object);
void value_take_data_collection (GValue* value, gpointer v_object);
gpointer value_get_data_collection (const GValue* value);
GType data_collection_get_type (void) G_GNUC_CONST;
GType view_collection_get_type (void) G_GNUC_CONST;
ViewCollection* page_get_view (Page* self);
gint data_collection_get_count (DataCollection* self);
DataObject* data_collection_get_at (DataCollection* self, gint index);
GType data_view_get_type (void) G_GNUC_CONST;
GType thumbnail_view_get_type (void) G_GNUC_CONST;
GType checkerboard_item_get_type (void) G_GNUC_CONST;
GType media_source_item_get_type (void) G_GNUC_CONST;
GType thumbnail_get_type (void) G_GNUC_CONST;
MediaSource* thumbnail_get_media_source (Thumbnail* self);
GType library_window_get_type (void) G_GNUC_CONST;
LibraryWindow* library_window_get_app (void);
void library_window_switch_to_photo_page (LibraryWindow* self, CollectionPage* controller, Photo* current);
void page_window_set_current_page (PageWindow* self, Page* page);
static void page_command_finalize (GObject * obj);
GType single_data_source_command_get_type (void) G_GNUC_CONST;
enum  {
	SINGLE_DATA_SOURCE_COMMAND_DUMMY_PROPERTY
};
static void single_data_source_command_on_source_destroyed (SingleDataSourceCommand* self);
static void _single_data_source_command_on_source_destroyed_data_source_destroyed (DataSource* _sender, gpointer self);
SingleDataSourceCommand* single_data_source_command_construct (GType object_type, DataSource* source, const gchar* name, const gchar* explanation);
DataSource* single_data_source_command_get_source (SingleDataSourceCommand* 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* command_get_command_manager (Command* self);
void command_manager_reset (CommandManager* self);
static void single_data_source_command_finalize (GObject * obj);
GType simple_proxyable_command_get_type (void) G_GNUC_CONST;
gpointer source_proxy_ref (gpointer instance);
void source_proxy_unref (gpointer instance);
GParamSpec* param_spec_source_proxy (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags);
void value_set_source_proxy (GValue* value, gpointer v_object);
void value_take_source_proxy (GValue* value, gpointer v_object);
gpointer value_get_source_proxy (const GValue* value);
GType source_proxy_get_type (void) G_GNUC_CONST;
#define SIMPLE_PROXYABLE_COMMAND_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), TYPE_SIMPLE_PROXYABLE_COMMAND, SimpleProxyableCommandPrivate))
enum  {
	SIMPLE_PROXYABLE_COMMAND_DUMMY_PROPERTY
};
static void simple_proxyable_command_on_proxy_broken (SimpleProxyableCommand* self);
static void _simple_proxyable_command_on_proxy_broken_source_proxy_broken (SourceProxy* _sender, gpointer self);
void simple_proxyable_command_clear_added_proxies (SimpleProxyableCommand* self);
GType proxyable_get_type (void) G_GNUC_CONST;
SimpleProxyableCommand* simple_proxyable_command_construct (GType object_type, Proxyable* proxyable, const gchar* name, const gchar* explanation);
SourceProxy* proxyable_get_proxy (Proxyable* self);
static void simple_proxyable_command_real_execute (Command* base);
void simple_proxyable_command_execute_on_source (SimpleProxyableCommand* self, DataSource* source);
DataSource* source_proxy_get_source (SourceProxy* self);
static void simple_proxyable_command_real_execute_on_source (SimpleProxyableCommand* self, DataSource* source);
static void simple_proxyable_command_real_undo (Command* base);
void simple_proxyable_command_undo_on_source (SimpleProxyableCommand* self, DataSource* source);
static void simple_proxyable_command_real_undo_on_source (SimpleProxyableCommand* self, DataSource* source);
void simple_proxyable_command_add_proxyables (SimpleProxyableCommand* self, GeeCollection* proxyables);
static void simple_proxyable_command_finalize (GObject * obj);
GType single_photo_transformation_command_get_type (void) G_GNUC_CONST;
GType photo_transformation_state_get_type (void) G_GNUC_CONST;
#define SINGLE_PHOTO_TRANSFORMATION_COMMAND_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), TYPE_SINGLE_PHOTO_TRANSFORMATION_COMMAND, SinglePhotoTransformationCommandPrivate))
enum  {
	SINGLE_PHOTO_TRANSFORMATION_COMMAND_DUMMY_PROPERTY
};
static void single_photo_transformation_command_on_state_broken (SinglePhotoTransformationCommand* self);
static void _single_photo_transformation_command_on_state_broken_photo_transformation_state_broken (PhotoTransformationState* _sender, gpointer self);
SinglePhotoTransformationCommand* single_photo_transformation_command_construct (GType object_type, Photo* photo, const gchar* name, const gchar* explanation);
PhotoTransformationState* photo_save_transformation_state (Photo* self);
static void single_photo_transformation_command_real_undo (Command* base);
gboolean photo_load_transformation_state (Photo* self, PhotoTransformationState* state);
static void single_photo_transformation_command_finalize (GObject * obj);
GType generic_photo_transformation_command_get_type (void) G_GNUC_CONST;
#define GENERIC_PHOTO_TRANSFORMATION_COMMAND_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), TYPE_GENERIC_PHOTO_TRANSFORMATION_COMMAND, GenericPhotoTransformationCommandPrivate))
enum  {
	GENERIC_PHOTO_TRANSFORMATION_COMMAND_DUMMY_PROPERTY
};
static void generic_photo_transformation_command_on_state_broken (GenericPhotoTransformationCommand* self);
static void _generic_photo_transformation_command_on_state_broken_photo_transformation_state_broken (PhotoTransformationState* _sender, gpointer self);
GenericPhotoTransformationCommand* generic_photo_transformation_command_construct (GType object_type, Photo* photo, const gchar* name, const gchar* explanation);
static void generic_photo_transformation_command_real_execute (Command* base);
void generic_photo_transformation_command_execute_on_photo (GenericPhotoTransformationCommand* self, Photo* photo);
static void generic_photo_transformation_command_real_execute_on_photo (GenericPhotoTransformationCommand* self, Photo* photo);
static void generic_photo_transformation_command_real_undo (Command* base);
static void generic_photo_transformation_command_real_redo (Command* base);
gboolean generic_photo_transformation_command_can_compress (GenericPhotoTransformationCommand* self, Command* command);
static gboolean generic_photo_transformation_command_real_can_compress (GenericPhotoTransformationCommand* self, Command* command);
static gboolean generic_photo_transformation_command_real_compress (Command* base, Command* command);
void command_execute (Command* self);
static void generic_photo_transformation_command_finalize (GObject * obj);
GType multiple_data_source_command_get_type (void) G_GNUC_CONST;
GType source_collection_get_type (void) G_GNUC_CONST;
#define MULTIPLE_DATA_SOURCE_COMMAND_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), TYPE_MULTIPLE_DATA_SOURCE_COMMAND, MultipleDataSourceCommandPrivate))
enum  {
	MULTIPLE_DATA_SOURCE_COMMAND_DUMMY_PROPERTY
};
static void multiple_data_source_command_on_source_destroyed (MultipleDataSourceCommand* self, DataSource* source);
static void _multiple_data_source_command_on_source_destroyed_source_collection_item_destroyed (SourceCollection* _sender, DataSource* source, gpointer self);
#define MULTIPLE_DATA_SOURCE_COMMAND_MIN_OPS_FOR_PROGRESS_WINDOW 5
MultipleDataSourceCommand* multiple_data_source_command_construct (GType object_type, GeeIterable* iter, const gchar* progress_text, const gchar* undo_progress_text, const gchar* name, const gchar* explanation);
DataSource* data_view_get_source (DataView* self);
DataCollection* data_object_get_membership (DataObject* self);
GeeIterable* multiple_data_source_command_get_sources (MultipleDataSourceCommand* self);
gint multiple_data_source_command_get_source_count (MultipleDataSourceCommand* self);
static void multiple_data_source_command_real_execute (Command* base);
static void multiple_data_source_command_start_transaction (MultipleDataSourceCommand* self);
static void multiple_data_source_command_execute_all (MultipleDataSourceCommand* self, gboolean exec, gboolean can_cancel, GeeArrayList* todo, GeeArrayList* completed);
static void multiple_data_source_command_commit_transaction (MultipleDataSourceCommand* self);
void multiple_data_source_command_execute_on_source (MultipleDataSourceCommand* self, DataSource* source);
static void multiple_data_source_command_real_execute_on_source (MultipleDataSourceCommand* self, DataSource* source);
static void multiple_data_source_command_real_undo (Command* base);
void multiple_data_source_command_undo_on_source (MultipleDataSourceCommand* self, DataSource* source);
static void multiple_data_source_command_real_undo_on_source (MultipleDataSourceCommand* self, DataSource* source);
GType database_source_collection_get_type (void) G_GNUC_CONST;
GType media_source_collection_get_type (void) G_GNUC_CONST;
gpointer transaction_controller_ref (gpointer instance);
void transaction_controller_unref (gpointer instance);
GParamSpec* param_spec_transaction_controller (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags);
void value_set_transaction_controller (GValue* value, gpointer v_object);
void value_take_transaction_controller (GValue* value, gpointer v_object);
gpointer value_get_transaction_controller (const GValue* value);
GType transaction_controller_get_type (void) G_GNUC_CONST;
TransactionController* media_source_collection_get_transaction_controller (MediaSourceCollection* self);
void transaction_controller_begin (TransactionController* self);
void transaction_controller_commit (TransactionController* self);
void page_window_set_busy_cursor (PageWindow* self);
GType progress_dialog_get_type (void) G_GNUC_CONST;
ProgressDialog* progress_dialog_new (GtkWindow* owner, const gchar* text, GCancellable* cancellable);
ProgressDialog* progress_dialog_construct (GType object_type, GtkWindow* owner, const gchar* text, GCancellable* cancellable);
void progress_dialog_set_fraction (ProgressDialog* self, gint current, gint total);
void spin_event_loop (void);
void progress_dialog_close (ProgressDialog* self);
void page_window_set_normal_cursor (PageWindow* self);
static void multiple_data_source_command_finalize (GObject * obj);
GType multiple_data_source_at_once_command_get_type (void) G_GNUC_CONST;
#define MULTIPLE_DATA_SOURCE_AT_ONCE_COMMAND_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), TYPE_MULTIPLE_DATA_SOURCE_AT_ONCE_COMMAND, MultipleDataSourceAtOnceCommandPrivate))
enum  {
	MULTIPLE_DATA_SOURCE_AT_ONCE_COMMAND_DUMMY_PROPERTY
};
static void multiple_data_source_at_once_command_on_sources_destroyed (MultipleDataSourceAtOnceCommand* self, GeeCollection* destroyed);
static void _multiple_data_source_at_once_command_on_sources_destroyed_source_collection_items_destroyed (SourceCollection* _sender, GeeCollection* destroyed, gpointer self);
MultipleDataSourceAtOnceCommand* multiple_data_source_at_once_command_construct (GType object_type, GeeCollection* sources, const gchar* name, const gchar* explanation);
static void multiple_data_source_at_once_command_real_execute (Command* base);
void database_table_begin_transaction (void);
gpointer media_collection_registry_ref (gpointer instance);
void media_collection_registry_unref (gpointer instance);
GParamSpec* param_spec_media_collection_registry (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags);
void value_set_media_collection_registry (GValue* value, gpointer v_object);
void value_take_media_collection_registry (GValue* value, gpointer v_object);
gpointer value_get_media_collection_registry (const GValue* value);
GType media_collection_registry_get_type (void) G_GNUC_CONST;
MediaCollectionRegistry* media_collection_registry_get_instance (void);
void media_collection_registry_freeze_all (MediaCollectionRegistry* self);
void multiple_data_source_at_once_command_execute_on_all (MultipleDataSourceAtOnceCommand* self, GeeCollection* sources);
void media_collection_registry_thaw_all (MediaCollectionRegistry* self);
GQuark database_error_quark (void);
void database_table_commit_transaction (GError** error);
void app_window_database_error (GError* err);
static void multiple_data_source_at_once_command_real_execute_on_all (MultipleDataSourceAtOnceCommand* self, GeeCollection* sources);
static void multiple_data_source_at_once_command_real_undo (Command* base);
void multiple_data_source_at_once_command_undo_on_all (MultipleDataSourceAtOnceCommand* self, GeeCollection* sources);
static void multiple_data_source_at_once_command_real_undo_on_all (MultipleDataSourceAtOnceCommand* self, GeeCollection* sources);
static void multiple_data_source_at_once_command_finalize (GObject * obj);
GType multiple_photo_transformation_command_get_type (void) G_GNUC_CONST;
#define MULTIPLE_PHOTO_TRANSFORMATION_COMMAND_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), TYPE_MULTIPLE_PHOTO_TRANSFORMATION_COMMAND, MultiplePhotoTransformationCommandPrivate))
enum  {
	MULTIPLE_PHOTO_TRANSFORMATION_COMMAND_DUMMY_PROPERTY
};
static void multiple_photo_transformation_command_on_state_broken (MultiplePhotoTransformationCommand* self);
static void _multiple_photo_transformation_command_on_state_broken_photo_transformation_state_broken (PhotoTransformationState* _sender, gpointer self);
MultiplePhotoTransformationCommand* multiple_photo_transformation_command_construct (GType object_type, GeeIterable* iter, const gchar* progress_text, const gchar* undo_progress_text, const gchar* name, const gchar* explanation);
static void multiple_photo_transformation_command_real_undo_on_source (MultipleDataSourceCommand* base, DataSource* source);
static void multiple_photo_transformation_command_finalize (GObject * obj);
GType rotate_single_command_get_type (void) G_GNUC_CONST;
GType rotation_get_type (void) G_GNUC_CONST;
#define ROTATE_SINGLE_COMMAND_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), TYPE_ROTATE_SINGLE_COMMAND, RotateSingleCommandPrivate))
enum  {
	ROTATE_SINGLE_COMMAND_DUMMY_PROPERTY
};
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);
static void rotate_single_command_real_execute (Command* base);
void photo_rotate (Photo* self, Rotation rotation);
static void rotate_single_command_real_undo (Command* base);
Rotation rotation_opposite (Rotation self);
static void rotate_single_command_finalize (GObject * obj);
GType rotate_multiple_command_get_type (void) G_GNUC_CONST;
#define ROTATE_MULTIPLE_COMMAND_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), TYPE_ROTATE_MULTIPLE_COMMAND, RotateMultipleCommandPrivate))
enum  {
	ROTATE_MULTIPLE_COMMAND_DUMMY_PROPERTY
};
RotateMultipleCommand* rotate_multiple_command_new (GeeIterable* iter, Rotation rotation, const gchar* name, const gchar* explanation, const gchar* progress_text, const gchar* undo_progress_text);
RotateMultipleCommand* rotate_multiple_command_construct (GType object_type, GeeIterable* iter, Rotation rotation, const gchar* name, const gchar* explanation, const gchar* progress_text, const gchar* undo_progress_text);
static void rotate_multiple_command_real_execute_on_source (MultipleDataSourceCommand* base, DataSource* source);
static void rotate_multiple_command_real_undo_on_source (MultipleDataSourceCommand* base, DataSource* source);
static void rotate_multiple_command_finalize (GObject * obj);
GType edit_title_command_get_type (void) G_GNUC_CONST;
#define EDIT_TITLE_COMMAND_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), TYPE_EDIT_TITLE_COMMAND, EditTitleCommandPrivate))
enum  {
	EDIT_TITLE_COMMAND_DUMMY_PROPERTY
};
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);
#define RESOURCES_EDIT_TITLE_LABEL NC_ ("Button Label", "Edit Title")
gchar* media_source_get_title (MediaSource* self);
static void edit_title_command_real_execute (Command* base);
void media_source_set_title (MediaSource* self, const gchar* title);
static void edit_title_command_real_undo (Command* base);
static void edit_title_command_finalize (GObject * obj);
GType edit_comment_command_get_type (void) G_GNUC_CONST;
#define EDIT_COMMENT_COMMAND_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), TYPE_EDIT_COMMENT_COMMAND, EditCommentCommandPrivate))
enum  {
	EDIT_COMMENT_COMMAND_DUMMY_PROPERTY
};
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);
#define RESOURCES_EDIT_COMMENT_LABEL _ ("Edit Comment")
gchar* media_source_get_comment (MediaSource* self);
static void edit_comment_command_real_execute (Command* base);
gboolean media_source_set_comment (MediaSource* self, const gchar* comment);
static void edit_comment_command_real_undo (Command* base);
static void edit_comment_command_finalize (GObject * obj);
GType edit_multiple_titles_command_get_type (void) G_GNUC_CONST;
enum  {
	EDIT_MULTIPLE_TITLES_COMMAND_DUMMY_PROPERTY
};
EditMultipleTitlesCommand* edit_multiple_titles_command_new (GeeCollection* media_sources, const gchar* new_title);
EditMultipleTitlesCommand* edit_multiple_titles_command_construct (GType object_type, GeeCollection* media_sources, const gchar* new_title);
static void edit_multiple_titles_command_real_execute_on_all (MultipleDataSourceAtOnceCommand* base, GeeCollection* sources);
static void edit_multiple_titles_command_real_undo_on_all (MultipleDataSourceAtOnceCommand* base, GeeCollection* sources);
static void edit_multiple_titles_command_finalize (GObject * obj);
GType edit_multiple_comments_command_get_type (void) G_GNUC_CONST;
enum  {
	EDIT_MULTIPLE_COMMENTS_COMMAND_DUMMY_PROPERTY
};
EditMultipleCommentsCommand* edit_multiple_comments_command_new (GeeCollection* media_sources, const gchar* new_comment);
EditMultipleCommentsCommand* edit_multiple_comments_command_construct (GType object_type, GeeCollection* media_sources, const gchar* new_comment);
static void edit_multiple_comments_command_real_execute_on_all (MultipleDataSourceAtOnceCommand* base, GeeCollection* sources);
static void edit_multiple_comments_command_real_undo_on_all (MultipleDataSourceAtOnceCommand* base, GeeCollection* sources);
static void edit_multiple_comments_command_finalize (GObject * obj);
GType rename_event_command_get_type (void) G_GNUC_CONST;
#define RENAME_EVENT_COMMAND_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), TYPE_RENAME_EVENT_COMMAND, RenameEventCommandPrivate))
enum  {
	RENAME_EVENT_COMMAND_DUMMY_PROPERTY
};
GType event_source_get_type (void) G_GNUC_CONST;
GType event_get_type (void) G_GNUC_CONST;
RenameEventCommand* rename_event_command_new (Event* event, const gchar* new_name);
RenameEventCommand* rename_event_command_construct (GType object_type, Event* event, const gchar* new_name);
#define RESOURCES_RENAME_EVENT_LABEL _ ("Rename Event")
gchar* event_get_raw_name (Event* self);
static void rename_event_command_real_execute_on_source (SimpleProxyableCommand* base, DataSource* source);
gboolean event_rename (Event* self, const gchar* name);
static void rename_event_command_real_undo_on_source (SimpleProxyableCommand* base, DataSource* source);
static void rename_event_command_finalize (GObject * obj);
GType edit_event_comment_command_get_type (void) G_GNUC_CONST;
#define EDIT_EVENT_COMMENT_COMMAND_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), TYPE_EDIT_EVENT_COMMENT_COMMAND, EditEventCommentCommandPrivate))
enum  {
	EDIT_EVENT_COMMENT_COMMAND_DUMMY_PROPERTY
};
EditEventCommentCommand* edit_event_comment_command_new (Event* event, const gchar* new_comment);
EditEventCommentCommand* edit_event_comment_command_construct (GType object_type, Event* event, const gchar* new_comment);
gchar* event_source_get_comment (EventSource* self);
static void edit_event_comment_command_real_execute_on_source (SimpleProxyableCommand* base, DataSource* source);
gboolean event_source_set_comment (EventSource* self, const gchar* comment);
static void edit_event_comment_command_real_undo_on_source (SimpleProxyableCommand* base, DataSource* source);
static void edit_event_comment_command_finalize (GObject * obj);
GType set_key_photo_command_get_type (void) G_GNUC_CONST;
#define SET_KEY_PHOTO_COMMAND_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), TYPE_SET_KEY_PHOTO_COMMAND, SetKeyPhotoCommandPrivate))
enum  {
	SET_KEY_PHOTO_COMMAND_DUMMY_PROPERTY
};
SetKeyPhotoCommand* set_key_photo_command_new (Event* event, MediaSource* new_primary_source);
SetKeyPhotoCommand* set_key_photo_command_construct (GType object_type, Event* event, MediaSource* new_primary_source);
#define RESOURCES_MAKE_KEY_PHOTO_LABEL _ ("Make Key Photo for Event")
MediaSource* event_get_primary_source (Event* self);
static void set_key_photo_command_real_execute (Command* base);
gboolean event_set_primary_source (Event* self, MediaSource* source);
static void set_key_photo_command_real_undo (Command* base);
static void set_key_photo_command_finalize (GObject * obj);
GType revert_single_command_get_type (void) G_GNUC_CONST;
enum  {
	REVERT_SINGLE_COMMAND_DUMMY_PROPERTY
};
RevertSingleCommand* revert_single_command_new (Photo* photo);
RevertSingleCommand* revert_single_command_construct (GType object_type, Photo* photo);
#define RESOURCES_REVERT_LABEL _ ("Revert to Original")
static void revert_single_command_real_execute_on_photo (GenericPhotoTransformationCommand* base, Photo* photo);
void photo_remove_all_transformations (Photo* self);
static gboolean revert_single_command_real_compress (Command* base, Command* command);
GType revert_multiple_command_get_type (void) G_GNUC_CONST;
enum  {
	REVERT_MULTIPLE_COMMAND_DUMMY_PROPERTY
};
RevertMultipleCommand* revert_multiple_command_new (GeeIterable* iter);
RevertMultipleCommand* revert_multiple_command_construct (GType object_type, GeeIterable* iter);
static void revert_multiple_command_real_execute_on_source (MultipleDataSourceCommand* base, DataSource* source);
GType enhance_single_command_get_type (void) G_GNUC_CONST;
enum  {
	ENHANCE_SINGLE_COMMAND_DUMMY_PROPERTY
};
EnhanceSingleCommand* enhance_single_command_new (Photo* photo);
EnhanceSingleCommand* enhance_single_command_construct (GType object_type, Photo* photo);
#define RESOURCES_ENHANCE_LABEL _ ("Enhance")
#define RESOURCES_ENHANCE_TOOLTIP _ ("Automatically improve the photo’s appearance")
static void enhance_single_command_real_execute_on_photo (GenericPhotoTransformationCommand* base, Photo* photo);
gboolean photo_enhance (Photo* self);
static gboolean enhance_single_command_real_compress (Command* base, Command* command);
GType enhance_multiple_command_get_type (void) G_GNUC_CONST;
enum  {
	ENHANCE_MULTIPLE_COMMAND_DUMMY_PROPERTY
};
EnhanceMultipleCommand* enhance_multiple_command_new (GeeIterable* iter);
EnhanceMultipleCommand* enhance_multiple_command_construct (GType object_type, GeeIterable* iter);
static void enhance_multiple_command_real_execute_on_source (MultipleDataSourceCommand* base, DataSource* source);
GType straighten_command_get_type (void) G_GNUC_CONST;
GType box_get_type (void) G_GNUC_CONST;
Box* box_dup (const Box* self);
void box_free (Box* self);
#define STRAIGHTEN_COMMAND_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), TYPE_STRAIGHTEN_COMMAND, StraightenCommandPrivate))
enum  {
	STRAIGHTEN_COMMAND_DUMMY_PROPERTY
};
StraightenCommand* straighten_command_new (Photo* photo, gdouble theta, Box* crop, const gchar* name, const gchar* explanation);
StraightenCommand* straighten_command_construct (GType object_type, Photo* photo, gdouble theta, Box* crop, const gchar* name, const gchar* explanation);
static void straighten_command_real_execute_on_photo (GenericPhotoTransformationCommand* base, Photo* photo);
void data_collection_freeze_notifications (DataCollection* self);
void photo_set_straighten (Photo* self, gdouble theta);
void photo_set_crop (Photo* self, Box* crop);
void data_collection_thaw_notifications (DataCollection* self);
static void straighten_command_finalize (GObject * obj);
GType crop_command_get_type (void) G_GNUC_CONST;
#define CROP_COMMAND_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), TYPE_CROP_COMMAND, CropCommandPrivate))
enum  {
	CROP_COMMAND_DUMMY_PROPERTY
};
CropCommand* crop_command_new (Photo* photo, Box* crop, const gchar* name, const gchar* explanation);
CropCommand* crop_command_construct (GType object_type, Photo* photo, Box* crop, const gchar* name, const gchar* explanation);
static void crop_command_real_execute_on_photo (GenericPhotoTransformationCommand* base, Photo* photo);
static void crop_command_finalize (GObject * obj);
GType adjust_colors_single_command_get_type (void) G_GNUC_CONST;
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;
#define ADJUST_COLORS_SINGLE_COMMAND_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), TYPE_ADJUST_COLORS_SINGLE_COMMAND, AdjustColorsSingleCommandPrivate))
enum  {
	ADJUST_COLORS_SINGLE_COMMAND_DUMMY_PROPERTY
};
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 adjust_colors_single_command_real_execute_on_photo (GenericPhotoTransformationCommand* base, Photo* photo);
void photo_set_color_adjustments (Photo* self, PixelTransformationBundle* new_adjustments);
static gboolean adjust_colors_single_command_real_can_compress (GenericPhotoTransformationCommand* base, Command* command);
static void adjust_colors_single_command_finalize (GObject * obj);
GType adjust_colors_multiple_command_get_type (void) G_GNUC_CONST;
#define ADJUST_COLORS_MULTIPLE_COMMAND_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), TYPE_ADJUST_COLORS_MULTIPLE_COMMAND, AdjustColorsMultipleCommandPrivate))
enum  {
	ADJUST_COLORS_MULTIPLE_COMMAND_DUMMY_PROPERTY
};
AdjustColorsMultipleCommand* adjust_colors_multiple_command_new (GeeIterable* iter, PixelTransformationBundle* transformations, const gchar* name, const gchar* explanation);
AdjustColorsMultipleCommand* adjust_colors_multiple_command_construct (GType object_type, GeeIterable* iter, PixelTransformationBundle* transformations, const gchar* name, const gchar* explanation);
static void adjust_colors_multiple_command_real_execute_on_source (MultipleDataSourceCommand* base, DataSource* source);
static void adjust_colors_multiple_command_finalize (GObject * obj);
GType redeye_command_get_type (void) G_GNUC_CONST;
GType editing_tools_redeye_instance_get_type (void) G_GNUC_CONST;
EditingToolsRedeyeInstance* editing_tools_redeye_instance_dup (const EditingToolsRedeyeInstance* self);
void editing_tools_redeye_instance_free (EditingToolsRedeyeInstance* self);
#define REDEYE_COMMAND_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), TYPE_REDEYE_COMMAND, RedeyeCommandPrivate))
enum  {
	REDEYE_COMMAND_DUMMY_PROPERTY
};
RedeyeCommand* redeye_command_new (Photo* photo, EditingToolsRedeyeInstance* redeye_instance, const gchar* name, const gchar* explanation);
RedeyeCommand* redeye_command_construct (GType object_type, Photo* photo, EditingToolsRedeyeInstance* redeye_instance, const gchar* name, const gchar* explanation);
static void redeye_command_real_execute_on_photo (GenericPhotoTransformationCommand* base, Photo* photo);
void photo_add_redeye_instance (Photo* self, EditingToolsRedeyeInstance* redeye);
static void redeye_command_finalize (GObject * obj);
GType move_photos_command_get_type (void) G_GNUC_CONST;
GType move_photos_command_real_move_photos_command_get_type (void) G_GNUC_CONST;
enum  {
	MOVE_PHOTOS_COMMAND_DUMMY_PROPERTY
};
MovePhotosCommand* move_photos_command_construct (GType object_type, const gchar* name, const gchar* explanation);
static void move_photos_command_real_prepare (Command* base);
static void move_photos_command_real_execute (Command* base);
static void move_photos_command_real_undo (Command* base);
void command_undo (Command* self);
#define MOVE_PHOTOS_COMMAND_REAL_MOVE_PHOTOS_COMMAND_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), MOVE_PHOTOS_COMMAND_TYPE_REAL_MOVE_PHOTOS_COMMAND, MovePhotosCommandRealMovePhotosCommandPrivate))
enum  {
	MOVE_PHOTOS_COMMAND_REAL_MOVE_PHOTOS_COMMAND_DUMMY_PROPERTY
};
static void move_photos_command_real_move_photos_command_on_proxy_broken (MovePhotosCommandRealMovePhotosCommand* self);
static void _move_photos_command_real_move_photos_command_on_proxy_broken_source_proxy_broken (SourceProxy* _sender, gpointer self);
MovePhotosCommandRealMovePhotosCommand* move_photos_command_real_move_photos_command_new (Event* new_event, GeeIterable* source_views, const gchar* progress_text, const gchar* undo_progress_text, const gchar* name, const gchar* explanation);
MovePhotosCommandRealMovePhotosCommand* move_photos_command_real_move_photos_command_construct (GType object_type, Event* new_event, GeeIterable* source_views, const gchar* progress_text, const gchar* undo_progress_text, const gchar* name, const gchar* explanation);
Event* media_source_get_event (MediaSource* self);
static void move_photos_command_real_move_photos_command_real_execute (Command* base);
GType event_page_get_type (void) G_GNUC_CONST;
Event* event_page_get_event (EventPage* self);
gint event_source_get_media_count (EventSource* self);
void library_window_switch_to_event (LibraryWindow* self, Event* event);
static void move_photos_command_real_move_photos_command_real_execute_on_source (MultipleDataSourceCommand* base, DataSource* source);
gboolean media_source_set_event (MediaSource* self, Event* new_event);
static void move_photos_command_real_move_photos_command_real_undo_on_source (MultipleDataSourceCommand* base, DataSource* source);
static void move_photos_command_real_move_photos_command_finalize (GObject * obj);
static void move_photos_command_finalize (GObject * obj);
GType new_event_command_get_type (void) G_GNUC_CONST;
enum  {
	NEW_EVENT_COMMAND_DUMMY_PROPERTY
};
NewEventCommand* new_event_command_new (GeeIterable* iter);
NewEventCommand* new_event_command_construct (GType object_type, GeeIterable* iter);
#define RESOURCES_NEW_EVENT_LABEL _ ("New Event")
Event* event_create_empty_event (MediaSource* source);
GType set_event_command_get_type (void) G_GNUC_CONST;
enum  {
	SET_EVENT_COMMAND_DUMMY_PROPERTY
};
SetEventCommand* set_event_command_new (GeeIterable* iter, Event* new_event);
SetEventCommand* set_event_command_construct (GType object_type, GeeIterable* iter, Event* new_event);
#define RESOURCES_SET_PHOTO_EVENT_LABEL _ ("Move Photos")
#define RESOURCES_SET_PHOTO_EVENT_TOOLTIP _ ("Move photos to an event")
GType merge_events_command_get_type (void) G_GNUC_CONST;
enum  {
	MERGE_EVENTS_COMMAND_DUMMY_PROPERTY
};
MergeEventsCommand* merge_events_command_new (GeeIterable* iter);
MergeEventsCommand* merge_events_command_construct (GType object_type, GeeIterable* iter);
#define RESOURCES_MERGE_LABEL _ ("Merge")
gboolean event_has_name (Event* self);
GeeCollection* event_source_get_media (EventSource* self);
ThumbnailView* thumbnail_view_new (ThumbnailSource* source);
ThumbnailView* thumbnail_view_construct (GType object_type, ThumbnailSource* source);
GType duplicate_multiple_photos_command_get_type (void) G_GNUC_CONST;
GType library_photo_get_type (void) G_GNUC_CONST;
#define DUPLICATE_MULTIPLE_PHOTOS_COMMAND_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), TYPE_DUPLICATE_MULTIPLE_PHOTOS_COMMAND, DuplicateMultiplePhotosCommandPrivate))
enum  {
	DUPLICATE_MULTIPLE_PHOTOS_COMMAND_DUMMY_PROPERTY
};
GType library_photo_source_collection_get_type (void) G_GNUC_CONST;
static void duplicate_multiple_photos_command_on_photo_destroyed (DuplicateMultiplePhotosCommand* self, DataSource* source);
static void _duplicate_multiple_photos_command_on_photo_destroyed_source_collection_item_destroyed (SourceCollection* _sender, DataSource* source, gpointer self);
DuplicateMultiplePhotosCommand* duplicate_multiple_photos_command_new (GeeIterable* iter);
DuplicateMultiplePhotosCommand* duplicate_multiple_photos_command_construct (GType object_type, GeeIterable* iter);
#define RESOURCES_DUPLICATE_PHOTO_LABEL _ ("Duplicate")
#define RESOURCES_DUPLICATE_PHOTO_TOOLTIP _ ("Make a duplicate of the photo")
static void duplicate_multiple_photos_command_real_execute (Command* base);
void app_window_error_message (const gchar* message, GtkWindow* parent);
static void duplicate_multiple_photos_command_real_execute_on_source (MultipleDataSourceCommand* base, DataSource* source);
LibraryPhoto* library_photo_duplicate (LibraryPhoto* self, GError** error);
GFile* media_source_get_file (MediaSource* self);
static void duplicate_multiple_photos_command_real_undo (Command* base);
static void duplicate_multiple_photos_command_real_undo_on_source (MultipleDataSourceCommand* base, DataSource* source);
GType marker_get_type (void) G_GNUC_CONST;
Marker* data_collection_mark (DataCollection* self, DataObject* object);
gint source_collection_destroy_marked (SourceCollection* self, Marker* marker, gboolean delete_backing, ProgressMonitor monitor, void* monitor_target, GeeList* not_removed);
static void duplicate_multiple_photos_command_finalize (GObject * obj);
GType set_rating_single_command_get_type (void) G_GNUC_CONST;
GType rating_get_type (void) G_GNUC_CONST;
#define SET_RATING_SINGLE_COMMAND_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), TYPE_SET_RATING_SINGLE_COMMAND, SetRatingSingleCommandPrivate))
enum  {
	SET_RATING_SINGLE_COMMAND_DUMMY_PROPERTY
};
SetRatingSingleCommand* set_rating_single_command_new (DataSource* source, Rating rating);
SetRatingSingleCommand* set_rating_single_command_construct (GType object_type, DataSource* source, Rating rating);
const gchar* resources_rating_label (Rating rating);
Rating media_source_get_rating (MediaSource* self);
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);
#define RESOURCES_INCREASE_RATING_LABEL _ ("Increase Rating")
#define RESOURCES_DECREASE_RATING_LABEL _ ("Decrease Rating")
static void set_rating_single_command_real_execute (Command* base);
void media_source_set_rating (MediaSource* self, Rating rating);
void media_source_increase_rating (MediaSource* self);
void media_source_decrease_rating (MediaSource* self);
static void set_rating_single_command_real_undo (Command* base);
static void set_rating_single_command_finalize (GObject * obj);
GType set_rating_command_get_type (void) G_GNUC_CONST;
#define SET_RATING_COMMAND_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), TYPE_SET_RATING_COMMAND, SetRatingCommandPrivate))
enum  {
	SET_RATING_COMMAND_DUMMY_PROPERTY
};
SetRatingCommand* set_rating_command_new (GeeIterable* iter, Rating rating);
SetRatingCommand* set_rating_command_construct (GType object_type, GeeIterable* iter, Rating rating);
gchar* resources_rating_progress (Rating rating);
static void set_rating_command_save_source_states (SetRatingCommand* self, GeeIterable* iter);
SetRatingCommand* set_rating_command_new_inc_dec (GeeIterable* iter, gboolean is_incrementing);
SetRatingCommand* set_rating_command_construct_inc_dec (GType object_type, GeeIterable* iter, gboolean is_incrementing);
static void set_rating_command_real_execute (Command* base);
static void set_rating_command_real_undo (Command* base);
static void set_rating_command_real_execute_on_source (MultipleDataSourceCommand* base, DataSource* source);
static void set_rating_command_real_undo_on_source (MultipleDataSourceCommand* base, DataSource* source);
static void set_rating_command_finalize (GObject * obj);
GType set_raw_developer_command_get_type (void) G_GNUC_CONST;
GType raw_developer_get_type (void) G_GNUC_CONST;
#define SET_RAW_DEVELOPER_COMMAND_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), TYPE_SET_RAW_DEVELOPER_COMMAND, SetRawDeveloperCommandPrivate))
enum  {
	SET_RAW_DEVELOPER_COMMAND_DUMMY_PROPERTY
};
SetRawDeveloperCommand* set_raw_developer_command_new (GeeIterable* iter, RawDeveloper developer);
SetRawDeveloperCommand* set_raw_developer_command_construct (GType object_type, GeeIterable* iter, RawDeveloper developer);
static void set_raw_developer_command_save_source_states (SetRawDeveloperCommand* self, GeeIterable* iter);
static gboolean set_raw_developer_command_is_raw_photo (SetRawDeveloperCommand* self, Photo* photo);
RawDeveloper photo_get_raw_developer (Photo* self);
static void set_raw_developer_command_real_execute (Command* base);
static void set_raw_developer_command_real_undo (Command* base);
static void set_raw_developer_command_real_execute_on_source (MultipleDataSourceCommand* base, DataSource* source);
gboolean photo_is_raw_developer_available (Photo* self, RawDeveloper d);
void photo_set_raw_developer (Photo* self, RawDeveloper d);
static void set_raw_developer_command_real_undo_on_source (MultipleDataSourceCommand* base, DataSource* source);
GType photo_file_format_get_type (void) G_GNUC_CONST;
PhotoFileFormat photo_get_master_file_format (Photo* self);
static void set_raw_developer_command_finalize (GObject * obj);
GType adjust_date_time_photo_command_get_type (void) G_GNUC_CONST;
GType dateable_get_type (void) G_GNUC_CONST;
#define ADJUST_DATE_TIME_PHOTO_COMMAND_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), TYPE_ADJUST_DATE_TIME_PHOTO_COMMAND, AdjustDateTimePhotoCommandPrivate))
enum  {
	ADJUST_DATE_TIME_PHOTO_COMMAND_DUMMY_PROPERTY
};
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);
#define RESOURCES_ADJUST_DATE_TIME_LABEL _ ("Adjust Date and Time")
static void adjust_date_time_photo_command_real_execute (Command* base);
static void adjust_date_time_photo_command_set_time (AdjustDateTimePhotoCommand* self, Dateable* dateable, time_t exposure_time);
time_t dateable_get_exposure_time (Dateable* self);
ViewCollection* view_collection_new (const gchar* name);
ViewCollection* view_collection_construct (GType object_type, const gchar* name);
GType container_source_collection_get_type (void) G_GNUC_CONST;
GType event_source_collection_get_type (void) G_GNUC_CONST;
GeeCollection* data_collection_get_all (DataCollection* self);
gboolean data_collection_add (DataCollection* self, DataObject* object);
EventView* event_view_new (EventSource* source);
EventView* event_view_construct (GType object_type, EventSource* source);
GType event_view_get_type (void) G_GNUC_CONST;
void event_generate_single_event (MediaSource* media, ViewCollection* events_so_far, const gchar* event_name);
static void adjust_date_time_photo_command_real_undo (Command* base);
void photo_set_exposure_time_persistent (Photo* self, time_t time, GError** error);
void dateable_set_exposure_time (Dateable* self, time_t target_time);
static void adjust_date_time_photo_command_finalize (GObject * obj);
GType adjust_date_time_photos_command_get_type (void) G_GNUC_CONST;
#define ADJUST_DATE_TIME_PHOTOS_COMMAND_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), TYPE_ADJUST_DATE_TIME_PHOTOS_COMMAND, AdjustDateTimePhotosCommandPrivate))
enum  {
	ADJUST_DATE_TIME_PHOTOS_COMMAND_DUMMY_PROPERTY
};
AdjustDateTimePhotosCommand* adjust_date_time_photos_command_new (GeeIterable* iter, gint64 time_shift, gboolean keep_relativity, gboolean modify_originals);
AdjustDateTimePhotosCommand* adjust_date_time_photos_command_construct (GType object_type, GeeIterable* iter, gint64 time_shift, gboolean keep_relativity, gboolean modify_originals);
static time_t* _time_t_dup (time_t* self);
static void adjust_date_time_photos_command_real_execute (Command* base);
void multiple_object_error_dialog (GeeArrayList* objects, const gchar* message, const gchar* title);
static void adjust_date_time_photos_command_real_undo (Command* base);
static void adjust_date_time_photos_command_set_time (AdjustDateTimePhotosCommand* self, Dateable* dateable, time_t exposure_time);
static void adjust_date_time_photos_command_real_execute_on_source (MultipleDataSourceCommand* base, DataSource* source);
static void adjust_date_time_photos_command_real_undo_on_source (MultipleDataSourceCommand* base, DataSource* source);
static void adjust_date_time_photos_command_finalize (GObject * obj);
GType add_tags_command_get_type (void) G_GNUC_CONST;
#define ADD_TAGS_COMMAND_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), TYPE_ADD_TAGS_COMMAND, AddTagsCommandPrivate))
enum  {
	ADD_TAGS_COMMAND_DUMMY_PROPERTY
};
static void add_tags_command_on_proxy_broken (AddTagsCommand* self);
static void _add_tags_command_on_proxy_broken_source_proxy_broken (SourceProxy* _sender, gpointer self);
static void add_tags_command_on_source_destroyed (AddTagsCommand* self, DataSource* source);
static void _add_tags_command_on_source_destroyed_source_collection_item_destroyed (SourceCollection* _sender, DataSource* source, gpointer self);
GType video_source_collection_get_type (void) G_GNUC_CONST;
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);
gchar* resources_add_tags_label (gchar** names, int names_length1);
GeeList* hierarchical_tag_utilities_enumerate_parent_paths (const gchar* in_path);
GType tag_get_type (void) G_GNUC_CONST;
Tag* tag_for_path (const gchar* name);
gboolean tag_contains (Tag* self, MediaSource* source);
static void add_tags_command_real_execute (Command* base);
void tag_attach_many (Tag* self, GeeCollection* sources);
static void add_tags_command_real_undo (Command* base);
GeeMultiMap* tag_detach_many (Tag* self, GeeCollection* sources);
static void add_tags_command_finalize (GObject * obj);
GType rename_tag_command_get_type (void) G_GNUC_CONST;
#define RENAME_TAG_COMMAND_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), TYPE_RENAME_TAG_COMMAND, RenameTagCommandPrivate))
enum  {
	RENAME_TAG_COMMAND_DUMMY_PROPERTY
};
RenameTagCommand* rename_tag_command_new (Tag* tag, const gchar* new_name);
RenameTagCommand* rename_tag_command_construct (GType object_type, Tag* tag, const gchar* new_name);
gchar* resources_rename_tag_label (const gchar* old_name, const gchar* new_name);
gchar* tag_get_user_visible_name (Tag* self);
gchar* data_object_get_name (DataObject* self);
static void rename_tag_command_real_execute_on_source (SimpleProxyableCommand* base, DataSource* source);
gboolean tag_rename (Tag* self, const gchar* name);
gchar* resources_rename_tag_exists_message (const gchar* name);
static void rename_tag_command_real_undo_on_source (SimpleProxyableCommand* base, DataSource* source);
static void rename_tag_command_finalize (GObject * obj);
GType delete_tag_command_get_type (void) G_GNUC_CONST;
#define DELETE_TAG_COMMAND_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), TYPE_DELETE_TAG_COMMAND, DeleteTagCommandPrivate))
enum  {
	DELETE_TAG_COMMAND_DUMMY_PROPERTY
};
DeleteTagCommand* delete_tag_command_new (Tag* tag);
DeleteTagCommand* delete_tag_command_construct (GType object_type, Tag* tag);
gchar* resources_delete_tag_label (const gchar* name);
static void delete_tag_command_real_execute_on_source (SimpleProxyableCommand* base, DataSource* source);
GeeList* tag_get_hierarchical_children (Tag* self);
static void delete_tag_command_on_proxy_broken (DeleteTagCommand* self);
static void _delete_tag_command_on_proxy_broken_source_proxy_broken (SourceProxy* _sender, gpointer self);
GType tag_source_collection_get_type (void) G_GNUC_CONST;
static void delete_tag_command_real_undo_on_source (SimpleProxyableCommand* base, DataSource* source);
static void delete_tag_command_finalize (GObject * obj);
GType new_child_tag_command_get_type (void) G_GNUC_CONST;
#define NEW_CHILD_TAG_COMMAND_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), TYPE_NEW_CHILD_TAG_COMMAND, NewChildTagCommandPrivate))
enum  {
	NEW_CHILD_TAG_COMMAND_DUMMY_PROPERTY
};
NewChildTagCommand* new_child_tag_command_new (Tag* tag);
NewChildTagCommand* new_child_tag_command_construct (GType object_type, Tag* tag);
static void new_child_tag_command_real_execute_on_source (SimpleProxyableCommand* base, DataSource* source);
Tag* tag_create_new_child (Tag* self);
static void new_child_tag_command_real_undo_on_source (SimpleProxyableCommand* base, DataSource* source);
Tag* new_child_tag_command_get_created_child (NewChildTagCommand* self);
static void new_child_tag_command_finalize (GObject * obj);
GType new_root_tag_command_get_type (void) G_GNUC_CONST;
#define NEW_ROOT_TAG_COMMAND_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), TYPE_NEW_ROOT_TAG_COMMAND, NewRootTagCommandPrivate))
enum  {
	NEW_ROOT_TAG_COMMAND_DUMMY_PROPERTY
};
NewRootTagCommand* new_root_tag_command_new (void);
NewRootTagCommand* new_root_tag_command_construct (GType object_type);
static void new_root_tag_command_real_execute (Command* base);
Tag* tag_create_new_root (void);
static void new_root_tag_command_real_undo (Command* base);
Tag* new_root_tag_command_get_created_tag (NewRootTagCommand* self);
static void new_root_tag_command_finalize (GObject * obj);
GType reparent_tag_command_get_type (void) G_GNUC_CONST;
#define REPARENT_TAG_COMMAND_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), TYPE_REPARENT_TAG_COMMAND, ReparentTagCommandPrivate))
enum  {
	REPARENT_TAG_COMMAND_DUMMY_PROPERTY
};
static void reparent_tag_command_on_items_destroyed (ReparentTagCommand* self, GeeCollection* destroyed);
static void _reparent_tag_command_on_items_destroyed_source_collection_items_destroyed (SourceCollection* _sender, GeeCollection* destroyed, gpointer self);
ReparentTagCommand* reparent_tag_command_new (Tag* tag, const gchar* new_parent_path);
ReparentTagCommand* reparent_tag_command_construct (GType object_type, Tag* tag, const gchar* new_parent_path);
gchar* tag_get_path (Tag* self);
#define TAG_PATH_SEPARATOR_STRING "/"
gchar* hierarchical_tag_utilities_get_root_path_form (const gchar* client_path);
gboolean tag_source_collection_exists (TagSourceCollection* self, const gchar* name, gboolean treat_htags_as_root);
GeeCollection* tag_get_sources (Tag* self);
static GeeMap* reparent_tag_command_get_child_structure_at (ReparentTagCommand* self, const gchar* client_path);
static void reparent_tag_command_restore_child_attachments_at (ReparentTagCommand* self, const gchar* client_path, GeeMap* child_structure);
void tag_promote (Tag* self);
void tag_attach (Tag* self, MediaSource* source);
static void reparent_tag_command_reattach_in_play_sources_at (ReparentTagCommand* self, const gchar* client_path);
static void reparent_tag_command_save_before_state (ReparentTagCommand* self);
static void reparent_tag_command_restore_before_state (ReparentTagCommand* self);
GeeList* tag_detach (Tag* self, MediaSource* source);
static void reparent_tag_command_save_after_state (ReparentTagCommand* self);
static void reparent_tag_command_restore_after_state (ReparentTagCommand* self);
static void reparent_tag_command_prepare_parent (ReparentTagCommand* self, const gchar* path);
static void reparent_tag_command_do_source_parent_detachments (ReparentTagCommand* self);
Tag* tag_get_hierarchical_parent (Tag* self);
gint tag_get_attachment_count (Tag* self, MediaSource* source);
static void reparent_tag_command_do_source_parent_reattachments (ReparentTagCommand* self);
static void reparent_tag_command_do_destination_parent_detachments (ReparentTagCommand* self);
static void reparent_tag_command_do_destination_parent_reattachments (ReparentTagCommand* self);
static void reparent_tag_command_copy_subtree (ReparentTagCommand* self, const gchar* from, const gchar* to);
static void reparent_tag_command_destroy_subtree (ReparentTagCommand* self, const gchar* client_path);
static void reparent_tag_command_real_execute (Command* base);
static void reparent_tag_command_real_undo (Command* base);
void hierarchical_tag_utilities_cleanup_root_path (const gchar* path);
static void reparent_tag_command_finalize (GObject * obj);
GType modify_tags_command_get_type (void) G_GNUC_CONST;
#define MODIFY_TAGS_COMMAND_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), TYPE_MODIFY_TAGS_COMMAND, ModifyTagsCommandPrivate))
enum  {
	MODIFY_TAGS_COMMAND_DUMMY_PROPERTY
};
static void modify_tags_command_on_proxy_broken (ModifyTagsCommand* self);
static void _modify_tags_command_on_proxy_broken_source_proxy_broken (SourceProxy* _sender, gpointer 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);
#define RESOURCES_MODIFY_TAGS_LABEL _ ("Modify Tags")
GeeList* tag_source_collection_fetch_for_source (TagSourceCollection* self, MediaSource* source);
static void modify_tags_command_real_execute (Command* base);
static void modify_tags_command_real_undo (Command* base);
static void modify_tags_command_finalize (GObject * obj);
GType tag_untag_photos_command_get_type (void) G_GNUC_CONST;
#define TAG_UNTAG_PHOTOS_COMMAND_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), TYPE_TAG_UNTAG_PHOTOS_COMMAND, TagUntagPhotosCommandPrivate))
enum  {
	TAG_UNTAG_PHOTOS_COMMAND_DUMMY_PROPERTY
};
static void tag_untag_photos_command_on_source_destroyed (TagUntagPhotosCommand* self, DataSource* source);
static void _tag_untag_photos_command_on_source_destroyed_source_collection_item_destroyed (SourceCollection* _sender, DataSource* source, gpointer self);
TagUntagPhotosCommand* tag_untag_photos_command_new (Tag* tag, GeeCollection* sources, gint count, gboolean attach);
TagUntagPhotosCommand* tag_untag_photos_command_construct (GType object_type, Tag* tag, GeeCollection* sources, gint count, gboolean attach);
gchar* resources_tag_photos_label (const gchar* name, gint count);
gchar* resources_untag_photos_label (const gchar* name, gint count);
static void tag_untag_photos_command_real_execute_on_source (SimpleProxyableCommand* base, DataSource* source);
static void tag_untag_photos_command_do_attach (TagUntagPhotosCommand* self, Tag* tag);
static void tag_untag_photos_command_do_detach (TagUntagPhotosCommand* self, Tag* tag);
static void tag_untag_photos_command_real_undo_on_source (SimpleProxyableCommand* base, DataSource* source);
gchar* data_object_to_string (DataObject* self);
static void tag_untag_photos_command_finalize (GObject * obj);
GType rename_saved_search_command_get_type (void) G_GNUC_CONST;
GType saved_search_get_type (void) G_GNUC_CONST;
#define RENAME_SAVED_SEARCH_COMMAND_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), TYPE_RENAME_SAVED_SEARCH_COMMAND, RenameSavedSearchCommandPrivate))
enum  {
	RENAME_SAVED_SEARCH_COMMAND_DUMMY_PROPERTY
};
RenameSavedSearchCommand* rename_saved_search_command_new (SavedSearch* search, const gchar* new_name);
RenameSavedSearchCommand* rename_saved_search_command_construct (GType object_type, SavedSearch* search, const gchar* new_name);
gchar* resources_rename_search_label (const gchar* old_name, const gchar* new_name);
static void rename_saved_search_command_real_execute (Command* base);
gboolean saved_search_rename (SavedSearch* self, const gchar* new_name);
gchar* resources_rename_search_exists_message (const gchar* name);
static void rename_saved_search_command_real_undo (Command* base);
static void rename_saved_search_command_finalize (GObject * obj);
GType delete_saved_search_command_get_type (void) G_GNUC_CONST;
#define DELETE_SAVED_SEARCH_COMMAND_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), TYPE_DELETE_SAVED_SEARCH_COMMAND, DeleteSavedSearchCommandPrivate))
enum  {
	DELETE_SAVED_SEARCH_COMMAND_DUMMY_PROPERTY
};
DeleteSavedSearchCommand* delete_saved_search_command_new (SavedSearch* search);
DeleteSavedSearchCommand* delete_saved_search_command_construct (GType object_type, SavedSearch* search);
gchar* resources_delete_search_label (const gchar* name);
static void delete_saved_search_command_real_execute (Command* base);
gpointer saved_search_table_ref (gpointer instance);
void saved_search_table_unref (gpointer instance);
GParamSpec* param_spec_saved_search_table (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags);
void value_set_saved_search_table (GValue* value, gpointer v_object);
void value_take_saved_search_table (GValue* value, gpointer v_object);
gpointer value_get_saved_search_table (const GValue* value);
GType saved_search_table_get_type (void) G_GNUC_CONST;
SavedSearchTable* saved_search_table_get_instance (void);
void saved_search_table_remove (SavedSearchTable* self, SavedSearch* search);
static void delete_saved_search_command_real_undo (Command* base);
void saved_search_reconstitute (SavedSearch* self);
static void delete_saved_search_command_finalize (GObject * obj);
GType trash_untrash_photos_command_get_type (void) G_GNUC_CONST;
#define TRASH_UNTRASH_PHOTOS_COMMAND_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), TYPE_TRASH_UNTRASH_PHOTOS_COMMAND, TrashUntrashPhotosCommandPrivate))
enum  {
	TRASH_UNTRASH_PHOTOS_COMMAND_DUMMY_PROPERTY
};
static void trash_untrash_photos_command_on_photo_destroyed (TrashUntrashPhotosCommand* self, DataSource* source);
static void _trash_untrash_photos_command_on_photo_destroyed_source_collection_item_destroyed (SourceCollection* _sender, DataSource* source, gpointer self);
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);
static ProgressDialog* trash_untrash_photos_command_get_progress_dialog (TrashUntrashPhotosCommand* self, gboolean to_trash);
void progress_dialog_update_display_every (ProgressDialog* self, gint update_every);
static void trash_untrash_photos_command_real_execute (Command* base);
gboolean progress_dialog_monitor (ProgressDialog* self, guint64 count, guint64 total, gboolean do_event_loop);
static gboolean _progress_dialog_monitor_progress_monitor (guint64 current, guint64 total, gboolean do_event_loop, gpointer self);
static void trash_untrash_photos_command_trash (TrashUntrashPhotosCommand* self, ProgressMonitor monitor, void* monitor_target);
static void trash_untrash_photos_command_untrash (TrashUntrashPhotosCommand* self, ProgressMonitor monitor, void* monitor_target);
static void trash_untrash_photos_command_real_undo (Command* base);
void media_source_trash (MediaSource* self);
void media_source_untrash (MediaSource* self);
static void trash_untrash_photos_command_finalize (GObject * obj);
GType flag_unflag_command_get_type (void) G_GNUC_CONST;
#define FLAG_UNFLAG_COMMAND_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), TYPE_FLAG_UNFLAG_COMMAND, FlagUnflagCommandPrivate))
enum  {
	FLAG_UNFLAG_COMMAND_DUMMY_PROPERTY
};
#define FLAG_UNFLAG_COMMAND_MIN_PROGRESS_BAR_THRESHOLD 1000
#define FLAG_UNFLAG_COMMAND_FLAG_SELECTED_STRING _ ("Flag selected photos")
#define FLAG_UNFLAG_COMMAND_UNFLAG_SELECTED_STRING _ ("Unflag selected photos")
#define FLAG_UNFLAG_COMMAND_FLAG_PROGRESS _ ("Flagging selected photos")
#define FLAG_UNFLAG_COMMAND_UNFLAG_PROGRESS _ ("Unflagging selected photos")
FlagUnflagCommand* flag_unflag_command_new (GeeCollection* sources, gboolean flag);
FlagUnflagCommand* flag_unflag_command_construct (GType object_type, GeeCollection* sources, gboolean flag);
static void flag_unflag_command_real_execute_on_all (MultipleDataSourceAtOnceCommand* base, GeeCollection* sources);
static void flag_unflag_command_flag_unflag (FlagUnflagCommand* self, DataSource* source, gboolean flag);
static void flag_unflag_command_real_undo_on_all (MultipleDataSourceAtOnceCommand* base, GeeCollection* sources);
GType flaggable_get_type (void) G_GNUC_CONST;
void flaggable_mark_flagged (Flaggable* self);
void flaggable_mark_unflagged (Flaggable* self);
static void flag_unflag_command_finalize (GObject * obj);


static void _page_command_on_page_destroyed_gtk_widget_destroy (GtkWidget* _sender, gpointer self) {
#line 45 "/home/jens/Source/shotwell/src/Commands.vala"
	page_command_on_page_destroyed ((PageCommand*) self);
#line 2757 "Commands.c"
}


static void _page_command_on_photo_destroyed_data_source_destroyed (DataSource* _sender, gpointer self) {
#line 48 "/home/jens/Source/shotwell/src/Commands.vala"
	page_command_on_photo_destroyed ((PageCommand*) self);
#line 2764 "Commands.c"
}


static void _page_command_on_controller_destroyed_gtk_widget_destroy (GtkWidget* _sender, gpointer self) {
#line 51 "/home/jens/Source/shotwell/src/Commands.vala"
	page_command_on_controller_destroyed ((PageCommand*) self);
#line 2771 "Commands.c"
}


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


PageCommand* page_command_construct (GType object_type, const gchar* name, const gchar* explanation) {
	PageCommand * self = NULL;
	const gchar* _tmp0_;
	const gchar* _tmp1_;
	AppWindow* _tmp2_;
	AppWindow* _tmp3_;
	Page* _tmp4_;
	Page* _tmp5_;
#line 15 "/home/jens/Source/shotwell/src/Commands.vala"
	g_return_val_if_fail (name != NULL, NULL);
#line 15 "/home/jens/Source/shotwell/src/Commands.vala"
	g_return_val_if_fail (explanation != NULL, NULL);
#line 16 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp0_ = name;
#line 16 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp1_ = explanation;
#line 16 "/home/jens/Source/shotwell/src/Commands.vala"
	self = (PageCommand*) command_construct (object_type, _tmp0_, _tmp1_);
#line 18 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp2_ = app_window_get_instance ();
#line 18 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp3_ = _tmp2_;
#line 18 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp4_ = page_window_get_current_page (G_TYPE_CHECK_INSTANCE_CAST (_tmp3_, TYPE_PAGE_WINDOW, PageWindow));
#line 18 "/home/jens/Source/shotwell/src/Commands.vala"
	_g_object_unref0 (self->priv->page);
#line 18 "/home/jens/Source/shotwell/src/Commands.vala"
	self->priv->page = _tmp4_;
#line 18 "/home/jens/Source/shotwell/src/Commands.vala"
	_g_object_unref0 (_tmp3_);
#line 20 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp5_ = self->priv->page;
#line 20 "/home/jens/Source/shotwell/src/Commands.vala"
	if (_tmp5_ != NULL) {
#line 2816 "Commands.c"
		Page* _tmp6_;
		LibraryPhotoPage* photo_page = NULL;
		Page* _tmp7_;
		LibraryPhotoPage* _tmp8_;
		LibraryPhotoPage* _tmp9_;
#line 21 "/home/jens/Source/shotwell/src/Commands.vala"
		_tmp6_ = self->priv->page;
#line 21 "/home/jens/Source/shotwell/src/Commands.vala"
		g_signal_connect_object (G_TYPE_CHECK_INSTANCE_CAST (_tmp6_, gtk_widget_get_type (), GtkWidget), "destroy", (GCallback) _page_command_on_page_destroyed_gtk_widget_destroy, self, 0);
#line 27 "/home/jens/Source/shotwell/src/Commands.vala"
		_tmp7_ = self->priv->page;
#line 27 "/home/jens/Source/shotwell/src/Commands.vala"
		_tmp8_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_TYPE (_tmp7_, TYPE_LIBRARY_PHOTO_PAGE) ? ((LibraryPhotoPage*) _tmp7_) : NULL);
#line 27 "/home/jens/Source/shotwell/src/Commands.vala"
		photo_page = _tmp8_;
#line 28 "/home/jens/Source/shotwell/src/Commands.vala"
		_tmp9_ = photo_page;
#line 28 "/home/jens/Source/shotwell/src/Commands.vala"
		if (_tmp9_ != NULL) {
#line 2836 "Commands.c"
			LibraryPhotoPage* _tmp10_;
			Photo* _tmp11_;
			LibraryPhotoPage* _tmp12_;
			CollectionPage* _tmp13_;
			gboolean _tmp14_ = FALSE;
			Photo* _tmp15_;
#line 29 "/home/jens/Source/shotwell/src/Commands.vala"
			_tmp10_ = photo_page;
#line 29 "/home/jens/Source/shotwell/src/Commands.vala"
			_tmp11_ = editing_host_page_get_photo (G_TYPE_CHECK_INSTANCE_CAST (_tmp10_, TYPE_EDITING_HOST_PAGE, EditingHostPage));
#line 29 "/home/jens/Source/shotwell/src/Commands.vala"
			_g_object_unref0 (self->priv->library_photo);
#line 29 "/home/jens/Source/shotwell/src/Commands.vala"
			self->priv->library_photo = _tmp11_;
#line 30 "/home/jens/Source/shotwell/src/Commands.vala"
			_tmp12_ = photo_page;
#line 30 "/home/jens/Source/shotwell/src/Commands.vala"
			_tmp13_ = library_photo_page_get_controller_page (_tmp12_);
#line 30 "/home/jens/Source/shotwell/src/Commands.vala"
			_g_object_unref0 (self->priv->collection_page);
#line 30 "/home/jens/Source/shotwell/src/Commands.vala"
			self->priv->collection_page = _tmp13_;
#line 32 "/home/jens/Source/shotwell/src/Commands.vala"
			_tmp15_ = self->priv->library_photo;
#line 32 "/home/jens/Source/shotwell/src/Commands.vala"
			if (_tmp15_ != NULL) {
#line 2863 "Commands.c"
				CollectionPage* _tmp16_;
#line 32 "/home/jens/Source/shotwell/src/Commands.vala"
				_tmp16_ = self->priv->collection_page;
#line 32 "/home/jens/Source/shotwell/src/Commands.vala"
				_tmp14_ = _tmp16_ != NULL;
#line 2869 "Commands.c"
			} else {
#line 32 "/home/jens/Source/shotwell/src/Commands.vala"
				_tmp14_ = FALSE;
#line 2873 "Commands.c"
			}
#line 32 "/home/jens/Source/shotwell/src/Commands.vala"
			if (_tmp14_) {
#line 2877 "Commands.c"
				Photo* _tmp17_;
				CollectionPage* _tmp18_;
#line 33 "/home/jens/Source/shotwell/src/Commands.vala"
				_tmp17_ = self->priv->library_photo;
#line 33 "/home/jens/Source/shotwell/src/Commands.vala"
				g_signal_connect_object (G_TYPE_CHECK_INSTANCE_CAST (_tmp17_, TYPE_DATA_SOURCE, DataSource), "destroyed", (GCallback) _page_command_on_photo_destroyed_data_source_destroyed, self, 0);
#line 34 "/home/jens/Source/shotwell/src/Commands.vala"
				_tmp18_ = self->priv->collection_page;
#line 34 "/home/jens/Source/shotwell/src/Commands.vala"
				g_signal_connect_object (G_TYPE_CHECK_INSTANCE_CAST (_tmp18_, gtk_widget_get_type (), GtkWidget), "destroy", (GCallback) _page_command_on_controller_destroyed_gtk_widget_destroy, self, 0);
#line 2888 "Commands.c"
			} else {
#line 36 "/home/jens/Source/shotwell/src/Commands.vala"
				_g_object_unref0 (self->priv->library_photo);
#line 36 "/home/jens/Source/shotwell/src/Commands.vala"
				self->priv->library_photo = NULL;
#line 37 "/home/jens/Source/shotwell/src/Commands.vala"
				_g_object_unref0 (self->priv->collection_page);
#line 37 "/home/jens/Source/shotwell/src/Commands.vala"
				self->priv->collection_page = NULL;
#line 2898 "Commands.c"
			}
		}
#line 20 "/home/jens/Source/shotwell/src/Commands.vala"
		_g_object_unref0 (photo_page);
#line 2903 "Commands.c"
	}
#line 15 "/home/jens/Source/shotwell/src/Commands.vala"
	return self;
#line 2907 "Commands.c"
}


void page_command_set_auto_return_to_page (PageCommand* self, gboolean auto_return) {
	gboolean _tmp0_;
#line 54 "/home/jens/Source/shotwell/src/Commands.vala"
	g_return_if_fail (IS_PAGE_COMMAND (self));
#line 55 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp0_ = auto_return;
#line 55 "/home/jens/Source/shotwell/src/Commands.vala"
	self->priv->auto_return = _tmp0_;
#line 2919 "Commands.c"
}


static void page_command_real_prepare (Command* base) {
	PageCommand * self;
	gboolean _tmp0_;
#line 58 "/home/jens/Source/shotwell/src/Commands.vala"
	self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_PAGE_COMMAND, PageCommand);
#line 59 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp0_ = self->priv->auto_return;
#line 59 "/home/jens/Source/shotwell/src/Commands.vala"
	if (_tmp0_) {
#line 60 "/home/jens/Source/shotwell/src/Commands.vala"
		page_command_return_to_page (self);
#line 2934 "Commands.c"
	}
#line 62 "/home/jens/Source/shotwell/src/Commands.vala"
	COMMAND_CLASS (page_command_parent_class)->prepare (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_COMMAND, Command));
#line 2938 "Commands.c"
}


void page_command_return_to_page (PageCommand* self) {
	LibraryPhotoPage* photo_page = NULL;
	Page* _tmp0_;
	LibraryPhotoPage* _tmp1_;
	LibraryPhotoPage* _tmp2_;
#line 65 "/home/jens/Source/shotwell/src/Commands.vala"
	g_return_if_fail (IS_PAGE_COMMAND (self));
#line 66 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp0_ = self->priv->page;
#line 66 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp1_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_TYPE (_tmp0_, TYPE_LIBRARY_PHOTO_PAGE) ? ((LibraryPhotoPage*) _tmp0_) : NULL);
#line 66 "/home/jens/Source/shotwell/src/Commands.vala"
	photo_page = _tmp1_;
#line 68 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp2_ = photo_page;
#line 68 "/home/jens/Source/shotwell/src/Commands.vala"
	if (_tmp2_ != NULL) {
#line 2959 "Commands.c"
		gboolean _tmp3_ = FALSE;
		Photo* _tmp4_;
#line 69 "/home/jens/Source/shotwell/src/Commands.vala"
		_tmp4_ = self->priv->library_photo;
#line 69 "/home/jens/Source/shotwell/src/Commands.vala"
		if (_tmp4_ != NULL) {
#line 2966 "Commands.c"
			CollectionPage* _tmp5_;
#line 69 "/home/jens/Source/shotwell/src/Commands.vala"
			_tmp5_ = self->priv->collection_page;
#line 69 "/home/jens/Source/shotwell/src/Commands.vala"
			_tmp3_ = _tmp5_ != NULL;
#line 2972 "Commands.c"
		} else {
#line 69 "/home/jens/Source/shotwell/src/Commands.vala"
			_tmp3_ = FALSE;
#line 2976 "Commands.c"
		}
#line 69 "/home/jens/Source/shotwell/src/Commands.vala"
		if (_tmp3_) {
#line 2980 "Commands.c"
			gboolean photo_in_collection = FALSE;
			gint count = 0;
			CollectionPage* _tmp6_;
			ViewCollection* _tmp7_;
			ViewCollection* _tmp8_;
			gint _tmp9_;
			gint _tmp10_;
			gboolean _tmp25_;
#line 70 "/home/jens/Source/shotwell/src/Commands.vala"
			photo_in_collection = FALSE;
#line 71 "/home/jens/Source/shotwell/src/Commands.vala"
			_tmp6_ = self->priv->collection_page;
#line 71 "/home/jens/Source/shotwell/src/Commands.vala"
			_tmp7_ = page_get_view (G_TYPE_CHECK_INSTANCE_CAST (_tmp6_, TYPE_PAGE, Page));
#line 71 "/home/jens/Source/shotwell/src/Commands.vala"
			_tmp8_ = _tmp7_;
#line 71 "/home/jens/Source/shotwell/src/Commands.vala"
			_tmp9_ = data_collection_get_count (G_TYPE_CHECK_INSTANCE_CAST (_tmp8_, TYPE_DATA_COLLECTION, DataCollection));
#line 71 "/home/jens/Source/shotwell/src/Commands.vala"
			_tmp10_ = _tmp9_;
#line 71 "/home/jens/Source/shotwell/src/Commands.vala"
			_data_collection_unref0 (_tmp8_);
#line 71 "/home/jens/Source/shotwell/src/Commands.vala"
			count = _tmp10_;
#line 3005 "Commands.c"
			{
				gint i = 0;
#line 72 "/home/jens/Source/shotwell/src/Commands.vala"
				i = 0;
#line 3010 "Commands.c"
				{
					gboolean _tmp11_ = FALSE;
#line 72 "/home/jens/Source/shotwell/src/Commands.vala"
					_tmp11_ = TRUE;
#line 72 "/home/jens/Source/shotwell/src/Commands.vala"
					while (TRUE) {
#line 3017 "Commands.c"
						gint _tmp13_;
						gint _tmp14_;
						CollectionPage* _tmp15_;
						ViewCollection* _tmp16_;
						ViewCollection* _tmp17_;
						gint _tmp18_;
						DataObject* _tmp19_;
						Thumbnail* _tmp20_;
						MediaSource* _tmp21_;
						MediaSource* _tmp22_;
						Photo* _tmp23_;
						gboolean _tmp24_;
#line 72 "/home/jens/Source/shotwell/src/Commands.vala"
						if (!_tmp11_) {
#line 3032 "Commands.c"
							gint _tmp12_;
#line 72 "/home/jens/Source/shotwell/src/Commands.vala"
							_tmp12_ = i;
#line 72 "/home/jens/Source/shotwell/src/Commands.vala"
							i = _tmp12_ + 1;
#line 3038 "Commands.c"
						}
#line 72 "/home/jens/Source/shotwell/src/Commands.vala"
						_tmp11_ = FALSE;
#line 72 "/home/jens/Source/shotwell/src/Commands.vala"
						_tmp13_ = i;
#line 72 "/home/jens/Source/shotwell/src/Commands.vala"
						_tmp14_ = count;
#line 72 "/home/jens/Source/shotwell/src/Commands.vala"
						if (!(_tmp13_ < _tmp14_)) {
#line 72 "/home/jens/Source/shotwell/src/Commands.vala"
							break;
#line 3050 "Commands.c"
						}
#line 73 "/home/jens/Source/shotwell/src/Commands.vala"
						_tmp15_ = self->priv->collection_page;
#line 73 "/home/jens/Source/shotwell/src/Commands.vala"
						_tmp16_ = page_get_view (G_TYPE_CHECK_INSTANCE_CAST (_tmp15_, TYPE_PAGE, Page));
#line 73 "/home/jens/Source/shotwell/src/Commands.vala"
						_tmp17_ = _tmp16_;
#line 73 "/home/jens/Source/shotwell/src/Commands.vala"
						_tmp18_ = i;
#line 73 "/home/jens/Source/shotwell/src/Commands.vala"
						_tmp19_ = data_collection_get_at (G_TYPE_CHECK_INSTANCE_CAST (_tmp17_, TYPE_DATA_COLLECTION, DataCollection), _tmp18_);
#line 73 "/home/jens/Source/shotwell/src/Commands.vala"
						_tmp20_ = G_TYPE_CHECK_INSTANCE_CAST (_tmp19_, TYPE_THUMBNAIL, Thumbnail);
#line 73 "/home/jens/Source/shotwell/src/Commands.vala"
						_tmp21_ = thumbnail_get_media_source (_tmp20_);
#line 73 "/home/jens/Source/shotwell/src/Commands.vala"
						_tmp22_ = _tmp21_;
#line 73 "/home/jens/Source/shotwell/src/Commands.vala"
						_tmp23_ = self->priv->library_photo;
#line 73 "/home/jens/Source/shotwell/src/Commands.vala"
						_tmp24_ = _tmp22_ == G_TYPE_CHECK_INSTANCE_CAST (_tmp23_, TYPE_MEDIA_SOURCE, MediaSource);
#line 73 "/home/jens/Source/shotwell/src/Commands.vala"
						_g_object_unref0 (_tmp22_);
#line 73 "/home/jens/Source/shotwell/src/Commands.vala"
						_g_object_unref0 (_tmp20_);
#line 73 "/home/jens/Source/shotwell/src/Commands.vala"
						_data_collection_unref0 (_tmp17_);
#line 73 "/home/jens/Source/shotwell/src/Commands.vala"
						if (_tmp24_) {
#line 74 "/home/jens/Source/shotwell/src/Commands.vala"
							photo_in_collection = TRUE;
#line 75 "/home/jens/Source/shotwell/src/Commands.vala"
							break;
#line 3084 "Commands.c"
						}
					}
				}
			}
#line 79 "/home/jens/Source/shotwell/src/Commands.vala"
			_tmp25_ = photo_in_collection;
#line 79 "/home/jens/Source/shotwell/src/Commands.vala"
			if (_tmp25_) {
#line 3093 "Commands.c"
				LibraryWindow* _tmp26_;
				LibraryWindow* _tmp27_;
				CollectionPage* _tmp28_;
				Photo* _tmp29_;
#line 80 "/home/jens/Source/shotwell/src/Commands.vala"
				_tmp26_ = library_window_get_app ();
#line 80 "/home/jens/Source/shotwell/src/Commands.vala"
				_tmp27_ = _tmp26_;
#line 80 "/home/jens/Source/shotwell/src/Commands.vala"
				_tmp28_ = self->priv->collection_page;
#line 80 "/home/jens/Source/shotwell/src/Commands.vala"
				_tmp29_ = self->priv->library_photo;
#line 80 "/home/jens/Source/shotwell/src/Commands.vala"
				library_window_switch_to_photo_page (_tmp27_, _tmp28_, _tmp29_);
#line 80 "/home/jens/Source/shotwell/src/Commands.vala"
				_g_object_unref0 (_tmp27_);
#line 3110 "Commands.c"
			}
		}
	} else {
		Page* _tmp30_;
#line 82 "/home/jens/Source/shotwell/src/Commands.vala"
		_tmp30_ = self->priv->page;
#line 82 "/home/jens/Source/shotwell/src/Commands.vala"
		if (_tmp30_ != NULL) {
#line 3119 "Commands.c"
			AppWindow* _tmp31_;
			AppWindow* _tmp32_;
			Page* _tmp33_;
#line 83 "/home/jens/Source/shotwell/src/Commands.vala"
			_tmp31_ = app_window_get_instance ();
#line 83 "/home/jens/Source/shotwell/src/Commands.vala"
			_tmp32_ = _tmp31_;
#line 83 "/home/jens/Source/shotwell/src/Commands.vala"
			_tmp33_ = self->priv->page;
#line 83 "/home/jens/Source/shotwell/src/Commands.vala"
			page_window_set_current_page (G_TYPE_CHECK_INSTANCE_CAST (_tmp32_, TYPE_PAGE_WINDOW, PageWindow), _tmp33_);
#line 83 "/home/jens/Source/shotwell/src/Commands.vala"
			_g_object_unref0 (_tmp32_);
#line 3133 "Commands.c"
		}
	}
#line 65 "/home/jens/Source/shotwell/src/Commands.vala"
	_g_object_unref0 (photo_page);
#line 3138 "Commands.c"
}


static void page_command_on_page_destroyed (PageCommand* self) {
	Page* _tmp0_;
	guint _tmp1_;
#line 86 "/home/jens/Source/shotwell/src/Commands.vala"
	g_return_if_fail (IS_PAGE_COMMAND (self));
#line 87 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp0_ = self->priv->page;
#line 87 "/home/jens/Source/shotwell/src/Commands.vala"
	g_signal_parse_name ("destroy", gtk_widget_get_type (), &_tmp1_, NULL, FALSE);
#line 87 "/home/jens/Source/shotwell/src/Commands.vala"
	g_signal_handlers_disconnect_matched (G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, gtk_widget_get_type (), GtkWidget), G_SIGNAL_MATCH_ID | G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA, _tmp1_, 0, NULL, (GCallback) _page_command_on_page_destroyed_gtk_widget_destroy, self);
#line 88 "/home/jens/Source/shotwell/src/Commands.vala"
	_g_object_unref0 (self->priv->page);
#line 88 "/home/jens/Source/shotwell/src/Commands.vala"
	self->priv->page = NULL;
#line 3157 "Commands.c"
}


static void page_command_on_photo_destroyed (PageCommand* self) {
	Photo* _tmp0_;
	guint _tmp1_;
#line 91 "/home/jens/Source/shotwell/src/Commands.vala"
	g_return_if_fail (IS_PAGE_COMMAND (self));
#line 92 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp0_ = self->priv->library_photo;
#line 92 "/home/jens/Source/shotwell/src/Commands.vala"
	g_signal_parse_name ("destroyed", TYPE_DATA_SOURCE, &_tmp1_, NULL, FALSE);
#line 92 "/home/jens/Source/shotwell/src/Commands.vala"
	g_signal_handlers_disconnect_matched (G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, TYPE_DATA_SOURCE, DataSource), G_SIGNAL_MATCH_ID | G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA, _tmp1_, 0, NULL, (GCallback) _page_command_on_photo_destroyed_data_source_destroyed, self);
#line 93 "/home/jens/Source/shotwell/src/Commands.vala"
	_g_object_unref0 (self->priv->library_photo);
#line 93 "/home/jens/Source/shotwell/src/Commands.vala"
	self->priv->library_photo = NULL;
#line 3176 "Commands.c"
}


static void page_command_on_controller_destroyed (PageCommand* self) {
	CollectionPage* _tmp0_;
	guint _tmp1_;
#line 96 "/home/jens/Source/shotwell/src/Commands.vala"
	g_return_if_fail (IS_PAGE_COMMAND (self));
#line 97 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp0_ = self->priv->collection_page;
#line 97 "/home/jens/Source/shotwell/src/Commands.vala"
	g_signal_parse_name ("destroy", gtk_widget_get_type (), &_tmp1_, NULL, FALSE);
#line 97 "/home/jens/Source/shotwell/src/Commands.vala"
	g_signal_handlers_disconnect_matched (G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, gtk_widget_get_type (), GtkWidget), G_SIGNAL_MATCH_ID | G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA, _tmp1_, 0, NULL, (GCallback) _page_command_on_controller_destroyed_gtk_widget_destroy, self);
#line 98 "/home/jens/Source/shotwell/src/Commands.vala"
	_g_object_unref0 (self->priv->collection_page);
#line 98 "/home/jens/Source/shotwell/src/Commands.vala"
	self->priv->collection_page = NULL;
#line 3195 "Commands.c"
}


static void page_command_class_init (PageCommandClass * klass) {
#line 9 "/home/jens/Source/shotwell/src/Commands.vala"
	page_command_parent_class = g_type_class_peek_parent (klass);
#line 9 "/home/jens/Source/shotwell/src/Commands.vala"
	g_type_class_add_private (klass, sizeof (PageCommandPrivate));
#line 9 "/home/jens/Source/shotwell/src/Commands.vala"
	((CommandClass *) klass)->prepare = (void (*) (Command *)) page_command_real_prepare;
#line 9 "/home/jens/Source/shotwell/src/Commands.vala"
	G_OBJECT_CLASS (klass)->finalize = page_command_finalize;
#line 3208 "Commands.c"
}


static void page_command_instance_init (PageCommand * self) {
#line 9 "/home/jens/Source/shotwell/src/Commands.vala"
	self->priv = PAGE_COMMAND_GET_PRIVATE (self);
#line 11 "/home/jens/Source/shotwell/src/Commands.vala"
	self->priv->auto_return = TRUE;
#line 12 "/home/jens/Source/shotwell/src/Commands.vala"
	self->priv->library_photo = NULL;
#line 13 "/home/jens/Source/shotwell/src/Commands.vala"
	self->priv->collection_page = NULL;
#line 3221 "Commands.c"
}


static void page_command_finalize (GObject * obj) {
	PageCommand * self;
	Page* _tmp0_;
	Photo* _tmp3_;
	CollectionPage* _tmp6_;
#line 9 "/home/jens/Source/shotwell/src/Commands.vala"
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, TYPE_PAGE_COMMAND, PageCommand);
#line 44 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp0_ = self->priv->page;
#line 44 "/home/jens/Source/shotwell/src/Commands.vala"
	if (_tmp0_ != NULL) {
#line 3236 "Commands.c"
		Page* _tmp1_;
		guint _tmp2_;
#line 45 "/home/jens/Source/shotwell/src/Commands.vala"
		_tmp1_ = self->priv->page;
#line 45 "/home/jens/Source/shotwell/src/Commands.vala"
		g_signal_parse_name ("destroy", gtk_widget_get_type (), &_tmp2_, NULL, FALSE);
#line 45 "/home/jens/Source/shotwell/src/Commands.vala"
		g_signal_handlers_disconnect_matched (G_TYPE_CHECK_INSTANCE_CAST (_tmp1_, gtk_widget_get_type (), GtkWidget), G_SIGNAL_MATCH_ID | G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA, _tmp2_, 0, NULL, (GCallback) _page_command_on_page_destroyed_gtk_widget_destroy, self);
#line 3245 "Commands.c"
	}
#line 47 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp3_ = self->priv->library_photo;
#line 47 "/home/jens/Source/shotwell/src/Commands.vala"
	if (_tmp3_ != NULL) {
#line 3251 "Commands.c"
		Photo* _tmp4_;
		guint _tmp5_;
#line 48 "/home/jens/Source/shotwell/src/Commands.vala"
		_tmp4_ = self->priv->library_photo;
#line 48 "/home/jens/Source/shotwell/src/Commands.vala"
		g_signal_parse_name ("destroyed", TYPE_DATA_SOURCE, &_tmp5_, NULL, FALSE);
#line 48 "/home/jens/Source/shotwell/src/Commands.vala"
		g_signal_handlers_disconnect_matched (G_TYPE_CHECK_INSTANCE_CAST (_tmp4_, TYPE_DATA_SOURCE, DataSource), G_SIGNAL_MATCH_ID | G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA, _tmp5_, 0, NULL, (GCallback) _page_command_on_photo_destroyed_data_source_destroyed, self);
#line 3260 "Commands.c"
	}
#line 50 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp6_ = self->priv->collection_page;
#line 50 "/home/jens/Source/shotwell/src/Commands.vala"
	if (_tmp6_ != NULL) {
#line 3266 "Commands.c"
		CollectionPage* _tmp7_;
		guint _tmp8_;
#line 51 "/home/jens/Source/shotwell/src/Commands.vala"
		_tmp7_ = self->priv->collection_page;
#line 51 "/home/jens/Source/shotwell/src/Commands.vala"
		g_signal_parse_name ("destroy", gtk_widget_get_type (), &_tmp8_, NULL, FALSE);
#line 51 "/home/jens/Source/shotwell/src/Commands.vala"
		g_signal_handlers_disconnect_matched (G_TYPE_CHECK_INSTANCE_CAST (_tmp7_, gtk_widget_get_type (), GtkWidget), G_SIGNAL_MATCH_ID | G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA, _tmp8_, 0, NULL, (GCallback) _page_command_on_controller_destroyed_gtk_widget_destroy, self);
#line 3275 "Commands.c"
	}
#line 10 "/home/jens/Source/shotwell/src/Commands.vala"
	_g_object_unref0 (self->priv->page);
#line 12 "/home/jens/Source/shotwell/src/Commands.vala"
	_g_object_unref0 (self->priv->library_photo);
#line 13 "/home/jens/Source/shotwell/src/Commands.vala"
	_g_object_unref0 (self->priv->collection_page);
#line 9 "/home/jens/Source/shotwell/src/Commands.vala"
	G_OBJECT_CLASS (page_command_parent_class)->finalize (obj);
#line 3285 "Commands.c"
}


GType page_command_get_type (void) {
	static volatile gsize page_command_type_id__volatile = 0;
	if (g_once_init_enter (&page_command_type_id__volatile)) {
		static const GTypeInfo g_define_type_info = { sizeof (PageCommandClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) page_command_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (PageCommand), 0, (GInstanceInitFunc) page_command_instance_init, NULL };
		GType page_command_type_id;
		page_command_type_id = g_type_register_static (TYPE_COMMAND, "PageCommand", &g_define_type_info, G_TYPE_FLAG_ABSTRACT);
		g_once_init_leave (&page_command_type_id__volatile, page_command_type_id);
	}
	return page_command_type_id__volatile;
}


static void _single_data_source_command_on_source_destroyed_data_source_destroyed (DataSource* _sender, gpointer self) {
#line 115 "/home/jens/Source/shotwell/src/Commands.vala"
	single_data_source_command_on_source_destroyed ((SingleDataSourceCommand*) self);
#line 3304 "Commands.c"
}


SingleDataSourceCommand* single_data_source_command_construct (GType object_type, DataSource* source, const gchar* name, const gchar* explanation) {
	SingleDataSourceCommand * self = NULL;
	const gchar* _tmp0_;
	const gchar* _tmp1_;
	DataSource* _tmp2_;
	DataSource* _tmp3_;
	DataSource* _tmp4_;
#line 106 "/home/jens/Source/shotwell/src/Commands.vala"
	g_return_val_if_fail (IS_DATA_SOURCE (source), NULL);
#line 106 "/home/jens/Source/shotwell/src/Commands.vala"
	g_return_val_if_fail (name != NULL, NULL);
#line 106 "/home/jens/Source/shotwell/src/Commands.vala"
	g_return_val_if_fail (explanation != NULL, NULL);
#line 107 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp0_ = name;
#line 107 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp1_ = explanation;
#line 107 "/home/jens/Source/shotwell/src/Commands.vala"
	self = (SingleDataSourceCommand*) page_command_construct (object_type, _tmp0_, _tmp1_);
#line 109 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp2_ = source;
#line 109 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp3_ = _g_object_ref0 (_tmp2_);
#line 109 "/home/jens/Source/shotwell/src/Commands.vala"
	_g_object_unref0 (self->source);
#line 109 "/home/jens/Source/shotwell/src/Commands.vala"
	self->source = _tmp3_;
#line 111 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp4_ = source;
#line 111 "/home/jens/Source/shotwell/src/Commands.vala"
	g_signal_connect_object (_tmp4_, "destroyed", (GCallback) _single_data_source_command_on_source_destroyed_data_source_destroyed, self, 0);
#line 106 "/home/jens/Source/shotwell/src/Commands.vala"
	return self;
#line 3341 "Commands.c"
}


DataSource* single_data_source_command_get_source (SingleDataSourceCommand* self) {
	DataSource* result = NULL;
	DataSource* _tmp0_;
	DataSource* _tmp1_;
#line 118 "/home/jens/Source/shotwell/src/Commands.vala"
	g_return_val_if_fail (IS_SINGLE_DATA_SOURCE_COMMAND (self), NULL);
#line 119 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp0_ = self->source;
#line 119 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp1_ = _g_object_ref0 (_tmp0_);
#line 119 "/home/jens/Source/shotwell/src/Commands.vala"
	result = _tmp1_;
#line 119 "/home/jens/Source/shotwell/src/Commands.vala"
	return result;
#line 3359 "Commands.c"
}


static void single_data_source_command_on_source_destroyed (SingleDataSourceCommand* self) {
	CommandManager* _tmp0_;
	CommandManager* _tmp1_;
#line 122 "/home/jens/Source/shotwell/src/Commands.vala"
	g_return_if_fail (IS_SINGLE_DATA_SOURCE_COMMAND (self));
#line 125 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp0_ = command_get_command_manager (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_COMMAND, Command));
#line 125 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp1_ = _tmp0_;
#line 125 "/home/jens/Source/shotwell/src/Commands.vala"
	command_manager_reset (_tmp1_);
#line 125 "/home/jens/Source/shotwell/src/Commands.vala"
	_command_manager_unref0 (_tmp1_);
#line 3376 "Commands.c"
}


static void single_data_source_command_class_init (SingleDataSourceCommandClass * klass) {
#line 103 "/home/jens/Source/shotwell/src/Commands.vala"
	single_data_source_command_parent_class = g_type_class_peek_parent (klass);
#line 103 "/home/jens/Source/shotwell/src/Commands.vala"
	G_OBJECT_CLASS (klass)->finalize = single_data_source_command_finalize;
#line 3385 "Commands.c"
}


static void single_data_source_command_instance_init (SingleDataSourceCommand * self) {
}


static void single_data_source_command_finalize (GObject * obj) {
	SingleDataSourceCommand * self;
	DataSource* _tmp0_;
	guint _tmp1_;
#line 103 "/home/jens/Source/shotwell/src/Commands.vala"
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, TYPE_SINGLE_DATA_SOURCE_COMMAND, SingleDataSourceCommand);
#line 115 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp0_ = self->source;
#line 115 "/home/jens/Source/shotwell/src/Commands.vala"
	g_signal_parse_name ("destroyed", TYPE_DATA_SOURCE, &_tmp1_, NULL, FALSE);
#line 115 "/home/jens/Source/shotwell/src/Commands.vala"
	g_signal_handlers_disconnect_matched (_tmp0_, G_SIGNAL_MATCH_ID | G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA, _tmp1_, 0, NULL, (GCallback) _single_data_source_command_on_source_destroyed_data_source_destroyed, self);
#line 104 "/home/jens/Source/shotwell/src/Commands.vala"
	_g_object_unref0 (self->source);
#line 103 "/home/jens/Source/shotwell/src/Commands.vala"
	G_OBJECT_CLASS (single_data_source_command_parent_class)->finalize (obj);
#line 3409 "Commands.c"
}


GType single_data_source_command_get_type (void) {
	static volatile gsize single_data_source_command_type_id__volatile = 0;
	if (g_once_init_enter (&single_data_source_command_type_id__volatile)) {
		static const GTypeInfo g_define_type_info = { sizeof (SingleDataSourceCommandClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) single_data_source_command_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (SingleDataSourceCommand), 0, (GInstanceInitFunc) single_data_source_command_instance_init, NULL };
		GType single_data_source_command_type_id;
		single_data_source_command_type_id = g_type_register_static (TYPE_PAGE_COMMAND, "SingleDataSourceCommand", &g_define_type_info, G_TYPE_FLAG_ABSTRACT);
		g_once_init_leave (&single_data_source_command_type_id__volatile, single_data_source_command_type_id);
	}
	return single_data_source_command_type_id__volatile;
}


static void _simple_proxyable_command_on_proxy_broken_source_proxy_broken (SourceProxy* _sender, gpointer self) {
#line 141 "/home/jens/Source/shotwell/src/Commands.vala"
	simple_proxyable_command_on_proxy_broken ((SimpleProxyableCommand*) self);
#line 3428 "Commands.c"
}


SimpleProxyableCommand* simple_proxyable_command_construct (GType object_type, Proxyable* proxyable, const gchar* name, const gchar* explanation) {
	SimpleProxyableCommand * self = NULL;
	const gchar* _tmp0_;
	const gchar* _tmp1_;
	Proxyable* _tmp2_;
	SourceProxy* _tmp3_;
	SourceProxy* _tmp4_;
#line 133 "/home/jens/Source/shotwell/src/Commands.vala"
	g_return_val_if_fail (IS_PROXYABLE (proxyable), NULL);
#line 133 "/home/jens/Source/shotwell/src/Commands.vala"
	g_return_val_if_fail (name != NULL, NULL);
#line 133 "/home/jens/Source/shotwell/src/Commands.vala"
	g_return_val_if_fail (explanation != NULL, NULL);
#line 134 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp0_ = name;
#line 134 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp1_ = explanation;
#line 134 "/home/jens/Source/shotwell/src/Commands.vala"
	self = (SimpleProxyableCommand*) page_command_construct (object_type, _tmp0_, _tmp1_);
#line 136 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp2_ = proxyable;
#line 136 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp3_ = proxyable_get_proxy (_tmp2_);
#line 136 "/home/jens/Source/shotwell/src/Commands.vala"
	_source_proxy_unref0 (self->priv->proxy);
#line 136 "/home/jens/Source/shotwell/src/Commands.vala"
	self->priv->proxy = _tmp3_;
#line 137 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp4_ = self->priv->proxy;
#line 137 "/home/jens/Source/shotwell/src/Commands.vala"
	g_signal_connect_object (_tmp4_, "broken", (GCallback) _simple_proxyable_command_on_proxy_broken_source_proxy_broken, self, 0);
#line 133 "/home/jens/Source/shotwell/src/Commands.vala"
	return self;
#line 3465 "Commands.c"
}


static void simple_proxyable_command_real_execute (Command* base) {
	SimpleProxyableCommand * self;
	SourceProxy* _tmp0_;
	DataSource* _tmp1_;
	DataSource* _tmp2_;
#line 145 "/home/jens/Source/shotwell/src/Commands.vala"
	self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_SIMPLE_PROXYABLE_COMMAND, SimpleProxyableCommand);
#line 146 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp0_ = self->priv->proxy;
#line 146 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp1_ = source_proxy_get_source (_tmp0_);
#line 146 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp2_ = _tmp1_;
#line 146 "/home/jens/Source/shotwell/src/Commands.vala"
	simple_proxyable_command_execute_on_source (self, _tmp2_);
#line 146 "/home/jens/Source/shotwell/src/Commands.vala"
	_g_object_unref0 (_tmp2_);
#line 3486 "Commands.c"
}


static void simple_proxyable_command_real_execute_on_source (SimpleProxyableCommand* self, DataSource* source) {
#line 149 "/home/jens/Source/shotwell/src/Commands.vala"
	g_critical ("Type `%s' does not implement abstract method `simple_proxyable_command_execute_on_source'", g_type_name (G_TYPE_FROM_INSTANCE (self)));
#line 149 "/home/jens/Source/shotwell/src/Commands.vala"
	return;
#line 3495 "Commands.c"
}


void simple_proxyable_command_execute_on_source (SimpleProxyableCommand* self, DataSource* source) {
#line 149 "/home/jens/Source/shotwell/src/Commands.vala"
	g_return_if_fail (IS_SIMPLE_PROXYABLE_COMMAND (self));
#line 149 "/home/jens/Source/shotwell/src/Commands.vala"
	SIMPLE_PROXYABLE_COMMAND_GET_CLASS (self)->execute_on_source (self, source);
#line 3504 "Commands.c"
}


static void simple_proxyable_command_real_undo (Command* base) {
	SimpleProxyableCommand * self;
	SourceProxy* _tmp0_;
	DataSource* _tmp1_;
	DataSource* _tmp2_;
#line 151 "/home/jens/Source/shotwell/src/Commands.vala"
	self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_SIMPLE_PROXYABLE_COMMAND, SimpleProxyableCommand);
#line 152 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp0_ = self->priv->proxy;
#line 152 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp1_ = source_proxy_get_source (_tmp0_);
#line 152 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp2_ = _tmp1_;
#line 152 "/home/jens/Source/shotwell/src/Commands.vala"
	simple_proxyable_command_undo_on_source (self, _tmp2_);
#line 152 "/home/jens/Source/shotwell/src/Commands.vala"
	_g_object_unref0 (_tmp2_);
#line 3525 "Commands.c"
}


static void simple_proxyable_command_real_undo_on_source (SimpleProxyableCommand* self, DataSource* source) {
#line 155 "/home/jens/Source/shotwell/src/Commands.vala"
	g_critical ("Type `%s' does not implement abstract method `simple_proxyable_command_undo_on_source'", g_type_name (G_TYPE_FROM_INSTANCE (self)));
#line 155 "/home/jens/Source/shotwell/src/Commands.vala"
	return;
#line 3534 "Commands.c"
}


void simple_proxyable_command_undo_on_source (SimpleProxyableCommand* self, DataSource* source) {
#line 155 "/home/jens/Source/shotwell/src/Commands.vala"
	g_return_if_fail (IS_SIMPLE_PROXYABLE_COMMAND (self));
#line 155 "/home/jens/Source/shotwell/src/Commands.vala"
	SIMPLE_PROXYABLE_COMMAND_GET_CLASS (self)->undo_on_source (self, source);
#line 3543 "Commands.c"
}


void simple_proxyable_command_add_proxyables (SimpleProxyableCommand* self, GeeCollection* proxyables) {
#line 161 "/home/jens/Source/shotwell/src/Commands.vala"
	g_return_if_fail (IS_SIMPLE_PROXYABLE_COMMAND (self));
#line 161 "/home/jens/Source/shotwell/src/Commands.vala"
	g_return_if_fail (GEE_IS_COLLECTION (proxyables));
#line 3552 "Commands.c"
	{
		GeeIterator* _proxyable_it = NULL;
		GeeCollection* _tmp0_;
		GeeIterator* _tmp1_;
#line 162 "/home/jens/Source/shotwell/src/Commands.vala"
		_tmp0_ = proxyables;
#line 162 "/home/jens/Source/shotwell/src/Commands.vala"
		_tmp1_ = gee_iterable_iterator (G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, GEE_TYPE_ITERABLE, GeeIterable));
#line 162 "/home/jens/Source/shotwell/src/Commands.vala"
		_proxyable_it = _tmp1_;
#line 162 "/home/jens/Source/shotwell/src/Commands.vala"
		while (TRUE) {
#line 3565 "Commands.c"
			GeeIterator* _tmp2_;
			gboolean _tmp3_;
			Proxyable* proxyable = NULL;
			GeeIterator* _tmp4_;
			gpointer _tmp5_;
			SourceProxy* added_proxy = NULL;
			Proxyable* _tmp6_;
			SourceProxy* _tmp7_;
			SourceProxy* _tmp8_;
			GeeHashSet* _tmp9_;
			SourceProxy* _tmp10_;
#line 162 "/home/jens/Source/shotwell/src/Commands.vala"
			_tmp2_ = _proxyable_it;
#line 162 "/home/jens/Source/shotwell/src/Commands.vala"
			_tmp3_ = gee_iterator_next (_tmp2_);
#line 162 "/home/jens/Source/shotwell/src/Commands.vala"
			if (!_tmp3_) {
#line 162 "/home/jens/Source/shotwell/src/Commands.vala"
				break;
#line 3585 "Commands.c"
			}
#line 162 "/home/jens/Source/shotwell/src/Commands.vala"
			_tmp4_ = _proxyable_it;
#line 162 "/home/jens/Source/shotwell/src/Commands.vala"
			_tmp5_ = gee_iterator_get (_tmp4_);
#line 162 "/home/jens/Source/shotwell/src/Commands.vala"
			proxyable = (Proxyable*) _tmp5_;
#line 163 "/home/jens/Source/shotwell/src/Commands.vala"
			_tmp6_ = proxyable;
#line 163 "/home/jens/Source/shotwell/src/Commands.vala"
			_tmp7_ = proxyable_get_proxy (_tmp6_);
#line 163 "/home/jens/Source/shotwell/src/Commands.vala"
			added_proxy = _tmp7_;
#line 164 "/home/jens/Source/shotwell/src/Commands.vala"
			_tmp8_ = added_proxy;
#line 164 "/home/jens/Source/shotwell/src/Commands.vala"
			g_signal_connect_object (_tmp8_, "broken", (GCallback) _simple_proxyable_command_on_proxy_broken_source_proxy_broken, self, 0);
#line 165 "/home/jens/Source/shotwell/src/Commands.vala"
			_tmp9_ = self->priv->proxies;
#line 165 "/home/jens/Source/shotwell/src/Commands.vala"
			_tmp10_ = added_proxy;
#line 165 "/home/jens/Source/shotwell/src/Commands.vala"
			gee_abstract_collection_add (G_TYPE_CHECK_INSTANCE_CAST (_tmp9_, GEE_TYPE_ABSTRACT_COLLECTION, GeeAbstractCollection), _tmp10_);
#line 162 "/home/jens/Source/shotwell/src/Commands.vala"
			_source_proxy_unref0 (added_proxy);
#line 162 "/home/jens/Source/shotwell/src/Commands.vala"
			_g_object_unref0 (proxyable);
#line 3613 "Commands.c"
		}
#line 162 "/home/jens/Source/shotwell/src/Commands.vala"
		_g_object_unref0 (_proxyable_it);
#line 3617 "Commands.c"
	}
}


void simple_proxyable_command_clear_added_proxies (SimpleProxyableCommand* self) {
	GeeHashSet* _tmp8_;
#line 170 "/home/jens/Source/shotwell/src/Commands.vala"
	g_return_if_fail (IS_SIMPLE_PROXYABLE_COMMAND (self));
#line 3626 "Commands.c"
	{
		GeeIterator* _added_proxy_it = NULL;
		GeeHashSet* _tmp0_;
		GeeIterator* _tmp1_;
#line 171 "/home/jens/Source/shotwell/src/Commands.vala"
		_tmp0_ = self->priv->proxies;
#line 171 "/home/jens/Source/shotwell/src/Commands.vala"
		_tmp1_ = gee_abstract_collection_iterator (G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, GEE_TYPE_ABSTRACT_COLLECTION, GeeAbstractCollection));
#line 171 "/home/jens/Source/shotwell/src/Commands.vala"
		_added_proxy_it = _tmp1_;
#line 171 "/home/jens/Source/shotwell/src/Commands.vala"
		while (TRUE) {
#line 3639 "Commands.c"
			GeeIterator* _tmp2_;
			gboolean _tmp3_;
			SourceProxy* added_proxy = NULL;
			GeeIterator* _tmp4_;
			gpointer _tmp5_;
			SourceProxy* _tmp6_;
			guint _tmp7_;
#line 171 "/home/jens/Source/shotwell/src/Commands.vala"
			_tmp2_ = _added_proxy_it;
#line 171 "/home/jens/Source/shotwell/src/Commands.vala"
			_tmp3_ = gee_iterator_next (_tmp2_);
#line 171 "/home/jens/Source/shotwell/src/Commands.vala"
			if (!_tmp3_) {
#line 171 "/home/jens/Source/shotwell/src/Commands.vala"
				break;
#line 3655 "Commands.c"
			}
#line 171 "/home/jens/Source/shotwell/src/Commands.vala"
			_tmp4_ = _added_proxy_it;
#line 171 "/home/jens/Source/shotwell/src/Commands.vala"
			_tmp5_ = gee_iterator_get (_tmp4_);
#line 171 "/home/jens/Source/shotwell/src/Commands.vala"
			added_proxy = (SourceProxy*) _tmp5_;
#line 172 "/home/jens/Source/shotwell/src/Commands.vala"
			_tmp6_ = added_proxy;
#line 172 "/home/jens/Source/shotwell/src/Commands.vala"
			g_signal_parse_name ("broken", TYPE_SOURCE_PROXY, &_tmp7_, NULL, FALSE);
#line 172 "/home/jens/Source/shotwell/src/Commands.vala"
			g_signal_handlers_disconnect_matched (_tmp6_, G_SIGNAL_MATCH_ID | G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA, _tmp7_, 0, NULL, (GCallback) _simple_proxyable_command_on_proxy_broken_source_proxy_broken, self);
#line 171 "/home/jens/Source/shotwell/src/Commands.vala"
			_source_proxy_unref0 (added_proxy);
#line 3671 "Commands.c"
		}
#line 171 "/home/jens/Source/shotwell/src/Commands.vala"
		_g_object_unref0 (_added_proxy_it);
#line 3675 "Commands.c"
	}
#line 174 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp8_ = self->priv->proxies;
#line 174 "/home/jens/Source/shotwell/src/Commands.vala"
	gee_abstract_collection_clear (G_TYPE_CHECK_INSTANCE_CAST (_tmp8_, GEE_TYPE_ABSTRACT_COLLECTION, GeeAbstractCollection));
#line 3681 "Commands.c"
}


static void simple_proxyable_command_on_proxy_broken (SimpleProxyableCommand* self) {
	CommandManager* _tmp0_;
	CommandManager* _tmp1_;
#line 177 "/home/jens/Source/shotwell/src/Commands.vala"
	g_return_if_fail (IS_SIMPLE_PROXYABLE_COMMAND (self));
#line 178 "/home/jens/Source/shotwell/src/Commands.vala"
	g_debug ("Commands.vala:178: on_proxy_broken");
#line 179 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp0_ = command_get_command_manager (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_COMMAND, Command));
#line 179 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp1_ = _tmp0_;
#line 179 "/home/jens/Source/shotwell/src/Commands.vala"
	command_manager_reset (_tmp1_);
#line 179 "/home/jens/Source/shotwell/src/Commands.vala"
	_command_manager_unref0 (_tmp1_);
#line 3700 "Commands.c"
}


static void simple_proxyable_command_class_init (SimpleProxyableCommandClass * klass) {
#line 129 "/home/jens/Source/shotwell/src/Commands.vala"
	simple_proxyable_command_parent_class = g_type_class_peek_parent (klass);
#line 129 "/home/jens/Source/shotwell/src/Commands.vala"
	g_type_class_add_private (klass, sizeof (SimpleProxyableCommandPrivate));
#line 129 "/home/jens/Source/shotwell/src/Commands.vala"
	((CommandClass *) klass)->execute = (void (*) (Command *)) simple_proxyable_command_real_execute;
#line 129 "/home/jens/Source/shotwell/src/Commands.vala"
	((SimpleProxyableCommandClass *) klass)->execute_on_source = (void (*) (SimpleProxyableCommand *, DataSource*)) simple_proxyable_command_real_execute_on_source;
#line 129 "/home/jens/Source/shotwell/src/Commands.vala"
	((CommandClass *) klass)->undo = (void (*) (Command *)) simple_proxyable_command_real_undo;
#line 129 "/home/jens/Source/shotwell/src/Commands.vala"
	((SimpleProxyableCommandClass *) klass)->undo_on_source = (void (*) (SimpleProxyableCommand *, DataSource*)) simple_proxyable_command_real_undo_on_source;
#line 129 "/home/jens/Source/shotwell/src/Commands.vala"
	G_OBJECT_CLASS (klass)->finalize = simple_proxyable_command_finalize;
#line 3719 "Commands.c"
}


static void simple_proxyable_command_instance_init (SimpleProxyableCommand * self) {
	GeeHashSet* _tmp0_;
#line 129 "/home/jens/Source/shotwell/src/Commands.vala"
	self->priv = SIMPLE_PROXYABLE_COMMAND_GET_PRIVATE (self);
#line 131 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp0_ = gee_hash_set_new (TYPE_SOURCE_PROXY, (GBoxedCopyFunc) source_proxy_ref, (GDestroyNotify) source_proxy_unref, NULL, NULL, NULL, NULL, NULL, NULL);
#line 131 "/home/jens/Source/shotwell/src/Commands.vala"
	self->priv->proxies = _tmp0_;
#line 3731 "Commands.c"
}


static void simple_proxyable_command_finalize (GObject * obj) {
	SimpleProxyableCommand * self;
	SourceProxy* _tmp0_;
	guint _tmp1_;
#line 129 "/home/jens/Source/shotwell/src/Commands.vala"
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, TYPE_SIMPLE_PROXYABLE_COMMAND, SimpleProxyableCommand);
#line 141 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp0_ = self->priv->proxy;
#line 141 "/home/jens/Source/shotwell/src/Commands.vala"
	g_signal_parse_name ("broken", TYPE_SOURCE_PROXY, &_tmp1_, NULL, FALSE);
#line 141 "/home/jens/Source/shotwell/src/Commands.vala"
	g_signal_handlers_disconnect_matched (_tmp0_, G_SIGNAL_MATCH_ID | G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA, _tmp1_, 0, NULL, (GCallback) _simple_proxyable_command_on_proxy_broken_source_proxy_broken, self);
#line 142 "/home/jens/Source/shotwell/src/Commands.vala"
	simple_proxyable_command_clear_added_proxies (self);
#line 130 "/home/jens/Source/shotwell/src/Commands.vala"
	_source_proxy_unref0 (self->priv->proxy);
#line 131 "/home/jens/Source/shotwell/src/Commands.vala"
	_g_object_unref0 (self->priv->proxies);
#line 129 "/home/jens/Source/shotwell/src/Commands.vala"
	G_OBJECT_CLASS (simple_proxyable_command_parent_class)->finalize (obj);
#line 3755 "Commands.c"
}


GType simple_proxyable_command_get_type (void) {
	static volatile gsize simple_proxyable_command_type_id__volatile = 0;
	if (g_once_init_enter (&simple_proxyable_command_type_id__volatile)) {
		static const GTypeInfo g_define_type_info = { sizeof (SimpleProxyableCommandClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) simple_proxyable_command_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (SimpleProxyableCommand), 0, (GInstanceInitFunc) simple_proxyable_command_instance_init, NULL };
		GType simple_proxyable_command_type_id;
		simple_proxyable_command_type_id = g_type_register_static (TYPE_PAGE_COMMAND, "SimpleProxyableCommand", &g_define_type_info, G_TYPE_FLAG_ABSTRACT);
		g_once_init_leave (&simple_proxyable_command_type_id__volatile, simple_proxyable_command_type_id);
	}
	return simple_proxyable_command_type_id__volatile;
}


static void _single_photo_transformation_command_on_state_broken_photo_transformation_state_broken (PhotoTransformationState* _sender, gpointer self) {
#line 194 "/home/jens/Source/shotwell/src/Commands.vala"
	single_photo_transformation_command_on_state_broken ((SinglePhotoTransformationCommand*) self);
#line 3774 "Commands.c"
}


SinglePhotoTransformationCommand* single_photo_transformation_command_construct (GType object_type, Photo* photo, const gchar* name, const gchar* explanation) {
	SinglePhotoTransformationCommand * self = NULL;
	Photo* _tmp0_;
	const gchar* _tmp1_;
	const gchar* _tmp2_;
	Photo* _tmp3_;
	PhotoTransformationState* _tmp4_;
	PhotoTransformationState* _tmp5_;
#line 186 "/home/jens/Source/shotwell/src/Commands.vala"
	g_return_val_if_fail (IS_PHOTO (photo), NULL);
#line 186 "/home/jens/Source/shotwell/src/Commands.vala"
	g_return_val_if_fail (name != NULL, NULL);
#line 186 "/home/jens/Source/shotwell/src/Commands.vala"
	g_return_val_if_fail (explanation != NULL, NULL);
#line 187 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp0_ = photo;
#line 187 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp1_ = name;
#line 187 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp2_ = explanation;
#line 187 "/home/jens/Source/shotwell/src/Commands.vala"
	self = (SinglePhotoTransformationCommand*) single_data_source_command_construct (object_type, G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, TYPE_DATA_SOURCE, DataSource), _tmp1_, _tmp2_);
#line 189 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp3_ = photo;
#line 189 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp4_ = photo_save_transformation_state (_tmp3_);
#line 189 "/home/jens/Source/shotwell/src/Commands.vala"
	_g_object_unref0 (self->priv->state);
#line 189 "/home/jens/Source/shotwell/src/Commands.vala"
	self->priv->state = _tmp4_;
#line 190 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp5_ = self->priv->state;
#line 190 "/home/jens/Source/shotwell/src/Commands.vala"
	g_signal_connect_object (_tmp5_, "broken", (GCallback) _single_photo_transformation_command_on_state_broken_photo_transformation_state_broken, self, 0);
#line 186 "/home/jens/Source/shotwell/src/Commands.vala"
	return self;
#line 3814 "Commands.c"
}


static void single_photo_transformation_command_real_undo (Command* base) {
	SinglePhotoTransformationCommand * self;
	DataSource* _tmp0_;
	PhotoTransformationState* _tmp1_;
#line 197 "/home/jens/Source/shotwell/src/Commands.vala"
	self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_SINGLE_PHOTO_TRANSFORMATION_COMMAND, SinglePhotoTransformationCommand);
#line 198 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp0_ = G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_SINGLE_DATA_SOURCE_COMMAND, SingleDataSourceCommand)->source;
#line 198 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp1_ = self->priv->state;
#line 198 "/home/jens/Source/shotwell/src/Commands.vala"
	photo_load_transformation_state (G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, TYPE_PHOTO, Photo), _tmp1_);
#line 3830 "Commands.c"
}


static void single_photo_transformation_command_on_state_broken (SinglePhotoTransformationCommand* self) {
	CommandManager* _tmp0_;
	CommandManager* _tmp1_;
#line 201 "/home/jens/Source/shotwell/src/Commands.vala"
	g_return_if_fail (IS_SINGLE_PHOTO_TRANSFORMATION_COMMAND (self));
#line 202 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp0_ = command_get_command_manager (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_COMMAND, Command));
#line 202 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp1_ = _tmp0_;
#line 202 "/home/jens/Source/shotwell/src/Commands.vala"
	command_manager_reset (_tmp1_);
#line 202 "/home/jens/Source/shotwell/src/Commands.vala"
	_command_manager_unref0 (_tmp1_);
#line 3847 "Commands.c"
}


static void single_photo_transformation_command_class_init (SinglePhotoTransformationCommandClass * klass) {
#line 183 "/home/jens/Source/shotwell/src/Commands.vala"
	single_photo_transformation_command_parent_class = g_type_class_peek_parent (klass);
#line 183 "/home/jens/Source/shotwell/src/Commands.vala"
	g_type_class_add_private (klass, sizeof (SinglePhotoTransformationCommandPrivate));
#line 183 "/home/jens/Source/shotwell/src/Commands.vala"
	((CommandClass *) klass)->undo = (void (*) (Command *)) single_photo_transformation_command_real_undo;
#line 183 "/home/jens/Source/shotwell/src/Commands.vala"
	G_OBJECT_CLASS (klass)->finalize = single_photo_transformation_command_finalize;
#line 3860 "Commands.c"
}


static void single_photo_transformation_command_instance_init (SinglePhotoTransformationCommand * self) {
#line 183 "/home/jens/Source/shotwell/src/Commands.vala"
	self->priv = SINGLE_PHOTO_TRANSFORMATION_COMMAND_GET_PRIVATE (self);
#line 3867 "Commands.c"
}


static void single_photo_transformation_command_finalize (GObject * obj) {
	SinglePhotoTransformationCommand * self;
	PhotoTransformationState* _tmp0_;
	guint _tmp1_;
#line 183 "/home/jens/Source/shotwell/src/Commands.vala"
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, TYPE_SINGLE_PHOTO_TRANSFORMATION_COMMAND, SinglePhotoTransformationCommand);
#line 194 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp0_ = self->priv->state;
#line 194 "/home/jens/Source/shotwell/src/Commands.vala"
	g_signal_parse_name ("broken", TYPE_PHOTO_TRANSFORMATION_STATE, &_tmp1_, NULL, FALSE);
#line 194 "/home/jens/Source/shotwell/src/Commands.vala"
	g_signal_handlers_disconnect_matched (_tmp0_, G_SIGNAL_MATCH_ID | G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA, _tmp1_, 0, NULL, (GCallback) _single_photo_transformation_command_on_state_broken_photo_transformation_state_broken, self);
#line 184 "/home/jens/Source/shotwell/src/Commands.vala"
	_g_object_unref0 (self->priv->state);
#line 183 "/home/jens/Source/shotwell/src/Commands.vala"
	G_OBJECT_CLASS (single_photo_transformation_command_parent_class)->finalize (obj);
#line 3887 "Commands.c"
}


GType single_photo_transformation_command_get_type (void) {
	static volatile gsize single_photo_transformation_command_type_id__volatile = 0;
	if (g_once_init_enter (&single_photo_transformation_command_type_id__volatile)) {
		static const GTypeInfo g_define_type_info = { sizeof (SinglePhotoTransformationCommandClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) single_photo_transformation_command_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (SinglePhotoTransformationCommand), 0, (GInstanceInitFunc) single_photo_transformation_command_instance_init, NULL };
		GType single_photo_transformation_command_type_id;
		single_photo_transformation_command_type_id = g_type_register_static (TYPE_SINGLE_DATA_SOURCE_COMMAND, "SinglePhotoTransformationCommand", &g_define_type_info, G_TYPE_FLAG_ABSTRACT);
		g_once_init_leave (&single_photo_transformation_command_type_id__volatile, single_photo_transformation_command_type_id);
	}
	return single_photo_transformation_command_type_id__volatile;
}


static void _generic_photo_transformation_command_on_state_broken_photo_transformation_state_broken (PhotoTransformationState* _sender, gpointer self) {
#line 216 "/home/jens/Source/shotwell/src/Commands.vala"
	generic_photo_transformation_command_on_state_broken ((GenericPhotoTransformationCommand*) self);
#line 3906 "Commands.c"
}


GenericPhotoTransformationCommand* generic_photo_transformation_command_construct (GType object_type, Photo* photo, const gchar* name, const gchar* explanation) {
	GenericPhotoTransformationCommand * self = NULL;
	Photo* _tmp0_;
	const gchar* _tmp1_;
	const gchar* _tmp2_;
#line 210 "/home/jens/Source/shotwell/src/Commands.vala"
	g_return_val_if_fail (IS_PHOTO (photo), NULL);
#line 210 "/home/jens/Source/shotwell/src/Commands.vala"
	g_return_val_if_fail (name != NULL, NULL);
#line 210 "/home/jens/Source/shotwell/src/Commands.vala"
	g_return_val_if_fail (explanation != NULL, NULL);
#line 211 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp0_ = photo;
#line 211 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp1_ = name;
#line 211 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp2_ = explanation;
#line 211 "/home/jens/Source/shotwell/src/Commands.vala"
	self = (GenericPhotoTransformationCommand*) single_data_source_command_construct (object_type, G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, TYPE_DATA_SOURCE, DataSource), _tmp1_, _tmp2_);
#line 210 "/home/jens/Source/shotwell/src/Commands.vala"
	return self;
#line 3931 "Commands.c"
}


static void generic_photo_transformation_command_real_execute (Command* base) {
	GenericPhotoTransformationCommand * self;
	Photo* photo = NULL;
	DataSource* _tmp0_;
	Photo* _tmp1_;
	PhotoTransformationState* _tmp2_;
	PhotoTransformationState* _tmp3_;
	PhotoTransformationState* _tmp4_;
	PhotoTransformationState* _tmp5_;
#line 222 "/home/jens/Source/shotwell/src/Commands.vala"
	self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_GENERIC_PHOTO_TRANSFORMATION_COMMAND, GenericPhotoTransformationCommand);
#line 223 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp0_ = G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_SINGLE_DATA_SOURCE_COMMAND, SingleDataSourceCommand)->source;
#line 223 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp1_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, TYPE_PHOTO, Photo));
#line 223 "/home/jens/Source/shotwell/src/Commands.vala"
	photo = _tmp1_;
#line 225 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp2_ = photo_save_transformation_state (photo);
#line 225 "/home/jens/Source/shotwell/src/Commands.vala"
	_g_object_unref0 (self->priv->original_state);
#line 225 "/home/jens/Source/shotwell/src/Commands.vala"
	self->priv->original_state = _tmp2_;
#line 226 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp3_ = self->priv->original_state;
#line 226 "/home/jens/Source/shotwell/src/Commands.vala"
	g_signal_connect_object (_tmp3_, "broken", (GCallback) _generic_photo_transformation_command_on_state_broken_photo_transformation_state_broken, self, 0);
#line 228 "/home/jens/Source/shotwell/src/Commands.vala"
	generic_photo_transformation_command_execute_on_photo (self, photo);
#line 230 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp4_ = photo_save_transformation_state (photo);
#line 230 "/home/jens/Source/shotwell/src/Commands.vala"
	_g_object_unref0 (self->priv->transformed_state);
#line 230 "/home/jens/Source/shotwell/src/Commands.vala"
	self->priv->transformed_state = _tmp4_;
#line 231 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp5_ = self->priv->transformed_state;
#line 231 "/home/jens/Source/shotwell/src/Commands.vala"
	g_signal_connect_object (_tmp5_, "broken", (GCallback) _generic_photo_transformation_command_on_state_broken_photo_transformation_state_broken, self, 0);
#line 222 "/home/jens/Source/shotwell/src/Commands.vala"
	_g_object_unref0 (photo);
#line 3976 "Commands.c"
}


static void generic_photo_transformation_command_real_execute_on_photo (GenericPhotoTransformationCommand* self, Photo* photo) {
#line 234 "/home/jens/Source/shotwell/src/Commands.vala"
	g_critical ("Type `%s' does not implement abstract method `generic_photo_transformation_command_execute_on_photo'", g_type_name (G_TYPE_FROM_INSTANCE (self)));
#line 234 "/home/jens/Source/shotwell/src/Commands.vala"
	return;
#line 3985 "Commands.c"
}


void generic_photo_transformation_command_execute_on_photo (GenericPhotoTransformationCommand* self, Photo* photo) {
#line 234 "/home/jens/Source/shotwell/src/Commands.vala"
	g_return_if_fail (IS_GENERIC_PHOTO_TRANSFORMATION_COMMAND (self));
#line 234 "/home/jens/Source/shotwell/src/Commands.vala"
	GENERIC_PHOTO_TRANSFORMATION_COMMAND_GET_CLASS (self)->execute_on_photo (self, photo);
#line 3994 "Commands.c"
}


static void generic_photo_transformation_command_real_undo (Command* base) {
	GenericPhotoTransformationCommand * self;
	DataSource* _tmp0_;
	PhotoTransformationState* _tmp1_;
#line 236 "/home/jens/Source/shotwell/src/Commands.vala"
	self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_GENERIC_PHOTO_TRANSFORMATION_COMMAND, GenericPhotoTransformationCommand);
#line 238 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp0_ = G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_SINGLE_DATA_SOURCE_COMMAND, SingleDataSourceCommand)->source;
#line 238 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp1_ = self->priv->original_state;
#line 238 "/home/jens/Source/shotwell/src/Commands.vala"
	photo_load_transformation_state (G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, TYPE_PHOTO, Photo), _tmp1_);
#line 4010 "Commands.c"
}


static void generic_photo_transformation_command_real_redo (Command* base) {
	GenericPhotoTransformationCommand * self;
	DataSource* _tmp0_;
	PhotoTransformationState* _tmp1_;
#line 241 "/home/jens/Source/shotwell/src/Commands.vala"
	self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_GENERIC_PHOTO_TRANSFORMATION_COMMAND, GenericPhotoTransformationCommand);
#line 243 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp0_ = G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_SINGLE_DATA_SOURCE_COMMAND, SingleDataSourceCommand)->source;
#line 243 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp1_ = self->priv->transformed_state;
#line 243 "/home/jens/Source/shotwell/src/Commands.vala"
	photo_load_transformation_state (G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, TYPE_PHOTO, Photo), _tmp1_);
#line 4026 "Commands.c"
}


static gboolean generic_photo_transformation_command_real_can_compress (GenericPhotoTransformationCommand* self, Command* command) {
	gboolean result = FALSE;
#line 246 "/home/jens/Source/shotwell/src/Commands.vala"
	g_return_val_if_fail (IS_COMMAND (command), FALSE);
#line 247 "/home/jens/Source/shotwell/src/Commands.vala"
	result = FALSE;
#line 247 "/home/jens/Source/shotwell/src/Commands.vala"
	return result;
#line 4038 "Commands.c"
}


gboolean generic_photo_transformation_command_can_compress (GenericPhotoTransformationCommand* self, Command* command) {
#line 246 "/home/jens/Source/shotwell/src/Commands.vala"
	g_return_val_if_fail (IS_GENERIC_PHOTO_TRANSFORMATION_COMMAND (self), FALSE);
#line 246 "/home/jens/Source/shotwell/src/Commands.vala"
	return GENERIC_PHOTO_TRANSFORMATION_COMMAND_GET_CLASS (self)->can_compress (self, command);
#line 4047 "Commands.c"
}


static gboolean generic_photo_transformation_command_real_compress (Command* base, Command* command) {
	GenericPhotoTransformationCommand * self;
	gboolean result = FALSE;
	Command* _tmp0_;
	gboolean _tmp1_;
	GenericPhotoTransformationCommand* generic = NULL;
	Command* _tmp2_;
	GenericPhotoTransformationCommand* _tmp3_;
	GenericPhotoTransformationCommand* _tmp4_;
	GenericPhotoTransformationCommand* _tmp5_;
	DataSource* _tmp6_;
	DataSource* _tmp7_;
	GenericPhotoTransformationCommand* _tmp8_;
	GenericPhotoTransformationCommand* _tmp9_;
	PhotoTransformationState* _tmp10_;
	PhotoTransformationState* _tmp11_;
#line 250 "/home/jens/Source/shotwell/src/Commands.vala"
	self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_GENERIC_PHOTO_TRANSFORMATION_COMMAND, GenericPhotoTransformationCommand);
#line 250 "/home/jens/Source/shotwell/src/Commands.vala"
	g_return_val_if_fail (IS_COMMAND (command), FALSE);
#line 251 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp0_ = command;
#line 251 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp1_ = generic_photo_transformation_command_can_compress (self, _tmp0_);
#line 251 "/home/jens/Source/shotwell/src/Commands.vala"
	if (!_tmp1_) {
#line 252 "/home/jens/Source/shotwell/src/Commands.vala"
		result = FALSE;
#line 252 "/home/jens/Source/shotwell/src/Commands.vala"
		return result;
#line 4081 "Commands.c"
	}
#line 254 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp2_ = command;
#line 254 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp3_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_TYPE (_tmp2_, TYPE_GENERIC_PHOTO_TRANSFORMATION_COMMAND) ? ((GenericPhotoTransformationCommand*) _tmp2_) : NULL);
#line 254 "/home/jens/Source/shotwell/src/Commands.vala"
	generic = _tmp3_;
#line 255 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp4_ = generic;
#line 255 "/home/jens/Source/shotwell/src/Commands.vala"
	if (_tmp4_ == NULL) {
#line 256 "/home/jens/Source/shotwell/src/Commands.vala"
		result = FALSE;
#line 256 "/home/jens/Source/shotwell/src/Commands.vala"
		_g_object_unref0 (generic);
#line 256 "/home/jens/Source/shotwell/src/Commands.vala"
		return result;
#line 4099 "Commands.c"
	}
#line 258 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp5_ = generic;
#line 258 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp6_ = G_TYPE_CHECK_INSTANCE_CAST (_tmp5_, TYPE_SINGLE_DATA_SOURCE_COMMAND, SingleDataSourceCommand)->source;
#line 258 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp7_ = G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_SINGLE_DATA_SOURCE_COMMAND, SingleDataSourceCommand)->source;
#line 258 "/home/jens/Source/shotwell/src/Commands.vala"
	if (_tmp6_ != _tmp7_) {
#line 259 "/home/jens/Source/shotwell/src/Commands.vala"
		result = FALSE;
#line 259 "/home/jens/Source/shotwell/src/Commands.vala"
		_g_object_unref0 (generic);
#line 259 "/home/jens/Source/shotwell/src/Commands.vala"
		return result;
#line 4115 "Commands.c"
	}
#line 262 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp8_ = generic;
#line 262 "/home/jens/Source/shotwell/src/Commands.vala"
	command_execute (G_TYPE_CHECK_INSTANCE_CAST (_tmp8_, TYPE_COMMAND, Command));
#line 265 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp9_ = generic;
#line 265 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp10_ = _tmp9_->priv->transformed_state;
#line 265 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp11_ = _g_object_ref0 (_tmp10_);
#line 265 "/home/jens/Source/shotwell/src/Commands.vala"
	_g_object_unref0 (self->priv->transformed_state);
#line 265 "/home/jens/Source/shotwell/src/Commands.vala"
	self->priv->transformed_state = _tmp11_;
#line 267 "/home/jens/Source/shotwell/src/Commands.vala"
	result = TRUE;
#line 267 "/home/jens/Source/shotwell/src/Commands.vala"
	_g_object_unref0 (generic);
#line 267 "/home/jens/Source/shotwell/src/Commands.vala"
	return result;
#line 4137 "Commands.c"
}


static void generic_photo_transformation_command_on_state_broken (GenericPhotoTransformationCommand* self) {
	CommandManager* _tmp0_;
	CommandManager* _tmp1_;
#line 270 "/home/jens/Source/shotwell/src/Commands.vala"
	g_return_if_fail (IS_GENERIC_PHOTO_TRANSFORMATION_COMMAND (self));
#line 271 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp0_ = command_get_command_manager (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_COMMAND, Command));
#line 271 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp1_ = _tmp0_;
#line 271 "/home/jens/Source/shotwell/src/Commands.vala"
	command_manager_reset (_tmp1_);
#line 271 "/home/jens/Source/shotwell/src/Commands.vala"
	_command_manager_unref0 (_tmp1_);
#line 4154 "Commands.c"
}


static void generic_photo_transformation_command_class_init (GenericPhotoTransformationCommandClass * klass) {
#line 206 "/home/jens/Source/shotwell/src/Commands.vala"
	generic_photo_transformation_command_parent_class = g_type_class_peek_parent (klass);
#line 206 "/home/jens/Source/shotwell/src/Commands.vala"
	g_type_class_add_private (klass, sizeof (GenericPhotoTransformationCommandPrivate));
#line 206 "/home/jens/Source/shotwell/src/Commands.vala"
	((CommandClass *) klass)->execute = (void (*) (Command *)) generic_photo_transformation_command_real_execute;
#line 206 "/home/jens/Source/shotwell/src/Commands.vala"
	((GenericPhotoTransformationCommandClass *) klass)->execute_on_photo = (void (*) (GenericPhotoTransformationCommand *, Photo*)) generic_photo_transformation_command_real_execute_on_photo;
#line 206 "/home/jens/Source/shotwell/src/Commands.vala"
	((CommandClass *) klass)->undo = (void (*) (Command *)) generic_photo_transformation_command_real_undo;
#line 206 "/home/jens/Source/shotwell/src/Commands.vala"
	((CommandClass *) klass)->redo = (void (*) (Command *)) generic_photo_transformation_command_real_redo;
#line 206 "/home/jens/Source/shotwell/src/Commands.vala"
	((GenericPhotoTransformationCommandClass *) klass)->can_compress = (gboolean (*) (GenericPhotoTransformationCommand *, Command*)) generic_photo_transformation_command_real_can_compress;
#line 206 "/home/jens/Source/shotwell/src/Commands.vala"
	((CommandClass *) klass)->compress = (gboolean (*) (Command *, Command*)) generic_photo_transformation_command_real_compress;
#line 206 "/home/jens/Source/shotwell/src/Commands.vala"
	G_OBJECT_CLASS (klass)->finalize = generic_photo_transformation_command_finalize;
#line 4177 "Commands.c"
}


static void generic_photo_transformation_command_instance_init (GenericPhotoTransformationCommand * self) {
#line 206 "/home/jens/Source/shotwell/src/Commands.vala"
	self->priv = GENERIC_PHOTO_TRANSFORMATION_COMMAND_GET_PRIVATE (self);
#line 207 "/home/jens/Source/shotwell/src/Commands.vala"
	self->priv->original_state = NULL;
#line 208 "/home/jens/Source/shotwell/src/Commands.vala"
	self->priv->transformed_state = NULL;
#line 4188 "Commands.c"
}


static void generic_photo_transformation_command_finalize (GObject * obj) {
	GenericPhotoTransformationCommand * self;
	PhotoTransformationState* _tmp0_;
	PhotoTransformationState* _tmp3_;
#line 206 "/home/jens/Source/shotwell/src/Commands.vala"
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, TYPE_GENERIC_PHOTO_TRANSFORMATION_COMMAND, GenericPhotoTransformationCommand);
#line 215 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp0_ = self->priv->original_state;
#line 215 "/home/jens/Source/shotwell/src/Commands.vala"
	if (_tmp0_ != NULL) {
#line 4202 "Commands.c"
		PhotoTransformationState* _tmp1_;
		guint _tmp2_;
#line 216 "/home/jens/Source/shotwell/src/Commands.vala"
		_tmp1_ = self->priv->original_state;
#line 216 "/home/jens/Source/shotwell/src/Commands.vala"
		g_signal_parse_name ("broken", TYPE_PHOTO_TRANSFORMATION_STATE, &_tmp2_, NULL, FALSE);
#line 216 "/home/jens/Source/shotwell/src/Commands.vala"
		g_signal_handlers_disconnect_matched (_tmp1_, G_SIGNAL_MATCH_ID | G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA, _tmp2_, 0, NULL, (GCallback) _generic_photo_transformation_command_on_state_broken_photo_transformation_state_broken, self);
#line 4211 "Commands.c"
	}
#line 218 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp3_ = self->priv->transformed_state;
#line 218 "/home/jens/Source/shotwell/src/Commands.vala"
	if (_tmp3_ != NULL) {
#line 4217 "Commands.c"
		PhotoTransformationState* _tmp4_;
		guint _tmp5_;
#line 219 "/home/jens/Source/shotwell/src/Commands.vala"
		_tmp4_ = self->priv->transformed_state;
#line 219 "/home/jens/Source/shotwell/src/Commands.vala"
		g_signal_parse_name ("broken", TYPE_PHOTO_TRANSFORMATION_STATE, &_tmp5_, NULL, FALSE);
#line 219 "/home/jens/Source/shotwell/src/Commands.vala"
		g_signal_handlers_disconnect_matched (_tmp4_, G_SIGNAL_MATCH_ID | G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA, _tmp5_, 0, NULL, (GCallback) _generic_photo_transformation_command_on_state_broken_photo_transformation_state_broken, self);
#line 4226 "Commands.c"
	}
#line 207 "/home/jens/Source/shotwell/src/Commands.vala"
	_g_object_unref0 (self->priv->original_state);
#line 208 "/home/jens/Source/shotwell/src/Commands.vala"
	_g_object_unref0 (self->priv->transformed_state);
#line 206 "/home/jens/Source/shotwell/src/Commands.vala"
	G_OBJECT_CLASS (generic_photo_transformation_command_parent_class)->finalize (obj);
#line 4234 "Commands.c"
}


GType generic_photo_transformation_command_get_type (void) {
	static volatile gsize generic_photo_transformation_command_type_id__volatile = 0;
	if (g_once_init_enter (&generic_photo_transformation_command_type_id__volatile)) {
		static const GTypeInfo g_define_type_info = { sizeof (GenericPhotoTransformationCommandClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) generic_photo_transformation_command_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (GenericPhotoTransformationCommand), 0, (GInstanceInitFunc) generic_photo_transformation_command_instance_init, NULL };
		GType generic_photo_transformation_command_type_id;
		generic_photo_transformation_command_type_id = g_type_register_static (TYPE_SINGLE_DATA_SOURCE_COMMAND, "GenericPhotoTransformationCommand", &g_define_type_info, G_TYPE_FLAG_ABSTRACT);
		g_once_init_leave (&generic_photo_transformation_command_type_id__volatile, generic_photo_transformation_command_type_id);
	}
	return generic_photo_transformation_command_type_id__volatile;
}


static void _multiple_data_source_command_on_source_destroyed_source_collection_item_destroyed (SourceCollection* _sender, DataSource* source, gpointer self) {
#line 309 "/home/jens/Source/shotwell/src/Commands.vala"
	multiple_data_source_command_on_source_destroyed ((MultipleDataSourceCommand*) self, source);
#line 4253 "Commands.c"
}


MultipleDataSourceCommand* multiple_data_source_command_construct (GType object_type, GeeIterable* iter, const gchar* progress_text, const gchar* undo_progress_text, const gchar* name, const gchar* explanation) {
	MultipleDataSourceCommand * self = NULL;
	const gchar* _tmp0_;
	const gchar* _tmp1_;
	const gchar* _tmp2_;
	gchar* _tmp3_;
	const gchar* _tmp4_;
	gchar* _tmp5_;
#line 285 "/home/jens/Source/shotwell/src/Commands.vala"
	g_return_val_if_fail (GEE_IS_ITERABLE (iter), NULL);
#line 285 "/home/jens/Source/shotwell/src/Commands.vala"
	g_return_val_if_fail (progress_text != NULL, NULL);
#line 285 "/home/jens/Source/shotwell/src/Commands.vala"
	g_return_val_if_fail (undo_progress_text != NULL, NULL);
#line 285 "/home/jens/Source/shotwell/src/Commands.vala"
	g_return_val_if_fail (name != NULL, NULL);
#line 285 "/home/jens/Source/shotwell/src/Commands.vala"
	g_return_val_if_fail (explanation != NULL, NULL);
#line 287 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp0_ = name;
#line 287 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp1_ = explanation;
#line 287 "/home/jens/Source/shotwell/src/Commands.vala"
	self = (MultipleDataSourceCommand*) page_command_construct (object_type, _tmp0_, _tmp1_);
#line 289 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp2_ = progress_text;
#line 289 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp3_ = g_strdup (_tmp2_);
#line 289 "/home/jens/Source/shotwell/src/Commands.vala"
	_g_free0 (self->priv->progress_text);
#line 289 "/home/jens/Source/shotwell/src/Commands.vala"
	self->priv->progress_text = _tmp3_;
#line 290 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp4_ = undo_progress_text;
#line 290 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp5_ = g_strdup (_tmp4_);
#line 290 "/home/jens/Source/shotwell/src/Commands.vala"
	_g_free0 (self->priv->undo_progress_text);
#line 290 "/home/jens/Source/shotwell/src/Commands.vala"
	self->priv->undo_progress_text = _tmp5_;
#line 4297 "Commands.c"
	{
		GeeIterator* _view_it = NULL;
		GeeIterable* _tmp6_;
		GeeIterator* _tmp7_;
#line 292 "/home/jens/Source/shotwell/src/Commands.vala"
		_tmp6_ = iter;
#line 292 "/home/jens/Source/shotwell/src/Commands.vala"
		_tmp7_ = gee_iterable_iterator (_tmp6_);
#line 292 "/home/jens/Source/shotwell/src/Commands.vala"
		_view_it = _tmp7_;
#line 292 "/home/jens/Source/shotwell/src/Commands.vala"
		while (TRUE) {
#line 4310 "Commands.c"
			GeeIterator* _tmp8_;
			gboolean _tmp9_;
			DataView* view = NULL;
			GeeIterator* _tmp10_;
			gpointer _tmp11_;
			DataSource* source = NULL;
			DataView* _tmp12_;
			DataSource* _tmp13_;
			SourceCollection* collection = NULL;
			DataSource* _tmp14_;
			DataCollection* _tmp15_;
			SourceCollection* _tmp16_;
			GeeArrayList* _tmp19_;
			DataSource* _tmp20_;
#line 292 "/home/jens/Source/shotwell/src/Commands.vala"
			_tmp8_ = _view_it;
#line 292 "/home/jens/Source/shotwell/src/Commands.vala"
			_tmp9_ = gee_iterator_next (_tmp8_);
#line 292 "/home/jens/Source/shotwell/src/Commands.vala"
			if (!_tmp9_) {
#line 292 "/home/jens/Source/shotwell/src/Commands.vala"
				break;
#line 4333 "Commands.c"
			}
#line 292 "/home/jens/Source/shotwell/src/Commands.vala"
			_tmp10_ = _view_it;
#line 292 "/home/jens/Source/shotwell/src/Commands.vala"
			_tmp11_ = gee_iterator_get (_tmp10_);
#line 292 "/home/jens/Source/shotwell/src/Commands.vala"
			view = (DataView*) _tmp11_;
#line 293 "/home/jens/Source/shotwell/src/Commands.vala"
			_tmp12_ = view;
#line 293 "/home/jens/Source/shotwell/src/Commands.vala"
			_tmp13_ = data_view_get_source (_tmp12_);
#line 293 "/home/jens/Source/shotwell/src/Commands.vala"
			source = _tmp13_;
#line 294 "/home/jens/Source/shotwell/src/Commands.vala"
			_tmp14_ = source;
#line 294 "/home/jens/Source/shotwell/src/Commands.vala"
			_tmp15_ = data_object_get_membership (G_TYPE_CHECK_INSTANCE_CAST (_tmp14_, TYPE_DATA_OBJECT, DataObject));
#line 294 "/home/jens/Source/shotwell/src/Commands.vala"
			collection = G_TYPE_CHECK_INSTANCE_CAST (_tmp15_, TYPE_SOURCE_COLLECTION, SourceCollection);
#line 296 "/home/jens/Source/shotwell/src/Commands.vala"
			_tmp16_ = collection;
#line 296 "/home/jens/Source/shotwell/src/Commands.vala"
			if (_tmp16_ != NULL) {
#line 4357 "Commands.c"
				GeeHashSet* _tmp17_;
				SourceCollection* _tmp18_;
#line 297 "/home/jens/Source/shotwell/src/Commands.vala"
				_tmp17_ = self->priv->hooked_collections;
#line 297 "/home/jens/Source/shotwell/src/Commands.vala"
				_tmp18_ = collection;
#line 297 "/home/jens/Source/shotwell/src/Commands.vala"
				gee_abstract_collection_add (G_TYPE_CHECK_INSTANCE_CAST (_tmp17_, GEE_TYPE_ABSTRACT_COLLECTION, GeeAbstractCollection), _tmp18_);
#line 4366 "Commands.c"
			}
#line 299 "/home/jens/Source/shotwell/src/Commands.vala"
			_tmp19_ = self->source_list;
#line 299 "/home/jens/Source/shotwell/src/Commands.vala"
			_tmp20_ = source;
#line 299 "/home/jens/Source/shotwell/src/Commands.vala"
			gee_abstract_collection_add (G_TYPE_CHECK_INSTANCE_CAST (_tmp19_, GEE_TYPE_ABSTRACT_COLLECTION, GeeAbstractCollection), _tmp20_);
#line 292 "/home/jens/Source/shotwell/src/Commands.vala"
			_data_collection_unref0 (collection);
#line 292 "/home/jens/Source/shotwell/src/Commands.vala"
			_g_object_unref0 (source);
#line 292 "/home/jens/Source/shotwell/src/Commands.vala"
			_g_object_unref0 (view);
#line 4380 "Commands.c"
		}
#line 292 "/home/jens/Source/shotwell/src/Commands.vala"
		_g_object_unref0 (_view_it);
#line 4384 "Commands.c"
	}
	{
		GeeIterator* _current_collection_it = NULL;
		GeeHashSet* _tmp21_;
		GeeIterator* _tmp22_;
#line 302 "/home/jens/Source/shotwell/src/Commands.vala"
		_tmp21_ = self->priv->hooked_collections;
#line 302 "/home/jens/Source/shotwell/src/Commands.vala"
		_tmp22_ = gee_abstract_collection_iterator (G_TYPE_CHECK_INSTANCE_CAST (_tmp21_, GEE_TYPE_ABSTRACT_COLLECTION, GeeAbstractCollection));
#line 302 "/home/jens/Source/shotwell/src/Commands.vala"
		_current_collection_it = _tmp22_;
#line 302 "/home/jens/Source/shotwell/src/Commands.vala"
		while (TRUE) {
#line 4398 "Commands.c"
			GeeIterator* _tmp23_;
			gboolean _tmp24_;
			SourceCollection* current_collection = NULL;
			GeeIterator* _tmp25_;
			gpointer _tmp26_;
			SourceCollection* _tmp27_;
#line 302 "/home/jens/Source/shotwell/src/Commands.vala"
			_tmp23_ = _current_collection_it;
#line 302 "/home/jens/Source/shotwell/src/Commands.vala"
			_tmp24_ = gee_iterator_next (_tmp23_);
#line 302 "/home/jens/Source/shotwell/src/Commands.vala"
			if (!_tmp24_) {
#line 302 "/home/jens/Source/shotwell/src/Commands.vala"
				break;
#line 4413 "Commands.c"
			}
#line 302 "/home/jens/Source/shotwell/src/Commands.vala"
			_tmp25_ = _current_collection_it;
#line 302 "/home/jens/Source/shotwell/src/Commands.vala"
			_tmp26_ = gee_iterator_get (_tmp25_);
#line 302 "/home/jens/Source/shotwell/src/Commands.vala"
			current_collection = (SourceCollection*) _tmp26_;
#line 303 "/home/jens/Source/shotwell/src/Commands.vala"
			_tmp27_ = current_collection;
#line 303 "/home/jens/Source/shotwell/src/Commands.vala"
			g_signal_connect_object (_tmp27_, "item-destroyed", (GCallback) _multiple_data_source_command_on_source_destroyed_source_collection_item_destroyed, self, 0);
#line 302 "/home/jens/Source/shotwell/src/Commands.vala"
			_data_collection_unref0 (current_collection);
#line 4427 "Commands.c"
		}
#line 302 "/home/jens/Source/shotwell/src/Commands.vala"
		_g_object_unref0 (_current_collection_it);
#line 4431 "Commands.c"
	}
#line 285 "/home/jens/Source/shotwell/src/Commands.vala"
	return self;
#line 4435 "Commands.c"
}


GeeIterable* multiple_data_source_command_get_sources (MultipleDataSourceCommand* self) {
	GeeIterable* result = NULL;
	GeeArrayList* _tmp0_;
	GeeIterable* _tmp1_;
#line 313 "/home/jens/Source/shotwell/src/Commands.vala"
	g_return_val_if_fail (IS_MULTIPLE_DATA_SOURCE_COMMAND (self), NULL);
#line 314 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp0_ = self->source_list;
#line 314 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp1_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, GEE_TYPE_ITERABLE, GeeIterable));
#line 314 "/home/jens/Source/shotwell/src/Commands.vala"
	result = _tmp1_;
#line 314 "/home/jens/Source/shotwell/src/Commands.vala"
	return result;
#line 4453 "Commands.c"
}


gint multiple_data_source_command_get_source_count (MultipleDataSourceCommand* self) {
	gint result = 0;
	GeeArrayList* _tmp0_;
	gint _tmp1_;
	gint _tmp2_;
#line 317 "/home/jens/Source/shotwell/src/Commands.vala"
	g_return_val_if_fail (IS_MULTIPLE_DATA_SOURCE_COMMAND (self), 0);
#line 318 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp0_ = self->source_list;
#line 318 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp1_ = gee_abstract_collection_get_size (G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, GEE_TYPE_ABSTRACT_COLLECTION, GeeAbstractCollection));
#line 318 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp2_ = _tmp1_;
#line 318 "/home/jens/Source/shotwell/src/Commands.vala"
	result = _tmp2_;
#line 318 "/home/jens/Source/shotwell/src/Commands.vala"
	return result;
#line 4474 "Commands.c"
}


static void multiple_data_source_command_on_source_destroyed (MultipleDataSourceCommand* self, DataSource* source) {
	GeeArrayList* _tmp0_;
	DataSource* _tmp1_;
	gboolean _tmp2_;
#line 321 "/home/jens/Source/shotwell/src/Commands.vala"
	g_return_if_fail (IS_MULTIPLE_DATA_SOURCE_COMMAND (self));
#line 321 "/home/jens/Source/shotwell/src/Commands.vala"
	g_return_if_fail (IS_DATA_SOURCE (source));
#line 324 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp0_ = self->source_list;
#line 324 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp1_ = source;
#line 324 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp2_ = gee_abstract_collection_contains (G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, GEE_TYPE_ABSTRACT_COLLECTION, GeeAbstractCollection), _tmp1_);
#line 324 "/home/jens/Source/shotwell/src/Commands.vala"
	if (_tmp2_) {
#line 4494 "Commands.c"
		CommandManager* _tmp3_;
		CommandManager* _tmp4_;
#line 325 "/home/jens/Source/shotwell/src/Commands.vala"
		_tmp3_ = command_get_command_manager (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_COMMAND, Command));
#line 325 "/home/jens/Source/shotwell/src/Commands.vala"
		_tmp4_ = _tmp3_;
#line 325 "/home/jens/Source/shotwell/src/Commands.vala"
		command_manager_reset (_tmp4_);
#line 325 "/home/jens/Source/shotwell/src/Commands.vala"
		_command_manager_unref0 (_tmp4_);
#line 4505 "Commands.c"
	}
}


static void multiple_data_source_command_real_execute (Command* base) {
	MultipleDataSourceCommand * self;
	GeeArrayList* _tmp0_;
	GeeArrayList* _tmp1_;
	GeeArrayList* _tmp2_;
#line 328 "/home/jens/Source/shotwell/src/Commands.vala"
	self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_MULTIPLE_DATA_SOURCE_COMMAND, MultipleDataSourceCommand);
#line 329 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp0_ = self->priv->acted_upon;
#line 329 "/home/jens/Source/shotwell/src/Commands.vala"
	gee_abstract_collection_clear (G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, GEE_TYPE_ABSTRACT_COLLECTION, GeeAbstractCollection));
#line 331 "/home/jens/Source/shotwell/src/Commands.vala"
	multiple_data_source_command_start_transaction (self);
#line 332 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp1_ = self->source_list;
#line 332 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp2_ = self->priv->acted_upon;
#line 332 "/home/jens/Source/shotwell/src/Commands.vala"
	multiple_data_source_command_execute_all (self, TRUE, TRUE, _tmp1_, _tmp2_);
#line 333 "/home/jens/Source/shotwell/src/Commands.vala"
	multiple_data_source_command_commit_transaction (self);
#line 4531 "Commands.c"
}


static void multiple_data_source_command_real_execute_on_source (MultipleDataSourceCommand* self, DataSource* source) {
#line 336 "/home/jens/Source/shotwell/src/Commands.vala"
	g_critical ("Type `%s' does not implement abstract method `multiple_data_source_command_execute_on_source'", g_type_name (G_TYPE_FROM_INSTANCE (self)));
#line 336 "/home/jens/Source/shotwell/src/Commands.vala"
	return;
#line 4540 "Commands.c"
}


void multiple_data_source_command_execute_on_source (MultipleDataSourceCommand* self, DataSource* source) {
#line 336 "/home/jens/Source/shotwell/src/Commands.vala"
	g_return_if_fail (IS_MULTIPLE_DATA_SOURCE_COMMAND (self));
#line 336 "/home/jens/Source/shotwell/src/Commands.vala"
	MULTIPLE_DATA_SOURCE_COMMAND_GET_CLASS (self)->execute_on_source (self, source);
#line 4549 "Commands.c"
}


static void multiple_data_source_command_real_undo (Command* base) {
	MultipleDataSourceCommand * self;
	GeeArrayList* _tmp0_;
	gint _tmp1_;
	gint _tmp2_;
#line 338 "/home/jens/Source/shotwell/src/Commands.vala"
	self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_MULTIPLE_DATA_SOURCE_COMMAND, MultipleDataSourceCommand);
#line 339 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp0_ = self->priv->acted_upon;
#line 339 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp1_ = gee_abstract_collection_get_size (G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, GEE_TYPE_ABSTRACT_COLLECTION, GeeAbstractCollection));
#line 339 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp2_ = _tmp1_;
#line 339 "/home/jens/Source/shotwell/src/Commands.vala"
	if (_tmp2_ > 0) {
#line 4568 "Commands.c"
		GeeArrayList* _tmp3_;
		GeeArrayList* _tmp4_;
#line 340 "/home/jens/Source/shotwell/src/Commands.vala"
		multiple_data_source_command_start_transaction (self);
#line 341 "/home/jens/Source/shotwell/src/Commands.vala"
		_tmp3_ = self->priv->acted_upon;
#line 341 "/home/jens/Source/shotwell/src/Commands.vala"
		multiple_data_source_command_execute_all (self, FALSE, FALSE, _tmp3_, NULL);
#line 342 "/home/jens/Source/shotwell/src/Commands.vala"
		multiple_data_source_command_commit_transaction (self);
#line 344 "/home/jens/Source/shotwell/src/Commands.vala"
		_tmp4_ = self->priv->acted_upon;
#line 344 "/home/jens/Source/shotwell/src/Commands.vala"
		gee_abstract_collection_clear (G_TYPE_CHECK_INSTANCE_CAST (_tmp4_, GEE_TYPE_ABSTRACT_COLLECTION, GeeAbstractCollection));
#line 4583 "Commands.c"
	}
}


static void multiple_data_source_command_real_undo_on_source (MultipleDataSourceCommand* self, DataSource* source) {
#line 348 "/home/jens/Source/shotwell/src/Commands.vala"
	g_critical ("Type `%s' does not implement abstract method `multiple_data_source_command_undo_on_source'", g_type_name (G_TYPE_FROM_INSTANCE (self)));
#line 348 "/home/jens/Source/shotwell/src/Commands.vala"
	return;
#line 4593 "Commands.c"
}


void multiple_data_source_command_undo_on_source (MultipleDataSourceCommand* self, DataSource* source) {
#line 348 "/home/jens/Source/shotwell/src/Commands.vala"
	g_return_if_fail (IS_MULTIPLE_DATA_SOURCE_COMMAND (self));
#line 348 "/home/jens/Source/shotwell/src/Commands.vala"
	MULTIPLE_DATA_SOURCE_COMMAND_GET_CLASS (self)->undo_on_source (self, source);
#line 4602 "Commands.c"
}


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


static void multiple_data_source_command_start_transaction (MultipleDataSourceCommand* self) {
#line 350 "/home/jens/Source/shotwell/src/Commands.vala"
	g_return_if_fail (IS_MULTIPLE_DATA_SOURCE_COMMAND (self));
#line 4616 "Commands.c"
	{
		GeeIterator* _sources_it = NULL;
		GeeHashSet* _tmp0_;
		GeeIterator* _tmp1_;
#line 351 "/home/jens/Source/shotwell/src/Commands.vala"
		_tmp0_ = self->priv->hooked_collections;
#line 351 "/home/jens/Source/shotwell/src/Commands.vala"
		_tmp1_ = gee_abstract_collection_iterator (G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, GEE_TYPE_ABSTRACT_COLLECTION, GeeAbstractCollection));
#line 351 "/home/jens/Source/shotwell/src/Commands.vala"
		_sources_it = _tmp1_;
#line 351 "/home/jens/Source/shotwell/src/Commands.vala"
		while (TRUE) {
#line 4629 "Commands.c"
			GeeIterator* _tmp2_;
			gboolean _tmp3_;
			SourceCollection* sources = NULL;
			GeeIterator* _tmp4_;
			gpointer _tmp5_;
			MediaSourceCollection* media_collection = NULL;
			SourceCollection* _tmp6_;
			MediaSourceCollection* _tmp7_;
			MediaSourceCollection* _tmp8_;
#line 351 "/home/jens/Source/shotwell/src/Commands.vala"
			_tmp2_ = _sources_it;
#line 351 "/home/jens/Source/shotwell/src/Commands.vala"
			_tmp3_ = gee_iterator_next (_tmp2_);
#line 351 "/home/jens/Source/shotwell/src/Commands.vala"
			if (!_tmp3_) {
#line 351 "/home/jens/Source/shotwell/src/Commands.vala"
				break;
#line 4647 "Commands.c"
			}
#line 351 "/home/jens/Source/shotwell/src/Commands.vala"
			_tmp4_ = _sources_it;
#line 351 "/home/jens/Source/shotwell/src/Commands.vala"
			_tmp5_ = gee_iterator_get (_tmp4_);
#line 351 "/home/jens/Source/shotwell/src/Commands.vala"
			sources = (SourceCollection*) _tmp5_;
#line 352 "/home/jens/Source/shotwell/src/Commands.vala"
			_tmp6_ = sources;
#line 352 "/home/jens/Source/shotwell/src/Commands.vala"
			_tmp7_ = _data_collection_ref0 (G_TYPE_CHECK_INSTANCE_TYPE (_tmp6_, TYPE_MEDIA_SOURCE_COLLECTION) ? ((MediaSourceCollection*) _tmp6_) : NULL);
#line 352 "/home/jens/Source/shotwell/src/Commands.vala"
			media_collection = _tmp7_;
#line 353 "/home/jens/Source/shotwell/src/Commands.vala"
			_tmp8_ = media_collection;
#line 353 "/home/jens/Source/shotwell/src/Commands.vala"
			if (_tmp8_ != NULL) {
#line 4665 "Commands.c"
				MediaSourceCollection* _tmp9_;
				TransactionController* _tmp10_;
				TransactionController* _tmp11_;
#line 354 "/home/jens/Source/shotwell/src/Commands.vala"
				_tmp9_ = media_collection;
#line 354 "/home/jens/Source/shotwell/src/Commands.vala"
				_tmp10_ = media_source_collection_get_transaction_controller (_tmp9_);
#line 354 "/home/jens/Source/shotwell/src/Commands.vala"
				_tmp11_ = _tmp10_;
#line 354 "/home/jens/Source/shotwell/src/Commands.vala"
				transaction_controller_begin (_tmp11_);
#line 4677 "Commands.c"
			}
#line 351 "/home/jens/Source/shotwell/src/Commands.vala"
			_data_collection_unref0 (media_collection);
#line 351 "/home/jens/Source/shotwell/src/Commands.vala"
			_data_collection_unref0 (sources);
#line 4683 "Commands.c"
		}
#line 351 "/home/jens/Source/shotwell/src/Commands.vala"
		_g_object_unref0 (_sources_it);
#line 4687 "Commands.c"
	}
}


static void multiple_data_source_command_commit_transaction (MultipleDataSourceCommand* self) {
#line 358 "/home/jens/Source/shotwell/src/Commands.vala"
	g_return_if_fail (IS_MULTIPLE_DATA_SOURCE_COMMAND (self));
#line 4695 "Commands.c"
	{
		GeeIterator* _sources_it = NULL;
		GeeHashSet* _tmp0_;
		GeeIterator* _tmp1_;
#line 359 "/home/jens/Source/shotwell/src/Commands.vala"
		_tmp0_ = self->priv->hooked_collections;
#line 359 "/home/jens/Source/shotwell/src/Commands.vala"
		_tmp1_ = gee_abstract_collection_iterator (G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, GEE_TYPE_ABSTRACT_COLLECTION, GeeAbstractCollection));
#line 359 "/home/jens/Source/shotwell/src/Commands.vala"
		_sources_it = _tmp1_;
#line 359 "/home/jens/Source/shotwell/src/Commands.vala"
		while (TRUE) {
#line 4708 "Commands.c"
			GeeIterator* _tmp2_;
			gboolean _tmp3_;
			SourceCollection* sources = NULL;
			GeeIterator* _tmp4_;
			gpointer _tmp5_;
			MediaSourceCollection* media_collection = NULL;
			SourceCollection* _tmp6_;
			MediaSourceCollection* _tmp7_;
			MediaSourceCollection* _tmp8_;
#line 359 "/home/jens/Source/shotwell/src/Commands.vala"
			_tmp2_ = _sources_it;
#line 359 "/home/jens/Source/shotwell/src/Commands.vala"
			_tmp3_ = gee_iterator_next (_tmp2_);
#line 359 "/home/jens/Source/shotwell/src/Commands.vala"
			if (!_tmp3_) {
#line 359 "/home/jens/Source/shotwell/src/Commands.vala"
				break;
#line 4726 "Commands.c"
			}
#line 359 "/home/jens/Source/shotwell/src/Commands.vala"
			_tmp4_ = _sources_it;
#line 359 "/home/jens/Source/shotwell/src/Commands.vala"
			_tmp5_ = gee_iterator_get (_tmp4_);
#line 359 "/home/jens/Source/shotwell/src/Commands.vala"
			sources = (SourceCollection*) _tmp5_;
#line 360 "/home/jens/Source/shotwell/src/Commands.vala"
			_tmp6_ = sources;
#line 360 "/home/jens/Source/shotwell/src/Commands.vala"
			_tmp7_ = _data_collection_ref0 (G_TYPE_CHECK_INSTANCE_TYPE (_tmp6_, TYPE_MEDIA_SOURCE_COLLECTION) ? ((MediaSourceCollection*) _tmp6_) : NULL);
#line 360 "/home/jens/Source/shotwell/src/Commands.vala"
			media_collection = _tmp7_;
#line 361 "/home/jens/Source/shotwell/src/Commands.vala"
			_tmp8_ = media_collection;
#line 361 "/home/jens/Source/shotwell/src/Commands.vala"
			if (_tmp8_ != NULL) {
#line 4744 "Commands.c"
				MediaSourceCollection* _tmp9_;
				TransactionController* _tmp10_;
				TransactionController* _tmp11_;
#line 362 "/home/jens/Source/shotwell/src/Commands.vala"
				_tmp9_ = media_collection;
#line 362 "/home/jens/Source/shotwell/src/Commands.vala"
				_tmp10_ = media_source_collection_get_transaction_controller (_tmp9_);
#line 362 "/home/jens/Source/shotwell/src/Commands.vala"
				_tmp11_ = _tmp10_;
#line 362 "/home/jens/Source/shotwell/src/Commands.vala"
				transaction_controller_commit (_tmp11_);
#line 4756 "Commands.c"
			}
#line 359 "/home/jens/Source/shotwell/src/Commands.vala"
			_data_collection_unref0 (media_collection);
#line 359 "/home/jens/Source/shotwell/src/Commands.vala"
			_data_collection_unref0 (sources);
#line 4762 "Commands.c"
		}
#line 359 "/home/jens/Source/shotwell/src/Commands.vala"
		_g_object_unref0 (_sources_it);
#line 4766 "Commands.c"
	}
}


static void multiple_data_source_command_execute_all (MultipleDataSourceCommand* self, gboolean exec, gboolean can_cancel, GeeArrayList* todo, GeeArrayList* completed) {
	AppWindow* _tmp0_;
	AppWindow* _tmp1_;
	gint count = 0;
	gint total = 0;
	GeeArrayList* _tmp2_;
	gint _tmp3_;
	gint _tmp4_;
	gint two_percent = 0;
	gint _tmp5_;
	gint _tmp6_;
	const gchar* _tmp7_ = NULL;
	gboolean _tmp8_;
	gchar* text = NULL;
	gchar* _tmp11_;
	GCancellable* cancellable = NULL;
	ProgressDialog* progress = NULL;
	gint _tmp12_;
	ProgressDialog* _tmp50_;
	AppWindow* _tmp52_;
	AppWindow* _tmp53_;
#line 366 "/home/jens/Source/shotwell/src/Commands.vala"
	g_return_if_fail (IS_MULTIPLE_DATA_SOURCE_COMMAND (self));
#line 366 "/home/jens/Source/shotwell/src/Commands.vala"
	g_return_if_fail (GEE_IS_ARRAY_LIST (todo));
#line 366 "/home/jens/Source/shotwell/src/Commands.vala"
	g_return_if_fail ((completed == NULL) || GEE_IS_ARRAY_LIST (completed));
#line 368 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp0_ = app_window_get_instance ();
#line 368 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp1_ = _tmp0_;
#line 368 "/home/jens/Source/shotwell/src/Commands.vala"
	page_window_set_busy_cursor (G_TYPE_CHECK_INSTANCE_CAST (_tmp1_, TYPE_PAGE_WINDOW, PageWindow));
#line 368 "/home/jens/Source/shotwell/src/Commands.vala"
	_g_object_unref0 (_tmp1_);
#line 370 "/home/jens/Source/shotwell/src/Commands.vala"
	count = 0;
#line 371 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp2_ = todo;
#line 371 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp3_ = gee_abstract_collection_get_size (G_TYPE_CHECK_INSTANCE_CAST (_tmp2_, GEE_TYPE_ABSTRACT_COLLECTION, GeeAbstractCollection));
#line 371 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp4_ = _tmp3_;
#line 371 "/home/jens/Source/shotwell/src/Commands.vala"
	total = _tmp4_;
#line 372 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp5_ = total;
#line 372 "/home/jens/Source/shotwell/src/Commands.vala"
	two_percent = (gint) (((gdouble) _tmp5_) / 50.0);
#line 373 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp6_ = two_percent;
#line 373 "/home/jens/Source/shotwell/src/Commands.vala"
	if (_tmp6_ <= 0) {
#line 374 "/home/jens/Source/shotwell/src/Commands.vala"
		two_percent = 1;
#line 4826 "Commands.c"
	}
#line 376 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp8_ = exec;
#line 376 "/home/jens/Source/shotwell/src/Commands.vala"
	if (_tmp8_) {
#line 4832 "Commands.c"
		const gchar* _tmp9_;
#line 376 "/home/jens/Source/shotwell/src/Commands.vala"
		_tmp9_ = self->priv->progress_text;
#line 376 "/home/jens/Source/shotwell/src/Commands.vala"
		_tmp7_ = _tmp9_;
#line 4838 "Commands.c"
	} else {
		const gchar* _tmp10_;
#line 376 "/home/jens/Source/shotwell/src/Commands.vala"
		_tmp10_ = self->priv->undo_progress_text;
#line 376 "/home/jens/Source/shotwell/src/Commands.vala"
		_tmp7_ = _tmp10_;
#line 4845 "Commands.c"
	}
#line 376 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp11_ = g_strdup (_tmp7_);
#line 376 "/home/jens/Source/shotwell/src/Commands.vala"
	text = _tmp11_;
#line 378 "/home/jens/Source/shotwell/src/Commands.vala"
	cancellable = NULL;
#line 379 "/home/jens/Source/shotwell/src/Commands.vala"
	progress = NULL;
#line 380 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp12_ = total;
#line 380 "/home/jens/Source/shotwell/src/Commands.vala"
	if (_tmp12_ >= MULTIPLE_DATA_SOURCE_COMMAND_MIN_OPS_FOR_PROGRESS_WINDOW) {
#line 4859 "Commands.c"
		GCancellable* _tmp13_ = NULL;
		gboolean _tmp14_;
		GCancellable* _tmp16_;
		AppWindow* _tmp17_;
		AppWindow* _tmp18_;
		const gchar* _tmp19_;
		GCancellable* _tmp20_;
		ProgressDialog* _tmp21_;
#line 381 "/home/jens/Source/shotwell/src/Commands.vala"
		_tmp14_ = can_cancel;
#line 381 "/home/jens/Source/shotwell/src/Commands.vala"
		if (_tmp14_) {
#line 4872 "Commands.c"
			GCancellable* _tmp15_;
#line 381 "/home/jens/Source/shotwell/src/Commands.vala"
			_tmp15_ = g_cancellable_new ();
#line 381 "/home/jens/Source/shotwell/src/Commands.vala"
			_g_object_unref0 (_tmp13_);
#line 381 "/home/jens/Source/shotwell/src/Commands.vala"
			_tmp13_ = _tmp15_;
#line 4880 "Commands.c"
		} else {
#line 381 "/home/jens/Source/shotwell/src/Commands.vala"
			_g_object_unref0 (_tmp13_);
#line 381 "/home/jens/Source/shotwell/src/Commands.vala"
			_tmp13_ = NULL;
#line 4886 "Commands.c"
		}
#line 381 "/home/jens/Source/shotwell/src/Commands.vala"
		_tmp16_ = _g_object_ref0 (_tmp13_);
#line 381 "/home/jens/Source/shotwell/src/Commands.vala"
		_g_object_unref0 (cancellable);
#line 381 "/home/jens/Source/shotwell/src/Commands.vala"
		cancellable = _tmp16_;
#line 382 "/home/jens/Source/shotwell/src/Commands.vala"
		_tmp17_ = app_window_get_instance ();
#line 382 "/home/jens/Source/shotwell/src/Commands.vala"
		_tmp18_ = _tmp17_;
#line 382 "/home/jens/Source/shotwell/src/Commands.vala"
		_tmp19_ = text;
#line 382 "/home/jens/Source/shotwell/src/Commands.vala"
		_tmp20_ = cancellable;
#line 382 "/home/jens/Source/shotwell/src/Commands.vala"
		_tmp21_ = progress_dialog_new (G_TYPE_CHECK_INSTANCE_CAST (_tmp18_, gtk_window_get_type (), GtkWindow), _tmp19_, _tmp20_);
#line 382 "/home/jens/Source/shotwell/src/Commands.vala"
		g_object_ref_sink (_tmp21_);
#line 382 "/home/jens/Source/shotwell/src/Commands.vala"
		_g_object_unref0 (progress);
#line 382 "/home/jens/Source/shotwell/src/Commands.vala"
		progress = _tmp21_;
#line 382 "/home/jens/Source/shotwell/src/Commands.vala"
		_g_object_unref0 (_tmp18_);
#line 380 "/home/jens/Source/shotwell/src/Commands.vala"
		_g_object_unref0 (_tmp13_);
#line 4914 "Commands.c"
	}
	{
		GeeArrayList* _source_list = NULL;
		GeeArrayList* _tmp22_;
		GeeArrayList* _tmp23_;
		gint _source_size = 0;
		GeeArrayList* _tmp24_;
		gint _tmp25_;
		gint _tmp26_;
		gint _source_index = 0;
#line 385 "/home/jens/Source/shotwell/src/Commands.vala"
		_tmp22_ = todo;
#line 385 "/home/jens/Source/shotwell/src/Commands.vala"
		_tmp23_ = _g_object_ref0 (_tmp22_);
#line 385 "/home/jens/Source/shotwell/src/Commands.vala"
		_source_list = _tmp23_;
#line 385 "/home/jens/Source/shotwell/src/Commands.vala"
		_tmp24_ = _source_list;
#line 385 "/home/jens/Source/shotwell/src/Commands.vala"
		_tmp25_ = gee_abstract_collection_get_size (G_TYPE_CHECK_INSTANCE_CAST (_tmp24_, GEE_TYPE_ABSTRACT_COLLECTION, GeeAbstractCollection));
#line 385 "/home/jens/Source/shotwell/src/Commands.vala"
		_tmp26_ = _tmp25_;
#line 385 "/home/jens/Source/shotwell/src/Commands.vala"
		_source_size = _tmp26_;
#line 385 "/home/jens/Source/shotwell/src/Commands.vala"
		_source_index = -1;
#line 385 "/home/jens/Source/shotwell/src/Commands.vala"
		while (TRUE) {
#line 4943 "Commands.c"
			gint _tmp27_;
			gint _tmp28_;
			gint _tmp29_;
			DataSource* source = NULL;
			GeeArrayList* _tmp30_;
			gint _tmp31_;
			gpointer _tmp32_;
			gboolean _tmp33_;
			GeeArrayList* _tmp36_;
			ProgressDialog* _tmp39_;
#line 385 "/home/jens/Source/shotwell/src/Commands.vala"
			_tmp27_ = _source_index;
#line 385 "/home/jens/Source/shotwell/src/Commands.vala"
			_source_index = _tmp27_ + 1;
#line 385 "/home/jens/Source/shotwell/src/Commands.vala"
			_tmp28_ = _source_index;
#line 385 "/home/jens/Source/shotwell/src/Commands.vala"
			_tmp29_ = _source_size;
#line 385 "/home/jens/Source/shotwell/src/Commands.vala"
			if (!(_tmp28_ < _tmp29_)) {
#line 385 "/home/jens/Source/shotwell/src/Commands.vala"
				break;
#line 4966 "Commands.c"
			}
#line 385 "/home/jens/Source/shotwell/src/Commands.vala"
			_tmp30_ = _source_list;
#line 385 "/home/jens/Source/shotwell/src/Commands.vala"
			_tmp31_ = _source_index;
#line 385 "/home/jens/Source/shotwell/src/Commands.vala"
			_tmp32_ = gee_abstract_list_get (G_TYPE_CHECK_INSTANCE_CAST (_tmp30_, GEE_TYPE_ABSTRACT_LIST, GeeAbstractList), _tmp31_);
#line 385 "/home/jens/Source/shotwell/src/Commands.vala"
			source = (DataSource*) _tmp32_;
#line 386 "/home/jens/Source/shotwell/src/Commands.vala"
			_tmp33_ = exec;
#line 386 "/home/jens/Source/shotwell/src/Commands.vala"
			if (_tmp33_) {
#line 4980 "Commands.c"
				DataSource* _tmp34_;
#line 387 "/home/jens/Source/shotwell/src/Commands.vala"
				_tmp34_ = source;
#line 387 "/home/jens/Source/shotwell/src/Commands.vala"
				multiple_data_source_command_execute_on_source (self, _tmp34_);
#line 4986 "Commands.c"
			} else {
				DataSource* _tmp35_;
#line 389 "/home/jens/Source/shotwell/src/Commands.vala"
				_tmp35_ = source;
#line 389 "/home/jens/Source/shotwell/src/Commands.vala"
				multiple_data_source_command_undo_on_source (self, _tmp35_);
#line 4993 "Commands.c"
			}
#line 391 "/home/jens/Source/shotwell/src/Commands.vala"
			_tmp36_ = completed;
#line 391 "/home/jens/Source/shotwell/src/Commands.vala"
			if (_tmp36_ != NULL) {
#line 4999 "Commands.c"
				GeeArrayList* _tmp37_;
				DataSource* _tmp38_;
#line 392 "/home/jens/Source/shotwell/src/Commands.vala"
				_tmp37_ = completed;
#line 392 "/home/jens/Source/shotwell/src/Commands.vala"
				_tmp38_ = source;
#line 392 "/home/jens/Source/shotwell/src/Commands.vala"
				gee_abstract_collection_add (G_TYPE_CHECK_INSTANCE_CAST (_tmp37_, GEE_TYPE_ABSTRACT_COLLECTION, GeeAbstractCollection), _tmp38_);
#line 5008 "Commands.c"
			}
#line 394 "/home/jens/Source/shotwell/src/Commands.vala"
			_tmp39_ = progress;
#line 394 "/home/jens/Source/shotwell/src/Commands.vala"
			if (_tmp39_ != NULL) {
#line 5014 "Commands.c"
				gint _tmp40_;
				gint _tmp41_;
				gint _tmp42_;
				gboolean _tmp46_ = FALSE;
				GCancellable* _tmp47_;
#line 395 "/home/jens/Source/shotwell/src/Commands.vala"
				_tmp40_ = count;
#line 395 "/home/jens/Source/shotwell/src/Commands.vala"
				count = _tmp40_ + 1;
#line 395 "/home/jens/Source/shotwell/src/Commands.vala"
				_tmp41_ = count;
#line 395 "/home/jens/Source/shotwell/src/Commands.vala"
				_tmp42_ = two_percent;
#line 395 "/home/jens/Source/shotwell/src/Commands.vala"
				if ((_tmp41_ % _tmp42_) == 0) {
#line 5030 "Commands.c"
					ProgressDialog* _tmp43_;
					gint _tmp44_;
					gint _tmp45_;
#line 396 "/home/jens/Source/shotwell/src/Commands.vala"
					_tmp43_ = progress;
#line 396 "/home/jens/Source/shotwell/src/Commands.vala"
					_tmp44_ = count;
#line 396 "/home/jens/Source/shotwell/src/Commands.vala"
					_tmp45_ = total;
#line 396 "/home/jens/Source/shotwell/src/Commands.vala"
					progress_dialog_set_fraction (_tmp43_, _tmp44_, _tmp45_);
#line 397 "/home/jens/Source/shotwell/src/Commands.vala"
					spin_event_loop ();
#line 5044 "Commands.c"
				}
#line 400 "/home/jens/Source/shotwell/src/Commands.vala"
				_tmp47_ = cancellable;
#line 400 "/home/jens/Source/shotwell/src/Commands.vala"
				if (_tmp47_ != NULL) {
#line 5050 "Commands.c"
					GCancellable* _tmp48_;
					gboolean _tmp49_;
#line 400 "/home/jens/Source/shotwell/src/Commands.vala"
					_tmp48_ = cancellable;
#line 400 "/home/jens/Source/shotwell/src/Commands.vala"
					_tmp49_ = g_cancellable_is_cancelled (_tmp48_);
#line 400 "/home/jens/Source/shotwell/src/Commands.vala"
					_tmp46_ = _tmp49_;
#line 5059 "Commands.c"
				} else {
#line 400 "/home/jens/Source/shotwell/src/Commands.vala"
					_tmp46_ = FALSE;
#line 5063 "Commands.c"
				}
#line 400 "/home/jens/Source/shotwell/src/Commands.vala"
				if (_tmp46_) {
#line 401 "/home/jens/Source/shotwell/src/Commands.vala"
					_g_object_unref0 (source);
#line 401 "/home/jens/Source/shotwell/src/Commands.vala"
					break;
#line 5071 "Commands.c"
				}
			}
#line 385 "/home/jens/Source/shotwell/src/Commands.vala"
			_g_object_unref0 (source);
#line 5076 "Commands.c"
		}
#line 385 "/home/jens/Source/shotwell/src/Commands.vala"
		_g_object_unref0 (_source_list);
#line 5080 "Commands.c"
	}
#line 405 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp50_ = progress;
#line 405 "/home/jens/Source/shotwell/src/Commands.vala"
	if (_tmp50_ != NULL) {
#line 5086 "Commands.c"
		ProgressDialog* _tmp51_;
#line 406 "/home/jens/Source/shotwell/src/Commands.vala"
		_tmp51_ = progress;
#line 406 "/home/jens/Source/shotwell/src/Commands.vala"
		progress_dialog_close (_tmp51_);
#line 5092 "Commands.c"
	}
#line 408 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp52_ = app_window_get_instance ();
#line 408 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp53_ = _tmp52_;
#line 408 "/home/jens/Source/shotwell/src/Commands.vala"
	page_window_set_normal_cursor (G_TYPE_CHECK_INSTANCE_CAST (_tmp53_, TYPE_PAGE_WINDOW, PageWindow));
#line 408 "/home/jens/Source/shotwell/src/Commands.vala"
	_g_object_unref0 (_tmp53_);
#line 366 "/home/jens/Source/shotwell/src/Commands.vala"
	_g_object_unref0 (progress);
#line 366 "/home/jens/Source/shotwell/src/Commands.vala"
	_g_object_unref0 (cancellable);
#line 366 "/home/jens/Source/shotwell/src/Commands.vala"
	_g_free0 (text);
#line 5108 "Commands.c"
}


static void multiple_data_source_command_class_init (MultipleDataSourceCommandClass * klass) {
#line 275 "/home/jens/Source/shotwell/src/Commands.vala"
	multiple_data_source_command_parent_class = g_type_class_peek_parent (klass);
#line 275 "/home/jens/Source/shotwell/src/Commands.vala"
	g_type_class_add_private (klass, sizeof (MultipleDataSourceCommandPrivate));
#line 275 "/home/jens/Source/shotwell/src/Commands.vala"
	((CommandClass *) klass)->execute = (void (*) (Command *)) multiple_data_source_command_real_execute;
#line 275 "/home/jens/Source/shotwell/src/Commands.vala"
	((MultipleDataSourceCommandClass *) klass)->execute_on_source = (void (*) (MultipleDataSourceCommand *, DataSource*)) multiple_data_source_command_real_execute_on_source;
#line 275 "/home/jens/Source/shotwell/src/Commands.vala"
	((CommandClass *) klass)->undo = (void (*) (Command *)) multiple_data_source_command_real_undo;
#line 275 "/home/jens/Source/shotwell/src/Commands.vala"
	((MultipleDataSourceCommandClass *) klass)->undo_on_source = (void (*) (MultipleDataSourceCommand *, DataSource*)) multiple_data_source_command_real_undo_on_source;
#line 275 "/home/jens/Source/shotwell/src/Commands.vala"
	G_OBJECT_CLASS (klass)->finalize = multiple_data_source_command_finalize;
#line 5127 "Commands.c"
}


static void multiple_data_source_command_instance_init (MultipleDataSourceCommand * self) {
	GeeArrayList* _tmp0_;
	GeeArrayList* _tmp1_;
	GeeHashSet* _tmp2_;
#line 275 "/home/jens/Source/shotwell/src/Commands.vala"
	self->priv = MULTIPLE_DATA_SOURCE_COMMAND_GET_PRIVATE (self);
#line 278 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp0_ = gee_array_list_new (TYPE_DATA_SOURCE, (GBoxedCopyFunc) g_object_ref, (GDestroyNotify) g_object_unref, NULL, NULL, NULL);
#line 278 "/home/jens/Source/shotwell/src/Commands.vala"
	self->source_list = _tmp0_;
#line 282 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp1_ = gee_array_list_new (TYPE_DATA_SOURCE, (GBoxedCopyFunc) g_object_ref, (GDestroyNotify) g_object_unref, NULL, NULL, NULL);
#line 282 "/home/jens/Source/shotwell/src/Commands.vala"
	self->priv->acted_upon = _tmp1_;
#line 283 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp2_ = gee_hash_set_new (TYPE_SOURCE_COLLECTION, (GBoxedCopyFunc) data_collection_ref, (GDestroyNotify) data_collection_unref, NULL, NULL, NULL, NULL, NULL, NULL);
#line 283 "/home/jens/Source/shotwell/src/Commands.vala"
	self->priv->hooked_collections = _tmp2_;
#line 5149 "Commands.c"
}


static void multiple_data_source_command_finalize (GObject * obj) {
	MultipleDataSourceCommand * self;
#line 275 "/home/jens/Source/shotwell/src/Commands.vala"
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, TYPE_MULTIPLE_DATA_SOURCE_COMMAND, MultipleDataSourceCommand);
#line 5157 "Commands.c"
	{
		GeeIterator* _current_collection_it = NULL;
		GeeHashSet* _tmp0_;
		GeeIterator* _tmp1_;
#line 308 "/home/jens/Source/shotwell/src/Commands.vala"
		_tmp0_ = self->priv->hooked_collections;
#line 308 "/home/jens/Source/shotwell/src/Commands.vala"
		_tmp1_ = gee_abstract_collection_iterator (G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, GEE_TYPE_ABSTRACT_COLLECTION, GeeAbstractCollection));
#line 308 "/home/jens/Source/shotwell/src/Commands.vala"
		_current_collection_it = _tmp1_;
#line 308 "/home/jens/Source/shotwell/src/Commands.vala"
		while (TRUE) {
#line 5170 "Commands.c"
			GeeIterator* _tmp2_;
			gboolean _tmp3_;
			SourceCollection* current_collection = NULL;
			GeeIterator* _tmp4_;
			gpointer _tmp5_;
			SourceCollection* _tmp6_;
			guint _tmp7_;
#line 308 "/home/jens/Source/shotwell/src/Commands.vala"
			_tmp2_ = _current_collection_it;
#line 308 "/home/jens/Source/shotwell/src/Commands.vala"
			_tmp3_ = gee_iterator_next (_tmp2_);
#line 308 "/home/jens/Source/shotwell/src/Commands.vala"
			if (!_tmp3_) {
#line 308 "/home/jens/Source/shotwell/src/Commands.vala"
				break;
#line 5186 "Commands.c"
			}
#line 308 "/home/jens/Source/shotwell/src/Commands.vala"
			_tmp4_ = _current_collection_it;
#line 308 "/home/jens/Source/shotwell/src/Commands.vala"
			_tmp5_ = gee_iterator_get (_tmp4_);
#line 308 "/home/jens/Source/shotwell/src/Commands.vala"
			current_collection = (SourceCollection*) _tmp5_;
#line 309 "/home/jens/Source/shotwell/src/Commands.vala"
			_tmp6_ = current_collection;
#line 309 "/home/jens/Source/shotwell/src/Commands.vala"
			g_signal_parse_name ("item-destroyed", TYPE_SOURCE_COLLECTION, &_tmp7_, NULL, FALSE);
#line 309 "/home/jens/Source/shotwell/src/Commands.vala"
			g_signal_handlers_disconnect_matched (_tmp6_, G_SIGNAL_MATCH_ID | G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA, _tmp7_, 0, NULL, (GCallback) _multiple_data_source_command_on_source_destroyed_source_collection_item_destroyed, self);
#line 308 "/home/jens/Source/shotwell/src/Commands.vala"
			_data_collection_unref0 (current_collection);
#line 5202 "Commands.c"
		}
#line 308 "/home/jens/Source/shotwell/src/Commands.vala"
		_g_object_unref0 (_current_collection_it);
#line 5206 "Commands.c"
	}
#line 278 "/home/jens/Source/shotwell/src/Commands.vala"
	_g_object_unref0 (self->source_list);
#line 280 "/home/jens/Source/shotwell/src/Commands.vala"
	_g_free0 (self->priv->progress_text);
#line 281 "/home/jens/Source/shotwell/src/Commands.vala"
	_g_free0 (self->priv->undo_progress_text);
#line 282 "/home/jens/Source/shotwell/src/Commands.vala"
	_g_object_unref0 (self->priv->acted_upon);
#line 283 "/home/jens/Source/shotwell/src/Commands.vala"
	_g_object_unref0 (self->priv->hooked_collections);
#line 275 "/home/jens/Source/shotwell/src/Commands.vala"
	G_OBJECT_CLASS (multiple_data_source_command_parent_class)->finalize (obj);
#line 5220 "Commands.c"
}


GType multiple_data_source_command_get_type (void) {
	static volatile gsize multiple_data_source_command_type_id__volatile = 0;
	if (g_once_init_enter (&multiple_data_source_command_type_id__volatile)) {
		static const GTypeInfo g_define_type_info = { sizeof (MultipleDataSourceCommandClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) multiple_data_source_command_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (MultipleDataSourceCommand), 0, (GInstanceInitFunc) multiple_data_source_command_instance_init, NULL };
		GType multiple_data_source_command_type_id;
		multiple_data_source_command_type_id = g_type_register_static (TYPE_PAGE_COMMAND, "MultipleDataSourceCommand", &g_define_type_info, G_TYPE_FLAG_ABSTRACT);
		g_once_init_leave (&multiple_data_source_command_type_id__volatile, multiple_data_source_command_type_id);
	}
	return multiple_data_source_command_type_id__volatile;
}


static void _multiple_data_source_at_once_command_on_sources_destroyed_source_collection_items_destroyed (SourceCollection* _sender, GeeCollection* destroyed, gpointer self) {
#line 435 "/home/jens/Source/shotwell/src/Commands.vala"
	multiple_data_source_at_once_command_on_sources_destroyed ((MultipleDataSourceAtOnceCommand*) self, destroyed);
#line 5239 "Commands.c"
}


MultipleDataSourceAtOnceCommand* multiple_data_source_at_once_command_construct (GType object_type, GeeCollection* sources, const gchar* name, const gchar* explanation) {
	MultipleDataSourceAtOnceCommand * self = NULL;
	const gchar* _tmp0_;
	const gchar* _tmp1_;
	GeeHashSet* _tmp2_;
	GeeCollection* _tmp3_;
#line 417 "/home/jens/Source/shotwell/src/Commands.vala"
	g_return_val_if_fail (GEE_IS_COLLECTION (sources), NULL);
#line 417 "/home/jens/Source/shotwell/src/Commands.vala"
	g_return_val_if_fail (name != NULL, NULL);
#line 417 "/home/jens/Source/shotwell/src/Commands.vala"
	g_return_val_if_fail (explanation != NULL, NULL);
#line 419 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp0_ = name;
#line 419 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp1_ = explanation;
#line 419 "/home/jens/Source/shotwell/src/Commands.vala"
	self = (MultipleDataSourceAtOnceCommand*) page_command_construct (object_type, _tmp0_, _tmp1_);
#line 421 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp2_ = self->priv->sources;
#line 421 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp3_ = sources;
#line 421 "/home/jens/Source/shotwell/src/Commands.vala"
	gee_collection_add_all (G_TYPE_CHECK_INSTANCE_CAST (_tmp2_, GEE_TYPE_COLLECTION, GeeCollection), _tmp3_);
#line 5267 "Commands.c"
	{
		GeeIterator* _source_it = NULL;
		GeeHashSet* _tmp4_;
		GeeIterator* _tmp5_;
#line 423 "/home/jens/Source/shotwell/src/Commands.vala"
		_tmp4_ = self->priv->sources;
#line 423 "/home/jens/Source/shotwell/src/Commands.vala"
		_tmp5_ = gee_abstract_collection_iterator (G_TYPE_CHECK_INSTANCE_CAST (_tmp4_, GEE_TYPE_ABSTRACT_COLLECTION, GeeAbstractCollection));
#line 423 "/home/jens/Source/shotwell/src/Commands.vala"
		_source_it = _tmp5_;
#line 423 "/home/jens/Source/shotwell/src/Commands.vala"
		while (TRUE) {
#line 5280 "Commands.c"
			GeeIterator* _tmp6_;
			gboolean _tmp7_;
			DataSource* source = NULL;
			GeeIterator* _tmp8_;
			gpointer _tmp9_;
			SourceCollection* membership = NULL;
			DataSource* _tmp10_;
			DataCollection* _tmp11_;
			SourceCollection* _tmp12_;
			SourceCollection* _tmp13_;
#line 423 "/home/jens/Source/shotwell/src/Commands.vala"
			_tmp6_ = _source_it;
#line 423 "/home/jens/Source/shotwell/src/Commands.vala"
			_tmp7_ = gee_iterator_next (_tmp6_);
#line 423 "/home/jens/Source/shotwell/src/Commands.vala"
			if (!_tmp7_) {
#line 423 "/home/jens/Source/shotwell/src/Commands.vala"
				break;
#line 5299 "Commands.c"
			}
#line 423 "/home/jens/Source/shotwell/src/Commands.vala"
			_tmp8_ = _source_it;
#line 423 "/home/jens/Source/shotwell/src/Commands.vala"
			_tmp9_ = gee_iterator_get (_tmp8_);
#line 423 "/home/jens/Source/shotwell/src/Commands.vala"
			source = (DataSource*) _tmp9_;
#line 424 "/home/jens/Source/shotwell/src/Commands.vala"
			_tmp10_ = source;
#line 424 "/home/jens/Source/shotwell/src/Commands.vala"
			_tmp11_ = data_object_get_membership (G_TYPE_CHECK_INSTANCE_CAST (_tmp10_, TYPE_DATA_OBJECT, DataObject));
#line 424 "/home/jens/Source/shotwell/src/Commands.vala"
			_tmp12_ = G_TYPE_CHECK_INSTANCE_TYPE (_tmp11_, TYPE_SOURCE_COLLECTION) ? ((SourceCollection*) _tmp11_) : NULL;
#line 424 "/home/jens/Source/shotwell/src/Commands.vala"
			if (_tmp12_ == NULL) {
#line 424 "/home/jens/Source/shotwell/src/Commands.vala"
				_data_collection_unref0 (_tmp11_);
#line 5317 "Commands.c"
			}
#line 424 "/home/jens/Source/shotwell/src/Commands.vala"
			membership = _tmp12_;
#line 425 "/home/jens/Source/shotwell/src/Commands.vala"
			_tmp13_ = membership;
#line 425 "/home/jens/Source/shotwell/src/Commands.vala"
			if (_tmp13_ != NULL) {
#line 5325 "Commands.c"
				GeeHashSet* _tmp14_;
				SourceCollection* _tmp15_;
#line 426 "/home/jens/Source/shotwell/src/Commands.vala"
				_tmp14_ = self->priv->hooked_collections;
#line 426 "/home/jens/Source/shotwell/src/Commands.vala"
				_tmp15_ = membership;
#line 426 "/home/jens/Source/shotwell/src/Commands.vala"
				gee_abstract_collection_add (G_TYPE_CHECK_INSTANCE_CAST (_tmp14_, GEE_TYPE_ABSTRACT_COLLECTION, GeeAbstractCollection), _tmp15_);
#line 5334 "Commands.c"
			}
#line 423 "/home/jens/Source/shotwell/src/Commands.vala"
			_data_collection_unref0 (membership);
#line 423 "/home/jens/Source/shotwell/src/Commands.vala"
			_g_object_unref0 (source);
#line 5340 "Commands.c"
		}
#line 423 "/home/jens/Source/shotwell/src/Commands.vala"
		_g_object_unref0 (_source_it);
#line 5344 "Commands.c"
	}
	{
		GeeIterator* _source_collection_it = NULL;
		GeeHashSet* _tmp16_;
		GeeIterator* _tmp17_;
#line 429 "/home/jens/Source/shotwell/src/Commands.vala"
		_tmp16_ = self->priv->hooked_collections;
#line 429 "/home/jens/Source/shotwell/src/Commands.vala"
		_tmp17_ = gee_abstract_collection_iterator (G_TYPE_CHECK_INSTANCE_CAST (_tmp16_, GEE_TYPE_ABSTRACT_COLLECTION, GeeAbstractCollection));
#line 429 "/home/jens/Source/shotwell/src/Commands.vala"
		_source_collection_it = _tmp17_;
#line 429 "/home/jens/Source/shotwell/src/Commands.vala"
		while (TRUE) {
#line 5358 "Commands.c"
			GeeIterator* _tmp18_;
			gboolean _tmp19_;
			SourceCollection* source_collection = NULL;
			GeeIterator* _tmp20_;
			gpointer _tmp21_;
			SourceCollection* _tmp22_;
#line 429 "/home/jens/Source/shotwell/src/Commands.vala"
			_tmp18_ = _source_collection_it;
#line 429 "/home/jens/Source/shotwell/src/Commands.vala"
			_tmp19_ = gee_iterator_next (_tmp18_);
#line 429 "/home/jens/Source/shotwell/src/Commands.vala"
			if (!_tmp19_) {
#line 429 "/home/jens/Source/shotwell/src/Commands.vala"
				break;
#line 5373 "Commands.c"
			}
#line 429 "/home/jens/Source/shotwell/src/Commands.vala"
			_tmp20_ = _source_collection_it;
#line 429 "/home/jens/Source/shotwell/src/Commands.vala"
			_tmp21_ = gee_iterator_get (_tmp20_);
#line 429 "/home/jens/Source/shotwell/src/Commands.vala"
			source_collection = (SourceCollection*) _tmp21_;
#line 430 "/home/jens/Source/shotwell/src/Commands.vala"
			_tmp22_ = source_collection;
#line 430 "/home/jens/Source/shotwell/src/Commands.vala"
			g_signal_connect_object (_tmp22_, "items-destroyed", (GCallback) _multiple_data_source_at_once_command_on_sources_destroyed_source_collection_items_destroyed, self, 0);
#line 429 "/home/jens/Source/shotwell/src/Commands.vala"
			_data_collection_unref0 (source_collection);
#line 5387 "Commands.c"
		}
#line 429 "/home/jens/Source/shotwell/src/Commands.vala"
		_g_object_unref0 (_source_collection_it);
#line 5391 "Commands.c"
	}
#line 417 "/home/jens/Source/shotwell/src/Commands.vala"
	return self;
#line 5395 "Commands.c"
}


static void multiple_data_source_at_once_command_real_execute (Command* base) {
	MultipleDataSourceAtOnceCommand * self;
	AppWindow* _tmp0_;
	AppWindow* _tmp1_;
	MediaCollectionRegistry* _tmp2_;
	MediaCollectionRegistry* _tmp3_;
	GeeHashSet* _tmp4_;
	MediaCollectionRegistry* _tmp5_;
	MediaCollectionRegistry* _tmp6_;
	GError * _inner_error_ = NULL;
#line 438 "/home/jens/Source/shotwell/src/Commands.vala"
	self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_MULTIPLE_DATA_SOURCE_AT_ONCE_COMMAND, MultipleDataSourceAtOnceCommand);
#line 439 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp0_ = app_window_get_instance ();
#line 439 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp1_ = _tmp0_;
#line 439 "/home/jens/Source/shotwell/src/Commands.vala"
	page_window_set_busy_cursor (G_TYPE_CHECK_INSTANCE_CAST (_tmp1_, TYPE_PAGE_WINDOW, PageWindow));
#line 439 "/home/jens/Source/shotwell/src/Commands.vala"
	_g_object_unref0 (_tmp1_);
#line 441 "/home/jens/Source/shotwell/src/Commands.vala"
	database_table_begin_transaction ();
#line 442 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp2_ = media_collection_registry_get_instance ();
#line 442 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp3_ = _tmp2_;
#line 442 "/home/jens/Source/shotwell/src/Commands.vala"
	media_collection_registry_freeze_all (_tmp3_);
#line 442 "/home/jens/Source/shotwell/src/Commands.vala"
	_media_collection_registry_unref0 (_tmp3_);
#line 444 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp4_ = self->priv->sources;
#line 444 "/home/jens/Source/shotwell/src/Commands.vala"
	multiple_data_source_at_once_command_execute_on_all (self, G_TYPE_CHECK_INSTANCE_CAST (_tmp4_, GEE_TYPE_COLLECTION, GeeCollection));
#line 446 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp5_ = media_collection_registry_get_instance ();
#line 446 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp6_ = _tmp5_;
#line 446 "/home/jens/Source/shotwell/src/Commands.vala"
	media_collection_registry_thaw_all (_tmp6_);
#line 446 "/home/jens/Source/shotwell/src/Commands.vala"
	_media_collection_registry_unref0 (_tmp6_);
#line 5441 "Commands.c"
	{
#line 448 "/home/jens/Source/shotwell/src/Commands.vala"
		database_table_commit_transaction (&_inner_error_);
#line 448 "/home/jens/Source/shotwell/src/Commands.vala"
		if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 448 "/home/jens/Source/shotwell/src/Commands.vala"
			if (_inner_error_->domain == DATABASE_ERROR) {
#line 5449 "Commands.c"
				goto __catch456_database_error;
			}
			{
				AppWindow* _tmp7_;
				AppWindow* _tmp8_;
#line 452 "/home/jens/Source/shotwell/src/Commands.vala"
				_tmp7_ = app_window_get_instance ();
#line 452 "/home/jens/Source/shotwell/src/Commands.vala"
				_tmp8_ = _tmp7_;
#line 452 "/home/jens/Source/shotwell/src/Commands.vala"
				page_window_set_normal_cursor (G_TYPE_CHECK_INSTANCE_CAST (_tmp8_, TYPE_PAGE_WINDOW, PageWindow));
#line 452 "/home/jens/Source/shotwell/src/Commands.vala"
				_g_object_unref0 (_tmp8_);
#line 5463 "Commands.c"
			}
#line 448 "/home/jens/Source/shotwell/src/Commands.vala"
			g_critical ("file %s: line %d: unexpected error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
#line 448 "/home/jens/Source/shotwell/src/Commands.vala"
			g_clear_error (&_inner_error_);
#line 448 "/home/jens/Source/shotwell/src/Commands.vala"
			return;
#line 5471 "Commands.c"
		}
	}
	goto __finally456;
	__catch456_database_error:
	{
		GError* err = NULL;
		GError* _tmp9_;
#line 447 "/home/jens/Source/shotwell/src/Commands.vala"
		err = _inner_error_;
#line 447 "/home/jens/Source/shotwell/src/Commands.vala"
		_inner_error_ = NULL;
#line 450 "/home/jens/Source/shotwell/src/Commands.vala"
		_tmp9_ = err;
#line 450 "/home/jens/Source/shotwell/src/Commands.vala"
		app_window_database_error (_tmp9_);
#line 447 "/home/jens/Source/shotwell/src/Commands.vala"
		_g_error_free0 (err);
#line 5489 "Commands.c"
	}
	__finally456:
	{
		AppWindow* _tmp10_;
		AppWindow* _tmp11_;
#line 452 "/home/jens/Source/shotwell/src/Commands.vala"
		_tmp10_ = app_window_get_instance ();
#line 452 "/home/jens/Source/shotwell/src/Commands.vala"
		_tmp11_ = _tmp10_;
#line 452 "/home/jens/Source/shotwell/src/Commands.vala"
		page_window_set_normal_cursor (G_TYPE_CHECK_INSTANCE_CAST (_tmp11_, TYPE_PAGE_WINDOW, PageWindow));
#line 452 "/home/jens/Source/shotwell/src/Commands.vala"
		_g_object_unref0 (_tmp11_);
#line 5503 "Commands.c"
	}
#line 447 "/home/jens/Source/shotwell/src/Commands.vala"
	if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 447 "/home/jens/Source/shotwell/src/Commands.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 447 "/home/jens/Source/shotwell/src/Commands.vala"
		g_clear_error (&_inner_error_);
#line 447 "/home/jens/Source/shotwell/src/Commands.vala"
		return;
#line 5513 "Commands.c"
	}
}


static void multiple_data_source_at_once_command_real_execute_on_all (MultipleDataSourceAtOnceCommand* self, GeeCollection* sources) {
#line 456 "/home/jens/Source/shotwell/src/Commands.vala"
	g_critical ("Type `%s' does not implement abstract method `multiple_data_source_at_once_command_execute_on_all'", g_type_name (G_TYPE_FROM_INSTANCE (self)));
#line 456 "/home/jens/Source/shotwell/src/Commands.vala"
	return;
#line 5523 "Commands.c"
}


void multiple_data_source_at_once_command_execute_on_all (MultipleDataSourceAtOnceCommand* self, GeeCollection* sources) {
#line 456 "/home/jens/Source/shotwell/src/Commands.vala"
	g_return_if_fail (IS_MULTIPLE_DATA_SOURCE_AT_ONCE_COMMAND (self));
#line 456 "/home/jens/Source/shotwell/src/Commands.vala"
	MULTIPLE_DATA_SOURCE_AT_ONCE_COMMAND_GET_CLASS (self)->execute_on_all (self, sources);
#line 5532 "Commands.c"
}


static void multiple_data_source_at_once_command_real_undo (Command* base) {
	MultipleDataSourceAtOnceCommand * self;
	AppWindow* _tmp0_;
	AppWindow* _tmp1_;
	MediaCollectionRegistry* _tmp2_;
	MediaCollectionRegistry* _tmp3_;
	GeeHashSet* _tmp4_;
	MediaCollectionRegistry* _tmp5_;
	MediaCollectionRegistry* _tmp6_;
	GError * _inner_error_ = NULL;
#line 458 "/home/jens/Source/shotwell/src/Commands.vala"
	self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_MULTIPLE_DATA_SOURCE_AT_ONCE_COMMAND, MultipleDataSourceAtOnceCommand);
#line 459 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp0_ = app_window_get_instance ();
#line 459 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp1_ = _tmp0_;
#line 459 "/home/jens/Source/shotwell/src/Commands.vala"
	page_window_set_busy_cursor (G_TYPE_CHECK_INSTANCE_CAST (_tmp1_, TYPE_PAGE_WINDOW, PageWindow));
#line 459 "/home/jens/Source/shotwell/src/Commands.vala"
	_g_object_unref0 (_tmp1_);
#line 461 "/home/jens/Source/shotwell/src/Commands.vala"
	database_table_begin_transaction ();
#line 462 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp2_ = media_collection_registry_get_instance ();
#line 462 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp3_ = _tmp2_;
#line 462 "/home/jens/Source/shotwell/src/Commands.vala"
	media_collection_registry_freeze_all (_tmp3_);
#line 462 "/home/jens/Source/shotwell/src/Commands.vala"
	_media_collection_registry_unref0 (_tmp3_);
#line 464 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp4_ = self->priv->sources;
#line 464 "/home/jens/Source/shotwell/src/Commands.vala"
	multiple_data_source_at_once_command_undo_on_all (self, G_TYPE_CHECK_INSTANCE_CAST (_tmp4_, GEE_TYPE_COLLECTION, GeeCollection));
#line 466 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp5_ = media_collection_registry_get_instance ();
#line 466 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp6_ = _tmp5_;
#line 466 "/home/jens/Source/shotwell/src/Commands.vala"
	media_collection_registry_thaw_all (_tmp6_);
#line 466 "/home/jens/Source/shotwell/src/Commands.vala"
	_media_collection_registry_unref0 (_tmp6_);
#line 5578 "Commands.c"
	{
#line 468 "/home/jens/Source/shotwell/src/Commands.vala"
		database_table_commit_transaction (&_inner_error_);
#line 468 "/home/jens/Source/shotwell/src/Commands.vala"
		if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 468 "/home/jens/Source/shotwell/src/Commands.vala"
			if (_inner_error_->domain == DATABASE_ERROR) {
#line 5586 "Commands.c"
				goto __catch457_database_error;
			}
			{
				AppWindow* _tmp7_;
				AppWindow* _tmp8_;
#line 472 "/home/jens/Source/shotwell/src/Commands.vala"
				_tmp7_ = app_window_get_instance ();
#line 472 "/home/jens/Source/shotwell/src/Commands.vala"
				_tmp8_ = _tmp7_;
#line 472 "/home/jens/Source/shotwell/src/Commands.vala"
				page_window_set_normal_cursor (G_TYPE_CHECK_INSTANCE_CAST (_tmp8_, TYPE_PAGE_WINDOW, PageWindow));
#line 472 "/home/jens/Source/shotwell/src/Commands.vala"
				_g_object_unref0 (_tmp8_);
#line 5600 "Commands.c"
			}
#line 468 "/home/jens/Source/shotwell/src/Commands.vala"
			g_critical ("file %s: line %d: unexpected error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
#line 468 "/home/jens/Source/shotwell/src/Commands.vala"
			g_clear_error (&_inner_error_);
#line 468 "/home/jens/Source/shotwell/src/Commands.vala"
			return;
#line 5608 "Commands.c"
		}
	}
	goto __finally457;
	__catch457_database_error:
	{
		GError* err = NULL;
		GError* _tmp9_;
#line 467 "/home/jens/Source/shotwell/src/Commands.vala"
		err = _inner_error_;
#line 467 "/home/jens/Source/shotwell/src/Commands.vala"
		_inner_error_ = NULL;
#line 470 "/home/jens/Source/shotwell/src/Commands.vala"
		_tmp9_ = err;
#line 470 "/home/jens/Source/shotwell/src/Commands.vala"
		app_window_database_error (_tmp9_);
#line 467 "/home/jens/Source/shotwell/src/Commands.vala"
		_g_error_free0 (err);
#line 5626 "Commands.c"
	}
	__finally457:
	{
		AppWindow* _tmp10_;
		AppWindow* _tmp11_;
#line 472 "/home/jens/Source/shotwell/src/Commands.vala"
		_tmp10_ = app_window_get_instance ();
#line 472 "/home/jens/Source/shotwell/src/Commands.vala"
		_tmp11_ = _tmp10_;
#line 472 "/home/jens/Source/shotwell/src/Commands.vala"
		page_window_set_normal_cursor (G_TYPE_CHECK_INSTANCE_CAST (_tmp11_, TYPE_PAGE_WINDOW, PageWindow));
#line 472 "/home/jens/Source/shotwell/src/Commands.vala"
		_g_object_unref0 (_tmp11_);
#line 5640 "Commands.c"
	}
#line 467 "/home/jens/Source/shotwell/src/Commands.vala"
	if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 467 "/home/jens/Source/shotwell/src/Commands.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 467 "/home/jens/Source/shotwell/src/Commands.vala"
		g_clear_error (&_inner_error_);
#line 467 "/home/jens/Source/shotwell/src/Commands.vala"
		return;
#line 5650 "Commands.c"
	}
}


static void multiple_data_source_at_once_command_real_undo_on_all (MultipleDataSourceAtOnceCommand* self, GeeCollection* sources) {
#line 476 "/home/jens/Source/shotwell/src/Commands.vala"
	g_critical ("Type `%s' does not implement abstract method `multiple_data_source_at_once_command_undo_on_all'", g_type_name (G_TYPE_FROM_INSTANCE (self)));
#line 476 "/home/jens/Source/shotwell/src/Commands.vala"
	return;
#line 5660 "Commands.c"
}


void multiple_data_source_at_once_command_undo_on_all (MultipleDataSourceAtOnceCommand* self, GeeCollection* sources) {
#line 476 "/home/jens/Source/shotwell/src/Commands.vala"
	g_return_if_fail (IS_MULTIPLE_DATA_SOURCE_AT_ONCE_COMMAND (self));
#line 476 "/home/jens/Source/shotwell/src/Commands.vala"
	MULTIPLE_DATA_SOURCE_AT_ONCE_COMMAND_GET_CLASS (self)->undo_on_all (self, sources);
#line 5669 "Commands.c"
}


static void multiple_data_source_at_once_command_on_sources_destroyed (MultipleDataSourceAtOnceCommand* self, GeeCollection* destroyed) {
#line 478 "/home/jens/Source/shotwell/src/Commands.vala"
	g_return_if_fail (IS_MULTIPLE_DATA_SOURCE_AT_ONCE_COMMAND (self));
#line 478 "/home/jens/Source/shotwell/src/Commands.vala"
	g_return_if_fail (GEE_IS_COLLECTION (destroyed));
#line 5678 "Commands.c"
	{
		GeeIterator* _source_it = NULL;
		GeeCollection* _tmp0_;
		GeeIterator* _tmp1_;
#line 479 "/home/jens/Source/shotwell/src/Commands.vala"
		_tmp0_ = destroyed;
#line 479 "/home/jens/Source/shotwell/src/Commands.vala"
		_tmp1_ = gee_iterable_iterator (G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, GEE_TYPE_ITERABLE, GeeIterable));
#line 479 "/home/jens/Source/shotwell/src/Commands.vala"
		_source_it = _tmp1_;
#line 479 "/home/jens/Source/shotwell/src/Commands.vala"
		while (TRUE) {
#line 5691 "Commands.c"
			GeeIterator* _tmp2_;
			gboolean _tmp3_;
			DataSource* source = NULL;
			GeeIterator* _tmp4_;
			gpointer _tmp5_;
			GeeHashSet* _tmp6_;
			DataSource* _tmp7_;
			gboolean _tmp8_;
#line 479 "/home/jens/Source/shotwell/src/Commands.vala"
			_tmp2_ = _source_it;
#line 479 "/home/jens/Source/shotwell/src/Commands.vala"
			_tmp3_ = gee_iterator_next (_tmp2_);
#line 479 "/home/jens/Source/shotwell/src/Commands.vala"
			if (!_tmp3_) {
#line 479 "/home/jens/Source/shotwell/src/Commands.vala"
				break;
#line 5708 "Commands.c"
			}
#line 479 "/home/jens/Source/shotwell/src/Commands.vala"
			_tmp4_ = _source_it;
#line 479 "/home/jens/Source/shotwell/src/Commands.vala"
			_tmp5_ = gee_iterator_get (_tmp4_);
#line 479 "/home/jens/Source/shotwell/src/Commands.vala"
			source = (DataSource*) _tmp5_;
#line 480 "/home/jens/Source/shotwell/src/Commands.vala"
			_tmp6_ = self->priv->sources;
#line 480 "/home/jens/Source/shotwell/src/Commands.vala"
			_tmp7_ = source;
#line 480 "/home/jens/Source/shotwell/src/Commands.vala"
			_tmp8_ = gee_abstract_collection_contains (G_TYPE_CHECK_INSTANCE_CAST (_tmp6_, GEE_TYPE_ABSTRACT_COLLECTION, GeeAbstractCollection), _tmp7_);
#line 480 "/home/jens/Source/shotwell/src/Commands.vala"
			if (_tmp8_) {
#line 5724 "Commands.c"
				CommandManager* _tmp9_;
				CommandManager* _tmp10_;
#line 481 "/home/jens/Source/shotwell/src/Commands.vala"
				_tmp9_ = command_get_command_manager (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_COMMAND, Command));
#line 481 "/home/jens/Source/shotwell/src/Commands.vala"
				_tmp10_ = _tmp9_;
#line 481 "/home/jens/Source/shotwell/src/Commands.vala"
				command_manager_reset (_tmp10_);
#line 481 "/home/jens/Source/shotwell/src/Commands.vala"
				_command_manager_unref0 (_tmp10_);
#line 483 "/home/jens/Source/shotwell/src/Commands.vala"
				_g_object_unref0 (source);
#line 483 "/home/jens/Source/shotwell/src/Commands.vala"
				break;
#line 5739 "Commands.c"
			}
#line 479 "/home/jens/Source/shotwell/src/Commands.vala"
			_g_object_unref0 (source);
#line 5743 "Commands.c"
		}
#line 479 "/home/jens/Source/shotwell/src/Commands.vala"
		_g_object_unref0 (_source_it);
#line 5747 "Commands.c"
	}
}


static void multiple_data_source_at_once_command_class_init (MultipleDataSourceAtOnceCommandClass * klass) {
#line 413 "/home/jens/Source/shotwell/src/Commands.vala"
	multiple_data_source_at_once_command_parent_class = g_type_class_peek_parent (klass);
#line 413 "/home/jens/Source/shotwell/src/Commands.vala"
	g_type_class_add_private (klass, sizeof (MultipleDataSourceAtOnceCommandPrivate));
#line 413 "/home/jens/Source/shotwell/src/Commands.vala"
	((CommandClass *) klass)->execute = (void (*) (Command *)) multiple_data_source_at_once_command_real_execute;
#line 413 "/home/jens/Source/shotwell/src/Commands.vala"
	((MultipleDataSourceAtOnceCommandClass *) klass)->execute_on_all = (void (*) (MultipleDataSourceAtOnceCommand *, GeeCollection*)) multiple_data_source_at_once_command_real_execute_on_all;
#line 413 "/home/jens/Source/shotwell/src/Commands.vala"
	((CommandClass *) klass)->undo = (void (*) (Command *)) multiple_data_source_at_once_command_real_undo;
#line 413 "/home/jens/Source/shotwell/src/Commands.vala"
	((MultipleDataSourceAtOnceCommandClass *) klass)->undo_on_all = (void (*) (MultipleDataSourceAtOnceCommand *, GeeCollection*)) multiple_data_source_at_once_command_real_undo_on_all;
#line 413 "/home/jens/Source/shotwell/src/Commands.vala"
	G_OBJECT_CLASS (klass)->finalize = multiple_data_source_at_once_command_finalize;
#line 5767 "Commands.c"
}


static void multiple_data_source_at_once_command_instance_init (MultipleDataSourceAtOnceCommand * self) {
	GeeHashSet* _tmp0_;
	GeeHashSet* _tmp1_;
#line 413 "/home/jens/Source/shotwell/src/Commands.vala"
	self->priv = MULTIPLE_DATA_SOURCE_AT_ONCE_COMMAND_GET_PRIVATE (self);
#line 414 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp0_ = gee_hash_set_new (TYPE_DATA_SOURCE, (GBoxedCopyFunc) g_object_ref, (GDestroyNotify) g_object_unref, NULL, NULL, NULL, NULL, NULL, NULL);
#line 414 "/home/jens/Source/shotwell/src/Commands.vala"
	self->priv->sources = _tmp0_;
#line 415 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp1_ = gee_hash_set_new (TYPE_SOURCE_COLLECTION, (GBoxedCopyFunc) data_collection_ref, (GDestroyNotify) data_collection_unref, NULL, NULL, NULL, NULL, NULL, NULL);
#line 415 "/home/jens/Source/shotwell/src/Commands.vala"
	self->priv->hooked_collections = _tmp1_;
#line 5784 "Commands.c"
}


static void multiple_data_source_at_once_command_finalize (GObject * obj) {
	MultipleDataSourceAtOnceCommand * self;
#line 413 "/home/jens/Source/shotwell/src/Commands.vala"
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, TYPE_MULTIPLE_DATA_SOURCE_AT_ONCE_COMMAND, MultipleDataSourceAtOnceCommand);
#line 5792 "Commands.c"
	{
		GeeIterator* _source_collection_it = NULL;
		GeeHashSet* _tmp0_;
		GeeIterator* _tmp1_;
#line 434 "/home/jens/Source/shotwell/src/Commands.vala"
		_tmp0_ = self->priv->hooked_collections;
#line 434 "/home/jens/Source/shotwell/src/Commands.vala"
		_tmp1_ = gee_abstract_collection_iterator (G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, GEE_TYPE_ABSTRACT_COLLECTION, GeeAbstractCollection));
#line 434 "/home/jens/Source/shotwell/src/Commands.vala"
		_source_collection_it = _tmp1_;
#line 434 "/home/jens/Source/shotwell/src/Commands.vala"
		while (TRUE) {
#line 5805 "Commands.c"
			GeeIterator* _tmp2_;
			gboolean _tmp3_;
			SourceCollection* source_collection = NULL;
			GeeIterator* _tmp4_;
			gpointer _tmp5_;
			SourceCollection* _tmp6_;
			guint _tmp7_;
#line 434 "/home/jens/Source/shotwell/src/Commands.vala"
			_tmp2_ = _source_collection_it;
#line 434 "/home/jens/Source/shotwell/src/Commands.vala"
			_tmp3_ = gee_iterator_next (_tmp2_);
#line 434 "/home/jens/Source/shotwell/src/Commands.vala"
			if (!_tmp3_) {
#line 434 "/home/jens/Source/shotwell/src/Commands.vala"
				break;
#line 5821 "Commands.c"
			}
#line 434 "/home/jens/Source/shotwell/src/Commands.vala"
			_tmp4_ = _source_collection_it;
#line 434 "/home/jens/Source/shotwell/src/Commands.vala"
			_tmp5_ = gee_iterator_get (_tmp4_);
#line 434 "/home/jens/Source/shotwell/src/Commands.vala"
			source_collection = (SourceCollection*) _tmp5_;
#line 435 "/home/jens/Source/shotwell/src/Commands.vala"
			_tmp6_ = source_collection;
#line 435 "/home/jens/Source/shotwell/src/Commands.vala"
			g_signal_parse_name ("items-destroyed", TYPE_SOURCE_COLLECTION, &_tmp7_, NULL, FALSE);
#line 435 "/home/jens/Source/shotwell/src/Commands.vala"
			g_signal_handlers_disconnect_matched (_tmp6_, G_SIGNAL_MATCH_ID | G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA, _tmp7_, 0, NULL, (GCallback) _multiple_data_source_at_once_command_on_sources_destroyed_source_collection_items_destroyed, self);
#line 434 "/home/jens/Source/shotwell/src/Commands.vala"
			_data_collection_unref0 (source_collection);
#line 5837 "Commands.c"
		}
#line 434 "/home/jens/Source/shotwell/src/Commands.vala"
		_g_object_unref0 (_source_collection_it);
#line 5841 "Commands.c"
	}
#line 414 "/home/jens/Source/shotwell/src/Commands.vala"
	_g_object_unref0 (self->priv->sources);
#line 415 "/home/jens/Source/shotwell/src/Commands.vala"
	_g_object_unref0 (self->priv->hooked_collections);
#line 413 "/home/jens/Source/shotwell/src/Commands.vala"
	G_OBJECT_CLASS (multiple_data_source_at_once_command_parent_class)->finalize (obj);
#line 5849 "Commands.c"
}


GType multiple_data_source_at_once_command_get_type (void) {
	static volatile gsize multiple_data_source_at_once_command_type_id__volatile = 0;
	if (g_once_init_enter (&multiple_data_source_at_once_command_type_id__volatile)) {
		static const GTypeInfo g_define_type_info = { sizeof (MultipleDataSourceAtOnceCommandClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) multiple_data_source_at_once_command_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (MultipleDataSourceAtOnceCommand), 0, (GInstanceInitFunc) multiple_data_source_at_once_command_instance_init, NULL };
		GType multiple_data_source_at_once_command_type_id;
		multiple_data_source_at_once_command_type_id = g_type_register_static (TYPE_PAGE_COMMAND, "MultipleDataSourceAtOnceCommand", &g_define_type_info, G_TYPE_FLAG_ABSTRACT);
		g_once_init_leave (&multiple_data_source_at_once_command_type_id__volatile, multiple_data_source_at_once_command_type_id);
	}
	return multiple_data_source_at_once_command_type_id__volatile;
}


static void _multiple_photo_transformation_command_on_state_broken_photo_transformation_state_broken (PhotoTransformationState* _sender, gpointer self) {
#line 508 "/home/jens/Source/shotwell/src/Commands.vala"
	multiple_photo_transformation_command_on_state_broken ((MultiplePhotoTransformationCommand*) self);
#line 5868 "Commands.c"
}


MultiplePhotoTransformationCommand* multiple_photo_transformation_command_construct (GType object_type, GeeIterable* iter, const gchar* progress_text, const gchar* undo_progress_text, const gchar* name, const gchar* explanation) {
	MultiplePhotoTransformationCommand * self = NULL;
	GeeIterable* _tmp0_;
	const gchar* _tmp1_;
	const gchar* _tmp2_;
	const gchar* _tmp3_;
	const gchar* _tmp4_;
#line 493 "/home/jens/Source/shotwell/src/Commands.vala"
	g_return_val_if_fail (GEE_IS_ITERABLE (iter), NULL);
#line 493 "/home/jens/Source/shotwell/src/Commands.vala"
	g_return_val_if_fail (progress_text != NULL, NULL);
#line 493 "/home/jens/Source/shotwell/src/Commands.vala"
	g_return_val_if_fail (undo_progress_text != NULL, NULL);
#line 493 "/home/jens/Source/shotwell/src/Commands.vala"
	g_return_val_if_fail (name != NULL, NULL);
#line 493 "/home/jens/Source/shotwell/src/Commands.vala"
	g_return_val_if_fail (explanation != NULL, NULL);
#line 495 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp0_ = iter;
#line 495 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp1_ = progress_text;
#line 495 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp2_ = undo_progress_text;
#line 495 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp3_ = name;
#line 495 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp4_ = explanation;
#line 495 "/home/jens/Source/shotwell/src/Commands.vala"
	self = (MultiplePhotoTransformationCommand*) multiple_data_source_command_construct (object_type, _tmp0_, _tmp1_, _tmp2_, _tmp3_, _tmp4_);
#line 5901 "Commands.c"
	{
		GeeArrayList* _source_list = NULL;
		GeeArrayList* _tmp5_;
		GeeArrayList* _tmp6_;
		gint _source_size = 0;
		GeeArrayList* _tmp7_;
		gint _tmp8_;
		gint _tmp9_;
		gint _source_index = 0;
#line 497 "/home/jens/Source/shotwell/src/Commands.vala"
		_tmp5_ = G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_MULTIPLE_DATA_SOURCE_COMMAND, MultipleDataSourceCommand)->source_list;
#line 497 "/home/jens/Source/shotwell/src/Commands.vala"
		_tmp6_ = _g_object_ref0 (_tmp5_);
#line 497 "/home/jens/Source/shotwell/src/Commands.vala"
		_source_list = _tmp6_;
#line 497 "/home/jens/Source/shotwell/src/Commands.vala"
		_tmp7_ = _source_list;
#line 497 "/home/jens/Source/shotwell/src/Commands.vala"
		_tmp8_ = gee_abstract_collection_get_size (G_TYPE_CHECK_INSTANCE_CAST (_tmp7_, GEE_TYPE_ABSTRACT_COLLECTION, GeeAbstractCollection));
#line 497 "/home/jens/Source/shotwell/src/Commands.vala"
		_tmp9_ = _tmp8_;
#line 497 "/home/jens/Source/shotwell/src/Commands.vala"
		_source_size = _tmp9_;
#line 497 "/home/jens/Source/shotwell/src/Commands.vala"
		_source_index = -1;
#line 497 "/home/jens/Source/shotwell/src/Commands.vala"
		while (TRUE) {
#line 5929 "Commands.c"
			gint _tmp10_;
			gint _tmp11_;
			gint _tmp12_;
			DataSource* source = NULL;
			GeeArrayList* _tmp13_;
			gint _tmp14_;
			gpointer _tmp15_;
			Photo* photo = NULL;
			DataSource* _tmp16_;
			Photo* _tmp17_;
			PhotoTransformationState* state = NULL;
			Photo* _tmp18_;
			PhotoTransformationState* _tmp19_;
			PhotoTransformationState* _tmp20_;
			GeeHashMap* _tmp21_;
			Photo* _tmp22_;
			PhotoTransformationState* _tmp23_;
#line 497 "/home/jens/Source/shotwell/src/Commands.vala"
			_tmp10_ = _source_index;
#line 497 "/home/jens/Source/shotwell/src/Commands.vala"
			_source_index = _tmp10_ + 1;
#line 497 "/home/jens/Source/shotwell/src/Commands.vala"
			_tmp11_ = _source_index;
#line 497 "/home/jens/Source/shotwell/src/Commands.vala"
			_tmp12_ = _source_size;
#line 497 "/home/jens/Source/shotwell/src/Commands.vala"
			if (!(_tmp11_ < _tmp12_)) {
#line 497 "/home/jens/Source/shotwell/src/Commands.vala"
				break;
#line 5959 "Commands.c"
			}
#line 497 "/home/jens/Source/shotwell/src/Commands.vala"
			_tmp13_ = _source_list;
#line 497 "/home/jens/Source/shotwell/src/Commands.vala"
			_tmp14_ = _source_index;
#line 497 "/home/jens/Source/shotwell/src/Commands.vala"
			_tmp15_ = gee_abstract_list_get (G_TYPE_CHECK_INSTANCE_CAST (_tmp13_, GEE_TYPE_ABSTRACT_LIST, GeeAbstractList), _tmp14_);
#line 497 "/home/jens/Source/shotwell/src/Commands.vala"
			source = (DataSource*) _tmp15_;
#line 498 "/home/jens/Source/shotwell/src/Commands.vala"
			_tmp16_ = source;
#line 498 "/home/jens/Source/shotwell/src/Commands.vala"
			_tmp17_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_CAST (_tmp16_, TYPE_PHOTO, Photo));
#line 498 "/home/jens/Source/shotwell/src/Commands.vala"
			photo = _tmp17_;
#line 499 "/home/jens/Source/shotwell/src/Commands.vala"
			_tmp18_ = photo;
#line 499 "/home/jens/Source/shotwell/src/Commands.vala"
			_tmp19_ = photo_save_transformation_state (_tmp18_);
#line 499 "/home/jens/Source/shotwell/src/Commands.vala"
			state = _tmp19_;
#line 500 "/home/jens/Source/shotwell/src/Commands.vala"
			_tmp20_ = state;
#line 500 "/home/jens/Source/shotwell/src/Commands.vala"
			g_signal_connect_object (_tmp20_, "broken", (GCallback) _multiple_photo_transformation_command_on_state_broken_photo_transformation_state_broken, self, 0);
#line 502 "/home/jens/Source/shotwell/src/Commands.vala"
			_tmp21_ = self->priv->map;
#line 502 "/home/jens/Source/shotwell/src/Commands.vala"
			_tmp22_ = photo;
#line 502 "/home/jens/Source/shotwell/src/Commands.vala"
			_tmp23_ = state;
#line 502 "/home/jens/Source/shotwell/src/Commands.vala"
			gee_abstract_map_set (G_TYPE_CHECK_INSTANCE_CAST (_tmp21_, GEE_TYPE_ABSTRACT_MAP, GeeAbstractMap), _tmp22_, _tmp23_);
#line 497 "/home/jens/Source/shotwell/src/Commands.vala"
			_g_object_unref0 (state);
#line 497 "/home/jens/Source/shotwell/src/Commands.vala"
			_g_object_unref0 (photo);
#line 497 "/home/jens/Source/shotwell/src/Commands.vala"
			_g_object_unref0 (source);
#line 5999 "Commands.c"
		}
#line 497 "/home/jens/Source/shotwell/src/Commands.vala"
		_g_object_unref0 (_source_list);
#line 6003 "Commands.c"
	}
#line 493 "/home/jens/Source/shotwell/src/Commands.vala"
	return self;
#line 6007 "Commands.c"
}


static void multiple_photo_transformation_command_real_undo_on_source (MultipleDataSourceCommand* base, DataSource* source) {
	MultiplePhotoTransformationCommand * self;
	Photo* photo = NULL;
	DataSource* _tmp0_;
	Photo* _tmp1_;
	PhotoTransformationState* state = NULL;
	GeeHashMap* _tmp2_;
	gpointer _tmp3_;
#line 511 "/home/jens/Source/shotwell/src/Commands.vala"
	self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_MULTIPLE_PHOTO_TRANSFORMATION_COMMAND, MultiplePhotoTransformationCommand);
#line 511 "/home/jens/Source/shotwell/src/Commands.vala"
	g_return_if_fail (IS_DATA_SOURCE (source));
#line 512 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp0_ = source;
#line 512 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp1_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, TYPE_PHOTO, Photo));
#line 512 "/home/jens/Source/shotwell/src/Commands.vala"
	photo = _tmp1_;
#line 514 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp2_ = self->priv->map;
#line 514 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp3_ = gee_abstract_map_get (G_TYPE_CHECK_INSTANCE_CAST (_tmp2_, GEE_TYPE_ABSTRACT_MAP, GeeAbstractMap), photo);
#line 514 "/home/jens/Source/shotwell/src/Commands.vala"
	state = (PhotoTransformationState*) _tmp3_;
#line 515 "/home/jens/Source/shotwell/src/Commands.vala"
	_vala_assert (state != NULL, "state != null");
#line 517 "/home/jens/Source/shotwell/src/Commands.vala"
	photo_load_transformation_state (photo, state);
#line 511 "/home/jens/Source/shotwell/src/Commands.vala"
	_g_object_unref0 (state);
#line 511 "/home/jens/Source/shotwell/src/Commands.vala"
	_g_object_unref0 (photo);
#line 6043 "Commands.c"
}


static void multiple_photo_transformation_command_on_state_broken (MultiplePhotoTransformationCommand* self) {
	CommandManager* _tmp0_;
	CommandManager* _tmp1_;
#line 520 "/home/jens/Source/shotwell/src/Commands.vala"
	g_return_if_fail (IS_MULTIPLE_PHOTO_TRANSFORMATION_COMMAND (self));
#line 521 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp0_ = command_get_command_manager (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_COMMAND, Command));
#line 521 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp1_ = _tmp0_;
#line 521 "/home/jens/Source/shotwell/src/Commands.vala"
	command_manager_reset (_tmp1_);
#line 521 "/home/jens/Source/shotwell/src/Commands.vala"
	_command_manager_unref0 (_tmp1_);
#line 6060 "Commands.c"
}


static void multiple_photo_transformation_command_class_init (MultiplePhotoTransformationCommandClass * klass) {
#line 489 "/home/jens/Source/shotwell/src/Commands.vala"
	multiple_photo_transformation_command_parent_class = g_type_class_peek_parent (klass);
#line 489 "/home/jens/Source/shotwell/src/Commands.vala"
	g_type_class_add_private (klass, sizeof (MultiplePhotoTransformationCommandPrivate));
#line 489 "/home/jens/Source/shotwell/src/Commands.vala"
	((MultipleDataSourceCommandClass *) klass)->undo_on_source = (void (*) (MultipleDataSourceCommand *, DataSource*)) multiple_photo_transformation_command_real_undo_on_source;
#line 489 "/home/jens/Source/shotwell/src/Commands.vala"
	G_OBJECT_CLASS (klass)->finalize = multiple_photo_transformation_command_finalize;
#line 6073 "Commands.c"
}


static void multiple_photo_transformation_command_instance_init (MultiplePhotoTransformationCommand * self) {
	GeeHashMap* _tmp0_;
#line 489 "/home/jens/Source/shotwell/src/Commands.vala"
	self->priv = MULTIPLE_PHOTO_TRANSFORMATION_COMMAND_GET_PRIVATE (self);
#line 490 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp0_ = gee_hash_map_new (TYPE_PHOTO, (GBoxedCopyFunc) g_object_ref, (GDestroyNotify) g_object_unref, TYPE_PHOTO_TRANSFORMATION_STATE, (GBoxedCopyFunc) g_object_ref, (GDestroyNotify) g_object_unref, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
#line 490 "/home/jens/Source/shotwell/src/Commands.vala"
	self->priv->map = _tmp0_;
#line 6085 "Commands.c"
}


static void multiple_photo_transformation_command_finalize (GObject * obj) {
	MultiplePhotoTransformationCommand * self;
#line 489 "/home/jens/Source/shotwell/src/Commands.vala"
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, TYPE_MULTIPLE_PHOTO_TRANSFORMATION_COMMAND, MultiplePhotoTransformationCommand);
#line 6093 "Commands.c"
	{
		GeeIterator* _state_it = NULL;
		GeeHashMap* _tmp0_;
		GeeCollection* _tmp1_;
		GeeCollection* _tmp2_;
		GeeCollection* _tmp3_;
		GeeIterator* _tmp4_;
		GeeIterator* _tmp5_;
#line 507 "/home/jens/Source/shotwell/src/Commands.vala"
		_tmp0_ = self->priv->map;
#line 507 "/home/jens/Source/shotwell/src/Commands.vala"
		_tmp1_ = gee_abstract_map_get_values (G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, GEE_TYPE_ABSTRACT_MAP, GeeAbstractMap));
#line 507 "/home/jens/Source/shotwell/src/Commands.vala"
		_tmp2_ = _tmp1_;
#line 507 "/home/jens/Source/shotwell/src/Commands.vala"
		_tmp3_ = _tmp2_;
#line 507 "/home/jens/Source/shotwell/src/Commands.vala"
		_tmp4_ = gee_iterable_iterator (G_TYPE_CHECK_INSTANCE_CAST (_tmp3_, GEE_TYPE_ITERABLE, GeeIterable));
#line 507 "/home/jens/Source/shotwell/src/Commands.vala"
		_tmp5_ = _tmp4_;
#line 507 "/home/jens/Source/shotwell/src/Commands.vala"
		_g_object_unref0 (_tmp3_);
#line 507 "/home/jens/Source/shotwell/src/Commands.vala"
		_state_it = _tmp5_;
#line 507 "/home/jens/Source/shotwell/src/Commands.vala"
		while (TRUE) {
#line 6120 "Commands.c"
			GeeIterator* _tmp6_;
			gboolean _tmp7_;
			PhotoTransformationState* state = NULL;
			GeeIterator* _tmp8_;
			gpointer _tmp9_;
			PhotoTransformationState* _tmp10_;
			guint _tmp11_;
#line 507 "/home/jens/Source/shotwell/src/Commands.vala"
			_tmp6_ = _state_it;
#line 507 "/home/jens/Source/shotwell/src/Commands.vala"
			_tmp7_ = gee_iterator_next (_tmp6_);
#line 507 "/home/jens/Source/shotwell/src/Commands.vala"
			if (!_tmp7_) {
#line 507 "/home/jens/Source/shotwell/src/Commands.vala"
				break;
#line 6136 "Commands.c"
			}
#line 507 "/home/jens/Source/shotwell/src/Commands.vala"
			_tmp8_ = _state_it;
#line 507 "/home/jens/Source/shotwell/src/Commands.vala"
			_tmp9_ = gee_iterator_get (_tmp8_);
#line 507 "/home/jens/Source/shotwell/src/Commands.vala"
			state = (PhotoTransformationState*) _tmp9_;
#line 508 "/home/jens/Source/shotwell/src/Commands.vala"
			_tmp10_ = state;
#line 508 "/home/jens/Source/shotwell/src/Commands.vala"
			g_signal_parse_name ("broken", TYPE_PHOTO_TRANSFORMATION_STATE, &_tmp11_, NULL, FALSE);
#line 508 "/home/jens/Source/shotwell/src/Commands.vala"
			g_signal_handlers_disconnect_matched (_tmp10_, G_SIGNAL_MATCH_ID | G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA, _tmp11_, 0, NULL, (GCallback) _multiple_photo_transformation_command_on_state_broken_photo_transformation_state_broken, self);
#line 507 "/home/jens/Source/shotwell/src/Commands.vala"
			_g_object_unref0 (state);
#line 6152 "Commands.c"
		}
#line 507 "/home/jens/Source/shotwell/src/Commands.vala"
		_g_object_unref0 (_state_it);
#line 6156 "Commands.c"
	}
#line 490 "/home/jens/Source/shotwell/src/Commands.vala"
	_g_object_unref0 (self->priv->map);
#line 489 "/home/jens/Source/shotwell/src/Commands.vala"
	G_OBJECT_CLASS (multiple_photo_transformation_command_parent_class)->finalize (obj);
#line 6162 "Commands.c"
}


GType multiple_photo_transformation_command_get_type (void) {
	static volatile gsize multiple_photo_transformation_command_type_id__volatile = 0;
	if (g_once_init_enter (&multiple_photo_transformation_command_type_id__volatile)) {
		static const GTypeInfo g_define_type_info = { sizeof (MultiplePhotoTransformationCommandClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) multiple_photo_transformation_command_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (MultiplePhotoTransformationCommand), 0, (GInstanceInitFunc) multiple_photo_transformation_command_instance_init, NULL };
		GType multiple_photo_transformation_command_type_id;
		multiple_photo_transformation_command_type_id = g_type_register_static (TYPE_MULTIPLE_DATA_SOURCE_COMMAND, "MultiplePhotoTransformationCommand", &g_define_type_info, G_TYPE_FLAG_ABSTRACT);
		g_once_init_leave (&multiple_photo_transformation_command_type_id__volatile, multiple_photo_transformation_command_type_id);
	}
	return multiple_photo_transformation_command_type_id__volatile;
}


RotateSingleCommand* rotate_single_command_construct (GType object_type, Photo* photo, Rotation rotation, const gchar* name, const gchar* explanation) {
	RotateSingleCommand * self = NULL;
	Photo* _tmp0_;
	const gchar* _tmp1_;
	const gchar* _tmp2_;
	Rotation _tmp3_;
#line 528 "/home/jens/Source/shotwell/src/Commands.vala"
	g_return_val_if_fail (IS_PHOTO (photo), NULL);
#line 528 "/home/jens/Source/shotwell/src/Commands.vala"
	g_return_val_if_fail (name != NULL, NULL);
#line 528 "/home/jens/Source/shotwell/src/Commands.vala"
	g_return_val_if_fail (explanation != NULL, NULL);
#line 529 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp0_ = photo;
#line 529 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp1_ = name;
#line 529 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp2_ = explanation;
#line 529 "/home/jens/Source/shotwell/src/Commands.vala"
	self = (RotateSingleCommand*) single_data_source_command_construct (object_type, G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, TYPE_DATA_SOURCE, DataSource), _tmp1_, _tmp2_);
#line 531 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp3_ = rotation;
#line 531 "/home/jens/Source/shotwell/src/Commands.vala"
	self->priv->rotation = _tmp3_;
#line 528 "/home/jens/Source/shotwell/src/Commands.vala"
	return self;
#line 6204 "Commands.c"
}


RotateSingleCommand* rotate_single_command_new (Photo* photo, Rotation rotation, const gchar* name, const gchar* explanation) {
#line 528 "/home/jens/Source/shotwell/src/Commands.vala"
	return rotate_single_command_construct (TYPE_ROTATE_SINGLE_COMMAND, photo, rotation, name, explanation);
#line 6211 "Commands.c"
}


static void rotate_single_command_real_execute (Command* base) {
	RotateSingleCommand * self;
	DataSource* _tmp0_;
	Rotation _tmp1_;
#line 534 "/home/jens/Source/shotwell/src/Commands.vala"
	self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_ROTATE_SINGLE_COMMAND, RotateSingleCommand);
#line 535 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp0_ = G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_SINGLE_DATA_SOURCE_COMMAND, SingleDataSourceCommand)->source;
#line 535 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp1_ = self->priv->rotation;
#line 535 "/home/jens/Source/shotwell/src/Commands.vala"
	photo_rotate (G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, TYPE_PHOTO, Photo), _tmp1_);
#line 6227 "Commands.c"
}


static void rotate_single_command_real_undo (Command* base) {
	RotateSingleCommand * self;
	DataSource* _tmp0_;
	Rotation _tmp1_;
	Rotation _tmp2_;
#line 538 "/home/jens/Source/shotwell/src/Commands.vala"
	self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_ROTATE_SINGLE_COMMAND, RotateSingleCommand);
#line 539 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp0_ = G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_SINGLE_DATA_SOURCE_COMMAND, SingleDataSourceCommand)->source;
#line 539 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp1_ = self->priv->rotation;
#line 539 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp2_ = rotation_opposite (_tmp1_);
#line 539 "/home/jens/Source/shotwell/src/Commands.vala"
	photo_rotate (G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, TYPE_PHOTO, Photo), _tmp2_);
#line 6246 "Commands.c"
}


static void rotate_single_command_class_init (RotateSingleCommandClass * klass) {
#line 525 "/home/jens/Source/shotwell/src/Commands.vala"
	rotate_single_command_parent_class = g_type_class_peek_parent (klass);
#line 525 "/home/jens/Source/shotwell/src/Commands.vala"
	g_type_class_add_private (klass, sizeof (RotateSingleCommandPrivate));
#line 525 "/home/jens/Source/shotwell/src/Commands.vala"
	((CommandClass *) klass)->execute = (void (*) (Command *)) rotate_single_command_real_execute;
#line 525 "/home/jens/Source/shotwell/src/Commands.vala"
	((CommandClass *) klass)->undo = (void (*) (Command *)) rotate_single_command_real_undo;
#line 525 "/home/jens/Source/shotwell/src/Commands.vala"
	G_OBJECT_CLASS (klass)->finalize = rotate_single_command_finalize;
#line 6261 "Commands.c"
}


static void rotate_single_command_instance_init (RotateSingleCommand * self) {
#line 525 "/home/jens/Source/shotwell/src/Commands.vala"
	self->priv = ROTATE_SINGLE_COMMAND_GET_PRIVATE (self);
#line 6268 "Commands.c"
}


static void rotate_single_command_finalize (GObject * obj) {
	RotateSingleCommand * self;
#line 525 "/home/jens/Source/shotwell/src/Commands.vala"
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, TYPE_ROTATE_SINGLE_COMMAND, RotateSingleCommand);
#line 525 "/home/jens/Source/shotwell/src/Commands.vala"
	G_OBJECT_CLASS (rotate_single_command_parent_class)->finalize (obj);
#line 6278 "Commands.c"
}


GType rotate_single_command_get_type (void) {
	static volatile gsize rotate_single_command_type_id__volatile = 0;
	if (g_once_init_enter (&rotate_single_command_type_id__volatile)) {
		static const GTypeInfo g_define_type_info = { sizeof (RotateSingleCommandClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) rotate_single_command_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (RotateSingleCommand), 0, (GInstanceInitFunc) rotate_single_command_instance_init, NULL };
		GType rotate_single_command_type_id;
		rotate_single_command_type_id = g_type_register_static (TYPE_SINGLE_DATA_SOURCE_COMMAND, "RotateSingleCommand", &g_define_type_info, 0);
		g_once_init_leave (&rotate_single_command_type_id__volatile, rotate_single_command_type_id);
	}
	return rotate_single_command_type_id__volatile;
}


RotateMultipleCommand* rotate_multiple_command_construct (GType object_type, GeeIterable* iter, Rotation rotation, const gchar* name, const gchar* explanation, const gchar* progress_text, const gchar* undo_progress_text) {
	RotateMultipleCommand * self = NULL;
	GeeIterable* _tmp0_;
	const gchar* _tmp1_;
	const gchar* _tmp2_;
	const gchar* _tmp3_;
	const gchar* _tmp4_;
	Rotation _tmp5_;
#line 546 "/home/jens/Source/shotwell/src/Commands.vala"
	g_return_val_if_fail (GEE_IS_ITERABLE (iter), NULL);
#line 546 "/home/jens/Source/shotwell/src/Commands.vala"
	g_return_val_if_fail (name != NULL, NULL);
#line 546 "/home/jens/Source/shotwell/src/Commands.vala"
	g_return_val_if_fail (explanation != NULL, NULL);
#line 546 "/home/jens/Source/shotwell/src/Commands.vala"
	g_return_val_if_fail (progress_text != NULL, NULL);
#line 546 "/home/jens/Source/shotwell/src/Commands.vala"
	g_return_val_if_fail (undo_progress_text != NULL, NULL);
#line 548 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp0_ = iter;
#line 548 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp1_ = progress_text;
#line 548 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp2_ = undo_progress_text;
#line 548 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp3_ = name;
#line 548 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp4_ = explanation;
#line 548 "/home/jens/Source/shotwell/src/Commands.vala"
	self = (RotateMultipleCommand*) multiple_data_source_command_construct (object_type, _tmp0_, _tmp1_, _tmp2_, _tmp3_, _tmp4_);
#line 550 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp5_ = rotation;
#line 550 "/home/jens/Source/shotwell/src/Commands.vala"
	self->priv->rotation = _tmp5_;
#line 546 "/home/jens/Source/shotwell/src/Commands.vala"
	return self;
#line 6330 "Commands.c"
}


RotateMultipleCommand* rotate_multiple_command_new (GeeIterable* iter, Rotation rotation, const gchar* name, const gchar* explanation, const gchar* progress_text, const gchar* undo_progress_text) {
#line 546 "/home/jens/Source/shotwell/src/Commands.vala"
	return rotate_multiple_command_construct (TYPE_ROTATE_MULTIPLE_COMMAND, iter, rotation, name, explanation, progress_text, undo_progress_text);
#line 6337 "Commands.c"
}


static void rotate_multiple_command_real_execute_on_source (MultipleDataSourceCommand* base, DataSource* source) {
	RotateMultipleCommand * self;
	DataSource* _tmp0_;
	Rotation _tmp1_;
#line 553 "/home/jens/Source/shotwell/src/Commands.vala"
	self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_ROTATE_MULTIPLE_COMMAND, RotateMultipleCommand);
#line 553 "/home/jens/Source/shotwell/src/Commands.vala"
	g_return_if_fail (IS_DATA_SOURCE (source));
#line 554 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp0_ = source;
#line 554 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp1_ = self->priv->rotation;
#line 554 "/home/jens/Source/shotwell/src/Commands.vala"
	photo_rotate (G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, TYPE_PHOTO, Photo), _tmp1_);
#line 6355 "Commands.c"
}


static void rotate_multiple_command_real_undo_on_source (MultipleDataSourceCommand* base, DataSource* source) {
	RotateMultipleCommand * self;
	DataSource* _tmp0_;
	Rotation _tmp1_;
	Rotation _tmp2_;
#line 557 "/home/jens/Source/shotwell/src/Commands.vala"
	self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_ROTATE_MULTIPLE_COMMAND, RotateMultipleCommand);
#line 557 "/home/jens/Source/shotwell/src/Commands.vala"
	g_return_if_fail (IS_DATA_SOURCE (source));
#line 558 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp0_ = source;
#line 558 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp1_ = self->priv->rotation;
#line 558 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp2_ = rotation_opposite (_tmp1_);
#line 558 "/home/jens/Source/shotwell/src/Commands.vala"
	photo_rotate (G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, TYPE_PHOTO, Photo), _tmp2_);
#line 6376 "Commands.c"
}


static void rotate_multiple_command_class_init (RotateMultipleCommandClass * klass) {
#line 543 "/home/jens/Source/shotwell/src/Commands.vala"
	rotate_multiple_command_parent_class = g_type_class_peek_parent (klass);
#line 543 "/home/jens/Source/shotwell/src/Commands.vala"
	g_type_class_add_private (klass, sizeof (RotateMultipleCommandPrivate));
#line 543 "/home/jens/Source/shotwell/src/Commands.vala"
	((MultipleDataSourceCommandClass *) klass)->execute_on_source = (void (*) (MultipleDataSourceCommand *, DataSource*)) rotate_multiple_command_real_execute_on_source;
#line 543 "/home/jens/Source/shotwell/src/Commands.vala"
	((MultipleDataSourceCommandClass *) klass)->undo_on_source = (void (*) (MultipleDataSourceCommand *, DataSource*)) rotate_multiple_command_real_undo_on_source;
#line 543 "/home/jens/Source/shotwell/src/Commands.vala"
	G_OBJECT_CLASS (klass)->finalize = rotate_multiple_command_finalize;
#line 6391 "Commands.c"
}


static void rotate_multiple_command_instance_init (RotateMultipleCommand * self) {
#line 543 "/home/jens/Source/shotwell/src/Commands.vala"
	self->priv = ROTATE_MULTIPLE_COMMAND_GET_PRIVATE (self);
#line 6398 "Commands.c"
}


static void rotate_multiple_command_finalize (GObject * obj) {
	RotateMultipleCommand * self;
#line 543 "/home/jens/Source/shotwell/src/Commands.vala"
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, TYPE_ROTATE_MULTIPLE_COMMAND, RotateMultipleCommand);
#line 543 "/home/jens/Source/shotwell/src/Commands.vala"
	G_OBJECT_CLASS (rotate_multiple_command_parent_class)->finalize (obj);
#line 6408 "Commands.c"
}


GType rotate_multiple_command_get_type (void) {
	static volatile gsize rotate_multiple_command_type_id__volatile = 0;
	if (g_once_init_enter (&rotate_multiple_command_type_id__volatile)) {
		static const GTypeInfo g_define_type_info = { sizeof (RotateMultipleCommandClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) rotate_multiple_command_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (RotateMultipleCommand), 0, (GInstanceInitFunc) rotate_multiple_command_instance_init, NULL };
		GType rotate_multiple_command_type_id;
		rotate_multiple_command_type_id = g_type_register_static (TYPE_MULTIPLE_DATA_SOURCE_COMMAND, "RotateMultipleCommand", &g_define_type_info, 0);
		g_once_init_leave (&rotate_multiple_command_type_id__volatile, rotate_multiple_command_type_id);
	}
	return rotate_multiple_command_type_id__volatile;
}


EditTitleCommand* edit_title_command_construct (GType object_type, MediaSource* source, const gchar* new_title) {
	EditTitleCommand * self = NULL;
	gchar* title = NULL;
	gchar* _tmp0_;
	MediaSource* _tmp1_;
	const gchar* _tmp2_;
	gchar* _tmp3_;
	MediaSource* _tmp4_;
	gchar* _tmp5_;
#line 566 "/home/jens/Source/shotwell/src/Commands.vala"
	g_return_val_if_fail (IS_MEDIA_SOURCE (source), NULL);
#line 566 "/home/jens/Source/shotwell/src/Commands.vala"
	g_return_val_if_fail (new_title != NULL, NULL);
#line 567 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp0_ = g_strdup (g_dpgettext2 (NULL, "Button Label", RESOURCES_EDIT_TITLE_LABEL));
#line 567 "/home/jens/Source/shotwell/src/Commands.vala"
	title = _tmp0_;
#line 569 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp1_ = source;
#line 569 "/home/jens/Source/shotwell/src/Commands.vala"
	self = (EditTitleCommand*) single_data_source_command_construct (object_type, G_TYPE_CHECK_INSTANCE_CAST (_tmp1_, TYPE_DATA_SOURCE, DataSource), title, "");
#line 571 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp2_ = new_title;
#line 571 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp3_ = g_strdup (_tmp2_);
#line 571 "/home/jens/Source/shotwell/src/Commands.vala"
	_g_free0 (self->priv->new_title);
#line 571 "/home/jens/Source/shotwell/src/Commands.vala"
	self->priv->new_title = _tmp3_;
#line 572 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp4_ = source;
#line 572 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp5_ = media_source_get_title (_tmp4_);
#line 572 "/home/jens/Source/shotwell/src/Commands.vala"
	_g_free0 (self->priv->old_title);
#line 572 "/home/jens/Source/shotwell/src/Commands.vala"
	self->priv->old_title = _tmp5_;
#line 566 "/home/jens/Source/shotwell/src/Commands.vala"
	_g_free0 (title);
#line 566 "/home/jens/Source/shotwell/src/Commands.vala"
	return self;
#line 6465 "Commands.c"
}


EditTitleCommand* edit_title_command_new (MediaSource* source, const gchar* new_title) {
#line 566 "/home/jens/Source/shotwell/src/Commands.vala"
	return edit_title_command_construct (TYPE_EDIT_TITLE_COMMAND, source, new_title);
#line 6472 "Commands.c"
}


static void edit_title_command_real_execute (Command* base) {
	EditTitleCommand * self;
	DataSource* _tmp0_;
	const gchar* _tmp1_;
#line 575 "/home/jens/Source/shotwell/src/Commands.vala"
	self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_EDIT_TITLE_COMMAND, EditTitleCommand);
#line 576 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp0_ = G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_SINGLE_DATA_SOURCE_COMMAND, SingleDataSourceCommand)->source;
#line 576 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp1_ = self->priv->new_title;
#line 576 "/home/jens/Source/shotwell/src/Commands.vala"
	media_source_set_title (G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, TYPE_MEDIA_SOURCE, MediaSource), _tmp1_);
#line 6488 "Commands.c"
}


static void edit_title_command_real_undo (Command* base) {
	EditTitleCommand * self;
	DataSource* _tmp0_;
	const gchar* _tmp1_;
#line 579 "/home/jens/Source/shotwell/src/Commands.vala"
	self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_EDIT_TITLE_COMMAND, EditTitleCommand);
#line 580 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp0_ = G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_SINGLE_DATA_SOURCE_COMMAND, SingleDataSourceCommand)->source;
#line 580 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp1_ = self->priv->old_title;
#line 580 "/home/jens/Source/shotwell/src/Commands.vala"
	media_source_set_title (G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, TYPE_MEDIA_SOURCE, MediaSource), _tmp1_);
#line 6504 "Commands.c"
}


static void edit_title_command_class_init (EditTitleCommandClass * klass) {
#line 562 "/home/jens/Source/shotwell/src/Commands.vala"
	edit_title_command_parent_class = g_type_class_peek_parent (klass);
#line 562 "/home/jens/Source/shotwell/src/Commands.vala"
	g_type_class_add_private (klass, sizeof (EditTitleCommandPrivate));
#line 562 "/home/jens/Source/shotwell/src/Commands.vala"
	((CommandClass *) klass)->execute = (void (*) (Command *)) edit_title_command_real_execute;
#line 562 "/home/jens/Source/shotwell/src/Commands.vala"
	((CommandClass *) klass)->undo = (void (*) (Command *)) edit_title_command_real_undo;
#line 562 "/home/jens/Source/shotwell/src/Commands.vala"
	G_OBJECT_CLASS (klass)->finalize = edit_title_command_finalize;
#line 6519 "Commands.c"
}


static void edit_title_command_instance_init (EditTitleCommand * self) {
#line 562 "/home/jens/Source/shotwell/src/Commands.vala"
	self->priv = EDIT_TITLE_COMMAND_GET_PRIVATE (self);
#line 6526 "Commands.c"
}


static void edit_title_command_finalize (GObject * obj) {
	EditTitleCommand * self;
#line 562 "/home/jens/Source/shotwell/src/Commands.vala"
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, TYPE_EDIT_TITLE_COMMAND, EditTitleCommand);
#line 563 "/home/jens/Source/shotwell/src/Commands.vala"
	_g_free0 (self->priv->new_title);
#line 564 "/home/jens/Source/shotwell/src/Commands.vala"
	_g_free0 (self->priv->old_title);
#line 562 "/home/jens/Source/shotwell/src/Commands.vala"
	G_OBJECT_CLASS (edit_title_command_parent_class)->finalize (obj);
#line 6540 "Commands.c"
}


GType edit_title_command_get_type (void) {
	static volatile gsize edit_title_command_type_id__volatile = 0;
	if (g_once_init_enter (&edit_title_command_type_id__volatile)) {
		static const GTypeInfo g_define_type_info = { sizeof (EditTitleCommandClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) edit_title_command_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (EditTitleCommand), 0, (GInstanceInitFunc) edit_title_command_instance_init, NULL };
		GType edit_title_command_type_id;
		edit_title_command_type_id = g_type_register_static (TYPE_SINGLE_DATA_SOURCE_COMMAND, "EditTitleCommand", &g_define_type_info, 0);
		g_once_init_leave (&edit_title_command_type_id__volatile, edit_title_command_type_id);
	}
	return edit_title_command_type_id__volatile;
}


EditCommentCommand* edit_comment_command_construct (GType object_type, MediaSource* source, const gchar* new_comment) {
	EditCommentCommand * self = NULL;
	MediaSource* _tmp0_;
	const gchar* _tmp1_;
	gchar* _tmp2_;
	MediaSource* _tmp3_;
	gchar* _tmp4_;
#line 588 "/home/jens/Source/shotwell/src/Commands.vala"
	g_return_val_if_fail (IS_MEDIA_SOURCE (source), NULL);
#line 588 "/home/jens/Source/shotwell/src/Commands.vala"
	g_return_val_if_fail (new_comment != NULL, NULL);
#line 589 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp0_ = source;
#line 589 "/home/jens/Source/shotwell/src/Commands.vala"
	self = (EditCommentCommand*) single_data_source_command_construct (object_type, G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, TYPE_DATA_SOURCE, DataSource), RESOURCES_EDIT_COMMENT_LABEL, "");
#line 591 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp1_ = new_comment;
#line 591 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp2_ = g_strdup (_tmp1_);
#line 591 "/home/jens/Source/shotwell/src/Commands.vala"
	_g_free0 (self->priv->new_comment);
#line 591 "/home/jens/Source/shotwell/src/Commands.vala"
	self->priv->new_comment = _tmp2_;
#line 592 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp3_ = source;
#line 592 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp4_ = media_source_get_comment (_tmp3_);
#line 592 "/home/jens/Source/shotwell/src/Commands.vala"
	_g_free0 (self->priv->old_comment);
#line 592 "/home/jens/Source/shotwell/src/Commands.vala"
	self->priv->old_comment = _tmp4_;
#line 588 "/home/jens/Source/shotwell/src/Commands.vala"
	return self;
#line 6589 "Commands.c"
}


EditCommentCommand* edit_comment_command_new (MediaSource* source, const gchar* new_comment) {
#line 588 "/home/jens/Source/shotwell/src/Commands.vala"
	return edit_comment_command_construct (TYPE_EDIT_COMMENT_COMMAND, source, new_comment);
#line 6596 "Commands.c"
}


static void edit_comment_command_real_execute (Command* base) {
	EditCommentCommand * self;
	DataSource* _tmp0_;
	const gchar* _tmp1_;
#line 595 "/home/jens/Source/shotwell/src/Commands.vala"
	self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_EDIT_COMMENT_COMMAND, EditCommentCommand);
#line 596 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp0_ = G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_SINGLE_DATA_SOURCE_COMMAND, SingleDataSourceCommand)->source;
#line 596 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp1_ = self->priv->new_comment;
#line 596 "/home/jens/Source/shotwell/src/Commands.vala"
	media_source_set_comment (G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, TYPE_MEDIA_SOURCE, MediaSource), _tmp1_);
#line 6612 "Commands.c"
}


static void edit_comment_command_real_undo (Command* base) {
	EditCommentCommand * self;
	DataSource* _tmp0_;
	const gchar* _tmp1_;
#line 599 "/home/jens/Source/shotwell/src/Commands.vala"
	self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_EDIT_COMMENT_COMMAND, EditCommentCommand);
#line 600 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp0_ = G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_SINGLE_DATA_SOURCE_COMMAND, SingleDataSourceCommand)->source;
#line 600 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp1_ = self->priv->old_comment;
#line 600 "/home/jens/Source/shotwell/src/Commands.vala"
	media_source_set_comment (G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, TYPE_MEDIA_SOURCE, MediaSource), _tmp1_);
#line 6628 "Commands.c"
}


static void edit_comment_command_class_init (EditCommentCommandClass * klass) {
#line 584 "/home/jens/Source/shotwell/src/Commands.vala"
	edit_comment_command_parent_class = g_type_class_peek_parent (klass);
#line 584 "/home/jens/Source/shotwell/src/Commands.vala"
	g_type_class_add_private (klass, sizeof (EditCommentCommandPrivate));
#line 584 "/home/jens/Source/shotwell/src/Commands.vala"
	((CommandClass *) klass)->execute = (void (*) (Command *)) edit_comment_command_real_execute;
#line 584 "/home/jens/Source/shotwell/src/Commands.vala"
	((CommandClass *) klass)->undo = (void (*) (Command *)) edit_comment_command_real_undo;
#line 584 "/home/jens/Source/shotwell/src/Commands.vala"
	G_OBJECT_CLASS (klass)->finalize = edit_comment_command_finalize;
#line 6643 "Commands.c"
}


static void edit_comment_command_instance_init (EditCommentCommand * self) {
#line 584 "/home/jens/Source/shotwell/src/Commands.vala"
	self->priv = EDIT_COMMENT_COMMAND_GET_PRIVATE (self);
#line 6650 "Commands.c"
}


static void edit_comment_command_finalize (GObject * obj) {
	EditCommentCommand * self;
#line 584 "/home/jens/Source/shotwell/src/Commands.vala"
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, TYPE_EDIT_COMMENT_COMMAND, EditCommentCommand);
#line 585 "/home/jens/Source/shotwell/src/Commands.vala"
	_g_free0 (self->priv->new_comment);
#line 586 "/home/jens/Source/shotwell/src/Commands.vala"
	_g_free0 (self->priv->old_comment);
#line 584 "/home/jens/Source/shotwell/src/Commands.vala"
	G_OBJECT_CLASS (edit_comment_command_parent_class)->finalize (obj);
#line 6664 "Commands.c"
}


GType edit_comment_command_get_type (void) {
	static volatile gsize edit_comment_command_type_id__volatile = 0;
	if (g_once_init_enter (&edit_comment_command_type_id__volatile)) {
		static const GTypeInfo g_define_type_info = { sizeof (EditCommentCommandClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) edit_comment_command_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (EditCommentCommand), 0, (GInstanceInitFunc) edit_comment_command_instance_init, NULL };
		GType edit_comment_command_type_id;
		edit_comment_command_type_id = g_type_register_static (TYPE_SINGLE_DATA_SOURCE_COMMAND, "EditCommentCommand", &g_define_type_info, 0);
		g_once_init_leave (&edit_comment_command_type_id__volatile, edit_comment_command_type_id);
	}
	return edit_comment_command_type_id__volatile;
}


EditMultipleTitlesCommand* edit_multiple_titles_command_construct (GType object_type, GeeCollection* media_sources, const gchar* new_title) {
	EditMultipleTitlesCommand * self = NULL;
	gchar* title = NULL;
	gchar* _tmp0_;
	GeeCollection* _tmp1_;
	const gchar* _tmp2_;
	const gchar* _tmp3_;
	gchar* _tmp4_;
#line 608 "/home/jens/Source/shotwell/src/Commands.vala"
	g_return_val_if_fail (GEE_IS_COLLECTION (media_sources), NULL);
#line 608 "/home/jens/Source/shotwell/src/Commands.vala"
	g_return_val_if_fail (new_title != NULL, NULL);
#line 609 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp0_ = g_strdup (g_dpgettext2 (NULL, "Button Label", RESOURCES_EDIT_TITLE_LABEL));
#line 609 "/home/jens/Source/shotwell/src/Commands.vala"
	title = _tmp0_;
#line 611 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp1_ = media_sources;
#line 611 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp2_ = title;
#line 611 "/home/jens/Source/shotwell/src/Commands.vala"
	self = (EditMultipleTitlesCommand*) multiple_data_source_at_once_command_construct (object_type, _tmp1_, _tmp2_, "");
#line 613 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp3_ = new_title;
#line 613 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp4_ = g_strdup (_tmp3_);
#line 613 "/home/jens/Source/shotwell/src/Commands.vala"
	_g_free0 (self->new_title);
#line 613 "/home/jens/Source/shotwell/src/Commands.vala"
	self->new_title = _tmp4_;
#line 6710 "Commands.c"
	{
		GeeIterator* _media_it = NULL;
		GeeCollection* _tmp5_;
		GeeIterator* _tmp6_;
#line 614 "/home/jens/Source/shotwell/src/Commands.vala"
		_tmp5_ = media_sources;
#line 614 "/home/jens/Source/shotwell/src/Commands.vala"
		_tmp6_ = gee_iterable_iterator (G_TYPE_CHECK_INSTANCE_CAST (_tmp5_, GEE_TYPE_ITERABLE, GeeIterable));
#line 614 "/home/jens/Source/shotwell/src/Commands.vala"
		_media_it = _tmp6_;
#line 614 "/home/jens/Source/shotwell/src/Commands.vala"
		while (TRUE) {
#line 6723 "Commands.c"
			GeeIterator* _tmp7_;
			gboolean _tmp8_;
			MediaSource* media = NULL;
			GeeIterator* _tmp9_;
			gpointer _tmp10_;
			GeeHashMap* _tmp11_;
			MediaSource* _tmp12_;
			MediaSource* _tmp13_;
			gchar* _tmp14_;
			gchar* _tmp15_;
#line 614 "/home/jens/Source/shotwell/src/Commands.vala"
			_tmp7_ = _media_it;
#line 614 "/home/jens/Source/shotwell/src/Commands.vala"
			_tmp8_ = gee_iterator_next (_tmp7_);
#line 614 "/home/jens/Source/shotwell/src/Commands.vala"
			if (!_tmp8_) {
#line 614 "/home/jens/Source/shotwell/src/Commands.vala"
				break;
#line 6742 "Commands.c"
			}
#line 614 "/home/jens/Source/shotwell/src/Commands.vala"
			_tmp9_ = _media_it;
#line 614 "/home/jens/Source/shotwell/src/Commands.vala"
			_tmp10_ = gee_iterator_get (_tmp9_);
#line 614 "/home/jens/Source/shotwell/src/Commands.vala"
			media = (MediaSource*) _tmp10_;
#line 615 "/home/jens/Source/shotwell/src/Commands.vala"
			_tmp11_ = self->old_titles;
#line 615 "/home/jens/Source/shotwell/src/Commands.vala"
			_tmp12_ = media;
#line 615 "/home/jens/Source/shotwell/src/Commands.vala"
			_tmp13_ = media;
#line 615 "/home/jens/Source/shotwell/src/Commands.vala"
			_tmp14_ = media_source_get_title (_tmp13_);
#line 615 "/home/jens/Source/shotwell/src/Commands.vala"
			_tmp15_ = _tmp14_;
#line 615 "/home/jens/Source/shotwell/src/Commands.vala"
			gee_abstract_map_set (G_TYPE_CHECK_INSTANCE_CAST (_tmp11_, GEE_TYPE_ABSTRACT_MAP, GeeAbstractMap), _tmp12_, _tmp15_);
#line 615 "/home/jens/Source/shotwell/src/Commands.vala"
			_g_free0 (_tmp15_);
#line 614 "/home/jens/Source/shotwell/src/Commands.vala"
			_g_object_unref0 (media);
#line 6766 "Commands.c"
		}
#line 614 "/home/jens/Source/shotwell/src/Commands.vala"
		_g_object_unref0 (_media_it);
#line 6770 "Commands.c"
	}
#line 608 "/home/jens/Source/shotwell/src/Commands.vala"
	_g_free0 (title);
#line 608 "/home/jens/Source/shotwell/src/Commands.vala"
	return self;
#line 6776 "Commands.c"
}


EditMultipleTitlesCommand* edit_multiple_titles_command_new (GeeCollection* media_sources, const gchar* new_title) {
#line 608 "/home/jens/Source/shotwell/src/Commands.vala"
	return edit_multiple_titles_command_construct (TYPE_EDIT_MULTIPLE_TITLES_COMMAND, media_sources, new_title);
#line 6783 "Commands.c"
}


static void edit_multiple_titles_command_real_execute_on_all (MultipleDataSourceAtOnceCommand* base, GeeCollection* sources) {
	EditMultipleTitlesCommand * self;
#line 618 "/home/jens/Source/shotwell/src/Commands.vala"
	self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_EDIT_MULTIPLE_TITLES_COMMAND, EditMultipleTitlesCommand);
#line 618 "/home/jens/Source/shotwell/src/Commands.vala"
	g_return_if_fail (GEE_IS_COLLECTION (sources));
#line 6793 "Commands.c"
	{
		GeeIterator* _source_it = NULL;
		GeeCollection* _tmp0_;
		GeeIterator* _tmp1_;
#line 619 "/home/jens/Source/shotwell/src/Commands.vala"
		_tmp0_ = sources;
#line 619 "/home/jens/Source/shotwell/src/Commands.vala"
		_tmp1_ = gee_iterable_iterator (G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, GEE_TYPE_ITERABLE, GeeIterable));
#line 619 "/home/jens/Source/shotwell/src/Commands.vala"
		_source_it = _tmp1_;
#line 619 "/home/jens/Source/shotwell/src/Commands.vala"
		while (TRUE) {
#line 6806 "Commands.c"
			GeeIterator* _tmp2_;
			gboolean _tmp3_;
			DataSource* source = NULL;
			GeeIterator* _tmp4_;
			gpointer _tmp5_;
			DataSource* _tmp6_;
			const gchar* _tmp7_;
#line 619 "/home/jens/Source/shotwell/src/Commands.vala"
			_tmp2_ = _source_it;
#line 619 "/home/jens/Source/shotwell/src/Commands.vala"
			_tmp3_ = gee_iterator_next (_tmp2_);
#line 619 "/home/jens/Source/shotwell/src/Commands.vala"
			if (!_tmp3_) {
#line 619 "/home/jens/Source/shotwell/src/Commands.vala"
				break;
#line 6822 "Commands.c"
			}
#line 619 "/home/jens/Source/shotwell/src/Commands.vala"
			_tmp4_ = _source_it;
#line 619 "/home/jens/Source/shotwell/src/Commands.vala"
			_tmp5_ = gee_iterator_get (_tmp4_);
#line 619 "/home/jens/Source/shotwell/src/Commands.vala"
			source = (DataSource*) _tmp5_;
#line 620 "/home/jens/Source/shotwell/src/Commands.vala"
			_tmp6_ = source;
#line 620 "/home/jens/Source/shotwell/src/Commands.vala"
			_tmp7_ = self->new_title;
#line 620 "/home/jens/Source/shotwell/src/Commands.vala"
			media_source_set_title (G_TYPE_CHECK_INSTANCE_CAST (_tmp6_, TYPE_MEDIA_SOURCE, MediaSource), _tmp7_);
#line 619 "/home/jens/Source/shotwell/src/Commands.vala"
			_g_object_unref0 (source);
#line 6838 "Commands.c"
		}
#line 619 "/home/jens/Source/shotwell/src/Commands.vala"
		_g_object_unref0 (_source_it);
#line 6842 "Commands.c"
	}
}


static void edit_multiple_titles_command_real_undo_on_all (MultipleDataSourceAtOnceCommand* base, GeeCollection* sources) {
	EditMultipleTitlesCommand * self;
#line 623 "/home/jens/Source/shotwell/src/Commands.vala"
	self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_EDIT_MULTIPLE_TITLES_COMMAND, EditMultipleTitlesCommand);
#line 623 "/home/jens/Source/shotwell/src/Commands.vala"
	g_return_if_fail (GEE_IS_COLLECTION (sources));
#line 6853 "Commands.c"
	{
		GeeIterator* _source_it = NULL;
		GeeCollection* _tmp0_;
		GeeIterator* _tmp1_;
#line 624 "/home/jens/Source/shotwell/src/Commands.vala"
		_tmp0_ = sources;
#line 624 "/home/jens/Source/shotwell/src/Commands.vala"
		_tmp1_ = gee_iterable_iterator (G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, GEE_TYPE_ITERABLE, GeeIterable));
#line 624 "/home/jens/Source/shotwell/src/Commands.vala"
		_source_it = _tmp1_;
#line 624 "/home/jens/Source/shotwell/src/Commands.vala"
		while (TRUE) {
#line 6866 "Commands.c"
			GeeIterator* _tmp2_;
			gboolean _tmp3_;
			DataSource* source = NULL;
			GeeIterator* _tmp4_;
			gpointer _tmp5_;
			DataSource* _tmp6_;
			GeeHashMap* _tmp7_;
			DataSource* _tmp8_;
			gpointer _tmp9_;
			gchar* _tmp10_;
#line 624 "/home/jens/Source/shotwell/src/Commands.vala"
			_tmp2_ = _source_it;
#line 624 "/home/jens/Source/shotwell/src/Commands.vala"
			_tmp3_ = gee_iterator_next (_tmp2_);
#line 624 "/home/jens/Source/shotwell/src/Commands.vala"
			if (!_tmp3_) {
#line 624 "/home/jens/Source/shotwell/src/Commands.vala"
				break;
#line 6885 "Commands.c"
			}
#line 624 "/home/jens/Source/shotwell/src/Commands.vala"
			_tmp4_ = _source_it;
#line 624 "/home/jens/Source/shotwell/src/Commands.vala"
			_tmp5_ = gee_iterator_get (_tmp4_);
#line 624 "/home/jens/Source/shotwell/src/Commands.vala"
			source = (DataSource*) _tmp5_;
#line 625 "/home/jens/Source/shotwell/src/Commands.vala"
			_tmp6_ = source;
#line 625 "/home/jens/Source/shotwell/src/Commands.vala"
			_tmp7_ = self->old_titles;
#line 625 "/home/jens/Source/shotwell/src/Commands.vala"
			_tmp8_ = source;
#line 625 "/home/jens/Source/shotwell/src/Commands.vala"
			_tmp9_ = gee_abstract_map_get (G_TYPE_CHECK_INSTANCE_CAST (_tmp7_, GEE_TYPE_ABSTRACT_MAP, GeeAbstractMap), G_TYPE_CHECK_INSTANCE_CAST (_tmp8_, TYPE_MEDIA_SOURCE, MediaSource));
#line 625 "/home/jens/Source/shotwell/src/Commands.vala"
			_tmp10_ = (gchar*) _tmp9_;
#line 625 "/home/jens/Source/shotwell/src/Commands.vala"
			media_source_set_title (G_TYPE_CHECK_INSTANCE_CAST (_tmp6_, TYPE_MEDIA_SOURCE, MediaSource), _tmp10_);
#line 625 "/home/jens/Source/shotwell/src/Commands.vala"
			_g_free0 (_tmp10_);
#line 624 "/home/jens/Source/shotwell/src/Commands.vala"
			_g_object_unref0 (source);
#line 6909 "Commands.c"
		}
#line 624 "/home/jens/Source/shotwell/src/Commands.vala"
		_g_object_unref0 (_source_it);
#line 6913 "Commands.c"
	}
}


static void edit_multiple_titles_command_class_init (EditMultipleTitlesCommandClass * klass) {
#line 604 "/home/jens/Source/shotwell/src/Commands.vala"
	edit_multiple_titles_command_parent_class = g_type_class_peek_parent (klass);
#line 604 "/home/jens/Source/shotwell/src/Commands.vala"
	((MultipleDataSourceAtOnceCommandClass *) klass)->execute_on_all = (void (*) (MultipleDataSourceAtOnceCommand *, GeeCollection*)) edit_multiple_titles_command_real_execute_on_all;
#line 604 "/home/jens/Source/shotwell/src/Commands.vala"
	((MultipleDataSourceAtOnceCommandClass *) klass)->undo_on_all = (void (*) (MultipleDataSourceAtOnceCommand *, GeeCollection*)) edit_multiple_titles_command_real_undo_on_all;
#line 604 "/home/jens/Source/shotwell/src/Commands.vala"
	G_OBJECT_CLASS (klass)->finalize = edit_multiple_titles_command_finalize;
#line 6927 "Commands.c"
}


static void edit_multiple_titles_command_instance_init (EditMultipleTitlesCommand * self) {
	GeeHashMap* _tmp0_;
#line 606 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp0_ = gee_hash_map_new (TYPE_MEDIA_SOURCE, (GBoxedCopyFunc) g_object_ref, (GDestroyNotify) g_object_unref, G_TYPE_STRING, (GBoxedCopyFunc) g_strdup, (GDestroyNotify) g_free, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
#line 606 "/home/jens/Source/shotwell/src/Commands.vala"
	self->old_titles = _tmp0_;
#line 6937 "Commands.c"
}


static void edit_multiple_titles_command_finalize (GObject * obj) {
	EditMultipleTitlesCommand * self;
#line 604 "/home/jens/Source/shotwell/src/Commands.vala"
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, TYPE_EDIT_MULTIPLE_TITLES_COMMAND, EditMultipleTitlesCommand);
#line 605 "/home/jens/Source/shotwell/src/Commands.vala"
	_g_free0 (self->new_title);
#line 606 "/home/jens/Source/shotwell/src/Commands.vala"
	_g_object_unref0 (self->old_titles);
#line 604 "/home/jens/Source/shotwell/src/Commands.vala"
	G_OBJECT_CLASS (edit_multiple_titles_command_parent_class)->finalize (obj);
#line 6951 "Commands.c"
}


GType edit_multiple_titles_command_get_type (void) {
	static volatile gsize edit_multiple_titles_command_type_id__volatile = 0;
	if (g_once_init_enter (&edit_multiple_titles_command_type_id__volatile)) {
		static const GTypeInfo g_define_type_info = { sizeof (EditMultipleTitlesCommandClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) edit_multiple_titles_command_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (EditMultipleTitlesCommand), 0, (GInstanceInitFunc) edit_multiple_titles_command_instance_init, NULL };
		GType edit_multiple_titles_command_type_id;
		edit_multiple_titles_command_type_id = g_type_register_static (TYPE_MULTIPLE_DATA_SOURCE_AT_ONCE_COMMAND, "EditMultipleTitlesCommand", &g_define_type_info, 0);
		g_once_init_leave (&edit_multiple_titles_command_type_id__volatile, edit_multiple_titles_command_type_id);
	}
	return edit_multiple_titles_command_type_id__volatile;
}


EditMultipleCommentsCommand* edit_multiple_comments_command_construct (GType object_type, GeeCollection* media_sources, const gchar* new_comment) {
	EditMultipleCommentsCommand * self = NULL;
	GeeCollection* _tmp0_;
	const gchar* _tmp1_;
	gchar* _tmp2_;
#line 633 "/home/jens/Source/shotwell/src/Commands.vala"
	g_return_val_if_fail (GEE_IS_COLLECTION (media_sources), NULL);
#line 633 "/home/jens/Source/shotwell/src/Commands.vala"
	g_return_val_if_fail (new_comment != NULL, NULL);
#line 634 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp0_ = media_sources;
#line 634 "/home/jens/Source/shotwell/src/Commands.vala"
	self = (EditMultipleCommentsCommand*) multiple_data_source_at_once_command_construct (object_type, _tmp0_, RESOURCES_EDIT_COMMENT_LABEL, "");
#line 636 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp1_ = new_comment;
#line 636 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp2_ = g_strdup (_tmp1_);
#line 636 "/home/jens/Source/shotwell/src/Commands.vala"
	_g_free0 (self->new_comment);
#line 636 "/home/jens/Source/shotwell/src/Commands.vala"
	self->new_comment = _tmp2_;
#line 6988 "Commands.c"
	{
		GeeIterator* _media_it = NULL;
		GeeCollection* _tmp3_;
		GeeIterator* _tmp4_;
#line 637 "/home/jens/Source/shotwell/src/Commands.vala"
		_tmp3_ = media_sources;
#line 637 "/home/jens/Source/shotwell/src/Commands.vala"
		_tmp4_ = gee_iterable_iterator (G_TYPE_CHECK_INSTANCE_CAST (_tmp3_, GEE_TYPE_ITERABLE, GeeIterable));
#line 637 "/home/jens/Source/shotwell/src/Commands.vala"
		_media_it = _tmp4_;
#line 637 "/home/jens/Source/shotwell/src/Commands.vala"
		while (TRUE) {
#line 7001 "Commands.c"
			GeeIterator* _tmp5_;
			gboolean _tmp6_;
			MediaSource* media = NULL;
			GeeIterator* _tmp7_;
			gpointer _tmp8_;
			GeeHashMap* _tmp9_;
			MediaSource* _tmp10_;
			MediaSource* _tmp11_;
			gchar* _tmp12_;
			gchar* _tmp13_;
#line 637 "/home/jens/Source/shotwell/src/Commands.vala"
			_tmp5_ = _media_it;
#line 637 "/home/jens/Source/shotwell/src/Commands.vala"
			_tmp6_ = gee_iterator_next (_tmp5_);
#line 637 "/home/jens/Source/shotwell/src/Commands.vala"
			if (!_tmp6_) {
#line 637 "/home/jens/Source/shotwell/src/Commands.vala"
				break;
#line 7020 "Commands.c"
			}
#line 637 "/home/jens/Source/shotwell/src/Commands.vala"
			_tmp7_ = _media_it;
#line 637 "/home/jens/Source/shotwell/src/Commands.vala"
			_tmp8_ = gee_iterator_get (_tmp7_);
#line 637 "/home/jens/Source/shotwell/src/Commands.vala"
			media = (MediaSource*) _tmp8_;
#line 638 "/home/jens/Source/shotwell/src/Commands.vala"
			_tmp9_ = self->old_comments;
#line 638 "/home/jens/Source/shotwell/src/Commands.vala"
			_tmp10_ = media;
#line 638 "/home/jens/Source/shotwell/src/Commands.vala"
			_tmp11_ = media;
#line 638 "/home/jens/Source/shotwell/src/Commands.vala"
			_tmp12_ = media_source_get_comment (_tmp11_);
#line 638 "/home/jens/Source/shotwell/src/Commands.vala"
			_tmp13_ = _tmp12_;
#line 638 "/home/jens/Source/shotwell/src/Commands.vala"
			gee_abstract_map_set (G_TYPE_CHECK_INSTANCE_CAST (_tmp9_, GEE_TYPE_ABSTRACT_MAP, GeeAbstractMap), _tmp10_, _tmp13_);
#line 638 "/home/jens/Source/shotwell/src/Commands.vala"
			_g_free0 (_tmp13_);
#line 637 "/home/jens/Source/shotwell/src/Commands.vala"
			_g_object_unref0 (media);
#line 7044 "Commands.c"
		}
#line 637 "/home/jens/Source/shotwell/src/Commands.vala"
		_g_object_unref0 (_media_it);
#line 7048 "Commands.c"
	}
#line 633 "/home/jens/Source/shotwell/src/Commands.vala"
	return self;
#line 7052 "Commands.c"
}


EditMultipleCommentsCommand* edit_multiple_comments_command_new (GeeCollection* media_sources, const gchar* new_comment) {
#line 633 "/home/jens/Source/shotwell/src/Commands.vala"
	return edit_multiple_comments_command_construct (TYPE_EDIT_MULTIPLE_COMMENTS_COMMAND, media_sources, new_comment);
#line 7059 "Commands.c"
}


static void edit_multiple_comments_command_real_execute_on_all (MultipleDataSourceAtOnceCommand* base, GeeCollection* sources) {
	EditMultipleCommentsCommand * self;
#line 641 "/home/jens/Source/shotwell/src/Commands.vala"
	self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_EDIT_MULTIPLE_COMMENTS_COMMAND, EditMultipleCommentsCommand);
#line 641 "/home/jens/Source/shotwell/src/Commands.vala"
	g_return_if_fail (GEE_IS_COLLECTION (sources));
#line 7069 "Commands.c"
	{
		GeeIterator* _source_it = NULL;
		GeeCollection* _tmp0_;
		GeeIterator* _tmp1_;
#line 642 "/home/jens/Source/shotwell/src/Commands.vala"
		_tmp0_ = sources;
#line 642 "/home/jens/Source/shotwell/src/Commands.vala"
		_tmp1_ = gee_iterable_iterator (G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, GEE_TYPE_ITERABLE, GeeIterable));
#line 642 "/home/jens/Source/shotwell/src/Commands.vala"
		_source_it = _tmp1_;
#line 642 "/home/jens/Source/shotwell/src/Commands.vala"
		while (TRUE) {
#line 7082 "Commands.c"
			GeeIterator* _tmp2_;
			gboolean _tmp3_;
			DataSource* source = NULL;
			GeeIterator* _tmp4_;
			gpointer _tmp5_;
			DataSource* _tmp6_;
			const gchar* _tmp7_;
#line 642 "/home/jens/Source/shotwell/src/Commands.vala"
			_tmp2_ = _source_it;
#line 642 "/home/jens/Source/shotwell/src/Commands.vala"
			_tmp3_ = gee_iterator_next (_tmp2_);
#line 642 "/home/jens/Source/shotwell/src/Commands.vala"
			if (!_tmp3_) {
#line 642 "/home/jens/Source/shotwell/src/Commands.vala"
				break;
#line 7098 "Commands.c"
			}
#line 642 "/home/jens/Source/shotwell/src/Commands.vala"
			_tmp4_ = _source_it;
#line 642 "/home/jens/Source/shotwell/src/Commands.vala"
			_tmp5_ = gee_iterator_get (_tmp4_);
#line 642 "/home/jens/Source/shotwell/src/Commands.vala"
			source = (DataSource*) _tmp5_;
#line 643 "/home/jens/Source/shotwell/src/Commands.vala"
			_tmp6_ = source;
#line 643 "/home/jens/Source/shotwell/src/Commands.vala"
			_tmp7_ = self->new_comment;
#line 643 "/home/jens/Source/shotwell/src/Commands.vala"
			media_source_set_comment (G_TYPE_CHECK_INSTANCE_CAST (_tmp6_, TYPE_MEDIA_SOURCE, MediaSource), _tmp7_);
#line 642 "/home/jens/Source/shotwell/src/Commands.vala"
			_g_object_unref0 (source);
#line 7114 "Commands.c"
		}
#line 642 "/home/jens/Source/shotwell/src/Commands.vala"
		_g_object_unref0 (_source_it);
#line 7118 "Commands.c"
	}
}


static void edit_multiple_comments_command_real_undo_on_all (MultipleDataSourceAtOnceCommand* base, GeeCollection* sources) {
	EditMultipleCommentsCommand * self;
#line 646 "/home/jens/Source/shotwell/src/Commands.vala"
	self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_EDIT_MULTIPLE_COMMENTS_COMMAND, EditMultipleCommentsCommand);
#line 646 "/home/jens/Source/shotwell/src/Commands.vala"
	g_return_if_fail (GEE_IS_COLLECTION (sources));
#line 7129 "Commands.c"
	{
		GeeIterator* _source_it = NULL;
		GeeCollection* _tmp0_;
		GeeIterator* _tmp1_;
#line 647 "/home/jens/Source/shotwell/src/Commands.vala"
		_tmp0_ = sources;
#line 647 "/home/jens/Source/shotwell/src/Commands.vala"
		_tmp1_ = gee_iterable_iterator (G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, GEE_TYPE_ITERABLE, GeeIterable));
#line 647 "/home/jens/Source/shotwell/src/Commands.vala"
		_source_it = _tmp1_;
#line 647 "/home/jens/Source/shotwell/src/Commands.vala"
		while (TRUE) {
#line 7142 "Commands.c"
			GeeIterator* _tmp2_;
			gboolean _tmp3_;
			DataSource* source = NULL;
			GeeIterator* _tmp4_;
			gpointer _tmp5_;
			DataSource* _tmp6_;
			GeeHashMap* _tmp7_;
			DataSource* _tmp8_;
			gpointer _tmp9_;
			gchar* _tmp10_;
#line 647 "/home/jens/Source/shotwell/src/Commands.vala"
			_tmp2_ = _source_it;
#line 647 "/home/jens/Source/shotwell/src/Commands.vala"
			_tmp3_ = gee_iterator_next (_tmp2_);
#line 647 "/home/jens/Source/shotwell/src/Commands.vala"
			if (!_tmp3_) {
#line 647 "/home/jens/Source/shotwell/src/Commands.vala"
				break;
#line 7161 "Commands.c"
			}
#line 647 "/home/jens/Source/shotwell/src/Commands.vala"
			_tmp4_ = _source_it;
#line 647 "/home/jens/Source/shotwell/src/Commands.vala"
			_tmp5_ = gee_iterator_get (_tmp4_);
#line 647 "/home/jens/Source/shotwell/src/Commands.vala"
			source = (DataSource*) _tmp5_;
#line 648 "/home/jens/Source/shotwell/src/Commands.vala"
			_tmp6_ = source;
#line 648 "/home/jens/Source/shotwell/src/Commands.vala"
			_tmp7_ = self->old_comments;
#line 648 "/home/jens/Source/shotwell/src/Commands.vala"
			_tmp8_ = source;
#line 648 "/home/jens/Source/shotwell/src/Commands.vala"
			_tmp9_ = gee_abstract_map_get (G_TYPE_CHECK_INSTANCE_CAST (_tmp7_, GEE_TYPE_ABSTRACT_MAP, GeeAbstractMap), G_TYPE_CHECK_INSTANCE_CAST (_tmp8_, TYPE_MEDIA_SOURCE, MediaSource));
#line 648 "/home/jens/Source/shotwell/src/Commands.vala"
			_tmp10_ = (gchar*) _tmp9_;
#line 648 "/home/jens/Source/shotwell/src/Commands.vala"
			media_source_set_comment (G_TYPE_CHECK_INSTANCE_CAST (_tmp6_, TYPE_MEDIA_SOURCE, MediaSource), _tmp10_);
#line 648 "/home/jens/Source/shotwell/src/Commands.vala"
			_g_free0 (_tmp10_);
#line 647 "/home/jens/Source/shotwell/src/Commands.vala"
			_g_object_unref0 (source);
#line 7185 "Commands.c"
		}
#line 647 "/home/jens/Source/shotwell/src/Commands.vala"
		_g_object_unref0 (_source_it);
#line 7189 "Commands.c"
	}
}


static void edit_multiple_comments_command_class_init (EditMultipleCommentsCommandClass * klass) {
#line 629 "/home/jens/Source/shotwell/src/Commands.vala"
	edit_multiple_comments_command_parent_class = g_type_class_peek_parent (klass);
#line 629 "/home/jens/Source/shotwell/src/Commands.vala"
	((MultipleDataSourceAtOnceCommandClass *) klass)->execute_on_all = (void (*) (MultipleDataSourceAtOnceCommand *, GeeCollection*)) edit_multiple_comments_command_real_execute_on_all;
#line 629 "/home/jens/Source/shotwell/src/Commands.vala"
	((MultipleDataSourceAtOnceCommandClass *) klass)->undo_on_all = (void (*) (MultipleDataSourceAtOnceCommand *, GeeCollection*)) edit_multiple_comments_command_real_undo_on_all;
#line 629 "/home/jens/Source/shotwell/src/Commands.vala"
	G_OBJECT_CLASS (klass)->finalize = edit_multiple_comments_command_finalize;
#line 7203 "Commands.c"
}


static void edit_multiple_comments_command_instance_init (EditMultipleCommentsCommand * self) {
	GeeHashMap* _tmp0_;
#line 631 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp0_ = gee_hash_map_new (TYPE_MEDIA_SOURCE, (GBoxedCopyFunc) g_object_ref, (GDestroyNotify) g_object_unref, G_TYPE_STRING, (GBoxedCopyFunc) g_strdup, (GDestroyNotify) g_free, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
#line 631 "/home/jens/Source/shotwell/src/Commands.vala"
	self->old_comments = _tmp0_;
#line 7213 "Commands.c"
}


static void edit_multiple_comments_command_finalize (GObject * obj) {
	EditMultipleCommentsCommand * self;
#line 629 "/home/jens/Source/shotwell/src/Commands.vala"
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, TYPE_EDIT_MULTIPLE_COMMENTS_COMMAND, EditMultipleCommentsCommand);
#line 630 "/home/jens/Source/shotwell/src/Commands.vala"
	_g_free0 (self->new_comment);
#line 631 "/home/jens/Source/shotwell/src/Commands.vala"
	_g_object_unref0 (self->old_comments);
#line 629 "/home/jens/Source/shotwell/src/Commands.vala"
	G_OBJECT_CLASS (edit_multiple_comments_command_parent_class)->finalize (obj);
#line 7227 "Commands.c"
}


GType edit_multiple_comments_command_get_type (void) {
	static volatile gsize edit_multiple_comments_command_type_id__volatile = 0;
	if (g_once_init_enter (&edit_multiple_comments_command_type_id__volatile)) {
		static const GTypeInfo g_define_type_info = { sizeof (EditMultipleCommentsCommandClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) edit_multiple_comments_command_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (EditMultipleCommentsCommand), 0, (GInstanceInitFunc) edit_multiple_comments_command_instance_init, NULL };
		GType edit_multiple_comments_command_type_id;
		edit_multiple_comments_command_type_id = g_type_register_static (TYPE_MULTIPLE_DATA_SOURCE_AT_ONCE_COMMAND, "EditMultipleCommentsCommand", &g_define_type_info, 0);
		g_once_init_leave (&edit_multiple_comments_command_type_id__volatile, edit_multiple_comments_command_type_id);
	}
	return edit_multiple_comments_command_type_id__volatile;
}


RenameEventCommand* rename_event_command_construct (GType object_type, Event* event, const gchar* new_name) {
	RenameEventCommand * self = NULL;
	Event* _tmp0_;
	const gchar* _tmp1_;
	gchar* _tmp2_;
	Event* _tmp3_;
	gchar* _tmp4_;
#line 656 "/home/jens/Source/shotwell/src/Commands.vala"
	g_return_val_if_fail (IS_EVENT (event), NULL);
#line 656 "/home/jens/Source/shotwell/src/Commands.vala"
	g_return_val_if_fail (new_name != NULL, NULL);
#line 657 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp0_ = event;
#line 657 "/home/jens/Source/shotwell/src/Commands.vala"
	self = (RenameEventCommand*) simple_proxyable_command_construct (object_type, G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, TYPE_PROXYABLE, Proxyable), RESOURCES_RENAME_EVENT_LABEL, "");
#line 659 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp1_ = new_name;
#line 659 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp2_ = g_strdup (_tmp1_);
#line 659 "/home/jens/Source/shotwell/src/Commands.vala"
	_g_free0 (self->priv->new_name);
#line 659 "/home/jens/Source/shotwell/src/Commands.vala"
	self->priv->new_name = _tmp2_;
#line 660 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp3_ = event;
#line 660 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp4_ = event_get_raw_name (_tmp3_);
#line 660 "/home/jens/Source/shotwell/src/Commands.vala"
	_g_free0 (self->priv->old_name);
#line 660 "/home/jens/Source/shotwell/src/Commands.vala"
	self->priv->old_name = _tmp4_;
#line 656 "/home/jens/Source/shotwell/src/Commands.vala"
	return self;
#line 7276 "Commands.c"
}


RenameEventCommand* rename_event_command_new (Event* event, const gchar* new_name) {
#line 656 "/home/jens/Source/shotwell/src/Commands.vala"
	return rename_event_command_construct (TYPE_RENAME_EVENT_COMMAND, event, new_name);
#line 7283 "Commands.c"
}


static void rename_event_command_real_execute_on_source (SimpleProxyableCommand* base, DataSource* source) {
	RenameEventCommand * self;
	DataSource* _tmp0_;
	const gchar* _tmp1_;
#line 663 "/home/jens/Source/shotwell/src/Commands.vala"
	self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_RENAME_EVENT_COMMAND, RenameEventCommand);
#line 663 "/home/jens/Source/shotwell/src/Commands.vala"
	g_return_if_fail (IS_DATA_SOURCE (source));
#line 664 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp0_ = source;
#line 664 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp1_ = self->priv->new_name;
#line 664 "/home/jens/Source/shotwell/src/Commands.vala"
	event_rename (G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, TYPE_EVENT, Event), _tmp1_);
#line 7301 "Commands.c"
}


static void rename_event_command_real_undo_on_source (SimpleProxyableCommand* base, DataSource* source) {
	RenameEventCommand * self;
	DataSource* _tmp0_;
	const gchar* _tmp1_;
#line 667 "/home/jens/Source/shotwell/src/Commands.vala"
	self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_RENAME_EVENT_COMMAND, RenameEventCommand);
#line 667 "/home/jens/Source/shotwell/src/Commands.vala"
	g_return_if_fail (IS_DATA_SOURCE (source));
#line 668 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp0_ = source;
#line 668 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp1_ = self->priv->old_name;
#line 668 "/home/jens/Source/shotwell/src/Commands.vala"
	event_rename (G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, TYPE_EVENT, Event), _tmp1_);
#line 7319 "Commands.c"
}


static void rename_event_command_class_init (RenameEventCommandClass * klass) {
#line 652 "/home/jens/Source/shotwell/src/Commands.vala"
	rename_event_command_parent_class = g_type_class_peek_parent (klass);
#line 652 "/home/jens/Source/shotwell/src/Commands.vala"
	g_type_class_add_private (klass, sizeof (RenameEventCommandPrivate));
#line 652 "/home/jens/Source/shotwell/src/Commands.vala"
	((SimpleProxyableCommandClass *) klass)->execute_on_source = (void (*) (SimpleProxyableCommand *, DataSource*)) rename_event_command_real_execute_on_source;
#line 652 "/home/jens/Source/shotwell/src/Commands.vala"
	((SimpleProxyableCommandClass *) klass)->undo_on_source = (void (*) (SimpleProxyableCommand *, DataSource*)) rename_event_command_real_undo_on_source;
#line 652 "/home/jens/Source/shotwell/src/Commands.vala"
	G_OBJECT_CLASS (klass)->finalize = rename_event_command_finalize;
#line 7334 "Commands.c"
}


static void rename_event_command_instance_init (RenameEventCommand * self) {
#line 652 "/home/jens/Source/shotwell/src/Commands.vala"
	self->priv = RENAME_EVENT_COMMAND_GET_PRIVATE (self);
#line 7341 "Commands.c"
}


static void rename_event_command_finalize (GObject * obj) {
	RenameEventCommand * self;
#line 652 "/home/jens/Source/shotwell/src/Commands.vala"
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, TYPE_RENAME_EVENT_COMMAND, RenameEventCommand);
#line 653 "/home/jens/Source/shotwell/src/Commands.vala"
	_g_free0 (self->priv->new_name);
#line 654 "/home/jens/Source/shotwell/src/Commands.vala"
	_g_free0 (self->priv->old_name);
#line 652 "/home/jens/Source/shotwell/src/Commands.vala"
	G_OBJECT_CLASS (rename_event_command_parent_class)->finalize (obj);
#line 7355 "Commands.c"
}


GType rename_event_command_get_type (void) {
	static volatile gsize rename_event_command_type_id__volatile = 0;
	if (g_once_init_enter (&rename_event_command_type_id__volatile)) {
		static const GTypeInfo g_define_type_info = { sizeof (RenameEventCommandClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) rename_event_command_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (RenameEventCommand), 0, (GInstanceInitFunc) rename_event_command_instance_init, NULL };
		GType rename_event_command_type_id;
		rename_event_command_type_id = g_type_register_static (TYPE_SIMPLE_PROXYABLE_COMMAND, "RenameEventCommand", &g_define_type_info, 0);
		g_once_init_leave (&rename_event_command_type_id__volatile, rename_event_command_type_id);
	}
	return rename_event_command_type_id__volatile;
}


EditEventCommentCommand* edit_event_comment_command_construct (GType object_type, Event* event, const gchar* new_comment) {
	EditEventCommentCommand * self = NULL;
	Event* _tmp0_;
	const gchar* _tmp1_;
	gchar* _tmp2_;
	Event* _tmp3_;
	gchar* _tmp4_;
#line 676 "/home/jens/Source/shotwell/src/Commands.vala"
	g_return_val_if_fail (IS_EVENT (event), NULL);
#line 676 "/home/jens/Source/shotwell/src/Commands.vala"
	g_return_val_if_fail (new_comment != NULL, NULL);
#line 677 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp0_ = event;
#line 677 "/home/jens/Source/shotwell/src/Commands.vala"
	self = (EditEventCommentCommand*) simple_proxyable_command_construct (object_type, G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, TYPE_PROXYABLE, Proxyable), RESOURCES_EDIT_COMMENT_LABEL, "");
#line 679 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp1_ = new_comment;
#line 679 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp2_ = g_strdup (_tmp1_);
#line 679 "/home/jens/Source/shotwell/src/Commands.vala"
	_g_free0 (self->priv->new_comment);
#line 679 "/home/jens/Source/shotwell/src/Commands.vala"
	self->priv->new_comment = _tmp2_;
#line 680 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp3_ = event;
#line 680 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp4_ = event_source_get_comment (G_TYPE_CHECK_INSTANCE_CAST (_tmp3_, TYPE_EVENT_SOURCE, EventSource));
#line 680 "/home/jens/Source/shotwell/src/Commands.vala"
	_g_free0 (self->priv->old_comment);
#line 680 "/home/jens/Source/shotwell/src/Commands.vala"
	self->priv->old_comment = _tmp4_;
#line 676 "/home/jens/Source/shotwell/src/Commands.vala"
	return self;
#line 7404 "Commands.c"
}


EditEventCommentCommand* edit_event_comment_command_new (Event* event, const gchar* new_comment) {
#line 676 "/home/jens/Source/shotwell/src/Commands.vala"
	return edit_event_comment_command_construct (TYPE_EDIT_EVENT_COMMENT_COMMAND, event, new_comment);
#line 7411 "Commands.c"
}


static void edit_event_comment_command_real_execute_on_source (SimpleProxyableCommand* base, DataSource* source) {
	EditEventCommentCommand * self;
	DataSource* _tmp0_;
	const gchar* _tmp1_;
#line 683 "/home/jens/Source/shotwell/src/Commands.vala"
	self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_EDIT_EVENT_COMMENT_COMMAND, EditEventCommentCommand);
#line 683 "/home/jens/Source/shotwell/src/Commands.vala"
	g_return_if_fail (IS_DATA_SOURCE (source));
#line 684 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp0_ = source;
#line 684 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp1_ = self->priv->new_comment;
#line 684 "/home/jens/Source/shotwell/src/Commands.vala"
	event_source_set_comment (G_TYPE_CHECK_INSTANCE_CAST (G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, TYPE_EVENT, Event), TYPE_EVENT_SOURCE, EventSource), _tmp1_);
#line 7429 "Commands.c"
}


static void edit_event_comment_command_real_undo_on_source (SimpleProxyableCommand* base, DataSource* source) {
	EditEventCommentCommand * self;
	DataSource* _tmp0_;
	const gchar* _tmp1_;
#line 687 "/home/jens/Source/shotwell/src/Commands.vala"
	self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_EDIT_EVENT_COMMENT_COMMAND, EditEventCommentCommand);
#line 687 "/home/jens/Source/shotwell/src/Commands.vala"
	g_return_if_fail (IS_DATA_SOURCE (source));
#line 688 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp0_ = source;
#line 688 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp1_ = self->priv->old_comment;
#line 688 "/home/jens/Source/shotwell/src/Commands.vala"
	event_source_set_comment (G_TYPE_CHECK_INSTANCE_CAST (G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, TYPE_EVENT, Event), TYPE_EVENT_SOURCE, EventSource), _tmp1_);
#line 7447 "Commands.c"
}


static void edit_event_comment_command_class_init (EditEventCommentCommandClass * klass) {
#line 672 "/home/jens/Source/shotwell/src/Commands.vala"
	edit_event_comment_command_parent_class = g_type_class_peek_parent (klass);
#line 672 "/home/jens/Source/shotwell/src/Commands.vala"
	g_type_class_add_private (klass, sizeof (EditEventCommentCommandPrivate));
#line 672 "/home/jens/Source/shotwell/src/Commands.vala"
	((SimpleProxyableCommandClass *) klass)->execute_on_source = (void (*) (SimpleProxyableCommand *, DataSource*)) edit_event_comment_command_real_execute_on_source;
#line 672 "/home/jens/Source/shotwell/src/Commands.vala"
	((SimpleProxyableCommandClass *) klass)->undo_on_source = (void (*) (SimpleProxyableCommand *, DataSource*)) edit_event_comment_command_real_undo_on_source;
#line 672 "/home/jens/Source/shotwell/src/Commands.vala"
	G_OBJECT_CLASS (klass)->finalize = edit_event_comment_command_finalize;
#line 7462 "Commands.c"
}


static void edit_event_comment_command_instance_init (EditEventCommentCommand * self) {
#line 672 "/home/jens/Source/shotwell/src/Commands.vala"
	self->priv = EDIT_EVENT_COMMENT_COMMAND_GET_PRIVATE (self);
#line 7469 "Commands.c"
}


static void edit_event_comment_command_finalize (GObject * obj) {
	EditEventCommentCommand * self;
#line 672 "/home/jens/Source/shotwell/src/Commands.vala"
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, TYPE_EDIT_EVENT_COMMENT_COMMAND, EditEventCommentCommand);
#line 673 "/home/jens/Source/shotwell/src/Commands.vala"
	_g_free0 (self->priv->new_comment);
#line 674 "/home/jens/Source/shotwell/src/Commands.vala"
	_g_free0 (self->priv->old_comment);
#line 672 "/home/jens/Source/shotwell/src/Commands.vala"
	G_OBJECT_CLASS (edit_event_comment_command_parent_class)->finalize (obj);
#line 7483 "Commands.c"
}


GType edit_event_comment_command_get_type (void) {
	static volatile gsize edit_event_comment_command_type_id__volatile = 0;
	if (g_once_init_enter (&edit_event_comment_command_type_id__volatile)) {
		static const GTypeInfo g_define_type_info = { sizeof (EditEventCommentCommandClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) edit_event_comment_command_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (EditEventCommentCommand), 0, (GInstanceInitFunc) edit_event_comment_command_instance_init, NULL };
		GType edit_event_comment_command_type_id;
		edit_event_comment_command_type_id = g_type_register_static (TYPE_SIMPLE_PROXYABLE_COMMAND, "EditEventCommentCommand", &g_define_type_info, 0);
		g_once_init_leave (&edit_event_comment_command_type_id__volatile, edit_event_comment_command_type_id);
	}
	return edit_event_comment_command_type_id__volatile;
}


SetKeyPhotoCommand* set_key_photo_command_construct (GType object_type, Event* event, MediaSource* new_primary_source) {
	SetKeyPhotoCommand * self = NULL;
	Event* _tmp0_;
	MediaSource* _tmp1_;
	MediaSource* _tmp2_;
	Event* _tmp3_;
	MediaSource* _tmp4_;
#line 696 "/home/jens/Source/shotwell/src/Commands.vala"
	g_return_val_if_fail (IS_EVENT (event), NULL);
#line 696 "/home/jens/Source/shotwell/src/Commands.vala"
	g_return_val_if_fail (IS_MEDIA_SOURCE (new_primary_source), NULL);
#line 697 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp0_ = event;
#line 697 "/home/jens/Source/shotwell/src/Commands.vala"
	self = (SetKeyPhotoCommand*) single_data_source_command_construct (object_type, G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, TYPE_DATA_SOURCE, DataSource), RESOURCES_MAKE_KEY_PHOTO_LABEL, "");
#line 699 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp1_ = new_primary_source;
#line 699 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp2_ = _g_object_ref0 (_tmp1_);
#line 699 "/home/jens/Source/shotwell/src/Commands.vala"
	_g_object_unref0 (self->priv->new_primary_source);
#line 699 "/home/jens/Source/shotwell/src/Commands.vala"
	self->priv->new_primary_source = _tmp2_;
#line 700 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp3_ = event;
#line 700 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp4_ = event_get_primary_source (_tmp3_);
#line 700 "/home/jens/Source/shotwell/src/Commands.vala"
	_g_object_unref0 (self->priv->old_primary_source);
#line 700 "/home/jens/Source/shotwell/src/Commands.vala"
	self->priv->old_primary_source = _tmp4_;
#line 696 "/home/jens/Source/shotwell/src/Commands.vala"
	return self;
#line 7532 "Commands.c"
}


SetKeyPhotoCommand* set_key_photo_command_new (Event* event, MediaSource* new_primary_source) {
#line 696 "/home/jens/Source/shotwell/src/Commands.vala"
	return set_key_photo_command_construct (TYPE_SET_KEY_PHOTO_COMMAND, event, new_primary_source);
#line 7539 "Commands.c"
}


static void set_key_photo_command_real_execute (Command* base) {
	SetKeyPhotoCommand * self;
	DataSource* _tmp0_;
	MediaSource* _tmp1_;
#line 703 "/home/jens/Source/shotwell/src/Commands.vala"
	self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_SET_KEY_PHOTO_COMMAND, SetKeyPhotoCommand);
#line 704 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp0_ = G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_SINGLE_DATA_SOURCE_COMMAND, SingleDataSourceCommand)->source;
#line 704 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp1_ = self->priv->new_primary_source;
#line 704 "/home/jens/Source/shotwell/src/Commands.vala"
	event_set_primary_source (G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, TYPE_EVENT, Event), _tmp1_);
#line 7555 "Commands.c"
}


static void set_key_photo_command_real_undo (Command* base) {
	SetKeyPhotoCommand * self;
	DataSource* _tmp0_;
	MediaSource* _tmp1_;
#line 707 "/home/jens/Source/shotwell/src/Commands.vala"
	self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_SET_KEY_PHOTO_COMMAND, SetKeyPhotoCommand);
#line 708 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp0_ = G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_SINGLE_DATA_SOURCE_COMMAND, SingleDataSourceCommand)->source;
#line 708 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp1_ = self->priv->old_primary_source;
#line 708 "/home/jens/Source/shotwell/src/Commands.vala"
	event_set_primary_source (G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, TYPE_EVENT, Event), _tmp1_);
#line 7571 "Commands.c"
}


static void set_key_photo_command_class_init (SetKeyPhotoCommandClass * klass) {
#line 692 "/home/jens/Source/shotwell/src/Commands.vala"
	set_key_photo_command_parent_class = g_type_class_peek_parent (klass);
#line 692 "/home/jens/Source/shotwell/src/Commands.vala"
	g_type_class_add_private (klass, sizeof (SetKeyPhotoCommandPrivate));
#line 692 "/home/jens/Source/shotwell/src/Commands.vala"
	((CommandClass *) klass)->execute = (void (*) (Command *)) set_key_photo_command_real_execute;
#line 692 "/home/jens/Source/shotwell/src/Commands.vala"
	((CommandClass *) klass)->undo = (void (*) (Command *)) set_key_photo_command_real_undo;
#line 692 "/home/jens/Source/shotwell/src/Commands.vala"
	G_OBJECT_CLASS (klass)->finalize = set_key_photo_command_finalize;
#line 7586 "Commands.c"
}


static void set_key_photo_command_instance_init (SetKeyPhotoCommand * self) {
#line 692 "/home/jens/Source/shotwell/src/Commands.vala"
	self->priv = SET_KEY_PHOTO_COMMAND_GET_PRIVATE (self);
#line 7593 "Commands.c"
}


static void set_key_photo_command_finalize (GObject * obj) {
	SetKeyPhotoCommand * self;
#line 692 "/home/jens/Source/shotwell/src/Commands.vala"
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, TYPE_SET_KEY_PHOTO_COMMAND, SetKeyPhotoCommand);
#line 693 "/home/jens/Source/shotwell/src/Commands.vala"
	_g_object_unref0 (self->priv->new_primary_source);
#line 694 "/home/jens/Source/shotwell/src/Commands.vala"
	_g_object_unref0 (self->priv->old_primary_source);
#line 692 "/home/jens/Source/shotwell/src/Commands.vala"
	G_OBJECT_CLASS (set_key_photo_command_parent_class)->finalize (obj);
#line 7607 "Commands.c"
}


GType set_key_photo_command_get_type (void) {
	static volatile gsize set_key_photo_command_type_id__volatile = 0;
	if (g_once_init_enter (&set_key_photo_command_type_id__volatile)) {
		static const GTypeInfo g_define_type_info = { sizeof (SetKeyPhotoCommandClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) set_key_photo_command_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (SetKeyPhotoCommand), 0, (GInstanceInitFunc) set_key_photo_command_instance_init, NULL };
		GType set_key_photo_command_type_id;
		set_key_photo_command_type_id = g_type_register_static (TYPE_SINGLE_DATA_SOURCE_COMMAND, "SetKeyPhotoCommand", &g_define_type_info, 0);
		g_once_init_leave (&set_key_photo_command_type_id__volatile, set_key_photo_command_type_id);
	}
	return set_key_photo_command_type_id__volatile;
}


RevertSingleCommand* revert_single_command_construct (GType object_type, Photo* photo) {
	RevertSingleCommand * self = NULL;
	Photo* _tmp0_;
#line 713 "/home/jens/Source/shotwell/src/Commands.vala"
	g_return_val_if_fail (IS_PHOTO (photo), NULL);
#line 714 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp0_ = photo;
#line 714 "/home/jens/Source/shotwell/src/Commands.vala"
	self = (RevertSingleCommand*) generic_photo_transformation_command_construct (object_type, _tmp0_, RESOURCES_REVERT_LABEL, "");
#line 713 "/home/jens/Source/shotwell/src/Commands.vala"
	return self;
#line 7634 "Commands.c"
}


RevertSingleCommand* revert_single_command_new (Photo* photo) {
#line 713 "/home/jens/Source/shotwell/src/Commands.vala"
	return revert_single_command_construct (TYPE_REVERT_SINGLE_COMMAND, photo);
#line 7641 "Commands.c"
}


static void revert_single_command_real_execute_on_photo (GenericPhotoTransformationCommand* base, Photo* photo) {
	RevertSingleCommand * self;
	Photo* _tmp0_;
#line 717 "/home/jens/Source/shotwell/src/Commands.vala"
	self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_REVERT_SINGLE_COMMAND, RevertSingleCommand);
#line 717 "/home/jens/Source/shotwell/src/Commands.vala"
	g_return_if_fail (IS_PHOTO (photo));
#line 718 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp0_ = photo;
#line 718 "/home/jens/Source/shotwell/src/Commands.vala"
	photo_remove_all_transformations (_tmp0_);
#line 7656 "Commands.c"
}


static gboolean revert_single_command_real_compress (Command* base, Command* command) {
	RevertSingleCommand * self;
	gboolean result = FALSE;
	RevertSingleCommand* revert_single_command = NULL;
	Command* _tmp0_;
	RevertSingleCommand* _tmp1_;
	RevertSingleCommand* _tmp2_;
	RevertSingleCommand* _tmp3_;
	DataSource* _tmp4_;
	DataSource* _tmp5_;
#line 721 "/home/jens/Source/shotwell/src/Commands.vala"
	self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_REVERT_SINGLE_COMMAND, RevertSingleCommand);
#line 721 "/home/jens/Source/shotwell/src/Commands.vala"
	g_return_val_if_fail (IS_COMMAND (command), FALSE);
#line 722 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp0_ = command;
#line 722 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp1_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_TYPE (_tmp0_, TYPE_REVERT_SINGLE_COMMAND) ? ((RevertSingleCommand*) _tmp0_) : NULL);
#line 722 "/home/jens/Source/shotwell/src/Commands.vala"
	revert_single_command = _tmp1_;
#line 723 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp2_ = revert_single_command;
#line 723 "/home/jens/Source/shotwell/src/Commands.vala"
	if (_tmp2_ == NULL) {
#line 724 "/home/jens/Source/shotwell/src/Commands.vala"
		result = FALSE;
#line 724 "/home/jens/Source/shotwell/src/Commands.vala"
		_g_object_unref0 (revert_single_command);
#line 724 "/home/jens/Source/shotwell/src/Commands.vala"
		return result;
#line 7690 "Commands.c"
	}
#line 726 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp3_ = revert_single_command;
#line 726 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp4_ = G_TYPE_CHECK_INSTANCE_CAST (_tmp3_, TYPE_SINGLE_DATA_SOURCE_COMMAND, SingleDataSourceCommand)->source;
#line 726 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp5_ = G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_SINGLE_DATA_SOURCE_COMMAND, SingleDataSourceCommand)->source;
#line 726 "/home/jens/Source/shotwell/src/Commands.vala"
	if (_tmp4_ != _tmp5_) {
#line 727 "/home/jens/Source/shotwell/src/Commands.vala"
		result = FALSE;
#line 727 "/home/jens/Source/shotwell/src/Commands.vala"
		_g_object_unref0 (revert_single_command);
#line 727 "/home/jens/Source/shotwell/src/Commands.vala"
		return result;
#line 7706 "Commands.c"
	}
#line 731 "/home/jens/Source/shotwell/src/Commands.vala"
	result = TRUE;
#line 731 "/home/jens/Source/shotwell/src/Commands.vala"
	_g_object_unref0 (revert_single_command);
#line 731 "/home/jens/Source/shotwell/src/Commands.vala"
	return result;
#line 7714 "Commands.c"
}


static void revert_single_command_class_init (RevertSingleCommandClass * klass) {
#line 712 "/home/jens/Source/shotwell/src/Commands.vala"
	revert_single_command_parent_class = g_type_class_peek_parent (klass);
#line 712 "/home/jens/Source/shotwell/src/Commands.vala"
	((GenericPhotoTransformationCommandClass *) klass)->execute_on_photo = (void (*) (GenericPhotoTransformationCommand *, Photo*)) revert_single_command_real_execute_on_photo;
#line 712 "/home/jens/Source/shotwell/src/Commands.vala"
	((CommandClass *) klass)->compress = (gboolean (*) (Command *, Command*)) revert_single_command_real_compress;
#line 7725 "Commands.c"
}


static void revert_single_command_instance_init (RevertSingleCommand * self) {
}


GType revert_single_command_get_type (void) {
	static volatile gsize revert_single_command_type_id__volatile = 0;
	if (g_once_init_enter (&revert_single_command_type_id__volatile)) {
		static const GTypeInfo g_define_type_info = { sizeof (RevertSingleCommandClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) revert_single_command_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (RevertSingleCommand), 0, (GInstanceInitFunc) revert_single_command_instance_init, NULL };
		GType revert_single_command_type_id;
		revert_single_command_type_id = g_type_register_static (TYPE_GENERIC_PHOTO_TRANSFORMATION_COMMAND, "RevertSingleCommand", &g_define_type_info, 0);
		g_once_init_leave (&revert_single_command_type_id__volatile, revert_single_command_type_id);
	}
	return revert_single_command_type_id__volatile;
}


RevertMultipleCommand* revert_multiple_command_construct (GType object_type, GeeIterable* iter) {
	RevertMultipleCommand * self = NULL;
	GeeIterable* _tmp0_;
#line 736 "/home/jens/Source/shotwell/src/Commands.vala"
	g_return_val_if_fail (GEE_IS_ITERABLE (iter), NULL);
#line 737 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp0_ = iter;
#line 737 "/home/jens/Source/shotwell/src/Commands.vala"
	self = (RevertMultipleCommand*) multiple_photo_transformation_command_construct (object_type, _tmp0_, _ ("Reverting"), _ ("Undoing Revert"), RESOURCES_REVERT_LABEL, "");
#line 736 "/home/jens/Source/shotwell/src/Commands.vala"
	return self;
#line 7756 "Commands.c"
}


RevertMultipleCommand* revert_multiple_command_new (GeeIterable* iter) {
#line 736 "/home/jens/Source/shotwell/src/Commands.vala"
	return revert_multiple_command_construct (TYPE_REVERT_MULTIPLE_COMMAND, iter);
#line 7763 "Commands.c"
}


static void revert_multiple_command_real_execute_on_source (MultipleDataSourceCommand* base, DataSource* source) {
	RevertMultipleCommand * self;
	DataSource* _tmp0_;
#line 741 "/home/jens/Source/shotwell/src/Commands.vala"
	self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_REVERT_MULTIPLE_COMMAND, RevertMultipleCommand);
#line 741 "/home/jens/Source/shotwell/src/Commands.vala"
	g_return_if_fail (IS_DATA_SOURCE (source));
#line 742 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp0_ = source;
#line 742 "/home/jens/Source/shotwell/src/Commands.vala"
	photo_remove_all_transformations (G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, TYPE_PHOTO, Photo));
#line 7778 "Commands.c"
}


static void revert_multiple_command_class_init (RevertMultipleCommandClass * klass) {
#line 735 "/home/jens/Source/shotwell/src/Commands.vala"
	revert_multiple_command_parent_class = g_type_class_peek_parent (klass);
#line 735 "/home/jens/Source/shotwell/src/Commands.vala"
	((MultipleDataSourceCommandClass *) klass)->execute_on_source = (void (*) (MultipleDataSourceCommand *, DataSource*)) revert_multiple_command_real_execute_on_source;
#line 7787 "Commands.c"
}


static void revert_multiple_command_instance_init (RevertMultipleCommand * self) {
}


GType revert_multiple_command_get_type (void) {
	static volatile gsize revert_multiple_command_type_id__volatile = 0;
	if (g_once_init_enter (&revert_multiple_command_type_id__volatile)) {
		static const GTypeInfo g_define_type_info = { sizeof (RevertMultipleCommandClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) revert_multiple_command_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (RevertMultipleCommand), 0, (GInstanceInitFunc) revert_multiple_command_instance_init, NULL };
		GType revert_multiple_command_type_id;
		revert_multiple_command_type_id = g_type_register_static (TYPE_MULTIPLE_PHOTO_TRANSFORMATION_COMMAND, "RevertMultipleCommand", &g_define_type_info, 0);
		g_once_init_leave (&revert_multiple_command_type_id__volatile, revert_multiple_command_type_id);
	}
	return revert_multiple_command_type_id__volatile;
}


EnhanceSingleCommand* enhance_single_command_construct (GType object_type, Photo* photo) {
	EnhanceSingleCommand * self = NULL;
	Photo* _tmp0_;
#line 747 "/home/jens/Source/shotwell/src/Commands.vala"
	g_return_val_if_fail (IS_PHOTO (photo), NULL);
#line 748 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp0_ = photo;
#line 748 "/home/jens/Source/shotwell/src/Commands.vala"
	self = (EnhanceSingleCommand*) generic_photo_transformation_command_construct (object_type, _tmp0_, RESOURCES_ENHANCE_LABEL, RESOURCES_ENHANCE_TOOLTIP);
#line 747 "/home/jens/Source/shotwell/src/Commands.vala"
	return self;
#line 7818 "Commands.c"
}


EnhanceSingleCommand* enhance_single_command_new (Photo* photo) {
#line 747 "/home/jens/Source/shotwell/src/Commands.vala"
	return enhance_single_command_construct (TYPE_ENHANCE_SINGLE_COMMAND, photo);
#line 7825 "Commands.c"
}


static void enhance_single_command_real_execute_on_photo (GenericPhotoTransformationCommand* base, Photo* photo) {
	EnhanceSingleCommand * self;
	AppWindow* _tmp0_;
	AppWindow* _tmp1_;
	Photo* _tmp2_;
	AppWindow* _tmp3_;
	AppWindow* _tmp4_;
#line 751 "/home/jens/Source/shotwell/src/Commands.vala"
	self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_ENHANCE_SINGLE_COMMAND, EnhanceSingleCommand);
#line 751 "/home/jens/Source/shotwell/src/Commands.vala"
	g_return_if_fail (IS_PHOTO (photo));
#line 752 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp0_ = app_window_get_instance ();
#line 752 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp1_ = _tmp0_;
#line 752 "/home/jens/Source/shotwell/src/Commands.vala"
	page_window_set_busy_cursor (G_TYPE_CHECK_INSTANCE_CAST (_tmp1_, TYPE_PAGE_WINDOW, PageWindow));
#line 752 "/home/jens/Source/shotwell/src/Commands.vala"
	_g_object_unref0 (_tmp1_);
#line 757 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp2_ = photo;
#line 757 "/home/jens/Source/shotwell/src/Commands.vala"
	photo_enhance (_tmp2_);
#line 763 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp3_ = app_window_get_instance ();
#line 763 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp4_ = _tmp3_;
#line 763 "/home/jens/Source/shotwell/src/Commands.vala"
	page_window_set_normal_cursor (G_TYPE_CHECK_INSTANCE_CAST (_tmp4_, TYPE_PAGE_WINDOW, PageWindow));
#line 763 "/home/jens/Source/shotwell/src/Commands.vala"
	_g_object_unref0 (_tmp4_);
#line 7860 "Commands.c"
}


static gboolean enhance_single_command_real_compress (Command* base, Command* command) {
	EnhanceSingleCommand * self;
	gboolean result = FALSE;
	EnhanceSingleCommand* enhance_single_command = NULL;
	Command* _tmp0_;
	EnhanceSingleCommand* _tmp1_;
	EnhanceSingleCommand* _tmp2_;
	EnhanceSingleCommand* _tmp3_;
	DataSource* _tmp4_;
	DataSource* _tmp5_;
#line 766 "/home/jens/Source/shotwell/src/Commands.vala"
	self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_ENHANCE_SINGLE_COMMAND, EnhanceSingleCommand);
#line 766 "/home/jens/Source/shotwell/src/Commands.vala"
	g_return_val_if_fail (IS_COMMAND (command), FALSE);
#line 767 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp0_ = command;
#line 767 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp1_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_TYPE (_tmp0_, TYPE_ENHANCE_SINGLE_COMMAND) ? ((EnhanceSingleCommand*) _tmp0_) : NULL);
#line 767 "/home/jens/Source/shotwell/src/Commands.vala"
	enhance_single_command = _tmp1_;
#line 768 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp2_ = enhance_single_command;
#line 768 "/home/jens/Source/shotwell/src/Commands.vala"
	if (_tmp2_ == NULL) {
#line 769 "/home/jens/Source/shotwell/src/Commands.vala"
		result = FALSE;
#line 769 "/home/jens/Source/shotwell/src/Commands.vala"
		_g_object_unref0 (enhance_single_command);
#line 769 "/home/jens/Source/shotwell/src/Commands.vala"
		return result;
#line 7894 "Commands.c"
	}
#line 771 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp3_ = enhance_single_command;
#line 771 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp4_ = G_TYPE_CHECK_INSTANCE_CAST (_tmp3_, TYPE_SINGLE_DATA_SOURCE_COMMAND, SingleDataSourceCommand)->source;
#line 771 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp5_ = G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_SINGLE_DATA_SOURCE_COMMAND, SingleDataSourceCommand)->source;
#line 771 "/home/jens/Source/shotwell/src/Commands.vala"
	if (_tmp4_ != _tmp5_) {
#line 772 "/home/jens/Source/shotwell/src/Commands.vala"
		result = FALSE;
#line 772 "/home/jens/Source/shotwell/src/Commands.vala"
		_g_object_unref0 (enhance_single_command);
#line 772 "/home/jens/Source/shotwell/src/Commands.vala"
		return result;
#line 7910 "Commands.c"
	}
#line 775 "/home/jens/Source/shotwell/src/Commands.vala"
	result = TRUE;
#line 775 "/home/jens/Source/shotwell/src/Commands.vala"
	_g_object_unref0 (enhance_single_command);
#line 775 "/home/jens/Source/shotwell/src/Commands.vala"
	return result;
#line 7918 "Commands.c"
}


static void enhance_single_command_class_init (EnhanceSingleCommandClass * klass) {
#line 746 "/home/jens/Source/shotwell/src/Commands.vala"
	enhance_single_command_parent_class = g_type_class_peek_parent (klass);
#line 746 "/home/jens/Source/shotwell/src/Commands.vala"
	((GenericPhotoTransformationCommandClass *) klass)->execute_on_photo = (void (*) (GenericPhotoTransformationCommand *, Photo*)) enhance_single_command_real_execute_on_photo;
#line 746 "/home/jens/Source/shotwell/src/Commands.vala"
	((CommandClass *) klass)->compress = (gboolean (*) (Command *, Command*)) enhance_single_command_real_compress;
#line 7929 "Commands.c"
}


static void enhance_single_command_instance_init (EnhanceSingleCommand * self) {
}


GType enhance_single_command_get_type (void) {
	static volatile gsize enhance_single_command_type_id__volatile = 0;
	if (g_once_init_enter (&enhance_single_command_type_id__volatile)) {
		static const GTypeInfo g_define_type_info = { sizeof (EnhanceSingleCommandClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) enhance_single_command_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (EnhanceSingleCommand), 0, (GInstanceInitFunc) enhance_single_command_instance_init, NULL };
		GType enhance_single_command_type_id;
		enhance_single_command_type_id = g_type_register_static (TYPE_GENERIC_PHOTO_TRANSFORMATION_COMMAND, "EnhanceSingleCommand", &g_define_type_info, 0);
		g_once_init_leave (&enhance_single_command_type_id__volatile, enhance_single_command_type_id);
	}
	return enhance_single_command_type_id__volatile;
}


EnhanceMultipleCommand* enhance_multiple_command_construct (GType object_type, GeeIterable* iter) {
	EnhanceMultipleCommand * self = NULL;
	GeeIterable* _tmp0_;
#line 780 "/home/jens/Source/shotwell/src/Commands.vala"
	g_return_val_if_fail (GEE_IS_ITERABLE (iter), NULL);
#line 781 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp0_ = iter;
#line 781 "/home/jens/Source/shotwell/src/Commands.vala"
	self = (EnhanceMultipleCommand*) multiple_photo_transformation_command_construct (object_type, _tmp0_, _ ("Enhancing"), _ ("Undoing Enhance"), RESOURCES_ENHANCE_LABEL, RESOURCES_ENHANCE_TOOLTIP);
#line 780 "/home/jens/Source/shotwell/src/Commands.vala"
	return self;
#line 7960 "Commands.c"
}


EnhanceMultipleCommand* enhance_multiple_command_new (GeeIterable* iter) {
#line 780 "/home/jens/Source/shotwell/src/Commands.vala"
	return enhance_multiple_command_construct (TYPE_ENHANCE_MULTIPLE_COMMAND, iter);
#line 7967 "Commands.c"
}


static void enhance_multiple_command_real_execute_on_source (MultipleDataSourceCommand* base, DataSource* source) {
	EnhanceMultipleCommand * self;
	DataSource* _tmp0_;
#line 785 "/home/jens/Source/shotwell/src/Commands.vala"
	self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_ENHANCE_MULTIPLE_COMMAND, EnhanceMultipleCommand);
#line 785 "/home/jens/Source/shotwell/src/Commands.vala"
	g_return_if_fail (IS_DATA_SOURCE (source));
#line 786 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp0_ = source;
#line 786 "/home/jens/Source/shotwell/src/Commands.vala"
	photo_enhance (G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, TYPE_PHOTO, Photo));
#line 7982 "Commands.c"
}


static void enhance_multiple_command_class_init (EnhanceMultipleCommandClass * klass) {
#line 779 "/home/jens/Source/shotwell/src/Commands.vala"
	enhance_multiple_command_parent_class = g_type_class_peek_parent (klass);
#line 779 "/home/jens/Source/shotwell/src/Commands.vala"
	((MultipleDataSourceCommandClass *) klass)->execute_on_source = (void (*) (MultipleDataSourceCommand *, DataSource*)) enhance_multiple_command_real_execute_on_source;
#line 7991 "Commands.c"
}


static void enhance_multiple_command_instance_init (EnhanceMultipleCommand * self) {
}


GType enhance_multiple_command_get_type (void) {
	static volatile gsize enhance_multiple_command_type_id__volatile = 0;
	if (g_once_init_enter (&enhance_multiple_command_type_id__volatile)) {
		static const GTypeInfo g_define_type_info = { sizeof (EnhanceMultipleCommandClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) enhance_multiple_command_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (EnhanceMultipleCommand), 0, (GInstanceInitFunc) enhance_multiple_command_instance_init, NULL };
		GType enhance_multiple_command_type_id;
		enhance_multiple_command_type_id = g_type_register_static (TYPE_MULTIPLE_PHOTO_TRANSFORMATION_COMMAND, "EnhanceMultipleCommand", &g_define_type_info, 0);
		g_once_init_leave (&enhance_multiple_command_type_id__volatile, enhance_multiple_command_type_id);
	}
	return enhance_multiple_command_type_id__volatile;
}


StraightenCommand* straighten_command_construct (GType object_type, Photo* photo, gdouble theta, Box* crop, const gchar* name, const gchar* explanation) {
	StraightenCommand * self = NULL;
	Photo* _tmp0_;
	const gchar* _tmp1_;
	const gchar* _tmp2_;
	gdouble _tmp3_;
	Box _tmp4_;
#line 794 "/home/jens/Source/shotwell/src/Commands.vala"
	g_return_val_if_fail (IS_PHOTO (photo), NULL);
#line 794 "/home/jens/Source/shotwell/src/Commands.vala"
	g_return_val_if_fail (crop != NULL, NULL);
#line 794 "/home/jens/Source/shotwell/src/Commands.vala"
	g_return_val_if_fail (name != NULL, NULL);
#line 794 "/home/jens/Source/shotwell/src/Commands.vala"
	g_return_val_if_fail (explanation != NULL, NULL);
#line 795 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp0_ = photo;
#line 795 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp1_ = name;
#line 795 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp2_ = explanation;
#line 795 "/home/jens/Source/shotwell/src/Commands.vala"
	self = (StraightenCommand*) generic_photo_transformation_command_construct (object_type, _tmp0_, _tmp1_, _tmp2_);
#line 797 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp3_ = theta;
#line 797 "/home/jens/Source/shotwell/src/Commands.vala"
	self->priv->theta = _tmp3_;
#line 798 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp4_ = *crop;
#line 798 "/home/jens/Source/shotwell/src/Commands.vala"
	self->priv->crop = _tmp4_;
#line 794 "/home/jens/Source/shotwell/src/Commands.vala"
	return self;
#line 8044 "Commands.c"
}


StraightenCommand* straighten_command_new (Photo* photo, gdouble theta, Box* crop, const gchar* name, const gchar* explanation) {
#line 794 "/home/jens/Source/shotwell/src/Commands.vala"
	return straighten_command_construct (TYPE_STRAIGHTEN_COMMAND, photo, theta, crop, name, explanation);
#line 8051 "Commands.c"
}


static void straighten_command_real_execute_on_photo (GenericPhotoTransformationCommand* base, Photo* photo) {
	StraightenCommand * self;
	DataCollection* collection = NULL;
	Photo* _tmp0_;
	DataCollection* _tmp1_;
	DataCollection* _tmp2_;
	Photo* _tmp4_;
	gdouble _tmp5_;
	Photo* _tmp6_;
	Box _tmp7_;
	DataCollection* _tmp8_;
#line 801 "/home/jens/Source/shotwell/src/Commands.vala"
	self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_STRAIGHTEN_COMMAND, StraightenCommand);
#line 801 "/home/jens/Source/shotwell/src/Commands.vala"
	g_return_if_fail (IS_PHOTO (photo));
#line 803 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp0_ = photo;
#line 803 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp1_ = data_object_get_membership (G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, TYPE_DATA_OBJECT, DataObject));
#line 803 "/home/jens/Source/shotwell/src/Commands.vala"
	collection = _tmp1_;
#line 804 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp2_ = collection;
#line 804 "/home/jens/Source/shotwell/src/Commands.vala"
	if (_tmp2_ != NULL) {
#line 8080 "Commands.c"
		DataCollection* _tmp3_;
#line 805 "/home/jens/Source/shotwell/src/Commands.vala"
		_tmp3_ = collection;
#line 805 "/home/jens/Source/shotwell/src/Commands.vala"
		data_collection_freeze_notifications (_tmp3_);
#line 8086 "Commands.c"
	}
#line 807 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp4_ = photo;
#line 807 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp5_ = self->priv->theta;
#line 807 "/home/jens/Source/shotwell/src/Commands.vala"
	photo_set_straighten (_tmp4_, _tmp5_);
#line 808 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp6_ = photo;
#line 808 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp7_ = self->priv->crop;
#line 808 "/home/jens/Source/shotwell/src/Commands.vala"
	photo_set_crop (_tmp6_, &_tmp7_);
#line 810 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp8_ = collection;
#line 810 "/home/jens/Source/shotwell/src/Commands.vala"
	if (_tmp8_ != NULL) {
#line 8104 "Commands.c"
		DataCollection* _tmp9_;
#line 811 "/home/jens/Source/shotwell/src/Commands.vala"
		_tmp9_ = collection;
#line 811 "/home/jens/Source/shotwell/src/Commands.vala"
		data_collection_thaw_notifications (_tmp9_);
#line 8110 "Commands.c"
	}
#line 801 "/home/jens/Source/shotwell/src/Commands.vala"
	_data_collection_unref0 (collection);
#line 8114 "Commands.c"
}


static void straighten_command_class_init (StraightenCommandClass * klass) {
#line 790 "/home/jens/Source/shotwell/src/Commands.vala"
	straighten_command_parent_class = g_type_class_peek_parent (klass);
#line 790 "/home/jens/Source/shotwell/src/Commands.vala"
	g_type_class_add_private (klass, sizeof (StraightenCommandPrivate));
#line 790 "/home/jens/Source/shotwell/src/Commands.vala"
	((GenericPhotoTransformationCommandClass *) klass)->execute_on_photo = (void (*) (GenericPhotoTransformationCommand *, Photo*)) straighten_command_real_execute_on_photo;
#line 790 "/home/jens/Source/shotwell/src/Commands.vala"
	G_OBJECT_CLASS (klass)->finalize = straighten_command_finalize;
#line 8127 "Commands.c"
}


static void straighten_command_instance_init (StraightenCommand * self) {
#line 790 "/home/jens/Source/shotwell/src/Commands.vala"
	self->priv = STRAIGHTEN_COMMAND_GET_PRIVATE (self);
#line 8134 "Commands.c"
}


static void straighten_command_finalize (GObject * obj) {
	StraightenCommand * self;
#line 790 "/home/jens/Source/shotwell/src/Commands.vala"
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, TYPE_STRAIGHTEN_COMMAND, StraightenCommand);
#line 790 "/home/jens/Source/shotwell/src/Commands.vala"
	G_OBJECT_CLASS (straighten_command_parent_class)->finalize (obj);
#line 8144 "Commands.c"
}


GType straighten_command_get_type (void) {
	static volatile gsize straighten_command_type_id__volatile = 0;
	if (g_once_init_enter (&straighten_command_type_id__volatile)) {
		static const GTypeInfo g_define_type_info = { sizeof (StraightenCommandClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) straighten_command_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (StraightenCommand), 0, (GInstanceInitFunc) straighten_command_instance_init, NULL };
		GType straighten_command_type_id;
		straighten_command_type_id = g_type_register_static (TYPE_GENERIC_PHOTO_TRANSFORMATION_COMMAND, "StraightenCommand", &g_define_type_info, 0);
		g_once_init_leave (&straighten_command_type_id__volatile, straighten_command_type_id);
	}
	return straighten_command_type_id__volatile;
}


CropCommand* crop_command_construct (GType object_type, Photo* photo, Box* crop, const gchar* name, const gchar* explanation) {
	CropCommand * self = NULL;
	Photo* _tmp0_;
	const gchar* _tmp1_;
	const gchar* _tmp2_;
	Box _tmp3_;
#line 818 "/home/jens/Source/shotwell/src/Commands.vala"
	g_return_val_if_fail (IS_PHOTO (photo), NULL);
#line 818 "/home/jens/Source/shotwell/src/Commands.vala"
	g_return_val_if_fail (crop != NULL, NULL);
#line 818 "/home/jens/Source/shotwell/src/Commands.vala"
	g_return_val_if_fail (name != NULL, NULL);
#line 818 "/home/jens/Source/shotwell/src/Commands.vala"
	g_return_val_if_fail (explanation != NULL, NULL);
#line 819 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp0_ = photo;
#line 819 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp1_ = name;
#line 819 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp2_ = explanation;
#line 819 "/home/jens/Source/shotwell/src/Commands.vala"
	self = (CropCommand*) generic_photo_transformation_command_construct (object_type, _tmp0_, _tmp1_, _tmp2_);
#line 821 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp3_ = *crop;
#line 821 "/home/jens/Source/shotwell/src/Commands.vala"
	self->priv->crop = _tmp3_;
#line 818 "/home/jens/Source/shotwell/src/Commands.vala"
	return self;
#line 8188 "Commands.c"
}


CropCommand* crop_command_new (Photo* photo, Box* crop, const gchar* name, const gchar* explanation) {
#line 818 "/home/jens/Source/shotwell/src/Commands.vala"
	return crop_command_construct (TYPE_CROP_COMMAND, photo, crop, name, explanation);
#line 8195 "Commands.c"
}


static void crop_command_real_execute_on_photo (GenericPhotoTransformationCommand* base, Photo* photo) {
	CropCommand * self;
	Photo* _tmp0_;
	Box _tmp1_;
#line 824 "/home/jens/Source/shotwell/src/Commands.vala"
	self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_CROP_COMMAND, CropCommand);
#line 824 "/home/jens/Source/shotwell/src/Commands.vala"
	g_return_if_fail (IS_PHOTO (photo));
#line 825 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp0_ = photo;
#line 825 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp1_ = self->priv->crop;
#line 825 "/home/jens/Source/shotwell/src/Commands.vala"
	photo_set_crop (_tmp0_, &_tmp1_);
#line 8213 "Commands.c"
}


static void crop_command_class_init (CropCommandClass * klass) {
#line 815 "/home/jens/Source/shotwell/src/Commands.vala"
	crop_command_parent_class = g_type_class_peek_parent (klass);
#line 815 "/home/jens/Source/shotwell/src/Commands.vala"
	g_type_class_add_private (klass, sizeof (CropCommandPrivate));
#line 815 "/home/jens/Source/shotwell/src/Commands.vala"
	((GenericPhotoTransformationCommandClass *) klass)->execute_on_photo = (void (*) (GenericPhotoTransformationCommand *, Photo*)) crop_command_real_execute_on_photo;
#line 815 "/home/jens/Source/shotwell/src/Commands.vala"
	G_OBJECT_CLASS (klass)->finalize = crop_command_finalize;
#line 8226 "Commands.c"
}


static void crop_command_instance_init (CropCommand * self) {
#line 815 "/home/jens/Source/shotwell/src/Commands.vala"
	self->priv = CROP_COMMAND_GET_PRIVATE (self);
#line 8233 "Commands.c"
}


static void crop_command_finalize (GObject * obj) {
	CropCommand * self;
#line 815 "/home/jens/Source/shotwell/src/Commands.vala"
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, TYPE_CROP_COMMAND, CropCommand);
#line 815 "/home/jens/Source/shotwell/src/Commands.vala"
	G_OBJECT_CLASS (crop_command_parent_class)->finalize (obj);
#line 8243 "Commands.c"
}


GType crop_command_get_type (void) {
	static volatile gsize crop_command_type_id__volatile = 0;
	if (g_once_init_enter (&crop_command_type_id__volatile)) {
		static const GTypeInfo g_define_type_info = { sizeof (CropCommandClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) crop_command_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (CropCommand), 0, (GInstanceInitFunc) crop_command_instance_init, NULL };
		GType crop_command_type_id;
		crop_command_type_id = g_type_register_static (TYPE_GENERIC_PHOTO_TRANSFORMATION_COMMAND, "CropCommand", &g_define_type_info, 0);
		g_once_init_leave (&crop_command_type_id__volatile, crop_command_type_id);
	}
	return crop_command_type_id__volatile;
}


static gpointer _pixel_transformation_bundle_ref0 (gpointer self) {
#line 836 "/home/jens/Source/shotwell/src/Commands.vala"
	return self ? pixel_transformation_bundle_ref (self) : NULL;
#line 8262 "Commands.c"
}


AdjustColorsSingleCommand* adjust_colors_single_command_construct (GType object_type, Photo* photo, PixelTransformationBundle* transformations, const gchar* name, const gchar* explanation) {
	AdjustColorsSingleCommand * self = NULL;
	Photo* _tmp0_;
	const gchar* _tmp1_;
	const gchar* _tmp2_;
	PixelTransformationBundle* _tmp3_;
	PixelTransformationBundle* _tmp4_;
#line 832 "/home/jens/Source/shotwell/src/Commands.vala"
	g_return_val_if_fail (IS_PHOTO (photo), NULL);
#line 832 "/home/jens/Source/shotwell/src/Commands.vala"
	g_return_val_if_fail (IS_PIXEL_TRANSFORMATION_BUNDLE (transformations), NULL);
#line 832 "/home/jens/Source/shotwell/src/Commands.vala"
	g_return_val_if_fail (name != NULL, NULL);
#line 832 "/home/jens/Source/shotwell/src/Commands.vala"
	g_return_val_if_fail (explanation != NULL, NULL);
#line 834 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp0_ = photo;
#line 834 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp1_ = name;
#line 834 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp2_ = explanation;
#line 834 "/home/jens/Source/shotwell/src/Commands.vala"
	self = (AdjustColorsSingleCommand*) generic_photo_transformation_command_construct (object_type, _tmp0_, _tmp1_, _tmp2_);
#line 836 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp3_ = transformations;
#line 836 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp4_ = _pixel_transformation_bundle_ref0 (_tmp3_);
#line 836 "/home/jens/Source/shotwell/src/Commands.vala"
	_pixel_transformation_bundle_unref0 (self->priv->transformations);
#line 836 "/home/jens/Source/shotwell/src/Commands.vala"
	self->priv->transformations = _tmp4_;
#line 832 "/home/jens/Source/shotwell/src/Commands.vala"
	return self;
#line 8299 "Commands.c"
}


AdjustColorsSingleCommand* adjust_colors_single_command_new (Photo* photo, PixelTransformationBundle* transformations, const gchar* name, const gchar* explanation) {
#line 832 "/home/jens/Source/shotwell/src/Commands.vala"
	return adjust_colors_single_command_construct (TYPE_ADJUST_COLORS_SINGLE_COMMAND, photo, transformations, name, explanation);
#line 8306 "Commands.c"
}


static void adjust_colors_single_command_real_execute_on_photo (GenericPhotoTransformationCommand* base, Photo* photo) {
	AdjustColorsSingleCommand * self;
	AppWindow* _tmp0_;
	AppWindow* _tmp1_;
	Photo* _tmp2_;
	PixelTransformationBundle* _tmp3_;
	AppWindow* _tmp4_;
	AppWindow* _tmp5_;
#line 839 "/home/jens/Source/shotwell/src/Commands.vala"
	self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_ADJUST_COLORS_SINGLE_COMMAND, AdjustColorsSingleCommand);
#line 839 "/home/jens/Source/shotwell/src/Commands.vala"
	g_return_if_fail (IS_PHOTO (photo));
#line 840 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp0_ = app_window_get_instance ();
#line 840 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp1_ = _tmp0_;
#line 840 "/home/jens/Source/shotwell/src/Commands.vala"
	page_window_set_busy_cursor (G_TYPE_CHECK_INSTANCE_CAST (_tmp1_, TYPE_PAGE_WINDOW, PageWindow));
#line 840 "/home/jens/Source/shotwell/src/Commands.vala"
	_g_object_unref0 (_tmp1_);
#line 842 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp2_ = photo;
#line 842 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp3_ = self->priv->transformations;
#line 842 "/home/jens/Source/shotwell/src/Commands.vala"
	photo_set_color_adjustments (_tmp2_, _tmp3_);
#line 844 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp4_ = app_window_get_instance ();
#line 844 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp5_ = _tmp4_;
#line 844 "/home/jens/Source/shotwell/src/Commands.vala"
	page_window_set_normal_cursor (G_TYPE_CHECK_INSTANCE_CAST (_tmp5_, TYPE_PAGE_WINDOW, PageWindow));
#line 844 "/home/jens/Source/shotwell/src/Commands.vala"
	_g_object_unref0 (_tmp5_);
#line 8344 "Commands.c"
}


static gboolean adjust_colors_single_command_real_can_compress (GenericPhotoTransformationCommand* base, Command* command) {
	AdjustColorsSingleCommand * self;
	gboolean result = FALSE;
	Command* _tmp0_;
#line 847 "/home/jens/Source/shotwell/src/Commands.vala"
	self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_ADJUST_COLORS_SINGLE_COMMAND, AdjustColorsSingleCommand);
#line 847 "/home/jens/Source/shotwell/src/Commands.vala"
	g_return_val_if_fail (IS_COMMAND (command), FALSE);
#line 848 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp0_ = command;
#line 848 "/home/jens/Source/shotwell/src/Commands.vala"
	result = G_TYPE_CHECK_INSTANCE_TYPE (_tmp0_, TYPE_ADJUST_COLORS_SINGLE_COMMAND);
#line 848 "/home/jens/Source/shotwell/src/Commands.vala"
	return result;
#line 8362 "Commands.c"
}


static void adjust_colors_single_command_class_init (AdjustColorsSingleCommandClass * klass) {
#line 829 "/home/jens/Source/shotwell/src/Commands.vala"
	adjust_colors_single_command_parent_class = g_type_class_peek_parent (klass);
#line 829 "/home/jens/Source/shotwell/src/Commands.vala"
	g_type_class_add_private (klass, sizeof (AdjustColorsSingleCommandPrivate));
#line 829 "/home/jens/Source/shotwell/src/Commands.vala"
	((GenericPhotoTransformationCommandClass *) klass)->execute_on_photo = (void (*) (GenericPhotoTransformationCommand *, Photo*)) adjust_colors_single_command_real_execute_on_photo;
#line 829 "/home/jens/Source/shotwell/src/Commands.vala"
	((GenericPhotoTransformationCommandClass *) klass)->can_compress = (gboolean (*) (GenericPhotoTransformationCommand *, Command*)) adjust_colors_single_command_real_can_compress;
#line 829 "/home/jens/Source/shotwell/src/Commands.vala"
	G_OBJECT_CLASS (klass)->finalize = adjust_colors_single_command_finalize;
#line 8377 "Commands.c"
}


static void adjust_colors_single_command_instance_init (AdjustColorsSingleCommand * self) {
#line 829 "/home/jens/Source/shotwell/src/Commands.vala"
	self->priv = ADJUST_COLORS_SINGLE_COMMAND_GET_PRIVATE (self);
#line 8384 "Commands.c"
}


static void adjust_colors_single_command_finalize (GObject * obj) {
	AdjustColorsSingleCommand * self;
#line 829 "/home/jens/Source/shotwell/src/Commands.vala"
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, TYPE_ADJUST_COLORS_SINGLE_COMMAND, AdjustColorsSingleCommand);
#line 830 "/home/jens/Source/shotwell/src/Commands.vala"
	_pixel_transformation_bundle_unref0 (self->priv->transformations);
#line 829 "/home/jens/Source/shotwell/src/Commands.vala"
	G_OBJECT_CLASS (adjust_colors_single_command_parent_class)->finalize (obj);
#line 8396 "Commands.c"
}


GType adjust_colors_single_command_get_type (void) {
	static volatile gsize adjust_colors_single_command_type_id__volatile = 0;
	if (g_once_init_enter (&adjust_colors_single_command_type_id__volatile)) {
		static const GTypeInfo g_define_type_info = { sizeof (AdjustColorsSingleCommandClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) adjust_colors_single_command_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (AdjustColorsSingleCommand), 0, (GInstanceInitFunc) adjust_colors_single_command_instance_init, NULL };
		GType adjust_colors_single_command_type_id;
		adjust_colors_single_command_type_id = g_type_register_static (TYPE_GENERIC_PHOTO_TRANSFORMATION_COMMAND, "AdjustColorsSingleCommand", &g_define_type_info, 0);
		g_once_init_leave (&adjust_colors_single_command_type_id__volatile, adjust_colors_single_command_type_id);
	}
	return adjust_colors_single_command_type_id__volatile;
}


AdjustColorsMultipleCommand* adjust_colors_multiple_command_construct (GType object_type, GeeIterable* iter, PixelTransformationBundle* transformations, const gchar* name, const gchar* explanation) {
	AdjustColorsMultipleCommand * self = NULL;
	GeeIterable* _tmp0_;
	const gchar* _tmp1_;
	const gchar* _tmp2_;
	PixelTransformationBundle* _tmp3_;
	PixelTransformationBundle* _tmp4_;
#line 855 "/home/jens/Source/shotwell/src/Commands.vala"
	g_return_val_if_fail (GEE_IS_ITERABLE (iter), NULL);
#line 855 "/home/jens/Source/shotwell/src/Commands.vala"
	g_return_val_if_fail (IS_PIXEL_TRANSFORMATION_BUNDLE (transformations), NULL);
#line 855 "/home/jens/Source/shotwell/src/Commands.vala"
	g_return_val_if_fail (name != NULL, NULL);
#line 855 "/home/jens/Source/shotwell/src/Commands.vala"
	g_return_val_if_fail (explanation != NULL, NULL);
#line 857 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp0_ = iter;
#line 857 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp1_ = name;
#line 857 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp2_ = explanation;
#line 857 "/home/jens/Source/shotwell/src/Commands.vala"
	self = (AdjustColorsMultipleCommand*) multiple_photo_transformation_command_construct (object_type, _tmp0_, _ ("Applying Color Transformations"), _ ("Undoing Color Transformations"), _tmp1_, _tmp2_);
#line 860 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp3_ = transformations;
#line 860 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp4_ = _pixel_transformation_bundle_ref0 (_tmp3_);
#line 860 "/home/jens/Source/shotwell/src/Commands.vala"
	_pixel_transformation_bundle_unref0 (self->priv->transformations);
#line 860 "/home/jens/Source/shotwell/src/Commands.vala"
	self->priv->transformations = _tmp4_;
#line 855 "/home/jens/Source/shotwell/src/Commands.vala"
	return self;
#line 8445 "Commands.c"
}


AdjustColorsMultipleCommand* adjust_colors_multiple_command_new (GeeIterable* iter, PixelTransformationBundle* transformations, const gchar* name, const gchar* explanation) {
#line 855 "/home/jens/Source/shotwell/src/Commands.vala"
	return adjust_colors_multiple_command_construct (TYPE_ADJUST_COLORS_MULTIPLE_COMMAND, iter, transformations, name, explanation);
#line 8452 "Commands.c"
}


static void adjust_colors_multiple_command_real_execute_on_source (MultipleDataSourceCommand* base, DataSource* source) {
	AdjustColorsMultipleCommand * self;
	DataSource* _tmp0_;
	PixelTransformationBundle* _tmp1_;
#line 863 "/home/jens/Source/shotwell/src/Commands.vala"
	self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_ADJUST_COLORS_MULTIPLE_COMMAND, AdjustColorsMultipleCommand);
#line 863 "/home/jens/Source/shotwell/src/Commands.vala"
	g_return_if_fail (IS_DATA_SOURCE (source));
#line 864 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp0_ = source;
#line 864 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp1_ = self->priv->transformations;
#line 864 "/home/jens/Source/shotwell/src/Commands.vala"
	photo_set_color_adjustments (G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, TYPE_PHOTO, Photo), _tmp1_);
#line 8470 "Commands.c"
}


static void adjust_colors_multiple_command_class_init (AdjustColorsMultipleCommandClass * klass) {
#line 852 "/home/jens/Source/shotwell/src/Commands.vala"
	adjust_colors_multiple_command_parent_class = g_type_class_peek_parent (klass);
#line 852 "/home/jens/Source/shotwell/src/Commands.vala"
	g_type_class_add_private (klass, sizeof (AdjustColorsMultipleCommandPrivate));
#line 852 "/home/jens/Source/shotwell/src/Commands.vala"
	((MultipleDataSourceCommandClass *) klass)->execute_on_source = (void (*) (MultipleDataSourceCommand *, DataSource*)) adjust_colors_multiple_command_real_execute_on_source;
#line 852 "/home/jens/Source/shotwell/src/Commands.vala"
	G_OBJECT_CLASS (klass)->finalize = adjust_colors_multiple_command_finalize;
#line 8483 "Commands.c"
}


static void adjust_colors_multiple_command_instance_init (AdjustColorsMultipleCommand * self) {
#line 852 "/home/jens/Source/shotwell/src/Commands.vala"
	self->priv = ADJUST_COLORS_MULTIPLE_COMMAND_GET_PRIVATE (self);
#line 8490 "Commands.c"
}


static void adjust_colors_multiple_command_finalize (GObject * obj) {
	AdjustColorsMultipleCommand * self;
#line 852 "/home/jens/Source/shotwell/src/Commands.vala"
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, TYPE_ADJUST_COLORS_MULTIPLE_COMMAND, AdjustColorsMultipleCommand);
#line 853 "/home/jens/Source/shotwell/src/Commands.vala"
	_pixel_transformation_bundle_unref0 (self->priv->transformations);
#line 852 "/home/jens/Source/shotwell/src/Commands.vala"
	G_OBJECT_CLASS (adjust_colors_multiple_command_parent_class)->finalize (obj);
#line 8502 "Commands.c"
}


GType adjust_colors_multiple_command_get_type (void) {
	static volatile gsize adjust_colors_multiple_command_type_id__volatile = 0;
	if (g_once_init_enter (&adjust_colors_multiple_command_type_id__volatile)) {
		static const GTypeInfo g_define_type_info = { sizeof (AdjustColorsMultipleCommandClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) adjust_colors_multiple_command_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (AdjustColorsMultipleCommand), 0, (GInstanceInitFunc) adjust_colors_multiple_command_instance_init, NULL };
		GType adjust_colors_multiple_command_type_id;
		adjust_colors_multiple_command_type_id = g_type_register_static (TYPE_MULTIPLE_PHOTO_TRANSFORMATION_COMMAND, "AdjustColorsMultipleCommand", &g_define_type_info, 0);
		g_once_init_leave (&adjust_colors_multiple_command_type_id__volatile, adjust_colors_multiple_command_type_id);
	}
	return adjust_colors_multiple_command_type_id__volatile;
}


RedeyeCommand* redeye_command_construct (GType object_type, Photo* photo, EditingToolsRedeyeInstance* redeye_instance, const gchar* name, const gchar* explanation) {
	RedeyeCommand * self = NULL;
	Photo* _tmp0_;
	const gchar* _tmp1_;
	const gchar* _tmp2_;
	EditingToolsRedeyeInstance _tmp3_;
#line 871 "/home/jens/Source/shotwell/src/Commands.vala"
	g_return_val_if_fail (IS_PHOTO (photo), NULL);
#line 871 "/home/jens/Source/shotwell/src/Commands.vala"
	g_return_val_if_fail (redeye_instance != NULL, NULL);
#line 871 "/home/jens/Source/shotwell/src/Commands.vala"
	g_return_val_if_fail (name != NULL, NULL);
#line 871 "/home/jens/Source/shotwell/src/Commands.vala"
	g_return_val_if_fail (explanation != NULL, NULL);
#line 873 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp0_ = photo;
#line 873 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp1_ = name;
#line 873 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp2_ = explanation;
#line 873 "/home/jens/Source/shotwell/src/Commands.vala"
	self = (RedeyeCommand*) generic_photo_transformation_command_construct (object_type, _tmp0_, _tmp1_, _tmp2_);
#line 875 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp3_ = *redeye_instance;
#line 875 "/home/jens/Source/shotwell/src/Commands.vala"
	self->priv->redeye_instance = _tmp3_;
#line 871 "/home/jens/Source/shotwell/src/Commands.vala"
	return self;
#line 8546 "Commands.c"
}


RedeyeCommand* redeye_command_new (Photo* photo, EditingToolsRedeyeInstance* redeye_instance, const gchar* name, const gchar* explanation) {
#line 871 "/home/jens/Source/shotwell/src/Commands.vala"
	return redeye_command_construct (TYPE_REDEYE_COMMAND, photo, redeye_instance, name, explanation);
#line 8553 "Commands.c"
}


static void redeye_command_real_execute_on_photo (GenericPhotoTransformationCommand* base, Photo* photo) {
	RedeyeCommand * self;
	Photo* _tmp0_;
	EditingToolsRedeyeInstance _tmp1_;
#line 878 "/home/jens/Source/shotwell/src/Commands.vala"
	self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_REDEYE_COMMAND, RedeyeCommand);
#line 878 "/home/jens/Source/shotwell/src/Commands.vala"
	g_return_if_fail (IS_PHOTO (photo));
#line 879 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp0_ = photo;
#line 879 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp1_ = self->priv->redeye_instance;
#line 879 "/home/jens/Source/shotwell/src/Commands.vala"
	photo_add_redeye_instance (_tmp0_, &_tmp1_);
#line 8571 "Commands.c"
}


static void redeye_command_class_init (RedeyeCommandClass * klass) {
#line 868 "/home/jens/Source/shotwell/src/Commands.vala"
	redeye_command_parent_class = g_type_class_peek_parent (klass);
#line 868 "/home/jens/Source/shotwell/src/Commands.vala"
	g_type_class_add_private (klass, sizeof (RedeyeCommandPrivate));
#line 868 "/home/jens/Source/shotwell/src/Commands.vala"
	((GenericPhotoTransformationCommandClass *) klass)->execute_on_photo = (void (*) (GenericPhotoTransformationCommand *, Photo*)) redeye_command_real_execute_on_photo;
#line 868 "/home/jens/Source/shotwell/src/Commands.vala"
	G_OBJECT_CLASS (klass)->finalize = redeye_command_finalize;
#line 8584 "Commands.c"
}


static void redeye_command_instance_init (RedeyeCommand * self) {
#line 868 "/home/jens/Source/shotwell/src/Commands.vala"
	self->priv = REDEYE_COMMAND_GET_PRIVATE (self);
#line 8591 "Commands.c"
}


static void redeye_command_finalize (GObject * obj) {
	RedeyeCommand * self;
#line 868 "/home/jens/Source/shotwell/src/Commands.vala"
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, TYPE_REDEYE_COMMAND, RedeyeCommand);
#line 868 "/home/jens/Source/shotwell/src/Commands.vala"
	G_OBJECT_CLASS (redeye_command_parent_class)->finalize (obj);
#line 8601 "Commands.c"
}


GType redeye_command_get_type (void) {
	static volatile gsize redeye_command_type_id__volatile = 0;
	if (g_once_init_enter (&redeye_command_type_id__volatile)) {
		static const GTypeInfo g_define_type_info = { sizeof (RedeyeCommandClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) redeye_command_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (RedeyeCommand), 0, (GInstanceInitFunc) redeye_command_instance_init, NULL };
		GType redeye_command_type_id;
		redeye_command_type_id = g_type_register_static (TYPE_GENERIC_PHOTO_TRANSFORMATION_COMMAND, "RedeyeCommand", &g_define_type_info, 0);
		g_once_init_leave (&redeye_command_type_id__volatile, redeye_command_type_id);
	}
	return redeye_command_type_id__volatile;
}


MovePhotosCommand* move_photos_command_construct (GType object_type, const gchar* name, const gchar* explanation) {
	MovePhotosCommand * self = NULL;
	const gchar* _tmp0_;
	const gchar* _tmp1_;
#line 967 "/home/jens/Source/shotwell/src/Commands.vala"
	g_return_val_if_fail (name != NULL, NULL);
#line 967 "/home/jens/Source/shotwell/src/Commands.vala"
	g_return_val_if_fail (explanation != NULL, NULL);
#line 968 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp0_ = name;
#line 968 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp1_ = explanation;
#line 968 "/home/jens/Source/shotwell/src/Commands.vala"
	self = (MovePhotosCommand*) command_construct (object_type, _tmp0_, _tmp1_);
#line 967 "/home/jens/Source/shotwell/src/Commands.vala"
	return self;
#line 8633 "Commands.c"
}


static void move_photos_command_real_prepare (Command* base) {
	MovePhotosCommand * self;
	MovePhotosCommandRealMovePhotosCommand* _tmp0_;
	MovePhotosCommandRealMovePhotosCommand* _tmp1_;
#line 971 "/home/jens/Source/shotwell/src/Commands.vala"
	self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_MOVE_PHOTOS_COMMAND, MovePhotosCommand);
#line 972 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp0_ = self->real_command;
#line 972 "/home/jens/Source/shotwell/src/Commands.vala"
	_vala_assert (_tmp0_ != NULL, "real_command != null");
#line 973 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp1_ = self->real_command;
#line 973 "/home/jens/Source/shotwell/src/Commands.vala"
	command_prepare (G_TYPE_CHECK_INSTANCE_CAST (_tmp1_, TYPE_COMMAND, Command));
#line 8651 "Commands.c"
}


static void move_photos_command_real_execute (Command* base) {
	MovePhotosCommand * self;
	MovePhotosCommandRealMovePhotosCommand* _tmp0_;
	MovePhotosCommandRealMovePhotosCommand* _tmp1_;
#line 976 "/home/jens/Source/shotwell/src/Commands.vala"
	self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_MOVE_PHOTOS_COMMAND, MovePhotosCommand);
#line 977 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp0_ = self->real_command;
#line 977 "/home/jens/Source/shotwell/src/Commands.vala"
	_vala_assert (_tmp0_ != NULL, "real_command != null");
#line 978 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp1_ = self->real_command;
#line 978 "/home/jens/Source/shotwell/src/Commands.vala"
	command_execute (G_TYPE_CHECK_INSTANCE_CAST (_tmp1_, TYPE_COMMAND, Command));
#line 8669 "Commands.c"
}


static void move_photos_command_real_undo (Command* base) {
	MovePhotosCommand * self;
	MovePhotosCommandRealMovePhotosCommand* _tmp0_;
	MovePhotosCommandRealMovePhotosCommand* _tmp1_;
#line 981 "/home/jens/Source/shotwell/src/Commands.vala"
	self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_MOVE_PHOTOS_COMMAND, MovePhotosCommand);
#line 982 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp0_ = self->real_command;
#line 982 "/home/jens/Source/shotwell/src/Commands.vala"
	_vala_assert (_tmp0_ != NULL, "real_command != null");
#line 983 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp1_ = self->real_command;
#line 983 "/home/jens/Source/shotwell/src/Commands.vala"
	command_undo (G_TYPE_CHECK_INSTANCE_CAST (_tmp1_, TYPE_COMMAND, Command));
#line 8687 "Commands.c"
}


static void _move_photos_command_real_move_photos_command_on_proxy_broken_source_proxy_broken (SourceProxy* _sender, gpointer self) {
#line 914 "/home/jens/Source/shotwell/src/Commands.vala"
	move_photos_command_real_move_photos_command_on_proxy_broken ((MovePhotosCommandRealMovePhotosCommand*) self);
#line 8694 "Commands.c"
}


static gpointer _source_proxy_ref0 (gpointer self) {
#line 899 "/home/jens/Source/shotwell/src/Commands.vala"
	return self ? source_proxy_ref (self) : NULL;
#line 8701 "Commands.c"
}


MovePhotosCommandRealMovePhotosCommand* move_photos_command_real_move_photos_command_construct (GType object_type, Event* new_event, GeeIterable* source_views, const gchar* progress_text, const gchar* undo_progress_text, const gchar* name, const gchar* explanation) {
	MovePhotosCommandRealMovePhotosCommand * self = NULL;
	GeeIterable* _tmp0_;
	const gchar* _tmp1_;
	const gchar* _tmp2_;
	const gchar* _tmp3_;
	const gchar* _tmp4_;
	Event* _tmp30_;
	SourceProxy* _tmp31_;
	SourceProxy* _tmp32_;
#line 891 "/home/jens/Source/shotwell/src/Commands.vala"
	g_return_val_if_fail ((new_event == NULL) || IS_EVENT (new_event), NULL);
#line 891 "/home/jens/Source/shotwell/src/Commands.vala"
	g_return_val_if_fail (GEE_IS_ITERABLE (source_views), NULL);
#line 891 "/home/jens/Source/shotwell/src/Commands.vala"
	g_return_val_if_fail (progress_text != NULL, NULL);
#line 891 "/home/jens/Source/shotwell/src/Commands.vala"
	g_return_val_if_fail (undo_progress_text != NULL, NULL);
#line 891 "/home/jens/Source/shotwell/src/Commands.vala"
	g_return_val_if_fail (name != NULL, NULL);
#line 891 "/home/jens/Source/shotwell/src/Commands.vala"
	g_return_val_if_fail (explanation != NULL, NULL);
#line 893 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp0_ = source_views;
#line 893 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp1_ = progress_text;
#line 893 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp2_ = undo_progress_text;
#line 893 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp3_ = name;
#line 893 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp4_ = explanation;
#line 893 "/home/jens/Source/shotwell/src/Commands.vala"
	self = (MovePhotosCommandRealMovePhotosCommand*) multiple_data_source_command_construct (object_type, _tmp0_, _tmp1_, _tmp2_, _tmp3_, _tmp4_);
#line 8739 "Commands.c"
	{
		GeeArrayList* _source_list = NULL;
		GeeArrayList* _tmp5_;
		GeeArrayList* _tmp6_;
		gint _source_size = 0;
		GeeArrayList* _tmp7_;
		gint _tmp8_;
		gint _tmp9_;
		gint _source_index = 0;
#line 896 "/home/jens/Source/shotwell/src/Commands.vala"
		_tmp5_ = G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_MULTIPLE_DATA_SOURCE_COMMAND, MultipleDataSourceCommand)->source_list;
#line 896 "/home/jens/Source/shotwell/src/Commands.vala"
		_tmp6_ = _g_object_ref0 (_tmp5_);
#line 896 "/home/jens/Source/shotwell/src/Commands.vala"
		_source_list = _tmp6_;
#line 896 "/home/jens/Source/shotwell/src/Commands.vala"
		_tmp7_ = _source_list;
#line 896 "/home/jens/Source/shotwell/src/Commands.vala"
		_tmp8_ = gee_abstract_collection_get_size (G_TYPE_CHECK_INSTANCE_CAST (_tmp7_, GEE_TYPE_ABSTRACT_COLLECTION, GeeAbstractCollection));
#line 896 "/home/jens/Source/shotwell/src/Commands.vala"
		_tmp9_ = _tmp8_;
#line 896 "/home/jens/Source/shotwell/src/Commands.vala"
		_source_size = _tmp9_;
#line 896 "/home/jens/Source/shotwell/src/Commands.vala"
		_source_index = -1;
#line 896 "/home/jens/Source/shotwell/src/Commands.vala"
		while (TRUE) {
#line 8767 "Commands.c"
			gint _tmp10_;
			gint _tmp11_;
			gint _tmp12_;
			DataSource* source = NULL;
			GeeArrayList* _tmp13_;
			gint _tmp14_;
			gpointer _tmp15_;
			MediaSource* current_media = NULL;
			DataSource* _tmp16_;
			MediaSource* _tmp17_;
			Event* old_event = NULL;
			MediaSource* _tmp18_;
			Event* _tmp19_;
			SourceProxy* _tmp20_ = NULL;
			Event* _tmp21_;
			SourceProxy* old_event_proxy = NULL;
			SourceProxy* _tmp24_;
			SourceProxy* _tmp25_;
			GeeHashMap* _tmp27_;
			MediaSource* _tmp28_;
			SourceProxy* _tmp29_;
#line 896 "/home/jens/Source/shotwell/src/Commands.vala"
			_tmp10_ = _source_index;
#line 896 "/home/jens/Source/shotwell/src/Commands.vala"
			_source_index = _tmp10_ + 1;
#line 896 "/home/jens/Source/shotwell/src/Commands.vala"
			_tmp11_ = _source_index;
#line 896 "/home/jens/Source/shotwell/src/Commands.vala"
			_tmp12_ = _source_size;
#line 896 "/home/jens/Source/shotwell/src/Commands.vala"
			if (!(_tmp11_ < _tmp12_)) {
#line 896 "/home/jens/Source/shotwell/src/Commands.vala"
				break;
#line 8801 "Commands.c"
			}
#line 896 "/home/jens/Source/shotwell/src/Commands.vala"
			_tmp13_ = _source_list;
#line 896 "/home/jens/Source/shotwell/src/Commands.vala"
			_tmp14_ = _source_index;
#line 896 "/home/jens/Source/shotwell/src/Commands.vala"
			_tmp15_ = gee_abstract_list_get (G_TYPE_CHECK_INSTANCE_CAST (_tmp13_, GEE_TYPE_ABSTRACT_LIST, GeeAbstractList), _tmp14_);
#line 896 "/home/jens/Source/shotwell/src/Commands.vala"
			source = (DataSource*) _tmp15_;
#line 897 "/home/jens/Source/shotwell/src/Commands.vala"
			_tmp16_ = source;
#line 897 "/home/jens/Source/shotwell/src/Commands.vala"
			_tmp17_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_CAST (_tmp16_, TYPE_MEDIA_SOURCE, MediaSource));
#line 897 "/home/jens/Source/shotwell/src/Commands.vala"
			current_media = _tmp17_;
#line 898 "/home/jens/Source/shotwell/src/Commands.vala"
			_tmp18_ = current_media;
#line 898 "/home/jens/Source/shotwell/src/Commands.vala"
			_tmp19_ = media_source_get_event (_tmp18_);
#line 898 "/home/jens/Source/shotwell/src/Commands.vala"
			old_event = _tmp19_;
#line 899 "/home/jens/Source/shotwell/src/Commands.vala"
			_tmp21_ = old_event;
#line 899 "/home/jens/Source/shotwell/src/Commands.vala"
			if (_tmp21_ != NULL) {
#line 8827 "Commands.c"
				Event* _tmp22_;
				SourceProxy* _tmp23_;
#line 899 "/home/jens/Source/shotwell/src/Commands.vala"
				_tmp22_ = old_event;
#line 899 "/home/jens/Source/shotwell/src/Commands.vala"
				_tmp23_ = proxyable_get_proxy (G_TYPE_CHECK_INSTANCE_CAST (_tmp22_, TYPE_PROXYABLE, Proxyable));
#line 899 "/home/jens/Source/shotwell/src/Commands.vala"
				_source_proxy_unref0 (_tmp20_);
#line 899 "/home/jens/Source/shotwell/src/Commands.vala"
				_tmp20_ = _tmp23_;
#line 8838 "Commands.c"
			} else {
#line 899 "/home/jens/Source/shotwell/src/Commands.vala"
				_source_proxy_unref0 (_tmp20_);
#line 899 "/home/jens/Source/shotwell/src/Commands.vala"
				_tmp20_ = NULL;
#line 8844 "Commands.c"
			}
#line 899 "/home/jens/Source/shotwell/src/Commands.vala"
			_tmp24_ = _source_proxy_ref0 (_tmp20_);
#line 899 "/home/jens/Source/shotwell/src/Commands.vala"
			old_event_proxy = _tmp24_;
#line 902 "/home/jens/Source/shotwell/src/Commands.vala"
			_tmp25_ = old_event_proxy;
#line 902 "/home/jens/Source/shotwell/src/Commands.vala"
			if (_tmp25_ != NULL) {
#line 8854 "Commands.c"
				SourceProxy* _tmp26_;
#line 903 "/home/jens/Source/shotwell/src/Commands.vala"
				_tmp26_ = old_event_proxy;
#line 903 "/home/jens/Source/shotwell/src/Commands.vala"
				g_signal_connect_object (_tmp26_, "broken", (GCallback) _move_photos_command_real_move_photos_command_on_proxy_broken_source_proxy_broken, self, 0);
#line 8860 "Commands.c"
			}
#line 905 "/home/jens/Source/shotwell/src/Commands.vala"
			_tmp27_ = self->priv->old_events;
#line 905 "/home/jens/Source/shotwell/src/Commands.vala"
			_tmp28_ = current_media;
#line 905 "/home/jens/Source/shotwell/src/Commands.vala"
			_tmp29_ = old_event_proxy;
#line 905 "/home/jens/Source/shotwell/src/Commands.vala"
			gee_abstract_map_set (G_TYPE_CHECK_INSTANCE_CAST (_tmp27_, GEE_TYPE_ABSTRACT_MAP, GeeAbstractMap), _tmp28_, _tmp29_);
#line 896 "/home/jens/Source/shotwell/src/Commands.vala"
			_source_proxy_unref0 (old_event_proxy);
#line 896 "/home/jens/Source/shotwell/src/Commands.vala"
			_source_proxy_unref0 (_tmp20_);
#line 896 "/home/jens/Source/shotwell/src/Commands.vala"
			_g_object_unref0 (old_event);
#line 896 "/home/jens/Source/shotwell/src/Commands.vala"
			_g_object_unref0 (current_media);
#line 896 "/home/jens/Source/shotwell/src/Commands.vala"
			_g_object_unref0 (source);
#line 8880 "Commands.c"
		}
#line 896 "/home/jens/Source/shotwell/src/Commands.vala"
		_g_object_unref0 (_source_list);
#line 8884 "Commands.c"
	}
#line 909 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp30_ = new_event;
#line 909 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp31_ = proxyable_get_proxy (G_TYPE_CHECK_INSTANCE_CAST (_tmp30_, TYPE_PROXYABLE, Proxyable));
#line 909 "/home/jens/Source/shotwell/src/Commands.vala"
	_source_proxy_unref0 (self->priv->new_event_proxy);
#line 909 "/home/jens/Source/shotwell/src/Commands.vala"
	self->priv->new_event_proxy = _tmp31_;
#line 910 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp32_ = self->priv->new_event_proxy;
#line 910 "/home/jens/Source/shotwell/src/Commands.vala"
	g_signal_connect_object (_tmp32_, "broken", (GCallback) _move_photos_command_real_move_photos_command_on_proxy_broken_source_proxy_broken, self, 0);
#line 891 "/home/jens/Source/shotwell/src/Commands.vala"
	return self;
#line 8900 "Commands.c"
}


MovePhotosCommandRealMovePhotosCommand* move_photos_command_real_move_photos_command_new (Event* new_event, GeeIterable* source_views, const gchar* progress_text, const gchar* undo_progress_text, const gchar* name, const gchar* explanation) {
#line 891 "/home/jens/Source/shotwell/src/Commands.vala"
	return move_photos_command_real_move_photos_command_construct (MOVE_PHOTOS_COMMAND_TYPE_REAL_MOVE_PHOTOS_COMMAND, new_event, source_views, progress_text, undo_progress_text, name, explanation);
#line 8907 "Commands.c"
}


static void move_photos_command_real_move_photos_command_real_execute (Command* base) {
	MovePhotosCommandRealMovePhotosCommand * self;
	LibraryWindow* _tmp0_;
	LibraryWindow* _tmp1_;
	Page* _tmp2_;
	Page* _tmp3_;
	gboolean _tmp4_;
#line 922 "/home/jens/Source/shotwell/src/Commands.vala"
	self = G_TYPE_CHECK_INSTANCE_CAST (base, MOVE_PHOTOS_COMMAND_TYPE_REAL_MOVE_PHOTOS_COMMAND, MovePhotosCommandRealMovePhotosCommand);
#line 924 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp0_ = library_window_get_app ();
#line 924 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp1_ = _tmp0_;
#line 924 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp2_ = page_window_get_current_page (G_TYPE_CHECK_INSTANCE_CAST (_tmp1_, TYPE_PAGE_WINDOW, PageWindow));
#line 924 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp3_ = _tmp2_;
#line 924 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp4_ = G_TYPE_CHECK_INSTANCE_TYPE (_tmp3_, TYPE_EVENT_PAGE);
#line 924 "/home/jens/Source/shotwell/src/Commands.vala"
	_g_object_unref0 (_tmp3_);
#line 924 "/home/jens/Source/shotwell/src/Commands.vala"
	_g_object_unref0 (_tmp1_);
#line 924 "/home/jens/Source/shotwell/src/Commands.vala"
	if (_tmp4_) {
#line 8936 "Commands.c"
		Event* evt = NULL;
		LibraryWindow* _tmp5_;
		LibraryWindow* _tmp6_;
		Page* _tmp7_;
		EventPage* _tmp8_;
		Event* _tmp9_;
		Event* _tmp10_;
		Event* _tmp11_;
		gint _tmp12_;
		GeeArrayList* _tmp13_;
		gint _tmp14_;
		gint _tmp15_;
#line 925 "/home/jens/Source/shotwell/src/Commands.vala"
		_tmp5_ = library_window_get_app ();
#line 925 "/home/jens/Source/shotwell/src/Commands.vala"
		_tmp6_ = _tmp5_;
#line 925 "/home/jens/Source/shotwell/src/Commands.vala"
		_tmp7_ = page_window_get_current_page (G_TYPE_CHECK_INSTANCE_CAST (_tmp6_, TYPE_PAGE_WINDOW, PageWindow));
#line 925 "/home/jens/Source/shotwell/src/Commands.vala"
		_tmp8_ = G_TYPE_CHECK_INSTANCE_CAST (_tmp7_, TYPE_EVENT_PAGE, EventPage);
#line 925 "/home/jens/Source/shotwell/src/Commands.vala"
		_tmp9_ = event_page_get_event (_tmp8_);
#line 925 "/home/jens/Source/shotwell/src/Commands.vala"
		_tmp10_ = _tmp9_;
#line 925 "/home/jens/Source/shotwell/src/Commands.vala"
		_g_object_unref0 (_tmp8_);
#line 925 "/home/jens/Source/shotwell/src/Commands.vala"
		_g_object_unref0 (_tmp6_);
#line 925 "/home/jens/Source/shotwell/src/Commands.vala"
		evt = _tmp10_;
#line 928 "/home/jens/Source/shotwell/src/Commands.vala"
		_tmp11_ = evt;
#line 928 "/home/jens/Source/shotwell/src/Commands.vala"
		_tmp12_ = event_source_get_media_count (G_TYPE_CHECK_INSTANCE_CAST (_tmp11_, TYPE_EVENT_SOURCE, EventSource));
#line 928 "/home/jens/Source/shotwell/src/Commands.vala"
		_tmp13_ = G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_MULTIPLE_DATA_SOURCE_COMMAND, MultipleDataSourceCommand)->source_list;
#line 928 "/home/jens/Source/shotwell/src/Commands.vala"
		_tmp14_ = gee_abstract_collection_get_size (G_TYPE_CHECK_INSTANCE_CAST (_tmp13_, GEE_TYPE_ABSTRACT_COLLECTION, GeeAbstractCollection));
#line 928 "/home/jens/Source/shotwell/src/Commands.vala"
		_tmp15_ = _tmp14_;
#line 928 "/home/jens/Source/shotwell/src/Commands.vala"
		if (_tmp12_ == _tmp15_) {
#line 8979 "Commands.c"
			LibraryWindow* _tmp16_;
			LibraryWindow* _tmp17_;
			SourceProxy* _tmp18_;
			DataSource* _tmp19_;
			Event* _tmp20_;
#line 931 "/home/jens/Source/shotwell/src/Commands.vala"
			_tmp16_ = library_window_get_app ();
#line 931 "/home/jens/Source/shotwell/src/Commands.vala"
			_tmp17_ = _tmp16_;
#line 931 "/home/jens/Source/shotwell/src/Commands.vala"
			_tmp18_ = self->priv->new_event_proxy;
#line 931 "/home/jens/Source/shotwell/src/Commands.vala"
			_tmp19_ = source_proxy_get_source (_tmp18_);
#line 931 "/home/jens/Source/shotwell/src/Commands.vala"
			_tmp20_ = G_TYPE_CHECK_INSTANCE_CAST (_tmp19_, TYPE_EVENT, Event);
#line 931 "/home/jens/Source/shotwell/src/Commands.vala"
			library_window_switch_to_event (_tmp17_, _tmp20_);
#line 931 "/home/jens/Source/shotwell/src/Commands.vala"
			_g_object_unref0 (_tmp20_);
#line 931 "/home/jens/Source/shotwell/src/Commands.vala"
			_g_object_unref0 (_tmp17_);
#line 9001 "Commands.c"
		}
#line 924 "/home/jens/Source/shotwell/src/Commands.vala"
		_g_object_unref0 (evt);
#line 9005 "Commands.c"
	} else {
		SourceProxy* _tmp21_;
		DataSource* _tmp22_;
		Event* _tmp23_;
		gint _tmp24_;
		gboolean _tmp25_;
#line 937 "/home/jens/Source/shotwell/src/Commands.vala"
		_tmp21_ = self->priv->new_event_proxy;
#line 937 "/home/jens/Source/shotwell/src/Commands.vala"
		_tmp22_ = source_proxy_get_source (_tmp21_);
#line 937 "/home/jens/Source/shotwell/src/Commands.vala"
		_tmp23_ = G_TYPE_CHECK_INSTANCE_CAST (_tmp22_, TYPE_EVENT, Event);
#line 937 "/home/jens/Source/shotwell/src/Commands.vala"
		_tmp24_ = event_source_get_media_count (G_TYPE_CHECK_INSTANCE_CAST (_tmp23_, TYPE_EVENT_SOURCE, EventSource));
#line 937 "/home/jens/Source/shotwell/src/Commands.vala"
		_tmp25_ = _tmp24_ == 0;
#line 937 "/home/jens/Source/shotwell/src/Commands.vala"
		_g_object_unref0 (_tmp23_);
#line 937 "/home/jens/Source/shotwell/src/Commands.vala"
		if (_tmp25_) {
#line 9026 "Commands.c"
			LibraryWindow* _tmp26_;
			LibraryWindow* _tmp27_;
			SourceProxy* _tmp28_;
			DataSource* _tmp29_;
			Event* _tmp30_;
#line 939 "/home/jens/Source/shotwell/src/Commands.vala"
			_tmp26_ = library_window_get_app ();
#line 939 "/home/jens/Source/shotwell/src/Commands.vala"
			_tmp27_ = _tmp26_;
#line 939 "/home/jens/Source/shotwell/src/Commands.vala"
			_tmp28_ = self->priv->new_event_proxy;
#line 939 "/home/jens/Source/shotwell/src/Commands.vala"
			_tmp29_ = source_proxy_get_source (_tmp28_);
#line 939 "/home/jens/Source/shotwell/src/Commands.vala"
			_tmp30_ = G_TYPE_CHECK_INSTANCE_CAST (_tmp29_, TYPE_EVENT, Event);
#line 939 "/home/jens/Source/shotwell/src/Commands.vala"
			library_window_switch_to_event (_tmp27_, _tmp30_);
#line 939 "/home/jens/Source/shotwell/src/Commands.vala"
			_g_object_unref0 (_tmp30_);
#line 939 "/home/jens/Source/shotwell/src/Commands.vala"
			_g_object_unref0 (_tmp27_);
#line 9048 "Commands.c"
		}
	}
#line 946 "/home/jens/Source/shotwell/src/Commands.vala"
	COMMAND_CLASS (move_photos_command_real_move_photos_command_parent_class)->execute (G_TYPE_CHECK_INSTANCE_CAST (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_MULTIPLE_DATA_SOURCE_COMMAND, MultipleDataSourceCommand), TYPE_COMMAND, Command));
#line 9053 "Commands.c"
}


static void move_photos_command_real_move_photos_command_real_execute_on_source (MultipleDataSourceCommand* base, DataSource* source) {
	MovePhotosCommandRealMovePhotosCommand * self;
	DataSource* _tmp0_;
	SourceProxy* _tmp1_;
	DataSource* _tmp2_;
	Event* _tmp3_;
#line 949 "/home/jens/Source/shotwell/src/Commands.vala"
	self = G_TYPE_CHECK_INSTANCE_CAST (base, MOVE_PHOTOS_COMMAND_TYPE_REAL_MOVE_PHOTOS_COMMAND, MovePhotosCommandRealMovePhotosCommand);
#line 949 "/home/jens/Source/shotwell/src/Commands.vala"
	g_return_if_fail (IS_DATA_SOURCE (source));
#line 950 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp0_ = source;
#line 950 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp1_ = self->priv->new_event_proxy;
#line 950 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp2_ = source_proxy_get_source (_tmp1_);
#line 950 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp3_ = G_TYPE_CHECK_INSTANCE_CAST (_tmp2_, TYPE_EVENT, Event);
#line 950 "/home/jens/Source/shotwell/src/Commands.vala"
	media_source_set_event (G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, TYPE_MEDIA_SOURCE, MediaSource), _tmp3_);
#line 950 "/home/jens/Source/shotwell/src/Commands.vala"
	_g_object_unref0 (_tmp3_);
#line 9079 "Commands.c"
}


static void move_photos_command_real_move_photos_command_real_undo_on_source (MultipleDataSourceCommand* base, DataSource* source) {
	MovePhotosCommandRealMovePhotosCommand * self;
	MediaSource* current_media = NULL;
	DataSource* _tmp0_;
	MediaSource* _tmp1_;
	SourceProxy* event_proxy = NULL;
	GeeHashMap* _tmp2_;
	MediaSource* _tmp3_;
	gpointer _tmp4_;
	Event* _tmp5_ = NULL;
	SourceProxy* _tmp6_;
	MediaSource* _tmp9_;
#line 953 "/home/jens/Source/shotwell/src/Commands.vala"
	self = G_TYPE_CHECK_INSTANCE_CAST (base, MOVE_PHOTOS_COMMAND_TYPE_REAL_MOVE_PHOTOS_COMMAND, MovePhotosCommandRealMovePhotosCommand);
#line 953 "/home/jens/Source/shotwell/src/Commands.vala"
	g_return_if_fail (IS_DATA_SOURCE (source));
#line 954 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp0_ = source;
#line 954 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp1_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, TYPE_MEDIA_SOURCE, MediaSource));
#line 954 "/home/jens/Source/shotwell/src/Commands.vala"
	current_media = _tmp1_;
#line 955 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp2_ = self->priv->old_events;
#line 955 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp3_ = current_media;
#line 955 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp4_ = gee_abstract_map_get (G_TYPE_CHECK_INSTANCE_CAST (_tmp2_, GEE_TYPE_ABSTRACT_MAP, GeeAbstractMap), _tmp3_);
#line 955 "/home/jens/Source/shotwell/src/Commands.vala"
	event_proxy = (SourceProxy*) _tmp4_;
#line 957 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp6_ = event_proxy;
#line 957 "/home/jens/Source/shotwell/src/Commands.vala"
	if (_tmp6_ != NULL) {
#line 9117 "Commands.c"
		SourceProxy* _tmp7_;
		DataSource* _tmp8_;
#line 957 "/home/jens/Source/shotwell/src/Commands.vala"
		_tmp7_ = event_proxy;
#line 957 "/home/jens/Source/shotwell/src/Commands.vala"
		_tmp8_ = source_proxy_get_source (_tmp7_);
#line 957 "/home/jens/Source/shotwell/src/Commands.vala"
		_g_object_unref0 (_tmp5_);
#line 957 "/home/jens/Source/shotwell/src/Commands.vala"
		_tmp5_ = G_TYPE_CHECK_INSTANCE_CAST (_tmp8_, TYPE_EVENT, Event);
#line 9128 "Commands.c"
	} else {
#line 957 "/home/jens/Source/shotwell/src/Commands.vala"
		_g_object_unref0 (_tmp5_);
#line 957 "/home/jens/Source/shotwell/src/Commands.vala"
		_tmp5_ = NULL;
#line 9134 "Commands.c"
	}
#line 957 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp9_ = current_media;
#line 957 "/home/jens/Source/shotwell/src/Commands.vala"
	media_source_set_event (_tmp9_, _tmp5_);
#line 953 "/home/jens/Source/shotwell/src/Commands.vala"
	_g_object_unref0 (_tmp5_);
#line 953 "/home/jens/Source/shotwell/src/Commands.vala"
	_source_proxy_unref0 (event_proxy);
#line 953 "/home/jens/Source/shotwell/src/Commands.vala"
	_g_object_unref0 (current_media);
#line 9146 "Commands.c"
}


static void move_photos_command_real_move_photos_command_on_proxy_broken (MovePhotosCommandRealMovePhotosCommand* self) {
	CommandManager* _tmp0_;
	CommandManager* _tmp1_;
#line 960 "/home/jens/Source/shotwell/src/Commands.vala"
	g_return_if_fail (MOVE_PHOTOS_COMMAND_IS_REAL_MOVE_PHOTOS_COMMAND (self));
#line 961 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp0_ = command_get_command_manager (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_COMMAND, Command));
#line 961 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp1_ = _tmp0_;
#line 961 "/home/jens/Source/shotwell/src/Commands.vala"
	command_manager_reset (_tmp1_);
#line 961 "/home/jens/Source/shotwell/src/Commands.vala"
	_command_manager_unref0 (_tmp1_);
#line 9163 "Commands.c"
}


static void move_photos_command_real_move_photos_command_class_init (MovePhotosCommandRealMovePhotosCommandClass * klass) {
#line 886 "/home/jens/Source/shotwell/src/Commands.vala"
	move_photos_command_real_move_photos_command_parent_class = g_type_class_peek_parent (klass);
#line 886 "/home/jens/Source/shotwell/src/Commands.vala"
	g_type_class_add_private (klass, sizeof (MovePhotosCommandRealMovePhotosCommandPrivate));
#line 886 "/home/jens/Source/shotwell/src/Commands.vala"
	((CommandClass *) klass)->execute = (void (*) (Command *)) move_photos_command_real_move_photos_command_real_execute;
#line 886 "/home/jens/Source/shotwell/src/Commands.vala"
	((MultipleDataSourceCommandClass *) klass)->execute_on_source = (void (*) (MultipleDataSourceCommand *, DataSource*)) move_photos_command_real_move_photos_command_real_execute_on_source;
#line 886 "/home/jens/Source/shotwell/src/Commands.vala"
	((MultipleDataSourceCommandClass *) klass)->undo_on_source = (void (*) (MultipleDataSourceCommand *, DataSource*)) move_photos_command_real_move_photos_command_real_undo_on_source;
#line 886 "/home/jens/Source/shotwell/src/Commands.vala"
	G_OBJECT_CLASS (klass)->finalize = move_photos_command_real_move_photos_command_finalize;
#line 9180 "Commands.c"
}


static void move_photos_command_real_move_photos_command_instance_init (MovePhotosCommandRealMovePhotosCommand * self) {
	GeeHashMap* _tmp0_;
#line 886 "/home/jens/Source/shotwell/src/Commands.vala"
	self->priv = MOVE_PHOTOS_COMMAND_REAL_MOVE_PHOTOS_COMMAND_GET_PRIVATE (self);
#line 887 "/home/jens/Source/shotwell/src/Commands.vala"
	self->priv->new_event_proxy = NULL;
#line 888 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp0_ = gee_hash_map_new (TYPE_MEDIA_SOURCE, (GBoxedCopyFunc) g_object_ref, (GDestroyNotify) g_object_unref, TYPE_SOURCE_PROXY, (GBoxedCopyFunc) source_proxy_ref, (GDestroyNotify) source_proxy_unref, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
#line 888 "/home/jens/Source/shotwell/src/Commands.vala"
	self->priv->old_events = _tmp0_;
#line 9194 "Commands.c"
}


static void move_photos_command_real_move_photos_command_finalize (GObject * obj) {
	MovePhotosCommandRealMovePhotosCommand * self;
	SourceProxy* _tmp0_;
	guint _tmp1_;
#line 886 "/home/jens/Source/shotwell/src/Commands.vala"
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, MOVE_PHOTOS_COMMAND_TYPE_REAL_MOVE_PHOTOS_COMMAND, MovePhotosCommandRealMovePhotosCommand);
#line 914 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp0_ = self->priv->new_event_proxy;
#line 914 "/home/jens/Source/shotwell/src/Commands.vala"
	g_signal_parse_name ("broken", TYPE_SOURCE_PROXY, &_tmp1_, NULL, FALSE);
#line 914 "/home/jens/Source/shotwell/src/Commands.vala"
	g_signal_handlers_disconnect_matched (_tmp0_, G_SIGNAL_MATCH_ID | G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA, _tmp1_, 0, NULL, (GCallback) _move_photos_command_real_move_photos_command_on_proxy_broken_source_proxy_broken, self);
#line 9210 "Commands.c"
	{
		GeeIterator* _proxy_it = NULL;
		GeeHashMap* _tmp2_;
		GeeCollection* _tmp3_;
		GeeCollection* _tmp4_;
		GeeCollection* _tmp5_;
		GeeIterator* _tmp6_;
		GeeIterator* _tmp7_;
#line 916 "/home/jens/Source/shotwell/src/Commands.vala"
		_tmp2_ = self->priv->old_events;
#line 916 "/home/jens/Source/shotwell/src/Commands.vala"
		_tmp3_ = gee_abstract_map_get_values (G_TYPE_CHECK_INSTANCE_CAST (_tmp2_, GEE_TYPE_ABSTRACT_MAP, GeeAbstractMap));
#line 916 "/home/jens/Source/shotwell/src/Commands.vala"
		_tmp4_ = _tmp3_;
#line 916 "/home/jens/Source/shotwell/src/Commands.vala"
		_tmp5_ = _tmp4_;
#line 916 "/home/jens/Source/shotwell/src/Commands.vala"
		_tmp6_ = gee_iterable_iterator (G_TYPE_CHECK_INSTANCE_CAST (_tmp5_, GEE_TYPE_ITERABLE, GeeIterable));
#line 916 "/home/jens/Source/shotwell/src/Commands.vala"
		_tmp7_ = _tmp6_;
#line 916 "/home/jens/Source/shotwell/src/Commands.vala"
		_g_object_unref0 (_tmp5_);
#line 916 "/home/jens/Source/shotwell/src/Commands.vala"
		_proxy_it = _tmp7_;
#line 916 "/home/jens/Source/shotwell/src/Commands.vala"
		while (TRUE) {
#line 9237 "Commands.c"
			GeeIterator* _tmp8_;
			gboolean _tmp9_;
			SourceProxy* proxy = NULL;
			GeeIterator* _tmp10_;
			gpointer _tmp11_;
			SourceProxy* _tmp12_;
#line 916 "/home/jens/Source/shotwell/src/Commands.vala"
			_tmp8_ = _proxy_it;
#line 916 "/home/jens/Source/shotwell/src/Commands.vala"
			_tmp9_ = gee_iterator_next (_tmp8_);
#line 916 "/home/jens/Source/shotwell/src/Commands.vala"
			if (!_tmp9_) {
#line 916 "/home/jens/Source/shotwell/src/Commands.vala"
				break;
#line 9252 "Commands.c"
			}
#line 916 "/home/jens/Source/shotwell/src/Commands.vala"
			_tmp10_ = _proxy_it;
#line 916 "/home/jens/Source/shotwell/src/Commands.vala"
			_tmp11_ = gee_iterator_get (_tmp10_);
#line 916 "/home/jens/Source/shotwell/src/Commands.vala"
			proxy = (SourceProxy*) _tmp11_;
#line 917 "/home/jens/Source/shotwell/src/Commands.vala"
			_tmp12_ = proxy;
#line 917 "/home/jens/Source/shotwell/src/Commands.vala"
			if (_tmp12_ != NULL) {
#line 9264 "Commands.c"
				SourceProxy* _tmp13_;
				guint _tmp14_;
#line 918 "/home/jens/Source/shotwell/src/Commands.vala"
				_tmp13_ = proxy;
#line 918 "/home/jens/Source/shotwell/src/Commands.vala"
				g_signal_parse_name ("broken", TYPE_SOURCE_PROXY, &_tmp14_, NULL, FALSE);
#line 918 "/home/jens/Source/shotwell/src/Commands.vala"
				g_signal_handlers_disconnect_matched (_tmp13_, G_SIGNAL_MATCH_ID | G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA, _tmp14_, 0, NULL, (GCallback) _move_photos_command_real_move_photos_command_on_proxy_broken_source_proxy_broken, self);
#line 9273 "Commands.c"
			}
#line 916 "/home/jens/Source/shotwell/src/Commands.vala"
			_source_proxy_unref0 (proxy);
#line 9277 "Commands.c"
		}
#line 916 "/home/jens/Source/shotwell/src/Commands.vala"
		_g_object_unref0 (_proxy_it);
#line 9281 "Commands.c"
	}
#line 887 "/home/jens/Source/shotwell/src/Commands.vala"
	_source_proxy_unref0 (self->priv->new_event_proxy);
#line 888 "/home/jens/Source/shotwell/src/Commands.vala"
	_g_object_unref0 (self->priv->old_events);
#line 886 "/home/jens/Source/shotwell/src/Commands.vala"
	G_OBJECT_CLASS (move_photos_command_real_move_photos_command_parent_class)->finalize (obj);
#line 9289 "Commands.c"
}


GType move_photos_command_real_move_photos_command_get_type (void) {
	static volatile gsize move_photos_command_real_move_photos_command_type_id__volatile = 0;
	if (g_once_init_enter (&move_photos_command_real_move_photos_command_type_id__volatile)) {
		static const GTypeInfo g_define_type_info = { sizeof (MovePhotosCommandRealMovePhotosCommandClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) move_photos_command_real_move_photos_command_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (MovePhotosCommandRealMovePhotosCommand), 0, (GInstanceInitFunc) move_photos_command_real_move_photos_command_instance_init, NULL };
		GType move_photos_command_real_move_photos_command_type_id;
		move_photos_command_real_move_photos_command_type_id = g_type_register_static (TYPE_MULTIPLE_DATA_SOURCE_COMMAND, "MovePhotosCommandRealMovePhotosCommand", &g_define_type_info, 0);
		g_once_init_leave (&move_photos_command_real_move_photos_command_type_id__volatile, move_photos_command_real_move_photos_command_type_id);
	}
	return move_photos_command_real_move_photos_command_type_id__volatile;
}


static void move_photos_command_class_init (MovePhotosCommandClass * klass) {
#line 883 "/home/jens/Source/shotwell/src/Commands.vala"
	move_photos_command_parent_class = g_type_class_peek_parent (klass);
#line 883 "/home/jens/Source/shotwell/src/Commands.vala"
	((CommandClass *) klass)->prepare = (void (*) (Command *)) move_photos_command_real_prepare;
#line 883 "/home/jens/Source/shotwell/src/Commands.vala"
	((CommandClass *) klass)->execute = (void (*) (Command *)) move_photos_command_real_execute;
#line 883 "/home/jens/Source/shotwell/src/Commands.vala"
	((CommandClass *) klass)->undo = (void (*) (Command *)) move_photos_command_real_undo;
#line 883 "/home/jens/Source/shotwell/src/Commands.vala"
	G_OBJECT_CLASS (klass)->finalize = move_photos_command_finalize;
#line 9316 "Commands.c"
}


static void move_photos_command_instance_init (MovePhotosCommand * self) {
}


static void move_photos_command_finalize (GObject * obj) {
	MovePhotosCommand * self;
#line 883 "/home/jens/Source/shotwell/src/Commands.vala"
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, TYPE_MOVE_PHOTOS_COMMAND, MovePhotosCommand);
#line 965 "/home/jens/Source/shotwell/src/Commands.vala"
	_g_object_unref0 (self->real_command);
#line 883 "/home/jens/Source/shotwell/src/Commands.vala"
	G_OBJECT_CLASS (move_photos_command_parent_class)->finalize (obj);
#line 9332 "Commands.c"
}


GType move_photos_command_get_type (void) {
	static volatile gsize move_photos_command_type_id__volatile = 0;
	if (g_once_init_enter (&move_photos_command_type_id__volatile)) {
		static const GTypeInfo g_define_type_info = { sizeof (MovePhotosCommandClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) move_photos_command_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (MovePhotosCommand), 0, (GInstanceInitFunc) move_photos_command_instance_init, NULL };
		GType move_photos_command_type_id;
		move_photos_command_type_id = g_type_register_static (TYPE_COMMAND, "MovePhotosCommand", &g_define_type_info, G_TYPE_FLAG_ABSTRACT);
		g_once_init_leave (&move_photos_command_type_id__volatile, move_photos_command_type_id);
	}
	return move_photos_command_type_id__volatile;
}


NewEventCommand* new_event_command_construct (GType object_type, GeeIterable* iter) {
	NewEventCommand * self = NULL;
	MediaSource* key_source = NULL;
	MediaSource* _tmp11_;
	Event* new_event = NULL;
	MediaSource* _tmp12_;
	Event* _tmp13_;
	GeeIterable* _tmp14_;
	MovePhotosCommandRealMovePhotosCommand* _tmp15_;
#line 988 "/home/jens/Source/shotwell/src/Commands.vala"
	g_return_val_if_fail (GEE_IS_ITERABLE (iter), NULL);
#line 989 "/home/jens/Source/shotwell/src/Commands.vala"
	self = (NewEventCommand*) move_photos_command_construct (object_type, RESOURCES_NEW_EVENT_LABEL, "");
#line 992 "/home/jens/Source/shotwell/src/Commands.vala"
	key_source = NULL;
#line 9363 "Commands.c"
	{
		GeeIterator* _view_it = NULL;
		GeeIterable* _tmp0_;
		GeeIterator* _tmp1_;
#line 993 "/home/jens/Source/shotwell/src/Commands.vala"
		_tmp0_ = iter;
#line 993 "/home/jens/Source/shotwell/src/Commands.vala"
		_tmp1_ = gee_iterable_iterator (_tmp0_);
#line 993 "/home/jens/Source/shotwell/src/Commands.vala"
		_view_it = _tmp1_;
#line 993 "/home/jens/Source/shotwell/src/Commands.vala"
		while (TRUE) {
#line 9376 "Commands.c"
			GeeIterator* _tmp2_;
			gboolean _tmp3_;
			DataView* view = NULL;
			GeeIterator* _tmp4_;
			gpointer _tmp5_;
			MediaSource* current_source = NULL;
			DataView* _tmp6_;
			DataSource* _tmp7_;
			MediaSource* _tmp8_;
#line 993 "/home/jens/Source/shotwell/src/Commands.vala"
			_tmp2_ = _view_it;
#line 993 "/home/jens/Source/shotwell/src/Commands.vala"
			_tmp3_ = gee_iterator_next (_tmp2_);
#line 993 "/home/jens/Source/shotwell/src/Commands.vala"
			if (!_tmp3_) {
#line 993 "/home/jens/Source/shotwell/src/Commands.vala"
				break;
#line 9394 "Commands.c"
			}
#line 993 "/home/jens/Source/shotwell/src/Commands.vala"
			_tmp4_ = _view_it;
#line 993 "/home/jens/Source/shotwell/src/Commands.vala"
			_tmp5_ = gee_iterator_get (_tmp4_);
#line 993 "/home/jens/Source/shotwell/src/Commands.vala"
			view = (DataView*) _tmp5_;
#line 994 "/home/jens/Source/shotwell/src/Commands.vala"
			_tmp6_ = view;
#line 994 "/home/jens/Source/shotwell/src/Commands.vala"
			_tmp7_ = data_view_get_source (_tmp6_);
#line 994 "/home/jens/Source/shotwell/src/Commands.vala"
			current_source = G_TYPE_CHECK_INSTANCE_CAST (_tmp7_, TYPE_MEDIA_SOURCE, MediaSource);
#line 996 "/home/jens/Source/shotwell/src/Commands.vala"
			_tmp8_ = key_source;
#line 996 "/home/jens/Source/shotwell/src/Commands.vala"
			if (_tmp8_ == NULL) {
#line 9412 "Commands.c"
				MediaSource* _tmp9_;
				MediaSource* _tmp10_;
#line 997 "/home/jens/Source/shotwell/src/Commands.vala"
				_tmp9_ = current_source;
#line 997 "/home/jens/Source/shotwell/src/Commands.vala"
				_tmp10_ = _g_object_ref0 (_tmp9_);
#line 997 "/home/jens/Source/shotwell/src/Commands.vala"
				_g_object_unref0 (key_source);
#line 997 "/home/jens/Source/shotwell/src/Commands.vala"
				key_source = _tmp10_;
#line 998 "/home/jens/Source/shotwell/src/Commands.vala"
				_g_object_unref0 (current_source);
#line 998 "/home/jens/Source/shotwell/src/Commands.vala"
				_g_object_unref0 (view);
#line 998 "/home/jens/Source/shotwell/src/Commands.vala"
				break;
#line 9429 "Commands.c"
			}
#line 993 "/home/jens/Source/shotwell/src/Commands.vala"
			_g_object_unref0 (current_source);
#line 993 "/home/jens/Source/shotwell/src/Commands.vala"
			_g_object_unref0 (view);
#line 9435 "Commands.c"
		}
#line 993 "/home/jens/Source/shotwell/src/Commands.vala"
		_g_object_unref0 (_view_it);
#line 9439 "Commands.c"
	}
#line 1003 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp11_ = key_source;
#line 1003 "/home/jens/Source/shotwell/src/Commands.vala"
	_vala_assert (_tmp11_ != NULL, "key_source != null");
#line 1005 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp12_ = key_source;
#line 1005 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp13_ = event_create_empty_event (_tmp12_);
#line 1005 "/home/jens/Source/shotwell/src/Commands.vala"
	new_event = _tmp13_;
#line 1007 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp14_ = iter;
#line 1007 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp15_ = move_photos_command_real_move_photos_command_new (new_event, _tmp14_, _ ("Creating New Event"), _ ("Removing Event"), RESOURCES_NEW_EVENT_LABEL, "");
#line 1007 "/home/jens/Source/shotwell/src/Commands.vala"
	_g_object_unref0 (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_MOVE_PHOTOS_COMMAND, MovePhotosCommand)->real_command);
#line 1007 "/home/jens/Source/shotwell/src/Commands.vala"
	G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_MOVE_PHOTOS_COMMAND, MovePhotosCommand)->real_command = _tmp15_;
#line 988 "/home/jens/Source/shotwell/src/Commands.vala"
	_g_object_unref0 (new_event);
#line 988 "/home/jens/Source/shotwell/src/Commands.vala"
	_g_object_unref0 (key_source);
#line 988 "/home/jens/Source/shotwell/src/Commands.vala"
	return self;
#line 9465 "Commands.c"
}


NewEventCommand* new_event_command_new (GeeIterable* iter) {
#line 988 "/home/jens/Source/shotwell/src/Commands.vala"
	return new_event_command_construct (TYPE_NEW_EVENT_COMMAND, iter);
#line 9472 "Commands.c"
}


static void new_event_command_class_init (NewEventCommandClass * klass) {
#line 987 "/home/jens/Source/shotwell/src/Commands.vala"
	new_event_command_parent_class = g_type_class_peek_parent (klass);
#line 9479 "Commands.c"
}


static void new_event_command_instance_init (NewEventCommand * self) {
}


GType new_event_command_get_type (void) {
	static volatile gsize new_event_command_type_id__volatile = 0;
	if (g_once_init_enter (&new_event_command_type_id__volatile)) {
		static const GTypeInfo g_define_type_info = { sizeof (NewEventCommandClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) new_event_command_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (NewEventCommand), 0, (GInstanceInitFunc) new_event_command_instance_init, NULL };
		GType new_event_command_type_id;
		new_event_command_type_id = g_type_register_static (TYPE_MOVE_PHOTOS_COMMAND, "NewEventCommand", &g_define_type_info, 0);
		g_once_init_leave (&new_event_command_type_id__volatile, new_event_command_type_id);
	}
	return new_event_command_type_id__volatile;
}


SetEventCommand* set_event_command_construct (GType object_type, GeeIterable* iter, Event* new_event) {
	SetEventCommand * self = NULL;
	Event* _tmp0_;
	GeeIterable* _tmp1_;
	MovePhotosCommandRealMovePhotosCommand* _tmp2_;
#line 1014 "/home/jens/Source/shotwell/src/Commands.vala"
	g_return_val_if_fail (GEE_IS_ITERABLE (iter), NULL);
#line 1014 "/home/jens/Source/shotwell/src/Commands.vala"
	g_return_val_if_fail (IS_EVENT (new_event), NULL);
#line 1015 "/home/jens/Source/shotwell/src/Commands.vala"
	self = (SetEventCommand*) move_photos_command_construct (object_type, RESOURCES_SET_PHOTO_EVENT_LABEL, RESOURCES_SET_PHOTO_EVENT_TOOLTIP);
#line 1017 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp0_ = new_event;
#line 1017 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp1_ = iter;
#line 1017 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp2_ = move_photos_command_real_move_photos_command_new (_tmp0_, _tmp1_, _ ("Moving Photos to New Event"), _ ("Setting Photos to Previous Event"), RESOURCES_SET_PHOTO_EVENT_LABEL, "");
#line 1017 "/home/jens/Source/shotwell/src/Commands.vala"
	_g_object_unref0 (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_MOVE_PHOTOS_COMMAND, MovePhotosCommand)->real_command);
#line 1017 "/home/jens/Source/shotwell/src/Commands.vala"
	G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_MOVE_PHOTOS_COMMAND, MovePhotosCommand)->real_command = _tmp2_;
#line 1014 "/home/jens/Source/shotwell/src/Commands.vala"
	return self;
#line 9522 "Commands.c"
}


SetEventCommand* set_event_command_new (GeeIterable* iter, Event* new_event) {
#line 1014 "/home/jens/Source/shotwell/src/Commands.vala"
	return set_event_command_construct (TYPE_SET_EVENT_COMMAND, iter, new_event);
#line 9529 "Commands.c"
}


static void set_event_command_class_init (SetEventCommandClass * klass) {
#line 1013 "/home/jens/Source/shotwell/src/Commands.vala"
	set_event_command_parent_class = g_type_class_peek_parent (klass);
#line 9536 "Commands.c"
}


static void set_event_command_instance_init (SetEventCommand * self) {
}


GType set_event_command_get_type (void) {
	static volatile gsize set_event_command_type_id__volatile = 0;
	if (g_once_init_enter (&set_event_command_type_id__volatile)) {
		static const GTypeInfo g_define_type_info = { sizeof (SetEventCommandClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) set_event_command_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (SetEventCommand), 0, (GInstanceInitFunc) set_event_command_instance_init, NULL };
		GType set_event_command_type_id;
		set_event_command_type_id = g_type_register_static (TYPE_MOVE_PHOTOS_COMMAND, "SetEventCommand", &g_define_type_info, 0);
		g_once_init_leave (&set_event_command_type_id__volatile, set_event_command_type_id);
	}
	return set_event_command_type_id__volatile;
}


MergeEventsCommand* merge_events_command_construct (GType object_type, GeeIterable* iter) {
	MergeEventsCommand * self = NULL;
	Event* master_event = NULL;
	gint named_evt_src_count = 0;
	gint unnamed_evt_src_count = 0;
	GeeArrayList* media_thumbs = NULL;
	GeeArrayList* _tmp0_;
	Event* _tmp48_;
	GeeArrayList* _tmp49_;
	gint _tmp50_;
	gint _tmp51_;
	Event* _tmp52_;
	GeeArrayList* _tmp53_;
	MovePhotosCommandRealMovePhotosCommand* _tmp54_;
#line 1024 "/home/jens/Source/shotwell/src/Commands.vala"
	g_return_val_if_fail (GEE_IS_ITERABLE (iter), NULL);
#line 1025 "/home/jens/Source/shotwell/src/Commands.vala"
	self = (MergeEventsCommand*) move_photos_command_construct (object_type, RESOURCES_MERGE_LABEL, "");
#line 1031 "/home/jens/Source/shotwell/src/Commands.vala"
	master_event = NULL;
#line 1032 "/home/jens/Source/shotwell/src/Commands.vala"
	named_evt_src_count = 0;
#line 1033 "/home/jens/Source/shotwell/src/Commands.vala"
	unnamed_evt_src_count = 0;
#line 1034 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp0_ = gee_array_list_new (TYPE_THUMBNAIL_VIEW, (GBoxedCopyFunc) g_object_ref, (GDestroyNotify) g_object_unref, NULL, NULL, NULL);
#line 1034 "/home/jens/Source/shotwell/src/Commands.vala"
	media_thumbs = _tmp0_;
#line 9584 "Commands.c"
	{
		GeeIterator* _view_it = NULL;
		GeeIterable* _tmp1_;
		GeeIterator* _tmp2_;
#line 1036 "/home/jens/Source/shotwell/src/Commands.vala"
		_tmp1_ = iter;
#line 1036 "/home/jens/Source/shotwell/src/Commands.vala"
		_tmp2_ = gee_iterable_iterator (_tmp1_);
#line 1036 "/home/jens/Source/shotwell/src/Commands.vala"
		_view_it = _tmp2_;
#line 1036 "/home/jens/Source/shotwell/src/Commands.vala"
		while (TRUE) {
#line 9597 "Commands.c"
			GeeIterator* _tmp3_;
			gboolean _tmp4_;
			DataView* view = NULL;
			GeeIterator* _tmp5_;
			gpointer _tmp6_;
			Event* event = NULL;
			DataView* _tmp7_;
			DataSource* _tmp8_;
			Event* _tmp9_;
#line 1036 "/home/jens/Source/shotwell/src/Commands.vala"
			_tmp3_ = _view_it;
#line 1036 "/home/jens/Source/shotwell/src/Commands.vala"
			_tmp4_ = gee_iterator_next (_tmp3_);
#line 1036 "/home/jens/Source/shotwell/src/Commands.vala"
			if (!_tmp4_) {
#line 1036 "/home/jens/Source/shotwell/src/Commands.vala"
				break;
#line 9615 "Commands.c"
			}
#line 1036 "/home/jens/Source/shotwell/src/Commands.vala"
			_tmp5_ = _view_it;
#line 1036 "/home/jens/Source/shotwell/src/Commands.vala"
			_tmp6_ = gee_iterator_get (_tmp5_);
#line 1036 "/home/jens/Source/shotwell/src/Commands.vala"
			view = (DataView*) _tmp6_;
#line 1037 "/home/jens/Source/shotwell/src/Commands.vala"
			_tmp7_ = view;
#line 1037 "/home/jens/Source/shotwell/src/Commands.vala"
			_tmp8_ = data_view_get_source (_tmp7_);
#line 1037 "/home/jens/Source/shotwell/src/Commands.vala"
			event = G_TYPE_CHECK_INSTANCE_CAST (_tmp8_, TYPE_EVENT, Event);
#line 1040 "/home/jens/Source/shotwell/src/Commands.vala"
			_tmp9_ = master_event;
#line 1040 "/home/jens/Source/shotwell/src/Commands.vala"
			if (_tmp9_ == NULL) {
#line 9633 "Commands.c"
				Event* _tmp10_;
				Event* _tmp11_;
				Event* _tmp12_;
				gint _tmp13_;
				Event* _tmp14_;
				gboolean _tmp15_;
#line 1043 "/home/jens/Source/shotwell/src/Commands.vala"
				_tmp10_ = event;
#line 1043 "/home/jens/Source/shotwell/src/Commands.vala"
				_tmp11_ = _g_object_ref0 (_tmp10_);
#line 1043 "/home/jens/Source/shotwell/src/Commands.vala"
				_g_object_unref0 (master_event);
#line 1043 "/home/jens/Source/shotwell/src/Commands.vala"
				master_event = _tmp11_;
#line 1044 "/home/jens/Source/shotwell/src/Commands.vala"
				_tmp12_ = master_event;
#line 1044 "/home/jens/Source/shotwell/src/Commands.vala"
				_tmp13_ = event_source_get_media_count (G_TYPE_CHECK_INSTANCE_CAST (_tmp12_, TYPE_EVENT_SOURCE, EventSource));
#line 1044 "/home/jens/Source/shotwell/src/Commands.vala"
				unnamed_evt_src_count = _tmp13_;
#line 1045 "/home/jens/Source/shotwell/src/Commands.vala"
				_tmp14_ = event;
#line 1045 "/home/jens/Source/shotwell/src/Commands.vala"
				_tmp15_ = event_has_name (_tmp14_);
#line 1045 "/home/jens/Source/shotwell/src/Commands.vala"
				if (_tmp15_) {
#line 9660 "Commands.c"
					Event* _tmp16_;
					gint _tmp17_;
#line 1046 "/home/jens/Source/shotwell/src/Commands.vala"
					_tmp16_ = master_event;
#line 1046 "/home/jens/Source/shotwell/src/Commands.vala"
					_tmp17_ = event_source_get_media_count (G_TYPE_CHECK_INSTANCE_CAST (_tmp16_, TYPE_EVENT_SOURCE, EventSource));
#line 1046 "/home/jens/Source/shotwell/src/Commands.vala"
					named_evt_src_count = _tmp17_;
#line 9669 "Commands.c"
				}
			} else {
				Event* _tmp18_;
				gboolean _tmp19_;
#line 1050 "/home/jens/Source/shotwell/src/Commands.vala"
				_tmp18_ = event;
#line 1050 "/home/jens/Source/shotwell/src/Commands.vala"
				_tmp19_ = event_has_name (_tmp18_);
#line 1050 "/home/jens/Source/shotwell/src/Commands.vala"
				if (_tmp19_) {
#line 9680 "Commands.c"
					Event* _tmp20_;
					gint _tmp21_;
					gint _tmp22_;
#line 1051 "/home/jens/Source/shotwell/src/Commands.vala"
					_tmp20_ = event;
#line 1051 "/home/jens/Source/shotwell/src/Commands.vala"
					_tmp21_ = event_source_get_media_count (G_TYPE_CHECK_INSTANCE_CAST (_tmp20_, TYPE_EVENT_SOURCE, EventSource));
#line 1051 "/home/jens/Source/shotwell/src/Commands.vala"
					_tmp22_ = named_evt_src_count;
#line 1051 "/home/jens/Source/shotwell/src/Commands.vala"
					if (_tmp21_ > _tmp22_) {
#line 9692 "Commands.c"
						Event* _tmp23_;
						gint _tmp24_;
						Event* _tmp25_;
						Event* _tmp26_;
#line 1052 "/home/jens/Source/shotwell/src/Commands.vala"
						_tmp23_ = event;
#line 1052 "/home/jens/Source/shotwell/src/Commands.vala"
						_tmp24_ = event_source_get_media_count (G_TYPE_CHECK_INSTANCE_CAST (_tmp23_, TYPE_EVENT_SOURCE, EventSource));
#line 1052 "/home/jens/Source/shotwell/src/Commands.vala"
						named_evt_src_count = _tmp24_;
#line 1053 "/home/jens/Source/shotwell/src/Commands.vala"
						_tmp25_ = event;
#line 1053 "/home/jens/Source/shotwell/src/Commands.vala"
						_tmp26_ = _g_object_ref0 (_tmp25_);
#line 1053 "/home/jens/Source/shotwell/src/Commands.vala"
						_g_object_unref0 (master_event);
#line 1053 "/home/jens/Source/shotwell/src/Commands.vala"
						master_event = _tmp26_;
#line 9711 "Commands.c"
					}
				} else {
					gint _tmp27_;
#line 1055 "/home/jens/Source/shotwell/src/Commands.vala"
					_tmp27_ = named_evt_src_count;
#line 1055 "/home/jens/Source/shotwell/src/Commands.vala"
					if (_tmp27_ == 0) {
#line 9719 "Commands.c"
						Event* _tmp28_;
						gint _tmp29_;
						gint _tmp30_;
#line 1059 "/home/jens/Source/shotwell/src/Commands.vala"
						_tmp28_ = event;
#line 1059 "/home/jens/Source/shotwell/src/Commands.vala"
						_tmp29_ = event_source_get_media_count (G_TYPE_CHECK_INSTANCE_CAST (_tmp28_, TYPE_EVENT_SOURCE, EventSource));
#line 1059 "/home/jens/Source/shotwell/src/Commands.vala"
						_tmp30_ = unnamed_evt_src_count;
#line 1059 "/home/jens/Source/shotwell/src/Commands.vala"
						if (_tmp29_ > _tmp30_) {
#line 9731 "Commands.c"
							Event* _tmp31_;
							gint _tmp32_;
							Event* _tmp33_;
							Event* _tmp34_;
#line 1060 "/home/jens/Source/shotwell/src/Commands.vala"
							_tmp31_ = event;
#line 1060 "/home/jens/Source/shotwell/src/Commands.vala"
							_tmp32_ = event_source_get_media_count (G_TYPE_CHECK_INSTANCE_CAST (_tmp31_, TYPE_EVENT_SOURCE, EventSource));
#line 1060 "/home/jens/Source/shotwell/src/Commands.vala"
							unnamed_evt_src_count = _tmp32_;
#line 1061 "/home/jens/Source/shotwell/src/Commands.vala"
							_tmp33_ = event;
#line 1061 "/home/jens/Source/shotwell/src/Commands.vala"
							_tmp34_ = _g_object_ref0 (_tmp33_);
#line 1061 "/home/jens/Source/shotwell/src/Commands.vala"
							_g_object_unref0 (master_event);
#line 1061 "/home/jens/Source/shotwell/src/Commands.vala"
							master_event = _tmp34_;
#line 9750 "Commands.c"
						}
					}
				}
			}
			{
				GeeIterator* _media_source_it = NULL;
				Event* _tmp35_;
				GeeCollection* _tmp36_;
				GeeCollection* _tmp37_;
				GeeIterator* _tmp38_;
				GeeIterator* _tmp39_;
#line 1068 "/home/jens/Source/shotwell/src/Commands.vala"
				_tmp35_ = event;
#line 1068 "/home/jens/Source/shotwell/src/Commands.vala"
				_tmp36_ = event_source_get_media (G_TYPE_CHECK_INSTANCE_CAST (_tmp35_, TYPE_EVENT_SOURCE, EventSource));
#line 1068 "/home/jens/Source/shotwell/src/Commands.vala"
				_tmp37_ = _tmp36_;
#line 1068 "/home/jens/Source/shotwell/src/Commands.vala"
				_tmp38_ = gee_iterable_iterator (G_TYPE_CHECK_INSTANCE_CAST (_tmp37_, GEE_TYPE_ITERABLE, GeeIterable));
#line 1068 "/home/jens/Source/shotwell/src/Commands.vala"
				_tmp39_ = _tmp38_;
#line 1068 "/home/jens/Source/shotwell/src/Commands.vala"
				_g_object_unref0 (_tmp37_);
#line 1068 "/home/jens/Source/shotwell/src/Commands.vala"
				_media_source_it = _tmp39_;
#line 1068 "/home/jens/Source/shotwell/src/Commands.vala"
				while (TRUE) {
#line 9778 "Commands.c"
					GeeIterator* _tmp40_;
					gboolean _tmp41_;
					MediaSource* media_source = NULL;
					GeeIterator* _tmp42_;
					gpointer _tmp43_;
					GeeArrayList* _tmp44_;
					MediaSource* _tmp45_;
					ThumbnailView* _tmp46_;
					ThumbnailView* _tmp47_;
#line 1068 "/home/jens/Source/shotwell/src/Commands.vala"
					_tmp40_ = _media_source_it;
#line 1068 "/home/jens/Source/shotwell/src/Commands.vala"
					_tmp41_ = gee_iterator_next (_tmp40_);
#line 1068 "/home/jens/Source/shotwell/src/Commands.vala"
					if (!_tmp41_) {
#line 1068 "/home/jens/Source/shotwell/src/Commands.vala"
						break;
#line 9796 "Commands.c"
					}
#line 1068 "/home/jens/Source/shotwell/src/Commands.vala"
					_tmp42_ = _media_source_it;
#line 1068 "/home/jens/Source/shotwell/src/Commands.vala"
					_tmp43_ = gee_iterator_get (_tmp42_);
#line 1068 "/home/jens/Source/shotwell/src/Commands.vala"
					media_source = (MediaSource*) _tmp43_;
#line 1069 "/home/jens/Source/shotwell/src/Commands.vala"
					_tmp44_ = media_thumbs;
#line 1069 "/home/jens/Source/shotwell/src/Commands.vala"
					_tmp45_ = media_source;
#line 1069 "/home/jens/Source/shotwell/src/Commands.vala"
					_tmp46_ = thumbnail_view_new (G_TYPE_CHECK_INSTANCE_CAST (_tmp45_, TYPE_THUMBNAIL_SOURCE, ThumbnailSource));
#line 1069 "/home/jens/Source/shotwell/src/Commands.vala"
					_tmp47_ = _tmp46_;
#line 1069 "/home/jens/Source/shotwell/src/Commands.vala"
					gee_abstract_collection_add (G_TYPE_CHECK_INSTANCE_CAST (_tmp44_, GEE_TYPE_ABSTRACT_COLLECTION, GeeAbstractCollection), _tmp47_);
#line 1069 "/home/jens/Source/shotwell/src/Commands.vala"
					_g_object_unref0 (_tmp47_);
#line 1068 "/home/jens/Source/shotwell/src/Commands.vala"
					_g_object_unref0 (media_source);
#line 9818 "Commands.c"
				}
#line 1068 "/home/jens/Source/shotwell/src/Commands.vala"
				_g_object_unref0 (_media_source_it);
#line 9822 "Commands.c"
			}
#line 1036 "/home/jens/Source/shotwell/src/Commands.vala"
			_g_object_unref0 (event);
#line 1036 "/home/jens/Source/shotwell/src/Commands.vala"
			_g_object_unref0 (view);
#line 9828 "Commands.c"
		}
#line 1036 "/home/jens/Source/shotwell/src/Commands.vala"
		_g_object_unref0 (_view_it);
#line 9832 "Commands.c"
	}
#line 1072 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp48_ = master_event;
#line 1072 "/home/jens/Source/shotwell/src/Commands.vala"
	_vala_assert (_tmp48_ != NULL, "master_event != null");
#line 1073 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp49_ = media_thumbs;
#line 1073 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp50_ = gee_abstract_collection_get_size (G_TYPE_CHECK_INSTANCE_CAST (_tmp49_, GEE_TYPE_ABSTRACT_COLLECTION, GeeAbstractCollection));
#line 1073 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp51_ = _tmp50_;
#line 1073 "/home/jens/Source/shotwell/src/Commands.vala"
	_vala_assert (_tmp51_ > 0, "media_thumbs.size > 0");
#line 1075 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp52_ = master_event;
#line 1075 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp53_ = media_thumbs;
#line 1075 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp54_ = move_photos_command_real_move_photos_command_new (_tmp52_, G_TYPE_CHECK_INSTANCE_CAST (_tmp53_, GEE_TYPE_ITERABLE, GeeIterable), _ ("Merging"), _ ("Unmerging"), RESOURCES_MERGE_LABEL, "");
#line 1075 "/home/jens/Source/shotwell/src/Commands.vala"
	_g_object_unref0 (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_MOVE_PHOTOS_COMMAND, MovePhotosCommand)->real_command);
#line 1075 "/home/jens/Source/shotwell/src/Commands.vala"
	G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_MOVE_PHOTOS_COMMAND, MovePhotosCommand)->real_command = _tmp54_;
#line 1024 "/home/jens/Source/shotwell/src/Commands.vala"
	_g_object_unref0 (media_thumbs);
#line 1024 "/home/jens/Source/shotwell/src/Commands.vala"
	_g_object_unref0 (master_event);
#line 1024 "/home/jens/Source/shotwell/src/Commands.vala"
	return self;
#line 9862 "Commands.c"
}


MergeEventsCommand* merge_events_command_new (GeeIterable* iter) {
#line 1024 "/home/jens/Source/shotwell/src/Commands.vala"
	return merge_events_command_construct (TYPE_MERGE_EVENTS_COMMAND, iter);
#line 9869 "Commands.c"
}


static void merge_events_command_class_init (MergeEventsCommandClass * klass) {
#line 1023 "/home/jens/Source/shotwell/src/Commands.vala"
	merge_events_command_parent_class = g_type_class_peek_parent (klass);
#line 9876 "Commands.c"
}


static void merge_events_command_instance_init (MergeEventsCommand * self) {
}


GType merge_events_command_get_type (void) {
	static volatile gsize merge_events_command_type_id__volatile = 0;
	if (g_once_init_enter (&merge_events_command_type_id__volatile)) {
		static const GTypeInfo g_define_type_info = { sizeof (MergeEventsCommandClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) merge_events_command_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (MergeEventsCommand), 0, (GInstanceInitFunc) merge_events_command_instance_init, NULL };
		GType merge_events_command_type_id;
		merge_events_command_type_id = g_type_register_static (TYPE_MOVE_PHOTOS_COMMAND, "MergeEventsCommand", &g_define_type_info, 0);
		g_once_init_leave (&merge_events_command_type_id__volatile, merge_events_command_type_id);
	}
	return merge_events_command_type_id__volatile;
}


static void _duplicate_multiple_photos_command_on_photo_destroyed_source_collection_item_destroyed (SourceCollection* _sender, DataSource* source, gpointer self) {
#line 1092 "/home/jens/Source/shotwell/src/Commands.vala"
	duplicate_multiple_photos_command_on_photo_destroyed ((DuplicateMultiplePhotosCommand*) self, source);
#line 9899 "Commands.c"
}


DuplicateMultiplePhotosCommand* duplicate_multiple_photos_command_construct (GType object_type, GeeIterable* iter) {
	DuplicateMultiplePhotosCommand * self = NULL;
	GeeIterable* _tmp0_;
	LibraryPhotoSourceCollection* _tmp1_;
#line 1084 "/home/jens/Source/shotwell/src/Commands.vala"
	g_return_val_if_fail (GEE_IS_ITERABLE (iter), NULL);
#line 1085 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp0_ = iter;
#line 1085 "/home/jens/Source/shotwell/src/Commands.vala"
	self = (DuplicateMultiplePhotosCommand*) multiple_data_source_command_construct (object_type, _tmp0_, _ ("Duplicating photos"), _ ("Removing duplicated photos"), RESOURCES_DUPLICATE_PHOTO_LABEL, RESOURCES_DUPLICATE_PHOTO_TOOLTIP);
#line 1088 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp1_ = library_photo_global;
#line 1088 "/home/jens/Source/shotwell/src/Commands.vala"
	g_signal_connect_object (G_TYPE_CHECK_INSTANCE_CAST (_tmp1_, TYPE_SOURCE_COLLECTION, SourceCollection), "item-destroyed", (GCallback) _duplicate_multiple_photos_command_on_photo_destroyed_source_collection_item_destroyed, self, 0);
#line 1084 "/home/jens/Source/shotwell/src/Commands.vala"
	return self;
#line 9919 "Commands.c"
}


DuplicateMultiplePhotosCommand* duplicate_multiple_photos_command_new (GeeIterable* iter) {
#line 1084 "/home/jens/Source/shotwell/src/Commands.vala"
	return duplicate_multiple_photos_command_construct (TYPE_DUPLICATE_MULTIPLE_PHOTOS_COMMAND, iter);
#line 9926 "Commands.c"
}


static void duplicate_multiple_photos_command_on_photo_destroyed (DuplicateMultiplePhotosCommand* self, DataSource* source) {
	GeeHashMap* _tmp0_;
	GeeCollection* _tmp1_;
	GeeCollection* _tmp2_;
	GeeCollection* _tmp3_;
	DataSource* _tmp4_;
	gboolean _tmp5_;
	gboolean _tmp6_;
#line 1095 "/home/jens/Source/shotwell/src/Commands.vala"
	g_return_if_fail (IS_DUPLICATE_MULTIPLE_PHOTOS_COMMAND (self));
#line 1095 "/home/jens/Source/shotwell/src/Commands.vala"
	g_return_if_fail (IS_DATA_SOURCE (source));
#line 1097 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp0_ = self->priv->dupes;
#line 1097 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp1_ = gee_abstract_map_get_values (G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, GEE_TYPE_ABSTRACT_MAP, GeeAbstractMap));
#line 1097 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp2_ = _tmp1_;
#line 1097 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp3_ = _tmp2_;
#line 1097 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp4_ = source;
#line 1097 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp5_ = gee_collection_contains (_tmp3_, G_TYPE_CHECK_INSTANCE_CAST (_tmp4_, TYPE_LIBRARY_PHOTO, LibraryPhoto));
#line 1097 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp6_ = _tmp5_;
#line 1097 "/home/jens/Source/shotwell/src/Commands.vala"
	_g_object_unref0 (_tmp3_);
#line 1097 "/home/jens/Source/shotwell/src/Commands.vala"
	if (_tmp6_) {
#line 9960 "Commands.c"
		CommandManager* _tmp7_;
		CommandManager* _tmp8_;
#line 1098 "/home/jens/Source/shotwell/src/Commands.vala"
		_tmp7_ = command_get_command_manager (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_COMMAND, Command));
#line 1098 "/home/jens/Source/shotwell/src/Commands.vala"
		_tmp8_ = _tmp7_;
#line 1098 "/home/jens/Source/shotwell/src/Commands.vala"
		command_manager_reset (_tmp8_);
#line 1098 "/home/jens/Source/shotwell/src/Commands.vala"
		_command_manager_unref0 (_tmp8_);
#line 9971 "Commands.c"
	}
}


static void duplicate_multiple_photos_command_real_execute (Command* base) {
	DuplicateMultiplePhotosCommand * self;
	GeeHashMap* _tmp0_;
	gint _tmp1_;
#line 1101 "/home/jens/Source/shotwell/src/Commands.vala"
	self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_DUPLICATE_MULTIPLE_PHOTOS_COMMAND, DuplicateMultiplePhotosCommand);
#line 1102 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp0_ = self->priv->dupes;
#line 1102 "/home/jens/Source/shotwell/src/Commands.vala"
	gee_abstract_map_clear (G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, GEE_TYPE_ABSTRACT_MAP, GeeAbstractMap));
#line 1103 "/home/jens/Source/shotwell/src/Commands.vala"
	self->priv->failed = 0;
#line 1105 "/home/jens/Source/shotwell/src/Commands.vala"
	COMMAND_CLASS (duplicate_multiple_photos_command_parent_class)->execute (G_TYPE_CHECK_INSTANCE_CAST (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_MULTIPLE_DATA_SOURCE_COMMAND, MultipleDataSourceCommand), TYPE_COMMAND, Command));
#line 1107 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp1_ = self->priv->failed;
#line 1107 "/home/jens/Source/shotwell/src/Commands.vala"
	if (_tmp1_ > 0) {
#line 9994 "Commands.c"
		gchar* error_string = NULL;
		gint _tmp2_;
		gint _tmp3_;
		gchar* _tmp4_;
		const gchar* _tmp5_;
#line 1108 "/home/jens/Source/shotwell/src/Commands.vala"
		_tmp2_ = self->priv->failed;
#line 1108 "/home/jens/Source/shotwell/src/Commands.vala"
		_tmp3_ = self->priv->failed;
#line 1108 "/home/jens/Source/shotwell/src/Commands.vala"
		_tmp4_ = g_strdup_printf (ngettext ("Unable to duplicate one photo due to a file error", "Unable to duplicate %d photos due to file errors", (gulong) _tmp2_), _tmp3_);
#line 1108 "/home/jens/Source/shotwell/src/Commands.vala"
		error_string = _tmp4_;
#line 1110 "/home/jens/Source/shotwell/src/Commands.vala"
		_tmp5_ = error_string;
#line 1110 "/home/jens/Source/shotwell/src/Commands.vala"
		app_window_error_message (_tmp5_, NULL);
#line 1107 "/home/jens/Source/shotwell/src/Commands.vala"
		_g_free0 (error_string);
#line 10014 "Commands.c"
	}
}


static void duplicate_multiple_photos_command_real_execute_on_source (MultipleDataSourceCommand* base, DataSource* source) {
	DuplicateMultiplePhotosCommand * self;
	LibraryPhoto* photo = NULL;
	DataSource* _tmp0_;
	LibraryPhoto* _tmp1_;
	GError * _inner_error_ = NULL;
#line 1114 "/home/jens/Source/shotwell/src/Commands.vala"
	self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_DUPLICATE_MULTIPLE_PHOTOS_COMMAND, DuplicateMultiplePhotosCommand);
#line 1114 "/home/jens/Source/shotwell/src/Commands.vala"
	g_return_if_fail (IS_DATA_SOURCE (source));
#line 1115 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp0_ = source;
#line 1115 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp1_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, TYPE_LIBRARY_PHOTO, LibraryPhoto));
#line 1115 "/home/jens/Source/shotwell/src/Commands.vala"
	photo = _tmp1_;
#line 10035 "Commands.c"
	{
		LibraryPhoto* dupe = NULL;
		LibraryPhoto* _tmp2_;
		GeeHashMap* _tmp3_;
#line 1118 "/home/jens/Source/shotwell/src/Commands.vala"
		_tmp2_ = library_photo_duplicate (photo, &_inner_error_);
#line 1118 "/home/jens/Source/shotwell/src/Commands.vala"
		dupe = _tmp2_;
#line 1118 "/home/jens/Source/shotwell/src/Commands.vala"
		if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 10046 "Commands.c"
			goto __catch458_g_error;
		}
#line 1119 "/home/jens/Source/shotwell/src/Commands.vala"
		_tmp3_ = self->priv->dupes;
#line 1119 "/home/jens/Source/shotwell/src/Commands.vala"
		gee_abstract_map_set (G_TYPE_CHECK_INSTANCE_CAST (_tmp3_, GEE_TYPE_ABSTRACT_MAP, GeeAbstractMap), photo, dupe);
#line 1117 "/home/jens/Source/shotwell/src/Commands.vala"
		_g_object_unref0 (dupe);
#line 10055 "Commands.c"
	}
	goto __finally458;
	__catch458_g_error:
	{
		GError* err = NULL;
		GFile* _tmp4_;
		GFile* _tmp5_;
		gchar* _tmp6_;
		gchar* _tmp7_;
		GError* _tmp8_;
		const gchar* _tmp9_;
		gint _tmp10_;
#line 1117 "/home/jens/Source/shotwell/src/Commands.vala"
		err = _inner_error_;
#line 1117 "/home/jens/Source/shotwell/src/Commands.vala"
		_inner_error_ = NULL;
#line 1121 "/home/jens/Source/shotwell/src/Commands.vala"
		_tmp4_ = media_source_get_file (G_TYPE_CHECK_INSTANCE_CAST (photo, TYPE_MEDIA_SOURCE, MediaSource));
#line 1121 "/home/jens/Source/shotwell/src/Commands.vala"
		_tmp5_ = _tmp4_;
#line 1121 "/home/jens/Source/shotwell/src/Commands.vala"
		_tmp6_ = g_file_get_path (_tmp5_);
#line 1121 "/home/jens/Source/shotwell/src/Commands.vala"
		_tmp7_ = _tmp6_;
#line 1121 "/home/jens/Source/shotwell/src/Commands.vala"
		_tmp8_ = err;
#line 1121 "/home/jens/Source/shotwell/src/Commands.vala"
		_tmp9_ = _tmp8_->message;
#line 1121 "/home/jens/Source/shotwell/src/Commands.vala"
		g_critical ("Commands.vala:1121: Unable to duplicate file %s: %s", _tmp7_, _tmp9_);
#line 1121 "/home/jens/Source/shotwell/src/Commands.vala"
		_g_free0 (_tmp7_);
#line 1121 "/home/jens/Source/shotwell/src/Commands.vala"
		_g_object_unref0 (_tmp5_);
#line 1122 "/home/jens/Source/shotwell/src/Commands.vala"
		_tmp10_ = self->priv->failed;
#line 1122 "/home/jens/Source/shotwell/src/Commands.vala"
		self->priv->failed = _tmp10_ + 1;
#line 1117 "/home/jens/Source/shotwell/src/Commands.vala"
		_g_error_free0 (err);
#line 10096 "Commands.c"
	}
	__finally458:
#line 1117 "/home/jens/Source/shotwell/src/Commands.vala"
	if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 1117 "/home/jens/Source/shotwell/src/Commands.vala"
		_g_object_unref0 (photo);
#line 1117 "/home/jens/Source/shotwell/src/Commands.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 1117 "/home/jens/Source/shotwell/src/Commands.vala"
		g_clear_error (&_inner_error_);
#line 1117 "/home/jens/Source/shotwell/src/Commands.vala"
		return;
#line 10109 "Commands.c"
	}
#line 1114 "/home/jens/Source/shotwell/src/Commands.vala"
	_g_object_unref0 (photo);
#line 10113 "Commands.c"
}


static void duplicate_multiple_photos_command_real_undo (Command* base) {
	DuplicateMultiplePhotosCommand * self;
	LibraryPhotoSourceCollection* _tmp0_;
	guint _tmp1_;
	GeeHashMap* _tmp2_;
	LibraryPhotoSourceCollection* _tmp3_;
#line 1126 "/home/jens/Source/shotwell/src/Commands.vala"
	self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_DUPLICATE_MULTIPLE_PHOTOS_COMMAND, DuplicateMultiplePhotosCommand);
#line 1128 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp0_ = library_photo_global;
#line 1128 "/home/jens/Source/shotwell/src/Commands.vala"
	g_signal_parse_name ("item-destroyed", TYPE_SOURCE_COLLECTION, &_tmp1_, NULL, FALSE);
#line 1128 "/home/jens/Source/shotwell/src/Commands.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) _duplicate_multiple_photos_command_on_photo_destroyed_source_collection_item_destroyed, self);
#line 1130 "/home/jens/Source/shotwell/src/Commands.vala"
	COMMAND_CLASS (duplicate_multiple_photos_command_parent_class)->undo (G_TYPE_CHECK_INSTANCE_CAST (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_MULTIPLE_DATA_SOURCE_COMMAND, MultipleDataSourceCommand), TYPE_COMMAND, Command));
#line 1133 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp2_ = self->priv->dupes;
#line 1133 "/home/jens/Source/shotwell/src/Commands.vala"
	gee_abstract_map_clear (G_TYPE_CHECK_INSTANCE_CAST (_tmp2_, GEE_TYPE_ABSTRACT_MAP, GeeAbstractMap));
#line 1134 "/home/jens/Source/shotwell/src/Commands.vala"
	self->priv->failed = 0;
#line 1137 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp3_ = library_photo_global;
#line 1137 "/home/jens/Source/shotwell/src/Commands.vala"
	g_signal_connect_object (G_TYPE_CHECK_INSTANCE_CAST (_tmp3_, TYPE_SOURCE_COLLECTION, SourceCollection), "item-destroyed", (GCallback) _duplicate_multiple_photos_command_on_photo_destroyed_source_collection_item_destroyed, self, 0);
#line 10143 "Commands.c"
}


static void duplicate_multiple_photos_command_real_undo_on_source (MultipleDataSourceCommand* base, DataSource* source) {
	DuplicateMultiplePhotosCommand * self;
	LibraryPhoto* photo = NULL;
	DataSource* _tmp0_;
	LibraryPhoto* _tmp1_;
	Marker* marker = NULL;
	LibraryPhotoSourceCollection* _tmp2_;
	GeeHashMap* _tmp3_;
	gpointer _tmp4_;
	LibraryPhoto* _tmp5_;
	Marker* _tmp6_;
	Marker* _tmp7_;
	LibraryPhotoSourceCollection* _tmp8_;
#line 1140 "/home/jens/Source/shotwell/src/Commands.vala"
	self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_DUPLICATE_MULTIPLE_PHOTOS_COMMAND, DuplicateMultiplePhotosCommand);
#line 1140 "/home/jens/Source/shotwell/src/Commands.vala"
	g_return_if_fail (IS_DATA_SOURCE (source));
#line 1141 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp0_ = source;
#line 1141 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp1_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, TYPE_LIBRARY_PHOTO, LibraryPhoto));
#line 1141 "/home/jens/Source/shotwell/src/Commands.vala"
	photo = _tmp1_;
#line 1143 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp2_ = library_photo_global;
#line 1143 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp3_ = self->priv->dupes;
#line 1143 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp4_ = gee_abstract_map_get (G_TYPE_CHECK_INSTANCE_CAST (_tmp3_, GEE_TYPE_ABSTRACT_MAP, GeeAbstractMap), photo);
#line 1143 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp5_ = (LibraryPhoto*) _tmp4_;
#line 1143 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp6_ = data_collection_mark (G_TYPE_CHECK_INSTANCE_CAST (_tmp2_, TYPE_DATA_COLLECTION, DataCollection), G_TYPE_CHECK_INSTANCE_CAST (_tmp5_, TYPE_DATA_OBJECT, DataObject));
#line 1143 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp7_ = _tmp6_;
#line 1143 "/home/jens/Source/shotwell/src/Commands.vala"
	_g_object_unref0 (_tmp5_);
#line 1143 "/home/jens/Source/shotwell/src/Commands.vala"
	marker = _tmp7_;
#line 1144 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp8_ = library_photo_global;
#line 1144 "/home/jens/Source/shotwell/src/Commands.vala"
	source_collection_destroy_marked (G_TYPE_CHECK_INSTANCE_CAST (_tmp8_, TYPE_SOURCE_COLLECTION, SourceCollection), marker, TRUE, NULL, NULL, NULL);
#line 1140 "/home/jens/Source/shotwell/src/Commands.vala"
	_g_object_unref0 (marker);
#line 1140 "/home/jens/Source/shotwell/src/Commands.vala"
	_g_object_unref0 (photo);
#line 10194 "Commands.c"
}


static void duplicate_multiple_photos_command_class_init (DuplicateMultiplePhotosCommandClass * klass) {
#line 1080 "/home/jens/Source/shotwell/src/Commands.vala"
	duplicate_multiple_photos_command_parent_class = g_type_class_peek_parent (klass);
#line 1080 "/home/jens/Source/shotwell/src/Commands.vala"
	g_type_class_add_private (klass, sizeof (DuplicateMultiplePhotosCommandPrivate));
#line 1080 "/home/jens/Source/shotwell/src/Commands.vala"
	((CommandClass *) klass)->execute = (void (*) (Command *)) duplicate_multiple_photos_command_real_execute;
#line 1080 "/home/jens/Source/shotwell/src/Commands.vala"
	((MultipleDataSourceCommandClass *) klass)->execute_on_source = (void (*) (MultipleDataSourceCommand *, DataSource*)) duplicate_multiple_photos_command_real_execute_on_source;
#line 1080 "/home/jens/Source/shotwell/src/Commands.vala"
	((CommandClass *) klass)->undo = (void (*) (Command *)) duplicate_multiple_photos_command_real_undo;
#line 1080 "/home/jens/Source/shotwell/src/Commands.vala"
	((MultipleDataSourceCommandClass *) klass)->undo_on_source = (void (*) (MultipleDataSourceCommand *, DataSource*)) duplicate_multiple_photos_command_real_undo_on_source;
#line 1080 "/home/jens/Source/shotwell/src/Commands.vala"
	G_OBJECT_CLASS (klass)->finalize = duplicate_multiple_photos_command_finalize;
#line 10213 "Commands.c"
}


static void duplicate_multiple_photos_command_instance_init (DuplicateMultiplePhotosCommand * self) {
	GeeHashMap* _tmp0_;
#line 1080 "/home/jens/Source/shotwell/src/Commands.vala"
	self->priv = DUPLICATE_MULTIPLE_PHOTOS_COMMAND_GET_PRIVATE (self);
#line 1081 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp0_ = gee_hash_map_new (TYPE_LIBRARY_PHOTO, (GBoxedCopyFunc) g_object_ref, (GDestroyNotify) g_object_unref, TYPE_LIBRARY_PHOTO, (GBoxedCopyFunc) g_object_ref, (GDestroyNotify) g_object_unref, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
#line 1081 "/home/jens/Source/shotwell/src/Commands.vala"
	self->priv->dupes = _tmp0_;
#line 1082 "/home/jens/Source/shotwell/src/Commands.vala"
	self->priv->failed = 0;
#line 10227 "Commands.c"
}


static void duplicate_multiple_photos_command_finalize (GObject * obj) {
	DuplicateMultiplePhotosCommand * self;
	LibraryPhotoSourceCollection* _tmp0_;
	guint _tmp1_;
#line 1080 "/home/jens/Source/shotwell/src/Commands.vala"
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, TYPE_DUPLICATE_MULTIPLE_PHOTOS_COMMAND, DuplicateMultiplePhotosCommand);
#line 1092 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp0_ = library_photo_global;
#line 1092 "/home/jens/Source/shotwell/src/Commands.vala"
	g_signal_parse_name ("item-destroyed", TYPE_SOURCE_COLLECTION, &_tmp1_, NULL, FALSE);
#line 1092 "/home/jens/Source/shotwell/src/Commands.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) _duplicate_multiple_photos_command_on_photo_destroyed_source_collection_item_destroyed, self);
#line 1081 "/home/jens/Source/shotwell/src/Commands.vala"
	_g_object_unref0 (self->priv->dupes);
#line 1080 "/home/jens/Source/shotwell/src/Commands.vala"
	G_OBJECT_CLASS (duplicate_multiple_photos_command_parent_class)->finalize (obj);
#line 10247 "Commands.c"
}


GType duplicate_multiple_photos_command_get_type (void) {
	static volatile gsize duplicate_multiple_photos_command_type_id__volatile = 0;
	if (g_once_init_enter (&duplicate_multiple_photos_command_type_id__volatile)) {
		static const GTypeInfo g_define_type_info = { sizeof (DuplicateMultiplePhotosCommandClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) duplicate_multiple_photos_command_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (DuplicateMultiplePhotosCommand), 0, (GInstanceInitFunc) duplicate_multiple_photos_command_instance_init, NULL };
		GType duplicate_multiple_photos_command_type_id;
		duplicate_multiple_photos_command_type_id = g_type_register_static (TYPE_MULTIPLE_DATA_SOURCE_COMMAND, "DuplicateMultiplePhotosCommand", &g_define_type_info, 0);
		g_once_init_leave (&duplicate_multiple_photos_command_type_id__volatile, duplicate_multiple_photos_command_type_id);
	}
	return duplicate_multiple_photos_command_type_id__volatile;
}


SetRatingSingleCommand* set_rating_single_command_construct (GType object_type, DataSource* source, Rating rating) {
	SetRatingSingleCommand * self = NULL;
	DataSource* _tmp0_;
	Rating _tmp1_;
	const gchar* _tmp2_;
	Rating _tmp3_;
	DataSource* _tmp4_;
	Rating _tmp5_;
#line 1154 "/home/jens/Source/shotwell/src/Commands.vala"
	g_return_val_if_fail (IS_DATA_SOURCE (source), NULL);
#line 1155 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp0_ = source;
#line 1155 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp1_ = rating;
#line 1155 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp2_ = resources_rating_label (_tmp1_);
#line 1155 "/home/jens/Source/shotwell/src/Commands.vala"
	self = (SetRatingSingleCommand*) single_data_source_command_construct (object_type, _tmp0_, _tmp2_, "");
#line 1156 "/home/jens/Source/shotwell/src/Commands.vala"
	self->priv->set_direct = TRUE;
#line 1157 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp3_ = rating;
#line 1157 "/home/jens/Source/shotwell/src/Commands.vala"
	self->priv->new_rating = _tmp3_;
#line 1159 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp4_ = source;
#line 1159 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp5_ = media_source_get_rating (G_TYPE_CHECK_INSTANCE_CAST (G_TYPE_CHECK_INSTANCE_CAST (_tmp4_, TYPE_LIBRARY_PHOTO, LibraryPhoto), TYPE_MEDIA_SOURCE, MediaSource));
#line 1159 "/home/jens/Source/shotwell/src/Commands.vala"
	self->priv->last_rating = _tmp5_;
#line 1154 "/home/jens/Source/shotwell/src/Commands.vala"
	return self;
#line 10295 "Commands.c"
}


SetRatingSingleCommand* set_rating_single_command_new (DataSource* source, Rating rating) {
#line 1154 "/home/jens/Source/shotwell/src/Commands.vala"
	return set_rating_single_command_construct (TYPE_SET_RATING_SINGLE_COMMAND, source, rating);
#line 10302 "Commands.c"
}


SetRatingSingleCommand* set_rating_single_command_construct_inc_dec (GType object_type, DataSource* source, gboolean is_incrementing) {
	SetRatingSingleCommand * self = NULL;
	const gchar* _tmp0_ = NULL;
	gboolean _tmp1_;
	DataSource* _tmp2_;
	gboolean _tmp3_;
	DataSource* _tmp4_;
	Rating _tmp5_;
#line 1162 "/home/jens/Source/shotwell/src/Commands.vala"
	g_return_val_if_fail (IS_DATA_SOURCE (source), NULL);
#line 1163 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp1_ = is_incrementing;
#line 1163 "/home/jens/Source/shotwell/src/Commands.vala"
	if (_tmp1_) {
#line 1163 "/home/jens/Source/shotwell/src/Commands.vala"
		_tmp0_ = RESOURCES_INCREASE_RATING_LABEL;
#line 10322 "Commands.c"
	} else {
#line 1164 "/home/jens/Source/shotwell/src/Commands.vala"
		_tmp0_ = RESOURCES_DECREASE_RATING_LABEL;
#line 10326 "Commands.c"
	}
#line 1163 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp2_ = source;
#line 1163 "/home/jens/Source/shotwell/src/Commands.vala"
	self = (SetRatingSingleCommand*) single_data_source_command_construct (object_type, _tmp2_, _tmp0_, "");
#line 1165 "/home/jens/Source/shotwell/src/Commands.vala"
	self->priv->set_direct = FALSE;
#line 1166 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp3_ = is_incrementing;
#line 1166 "/home/jens/Source/shotwell/src/Commands.vala"
	self->priv->incrementing = _tmp3_;
#line 1168 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp4_ = source;
#line 1168 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp5_ = media_source_get_rating (G_TYPE_CHECK_INSTANCE_CAST (_tmp4_, TYPE_MEDIA_SOURCE, MediaSource));
#line 1168 "/home/jens/Source/shotwell/src/Commands.vala"
	self->priv->last_rating = _tmp5_;
#line 1162 "/home/jens/Source/shotwell/src/Commands.vala"
	return self;
#line 10346 "Commands.c"
}


SetRatingSingleCommand* set_rating_single_command_new_inc_dec (DataSource* source, gboolean is_incrementing) {
#line 1162 "/home/jens/Source/shotwell/src/Commands.vala"
	return set_rating_single_command_construct_inc_dec (TYPE_SET_RATING_SINGLE_COMMAND, source, is_incrementing);
#line 10353 "Commands.c"
}


static void set_rating_single_command_real_execute (Command* base) {
	SetRatingSingleCommand * self;
	gboolean _tmp0_;
#line 1171 "/home/jens/Source/shotwell/src/Commands.vala"
	self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_SET_RATING_SINGLE_COMMAND, SetRatingSingleCommand);
#line 1172 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp0_ = self->priv->set_direct;
#line 1172 "/home/jens/Source/shotwell/src/Commands.vala"
	if (_tmp0_) {
#line 10366 "Commands.c"
		DataSource* _tmp1_;
		Rating _tmp2_;
#line 1173 "/home/jens/Source/shotwell/src/Commands.vala"
		_tmp1_ = G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_SINGLE_DATA_SOURCE_COMMAND, SingleDataSourceCommand)->source;
#line 1173 "/home/jens/Source/shotwell/src/Commands.vala"
		_tmp2_ = self->priv->new_rating;
#line 1173 "/home/jens/Source/shotwell/src/Commands.vala"
		media_source_set_rating (G_TYPE_CHECK_INSTANCE_CAST (_tmp1_, TYPE_MEDIA_SOURCE, MediaSource), _tmp2_);
#line 10375 "Commands.c"
	} else {
		gboolean _tmp3_;
#line 1175 "/home/jens/Source/shotwell/src/Commands.vala"
		_tmp3_ = self->priv->incrementing;
#line 1175 "/home/jens/Source/shotwell/src/Commands.vala"
		if (_tmp3_) {
#line 10382 "Commands.c"
			DataSource* _tmp4_;
#line 1176 "/home/jens/Source/shotwell/src/Commands.vala"
			_tmp4_ = G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_SINGLE_DATA_SOURCE_COMMAND, SingleDataSourceCommand)->source;
#line 1176 "/home/jens/Source/shotwell/src/Commands.vala"
			media_source_increase_rating (G_TYPE_CHECK_INSTANCE_CAST (_tmp4_, TYPE_MEDIA_SOURCE, MediaSource));
#line 10388 "Commands.c"
		} else {
			DataSource* _tmp5_;
#line 1178 "/home/jens/Source/shotwell/src/Commands.vala"
			_tmp5_ = G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_SINGLE_DATA_SOURCE_COMMAND, SingleDataSourceCommand)->source;
#line 1178 "/home/jens/Source/shotwell/src/Commands.vala"
			media_source_decrease_rating (G_TYPE_CHECK_INSTANCE_CAST (_tmp5_, TYPE_MEDIA_SOURCE, MediaSource));
#line 10395 "Commands.c"
		}
	}
}


static void set_rating_single_command_real_undo (Command* base) {
	SetRatingSingleCommand * self;
	DataSource* _tmp0_;
	Rating _tmp1_;
#line 1182 "/home/jens/Source/shotwell/src/Commands.vala"
	self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_SET_RATING_SINGLE_COMMAND, SetRatingSingleCommand);
#line 1183 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp0_ = G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_SINGLE_DATA_SOURCE_COMMAND, SingleDataSourceCommand)->source;
#line 1183 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp1_ = self->priv->last_rating;
#line 1183 "/home/jens/Source/shotwell/src/Commands.vala"
	media_source_set_rating (G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, TYPE_MEDIA_SOURCE, MediaSource), _tmp1_);
#line 10413 "Commands.c"
}


static void set_rating_single_command_class_init (SetRatingSingleCommandClass * klass) {
#line 1148 "/home/jens/Source/shotwell/src/Commands.vala"
	set_rating_single_command_parent_class = g_type_class_peek_parent (klass);
#line 1148 "/home/jens/Source/shotwell/src/Commands.vala"
	g_type_class_add_private (klass, sizeof (SetRatingSingleCommandPrivate));
#line 1148 "/home/jens/Source/shotwell/src/Commands.vala"
	((CommandClass *) klass)->execute = (void (*) (Command *)) set_rating_single_command_real_execute;
#line 1148 "/home/jens/Source/shotwell/src/Commands.vala"
	((CommandClass *) klass)->undo = (void (*) (Command *)) set_rating_single_command_real_undo;
#line 1148 "/home/jens/Source/shotwell/src/Commands.vala"
	G_OBJECT_CLASS (klass)->finalize = set_rating_single_command_finalize;
#line 10428 "Commands.c"
}


static void set_rating_single_command_instance_init (SetRatingSingleCommand * self) {
#line 1148 "/home/jens/Source/shotwell/src/Commands.vala"
	self->priv = SET_RATING_SINGLE_COMMAND_GET_PRIVATE (self);
#line 10435 "Commands.c"
}


static void set_rating_single_command_finalize (GObject * obj) {
	SetRatingSingleCommand * self;
#line 1148 "/home/jens/Source/shotwell/src/Commands.vala"
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, TYPE_SET_RATING_SINGLE_COMMAND, SetRatingSingleCommand);
#line 1148 "/home/jens/Source/shotwell/src/Commands.vala"
	G_OBJECT_CLASS (set_rating_single_command_parent_class)->finalize (obj);
#line 10445 "Commands.c"
}


GType set_rating_single_command_get_type (void) {
	static volatile gsize set_rating_single_command_type_id__volatile = 0;
	if (g_once_init_enter (&set_rating_single_command_type_id__volatile)) {
		static const GTypeInfo g_define_type_info = { sizeof (SetRatingSingleCommandClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) set_rating_single_command_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (SetRatingSingleCommand), 0, (GInstanceInitFunc) set_rating_single_command_instance_init, NULL };
		GType set_rating_single_command_type_id;
		set_rating_single_command_type_id = g_type_register_static (TYPE_SINGLE_DATA_SOURCE_COMMAND, "SetRatingSingleCommand", &g_define_type_info, 0);
		g_once_init_leave (&set_rating_single_command_type_id__volatile, set_rating_single_command_type_id);
	}
	return set_rating_single_command_type_id__volatile;
}


SetRatingCommand* set_rating_command_construct (GType object_type, GeeIterable* iter, Rating rating) {
	SetRatingCommand * self = NULL;
	GeeIterable* _tmp0_;
	Rating _tmp1_;
	gchar* _tmp2_;
	gchar* _tmp3_;
	Rating _tmp4_;
	const gchar* _tmp5_;
	Rating _tmp6_;
	GeeIterable* _tmp7_;
#line 1194 "/home/jens/Source/shotwell/src/Commands.vala"
	g_return_val_if_fail (GEE_IS_ITERABLE (iter), NULL);
#line 1195 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp0_ = iter;
#line 1195 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp1_ = rating;
#line 1195 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp2_ = resources_rating_progress (_tmp1_);
#line 1195 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp3_ = _tmp2_;
#line 1195 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp4_ = rating;
#line 1195 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp5_ = resources_rating_label (_tmp4_);
#line 1195 "/home/jens/Source/shotwell/src/Commands.vala"
	self = (SetRatingCommand*) multiple_data_source_command_construct (object_type, _tmp0_, _tmp3_, _ ("Restoring previous rating"), _tmp5_, "");
#line 1195 "/home/jens/Source/shotwell/src/Commands.vala"
	_g_free0 (_tmp3_);
#line 1197 "/home/jens/Source/shotwell/src/Commands.vala"
	self->priv->set_direct = TRUE;
#line 1198 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp6_ = rating;
#line 1198 "/home/jens/Source/shotwell/src/Commands.vala"
	self->priv->new_rating = _tmp6_;
#line 1200 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp7_ = iter;
#line 1200 "/home/jens/Source/shotwell/src/Commands.vala"
	set_rating_command_save_source_states (self, _tmp7_);
#line 1194 "/home/jens/Source/shotwell/src/Commands.vala"
	return self;
#line 10501 "Commands.c"
}


SetRatingCommand* set_rating_command_new (GeeIterable* iter, Rating rating) {
#line 1194 "/home/jens/Source/shotwell/src/Commands.vala"
	return set_rating_command_construct (TYPE_SET_RATING_COMMAND, iter, rating);
#line 10508 "Commands.c"
}


SetRatingCommand* set_rating_command_construct_inc_dec (GType object_type, GeeIterable* iter, gboolean is_incrementing) {
	SetRatingCommand * self = NULL;
	const gchar* _tmp0_ = NULL;
	gboolean _tmp1_;
	const gchar* _tmp2_ = NULL;
	gboolean _tmp3_;
	const gchar* _tmp4_ = NULL;
	gboolean _tmp5_;
	GeeIterable* _tmp6_;
	gboolean _tmp7_;
	GeeIterable* _tmp8_;
#line 1203 "/home/jens/Source/shotwell/src/Commands.vala"
	g_return_val_if_fail (GEE_IS_ITERABLE (iter), NULL);
#line 1205 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp1_ = is_incrementing;
#line 1205 "/home/jens/Source/shotwell/src/Commands.vala"
	if (_tmp1_) {
#line 1205 "/home/jens/Source/shotwell/src/Commands.vala"
		_tmp0_ = _ ("Increasing ratings");
#line 10531 "Commands.c"
	} else {
#line 1205 "/home/jens/Source/shotwell/src/Commands.vala"
		_tmp0_ = _ ("Decreasing ratings");
#line 10535 "Commands.c"
	}
#line 1206 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp3_ = is_incrementing;
#line 1206 "/home/jens/Source/shotwell/src/Commands.vala"
	if (_tmp3_) {
#line 1206 "/home/jens/Source/shotwell/src/Commands.vala"
		_tmp2_ = _ ("Decreasing ratings");
#line 10543 "Commands.c"
	} else {
#line 1206 "/home/jens/Source/shotwell/src/Commands.vala"
		_tmp2_ = _ ("Increasing ratings");
#line 10547 "Commands.c"
	}
#line 1207 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp5_ = is_incrementing;
#line 1207 "/home/jens/Source/shotwell/src/Commands.vala"
	if (_tmp5_) {
#line 1207 "/home/jens/Source/shotwell/src/Commands.vala"
		_tmp4_ = RESOURCES_INCREASE_RATING_LABEL;
#line 10555 "Commands.c"
	} else {
#line 1207 "/home/jens/Source/shotwell/src/Commands.vala"
		_tmp4_ = RESOURCES_DECREASE_RATING_LABEL;
#line 10559 "Commands.c"
	}
#line 1204 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp6_ = iter;
#line 1204 "/home/jens/Source/shotwell/src/Commands.vala"
	self = (SetRatingCommand*) multiple_data_source_command_construct (object_type, _tmp6_, _tmp0_, _tmp2_, _tmp4_, "");
#line 1209 "/home/jens/Source/shotwell/src/Commands.vala"
	self->priv->set_direct = FALSE;
#line 1210 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp7_ = is_incrementing;
#line 1210 "/home/jens/Source/shotwell/src/Commands.vala"
	self->priv->incrementing = _tmp7_;
#line 1212 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp8_ = iter;
#line 1212 "/home/jens/Source/shotwell/src/Commands.vala"
	set_rating_command_save_source_states (self, _tmp8_);
#line 1203 "/home/jens/Source/shotwell/src/Commands.vala"
	return self;
#line 10577 "Commands.c"
}


SetRatingCommand* set_rating_command_new_inc_dec (GeeIterable* iter, gboolean is_incrementing) {
#line 1203 "/home/jens/Source/shotwell/src/Commands.vala"
	return set_rating_command_construct_inc_dec (TYPE_SET_RATING_COMMAND, iter, is_incrementing);
#line 10584 "Commands.c"
}


static void set_rating_command_save_source_states (SetRatingCommand* self, GeeIterable* iter) {
	GeeHashMap* _tmp0_;
#line 1215 "/home/jens/Source/shotwell/src/Commands.vala"
	g_return_if_fail (IS_SET_RATING_COMMAND (self));
#line 1215 "/home/jens/Source/shotwell/src/Commands.vala"
	g_return_if_fail (GEE_IS_ITERABLE (iter));
#line 1216 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp0_ = gee_hash_map_new (TYPE_DATA_SOURCE, (GBoxedCopyFunc) g_object_ref, (GDestroyNotify) g_object_unref, TYPE_RATING, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
#line 1216 "/home/jens/Source/shotwell/src/Commands.vala"
	_g_object_unref0 (self->priv->last_rating_map);
#line 1216 "/home/jens/Source/shotwell/src/Commands.vala"
	self->priv->last_rating_map = _tmp0_;
#line 10600 "Commands.c"
	{
		GeeIterator* _view_it = NULL;
		GeeIterable* _tmp1_;
		GeeIterator* _tmp2_;
#line 1218 "/home/jens/Source/shotwell/src/Commands.vala"
		_tmp1_ = iter;
#line 1218 "/home/jens/Source/shotwell/src/Commands.vala"
		_tmp2_ = gee_iterable_iterator (_tmp1_);
#line 1218 "/home/jens/Source/shotwell/src/Commands.vala"
		_view_it = _tmp2_;
#line 1218 "/home/jens/Source/shotwell/src/Commands.vala"
		while (TRUE) {
#line 10613 "Commands.c"
			GeeIterator* _tmp3_;
			gboolean _tmp4_;
			DataView* view = NULL;
			GeeIterator* _tmp5_;
			gpointer _tmp6_;
			DataSource* source = NULL;
			DataView* _tmp7_;
			DataSource* _tmp8_;
			GeeHashMap* _tmp9_;
			DataSource* _tmp10_;
			DataSource* _tmp11_;
			Rating _tmp12_;
#line 1218 "/home/jens/Source/shotwell/src/Commands.vala"
			_tmp3_ = _view_it;
#line 1218 "/home/jens/Source/shotwell/src/Commands.vala"
			_tmp4_ = gee_iterator_next (_tmp3_);
#line 1218 "/home/jens/Source/shotwell/src/Commands.vala"
			if (!_tmp4_) {
#line 1218 "/home/jens/Source/shotwell/src/Commands.vala"
				break;
#line 10634 "Commands.c"
			}
#line 1218 "/home/jens/Source/shotwell/src/Commands.vala"
			_tmp5_ = _view_it;
#line 1218 "/home/jens/Source/shotwell/src/Commands.vala"
			_tmp6_ = gee_iterator_get (_tmp5_);
#line 1218 "/home/jens/Source/shotwell/src/Commands.vala"
			view = (DataView*) _tmp6_;
#line 1219 "/home/jens/Source/shotwell/src/Commands.vala"
			_tmp7_ = view;
#line 1219 "/home/jens/Source/shotwell/src/Commands.vala"
			_tmp8_ = data_view_get_source (_tmp7_);
#line 1219 "/home/jens/Source/shotwell/src/Commands.vala"
			source = _tmp8_;
#line 1220 "/home/jens/Source/shotwell/src/Commands.vala"
			_tmp9_ = self->priv->last_rating_map;
#line 1220 "/home/jens/Source/shotwell/src/Commands.vala"
			_tmp10_ = source;
#line 1220 "/home/jens/Source/shotwell/src/Commands.vala"
			_tmp11_ = source;
#line 1220 "/home/jens/Source/shotwell/src/Commands.vala"
			_tmp12_ = media_source_get_rating (G_TYPE_CHECK_INSTANCE_CAST (_tmp11_, TYPE_MEDIA_SOURCE, MediaSource));
#line 1220 "/home/jens/Source/shotwell/src/Commands.vala"
			gee_abstract_map_set (G_TYPE_CHECK_INSTANCE_CAST (_tmp9_, GEE_TYPE_ABSTRACT_MAP, GeeAbstractMap), _tmp10_, (gpointer) ((gintptr) _tmp12_));
#line 1218 "/home/jens/Source/shotwell/src/Commands.vala"
			_g_object_unref0 (source);
#line 1218 "/home/jens/Source/shotwell/src/Commands.vala"
			_g_object_unref0 (view);
#line 10662 "Commands.c"
		}
#line 1218 "/home/jens/Source/shotwell/src/Commands.vala"
		_g_object_unref0 (_view_it);
#line 10666 "Commands.c"
	}
}


static void set_rating_command_real_execute (Command* base) {
	SetRatingCommand * self;
#line 1224 "/home/jens/Source/shotwell/src/Commands.vala"
	self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_SET_RATING_COMMAND, SetRatingCommand);
#line 1225 "/home/jens/Source/shotwell/src/Commands.vala"
	self->priv->action_count = 0;
#line 1226 "/home/jens/Source/shotwell/src/Commands.vala"
	COMMAND_CLASS (set_rating_command_parent_class)->execute (G_TYPE_CHECK_INSTANCE_CAST (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_MULTIPLE_DATA_SOURCE_COMMAND, MultipleDataSourceCommand), TYPE_COMMAND, Command));
#line 10679 "Commands.c"
}


static void set_rating_command_real_undo (Command* base) {
	SetRatingCommand * self;
#line 1229 "/home/jens/Source/shotwell/src/Commands.vala"
	self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_SET_RATING_COMMAND, SetRatingCommand);
#line 1230 "/home/jens/Source/shotwell/src/Commands.vala"
	self->priv->action_count = 0;
#line 1231 "/home/jens/Source/shotwell/src/Commands.vala"
	COMMAND_CLASS (set_rating_command_parent_class)->undo (G_TYPE_CHECK_INSTANCE_CAST (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_MULTIPLE_DATA_SOURCE_COMMAND, MultipleDataSourceCommand), TYPE_COMMAND, Command));
#line 10691 "Commands.c"
}


static void set_rating_command_real_execute_on_source (MultipleDataSourceCommand* base, DataSource* source) {
	SetRatingCommand * self;
	gboolean _tmp0_;
#line 1234 "/home/jens/Source/shotwell/src/Commands.vala"
	self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_SET_RATING_COMMAND, SetRatingCommand);
#line 1234 "/home/jens/Source/shotwell/src/Commands.vala"
	g_return_if_fail (IS_DATA_SOURCE (source));
#line 1235 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp0_ = self->priv->set_direct;
#line 1235 "/home/jens/Source/shotwell/src/Commands.vala"
	if (_tmp0_) {
#line 10706 "Commands.c"
		DataSource* _tmp1_;
		Rating _tmp2_;
#line 1236 "/home/jens/Source/shotwell/src/Commands.vala"
		_tmp1_ = source;
#line 1236 "/home/jens/Source/shotwell/src/Commands.vala"
		_tmp2_ = self->priv->new_rating;
#line 1236 "/home/jens/Source/shotwell/src/Commands.vala"
		media_source_set_rating (G_TYPE_CHECK_INSTANCE_CAST (_tmp1_, TYPE_MEDIA_SOURCE, MediaSource), _tmp2_);
#line 10715 "Commands.c"
	} else {
		gboolean _tmp3_;
#line 1238 "/home/jens/Source/shotwell/src/Commands.vala"
		_tmp3_ = self->priv->incrementing;
#line 1238 "/home/jens/Source/shotwell/src/Commands.vala"
		if (_tmp3_) {
#line 10722 "Commands.c"
			DataSource* _tmp4_;
#line 1239 "/home/jens/Source/shotwell/src/Commands.vala"
			_tmp4_ = source;
#line 1239 "/home/jens/Source/shotwell/src/Commands.vala"
			media_source_increase_rating (G_TYPE_CHECK_INSTANCE_CAST (_tmp4_, TYPE_MEDIA_SOURCE, MediaSource));
#line 10728 "Commands.c"
		} else {
			DataSource* _tmp5_;
#line 1241 "/home/jens/Source/shotwell/src/Commands.vala"
			_tmp5_ = source;
#line 1241 "/home/jens/Source/shotwell/src/Commands.vala"
			media_source_decrease_rating (G_TYPE_CHECK_INSTANCE_CAST (_tmp5_, TYPE_MEDIA_SOURCE, MediaSource));
#line 10735 "Commands.c"
		}
	}
}


static void set_rating_command_real_undo_on_source (MultipleDataSourceCommand* base, DataSource* source) {
	SetRatingCommand * self;
	DataSource* _tmp0_;
	GeeHashMap* _tmp1_;
	DataSource* _tmp2_;
	gpointer _tmp3_;
#line 1245 "/home/jens/Source/shotwell/src/Commands.vala"
	self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_SET_RATING_COMMAND, SetRatingCommand);
#line 1245 "/home/jens/Source/shotwell/src/Commands.vala"
	g_return_if_fail (IS_DATA_SOURCE (source));
#line 1246 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp0_ = source;
#line 1246 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp1_ = self->priv->last_rating_map;
#line 1246 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp2_ = source;
#line 1246 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp3_ = gee_abstract_map_get (G_TYPE_CHECK_INSTANCE_CAST (_tmp1_, GEE_TYPE_ABSTRACT_MAP, GeeAbstractMap), _tmp2_);
#line 1246 "/home/jens/Source/shotwell/src/Commands.vala"
	media_source_set_rating (G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, TYPE_MEDIA_SOURCE, MediaSource), (Rating) ((gintptr) _tmp3_));
#line 10761 "Commands.c"
}


static void set_rating_command_class_init (SetRatingCommandClass * klass) {
#line 1187 "/home/jens/Source/shotwell/src/Commands.vala"
	set_rating_command_parent_class = g_type_class_peek_parent (klass);
#line 1187 "/home/jens/Source/shotwell/src/Commands.vala"
	g_type_class_add_private (klass, sizeof (SetRatingCommandPrivate));
#line 1187 "/home/jens/Source/shotwell/src/Commands.vala"
	((CommandClass *) klass)->execute = (void (*) (Command *)) set_rating_command_real_execute;
#line 1187 "/home/jens/Source/shotwell/src/Commands.vala"
	((CommandClass *) klass)->undo = (void (*) (Command *)) set_rating_command_real_undo;
#line 1187 "/home/jens/Source/shotwell/src/Commands.vala"
	((MultipleDataSourceCommandClass *) klass)->execute_on_source = (void (*) (MultipleDataSourceCommand *, DataSource*)) set_rating_command_real_execute_on_source;
#line 1187 "/home/jens/Source/shotwell/src/Commands.vala"
	((MultipleDataSourceCommandClass *) klass)->undo_on_source = (void (*) (MultipleDataSourceCommand *, DataSource*)) set_rating_command_real_undo_on_source;
#line 1187 "/home/jens/Source/shotwell/src/Commands.vala"
	G_OBJECT_CLASS (klass)->finalize = set_rating_command_finalize;
#line 10780 "Commands.c"
}


static void set_rating_command_instance_init (SetRatingCommand * self) {
#line 1187 "/home/jens/Source/shotwell/src/Commands.vala"
	self->priv = SET_RATING_COMMAND_GET_PRIVATE (self);
#line 1192 "/home/jens/Source/shotwell/src/Commands.vala"
	self->priv->action_count = 0;
#line 10789 "Commands.c"
}


static void set_rating_command_finalize (GObject * obj) {
	SetRatingCommand * self;
#line 1187 "/home/jens/Source/shotwell/src/Commands.vala"
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, TYPE_SET_RATING_COMMAND, SetRatingCommand);
#line 1188 "/home/jens/Source/shotwell/src/Commands.vala"
	_g_object_unref0 (self->priv->last_rating_map);
#line 1187 "/home/jens/Source/shotwell/src/Commands.vala"
	G_OBJECT_CLASS (set_rating_command_parent_class)->finalize (obj);
#line 10801 "Commands.c"
}


GType set_rating_command_get_type (void) {
	static volatile gsize set_rating_command_type_id__volatile = 0;
	if (g_once_init_enter (&set_rating_command_type_id__volatile)) {
		static const GTypeInfo g_define_type_info = { sizeof (SetRatingCommandClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) set_rating_command_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (SetRatingCommand), 0, (GInstanceInitFunc) set_rating_command_instance_init, NULL };
		GType set_rating_command_type_id;
		set_rating_command_type_id = g_type_register_static (TYPE_MULTIPLE_DATA_SOURCE_COMMAND, "SetRatingCommand", &g_define_type_info, 0);
		g_once_init_leave (&set_rating_command_type_id__volatile, set_rating_command_type_id);
	}
	return set_rating_command_type_id__volatile;
}


SetRawDeveloperCommand* set_raw_developer_command_construct (GType object_type, GeeIterable* iter, RawDeveloper developer) {
	SetRawDeveloperCommand * self = NULL;
	GeeIterable* _tmp0_;
	RawDeveloper _tmp1_;
	GeeIterable* _tmp2_;
#line 1255 "/home/jens/Source/shotwell/src/Commands.vala"
	g_return_val_if_fail (GEE_IS_ITERABLE (iter), NULL);
#line 1256 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp0_ = iter;
#line 1256 "/home/jens/Source/shotwell/src/Commands.vala"
	self = (SetRawDeveloperCommand*) multiple_data_source_command_construct (object_type, _tmp0_, _ ("Setting RAW developer"), _ ("Restoring previous RAW developer"), _ ("Set Developer"), "");
#line 1258 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp1_ = developer;
#line 1258 "/home/jens/Source/shotwell/src/Commands.vala"
	self->priv->new_developer = _tmp1_;
#line 1259 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp2_ = iter;
#line 1259 "/home/jens/Source/shotwell/src/Commands.vala"
	set_raw_developer_command_save_source_states (self, _tmp2_);
#line 1255 "/home/jens/Source/shotwell/src/Commands.vala"
	return self;
#line 10838 "Commands.c"
}


SetRawDeveloperCommand* set_raw_developer_command_new (GeeIterable* iter, RawDeveloper developer) {
#line 1255 "/home/jens/Source/shotwell/src/Commands.vala"
	return set_raw_developer_command_construct (TYPE_SET_RAW_DEVELOPER_COMMAND, iter, developer);
#line 10845 "Commands.c"
}


static void set_raw_developer_command_save_source_states (SetRawDeveloperCommand* self, GeeIterable* iter) {
	GeeHashMap* _tmp0_;
	GeeHashMap* _tmp1_;
#line 1262 "/home/jens/Source/shotwell/src/Commands.vala"
	g_return_if_fail (IS_SET_RAW_DEVELOPER_COMMAND (self));
#line 1262 "/home/jens/Source/shotwell/src/Commands.vala"
	g_return_if_fail (GEE_IS_ITERABLE (iter));
#line 1263 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp0_ = gee_hash_map_new (TYPE_PHOTO, (GBoxedCopyFunc) g_object_ref, (GDestroyNotify) g_object_unref, TYPE_RAW_DEVELOPER, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
#line 1263 "/home/jens/Source/shotwell/src/Commands.vala"
	_g_object_unref0 (self->priv->last_developer_map);
#line 1263 "/home/jens/Source/shotwell/src/Commands.vala"
	self->priv->last_developer_map = _tmp0_;
#line 1264 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp1_ = gee_hash_map_new (TYPE_PHOTO, (GBoxedCopyFunc) g_object_ref, (GDestroyNotify) g_object_unref, TYPE_PHOTO_TRANSFORMATION_STATE, (GBoxedCopyFunc) g_object_ref, (GDestroyNotify) g_object_unref, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
#line 1264 "/home/jens/Source/shotwell/src/Commands.vala"
	_g_object_unref0 (self->priv->last_transformation_map);
#line 1264 "/home/jens/Source/shotwell/src/Commands.vala"
	self->priv->last_transformation_map = _tmp1_;
#line 10868 "Commands.c"
	{
		GeeIterator* _view_it = NULL;
		GeeIterable* _tmp2_;
		GeeIterator* _tmp3_;
#line 1266 "/home/jens/Source/shotwell/src/Commands.vala"
		_tmp2_ = iter;
#line 1266 "/home/jens/Source/shotwell/src/Commands.vala"
		_tmp3_ = gee_iterable_iterator (_tmp2_);
#line 1266 "/home/jens/Source/shotwell/src/Commands.vala"
		_view_it = _tmp3_;
#line 1266 "/home/jens/Source/shotwell/src/Commands.vala"
		while (TRUE) {
#line 10881 "Commands.c"
			GeeIterator* _tmp4_;
			gboolean _tmp5_;
			DataView* view = NULL;
			GeeIterator* _tmp6_;
			gpointer _tmp7_;
			Photo* photo = NULL;
			DataView* _tmp8_;
			DataSource* _tmp9_;
			Photo* _tmp10_;
			Photo* _tmp11_;
			gboolean _tmp12_;
#line 1266 "/home/jens/Source/shotwell/src/Commands.vala"
			_tmp4_ = _view_it;
#line 1266 "/home/jens/Source/shotwell/src/Commands.vala"
			_tmp5_ = gee_iterator_next (_tmp4_);
#line 1266 "/home/jens/Source/shotwell/src/Commands.vala"
			if (!_tmp5_) {
#line 1266 "/home/jens/Source/shotwell/src/Commands.vala"
				break;
#line 10901 "Commands.c"
			}
#line 1266 "/home/jens/Source/shotwell/src/Commands.vala"
			_tmp6_ = _view_it;
#line 1266 "/home/jens/Source/shotwell/src/Commands.vala"
			_tmp7_ = gee_iterator_get (_tmp6_);
#line 1266 "/home/jens/Source/shotwell/src/Commands.vala"
			view = (DataView*) _tmp7_;
#line 1267 "/home/jens/Source/shotwell/src/Commands.vala"
			_tmp8_ = view;
#line 1267 "/home/jens/Source/shotwell/src/Commands.vala"
			_tmp9_ = data_view_get_source (_tmp8_);
#line 1267 "/home/jens/Source/shotwell/src/Commands.vala"
			_tmp10_ = G_TYPE_CHECK_INSTANCE_TYPE (_tmp9_, TYPE_PHOTO) ? ((Photo*) _tmp9_) : NULL;
#line 1267 "/home/jens/Source/shotwell/src/Commands.vala"
			if (_tmp10_ == NULL) {
#line 1267 "/home/jens/Source/shotwell/src/Commands.vala"
				_g_object_unref0 (_tmp9_);
#line 10919 "Commands.c"
			}
#line 1267 "/home/jens/Source/shotwell/src/Commands.vala"
			photo = _tmp10_;
#line 1268 "/home/jens/Source/shotwell/src/Commands.vala"
			_tmp11_ = photo;
#line 1268 "/home/jens/Source/shotwell/src/Commands.vala"
			_tmp12_ = set_raw_developer_command_is_raw_photo (self, _tmp11_);
#line 1268 "/home/jens/Source/shotwell/src/Commands.vala"
			if (_tmp12_) {
#line 10929 "Commands.c"
				GeeHashMap* _tmp13_;
				Photo* _tmp14_;
				Photo* _tmp15_;
				RawDeveloper _tmp16_;
				GeeHashMap* _tmp17_;
				Photo* _tmp18_;
				Photo* _tmp19_;
				PhotoTransformationState* _tmp20_;
				PhotoTransformationState* _tmp21_;
#line 1269 "/home/jens/Source/shotwell/src/Commands.vala"
				_tmp13_ = self->priv->last_developer_map;
#line 1269 "/home/jens/Source/shotwell/src/Commands.vala"
				_tmp14_ = photo;
#line 1269 "/home/jens/Source/shotwell/src/Commands.vala"
				_tmp15_ = photo;
#line 1269 "/home/jens/Source/shotwell/src/Commands.vala"
				_tmp16_ = photo_get_raw_developer (_tmp15_);
#line 1269 "/home/jens/Source/shotwell/src/Commands.vala"
				gee_abstract_map_set (G_TYPE_CHECK_INSTANCE_CAST (_tmp13_, GEE_TYPE_ABSTRACT_MAP, GeeAbstractMap), _tmp14_, (gpointer) ((gintptr) _tmp16_));
#line 1270 "/home/jens/Source/shotwell/src/Commands.vala"
				_tmp17_ = self->priv->last_transformation_map;
#line 1270 "/home/jens/Source/shotwell/src/Commands.vala"
				_tmp18_ = photo;
#line 1270 "/home/jens/Source/shotwell/src/Commands.vala"
				_tmp19_ = photo;
#line 1270 "/home/jens/Source/shotwell/src/Commands.vala"
				_tmp20_ = photo_save_transformation_state (_tmp19_);
#line 1270 "/home/jens/Source/shotwell/src/Commands.vala"
				_tmp21_ = _tmp20_;
#line 1270 "/home/jens/Source/shotwell/src/Commands.vala"
				gee_abstract_map_set (G_TYPE_CHECK_INSTANCE_CAST (_tmp17_, GEE_TYPE_ABSTRACT_MAP, GeeAbstractMap), _tmp18_, _tmp21_);
#line 1270 "/home/jens/Source/shotwell/src/Commands.vala"
				_g_object_unref0 (_tmp21_);
#line 10963 "Commands.c"
			}
#line 1266 "/home/jens/Source/shotwell/src/Commands.vala"
			_g_object_unref0 (photo);
#line 1266 "/home/jens/Source/shotwell/src/Commands.vala"
			_g_object_unref0 (view);
#line 10969 "Commands.c"
		}
#line 1266 "/home/jens/Source/shotwell/src/Commands.vala"
		_g_object_unref0 (_view_it);
#line 10973 "Commands.c"
	}
}


static void set_raw_developer_command_real_execute (Command* base) {
	SetRawDeveloperCommand * self;
#line 1275 "/home/jens/Source/shotwell/src/Commands.vala"
	self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_SET_RAW_DEVELOPER_COMMAND, SetRawDeveloperCommand);
#line 1276 "/home/jens/Source/shotwell/src/Commands.vala"
	COMMAND_CLASS (set_raw_developer_command_parent_class)->execute (G_TYPE_CHECK_INSTANCE_CAST (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_MULTIPLE_DATA_SOURCE_COMMAND, MultipleDataSourceCommand), TYPE_COMMAND, Command));
#line 10984 "Commands.c"
}


static void set_raw_developer_command_real_undo (Command* base) {
	SetRawDeveloperCommand * self;
#line 1279 "/home/jens/Source/shotwell/src/Commands.vala"
	self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_SET_RAW_DEVELOPER_COMMAND, SetRawDeveloperCommand);
#line 1280 "/home/jens/Source/shotwell/src/Commands.vala"
	COMMAND_CLASS (set_raw_developer_command_parent_class)->undo (G_TYPE_CHECK_INSTANCE_CAST (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_MULTIPLE_DATA_SOURCE_COMMAND, MultipleDataSourceCommand), TYPE_COMMAND, Command));
#line 10994 "Commands.c"
}


static void set_raw_developer_command_real_execute_on_source (MultipleDataSourceCommand* base, DataSource* source) {
	SetRawDeveloperCommand * self;
	Photo* photo = NULL;
	DataSource* _tmp0_;
	Photo* _tmp1_;
	Photo* _tmp2_;
	gboolean _tmp3_;
#line 1283 "/home/jens/Source/shotwell/src/Commands.vala"
	self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_SET_RAW_DEVELOPER_COMMAND, SetRawDeveloperCommand);
#line 1283 "/home/jens/Source/shotwell/src/Commands.vala"
	g_return_if_fail (IS_DATA_SOURCE (source));
#line 1284 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp0_ = source;
#line 1284 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp1_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_TYPE (_tmp0_, TYPE_PHOTO) ? ((Photo*) _tmp0_) : NULL);
#line 1284 "/home/jens/Source/shotwell/src/Commands.vala"
	photo = _tmp1_;
#line 1285 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp2_ = photo;
#line 1285 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp3_ = set_raw_developer_command_is_raw_photo (self, _tmp2_);
#line 1285 "/home/jens/Source/shotwell/src/Commands.vala"
	if (_tmp3_) {
#line 11021 "Commands.c"
		gboolean _tmp4_ = FALSE;
		RawDeveloper _tmp5_;
#line 1286 "/home/jens/Source/shotwell/src/Commands.vala"
		_tmp5_ = self->priv->new_developer;
#line 1286 "/home/jens/Source/shotwell/src/Commands.vala"
		if (_tmp5_ == RAW_DEVELOPER_CAMERA) {
#line 11028 "Commands.c"
			Photo* _tmp6_;
			gboolean _tmp7_;
#line 1286 "/home/jens/Source/shotwell/src/Commands.vala"
			_tmp6_ = photo;
#line 1286 "/home/jens/Source/shotwell/src/Commands.vala"
			_tmp7_ = photo_is_raw_developer_available (_tmp6_, RAW_DEVELOPER_CAMERA);
#line 1286 "/home/jens/Source/shotwell/src/Commands.vala"
			_tmp4_ = !_tmp7_;
#line 11037 "Commands.c"
		} else {
#line 1286 "/home/jens/Source/shotwell/src/Commands.vala"
			_tmp4_ = FALSE;
#line 11041 "Commands.c"
		}
#line 1286 "/home/jens/Source/shotwell/src/Commands.vala"
		if (_tmp4_) {
#line 11045 "Commands.c"
			Photo* _tmp8_;
#line 1287 "/home/jens/Source/shotwell/src/Commands.vala"
			_tmp8_ = photo;
#line 1287 "/home/jens/Source/shotwell/src/Commands.vala"
			photo_set_raw_developer (_tmp8_, RAW_DEVELOPER_EMBEDDED);
#line 11051 "Commands.c"
		} else {
			Photo* _tmp9_;
			RawDeveloper _tmp10_;
#line 1289 "/home/jens/Source/shotwell/src/Commands.vala"
			_tmp9_ = photo;
#line 1289 "/home/jens/Source/shotwell/src/Commands.vala"
			_tmp10_ = self->priv->new_developer;
#line 1289 "/home/jens/Source/shotwell/src/Commands.vala"
			photo_set_raw_developer (_tmp9_, _tmp10_);
#line 11061 "Commands.c"
		}
	}
#line 1283 "/home/jens/Source/shotwell/src/Commands.vala"
	_g_object_unref0 (photo);
#line 11066 "Commands.c"
}


static void set_raw_developer_command_real_undo_on_source (MultipleDataSourceCommand* base, DataSource* source) {
	SetRawDeveloperCommand * self;
	Photo* photo = NULL;
	DataSource* _tmp0_;
	Photo* _tmp1_;
	Photo* _tmp2_;
	gboolean _tmp3_;
#line 1293 "/home/jens/Source/shotwell/src/Commands.vala"
	self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_SET_RAW_DEVELOPER_COMMAND, SetRawDeveloperCommand);
#line 1293 "/home/jens/Source/shotwell/src/Commands.vala"
	g_return_if_fail (IS_DATA_SOURCE (source));
#line 1294 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp0_ = source;
#line 1294 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp1_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_TYPE (_tmp0_, TYPE_PHOTO) ? ((Photo*) _tmp0_) : NULL);
#line 1294 "/home/jens/Source/shotwell/src/Commands.vala"
	photo = _tmp1_;
#line 1295 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp2_ = photo;
#line 1295 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp3_ = set_raw_developer_command_is_raw_photo (self, _tmp2_);
#line 1295 "/home/jens/Source/shotwell/src/Commands.vala"
	if (_tmp3_) {
#line 11093 "Commands.c"
		Photo* _tmp4_;
		GeeHashMap* _tmp5_;
		Photo* _tmp6_;
		gpointer _tmp7_;
		Photo* _tmp8_;
		GeeHashMap* _tmp9_;
		Photo* _tmp10_;
		gpointer _tmp11_;
		PhotoTransformationState* _tmp12_;
#line 1296 "/home/jens/Source/shotwell/src/Commands.vala"
		_tmp4_ = photo;
#line 1296 "/home/jens/Source/shotwell/src/Commands.vala"
		_tmp5_ = self->priv->last_developer_map;
#line 1296 "/home/jens/Source/shotwell/src/Commands.vala"
		_tmp6_ = photo;
#line 1296 "/home/jens/Source/shotwell/src/Commands.vala"
		_tmp7_ = gee_abstract_map_get (G_TYPE_CHECK_INSTANCE_CAST (_tmp5_, GEE_TYPE_ABSTRACT_MAP, GeeAbstractMap), _tmp6_);
#line 1296 "/home/jens/Source/shotwell/src/Commands.vala"
		photo_set_raw_developer (_tmp4_, (RawDeveloper) ((gintptr) _tmp7_));
#line 1297 "/home/jens/Source/shotwell/src/Commands.vala"
		_tmp8_ = photo;
#line 1297 "/home/jens/Source/shotwell/src/Commands.vala"
		_tmp9_ = self->priv->last_transformation_map;
#line 1297 "/home/jens/Source/shotwell/src/Commands.vala"
		_tmp10_ = photo;
#line 1297 "/home/jens/Source/shotwell/src/Commands.vala"
		_tmp11_ = gee_abstract_map_get (G_TYPE_CHECK_INSTANCE_CAST (_tmp9_, GEE_TYPE_ABSTRACT_MAP, GeeAbstractMap), _tmp10_);
#line 1297 "/home/jens/Source/shotwell/src/Commands.vala"
		_tmp12_ = (PhotoTransformationState*) _tmp11_;
#line 1297 "/home/jens/Source/shotwell/src/Commands.vala"
		photo_load_transformation_state (_tmp8_, _tmp12_);
#line 1297 "/home/jens/Source/shotwell/src/Commands.vala"
		_g_object_unref0 (_tmp12_);
#line 11127 "Commands.c"
	}
#line 1293 "/home/jens/Source/shotwell/src/Commands.vala"
	_g_object_unref0 (photo);
#line 11131 "Commands.c"
}


static gboolean set_raw_developer_command_is_raw_photo (SetRawDeveloperCommand* self, Photo* photo) {
	gboolean result = FALSE;
	gboolean _tmp0_ = FALSE;
	Photo* _tmp1_;
#line 1301 "/home/jens/Source/shotwell/src/Commands.vala"
	g_return_val_if_fail (IS_SET_RAW_DEVELOPER_COMMAND (self), FALSE);
#line 1301 "/home/jens/Source/shotwell/src/Commands.vala"
	g_return_val_if_fail ((photo == NULL) || IS_PHOTO (photo), FALSE);
#line 1302 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp1_ = photo;
#line 1302 "/home/jens/Source/shotwell/src/Commands.vala"
	if (_tmp1_ != NULL) {
#line 11147 "Commands.c"
		Photo* _tmp2_;
		PhotoFileFormat _tmp3_;
#line 1302 "/home/jens/Source/shotwell/src/Commands.vala"
		_tmp2_ = photo;
#line 1302 "/home/jens/Source/shotwell/src/Commands.vala"
		_tmp3_ = photo_get_master_file_format (_tmp2_);
#line 1302 "/home/jens/Source/shotwell/src/Commands.vala"
		_tmp0_ = _tmp3_ == PHOTO_FILE_FORMAT_RAW;
#line 11156 "Commands.c"
	} else {
#line 1302 "/home/jens/Source/shotwell/src/Commands.vala"
		_tmp0_ = FALSE;
#line 11160 "Commands.c"
	}
#line 1302 "/home/jens/Source/shotwell/src/Commands.vala"
	result = _tmp0_;
#line 1302 "/home/jens/Source/shotwell/src/Commands.vala"
	return result;
#line 11166 "Commands.c"
}


static void set_raw_developer_command_class_init (SetRawDeveloperCommandClass * klass) {
#line 1250 "/home/jens/Source/shotwell/src/Commands.vala"
	set_raw_developer_command_parent_class = g_type_class_peek_parent (klass);
#line 1250 "/home/jens/Source/shotwell/src/Commands.vala"
	g_type_class_add_private (klass, sizeof (SetRawDeveloperCommandPrivate));
#line 1250 "/home/jens/Source/shotwell/src/Commands.vala"
	((CommandClass *) klass)->execute = (void (*) (Command *)) set_raw_developer_command_real_execute;
#line 1250 "/home/jens/Source/shotwell/src/Commands.vala"
	((CommandClass *) klass)->undo = (void (*) (Command *)) set_raw_developer_command_real_undo;
#line 1250 "/home/jens/Source/shotwell/src/Commands.vala"
	((MultipleDataSourceCommandClass *) klass)->execute_on_source = (void (*) (MultipleDataSourceCommand *, DataSource*)) set_raw_developer_command_real_execute_on_source;
#line 1250 "/home/jens/Source/shotwell/src/Commands.vala"
	((MultipleDataSourceCommandClass *) klass)->undo_on_source = (void (*) (MultipleDataSourceCommand *, DataSource*)) set_raw_developer_command_real_undo_on_source;
#line 1250 "/home/jens/Source/shotwell/src/Commands.vala"
	G_OBJECT_CLASS (klass)->finalize = set_raw_developer_command_finalize;
#line 11185 "Commands.c"
}


static void set_raw_developer_command_instance_init (SetRawDeveloperCommand * self) {
#line 1250 "/home/jens/Source/shotwell/src/Commands.vala"
	self->priv = SET_RAW_DEVELOPER_COMMAND_GET_PRIVATE (self);
#line 11192 "Commands.c"
}


static void set_raw_developer_command_finalize (GObject * obj) {
	SetRawDeveloperCommand * self;
#line 1250 "/home/jens/Source/shotwell/src/Commands.vala"
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, TYPE_SET_RAW_DEVELOPER_COMMAND, SetRawDeveloperCommand);
#line 1251 "/home/jens/Source/shotwell/src/Commands.vala"
	_g_object_unref0 (self->priv->last_developer_map);
#line 1252 "/home/jens/Source/shotwell/src/Commands.vala"
	_g_object_unref0 (self->priv->last_transformation_map);
#line 1250 "/home/jens/Source/shotwell/src/Commands.vala"
	G_OBJECT_CLASS (set_raw_developer_command_parent_class)->finalize (obj);
#line 11206 "Commands.c"
}


GType set_raw_developer_command_get_type (void) {
	static volatile gsize set_raw_developer_command_type_id__volatile = 0;
	if (g_once_init_enter (&set_raw_developer_command_type_id__volatile)) {
		static const GTypeInfo g_define_type_info = { sizeof (SetRawDeveloperCommandClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) set_raw_developer_command_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (SetRawDeveloperCommand), 0, (GInstanceInitFunc) set_raw_developer_command_instance_init, NULL };
		GType set_raw_developer_command_type_id;
		set_raw_developer_command_type_id = g_type_register_static (TYPE_MULTIPLE_DATA_SOURCE_COMMAND, "SetRawDeveloperCommand", &g_define_type_info, 0);
		g_once_init_leave (&set_raw_developer_command_type_id__volatile, set_raw_developer_command_type_id);
	}
	return set_raw_developer_command_type_id__volatile;
}


AdjustDateTimePhotoCommand* adjust_date_time_photo_command_construct (GType object_type, Dateable* dateable, gint64 time_shift, gboolean modify_original) {
	AdjustDateTimePhotoCommand * self = NULL;
	Dateable* _tmp0_;
	Dateable* _tmp1_;
	Dateable* _tmp2_;
	gint64 _tmp3_;
	gboolean _tmp4_;
#line 1312 "/home/jens/Source/shotwell/src/Commands.vala"
	g_return_val_if_fail (IS_DATEABLE (dateable), NULL);
#line 1313 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp0_ = dateable;
#line 1313 "/home/jens/Source/shotwell/src/Commands.vala"
	self = (AdjustDateTimePhotoCommand*) single_data_source_command_construct (object_type, G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, TYPE_DATA_SOURCE, DataSource), RESOURCES_ADJUST_DATE_TIME_LABEL, "");
#line 1315 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp1_ = dateable;
#line 1315 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp2_ = _g_object_ref0 (_tmp1_);
#line 1315 "/home/jens/Source/shotwell/src/Commands.vala"
	_g_object_unref0 (self->priv->dateable);
#line 1315 "/home/jens/Source/shotwell/src/Commands.vala"
	self->priv->dateable = _tmp2_;
#line 1316 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp3_ = time_shift;
#line 1316 "/home/jens/Source/shotwell/src/Commands.vala"
	self->priv->time_shift = _tmp3_;
#line 1317 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp4_ = modify_original;
#line 1317 "/home/jens/Source/shotwell/src/Commands.vala"
	self->priv->modify_original = _tmp4_;
#line 1312 "/home/jens/Source/shotwell/src/Commands.vala"
	return self;
#line 11253 "Commands.c"
}


AdjustDateTimePhotoCommand* adjust_date_time_photo_command_new (Dateable* dateable, gint64 time_shift, gboolean modify_original) {
#line 1312 "/home/jens/Source/shotwell/src/Commands.vala"
	return adjust_date_time_photo_command_construct (TYPE_ADJUST_DATE_TIME_PHOTO_COMMAND, dateable, time_shift, modify_original);
#line 11260 "Commands.c"
}


static void adjust_date_time_photo_command_real_execute (Command* base) {
	AdjustDateTimePhotoCommand * self;
	Dateable* _tmp0_;
	Dateable* _tmp1_;
	time_t _tmp2_;
	gint64 _tmp3_;
	Dateable* _tmp4_;
	Event* _tmp5_;
	ViewCollection* all_events = NULL;
	ViewCollection* _tmp6_;
	Dateable* _tmp23_;
	ViewCollection* _tmp24_;
#line 1320 "/home/jens/Source/shotwell/src/Commands.vala"
	self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_ADJUST_DATE_TIME_PHOTO_COMMAND, AdjustDateTimePhotoCommand);
#line 1321 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp0_ = self->priv->dateable;
#line 1321 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp1_ = self->priv->dateable;
#line 1321 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp2_ = dateable_get_exposure_time (_tmp1_);
#line 1321 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp3_ = self->priv->time_shift;
#line 1321 "/home/jens/Source/shotwell/src/Commands.vala"
	adjust_date_time_photo_command_set_time (self, _tmp0_, _tmp2_ + ((time_t) _tmp3_));
#line 1323 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp4_ = self->priv->dateable;
#line 1323 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp5_ = media_source_get_event (G_TYPE_CHECK_INSTANCE_CAST (_tmp4_, TYPE_MEDIA_SOURCE, MediaSource));
#line 1323 "/home/jens/Source/shotwell/src/Commands.vala"
	_g_object_unref0 (self->priv->prev_event);
#line 1323 "/home/jens/Source/shotwell/src/Commands.vala"
	self->priv->prev_event = _tmp5_;
#line 1325 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp6_ = view_collection_new ("tmp");
#line 1325 "/home/jens/Source/shotwell/src/Commands.vala"
	all_events = _tmp6_;
#line 11300 "Commands.c"
	{
		GeeIterator* _dobj_it = NULL;
		EventSourceCollection* _tmp7_;
		GeeCollection* _tmp8_;
		GeeCollection* _tmp9_;
		GeeIterator* _tmp10_;
		GeeIterator* _tmp11_;
#line 1327 "/home/jens/Source/shotwell/src/Commands.vala"
		_tmp7_ = event_global;
#line 1327 "/home/jens/Source/shotwell/src/Commands.vala"
		_tmp8_ = data_collection_get_all (G_TYPE_CHECK_INSTANCE_CAST (_tmp7_, TYPE_DATA_COLLECTION, DataCollection));
#line 1327 "/home/jens/Source/shotwell/src/Commands.vala"
		_tmp9_ = _tmp8_;
#line 1327 "/home/jens/Source/shotwell/src/Commands.vala"
		_tmp10_ = gee_iterable_iterator (G_TYPE_CHECK_INSTANCE_CAST (_tmp9_, GEE_TYPE_ITERABLE, GeeIterable));
#line 1327 "/home/jens/Source/shotwell/src/Commands.vala"
		_tmp11_ = _tmp10_;
#line 1327 "/home/jens/Source/shotwell/src/Commands.vala"
		_g_object_unref0 (_tmp9_);
#line 1327 "/home/jens/Source/shotwell/src/Commands.vala"
		_dobj_it = _tmp11_;
#line 1327 "/home/jens/Source/shotwell/src/Commands.vala"
		while (TRUE) {
#line 11324 "Commands.c"
			GeeIterator* _tmp12_;
			gboolean _tmp13_;
			DataObject* dobj = NULL;
			GeeIterator* _tmp14_;
			gpointer _tmp15_;
			Event* event = NULL;
			DataObject* _tmp16_;
			Event* _tmp17_;
			Event* _tmp18_;
#line 1327 "/home/jens/Source/shotwell/src/Commands.vala"
			_tmp12_ = _dobj_it;
#line 1327 "/home/jens/Source/shotwell/src/Commands.vala"
			_tmp13_ = gee_iterator_next (_tmp12_);
#line 1327 "/home/jens/Source/shotwell/src/Commands.vala"
			if (!_tmp13_) {
#line 1327 "/home/jens/Source/shotwell/src/Commands.vala"
				break;
#line 11342 "Commands.c"
			}
#line 1327 "/home/jens/Source/shotwell/src/Commands.vala"
			_tmp14_ = _dobj_it;
#line 1327 "/home/jens/Source/shotwell/src/Commands.vala"
			_tmp15_ = gee_iterator_get (_tmp14_);
#line 1327 "/home/jens/Source/shotwell/src/Commands.vala"
			dobj = (DataObject*) _tmp15_;
#line 1328 "/home/jens/Source/shotwell/src/Commands.vala"
			_tmp16_ = dobj;
#line 1328 "/home/jens/Source/shotwell/src/Commands.vala"
			_tmp17_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_TYPE (_tmp16_, TYPE_EVENT) ? ((Event*) _tmp16_) : NULL);
#line 1328 "/home/jens/Source/shotwell/src/Commands.vala"
			event = _tmp17_;
#line 1329 "/home/jens/Source/shotwell/src/Commands.vala"
			_tmp18_ = event;
#line 1329 "/home/jens/Source/shotwell/src/Commands.vala"
			if (_tmp18_ != NULL) {
#line 11360 "Commands.c"
				ViewCollection* _tmp19_;
				Event* _tmp20_;
				EventView* _tmp21_;
				EventView* _tmp22_;
#line 1330 "/home/jens/Source/shotwell/src/Commands.vala"
				_tmp19_ = all_events;
#line 1330 "/home/jens/Source/shotwell/src/Commands.vala"
				_tmp20_ = event;
#line 1330 "/home/jens/Source/shotwell/src/Commands.vala"
				_tmp21_ = event_view_new (G_TYPE_CHECK_INSTANCE_CAST (_tmp20_, TYPE_EVENT_SOURCE, EventSource));
#line 1330 "/home/jens/Source/shotwell/src/Commands.vala"
				_tmp22_ = _tmp21_;
#line 1330 "/home/jens/Source/shotwell/src/Commands.vala"
				data_collection_add (G_TYPE_CHECK_INSTANCE_CAST (_tmp19_, TYPE_DATA_COLLECTION, DataCollection), G_TYPE_CHECK_INSTANCE_CAST (_tmp22_, TYPE_DATA_OBJECT, DataObject));
#line 1330 "/home/jens/Source/shotwell/src/Commands.vala"
				_g_object_unref0 (_tmp22_);
#line 11377 "Commands.c"
			}
#line 1327 "/home/jens/Source/shotwell/src/Commands.vala"
			_g_object_unref0 (event);
#line 1327 "/home/jens/Source/shotwell/src/Commands.vala"
			_g_object_unref0 (dobj);
#line 11383 "Commands.c"
		}
#line 1327 "/home/jens/Source/shotwell/src/Commands.vala"
		_g_object_unref0 (_dobj_it);
#line 11387 "Commands.c"
	}
#line 1333 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp23_ = self->priv->dateable;
#line 1333 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp24_ = all_events;
#line 1333 "/home/jens/Source/shotwell/src/Commands.vala"
	event_generate_single_event (G_TYPE_CHECK_INSTANCE_CAST (_tmp23_, TYPE_MEDIA_SOURCE, MediaSource), _tmp24_, NULL);
#line 1320 "/home/jens/Source/shotwell/src/Commands.vala"
	_data_collection_unref0 (all_events);
#line 11397 "Commands.c"
}


static void adjust_date_time_photo_command_real_undo (Command* base) {
	AdjustDateTimePhotoCommand * self;
	Dateable* _tmp0_;
	Dateable* _tmp1_;
	time_t _tmp2_;
	gint64 _tmp3_;
	Dateable* _tmp4_;
	Event* _tmp5_;
#line 1336 "/home/jens/Source/shotwell/src/Commands.vala"
	self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_ADJUST_DATE_TIME_PHOTO_COMMAND, AdjustDateTimePhotoCommand);
#line 1337 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp0_ = self->priv->dateable;
#line 1337 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp1_ = self->priv->dateable;
#line 1337 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp2_ = dateable_get_exposure_time (_tmp1_);
#line 1337 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp3_ = self->priv->time_shift;
#line 1337 "/home/jens/Source/shotwell/src/Commands.vala"
	adjust_date_time_photo_command_set_time (self, _tmp0_, _tmp2_ - ((time_t) _tmp3_));
#line 1339 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp4_ = self->priv->dateable;
#line 1339 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp5_ = self->priv->prev_event;
#line 1339 "/home/jens/Source/shotwell/src/Commands.vala"
	media_source_set_event (G_TYPE_CHECK_INSTANCE_CAST (_tmp4_, TYPE_MEDIA_SOURCE, MediaSource), _tmp5_);
#line 11427 "Commands.c"
}


static void adjust_date_time_photo_command_set_time (AdjustDateTimePhotoCommand* self, Dateable* dateable, time_t exposure_time) {
	gboolean _tmp0_ = FALSE;
	gboolean _tmp1_;
	GError * _inner_error_ = NULL;
#line 1342 "/home/jens/Source/shotwell/src/Commands.vala"
	g_return_if_fail (IS_ADJUST_DATE_TIME_PHOTO_COMMAND (self));
#line 1342 "/home/jens/Source/shotwell/src/Commands.vala"
	g_return_if_fail (IS_DATEABLE (dateable));
#line 1343 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp1_ = self->priv->modify_original;
#line 1343 "/home/jens/Source/shotwell/src/Commands.vala"
	if (_tmp1_) {
#line 11443 "Commands.c"
		Dateable* _tmp2_;
#line 1343 "/home/jens/Source/shotwell/src/Commands.vala"
		_tmp2_ = dateable;
#line 1343 "/home/jens/Source/shotwell/src/Commands.vala"
		_tmp0_ = G_TYPE_CHECK_INSTANCE_TYPE (_tmp2_, TYPE_PHOTO);
#line 11449 "Commands.c"
	} else {
#line 1343 "/home/jens/Source/shotwell/src/Commands.vala"
		_tmp0_ = FALSE;
#line 11453 "Commands.c"
	}
#line 1343 "/home/jens/Source/shotwell/src/Commands.vala"
	if (_tmp0_) {
#line 11457 "Commands.c"
		{
			Dateable* _tmp3_;
			time_t _tmp4_;
#line 1345 "/home/jens/Source/shotwell/src/Commands.vala"
			_tmp3_ = dateable;
#line 1345 "/home/jens/Source/shotwell/src/Commands.vala"
			_tmp4_ = exposure_time;
#line 1345 "/home/jens/Source/shotwell/src/Commands.vala"
			photo_set_exposure_time_persistent (G_TYPE_CHECK_INSTANCE_CAST (_tmp3_, TYPE_PHOTO, Photo), _tmp4_, &_inner_error_);
#line 1345 "/home/jens/Source/shotwell/src/Commands.vala"
			if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 11469 "Commands.c"
				goto __catch459_g_error;
			}
		}
		goto __finally459;
		__catch459_g_error:
		{
			GError* err = NULL;
#line 1344 "/home/jens/Source/shotwell/src/Commands.vala"
			err = _inner_error_;
#line 1344 "/home/jens/Source/shotwell/src/Commands.vala"
			_inner_error_ = NULL;
#line 1347 "/home/jens/Source/shotwell/src/Commands.vala"
			app_window_error_message (_ ("Original photo could not be adjusted."), NULL);
#line 1344 "/home/jens/Source/shotwell/src/Commands.vala"
			_g_error_free0 (err);
#line 11485 "Commands.c"
		}
		__finally459:
#line 1344 "/home/jens/Source/shotwell/src/Commands.vala"
		if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 1344 "/home/jens/Source/shotwell/src/Commands.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 1344 "/home/jens/Source/shotwell/src/Commands.vala"
			g_clear_error (&_inner_error_);
#line 1344 "/home/jens/Source/shotwell/src/Commands.vala"
			return;
#line 11496 "Commands.c"
		}
	} else {
		Dateable* _tmp5_;
		time_t _tmp6_;
#line 1350 "/home/jens/Source/shotwell/src/Commands.vala"
		_tmp5_ = dateable;
#line 1350 "/home/jens/Source/shotwell/src/Commands.vala"
		_tmp6_ = exposure_time;
#line 1350 "/home/jens/Source/shotwell/src/Commands.vala"
		dateable_set_exposure_time (_tmp5_, _tmp6_);
#line 11507 "Commands.c"
	}
}


static void adjust_date_time_photo_command_class_init (AdjustDateTimePhotoCommandClass * klass) {
#line 1306 "/home/jens/Source/shotwell/src/Commands.vala"
	adjust_date_time_photo_command_parent_class = g_type_class_peek_parent (klass);
#line 1306 "/home/jens/Source/shotwell/src/Commands.vala"
	g_type_class_add_private (klass, sizeof (AdjustDateTimePhotoCommandPrivate));
#line 1306 "/home/jens/Source/shotwell/src/Commands.vala"
	((CommandClass *) klass)->execute = (void (*) (Command *)) adjust_date_time_photo_command_real_execute;
#line 1306 "/home/jens/Source/shotwell/src/Commands.vala"
	((CommandClass *) klass)->undo = (void (*) (Command *)) adjust_date_time_photo_command_real_undo;
#line 1306 "/home/jens/Source/shotwell/src/Commands.vala"
	G_OBJECT_CLASS (klass)->finalize = adjust_date_time_photo_command_finalize;
#line 11523 "Commands.c"
}


static void adjust_date_time_photo_command_instance_init (AdjustDateTimePhotoCommand * self) {
#line 1306 "/home/jens/Source/shotwell/src/Commands.vala"
	self->priv = ADJUST_DATE_TIME_PHOTO_COMMAND_GET_PRIVATE (self);
#line 11530 "Commands.c"
}


static void adjust_date_time_photo_command_finalize (GObject * obj) {
	AdjustDateTimePhotoCommand * self;
#line 1306 "/home/jens/Source/shotwell/src/Commands.vala"
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, TYPE_ADJUST_DATE_TIME_PHOTO_COMMAND, AdjustDateTimePhotoCommand);
#line 1307 "/home/jens/Source/shotwell/src/Commands.vala"
	_g_object_unref0 (self->priv->dateable);
#line 1308 "/home/jens/Source/shotwell/src/Commands.vala"
	_g_object_unref0 (self->priv->prev_event);
#line 1306 "/home/jens/Source/shotwell/src/Commands.vala"
	G_OBJECT_CLASS (adjust_date_time_photo_command_parent_class)->finalize (obj);
#line 11544 "Commands.c"
}


GType adjust_date_time_photo_command_get_type (void) {
	static volatile gsize adjust_date_time_photo_command_type_id__volatile = 0;
	if (g_once_init_enter (&adjust_date_time_photo_command_type_id__volatile)) {
		static const GTypeInfo g_define_type_info = { sizeof (AdjustDateTimePhotoCommandClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) adjust_date_time_photo_command_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (AdjustDateTimePhotoCommand), 0, (GInstanceInitFunc) adjust_date_time_photo_command_instance_init, NULL };
		GType adjust_date_time_photo_command_type_id;
		adjust_date_time_photo_command_type_id = g_type_register_static (TYPE_SINGLE_DATA_SOURCE_COMMAND, "AdjustDateTimePhotoCommand", &g_define_type_info, 0);
		g_once_init_leave (&adjust_date_time_photo_command_type_id__volatile, adjust_date_time_photo_command_type_id);
	}
	return adjust_date_time_photo_command_type_id__volatile;
}


static time_t* _time_t_dup (time_t* self) {
	time_t* dup;
#line 1384 "/home/jens/Source/shotwell/src/Commands.vala"
	dup = g_new0 (time_t, 1);
#line 1384 "/home/jens/Source/shotwell/src/Commands.vala"
	memcpy (dup, self, sizeof (time_t));
#line 1384 "/home/jens/Source/shotwell/src/Commands.vala"
	return dup;
#line 11568 "Commands.c"
}


static gpointer __time_t_dup0 (gpointer self) {
#line 1384 "/home/jens/Source/shotwell/src/Commands.vala"
	return self ? _time_t_dup (self) : NULL;
#line 11575 "Commands.c"
}


AdjustDateTimePhotosCommand* adjust_date_time_photos_command_construct (GType object_type, GeeIterable* iter, gint64 time_shift, gboolean keep_relativity, gboolean modify_originals) {
	AdjustDateTimePhotosCommand * self = NULL;
	GeeIterable* _tmp0_;
	gint64 _tmp1_;
	gboolean _tmp2_;
	gboolean _tmp3_;
	GeeHashMap* _tmp4_;
	GeeHashMap* _tmp30_;
#line 1366 "/home/jens/Source/shotwell/src/Commands.vala"
	g_return_val_if_fail (GEE_IS_ITERABLE (iter), NULL);
#line 1368 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp0_ = iter;
#line 1368 "/home/jens/Source/shotwell/src/Commands.vala"
	self = (AdjustDateTimePhotosCommand*) multiple_data_source_command_construct (object_type, _tmp0_, _ ("Adjusting Date and Time"), _ ("Undoing Date and Time Adjustment"), RESOURCES_ADJUST_DATE_TIME_LABEL, "");
#line 1371 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp1_ = time_shift;
#line 1371 "/home/jens/Source/shotwell/src/Commands.vala"
	self->priv->time_shift = _tmp1_;
#line 1372 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp2_ = keep_relativity;
#line 1372 "/home/jens/Source/shotwell/src/Commands.vala"
	self->priv->keep_relativity = _tmp2_;
#line 1373 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp3_ = modify_originals;
#line 1373 "/home/jens/Source/shotwell/src/Commands.vala"
	self->priv->modify_originals = _tmp3_;
#line 1377 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp4_ = gee_hash_map_new (TYPE_DATEABLE, (GBoxedCopyFunc) g_object_ref, (GDestroyNotify) g_object_unref, TYPE_EVENT, (GBoxedCopyFunc) g_object_ref, (GDestroyNotify) g_object_unref, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
#line 1377 "/home/jens/Source/shotwell/src/Commands.vala"
	_g_object_unref0 (self->priv->prev_events);
#line 1377 "/home/jens/Source/shotwell/src/Commands.vala"
	self->priv->prev_events = G_TYPE_CHECK_INSTANCE_CAST (_tmp4_, GEE_TYPE_MAP, GeeMap);
#line 11611 "Commands.c"
	{
		GeeIterator* _view_it = NULL;
		GeeIterable* _tmp5_;
		GeeIterator* _tmp6_;
#line 1380 "/home/jens/Source/shotwell/src/Commands.vala"
		_tmp5_ = iter;
#line 1380 "/home/jens/Source/shotwell/src/Commands.vala"
		_tmp6_ = gee_iterable_iterator (_tmp5_);
#line 1380 "/home/jens/Source/shotwell/src/Commands.vala"
		_view_it = _tmp6_;
#line 1380 "/home/jens/Source/shotwell/src/Commands.vala"
		while (TRUE) {
#line 11624 "Commands.c"
			GeeIterator* _tmp7_;
			gboolean _tmp8_;
			DataView* view = NULL;
			GeeIterator* _tmp9_;
			gpointer _tmp10_;
			GeeMap* _tmp11_;
			DataView* _tmp12_;
			DataSource* _tmp13_;
			Dateable* _tmp14_;
			Dateable* _tmp15_;
			DataView* _tmp16_;
			DataSource* _tmp17_;
			MediaSource* _tmp18_;
			MediaSource* _tmp19_;
			Event* _tmp20_;
			Event* _tmp21_;
			time_t* _tmp22_;
#line 1380 "/home/jens/Source/shotwell/src/Commands.vala"
			_tmp7_ = _view_it;
#line 1380 "/home/jens/Source/shotwell/src/Commands.vala"
			_tmp8_ = gee_iterator_next (_tmp7_);
#line 1380 "/home/jens/Source/shotwell/src/Commands.vala"
			if (!_tmp8_) {
#line 1380 "/home/jens/Source/shotwell/src/Commands.vala"
				break;
#line 11650 "Commands.c"
			}
#line 1380 "/home/jens/Source/shotwell/src/Commands.vala"
			_tmp9_ = _view_it;
#line 1380 "/home/jens/Source/shotwell/src/Commands.vala"
			_tmp10_ = gee_iterator_get (_tmp9_);
#line 1380 "/home/jens/Source/shotwell/src/Commands.vala"
			view = (DataView*) _tmp10_;
#line 1381 "/home/jens/Source/shotwell/src/Commands.vala"
			_tmp11_ = self->priv->prev_events;
#line 1381 "/home/jens/Source/shotwell/src/Commands.vala"
			_tmp12_ = view;
#line 1381 "/home/jens/Source/shotwell/src/Commands.vala"
			_tmp13_ = data_view_get_source (_tmp12_);
#line 1381 "/home/jens/Source/shotwell/src/Commands.vala"
			_tmp14_ = G_TYPE_CHECK_INSTANCE_TYPE (_tmp13_, TYPE_DATEABLE) ? ((Dateable*) _tmp13_) : NULL;
#line 1381 "/home/jens/Source/shotwell/src/Commands.vala"
			if (_tmp14_ == NULL) {
#line 1381 "/home/jens/Source/shotwell/src/Commands.vala"
				_g_object_unref0 (_tmp13_);
#line 11670 "Commands.c"
			}
#line 1381 "/home/jens/Source/shotwell/src/Commands.vala"
			_tmp15_ = _tmp14_;
#line 1381 "/home/jens/Source/shotwell/src/Commands.vala"
			_tmp16_ = view;
#line 1381 "/home/jens/Source/shotwell/src/Commands.vala"
			_tmp17_ = data_view_get_source (_tmp16_);
#line 1381 "/home/jens/Source/shotwell/src/Commands.vala"
			_tmp18_ = G_TYPE_CHECK_INSTANCE_TYPE (_tmp17_, TYPE_MEDIA_SOURCE) ? ((MediaSource*) _tmp17_) : NULL;
#line 1381 "/home/jens/Source/shotwell/src/Commands.vala"
			if (_tmp18_ == NULL) {
#line 1381 "/home/jens/Source/shotwell/src/Commands.vala"
				_g_object_unref0 (_tmp17_);
#line 11684 "Commands.c"
			}
#line 1381 "/home/jens/Source/shotwell/src/Commands.vala"
			_tmp19_ = _tmp18_;
#line 1381 "/home/jens/Source/shotwell/src/Commands.vala"
			_tmp20_ = media_source_get_event (_tmp19_);
#line 1381 "/home/jens/Source/shotwell/src/Commands.vala"
			_tmp21_ = _tmp20_;
#line 1381 "/home/jens/Source/shotwell/src/Commands.vala"
			gee_map_set (_tmp11_, _tmp15_, _tmp21_);
#line 1381 "/home/jens/Source/shotwell/src/Commands.vala"
			_g_object_unref0 (_tmp21_);
#line 1381 "/home/jens/Source/shotwell/src/Commands.vala"
			_g_object_unref0 (_tmp19_);
#line 1381 "/home/jens/Source/shotwell/src/Commands.vala"
			_g_object_unref0 (_tmp15_);
#line 1383 "/home/jens/Source/shotwell/src/Commands.vala"
			_tmp22_ = self->priv->new_time;
#line 1383 "/home/jens/Source/shotwell/src/Commands.vala"
			if (_tmp22_ == NULL) {
#line 11704 "Commands.c"
				DataView* _tmp23_;
				DataSource* _tmp24_;
				Dateable* _tmp25_;
				time_t _tmp26_;
				gint64 _tmp27_;
				time_t _tmp28_;
				time_t* _tmp29_;
#line 1384 "/home/jens/Source/shotwell/src/Commands.vala"
				_tmp23_ = view;
#line 1384 "/home/jens/Source/shotwell/src/Commands.vala"
				_tmp24_ = data_view_get_source (_tmp23_);
#line 1384 "/home/jens/Source/shotwell/src/Commands.vala"
				_tmp25_ = G_TYPE_CHECK_INSTANCE_CAST (_tmp24_, TYPE_DATEABLE, Dateable);
#line 1384 "/home/jens/Source/shotwell/src/Commands.vala"
				_tmp26_ = dateable_get_exposure_time (_tmp25_);
#line 1384 "/home/jens/Source/shotwell/src/Commands.vala"
				_tmp27_ = time_shift;
#line 1384 "/home/jens/Source/shotwell/src/Commands.vala"
				_tmp28_ = _tmp26_ + ((time_t) _tmp27_);
#line 1384 "/home/jens/Source/shotwell/src/Commands.vala"
				_tmp29_ = __time_t_dup0 (&_tmp28_);
#line 1384 "/home/jens/Source/shotwell/src/Commands.vala"
				_g_free0 (self->priv->new_time);
#line 1384 "/home/jens/Source/shotwell/src/Commands.vala"
				self->priv->new_time = _tmp29_;
#line 1384 "/home/jens/Source/shotwell/src/Commands.vala"
				_g_object_unref0 (_tmp25_);
#line 1386 "/home/jens/Source/shotwell/src/Commands.vala"
				_g_object_unref0 (view);
#line 1386 "/home/jens/Source/shotwell/src/Commands.vala"
				break;
#line 11736 "Commands.c"
			}
#line 1380 "/home/jens/Source/shotwell/src/Commands.vala"
			_g_object_unref0 (view);
#line 11740 "Commands.c"
		}
#line 1380 "/home/jens/Source/shotwell/src/Commands.vala"
		_g_object_unref0 (_view_it);
#line 11744 "Commands.c"
	}
#line 1390 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp30_ = gee_hash_map_new (TYPE_DATEABLE, (GBoxedCopyFunc) g_object_ref, (GDestroyNotify) g_object_unref, G_TYPE_INVALID, (GBoxedCopyFunc) _time_t_dup, (GDestroyNotify) g_free, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
#line 1390 "/home/jens/Source/shotwell/src/Commands.vala"
	_g_object_unref0 (self->priv->old_times);
#line 1390 "/home/jens/Source/shotwell/src/Commands.vala"
	self->priv->old_times = _tmp30_;
#line 1366 "/home/jens/Source/shotwell/src/Commands.vala"
	return self;
#line 11754 "Commands.c"
}


AdjustDateTimePhotosCommand* adjust_date_time_photos_command_new (GeeIterable* iter, gint64 time_shift, gboolean keep_relativity, gboolean modify_originals) {
#line 1366 "/home/jens/Source/shotwell/src/Commands.vala"
	return adjust_date_time_photos_command_construct (TYPE_ADJUST_DATE_TIME_PHOTOS_COMMAND, iter, time_shift, keep_relativity, modify_originals);
#line 11761 "Commands.c"
}


static void adjust_date_time_photos_command_real_execute (Command* base) {
	AdjustDateTimePhotosCommand * self;
	GeeArrayList* _tmp0_;
	GeeArrayList* _tmp1_;
	gint _tmp2_;
	gint _tmp3_;
	ViewCollection* all_events = NULL;
	ViewCollection* _tmp8_;
#line 1393 "/home/jens/Source/shotwell/src/Commands.vala"
	self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_ADJUST_DATE_TIME_PHOTOS_COMMAND, AdjustDateTimePhotosCommand);
#line 1394 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp0_ = gee_array_list_new (TYPE_DATEABLE, (GBoxedCopyFunc) g_object_ref, (GDestroyNotify) g_object_unref, NULL, NULL, NULL);
#line 1394 "/home/jens/Source/shotwell/src/Commands.vala"
	_g_object_unref0 (self->priv->error_list);
#line 1394 "/home/jens/Source/shotwell/src/Commands.vala"
	self->priv->error_list = _tmp0_;
#line 1395 "/home/jens/Source/shotwell/src/Commands.vala"
	COMMAND_CLASS (adjust_date_time_photos_command_parent_class)->execute (G_TYPE_CHECK_INSTANCE_CAST (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_MULTIPLE_DATA_SOURCE_COMMAND, MultipleDataSourceCommand), TYPE_COMMAND, Command));
#line 1397 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp1_ = self->priv->error_list;
#line 1397 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp2_ = gee_abstract_collection_get_size (G_TYPE_CHECK_INSTANCE_CAST (_tmp1_, GEE_TYPE_ABSTRACT_COLLECTION, GeeAbstractCollection));
#line 1397 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp3_ = _tmp2_;
#line 1397 "/home/jens/Source/shotwell/src/Commands.vala"
	if (_tmp3_ > 0) {
#line 11791 "Commands.c"
		GeeArrayList* _tmp4_;
		GeeArrayList* _tmp5_;
		gint _tmp6_;
		gint _tmp7_;
#line 1398 "/home/jens/Source/shotwell/src/Commands.vala"
		_tmp4_ = self->priv->error_list;
#line 1398 "/home/jens/Source/shotwell/src/Commands.vala"
		_tmp5_ = self->priv->error_list;
#line 1398 "/home/jens/Source/shotwell/src/Commands.vala"
		_tmp6_ = gee_abstract_collection_get_size (G_TYPE_CHECK_INSTANCE_CAST (_tmp5_, GEE_TYPE_ABSTRACT_COLLECTION, GeeAbstractCollection));
#line 1398 "/home/jens/Source/shotwell/src/Commands.vala"
		_tmp7_ = _tmp6_;
#line 1398 "/home/jens/Source/shotwell/src/Commands.vala"
		multiple_object_error_dialog (_tmp4_, ngettext ("One original photo could not be adjusted.", "The following original photos could not be adjusted.", (gulong) _tmp7_), _ ("Time Adjustment Error"));
#line 11806 "Commands.c"
	}
#line 1404 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp8_ = view_collection_new ("tmp");
#line 1404 "/home/jens/Source/shotwell/src/Commands.vala"
	all_events = _tmp8_;
#line 11812 "Commands.c"
	{
		GeeIterator* _d_it = NULL;
		GeeMap* _tmp9_;
		GeeSet* _tmp10_;
		GeeSet* _tmp11_;
		GeeSet* _tmp12_;
		GeeIterator* _tmp13_;
		GeeIterator* _tmp14_;
#line 1406 "/home/jens/Source/shotwell/src/Commands.vala"
		_tmp9_ = self->priv->prev_events;
#line 1406 "/home/jens/Source/shotwell/src/Commands.vala"
		_tmp10_ = gee_map_get_keys (_tmp9_);
#line 1406 "/home/jens/Source/shotwell/src/Commands.vala"
		_tmp11_ = _tmp10_;
#line 1406 "/home/jens/Source/shotwell/src/Commands.vala"
		_tmp12_ = _tmp11_;
#line 1406 "/home/jens/Source/shotwell/src/Commands.vala"
		_tmp13_ = gee_iterable_iterator (G_TYPE_CHECK_INSTANCE_CAST (_tmp12_, GEE_TYPE_ITERABLE, GeeIterable));
#line 1406 "/home/jens/Source/shotwell/src/Commands.vala"
		_tmp14_ = _tmp13_;
#line 1406 "/home/jens/Source/shotwell/src/Commands.vala"
		_g_object_unref0 (_tmp12_);
#line 1406 "/home/jens/Source/shotwell/src/Commands.vala"
		_d_it = _tmp14_;
#line 1406 "/home/jens/Source/shotwell/src/Commands.vala"
		while (TRUE) {
#line 11839 "Commands.c"
			GeeIterator* _tmp15_;
			gboolean _tmp16_;
			Dateable* d = NULL;
			GeeIterator* _tmp17_;
			gpointer _tmp18_;
			Dateable* _tmp35_;
			ViewCollection* _tmp36_;
#line 1406 "/home/jens/Source/shotwell/src/Commands.vala"
			_tmp15_ = _d_it;
#line 1406 "/home/jens/Source/shotwell/src/Commands.vala"
			_tmp16_ = gee_iterator_next (_tmp15_);
#line 1406 "/home/jens/Source/shotwell/src/Commands.vala"
			if (!_tmp16_) {
#line 1406 "/home/jens/Source/shotwell/src/Commands.vala"
				break;
#line 11855 "Commands.c"
			}
#line 1406 "/home/jens/Source/shotwell/src/Commands.vala"
			_tmp17_ = _d_it;
#line 1406 "/home/jens/Source/shotwell/src/Commands.vala"
			_tmp18_ = gee_iterator_get (_tmp17_);
#line 1406 "/home/jens/Source/shotwell/src/Commands.vala"
			d = (Dateable*) _tmp18_;
#line 11863 "Commands.c"
			{
				GeeIterator* _dobj_it = NULL;
				EventSourceCollection* _tmp19_;
				GeeCollection* _tmp20_;
				GeeCollection* _tmp21_;
				GeeIterator* _tmp22_;
				GeeIterator* _tmp23_;
#line 1407 "/home/jens/Source/shotwell/src/Commands.vala"
				_tmp19_ = event_global;
#line 1407 "/home/jens/Source/shotwell/src/Commands.vala"
				_tmp20_ = data_collection_get_all (G_TYPE_CHECK_INSTANCE_CAST (_tmp19_, TYPE_DATA_COLLECTION, DataCollection));
#line 1407 "/home/jens/Source/shotwell/src/Commands.vala"
				_tmp21_ = _tmp20_;
#line 1407 "/home/jens/Source/shotwell/src/Commands.vala"
				_tmp22_ = gee_iterable_iterator (G_TYPE_CHECK_INSTANCE_CAST (_tmp21_, GEE_TYPE_ITERABLE, GeeIterable));
#line 1407 "/home/jens/Source/shotwell/src/Commands.vala"
				_tmp23_ = _tmp22_;
#line 1407 "/home/jens/Source/shotwell/src/Commands.vala"
				_g_object_unref0 (_tmp21_);
#line 1407 "/home/jens/Source/shotwell/src/Commands.vala"
				_dobj_it = _tmp23_;
#line 1407 "/home/jens/Source/shotwell/src/Commands.vala"
				while (TRUE) {
#line 11887 "Commands.c"
					GeeIterator* _tmp24_;
					gboolean _tmp25_;
					DataObject* dobj = NULL;
					GeeIterator* _tmp26_;
					gpointer _tmp27_;
					Event* event = NULL;
					DataObject* _tmp28_;
					Event* _tmp29_;
					Event* _tmp30_;
#line 1407 "/home/jens/Source/shotwell/src/Commands.vala"
					_tmp24_ = _dobj_it;
#line 1407 "/home/jens/Source/shotwell/src/Commands.vala"
					_tmp25_ = gee_iterator_next (_tmp24_);
#line 1407 "/home/jens/Source/shotwell/src/Commands.vala"
					if (!_tmp25_) {
#line 1407 "/home/jens/Source/shotwell/src/Commands.vala"
						break;
#line 11905 "Commands.c"
					}
#line 1407 "/home/jens/Source/shotwell/src/Commands.vala"
					_tmp26_ = _dobj_it;
#line 1407 "/home/jens/Source/shotwell/src/Commands.vala"
					_tmp27_ = gee_iterator_get (_tmp26_);
#line 1407 "/home/jens/Source/shotwell/src/Commands.vala"
					dobj = (DataObject*) _tmp27_;
#line 1408 "/home/jens/Source/shotwell/src/Commands.vala"
					_tmp28_ = dobj;
#line 1408 "/home/jens/Source/shotwell/src/Commands.vala"
					_tmp29_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_TYPE (_tmp28_, TYPE_EVENT) ? ((Event*) _tmp28_) : NULL);
#line 1408 "/home/jens/Source/shotwell/src/Commands.vala"
					event = _tmp29_;
#line 1409 "/home/jens/Source/shotwell/src/Commands.vala"
					_tmp30_ = event;
#line 1409 "/home/jens/Source/shotwell/src/Commands.vala"
					if (_tmp30_ != NULL) {
#line 11923 "Commands.c"
						ViewCollection* _tmp31_;
						Event* _tmp32_;
						EventView* _tmp33_;
						EventView* _tmp34_;
#line 1410 "/home/jens/Source/shotwell/src/Commands.vala"
						_tmp31_ = all_events;
#line 1410 "/home/jens/Source/shotwell/src/Commands.vala"
						_tmp32_ = event;
#line 1410 "/home/jens/Source/shotwell/src/Commands.vala"
						_tmp33_ = event_view_new (G_TYPE_CHECK_INSTANCE_CAST (_tmp32_, TYPE_EVENT_SOURCE, EventSource));
#line 1410 "/home/jens/Source/shotwell/src/Commands.vala"
						_tmp34_ = _tmp33_;
#line 1410 "/home/jens/Source/shotwell/src/Commands.vala"
						data_collection_add (G_TYPE_CHECK_INSTANCE_CAST (_tmp31_, TYPE_DATA_COLLECTION, DataCollection), G_TYPE_CHECK_INSTANCE_CAST (_tmp34_, TYPE_DATA_OBJECT, DataObject));
#line 1410 "/home/jens/Source/shotwell/src/Commands.vala"
						_g_object_unref0 (_tmp34_);
#line 11940 "Commands.c"
					}
#line 1407 "/home/jens/Source/shotwell/src/Commands.vala"
					_g_object_unref0 (event);
#line 1407 "/home/jens/Source/shotwell/src/Commands.vala"
					_g_object_unref0 (dobj);
#line 11946 "Commands.c"
				}
#line 1407 "/home/jens/Source/shotwell/src/Commands.vala"
				_g_object_unref0 (_dobj_it);
#line 11950 "Commands.c"
			}
#line 1413 "/home/jens/Source/shotwell/src/Commands.vala"
			_tmp35_ = d;
#line 1413 "/home/jens/Source/shotwell/src/Commands.vala"
			_tmp36_ = all_events;
#line 1413 "/home/jens/Source/shotwell/src/Commands.vala"
			event_generate_single_event (G_TYPE_CHECK_INSTANCE_CAST (_tmp35_, TYPE_MEDIA_SOURCE, MediaSource), _tmp36_, NULL);
#line 1406 "/home/jens/Source/shotwell/src/Commands.vala"
			_g_object_unref0 (d);
#line 11960 "Commands.c"
		}
#line 1406 "/home/jens/Source/shotwell/src/Commands.vala"
		_g_object_unref0 (_d_it);
#line 11964 "Commands.c"
	}
#line 1393 "/home/jens/Source/shotwell/src/Commands.vala"
	_data_collection_unref0 (all_events);
#line 11968 "Commands.c"
}


static void adjust_date_time_photos_command_real_undo (Command* base) {
	AdjustDateTimePhotosCommand * self;
	GeeArrayList* _tmp0_;
	GeeArrayList* _tmp1_;
	gint _tmp2_;
	gint _tmp3_;
#line 1417 "/home/jens/Source/shotwell/src/Commands.vala"
	self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_ADJUST_DATE_TIME_PHOTOS_COMMAND, AdjustDateTimePhotosCommand);
#line 1418 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp0_ = gee_array_list_new (TYPE_DATEABLE, (GBoxedCopyFunc) g_object_ref, (GDestroyNotify) g_object_unref, NULL, NULL, NULL);
#line 1418 "/home/jens/Source/shotwell/src/Commands.vala"
	_g_object_unref0 (self->priv->error_list);
#line 1418 "/home/jens/Source/shotwell/src/Commands.vala"
	self->priv->error_list = _tmp0_;
#line 1419 "/home/jens/Source/shotwell/src/Commands.vala"
	COMMAND_CLASS (adjust_date_time_photos_command_parent_class)->undo (G_TYPE_CHECK_INSTANCE_CAST (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_MULTIPLE_DATA_SOURCE_COMMAND, MultipleDataSourceCommand), TYPE_COMMAND, Command));
#line 1421 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp1_ = self->priv->error_list;
#line 1421 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp2_ = gee_abstract_collection_get_size (G_TYPE_CHECK_INSTANCE_CAST (_tmp1_, GEE_TYPE_ABSTRACT_COLLECTION, GeeAbstractCollection));
#line 1421 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp3_ = _tmp2_;
#line 1421 "/home/jens/Source/shotwell/src/Commands.vala"
	if (_tmp3_ > 0) {
#line 11996 "Commands.c"
		GeeArrayList* _tmp4_;
		GeeArrayList* _tmp5_;
		gint _tmp6_;
		gint _tmp7_;
#line 1422 "/home/jens/Source/shotwell/src/Commands.vala"
		_tmp4_ = self->priv->error_list;
#line 1422 "/home/jens/Source/shotwell/src/Commands.vala"
		_tmp5_ = self->priv->error_list;
#line 1422 "/home/jens/Source/shotwell/src/Commands.vala"
		_tmp6_ = gee_abstract_collection_get_size (G_TYPE_CHECK_INSTANCE_CAST (_tmp5_, GEE_TYPE_ABSTRACT_COLLECTION, GeeAbstractCollection));
#line 1422 "/home/jens/Source/shotwell/src/Commands.vala"
		_tmp7_ = _tmp6_;
#line 1422 "/home/jens/Source/shotwell/src/Commands.vala"
		multiple_object_error_dialog (_tmp4_, ngettext ("Time adjustments could not be undone on the following photo file.", "Time adjustments could not be undone on the following photo files.", (gulong) _tmp7_), _ ("Time Adjustment Error"));
#line 12011 "Commands.c"
	}
}


static void adjust_date_time_photos_command_set_time (AdjustDateTimePhotosCommand* self, Dateable* dateable, time_t exposure_time) {
	gboolean _tmp0_ = FALSE;
	gboolean _tmp1_;
	GError * _inner_error_ = NULL;
#line 1429 "/home/jens/Source/shotwell/src/Commands.vala"
	g_return_if_fail (IS_ADJUST_DATE_TIME_PHOTOS_COMMAND (self));
#line 1429 "/home/jens/Source/shotwell/src/Commands.vala"
	g_return_if_fail (IS_DATEABLE (dateable));
#line 1433 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp1_ = self->priv->modify_originals;
#line 1433 "/home/jens/Source/shotwell/src/Commands.vala"
	if (_tmp1_) {
#line 12028 "Commands.c"
		Dateable* _tmp2_;
#line 1433 "/home/jens/Source/shotwell/src/Commands.vala"
		_tmp2_ = dateable;
#line 1433 "/home/jens/Source/shotwell/src/Commands.vala"
		_tmp0_ = G_TYPE_CHECK_INSTANCE_TYPE (_tmp2_, TYPE_PHOTO);
#line 12034 "Commands.c"
	} else {
#line 1433 "/home/jens/Source/shotwell/src/Commands.vala"
		_tmp0_ = FALSE;
#line 12038 "Commands.c"
	}
#line 1433 "/home/jens/Source/shotwell/src/Commands.vala"
	if (_tmp0_) {
#line 12042 "Commands.c"
		{
			Dateable* _tmp3_;
			time_t _tmp4_;
#line 1435 "/home/jens/Source/shotwell/src/Commands.vala"
			_tmp3_ = dateable;
#line 1435 "/home/jens/Source/shotwell/src/Commands.vala"
			_tmp4_ = exposure_time;
#line 1435 "/home/jens/Source/shotwell/src/Commands.vala"
			photo_set_exposure_time_persistent (G_TYPE_CHECK_INSTANCE_CAST (_tmp3_, TYPE_PHOTO, Photo), _tmp4_, &_inner_error_);
#line 1435 "/home/jens/Source/shotwell/src/Commands.vala"
			if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 12054 "Commands.c"
				goto __catch460_g_error;
			}
		}
		goto __finally460;
		__catch460_g_error:
		{
			GError* err = NULL;
			GeeArrayList* _tmp5_;
			Dateable* _tmp6_;
#line 1434 "/home/jens/Source/shotwell/src/Commands.vala"
			err = _inner_error_;
#line 1434 "/home/jens/Source/shotwell/src/Commands.vala"
			_inner_error_ = NULL;
#line 1437 "/home/jens/Source/shotwell/src/Commands.vala"
			_tmp5_ = self->priv->error_list;
#line 1437 "/home/jens/Source/shotwell/src/Commands.vala"
			_tmp6_ = dateable;
#line 1437 "/home/jens/Source/shotwell/src/Commands.vala"
			gee_abstract_collection_add (G_TYPE_CHECK_INSTANCE_CAST (_tmp5_, GEE_TYPE_ABSTRACT_COLLECTION, GeeAbstractCollection), _tmp6_);
#line 1434 "/home/jens/Source/shotwell/src/Commands.vala"
			_g_error_free0 (err);
#line 12076 "Commands.c"
		}
		__finally460:
#line 1434 "/home/jens/Source/shotwell/src/Commands.vala"
		if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 1434 "/home/jens/Source/shotwell/src/Commands.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 1434 "/home/jens/Source/shotwell/src/Commands.vala"
			g_clear_error (&_inner_error_);
#line 1434 "/home/jens/Source/shotwell/src/Commands.vala"
			return;
#line 12087 "Commands.c"
		}
	} else {
		Dateable* _tmp7_;
		time_t _tmp8_;
#line 1442 "/home/jens/Source/shotwell/src/Commands.vala"
		_tmp7_ = dateable;
#line 1442 "/home/jens/Source/shotwell/src/Commands.vala"
		_tmp8_ = exposure_time;
#line 1442 "/home/jens/Source/shotwell/src/Commands.vala"
		dateable_set_exposure_time (_tmp7_, _tmp8_);
#line 12098 "Commands.c"
	}
}


static void adjust_date_time_photos_command_real_execute_on_source (MultipleDataSourceCommand* base, DataSource* source) {
	AdjustDateTimePhotosCommand * self;
	Dateable* dateable = NULL;
	DataSource* _tmp0_;
	Dateable* _tmp1_;
	gboolean _tmp2_ = FALSE;
	gboolean _tmp3_;
	ViewCollection* all_events = NULL;
	ViewCollection* _tmp16_;
	Dateable* _tmp33_;
	ViewCollection* _tmp34_;
#line 1446 "/home/jens/Source/shotwell/src/Commands.vala"
	self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_ADJUST_DATE_TIME_PHOTOS_COMMAND, AdjustDateTimePhotosCommand);
#line 1446 "/home/jens/Source/shotwell/src/Commands.vala"
	g_return_if_fail (IS_DATA_SOURCE (source));
#line 1447 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp0_ = source;
#line 1447 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp1_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, TYPE_DATEABLE, Dateable));
#line 1447 "/home/jens/Source/shotwell/src/Commands.vala"
	dateable = _tmp1_;
#line 1449 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp3_ = self->priv->keep_relativity;
#line 1449 "/home/jens/Source/shotwell/src/Commands.vala"
	if (_tmp3_) {
#line 12128 "Commands.c"
		Dateable* _tmp4_;
		time_t _tmp5_;
#line 1449 "/home/jens/Source/shotwell/src/Commands.vala"
		_tmp4_ = dateable;
#line 1449 "/home/jens/Source/shotwell/src/Commands.vala"
		_tmp5_ = dateable_get_exposure_time (_tmp4_);
#line 1449 "/home/jens/Source/shotwell/src/Commands.vala"
		_tmp2_ = _tmp5_ != ((time_t) 0);
#line 12137 "Commands.c"
	} else {
#line 1449 "/home/jens/Source/shotwell/src/Commands.vala"
		_tmp2_ = FALSE;
#line 12141 "Commands.c"
	}
#line 1449 "/home/jens/Source/shotwell/src/Commands.vala"
	if (_tmp2_) {
#line 12145 "Commands.c"
		Dateable* _tmp6_;
		Dateable* _tmp7_;
		time_t _tmp8_;
		gint64 _tmp9_;
#line 1450 "/home/jens/Source/shotwell/src/Commands.vala"
		_tmp6_ = dateable;
#line 1450 "/home/jens/Source/shotwell/src/Commands.vala"
		_tmp7_ = dateable;
#line 1450 "/home/jens/Source/shotwell/src/Commands.vala"
		_tmp8_ = dateable_get_exposure_time (_tmp7_);
#line 1450 "/home/jens/Source/shotwell/src/Commands.vala"
		_tmp9_ = self->priv->time_shift;
#line 1450 "/home/jens/Source/shotwell/src/Commands.vala"
		adjust_date_time_photos_command_set_time (self, _tmp6_, _tmp8_ + ((time_t) _tmp9_));
#line 12160 "Commands.c"
	} else {
		GeeHashMap* _tmp10_;
		Dateable* _tmp11_;
		Dateable* _tmp12_;
		time_t _tmp13_;
		Dateable* _tmp14_;
		time_t* _tmp15_;
#line 1452 "/home/jens/Source/shotwell/src/Commands.vala"
		_tmp10_ = self->priv->old_times;
#line 1452 "/home/jens/Source/shotwell/src/Commands.vala"
		_tmp11_ = dateable;
#line 1452 "/home/jens/Source/shotwell/src/Commands.vala"
		_tmp12_ = dateable;
#line 1452 "/home/jens/Source/shotwell/src/Commands.vala"
		_tmp13_ = dateable_get_exposure_time (_tmp12_);
#line 1452 "/home/jens/Source/shotwell/src/Commands.vala"
		gee_abstract_map_set (G_TYPE_CHECK_INSTANCE_CAST (_tmp10_, GEE_TYPE_ABSTRACT_MAP, GeeAbstractMap), _tmp11_, &_tmp13_);
#line 1453 "/home/jens/Source/shotwell/src/Commands.vala"
		_tmp14_ = dateable;
#line 1453 "/home/jens/Source/shotwell/src/Commands.vala"
		_tmp15_ = self->priv->new_time;
#line 1453 "/home/jens/Source/shotwell/src/Commands.vala"
		adjust_date_time_photos_command_set_time (self, _tmp14_, *_tmp15_);
#line 12184 "Commands.c"
	}
#line 1456 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp16_ = view_collection_new ("tmp");
#line 1456 "/home/jens/Source/shotwell/src/Commands.vala"
	all_events = _tmp16_;
#line 12190 "Commands.c"
	{
		GeeIterator* _dobj_it = NULL;
		EventSourceCollection* _tmp17_;
		GeeCollection* _tmp18_;
		GeeCollection* _tmp19_;
		GeeIterator* _tmp20_;
		GeeIterator* _tmp21_;
#line 1458 "/home/jens/Source/shotwell/src/Commands.vala"
		_tmp17_ = event_global;
#line 1458 "/home/jens/Source/shotwell/src/Commands.vala"
		_tmp18_ = data_collection_get_all (G_TYPE_CHECK_INSTANCE_CAST (_tmp17_, TYPE_DATA_COLLECTION, DataCollection));
#line 1458 "/home/jens/Source/shotwell/src/Commands.vala"
		_tmp19_ = _tmp18_;
#line 1458 "/home/jens/Source/shotwell/src/Commands.vala"
		_tmp20_ = gee_iterable_iterator (G_TYPE_CHECK_INSTANCE_CAST (_tmp19_, GEE_TYPE_ITERABLE, GeeIterable));
#line 1458 "/home/jens/Source/shotwell/src/Commands.vala"
		_tmp21_ = _tmp20_;
#line 1458 "/home/jens/Source/shotwell/src/Commands.vala"
		_g_object_unref0 (_tmp19_);
#line 1458 "/home/jens/Source/shotwell/src/Commands.vala"
		_dobj_it = _tmp21_;
#line 1458 "/home/jens/Source/shotwell/src/Commands.vala"
		while (TRUE) {
#line 12214 "Commands.c"
			GeeIterator* _tmp22_;
			gboolean _tmp23_;
			DataObject* dobj = NULL;
			GeeIterator* _tmp24_;
			gpointer _tmp25_;
			Event* event = NULL;
			DataObject* _tmp26_;
			Event* _tmp27_;
			Event* _tmp28_;
#line 1458 "/home/jens/Source/shotwell/src/Commands.vala"
			_tmp22_ = _dobj_it;
#line 1458 "/home/jens/Source/shotwell/src/Commands.vala"
			_tmp23_ = gee_iterator_next (_tmp22_);
#line 1458 "/home/jens/Source/shotwell/src/Commands.vala"
			if (!_tmp23_) {
#line 1458 "/home/jens/Source/shotwell/src/Commands.vala"
				break;
#line 12232 "Commands.c"
			}
#line 1458 "/home/jens/Source/shotwell/src/Commands.vala"
			_tmp24_ = _dobj_it;
#line 1458 "/home/jens/Source/shotwell/src/Commands.vala"
			_tmp25_ = gee_iterator_get (_tmp24_);
#line 1458 "/home/jens/Source/shotwell/src/Commands.vala"
			dobj = (DataObject*) _tmp25_;
#line 1459 "/home/jens/Source/shotwell/src/Commands.vala"
			_tmp26_ = dobj;
#line 1459 "/home/jens/Source/shotwell/src/Commands.vala"
			_tmp27_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_TYPE (_tmp26_, TYPE_EVENT) ? ((Event*) _tmp26_) : NULL);
#line 1459 "/home/jens/Source/shotwell/src/Commands.vala"
			event = _tmp27_;
#line 1460 "/home/jens/Source/shotwell/src/Commands.vala"
			_tmp28_ = event;
#line 1460 "/home/jens/Source/shotwell/src/Commands.vala"
			if (_tmp28_ != NULL) {
#line 12250 "Commands.c"
				ViewCollection* _tmp29_;
				Event* _tmp30_;
				EventView* _tmp31_;
				EventView* _tmp32_;
#line 1461 "/home/jens/Source/shotwell/src/Commands.vala"
				_tmp29_ = all_events;
#line 1461 "/home/jens/Source/shotwell/src/Commands.vala"
				_tmp30_ = event;
#line 1461 "/home/jens/Source/shotwell/src/Commands.vala"
				_tmp31_ = event_view_new (G_TYPE_CHECK_INSTANCE_CAST (_tmp30_, TYPE_EVENT_SOURCE, EventSource));
#line 1461 "/home/jens/Source/shotwell/src/Commands.vala"
				_tmp32_ = _tmp31_;
#line 1461 "/home/jens/Source/shotwell/src/Commands.vala"
				data_collection_add (G_TYPE_CHECK_INSTANCE_CAST (_tmp29_, TYPE_DATA_COLLECTION, DataCollection), G_TYPE_CHECK_INSTANCE_CAST (_tmp32_, TYPE_DATA_OBJECT, DataObject));
#line 1461 "/home/jens/Source/shotwell/src/Commands.vala"
				_g_object_unref0 (_tmp32_);
#line 12267 "Commands.c"
			}
#line 1458 "/home/jens/Source/shotwell/src/Commands.vala"
			_g_object_unref0 (event);
#line 1458 "/home/jens/Source/shotwell/src/Commands.vala"
			_g_object_unref0 (dobj);
#line 12273 "Commands.c"
		}
#line 1458 "/home/jens/Source/shotwell/src/Commands.vala"
		_g_object_unref0 (_dobj_it);
#line 12277 "Commands.c"
	}
#line 1464 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp33_ = dateable;
#line 1464 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp34_ = all_events;
#line 1464 "/home/jens/Source/shotwell/src/Commands.vala"
	event_generate_single_event (G_TYPE_CHECK_INSTANCE_CAST (_tmp33_, TYPE_MEDIA_SOURCE, MediaSource), _tmp34_, NULL);
#line 1446 "/home/jens/Source/shotwell/src/Commands.vala"
	_data_collection_unref0 (all_events);
#line 1446 "/home/jens/Source/shotwell/src/Commands.vala"
	_g_object_unref0 (dateable);
#line 12289 "Commands.c"
}


static void adjust_date_time_photos_command_real_undo_on_source (MultipleDataSourceCommand* base, DataSource* source) {
	AdjustDateTimePhotosCommand * self;
	Dateable* photo = NULL;
	DataSource* _tmp0_;
	Dateable* _tmp1_;
	GeeHashMap* _tmp2_;
	Dateable* _tmp3_;
	gboolean _tmp4_;
	DataSource* _tmp16_;
	GeeMap* _tmp17_;
	DataSource* _tmp18_;
	gpointer _tmp19_;
	Event* _tmp20_;
#line 1467 "/home/jens/Source/shotwell/src/Commands.vala"
	self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_ADJUST_DATE_TIME_PHOTOS_COMMAND, AdjustDateTimePhotosCommand);
#line 1467 "/home/jens/Source/shotwell/src/Commands.vala"
	g_return_if_fail (IS_DATA_SOURCE (source));
#line 1468 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp0_ = source;
#line 1468 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp1_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, TYPE_DATEABLE, Dateable));
#line 1468 "/home/jens/Source/shotwell/src/Commands.vala"
	photo = _tmp1_;
#line 1470 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp2_ = self->priv->old_times;
#line 1470 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp3_ = photo;
#line 1470 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp4_ = gee_abstract_map_has_key (G_TYPE_CHECK_INSTANCE_CAST (_tmp2_, GEE_TYPE_ABSTRACT_MAP, GeeAbstractMap), _tmp3_);
#line 1470 "/home/jens/Source/shotwell/src/Commands.vala"
	if (_tmp4_) {
#line 12324 "Commands.c"
		Dateable* _tmp5_;
		GeeHashMap* _tmp6_;
		Dateable* _tmp7_;
		gpointer _tmp8_;
		time_t* _tmp9_;
		GeeHashMap* _tmp10_;
		Dateable* _tmp11_;
#line 1471 "/home/jens/Source/shotwell/src/Commands.vala"
		_tmp5_ = photo;
#line 1471 "/home/jens/Source/shotwell/src/Commands.vala"
		_tmp6_ = self->priv->old_times;
#line 1471 "/home/jens/Source/shotwell/src/Commands.vala"
		_tmp7_ = photo;
#line 1471 "/home/jens/Source/shotwell/src/Commands.vala"
		_tmp8_ = gee_abstract_map_get (G_TYPE_CHECK_INSTANCE_CAST (_tmp6_, GEE_TYPE_ABSTRACT_MAP, GeeAbstractMap), _tmp7_);
#line 1471 "/home/jens/Source/shotwell/src/Commands.vala"
		_tmp9_ = (time_t*) _tmp8_;
#line 1471 "/home/jens/Source/shotwell/src/Commands.vala"
		adjust_date_time_photos_command_set_time (self, _tmp5_, *_tmp9_);
#line 1471 "/home/jens/Source/shotwell/src/Commands.vala"
		_g_free0 (_tmp9_);
#line 1472 "/home/jens/Source/shotwell/src/Commands.vala"
		_tmp10_ = self->priv->old_times;
#line 1472 "/home/jens/Source/shotwell/src/Commands.vala"
		_tmp11_ = photo;
#line 1472 "/home/jens/Source/shotwell/src/Commands.vala"
		gee_abstract_map_unset (G_TYPE_CHECK_INSTANCE_CAST (_tmp10_, GEE_TYPE_ABSTRACT_MAP, GeeAbstractMap), _tmp11_, NULL);
#line 12352 "Commands.c"
	} else {
		Dateable* _tmp12_;
		Dateable* _tmp13_;
		time_t _tmp14_;
		gint64 _tmp15_;
#line 1474 "/home/jens/Source/shotwell/src/Commands.vala"
		_tmp12_ = photo;
#line 1474 "/home/jens/Source/shotwell/src/Commands.vala"
		_tmp13_ = photo;
#line 1474 "/home/jens/Source/shotwell/src/Commands.vala"
		_tmp14_ = dateable_get_exposure_time (_tmp13_);
#line 1474 "/home/jens/Source/shotwell/src/Commands.vala"
		_tmp15_ = self->priv->time_shift;
#line 1474 "/home/jens/Source/shotwell/src/Commands.vala"
		adjust_date_time_photos_command_set_time (self, _tmp12_, _tmp14_ - ((time_t) _tmp15_));
#line 12368 "Commands.c"
	}
#line 1477 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp16_ = source;
#line 1477 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp17_ = self->priv->prev_events;
#line 1477 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp18_ = source;
#line 1477 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp19_ = gee_map_get (_tmp17_, G_TYPE_CHECK_INSTANCE_TYPE (_tmp18_, TYPE_DATEABLE) ? ((Dateable*) _tmp18_) : NULL);
#line 1477 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp20_ = (Event*) _tmp19_;
#line 1477 "/home/jens/Source/shotwell/src/Commands.vala"
	media_source_set_event (G_TYPE_CHECK_INSTANCE_TYPE (_tmp16_, TYPE_MEDIA_SOURCE) ? ((MediaSource*) _tmp16_) : NULL, _tmp20_);
#line 1477 "/home/jens/Source/shotwell/src/Commands.vala"
	_g_object_unref0 (_tmp20_);
#line 1467 "/home/jens/Source/shotwell/src/Commands.vala"
	_g_object_unref0 (photo);
#line 12386 "Commands.c"
}


static void adjust_date_time_photos_command_class_init (AdjustDateTimePhotosCommandClass * klass) {
#line 1355 "/home/jens/Source/shotwell/src/Commands.vala"
	adjust_date_time_photos_command_parent_class = g_type_class_peek_parent (klass);
#line 1355 "/home/jens/Source/shotwell/src/Commands.vala"
	g_type_class_add_private (klass, sizeof (AdjustDateTimePhotosCommandPrivate));
#line 1355 "/home/jens/Source/shotwell/src/Commands.vala"
	((CommandClass *) klass)->execute = (void (*) (Command *)) adjust_date_time_photos_command_real_execute;
#line 1355 "/home/jens/Source/shotwell/src/Commands.vala"
	((CommandClass *) klass)->undo = (void (*) (Command *)) adjust_date_time_photos_command_real_undo;
#line 1355 "/home/jens/Source/shotwell/src/Commands.vala"
	((MultipleDataSourceCommandClass *) klass)->execute_on_source = (void (*) (MultipleDataSourceCommand *, DataSource*)) adjust_date_time_photos_command_real_execute_on_source;
#line 1355 "/home/jens/Source/shotwell/src/Commands.vala"
	((MultipleDataSourceCommandClass *) klass)->undo_on_source = (void (*) (MultipleDataSourceCommand *, DataSource*)) adjust_date_time_photos_command_real_undo_on_source;
#line 1355 "/home/jens/Source/shotwell/src/Commands.vala"
	G_OBJECT_CLASS (klass)->finalize = adjust_date_time_photos_command_finalize;
#line 12405 "Commands.c"
}


static void adjust_date_time_photos_command_instance_init (AdjustDateTimePhotosCommand * self) {
#line 1355 "/home/jens/Source/shotwell/src/Commands.vala"
	self->priv = ADJUST_DATE_TIME_PHOTOS_COMMAND_GET_PRIVATE (self);
#line 1362 "/home/jens/Source/shotwell/src/Commands.vala"
	self->priv->new_time = NULL;
#line 12414 "Commands.c"
}


static void adjust_date_time_photos_command_finalize (GObject * obj) {
	AdjustDateTimePhotosCommand * self;
#line 1355 "/home/jens/Source/shotwell/src/Commands.vala"
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, TYPE_ADJUST_DATE_TIME_PHOTOS_COMMAND, AdjustDateTimePhotosCommand);
#line 1359 "/home/jens/Source/shotwell/src/Commands.vala"
	_g_object_unref0 (self->priv->prev_events);
#line 1362 "/home/jens/Source/shotwell/src/Commands.vala"
	_g_free0 (self->priv->new_time);
#line 1363 "/home/jens/Source/shotwell/src/Commands.vala"
	_g_object_unref0 (self->priv->old_times);
#line 1364 "/home/jens/Source/shotwell/src/Commands.vala"
	_g_object_unref0 (self->priv->error_list);
#line 1355 "/home/jens/Source/shotwell/src/Commands.vala"
	G_OBJECT_CLASS (adjust_date_time_photos_command_parent_class)->finalize (obj);
#line 12432 "Commands.c"
}


GType adjust_date_time_photos_command_get_type (void) {
	static volatile gsize adjust_date_time_photos_command_type_id__volatile = 0;
	if (g_once_init_enter (&adjust_date_time_photos_command_type_id__volatile)) {
		static const GTypeInfo g_define_type_info = { sizeof (AdjustDateTimePhotosCommandClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) adjust_date_time_photos_command_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (AdjustDateTimePhotosCommand), 0, (GInstanceInitFunc) adjust_date_time_photos_command_instance_init, NULL };
		GType adjust_date_time_photos_command_type_id;
		adjust_date_time_photos_command_type_id = g_type_register_static (TYPE_MULTIPLE_DATA_SOURCE_COMMAND, "AdjustDateTimePhotosCommand", &g_define_type_info, 0);
		g_once_init_leave (&adjust_date_time_photos_command_type_id__volatile, adjust_date_time_photos_command_type_id);
	}
	return adjust_date_time_photos_command_type_id__volatile;
}


static void _add_tags_command_on_proxy_broken_source_proxy_broken (SourceProxy* _sender, gpointer self) {
#line 1521 "/home/jens/Source/shotwell/src/Commands.vala"
	add_tags_command_on_proxy_broken ((AddTagsCommand*) self);
#line 12451 "Commands.c"
}


static void _add_tags_command_on_source_destroyed_source_collection_item_destroyed (SourceCollection* _sender, DataSource* source, gpointer self) {
#line 1523 "/home/jens/Source/shotwell/src/Commands.vala"
	add_tags_command_on_source_destroyed ((AddTagsCommand*) self, source);
#line 12458 "Commands.c"
}


AddTagsCommand* add_tags_command_construct (GType object_type, gchar** paths, int paths_length1, GeeCollection* sources) {
	AddTagsCommand * self = NULL;
	gchar** _tmp0_;
	gint _tmp0__length1;
	gchar* _tmp1_;
	gchar* _tmp2_;
	gchar** _tmp3_;
	gint _tmp3__length1;
	LibraryPhotoSourceCollection* _tmp43_;
	VideoSourceCollection* _tmp44_;
#line 1485 "/home/jens/Source/shotwell/src/Commands.vala"
	g_return_val_if_fail (GEE_IS_COLLECTION (sources), NULL);
#line 1486 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp0_ = paths;
#line 1486 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp0__length1 = paths_length1;
#line 1486 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp1_ = resources_add_tags_label (_tmp0_, _tmp0__length1);
#line 1486 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp2_ = _tmp1_;
#line 1486 "/home/jens/Source/shotwell/src/Commands.vala"
	self = (AddTagsCommand*) page_command_construct (object_type, _tmp2_, "");
#line 1486 "/home/jens/Source/shotwell/src/Commands.vala"
	_g_free0 (_tmp2_);
#line 1491 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp3_ = paths;
#line 1491 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp3__length1 = paths_length1;
#line 12490 "Commands.c"
	{
		gchar** path_collection = NULL;
		gint path_collection_length1 = 0;
		gint _path_collection_size_ = 0;
		gint path_it = 0;
#line 1491 "/home/jens/Source/shotwell/src/Commands.vala"
		path_collection = _tmp3_;
#line 1491 "/home/jens/Source/shotwell/src/Commands.vala"
		path_collection_length1 = _tmp3__length1;
#line 1491 "/home/jens/Source/shotwell/src/Commands.vala"
		for (path_it = 0; path_it < _tmp3__length1; path_it = path_it + 1) {
#line 12502 "Commands.c"
			gchar* _tmp4_;
			gchar* path = NULL;
#line 1491 "/home/jens/Source/shotwell/src/Commands.vala"
			_tmp4_ = g_strdup (path_collection[path_it]);
#line 1491 "/home/jens/Source/shotwell/src/Commands.vala"
			path = _tmp4_;
#line 12509 "Commands.c"
			{
				GeeList* paths_to_create = NULL;
				const gchar* _tmp5_;
				GeeList* _tmp6_;
				GeeList* _tmp7_;
				const gchar* _tmp8_;
#line 1492 "/home/jens/Source/shotwell/src/Commands.vala"
				_tmp5_ = path;
#line 1492 "/home/jens/Source/shotwell/src/Commands.vala"
				_tmp6_ = hierarchical_tag_utilities_enumerate_parent_paths (_tmp5_);
#line 1492 "/home/jens/Source/shotwell/src/Commands.vala"
				paths_to_create = _tmp6_;
#line 1494 "/home/jens/Source/shotwell/src/Commands.vala"
				_tmp7_ = paths_to_create;
#line 1494 "/home/jens/Source/shotwell/src/Commands.vala"
				_tmp8_ = path;
#line 1494 "/home/jens/Source/shotwell/src/Commands.vala"
				gee_collection_add (G_TYPE_CHECK_INSTANCE_CAST (_tmp7_, GEE_TYPE_COLLECTION, GeeCollection), _tmp8_);
#line 12528 "Commands.c"
				{
					GeeList* _create_path_list = NULL;
					GeeList* _tmp9_;
					GeeList* _tmp10_;
					gint _create_path_size = 0;
					GeeList* _tmp11_;
					gint _tmp12_;
					gint _tmp13_;
					gint _create_path_index = 0;
#line 1496 "/home/jens/Source/shotwell/src/Commands.vala"
					_tmp9_ = paths_to_create;
#line 1496 "/home/jens/Source/shotwell/src/Commands.vala"
					_tmp10_ = _g_object_ref0 (_tmp9_);
#line 1496 "/home/jens/Source/shotwell/src/Commands.vala"
					_create_path_list = _tmp10_;
#line 1496 "/home/jens/Source/shotwell/src/Commands.vala"
					_tmp11_ = _create_path_list;
#line 1496 "/home/jens/Source/shotwell/src/Commands.vala"
					_tmp12_ = gee_collection_get_size (G_TYPE_CHECK_INSTANCE_CAST (_tmp11_, GEE_TYPE_COLLECTION, GeeCollection));
#line 1496 "/home/jens/Source/shotwell/src/Commands.vala"
					_tmp13_ = _tmp12_;
#line 1496 "/home/jens/Source/shotwell/src/Commands.vala"
					_create_path_size = _tmp13_;
#line 1496 "/home/jens/Source/shotwell/src/Commands.vala"
					_create_path_index = -1;
#line 1496 "/home/jens/Source/shotwell/src/Commands.vala"
					while (TRUE) {
#line 12556 "Commands.c"
						gint _tmp14_;
						gint _tmp15_;
						gint _tmp16_;
						gchar* create_path = NULL;
						GeeList* _tmp17_;
						gint _tmp18_;
						gpointer _tmp19_;
						Tag* tag = NULL;
						const gchar* _tmp20_;
						Tag* _tmp21_;
						SourceProxy* tag_proxy = NULL;
						Tag* _tmp22_;
						SourceProxy* _tmp23_;
						GeeArrayList* add_sources = NULL;
						GeeArrayList* _tmp24_;
						GeeArrayList* _tmp36_;
						gint _tmp37_;
						gint _tmp38_;
#line 1496 "/home/jens/Source/shotwell/src/Commands.vala"
						_tmp14_ = _create_path_index;
#line 1496 "/home/jens/Source/shotwell/src/Commands.vala"
						_create_path_index = _tmp14_ + 1;
#line 1496 "/home/jens/Source/shotwell/src/Commands.vala"
						_tmp15_ = _create_path_index;
#line 1496 "/home/jens/Source/shotwell/src/Commands.vala"
						_tmp16_ = _create_path_size;
#line 1496 "/home/jens/Source/shotwell/src/Commands.vala"
						if (!(_tmp15_ < _tmp16_)) {
#line 1496 "/home/jens/Source/shotwell/src/Commands.vala"
							break;
#line 12587 "Commands.c"
						}
#line 1496 "/home/jens/Source/shotwell/src/Commands.vala"
						_tmp17_ = _create_path_list;
#line 1496 "/home/jens/Source/shotwell/src/Commands.vala"
						_tmp18_ = _create_path_index;
#line 1496 "/home/jens/Source/shotwell/src/Commands.vala"
						_tmp19_ = gee_list_get (_tmp17_, _tmp18_);
#line 1496 "/home/jens/Source/shotwell/src/Commands.vala"
						create_path = (gchar*) _tmp19_;
#line 1497 "/home/jens/Source/shotwell/src/Commands.vala"
						_tmp20_ = create_path;
#line 1497 "/home/jens/Source/shotwell/src/Commands.vala"
						_tmp21_ = tag_for_path (_tmp20_);
#line 1497 "/home/jens/Source/shotwell/src/Commands.vala"
						tag = _tmp21_;
#line 1498 "/home/jens/Source/shotwell/src/Commands.vala"
						_tmp22_ = tag;
#line 1498 "/home/jens/Source/shotwell/src/Commands.vala"
						_tmp23_ = proxyable_get_proxy (G_TYPE_CHECK_INSTANCE_CAST (_tmp22_, TYPE_PROXYABLE, Proxyable));
#line 1498 "/home/jens/Source/shotwell/src/Commands.vala"
						tag_proxy = _tmp23_;
#line 1502 "/home/jens/Source/shotwell/src/Commands.vala"
						_tmp24_ = gee_array_list_new (TYPE_MEDIA_SOURCE, (GBoxedCopyFunc) g_object_ref, (GDestroyNotify) g_object_unref, NULL, NULL, NULL);
#line 1502 "/home/jens/Source/shotwell/src/Commands.vala"
						add_sources = _tmp24_;
#line 12613 "Commands.c"
						{
							GeeIterator* _source_it = NULL;
							GeeCollection* _tmp25_;
							GeeIterator* _tmp26_;
#line 1503 "/home/jens/Source/shotwell/src/Commands.vala"
							_tmp25_ = sources;
#line 1503 "/home/jens/Source/shotwell/src/Commands.vala"
							_tmp26_ = gee_iterable_iterator (G_TYPE_CHECK_INSTANCE_CAST (_tmp25_, GEE_TYPE_ITERABLE, GeeIterable));
#line 1503 "/home/jens/Source/shotwell/src/Commands.vala"
							_source_it = _tmp26_;
#line 1503 "/home/jens/Source/shotwell/src/Commands.vala"
							while (TRUE) {
#line 12626 "Commands.c"
								GeeIterator* _tmp27_;
								gboolean _tmp28_;
								MediaSource* source = NULL;
								GeeIterator* _tmp29_;
								gpointer _tmp30_;
								Tag* _tmp31_;
								MediaSource* _tmp32_;
								gboolean _tmp33_;
#line 1503 "/home/jens/Source/shotwell/src/Commands.vala"
								_tmp27_ = _source_it;
#line 1503 "/home/jens/Source/shotwell/src/Commands.vala"
								_tmp28_ = gee_iterator_next (_tmp27_);
#line 1503 "/home/jens/Source/shotwell/src/Commands.vala"
								if (!_tmp28_) {
#line 1503 "/home/jens/Source/shotwell/src/Commands.vala"
									break;
#line 12643 "Commands.c"
								}
#line 1503 "/home/jens/Source/shotwell/src/Commands.vala"
								_tmp29_ = _source_it;
#line 1503 "/home/jens/Source/shotwell/src/Commands.vala"
								_tmp30_ = gee_iterator_get (_tmp29_);
#line 1503 "/home/jens/Source/shotwell/src/Commands.vala"
								source = (MediaSource*) _tmp30_;
#line 1504 "/home/jens/Source/shotwell/src/Commands.vala"
								_tmp31_ = tag;
#line 1504 "/home/jens/Source/shotwell/src/Commands.vala"
								_tmp32_ = source;
#line 1504 "/home/jens/Source/shotwell/src/Commands.vala"
								_tmp33_ = tag_contains (_tmp31_, _tmp32_);
#line 1504 "/home/jens/Source/shotwell/src/Commands.vala"
								if (!_tmp33_) {
#line 12659 "Commands.c"
									GeeArrayList* _tmp34_;
									MediaSource* _tmp35_;
#line 1505 "/home/jens/Source/shotwell/src/Commands.vala"
									_tmp34_ = add_sources;
#line 1505 "/home/jens/Source/shotwell/src/Commands.vala"
									_tmp35_ = source;
#line 1505 "/home/jens/Source/shotwell/src/Commands.vala"
									gee_abstract_collection_add (G_TYPE_CHECK_INSTANCE_CAST (_tmp34_, GEE_TYPE_ABSTRACT_COLLECTION, GeeAbstractCollection), _tmp35_);
#line 12668 "Commands.c"
								}
#line 1503 "/home/jens/Source/shotwell/src/Commands.vala"
								_g_object_unref0 (source);
#line 12672 "Commands.c"
							}
#line 1503 "/home/jens/Source/shotwell/src/Commands.vala"
							_g_object_unref0 (_source_it);
#line 12676 "Commands.c"
						}
#line 1508 "/home/jens/Source/shotwell/src/Commands.vala"
						_tmp36_ = add_sources;
#line 1508 "/home/jens/Source/shotwell/src/Commands.vala"
						_tmp37_ = gee_abstract_collection_get_size (G_TYPE_CHECK_INSTANCE_CAST (_tmp36_, GEE_TYPE_ABSTRACT_COLLECTION, GeeAbstractCollection));
#line 1508 "/home/jens/Source/shotwell/src/Commands.vala"
						_tmp38_ = _tmp37_;
#line 1508 "/home/jens/Source/shotwell/src/Commands.vala"
						if (_tmp38_ > 0) {
#line 12686 "Commands.c"
							SourceProxy* _tmp39_;
							GeeHashMap* _tmp40_;
							SourceProxy* _tmp41_;
							GeeArrayList* _tmp42_;
#line 1509 "/home/jens/Source/shotwell/src/Commands.vala"
							_tmp39_ = tag_proxy;
#line 1509 "/home/jens/Source/shotwell/src/Commands.vala"
							g_signal_connect_object (_tmp39_, "broken", (GCallback) _add_tags_command_on_proxy_broken_source_proxy_broken, self, 0);
#line 1510 "/home/jens/Source/shotwell/src/Commands.vala"
							_tmp40_ = self->priv->map;
#line 1510 "/home/jens/Source/shotwell/src/Commands.vala"
							_tmp41_ = tag_proxy;
#line 1510 "/home/jens/Source/shotwell/src/Commands.vala"
							_tmp42_ = add_sources;
#line 1510 "/home/jens/Source/shotwell/src/Commands.vala"
							gee_abstract_map_set (G_TYPE_CHECK_INSTANCE_CAST (_tmp40_, GEE_TYPE_ABSTRACT_MAP, GeeAbstractMap), _tmp41_, _tmp42_);
#line 12703 "Commands.c"
						}
#line 1496 "/home/jens/Source/shotwell/src/Commands.vala"
						_g_object_unref0 (add_sources);
#line 1496 "/home/jens/Source/shotwell/src/Commands.vala"
						_source_proxy_unref0 (tag_proxy);
#line 1496 "/home/jens/Source/shotwell/src/Commands.vala"
						_g_object_unref0 (tag);
#line 1496 "/home/jens/Source/shotwell/src/Commands.vala"
						_g_free0 (create_path);
#line 12713 "Commands.c"
					}
#line 1496 "/home/jens/Source/shotwell/src/Commands.vala"
					_g_object_unref0 (_create_path_list);
#line 12717 "Commands.c"
				}
#line 1491 "/home/jens/Source/shotwell/src/Commands.vala"
				_g_object_unref0 (paths_to_create);
#line 1491 "/home/jens/Source/shotwell/src/Commands.vala"
				_g_free0 (path);
#line 12723 "Commands.c"
			}
		}
	}
#line 1515 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp43_ = library_photo_global;
#line 1515 "/home/jens/Source/shotwell/src/Commands.vala"
	g_signal_connect_object (G_TYPE_CHECK_INSTANCE_CAST (_tmp43_, TYPE_SOURCE_COLLECTION, SourceCollection), "item-destroyed", (GCallback) _add_tags_command_on_source_destroyed_source_collection_item_destroyed, self, 0);
#line 1516 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp44_ = video_global;
#line 1516 "/home/jens/Source/shotwell/src/Commands.vala"
	g_signal_connect_object (G_TYPE_CHECK_INSTANCE_CAST (_tmp44_, TYPE_SOURCE_COLLECTION, SourceCollection), "item-destroyed", (GCallback) _add_tags_command_on_source_destroyed_source_collection_item_destroyed, self, 0);
#line 1485 "/home/jens/Source/shotwell/src/Commands.vala"
	return self;
#line 12737 "Commands.c"
}


AddTagsCommand* add_tags_command_new (gchar** paths, int paths_length1, GeeCollection* sources) {
#line 1485 "/home/jens/Source/shotwell/src/Commands.vala"
	return add_tags_command_construct (TYPE_ADD_TAGS_COMMAND, paths, paths_length1, sources);
#line 12744 "Commands.c"
}


static void add_tags_command_real_execute (Command* base) {
	AddTagsCommand * self;
#line 1527 "/home/jens/Source/shotwell/src/Commands.vala"
	self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_ADD_TAGS_COMMAND, AddTagsCommand);
#line 12752 "Commands.c"
	{
		GeeIterator* _tag_proxy_it = NULL;
		GeeHashMap* _tmp0_;
		GeeSet* _tmp1_;
		GeeSet* _tmp2_;
		GeeSet* _tmp3_;
		GeeIterator* _tmp4_;
		GeeIterator* _tmp5_;
#line 1528 "/home/jens/Source/shotwell/src/Commands.vala"
		_tmp0_ = self->priv->map;
#line 1528 "/home/jens/Source/shotwell/src/Commands.vala"
		_tmp1_ = gee_abstract_map_get_keys (G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, GEE_TYPE_ABSTRACT_MAP, GeeAbstractMap));
#line 1528 "/home/jens/Source/shotwell/src/Commands.vala"
		_tmp2_ = _tmp1_;
#line 1528 "/home/jens/Source/shotwell/src/Commands.vala"
		_tmp3_ = _tmp2_;
#line 1528 "/home/jens/Source/shotwell/src/Commands.vala"
		_tmp4_ = gee_iterable_iterator (G_TYPE_CHECK_INSTANCE_CAST (_tmp3_, GEE_TYPE_ITERABLE, GeeIterable));
#line 1528 "/home/jens/Source/shotwell/src/Commands.vala"
		_tmp5_ = _tmp4_;
#line 1528 "/home/jens/Source/shotwell/src/Commands.vala"
		_g_object_unref0 (_tmp3_);
#line 1528 "/home/jens/Source/shotwell/src/Commands.vala"
		_tag_proxy_it = _tmp5_;
#line 1528 "/home/jens/Source/shotwell/src/Commands.vala"
		while (TRUE) {
#line 12779 "Commands.c"
			GeeIterator* _tmp6_;
			gboolean _tmp7_;
			SourceProxy* tag_proxy = NULL;
			GeeIterator* _tmp8_;
			gpointer _tmp9_;
			SourceProxy* _tmp10_;
			DataSource* _tmp11_;
			Tag* _tmp12_;
			GeeHashMap* _tmp13_;
			SourceProxy* _tmp14_;
			gpointer _tmp15_;
			GeeArrayList* _tmp16_;
#line 1528 "/home/jens/Source/shotwell/src/Commands.vala"
			_tmp6_ = _tag_proxy_it;
#line 1528 "/home/jens/Source/shotwell/src/Commands.vala"
			_tmp7_ = gee_iterator_next (_tmp6_);
#line 1528 "/home/jens/Source/shotwell/src/Commands.vala"
			if (!_tmp7_) {
#line 1528 "/home/jens/Source/shotwell/src/Commands.vala"
				break;
#line 12800 "Commands.c"
			}
#line 1528 "/home/jens/Source/shotwell/src/Commands.vala"
			_tmp8_ = _tag_proxy_it;
#line 1528 "/home/jens/Source/shotwell/src/Commands.vala"
			_tmp9_ = gee_iterator_get (_tmp8_);
#line 1528 "/home/jens/Source/shotwell/src/Commands.vala"
			tag_proxy = (SourceProxy*) _tmp9_;
#line 1529 "/home/jens/Source/shotwell/src/Commands.vala"
			_tmp10_ = tag_proxy;
#line 1529 "/home/jens/Source/shotwell/src/Commands.vala"
			_tmp11_ = source_proxy_get_source (_tmp10_);
#line 1529 "/home/jens/Source/shotwell/src/Commands.vala"
			_tmp12_ = G_TYPE_CHECK_INSTANCE_CAST (_tmp11_, TYPE_TAG, Tag);
#line 1529 "/home/jens/Source/shotwell/src/Commands.vala"
			_tmp13_ = self->priv->map;
#line 1529 "/home/jens/Source/shotwell/src/Commands.vala"
			_tmp14_ = tag_proxy;
#line 1529 "/home/jens/Source/shotwell/src/Commands.vala"
			_tmp15_ = gee_abstract_map_get (G_TYPE_CHECK_INSTANCE_CAST (_tmp13_, GEE_TYPE_ABSTRACT_MAP, GeeAbstractMap), _tmp14_);
#line 1529 "/home/jens/Source/shotwell/src/Commands.vala"
			_tmp16_ = (GeeArrayList*) _tmp15_;
#line 1529 "/home/jens/Source/shotwell/src/Commands.vala"
			tag_attach_many (_tmp12_, G_TYPE_CHECK_INSTANCE_CAST (_tmp16_, GEE_TYPE_COLLECTION, GeeCollection));
#line 1529 "/home/jens/Source/shotwell/src/Commands.vala"
			_g_object_unref0 (_tmp16_);
#line 1529 "/home/jens/Source/shotwell/src/Commands.vala"
			_g_object_unref0 (_tmp12_);
#line 1528 "/home/jens/Source/shotwell/src/Commands.vala"
			_source_proxy_unref0 (tag_proxy);
#line 12830 "Commands.c"
		}
#line 1528 "/home/jens/Source/shotwell/src/Commands.vala"
		_g_object_unref0 (_tag_proxy_it);
#line 12834 "Commands.c"
	}
}


static void add_tags_command_real_undo (Command* base) {
	AddTagsCommand * self;
#line 1532 "/home/jens/Source/shotwell/src/Commands.vala"
	self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_ADD_TAGS_COMMAND, AddTagsCommand);
#line 12843 "Commands.c"
	{
		GeeIterator* _tag_proxy_it = NULL;
		GeeHashMap* _tmp0_;
		GeeSet* _tmp1_;
		GeeSet* _tmp2_;
		GeeSet* _tmp3_;
		GeeIterator* _tmp4_;
		GeeIterator* _tmp5_;
#line 1533 "/home/jens/Source/shotwell/src/Commands.vala"
		_tmp0_ = self->priv->map;
#line 1533 "/home/jens/Source/shotwell/src/Commands.vala"
		_tmp1_ = gee_abstract_map_get_keys (G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, GEE_TYPE_ABSTRACT_MAP, GeeAbstractMap));
#line 1533 "/home/jens/Source/shotwell/src/Commands.vala"
		_tmp2_ = _tmp1_;
#line 1533 "/home/jens/Source/shotwell/src/Commands.vala"
		_tmp3_ = _tmp2_;
#line 1533 "/home/jens/Source/shotwell/src/Commands.vala"
		_tmp4_ = gee_iterable_iterator (G_TYPE_CHECK_INSTANCE_CAST (_tmp3_, GEE_TYPE_ITERABLE, GeeIterable));
#line 1533 "/home/jens/Source/shotwell/src/Commands.vala"
		_tmp5_ = _tmp4_;
#line 1533 "/home/jens/Source/shotwell/src/Commands.vala"
		_g_object_unref0 (_tmp3_);
#line 1533 "/home/jens/Source/shotwell/src/Commands.vala"
		_tag_proxy_it = _tmp5_;
#line 1533 "/home/jens/Source/shotwell/src/Commands.vala"
		while (TRUE) {
#line 12870 "Commands.c"
			GeeIterator* _tmp6_;
			gboolean _tmp7_;
			SourceProxy* tag_proxy = NULL;
			GeeIterator* _tmp8_;
			gpointer _tmp9_;
			Tag* tag = NULL;
			SourceProxy* _tmp10_;
			DataSource* _tmp11_;
			Tag* _tmp12_;
			GeeHashMap* _tmp13_;
			SourceProxy* _tmp14_;
			gpointer _tmp15_;
			GeeArrayList* _tmp16_;
			GeeMultiMap* _tmp17_;
			GeeMultiMap* _tmp18_;
#line 1533 "/home/jens/Source/shotwell/src/Commands.vala"
			_tmp6_ = _tag_proxy_it;
#line 1533 "/home/jens/Source/shotwell/src/Commands.vala"
			_tmp7_ = gee_iterator_next (_tmp6_);
#line 1533 "/home/jens/Source/shotwell/src/Commands.vala"
			if (!_tmp7_) {
#line 1533 "/home/jens/Source/shotwell/src/Commands.vala"
				break;
#line 12894 "Commands.c"
			}
#line 1533 "/home/jens/Source/shotwell/src/Commands.vala"
			_tmp8_ = _tag_proxy_it;
#line 1533 "/home/jens/Source/shotwell/src/Commands.vala"
			_tmp9_ = gee_iterator_get (_tmp8_);
#line 1533 "/home/jens/Source/shotwell/src/Commands.vala"
			tag_proxy = (SourceProxy*) _tmp9_;
#line 1534 "/home/jens/Source/shotwell/src/Commands.vala"
			_tmp10_ = tag_proxy;
#line 1534 "/home/jens/Source/shotwell/src/Commands.vala"
			_tmp11_ = source_proxy_get_source (_tmp10_);
#line 1534 "/home/jens/Source/shotwell/src/Commands.vala"
			tag = G_TYPE_CHECK_INSTANCE_CAST (_tmp11_, TYPE_TAG, Tag);
#line 1536 "/home/jens/Source/shotwell/src/Commands.vala"
			_tmp12_ = tag;
#line 1536 "/home/jens/Source/shotwell/src/Commands.vala"
			_tmp13_ = self->priv->map;
#line 1536 "/home/jens/Source/shotwell/src/Commands.vala"
			_tmp14_ = tag_proxy;
#line 1536 "/home/jens/Source/shotwell/src/Commands.vala"
			_tmp15_ = gee_abstract_map_get (G_TYPE_CHECK_INSTANCE_CAST (_tmp13_, GEE_TYPE_ABSTRACT_MAP, GeeAbstractMap), _tmp14_);
#line 1536 "/home/jens/Source/shotwell/src/Commands.vala"
			_tmp16_ = (GeeArrayList*) _tmp15_;
#line 1536 "/home/jens/Source/shotwell/src/Commands.vala"
			_tmp17_ = tag_detach_many (_tmp12_, G_TYPE_CHECK_INSTANCE_CAST (_tmp16_, GEE_TYPE_COLLECTION, GeeCollection));
#line 1536 "/home/jens/Source/shotwell/src/Commands.vala"
			_tmp18_ = _tmp17_;
#line 1536 "/home/jens/Source/shotwell/src/Commands.vala"
			_g_object_unref0 (_tmp18_);
#line 1536 "/home/jens/Source/shotwell/src/Commands.vala"
			_g_object_unref0 (_tmp16_);
#line 1533 "/home/jens/Source/shotwell/src/Commands.vala"
			_g_object_unref0 (tag);
#line 1533 "/home/jens/Source/shotwell/src/Commands.vala"
			_source_proxy_unref0 (tag_proxy);
#line 12930 "Commands.c"
		}
#line 1533 "/home/jens/Source/shotwell/src/Commands.vala"
		_g_object_unref0 (_tag_proxy_it);
#line 12934 "Commands.c"
	}
}


static void add_tags_command_on_source_destroyed (AddTagsCommand* self, DataSource* source) {
#line 1540 "/home/jens/Source/shotwell/src/Commands.vala"
	g_return_if_fail (IS_ADD_TAGS_COMMAND (self));
#line 1540 "/home/jens/Source/shotwell/src/Commands.vala"
	g_return_if_fail (IS_DATA_SOURCE (source));
#line 12944 "Commands.c"
	{
		GeeIterator* _sources_it = NULL;
		GeeHashMap* _tmp0_;
		GeeCollection* _tmp1_;
		GeeCollection* _tmp2_;
		GeeCollection* _tmp3_;
		GeeIterator* _tmp4_;
		GeeIterator* _tmp5_;
#line 1541 "/home/jens/Source/shotwell/src/Commands.vala"
		_tmp0_ = self->priv->map;
#line 1541 "/home/jens/Source/shotwell/src/Commands.vala"
		_tmp1_ = gee_abstract_map_get_values (G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, GEE_TYPE_ABSTRACT_MAP, GeeAbstractMap));
#line 1541 "/home/jens/Source/shotwell/src/Commands.vala"
		_tmp2_ = _tmp1_;
#line 1541 "/home/jens/Source/shotwell/src/Commands.vala"
		_tmp3_ = _tmp2_;
#line 1541 "/home/jens/Source/shotwell/src/Commands.vala"
		_tmp4_ = gee_iterable_iterator (G_TYPE_CHECK_INSTANCE_CAST (_tmp3_, GEE_TYPE_ITERABLE, GeeIterable));
#line 1541 "/home/jens/Source/shotwell/src/Commands.vala"
		_tmp5_ = _tmp4_;
#line 1541 "/home/jens/Source/shotwell/src/Commands.vala"
		_g_object_unref0 (_tmp3_);
#line 1541 "/home/jens/Source/shotwell/src/Commands.vala"
		_sources_it = _tmp5_;
#line 1541 "/home/jens/Source/shotwell/src/Commands.vala"
		while (TRUE) {
#line 12971 "Commands.c"
			GeeIterator* _tmp6_;
			gboolean _tmp7_;
			GeeArrayList* sources = NULL;
			GeeIterator* _tmp8_;
			gpointer _tmp9_;
			GeeArrayList* _tmp10_;
			DataSource* _tmp11_;
			gboolean _tmp12_;
#line 1541 "/home/jens/Source/shotwell/src/Commands.vala"
			_tmp6_ = _sources_it;
#line 1541 "/home/jens/Source/shotwell/src/Commands.vala"
			_tmp7_ = gee_iterator_next (_tmp6_);
#line 1541 "/home/jens/Source/shotwell/src/Commands.vala"
			if (!_tmp7_) {
#line 1541 "/home/jens/Source/shotwell/src/Commands.vala"
				break;
#line 12988 "Commands.c"
			}
#line 1541 "/home/jens/Source/shotwell/src/Commands.vala"
			_tmp8_ = _sources_it;
#line 1541 "/home/jens/Source/shotwell/src/Commands.vala"
			_tmp9_ = gee_iterator_get (_tmp8_);
#line 1541 "/home/jens/Source/shotwell/src/Commands.vala"
			sources = (GeeArrayList*) _tmp9_;
#line 1542 "/home/jens/Source/shotwell/src/Commands.vala"
			_tmp10_ = sources;
#line 1542 "/home/jens/Source/shotwell/src/Commands.vala"
			_tmp11_ = source;
#line 1542 "/home/jens/Source/shotwell/src/Commands.vala"
			_tmp12_ = gee_abstract_collection_contains (G_TYPE_CHECK_INSTANCE_CAST (_tmp10_, GEE_TYPE_ABSTRACT_COLLECTION, GeeAbstractCollection), G_TYPE_CHECK_INSTANCE_CAST (_tmp11_, TYPE_MEDIA_SOURCE, MediaSource));
#line 1542 "/home/jens/Source/shotwell/src/Commands.vala"
			if (_tmp12_) {
#line 13004 "Commands.c"
				CommandManager* _tmp13_;
				CommandManager* _tmp14_;
#line 1543 "/home/jens/Source/shotwell/src/Commands.vala"
				_tmp13_ = command_get_command_manager (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_COMMAND, Command));
#line 1543 "/home/jens/Source/shotwell/src/Commands.vala"
				_tmp14_ = _tmp13_;
#line 1543 "/home/jens/Source/shotwell/src/Commands.vala"
				command_manager_reset (_tmp14_);
#line 1543 "/home/jens/Source/shotwell/src/Commands.vala"
				_command_manager_unref0 (_tmp14_);
#line 1545 "/home/jens/Source/shotwell/src/Commands.vala"
				_g_object_unref0 (sources);
#line 1545 "/home/jens/Source/shotwell/src/Commands.vala"
				_g_object_unref0 (_sources_it);
#line 1545 "/home/jens/Source/shotwell/src/Commands.vala"
				return;
#line 13021 "Commands.c"
			}
#line 1541 "/home/jens/Source/shotwell/src/Commands.vala"
			_g_object_unref0 (sources);
#line 13025 "Commands.c"
		}
#line 1541 "/home/jens/Source/shotwell/src/Commands.vala"
		_g_object_unref0 (_sources_it);
#line 13029 "Commands.c"
	}
}


static void add_tags_command_on_proxy_broken (AddTagsCommand* self) {
	CommandManager* _tmp0_;
	CommandManager* _tmp1_;
#line 1550 "/home/jens/Source/shotwell/src/Commands.vala"
	g_return_if_fail (IS_ADD_TAGS_COMMAND (self));
#line 1551 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp0_ = command_get_command_manager (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_COMMAND, Command));
#line 1551 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp1_ = _tmp0_;
#line 1551 "/home/jens/Source/shotwell/src/Commands.vala"
	command_manager_reset (_tmp1_);
#line 1551 "/home/jens/Source/shotwell/src/Commands.vala"
	_command_manager_unref0 (_tmp1_);
#line 13047 "Commands.c"
}


static void add_tags_command_class_init (AddTagsCommandClass * klass) {
#line 1481 "/home/jens/Source/shotwell/src/Commands.vala"
	add_tags_command_parent_class = g_type_class_peek_parent (klass);
#line 1481 "/home/jens/Source/shotwell/src/Commands.vala"
	g_type_class_add_private (klass, sizeof (AddTagsCommandPrivate));
#line 1481 "/home/jens/Source/shotwell/src/Commands.vala"
	((CommandClass *) klass)->execute = (void (*) (Command *)) add_tags_command_real_execute;
#line 1481 "/home/jens/Source/shotwell/src/Commands.vala"
	((CommandClass *) klass)->undo = (void (*) (Command *)) add_tags_command_real_undo;
#line 1481 "/home/jens/Source/shotwell/src/Commands.vala"
	G_OBJECT_CLASS (klass)->finalize = add_tags_command_finalize;
#line 13062 "Commands.c"
}


static void add_tags_command_instance_init (AddTagsCommand * self) {
	GeeHashMap* _tmp0_;
#line 1481 "/home/jens/Source/shotwell/src/Commands.vala"
	self->priv = ADD_TAGS_COMMAND_GET_PRIVATE (self);
#line 1482 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp0_ = gee_hash_map_new (TYPE_SOURCE_PROXY, (GBoxedCopyFunc) source_proxy_ref, (GDestroyNotify) source_proxy_unref, GEE_TYPE_ARRAY_LIST, (GBoxedCopyFunc) g_object_ref, (GDestroyNotify) g_object_unref, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
#line 1482 "/home/jens/Source/shotwell/src/Commands.vala"
	self->priv->map = _tmp0_;
#line 13074 "Commands.c"
}


static void add_tags_command_finalize (GObject * obj) {
	AddTagsCommand * self;
	LibraryPhotoSourceCollection* _tmp12_;
	guint _tmp13_;
	VideoSourceCollection* _tmp14_;
	guint _tmp15_;
#line 1481 "/home/jens/Source/shotwell/src/Commands.vala"
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, TYPE_ADD_TAGS_COMMAND, AddTagsCommand);
#line 13086 "Commands.c"
	{
		GeeIterator* _tag_proxy_it = NULL;
		GeeHashMap* _tmp0_;
		GeeSet* _tmp1_;
		GeeSet* _tmp2_;
		GeeSet* _tmp3_;
		GeeIterator* _tmp4_;
		GeeIterator* _tmp5_;
#line 1520 "/home/jens/Source/shotwell/src/Commands.vala"
		_tmp0_ = self->priv->map;
#line 1520 "/home/jens/Source/shotwell/src/Commands.vala"
		_tmp1_ = gee_abstract_map_get_keys (G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, GEE_TYPE_ABSTRACT_MAP, GeeAbstractMap));
#line 1520 "/home/jens/Source/shotwell/src/Commands.vala"
		_tmp2_ = _tmp1_;
#line 1520 "/home/jens/Source/shotwell/src/Commands.vala"
		_tmp3_ = _tmp2_;
#line 1520 "/home/jens/Source/shotwell/src/Commands.vala"
		_tmp4_ = gee_iterable_iterator (G_TYPE_CHECK_INSTANCE_CAST (_tmp3_, GEE_TYPE_ITERABLE, GeeIterable));
#line 1520 "/home/jens/Source/shotwell/src/Commands.vala"
		_tmp5_ = _tmp4_;
#line 1520 "/home/jens/Source/shotwell/src/Commands.vala"
		_g_object_unref0 (_tmp3_);
#line 1520 "/home/jens/Source/shotwell/src/Commands.vala"
		_tag_proxy_it = _tmp5_;
#line 1520 "/home/jens/Source/shotwell/src/Commands.vala"
		while (TRUE) {
#line 13113 "Commands.c"
			GeeIterator* _tmp6_;
			gboolean _tmp7_;
			SourceProxy* tag_proxy = NULL;
			GeeIterator* _tmp8_;
			gpointer _tmp9_;
			SourceProxy* _tmp10_;
			guint _tmp11_;
#line 1520 "/home/jens/Source/shotwell/src/Commands.vala"
			_tmp6_ = _tag_proxy_it;
#line 1520 "/home/jens/Source/shotwell/src/Commands.vala"
			_tmp7_ = gee_iterator_next (_tmp6_);
#line 1520 "/home/jens/Source/shotwell/src/Commands.vala"
			if (!_tmp7_) {
#line 1520 "/home/jens/Source/shotwell/src/Commands.vala"
				break;
#line 13129 "Commands.c"
			}
#line 1520 "/home/jens/Source/shotwell/src/Commands.vala"
			_tmp8_ = _tag_proxy_it;
#line 1520 "/home/jens/Source/shotwell/src/Commands.vala"
			_tmp9_ = gee_iterator_get (_tmp8_);
#line 1520 "/home/jens/Source/shotwell/src/Commands.vala"
			tag_proxy = (SourceProxy*) _tmp9_;
#line 1521 "/home/jens/Source/shotwell/src/Commands.vala"
			_tmp10_ = tag_proxy;
#line 1521 "/home/jens/Source/shotwell/src/Commands.vala"
			g_signal_parse_name ("broken", TYPE_SOURCE_PROXY, &_tmp11_, NULL, FALSE);
#line 1521 "/home/jens/Source/shotwell/src/Commands.vala"
			g_signal_handlers_disconnect_matched (_tmp10_, G_SIGNAL_MATCH_ID | G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA, _tmp11_, 0, NULL, (GCallback) _add_tags_command_on_proxy_broken_source_proxy_broken, self);
#line 1520 "/home/jens/Source/shotwell/src/Commands.vala"
			_source_proxy_unref0 (tag_proxy);
#line 13145 "Commands.c"
		}
#line 1520 "/home/jens/Source/shotwell/src/Commands.vala"
		_g_object_unref0 (_tag_proxy_it);
#line 13149 "Commands.c"
	}
#line 1523 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp12_ = library_photo_global;
#line 1523 "/home/jens/Source/shotwell/src/Commands.vala"
	g_signal_parse_name ("item-destroyed", TYPE_SOURCE_COLLECTION, &_tmp13_, NULL, FALSE);
#line 1523 "/home/jens/Source/shotwell/src/Commands.vala"
	g_signal_handlers_disconnect_matched (G_TYPE_CHECK_INSTANCE_CAST (_tmp12_, TYPE_SOURCE_COLLECTION, SourceCollection), G_SIGNAL_MATCH_ID | G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA, _tmp13_, 0, NULL, (GCallback) _add_tags_command_on_source_destroyed_source_collection_item_destroyed, self);
#line 1524 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp14_ = video_global;
#line 1524 "/home/jens/Source/shotwell/src/Commands.vala"
	g_signal_parse_name ("item-destroyed", TYPE_SOURCE_COLLECTION, &_tmp15_, NULL, FALSE);
#line 1524 "/home/jens/Source/shotwell/src/Commands.vala"
	g_signal_handlers_disconnect_matched (G_TYPE_CHECK_INSTANCE_CAST (_tmp14_, TYPE_SOURCE_COLLECTION, SourceCollection), G_SIGNAL_MATCH_ID | G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA, _tmp15_, 0, NULL, (GCallback) _add_tags_command_on_source_destroyed_source_collection_item_destroyed, self);
#line 1482 "/home/jens/Source/shotwell/src/Commands.vala"
	_g_object_unref0 (self->priv->map);
#line 1481 "/home/jens/Source/shotwell/src/Commands.vala"
	G_OBJECT_CLASS (add_tags_command_parent_class)->finalize (obj);
#line 13167 "Commands.c"
}


GType add_tags_command_get_type (void) {
	static volatile gsize add_tags_command_type_id__volatile = 0;
	if (g_once_init_enter (&add_tags_command_type_id__volatile)) {
		static const GTypeInfo g_define_type_info = { sizeof (AddTagsCommandClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) add_tags_command_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (AddTagsCommand), 0, (GInstanceInitFunc) add_tags_command_instance_init, NULL };
		GType add_tags_command_type_id;
		add_tags_command_type_id = g_type_register_static (TYPE_PAGE_COMMAND, "AddTagsCommand", &g_define_type_info, 0);
		g_once_init_leave (&add_tags_command_type_id__volatile, add_tags_command_type_id);
	}
	return add_tags_command_type_id__volatile;
}


RenameTagCommand* rename_tag_command_construct (GType object_type, Tag* tag, const gchar* new_name) {
	RenameTagCommand * self = NULL;
	Tag* _tmp0_;
	Tag* _tmp1_;
	gchar* _tmp2_;
	gchar* _tmp3_;
	const gchar* _tmp4_;
	gchar* _tmp5_;
	gchar* _tmp6_;
	Tag* _tmp7_;
	gchar* _tmp8_;
	gchar* _tmp9_;
	Tag* _tmp10_;
	gchar* _tmp11_;
	const gchar* _tmp12_;
	gchar* _tmp13_;
#line 1560 "/home/jens/Source/shotwell/src/Commands.vala"
	g_return_val_if_fail (IS_TAG (tag), NULL);
#line 1560 "/home/jens/Source/shotwell/src/Commands.vala"
	g_return_val_if_fail (new_name != NULL, NULL);
#line 1561 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp0_ = tag;
#line 1561 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp1_ = tag;
#line 1561 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp2_ = tag_get_user_visible_name (_tmp1_);
#line 1561 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp3_ = _tmp2_;
#line 1561 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp4_ = new_name;
#line 1561 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp5_ = resources_rename_tag_label (_tmp3_, _tmp4_);
#line 1561 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp6_ = _tmp5_;
#line 1561 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp7_ = tag;
#line 1561 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp8_ = data_object_get_name (G_TYPE_CHECK_INSTANCE_CAST (_tmp7_, TYPE_DATA_OBJECT, DataObject));
#line 1561 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp9_ = _tmp8_;
#line 1561 "/home/jens/Source/shotwell/src/Commands.vala"
	self = (RenameTagCommand*) simple_proxyable_command_construct (object_type, G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, TYPE_PROXYABLE, Proxyable), _tmp6_, _tmp9_);
#line 1561 "/home/jens/Source/shotwell/src/Commands.vala"
	_g_free0 (_tmp9_);
#line 1561 "/home/jens/Source/shotwell/src/Commands.vala"
	_g_free0 (_tmp6_);
#line 1561 "/home/jens/Source/shotwell/src/Commands.vala"
	_g_free0 (_tmp3_);
#line 1564 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp10_ = tag;
#line 1564 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp11_ = tag_get_user_visible_name (_tmp10_);
#line 1564 "/home/jens/Source/shotwell/src/Commands.vala"
	_g_free0 (self->priv->old_name);
#line 1564 "/home/jens/Source/shotwell/src/Commands.vala"
	self->priv->old_name = _tmp11_;
#line 1565 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp12_ = new_name;
#line 1565 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp13_ = g_strdup (_tmp12_);
#line 1565 "/home/jens/Source/shotwell/src/Commands.vala"
	_g_free0 (self->priv->new_name);
#line 1565 "/home/jens/Source/shotwell/src/Commands.vala"
	self->priv->new_name = _tmp13_;
#line 1560 "/home/jens/Source/shotwell/src/Commands.vala"
	return self;
#line 13249 "Commands.c"
}


RenameTagCommand* rename_tag_command_new (Tag* tag, const gchar* new_name) {
#line 1560 "/home/jens/Source/shotwell/src/Commands.vala"
	return rename_tag_command_construct (TYPE_RENAME_TAG_COMMAND, tag, new_name);
#line 13256 "Commands.c"
}


static void rename_tag_command_real_execute_on_source (SimpleProxyableCommand* base, DataSource* source) {
	RenameTagCommand * self;
	DataSource* _tmp0_;
	const gchar* _tmp1_;
	gboolean _tmp2_;
#line 1568 "/home/jens/Source/shotwell/src/Commands.vala"
	self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_RENAME_TAG_COMMAND, RenameTagCommand);
#line 1568 "/home/jens/Source/shotwell/src/Commands.vala"
	g_return_if_fail (IS_DATA_SOURCE (source));
#line 1569 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp0_ = source;
#line 1569 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp1_ = self->priv->new_name;
#line 1569 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp2_ = tag_rename (G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, TYPE_TAG, Tag), _tmp1_);
#line 1569 "/home/jens/Source/shotwell/src/Commands.vala"
	if (!_tmp2_) {
#line 13277 "Commands.c"
		const gchar* _tmp3_;
		gchar* _tmp4_;
		gchar* _tmp5_;
#line 1570 "/home/jens/Source/shotwell/src/Commands.vala"
		_tmp3_ = self->priv->new_name;
#line 1570 "/home/jens/Source/shotwell/src/Commands.vala"
		_tmp4_ = resources_rename_tag_exists_message (_tmp3_);
#line 1570 "/home/jens/Source/shotwell/src/Commands.vala"
		_tmp5_ = _tmp4_;
#line 1570 "/home/jens/Source/shotwell/src/Commands.vala"
		app_window_error_message (_tmp5_, NULL);
#line 1570 "/home/jens/Source/shotwell/src/Commands.vala"
		_g_free0 (_tmp5_);
#line 13291 "Commands.c"
	}
}


static void rename_tag_command_real_undo_on_source (SimpleProxyableCommand* base, DataSource* source) {
	RenameTagCommand * self;
	DataSource* _tmp0_;
	const gchar* _tmp1_;
	gboolean _tmp2_;
#line 1573 "/home/jens/Source/shotwell/src/Commands.vala"
	self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_RENAME_TAG_COMMAND, RenameTagCommand);
#line 1573 "/home/jens/Source/shotwell/src/Commands.vala"
	g_return_if_fail (IS_DATA_SOURCE (source));
#line 1574 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp0_ = source;
#line 1574 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp1_ = self->priv->old_name;
#line 1574 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp2_ = tag_rename (G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, TYPE_TAG, Tag), _tmp1_);
#line 1574 "/home/jens/Source/shotwell/src/Commands.vala"
	if (!_tmp2_) {
#line 13313 "Commands.c"
		const gchar* _tmp3_;
		gchar* _tmp4_;
		gchar* _tmp5_;
#line 1575 "/home/jens/Source/shotwell/src/Commands.vala"
		_tmp3_ = self->priv->old_name;
#line 1575 "/home/jens/Source/shotwell/src/Commands.vala"
		_tmp4_ = resources_rename_tag_exists_message (_tmp3_);
#line 1575 "/home/jens/Source/shotwell/src/Commands.vala"
		_tmp5_ = _tmp4_;
#line 1575 "/home/jens/Source/shotwell/src/Commands.vala"
		app_window_error_message (_tmp5_, NULL);
#line 1575 "/home/jens/Source/shotwell/src/Commands.vala"
		_g_free0 (_tmp5_);
#line 13327 "Commands.c"
	}
}


static void rename_tag_command_class_init (RenameTagCommandClass * klass) {
#line 1555 "/home/jens/Source/shotwell/src/Commands.vala"
	rename_tag_command_parent_class = g_type_class_peek_parent (klass);
#line 1555 "/home/jens/Source/shotwell/src/Commands.vala"
	g_type_class_add_private (klass, sizeof (RenameTagCommandPrivate));
#line 1555 "/home/jens/Source/shotwell/src/Commands.vala"
	((SimpleProxyableCommandClass *) klass)->execute_on_source = (void (*) (SimpleProxyableCommand *, DataSource*)) rename_tag_command_real_execute_on_source;
#line 1555 "/home/jens/Source/shotwell/src/Commands.vala"
	((SimpleProxyableCommandClass *) klass)->undo_on_source = (void (*) (SimpleProxyableCommand *, DataSource*)) rename_tag_command_real_undo_on_source;
#line 1555 "/home/jens/Source/shotwell/src/Commands.vala"
	G_OBJECT_CLASS (klass)->finalize = rename_tag_command_finalize;
#line 13343 "Commands.c"
}


static void rename_tag_command_instance_init (RenameTagCommand * self) {
#line 1555 "/home/jens/Source/shotwell/src/Commands.vala"
	self->priv = RENAME_TAG_COMMAND_GET_PRIVATE (self);
#line 13350 "Commands.c"
}


static void rename_tag_command_finalize (GObject * obj) {
	RenameTagCommand * self;
#line 1555 "/home/jens/Source/shotwell/src/Commands.vala"
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, TYPE_RENAME_TAG_COMMAND, RenameTagCommand);
#line 1556 "/home/jens/Source/shotwell/src/Commands.vala"
	_g_free0 (self->priv->old_name);
#line 1557 "/home/jens/Source/shotwell/src/Commands.vala"
	_g_free0 (self->priv->new_name);
#line 1555 "/home/jens/Source/shotwell/src/Commands.vala"
	G_OBJECT_CLASS (rename_tag_command_parent_class)->finalize (obj);
#line 13364 "Commands.c"
}


GType rename_tag_command_get_type (void) {
	static volatile gsize rename_tag_command_type_id__volatile = 0;
	if (g_once_init_enter (&rename_tag_command_type_id__volatile)) {
		static const GTypeInfo g_define_type_info = { sizeof (RenameTagCommandClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) rename_tag_command_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (RenameTagCommand), 0, (GInstanceInitFunc) rename_tag_command_instance_init, NULL };
		GType rename_tag_command_type_id;
		rename_tag_command_type_id = g_type_register_static (TYPE_SIMPLE_PROXYABLE_COMMAND, "RenameTagCommand", &g_define_type_info, 0);
		g_once_init_leave (&rename_tag_command_type_id__volatile, rename_tag_command_type_id);
	}
	return rename_tag_command_type_id__volatile;
}


DeleteTagCommand* delete_tag_command_construct (GType object_type, Tag* tag) {
	DeleteTagCommand * self = NULL;
	Tag* _tmp0_;
	Tag* _tmp1_;
	gchar* _tmp2_;
	gchar* _tmp3_;
	gchar* _tmp4_;
	gchar* _tmp5_;
	Tag* _tmp6_;
	gchar* _tmp7_;
	gchar* _tmp8_;
#line 1582 "/home/jens/Source/shotwell/src/Commands.vala"
	g_return_val_if_fail (IS_TAG (tag), NULL);
#line 1583 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp0_ = tag;
#line 1583 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp1_ = tag;
#line 1583 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp2_ = tag_get_user_visible_name (_tmp1_);
#line 1583 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp3_ = _tmp2_;
#line 1583 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp4_ = resources_delete_tag_label (_tmp3_);
#line 1583 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp5_ = _tmp4_;
#line 1583 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp6_ = tag;
#line 1583 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp7_ = data_object_get_name (G_TYPE_CHECK_INSTANCE_CAST (_tmp6_, TYPE_DATA_OBJECT, DataObject));
#line 1583 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp8_ = _tmp7_;
#line 1583 "/home/jens/Source/shotwell/src/Commands.vala"
	self = (DeleteTagCommand*) simple_proxyable_command_construct (object_type, G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, TYPE_PROXYABLE, Proxyable), _tmp5_, _tmp8_);
#line 1583 "/home/jens/Source/shotwell/src/Commands.vala"
	_g_free0 (_tmp8_);
#line 1583 "/home/jens/Source/shotwell/src/Commands.vala"
	_g_free0 (_tmp5_);
#line 1583 "/home/jens/Source/shotwell/src/Commands.vala"
	_g_free0 (_tmp3_);
#line 1582 "/home/jens/Source/shotwell/src/Commands.vala"
	return self;
#line 13421 "Commands.c"
}


DeleteTagCommand* delete_tag_command_new (Tag* tag) {
#line 1582 "/home/jens/Source/shotwell/src/Commands.vala"
	return delete_tag_command_construct (TYPE_DELETE_TAG_COMMAND, tag);
#line 13428 "Commands.c"
}


static void _delete_tag_command_on_proxy_broken_source_proxy_broken (SourceProxy* _sender, gpointer self) {
#line 1597 "/home/jens/Source/shotwell/src/Commands.vala"
	delete_tag_command_on_proxy_broken ((DeleteTagCommand*) self);
#line 13435 "Commands.c"
}


static void delete_tag_command_real_execute_on_source (SimpleProxyableCommand* base, DataSource* source) {
	DeleteTagCommand * self;
	Tag* tag = NULL;
	DataSource* _tmp0_;
	Tag* _tmp1_;
	GeeList* recursive_victims = NULL;
	Tag* _tmp2_;
	GeeList* _tmp3_;
	GeeList* _tmp4_;
	gint _tmp5_;
	gint _tmp6_;
	TagSourceCollection* _tmp29_;
	TagSourceCollection* _tmp30_;
	DataSource* _tmp31_;
	Marker* _tmp32_;
	Marker* _tmp33_;
#line 1586 "/home/jens/Source/shotwell/src/Commands.vala"
	self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_DELETE_TAG_COMMAND, DeleteTagCommand);
#line 1586 "/home/jens/Source/shotwell/src/Commands.vala"
	g_return_if_fail (IS_DATA_SOURCE (source));
#line 1587 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp0_ = source;
#line 1587 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp1_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, TYPE_TAG, Tag));
#line 1587 "/home/jens/Source/shotwell/src/Commands.vala"
	tag = _tmp1_;
#line 1590 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp2_ = tag;
#line 1590 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp3_ = tag_get_hierarchical_children (_tmp2_);
#line 1590 "/home/jens/Source/shotwell/src/Commands.vala"
	recursive_victims = _tmp3_;
#line 1591 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp4_ = recursive_victims;
#line 1591 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp5_ = gee_collection_get_size (G_TYPE_CHECK_INSTANCE_CAST (_tmp4_, GEE_TYPE_COLLECTION, GeeCollection));
#line 1591 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp6_ = _tmp5_;
#line 1591 "/home/jens/Source/shotwell/src/Commands.vala"
	if (_tmp6_ > 0) {
#line 13479 "Commands.c"
		GeeArrayList* _tmp7_;
#line 1594 "/home/jens/Source/shotwell/src/Commands.vala"
		_tmp7_ = gee_array_list_new (TYPE_SOURCE_PROXY, (GBoxedCopyFunc) source_proxy_ref, (GDestroyNotify) source_proxy_unref, NULL, NULL, NULL);
#line 1594 "/home/jens/Source/shotwell/src/Commands.vala"
		_g_object_unref0 (self->priv->recursive_victim_proxies);
#line 1594 "/home/jens/Source/shotwell/src/Commands.vala"
		self->priv->recursive_victim_proxies = G_TYPE_CHECK_INSTANCE_CAST (_tmp7_, GEE_TYPE_LIST, GeeList);
#line 13487 "Commands.c"
		{
			GeeList* _victim_list = NULL;
			GeeList* _tmp8_;
			GeeList* _tmp9_;
			gint _victim_size = 0;
			GeeList* _tmp10_;
			gint _tmp11_;
			gint _tmp12_;
			gint _victim_index = 0;
#line 1595 "/home/jens/Source/shotwell/src/Commands.vala"
			_tmp8_ = recursive_victims;
#line 1595 "/home/jens/Source/shotwell/src/Commands.vala"
			_tmp9_ = _g_object_ref0 (_tmp8_);
#line 1595 "/home/jens/Source/shotwell/src/Commands.vala"
			_victim_list = _tmp9_;
#line 1595 "/home/jens/Source/shotwell/src/Commands.vala"
			_tmp10_ = _victim_list;
#line 1595 "/home/jens/Source/shotwell/src/Commands.vala"
			_tmp11_ = gee_collection_get_size (G_TYPE_CHECK_INSTANCE_CAST (_tmp10_, GEE_TYPE_COLLECTION, GeeCollection));
#line 1595 "/home/jens/Source/shotwell/src/Commands.vala"
			_tmp12_ = _tmp11_;
#line 1595 "/home/jens/Source/shotwell/src/Commands.vala"
			_victim_size = _tmp12_;
#line 1595 "/home/jens/Source/shotwell/src/Commands.vala"
			_victim_index = -1;
#line 1595 "/home/jens/Source/shotwell/src/Commands.vala"
			while (TRUE) {
#line 13515 "Commands.c"
				gint _tmp13_;
				gint _tmp14_;
				gint _tmp15_;
				Tag* victim = NULL;
				GeeList* _tmp16_;
				gint _tmp17_;
				gpointer _tmp18_;
				SourceProxy* proxy = NULL;
				Tag* _tmp19_;
				SourceProxy* _tmp20_;
				SourceProxy* _tmp21_;
				GeeList* _tmp22_;
				SourceProxy* _tmp23_;
				TagSourceCollection* _tmp24_;
				TagSourceCollection* _tmp25_;
				Tag* _tmp26_;
				Marker* _tmp27_;
				Marker* _tmp28_;
#line 1595 "/home/jens/Source/shotwell/src/Commands.vala"
				_tmp13_ = _victim_index;
#line 1595 "/home/jens/Source/shotwell/src/Commands.vala"
				_victim_index = _tmp13_ + 1;
#line 1595 "/home/jens/Source/shotwell/src/Commands.vala"
				_tmp14_ = _victim_index;
#line 1595 "/home/jens/Source/shotwell/src/Commands.vala"
				_tmp15_ = _victim_size;
#line 1595 "/home/jens/Source/shotwell/src/Commands.vala"
				if (!(_tmp14_ < _tmp15_)) {
#line 1595 "/home/jens/Source/shotwell/src/Commands.vala"
					break;
#line 13546 "Commands.c"
				}
#line 1595 "/home/jens/Source/shotwell/src/Commands.vala"
				_tmp16_ = _victim_list;
#line 1595 "/home/jens/Source/shotwell/src/Commands.vala"
				_tmp17_ = _victim_index;
#line 1595 "/home/jens/Source/shotwell/src/Commands.vala"
				_tmp18_ = gee_list_get (_tmp16_, _tmp17_);
#line 1595 "/home/jens/Source/shotwell/src/Commands.vala"
				victim = (Tag*) _tmp18_;
#line 1596 "/home/jens/Source/shotwell/src/Commands.vala"
				_tmp19_ = victim;
#line 1596 "/home/jens/Source/shotwell/src/Commands.vala"
				_tmp20_ = proxyable_get_proxy (G_TYPE_CHECK_INSTANCE_CAST (_tmp19_, TYPE_PROXYABLE, Proxyable));
#line 1596 "/home/jens/Source/shotwell/src/Commands.vala"
				proxy = _tmp20_;
#line 1597 "/home/jens/Source/shotwell/src/Commands.vala"
				_tmp21_ = proxy;
#line 1597 "/home/jens/Source/shotwell/src/Commands.vala"
				g_signal_connect_object (_tmp21_, "broken", (GCallback) _delete_tag_command_on_proxy_broken_source_proxy_broken, self, 0);
#line 1598 "/home/jens/Source/shotwell/src/Commands.vala"
				_tmp22_ = self->priv->recursive_victim_proxies;
#line 1598 "/home/jens/Source/shotwell/src/Commands.vala"
				_tmp23_ = proxy;
#line 1598 "/home/jens/Source/shotwell/src/Commands.vala"
				gee_collection_add (G_TYPE_CHECK_INSTANCE_CAST (_tmp22_, GEE_TYPE_COLLECTION, GeeCollection), _tmp23_);
#line 1600 "/home/jens/Source/shotwell/src/Commands.vala"
				_tmp24_ = tag_global;
#line 1600 "/home/jens/Source/shotwell/src/Commands.vala"
				_tmp25_ = tag_global;
#line 1600 "/home/jens/Source/shotwell/src/Commands.vala"
				_tmp26_ = victim;
#line 1600 "/home/jens/Source/shotwell/src/Commands.vala"
				_tmp27_ = data_collection_mark (G_TYPE_CHECK_INSTANCE_CAST (_tmp25_, TYPE_DATA_COLLECTION, DataCollection), G_TYPE_CHECK_INSTANCE_CAST (_tmp26_, TYPE_DATA_OBJECT, DataObject));
#line 1600 "/home/jens/Source/shotwell/src/Commands.vala"
				_tmp28_ = _tmp27_;
#line 1600 "/home/jens/Source/shotwell/src/Commands.vala"
				source_collection_destroy_marked (G_TYPE_CHECK_INSTANCE_CAST (_tmp24_, TYPE_SOURCE_COLLECTION, SourceCollection), _tmp28_, FALSE, NULL, NULL, NULL);
#line 1600 "/home/jens/Source/shotwell/src/Commands.vala"
				_g_object_unref0 (_tmp28_);
#line 1595 "/home/jens/Source/shotwell/src/Commands.vala"
				_source_proxy_unref0 (proxy);
#line 1595 "/home/jens/Source/shotwell/src/Commands.vala"
				_g_object_unref0 (victim);
#line 13590 "Commands.c"
			}
#line 1595 "/home/jens/Source/shotwell/src/Commands.vala"
			_g_object_unref0 (_victim_list);
#line 13594 "Commands.c"
		}
	}
#line 1605 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp29_ = tag_global;
#line 1605 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp30_ = tag_global;
#line 1605 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp31_ = source;
#line 1605 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp32_ = data_collection_mark (G_TYPE_CHECK_INSTANCE_CAST (_tmp30_, TYPE_DATA_COLLECTION, DataCollection), G_TYPE_CHECK_INSTANCE_CAST (_tmp31_, TYPE_DATA_OBJECT, DataObject));
#line 1605 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp33_ = _tmp32_;
#line 1605 "/home/jens/Source/shotwell/src/Commands.vala"
	source_collection_destroy_marked (G_TYPE_CHECK_INSTANCE_CAST (_tmp29_, TYPE_SOURCE_COLLECTION, SourceCollection), _tmp33_, FALSE, NULL, NULL, NULL);
#line 1605 "/home/jens/Source/shotwell/src/Commands.vala"
	_g_object_unref0 (_tmp33_);
#line 1586 "/home/jens/Source/shotwell/src/Commands.vala"
	_g_object_unref0 (recursive_victims);
#line 1586 "/home/jens/Source/shotwell/src/Commands.vala"
	_g_object_unref0 (tag);
#line 13615 "Commands.c"
}


static void delete_tag_command_real_undo_on_source (SimpleProxyableCommand* base, DataSource* source) {
	DeleteTagCommand * self;
	DataSource* _tmp0_;
	GeeList* _tmp1_;
#line 1608 "/home/jens/Source/shotwell/src/Commands.vala"
	self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_DELETE_TAG_COMMAND, DeleteTagCommand);
#line 1608 "/home/jens/Source/shotwell/src/Commands.vala"
	g_return_if_fail (IS_DATA_SOURCE (source));
#line 1611 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp0_ = source;
#line 1611 "/home/jens/Source/shotwell/src/Commands.vala"
	_vala_assert (G_TYPE_CHECK_INSTANCE_TYPE (_tmp0_, TYPE_TAG), "source is Tag");
#line 1614 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp1_ = self->priv->recursive_victim_proxies;
#line 1614 "/home/jens/Source/shotwell/src/Commands.vala"
	if (_tmp1_ != NULL) {
#line 13635 "Commands.c"
		{
			gint i = 0;
			GeeList* _tmp2_;
			gint _tmp3_;
			gint _tmp4_;
#line 1615 "/home/jens/Source/shotwell/src/Commands.vala"
			_tmp2_ = self->priv->recursive_victim_proxies;
#line 1615 "/home/jens/Source/shotwell/src/Commands.vala"
			_tmp3_ = gee_collection_get_size (G_TYPE_CHECK_INSTANCE_CAST (_tmp2_, GEE_TYPE_COLLECTION, GeeCollection));
#line 1615 "/home/jens/Source/shotwell/src/Commands.vala"
			_tmp4_ = _tmp3_;
#line 1615 "/home/jens/Source/shotwell/src/Commands.vala"
			i = _tmp4_ - 1;
#line 13649 "Commands.c"
			{
				gboolean _tmp5_ = FALSE;
#line 1615 "/home/jens/Source/shotwell/src/Commands.vala"
				_tmp5_ = TRUE;
#line 1615 "/home/jens/Source/shotwell/src/Commands.vala"
				while (TRUE) {
#line 13656 "Commands.c"
					gint _tmp7_;
					SourceProxy* proxy = NULL;
					GeeList* _tmp8_;
					gint _tmp9_;
					gpointer _tmp10_;
					DataSource* victim_source = NULL;
					SourceProxy* _tmp11_;
					DataSource* _tmp12_;
					DataSource* _tmp13_;
					SourceProxy* _tmp14_;
					guint _tmp15_;
#line 1615 "/home/jens/Source/shotwell/src/Commands.vala"
					if (!_tmp5_) {
#line 13670 "Commands.c"
						gint _tmp6_;
#line 1615 "/home/jens/Source/shotwell/src/Commands.vala"
						_tmp6_ = i;
#line 1615 "/home/jens/Source/shotwell/src/Commands.vala"
						i = _tmp6_ - 1;
#line 13676 "Commands.c"
					}
#line 1615 "/home/jens/Source/shotwell/src/Commands.vala"
					_tmp5_ = FALSE;
#line 1615 "/home/jens/Source/shotwell/src/Commands.vala"
					_tmp7_ = i;
#line 1615 "/home/jens/Source/shotwell/src/Commands.vala"
					if (!(_tmp7_ >= 0)) {
#line 1615 "/home/jens/Source/shotwell/src/Commands.vala"
						break;
#line 13686 "Commands.c"
					}
#line 1616 "/home/jens/Source/shotwell/src/Commands.vala"
					_tmp8_ = self->priv->recursive_victim_proxies;
#line 1616 "/home/jens/Source/shotwell/src/Commands.vala"
					_tmp9_ = i;
#line 1616 "/home/jens/Source/shotwell/src/Commands.vala"
					_tmp10_ = gee_list_get (_tmp8_, _tmp9_);
#line 1616 "/home/jens/Source/shotwell/src/Commands.vala"
					proxy = (SourceProxy*) _tmp10_;
#line 1618 "/home/jens/Source/shotwell/src/Commands.vala"
					_tmp11_ = proxy;
#line 1618 "/home/jens/Source/shotwell/src/Commands.vala"
					_tmp12_ = source_proxy_get_source (_tmp11_);
#line 1618 "/home/jens/Source/shotwell/src/Commands.vala"
					victim_source = _tmp12_;
#line 1619 "/home/jens/Source/shotwell/src/Commands.vala"
					_tmp13_ = victim_source;
#line 1619 "/home/jens/Source/shotwell/src/Commands.vala"
					_vala_assert (G_TYPE_CHECK_INSTANCE_TYPE (_tmp13_, TYPE_TAG), "victim_source is Tag");
#line 1621 "/home/jens/Source/shotwell/src/Commands.vala"
					_tmp14_ = proxy;
#line 1621 "/home/jens/Source/shotwell/src/Commands.vala"
					g_signal_parse_name ("broken", TYPE_SOURCE_PROXY, &_tmp15_, NULL, FALSE);
#line 1621 "/home/jens/Source/shotwell/src/Commands.vala"
					g_signal_handlers_disconnect_matched (_tmp14_, G_SIGNAL_MATCH_ID | G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA, _tmp15_, 0, NULL, (GCallback) _delete_tag_command_on_proxy_broken_source_proxy_broken, self);
#line 1615 "/home/jens/Source/shotwell/src/Commands.vala"
					_g_object_unref0 (victim_source);
#line 1615 "/home/jens/Source/shotwell/src/Commands.vala"
					_source_proxy_unref0 (proxy);
#line 13716 "Commands.c"
				}
			}
		}
#line 1624 "/home/jens/Source/shotwell/src/Commands.vala"
		_g_object_unref0 (self->priv->recursive_victim_proxies);
#line 1624 "/home/jens/Source/shotwell/src/Commands.vala"
		self->priv->recursive_victim_proxies = NULL;
#line 13724 "Commands.c"
	}
}


static void delete_tag_command_on_proxy_broken (DeleteTagCommand* self) {
	CommandManager* _tmp0_;
	CommandManager* _tmp1_;
#line 1628 "/home/jens/Source/shotwell/src/Commands.vala"
	g_return_if_fail (IS_DELETE_TAG_COMMAND (self));
#line 1629 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp0_ = command_get_command_manager (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_COMMAND, Command));
#line 1629 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp1_ = _tmp0_;
#line 1629 "/home/jens/Source/shotwell/src/Commands.vala"
	command_manager_reset (_tmp1_);
#line 1629 "/home/jens/Source/shotwell/src/Commands.vala"
	_command_manager_unref0 (_tmp1_);
#line 13742 "Commands.c"
}


static void delete_tag_command_class_init (DeleteTagCommandClass * klass) {
#line 1579 "/home/jens/Source/shotwell/src/Commands.vala"
	delete_tag_command_parent_class = g_type_class_peek_parent (klass);
#line 1579 "/home/jens/Source/shotwell/src/Commands.vala"
	g_type_class_add_private (klass, sizeof (DeleteTagCommandPrivate));
#line 1579 "/home/jens/Source/shotwell/src/Commands.vala"
	((SimpleProxyableCommandClass *) klass)->execute_on_source = (void (*) (SimpleProxyableCommand *, DataSource*)) delete_tag_command_real_execute_on_source;
#line 1579 "/home/jens/Source/shotwell/src/Commands.vala"
	((SimpleProxyableCommandClass *) klass)->undo_on_source = (void (*) (SimpleProxyableCommand *, DataSource*)) delete_tag_command_real_undo_on_source;
#line 1579 "/home/jens/Source/shotwell/src/Commands.vala"
	G_OBJECT_CLASS (klass)->finalize = delete_tag_command_finalize;
#line 13757 "Commands.c"
}


static void delete_tag_command_instance_init (DeleteTagCommand * self) {
#line 1579 "/home/jens/Source/shotwell/src/Commands.vala"
	self->priv = DELETE_TAG_COMMAND_GET_PRIVATE (self);
#line 1580 "/home/jens/Source/shotwell/src/Commands.vala"
	self->priv->recursive_victim_proxies = NULL;
#line 13766 "Commands.c"
}


static void delete_tag_command_finalize (GObject * obj) {
	DeleteTagCommand * self;
#line 1579 "/home/jens/Source/shotwell/src/Commands.vala"
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, TYPE_DELETE_TAG_COMMAND, DeleteTagCommand);
#line 1580 "/home/jens/Source/shotwell/src/Commands.vala"
	_g_object_unref0 (self->priv->recursive_victim_proxies);
#line 1579 "/home/jens/Source/shotwell/src/Commands.vala"
	G_OBJECT_CLASS (delete_tag_command_parent_class)->finalize (obj);
#line 13778 "Commands.c"
}


GType delete_tag_command_get_type (void) {
	static volatile gsize delete_tag_command_type_id__volatile = 0;
	if (g_once_init_enter (&delete_tag_command_type_id__volatile)) {
		static const GTypeInfo g_define_type_info = { sizeof (DeleteTagCommandClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) delete_tag_command_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (DeleteTagCommand), 0, (GInstanceInitFunc) delete_tag_command_instance_init, NULL };
		GType delete_tag_command_type_id;
		delete_tag_command_type_id = g_type_register_static (TYPE_SIMPLE_PROXYABLE_COMMAND, "DeleteTagCommand", &g_define_type_info, 0);
		g_once_init_leave (&delete_tag_command_type_id__volatile, delete_tag_command_type_id);
	}
	return delete_tag_command_type_id__volatile;
}


NewChildTagCommand* new_child_tag_command_construct (GType object_type, Tag* tag) {
	NewChildTagCommand * self = NULL;
	Tag* _tmp0_;
	Tag* _tmp1_;
	gchar* _tmp2_;
	gchar* _tmp3_;
#line 1636 "/home/jens/Source/shotwell/src/Commands.vala"
	g_return_val_if_fail (IS_TAG (tag), NULL);
#line 1637 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp0_ = tag;
#line 1637 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp1_ = tag;
#line 1637 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp2_ = data_object_get_name (G_TYPE_CHECK_INSTANCE_CAST (_tmp1_, TYPE_DATA_OBJECT, DataObject));
#line 1637 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp3_ = _tmp2_;
#line 1637 "/home/jens/Source/shotwell/src/Commands.vala"
	self = (NewChildTagCommand*) simple_proxyable_command_construct (object_type, G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, TYPE_PROXYABLE, Proxyable), _ ("Create Tag"), _tmp3_);
#line 1637 "/home/jens/Source/shotwell/src/Commands.vala"
	_g_free0 (_tmp3_);
#line 1636 "/home/jens/Source/shotwell/src/Commands.vala"
	return self;
#line 13816 "Commands.c"
}


NewChildTagCommand* new_child_tag_command_new (Tag* tag) {
#line 1636 "/home/jens/Source/shotwell/src/Commands.vala"
	return new_child_tag_command_construct (TYPE_NEW_CHILD_TAG_COMMAND, tag);
#line 13823 "Commands.c"
}


static void new_child_tag_command_real_execute_on_source (SimpleProxyableCommand* base, DataSource* source) {
	NewChildTagCommand * self;
	Tag* tag = NULL;
	DataSource* _tmp0_;
	Tag* _tmp1_;
	Tag* _tmp2_;
#line 1640 "/home/jens/Source/shotwell/src/Commands.vala"
	self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_NEW_CHILD_TAG_COMMAND, NewChildTagCommand);
#line 1640 "/home/jens/Source/shotwell/src/Commands.vala"
	g_return_if_fail (IS_DATA_SOURCE (source));
#line 1641 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp0_ = source;
#line 1641 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp1_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, TYPE_TAG, Tag));
#line 1641 "/home/jens/Source/shotwell/src/Commands.vala"
	tag = _tmp1_;
#line 1642 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp2_ = tag_create_new_child (tag);
#line 1642 "/home/jens/Source/shotwell/src/Commands.vala"
	_g_object_unref0 (self->priv->created_child);
#line 1642 "/home/jens/Source/shotwell/src/Commands.vala"
	self->priv->created_child = _tmp2_;
#line 1640 "/home/jens/Source/shotwell/src/Commands.vala"
	_g_object_unref0 (tag);
#line 13851 "Commands.c"
}


static void new_child_tag_command_real_undo_on_source (SimpleProxyableCommand* base, DataSource* source) {
	NewChildTagCommand * self;
	TagSourceCollection* _tmp0_;
	TagSourceCollection* _tmp1_;
	Tag* _tmp2_;
	Marker* _tmp3_;
	Marker* _tmp4_;
#line 1645 "/home/jens/Source/shotwell/src/Commands.vala"
	self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_NEW_CHILD_TAG_COMMAND, NewChildTagCommand);
#line 1645 "/home/jens/Source/shotwell/src/Commands.vala"
	g_return_if_fail (IS_DATA_SOURCE (source));
#line 1646 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp0_ = tag_global;
#line 1646 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp1_ = tag_global;
#line 1646 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp2_ = self->priv->created_child;
#line 1646 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp3_ = data_collection_mark (G_TYPE_CHECK_INSTANCE_CAST (_tmp1_, TYPE_DATA_COLLECTION, DataCollection), G_TYPE_CHECK_INSTANCE_CAST (_tmp2_, TYPE_DATA_OBJECT, DataObject));
#line 1646 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp4_ = _tmp3_;
#line 1646 "/home/jens/Source/shotwell/src/Commands.vala"
	source_collection_destroy_marked (G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, TYPE_SOURCE_COLLECTION, SourceCollection), _tmp4_, TRUE, NULL, NULL, NULL);
#line 1646 "/home/jens/Source/shotwell/src/Commands.vala"
	_g_object_unref0 (_tmp4_);
#line 13880 "Commands.c"
}


Tag* new_child_tag_command_get_created_child (NewChildTagCommand* self) {
	Tag* result = NULL;
	Tag* _tmp0_;
	Tag* _tmp1_;
	Tag* _tmp2_;
#line 1649 "/home/jens/Source/shotwell/src/Commands.vala"
	g_return_val_if_fail (IS_NEW_CHILD_TAG_COMMAND (self), NULL);
#line 1650 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp0_ = self->priv->created_child;
#line 1650 "/home/jens/Source/shotwell/src/Commands.vala"
	_vala_assert (_tmp0_ != NULL, "created_child != null");
#line 1652 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp1_ = self->priv->created_child;
#line 1652 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp2_ = _g_object_ref0 (_tmp1_);
#line 1652 "/home/jens/Source/shotwell/src/Commands.vala"
	result = _tmp2_;
#line 1652 "/home/jens/Source/shotwell/src/Commands.vala"
	return result;
#line 13903 "Commands.c"
}


static void new_child_tag_command_class_init (NewChildTagCommandClass * klass) {
#line 1633 "/home/jens/Source/shotwell/src/Commands.vala"
	new_child_tag_command_parent_class = g_type_class_peek_parent (klass);
#line 1633 "/home/jens/Source/shotwell/src/Commands.vala"
	g_type_class_add_private (klass, sizeof (NewChildTagCommandPrivate));
#line 1633 "/home/jens/Source/shotwell/src/Commands.vala"
	((SimpleProxyableCommandClass *) klass)->execute_on_source = (void (*) (SimpleProxyableCommand *, DataSource*)) new_child_tag_command_real_execute_on_source;
#line 1633 "/home/jens/Source/shotwell/src/Commands.vala"
	((SimpleProxyableCommandClass *) klass)->undo_on_source = (void (*) (SimpleProxyableCommand *, DataSource*)) new_child_tag_command_real_undo_on_source;
#line 1633 "/home/jens/Source/shotwell/src/Commands.vala"
	G_OBJECT_CLASS (klass)->finalize = new_child_tag_command_finalize;
#line 13918 "Commands.c"
}


static void new_child_tag_command_instance_init (NewChildTagCommand * self) {
#line 1633 "/home/jens/Source/shotwell/src/Commands.vala"
	self->priv = NEW_CHILD_TAG_COMMAND_GET_PRIVATE (self);
#line 1634 "/home/jens/Source/shotwell/src/Commands.vala"
	self->priv->created_child = NULL;
#line 13927 "Commands.c"
}


static void new_child_tag_command_finalize (GObject * obj) {
	NewChildTagCommand * self;
#line 1633 "/home/jens/Source/shotwell/src/Commands.vala"
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, TYPE_NEW_CHILD_TAG_COMMAND, NewChildTagCommand);
#line 1634 "/home/jens/Source/shotwell/src/Commands.vala"
	_g_object_unref0 (self->priv->created_child);
#line 1633 "/home/jens/Source/shotwell/src/Commands.vala"
	G_OBJECT_CLASS (new_child_tag_command_parent_class)->finalize (obj);
#line 13939 "Commands.c"
}


GType new_child_tag_command_get_type (void) {
	static volatile gsize new_child_tag_command_type_id__volatile = 0;
	if (g_once_init_enter (&new_child_tag_command_type_id__volatile)) {
		static const GTypeInfo g_define_type_info = { sizeof (NewChildTagCommandClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) new_child_tag_command_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (NewChildTagCommand), 0, (GInstanceInitFunc) new_child_tag_command_instance_init, NULL };
		GType new_child_tag_command_type_id;
		new_child_tag_command_type_id = g_type_register_static (TYPE_SIMPLE_PROXYABLE_COMMAND, "NewChildTagCommand", &g_define_type_info, 0);
		g_once_init_leave (&new_child_tag_command_type_id__volatile, new_child_tag_command_type_id);
	}
	return new_child_tag_command_type_id__volatile;
}


NewRootTagCommand* new_root_tag_command_construct (GType object_type) {
	NewRootTagCommand * self = NULL;
#line 1660 "/home/jens/Source/shotwell/src/Commands.vala"
	self = (NewRootTagCommand*) page_command_construct (object_type, _ ("Create Tag"), "");
#line 1659 "/home/jens/Source/shotwell/src/Commands.vala"
	return self;
#line 13961 "Commands.c"
}


NewRootTagCommand* new_root_tag_command_new (void) {
#line 1659 "/home/jens/Source/shotwell/src/Commands.vala"
	return new_root_tag_command_construct (TYPE_NEW_ROOT_TAG_COMMAND);
#line 13968 "Commands.c"
}


static void new_root_tag_command_real_execute (Command* base) {
	NewRootTagCommand * self;
	SourceProxy* _tmp0_;
#line 1663 "/home/jens/Source/shotwell/src/Commands.vala"
	self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_NEW_ROOT_TAG_COMMAND, NewRootTagCommand);
#line 1664 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp0_ = self->priv->created_proxy;
#line 1664 "/home/jens/Source/shotwell/src/Commands.vala"
	if (_tmp0_ == NULL) {
#line 13981 "Commands.c"
		Tag* _tmp1_;
		Tag* _tmp2_;
		SourceProxy* _tmp3_;
#line 1665 "/home/jens/Source/shotwell/src/Commands.vala"
		_tmp1_ = tag_create_new_root ();
#line 1665 "/home/jens/Source/shotwell/src/Commands.vala"
		_tmp2_ = _tmp1_;
#line 1665 "/home/jens/Source/shotwell/src/Commands.vala"
		_tmp3_ = proxyable_get_proxy (G_TYPE_CHECK_INSTANCE_CAST (_tmp2_, TYPE_PROXYABLE, Proxyable));
#line 1665 "/home/jens/Source/shotwell/src/Commands.vala"
		_source_proxy_unref0 (self->priv->created_proxy);
#line 1665 "/home/jens/Source/shotwell/src/Commands.vala"
		self->priv->created_proxy = _tmp3_;
#line 1665 "/home/jens/Source/shotwell/src/Commands.vala"
		_g_object_unref0 (_tmp2_);
#line 13997 "Commands.c"
	} else {
		SourceProxy* _tmp4_;
		DataSource* _tmp5_;
		DataSource* _tmp6_;
#line 1667 "/home/jens/Source/shotwell/src/Commands.vala"
		_tmp4_ = self->priv->created_proxy;
#line 1667 "/home/jens/Source/shotwell/src/Commands.vala"
		_tmp5_ = source_proxy_get_source (_tmp4_);
#line 1667 "/home/jens/Source/shotwell/src/Commands.vala"
		_tmp6_ = _tmp5_;
#line 1667 "/home/jens/Source/shotwell/src/Commands.vala"
		_g_object_unref0 (_tmp6_);
#line 14010 "Commands.c"
	}
}


static void new_root_tag_command_real_undo (Command* base) {
	NewRootTagCommand * self;
	TagSourceCollection* _tmp0_;
	TagSourceCollection* _tmp1_;
	SourceProxy* _tmp2_;
	DataSource* _tmp3_;
	DataSource* _tmp4_;
	Marker* _tmp5_;
	Marker* _tmp6_;
#line 1670 "/home/jens/Source/shotwell/src/Commands.vala"
	self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_NEW_ROOT_TAG_COMMAND, NewRootTagCommand);
#line 1671 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp0_ = tag_global;
#line 1671 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp1_ = tag_global;
#line 1671 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp2_ = self->priv->created_proxy;
#line 1671 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp3_ = source_proxy_get_source (_tmp2_);
#line 1671 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp4_ = _tmp3_;
#line 1671 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp5_ = data_collection_mark (G_TYPE_CHECK_INSTANCE_CAST (_tmp1_, TYPE_DATA_COLLECTION, DataCollection), G_TYPE_CHECK_INSTANCE_CAST (_tmp4_, TYPE_DATA_OBJECT, DataObject));
#line 1671 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp6_ = _tmp5_;
#line 1671 "/home/jens/Source/shotwell/src/Commands.vala"
	source_collection_destroy_marked (G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, TYPE_SOURCE_COLLECTION, SourceCollection), _tmp6_, TRUE, NULL, NULL, NULL);
#line 1671 "/home/jens/Source/shotwell/src/Commands.vala"
	_g_object_unref0 (_tmp6_);
#line 1671 "/home/jens/Source/shotwell/src/Commands.vala"
	_g_object_unref0 (_tmp4_);
#line 14046 "Commands.c"
}


Tag* new_root_tag_command_get_created_tag (NewRootTagCommand* self) {
	Tag* result = NULL;
	SourceProxy* _tmp0_;
	DataSource* _tmp1_;
#line 1674 "/home/jens/Source/shotwell/src/Commands.vala"
	g_return_val_if_fail (IS_NEW_ROOT_TAG_COMMAND (self), NULL);
#line 1675 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp0_ = self->priv->created_proxy;
#line 1675 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp1_ = source_proxy_get_source (_tmp0_);
#line 1675 "/home/jens/Source/shotwell/src/Commands.vala"
	result = G_TYPE_CHECK_INSTANCE_CAST (_tmp1_, TYPE_TAG, Tag);
#line 1675 "/home/jens/Source/shotwell/src/Commands.vala"
	return result;
#line 14064 "Commands.c"
}


static void new_root_tag_command_class_init (NewRootTagCommandClass * klass) {
#line 1656 "/home/jens/Source/shotwell/src/Commands.vala"
	new_root_tag_command_parent_class = g_type_class_peek_parent (klass);
#line 1656 "/home/jens/Source/shotwell/src/Commands.vala"
	g_type_class_add_private (klass, sizeof (NewRootTagCommandPrivate));
#line 1656 "/home/jens/Source/shotwell/src/Commands.vala"
	((CommandClass *) klass)->execute = (void (*) (Command *)) new_root_tag_command_real_execute;
#line 1656 "/home/jens/Source/shotwell/src/Commands.vala"
	((CommandClass *) klass)->undo = (void (*) (Command *)) new_root_tag_command_real_undo;
#line 1656 "/home/jens/Source/shotwell/src/Commands.vala"
	G_OBJECT_CLASS (klass)->finalize = new_root_tag_command_finalize;
#line 14079 "Commands.c"
}


static void new_root_tag_command_instance_init (NewRootTagCommand * self) {
#line 1656 "/home/jens/Source/shotwell/src/Commands.vala"
	self->priv = NEW_ROOT_TAG_COMMAND_GET_PRIVATE (self);
#line 1657 "/home/jens/Source/shotwell/src/Commands.vala"
	self->priv->created_proxy = NULL;
#line 14088 "Commands.c"
}


static void new_root_tag_command_finalize (GObject * obj) {
	NewRootTagCommand * self;
#line 1656 "/home/jens/Source/shotwell/src/Commands.vala"
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, TYPE_NEW_ROOT_TAG_COMMAND, NewRootTagCommand);
#line 1657 "/home/jens/Source/shotwell/src/Commands.vala"
	_source_proxy_unref0 (self->priv->created_proxy);
#line 1656 "/home/jens/Source/shotwell/src/Commands.vala"
	G_OBJECT_CLASS (new_root_tag_command_parent_class)->finalize (obj);
#line 14100 "Commands.c"
}


GType new_root_tag_command_get_type (void) {
	static volatile gsize new_root_tag_command_type_id__volatile = 0;
	if (g_once_init_enter (&new_root_tag_command_type_id__volatile)) {
		static const GTypeInfo g_define_type_info = { sizeof (NewRootTagCommandClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) new_root_tag_command_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (NewRootTagCommand), 0, (GInstanceInitFunc) new_root_tag_command_instance_init, NULL };
		GType new_root_tag_command_type_id;
		new_root_tag_command_type_id = g_type_register_static (TYPE_PAGE_COMMAND, "NewRootTagCommand", &g_define_type_info, 0);
		g_once_init_leave (&new_root_tag_command_type_id__volatile, new_root_tag_command_type_id);
	}
	return new_root_tag_command_type_id__volatile;
}


static void _reparent_tag_command_on_items_destroyed_source_collection_items_destroyed (SourceCollection* _sender, GeeCollection* destroyed, gpointer self) {
#line 1724 "/home/jens/Source/shotwell/src/Commands.vala"
	reparent_tag_command_on_items_destroyed ((ReparentTagCommand*) self, destroyed);
#line 14119 "Commands.c"
}


ReparentTagCommand* reparent_tag_command_construct (GType object_type, Tag* tag, const gchar* new_parent_path) {
	ReparentTagCommand * self = NULL;
	Tag* _tmp0_;
	gchar* _tmp1_;
	gchar* _tmp2_;
	gchar* _tmp3_;
	gchar* _tmp4_;
	Tag* _tmp5_;
	gchar* _tmp6_;
	gboolean has_children = FALSE;
	Tag* _tmp7_;
	GeeList* _tmp8_;
	GeeList* _tmp9_;
	gint _tmp10_;
	gint _tmp11_;
	gboolean _tmp12_;
	gchar* basename = NULL;
	Tag* _tmp13_;
	gchar* _tmp14_;
	const gchar* _tmp15_;
	gchar* new_to_path = NULL;
	const gchar* _tmp37_;
	gchar* _tmp38_;
	const gchar* _tmp39_;
	TagSourceCollection* _tmp42_;
	const gchar* _tmp43_;
	gboolean _tmp44_;
	GeeHashSet* _tmp45_;
	Tag* _tmp46_;
	GeeCollection* _tmp47_;
	GeeCollection* _tmp48_;
	LibraryPhotoSourceCollection* _tmp49_;
	VideoSourceCollection* _tmp50_;
#line 1694 "/home/jens/Source/shotwell/src/Commands.vala"
	g_return_val_if_fail (IS_TAG (tag), NULL);
#line 1694 "/home/jens/Source/shotwell/src/Commands.vala"
	g_return_val_if_fail (new_parent_path != NULL, NULL);
#line 1695 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp0_ = tag;
#line 1695 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp1_ = tag_get_user_visible_name (_tmp0_);
#line 1695 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp2_ = _tmp1_;
#line 1695 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp3_ = g_strdup_printf (_ ("Move Tag “%s”"), _tmp2_);
#line 1695 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp4_ = _tmp3_;
#line 1695 "/home/jens/Source/shotwell/src/Commands.vala"
	self = (ReparentTagCommand*) page_command_construct (object_type, _tmp4_, "");
#line 1695 "/home/jens/Source/shotwell/src/Commands.vala"
	_g_free0 (_tmp4_);
#line 1695 "/home/jens/Source/shotwell/src/Commands.vala"
	_g_free0 (_tmp2_);
#line 1697 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp5_ = tag;
#line 1697 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp6_ = tag_get_path (_tmp5_);
#line 1697 "/home/jens/Source/shotwell/src/Commands.vala"
	_g_free0 (self->priv->from_path);
#line 1697 "/home/jens/Source/shotwell/src/Commands.vala"
	self->priv->from_path = _tmp6_;
#line 1699 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp7_ = tag;
#line 1699 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp8_ = tag_get_hierarchical_children (_tmp7_);
#line 1699 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp9_ = _tmp8_;
#line 1699 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp10_ = gee_collection_get_size (G_TYPE_CHECK_INSTANCE_CAST (_tmp9_, GEE_TYPE_COLLECTION, GeeCollection));
#line 1699 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp11_ = _tmp10_;
#line 1699 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp12_ = _tmp11_ > 0;
#line 1699 "/home/jens/Source/shotwell/src/Commands.vala"
	_g_object_unref0 (_tmp9_);
#line 1699 "/home/jens/Source/shotwell/src/Commands.vala"
	has_children = _tmp12_;
#line 1700 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp13_ = tag;
#line 1700 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp14_ = tag_get_user_visible_name (_tmp13_);
#line 1700 "/home/jens/Source/shotwell/src/Commands.vala"
	basename = _tmp14_;
#line 1702 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp15_ = new_parent_path;
#line 1702 "/home/jens/Source/shotwell/src/Commands.vala"
	if (g_strcmp0 (_tmp15_, TAG_PATH_SEPARATOR_STRING) == 0) {
#line 14210 "Commands.c"
		gchar* _tmp16_ = NULL;
		gboolean _tmp17_;
		gchar* _tmp22_;
#line 1703 "/home/jens/Source/shotwell/src/Commands.vala"
		_tmp17_ = has_children;
#line 1703 "/home/jens/Source/shotwell/src/Commands.vala"
		if (_tmp17_) {
#line 14218 "Commands.c"
			const gchar* _tmp18_;
			gchar* _tmp19_;
#line 1703 "/home/jens/Source/shotwell/src/Commands.vala"
			_tmp18_ = basename;
#line 1703 "/home/jens/Source/shotwell/src/Commands.vala"
			_tmp19_ = g_strconcat (TAG_PATH_SEPARATOR_STRING, _tmp18_, NULL);
#line 1703 "/home/jens/Source/shotwell/src/Commands.vala"
			_g_free0 (_tmp16_);
#line 1703 "/home/jens/Source/shotwell/src/Commands.vala"
			_tmp16_ = _tmp19_;
#line 14229 "Commands.c"
		} else {
			const gchar* _tmp20_;
			gchar* _tmp21_;
#line 1703 "/home/jens/Source/shotwell/src/Commands.vala"
			_tmp20_ = basename;
#line 1703 "/home/jens/Source/shotwell/src/Commands.vala"
			_tmp21_ = g_strdup (_tmp20_);
#line 1703 "/home/jens/Source/shotwell/src/Commands.vala"
			_g_free0 (_tmp16_);
#line 1703 "/home/jens/Source/shotwell/src/Commands.vala"
			_tmp16_ = _tmp21_;
#line 14241 "Commands.c"
		}
#line 1703 "/home/jens/Source/shotwell/src/Commands.vala"
		_tmp22_ = g_strdup (_tmp16_);
#line 1703 "/home/jens/Source/shotwell/src/Commands.vala"
		_g_free0 (self->priv->to_path);
#line 1703 "/home/jens/Source/shotwell/src/Commands.vala"
		self->priv->to_path = _tmp22_;
#line 1702 "/home/jens/Source/shotwell/src/Commands.vala"
		_g_free0 (_tmp16_);
#line 14251 "Commands.c"
	} else {
		const gchar* _tmp23_;
		gboolean _tmp24_;
#line 1704 "/home/jens/Source/shotwell/src/Commands.vala"
		_tmp23_ = new_parent_path;
#line 1704 "/home/jens/Source/shotwell/src/Commands.vala"
		_tmp24_ = g_str_has_prefix (_tmp23_, TAG_PATH_SEPARATOR_STRING);
#line 1704 "/home/jens/Source/shotwell/src/Commands.vala"
		if (_tmp24_) {
#line 14261 "Commands.c"
			const gchar* _tmp25_;
			gchar* _tmp26_;
			gchar* _tmp27_;
			const gchar* _tmp28_;
			gchar* _tmp29_;
#line 1705 "/home/jens/Source/shotwell/src/Commands.vala"
			_tmp25_ = new_parent_path;
#line 1705 "/home/jens/Source/shotwell/src/Commands.vala"
			_tmp26_ = g_strconcat (_tmp25_, TAG_PATH_SEPARATOR_STRING, NULL);
#line 1705 "/home/jens/Source/shotwell/src/Commands.vala"
			_tmp27_ = _tmp26_;
#line 1705 "/home/jens/Source/shotwell/src/Commands.vala"
			_tmp28_ = basename;
#line 1705 "/home/jens/Source/shotwell/src/Commands.vala"
			_tmp29_ = g_strconcat (_tmp27_, _tmp28_, NULL);
#line 1705 "/home/jens/Source/shotwell/src/Commands.vala"
			_g_free0 (self->priv->to_path);
#line 1705 "/home/jens/Source/shotwell/src/Commands.vala"
			self->priv->to_path = _tmp29_;
#line 1705 "/home/jens/Source/shotwell/src/Commands.vala"
			_g_free0 (_tmp27_);
#line 14283 "Commands.c"
		} else {
			const gchar* _tmp30_;
			gchar* _tmp31_;
			gchar* _tmp32_;
			gchar* _tmp33_;
			gchar* _tmp34_;
			const gchar* _tmp35_;
			gchar* _tmp36_;
#line 1707 "/home/jens/Source/shotwell/src/Commands.vala"
			_tmp30_ = new_parent_path;
#line 1707 "/home/jens/Source/shotwell/src/Commands.vala"
			_tmp31_ = g_strconcat (TAG_PATH_SEPARATOR_STRING, _tmp30_, NULL);
#line 1707 "/home/jens/Source/shotwell/src/Commands.vala"
			_tmp32_ = _tmp31_;
#line 1707 "/home/jens/Source/shotwell/src/Commands.vala"
			_tmp33_ = g_strconcat (_tmp32_, TAG_PATH_SEPARATOR_STRING, NULL);
#line 1707 "/home/jens/Source/shotwell/src/Commands.vala"
			_tmp34_ = _tmp33_;
#line 1707 "/home/jens/Source/shotwell/src/Commands.vala"
			_tmp35_ = basename;
#line 1707 "/home/jens/Source/shotwell/src/Commands.vala"
			_tmp36_ = g_strconcat (_tmp34_, _tmp35_, NULL);
#line 1707 "/home/jens/Source/shotwell/src/Commands.vala"
			_g_free0 (self->priv->to_path);
#line 1707 "/home/jens/Source/shotwell/src/Commands.vala"
			self->priv->to_path = _tmp36_;
#line 1707 "/home/jens/Source/shotwell/src/Commands.vala"
			_g_free0 (_tmp34_);
#line 1707 "/home/jens/Source/shotwell/src/Commands.vala"
			_g_free0 (_tmp32_);
#line 14314 "Commands.c"
		}
	}
#line 1710 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp37_ = self->priv->to_path;
#line 1710 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp38_ = hierarchical_tag_utilities_get_root_path_form (_tmp37_);
#line 1710 "/home/jens/Source/shotwell/src/Commands.vala"
	new_to_path = _tmp38_;
#line 1711 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp39_ = new_to_path;
#line 1711 "/home/jens/Source/shotwell/src/Commands.vala"
	if (_tmp39_ != NULL) {
#line 14327 "Commands.c"
		const gchar* _tmp40_;
		gchar* _tmp41_;
#line 1712 "/home/jens/Source/shotwell/src/Commands.vala"
		_tmp40_ = new_to_path;
#line 1712 "/home/jens/Source/shotwell/src/Commands.vala"
		_tmp41_ = g_strdup (_tmp40_);
#line 1712 "/home/jens/Source/shotwell/src/Commands.vala"
		_g_free0 (self->priv->to_path);
#line 1712 "/home/jens/Source/shotwell/src/Commands.vala"
		self->priv->to_path = _tmp41_;
#line 14338 "Commands.c"
	}
#line 1714 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp42_ = tag_global;
#line 1714 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp43_ = self->priv->to_path;
#line 1714 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp44_ = tag_source_collection_exists (_tmp42_, _tmp43_, FALSE);
#line 1714 "/home/jens/Source/shotwell/src/Commands.vala"
	if (_tmp44_) {
#line 1715 "/home/jens/Source/shotwell/src/Commands.vala"
		self->priv->to_path_exists = TRUE;
#line 14350 "Commands.c"
	}
#line 1717 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp45_ = self->priv->sources_in_play;
#line 1717 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp46_ = tag;
#line 1717 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp47_ = tag_get_sources (_tmp46_);
#line 1717 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp48_ = _tmp47_;
#line 1717 "/home/jens/Source/shotwell/src/Commands.vala"
	gee_collection_add_all (G_TYPE_CHECK_INSTANCE_CAST (_tmp45_, GEE_TYPE_COLLECTION, GeeCollection), _tmp48_);
#line 1717 "/home/jens/Source/shotwell/src/Commands.vala"
	_g_object_unref0 (_tmp48_);
#line 1719 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp49_ = library_photo_global;
#line 1719 "/home/jens/Source/shotwell/src/Commands.vala"
	g_signal_connect_object (G_TYPE_CHECK_INSTANCE_CAST (_tmp49_, TYPE_SOURCE_COLLECTION, SourceCollection), "items-destroyed", (GCallback) _reparent_tag_command_on_items_destroyed_source_collection_items_destroyed, self, 0);
#line 1720 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp50_ = video_global;
#line 1720 "/home/jens/Source/shotwell/src/Commands.vala"
	g_signal_connect_object (G_TYPE_CHECK_INSTANCE_CAST (_tmp50_, TYPE_SOURCE_COLLECTION, SourceCollection), "items-destroyed", (GCallback) _reparent_tag_command_on_items_destroyed_source_collection_items_destroyed, self, 0);
#line 1694 "/home/jens/Source/shotwell/src/Commands.vala"
	_g_free0 (new_to_path);
#line 1694 "/home/jens/Source/shotwell/src/Commands.vala"
	_g_free0 (basename);
#line 1694 "/home/jens/Source/shotwell/src/Commands.vala"
	return self;
#line 14378 "Commands.c"
}


ReparentTagCommand* reparent_tag_command_new (Tag* tag, const gchar* new_parent_path) {
#line 1694 "/home/jens/Source/shotwell/src/Commands.vala"
	return reparent_tag_command_construct (TYPE_REPARENT_TAG_COMMAND, tag, new_parent_path);
#line 14385 "Commands.c"
}


static void reparent_tag_command_on_items_destroyed (ReparentTagCommand* self, GeeCollection* destroyed) {
#line 1728 "/home/jens/Source/shotwell/src/Commands.vala"
	g_return_if_fail (IS_REPARENT_TAG_COMMAND (self));
#line 1728 "/home/jens/Source/shotwell/src/Commands.vala"
	g_return_if_fail (GEE_IS_COLLECTION (destroyed));
#line 14394 "Commands.c"
	{
		GeeIterator* _source_it = NULL;
		GeeCollection* _tmp0_;
		GeeIterator* _tmp1_;
#line 1729 "/home/jens/Source/shotwell/src/Commands.vala"
		_tmp0_ = destroyed;
#line 1729 "/home/jens/Source/shotwell/src/Commands.vala"
		_tmp1_ = gee_iterable_iterator (G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, GEE_TYPE_ITERABLE, GeeIterable));
#line 1729 "/home/jens/Source/shotwell/src/Commands.vala"
		_source_it = _tmp1_;
#line 1729 "/home/jens/Source/shotwell/src/Commands.vala"
		while (TRUE) {
#line 14407 "Commands.c"
			GeeIterator* _tmp2_;
			gboolean _tmp3_;
			DataSource* source = NULL;
			GeeIterator* _tmp4_;
			gpointer _tmp5_;
			GeeHashSet* _tmp6_;
			DataSource* _tmp7_;
			gboolean _tmp8_;
#line 1729 "/home/jens/Source/shotwell/src/Commands.vala"
			_tmp2_ = _source_it;
#line 1729 "/home/jens/Source/shotwell/src/Commands.vala"
			_tmp3_ = gee_iterator_next (_tmp2_);
#line 1729 "/home/jens/Source/shotwell/src/Commands.vala"
			if (!_tmp3_) {
#line 1729 "/home/jens/Source/shotwell/src/Commands.vala"
				break;
#line 14424 "Commands.c"
			}
#line 1729 "/home/jens/Source/shotwell/src/Commands.vala"
			_tmp4_ = _source_it;
#line 1729 "/home/jens/Source/shotwell/src/Commands.vala"
			_tmp5_ = gee_iterator_get (_tmp4_);
#line 1729 "/home/jens/Source/shotwell/src/Commands.vala"
			source = (DataSource*) _tmp5_;
#line 1730 "/home/jens/Source/shotwell/src/Commands.vala"
			_tmp6_ = self->priv->sources_in_play;
#line 1730 "/home/jens/Source/shotwell/src/Commands.vala"
			_tmp7_ = source;
#line 1730 "/home/jens/Source/shotwell/src/Commands.vala"
			_tmp8_ = gee_abstract_collection_contains (G_TYPE_CHECK_INSTANCE_CAST (_tmp6_, GEE_TYPE_ABSTRACT_COLLECTION, GeeAbstractCollection), G_TYPE_CHECK_INSTANCE_CAST (_tmp7_, TYPE_MEDIA_SOURCE, MediaSource));
#line 1730 "/home/jens/Source/shotwell/src/Commands.vala"
			if (_tmp8_) {
#line 14440 "Commands.c"
				CommandManager* _tmp9_;
				CommandManager* _tmp10_;
#line 1731 "/home/jens/Source/shotwell/src/Commands.vala"
				_tmp9_ = command_get_command_manager (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_COMMAND, Command));
#line 1731 "/home/jens/Source/shotwell/src/Commands.vala"
				_tmp10_ = _tmp9_;
#line 1731 "/home/jens/Source/shotwell/src/Commands.vala"
				command_manager_reset (_tmp10_);
#line 1731 "/home/jens/Source/shotwell/src/Commands.vala"
				_command_manager_unref0 (_tmp10_);
#line 14451 "Commands.c"
			}
#line 1729 "/home/jens/Source/shotwell/src/Commands.vala"
			_g_object_unref0 (source);
#line 14455 "Commands.c"
		}
#line 1729 "/home/jens/Source/shotwell/src/Commands.vala"
		_g_object_unref0 (_source_it);
#line 14459 "Commands.c"
	}
}


static gchar* string_replace (const gchar* self, const gchar* old, const gchar* replacement) {
	gchar* result = NULL;
	gboolean _tmp0_ = FALSE;
	gboolean _tmp1_ = FALSE;
	GError * _inner_error_ = NULL;
#line 1407 "/usr/share/vala-0.36/vapi/glib-2.0.vapi"
	g_return_val_if_fail (self != NULL, NULL);
#line 1407 "/usr/share/vala-0.36/vapi/glib-2.0.vapi"
	g_return_val_if_fail (old != NULL, NULL);
#line 1407 "/usr/share/vala-0.36/vapi/glib-2.0.vapi"
	g_return_val_if_fail (replacement != NULL, NULL);
#line 1408 "/usr/share/vala-0.36/vapi/glib-2.0.vapi"
	if ((*((gchar*) self)) == '\0') {
#line 1408 "/usr/share/vala-0.36/vapi/glib-2.0.vapi"
		_tmp1_ = TRUE;
#line 14479 "Commands.c"
	} else {
		const gchar* _tmp2_;
#line 1408 "/usr/share/vala-0.36/vapi/glib-2.0.vapi"
		_tmp2_ = old;
#line 1408 "/usr/share/vala-0.36/vapi/glib-2.0.vapi"
		_tmp1_ = (*((gchar*) _tmp2_)) == '\0';
#line 14486 "Commands.c"
	}
#line 1408 "/usr/share/vala-0.36/vapi/glib-2.0.vapi"
	if (_tmp1_) {
#line 1408 "/usr/share/vala-0.36/vapi/glib-2.0.vapi"
		_tmp0_ = TRUE;
#line 14492 "Commands.c"
	} else {
		const gchar* _tmp3_;
		const gchar* _tmp4_;
#line 1408 "/usr/share/vala-0.36/vapi/glib-2.0.vapi"
		_tmp3_ = old;
#line 1408 "/usr/share/vala-0.36/vapi/glib-2.0.vapi"
		_tmp4_ = replacement;
#line 1408 "/usr/share/vala-0.36/vapi/glib-2.0.vapi"
		_tmp0_ = g_strcmp0 (_tmp3_, _tmp4_) == 0;
#line 14502 "Commands.c"
	}
#line 1408 "/usr/share/vala-0.36/vapi/glib-2.0.vapi"
	if (_tmp0_) {
#line 14506 "Commands.c"
		gchar* _tmp5_;
#line 1409 "/usr/share/vala-0.36/vapi/glib-2.0.vapi"
		_tmp5_ = g_strdup (self);
#line 1409 "/usr/share/vala-0.36/vapi/glib-2.0.vapi"
		result = _tmp5_;
#line 1409 "/usr/share/vala-0.36/vapi/glib-2.0.vapi"
		return result;
#line 14514 "Commands.c"
	}
	{
		GRegex* regex = NULL;
		const gchar* _tmp6_;
		gchar* _tmp7_;
		gchar* _tmp8_;
		GRegex* _tmp9_;
		GRegex* _tmp10_;
		gchar* _tmp11_ = NULL;
		GRegex* _tmp12_;
		const gchar* _tmp13_;
		gchar* _tmp14_;
		gchar* _tmp15_;
#line 1412 "/usr/share/vala-0.36/vapi/glib-2.0.vapi"
		_tmp6_ = old;
#line 1412 "/usr/share/vala-0.36/vapi/glib-2.0.vapi"
		_tmp7_ = g_regex_escape_string (_tmp6_, -1);
#line 1412 "/usr/share/vala-0.36/vapi/glib-2.0.vapi"
		_tmp8_ = _tmp7_;
#line 1412 "/usr/share/vala-0.36/vapi/glib-2.0.vapi"
		_tmp9_ = g_regex_new (_tmp8_, 0, 0, &_inner_error_);
#line 1412 "/usr/share/vala-0.36/vapi/glib-2.0.vapi"
		_tmp10_ = _tmp9_;
#line 1412 "/usr/share/vala-0.36/vapi/glib-2.0.vapi"
		_g_free0 (_tmp8_);
#line 1412 "/usr/share/vala-0.36/vapi/glib-2.0.vapi"
		regex = _tmp10_;
#line 1412 "/usr/share/vala-0.36/vapi/glib-2.0.vapi"
		if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 1412 "/usr/share/vala-0.36/vapi/glib-2.0.vapi"
			if (_inner_error_->domain == G_REGEX_ERROR) {
#line 14546 "Commands.c"
				goto __catch461_g_regex_error;
			}
#line 1412 "/usr/share/vala-0.36/vapi/glib-2.0.vapi"
			g_critical ("file %s: line %d: unexpected error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
#line 1412 "/usr/share/vala-0.36/vapi/glib-2.0.vapi"
			g_clear_error (&_inner_error_);
#line 1412 "/usr/share/vala-0.36/vapi/glib-2.0.vapi"
			return NULL;
#line 14555 "Commands.c"
		}
#line 1413 "/usr/share/vala-0.36/vapi/glib-2.0.vapi"
		_tmp12_ = regex;
#line 1413 "/usr/share/vala-0.36/vapi/glib-2.0.vapi"
		_tmp13_ = replacement;
#line 1413 "/usr/share/vala-0.36/vapi/glib-2.0.vapi"
		_tmp14_ = g_regex_replace_literal (_tmp12_, self, (gssize) -1, 0, _tmp13_, 0, &_inner_error_);
#line 1413 "/usr/share/vala-0.36/vapi/glib-2.0.vapi"
		_tmp11_ = _tmp14_;
#line 1413 "/usr/share/vala-0.36/vapi/glib-2.0.vapi"
		if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 1413 "/usr/share/vala-0.36/vapi/glib-2.0.vapi"
			_g_regex_unref0 (regex);
#line 1413 "/usr/share/vala-0.36/vapi/glib-2.0.vapi"
			if (_inner_error_->domain == G_REGEX_ERROR) {
#line 14571 "Commands.c"
				goto __catch461_g_regex_error;
			}
#line 1413 "/usr/share/vala-0.36/vapi/glib-2.0.vapi"
			_g_regex_unref0 (regex);
#line 1413 "/usr/share/vala-0.36/vapi/glib-2.0.vapi"
			g_critical ("file %s: line %d: unexpected error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
#line 1413 "/usr/share/vala-0.36/vapi/glib-2.0.vapi"
			g_clear_error (&_inner_error_);
#line 1413 "/usr/share/vala-0.36/vapi/glib-2.0.vapi"
			return NULL;
#line 14582 "Commands.c"
		}
#line 1413 "/usr/share/vala-0.36/vapi/glib-2.0.vapi"
		_tmp15_ = _tmp11_;
#line 1413 "/usr/share/vala-0.36/vapi/glib-2.0.vapi"
		_tmp11_ = NULL;
#line 1413 "/usr/share/vala-0.36/vapi/glib-2.0.vapi"
		result = _tmp15_;
#line 1413 "/usr/share/vala-0.36/vapi/glib-2.0.vapi"
		_g_free0 (_tmp11_);
#line 1413 "/usr/share/vala-0.36/vapi/glib-2.0.vapi"
		_g_regex_unref0 (regex);
#line 1413 "/usr/share/vala-0.36/vapi/glib-2.0.vapi"
		return result;
#line 14596 "Commands.c"
	}
	goto __finally461;
	__catch461_g_regex_error:
	{
		GError* e = NULL;
#line 1411 "/usr/share/vala-0.36/vapi/glib-2.0.vapi"
		e = _inner_error_;
#line 1411 "/usr/share/vala-0.36/vapi/glib-2.0.vapi"
		_inner_error_ = NULL;
#line 1415 "/usr/share/vala-0.36/vapi/glib-2.0.vapi"
		g_assert_not_reached ();
#line 1411 "/usr/share/vala-0.36/vapi/glib-2.0.vapi"
		_g_error_free0 (e);
#line 14610 "Commands.c"
	}
	__finally461:
#line 1411 "/usr/share/vala-0.36/vapi/glib-2.0.vapi"
	if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 1411 "/usr/share/vala-0.36/vapi/glib-2.0.vapi"
		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 1411 "/usr/share/vala-0.36/vapi/glib-2.0.vapi"
		g_clear_error (&_inner_error_);
#line 1411 "/usr/share/vala-0.36/vapi/glib-2.0.vapi"
		return NULL;
#line 14621 "Commands.c"
	}
}


static GeeMap* reparent_tag_command_get_child_structure_at (ReparentTagCommand* self, const gchar* client_path) {
	GeeMap* result = NULL;
	gchar* path = NULL;
	const gchar* _tmp0_;
	gchar* _tmp1_;
	const gchar* _tmp2_ = NULL;
	const gchar* _tmp3_;
	gchar* _tmp6_;
	GeeMap* _result_ = NULL;
	GeeHashMap* _tmp7_;
	TagSourceCollection* _tmp8_;
	const gchar* _tmp9_;
	gboolean _tmp10_;
	Tag* tag = NULL;
	const gchar* _tmp11_;
	Tag* _tmp12_;
	gchar* path_prefix = NULL;
	Tag* _tmp13_;
	gchar* _tmp14_;
	gchar* _tmp15_;
	gchar* _tmp16_;
	gchar* _tmp17_;
#line 1735 "/home/jens/Source/shotwell/src/Commands.vala"
	g_return_val_if_fail (IS_REPARENT_TAG_COMMAND (self), NULL);
#line 1735 "/home/jens/Source/shotwell/src/Commands.vala"
	g_return_val_if_fail (client_path != NULL, NULL);
#line 1736 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp0_ = client_path;
#line 1736 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp1_ = hierarchical_tag_utilities_get_root_path_form (_tmp0_);
#line 1736 "/home/jens/Source/shotwell/src/Commands.vala"
	path = _tmp1_;
#line 1737 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp3_ = path;
#line 1737 "/home/jens/Source/shotwell/src/Commands.vala"
	if (_tmp3_ != NULL) {
#line 14662 "Commands.c"
		const gchar* _tmp4_;
#line 1737 "/home/jens/Source/shotwell/src/Commands.vala"
		_tmp4_ = path;
#line 1737 "/home/jens/Source/shotwell/src/Commands.vala"
		_tmp2_ = _tmp4_;
#line 14668 "Commands.c"
	} else {
		const gchar* _tmp5_;
#line 1737 "/home/jens/Source/shotwell/src/Commands.vala"
		_tmp5_ = client_path;
#line 1737 "/home/jens/Source/shotwell/src/Commands.vala"
		_tmp2_ = _tmp5_;
#line 14675 "Commands.c"
	}
#line 1737 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp6_ = g_strdup (_tmp2_);
#line 1737 "/home/jens/Source/shotwell/src/Commands.vala"
	_g_free0 (path);
#line 1737 "/home/jens/Source/shotwell/src/Commands.vala"
	path = _tmp6_;
#line 1739 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp7_ = gee_hash_map_new (G_TYPE_STRING, (GBoxedCopyFunc) g_strdup, (GDestroyNotify) g_free, GEE_TYPE_SET, (GBoxedCopyFunc) g_object_ref, (GDestroyNotify) g_object_unref, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
#line 1739 "/home/jens/Source/shotwell/src/Commands.vala"
	_result_ = G_TYPE_CHECK_INSTANCE_CAST (_tmp7_, GEE_TYPE_MAP, GeeMap);
#line 1742 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp8_ = tag_global;
#line 1742 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp9_ = path;
#line 1742 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp10_ = tag_source_collection_exists (_tmp8_, _tmp9_, FALSE);
#line 1742 "/home/jens/Source/shotwell/src/Commands.vala"
	if (!_tmp10_) {
#line 1743 "/home/jens/Source/shotwell/src/Commands.vala"
		result = _result_;
#line 1743 "/home/jens/Source/shotwell/src/Commands.vala"
		_g_free0 (path);
#line 1743 "/home/jens/Source/shotwell/src/Commands.vala"
		return result;
#line 14701 "Commands.c"
	}
#line 1745 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp11_ = path;
#line 1745 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp12_ = tag_for_path (_tmp11_);
#line 1745 "/home/jens/Source/shotwell/src/Commands.vala"
	tag = _tmp12_;
#line 1747 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp13_ = tag;
#line 1747 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp14_ = tag_get_path (_tmp13_);
#line 1747 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp15_ = _tmp14_;
#line 1747 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp16_ = g_strconcat (_tmp15_, TAG_PATH_SEPARATOR_STRING, NULL);
#line 1747 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp17_ = _tmp16_;
#line 1747 "/home/jens/Source/shotwell/src/Commands.vala"
	_g_free0 (_tmp15_);
#line 1747 "/home/jens/Source/shotwell/src/Commands.vala"
	path_prefix = _tmp17_;
#line 14723 "Commands.c"
	{
		GeeList* _t_list = NULL;
		Tag* _tmp18_;
		GeeList* _tmp19_;
		gint _t_size = 0;
		GeeList* _tmp20_;
		gint _tmp21_;
		gint _tmp22_;
		gint _t_index = 0;
#line 1748 "/home/jens/Source/shotwell/src/Commands.vala"
		_tmp18_ = tag;
#line 1748 "/home/jens/Source/shotwell/src/Commands.vala"
		_tmp19_ = tag_get_hierarchical_children (_tmp18_);
#line 1748 "/home/jens/Source/shotwell/src/Commands.vala"
		_t_list = _tmp19_;
#line 1748 "/home/jens/Source/shotwell/src/Commands.vala"
		_tmp20_ = _t_list;
#line 1748 "/home/jens/Source/shotwell/src/Commands.vala"
		_tmp21_ = gee_collection_get_size (G_TYPE_CHECK_INSTANCE_CAST (_tmp20_, GEE_TYPE_COLLECTION, GeeCollection));
#line 1748 "/home/jens/Source/shotwell/src/Commands.vala"
		_tmp22_ = _tmp21_;
#line 1748 "/home/jens/Source/shotwell/src/Commands.vala"
		_t_size = _tmp22_;
#line 1748 "/home/jens/Source/shotwell/src/Commands.vala"
		_t_index = -1;
#line 1748 "/home/jens/Source/shotwell/src/Commands.vala"
		while (TRUE) {
#line 14751 "Commands.c"
			gint _tmp23_;
			gint _tmp24_;
			gint _tmp25_;
			Tag* t = NULL;
			GeeList* _tmp26_;
			gint _tmp27_;
			gpointer _tmp28_;
			gchar* child_subpath = NULL;
			Tag* _tmp29_;
			gchar* _tmp30_;
			gchar* _tmp31_;
			const gchar* _tmp32_;
			gchar* _tmp33_;
			gchar* _tmp34_;
			GeeMap* _tmp35_;
			const gchar* _tmp36_;
			GeeHashSet* _tmp37_;
			GeeHashSet* _tmp38_;
			GeeMap* _tmp39_;
			const gchar* _tmp40_;
			gpointer _tmp41_;
			GeeSet* _tmp42_;
			Tag* _tmp43_;
			GeeCollection* _tmp44_;
			GeeCollection* _tmp45_;
#line 1748 "/home/jens/Source/shotwell/src/Commands.vala"
			_tmp23_ = _t_index;
#line 1748 "/home/jens/Source/shotwell/src/Commands.vala"
			_t_index = _tmp23_ + 1;
#line 1748 "/home/jens/Source/shotwell/src/Commands.vala"
			_tmp24_ = _t_index;
#line 1748 "/home/jens/Source/shotwell/src/Commands.vala"
			_tmp25_ = _t_size;
#line 1748 "/home/jens/Source/shotwell/src/Commands.vala"
			if (!(_tmp24_ < _tmp25_)) {
#line 1748 "/home/jens/Source/shotwell/src/Commands.vala"
				break;
#line 14789 "Commands.c"
			}
#line 1748 "/home/jens/Source/shotwell/src/Commands.vala"
			_tmp26_ = _t_list;
#line 1748 "/home/jens/Source/shotwell/src/Commands.vala"
			_tmp27_ = _t_index;
#line 1748 "/home/jens/Source/shotwell/src/Commands.vala"
			_tmp28_ = gee_list_get (_tmp26_, _tmp27_);
#line 1748 "/home/jens/Source/shotwell/src/Commands.vala"
			t = (Tag*) _tmp28_;
#line 1749 "/home/jens/Source/shotwell/src/Commands.vala"
			_tmp29_ = t;
#line 1749 "/home/jens/Source/shotwell/src/Commands.vala"
			_tmp30_ = tag_get_path (_tmp29_);
#line 1749 "/home/jens/Source/shotwell/src/Commands.vala"
			_tmp31_ = _tmp30_;
#line 1749 "/home/jens/Source/shotwell/src/Commands.vala"
			_tmp32_ = path_prefix;
#line 1749 "/home/jens/Source/shotwell/src/Commands.vala"
			_tmp33_ = string_replace (_tmp31_, _tmp32_, "");
#line 1749 "/home/jens/Source/shotwell/src/Commands.vala"
			_tmp34_ = _tmp33_;
#line 1749 "/home/jens/Source/shotwell/src/Commands.vala"
			_g_free0 (_tmp31_);
#line 1749 "/home/jens/Source/shotwell/src/Commands.vala"
			child_subpath = _tmp34_;
#line 1751 "/home/jens/Source/shotwell/src/Commands.vala"
			_tmp35_ = _result_;
#line 1751 "/home/jens/Source/shotwell/src/Commands.vala"
			_tmp36_ = child_subpath;
#line 1751 "/home/jens/Source/shotwell/src/Commands.vala"
			_tmp37_ = gee_hash_set_new (TYPE_MEDIA_SOURCE, (GBoxedCopyFunc) g_object_ref, (GDestroyNotify) g_object_unref, NULL, NULL, NULL, NULL, NULL, NULL);
#line 1751 "/home/jens/Source/shotwell/src/Commands.vala"
			_tmp38_ = _tmp37_;
#line 1751 "/home/jens/Source/shotwell/src/Commands.vala"
			gee_map_set (_tmp35_, _tmp36_, G_TYPE_CHECK_INSTANCE_CAST (_tmp38_, GEE_TYPE_SET, GeeSet));
#line 1751 "/home/jens/Source/shotwell/src/Commands.vala"
			_g_object_unref0 (_tmp38_);
#line 1752 "/home/jens/Source/shotwell/src/Commands.vala"
			_tmp39_ = _result_;
#line 1752 "/home/jens/Source/shotwell/src/Commands.vala"
			_tmp40_ = child_subpath;
#line 1752 "/home/jens/Source/shotwell/src/Commands.vala"
			_tmp41_ = gee_map_get (_tmp39_, _tmp40_);
#line 1752 "/home/jens/Source/shotwell/src/Commands.vala"
			_tmp42_ = (GeeSet*) _tmp41_;
#line 1752 "/home/jens/Source/shotwell/src/Commands.vala"
			_tmp43_ = t;
#line 1752 "/home/jens/Source/shotwell/src/Commands.vala"
			_tmp44_ = tag_get_sources (_tmp43_);
#line 1752 "/home/jens/Source/shotwell/src/Commands.vala"
			_tmp45_ = _tmp44_;
#line 1752 "/home/jens/Source/shotwell/src/Commands.vala"
			gee_collection_add_all (G_TYPE_CHECK_INSTANCE_CAST (_tmp42_, GEE_TYPE_COLLECTION, GeeCollection), _tmp45_);
#line 1752 "/home/jens/Source/shotwell/src/Commands.vala"
			_g_object_unref0 (_tmp45_);
#line 1752 "/home/jens/Source/shotwell/src/Commands.vala"
			_g_object_unref0 (_tmp42_);
#line 1748 "/home/jens/Source/shotwell/src/Commands.vala"
			_g_free0 (child_subpath);
#line 1748 "/home/jens/Source/shotwell/src/Commands.vala"
			_g_object_unref0 (t);
#line 14851 "Commands.c"
		}
#line 1748 "/home/jens/Source/shotwell/src/Commands.vala"
		_g_object_unref0 (_t_list);
#line 14855 "Commands.c"
	}
#line 1755 "/home/jens/Source/shotwell/src/Commands.vala"
	result = _result_;
#line 1755 "/home/jens/Source/shotwell/src/Commands.vala"
	_g_free0 (path_prefix);
#line 1755 "/home/jens/Source/shotwell/src/Commands.vala"
	_g_object_unref0 (tag);
#line 1755 "/home/jens/Source/shotwell/src/Commands.vala"
	_g_free0 (path);
#line 1755 "/home/jens/Source/shotwell/src/Commands.vala"
	return result;
#line 14867 "Commands.c"
}


static void reparent_tag_command_restore_child_attachments_at (ReparentTagCommand* self, const gchar* client_path, GeeMap* child_structure) {
	gchar* new_path = NULL;
	const gchar* _tmp0_;
	gchar* _tmp1_;
	const gchar* _tmp2_ = NULL;
	const gchar* _tmp3_;
	gchar* path = NULL;
	gchar* _tmp6_;
	TagSourceCollection* _tmp7_;
	const gchar* _tmp8_;
	gboolean _tmp9_;
	Tag* tag = NULL;
	const gchar* _tmp10_;
	Tag* _tmp11_;
#line 1758 "/home/jens/Source/shotwell/src/Commands.vala"
	g_return_if_fail (IS_REPARENT_TAG_COMMAND (self));
#line 1758 "/home/jens/Source/shotwell/src/Commands.vala"
	g_return_if_fail (client_path != NULL);
#line 1758 "/home/jens/Source/shotwell/src/Commands.vala"
	g_return_if_fail (GEE_IS_MAP (child_structure));
#line 1761 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp0_ = client_path;
#line 1761 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp1_ = hierarchical_tag_utilities_get_root_path_form (_tmp0_);
#line 1761 "/home/jens/Source/shotwell/src/Commands.vala"
	new_path = _tmp1_;
#line 1762 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp3_ = new_path;
#line 1762 "/home/jens/Source/shotwell/src/Commands.vala"
	if (_tmp3_ != NULL) {
#line 14901 "Commands.c"
		const gchar* _tmp4_;
#line 1762 "/home/jens/Source/shotwell/src/Commands.vala"
		_tmp4_ = new_path;
#line 1762 "/home/jens/Source/shotwell/src/Commands.vala"
		_tmp2_ = _tmp4_;
#line 14907 "Commands.c"
	} else {
		const gchar* _tmp5_;
#line 1762 "/home/jens/Source/shotwell/src/Commands.vala"
		_tmp5_ = client_path;
#line 1762 "/home/jens/Source/shotwell/src/Commands.vala"
		_tmp2_ = _tmp5_;
#line 14914 "Commands.c"
	}
#line 1762 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp6_ = g_strdup (_tmp2_);
#line 1762 "/home/jens/Source/shotwell/src/Commands.vala"
	path = _tmp6_;
#line 1764 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp7_ = tag_global;
#line 1764 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp8_ = path;
#line 1764 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp9_ = tag_source_collection_exists (_tmp7_, _tmp8_, FALSE);
#line 1764 "/home/jens/Source/shotwell/src/Commands.vala"
	_vala_assert (_tmp9_, "Tag.global.exists(path)");
#line 1765 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp10_ = path;
#line 1765 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp11_ = tag_for_path (_tmp10_);
#line 1765 "/home/jens/Source/shotwell/src/Commands.vala"
	tag = _tmp11_;
#line 14934 "Commands.c"
	{
		GeeIterator* _child_subpath_it = NULL;
		GeeMap* _tmp12_;
		GeeSet* _tmp13_;
		GeeSet* _tmp14_;
		GeeSet* _tmp15_;
		GeeIterator* _tmp16_;
		GeeIterator* _tmp17_;
#line 1767 "/home/jens/Source/shotwell/src/Commands.vala"
		_tmp12_ = child_structure;
#line 1767 "/home/jens/Source/shotwell/src/Commands.vala"
		_tmp13_ = gee_map_get_keys (_tmp12_);
#line 1767 "/home/jens/Source/shotwell/src/Commands.vala"
		_tmp14_ = _tmp13_;
#line 1767 "/home/jens/Source/shotwell/src/Commands.vala"
		_tmp15_ = _tmp14_;
#line 1767 "/home/jens/Source/shotwell/src/Commands.vala"
		_tmp16_ = gee_iterable_iterator (G_TYPE_CHECK_INSTANCE_CAST (_tmp15_, GEE_TYPE_ITERABLE, GeeIterable));
#line 1767 "/home/jens/Source/shotwell/src/Commands.vala"
		_tmp17_ = _tmp16_;
#line 1767 "/home/jens/Source/shotwell/src/Commands.vala"
		_g_object_unref0 (_tmp15_);
#line 1767 "/home/jens/Source/shotwell/src/Commands.vala"
		_child_subpath_it = _tmp17_;
#line 1767 "/home/jens/Source/shotwell/src/Commands.vala"
		while (TRUE) {
#line 14961 "Commands.c"
			GeeIterator* _tmp18_;
			gboolean _tmp19_;
			gchar* child_subpath = NULL;
			GeeIterator* _tmp20_;
			gpointer _tmp21_;
			gchar* child_path = NULL;
			Tag* _tmp22_;
			gchar* _tmp23_;
			gchar* _tmp24_;
			gchar* _tmp25_;
			gchar* _tmp26_;
			const gchar* _tmp27_;
			gchar* _tmp28_;
			gchar* _tmp29_;
			Tag* _tmp30_;
			gchar* _tmp31_;
			gchar* _tmp32_;
			gboolean _tmp33_;
			gboolean _tmp34_;
			TagSourceCollection* _tmp43_;
			const gchar* _tmp44_;
			gboolean _tmp45_;
#line 1767 "/home/jens/Source/shotwell/src/Commands.vala"
			_tmp18_ = _child_subpath_it;
#line 1767 "/home/jens/Source/shotwell/src/Commands.vala"
			_tmp19_ = gee_iterator_next (_tmp18_);
#line 1767 "/home/jens/Source/shotwell/src/Commands.vala"
			if (!_tmp19_) {
#line 1767 "/home/jens/Source/shotwell/src/Commands.vala"
				break;
#line 14992 "Commands.c"
			}
#line 1767 "/home/jens/Source/shotwell/src/Commands.vala"
			_tmp20_ = _child_subpath_it;
#line 1767 "/home/jens/Source/shotwell/src/Commands.vala"
			_tmp21_ = gee_iterator_get (_tmp20_);
#line 1767 "/home/jens/Source/shotwell/src/Commands.vala"
			child_subpath = (gchar*) _tmp21_;
#line 1768 "/home/jens/Source/shotwell/src/Commands.vala"
			_tmp22_ = tag;
#line 1768 "/home/jens/Source/shotwell/src/Commands.vala"
			_tmp23_ = tag_get_path (_tmp22_);
#line 1768 "/home/jens/Source/shotwell/src/Commands.vala"
			_tmp24_ = _tmp23_;
#line 1768 "/home/jens/Source/shotwell/src/Commands.vala"
			_tmp25_ = g_strconcat (_tmp24_, TAG_PATH_SEPARATOR_STRING, NULL);
#line 1768 "/home/jens/Source/shotwell/src/Commands.vala"
			_tmp26_ = _tmp25_;
#line 1768 "/home/jens/Source/shotwell/src/Commands.vala"
			_tmp27_ = child_subpath;
#line 1768 "/home/jens/Source/shotwell/src/Commands.vala"
			_tmp28_ = g_strconcat (_tmp26_, _tmp27_, NULL);
#line 1768 "/home/jens/Source/shotwell/src/Commands.vala"
			_tmp29_ = _tmp28_;
#line 1768 "/home/jens/Source/shotwell/src/Commands.vala"
			_g_free0 (_tmp26_);
#line 1768 "/home/jens/Source/shotwell/src/Commands.vala"
			_g_free0 (_tmp24_);
#line 1768 "/home/jens/Source/shotwell/src/Commands.vala"
			child_path = _tmp29_;
#line 1770 "/home/jens/Source/shotwell/src/Commands.vala"
			_tmp30_ = tag;
#line 1770 "/home/jens/Source/shotwell/src/Commands.vala"
			_tmp31_ = tag_get_path (_tmp30_);
#line 1770 "/home/jens/Source/shotwell/src/Commands.vala"
			_tmp32_ = _tmp31_;
#line 1770 "/home/jens/Source/shotwell/src/Commands.vala"
			_tmp33_ = g_str_has_prefix (_tmp32_, TAG_PATH_SEPARATOR_STRING);
#line 1770 "/home/jens/Source/shotwell/src/Commands.vala"
			_tmp34_ = !_tmp33_;
#line 1770 "/home/jens/Source/shotwell/src/Commands.vala"
			_g_free0 (_tmp32_);
#line 1770 "/home/jens/Source/shotwell/src/Commands.vala"
			if (_tmp34_) {
#line 15036 "Commands.c"
				Tag* _tmp35_;
				Tag* _tmp36_;
				gchar* _tmp37_;
				gchar* _tmp38_;
				gchar* _tmp39_;
				gchar* _tmp40_;
				const gchar* _tmp41_;
				gchar* _tmp42_;
#line 1771 "/home/jens/Source/shotwell/src/Commands.vala"
				_tmp35_ = tag;
#line 1771 "/home/jens/Source/shotwell/src/Commands.vala"
				tag_promote (_tmp35_);
#line 1772 "/home/jens/Source/shotwell/src/Commands.vala"
				_tmp36_ = tag;
#line 1772 "/home/jens/Source/shotwell/src/Commands.vala"
				_tmp37_ = tag_get_path (_tmp36_);
#line 1772 "/home/jens/Source/shotwell/src/Commands.vala"
				_tmp38_ = _tmp37_;
#line 1772 "/home/jens/Source/shotwell/src/Commands.vala"
				_tmp39_ = g_strconcat (_tmp38_, TAG_PATH_SEPARATOR_STRING, NULL);
#line 1772 "/home/jens/Source/shotwell/src/Commands.vala"
				_tmp40_ = _tmp39_;
#line 1772 "/home/jens/Source/shotwell/src/Commands.vala"
				_tmp41_ = child_subpath;
#line 1772 "/home/jens/Source/shotwell/src/Commands.vala"
				_tmp42_ = g_strconcat (_tmp40_, _tmp41_, NULL);
#line 1772 "/home/jens/Source/shotwell/src/Commands.vala"
				_g_free0 (child_path);
#line 1772 "/home/jens/Source/shotwell/src/Commands.vala"
				child_path = _tmp42_;
#line 1772 "/home/jens/Source/shotwell/src/Commands.vala"
				_g_free0 (_tmp40_);
#line 1772 "/home/jens/Source/shotwell/src/Commands.vala"
				_g_free0 (_tmp38_);
#line 15071 "Commands.c"
			}
#line 1775 "/home/jens/Source/shotwell/src/Commands.vala"
			_tmp43_ = tag_global;
#line 1775 "/home/jens/Source/shotwell/src/Commands.vala"
			_tmp44_ = child_path;
#line 1775 "/home/jens/Source/shotwell/src/Commands.vala"
			_tmp45_ = tag_source_collection_exists (_tmp43_, _tmp44_, FALSE);
#line 1775 "/home/jens/Source/shotwell/src/Commands.vala"
			_vala_assert (_tmp45_, "Tag.global.exists(child_path)");
#line 15081 "Commands.c"
			{
				GeeIterator* _s_it = NULL;
				GeeMap* _tmp46_;
				const gchar* _tmp47_;
				gpointer _tmp48_;
				GeeSet* _tmp49_;
				GeeIterator* _tmp50_;
				GeeIterator* _tmp51_;
#line 1777 "/home/jens/Source/shotwell/src/Commands.vala"
				_tmp46_ = child_structure;
#line 1777 "/home/jens/Source/shotwell/src/Commands.vala"
				_tmp47_ = child_subpath;
#line 1777 "/home/jens/Source/shotwell/src/Commands.vala"
				_tmp48_ = gee_map_get (_tmp46_, _tmp47_);
#line 1777 "/home/jens/Source/shotwell/src/Commands.vala"
				_tmp49_ = (GeeSet*) _tmp48_;
#line 1777 "/home/jens/Source/shotwell/src/Commands.vala"
				_tmp50_ = gee_iterable_iterator (G_TYPE_CHECK_INSTANCE_CAST (_tmp49_, GEE_TYPE_ITERABLE, GeeIterable));
#line 1777 "/home/jens/Source/shotwell/src/Commands.vala"
				_tmp51_ = _tmp50_;
#line 1777 "/home/jens/Source/shotwell/src/Commands.vala"
				_g_object_unref0 (_tmp49_);
#line 1777 "/home/jens/Source/shotwell/src/Commands.vala"
				_s_it = _tmp51_;
#line 1777 "/home/jens/Source/shotwell/src/Commands.vala"
				while (TRUE) {
#line 15108 "Commands.c"
					GeeIterator* _tmp52_;
					gboolean _tmp53_;
					MediaSource* s = NULL;
					GeeIterator* _tmp54_;
					gpointer _tmp55_;
					const gchar* _tmp56_;
					Tag* _tmp57_;
					Tag* _tmp58_;
					MediaSource* _tmp59_;
#line 1777 "/home/jens/Source/shotwell/src/Commands.vala"
					_tmp52_ = _s_it;
#line 1777 "/home/jens/Source/shotwell/src/Commands.vala"
					_tmp53_ = gee_iterator_next (_tmp52_);
#line 1777 "/home/jens/Source/shotwell/src/Commands.vala"
					if (!_tmp53_) {
#line 1777 "/home/jens/Source/shotwell/src/Commands.vala"
						break;
#line 15126 "Commands.c"
					}
#line 1777 "/home/jens/Source/shotwell/src/Commands.vala"
					_tmp54_ = _s_it;
#line 1777 "/home/jens/Source/shotwell/src/Commands.vala"
					_tmp55_ = gee_iterator_get (_tmp54_);
#line 1777 "/home/jens/Source/shotwell/src/Commands.vala"
					s = (MediaSource*) _tmp55_;
#line 1778 "/home/jens/Source/shotwell/src/Commands.vala"
					_tmp56_ = child_path;
#line 1778 "/home/jens/Source/shotwell/src/Commands.vala"
					_tmp57_ = tag_for_path (_tmp56_);
#line 1778 "/home/jens/Source/shotwell/src/Commands.vala"
					_tmp58_ = _tmp57_;
#line 1778 "/home/jens/Source/shotwell/src/Commands.vala"
					_tmp59_ = s;
#line 1778 "/home/jens/Source/shotwell/src/Commands.vala"
					tag_attach (_tmp58_, _tmp59_);
#line 1778 "/home/jens/Source/shotwell/src/Commands.vala"
					_g_object_unref0 (_tmp58_);
#line 1777 "/home/jens/Source/shotwell/src/Commands.vala"
					_g_object_unref0 (s);
#line 15148 "Commands.c"
				}
#line 1777 "/home/jens/Source/shotwell/src/Commands.vala"
				_g_object_unref0 (_s_it);
#line 15152 "Commands.c"
			}
#line 1767 "/home/jens/Source/shotwell/src/Commands.vala"
			_g_free0 (child_path);
#line 1767 "/home/jens/Source/shotwell/src/Commands.vala"
			_g_free0 (child_subpath);
#line 15158 "Commands.c"
		}
#line 1767 "/home/jens/Source/shotwell/src/Commands.vala"
		_g_object_unref0 (_child_subpath_it);
#line 15162 "Commands.c"
	}
#line 1758 "/home/jens/Source/shotwell/src/Commands.vala"
	_g_object_unref0 (tag);
#line 1758 "/home/jens/Source/shotwell/src/Commands.vala"
	_g_free0 (path);
#line 1758 "/home/jens/Source/shotwell/src/Commands.vala"
	_g_free0 (new_path);
#line 15170 "Commands.c"
}


static void reparent_tag_command_reattach_in_play_sources_at (ReparentTagCommand* self, const gchar* client_path) {
	gchar* new_path = NULL;
	const gchar* _tmp0_;
	gchar* _tmp1_;
	const gchar* _tmp2_ = NULL;
	const gchar* _tmp3_;
	gchar* path = NULL;
	gchar* _tmp6_;
	TagSourceCollection* _tmp7_;
	const gchar* _tmp8_;
	gboolean _tmp9_;
	Tag* tag = NULL;
	const gchar* _tmp10_;
	Tag* _tmp11_;
#line 1782 "/home/jens/Source/shotwell/src/Commands.vala"
	g_return_if_fail (IS_REPARENT_TAG_COMMAND (self));
#line 1782 "/home/jens/Source/shotwell/src/Commands.vala"
	g_return_if_fail (client_path != NULL);
#line 1783 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp0_ = client_path;
#line 1783 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp1_ = hierarchical_tag_utilities_get_root_path_form (_tmp0_);
#line 1783 "/home/jens/Source/shotwell/src/Commands.vala"
	new_path = _tmp1_;
#line 1784 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp3_ = new_path;
#line 1784 "/home/jens/Source/shotwell/src/Commands.vala"
	if (_tmp3_ != NULL) {
#line 15202 "Commands.c"
		const gchar* _tmp4_;
#line 1784 "/home/jens/Source/shotwell/src/Commands.vala"
		_tmp4_ = new_path;
#line 1784 "/home/jens/Source/shotwell/src/Commands.vala"
		_tmp2_ = _tmp4_;
#line 15208 "Commands.c"
	} else {
		const gchar* _tmp5_;
#line 1784 "/home/jens/Source/shotwell/src/Commands.vala"
		_tmp5_ = client_path;
#line 1784 "/home/jens/Source/shotwell/src/Commands.vala"
		_tmp2_ = _tmp5_;
#line 15215 "Commands.c"
	}
#line 1784 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp6_ = g_strdup (_tmp2_);
#line 1784 "/home/jens/Source/shotwell/src/Commands.vala"
	path = _tmp6_;
#line 1786 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp7_ = tag_global;
#line 1786 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp8_ = path;
#line 1786 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp9_ = tag_source_collection_exists (_tmp7_, _tmp8_, FALSE);
#line 1786 "/home/jens/Source/shotwell/src/Commands.vala"
	_vala_assert (_tmp9_, "Tag.global.exists(path)");
#line 1788 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp10_ = path;
#line 1788 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp11_ = tag_for_path (_tmp10_);
#line 1788 "/home/jens/Source/shotwell/src/Commands.vala"
	tag = _tmp11_;
#line 15235 "Commands.c"
	{
		GeeIterator* _s_it = NULL;
		GeeHashSet* _tmp12_;
		GeeIterator* _tmp13_;
#line 1790 "/home/jens/Source/shotwell/src/Commands.vala"
		_tmp12_ = self->priv->sources_in_play;
#line 1790 "/home/jens/Source/shotwell/src/Commands.vala"
		_tmp13_ = gee_abstract_collection_iterator (G_TYPE_CHECK_INSTANCE_CAST (_tmp12_, GEE_TYPE_ABSTRACT_COLLECTION, GeeAbstractCollection));
#line 1790 "/home/jens/Source/shotwell/src/Commands.vala"
		_s_it = _tmp13_;
#line 1790 "/home/jens/Source/shotwell/src/Commands.vala"
		while (TRUE) {
#line 15248 "Commands.c"
			GeeIterator* _tmp14_;
			gboolean _tmp15_;
			MediaSource* s = NULL;
			GeeIterator* _tmp16_;
			gpointer _tmp17_;
			Tag* _tmp18_;
			MediaSource* _tmp19_;
#line 1790 "/home/jens/Source/shotwell/src/Commands.vala"
			_tmp14_ = _s_it;
#line 1790 "/home/jens/Source/shotwell/src/Commands.vala"
			_tmp15_ = gee_iterator_next (_tmp14_);
#line 1790 "/home/jens/Source/shotwell/src/Commands.vala"
			if (!_tmp15_) {
#line 1790 "/home/jens/Source/shotwell/src/Commands.vala"
				break;
#line 15264 "Commands.c"
			}
#line 1790 "/home/jens/Source/shotwell/src/Commands.vala"
			_tmp16_ = _s_it;
#line 1790 "/home/jens/Source/shotwell/src/Commands.vala"
			_tmp17_ = gee_iterator_get (_tmp16_);
#line 1790 "/home/jens/Source/shotwell/src/Commands.vala"
			s = (MediaSource*) _tmp17_;
#line 1791 "/home/jens/Source/shotwell/src/Commands.vala"
			_tmp18_ = tag;
#line 1791 "/home/jens/Source/shotwell/src/Commands.vala"
			_tmp19_ = s;
#line 1791 "/home/jens/Source/shotwell/src/Commands.vala"
			tag_attach (_tmp18_, _tmp19_);
#line 1790 "/home/jens/Source/shotwell/src/Commands.vala"
			_g_object_unref0 (s);
#line 15280 "Commands.c"
		}
#line 1790 "/home/jens/Source/shotwell/src/Commands.vala"
		_g_object_unref0 (_s_it);
#line 15284 "Commands.c"
	}
#line 1782 "/home/jens/Source/shotwell/src/Commands.vala"
	_g_object_unref0 (tag);
#line 1782 "/home/jens/Source/shotwell/src/Commands.vala"
	_g_free0 (path);
#line 1782 "/home/jens/Source/shotwell/src/Commands.vala"
	_g_free0 (new_path);
#line 15292 "Commands.c"
}


static void reparent_tag_command_save_before_state (ReparentTagCommand* self) {
	GeeList* _tmp0_;
	GeeList* _tmp1_;
	GeeArrayList* _tmp2_;
	GeeArrayList* _tmp3_;
	GeeMap* _tmp4_;
	const gchar* _tmp5_;
	GeeMap* _tmp6_;
	TagSourceCollection* _tmp7_;
	const gchar* _tmp8_;
	gboolean _tmp9_;
	Tag* from_tag = NULL;
	const gchar* _tmp10_;
	Tag* _tmp11_;
	GeeList* _tmp12_;
	Tag* _tmp13_;
	SourceProxy* _tmp14_;
	SourceProxy* _tmp15_;
	GeeList* parent_paths = NULL;
	const gchar* _tmp16_;
	GeeList* _tmp17_;
	GeeList* _tmp18_;
	gint _tmp19_;
	gint _tmp20_;
	const gchar* _tmp26_;
	const gchar* _tmp30_;
	const gchar* _tmp42_;
	const gchar* _tmp59_;
	GeeList* from_children = NULL;
	Tag* _tmp66_;
	GeeList* _tmp67_;
	const gchar* _tmp81_;
	const gchar* _tmp100_;
#line 1794 "/home/jens/Source/shotwell/src/Commands.vala"
	g_return_if_fail (IS_REPARENT_TAG_COMMAND (self));
#line 1795 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp0_ = self->priv->src_before_state;
#line 1795 "/home/jens/Source/shotwell/src/Commands.vala"
	_vala_assert (_tmp0_ == NULL, "src_before_state == null");
#line 1796 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp1_ = self->priv->dest_before_state;
#line 1796 "/home/jens/Source/shotwell/src/Commands.vala"
	_vala_assert (_tmp1_ == NULL, "dest_before_state == null");
#line 1798 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp2_ = gee_array_list_new (TYPE_SOURCE_PROXY, (GBoxedCopyFunc) source_proxy_ref, (GDestroyNotify) source_proxy_unref, NULL, NULL, NULL);
#line 1798 "/home/jens/Source/shotwell/src/Commands.vala"
	_g_object_unref0 (self->priv->src_before_state);
#line 1798 "/home/jens/Source/shotwell/src/Commands.vala"
	self->priv->src_before_state = G_TYPE_CHECK_INSTANCE_CAST (_tmp2_, GEE_TYPE_LIST, GeeList);
#line 1799 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp3_ = gee_array_list_new (TYPE_SOURCE_PROXY, (GBoxedCopyFunc) source_proxy_ref, (GDestroyNotify) source_proxy_unref, NULL, NULL, NULL);
#line 1799 "/home/jens/Source/shotwell/src/Commands.vala"
	_g_object_unref0 (self->priv->dest_before_state);
#line 1799 "/home/jens/Source/shotwell/src/Commands.vala"
	self->priv->dest_before_state = G_TYPE_CHECK_INSTANCE_CAST (_tmp3_, GEE_TYPE_LIST, GeeList);
#line 1802 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp4_ = self->priv->in_play_child_structure;
#line 1802 "/home/jens/Source/shotwell/src/Commands.vala"
	_vala_assert (_tmp4_ == NULL, "in_play_child_structure == null");
#line 1803 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp5_ = self->priv->from_path;
#line 1803 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp6_ = reparent_tag_command_get_child_structure_at (self, _tmp5_);
#line 1803 "/home/jens/Source/shotwell/src/Commands.vala"
	_g_object_unref0 (self->priv->in_play_child_structure);
#line 1803 "/home/jens/Source/shotwell/src/Commands.vala"
	self->priv->in_play_child_structure = _tmp6_;
#line 1806 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp7_ = tag_global;
#line 1806 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp8_ = self->priv->from_path;
#line 1806 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp9_ = tag_source_collection_exists (_tmp7_, _tmp8_, FALSE);
#line 1806 "/home/jens/Source/shotwell/src/Commands.vala"
	_vala_assert (_tmp9_, "Tag.global.exists(from_path)");
#line 1807 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp10_ = self->priv->from_path;
#line 1807 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp11_ = tag_for_path (_tmp10_);
#line 1807 "/home/jens/Source/shotwell/src/Commands.vala"
	from_tag = _tmp11_;
#line 1808 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp12_ = self->priv->src_before_state;
#line 1808 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp13_ = from_tag;
#line 1808 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp14_ = proxyable_get_proxy (G_TYPE_CHECK_INSTANCE_CAST (_tmp13_, TYPE_PROXYABLE, Proxyable));
#line 1808 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp15_ = _tmp14_;
#line 1808 "/home/jens/Source/shotwell/src/Commands.vala"
	gee_collection_add (G_TYPE_CHECK_INSTANCE_CAST (_tmp12_, GEE_TYPE_COLLECTION, GeeCollection), _tmp15_);
#line 1808 "/home/jens/Source/shotwell/src/Commands.vala"
	_source_proxy_unref0 (_tmp15_);
#line 1811 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp16_ = self->priv->to_path;
#line 1811 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp17_ = hierarchical_tag_utilities_enumerate_parent_paths (_tmp16_);
#line 1811 "/home/jens/Source/shotwell/src/Commands.vala"
	parent_paths = _tmp17_;
#line 1812 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp18_ = parent_paths;
#line 1812 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp19_ = gee_collection_get_size (G_TYPE_CHECK_INSTANCE_CAST (_tmp18_, GEE_TYPE_COLLECTION, GeeCollection));
#line 1812 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp20_ = _tmp19_;
#line 1812 "/home/jens/Source/shotwell/src/Commands.vala"
	if (_tmp20_ > 0) {
#line 15403 "Commands.c"
		GeeList* _tmp21_;
		GeeList* _tmp22_;
		gint _tmp23_;
		gint _tmp24_;
		gpointer _tmp25_;
#line 1813 "/home/jens/Source/shotwell/src/Commands.vala"
		_tmp21_ = parent_paths;
#line 1813 "/home/jens/Source/shotwell/src/Commands.vala"
		_tmp22_ = parent_paths;
#line 1813 "/home/jens/Source/shotwell/src/Commands.vala"
		_tmp23_ = gee_collection_get_size (G_TYPE_CHECK_INSTANCE_CAST (_tmp22_, GEE_TYPE_COLLECTION, GeeCollection));
#line 1813 "/home/jens/Source/shotwell/src/Commands.vala"
		_tmp24_ = _tmp23_;
#line 1813 "/home/jens/Source/shotwell/src/Commands.vala"
		_tmp25_ = gee_list_get (_tmp21_, _tmp24_ - 1);
#line 1813 "/home/jens/Source/shotwell/src/Commands.vala"
		_g_free0 (self->priv->to_path_parent_path);
#line 1813 "/home/jens/Source/shotwell/src/Commands.vala"
		self->priv->to_path_parent_path = (gchar*) _tmp25_;
#line 15423 "Commands.c"
	}
#line 1814 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp26_ = self->priv->to_path_parent_path;
#line 1814 "/home/jens/Source/shotwell/src/Commands.vala"
	if (_tmp26_ != NULL) {
#line 15429 "Commands.c"
		GeeMap* _tmp27_;
		const gchar* _tmp28_;
		GeeMap* _tmp29_;
#line 1815 "/home/jens/Source/shotwell/src/Commands.vala"
		_tmp27_ = self->priv->existing_dest_child_structure;
#line 1815 "/home/jens/Source/shotwell/src/Commands.vala"
		_vala_assert (_tmp27_ == NULL, "existing_dest_child_structure == null");
#line 1816 "/home/jens/Source/shotwell/src/Commands.vala"
		_tmp28_ = self->priv->to_path_parent_path;
#line 1816 "/home/jens/Source/shotwell/src/Commands.vala"
		_tmp29_ = reparent_tag_command_get_child_structure_at (self, _tmp28_);
#line 1816 "/home/jens/Source/shotwell/src/Commands.vala"
		_g_object_unref0 (self->priv->existing_dest_child_structure);
#line 1816 "/home/jens/Source/shotwell/src/Commands.vala"
		self->priv->existing_dest_child_structure = _tmp29_;
#line 15445 "Commands.c"
	}
#line 1820 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp30_ = self->priv->to_path_parent_path;
#line 1820 "/home/jens/Source/shotwell/src/Commands.vala"
	if (_tmp30_ == NULL) {
#line 15451 "Commands.c"
		GeeMap* _tmp31_;
		GeeSet* _tmp32_;
		const gchar* _tmp33_;
		GeeMap* _tmp34_;
		GeeHashSet* _tmp35_;
		GeeSet* _tmp36_;
		const gchar* _tmp37_;
		Tag* _tmp38_;
		Tag* _tmp39_;
		GeeCollection* _tmp40_;
		GeeCollection* _tmp41_;
#line 1821 "/home/jens/Source/shotwell/src/Commands.vala"
		_tmp31_ = self->priv->existing_dest_child_structure;
#line 1821 "/home/jens/Source/shotwell/src/Commands.vala"
		_vala_assert (_tmp31_ == NULL, "existing_dest_child_structure == null");
#line 1822 "/home/jens/Source/shotwell/src/Commands.vala"
		_tmp32_ = self->priv->existing_dest_membership;
#line 1822 "/home/jens/Source/shotwell/src/Commands.vala"
		_vala_assert (_tmp32_ == NULL, "existing_dest_membership == null");
#line 1823 "/home/jens/Source/shotwell/src/Commands.vala"
		_tmp33_ = self->priv->to_path;
#line 1823 "/home/jens/Source/shotwell/src/Commands.vala"
		_tmp34_ = reparent_tag_command_get_child_structure_at (self, _tmp33_);
#line 1823 "/home/jens/Source/shotwell/src/Commands.vala"
		_g_object_unref0 (self->priv->existing_dest_child_structure);
#line 1823 "/home/jens/Source/shotwell/src/Commands.vala"
		self->priv->existing_dest_child_structure = _tmp34_;
#line 1824 "/home/jens/Source/shotwell/src/Commands.vala"
		_tmp35_ = gee_hash_set_new (TYPE_MEDIA_SOURCE, (GBoxedCopyFunc) g_object_ref, (GDestroyNotify) g_object_unref, NULL, NULL, NULL, NULL, NULL, NULL);
#line 1824 "/home/jens/Source/shotwell/src/Commands.vala"
		_g_object_unref0 (self->priv->existing_dest_membership);
#line 1824 "/home/jens/Source/shotwell/src/Commands.vala"
		self->priv->existing_dest_membership = G_TYPE_CHECK_INSTANCE_CAST (_tmp35_, GEE_TYPE_SET, GeeSet);
#line 1825 "/home/jens/Source/shotwell/src/Commands.vala"
		_tmp36_ = self->priv->existing_dest_membership;
#line 1825 "/home/jens/Source/shotwell/src/Commands.vala"
		_tmp37_ = self->priv->to_path;
#line 1825 "/home/jens/Source/shotwell/src/Commands.vala"
		_tmp38_ = tag_for_path (_tmp37_);
#line 1825 "/home/jens/Source/shotwell/src/Commands.vala"
		_tmp39_ = _tmp38_;
#line 1825 "/home/jens/Source/shotwell/src/Commands.vala"
		_tmp40_ = tag_get_sources (_tmp39_);
#line 1825 "/home/jens/Source/shotwell/src/Commands.vala"
		_tmp41_ = _tmp40_;
#line 1825 "/home/jens/Source/shotwell/src/Commands.vala"
		gee_collection_add_all (G_TYPE_CHECK_INSTANCE_CAST (_tmp36_, GEE_TYPE_COLLECTION, GeeCollection), _tmp41_);
#line 1825 "/home/jens/Source/shotwell/src/Commands.vala"
		_g_object_unref0 (_tmp41_);
#line 1825 "/home/jens/Source/shotwell/src/Commands.vala"
		_g_object_unref0 (_tmp39_);
#line 15503 "Commands.c"
	}
#line 1829 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp42_ = self->priv->to_path_parent_path;
#line 1829 "/home/jens/Source/shotwell/src/Commands.vala"
	if (_tmp42_ != NULL) {
#line 15509 "Commands.c"
		gchar* new_tpp = NULL;
		const gchar* _tmp43_;
		gchar* _tmp44_;
		const gchar* _tmp45_ = NULL;
		const gchar* _tmp46_;
		gchar* _tmp49_;
		TagSourceCollection* _tmp50_;
		const gchar* _tmp51_;
		gboolean _tmp52_;
		GeeList* _tmp53_;
		const gchar* _tmp54_;
		Tag* _tmp55_;
		Tag* _tmp56_;
		SourceProxy* _tmp57_;
		SourceProxy* _tmp58_;
#line 1830 "/home/jens/Source/shotwell/src/Commands.vala"
		_tmp43_ = self->priv->to_path_parent_path;
#line 1830 "/home/jens/Source/shotwell/src/Commands.vala"
		_tmp44_ = hierarchical_tag_utilities_get_root_path_form (_tmp43_);
#line 1830 "/home/jens/Source/shotwell/src/Commands.vala"
		new_tpp = _tmp44_;
#line 1831 "/home/jens/Source/shotwell/src/Commands.vala"
		_tmp46_ = new_tpp;
#line 1831 "/home/jens/Source/shotwell/src/Commands.vala"
		if (_tmp46_ != NULL) {
#line 15535 "Commands.c"
			const gchar* _tmp47_;
#line 1831 "/home/jens/Source/shotwell/src/Commands.vala"
			_tmp47_ = new_tpp;
#line 1831 "/home/jens/Source/shotwell/src/Commands.vala"
			_tmp45_ = _tmp47_;
#line 15541 "Commands.c"
		} else {
			const gchar* _tmp48_;
#line 1831 "/home/jens/Source/shotwell/src/Commands.vala"
			_tmp48_ = self->priv->to_path_parent_path;
#line 1831 "/home/jens/Source/shotwell/src/Commands.vala"
			_tmp45_ = _tmp48_;
#line 15548 "Commands.c"
		}
#line 1831 "/home/jens/Source/shotwell/src/Commands.vala"
		_tmp49_ = g_strdup (_tmp45_);
#line 1831 "/home/jens/Source/shotwell/src/Commands.vala"
		_g_free0 (self->priv->to_path_parent_path);
#line 1831 "/home/jens/Source/shotwell/src/Commands.vala"
		self->priv->to_path_parent_path = _tmp49_;
#line 1832 "/home/jens/Source/shotwell/src/Commands.vala"
		_tmp50_ = tag_global;
#line 1832 "/home/jens/Source/shotwell/src/Commands.vala"
		_tmp51_ = self->priv->to_path_parent_path;
#line 1832 "/home/jens/Source/shotwell/src/Commands.vala"
		_tmp52_ = tag_source_collection_exists (_tmp50_, _tmp51_, FALSE);
#line 1832 "/home/jens/Source/shotwell/src/Commands.vala"
		_vala_assert (_tmp52_, "Tag.global.exists(to_path_parent_path)");
#line 1833 "/home/jens/Source/shotwell/src/Commands.vala"
		_tmp53_ = self->priv->dest_before_state;
#line 1833 "/home/jens/Source/shotwell/src/Commands.vala"
		_tmp54_ = self->priv->to_path_parent_path;
#line 1833 "/home/jens/Source/shotwell/src/Commands.vala"
		_tmp55_ = tag_for_path (_tmp54_);
#line 1833 "/home/jens/Source/shotwell/src/Commands.vala"
		_tmp56_ = _tmp55_;
#line 1833 "/home/jens/Source/shotwell/src/Commands.vala"
		_tmp57_ = proxyable_get_proxy (G_TYPE_CHECK_INSTANCE_CAST (_tmp56_, TYPE_PROXYABLE, Proxyable));
#line 1833 "/home/jens/Source/shotwell/src/Commands.vala"
		_tmp58_ = _tmp57_;
#line 1833 "/home/jens/Source/shotwell/src/Commands.vala"
		gee_collection_add (G_TYPE_CHECK_INSTANCE_CAST (_tmp53_, GEE_TYPE_COLLECTION, GeeCollection), _tmp58_);
#line 1833 "/home/jens/Source/shotwell/src/Commands.vala"
		_source_proxy_unref0 (_tmp58_);
#line 1833 "/home/jens/Source/shotwell/src/Commands.vala"
		_g_object_unref0 (_tmp56_);
#line 1829 "/home/jens/Source/shotwell/src/Commands.vala"
		_g_free0 (new_tpp);
#line 15584 "Commands.c"
	}
#line 1837 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp59_ = self->priv->to_path_parent_path;
#line 1837 "/home/jens/Source/shotwell/src/Commands.vala"
	if (_tmp59_ == NULL) {
#line 15590 "Commands.c"
		GeeList* _tmp60_;
		const gchar* _tmp61_;
		Tag* _tmp62_;
		Tag* _tmp63_;
		SourceProxy* _tmp64_;
		SourceProxy* _tmp65_;
#line 1838 "/home/jens/Source/shotwell/src/Commands.vala"
		_tmp60_ = self->priv->dest_before_state;
#line 1838 "/home/jens/Source/shotwell/src/Commands.vala"
		_tmp61_ = self->priv->to_path;
#line 1838 "/home/jens/Source/shotwell/src/Commands.vala"
		_tmp62_ = tag_for_path (_tmp61_);
#line 1838 "/home/jens/Source/shotwell/src/Commands.vala"
		_tmp63_ = _tmp62_;
#line 1838 "/home/jens/Source/shotwell/src/Commands.vala"
		_tmp64_ = proxyable_get_proxy (G_TYPE_CHECK_INSTANCE_CAST (_tmp63_, TYPE_PROXYABLE, Proxyable));
#line 1838 "/home/jens/Source/shotwell/src/Commands.vala"
		_tmp65_ = _tmp64_;
#line 1838 "/home/jens/Source/shotwell/src/Commands.vala"
		gee_collection_add (G_TYPE_CHECK_INSTANCE_CAST (_tmp60_, GEE_TYPE_COLLECTION, GeeCollection), _tmp65_);
#line 1838 "/home/jens/Source/shotwell/src/Commands.vala"
		_source_proxy_unref0 (_tmp65_);
#line 1838 "/home/jens/Source/shotwell/src/Commands.vala"
		_g_object_unref0 (_tmp63_);
#line 15615 "Commands.c"
	}
#line 1842 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp66_ = from_tag;
#line 1842 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp67_ = tag_get_hierarchical_children (_tmp66_);
#line 1842 "/home/jens/Source/shotwell/src/Commands.vala"
	from_children = _tmp67_;
#line 15623 "Commands.c"
	{
		gint i = 0;
		GeeList* _tmp68_;
		gint _tmp69_;
		gint _tmp70_;
#line 1843 "/home/jens/Source/shotwell/src/Commands.vala"
		_tmp68_ = from_children;
#line 1843 "/home/jens/Source/shotwell/src/Commands.vala"
		_tmp69_ = gee_collection_get_size (G_TYPE_CHECK_INSTANCE_CAST (_tmp68_, GEE_TYPE_COLLECTION, GeeCollection));
#line 1843 "/home/jens/Source/shotwell/src/Commands.vala"
		_tmp70_ = _tmp69_;
#line 1843 "/home/jens/Source/shotwell/src/Commands.vala"
		i = _tmp70_ - 1;
#line 15637 "Commands.c"
		{
			gboolean _tmp71_ = FALSE;
#line 1843 "/home/jens/Source/shotwell/src/Commands.vala"
			_tmp71_ = TRUE;
#line 1843 "/home/jens/Source/shotwell/src/Commands.vala"
			while (TRUE) {
#line 15644 "Commands.c"
				gint _tmp73_;
				GeeList* _tmp74_;
				GeeList* _tmp75_;
				gint _tmp76_;
				gpointer _tmp77_;
				Tag* _tmp78_;
				SourceProxy* _tmp79_;
				SourceProxy* _tmp80_;
#line 1843 "/home/jens/Source/shotwell/src/Commands.vala"
				if (!_tmp71_) {
#line 15655 "Commands.c"
					gint _tmp72_;
#line 1843 "/home/jens/Source/shotwell/src/Commands.vala"
					_tmp72_ = i;
#line 1843 "/home/jens/Source/shotwell/src/Commands.vala"
					i = _tmp72_ - 1;
#line 15661 "Commands.c"
				}
#line 1843 "/home/jens/Source/shotwell/src/Commands.vala"
				_tmp71_ = FALSE;
#line 1843 "/home/jens/Source/shotwell/src/Commands.vala"
				_tmp73_ = i;
#line 1843 "/home/jens/Source/shotwell/src/Commands.vala"
				if (!(_tmp73_ >= 0)) {
#line 1843 "/home/jens/Source/shotwell/src/Commands.vala"
					break;
#line 15671 "Commands.c"
				}
#line 1844 "/home/jens/Source/shotwell/src/Commands.vala"
				_tmp74_ = self->priv->src_before_state;
#line 1844 "/home/jens/Source/shotwell/src/Commands.vala"
				_tmp75_ = from_children;
#line 1844 "/home/jens/Source/shotwell/src/Commands.vala"
				_tmp76_ = i;
#line 1844 "/home/jens/Source/shotwell/src/Commands.vala"
				_tmp77_ = gee_list_get (_tmp75_, _tmp76_);
#line 1844 "/home/jens/Source/shotwell/src/Commands.vala"
				_tmp78_ = (Tag*) _tmp77_;
#line 1844 "/home/jens/Source/shotwell/src/Commands.vala"
				_tmp79_ = proxyable_get_proxy (G_TYPE_CHECK_INSTANCE_CAST (_tmp78_, TYPE_PROXYABLE, Proxyable));
#line 1844 "/home/jens/Source/shotwell/src/Commands.vala"
				_tmp80_ = _tmp79_;
#line 1844 "/home/jens/Source/shotwell/src/Commands.vala"
				gee_collection_add (G_TYPE_CHECK_INSTANCE_CAST (_tmp74_, GEE_TYPE_COLLECTION, GeeCollection), _tmp80_);
#line 1844 "/home/jens/Source/shotwell/src/Commands.vala"
				_source_proxy_unref0 (_tmp80_);
#line 1844 "/home/jens/Source/shotwell/src/Commands.vala"
				_g_object_unref0 (_tmp78_);
#line 15693 "Commands.c"
			}
		}
	}
#line 1848 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp81_ = self->priv->to_path_parent_path;
#line 1848 "/home/jens/Source/shotwell/src/Commands.vala"
	if (_tmp81_ != NULL) {
#line 15701 "Commands.c"
		GeeList* to_children = NULL;
		const gchar* _tmp82_;
		Tag* _tmp83_;
		Tag* _tmp84_;
		GeeList* _tmp85_;
		GeeList* _tmp86_;
#line 1849 "/home/jens/Source/shotwell/src/Commands.vala"
		_tmp82_ = self->priv->to_path_parent_path;
#line 1849 "/home/jens/Source/shotwell/src/Commands.vala"
		_tmp83_ = tag_for_path (_tmp82_);
#line 1849 "/home/jens/Source/shotwell/src/Commands.vala"
		_tmp84_ = _tmp83_;
#line 1849 "/home/jens/Source/shotwell/src/Commands.vala"
		_tmp85_ = tag_get_hierarchical_children (_tmp84_);
#line 1849 "/home/jens/Source/shotwell/src/Commands.vala"
		_tmp86_ = _tmp85_;
#line 1849 "/home/jens/Source/shotwell/src/Commands.vala"
		_g_object_unref0 (_tmp84_);
#line 1849 "/home/jens/Source/shotwell/src/Commands.vala"
		to_children = _tmp86_;
#line 15722 "Commands.c"
		{
			gint i = 0;
			GeeList* _tmp87_;
			gint _tmp88_;
			gint _tmp89_;
#line 1850 "/home/jens/Source/shotwell/src/Commands.vala"
			_tmp87_ = to_children;
#line 1850 "/home/jens/Source/shotwell/src/Commands.vala"
			_tmp88_ = gee_collection_get_size (G_TYPE_CHECK_INSTANCE_CAST (_tmp87_, GEE_TYPE_COLLECTION, GeeCollection));
#line 1850 "/home/jens/Source/shotwell/src/Commands.vala"
			_tmp89_ = _tmp88_;
#line 1850 "/home/jens/Source/shotwell/src/Commands.vala"
			i = _tmp89_ - 1;
#line 15736 "Commands.c"
			{
				gboolean _tmp90_ = FALSE;
#line 1850 "/home/jens/Source/shotwell/src/Commands.vala"
				_tmp90_ = TRUE;
#line 1850 "/home/jens/Source/shotwell/src/Commands.vala"
				while (TRUE) {
#line 15743 "Commands.c"
					gint _tmp92_;
					GeeList* _tmp93_;
					GeeList* _tmp94_;
					gint _tmp95_;
					gpointer _tmp96_;
					Tag* _tmp97_;
					SourceProxy* _tmp98_;
					SourceProxy* _tmp99_;
#line 1850 "/home/jens/Source/shotwell/src/Commands.vala"
					if (!_tmp90_) {
#line 15754 "Commands.c"
						gint _tmp91_;
#line 1850 "/home/jens/Source/shotwell/src/Commands.vala"
						_tmp91_ = i;
#line 1850 "/home/jens/Source/shotwell/src/Commands.vala"
						i = _tmp91_ - 1;
#line 15760 "Commands.c"
					}
#line 1850 "/home/jens/Source/shotwell/src/Commands.vala"
					_tmp90_ = FALSE;
#line 1850 "/home/jens/Source/shotwell/src/Commands.vala"
					_tmp92_ = i;
#line 1850 "/home/jens/Source/shotwell/src/Commands.vala"
					if (!(_tmp92_ >= 0)) {
#line 1850 "/home/jens/Source/shotwell/src/Commands.vala"
						break;
#line 15770 "Commands.c"
					}
#line 1851 "/home/jens/Source/shotwell/src/Commands.vala"
					_tmp93_ = self->priv->dest_before_state;
#line 1851 "/home/jens/Source/shotwell/src/Commands.vala"
					_tmp94_ = to_children;
#line 1851 "/home/jens/Source/shotwell/src/Commands.vala"
					_tmp95_ = i;
#line 1851 "/home/jens/Source/shotwell/src/Commands.vala"
					_tmp96_ = gee_list_get (_tmp94_, _tmp95_);
#line 1851 "/home/jens/Source/shotwell/src/Commands.vala"
					_tmp97_ = (Tag*) _tmp96_;
#line 1851 "/home/jens/Source/shotwell/src/Commands.vala"
					_tmp98_ = proxyable_get_proxy (G_TYPE_CHECK_INSTANCE_CAST (_tmp97_, TYPE_PROXYABLE, Proxyable));
#line 1851 "/home/jens/Source/shotwell/src/Commands.vala"
					_tmp99_ = _tmp98_;
#line 1851 "/home/jens/Source/shotwell/src/Commands.vala"
					gee_collection_add (G_TYPE_CHECK_INSTANCE_CAST (_tmp93_, GEE_TYPE_COLLECTION, GeeCollection), _tmp99_);
#line 1851 "/home/jens/Source/shotwell/src/Commands.vala"
					_source_proxy_unref0 (_tmp99_);
#line 1851 "/home/jens/Source/shotwell/src/Commands.vala"
					_g_object_unref0 (_tmp97_);
#line 15792 "Commands.c"
				}
			}
		}
#line 1848 "/home/jens/Source/shotwell/src/Commands.vala"
		_g_object_unref0 (to_children);
#line 15798 "Commands.c"
	}
#line 1856 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp100_ = self->priv->to_path_parent_path;
#line 1856 "/home/jens/Source/shotwell/src/Commands.vala"
	if (_tmp100_ == NULL) {
#line 15804 "Commands.c"
		GeeList* to_children = NULL;
		const gchar* _tmp101_;
		Tag* _tmp102_;
		Tag* _tmp103_;
		GeeList* _tmp104_;
		GeeList* _tmp105_;
#line 1857 "/home/jens/Source/shotwell/src/Commands.vala"
		_tmp101_ = self->priv->to_path;
#line 1857 "/home/jens/Source/shotwell/src/Commands.vala"
		_tmp102_ = tag_for_path (_tmp101_);
#line 1857 "/home/jens/Source/shotwell/src/Commands.vala"
		_tmp103_ = _tmp102_;
#line 1857 "/home/jens/Source/shotwell/src/Commands.vala"
		_tmp104_ = tag_get_hierarchical_children (_tmp103_);
#line 1857 "/home/jens/Source/shotwell/src/Commands.vala"
		_tmp105_ = _tmp104_;
#line 1857 "/home/jens/Source/shotwell/src/Commands.vala"
		_g_object_unref0 (_tmp103_);
#line 1857 "/home/jens/Source/shotwell/src/Commands.vala"
		to_children = _tmp105_;
#line 15825 "Commands.c"
		{
			gint i = 0;
			GeeList* _tmp106_;
			gint _tmp107_;
			gint _tmp108_;
#line 1858 "/home/jens/Source/shotwell/src/Commands.vala"
			_tmp106_ = to_children;
#line 1858 "/home/jens/Source/shotwell/src/Commands.vala"
			_tmp107_ = gee_collection_get_size (G_TYPE_CHECK_INSTANCE_CAST (_tmp106_, GEE_TYPE_COLLECTION, GeeCollection));
#line 1858 "/home/jens/Source/shotwell/src/Commands.vala"
			_tmp108_ = _tmp107_;
#line 1858 "/home/jens/Source/shotwell/src/Commands.vala"
			i = _tmp108_ - 1;
#line 15839 "Commands.c"
			{
				gboolean _tmp109_ = FALSE;
#line 1858 "/home/jens/Source/shotwell/src/Commands.vala"
				_tmp109_ = TRUE;
#line 1858 "/home/jens/Source/shotwell/src/Commands.vala"
				while (TRUE) {
#line 15846 "Commands.c"
					gint _tmp111_;
					GeeList* _tmp112_;
					GeeList* _tmp113_;
					gint _tmp114_;
					gpointer _tmp115_;
					Tag* _tmp116_;
					SourceProxy* _tmp117_;
					SourceProxy* _tmp118_;
#line 1858 "/home/jens/Source/shotwell/src/Commands.vala"
					if (!_tmp109_) {
#line 15857 "Commands.c"
						gint _tmp110_;
#line 1858 "/home/jens/Source/shotwell/src/Commands.vala"
						_tmp110_ = i;
#line 1858 "/home/jens/Source/shotwell/src/Commands.vala"
						i = _tmp110_ - 1;
#line 15863 "Commands.c"
					}
#line 1858 "/home/jens/Source/shotwell/src/Commands.vala"
					_tmp109_ = FALSE;
#line 1858 "/home/jens/Source/shotwell/src/Commands.vala"
					_tmp111_ = i;
#line 1858 "/home/jens/Source/shotwell/src/Commands.vala"
					if (!(_tmp111_ >= 0)) {
#line 1858 "/home/jens/Source/shotwell/src/Commands.vala"
						break;
#line 15873 "Commands.c"
					}
#line 1859 "/home/jens/Source/shotwell/src/Commands.vala"
					_tmp112_ = self->priv->dest_before_state;
#line 1859 "/home/jens/Source/shotwell/src/Commands.vala"
					_tmp113_ = to_children;
#line 1859 "/home/jens/Source/shotwell/src/Commands.vala"
					_tmp114_ = i;
#line 1859 "/home/jens/Source/shotwell/src/Commands.vala"
					_tmp115_ = gee_list_get (_tmp113_, _tmp114_);
#line 1859 "/home/jens/Source/shotwell/src/Commands.vala"
					_tmp116_ = (Tag*) _tmp115_;
#line 1859 "/home/jens/Source/shotwell/src/Commands.vala"
					_tmp117_ = proxyable_get_proxy (G_TYPE_CHECK_INSTANCE_CAST (_tmp116_, TYPE_PROXYABLE, Proxyable));
#line 1859 "/home/jens/Source/shotwell/src/Commands.vala"
					_tmp118_ = _tmp117_;
#line 1859 "/home/jens/Source/shotwell/src/Commands.vala"
					gee_collection_add (G_TYPE_CHECK_INSTANCE_CAST (_tmp112_, GEE_TYPE_COLLECTION, GeeCollection), _tmp118_);
#line 1859 "/home/jens/Source/shotwell/src/Commands.vala"
					_source_proxy_unref0 (_tmp118_);
#line 1859 "/home/jens/Source/shotwell/src/Commands.vala"
					_g_object_unref0 (_tmp116_);
#line 15895 "Commands.c"
				}
			}
		}
#line 1856 "/home/jens/Source/shotwell/src/Commands.vala"
		_g_object_unref0 (to_children);
#line 15901 "Commands.c"
	}
#line 1794 "/home/jens/Source/shotwell/src/Commands.vala"
	_g_object_unref0 (from_children);
#line 1794 "/home/jens/Source/shotwell/src/Commands.vala"
	_g_object_unref0 (parent_paths);
#line 1794 "/home/jens/Source/shotwell/src/Commands.vala"
	_g_object_unref0 (from_tag);
#line 15909 "Commands.c"
}


static glong string_strnlen (gchar* str, glong maxlen) {
	glong result = 0L;
	gchar* end = NULL;
	gchar* _tmp0_;
	glong _tmp1_;
	gchar* _tmp2_;
	gchar* _tmp3_;
#line 1322 "/usr/share/vala-0.36/vapi/glib-2.0.vapi"
	_tmp0_ = str;
#line 1322 "/usr/share/vala-0.36/vapi/glib-2.0.vapi"
	_tmp1_ = maxlen;
#line 1322 "/usr/share/vala-0.36/vapi/glib-2.0.vapi"
	_tmp2_ = memchr (_tmp0_, 0, (gsize) _tmp1_);
#line 1322 "/usr/share/vala-0.36/vapi/glib-2.0.vapi"
	end = _tmp2_;
#line 1323 "/usr/share/vala-0.36/vapi/glib-2.0.vapi"
	_tmp3_ = end;
#line 1323 "/usr/share/vala-0.36/vapi/glib-2.0.vapi"
	if (_tmp3_ == NULL) {
#line 15932 "Commands.c"
		glong _tmp4_;
#line 1324 "/usr/share/vala-0.36/vapi/glib-2.0.vapi"
		_tmp4_ = maxlen;
#line 1324 "/usr/share/vala-0.36/vapi/glib-2.0.vapi"
		result = _tmp4_;
#line 1324 "/usr/share/vala-0.36/vapi/glib-2.0.vapi"
		return result;
#line 15940 "Commands.c"
	} else {
		gchar* _tmp5_;
		gchar* _tmp6_;
#line 1326 "/usr/share/vala-0.36/vapi/glib-2.0.vapi"
		_tmp5_ = end;
#line 1326 "/usr/share/vala-0.36/vapi/glib-2.0.vapi"
		_tmp6_ = str;
#line 1326 "/usr/share/vala-0.36/vapi/glib-2.0.vapi"
		result = (glong) (_tmp5_ - _tmp6_);
#line 1326 "/usr/share/vala-0.36/vapi/glib-2.0.vapi"
		return result;
#line 15952 "Commands.c"
	}
}


static gchar* string_substring (const gchar* self, glong offset, glong len) {
	gchar* result = NULL;
	glong string_length = 0L;
	gboolean _tmp0_ = FALSE;
	glong _tmp1_;
	glong _tmp8_;
	glong _tmp14_;
	glong _tmp17_;
	glong _tmp18_;
	glong _tmp19_;
	glong _tmp20_;
	glong _tmp21_;
	gchar* _tmp22_;
#line 1333 "/usr/share/vala-0.36/vapi/glib-2.0.vapi"
	g_return_val_if_fail (self != NULL, NULL);
#line 1335 "/usr/share/vala-0.36/vapi/glib-2.0.vapi"
	_tmp1_ = offset;
#line 1335 "/usr/share/vala-0.36/vapi/glib-2.0.vapi"
	if (_tmp1_ >= ((glong) 0)) {
#line 15976 "Commands.c"
		glong _tmp2_;
#line 1335 "/usr/share/vala-0.36/vapi/glib-2.0.vapi"
		_tmp2_ = len;
#line 1335 "/usr/share/vala-0.36/vapi/glib-2.0.vapi"
		_tmp0_ = _tmp2_ >= ((glong) 0);
#line 15982 "Commands.c"
	} else {
#line 1335 "/usr/share/vala-0.36/vapi/glib-2.0.vapi"
		_tmp0_ = FALSE;
#line 15986 "Commands.c"
	}
#line 1335 "/usr/share/vala-0.36/vapi/glib-2.0.vapi"
	if (_tmp0_) {
#line 15990 "Commands.c"
		glong _tmp3_;
		glong _tmp4_;
		glong _tmp5_;
#line 1337 "/usr/share/vala-0.36/vapi/glib-2.0.vapi"
		_tmp3_ = offset;
#line 1337 "/usr/share/vala-0.36/vapi/glib-2.0.vapi"
		_tmp4_ = len;
#line 1337 "/usr/share/vala-0.36/vapi/glib-2.0.vapi"
		_tmp5_ = string_strnlen ((gchar*) self, _tmp3_ + _tmp4_);
#line 1337 "/usr/share/vala-0.36/vapi/glib-2.0.vapi"
		string_length = _tmp5_;
#line 16002 "Commands.c"
	} else {
		gint _tmp6_;
		gint _tmp7_;
#line 1339 "/usr/share/vala-0.36/vapi/glib-2.0.vapi"
		_tmp6_ = strlen (self);
#line 1339 "/usr/share/vala-0.36/vapi/glib-2.0.vapi"
		_tmp7_ = _tmp6_;
#line 1339 "/usr/share/vala-0.36/vapi/glib-2.0.vapi"
		string_length = (glong) _tmp7_;
#line 16012 "Commands.c"
	}
#line 1342 "/usr/share/vala-0.36/vapi/glib-2.0.vapi"
	_tmp8_ = offset;
#line 1342 "/usr/share/vala-0.36/vapi/glib-2.0.vapi"
	if (_tmp8_ < ((glong) 0)) {
#line 16018 "Commands.c"
		glong _tmp9_;
		glong _tmp10_;
		glong _tmp11_;
#line 1343 "/usr/share/vala-0.36/vapi/glib-2.0.vapi"
		_tmp9_ = string_length;
#line 1343 "/usr/share/vala-0.36/vapi/glib-2.0.vapi"
		_tmp10_ = offset;
#line 1343 "/usr/share/vala-0.36/vapi/glib-2.0.vapi"
		offset = _tmp9_ + _tmp10_;
#line 1344 "/usr/share/vala-0.36/vapi/glib-2.0.vapi"
		_tmp11_ = offset;
#line 1344 "/usr/share/vala-0.36/vapi/glib-2.0.vapi"
		g_return_val_if_fail (_tmp11_ >= ((glong) 0), NULL);
#line 16032 "Commands.c"
	} else {
		glong _tmp12_;
		glong _tmp13_;
#line 1346 "/usr/share/vala-0.36/vapi/glib-2.0.vapi"
		_tmp12_ = offset;
#line 1346 "/usr/share/vala-0.36/vapi/glib-2.0.vapi"
		_tmp13_ = string_length;
#line 1346 "/usr/share/vala-0.36/vapi/glib-2.0.vapi"
		g_return_val_if_fail (_tmp12_ <= _tmp13_, NULL);
#line 16042 "Commands.c"
	}
#line 1348 "/usr/share/vala-0.36/vapi/glib-2.0.vapi"
	_tmp14_ = len;
#line 1348 "/usr/share/vala-0.36/vapi/glib-2.0.vapi"
	if (_tmp14_ < ((glong) 0)) {
#line 16048 "Commands.c"
		glong _tmp15_;
		glong _tmp16_;
#line 1349 "/usr/share/vala-0.36/vapi/glib-2.0.vapi"
		_tmp15_ = string_length;
#line 1349 "/usr/share/vala-0.36/vapi/glib-2.0.vapi"
		_tmp16_ = offset;
#line 1349 "/usr/share/vala-0.36/vapi/glib-2.0.vapi"
		len = _tmp15_ - _tmp16_;
#line 16057 "Commands.c"
	}
#line 1351 "/usr/share/vala-0.36/vapi/glib-2.0.vapi"
	_tmp17_ = offset;
#line 1351 "/usr/share/vala-0.36/vapi/glib-2.0.vapi"
	_tmp18_ = len;
#line 1351 "/usr/share/vala-0.36/vapi/glib-2.0.vapi"
	_tmp19_ = string_length;
#line 1351 "/usr/share/vala-0.36/vapi/glib-2.0.vapi"
	g_return_val_if_fail ((_tmp17_ + _tmp18_) <= _tmp19_, NULL);
#line 1352 "/usr/share/vala-0.36/vapi/glib-2.0.vapi"
	_tmp20_ = offset;
#line 1352 "/usr/share/vala-0.36/vapi/glib-2.0.vapi"
	_tmp21_ = len;
#line 1352 "/usr/share/vala-0.36/vapi/glib-2.0.vapi"
	_tmp22_ = g_strndup (((gchar*) self) + _tmp20_, (gsize) _tmp21_);
#line 1352 "/usr/share/vala-0.36/vapi/glib-2.0.vapi"
	result = _tmp22_;
#line 1352 "/usr/share/vala-0.36/vapi/glib-2.0.vapi"
	return result;
#line 16077 "Commands.c"
}


static void reparent_tag_command_restore_before_state (ReparentTagCommand* self) {
	GeeList* _tmp0_;
	GeeMap* _tmp1_;
	const gchar* _tmp2_;
	const gchar* _tmp10_ = NULL;
	const gchar* _tmp11_;
	gchar* unwind_target = NULL;
	gchar* _tmp14_;
	const gchar* _tmp93_;
#line 1863 "/home/jens/Source/shotwell/src/Commands.vala"
	g_return_if_fail (IS_REPARENT_TAG_COMMAND (self));
#line 1864 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp0_ = self->priv->src_before_state;
#line 1864 "/home/jens/Source/shotwell/src/Commands.vala"
	_vala_assert (_tmp0_ != NULL, "src_before_state != null");
#line 1865 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp1_ = self->priv->existing_dest_child_structure;
#line 1865 "/home/jens/Source/shotwell/src/Commands.vala"
	_vala_assert (_tmp1_ != NULL, "existing_dest_child_structure != null");
#line 1868 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp2_ = self->priv->to_path_parent_path;
#line 1868 "/home/jens/Source/shotwell/src/Commands.vala"
	if (_tmp2_ != NULL) {
#line 16104 "Commands.c"
		gchar* new_tpp = NULL;
		const gchar* _tmp3_;
		gchar* _tmp4_;
		const gchar* _tmp5_ = NULL;
		const gchar* _tmp6_;
		gchar* _tmp9_;
#line 1869 "/home/jens/Source/shotwell/src/Commands.vala"
		_tmp3_ = self->priv->to_path_parent_path;
#line 1869 "/home/jens/Source/shotwell/src/Commands.vala"
		_tmp4_ = hierarchical_tag_utilities_get_root_path_form (_tmp3_);
#line 1869 "/home/jens/Source/shotwell/src/Commands.vala"
		new_tpp = _tmp4_;
#line 1870 "/home/jens/Source/shotwell/src/Commands.vala"
		_tmp6_ = new_tpp;
#line 1870 "/home/jens/Source/shotwell/src/Commands.vala"
		if (_tmp6_ != NULL) {
#line 16121 "Commands.c"
			const gchar* _tmp7_;
#line 1870 "/home/jens/Source/shotwell/src/Commands.vala"
			_tmp7_ = new_tpp;
#line 1870 "/home/jens/Source/shotwell/src/Commands.vala"
			_tmp5_ = _tmp7_;
#line 16127 "Commands.c"
		} else {
			const gchar* _tmp8_;
#line 1870 "/home/jens/Source/shotwell/src/Commands.vala"
			_tmp8_ = self->priv->to_path_parent_path;
#line 1870 "/home/jens/Source/shotwell/src/Commands.vala"
			_tmp5_ = _tmp8_;
#line 16134 "Commands.c"
		}
#line 1870 "/home/jens/Source/shotwell/src/Commands.vala"
		_tmp9_ = g_strdup (_tmp5_);
#line 1870 "/home/jens/Source/shotwell/src/Commands.vala"
		_g_free0 (self->priv->to_path_parent_path);
#line 1870 "/home/jens/Source/shotwell/src/Commands.vala"
		self->priv->to_path_parent_path = _tmp9_;
#line 1868 "/home/jens/Source/shotwell/src/Commands.vala"
		_g_free0 (new_tpp);
#line 16144 "Commands.c"
	}
#line 1873 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp11_ = self->priv->to_path_parent_path;
#line 1873 "/home/jens/Source/shotwell/src/Commands.vala"
	if (_tmp11_ != NULL) {
#line 16150 "Commands.c"
		const gchar* _tmp12_;
#line 1873 "/home/jens/Source/shotwell/src/Commands.vala"
		_tmp12_ = self->priv->to_path_parent_path;
#line 1873 "/home/jens/Source/shotwell/src/Commands.vala"
		_tmp10_ = _tmp12_;
#line 16156 "Commands.c"
	} else {
		const gchar* _tmp13_;
#line 1873 "/home/jens/Source/shotwell/src/Commands.vala"
		_tmp13_ = self->priv->to_path;
#line 1873 "/home/jens/Source/shotwell/src/Commands.vala"
		_tmp10_ = _tmp13_;
#line 16163 "Commands.c"
	}
#line 1873 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp14_ = g_strdup (_tmp10_);
#line 1873 "/home/jens/Source/shotwell/src/Commands.vala"
	unwind_target = _tmp14_;
#line 16169 "Commands.c"
	{
		GeeList* _t_list = NULL;
		const gchar* _tmp15_;
		Tag* _tmp16_;
		Tag* _tmp17_;
		GeeList* _tmp18_;
		GeeList* _tmp19_;
		gint _t_size = 0;
		GeeList* _tmp20_;
		gint _tmp21_;
		gint _tmp22_;
		gint _t_index = 0;
#line 1874 "/home/jens/Source/shotwell/src/Commands.vala"
		_tmp15_ = unwind_target;
#line 1874 "/home/jens/Source/shotwell/src/Commands.vala"
		_tmp16_ = tag_for_path (_tmp15_);
#line 1874 "/home/jens/Source/shotwell/src/Commands.vala"
		_tmp17_ = _tmp16_;
#line 1874 "/home/jens/Source/shotwell/src/Commands.vala"
		_tmp18_ = tag_get_hierarchical_children (_tmp17_);
#line 1874 "/home/jens/Source/shotwell/src/Commands.vala"
		_tmp19_ = _tmp18_;
#line 1874 "/home/jens/Source/shotwell/src/Commands.vala"
		_g_object_unref0 (_tmp17_);
#line 1874 "/home/jens/Source/shotwell/src/Commands.vala"
		_t_list = _tmp19_;
#line 1874 "/home/jens/Source/shotwell/src/Commands.vala"
		_tmp20_ = _t_list;
#line 1874 "/home/jens/Source/shotwell/src/Commands.vala"
		_tmp21_ = gee_collection_get_size (G_TYPE_CHECK_INSTANCE_CAST (_tmp20_, GEE_TYPE_COLLECTION, GeeCollection));
#line 1874 "/home/jens/Source/shotwell/src/Commands.vala"
		_tmp22_ = _tmp21_;
#line 1874 "/home/jens/Source/shotwell/src/Commands.vala"
		_t_size = _tmp22_;
#line 1874 "/home/jens/Source/shotwell/src/Commands.vala"
		_t_index = -1;
#line 1874 "/home/jens/Source/shotwell/src/Commands.vala"
		while (TRUE) {
#line 16208 "Commands.c"
			gint _tmp23_;
			gint _tmp24_;
			gint _tmp25_;
			Tag* t = NULL;
			GeeList* _tmp26_;
			gint _tmp27_;
			gpointer _tmp28_;
			gchar* child_subpath = NULL;
			Tag* _tmp29_;
			gchar* _tmp30_;
			gchar* _tmp31_;
			const gchar* _tmp32_;
			gchar* _tmp33_;
			gchar* _tmp34_;
			const gchar* _tmp35_;
			gboolean _tmp36_;
			GeeMap* _tmp39_;
			const gchar* _tmp40_;
			gboolean _tmp41_;
#line 1874 "/home/jens/Source/shotwell/src/Commands.vala"
			_tmp23_ = _t_index;
#line 1874 "/home/jens/Source/shotwell/src/Commands.vala"
			_t_index = _tmp23_ + 1;
#line 1874 "/home/jens/Source/shotwell/src/Commands.vala"
			_tmp24_ = _t_index;
#line 1874 "/home/jens/Source/shotwell/src/Commands.vala"
			_tmp25_ = _t_size;
#line 1874 "/home/jens/Source/shotwell/src/Commands.vala"
			if (!(_tmp24_ < _tmp25_)) {
#line 1874 "/home/jens/Source/shotwell/src/Commands.vala"
				break;
#line 16240 "Commands.c"
			}
#line 1874 "/home/jens/Source/shotwell/src/Commands.vala"
			_tmp26_ = _t_list;
#line 1874 "/home/jens/Source/shotwell/src/Commands.vala"
			_tmp27_ = _t_index;
#line 1874 "/home/jens/Source/shotwell/src/Commands.vala"
			_tmp28_ = gee_list_get (_tmp26_, _tmp27_);
#line 1874 "/home/jens/Source/shotwell/src/Commands.vala"
			t = (Tag*) _tmp28_;
#line 1875 "/home/jens/Source/shotwell/src/Commands.vala"
			_tmp29_ = t;
#line 1875 "/home/jens/Source/shotwell/src/Commands.vala"
			_tmp30_ = tag_get_path (_tmp29_);
#line 1875 "/home/jens/Source/shotwell/src/Commands.vala"
			_tmp31_ = _tmp30_;
#line 1875 "/home/jens/Source/shotwell/src/Commands.vala"
			_tmp32_ = unwind_target;
#line 1875 "/home/jens/Source/shotwell/src/Commands.vala"
			_tmp33_ = string_replace (_tmp31_, _tmp32_, "");
#line 1875 "/home/jens/Source/shotwell/src/Commands.vala"
			_tmp34_ = _tmp33_;
#line 1875 "/home/jens/Source/shotwell/src/Commands.vala"
			_g_free0 (_tmp31_);
#line 1875 "/home/jens/Source/shotwell/src/Commands.vala"
			child_subpath = _tmp34_;
#line 1876 "/home/jens/Source/shotwell/src/Commands.vala"
			_tmp35_ = child_subpath;
#line 1876 "/home/jens/Source/shotwell/src/Commands.vala"
			_tmp36_ = g_str_has_prefix (_tmp35_, TAG_PATH_SEPARATOR_STRING);
#line 1876 "/home/jens/Source/shotwell/src/Commands.vala"
			if (_tmp36_) {
#line 16272 "Commands.c"
				const gchar* _tmp37_;
				gchar* _tmp38_;
#line 1877 "/home/jens/Source/shotwell/src/Commands.vala"
				_tmp37_ = child_subpath;
#line 1877 "/home/jens/Source/shotwell/src/Commands.vala"
				_tmp38_ = string_substring (_tmp37_, (glong) 1, (glong) -1);
#line 1877 "/home/jens/Source/shotwell/src/Commands.vala"
				_g_free0 (child_subpath);
#line 1877 "/home/jens/Source/shotwell/src/Commands.vala"
				child_subpath = _tmp38_;
#line 16283 "Commands.c"
			}
#line 1879 "/home/jens/Source/shotwell/src/Commands.vala"
			_tmp39_ = self->priv->existing_dest_child_structure;
#line 1879 "/home/jens/Source/shotwell/src/Commands.vala"
			_tmp40_ = child_subpath;
#line 1879 "/home/jens/Source/shotwell/src/Commands.vala"
			_tmp41_ = gee_map_has_key (_tmp39_, _tmp40_);
#line 1879 "/home/jens/Source/shotwell/src/Commands.vala"
			if (!_tmp41_) {
#line 16293 "Commands.c"
				TagSourceCollection* _tmp42_;
				TagSourceCollection* _tmp43_;
				Tag* _tmp44_;
				Marker* _tmp45_;
				Marker* _tmp46_;
#line 1880 "/home/jens/Source/shotwell/src/Commands.vala"
				_tmp42_ = tag_global;
#line 1880 "/home/jens/Source/shotwell/src/Commands.vala"
				_tmp43_ = tag_global;
#line 1880 "/home/jens/Source/shotwell/src/Commands.vala"
				_tmp44_ = t;
#line 1880 "/home/jens/Source/shotwell/src/Commands.vala"
				_tmp45_ = data_collection_mark (G_TYPE_CHECK_INSTANCE_CAST (_tmp43_, TYPE_DATA_COLLECTION, DataCollection), G_TYPE_CHECK_INSTANCE_CAST (_tmp44_, TYPE_DATA_OBJECT, DataObject));
#line 1880 "/home/jens/Source/shotwell/src/Commands.vala"
				_tmp46_ = _tmp45_;
#line 1880 "/home/jens/Source/shotwell/src/Commands.vala"
				source_collection_destroy_marked (G_TYPE_CHECK_INSTANCE_CAST (_tmp42_, TYPE_SOURCE_COLLECTION, SourceCollection), _tmp46_, TRUE, NULL, NULL, NULL);
#line 1880 "/home/jens/Source/shotwell/src/Commands.vala"
				_g_object_unref0 (_tmp46_);
#line 16313 "Commands.c"
			} else {
				GeeSet* starting_sources = NULL;
				GeeHashSet* _tmp47_;
				GeeSet* _tmp48_;
				Tag* _tmp49_;
				GeeCollection* _tmp50_;
				GeeCollection* _tmp51_;
#line 1882 "/home/jens/Source/shotwell/src/Commands.vala"
				_tmp47_ = gee_hash_set_new (TYPE_MEDIA_SOURCE, (GBoxedCopyFunc) g_object_ref, (GDestroyNotify) g_object_unref, NULL, NULL, NULL, NULL, NULL, NULL);
#line 1882 "/home/jens/Source/shotwell/src/Commands.vala"
				starting_sources = G_TYPE_CHECK_INSTANCE_CAST (_tmp47_, GEE_TYPE_SET, GeeSet);
#line 1883 "/home/jens/Source/shotwell/src/Commands.vala"
				_tmp48_ = starting_sources;
#line 1883 "/home/jens/Source/shotwell/src/Commands.vala"
				_tmp49_ = t;
#line 1883 "/home/jens/Source/shotwell/src/Commands.vala"
				_tmp50_ = tag_get_sources (_tmp49_);
#line 1883 "/home/jens/Source/shotwell/src/Commands.vala"
				_tmp51_ = _tmp50_;
#line 1883 "/home/jens/Source/shotwell/src/Commands.vala"
				gee_collection_add_all (G_TYPE_CHECK_INSTANCE_CAST (_tmp48_, GEE_TYPE_COLLECTION, GeeCollection), _tmp51_);
#line 1883 "/home/jens/Source/shotwell/src/Commands.vala"
				_g_object_unref0 (_tmp51_);
#line 16337 "Commands.c"
				{
					GeeIterator* _source_it = NULL;
					GeeSet* _tmp52_;
					GeeIterator* _tmp53_;
#line 1884 "/home/jens/Source/shotwell/src/Commands.vala"
					_tmp52_ = starting_sources;
#line 1884 "/home/jens/Source/shotwell/src/Commands.vala"
					_tmp53_ = gee_iterable_iterator (G_TYPE_CHECK_INSTANCE_CAST (_tmp52_, GEE_TYPE_ITERABLE, GeeIterable));
#line 1884 "/home/jens/Source/shotwell/src/Commands.vala"
					_source_it = _tmp53_;
#line 1884 "/home/jens/Source/shotwell/src/Commands.vala"
					while (TRUE) {
#line 16350 "Commands.c"
						GeeIterator* _tmp54_;
						gboolean _tmp55_;
						MediaSource* source = NULL;
						GeeIterator* _tmp56_;
						gpointer _tmp57_;
						GeeMap* _tmp58_;
						const gchar* _tmp59_;
						gpointer _tmp60_;
						GeeSet* _tmp61_;
						MediaSource* _tmp62_;
						gboolean _tmp63_;
						gboolean _tmp64_;
#line 1884 "/home/jens/Source/shotwell/src/Commands.vala"
						_tmp54_ = _source_it;
#line 1884 "/home/jens/Source/shotwell/src/Commands.vala"
						_tmp55_ = gee_iterator_next (_tmp54_);
#line 1884 "/home/jens/Source/shotwell/src/Commands.vala"
						if (!_tmp55_) {
#line 1884 "/home/jens/Source/shotwell/src/Commands.vala"
							break;
#line 16371 "Commands.c"
						}
#line 1884 "/home/jens/Source/shotwell/src/Commands.vala"
						_tmp56_ = _source_it;
#line 1884 "/home/jens/Source/shotwell/src/Commands.vala"
						_tmp57_ = gee_iterator_get (_tmp56_);
#line 1884 "/home/jens/Source/shotwell/src/Commands.vala"
						source = (MediaSource*) _tmp57_;
#line 1885 "/home/jens/Source/shotwell/src/Commands.vala"
						_tmp58_ = self->priv->existing_dest_child_structure;
#line 1885 "/home/jens/Source/shotwell/src/Commands.vala"
						_tmp59_ = child_subpath;
#line 1885 "/home/jens/Source/shotwell/src/Commands.vala"
						_tmp60_ = gee_map_get (_tmp58_, _tmp59_);
#line 1885 "/home/jens/Source/shotwell/src/Commands.vala"
						_tmp61_ = (GeeSet*) _tmp60_;
#line 1885 "/home/jens/Source/shotwell/src/Commands.vala"
						_tmp62_ = source;
#line 1885 "/home/jens/Source/shotwell/src/Commands.vala"
						_tmp63_ = gee_collection_contains (G_TYPE_CHECK_INSTANCE_CAST (_tmp61_, GEE_TYPE_COLLECTION, GeeCollection), _tmp62_);
#line 1885 "/home/jens/Source/shotwell/src/Commands.vala"
						_tmp64_ = !_tmp63_;
#line 1885 "/home/jens/Source/shotwell/src/Commands.vala"
						_g_object_unref0 (_tmp61_);
#line 1885 "/home/jens/Source/shotwell/src/Commands.vala"
						if (_tmp64_) {
#line 16397 "Commands.c"
							Tag* _tmp65_;
							MediaSource* _tmp66_;
							GeeList* _tmp67_;
							GeeList* _tmp68_;
#line 1886 "/home/jens/Source/shotwell/src/Commands.vala"
							_tmp65_ = t;
#line 1886 "/home/jens/Source/shotwell/src/Commands.vala"
							_tmp66_ = source;
#line 1886 "/home/jens/Source/shotwell/src/Commands.vala"
							_tmp67_ = tag_detach (_tmp65_, _tmp66_);
#line 1886 "/home/jens/Source/shotwell/src/Commands.vala"
							_tmp68_ = _tmp67_;
#line 1886 "/home/jens/Source/shotwell/src/Commands.vala"
							_g_object_unref0 (_tmp68_);
#line 16412 "Commands.c"
						}
#line 1884 "/home/jens/Source/shotwell/src/Commands.vala"
						_g_object_unref0 (source);
#line 16416 "Commands.c"
					}
#line 1884 "/home/jens/Source/shotwell/src/Commands.vala"
					_g_object_unref0 (_source_it);
#line 16420 "Commands.c"
				}
#line 1879 "/home/jens/Source/shotwell/src/Commands.vala"
				_g_object_unref0 (starting_sources);
#line 16424 "Commands.c"
			}
#line 1874 "/home/jens/Source/shotwell/src/Commands.vala"
			_g_free0 (child_subpath);
#line 1874 "/home/jens/Source/shotwell/src/Commands.vala"
			_g_object_unref0 (t);
#line 16430 "Commands.c"
		}
#line 1874 "/home/jens/Source/shotwell/src/Commands.vala"
		_g_object_unref0 (_t_list);
#line 16434 "Commands.c"
	}
	{
		gint i = 0;
#line 1890 "/home/jens/Source/shotwell/src/Commands.vala"
		i = 0;
#line 16440 "Commands.c"
		{
			gboolean _tmp69_ = FALSE;
#line 1890 "/home/jens/Source/shotwell/src/Commands.vala"
			_tmp69_ = TRUE;
#line 1890 "/home/jens/Source/shotwell/src/Commands.vala"
			while (TRUE) {
#line 16447 "Commands.c"
				gint _tmp71_;
				GeeList* _tmp72_;
				gint _tmp73_;
				gint _tmp74_;
				GeeList* _tmp75_;
				gint _tmp76_;
				gpointer _tmp77_;
				SourceProxy* _tmp78_;
				DataSource* _tmp79_;
				DataSource* _tmp80_;
#line 1890 "/home/jens/Source/shotwell/src/Commands.vala"
				if (!_tmp69_) {
#line 16460 "Commands.c"
					gint _tmp70_;
#line 1890 "/home/jens/Source/shotwell/src/Commands.vala"
					_tmp70_ = i;
#line 1890 "/home/jens/Source/shotwell/src/Commands.vala"
					i = _tmp70_ + 1;
#line 16466 "Commands.c"
				}
#line 1890 "/home/jens/Source/shotwell/src/Commands.vala"
				_tmp69_ = FALSE;
#line 1890 "/home/jens/Source/shotwell/src/Commands.vala"
				_tmp71_ = i;
#line 1890 "/home/jens/Source/shotwell/src/Commands.vala"
				_tmp72_ = self->priv->src_before_state;
#line 1890 "/home/jens/Source/shotwell/src/Commands.vala"
				_tmp73_ = gee_collection_get_size (G_TYPE_CHECK_INSTANCE_CAST (_tmp72_, GEE_TYPE_COLLECTION, GeeCollection));
#line 1890 "/home/jens/Source/shotwell/src/Commands.vala"
				_tmp74_ = _tmp73_;
#line 1890 "/home/jens/Source/shotwell/src/Commands.vala"
				if (!(_tmp71_ < _tmp74_)) {
#line 1890 "/home/jens/Source/shotwell/src/Commands.vala"
					break;
#line 16482 "Commands.c"
				}
#line 1891 "/home/jens/Source/shotwell/src/Commands.vala"
				_tmp75_ = self->priv->src_before_state;
#line 1891 "/home/jens/Source/shotwell/src/Commands.vala"
				_tmp76_ = i;
#line 1891 "/home/jens/Source/shotwell/src/Commands.vala"
				_tmp77_ = gee_list_get (_tmp75_, _tmp76_);
#line 1891 "/home/jens/Source/shotwell/src/Commands.vala"
				_tmp78_ = (SourceProxy*) _tmp77_;
#line 1891 "/home/jens/Source/shotwell/src/Commands.vala"
				_tmp79_ = source_proxy_get_source (_tmp78_);
#line 1891 "/home/jens/Source/shotwell/src/Commands.vala"
				_tmp80_ = _tmp79_;
#line 1891 "/home/jens/Source/shotwell/src/Commands.vala"
				_g_object_unref0 (_tmp80_);
#line 1891 "/home/jens/Source/shotwell/src/Commands.vala"
				_source_proxy_unref0 (_tmp78_);
#line 16500 "Commands.c"
			}
		}
	}
	{
		gint i = 0;
#line 1893 "/home/jens/Source/shotwell/src/Commands.vala"
		i = 0;
#line 16508 "Commands.c"
		{
			gboolean _tmp81_ = FALSE;
#line 1893 "/home/jens/Source/shotwell/src/Commands.vala"
			_tmp81_ = TRUE;
#line 1893 "/home/jens/Source/shotwell/src/Commands.vala"
			while (TRUE) {
#line 16515 "Commands.c"
				gint _tmp83_;
				GeeList* _tmp84_;
				gint _tmp85_;
				gint _tmp86_;
				GeeList* _tmp87_;
				gint _tmp88_;
				gpointer _tmp89_;
				SourceProxy* _tmp90_;
				DataSource* _tmp91_;
				DataSource* _tmp92_;
#line 1893 "/home/jens/Source/shotwell/src/Commands.vala"
				if (!_tmp81_) {
#line 16528 "Commands.c"
					gint _tmp82_;
#line 1893 "/home/jens/Source/shotwell/src/Commands.vala"
					_tmp82_ = i;
#line 1893 "/home/jens/Source/shotwell/src/Commands.vala"
					i = _tmp82_ + 1;
#line 16534 "Commands.c"
				}
#line 1893 "/home/jens/Source/shotwell/src/Commands.vala"
				_tmp81_ = FALSE;
#line 1893 "/home/jens/Source/shotwell/src/Commands.vala"
				_tmp83_ = i;
#line 1893 "/home/jens/Source/shotwell/src/Commands.vala"
				_tmp84_ = self->priv->dest_before_state;
#line 1893 "/home/jens/Source/shotwell/src/Commands.vala"
				_tmp85_ = gee_collection_get_size (G_TYPE_CHECK_INSTANCE_CAST (_tmp84_, GEE_TYPE_COLLECTION, GeeCollection));
#line 1893 "/home/jens/Source/shotwell/src/Commands.vala"
				_tmp86_ = _tmp85_;
#line 1893 "/home/jens/Source/shotwell/src/Commands.vala"
				if (!(_tmp83_ < _tmp86_)) {
#line 1893 "/home/jens/Source/shotwell/src/Commands.vala"
					break;
#line 16550 "Commands.c"
				}
#line 1894 "/home/jens/Source/shotwell/src/Commands.vala"
				_tmp87_ = self->priv->dest_before_state;
#line 1894 "/home/jens/Source/shotwell/src/Commands.vala"
				_tmp88_ = i;
#line 1894 "/home/jens/Source/shotwell/src/Commands.vala"
				_tmp89_ = gee_list_get (_tmp87_, _tmp88_);
#line 1894 "/home/jens/Source/shotwell/src/Commands.vala"
				_tmp90_ = (SourceProxy*) _tmp89_;
#line 1894 "/home/jens/Source/shotwell/src/Commands.vala"
				_tmp91_ = source_proxy_get_source (_tmp90_);
#line 1894 "/home/jens/Source/shotwell/src/Commands.vala"
				_tmp92_ = _tmp91_;
#line 1894 "/home/jens/Source/shotwell/src/Commands.vala"
				_g_object_unref0 (_tmp92_);
#line 1894 "/home/jens/Source/shotwell/src/Commands.vala"
				_source_proxy_unref0 (_tmp90_);
#line 16568 "Commands.c"
			}
		}
	}
#line 1896 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp93_ = self->priv->to_path_parent_path;
#line 1896 "/home/jens/Source/shotwell/src/Commands.vala"
	if (_tmp93_ != NULL) {
#line 16576 "Commands.c"
		gchar* new_path = NULL;
		const gchar* _tmp94_;
		gchar* _tmp95_;
		const gchar* _tmp96_ = NULL;
		const gchar* _tmp97_;
		gchar* path = NULL;
		gchar* _tmp100_;
		TagSourceCollection* _tmp101_;
		const gchar* _tmp102_;
		gboolean _tmp103_;
		Tag* t = NULL;
		const gchar* _tmp104_;
		Tag* _tmp105_;
		GeeList* kids = NULL;
		Tag* _tmp106_;
		GeeList* _tmp107_;
		const gchar* _tmp125_;
		GeeMap* _tmp126_;
#line 1897 "/home/jens/Source/shotwell/src/Commands.vala"
		_tmp94_ = self->priv->to_path_parent_path;
#line 1897 "/home/jens/Source/shotwell/src/Commands.vala"
		_tmp95_ = hierarchical_tag_utilities_get_root_path_form (_tmp94_);
#line 1897 "/home/jens/Source/shotwell/src/Commands.vala"
		new_path = _tmp95_;
#line 1898 "/home/jens/Source/shotwell/src/Commands.vala"
		_tmp97_ = new_path;
#line 1898 "/home/jens/Source/shotwell/src/Commands.vala"
		if (_tmp97_ != NULL) {
#line 16605 "Commands.c"
			const gchar* _tmp98_;
#line 1898 "/home/jens/Source/shotwell/src/Commands.vala"
			_tmp98_ = new_path;
#line 1898 "/home/jens/Source/shotwell/src/Commands.vala"
			_tmp96_ = _tmp98_;
#line 16611 "Commands.c"
		} else {
			const gchar* _tmp99_;
#line 1898 "/home/jens/Source/shotwell/src/Commands.vala"
			_tmp99_ = self->priv->to_path_parent_path;
#line 1898 "/home/jens/Source/shotwell/src/Commands.vala"
			_tmp96_ = _tmp99_;
#line 16618 "Commands.c"
		}
#line 1898 "/home/jens/Source/shotwell/src/Commands.vala"
		_tmp100_ = g_strdup (_tmp96_);
#line 1898 "/home/jens/Source/shotwell/src/Commands.vala"
		path = _tmp100_;
#line 1900 "/home/jens/Source/shotwell/src/Commands.vala"
		_tmp101_ = tag_global;
#line 1900 "/home/jens/Source/shotwell/src/Commands.vala"
		_tmp102_ = path;
#line 1900 "/home/jens/Source/shotwell/src/Commands.vala"
		_tmp103_ = tag_source_collection_exists (_tmp101_, _tmp102_, FALSE);
#line 1900 "/home/jens/Source/shotwell/src/Commands.vala"
		_vala_assert (_tmp103_, "Tag.global.exists(path)");
#line 1902 "/home/jens/Source/shotwell/src/Commands.vala"
		_tmp104_ = path;
#line 1902 "/home/jens/Source/shotwell/src/Commands.vala"
		_tmp105_ = tag_for_path (_tmp104_);
#line 1902 "/home/jens/Source/shotwell/src/Commands.vala"
		t = _tmp105_;
#line 1904 "/home/jens/Source/shotwell/src/Commands.vala"
		_tmp106_ = t;
#line 1904 "/home/jens/Source/shotwell/src/Commands.vala"
		_tmp107_ = tag_get_hierarchical_children (_tmp106_);
#line 1904 "/home/jens/Source/shotwell/src/Commands.vala"
		kids = _tmp107_;
#line 16644 "Commands.c"
		{
			GeeList* _kidtag_list = NULL;
			GeeList* _tmp108_;
			GeeList* _tmp109_;
			gint _kidtag_size = 0;
			GeeList* _tmp110_;
			gint _tmp111_;
			gint _tmp112_;
			gint _kidtag_index = 0;
#line 1905 "/home/jens/Source/shotwell/src/Commands.vala"
			_tmp108_ = kids;
#line 1905 "/home/jens/Source/shotwell/src/Commands.vala"
			_tmp109_ = _g_object_ref0 (_tmp108_);
#line 1905 "/home/jens/Source/shotwell/src/Commands.vala"
			_kidtag_list = _tmp109_;
#line 1905 "/home/jens/Source/shotwell/src/Commands.vala"
			_tmp110_ = _kidtag_list;
#line 1905 "/home/jens/Source/shotwell/src/Commands.vala"
			_tmp111_ = gee_collection_get_size (G_TYPE_CHECK_INSTANCE_CAST (_tmp110_, GEE_TYPE_COLLECTION, GeeCollection));
#line 1905 "/home/jens/Source/shotwell/src/Commands.vala"
			_tmp112_ = _tmp111_;
#line 1905 "/home/jens/Source/shotwell/src/Commands.vala"
			_kidtag_size = _tmp112_;
#line 1905 "/home/jens/Source/shotwell/src/Commands.vala"
			_kidtag_index = -1;
#line 1905 "/home/jens/Source/shotwell/src/Commands.vala"
			while (TRUE) {
#line 16672 "Commands.c"
				gint _tmp113_;
				gint _tmp114_;
				gint _tmp115_;
				Tag* kidtag = NULL;
				GeeList* _tmp116_;
				gint _tmp117_;
				gpointer _tmp118_;
				Tag* _tmp119_;
				Tag* _tmp120_;
				GeeCollection* _tmp121_;
				GeeCollection* _tmp122_;
				GeeMultiMap* _tmp123_;
				GeeMultiMap* _tmp124_;
#line 1905 "/home/jens/Source/shotwell/src/Commands.vala"
				_tmp113_ = _kidtag_index;
#line 1905 "/home/jens/Source/shotwell/src/Commands.vala"
				_kidtag_index = _tmp113_ + 1;
#line 1905 "/home/jens/Source/shotwell/src/Commands.vala"
				_tmp114_ = _kidtag_index;
#line 1905 "/home/jens/Source/shotwell/src/Commands.vala"
				_tmp115_ = _kidtag_size;
#line 1905 "/home/jens/Source/shotwell/src/Commands.vala"
				if (!(_tmp114_ < _tmp115_)) {
#line 1905 "/home/jens/Source/shotwell/src/Commands.vala"
					break;
#line 16698 "Commands.c"
				}
#line 1905 "/home/jens/Source/shotwell/src/Commands.vala"
				_tmp116_ = _kidtag_list;
#line 1905 "/home/jens/Source/shotwell/src/Commands.vala"
				_tmp117_ = _kidtag_index;
#line 1905 "/home/jens/Source/shotwell/src/Commands.vala"
				_tmp118_ = gee_list_get (_tmp116_, _tmp117_);
#line 1905 "/home/jens/Source/shotwell/src/Commands.vala"
				kidtag = (Tag*) _tmp118_;
#line 1906 "/home/jens/Source/shotwell/src/Commands.vala"
				_tmp119_ = kidtag;
#line 1906 "/home/jens/Source/shotwell/src/Commands.vala"
				_tmp120_ = kidtag;
#line 1906 "/home/jens/Source/shotwell/src/Commands.vala"
				_tmp121_ = tag_get_sources (_tmp120_);
#line 1906 "/home/jens/Source/shotwell/src/Commands.vala"
				_tmp122_ = _tmp121_;
#line 1906 "/home/jens/Source/shotwell/src/Commands.vala"
				_tmp123_ = tag_detach_many (_tmp119_, _tmp122_);
#line 1906 "/home/jens/Source/shotwell/src/Commands.vala"
				_tmp124_ = _tmp123_;
#line 1906 "/home/jens/Source/shotwell/src/Commands.vala"
				_g_object_unref0 (_tmp124_);
#line 1906 "/home/jens/Source/shotwell/src/Commands.vala"
				_g_object_unref0 (_tmp122_);
#line 1905 "/home/jens/Source/shotwell/src/Commands.vala"
				_g_object_unref0 (kidtag);
#line 16726 "Commands.c"
			}
#line 1905 "/home/jens/Source/shotwell/src/Commands.vala"
			_g_object_unref0 (_kidtag_list);
#line 16730 "Commands.c"
		}
#line 1908 "/home/jens/Source/shotwell/src/Commands.vala"
		_tmp125_ = path;
#line 1908 "/home/jens/Source/shotwell/src/Commands.vala"
		_tmp126_ = self->priv->existing_dest_child_structure;
#line 1908 "/home/jens/Source/shotwell/src/Commands.vala"
		reparent_tag_command_restore_child_attachments_at (self, _tmp125_, _tmp126_);
#line 1896 "/home/jens/Source/shotwell/src/Commands.vala"
		_g_object_unref0 (kids);
#line 1896 "/home/jens/Source/shotwell/src/Commands.vala"
		_g_object_unref0 (t);
#line 1896 "/home/jens/Source/shotwell/src/Commands.vala"
		_g_free0 (path);
#line 1896 "/home/jens/Source/shotwell/src/Commands.vala"
		_g_free0 (new_path);
#line 16746 "Commands.c"
	} else {
		GeeSet* _tmp127_;
		const gchar* _tmp128_;
		Tag* _tmp129_;
		Tag* _tmp130_;
		const gchar* _tmp131_;
		Tag* _tmp132_;
		Tag* _tmp133_;
		GeeCollection* _tmp134_;
		GeeCollection* _tmp135_;
		GeeMultiMap* _tmp136_;
		GeeMultiMap* _tmp137_;
		const gchar* _tmp138_;
		Tag* _tmp139_;
		Tag* _tmp140_;
		GeeSet* _tmp141_;
		GeeList* kids = NULL;
		const gchar* _tmp142_;
		Tag* _tmp143_;
		Tag* _tmp144_;
		GeeList* _tmp145_;
		GeeList* _tmp146_;
		const gchar* _tmp164_;
		GeeMap* _tmp165_;
#line 1910 "/home/jens/Source/shotwell/src/Commands.vala"
		_tmp127_ = self->priv->existing_dest_membership;
#line 1910 "/home/jens/Source/shotwell/src/Commands.vala"
		_vala_assert (_tmp127_ != NULL, "existing_dest_membership != null");
#line 1911 "/home/jens/Source/shotwell/src/Commands.vala"
		_tmp128_ = self->priv->to_path;
#line 1911 "/home/jens/Source/shotwell/src/Commands.vala"
		_tmp129_ = tag_for_path (_tmp128_);
#line 1911 "/home/jens/Source/shotwell/src/Commands.vala"
		_tmp130_ = _tmp129_;
#line 1911 "/home/jens/Source/shotwell/src/Commands.vala"
		_tmp131_ = self->priv->to_path;
#line 1911 "/home/jens/Source/shotwell/src/Commands.vala"
		_tmp132_ = tag_for_path (_tmp131_);
#line 1911 "/home/jens/Source/shotwell/src/Commands.vala"
		_tmp133_ = _tmp132_;
#line 1911 "/home/jens/Source/shotwell/src/Commands.vala"
		_tmp134_ = tag_get_sources (_tmp133_);
#line 1911 "/home/jens/Source/shotwell/src/Commands.vala"
		_tmp135_ = _tmp134_;
#line 1911 "/home/jens/Source/shotwell/src/Commands.vala"
		_tmp136_ = tag_detach_many (_tmp130_, _tmp135_);
#line 1911 "/home/jens/Source/shotwell/src/Commands.vala"
		_tmp137_ = _tmp136_;
#line 1911 "/home/jens/Source/shotwell/src/Commands.vala"
		_g_object_unref0 (_tmp137_);
#line 1911 "/home/jens/Source/shotwell/src/Commands.vala"
		_g_object_unref0 (_tmp135_);
#line 1911 "/home/jens/Source/shotwell/src/Commands.vala"
		_g_object_unref0 (_tmp133_);
#line 1911 "/home/jens/Source/shotwell/src/Commands.vala"
		_g_object_unref0 (_tmp130_);
#line 1912 "/home/jens/Source/shotwell/src/Commands.vala"
		_tmp138_ = self->priv->to_path;
#line 1912 "/home/jens/Source/shotwell/src/Commands.vala"
		_tmp139_ = tag_for_path (_tmp138_);
#line 1912 "/home/jens/Source/shotwell/src/Commands.vala"
		_tmp140_ = _tmp139_;
#line 1912 "/home/jens/Source/shotwell/src/Commands.vala"
		_tmp141_ = self->priv->existing_dest_membership;
#line 1912 "/home/jens/Source/shotwell/src/Commands.vala"
		tag_attach_many (_tmp140_, G_TYPE_CHECK_INSTANCE_CAST (_tmp141_, GEE_TYPE_COLLECTION, GeeCollection));
#line 1912 "/home/jens/Source/shotwell/src/Commands.vala"
		_g_object_unref0 (_tmp140_);
#line 1914 "/home/jens/Source/shotwell/src/Commands.vala"
		_tmp142_ = self->priv->to_path;
#line 1914 "/home/jens/Source/shotwell/src/Commands.vala"
		_tmp143_ = tag_for_path (_tmp142_);
#line 1914 "/home/jens/Source/shotwell/src/Commands.vala"
		_tmp144_ = _tmp143_;
#line 1914 "/home/jens/Source/shotwell/src/Commands.vala"
		_tmp145_ = tag_get_hierarchical_children (_tmp144_);
#line 1914 "/home/jens/Source/shotwell/src/Commands.vala"
		_tmp146_ = _tmp145_;
#line 1914 "/home/jens/Source/shotwell/src/Commands.vala"
		_g_object_unref0 (_tmp144_);
#line 1914 "/home/jens/Source/shotwell/src/Commands.vala"
		kids = _tmp146_;
#line 16829 "Commands.c"
		{
			GeeList* _kidtag_list = NULL;
			GeeList* _tmp147_;
			GeeList* _tmp148_;
			gint _kidtag_size = 0;
			GeeList* _tmp149_;
			gint _tmp150_;
			gint _tmp151_;
			gint _kidtag_index = 0;
#line 1915 "/home/jens/Source/shotwell/src/Commands.vala"
			_tmp147_ = kids;
#line 1915 "/home/jens/Source/shotwell/src/Commands.vala"
			_tmp148_ = _g_object_ref0 (_tmp147_);
#line 1915 "/home/jens/Source/shotwell/src/Commands.vala"
			_kidtag_list = _tmp148_;
#line 1915 "/home/jens/Source/shotwell/src/Commands.vala"
			_tmp149_ = _kidtag_list;
#line 1915 "/home/jens/Source/shotwell/src/Commands.vala"
			_tmp150_ = gee_collection_get_size (G_TYPE_CHECK_INSTANCE_CAST (_tmp149_, GEE_TYPE_COLLECTION, GeeCollection));
#line 1915 "/home/jens/Source/shotwell/src/Commands.vala"
			_tmp151_ = _tmp150_;
#line 1915 "/home/jens/Source/shotwell/src/Commands.vala"
			_kidtag_size = _tmp151_;
#line 1915 "/home/jens/Source/shotwell/src/Commands.vala"
			_kidtag_index = -1;
#line 1915 "/home/jens/Source/shotwell/src/Commands.vala"
			while (TRUE) {
#line 16857 "Commands.c"
				gint _tmp152_;
				gint _tmp153_;
				gint _tmp154_;
				Tag* kidtag = NULL;
				GeeList* _tmp155_;
				gint _tmp156_;
				gpointer _tmp157_;
				Tag* _tmp158_;
				Tag* _tmp159_;
				GeeCollection* _tmp160_;
				GeeCollection* _tmp161_;
				GeeMultiMap* _tmp162_;
				GeeMultiMap* _tmp163_;
#line 1915 "/home/jens/Source/shotwell/src/Commands.vala"
				_tmp152_ = _kidtag_index;
#line 1915 "/home/jens/Source/shotwell/src/Commands.vala"
				_kidtag_index = _tmp152_ + 1;
#line 1915 "/home/jens/Source/shotwell/src/Commands.vala"
				_tmp153_ = _kidtag_index;
#line 1915 "/home/jens/Source/shotwell/src/Commands.vala"
				_tmp154_ = _kidtag_size;
#line 1915 "/home/jens/Source/shotwell/src/Commands.vala"
				if (!(_tmp153_ < _tmp154_)) {
#line 1915 "/home/jens/Source/shotwell/src/Commands.vala"
					break;
#line 16883 "Commands.c"
				}
#line 1915 "/home/jens/Source/shotwell/src/Commands.vala"
				_tmp155_ = _kidtag_list;
#line 1915 "/home/jens/Source/shotwell/src/Commands.vala"
				_tmp156_ = _kidtag_index;
#line 1915 "/home/jens/Source/shotwell/src/Commands.vala"
				_tmp157_ = gee_list_get (_tmp155_, _tmp156_);
#line 1915 "/home/jens/Source/shotwell/src/Commands.vala"
				kidtag = (Tag*) _tmp157_;
#line 1916 "/home/jens/Source/shotwell/src/Commands.vala"
				_tmp158_ = kidtag;
#line 1916 "/home/jens/Source/shotwell/src/Commands.vala"
				_tmp159_ = kidtag;
#line 1916 "/home/jens/Source/shotwell/src/Commands.vala"
				_tmp160_ = tag_get_sources (_tmp159_);
#line 1916 "/home/jens/Source/shotwell/src/Commands.vala"
				_tmp161_ = _tmp160_;
#line 1916 "/home/jens/Source/shotwell/src/Commands.vala"
				_tmp162_ = tag_detach_many (_tmp158_, _tmp161_);
#line 1916 "/home/jens/Source/shotwell/src/Commands.vala"
				_tmp163_ = _tmp162_;
#line 1916 "/home/jens/Source/shotwell/src/Commands.vala"
				_g_object_unref0 (_tmp163_);
#line 1916 "/home/jens/Source/shotwell/src/Commands.vala"
				_g_object_unref0 (_tmp161_);
#line 1915 "/home/jens/Source/shotwell/src/Commands.vala"
				_g_object_unref0 (kidtag);
#line 16911 "Commands.c"
			}
#line 1915 "/home/jens/Source/shotwell/src/Commands.vala"
			_g_object_unref0 (_kidtag_list);
#line 16915 "Commands.c"
		}
#line 1918 "/home/jens/Source/shotwell/src/Commands.vala"
		_tmp164_ = self->priv->to_path;
#line 1918 "/home/jens/Source/shotwell/src/Commands.vala"
		_tmp165_ = self->priv->existing_dest_child_structure;
#line 1918 "/home/jens/Source/shotwell/src/Commands.vala"
		reparent_tag_command_restore_child_attachments_at (self, _tmp164_, _tmp165_);
#line 1896 "/home/jens/Source/shotwell/src/Commands.vala"
		_g_object_unref0 (kids);
#line 16925 "Commands.c"
	}
#line 1863 "/home/jens/Source/shotwell/src/Commands.vala"
	_g_free0 (unwind_target);
#line 16929 "Commands.c"
}


static void reparent_tag_command_save_after_state (ReparentTagCommand* self) {
	GeeList* _tmp0_;
	GeeArrayList* _tmp1_;
	TagSourceCollection* _tmp2_;
	const gchar* _tmp3_;
	gboolean _tmp4_;
	Tag* to_tag = NULL;
	const gchar* _tmp5_;
	Tag* _tmp6_;
	GeeList* _tmp7_;
	Tag* _tmp8_;
	SourceProxy* _tmp9_;
	SourceProxy* _tmp10_;
	GeeList* to_children = NULL;
	Tag* _tmp11_;
	GeeList* _tmp12_;
#line 1922 "/home/jens/Source/shotwell/src/Commands.vala"
	g_return_if_fail (IS_REPARENT_TAG_COMMAND (self));
#line 1923 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp0_ = self->priv->after_state;
#line 1923 "/home/jens/Source/shotwell/src/Commands.vala"
	_vala_assert (_tmp0_ == NULL, "after_state == null");
#line 1925 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp1_ = gee_array_list_new (TYPE_SOURCE_PROXY, (GBoxedCopyFunc) source_proxy_ref, (GDestroyNotify) source_proxy_unref, NULL, NULL, NULL);
#line 1925 "/home/jens/Source/shotwell/src/Commands.vala"
	_g_object_unref0 (self->priv->after_state);
#line 1925 "/home/jens/Source/shotwell/src/Commands.vala"
	self->priv->after_state = G_TYPE_CHECK_INSTANCE_CAST (_tmp1_, GEE_TYPE_LIST, GeeList);
#line 1928 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp2_ = tag_global;
#line 1928 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp3_ = self->priv->to_path;
#line 1928 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp4_ = tag_source_collection_exists (_tmp2_, _tmp3_, FALSE);
#line 1928 "/home/jens/Source/shotwell/src/Commands.vala"
	_vala_assert (_tmp4_, "Tag.global.exists(to_path)");
#line 1929 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp5_ = self->priv->to_path;
#line 1929 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp6_ = tag_for_path (_tmp5_);
#line 1929 "/home/jens/Source/shotwell/src/Commands.vala"
	to_tag = _tmp6_;
#line 1930 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp7_ = self->priv->after_state;
#line 1930 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp8_ = to_tag;
#line 1930 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp9_ = proxyable_get_proxy (G_TYPE_CHECK_INSTANCE_CAST (_tmp8_, TYPE_PROXYABLE, Proxyable));
#line 1930 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp10_ = _tmp9_;
#line 1930 "/home/jens/Source/shotwell/src/Commands.vala"
	gee_collection_add (G_TYPE_CHECK_INSTANCE_CAST (_tmp7_, GEE_TYPE_COLLECTION, GeeCollection), _tmp10_);
#line 1930 "/home/jens/Source/shotwell/src/Commands.vala"
	_source_proxy_unref0 (_tmp10_);
#line 1933 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp11_ = to_tag;
#line 1933 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp12_ = tag_get_hierarchical_children (_tmp11_);
#line 1933 "/home/jens/Source/shotwell/src/Commands.vala"
	to_children = _tmp12_;
#line 16993 "Commands.c"
	{
		gint i = 0;
		GeeList* _tmp13_;
		gint _tmp14_;
		gint _tmp15_;
#line 1934 "/home/jens/Source/shotwell/src/Commands.vala"
		_tmp13_ = to_children;
#line 1934 "/home/jens/Source/shotwell/src/Commands.vala"
		_tmp14_ = gee_collection_get_size (G_TYPE_CHECK_INSTANCE_CAST (_tmp13_, GEE_TYPE_COLLECTION, GeeCollection));
#line 1934 "/home/jens/Source/shotwell/src/Commands.vala"
		_tmp15_ = _tmp14_;
#line 1934 "/home/jens/Source/shotwell/src/Commands.vala"
		i = _tmp15_ - 1;
#line 17007 "Commands.c"
		{
			gboolean _tmp16_ = FALSE;
#line 1934 "/home/jens/Source/shotwell/src/Commands.vala"
			_tmp16_ = TRUE;
#line 1934 "/home/jens/Source/shotwell/src/Commands.vala"
			while (TRUE) {
#line 17014 "Commands.c"
				gint _tmp18_;
				GeeList* _tmp19_;
				GeeList* _tmp20_;
				gint _tmp21_;
				gpointer _tmp22_;
				Tag* _tmp23_;
				SourceProxy* _tmp24_;
				SourceProxy* _tmp25_;
#line 1934 "/home/jens/Source/shotwell/src/Commands.vala"
				if (!_tmp16_) {
#line 17025 "Commands.c"
					gint _tmp17_;
#line 1934 "/home/jens/Source/shotwell/src/Commands.vala"
					_tmp17_ = i;
#line 1934 "/home/jens/Source/shotwell/src/Commands.vala"
					i = _tmp17_ - 1;
#line 17031 "Commands.c"
				}
#line 1934 "/home/jens/Source/shotwell/src/Commands.vala"
				_tmp16_ = FALSE;
#line 1934 "/home/jens/Source/shotwell/src/Commands.vala"
				_tmp18_ = i;
#line 1934 "/home/jens/Source/shotwell/src/Commands.vala"
				if (!(_tmp18_ >= 0)) {
#line 1934 "/home/jens/Source/shotwell/src/Commands.vala"
					break;
#line 17041 "Commands.c"
				}
#line 1935 "/home/jens/Source/shotwell/src/Commands.vala"
				_tmp19_ = self->priv->after_state;
#line 1935 "/home/jens/Source/shotwell/src/Commands.vala"
				_tmp20_ = to_children;
#line 1935 "/home/jens/Source/shotwell/src/Commands.vala"
				_tmp21_ = i;
#line 1935 "/home/jens/Source/shotwell/src/Commands.vala"
				_tmp22_ = gee_list_get (_tmp20_, _tmp21_);
#line 1935 "/home/jens/Source/shotwell/src/Commands.vala"
				_tmp23_ = (Tag*) _tmp22_;
#line 1935 "/home/jens/Source/shotwell/src/Commands.vala"
				_tmp24_ = proxyable_get_proxy (G_TYPE_CHECK_INSTANCE_CAST (_tmp23_, TYPE_PROXYABLE, Proxyable));
#line 1935 "/home/jens/Source/shotwell/src/Commands.vala"
				_tmp25_ = _tmp24_;
#line 1935 "/home/jens/Source/shotwell/src/Commands.vala"
				gee_collection_add (G_TYPE_CHECK_INSTANCE_CAST (_tmp19_, GEE_TYPE_COLLECTION, GeeCollection), _tmp25_);
#line 1935 "/home/jens/Source/shotwell/src/Commands.vala"
				_source_proxy_unref0 (_tmp25_);
#line 1935 "/home/jens/Source/shotwell/src/Commands.vala"
				_g_object_unref0 (_tmp23_);
#line 17063 "Commands.c"
			}
		}
	}
#line 1922 "/home/jens/Source/shotwell/src/Commands.vala"
	_g_object_unref0 (to_children);
#line 1922 "/home/jens/Source/shotwell/src/Commands.vala"
	_g_object_unref0 (to_tag);
#line 17071 "Commands.c"
}


static void reparent_tag_command_restore_after_state (ReparentTagCommand* self) {
	GeeList* _tmp0_;
#line 1938 "/home/jens/Source/shotwell/src/Commands.vala"
	g_return_if_fail (IS_REPARENT_TAG_COMMAND (self));
#line 1939 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp0_ = self->priv->after_state;
#line 1939 "/home/jens/Source/shotwell/src/Commands.vala"
	_vala_assert (_tmp0_ != NULL, "after_state != null");
#line 17083 "Commands.c"
	{
		gint i = 0;
#line 1941 "/home/jens/Source/shotwell/src/Commands.vala"
		i = 0;
#line 17088 "Commands.c"
		{
			gboolean _tmp1_ = FALSE;
#line 1941 "/home/jens/Source/shotwell/src/Commands.vala"
			_tmp1_ = TRUE;
#line 1941 "/home/jens/Source/shotwell/src/Commands.vala"
			while (TRUE) {
#line 17095 "Commands.c"
				gint _tmp3_;
				GeeList* _tmp4_;
				gint _tmp5_;
				gint _tmp6_;
				GeeList* _tmp7_;
				gint _tmp8_;
				gpointer _tmp9_;
				SourceProxy* _tmp10_;
				DataSource* _tmp11_;
				DataSource* _tmp12_;
#line 1941 "/home/jens/Source/shotwell/src/Commands.vala"
				if (!_tmp1_) {
#line 17108 "Commands.c"
					gint _tmp2_;
#line 1941 "/home/jens/Source/shotwell/src/Commands.vala"
					_tmp2_ = i;
#line 1941 "/home/jens/Source/shotwell/src/Commands.vala"
					i = _tmp2_ + 1;
#line 17114 "Commands.c"
				}
#line 1941 "/home/jens/Source/shotwell/src/Commands.vala"
				_tmp1_ = FALSE;
#line 1941 "/home/jens/Source/shotwell/src/Commands.vala"
				_tmp3_ = i;
#line 1941 "/home/jens/Source/shotwell/src/Commands.vala"
				_tmp4_ = self->priv->after_state;
#line 1941 "/home/jens/Source/shotwell/src/Commands.vala"
				_tmp5_ = gee_collection_get_size (G_TYPE_CHECK_INSTANCE_CAST (_tmp4_, GEE_TYPE_COLLECTION, GeeCollection));
#line 1941 "/home/jens/Source/shotwell/src/Commands.vala"
				_tmp6_ = _tmp5_;
#line 1941 "/home/jens/Source/shotwell/src/Commands.vala"
				if (!(_tmp3_ < _tmp6_)) {
#line 1941 "/home/jens/Source/shotwell/src/Commands.vala"
					break;
#line 17130 "Commands.c"
				}
#line 1942 "/home/jens/Source/shotwell/src/Commands.vala"
				_tmp7_ = self->priv->after_state;
#line 1942 "/home/jens/Source/shotwell/src/Commands.vala"
				_tmp8_ = i;
#line 1942 "/home/jens/Source/shotwell/src/Commands.vala"
				_tmp9_ = gee_list_get (_tmp7_, _tmp8_);
#line 1942 "/home/jens/Source/shotwell/src/Commands.vala"
				_tmp10_ = (SourceProxy*) _tmp9_;
#line 1942 "/home/jens/Source/shotwell/src/Commands.vala"
				_tmp11_ = source_proxy_get_source (_tmp10_);
#line 1942 "/home/jens/Source/shotwell/src/Commands.vala"
				_tmp12_ = _tmp11_;
#line 1942 "/home/jens/Source/shotwell/src/Commands.vala"
				_g_object_unref0 (_tmp12_);
#line 1942 "/home/jens/Source/shotwell/src/Commands.vala"
				_source_proxy_unref0 (_tmp10_);
#line 17148 "Commands.c"
			}
		}
	}
}


static void reparent_tag_command_prepare_parent (ReparentTagCommand* self, const gchar* path) {
	Tag* new_parent = NULL;
	const gchar* _tmp0_;
	gboolean _tmp1_;
	Tag* _tmp27_;
#line 1945 "/home/jens/Source/shotwell/src/Commands.vala"
	g_return_if_fail (IS_REPARENT_TAG_COMMAND (self));
#line 1945 "/home/jens/Source/shotwell/src/Commands.vala"
	g_return_if_fail (path != NULL);
#line 1947 "/home/jens/Source/shotwell/src/Commands.vala"
	new_parent = NULL;
#line 1948 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp0_ = path;
#line 1948 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp1_ = g_str_has_prefix (_tmp0_, TAG_PATH_SEPARATOR_STRING);
#line 1948 "/home/jens/Source/shotwell/src/Commands.vala"
	if (_tmp1_) {
#line 17172 "Commands.c"
		GeeList* parent_paths = NULL;
		const gchar* _tmp2_;
		GeeList* _tmp3_;
		GeeList* _tmp4_;
		gint _tmp5_;
		gint _tmp6_;
#line 1949 "/home/jens/Source/shotwell/src/Commands.vala"
		_tmp2_ = path;
#line 1949 "/home/jens/Source/shotwell/src/Commands.vala"
		_tmp3_ = hierarchical_tag_utilities_enumerate_parent_paths (_tmp2_);
#line 1949 "/home/jens/Source/shotwell/src/Commands.vala"
		parent_paths = _tmp3_;
#line 1950 "/home/jens/Source/shotwell/src/Commands.vala"
		_tmp4_ = parent_paths;
#line 1950 "/home/jens/Source/shotwell/src/Commands.vala"
		_tmp5_ = gee_collection_get_size (G_TYPE_CHECK_INSTANCE_CAST (_tmp4_, GEE_TYPE_COLLECTION, GeeCollection));
#line 1950 "/home/jens/Source/shotwell/src/Commands.vala"
		_tmp6_ = _tmp5_;
#line 1950 "/home/jens/Source/shotwell/src/Commands.vala"
		if (_tmp6_ > 0) {
#line 17193 "Commands.c"
			gchar* immediate_parent_path = NULL;
			GeeList* _tmp7_;
			GeeList* _tmp8_;
			gint _tmp9_;
			gint _tmp10_;
			gpointer _tmp11_;
			TagSourceCollection* _tmp12_;
			const gchar* _tmp13_;
			gboolean _tmp14_;
#line 1951 "/home/jens/Source/shotwell/src/Commands.vala"
			_tmp7_ = parent_paths;
#line 1951 "/home/jens/Source/shotwell/src/Commands.vala"
			_tmp8_ = parent_paths;
#line 1951 "/home/jens/Source/shotwell/src/Commands.vala"
			_tmp9_ = gee_collection_get_size (G_TYPE_CHECK_INSTANCE_CAST (_tmp8_, GEE_TYPE_COLLECTION, GeeCollection));
#line 1951 "/home/jens/Source/shotwell/src/Commands.vala"
			_tmp10_ = _tmp9_;
#line 1951 "/home/jens/Source/shotwell/src/Commands.vala"
			_tmp11_ = gee_list_get (_tmp7_, _tmp10_ - 1);
#line 1951 "/home/jens/Source/shotwell/src/Commands.vala"
			immediate_parent_path = (gchar*) _tmp11_;
#line 1952 "/home/jens/Source/shotwell/src/Commands.vala"
			_tmp12_ = tag_global;
#line 1952 "/home/jens/Source/shotwell/src/Commands.vala"
			_tmp13_ = immediate_parent_path;
#line 1952 "/home/jens/Source/shotwell/src/Commands.vala"
			_tmp14_ = tag_source_collection_exists (_tmp12_, _tmp13_, FALSE);
#line 1952 "/home/jens/Source/shotwell/src/Commands.vala"
			if (_tmp14_) {
#line 17223 "Commands.c"
				const gchar* _tmp15_;
				Tag* _tmp16_;
#line 1953 "/home/jens/Source/shotwell/src/Commands.vala"
				_tmp15_ = immediate_parent_path;
#line 1953 "/home/jens/Source/shotwell/src/Commands.vala"
				_tmp16_ = tag_for_path (_tmp15_);
#line 1953 "/home/jens/Source/shotwell/src/Commands.vala"
				_g_object_unref0 (new_parent);
#line 1953 "/home/jens/Source/shotwell/src/Commands.vala"
				new_parent = _tmp16_;
#line 17234 "Commands.c"
			} else {
				TagSourceCollection* _tmp17_;
				const gchar* _tmp18_;
				gchar* _tmp19_;
				gchar* _tmp20_;
				gboolean _tmp21_;
				gboolean _tmp22_;
#line 1954 "/home/jens/Source/shotwell/src/Commands.vala"
				_tmp17_ = tag_global;
#line 1954 "/home/jens/Source/shotwell/src/Commands.vala"
				_tmp18_ = immediate_parent_path;
#line 1954 "/home/jens/Source/shotwell/src/Commands.vala"
				_tmp19_ = string_substring (_tmp18_, (glong) 1, (glong) -1);
#line 1954 "/home/jens/Source/shotwell/src/Commands.vala"
				_tmp20_ = _tmp19_;
#line 1954 "/home/jens/Source/shotwell/src/Commands.vala"
				_tmp21_ = tag_source_collection_exists (_tmp17_, _tmp20_, FALSE);
#line 1954 "/home/jens/Source/shotwell/src/Commands.vala"
				_tmp22_ = _tmp21_;
#line 1954 "/home/jens/Source/shotwell/src/Commands.vala"
				_g_free0 (_tmp20_);
#line 1954 "/home/jens/Source/shotwell/src/Commands.vala"
				if (_tmp22_) {
#line 17258 "Commands.c"
					const gchar* _tmp23_;
					gchar* _tmp24_;
					gchar* _tmp25_;
					Tag* _tmp26_;
#line 1955 "/home/jens/Source/shotwell/src/Commands.vala"
					_tmp23_ = immediate_parent_path;
#line 1955 "/home/jens/Source/shotwell/src/Commands.vala"
					_tmp24_ = string_substring (_tmp23_, (glong) 1, (glong) -1);
#line 1955 "/home/jens/Source/shotwell/src/Commands.vala"
					_tmp25_ = _tmp24_;
#line 1955 "/home/jens/Source/shotwell/src/Commands.vala"
					_tmp26_ = tag_for_path (_tmp25_);
#line 1955 "/home/jens/Source/shotwell/src/Commands.vala"
					_g_object_unref0 (new_parent);
#line 1955 "/home/jens/Source/shotwell/src/Commands.vala"
					new_parent = _tmp26_;
#line 1955 "/home/jens/Source/shotwell/src/Commands.vala"
					_g_free0 (_tmp25_);
#line 17277 "Commands.c"
				} else {
#line 1957 "/home/jens/Source/shotwell/src/Commands.vala"
					g_assert_not_reached ();
#line 17281 "Commands.c"
				}
			}
#line 1950 "/home/jens/Source/shotwell/src/Commands.vala"
			_g_free0 (immediate_parent_path);
#line 17286 "Commands.c"
		}
#line 1948 "/home/jens/Source/shotwell/src/Commands.vala"
		_g_object_unref0 (parent_paths);
#line 17290 "Commands.c"
	}
#line 1960 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp27_ = new_parent;
#line 1960 "/home/jens/Source/shotwell/src/Commands.vala"
	if (_tmp27_ != NULL) {
#line 17296 "Commands.c"
		Tag* _tmp28_;
#line 1961 "/home/jens/Source/shotwell/src/Commands.vala"
		_tmp28_ = new_parent;
#line 1961 "/home/jens/Source/shotwell/src/Commands.vala"
		tag_promote (_tmp28_);
#line 17302 "Commands.c"
	}
#line 1945 "/home/jens/Source/shotwell/src/Commands.vala"
	_g_object_unref0 (new_parent);
#line 17306 "Commands.c"
}


static void reparent_tag_command_do_source_parent_detachments (ReparentTagCommand* self) {
	TagSourceCollection* _tmp0_;
	const gchar* _tmp1_;
	gboolean _tmp2_;
	Tag* from_tag = NULL;
	const gchar* _tmp3_;
	Tag* _tmp4_;
	GeeMap* _tmp5_;
#line 1964 "/home/jens/Source/shotwell/src/Commands.vala"
	g_return_if_fail (IS_REPARENT_TAG_COMMAND (self));
#line 1965 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp0_ = tag_global;
#line 1965 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp1_ = self->priv->from_path;
#line 1965 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp2_ = tag_source_collection_exists (_tmp0_, _tmp1_, FALSE);
#line 1965 "/home/jens/Source/shotwell/src/Commands.vala"
	_vala_assert (_tmp2_, "Tag.global.exists(from_path)");
#line 1966 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp3_ = self->priv->from_path;
#line 1966 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp4_ = tag_for_path (_tmp3_);
#line 1966 "/home/jens/Source/shotwell/src/Commands.vala"
	from_tag = _tmp4_;
#line 1969 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp5_ = self->priv->src_parent_detachments;
#line 1969 "/home/jens/Source/shotwell/src/Commands.vala"
	if (_tmp5_ == NULL) {
#line 17338 "Commands.c"
		GeeHashMap* _tmp6_;
#line 1970 "/home/jens/Source/shotwell/src/Commands.vala"
		_tmp6_ = gee_hash_map_new (G_TYPE_STRING, (GBoxedCopyFunc) g_strdup, (GDestroyNotify) g_free, GEE_TYPE_SET, (GBoxedCopyFunc) g_object_ref, (GDestroyNotify) g_object_unref, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
#line 1970 "/home/jens/Source/shotwell/src/Commands.vala"
		_g_object_unref0 (self->priv->src_parent_detachments);
#line 1970 "/home/jens/Source/shotwell/src/Commands.vala"
		self->priv->src_parent_detachments = G_TYPE_CHECK_INSTANCE_CAST (_tmp6_, GEE_TYPE_MAP, GeeMap);
#line 17346 "Commands.c"
		{
			GeeIterator* _source_it = NULL;
			Tag* _tmp7_;
			GeeCollection* _tmp8_;
			GeeCollection* _tmp9_;
			GeeIterator* _tmp10_;
			GeeIterator* _tmp11_;
#line 1971 "/home/jens/Source/shotwell/src/Commands.vala"
			_tmp7_ = from_tag;
#line 1971 "/home/jens/Source/shotwell/src/Commands.vala"
			_tmp8_ = tag_get_sources (_tmp7_);
#line 1971 "/home/jens/Source/shotwell/src/Commands.vala"
			_tmp9_ = _tmp8_;
#line 1971 "/home/jens/Source/shotwell/src/Commands.vala"
			_tmp10_ = gee_iterable_iterator (G_TYPE_CHECK_INSTANCE_CAST (_tmp9_, GEE_TYPE_ITERABLE, GeeIterable));
#line 1971 "/home/jens/Source/shotwell/src/Commands.vala"
			_tmp11_ = _tmp10_;
#line 1971 "/home/jens/Source/shotwell/src/Commands.vala"
			_g_object_unref0 (_tmp9_);
#line 1971 "/home/jens/Source/shotwell/src/Commands.vala"
			_source_it = _tmp11_;
#line 1971 "/home/jens/Source/shotwell/src/Commands.vala"
			while (TRUE) {
#line 17370 "Commands.c"
				GeeIterator* _tmp12_;
				gboolean _tmp13_;
				MediaSource* source = NULL;
				GeeIterator* _tmp14_;
				gpointer _tmp15_;
				Tag* current_parent = NULL;
				Tag* _tmp16_;
				Tag* _tmp17_;
				gint running_attach_count = 0;
				Tag* _tmp18_;
				MediaSource* _tmp19_;
				gint _tmp20_;
#line 1971 "/home/jens/Source/shotwell/src/Commands.vala"
				_tmp12_ = _source_it;
#line 1971 "/home/jens/Source/shotwell/src/Commands.vala"
				_tmp13_ = gee_iterator_next (_tmp12_);
#line 1971 "/home/jens/Source/shotwell/src/Commands.vala"
				if (!_tmp13_) {
#line 1971 "/home/jens/Source/shotwell/src/Commands.vala"
					break;
#line 17391 "Commands.c"
				}
#line 1971 "/home/jens/Source/shotwell/src/Commands.vala"
				_tmp14_ = _source_it;
#line 1971 "/home/jens/Source/shotwell/src/Commands.vala"
				_tmp15_ = gee_iterator_get (_tmp14_);
#line 1971 "/home/jens/Source/shotwell/src/Commands.vala"
				source = (MediaSource*) _tmp15_;
#line 1972 "/home/jens/Source/shotwell/src/Commands.vala"
				_tmp16_ = from_tag;
#line 1972 "/home/jens/Source/shotwell/src/Commands.vala"
				_tmp17_ = tag_get_hierarchical_parent (_tmp16_);
#line 1972 "/home/jens/Source/shotwell/src/Commands.vala"
				current_parent = _tmp17_;
#line 1973 "/home/jens/Source/shotwell/src/Commands.vala"
				_tmp18_ = from_tag;
#line 1973 "/home/jens/Source/shotwell/src/Commands.vala"
				_tmp19_ = source;
#line 1973 "/home/jens/Source/shotwell/src/Commands.vala"
				_tmp20_ = tag_get_attachment_count (_tmp18_, _tmp19_);
#line 1973 "/home/jens/Source/shotwell/src/Commands.vala"
				running_attach_count = _tmp20_ + 1;
#line 1974 "/home/jens/Source/shotwell/src/Commands.vala"
				while (TRUE) {
#line 17415 "Commands.c"
					Tag* _tmp21_;
					gchar* current_parent_path = NULL;
					Tag* _tmp22_;
					gchar* _tmp23_;
					GeeMap* _tmp24_;
					const gchar* _tmp25_;
					gboolean _tmp26_;
					gint curr_parent_attach_count = 0;
					Tag* _tmp31_;
					MediaSource* _tmp32_;
					gint _tmp33_;
					gint _tmp34_;
					gint _tmp35_;
					gint _tmp36_;
					gint _tmp37_;
					gint _tmp43_;
					Tag* _tmp44_;
					Tag* _tmp45_;
#line 1974 "/home/jens/Source/shotwell/src/Commands.vala"
					_tmp21_ = current_parent;
#line 1974 "/home/jens/Source/shotwell/src/Commands.vala"
					if (!(_tmp21_ != NULL)) {
#line 1974 "/home/jens/Source/shotwell/src/Commands.vala"
						break;
#line 17440 "Commands.c"
					}
#line 1975 "/home/jens/Source/shotwell/src/Commands.vala"
					_tmp22_ = current_parent;
#line 1975 "/home/jens/Source/shotwell/src/Commands.vala"
					_tmp23_ = tag_get_path (_tmp22_);
#line 1975 "/home/jens/Source/shotwell/src/Commands.vala"
					current_parent_path = _tmp23_;
#line 1976 "/home/jens/Source/shotwell/src/Commands.vala"
					_tmp24_ = self->priv->src_parent_detachments;
#line 1976 "/home/jens/Source/shotwell/src/Commands.vala"
					_tmp25_ = current_parent_path;
#line 1976 "/home/jens/Source/shotwell/src/Commands.vala"
					_tmp26_ = gee_map_has_key (_tmp24_, _tmp25_);
#line 1976 "/home/jens/Source/shotwell/src/Commands.vala"
					if (!_tmp26_) {
#line 17456 "Commands.c"
						GeeMap* _tmp27_;
						const gchar* _tmp28_;
						GeeHashSet* _tmp29_;
						GeeHashSet* _tmp30_;
#line 1977 "/home/jens/Source/shotwell/src/Commands.vala"
						_tmp27_ = self->priv->src_parent_detachments;
#line 1977 "/home/jens/Source/shotwell/src/Commands.vala"
						_tmp28_ = current_parent_path;
#line 1977 "/home/jens/Source/shotwell/src/Commands.vala"
						_tmp29_ = gee_hash_set_new (TYPE_MEDIA_SOURCE, (GBoxedCopyFunc) g_object_ref, (GDestroyNotify) g_object_unref, NULL, NULL, NULL, NULL, NULL, NULL);
#line 1977 "/home/jens/Source/shotwell/src/Commands.vala"
						_tmp30_ = _tmp29_;
#line 1977 "/home/jens/Source/shotwell/src/Commands.vala"
						gee_map_set (_tmp27_, _tmp28_, G_TYPE_CHECK_INSTANCE_CAST (_tmp30_, GEE_TYPE_SET, GeeSet));
#line 1977 "/home/jens/Source/shotwell/src/Commands.vala"
						_g_object_unref0 (_tmp30_);
#line 17473 "Commands.c"
					}
#line 1979 "/home/jens/Source/shotwell/src/Commands.vala"
					_tmp31_ = current_parent;
#line 1979 "/home/jens/Source/shotwell/src/Commands.vala"
					_tmp32_ = source;
#line 1979 "/home/jens/Source/shotwell/src/Commands.vala"
					_tmp33_ = tag_get_attachment_count (_tmp31_, _tmp32_);
#line 1979 "/home/jens/Source/shotwell/src/Commands.vala"
					curr_parent_attach_count = _tmp33_;
#line 1981 "/home/jens/Source/shotwell/src/Commands.vala"
					_tmp34_ = curr_parent_attach_count;
#line 1981 "/home/jens/Source/shotwell/src/Commands.vala"
					_tmp35_ = running_attach_count;
#line 1981 "/home/jens/Source/shotwell/src/Commands.vala"
					_vala_assert (_tmp34_ >= _tmp35_, "curr_parent_attach_count >= running_attach_count");
#line 1985 "/home/jens/Source/shotwell/src/Commands.vala"
					_tmp36_ = curr_parent_attach_count;
#line 1985 "/home/jens/Source/shotwell/src/Commands.vala"
					_tmp37_ = running_attach_count;
#line 1985 "/home/jens/Source/shotwell/src/Commands.vala"
					if (_tmp36_ == _tmp37_) {
#line 17495 "Commands.c"
						GeeMap* _tmp38_;
						const gchar* _tmp39_;
						gpointer _tmp40_;
						GeeSet* _tmp41_;
						MediaSource* _tmp42_;
#line 1986 "/home/jens/Source/shotwell/src/Commands.vala"
						_tmp38_ = self->priv->src_parent_detachments;
#line 1986 "/home/jens/Source/shotwell/src/Commands.vala"
						_tmp39_ = current_parent_path;
#line 1986 "/home/jens/Source/shotwell/src/Commands.vala"
						_tmp40_ = gee_map_get (_tmp38_, _tmp39_);
#line 1986 "/home/jens/Source/shotwell/src/Commands.vala"
						_tmp41_ = (GeeSet*) _tmp40_;
#line 1986 "/home/jens/Source/shotwell/src/Commands.vala"
						_tmp42_ = source;
#line 1986 "/home/jens/Source/shotwell/src/Commands.vala"
						gee_collection_add (G_TYPE_CHECK_INSTANCE_CAST (_tmp41_, GEE_TYPE_COLLECTION, GeeCollection), _tmp42_);
#line 1986 "/home/jens/Source/shotwell/src/Commands.vala"
						_g_object_unref0 (_tmp41_);
#line 17515 "Commands.c"
					}
#line 1988 "/home/jens/Source/shotwell/src/Commands.vala"
					_tmp43_ = running_attach_count;
#line 1988 "/home/jens/Source/shotwell/src/Commands.vala"
					running_attach_count = _tmp43_ + 1;
#line 1989 "/home/jens/Source/shotwell/src/Commands.vala"
					_tmp44_ = current_parent;
#line 1989 "/home/jens/Source/shotwell/src/Commands.vala"
					_tmp45_ = tag_get_hierarchical_parent (_tmp44_);
#line 1989 "/home/jens/Source/shotwell/src/Commands.vala"
					_g_object_unref0 (current_parent);
#line 1989 "/home/jens/Source/shotwell/src/Commands.vala"
					current_parent = _tmp45_;
#line 1974 "/home/jens/Source/shotwell/src/Commands.vala"
					_g_free0 (current_parent_path);
#line 17531 "Commands.c"
				}
#line 1971 "/home/jens/Source/shotwell/src/Commands.vala"
				_g_object_unref0 (current_parent);
#line 1971 "/home/jens/Source/shotwell/src/Commands.vala"
				_g_object_unref0 (source);
#line 17537 "Commands.c"
			}
#line 1971 "/home/jens/Source/shotwell/src/Commands.vala"
			_g_object_unref0 (_source_it);
#line 17541 "Commands.c"
		}
	}
	{
		GeeIterator* _p_it = NULL;
		GeeMap* _tmp46_;
		GeeSet* _tmp47_;
		GeeSet* _tmp48_;
		GeeSet* _tmp49_;
		GeeIterator* _tmp50_;
		GeeIterator* _tmp51_;
#line 1995 "/home/jens/Source/shotwell/src/Commands.vala"
		_tmp46_ = self->priv->src_parent_detachments;
#line 1995 "/home/jens/Source/shotwell/src/Commands.vala"
		_tmp47_ = gee_map_get_keys (_tmp46_);
#line 1995 "/home/jens/Source/shotwell/src/Commands.vala"
		_tmp48_ = _tmp47_;
#line 1995 "/home/jens/Source/shotwell/src/Commands.vala"
		_tmp49_ = _tmp48_;
#line 1995 "/home/jens/Source/shotwell/src/Commands.vala"
		_tmp50_ = gee_iterable_iterator (G_TYPE_CHECK_INSTANCE_CAST (_tmp49_, GEE_TYPE_ITERABLE, GeeIterable));
#line 1995 "/home/jens/Source/shotwell/src/Commands.vala"
		_tmp51_ = _tmp50_;
#line 1995 "/home/jens/Source/shotwell/src/Commands.vala"
		_g_object_unref0 (_tmp49_);
#line 1995 "/home/jens/Source/shotwell/src/Commands.vala"
		_p_it = _tmp51_;
#line 1995 "/home/jens/Source/shotwell/src/Commands.vala"
		while (TRUE) {
#line 17570 "Commands.c"
			GeeIterator* _tmp52_;
			gboolean _tmp53_;
			gchar* p = NULL;
			GeeIterator* _tmp54_;
			gpointer _tmp55_;
#line 1995 "/home/jens/Source/shotwell/src/Commands.vala"
			_tmp52_ = _p_it;
#line 1995 "/home/jens/Source/shotwell/src/Commands.vala"
			_tmp53_ = gee_iterator_next (_tmp52_);
#line 1995 "/home/jens/Source/shotwell/src/Commands.vala"
			if (!_tmp53_) {
#line 1995 "/home/jens/Source/shotwell/src/Commands.vala"
				break;
#line 17584 "Commands.c"
			}
#line 1995 "/home/jens/Source/shotwell/src/Commands.vala"
			_tmp54_ = _p_it;
#line 1995 "/home/jens/Source/shotwell/src/Commands.vala"
			_tmp55_ = gee_iterator_get (_tmp54_);
#line 1995 "/home/jens/Source/shotwell/src/Commands.vala"
			p = (gchar*) _tmp55_;
#line 17592 "Commands.c"
			{
				GeeIterator* _s_it = NULL;
				GeeMap* _tmp56_;
				const gchar* _tmp57_;
				gpointer _tmp58_;
				GeeSet* _tmp59_;
				GeeIterator* _tmp60_;
				GeeIterator* _tmp61_;
#line 1996 "/home/jens/Source/shotwell/src/Commands.vala"
				_tmp56_ = self->priv->src_parent_detachments;
#line 1996 "/home/jens/Source/shotwell/src/Commands.vala"
				_tmp57_ = p;
#line 1996 "/home/jens/Source/shotwell/src/Commands.vala"
				_tmp58_ = gee_map_get (_tmp56_, _tmp57_);
#line 1996 "/home/jens/Source/shotwell/src/Commands.vala"
				_tmp59_ = (GeeSet*) _tmp58_;
#line 1996 "/home/jens/Source/shotwell/src/Commands.vala"
				_tmp60_ = gee_iterable_iterator (G_TYPE_CHECK_INSTANCE_CAST (_tmp59_, GEE_TYPE_ITERABLE, GeeIterable));
#line 1996 "/home/jens/Source/shotwell/src/Commands.vala"
				_tmp61_ = _tmp60_;
#line 1996 "/home/jens/Source/shotwell/src/Commands.vala"
				_g_object_unref0 (_tmp59_);
#line 1996 "/home/jens/Source/shotwell/src/Commands.vala"
				_s_it = _tmp61_;
#line 1996 "/home/jens/Source/shotwell/src/Commands.vala"
				while (TRUE) {
#line 17619 "Commands.c"
					GeeIterator* _tmp62_;
					gboolean _tmp63_;
					MediaSource* s = NULL;
					GeeIterator* _tmp64_;
					gpointer _tmp65_;
					const gchar* _tmp66_;
					Tag* _tmp67_;
					Tag* _tmp68_;
					MediaSource* _tmp69_;
					GeeList* _tmp70_;
					GeeList* _tmp71_;
#line 1996 "/home/jens/Source/shotwell/src/Commands.vala"
					_tmp62_ = _s_it;
#line 1996 "/home/jens/Source/shotwell/src/Commands.vala"
					_tmp63_ = gee_iterator_next (_tmp62_);
#line 1996 "/home/jens/Source/shotwell/src/Commands.vala"
					if (!_tmp63_) {
#line 1996 "/home/jens/Source/shotwell/src/Commands.vala"
						break;
#line 17639 "Commands.c"
					}
#line 1996 "/home/jens/Source/shotwell/src/Commands.vala"
					_tmp64_ = _s_it;
#line 1996 "/home/jens/Source/shotwell/src/Commands.vala"
					_tmp65_ = gee_iterator_get (_tmp64_);
#line 1996 "/home/jens/Source/shotwell/src/Commands.vala"
					s = (MediaSource*) _tmp65_;
#line 1997 "/home/jens/Source/shotwell/src/Commands.vala"
					_tmp66_ = p;
#line 1997 "/home/jens/Source/shotwell/src/Commands.vala"
					_tmp67_ = tag_for_path (_tmp66_);
#line 1997 "/home/jens/Source/shotwell/src/Commands.vala"
					_tmp68_ = _tmp67_;
#line 1997 "/home/jens/Source/shotwell/src/Commands.vala"
					_tmp69_ = s;
#line 1997 "/home/jens/Source/shotwell/src/Commands.vala"
					_tmp70_ = tag_detach (_tmp68_, _tmp69_);
#line 1997 "/home/jens/Source/shotwell/src/Commands.vala"
					_tmp71_ = _tmp70_;
#line 1997 "/home/jens/Source/shotwell/src/Commands.vala"
					_g_object_unref0 (_tmp71_);
#line 1997 "/home/jens/Source/shotwell/src/Commands.vala"
					_g_object_unref0 (_tmp68_);
#line 1996 "/home/jens/Source/shotwell/src/Commands.vala"
					_g_object_unref0 (s);
#line 17665 "Commands.c"
				}
#line 1996 "/home/jens/Source/shotwell/src/Commands.vala"
				_g_object_unref0 (_s_it);
#line 17669 "Commands.c"
			}
#line 1995 "/home/jens/Source/shotwell/src/Commands.vala"
			_g_free0 (p);
#line 17673 "Commands.c"
		}
#line 1995 "/home/jens/Source/shotwell/src/Commands.vala"
		_g_object_unref0 (_p_it);
#line 17677 "Commands.c"
	}
#line 1964 "/home/jens/Source/shotwell/src/Commands.vala"
	_g_object_unref0 (from_tag);
#line 17681 "Commands.c"
}


static void reparent_tag_command_do_source_parent_reattachments (ReparentTagCommand* self) {
	GeeMap* _tmp0_;
#line 2000 "/home/jens/Source/shotwell/src/Commands.vala"
	g_return_if_fail (IS_REPARENT_TAG_COMMAND (self));
#line 2001 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp0_ = self->priv->src_parent_detachments;
#line 2001 "/home/jens/Source/shotwell/src/Commands.vala"
	_vala_assert (_tmp0_ != NULL, "src_parent_detachments != null");
#line 17693 "Commands.c"
	{
		GeeIterator* _p_it = NULL;
		GeeMap* _tmp1_;
		GeeSet* _tmp2_;
		GeeSet* _tmp3_;
		GeeSet* _tmp4_;
		GeeIterator* _tmp5_;
		GeeIterator* _tmp6_;
#line 2003 "/home/jens/Source/shotwell/src/Commands.vala"
		_tmp1_ = self->priv->src_parent_detachments;
#line 2003 "/home/jens/Source/shotwell/src/Commands.vala"
		_tmp2_ = gee_map_get_keys (_tmp1_);
#line 2003 "/home/jens/Source/shotwell/src/Commands.vala"
		_tmp3_ = _tmp2_;
#line 2003 "/home/jens/Source/shotwell/src/Commands.vala"
		_tmp4_ = _tmp3_;
#line 2003 "/home/jens/Source/shotwell/src/Commands.vala"
		_tmp5_ = gee_iterable_iterator (G_TYPE_CHECK_INSTANCE_CAST (_tmp4_, GEE_TYPE_ITERABLE, GeeIterable));
#line 2003 "/home/jens/Source/shotwell/src/Commands.vala"
		_tmp6_ = _tmp5_;
#line 2003 "/home/jens/Source/shotwell/src/Commands.vala"
		_g_object_unref0 (_tmp4_);
#line 2003 "/home/jens/Source/shotwell/src/Commands.vala"
		_p_it = _tmp6_;
#line 2003 "/home/jens/Source/shotwell/src/Commands.vala"
		while (TRUE) {
#line 17720 "Commands.c"
			GeeIterator* _tmp7_;
			gboolean _tmp8_;
			gchar* p = NULL;
			GeeIterator* _tmp9_;
			gpointer _tmp10_;
#line 2003 "/home/jens/Source/shotwell/src/Commands.vala"
			_tmp7_ = _p_it;
#line 2003 "/home/jens/Source/shotwell/src/Commands.vala"
			_tmp8_ = gee_iterator_next (_tmp7_);
#line 2003 "/home/jens/Source/shotwell/src/Commands.vala"
			if (!_tmp8_) {
#line 2003 "/home/jens/Source/shotwell/src/Commands.vala"
				break;
#line 17734 "Commands.c"
			}
#line 2003 "/home/jens/Source/shotwell/src/Commands.vala"
			_tmp9_ = _p_it;
#line 2003 "/home/jens/Source/shotwell/src/Commands.vala"
			_tmp10_ = gee_iterator_get (_tmp9_);
#line 2003 "/home/jens/Source/shotwell/src/Commands.vala"
			p = (gchar*) _tmp10_;
#line 17742 "Commands.c"
			{
				GeeIterator* _s_it = NULL;
				GeeMap* _tmp11_;
				const gchar* _tmp12_;
				gpointer _tmp13_;
				GeeSet* _tmp14_;
				GeeIterator* _tmp15_;
				GeeIterator* _tmp16_;
#line 2004 "/home/jens/Source/shotwell/src/Commands.vala"
				_tmp11_ = self->priv->src_parent_detachments;
#line 2004 "/home/jens/Source/shotwell/src/Commands.vala"
				_tmp12_ = p;
#line 2004 "/home/jens/Source/shotwell/src/Commands.vala"
				_tmp13_ = gee_map_get (_tmp11_, _tmp12_);
#line 2004 "/home/jens/Source/shotwell/src/Commands.vala"
				_tmp14_ = (GeeSet*) _tmp13_;
#line 2004 "/home/jens/Source/shotwell/src/Commands.vala"
				_tmp15_ = gee_iterable_iterator (G_TYPE_CHECK_INSTANCE_CAST (_tmp14_, GEE_TYPE_ITERABLE, GeeIterable));
#line 2004 "/home/jens/Source/shotwell/src/Commands.vala"
				_tmp16_ = _tmp15_;
#line 2004 "/home/jens/Source/shotwell/src/Commands.vala"
				_g_object_unref0 (_tmp14_);
#line 2004 "/home/jens/Source/shotwell/src/Commands.vala"
				_s_it = _tmp16_;
#line 2004 "/home/jens/Source/shotwell/src/Commands.vala"
				while (TRUE) {
#line 17769 "Commands.c"
					GeeIterator* _tmp17_;
					gboolean _tmp18_;
					MediaSource* s = NULL;
					GeeIterator* _tmp19_;
					gpointer _tmp20_;
					const gchar* _tmp21_;
					Tag* _tmp22_;
					Tag* _tmp23_;
					MediaSource* _tmp24_;
#line 2004 "/home/jens/Source/shotwell/src/Commands.vala"
					_tmp17_ = _s_it;
#line 2004 "/home/jens/Source/shotwell/src/Commands.vala"
					_tmp18_ = gee_iterator_next (_tmp17_);
#line 2004 "/home/jens/Source/shotwell/src/Commands.vala"
					if (!_tmp18_) {
#line 2004 "/home/jens/Source/shotwell/src/Commands.vala"
						break;
#line 17787 "Commands.c"
					}
#line 2004 "/home/jens/Source/shotwell/src/Commands.vala"
					_tmp19_ = _s_it;
#line 2004 "/home/jens/Source/shotwell/src/Commands.vala"
					_tmp20_ = gee_iterator_get (_tmp19_);
#line 2004 "/home/jens/Source/shotwell/src/Commands.vala"
					s = (MediaSource*) _tmp20_;
#line 2005 "/home/jens/Source/shotwell/src/Commands.vala"
					_tmp21_ = p;
#line 2005 "/home/jens/Source/shotwell/src/Commands.vala"
					_tmp22_ = tag_for_path (_tmp21_);
#line 2005 "/home/jens/Source/shotwell/src/Commands.vala"
					_tmp23_ = _tmp22_;
#line 2005 "/home/jens/Source/shotwell/src/Commands.vala"
					_tmp24_ = s;
#line 2005 "/home/jens/Source/shotwell/src/Commands.vala"
					tag_attach (_tmp23_, _tmp24_);
#line 2005 "/home/jens/Source/shotwell/src/Commands.vala"
					_g_object_unref0 (_tmp23_);
#line 2004 "/home/jens/Source/shotwell/src/Commands.vala"
					_g_object_unref0 (s);
#line 17809 "Commands.c"
				}
#line 2004 "/home/jens/Source/shotwell/src/Commands.vala"
				_g_object_unref0 (_s_it);
#line 17813 "Commands.c"
			}
#line 2003 "/home/jens/Source/shotwell/src/Commands.vala"
			_g_free0 (p);
#line 17817 "Commands.c"
		}
#line 2003 "/home/jens/Source/shotwell/src/Commands.vala"
		_g_object_unref0 (_p_it);
#line 17821 "Commands.c"
	}
}


static void reparent_tag_command_do_destination_parent_detachments (ReparentTagCommand* self) {
	GeeMap* _tmp0_;
#line 2008 "/home/jens/Source/shotwell/src/Commands.vala"
	g_return_if_fail (IS_REPARENT_TAG_COMMAND (self));
#line 2009 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp0_ = self->priv->dest_parent_attachments;
#line 2009 "/home/jens/Source/shotwell/src/Commands.vala"
	_vala_assert (_tmp0_ != NULL, "dest_parent_attachments != null");
#line 17834 "Commands.c"
	{
		GeeIterator* _p_it = NULL;
		GeeMap* _tmp1_;
		GeeSet* _tmp2_;
		GeeSet* _tmp3_;
		GeeSet* _tmp4_;
		GeeIterator* _tmp5_;
		GeeIterator* _tmp6_;
#line 2011 "/home/jens/Source/shotwell/src/Commands.vala"
		_tmp1_ = self->priv->dest_parent_attachments;
#line 2011 "/home/jens/Source/shotwell/src/Commands.vala"
		_tmp2_ = gee_map_get_keys (_tmp1_);
#line 2011 "/home/jens/Source/shotwell/src/Commands.vala"
		_tmp3_ = _tmp2_;
#line 2011 "/home/jens/Source/shotwell/src/Commands.vala"
		_tmp4_ = _tmp3_;
#line 2011 "/home/jens/Source/shotwell/src/Commands.vala"
		_tmp5_ = gee_iterable_iterator (G_TYPE_CHECK_INSTANCE_CAST (_tmp4_, GEE_TYPE_ITERABLE, GeeIterable));
#line 2011 "/home/jens/Source/shotwell/src/Commands.vala"
		_tmp6_ = _tmp5_;
#line 2011 "/home/jens/Source/shotwell/src/Commands.vala"
		_g_object_unref0 (_tmp4_);
#line 2011 "/home/jens/Source/shotwell/src/Commands.vala"
		_p_it = _tmp6_;
#line 2011 "/home/jens/Source/shotwell/src/Commands.vala"
		while (TRUE) {
#line 17861 "Commands.c"
			GeeIterator* _tmp7_;
			gboolean _tmp8_;
			gchar* p = NULL;
			GeeIterator* _tmp9_;
			gpointer _tmp10_;
#line 2011 "/home/jens/Source/shotwell/src/Commands.vala"
			_tmp7_ = _p_it;
#line 2011 "/home/jens/Source/shotwell/src/Commands.vala"
			_tmp8_ = gee_iterator_next (_tmp7_);
#line 2011 "/home/jens/Source/shotwell/src/Commands.vala"
			if (!_tmp8_) {
#line 2011 "/home/jens/Source/shotwell/src/Commands.vala"
				break;
#line 17875 "Commands.c"
			}
#line 2011 "/home/jens/Source/shotwell/src/Commands.vala"
			_tmp9_ = _p_it;
#line 2011 "/home/jens/Source/shotwell/src/Commands.vala"
			_tmp10_ = gee_iterator_get (_tmp9_);
#line 2011 "/home/jens/Source/shotwell/src/Commands.vala"
			p = (gchar*) _tmp10_;
#line 17883 "Commands.c"
			{
				GeeIterator* _s_it = NULL;
				GeeMap* _tmp11_;
				const gchar* _tmp12_;
				gpointer _tmp13_;
				GeeSet* _tmp14_;
				GeeIterator* _tmp15_;
				GeeIterator* _tmp16_;
#line 2012 "/home/jens/Source/shotwell/src/Commands.vala"
				_tmp11_ = self->priv->dest_parent_attachments;
#line 2012 "/home/jens/Source/shotwell/src/Commands.vala"
				_tmp12_ = p;
#line 2012 "/home/jens/Source/shotwell/src/Commands.vala"
				_tmp13_ = gee_map_get (_tmp11_, _tmp12_);
#line 2012 "/home/jens/Source/shotwell/src/Commands.vala"
				_tmp14_ = (GeeSet*) _tmp13_;
#line 2012 "/home/jens/Source/shotwell/src/Commands.vala"
				_tmp15_ = gee_iterable_iterator (G_TYPE_CHECK_INSTANCE_CAST (_tmp14_, GEE_TYPE_ITERABLE, GeeIterable));
#line 2012 "/home/jens/Source/shotwell/src/Commands.vala"
				_tmp16_ = _tmp15_;
#line 2012 "/home/jens/Source/shotwell/src/Commands.vala"
				_g_object_unref0 (_tmp14_);
#line 2012 "/home/jens/Source/shotwell/src/Commands.vala"
				_s_it = _tmp16_;
#line 2012 "/home/jens/Source/shotwell/src/Commands.vala"
				while (TRUE) {
#line 17910 "Commands.c"
					GeeIterator* _tmp17_;
					gboolean _tmp18_;
					MediaSource* s = NULL;
					GeeIterator* _tmp19_;
					gpointer _tmp20_;
					const gchar* _tmp21_;
					Tag* _tmp22_;
					Tag* _tmp23_;
					MediaSource* _tmp24_;
					GeeList* _tmp25_;
					GeeList* _tmp26_;
#line 2012 "/home/jens/Source/shotwell/src/Commands.vala"
					_tmp17_ = _s_it;
#line 2012 "/home/jens/Source/shotwell/src/Commands.vala"
					_tmp18_ = gee_iterator_next (_tmp17_);
#line 2012 "/home/jens/Source/shotwell/src/Commands.vala"
					if (!_tmp18_) {
#line 2012 "/home/jens/Source/shotwell/src/Commands.vala"
						break;
#line 17930 "Commands.c"
					}
#line 2012 "/home/jens/Source/shotwell/src/Commands.vala"
					_tmp19_ = _s_it;
#line 2012 "/home/jens/Source/shotwell/src/Commands.vala"
					_tmp20_ = gee_iterator_get (_tmp19_);
#line 2012 "/home/jens/Source/shotwell/src/Commands.vala"
					s = (MediaSource*) _tmp20_;
#line 2013 "/home/jens/Source/shotwell/src/Commands.vala"
					_tmp21_ = p;
#line 2013 "/home/jens/Source/shotwell/src/Commands.vala"
					_tmp22_ = tag_for_path (_tmp21_);
#line 2013 "/home/jens/Source/shotwell/src/Commands.vala"
					_tmp23_ = _tmp22_;
#line 2013 "/home/jens/Source/shotwell/src/Commands.vala"
					_tmp24_ = s;
#line 2013 "/home/jens/Source/shotwell/src/Commands.vala"
					_tmp25_ = tag_detach (_tmp23_, _tmp24_);
#line 2013 "/home/jens/Source/shotwell/src/Commands.vala"
					_tmp26_ = _tmp25_;
#line 2013 "/home/jens/Source/shotwell/src/Commands.vala"
					_g_object_unref0 (_tmp26_);
#line 2013 "/home/jens/Source/shotwell/src/Commands.vala"
					_g_object_unref0 (_tmp23_);
#line 2012 "/home/jens/Source/shotwell/src/Commands.vala"
					_g_object_unref0 (s);
#line 17956 "Commands.c"
				}
#line 2012 "/home/jens/Source/shotwell/src/Commands.vala"
				_g_object_unref0 (_s_it);
#line 17960 "Commands.c"
			}
#line 2011 "/home/jens/Source/shotwell/src/Commands.vala"
			_g_free0 (p);
#line 17964 "Commands.c"
		}
#line 2011 "/home/jens/Source/shotwell/src/Commands.vala"
		_g_object_unref0 (_p_it);
#line 17968 "Commands.c"
	}
}


static void reparent_tag_command_do_destination_parent_reattachments (ReparentTagCommand* self) {
	GeeMap* _tmp0_;
#line 2016 "/home/jens/Source/shotwell/src/Commands.vala"
	g_return_if_fail (IS_REPARENT_TAG_COMMAND (self));
#line 2017 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp0_ = self->priv->dest_parent_attachments;
#line 2017 "/home/jens/Source/shotwell/src/Commands.vala"
	_vala_assert (_tmp0_ != NULL, "dest_parent_attachments != null");
#line 17981 "Commands.c"
	{
		GeeIterator* _p_it = NULL;
		GeeMap* _tmp1_;
		GeeSet* _tmp2_;
		GeeSet* _tmp3_;
		GeeSet* _tmp4_;
		GeeIterator* _tmp5_;
		GeeIterator* _tmp6_;
#line 2019 "/home/jens/Source/shotwell/src/Commands.vala"
		_tmp1_ = self->priv->dest_parent_attachments;
#line 2019 "/home/jens/Source/shotwell/src/Commands.vala"
		_tmp2_ = gee_map_get_keys (_tmp1_);
#line 2019 "/home/jens/Source/shotwell/src/Commands.vala"
		_tmp3_ = _tmp2_;
#line 2019 "/home/jens/Source/shotwell/src/Commands.vala"
		_tmp4_ = _tmp3_;
#line 2019 "/home/jens/Source/shotwell/src/Commands.vala"
		_tmp5_ = gee_iterable_iterator (G_TYPE_CHECK_INSTANCE_CAST (_tmp4_, GEE_TYPE_ITERABLE, GeeIterable));
#line 2019 "/home/jens/Source/shotwell/src/Commands.vala"
		_tmp6_ = _tmp5_;
#line 2019 "/home/jens/Source/shotwell/src/Commands.vala"
		_g_object_unref0 (_tmp4_);
#line 2019 "/home/jens/Source/shotwell/src/Commands.vala"
		_p_it = _tmp6_;
#line 2019 "/home/jens/Source/shotwell/src/Commands.vala"
		while (TRUE) {
#line 18008 "Commands.c"
			GeeIterator* _tmp7_;
			gboolean _tmp8_;
			gchar* p = NULL;
			GeeIterator* _tmp9_;
			gpointer _tmp10_;
#line 2019 "/home/jens/Source/shotwell/src/Commands.vala"
			_tmp7_ = _p_it;
#line 2019 "/home/jens/Source/shotwell/src/Commands.vala"
			_tmp8_ = gee_iterator_next (_tmp7_);
#line 2019 "/home/jens/Source/shotwell/src/Commands.vala"
			if (!_tmp8_) {
#line 2019 "/home/jens/Source/shotwell/src/Commands.vala"
				break;
#line 18022 "Commands.c"
			}
#line 2019 "/home/jens/Source/shotwell/src/Commands.vala"
			_tmp9_ = _p_it;
#line 2019 "/home/jens/Source/shotwell/src/Commands.vala"
			_tmp10_ = gee_iterator_get (_tmp9_);
#line 2019 "/home/jens/Source/shotwell/src/Commands.vala"
			p = (gchar*) _tmp10_;
#line 18030 "Commands.c"
			{
				GeeIterator* _s_it = NULL;
				GeeMap* _tmp11_;
				const gchar* _tmp12_;
				gpointer _tmp13_;
				GeeSet* _tmp14_;
				GeeIterator* _tmp15_;
				GeeIterator* _tmp16_;
#line 2020 "/home/jens/Source/shotwell/src/Commands.vala"
				_tmp11_ = self->priv->dest_parent_attachments;
#line 2020 "/home/jens/Source/shotwell/src/Commands.vala"
				_tmp12_ = p;
#line 2020 "/home/jens/Source/shotwell/src/Commands.vala"
				_tmp13_ = gee_map_get (_tmp11_, _tmp12_);
#line 2020 "/home/jens/Source/shotwell/src/Commands.vala"
				_tmp14_ = (GeeSet*) _tmp13_;
#line 2020 "/home/jens/Source/shotwell/src/Commands.vala"
				_tmp15_ = gee_iterable_iterator (G_TYPE_CHECK_INSTANCE_CAST (_tmp14_, GEE_TYPE_ITERABLE, GeeIterable));
#line 2020 "/home/jens/Source/shotwell/src/Commands.vala"
				_tmp16_ = _tmp15_;
#line 2020 "/home/jens/Source/shotwell/src/Commands.vala"
				_g_object_unref0 (_tmp14_);
#line 2020 "/home/jens/Source/shotwell/src/Commands.vala"
				_s_it = _tmp16_;
#line 2020 "/home/jens/Source/shotwell/src/Commands.vala"
				while (TRUE) {
#line 18057 "Commands.c"
					GeeIterator* _tmp17_;
					gboolean _tmp18_;
					MediaSource* s = NULL;
					GeeIterator* _tmp19_;
					gpointer _tmp20_;
					const gchar* _tmp21_;
					Tag* _tmp22_;
					Tag* _tmp23_;
					MediaSource* _tmp24_;
#line 2020 "/home/jens/Source/shotwell/src/Commands.vala"
					_tmp17_ = _s_it;
#line 2020 "/home/jens/Source/shotwell/src/Commands.vala"
					_tmp18_ = gee_iterator_next (_tmp17_);
#line 2020 "/home/jens/Source/shotwell/src/Commands.vala"
					if (!_tmp18_) {
#line 2020 "/home/jens/Source/shotwell/src/Commands.vala"
						break;
#line 18075 "Commands.c"
					}
#line 2020 "/home/jens/Source/shotwell/src/Commands.vala"
					_tmp19_ = _s_it;
#line 2020 "/home/jens/Source/shotwell/src/Commands.vala"
					_tmp20_ = gee_iterator_get (_tmp19_);
#line 2020 "/home/jens/Source/shotwell/src/Commands.vala"
					s = (MediaSource*) _tmp20_;
#line 2021 "/home/jens/Source/shotwell/src/Commands.vala"
					_tmp21_ = p;
#line 2021 "/home/jens/Source/shotwell/src/Commands.vala"
					_tmp22_ = tag_for_path (_tmp21_);
#line 2021 "/home/jens/Source/shotwell/src/Commands.vala"
					_tmp23_ = _tmp22_;
#line 2021 "/home/jens/Source/shotwell/src/Commands.vala"
					_tmp24_ = s;
#line 2021 "/home/jens/Source/shotwell/src/Commands.vala"
					tag_attach (_tmp23_, _tmp24_);
#line 2021 "/home/jens/Source/shotwell/src/Commands.vala"
					_g_object_unref0 (_tmp23_);
#line 2020 "/home/jens/Source/shotwell/src/Commands.vala"
					_g_object_unref0 (s);
#line 18097 "Commands.c"
				}
#line 2020 "/home/jens/Source/shotwell/src/Commands.vala"
				_g_object_unref0 (_s_it);
#line 18101 "Commands.c"
			}
#line 2019 "/home/jens/Source/shotwell/src/Commands.vala"
			_g_free0 (p);
#line 18105 "Commands.c"
		}
#line 2019 "/home/jens/Source/shotwell/src/Commands.vala"
		_g_object_unref0 (_p_it);
#line 18109 "Commands.c"
	}
}


static void reparent_tag_command_copy_subtree (ReparentTagCommand* self, const gchar* from, const gchar* to) {
	TagSourceCollection* _tmp0_;
	const gchar* _tmp1_;
	gboolean _tmp2_;
	Tag* from_tag = NULL;
	const gchar* _tmp3_;
	Tag* _tmp4_;
	Tag* to_tag = NULL;
	const gchar* _tmp5_;
	Tag* _tmp6_;
	GeeHashMap* _tmp7_;
	GeeList* from_children = NULL;
	Tag* _tmp50_;
	GeeList* _tmp51_;
#line 2024 "/home/jens/Source/shotwell/src/Commands.vala"
	g_return_if_fail (IS_REPARENT_TAG_COMMAND (self));
#line 2024 "/home/jens/Source/shotwell/src/Commands.vala"
	g_return_if_fail (from != NULL);
#line 2024 "/home/jens/Source/shotwell/src/Commands.vala"
	g_return_if_fail (to != NULL);
#line 2025 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp0_ = tag_global;
#line 2025 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp1_ = from;
#line 2025 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp2_ = tag_source_collection_exists (_tmp0_, _tmp1_, FALSE);
#line 2025 "/home/jens/Source/shotwell/src/Commands.vala"
	_vala_assert (_tmp2_, "Tag.global.exists(from)");
#line 2026 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp3_ = from;
#line 2026 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp4_ = tag_for_path (_tmp3_);
#line 2026 "/home/jens/Source/shotwell/src/Commands.vala"
	from_tag = _tmp4_;
#line 2029 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp5_ = to;
#line 2029 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp6_ = tag_for_path (_tmp5_);
#line 2029 "/home/jens/Source/shotwell/src/Commands.vala"
	to_tag = _tmp6_;
#line 2033 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp7_ = gee_hash_map_new (G_TYPE_STRING, (GBoxedCopyFunc) g_strdup, (GDestroyNotify) g_free, GEE_TYPE_SET, (GBoxedCopyFunc) g_object_ref, (GDestroyNotify) g_object_unref, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
#line 2033 "/home/jens/Source/shotwell/src/Commands.vala"
	_g_object_unref0 (self->priv->dest_parent_attachments);
#line 2033 "/home/jens/Source/shotwell/src/Commands.vala"
	self->priv->dest_parent_attachments = G_TYPE_CHECK_INSTANCE_CAST (_tmp7_, GEE_TYPE_MAP, GeeMap);
#line 18160 "Commands.c"
	{
		GeeIterator* _source_it = NULL;
		Tag* _tmp8_;
		GeeCollection* _tmp9_;
		GeeCollection* _tmp10_;
		GeeIterator* _tmp11_;
		GeeIterator* _tmp12_;
#line 2034 "/home/jens/Source/shotwell/src/Commands.vala"
		_tmp8_ = from_tag;
#line 2034 "/home/jens/Source/shotwell/src/Commands.vala"
		_tmp9_ = tag_get_sources (_tmp8_);
#line 2034 "/home/jens/Source/shotwell/src/Commands.vala"
		_tmp10_ = _tmp9_;
#line 2034 "/home/jens/Source/shotwell/src/Commands.vala"
		_tmp11_ = gee_iterable_iterator (G_TYPE_CHECK_INSTANCE_CAST (_tmp10_, GEE_TYPE_ITERABLE, GeeIterable));
#line 2034 "/home/jens/Source/shotwell/src/Commands.vala"
		_tmp12_ = _tmp11_;
#line 2034 "/home/jens/Source/shotwell/src/Commands.vala"
		_g_object_unref0 (_tmp10_);
#line 2034 "/home/jens/Source/shotwell/src/Commands.vala"
		_source_it = _tmp12_;
#line 2034 "/home/jens/Source/shotwell/src/Commands.vala"
		while (TRUE) {
#line 18184 "Commands.c"
			GeeIterator* _tmp13_;
			gboolean _tmp14_;
			MediaSource* source = NULL;
			GeeIterator* _tmp15_;
			gpointer _tmp16_;
			Tag* current_parent = NULL;
			Tag* _tmp17_;
			Tag* _tmp18_;
#line 2034 "/home/jens/Source/shotwell/src/Commands.vala"
			_tmp13_ = _source_it;
#line 2034 "/home/jens/Source/shotwell/src/Commands.vala"
			_tmp14_ = gee_iterator_next (_tmp13_);
#line 2034 "/home/jens/Source/shotwell/src/Commands.vala"
			if (!_tmp14_) {
#line 2034 "/home/jens/Source/shotwell/src/Commands.vala"
				break;
#line 18201 "Commands.c"
			}
#line 2034 "/home/jens/Source/shotwell/src/Commands.vala"
			_tmp15_ = _source_it;
#line 2034 "/home/jens/Source/shotwell/src/Commands.vala"
			_tmp16_ = gee_iterator_get (_tmp15_);
#line 2034 "/home/jens/Source/shotwell/src/Commands.vala"
			source = (MediaSource*) _tmp16_;
#line 2035 "/home/jens/Source/shotwell/src/Commands.vala"
			_tmp17_ = to_tag;
#line 2035 "/home/jens/Source/shotwell/src/Commands.vala"
			_tmp18_ = tag_get_hierarchical_parent (_tmp17_);
#line 2035 "/home/jens/Source/shotwell/src/Commands.vala"
			current_parent = _tmp18_;
#line 2036 "/home/jens/Source/shotwell/src/Commands.vala"
			while (TRUE) {
#line 18217 "Commands.c"
				Tag* _tmp19_;
				gchar* current_parent_path = NULL;
				Tag* _tmp20_;
				gchar* _tmp21_;
				GeeMap* _tmp22_;
				const gchar* _tmp23_;
				gboolean _tmp24_;
				Tag* _tmp29_;
				MediaSource* _tmp30_;
				gboolean _tmp31_;
				Tag* _tmp37_;
				Tag* _tmp38_;
#line 2036 "/home/jens/Source/shotwell/src/Commands.vala"
				_tmp19_ = current_parent;
#line 2036 "/home/jens/Source/shotwell/src/Commands.vala"
				if (!(_tmp19_ != NULL)) {
#line 2036 "/home/jens/Source/shotwell/src/Commands.vala"
					break;
#line 18236 "Commands.c"
				}
#line 2037 "/home/jens/Source/shotwell/src/Commands.vala"
				_tmp20_ = current_parent;
#line 2037 "/home/jens/Source/shotwell/src/Commands.vala"
				_tmp21_ = tag_get_path (_tmp20_);
#line 2037 "/home/jens/Source/shotwell/src/Commands.vala"
				current_parent_path = _tmp21_;
#line 2038 "/home/jens/Source/shotwell/src/Commands.vala"
				_tmp22_ = self->priv->dest_parent_attachments;
#line 2038 "/home/jens/Source/shotwell/src/Commands.vala"
				_tmp23_ = current_parent_path;
#line 2038 "/home/jens/Source/shotwell/src/Commands.vala"
				_tmp24_ = gee_map_has_key (_tmp22_, _tmp23_);
#line 2038 "/home/jens/Source/shotwell/src/Commands.vala"
				if (!_tmp24_) {
#line 18252 "Commands.c"
					GeeMap* _tmp25_;
					const gchar* _tmp26_;
					GeeHashSet* _tmp27_;
					GeeHashSet* _tmp28_;
#line 2039 "/home/jens/Source/shotwell/src/Commands.vala"
					_tmp25_ = self->priv->dest_parent_attachments;
#line 2039 "/home/jens/Source/shotwell/src/Commands.vala"
					_tmp26_ = current_parent_path;
#line 2039 "/home/jens/Source/shotwell/src/Commands.vala"
					_tmp27_ = gee_hash_set_new (TYPE_MEDIA_SOURCE, (GBoxedCopyFunc) g_object_ref, (GDestroyNotify) g_object_unref, NULL, NULL, NULL, NULL, NULL, NULL);
#line 2039 "/home/jens/Source/shotwell/src/Commands.vala"
					_tmp28_ = _tmp27_;
#line 2039 "/home/jens/Source/shotwell/src/Commands.vala"
					gee_map_set (_tmp25_, _tmp26_, G_TYPE_CHECK_INSTANCE_CAST (_tmp28_, GEE_TYPE_SET, GeeSet));
#line 2039 "/home/jens/Source/shotwell/src/Commands.vala"
					_g_object_unref0 (_tmp28_);
#line 18269 "Commands.c"
				}
#line 2041 "/home/jens/Source/shotwell/src/Commands.vala"
				_tmp29_ = current_parent;
#line 2041 "/home/jens/Source/shotwell/src/Commands.vala"
				_tmp30_ = source;
#line 2041 "/home/jens/Source/shotwell/src/Commands.vala"
				_tmp31_ = tag_contains (_tmp29_, _tmp30_);
#line 2041 "/home/jens/Source/shotwell/src/Commands.vala"
				if (!_tmp31_) {
#line 18279 "Commands.c"
					GeeMap* _tmp32_;
					const gchar* _tmp33_;
					gpointer _tmp34_;
					GeeSet* _tmp35_;
					MediaSource* _tmp36_;
#line 2042 "/home/jens/Source/shotwell/src/Commands.vala"
					_tmp32_ = self->priv->dest_parent_attachments;
#line 2042 "/home/jens/Source/shotwell/src/Commands.vala"
					_tmp33_ = current_parent_path;
#line 2042 "/home/jens/Source/shotwell/src/Commands.vala"
					_tmp34_ = gee_map_get (_tmp32_, _tmp33_);
#line 2042 "/home/jens/Source/shotwell/src/Commands.vala"
					_tmp35_ = (GeeSet*) _tmp34_;
#line 2042 "/home/jens/Source/shotwell/src/Commands.vala"
					_tmp36_ = source;
#line 2042 "/home/jens/Source/shotwell/src/Commands.vala"
					gee_collection_add (G_TYPE_CHECK_INSTANCE_CAST (_tmp35_, GEE_TYPE_COLLECTION, GeeCollection), _tmp36_);
#line 2042 "/home/jens/Source/shotwell/src/Commands.vala"
					_g_object_unref0 (_tmp35_);
#line 18299 "Commands.c"
				}
#line 2044 "/home/jens/Source/shotwell/src/Commands.vala"
				_tmp37_ = current_parent;
#line 2044 "/home/jens/Source/shotwell/src/Commands.vala"
				_tmp38_ = tag_get_hierarchical_parent (_tmp37_);
#line 2044 "/home/jens/Source/shotwell/src/Commands.vala"
				_g_object_unref0 (current_parent);
#line 2044 "/home/jens/Source/shotwell/src/Commands.vala"
				current_parent = _tmp38_;
#line 2036 "/home/jens/Source/shotwell/src/Commands.vala"
				_g_free0 (current_parent_path);
#line 18311 "Commands.c"
			}
#line 2034 "/home/jens/Source/shotwell/src/Commands.vala"
			_g_object_unref0 (current_parent);
#line 2034 "/home/jens/Source/shotwell/src/Commands.vala"
			_g_object_unref0 (source);
#line 18317 "Commands.c"
		}
#line 2034 "/home/jens/Source/shotwell/src/Commands.vala"
		_g_object_unref0 (_source_it);
#line 18321 "Commands.c"
	}
	{
		GeeIterator* _source_it = NULL;
		Tag* _tmp39_;
		GeeCollection* _tmp40_;
		GeeCollection* _tmp41_;
		GeeIterator* _tmp42_;
		GeeIterator* _tmp43_;
#line 2048 "/home/jens/Source/shotwell/src/Commands.vala"
		_tmp39_ = from_tag;
#line 2048 "/home/jens/Source/shotwell/src/Commands.vala"
		_tmp40_ = tag_get_sources (_tmp39_);
#line 2048 "/home/jens/Source/shotwell/src/Commands.vala"
		_tmp41_ = _tmp40_;
#line 2048 "/home/jens/Source/shotwell/src/Commands.vala"
		_tmp42_ = gee_iterable_iterator (G_TYPE_CHECK_INSTANCE_CAST (_tmp41_, GEE_TYPE_ITERABLE, GeeIterable));
#line 2048 "/home/jens/Source/shotwell/src/Commands.vala"
		_tmp43_ = _tmp42_;
#line 2048 "/home/jens/Source/shotwell/src/Commands.vala"
		_g_object_unref0 (_tmp41_);
#line 2048 "/home/jens/Source/shotwell/src/Commands.vala"
		_source_it = _tmp43_;
#line 2048 "/home/jens/Source/shotwell/src/Commands.vala"
		while (TRUE) {
#line 18346 "Commands.c"
			GeeIterator* _tmp44_;
			gboolean _tmp45_;
			MediaSource* source = NULL;
			GeeIterator* _tmp46_;
			gpointer _tmp47_;
			Tag* _tmp48_;
			MediaSource* _tmp49_;
#line 2048 "/home/jens/Source/shotwell/src/Commands.vala"
			_tmp44_ = _source_it;
#line 2048 "/home/jens/Source/shotwell/src/Commands.vala"
			_tmp45_ = gee_iterator_next (_tmp44_);
#line 2048 "/home/jens/Source/shotwell/src/Commands.vala"
			if (!_tmp45_) {
#line 2048 "/home/jens/Source/shotwell/src/Commands.vala"
				break;
#line 18362 "Commands.c"
			}
#line 2048 "/home/jens/Source/shotwell/src/Commands.vala"
			_tmp46_ = _source_it;
#line 2048 "/home/jens/Source/shotwell/src/Commands.vala"
			_tmp47_ = gee_iterator_get (_tmp46_);
#line 2048 "/home/jens/Source/shotwell/src/Commands.vala"
			source = (MediaSource*) _tmp47_;
#line 2049 "/home/jens/Source/shotwell/src/Commands.vala"
			_tmp48_ = to_tag;
#line 2049 "/home/jens/Source/shotwell/src/Commands.vala"
			_tmp49_ = source;
#line 2049 "/home/jens/Source/shotwell/src/Commands.vala"
			tag_attach (_tmp48_, _tmp49_);
#line 2048 "/home/jens/Source/shotwell/src/Commands.vala"
			_g_object_unref0 (source);
#line 18378 "Commands.c"
		}
#line 2048 "/home/jens/Source/shotwell/src/Commands.vala"
		_g_object_unref0 (_source_it);
#line 18382 "Commands.c"
	}
#line 2053 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp50_ = from_tag;
#line 2053 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp51_ = tag_get_hierarchical_children (_tmp50_);
#line 2053 "/home/jens/Source/shotwell/src/Commands.vala"
	from_children = _tmp51_;
#line 18390 "Commands.c"
	{
		gint i = 0;
		GeeList* _tmp52_;
		gint _tmp53_;
		gint _tmp54_;
#line 2054 "/home/jens/Source/shotwell/src/Commands.vala"
		_tmp52_ = from_children;
#line 2054 "/home/jens/Source/shotwell/src/Commands.vala"
		_tmp53_ = gee_collection_get_size (G_TYPE_CHECK_INSTANCE_CAST (_tmp52_, GEE_TYPE_COLLECTION, GeeCollection));
#line 2054 "/home/jens/Source/shotwell/src/Commands.vala"
		_tmp54_ = _tmp53_;
#line 2054 "/home/jens/Source/shotwell/src/Commands.vala"
		i = _tmp54_ - 1;
#line 18404 "Commands.c"
		{
			gboolean _tmp55_ = FALSE;
#line 2054 "/home/jens/Source/shotwell/src/Commands.vala"
			_tmp55_ = TRUE;
#line 2054 "/home/jens/Source/shotwell/src/Commands.vala"
			while (TRUE) {
#line 18411 "Commands.c"
				gint _tmp57_;
				Tag* from_child = NULL;
				GeeList* _tmp58_;
				gint _tmp59_;
				gpointer _tmp60_;
				gchar* child_subpath = NULL;
				Tag* _tmp61_;
				gchar* _tmp62_;
				gchar* _tmp63_;
				const gchar* _tmp64_;
				gchar* _tmp65_;
				gchar* _tmp66_;
				gchar* _tmp67_;
				gchar* _tmp68_;
				Tag* to_child = NULL;
				Tag* _tmp69_;
				gchar* _tmp70_;
				gchar* _tmp71_;
				gchar* _tmp72_;
				gchar* _tmp73_;
				const gchar* _tmp74_;
				gchar* _tmp75_;
				gchar* _tmp76_;
				Tag* _tmp77_;
				Tag* _tmp78_;
#line 2054 "/home/jens/Source/shotwell/src/Commands.vala"
				if (!_tmp55_) {
#line 18439 "Commands.c"
					gint _tmp56_;
#line 2054 "/home/jens/Source/shotwell/src/Commands.vala"
					_tmp56_ = i;
#line 2054 "/home/jens/Source/shotwell/src/Commands.vala"
					i = _tmp56_ - 1;
#line 18445 "Commands.c"
				}
#line 2054 "/home/jens/Source/shotwell/src/Commands.vala"
				_tmp55_ = FALSE;
#line 2054 "/home/jens/Source/shotwell/src/Commands.vala"
				_tmp57_ = i;
#line 2054 "/home/jens/Source/shotwell/src/Commands.vala"
				if (!(_tmp57_ >= 0)) {
#line 2054 "/home/jens/Source/shotwell/src/Commands.vala"
					break;
#line 18455 "Commands.c"
				}
#line 2055 "/home/jens/Source/shotwell/src/Commands.vala"
				_tmp58_ = from_children;
#line 2055 "/home/jens/Source/shotwell/src/Commands.vala"
				_tmp59_ = i;
#line 2055 "/home/jens/Source/shotwell/src/Commands.vala"
				_tmp60_ = gee_list_get (_tmp58_, _tmp59_);
#line 2055 "/home/jens/Source/shotwell/src/Commands.vala"
				from_child = (Tag*) _tmp60_;
#line 2057 "/home/jens/Source/shotwell/src/Commands.vala"
				_tmp61_ = from_child;
#line 2057 "/home/jens/Source/shotwell/src/Commands.vala"
				_tmp62_ = tag_get_path (_tmp61_);
#line 2057 "/home/jens/Source/shotwell/src/Commands.vala"
				_tmp63_ = _tmp62_;
#line 2057 "/home/jens/Source/shotwell/src/Commands.vala"
				_tmp64_ = from;
#line 2057 "/home/jens/Source/shotwell/src/Commands.vala"
				_tmp65_ = g_strconcat (_tmp64_, TAG_PATH_SEPARATOR_STRING, NULL);
#line 2057 "/home/jens/Source/shotwell/src/Commands.vala"
				_tmp66_ = _tmp65_;
#line 2057 "/home/jens/Source/shotwell/src/Commands.vala"
				_tmp67_ = string_replace (_tmp63_, _tmp66_, "");
#line 2057 "/home/jens/Source/shotwell/src/Commands.vala"
				_tmp68_ = _tmp67_;
#line 2057 "/home/jens/Source/shotwell/src/Commands.vala"
				_g_free0 (_tmp66_);
#line 2057 "/home/jens/Source/shotwell/src/Commands.vala"
				_g_free0 (_tmp63_);
#line 2057 "/home/jens/Source/shotwell/src/Commands.vala"
				child_subpath = _tmp68_;
#line 2060 "/home/jens/Source/shotwell/src/Commands.vala"
				_tmp69_ = to_tag;
#line 2060 "/home/jens/Source/shotwell/src/Commands.vala"
				_tmp70_ = tag_get_path (_tmp69_);
#line 2060 "/home/jens/Source/shotwell/src/Commands.vala"
				_tmp71_ = _tmp70_;
#line 2060 "/home/jens/Source/shotwell/src/Commands.vala"
				_tmp72_ = g_strconcat (_tmp71_, TAG_PATH_SEPARATOR_STRING, NULL);
#line 2060 "/home/jens/Source/shotwell/src/Commands.vala"
				_tmp73_ = _tmp72_;
#line 2060 "/home/jens/Source/shotwell/src/Commands.vala"
				_tmp74_ = child_subpath;
#line 2060 "/home/jens/Source/shotwell/src/Commands.vala"
				_tmp75_ = g_strconcat (_tmp73_, _tmp74_, NULL);
#line 2060 "/home/jens/Source/shotwell/src/Commands.vala"
				_tmp76_ = _tmp75_;
#line 2060 "/home/jens/Source/shotwell/src/Commands.vala"
				_tmp77_ = tag_for_path (_tmp76_);
#line 2060 "/home/jens/Source/shotwell/src/Commands.vala"
				_tmp78_ = _tmp77_;
#line 2060 "/home/jens/Source/shotwell/src/Commands.vala"
				_g_free0 (_tmp76_);
#line 2060 "/home/jens/Source/shotwell/src/Commands.vala"
				_g_free0 (_tmp73_);
#line 2060 "/home/jens/Source/shotwell/src/Commands.vala"
				_g_free0 (_tmp71_);
#line 2060 "/home/jens/Source/shotwell/src/Commands.vala"
				to_child = _tmp78_;
#line 18515 "Commands.c"
				{
					GeeIterator* _source_it = NULL;
					Tag* _tmp79_;
					GeeCollection* _tmp80_;
					GeeCollection* _tmp81_;
					GeeIterator* _tmp82_;
					GeeIterator* _tmp83_;
#line 2063 "/home/jens/Source/shotwell/src/Commands.vala"
					_tmp79_ = from_child;
#line 2063 "/home/jens/Source/shotwell/src/Commands.vala"
					_tmp80_ = tag_get_sources (_tmp79_);
#line 2063 "/home/jens/Source/shotwell/src/Commands.vala"
					_tmp81_ = _tmp80_;
#line 2063 "/home/jens/Source/shotwell/src/Commands.vala"
					_tmp82_ = gee_iterable_iterator (G_TYPE_CHECK_INSTANCE_CAST (_tmp81_, GEE_TYPE_ITERABLE, GeeIterable));
#line 2063 "/home/jens/Source/shotwell/src/Commands.vala"
					_tmp83_ = _tmp82_;
#line 2063 "/home/jens/Source/shotwell/src/Commands.vala"
					_g_object_unref0 (_tmp81_);
#line 2063 "/home/jens/Source/shotwell/src/Commands.vala"
					_source_it = _tmp83_;
#line 2063 "/home/jens/Source/shotwell/src/Commands.vala"
					while (TRUE) {
#line 18539 "Commands.c"
						GeeIterator* _tmp84_;
						gboolean _tmp85_;
						MediaSource* source = NULL;
						GeeIterator* _tmp86_;
						gpointer _tmp87_;
						Tag* _tmp88_;
						MediaSource* _tmp89_;
#line 2063 "/home/jens/Source/shotwell/src/Commands.vala"
						_tmp84_ = _source_it;
#line 2063 "/home/jens/Source/shotwell/src/Commands.vala"
						_tmp85_ = gee_iterator_next (_tmp84_);
#line 2063 "/home/jens/Source/shotwell/src/Commands.vala"
						if (!_tmp85_) {
#line 2063 "/home/jens/Source/shotwell/src/Commands.vala"
							break;
#line 18555 "Commands.c"
						}
#line 2063 "/home/jens/Source/shotwell/src/Commands.vala"
						_tmp86_ = _source_it;
#line 2063 "/home/jens/Source/shotwell/src/Commands.vala"
						_tmp87_ = gee_iterator_get (_tmp86_);
#line 2063 "/home/jens/Source/shotwell/src/Commands.vala"
						source = (MediaSource*) _tmp87_;
#line 2064 "/home/jens/Source/shotwell/src/Commands.vala"
						_tmp88_ = to_child;
#line 2064 "/home/jens/Source/shotwell/src/Commands.vala"
						_tmp89_ = source;
#line 2064 "/home/jens/Source/shotwell/src/Commands.vala"
						tag_attach (_tmp88_, _tmp89_);
#line 2063 "/home/jens/Source/shotwell/src/Commands.vala"
						_g_object_unref0 (source);
#line 18571 "Commands.c"
					}
#line 2063 "/home/jens/Source/shotwell/src/Commands.vala"
					_g_object_unref0 (_source_it);
#line 18575 "Commands.c"
				}
#line 2054 "/home/jens/Source/shotwell/src/Commands.vala"
				_g_object_unref0 (to_child);
#line 2054 "/home/jens/Source/shotwell/src/Commands.vala"
				_g_free0 (child_subpath);
#line 2054 "/home/jens/Source/shotwell/src/Commands.vala"
				_g_object_unref0 (from_child);
#line 18583 "Commands.c"
			}
		}
	}
#line 2024 "/home/jens/Source/shotwell/src/Commands.vala"
	_g_object_unref0 (from_children);
#line 2024 "/home/jens/Source/shotwell/src/Commands.vala"
	_g_object_unref0 (to_tag);
#line 2024 "/home/jens/Source/shotwell/src/Commands.vala"
	_g_object_unref0 (from_tag);
#line 18593 "Commands.c"
}


static void reparent_tag_command_destroy_subtree (ReparentTagCommand* self, const gchar* client_path) {
	gchar* victim_path = NULL;
	const gchar* _tmp0_;
	gchar* _tmp1_;
	const gchar* _tmp2_;
	TagSourceCollection* _tmp5_;
	const gchar* _tmp6_;
	gboolean _tmp7_;
	Tag* victim = NULL;
	const gchar* _tmp8_;
	Tag* _tmp9_;
	GeeList* victim_children = NULL;
	Tag* _tmp10_;
	GeeList* _tmp11_;
	TagSourceCollection* _tmp26_;
	TagSourceCollection* _tmp27_;
	Tag* _tmp28_;
	Marker* _tmp29_;
	Marker* _tmp30_;
#line 2068 "/home/jens/Source/shotwell/src/Commands.vala"
	g_return_if_fail (IS_REPARENT_TAG_COMMAND (self));
#line 2068 "/home/jens/Source/shotwell/src/Commands.vala"
	g_return_if_fail (client_path != NULL);
#line 2069 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp0_ = client_path;
#line 2069 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp1_ = hierarchical_tag_utilities_get_root_path_form (_tmp0_);
#line 2069 "/home/jens/Source/shotwell/src/Commands.vala"
	victim_path = _tmp1_;
#line 2070 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp2_ = victim_path;
#line 2070 "/home/jens/Source/shotwell/src/Commands.vala"
	if (_tmp2_ == NULL) {
#line 18630 "Commands.c"
		const gchar* _tmp3_;
		gchar* _tmp4_;
#line 2071 "/home/jens/Source/shotwell/src/Commands.vala"
		_tmp3_ = client_path;
#line 2071 "/home/jens/Source/shotwell/src/Commands.vala"
		_tmp4_ = g_strdup (_tmp3_);
#line 2071 "/home/jens/Source/shotwell/src/Commands.vala"
		_g_free0 (victim_path);
#line 2071 "/home/jens/Source/shotwell/src/Commands.vala"
		victim_path = _tmp4_;
#line 18641 "Commands.c"
	}
#line 2073 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp5_ = tag_global;
#line 2073 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp6_ = victim_path;
#line 2073 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp7_ = tag_source_collection_exists (_tmp5_, _tmp6_, FALSE);
#line 2073 "/home/jens/Source/shotwell/src/Commands.vala"
	if (!_tmp7_) {
#line 2074 "/home/jens/Source/shotwell/src/Commands.vala"
		_g_free0 (victim_path);
#line 2074 "/home/jens/Source/shotwell/src/Commands.vala"
		return;
#line 18655 "Commands.c"
	}
#line 2076 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp8_ = victim_path;
#line 2076 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp9_ = tag_for_path (_tmp8_);
#line 2076 "/home/jens/Source/shotwell/src/Commands.vala"
	victim = _tmp9_;
#line 2079 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp10_ = victim;
#line 2079 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp11_ = tag_get_hierarchical_children (_tmp10_);
#line 2079 "/home/jens/Source/shotwell/src/Commands.vala"
	victim_children = _tmp11_;
#line 18669 "Commands.c"
	{
		gint i = 0;
#line 2080 "/home/jens/Source/shotwell/src/Commands.vala"
		i = 0;
#line 18674 "Commands.c"
		{
			gboolean _tmp12_ = FALSE;
#line 2080 "/home/jens/Source/shotwell/src/Commands.vala"
			_tmp12_ = TRUE;
#line 2080 "/home/jens/Source/shotwell/src/Commands.vala"
			while (TRUE) {
#line 18681 "Commands.c"
				gint _tmp14_;
				GeeList* _tmp15_;
				gint _tmp16_;
				gint _tmp17_;
				TagSourceCollection* _tmp18_;
				TagSourceCollection* _tmp19_;
				GeeList* _tmp20_;
				gint _tmp21_;
				gpointer _tmp22_;
				Tag* _tmp23_;
				Marker* _tmp24_;
				Marker* _tmp25_;
#line 2080 "/home/jens/Source/shotwell/src/Commands.vala"
				if (!_tmp12_) {
#line 18696 "Commands.c"
					gint _tmp13_;
#line 2080 "/home/jens/Source/shotwell/src/Commands.vala"
					_tmp13_ = i;
#line 2080 "/home/jens/Source/shotwell/src/Commands.vala"
					i = _tmp13_ + 1;
#line 18702 "Commands.c"
				}
#line 2080 "/home/jens/Source/shotwell/src/Commands.vala"
				_tmp12_ = FALSE;
#line 2080 "/home/jens/Source/shotwell/src/Commands.vala"
				_tmp14_ = i;
#line 2080 "/home/jens/Source/shotwell/src/Commands.vala"
				_tmp15_ = victim_children;
#line 2080 "/home/jens/Source/shotwell/src/Commands.vala"
				_tmp16_ = gee_collection_get_size (G_TYPE_CHECK_INSTANCE_CAST (_tmp15_, GEE_TYPE_COLLECTION, GeeCollection));
#line 2080 "/home/jens/Source/shotwell/src/Commands.vala"
				_tmp17_ = _tmp16_;
#line 2080 "/home/jens/Source/shotwell/src/Commands.vala"
				if (!(_tmp14_ < _tmp17_)) {
#line 2080 "/home/jens/Source/shotwell/src/Commands.vala"
					break;
#line 18718 "Commands.c"
				}
#line 2081 "/home/jens/Source/shotwell/src/Commands.vala"
				_tmp18_ = tag_global;
#line 2081 "/home/jens/Source/shotwell/src/Commands.vala"
				_tmp19_ = tag_global;
#line 2081 "/home/jens/Source/shotwell/src/Commands.vala"
				_tmp20_ = victim_children;
#line 2081 "/home/jens/Source/shotwell/src/Commands.vala"
				_tmp21_ = i;
#line 2081 "/home/jens/Source/shotwell/src/Commands.vala"
				_tmp22_ = gee_list_get (_tmp20_, _tmp21_);
#line 2081 "/home/jens/Source/shotwell/src/Commands.vala"
				_tmp23_ = (Tag*) _tmp22_;
#line 2081 "/home/jens/Source/shotwell/src/Commands.vala"
				_tmp24_ = data_collection_mark (G_TYPE_CHECK_INSTANCE_CAST (_tmp19_, TYPE_DATA_COLLECTION, DataCollection), G_TYPE_CHECK_INSTANCE_CAST (_tmp23_, TYPE_DATA_OBJECT, DataObject));
#line 2081 "/home/jens/Source/shotwell/src/Commands.vala"
				_tmp25_ = _tmp24_;
#line 2081 "/home/jens/Source/shotwell/src/Commands.vala"
				source_collection_destroy_marked (G_TYPE_CHECK_INSTANCE_CAST (_tmp18_, TYPE_SOURCE_COLLECTION, SourceCollection), _tmp25_, TRUE, NULL, NULL, NULL);
#line 2081 "/home/jens/Source/shotwell/src/Commands.vala"
				_g_object_unref0 (_tmp25_);
#line 2081 "/home/jens/Source/shotwell/src/Commands.vala"
				_g_object_unref0 (_tmp23_);
#line 18742 "Commands.c"
			}
		}
	}
#line 2084 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp26_ = tag_global;
#line 2084 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp27_ = tag_global;
#line 2084 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp28_ = victim;
#line 2084 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp29_ = data_collection_mark (G_TYPE_CHECK_INSTANCE_CAST (_tmp27_, TYPE_DATA_COLLECTION, DataCollection), G_TYPE_CHECK_INSTANCE_CAST (_tmp28_, TYPE_DATA_OBJECT, DataObject));
#line 2084 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp30_ = _tmp29_;
#line 2084 "/home/jens/Source/shotwell/src/Commands.vala"
	source_collection_destroy_marked (G_TYPE_CHECK_INSTANCE_CAST (_tmp26_, TYPE_SOURCE_COLLECTION, SourceCollection), _tmp30_, TRUE, NULL, NULL, NULL);
#line 2084 "/home/jens/Source/shotwell/src/Commands.vala"
	_g_object_unref0 (_tmp30_);
#line 2068 "/home/jens/Source/shotwell/src/Commands.vala"
	_g_object_unref0 (victim_children);
#line 2068 "/home/jens/Source/shotwell/src/Commands.vala"
	_g_object_unref0 (victim);
#line 2068 "/home/jens/Source/shotwell/src/Commands.vala"
	_g_free0 (victim_path);
#line 18766 "Commands.c"
}


static void reparent_tag_command_real_execute (Command* base) {
	ReparentTagCommand * self;
	GeeList* _tmp0_;
#line 2087 "/home/jens/Source/shotwell/src/Commands.vala"
	self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_REPARENT_TAG_COMMAND, ReparentTagCommand);
#line 2088 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp0_ = self->priv->after_state;
#line 2088 "/home/jens/Source/shotwell/src/Commands.vala"
	if (_tmp0_ == NULL) {
#line 18779 "Commands.c"
		const gchar* _tmp1_;
		const gchar* _tmp2_;
		const gchar* _tmp3_;
		const gchar* _tmp4_;
#line 2089 "/home/jens/Source/shotwell/src/Commands.vala"
		reparent_tag_command_save_before_state (self);
#line 2091 "/home/jens/Source/shotwell/src/Commands.vala"
		_tmp1_ = self->priv->to_path;
#line 2091 "/home/jens/Source/shotwell/src/Commands.vala"
		reparent_tag_command_prepare_parent (self, _tmp1_);
#line 2093 "/home/jens/Source/shotwell/src/Commands.vala"
		_tmp2_ = self->priv->from_path;
#line 2093 "/home/jens/Source/shotwell/src/Commands.vala"
		_tmp3_ = self->priv->to_path;
#line 2093 "/home/jens/Source/shotwell/src/Commands.vala"
		reparent_tag_command_copy_subtree (self, _tmp2_, _tmp3_);
#line 2095 "/home/jens/Source/shotwell/src/Commands.vala"
		reparent_tag_command_save_after_state (self);
#line 2097 "/home/jens/Source/shotwell/src/Commands.vala"
		reparent_tag_command_do_source_parent_detachments (self);
#line 2099 "/home/jens/Source/shotwell/src/Commands.vala"
		_tmp4_ = self->priv->from_path;
#line 2099 "/home/jens/Source/shotwell/src/Commands.vala"
		reparent_tag_command_destroy_subtree (self, _tmp4_);
#line 18804 "Commands.c"
	} else {
		const gchar* _tmp5_;
		const gchar* _tmp6_;
		GeeMap* _tmp7_;
		const gchar* _tmp8_;
		const gchar* _tmp9_;
#line 2101 "/home/jens/Source/shotwell/src/Commands.vala"
		_tmp5_ = self->priv->to_path;
#line 2101 "/home/jens/Source/shotwell/src/Commands.vala"
		reparent_tag_command_prepare_parent (self, _tmp5_);
#line 2103 "/home/jens/Source/shotwell/src/Commands.vala"
		reparent_tag_command_restore_after_state (self);
#line 2105 "/home/jens/Source/shotwell/src/Commands.vala"
		_tmp6_ = self->priv->to_path;
#line 2105 "/home/jens/Source/shotwell/src/Commands.vala"
		_tmp7_ = self->priv->in_play_child_structure;
#line 2105 "/home/jens/Source/shotwell/src/Commands.vala"
		reparent_tag_command_restore_child_attachments_at (self, _tmp6_, _tmp7_);
#line 2106 "/home/jens/Source/shotwell/src/Commands.vala"
		_tmp8_ = self->priv->to_path;
#line 2106 "/home/jens/Source/shotwell/src/Commands.vala"
		reparent_tag_command_reattach_in_play_sources_at (self, _tmp8_);
#line 2108 "/home/jens/Source/shotwell/src/Commands.vala"
		reparent_tag_command_do_source_parent_detachments (self);
#line 2109 "/home/jens/Source/shotwell/src/Commands.vala"
		reparent_tag_command_do_destination_parent_reattachments (self);
#line 2111 "/home/jens/Source/shotwell/src/Commands.vala"
		_tmp9_ = self->priv->from_path;
#line 2111 "/home/jens/Source/shotwell/src/Commands.vala"
		reparent_tag_command_destroy_subtree (self, _tmp9_);
#line 18835 "Commands.c"
	}
}


static void reparent_tag_command_real_undo (Command* base) {
	ReparentTagCommand * self;
	GeeList* _tmp0_;
	const gchar* _tmp1_;
	gboolean _tmp2_;
	const gchar* _tmp4_;
	GeeMap* _tmp5_;
	const gchar* _tmp6_;
	const gchar* _tmp7_;
	const gchar* _tmp8_;
	const gchar* _tmp9_;
#line 2115 "/home/jens/Source/shotwell/src/Commands.vala"
	self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_REPARENT_TAG_COMMAND, ReparentTagCommand);
#line 2116 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp0_ = self->priv->src_before_state;
#line 2116 "/home/jens/Source/shotwell/src/Commands.vala"
	_vala_assert (_tmp0_ != NULL, "src_before_state != null");
#line 2118 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp1_ = self->priv->from_path;
#line 2118 "/home/jens/Source/shotwell/src/Commands.vala"
	reparent_tag_command_prepare_parent (self, _tmp1_);
#line 2120 "/home/jens/Source/shotwell/src/Commands.vala"
	reparent_tag_command_restore_before_state (self);
#line 2122 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp2_ = self->priv->to_path_exists;
#line 2122 "/home/jens/Source/shotwell/src/Commands.vala"
	if (!_tmp2_) {
#line 18867 "Commands.c"
		const gchar* _tmp3_;
#line 2123 "/home/jens/Source/shotwell/src/Commands.vala"
		_tmp3_ = self->priv->to_path;
#line 2123 "/home/jens/Source/shotwell/src/Commands.vala"
		reparent_tag_command_destroy_subtree (self, _tmp3_);
#line 18873 "Commands.c"
	}
#line 2125 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp4_ = self->priv->from_path;
#line 2125 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp5_ = self->priv->in_play_child_structure;
#line 2125 "/home/jens/Source/shotwell/src/Commands.vala"
	reparent_tag_command_restore_child_attachments_at (self, _tmp4_, _tmp5_);
#line 2126 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp6_ = self->priv->from_path;
#line 2126 "/home/jens/Source/shotwell/src/Commands.vala"
	reparent_tag_command_reattach_in_play_sources_at (self, _tmp6_);
#line 2128 "/home/jens/Source/shotwell/src/Commands.vala"
	reparent_tag_command_do_source_parent_reattachments (self);
#line 2129 "/home/jens/Source/shotwell/src/Commands.vala"
	reparent_tag_command_do_destination_parent_detachments (self);
#line 2131 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp7_ = self->priv->to_path;
#line 2131 "/home/jens/Source/shotwell/src/Commands.vala"
	hierarchical_tag_utilities_cleanup_root_path (_tmp7_);
#line 2132 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp8_ = self->priv->from_path;
#line 2132 "/home/jens/Source/shotwell/src/Commands.vala"
	hierarchical_tag_utilities_cleanup_root_path (_tmp8_);
#line 2133 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp9_ = self->priv->to_path_parent_path;
#line 2133 "/home/jens/Source/shotwell/src/Commands.vala"
	if (_tmp9_ != NULL) {
#line 18901 "Commands.c"
		const gchar* _tmp10_;
#line 2134 "/home/jens/Source/shotwell/src/Commands.vala"
		_tmp10_ = self->priv->to_path_parent_path;
#line 2134 "/home/jens/Source/shotwell/src/Commands.vala"
		hierarchical_tag_utilities_cleanup_root_path (_tmp10_);
#line 18907 "Commands.c"
	}
}


static void reparent_tag_command_class_init (ReparentTagCommandClass * klass) {
#line 1679 "/home/jens/Source/shotwell/src/Commands.vala"
	reparent_tag_command_parent_class = g_type_class_peek_parent (klass);
#line 1679 "/home/jens/Source/shotwell/src/Commands.vala"
	g_type_class_add_private (klass, sizeof (ReparentTagCommandPrivate));
#line 1679 "/home/jens/Source/shotwell/src/Commands.vala"
	((CommandClass *) klass)->execute = (void (*) (Command *)) reparent_tag_command_real_execute;
#line 1679 "/home/jens/Source/shotwell/src/Commands.vala"
	((CommandClass *) klass)->undo = (void (*) (Command *)) reparent_tag_command_real_undo;
#line 1679 "/home/jens/Source/shotwell/src/Commands.vala"
	G_OBJECT_CLASS (klass)->finalize = reparent_tag_command_finalize;
#line 18923 "Commands.c"
}


static void reparent_tag_command_instance_init (ReparentTagCommand * self) {
	GeeHashSet* _tmp0_;
#line 1679 "/home/jens/Source/shotwell/src/Commands.vala"
	self->priv = REPARENT_TAG_COMMAND_GET_PRIVATE (self);
#line 1683 "/home/jens/Source/shotwell/src/Commands.vala"
	self->priv->src_before_state = NULL;
#line 1684 "/home/jens/Source/shotwell/src/Commands.vala"
	self->priv->dest_before_state = NULL;
#line 1685 "/home/jens/Source/shotwell/src/Commands.vala"
	self->priv->after_state = NULL;
#line 1686 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp0_ = gee_hash_set_new (TYPE_MEDIA_SOURCE, (GBoxedCopyFunc) g_object_ref, (GDestroyNotify) g_object_unref, NULL, NULL, NULL, NULL, NULL, NULL);
#line 1686 "/home/jens/Source/shotwell/src/Commands.vala"
	self->priv->sources_in_play = _tmp0_;
#line 1687 "/home/jens/Source/shotwell/src/Commands.vala"
	self->priv->dest_parent_attachments = NULL;
#line 1688 "/home/jens/Source/shotwell/src/Commands.vala"
	self->priv->src_parent_detachments = NULL;
#line 1689 "/home/jens/Source/shotwell/src/Commands.vala"
	self->priv->in_play_child_structure = NULL;
#line 1690 "/home/jens/Source/shotwell/src/Commands.vala"
	self->priv->existing_dest_child_structure = NULL;
#line 1691 "/home/jens/Source/shotwell/src/Commands.vala"
	self->priv->existing_dest_membership = NULL;
#line 1692 "/home/jens/Source/shotwell/src/Commands.vala"
	self->priv->to_path_exists = FALSE;
#line 18953 "Commands.c"
}


static void reparent_tag_command_finalize (GObject * obj) {
	ReparentTagCommand * self;
	LibraryPhotoSourceCollection* _tmp0_;
	guint _tmp1_;
	VideoSourceCollection* _tmp2_;
	guint _tmp3_;
#line 1679 "/home/jens/Source/shotwell/src/Commands.vala"
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, TYPE_REPARENT_TAG_COMMAND, ReparentTagCommand);
#line 1724 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp0_ = library_photo_global;
#line 1724 "/home/jens/Source/shotwell/src/Commands.vala"
	g_signal_parse_name ("items-destroyed", TYPE_SOURCE_COLLECTION, &_tmp1_, NULL, FALSE);
#line 1724 "/home/jens/Source/shotwell/src/Commands.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) _reparent_tag_command_on_items_destroyed_source_collection_items_destroyed, self);
#line 1725 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp2_ = video_global;
#line 1725 "/home/jens/Source/shotwell/src/Commands.vala"
	g_signal_parse_name ("items-destroyed", TYPE_SOURCE_COLLECTION, &_tmp3_, NULL, FALSE);
#line 1725 "/home/jens/Source/shotwell/src/Commands.vala"
	g_signal_handlers_disconnect_matched (G_TYPE_CHECK_INSTANCE_CAST (_tmp2_, TYPE_SOURCE_COLLECTION, SourceCollection), G_SIGNAL_MATCH_ID | G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA, _tmp3_, 0, NULL, (GCallback) _reparent_tag_command_on_items_destroyed_source_collection_items_destroyed, self);
#line 1680 "/home/jens/Source/shotwell/src/Commands.vala"
	_g_free0 (self->priv->from_path);
#line 1681 "/home/jens/Source/shotwell/src/Commands.vala"
	_g_free0 (self->priv->to_path);
#line 1682 "/home/jens/Source/shotwell/src/Commands.vala"
	_g_free0 (self->priv->to_path_parent_path);
#line 1683 "/home/jens/Source/shotwell/src/Commands.vala"
	_g_object_unref0 (self->priv->src_before_state);
#line 1684 "/home/jens/Source/shotwell/src/Commands.vala"
	_g_object_unref0 (self->priv->dest_before_state);
#line 1685 "/home/jens/Source/shotwell/src/Commands.vala"
	_g_object_unref0 (self->priv->after_state);
#line 1686 "/home/jens/Source/shotwell/src/Commands.vala"
	_g_object_unref0 (self->priv->sources_in_play);
#line 1687 "/home/jens/Source/shotwell/src/Commands.vala"
	_g_object_unref0 (self->priv->dest_parent_attachments);
#line 1688 "/home/jens/Source/shotwell/src/Commands.vala"
	_g_object_unref0 (self->priv->src_parent_detachments);
#line 1689 "/home/jens/Source/shotwell/src/Commands.vala"
	_g_object_unref0 (self->priv->in_play_child_structure);
#line 1690 "/home/jens/Source/shotwell/src/Commands.vala"
	_g_object_unref0 (self->priv->existing_dest_child_structure);
#line 1691 "/home/jens/Source/shotwell/src/Commands.vala"
	_g_object_unref0 (self->priv->existing_dest_membership);
#line 1679 "/home/jens/Source/shotwell/src/Commands.vala"
	G_OBJECT_CLASS (reparent_tag_command_parent_class)->finalize (obj);
#line 19003 "Commands.c"
}


GType reparent_tag_command_get_type (void) {
	static volatile gsize reparent_tag_command_type_id__volatile = 0;
	if (g_once_init_enter (&reparent_tag_command_type_id__volatile)) {
		static const GTypeInfo g_define_type_info = { sizeof (ReparentTagCommandClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) reparent_tag_command_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (ReparentTagCommand), 0, (GInstanceInitFunc) reparent_tag_command_instance_init, NULL };
		GType reparent_tag_command_type_id;
		reparent_tag_command_type_id = g_type_register_static (TYPE_PAGE_COMMAND, "ReparentTagCommand", &g_define_type_info, 0);
		g_once_init_leave (&reparent_tag_command_type_id__volatile, reparent_tag_command_type_id);
	}
	return reparent_tag_command_type_id__volatile;
}


static void _modify_tags_command_on_proxy_broken_source_proxy_broken (SourceProxy* _sender, gpointer self) {
#line 2179 "/home/jens/Source/shotwell/src/Commands.vala"
	modify_tags_command_on_proxy_broken ((ModifyTagsCommand*) self);
#line 19022 "Commands.c"
}


ModifyTagsCommand* modify_tags_command_construct (GType object_type, MediaSource* media, GeeCollection* new_tag_list) {
	ModifyTagsCommand * self = NULL;
	MediaSource* _tmp0_;
	MediaSource* _tmp1_;
	MediaSource* _tmp2_;
	GeeList* original_tags = NULL;
	TagSourceCollection* _tmp3_;
	MediaSource* _tmp4_;
	GeeList* _tmp5_;
	GeeList* _tmp6_;
	GeeSortedSet* new_paths = NULL;
	GeeTreeSet* _tmp23_;
#line 2143 "/home/jens/Source/shotwell/src/Commands.vala"
	g_return_val_if_fail (IS_MEDIA_SOURCE (media), NULL);
#line 2143 "/home/jens/Source/shotwell/src/Commands.vala"
	g_return_val_if_fail (GEE_IS_COLLECTION (new_tag_list), NULL);
#line 2144 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp0_ = media;
#line 2144 "/home/jens/Source/shotwell/src/Commands.vala"
	self = (ModifyTagsCommand*) single_data_source_command_construct (object_type, G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, TYPE_DATA_SOURCE, DataSource), RESOURCES_MODIFY_TAGS_LABEL, "");
#line 2146 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp1_ = media;
#line 2146 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp2_ = _g_object_ref0 (_tmp1_);
#line 2146 "/home/jens/Source/shotwell/src/Commands.vala"
	_g_object_unref0 (self->priv->media);
#line 2146 "/home/jens/Source/shotwell/src/Commands.vala"
	self->priv->media = _tmp2_;
#line 2149 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp3_ = tag_global;
#line 2149 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp4_ = media;
#line 2149 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp5_ = tag_source_collection_fetch_for_source (_tmp3_, _tmp4_);
#line 2149 "/home/jens/Source/shotwell/src/Commands.vala"
	original_tags = _tmp5_;
#line 2150 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp6_ = original_tags;
#line 2150 "/home/jens/Source/shotwell/src/Commands.vala"
	if (_tmp6_ != NULL) {
#line 19066 "Commands.c"
		{
			GeeList* _tag_list = NULL;
			GeeList* _tmp7_;
			GeeList* _tmp8_;
			gint _tag_size = 0;
			GeeList* _tmp9_;
			gint _tmp10_;
			gint _tmp11_;
			gint _tag_index = 0;
#line 2151 "/home/jens/Source/shotwell/src/Commands.vala"
			_tmp7_ = original_tags;
#line 2151 "/home/jens/Source/shotwell/src/Commands.vala"
			_tmp8_ = _g_object_ref0 (_tmp7_);
#line 2151 "/home/jens/Source/shotwell/src/Commands.vala"
			_tag_list = _tmp8_;
#line 2151 "/home/jens/Source/shotwell/src/Commands.vala"
			_tmp9_ = _tag_list;
#line 2151 "/home/jens/Source/shotwell/src/Commands.vala"
			_tmp10_ = gee_collection_get_size (G_TYPE_CHECK_INSTANCE_CAST (_tmp9_, GEE_TYPE_COLLECTION, GeeCollection));
#line 2151 "/home/jens/Source/shotwell/src/Commands.vala"
			_tmp11_ = _tmp10_;
#line 2151 "/home/jens/Source/shotwell/src/Commands.vala"
			_tag_size = _tmp11_;
#line 2151 "/home/jens/Source/shotwell/src/Commands.vala"
			_tag_index = -1;
#line 2151 "/home/jens/Source/shotwell/src/Commands.vala"
			while (TRUE) {
#line 19094 "Commands.c"
				gint _tmp12_;
				gint _tmp13_;
				gint _tmp14_;
				Tag* tag = NULL;
				GeeList* _tmp15_;
				gint _tmp16_;
				gpointer _tmp17_;
				SourceProxy* proxy = NULL;
				Tag* _tmp18_;
				SourceProxy* _tmp19_;
				GeeArrayList* _tmp20_;
				SourceProxy* _tmp21_;
				SourceProxy* _tmp22_;
#line 2151 "/home/jens/Source/shotwell/src/Commands.vala"
				_tmp12_ = _tag_index;
#line 2151 "/home/jens/Source/shotwell/src/Commands.vala"
				_tag_index = _tmp12_ + 1;
#line 2151 "/home/jens/Source/shotwell/src/Commands.vala"
				_tmp13_ = _tag_index;
#line 2151 "/home/jens/Source/shotwell/src/Commands.vala"
				_tmp14_ = _tag_size;
#line 2151 "/home/jens/Source/shotwell/src/Commands.vala"
				if (!(_tmp13_ < _tmp14_)) {
#line 2151 "/home/jens/Source/shotwell/src/Commands.vala"
					break;
#line 19120 "Commands.c"
				}
#line 2151 "/home/jens/Source/shotwell/src/Commands.vala"
				_tmp15_ = _tag_list;
#line 2151 "/home/jens/Source/shotwell/src/Commands.vala"
				_tmp16_ = _tag_index;
#line 2151 "/home/jens/Source/shotwell/src/Commands.vala"
				_tmp17_ = gee_list_get (_tmp15_, _tmp16_);
#line 2151 "/home/jens/Source/shotwell/src/Commands.vala"
				tag = (Tag*) _tmp17_;
#line 2152 "/home/jens/Source/shotwell/src/Commands.vala"
				_tmp18_ = tag;
#line 2152 "/home/jens/Source/shotwell/src/Commands.vala"
				_tmp19_ = proxyable_get_proxy (G_TYPE_CHECK_INSTANCE_CAST (_tmp18_, TYPE_PROXYABLE, Proxyable));
#line 2152 "/home/jens/Source/shotwell/src/Commands.vala"
				proxy = _tmp19_;
#line 2153 "/home/jens/Source/shotwell/src/Commands.vala"
				_tmp20_ = self->priv->to_remove;
#line 2153 "/home/jens/Source/shotwell/src/Commands.vala"
				_tmp21_ = proxy;
#line 2153 "/home/jens/Source/shotwell/src/Commands.vala"
				gee_abstract_collection_add (G_TYPE_CHECK_INSTANCE_CAST (_tmp20_, GEE_TYPE_ABSTRACT_COLLECTION, GeeAbstractCollection), _tmp21_);
#line 2154 "/home/jens/Source/shotwell/src/Commands.vala"
				_tmp22_ = proxy;
#line 2154 "/home/jens/Source/shotwell/src/Commands.vala"
				g_signal_connect_object (_tmp22_, "broken", (GCallback) _modify_tags_command_on_proxy_broken_source_proxy_broken, self, 0);
#line 2151 "/home/jens/Source/shotwell/src/Commands.vala"
				_source_proxy_unref0 (proxy);
#line 2151 "/home/jens/Source/shotwell/src/Commands.vala"
				_g_object_unref0 (tag);
#line 19150 "Commands.c"
			}
#line 2151 "/home/jens/Source/shotwell/src/Commands.vala"
			_g_object_unref0 (_tag_list);
#line 19154 "Commands.c"
		}
	}
#line 2160 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp23_ = gee_tree_set_new (G_TYPE_STRING, (GBoxedCopyFunc) g_strdup, (GDestroyNotify) g_free, NULL, NULL, NULL);
#line 2160 "/home/jens/Source/shotwell/src/Commands.vala"
	new_paths = G_TYPE_CHECK_INSTANCE_CAST (_tmp23_, GEE_TYPE_SORTED_SET, GeeSortedSet);
#line 19161 "Commands.c"
	{
		GeeIterator* _new_tag_it = NULL;
		GeeCollection* _tmp24_;
		GeeIterator* _tmp25_;
#line 2161 "/home/jens/Source/shotwell/src/Commands.vala"
		_tmp24_ = new_tag_list;
#line 2161 "/home/jens/Source/shotwell/src/Commands.vala"
		_tmp25_ = gee_iterable_iterator (G_TYPE_CHECK_INSTANCE_CAST (_tmp24_, GEE_TYPE_ITERABLE, GeeIterable));
#line 2161 "/home/jens/Source/shotwell/src/Commands.vala"
		_new_tag_it = _tmp25_;
#line 2161 "/home/jens/Source/shotwell/src/Commands.vala"
		while (TRUE) {
#line 19174 "Commands.c"
			GeeIterator* _tmp26_;
			gboolean _tmp27_;
			Tag* new_tag = NULL;
			GeeIterator* _tmp28_;
			gpointer _tmp29_;
			gchar* new_tag_path = NULL;
			Tag* _tmp30_;
			gchar* _tmp31_;
			GeeSortedSet* _tmp32_;
			const gchar* _tmp33_;
			GeeSortedSet* _tmp34_;
			const gchar* _tmp35_;
			GeeList* _tmp36_;
			GeeList* _tmp37_;
#line 2161 "/home/jens/Source/shotwell/src/Commands.vala"
			_tmp26_ = _new_tag_it;
#line 2161 "/home/jens/Source/shotwell/src/Commands.vala"
			_tmp27_ = gee_iterator_next (_tmp26_);
#line 2161 "/home/jens/Source/shotwell/src/Commands.vala"
			if (!_tmp27_) {
#line 2161 "/home/jens/Source/shotwell/src/Commands.vala"
				break;
#line 19197 "Commands.c"
			}
#line 2161 "/home/jens/Source/shotwell/src/Commands.vala"
			_tmp28_ = _new_tag_it;
#line 2161 "/home/jens/Source/shotwell/src/Commands.vala"
			_tmp29_ = gee_iterator_get (_tmp28_);
#line 2161 "/home/jens/Source/shotwell/src/Commands.vala"
			new_tag = (Tag*) _tmp29_;
#line 2162 "/home/jens/Source/shotwell/src/Commands.vala"
			_tmp30_ = new_tag;
#line 2162 "/home/jens/Source/shotwell/src/Commands.vala"
			_tmp31_ = tag_get_path (_tmp30_);
#line 2162 "/home/jens/Source/shotwell/src/Commands.vala"
			new_tag_path = _tmp31_;
#line 2164 "/home/jens/Source/shotwell/src/Commands.vala"
			_tmp32_ = new_paths;
#line 2164 "/home/jens/Source/shotwell/src/Commands.vala"
			_tmp33_ = new_tag_path;
#line 2164 "/home/jens/Source/shotwell/src/Commands.vala"
			gee_collection_add (G_TYPE_CHECK_INSTANCE_CAST (_tmp32_, GEE_TYPE_COLLECTION, GeeCollection), _tmp33_);
#line 2165 "/home/jens/Source/shotwell/src/Commands.vala"
			_tmp34_ = new_paths;
#line 2165 "/home/jens/Source/shotwell/src/Commands.vala"
			_tmp35_ = new_tag_path;
#line 2165 "/home/jens/Source/shotwell/src/Commands.vala"
			_tmp36_ = hierarchical_tag_utilities_enumerate_parent_paths (_tmp35_);
#line 2165 "/home/jens/Source/shotwell/src/Commands.vala"
			_tmp37_ = _tmp36_;
#line 2165 "/home/jens/Source/shotwell/src/Commands.vala"
			gee_collection_add_all (G_TYPE_CHECK_INSTANCE_CAST (_tmp34_, GEE_TYPE_COLLECTION, GeeCollection), G_TYPE_CHECK_INSTANCE_CAST (_tmp37_, GEE_TYPE_COLLECTION, GeeCollection));
#line 2165 "/home/jens/Source/shotwell/src/Commands.vala"
			_g_object_unref0 (_tmp37_);
#line 2161 "/home/jens/Source/shotwell/src/Commands.vala"
			_g_free0 (new_tag_path);
#line 2161 "/home/jens/Source/shotwell/src/Commands.vala"
			_g_object_unref0 (new_tag);
#line 19233 "Commands.c"
		}
#line 2161 "/home/jens/Source/shotwell/src/Commands.vala"
		_g_object_unref0 (_new_tag_it);
#line 19237 "Commands.c"
	}
	{
		GeeIterator* _path_it = NULL;
		GeeSortedSet* _tmp38_;
		GeeIterator* _tmp39_;
#line 2168 "/home/jens/Source/shotwell/src/Commands.vala"
		_tmp38_ = new_paths;
#line 2168 "/home/jens/Source/shotwell/src/Commands.vala"
		_tmp39_ = gee_iterable_iterator (G_TYPE_CHECK_INSTANCE_CAST (_tmp38_, GEE_TYPE_ITERABLE, GeeIterable));
#line 2168 "/home/jens/Source/shotwell/src/Commands.vala"
		_path_it = _tmp39_;
#line 2168 "/home/jens/Source/shotwell/src/Commands.vala"
		while (TRUE) {
#line 19251 "Commands.c"
			GeeIterator* _tmp40_;
			gboolean _tmp41_;
			gchar* path = NULL;
			GeeIterator* _tmp42_;
			gpointer _tmp43_;
			TagSourceCollection* _tmp44_;
			const gchar* _tmp45_;
			gboolean _tmp46_;
			SourceProxy* proxy = NULL;
			const gchar* _tmp47_;
			Tag* _tmp48_;
			Tag* _tmp49_;
			SourceProxy* _tmp50_;
			SourceProxy* _tmp51_;
			GeeArrayList* _tmp52_;
			SourceProxy* _tmp53_;
			SourceProxy* _tmp54_;
#line 2168 "/home/jens/Source/shotwell/src/Commands.vala"
			_tmp40_ = _path_it;
#line 2168 "/home/jens/Source/shotwell/src/Commands.vala"
			_tmp41_ = gee_iterator_next (_tmp40_);
#line 2168 "/home/jens/Source/shotwell/src/Commands.vala"
			if (!_tmp41_) {
#line 2168 "/home/jens/Source/shotwell/src/Commands.vala"
				break;
#line 19277 "Commands.c"
			}
#line 2168 "/home/jens/Source/shotwell/src/Commands.vala"
			_tmp42_ = _path_it;
#line 2168 "/home/jens/Source/shotwell/src/Commands.vala"
			_tmp43_ = gee_iterator_get (_tmp42_);
#line 2168 "/home/jens/Source/shotwell/src/Commands.vala"
			path = (gchar*) _tmp43_;
#line 2169 "/home/jens/Source/shotwell/src/Commands.vala"
			_tmp44_ = tag_global;
#line 2169 "/home/jens/Source/shotwell/src/Commands.vala"
			_tmp45_ = path;
#line 2169 "/home/jens/Source/shotwell/src/Commands.vala"
			_tmp46_ = tag_source_collection_exists (_tmp44_, _tmp45_, FALSE);
#line 2169 "/home/jens/Source/shotwell/src/Commands.vala"
			_vala_assert (_tmp46_, "Tag.global.exists(path)");
#line 2171 "/home/jens/Source/shotwell/src/Commands.vala"
			_tmp47_ = path;
#line 2171 "/home/jens/Source/shotwell/src/Commands.vala"
			_tmp48_ = tag_for_path (_tmp47_);
#line 2171 "/home/jens/Source/shotwell/src/Commands.vala"
			_tmp49_ = _tmp48_;
#line 2171 "/home/jens/Source/shotwell/src/Commands.vala"
			_tmp50_ = proxyable_get_proxy (G_TYPE_CHECK_INSTANCE_CAST (_tmp49_, TYPE_PROXYABLE, Proxyable));
#line 2171 "/home/jens/Source/shotwell/src/Commands.vala"
			_tmp51_ = _tmp50_;
#line 2171 "/home/jens/Source/shotwell/src/Commands.vala"
			_g_object_unref0 (_tmp49_);
#line 2171 "/home/jens/Source/shotwell/src/Commands.vala"
			proxy = _tmp51_;
#line 2172 "/home/jens/Source/shotwell/src/Commands.vala"
			_tmp52_ = self->priv->to_add;
#line 2172 "/home/jens/Source/shotwell/src/Commands.vala"
			_tmp53_ = proxy;
#line 2172 "/home/jens/Source/shotwell/src/Commands.vala"
			gee_abstract_collection_add (G_TYPE_CHECK_INSTANCE_CAST (_tmp52_, GEE_TYPE_ABSTRACT_COLLECTION, GeeAbstractCollection), _tmp53_);
#line 2173 "/home/jens/Source/shotwell/src/Commands.vala"
			_tmp54_ = proxy;
#line 2173 "/home/jens/Source/shotwell/src/Commands.vala"
			g_signal_connect_object (_tmp54_, "broken", (GCallback) _modify_tags_command_on_proxy_broken_source_proxy_broken, self, 0);
#line 2168 "/home/jens/Source/shotwell/src/Commands.vala"
			_source_proxy_unref0 (proxy);
#line 2168 "/home/jens/Source/shotwell/src/Commands.vala"
			_g_free0 (path);
#line 19321 "Commands.c"
		}
#line 2168 "/home/jens/Source/shotwell/src/Commands.vala"
		_g_object_unref0 (_path_it);
#line 19325 "Commands.c"
	}
#line 2143 "/home/jens/Source/shotwell/src/Commands.vala"
	_g_object_unref0 (new_paths);
#line 2143 "/home/jens/Source/shotwell/src/Commands.vala"
	_g_object_unref0 (original_tags);
#line 2143 "/home/jens/Source/shotwell/src/Commands.vala"
	return self;
#line 19333 "Commands.c"
}


ModifyTagsCommand* modify_tags_command_new (MediaSource* media, GeeCollection* new_tag_list) {
#line 2143 "/home/jens/Source/shotwell/src/Commands.vala"
	return modify_tags_command_construct (TYPE_MODIFY_TAGS_COMMAND, media, new_tag_list);
#line 19340 "Commands.c"
}


static void modify_tags_command_real_execute (Command* base) {
	ModifyTagsCommand * self;
#line 2185 "/home/jens/Source/shotwell/src/Commands.vala"
	self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_MODIFY_TAGS_COMMAND, ModifyTagsCommand);
#line 19348 "Commands.c"
	{
		GeeArrayList* _proxy_list = NULL;
		GeeArrayList* _tmp0_;
		GeeArrayList* _tmp1_;
		gint _proxy_size = 0;
		GeeArrayList* _tmp2_;
		gint _tmp3_;
		gint _tmp4_;
		gint _proxy_index = 0;
#line 2186 "/home/jens/Source/shotwell/src/Commands.vala"
		_tmp0_ = self->priv->to_remove;
#line 2186 "/home/jens/Source/shotwell/src/Commands.vala"
		_tmp1_ = _g_object_ref0 (_tmp0_);
#line 2186 "/home/jens/Source/shotwell/src/Commands.vala"
		_proxy_list = _tmp1_;
#line 2186 "/home/jens/Source/shotwell/src/Commands.vala"
		_tmp2_ = _proxy_list;
#line 2186 "/home/jens/Source/shotwell/src/Commands.vala"
		_tmp3_ = gee_abstract_collection_get_size (G_TYPE_CHECK_INSTANCE_CAST (_tmp2_, GEE_TYPE_ABSTRACT_COLLECTION, GeeAbstractCollection));
#line 2186 "/home/jens/Source/shotwell/src/Commands.vala"
		_tmp4_ = _tmp3_;
#line 2186 "/home/jens/Source/shotwell/src/Commands.vala"
		_proxy_size = _tmp4_;
#line 2186 "/home/jens/Source/shotwell/src/Commands.vala"
		_proxy_index = -1;
#line 2186 "/home/jens/Source/shotwell/src/Commands.vala"
		while (TRUE) {
#line 19376 "Commands.c"
			gint _tmp5_;
			gint _tmp6_;
			gint _tmp7_;
			SourceProxy* proxy = NULL;
			GeeArrayList* _tmp8_;
			gint _tmp9_;
			gpointer _tmp10_;
			SourceProxy* _tmp11_;
			DataSource* _tmp12_;
			Tag* _tmp13_;
			MediaSource* _tmp14_;
			GeeList* _tmp15_;
			GeeList* _tmp16_;
#line 2186 "/home/jens/Source/shotwell/src/Commands.vala"
			_tmp5_ = _proxy_index;
#line 2186 "/home/jens/Source/shotwell/src/Commands.vala"
			_proxy_index = _tmp5_ + 1;
#line 2186 "/home/jens/Source/shotwell/src/Commands.vala"
			_tmp6_ = _proxy_index;
#line 2186 "/home/jens/Source/shotwell/src/Commands.vala"
			_tmp7_ = _proxy_size;
#line 2186 "/home/jens/Source/shotwell/src/Commands.vala"
			if (!(_tmp6_ < _tmp7_)) {
#line 2186 "/home/jens/Source/shotwell/src/Commands.vala"
				break;
#line 19402 "Commands.c"
			}
#line 2186 "/home/jens/Source/shotwell/src/Commands.vala"
			_tmp8_ = _proxy_list;
#line 2186 "/home/jens/Source/shotwell/src/Commands.vala"
			_tmp9_ = _proxy_index;
#line 2186 "/home/jens/Source/shotwell/src/Commands.vala"
			_tmp10_ = gee_abstract_list_get (G_TYPE_CHECK_INSTANCE_CAST (_tmp8_, GEE_TYPE_ABSTRACT_LIST, GeeAbstractList), _tmp9_);
#line 2186 "/home/jens/Source/shotwell/src/Commands.vala"
			proxy = (SourceProxy*) _tmp10_;
#line 2187 "/home/jens/Source/shotwell/src/Commands.vala"
			_tmp11_ = proxy;
#line 2187 "/home/jens/Source/shotwell/src/Commands.vala"
			_tmp12_ = source_proxy_get_source (_tmp11_);
#line 2187 "/home/jens/Source/shotwell/src/Commands.vala"
			_tmp13_ = G_TYPE_CHECK_INSTANCE_CAST (_tmp12_, TYPE_TAG, Tag);
#line 2187 "/home/jens/Source/shotwell/src/Commands.vala"
			_tmp14_ = self->priv->media;
#line 2187 "/home/jens/Source/shotwell/src/Commands.vala"
			_tmp15_ = tag_detach (_tmp13_, _tmp14_);
#line 2187 "/home/jens/Source/shotwell/src/Commands.vala"
			_tmp16_ = _tmp15_;
#line 2187 "/home/jens/Source/shotwell/src/Commands.vala"
			_g_object_unref0 (_tmp16_);
#line 2187 "/home/jens/Source/shotwell/src/Commands.vala"
			_g_object_unref0 (_tmp13_);
#line 2186 "/home/jens/Source/shotwell/src/Commands.vala"
			_source_proxy_unref0 (proxy);
#line 19430 "Commands.c"
		}
#line 2186 "/home/jens/Source/shotwell/src/Commands.vala"
		_g_object_unref0 (_proxy_list);
#line 19434 "Commands.c"
	}
	{
		GeeArrayList* _proxy_list = NULL;
		GeeArrayList* _tmp17_;
		GeeArrayList* _tmp18_;
		gint _proxy_size = 0;
		GeeArrayList* _tmp19_;
		gint _tmp20_;
		gint _tmp21_;
		gint _proxy_index = 0;
#line 2189 "/home/jens/Source/shotwell/src/Commands.vala"
		_tmp17_ = self->priv->to_add;
#line 2189 "/home/jens/Source/shotwell/src/Commands.vala"
		_tmp18_ = _g_object_ref0 (_tmp17_);
#line 2189 "/home/jens/Source/shotwell/src/Commands.vala"
		_proxy_list = _tmp18_;
#line 2189 "/home/jens/Source/shotwell/src/Commands.vala"
		_tmp19_ = _proxy_list;
#line 2189 "/home/jens/Source/shotwell/src/Commands.vala"
		_tmp20_ = gee_abstract_collection_get_size (G_TYPE_CHECK_INSTANCE_CAST (_tmp19_, GEE_TYPE_ABSTRACT_COLLECTION, GeeAbstractCollection));
#line 2189 "/home/jens/Source/shotwell/src/Commands.vala"
		_tmp21_ = _tmp20_;
#line 2189 "/home/jens/Source/shotwell/src/Commands.vala"
		_proxy_size = _tmp21_;
#line 2189 "/home/jens/Source/shotwell/src/Commands.vala"
		_proxy_index = -1;
#line 2189 "/home/jens/Source/shotwell/src/Commands.vala"
		while (TRUE) {
#line 19463 "Commands.c"
			gint _tmp22_;
			gint _tmp23_;
			gint _tmp24_;
			SourceProxy* proxy = NULL;
			GeeArrayList* _tmp25_;
			gint _tmp26_;
			gpointer _tmp27_;
			SourceProxy* _tmp28_;
			DataSource* _tmp29_;
			Tag* _tmp30_;
			MediaSource* _tmp31_;
#line 2189 "/home/jens/Source/shotwell/src/Commands.vala"
			_tmp22_ = _proxy_index;
#line 2189 "/home/jens/Source/shotwell/src/Commands.vala"
			_proxy_index = _tmp22_ + 1;
#line 2189 "/home/jens/Source/shotwell/src/Commands.vala"
			_tmp23_ = _proxy_index;
#line 2189 "/home/jens/Source/shotwell/src/Commands.vala"
			_tmp24_ = _proxy_size;
#line 2189 "/home/jens/Source/shotwell/src/Commands.vala"
			if (!(_tmp23_ < _tmp24_)) {
#line 2189 "/home/jens/Source/shotwell/src/Commands.vala"
				break;
#line 19487 "Commands.c"
			}
#line 2189 "/home/jens/Source/shotwell/src/Commands.vala"
			_tmp25_ = _proxy_list;
#line 2189 "/home/jens/Source/shotwell/src/Commands.vala"
			_tmp26_ = _proxy_index;
#line 2189 "/home/jens/Source/shotwell/src/Commands.vala"
			_tmp27_ = gee_abstract_list_get (G_TYPE_CHECK_INSTANCE_CAST (_tmp25_, GEE_TYPE_ABSTRACT_LIST, GeeAbstractList), _tmp26_);
#line 2189 "/home/jens/Source/shotwell/src/Commands.vala"
			proxy = (SourceProxy*) _tmp27_;
#line 2190 "/home/jens/Source/shotwell/src/Commands.vala"
			_tmp28_ = proxy;
#line 2190 "/home/jens/Source/shotwell/src/Commands.vala"
			_tmp29_ = source_proxy_get_source (_tmp28_);
#line 2190 "/home/jens/Source/shotwell/src/Commands.vala"
			_tmp30_ = G_TYPE_CHECK_INSTANCE_CAST (_tmp29_, TYPE_TAG, Tag);
#line 2190 "/home/jens/Source/shotwell/src/Commands.vala"
			_tmp31_ = self->priv->media;
#line 2190 "/home/jens/Source/shotwell/src/Commands.vala"
			tag_attach (_tmp30_, _tmp31_);
#line 2190 "/home/jens/Source/shotwell/src/Commands.vala"
			_g_object_unref0 (_tmp30_);
#line 2189 "/home/jens/Source/shotwell/src/Commands.vala"
			_source_proxy_unref0 (proxy);
#line 19511 "Commands.c"
		}
#line 2189 "/home/jens/Source/shotwell/src/Commands.vala"
		_g_object_unref0 (_proxy_list);
#line 19515 "Commands.c"
	}
}


static void modify_tags_command_real_undo (Command* base) {
	ModifyTagsCommand * self;
#line 2193 "/home/jens/Source/shotwell/src/Commands.vala"
	self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_MODIFY_TAGS_COMMAND, ModifyTagsCommand);
#line 19524 "Commands.c"
	{
		GeeArrayList* _proxy_list = NULL;
		GeeArrayList* _tmp0_;
		GeeArrayList* _tmp1_;
		gint _proxy_size = 0;
		GeeArrayList* _tmp2_;
		gint _tmp3_;
		gint _tmp4_;
		gint _proxy_index = 0;
#line 2194 "/home/jens/Source/shotwell/src/Commands.vala"
		_tmp0_ = self->priv->to_add;
#line 2194 "/home/jens/Source/shotwell/src/Commands.vala"
		_tmp1_ = _g_object_ref0 (_tmp0_);
#line 2194 "/home/jens/Source/shotwell/src/Commands.vala"
		_proxy_list = _tmp1_;
#line 2194 "/home/jens/Source/shotwell/src/Commands.vala"
		_tmp2_ = _proxy_list;
#line 2194 "/home/jens/Source/shotwell/src/Commands.vala"
		_tmp3_ = gee_abstract_collection_get_size (G_TYPE_CHECK_INSTANCE_CAST (_tmp2_, GEE_TYPE_ABSTRACT_COLLECTION, GeeAbstractCollection));
#line 2194 "/home/jens/Source/shotwell/src/Commands.vala"
		_tmp4_ = _tmp3_;
#line 2194 "/home/jens/Source/shotwell/src/Commands.vala"
		_proxy_size = _tmp4_;
#line 2194 "/home/jens/Source/shotwell/src/Commands.vala"
		_proxy_index = -1;
#line 2194 "/home/jens/Source/shotwell/src/Commands.vala"
		while (TRUE) {
#line 19552 "Commands.c"
			gint _tmp5_;
			gint _tmp6_;
			gint _tmp7_;
			SourceProxy* proxy = NULL;
			GeeArrayList* _tmp8_;
			gint _tmp9_;
			gpointer _tmp10_;
			SourceProxy* _tmp11_;
			DataSource* _tmp12_;
			Tag* _tmp13_;
			MediaSource* _tmp14_;
			GeeList* _tmp15_;
			GeeList* _tmp16_;
#line 2194 "/home/jens/Source/shotwell/src/Commands.vala"
			_tmp5_ = _proxy_index;
#line 2194 "/home/jens/Source/shotwell/src/Commands.vala"
			_proxy_index = _tmp5_ + 1;
#line 2194 "/home/jens/Source/shotwell/src/Commands.vala"
			_tmp6_ = _proxy_index;
#line 2194 "/home/jens/Source/shotwell/src/Commands.vala"
			_tmp7_ = _proxy_size;
#line 2194 "/home/jens/Source/shotwell/src/Commands.vala"
			if (!(_tmp6_ < _tmp7_)) {
#line 2194 "/home/jens/Source/shotwell/src/Commands.vala"
				break;
#line 19578 "Commands.c"
			}
#line 2194 "/home/jens/Source/shotwell/src/Commands.vala"
			_tmp8_ = _proxy_list;
#line 2194 "/home/jens/Source/shotwell/src/Commands.vala"
			_tmp9_ = _proxy_index;
#line 2194 "/home/jens/Source/shotwell/src/Commands.vala"
			_tmp10_ = gee_abstract_list_get (G_TYPE_CHECK_INSTANCE_CAST (_tmp8_, GEE_TYPE_ABSTRACT_LIST, GeeAbstractList), _tmp9_);
#line 2194 "/home/jens/Source/shotwell/src/Commands.vala"
			proxy = (SourceProxy*) _tmp10_;
#line 2195 "/home/jens/Source/shotwell/src/Commands.vala"
			_tmp11_ = proxy;
#line 2195 "/home/jens/Source/shotwell/src/Commands.vala"
			_tmp12_ = source_proxy_get_source (_tmp11_);
#line 2195 "/home/jens/Source/shotwell/src/Commands.vala"
			_tmp13_ = G_TYPE_CHECK_INSTANCE_CAST (_tmp12_, TYPE_TAG, Tag);
#line 2195 "/home/jens/Source/shotwell/src/Commands.vala"
			_tmp14_ = self->priv->media;
#line 2195 "/home/jens/Source/shotwell/src/Commands.vala"
			_tmp15_ = tag_detach (_tmp13_, _tmp14_);
#line 2195 "/home/jens/Source/shotwell/src/Commands.vala"
			_tmp16_ = _tmp15_;
#line 2195 "/home/jens/Source/shotwell/src/Commands.vala"
			_g_object_unref0 (_tmp16_);
#line 2195 "/home/jens/Source/shotwell/src/Commands.vala"
			_g_object_unref0 (_tmp13_);
#line 2194 "/home/jens/Source/shotwell/src/Commands.vala"
			_source_proxy_unref0 (proxy);
#line 19606 "Commands.c"
		}
#line 2194 "/home/jens/Source/shotwell/src/Commands.vala"
		_g_object_unref0 (_proxy_list);
#line 19610 "Commands.c"
	}
	{
		GeeArrayList* _proxy_list = NULL;
		GeeArrayList* _tmp17_;
		GeeArrayList* _tmp18_;
		gint _proxy_size = 0;
		GeeArrayList* _tmp19_;
		gint _tmp20_;
		gint _tmp21_;
		gint _proxy_index = 0;
#line 2197 "/home/jens/Source/shotwell/src/Commands.vala"
		_tmp17_ = self->priv->to_remove;
#line 2197 "/home/jens/Source/shotwell/src/Commands.vala"
		_tmp18_ = _g_object_ref0 (_tmp17_);
#line 2197 "/home/jens/Source/shotwell/src/Commands.vala"
		_proxy_list = _tmp18_;
#line 2197 "/home/jens/Source/shotwell/src/Commands.vala"
		_tmp19_ = _proxy_list;
#line 2197 "/home/jens/Source/shotwell/src/Commands.vala"
		_tmp20_ = gee_abstract_collection_get_size (G_TYPE_CHECK_INSTANCE_CAST (_tmp19_, GEE_TYPE_ABSTRACT_COLLECTION, GeeAbstractCollection));
#line 2197 "/home/jens/Source/shotwell/src/Commands.vala"
		_tmp21_ = _tmp20_;
#line 2197 "/home/jens/Source/shotwell/src/Commands.vala"
		_proxy_size = _tmp21_;
#line 2197 "/home/jens/Source/shotwell/src/Commands.vala"
		_proxy_index = -1;
#line 2197 "/home/jens/Source/shotwell/src/Commands.vala"
		while (TRUE) {
#line 19639 "Commands.c"
			gint _tmp22_;
			gint _tmp23_;
			gint _tmp24_;
			SourceProxy* proxy = NULL;
			GeeArrayList* _tmp25_;
			gint _tmp26_;
			gpointer _tmp27_;
			SourceProxy* _tmp28_;
			DataSource* _tmp29_;
			Tag* _tmp30_;
			MediaSource* _tmp31_;
#line 2197 "/home/jens/Source/shotwell/src/Commands.vala"
			_tmp22_ = _proxy_index;
#line 2197 "/home/jens/Source/shotwell/src/Commands.vala"
			_proxy_index = _tmp22_ + 1;
#line 2197 "/home/jens/Source/shotwell/src/Commands.vala"
			_tmp23_ = _proxy_index;
#line 2197 "/home/jens/Source/shotwell/src/Commands.vala"
			_tmp24_ = _proxy_size;
#line 2197 "/home/jens/Source/shotwell/src/Commands.vala"
			if (!(_tmp23_ < _tmp24_)) {
#line 2197 "/home/jens/Source/shotwell/src/Commands.vala"
				break;
#line 19663 "Commands.c"
			}
#line 2197 "/home/jens/Source/shotwell/src/Commands.vala"
			_tmp25_ = _proxy_list;
#line 2197 "/home/jens/Source/shotwell/src/Commands.vala"
			_tmp26_ = _proxy_index;
#line 2197 "/home/jens/Source/shotwell/src/Commands.vala"
			_tmp27_ = gee_abstract_list_get (G_TYPE_CHECK_INSTANCE_CAST (_tmp25_, GEE_TYPE_ABSTRACT_LIST, GeeAbstractList), _tmp26_);
#line 2197 "/home/jens/Source/shotwell/src/Commands.vala"
			proxy = (SourceProxy*) _tmp27_;
#line 2198 "/home/jens/Source/shotwell/src/Commands.vala"
			_tmp28_ = proxy;
#line 2198 "/home/jens/Source/shotwell/src/Commands.vala"
			_tmp29_ = source_proxy_get_source (_tmp28_);
#line 2198 "/home/jens/Source/shotwell/src/Commands.vala"
			_tmp30_ = G_TYPE_CHECK_INSTANCE_CAST (_tmp29_, TYPE_TAG, Tag);
#line 2198 "/home/jens/Source/shotwell/src/Commands.vala"
			_tmp31_ = self->priv->media;
#line 2198 "/home/jens/Source/shotwell/src/Commands.vala"
			tag_attach (_tmp30_, _tmp31_);
#line 2198 "/home/jens/Source/shotwell/src/Commands.vala"
			_g_object_unref0 (_tmp30_);
#line 2197 "/home/jens/Source/shotwell/src/Commands.vala"
			_source_proxy_unref0 (proxy);
#line 19687 "Commands.c"
		}
#line 2197 "/home/jens/Source/shotwell/src/Commands.vala"
		_g_object_unref0 (_proxy_list);
#line 19691 "Commands.c"
	}
}


static void modify_tags_command_on_proxy_broken (ModifyTagsCommand* self) {
	CommandManager* _tmp0_;
	CommandManager* _tmp1_;
#line 2201 "/home/jens/Source/shotwell/src/Commands.vala"
	g_return_if_fail (IS_MODIFY_TAGS_COMMAND (self));
#line 2202 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp0_ = command_get_command_manager (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_COMMAND, Command));
#line 2202 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp1_ = _tmp0_;
#line 2202 "/home/jens/Source/shotwell/src/Commands.vala"
	command_manager_reset (_tmp1_);
#line 2202 "/home/jens/Source/shotwell/src/Commands.vala"
	_command_manager_unref0 (_tmp1_);
#line 19709 "Commands.c"
}


static void modify_tags_command_class_init (ModifyTagsCommandClass * klass) {
#line 2138 "/home/jens/Source/shotwell/src/Commands.vala"
	modify_tags_command_parent_class = g_type_class_peek_parent (klass);
#line 2138 "/home/jens/Source/shotwell/src/Commands.vala"
	g_type_class_add_private (klass, sizeof (ModifyTagsCommandPrivate));
#line 2138 "/home/jens/Source/shotwell/src/Commands.vala"
	((CommandClass *) klass)->execute = (void (*) (Command *)) modify_tags_command_real_execute;
#line 2138 "/home/jens/Source/shotwell/src/Commands.vala"
	((CommandClass *) klass)->undo = (void (*) (Command *)) modify_tags_command_real_undo;
#line 2138 "/home/jens/Source/shotwell/src/Commands.vala"
	G_OBJECT_CLASS (klass)->finalize = modify_tags_command_finalize;
#line 19724 "Commands.c"
}


static void modify_tags_command_instance_init (ModifyTagsCommand * self) {
	GeeArrayList* _tmp0_;
	GeeArrayList* _tmp1_;
#line 2138 "/home/jens/Source/shotwell/src/Commands.vala"
	self->priv = MODIFY_TAGS_COMMAND_GET_PRIVATE (self);
#line 2140 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp0_ = gee_array_list_new (TYPE_SOURCE_PROXY, (GBoxedCopyFunc) source_proxy_ref, (GDestroyNotify) source_proxy_unref, NULL, NULL, NULL);
#line 2140 "/home/jens/Source/shotwell/src/Commands.vala"
	self->priv->to_add = _tmp0_;
#line 2141 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp1_ = gee_array_list_new (TYPE_SOURCE_PROXY, (GBoxedCopyFunc) source_proxy_ref, (GDestroyNotify) source_proxy_unref, NULL, NULL, NULL);
#line 2141 "/home/jens/Source/shotwell/src/Commands.vala"
	self->priv->to_remove = _tmp1_;
#line 19741 "Commands.c"
}


static void modify_tags_command_finalize (GObject * obj) {
	ModifyTagsCommand * self;
#line 2138 "/home/jens/Source/shotwell/src/Commands.vala"
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, TYPE_MODIFY_TAGS_COMMAND, ModifyTagsCommand);
#line 19749 "Commands.c"
	{
		GeeArrayList* _proxy_list = NULL;
		GeeArrayList* _tmp0_;
		GeeArrayList* _tmp1_;
		gint _proxy_size = 0;
		GeeArrayList* _tmp2_;
		gint _tmp3_;
		gint _tmp4_;
		gint _proxy_index = 0;
#line 2178 "/home/jens/Source/shotwell/src/Commands.vala"
		_tmp0_ = self->priv->to_add;
#line 2178 "/home/jens/Source/shotwell/src/Commands.vala"
		_tmp1_ = _g_object_ref0 (_tmp0_);
#line 2178 "/home/jens/Source/shotwell/src/Commands.vala"
		_proxy_list = _tmp1_;
#line 2178 "/home/jens/Source/shotwell/src/Commands.vala"
		_tmp2_ = _proxy_list;
#line 2178 "/home/jens/Source/shotwell/src/Commands.vala"
		_tmp3_ = gee_abstract_collection_get_size (G_TYPE_CHECK_INSTANCE_CAST (_tmp2_, GEE_TYPE_ABSTRACT_COLLECTION, GeeAbstractCollection));
#line 2178 "/home/jens/Source/shotwell/src/Commands.vala"
		_tmp4_ = _tmp3_;
#line 2178 "/home/jens/Source/shotwell/src/Commands.vala"
		_proxy_size = _tmp4_;
#line 2178 "/home/jens/Source/shotwell/src/Commands.vala"
		_proxy_index = -1;
#line 2178 "/home/jens/Source/shotwell/src/Commands.vala"
		while (TRUE) {
#line 19777 "Commands.c"
			gint _tmp5_;
			gint _tmp6_;
			gint _tmp7_;
			SourceProxy* proxy = NULL;
			GeeArrayList* _tmp8_;
			gint _tmp9_;
			gpointer _tmp10_;
			SourceProxy* _tmp11_;
			guint _tmp12_;
#line 2178 "/home/jens/Source/shotwell/src/Commands.vala"
			_tmp5_ = _proxy_index;
#line 2178 "/home/jens/Source/shotwell/src/Commands.vala"
			_proxy_index = _tmp5_ + 1;
#line 2178 "/home/jens/Source/shotwell/src/Commands.vala"
			_tmp6_ = _proxy_index;
#line 2178 "/home/jens/Source/shotwell/src/Commands.vala"
			_tmp7_ = _proxy_size;
#line 2178 "/home/jens/Source/shotwell/src/Commands.vala"
			if (!(_tmp6_ < _tmp7_)) {
#line 2178 "/home/jens/Source/shotwell/src/Commands.vala"
				break;
#line 19799 "Commands.c"
			}
#line 2178 "/home/jens/Source/shotwell/src/Commands.vala"
			_tmp8_ = _proxy_list;
#line 2178 "/home/jens/Source/shotwell/src/Commands.vala"
			_tmp9_ = _proxy_index;
#line 2178 "/home/jens/Source/shotwell/src/Commands.vala"
			_tmp10_ = gee_abstract_list_get (G_TYPE_CHECK_INSTANCE_CAST (_tmp8_, GEE_TYPE_ABSTRACT_LIST, GeeAbstractList), _tmp9_);
#line 2178 "/home/jens/Source/shotwell/src/Commands.vala"
			proxy = (SourceProxy*) _tmp10_;
#line 2179 "/home/jens/Source/shotwell/src/Commands.vala"
			_tmp11_ = proxy;
#line 2179 "/home/jens/Source/shotwell/src/Commands.vala"
			g_signal_parse_name ("broken", TYPE_SOURCE_PROXY, &_tmp12_, NULL, FALSE);
#line 2179 "/home/jens/Source/shotwell/src/Commands.vala"
			g_signal_handlers_disconnect_matched (_tmp11_, G_SIGNAL_MATCH_ID | G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA, _tmp12_, 0, NULL, (GCallback) _modify_tags_command_on_proxy_broken_source_proxy_broken, self);
#line 2178 "/home/jens/Source/shotwell/src/Commands.vala"
			_source_proxy_unref0 (proxy);
#line 19817 "Commands.c"
		}
#line 2178 "/home/jens/Source/shotwell/src/Commands.vala"
		_g_object_unref0 (_proxy_list);
#line 19821 "Commands.c"
	}
	{
		GeeArrayList* _proxy_list = NULL;
		GeeArrayList* _tmp13_;
		GeeArrayList* _tmp14_;
		gint _proxy_size = 0;
		GeeArrayList* _tmp15_;
		gint _tmp16_;
		gint _tmp17_;
		gint _proxy_index = 0;
#line 2181 "/home/jens/Source/shotwell/src/Commands.vala"
		_tmp13_ = self->priv->to_remove;
#line 2181 "/home/jens/Source/shotwell/src/Commands.vala"
		_tmp14_ = _g_object_ref0 (_tmp13_);
#line 2181 "/home/jens/Source/shotwell/src/Commands.vala"
		_proxy_list = _tmp14_;
#line 2181 "/home/jens/Source/shotwell/src/Commands.vala"
		_tmp15_ = _proxy_list;
#line 2181 "/home/jens/Source/shotwell/src/Commands.vala"
		_tmp16_ = gee_abstract_collection_get_size (G_TYPE_CHECK_INSTANCE_CAST (_tmp15_, GEE_TYPE_ABSTRACT_COLLECTION, GeeAbstractCollection));
#line 2181 "/home/jens/Source/shotwell/src/Commands.vala"
		_tmp17_ = _tmp16_;
#line 2181 "/home/jens/Source/shotwell/src/Commands.vala"
		_proxy_size = _tmp17_;
#line 2181 "/home/jens/Source/shotwell/src/Commands.vala"
		_proxy_index = -1;
#line 2181 "/home/jens/Source/shotwell/src/Commands.vala"
		while (TRUE) {
#line 19850 "Commands.c"
			gint _tmp18_;
			gint _tmp19_;
			gint _tmp20_;
			SourceProxy* proxy = NULL;
			GeeArrayList* _tmp21_;
			gint _tmp22_;
			gpointer _tmp23_;
			SourceProxy* _tmp24_;
			guint _tmp25_;
#line 2181 "/home/jens/Source/shotwell/src/Commands.vala"
			_tmp18_ = _proxy_index;
#line 2181 "/home/jens/Source/shotwell/src/Commands.vala"
			_proxy_index = _tmp18_ + 1;
#line 2181 "/home/jens/Source/shotwell/src/Commands.vala"
			_tmp19_ = _proxy_index;
#line 2181 "/home/jens/Source/shotwell/src/Commands.vala"
			_tmp20_ = _proxy_size;
#line 2181 "/home/jens/Source/shotwell/src/Commands.vala"
			if (!(_tmp19_ < _tmp20_)) {
#line 2181 "/home/jens/Source/shotwell/src/Commands.vala"
				break;
#line 19872 "Commands.c"
			}
#line 2181 "/home/jens/Source/shotwell/src/Commands.vala"
			_tmp21_ = _proxy_list;
#line 2181 "/home/jens/Source/shotwell/src/Commands.vala"
			_tmp22_ = _proxy_index;
#line 2181 "/home/jens/Source/shotwell/src/Commands.vala"
			_tmp23_ = gee_abstract_list_get (G_TYPE_CHECK_INSTANCE_CAST (_tmp21_, GEE_TYPE_ABSTRACT_LIST, GeeAbstractList), _tmp22_);
#line 2181 "/home/jens/Source/shotwell/src/Commands.vala"
			proxy = (SourceProxy*) _tmp23_;
#line 2182 "/home/jens/Source/shotwell/src/Commands.vala"
			_tmp24_ = proxy;
#line 2182 "/home/jens/Source/shotwell/src/Commands.vala"
			g_signal_parse_name ("broken", TYPE_SOURCE_PROXY, &_tmp25_, NULL, FALSE);
#line 2182 "/home/jens/Source/shotwell/src/Commands.vala"
			g_signal_handlers_disconnect_matched (_tmp24_, G_SIGNAL_MATCH_ID | G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA, _tmp25_, 0, NULL, (GCallback) _modify_tags_command_on_proxy_broken_source_proxy_broken, self);
#line 2181 "/home/jens/Source/shotwell/src/Commands.vala"
			_source_proxy_unref0 (proxy);
#line 19890 "Commands.c"
		}
#line 2181 "/home/jens/Source/shotwell/src/Commands.vala"
		_g_object_unref0 (_proxy_list);
#line 19894 "Commands.c"
	}
#line 2139 "/home/jens/Source/shotwell/src/Commands.vala"
	_g_object_unref0 (self->priv->media);
#line 2140 "/home/jens/Source/shotwell/src/Commands.vala"
	_g_object_unref0 (self->priv->to_add);
#line 2141 "/home/jens/Source/shotwell/src/Commands.vala"
	_g_object_unref0 (self->priv->to_remove);
#line 2138 "/home/jens/Source/shotwell/src/Commands.vala"
	G_OBJECT_CLASS (modify_tags_command_parent_class)->finalize (obj);
#line 19904 "Commands.c"
}


GType modify_tags_command_get_type (void) {
	static volatile gsize modify_tags_command_type_id__volatile = 0;
	if (g_once_init_enter (&modify_tags_command_type_id__volatile)) {
		static const GTypeInfo g_define_type_info = { sizeof (ModifyTagsCommandClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) modify_tags_command_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (ModifyTagsCommand), 0, (GInstanceInitFunc) modify_tags_command_instance_init, NULL };
		GType modify_tags_command_type_id;
		modify_tags_command_type_id = g_type_register_static (TYPE_SINGLE_DATA_SOURCE_COMMAND, "ModifyTagsCommand", &g_define_type_info, 0);
		g_once_init_leave (&modify_tags_command_type_id__volatile, modify_tags_command_type_id);
	}
	return modify_tags_command_type_id__volatile;
}


static void _tag_untag_photos_command_on_source_destroyed_source_collection_item_destroyed (SourceCollection* _sender, DataSource* source, gpointer self) {
#line 2226 "/home/jens/Source/shotwell/src/Commands.vala"
	tag_untag_photos_command_on_source_destroyed ((TagUntagPhotosCommand*) self, source);
#line 19923 "Commands.c"
}


TagUntagPhotosCommand* tag_untag_photos_command_construct (GType object_type, Tag* tag, GeeCollection* sources, gint count, gboolean attach) {
	TagUntagPhotosCommand * self = NULL;
	gchar* _tmp0_ = NULL;
	gboolean _tmp1_;
	Tag* _tmp12_;
	Tag* _tmp13_;
	gchar* _tmp14_;
	gchar* _tmp15_;
	GeeCollection* _tmp16_;
	GeeCollection* _tmp17_;
	gboolean _tmp18_;
	LibraryPhotoSourceCollection* _tmp19_;
	VideoSourceCollection* _tmp20_;
#line 2212 "/home/jens/Source/shotwell/src/Commands.vala"
	g_return_val_if_fail (IS_TAG (tag), NULL);
#line 2212 "/home/jens/Source/shotwell/src/Commands.vala"
	g_return_val_if_fail (GEE_IS_COLLECTION (sources), NULL);
#line 2214 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp1_ = attach;
#line 2214 "/home/jens/Source/shotwell/src/Commands.vala"
	if (_tmp1_) {
#line 19948 "Commands.c"
		Tag* _tmp2_;
		gchar* _tmp3_;
		gchar* _tmp4_;
		gint _tmp5_;
		gchar* _tmp6_;
#line 2214 "/home/jens/Source/shotwell/src/Commands.vala"
		_tmp2_ = tag;
#line 2214 "/home/jens/Source/shotwell/src/Commands.vala"
		_tmp3_ = tag_get_user_visible_name (_tmp2_);
#line 2214 "/home/jens/Source/shotwell/src/Commands.vala"
		_tmp4_ = _tmp3_;
#line 2214 "/home/jens/Source/shotwell/src/Commands.vala"
		_tmp5_ = count;
#line 2214 "/home/jens/Source/shotwell/src/Commands.vala"
		_tmp6_ = resources_tag_photos_label (_tmp4_, _tmp5_);
#line 2214 "/home/jens/Source/shotwell/src/Commands.vala"
		_g_free0 (_tmp0_);
#line 2214 "/home/jens/Source/shotwell/src/Commands.vala"
		_tmp0_ = _tmp6_;
#line 2214 "/home/jens/Source/shotwell/src/Commands.vala"
		_g_free0 (_tmp4_);
#line 19970 "Commands.c"
	} else {
		Tag* _tmp7_;
		gchar* _tmp8_;
		gchar* _tmp9_;
		gint _tmp10_;
		gchar* _tmp11_;
#line 2215 "/home/jens/Source/shotwell/src/Commands.vala"
		_tmp7_ = tag;
#line 2215 "/home/jens/Source/shotwell/src/Commands.vala"
		_tmp8_ = tag_get_user_visible_name (_tmp7_);
#line 2215 "/home/jens/Source/shotwell/src/Commands.vala"
		_tmp9_ = _tmp8_;
#line 2215 "/home/jens/Source/shotwell/src/Commands.vala"
		_tmp10_ = count;
#line 2215 "/home/jens/Source/shotwell/src/Commands.vala"
		_tmp11_ = resources_untag_photos_label (_tmp9_, _tmp10_);
#line 2215 "/home/jens/Source/shotwell/src/Commands.vala"
		_g_free0 (_tmp0_);
#line 2215 "/home/jens/Source/shotwell/src/Commands.vala"
		_tmp0_ = _tmp11_;
#line 2215 "/home/jens/Source/shotwell/src/Commands.vala"
		_g_free0 (_tmp9_);
#line 19993 "Commands.c"
	}
#line 2213 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp12_ = tag;
#line 2213 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp13_ = tag;
#line 2213 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp14_ = data_object_get_name (G_TYPE_CHECK_INSTANCE_CAST (_tmp13_, TYPE_DATA_OBJECT, DataObject));
#line 2213 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp15_ = _tmp14_;
#line 2213 "/home/jens/Source/shotwell/src/Commands.vala"
	self = (TagUntagPhotosCommand*) simple_proxyable_command_construct (object_type, G_TYPE_CHECK_INSTANCE_CAST (_tmp12_, TYPE_PROXYABLE, Proxyable), _tmp0_, _tmp15_);
#line 2213 "/home/jens/Source/shotwell/src/Commands.vala"
	_g_free0 (_tmp15_);
#line 2218 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp16_ = sources;
#line 2218 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp17_ = _g_object_ref0 (_tmp16_);
#line 2218 "/home/jens/Source/shotwell/src/Commands.vala"
	_g_object_unref0 (self->priv->sources);
#line 2218 "/home/jens/Source/shotwell/src/Commands.vala"
	self->priv->sources = _tmp17_;
#line 2219 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp18_ = attach;
#line 2219 "/home/jens/Source/shotwell/src/Commands.vala"
	self->priv->attach = _tmp18_;
#line 2221 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp19_ = library_photo_global;
#line 2221 "/home/jens/Source/shotwell/src/Commands.vala"
	g_signal_connect_object (G_TYPE_CHECK_INSTANCE_CAST (_tmp19_, TYPE_SOURCE_COLLECTION, SourceCollection), "item-destroyed", (GCallback) _tag_untag_photos_command_on_source_destroyed_source_collection_item_destroyed, self, 0);
#line 2222 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp20_ = video_global;
#line 2222 "/home/jens/Source/shotwell/src/Commands.vala"
	g_signal_connect_object (G_TYPE_CHECK_INSTANCE_CAST (_tmp20_, TYPE_SOURCE_COLLECTION, SourceCollection), "item-destroyed", (GCallback) _tag_untag_photos_command_on_source_destroyed_source_collection_item_destroyed, self, 0);
#line 2212 "/home/jens/Source/shotwell/src/Commands.vala"
	_g_free0 (_tmp0_);
#line 2212 "/home/jens/Source/shotwell/src/Commands.vala"
	return self;
#line 20031 "Commands.c"
}


TagUntagPhotosCommand* tag_untag_photos_command_new (Tag* tag, GeeCollection* sources, gint count, gboolean attach) {
#line 2212 "/home/jens/Source/shotwell/src/Commands.vala"
	return tag_untag_photos_command_construct (TYPE_TAG_UNTAG_PHOTOS_COMMAND, tag, sources, count, attach);
#line 20038 "Commands.c"
}


static void tag_untag_photos_command_real_execute_on_source (SimpleProxyableCommand* base, DataSource* source) {
	TagUntagPhotosCommand * self;
	gboolean _tmp0_;
#line 2230 "/home/jens/Source/shotwell/src/Commands.vala"
	self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_TAG_UNTAG_PHOTOS_COMMAND, TagUntagPhotosCommand);
#line 2230 "/home/jens/Source/shotwell/src/Commands.vala"
	g_return_if_fail (IS_DATA_SOURCE (source));
#line 2231 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp0_ = self->priv->attach;
#line 2231 "/home/jens/Source/shotwell/src/Commands.vala"
	if (_tmp0_) {
#line 20053 "Commands.c"
		DataSource* _tmp1_;
#line 2232 "/home/jens/Source/shotwell/src/Commands.vala"
		_tmp1_ = source;
#line 2232 "/home/jens/Source/shotwell/src/Commands.vala"
		tag_untag_photos_command_do_attach (self, G_TYPE_CHECK_INSTANCE_CAST (_tmp1_, TYPE_TAG, Tag));
#line 20059 "Commands.c"
	} else {
		DataSource* _tmp2_;
#line 2234 "/home/jens/Source/shotwell/src/Commands.vala"
		_tmp2_ = source;
#line 2234 "/home/jens/Source/shotwell/src/Commands.vala"
		tag_untag_photos_command_do_detach (self, G_TYPE_CHECK_INSTANCE_CAST (_tmp2_, TYPE_TAG, Tag));
#line 20066 "Commands.c"
	}
}


static void tag_untag_photos_command_real_undo_on_source (SimpleProxyableCommand* base, DataSource* source) {
	TagUntagPhotosCommand * self;
	gboolean _tmp0_;
#line 2237 "/home/jens/Source/shotwell/src/Commands.vala"
	self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_TAG_UNTAG_PHOTOS_COMMAND, TagUntagPhotosCommand);
#line 2237 "/home/jens/Source/shotwell/src/Commands.vala"
	g_return_if_fail (IS_DATA_SOURCE (source));
#line 2238 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp0_ = self->priv->attach;
#line 2238 "/home/jens/Source/shotwell/src/Commands.vala"
	if (_tmp0_) {
#line 20082 "Commands.c"
		DataSource* _tmp1_;
#line 2239 "/home/jens/Source/shotwell/src/Commands.vala"
		_tmp1_ = source;
#line 2239 "/home/jens/Source/shotwell/src/Commands.vala"
		tag_untag_photos_command_do_detach (self, G_TYPE_CHECK_INSTANCE_CAST (_tmp1_, TYPE_TAG, Tag));
#line 20088 "Commands.c"
	} else {
		DataSource* _tmp2_;
#line 2241 "/home/jens/Source/shotwell/src/Commands.vala"
		_tmp2_ = source;
#line 2241 "/home/jens/Source/shotwell/src/Commands.vala"
		tag_untag_photos_command_do_attach (self, G_TYPE_CHECK_INSTANCE_CAST (_tmp2_, TYPE_TAG, Tag));
#line 20095 "Commands.c"
	}
}


static void tag_untag_photos_command_do_attach (TagUntagPhotosCommand* self, Tag* tag) {
	GeeMultiMap* _tmp0_;
#line 2244 "/home/jens/Source/shotwell/src/Commands.vala"
	g_return_if_fail (IS_TAG_UNTAG_PHOTOS_COMMAND (self));
#line 2244 "/home/jens/Source/shotwell/src/Commands.vala"
	g_return_if_fail (IS_TAG (tag));
#line 2246 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp0_ = self->priv->detached_from;
#line 2246 "/home/jens/Source/shotwell/src/Commands.vala"
	if (_tmp0_ == NULL) {
#line 20110 "Commands.c"
		Tag* _tmp1_;
		GeeCollection* _tmp2_;
		GeeArrayList* _tmp3_;
		Tag* curr_tmp = NULL;
		Tag* _tmp4_;
		Tag* _tmp5_;
#line 2247 "/home/jens/Source/shotwell/src/Commands.vala"
		_tmp1_ = tag;
#line 2247 "/home/jens/Source/shotwell/src/Commands.vala"
		_tmp2_ = self->priv->sources;
#line 2247 "/home/jens/Source/shotwell/src/Commands.vala"
		tag_attach_many (_tmp1_, _tmp2_);
#line 2249 "/home/jens/Source/shotwell/src/Commands.vala"
		_tmp3_ = gee_array_list_new (TYPE_TAG, (GBoxedCopyFunc) g_object_ref, (GDestroyNotify) g_object_unref, NULL, NULL, NULL);
#line 2249 "/home/jens/Source/shotwell/src/Commands.vala"
		_g_object_unref0 (self->priv->attached_to);
#line 2249 "/home/jens/Source/shotwell/src/Commands.vala"
		self->priv->attached_to = G_TYPE_CHECK_INSTANCE_CAST (_tmp3_, GEE_TYPE_LIST, GeeList);
#line 2251 "/home/jens/Source/shotwell/src/Commands.vala"
		_tmp4_ = tag;
#line 2251 "/home/jens/Source/shotwell/src/Commands.vala"
		_tmp5_ = _g_object_ref0 (_tmp4_);
#line 2251 "/home/jens/Source/shotwell/src/Commands.vala"
		curr_tmp = _tmp5_;
#line 2253 "/home/jens/Source/shotwell/src/Commands.vala"
		while (TRUE) {
#line 20137 "Commands.c"
			Tag* _tmp6_;
			GeeList* _tmp7_;
			Tag* _tmp8_;
			Tag* _tmp9_;
			Tag* _tmp10_;
#line 2253 "/home/jens/Source/shotwell/src/Commands.vala"
			_tmp6_ = curr_tmp;
#line 2253 "/home/jens/Source/shotwell/src/Commands.vala"
			if (!(_tmp6_ != NULL)) {
#line 2253 "/home/jens/Source/shotwell/src/Commands.vala"
				break;
#line 20149 "Commands.c"
			}
#line 2254 "/home/jens/Source/shotwell/src/Commands.vala"
			_tmp7_ = self->priv->attached_to;
#line 2254 "/home/jens/Source/shotwell/src/Commands.vala"
			_tmp8_ = curr_tmp;
#line 2254 "/home/jens/Source/shotwell/src/Commands.vala"
			gee_collection_add (G_TYPE_CHECK_INSTANCE_CAST (_tmp7_, GEE_TYPE_COLLECTION, GeeCollection), _tmp8_);
#line 2255 "/home/jens/Source/shotwell/src/Commands.vala"
			_tmp9_ = curr_tmp;
#line 2255 "/home/jens/Source/shotwell/src/Commands.vala"
			_tmp10_ = tag_get_hierarchical_parent (_tmp9_);
#line 2255 "/home/jens/Source/shotwell/src/Commands.vala"
			_g_object_unref0 (curr_tmp);
#line 2255 "/home/jens/Source/shotwell/src/Commands.vala"
			curr_tmp = _tmp10_;
#line 20165 "Commands.c"
		}
#line 2258 "/home/jens/Source/shotwell/src/Commands.vala"
		_g_object_unref0 (curr_tmp);
#line 2258 "/home/jens/Source/shotwell/src/Commands.vala"
		return;
#line 20171 "Commands.c"
	}
	{
		GeeIterator* _detached_tag_it = NULL;
		GeeMultiMap* _tmp11_;
		GeeMultiSet* _tmp12_;
		GeeMultiSet* _tmp13_;
		GeeIterator* _tmp14_;
		GeeIterator* _tmp15_;
#line 2262 "/home/jens/Source/shotwell/src/Commands.vala"
		_tmp11_ = self->priv->detached_from;
#line 2262 "/home/jens/Source/shotwell/src/Commands.vala"
		_tmp12_ = gee_multi_map_get_all_keys (_tmp11_);
#line 2262 "/home/jens/Source/shotwell/src/Commands.vala"
		_tmp13_ = _tmp12_;
#line 2262 "/home/jens/Source/shotwell/src/Commands.vala"
		_tmp14_ = gee_iterable_iterator (G_TYPE_CHECK_INSTANCE_CAST (_tmp13_, GEE_TYPE_ITERABLE, GeeIterable));
#line 2262 "/home/jens/Source/shotwell/src/Commands.vala"
		_tmp15_ = _tmp14_;
#line 2262 "/home/jens/Source/shotwell/src/Commands.vala"
		_g_object_unref0 (_tmp13_);
#line 2262 "/home/jens/Source/shotwell/src/Commands.vala"
		_detached_tag_it = _tmp15_;
#line 2262 "/home/jens/Source/shotwell/src/Commands.vala"
		while (TRUE) {
#line 20196 "Commands.c"
			GeeIterator* _tmp16_;
			gboolean _tmp17_;
			Tag* detached_tag = NULL;
			GeeIterator* _tmp18_;
			gpointer _tmp19_;
			Tag* _tmp20_;
			GeeMultiMap* _tmp21_;
			Tag* _tmp22_;
			GeeCollection* _tmp23_;
			GeeCollection* _tmp24_;
#line 2262 "/home/jens/Source/shotwell/src/Commands.vala"
			_tmp16_ = _detached_tag_it;
#line 2262 "/home/jens/Source/shotwell/src/Commands.vala"
			_tmp17_ = gee_iterator_next (_tmp16_);
#line 2262 "/home/jens/Source/shotwell/src/Commands.vala"
			if (!_tmp17_) {
#line 2262 "/home/jens/Source/shotwell/src/Commands.vala"
				break;
#line 20215 "Commands.c"
			}
#line 2262 "/home/jens/Source/shotwell/src/Commands.vala"
			_tmp18_ = _detached_tag_it;
#line 2262 "/home/jens/Source/shotwell/src/Commands.vala"
			_tmp19_ = gee_iterator_get (_tmp18_);
#line 2262 "/home/jens/Source/shotwell/src/Commands.vala"
			detached_tag = (Tag*) _tmp19_;
#line 2263 "/home/jens/Source/shotwell/src/Commands.vala"
			_tmp20_ = detached_tag;
#line 2263 "/home/jens/Source/shotwell/src/Commands.vala"
			_tmp21_ = self->priv->detached_from;
#line 2263 "/home/jens/Source/shotwell/src/Commands.vala"
			_tmp22_ = detached_tag;
#line 2263 "/home/jens/Source/shotwell/src/Commands.vala"
			_tmp23_ = gee_multi_map_get (_tmp21_, _tmp22_);
#line 2263 "/home/jens/Source/shotwell/src/Commands.vala"
			_tmp24_ = _tmp23_;
#line 2263 "/home/jens/Source/shotwell/src/Commands.vala"
			tag_attach_many (_tmp20_, _tmp24_);
#line 2263 "/home/jens/Source/shotwell/src/Commands.vala"
			_g_object_unref0 (_tmp24_);
#line 2262 "/home/jens/Source/shotwell/src/Commands.vala"
			_g_object_unref0 (detached_tag);
#line 20239 "Commands.c"
		}
#line 2262 "/home/jens/Source/shotwell/src/Commands.vala"
		_g_object_unref0 (_detached_tag_it);
#line 20243 "Commands.c"
	}
#line 2265 "/home/jens/Source/shotwell/src/Commands.vala"
	_g_object_unref0 (self->priv->detached_from);
#line 2265 "/home/jens/Source/shotwell/src/Commands.vala"
	self->priv->detached_from = NULL;
#line 2266 "/home/jens/Source/shotwell/src/Commands.vala"
	simple_proxyable_command_clear_added_proxies (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_SIMPLE_PROXYABLE_COMMAND, SimpleProxyableCommand));
#line 20251 "Commands.c"
}


static void tag_untag_photos_command_do_detach (TagUntagPhotosCommand* self, Tag* tag) {
	GeeList* _tmp0_;
#line 2269 "/home/jens/Source/shotwell/src/Commands.vala"
	g_return_if_fail (IS_TAG_UNTAG_PHOTOS_COMMAND (self));
#line 2269 "/home/jens/Source/shotwell/src/Commands.vala"
	g_return_if_fail (IS_TAG (tag));
#line 2270 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp0_ = self->priv->attached_to;
#line 2270 "/home/jens/Source/shotwell/src/Commands.vala"
	if (_tmp0_ == NULL) {
#line 20265 "Commands.c"
		Tag* _tmp1_;
		GeeCollection* _tmp2_;
		GeeMultiMap* _tmp3_;
		GeeMultiMap* _tmp4_;
		GeeSet* _tmp5_;
		GeeSet* _tmp6_;
#line 2274 "/home/jens/Source/shotwell/src/Commands.vala"
		_tmp1_ = tag;
#line 2274 "/home/jens/Source/shotwell/src/Commands.vala"
		_tmp2_ = self->priv->sources;
#line 2274 "/home/jens/Source/shotwell/src/Commands.vala"
		_tmp3_ = tag_detach_many (_tmp1_, _tmp2_);
#line 2274 "/home/jens/Source/shotwell/src/Commands.vala"
		_g_object_unref0 (self->priv->detached_from);
#line 2274 "/home/jens/Source/shotwell/src/Commands.vala"
		self->priv->detached_from = _tmp3_;
#line 2278 "/home/jens/Source/shotwell/src/Commands.vala"
		_tmp4_ = self->priv->detached_from;
#line 2278 "/home/jens/Source/shotwell/src/Commands.vala"
		_tmp5_ = gee_multi_map_get_keys (_tmp4_);
#line 2278 "/home/jens/Source/shotwell/src/Commands.vala"
		_tmp6_ = _tmp5_;
#line 2278 "/home/jens/Source/shotwell/src/Commands.vala"
		simple_proxyable_command_add_proxyables (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_SIMPLE_PROXYABLE_COMMAND, SimpleProxyableCommand), G_TYPE_CHECK_INSTANCE_CAST (_tmp6_, GEE_TYPE_COLLECTION, GeeCollection));
#line 2278 "/home/jens/Source/shotwell/src/Commands.vala"
		_g_object_unref0 (_tmp6_);
#line 20292 "Commands.c"
	} else {
		{
			GeeList* _t_list = NULL;
			GeeList* _tmp7_;
			GeeList* _tmp8_;
			gint _t_size = 0;
			GeeList* _tmp9_;
			gint _tmp10_;
			gint _tmp11_;
			gint _t_index = 0;
#line 2280 "/home/jens/Source/shotwell/src/Commands.vala"
			_tmp7_ = self->priv->attached_to;
#line 2280 "/home/jens/Source/shotwell/src/Commands.vala"
			_tmp8_ = _g_object_ref0 (_tmp7_);
#line 2280 "/home/jens/Source/shotwell/src/Commands.vala"
			_t_list = _tmp8_;
#line 2280 "/home/jens/Source/shotwell/src/Commands.vala"
			_tmp9_ = _t_list;
#line 2280 "/home/jens/Source/shotwell/src/Commands.vala"
			_tmp10_ = gee_collection_get_size (G_TYPE_CHECK_INSTANCE_CAST (_tmp9_, GEE_TYPE_COLLECTION, GeeCollection));
#line 2280 "/home/jens/Source/shotwell/src/Commands.vala"
			_tmp11_ = _tmp10_;
#line 2280 "/home/jens/Source/shotwell/src/Commands.vala"
			_t_size = _tmp11_;
#line 2280 "/home/jens/Source/shotwell/src/Commands.vala"
			_t_index = -1;
#line 2280 "/home/jens/Source/shotwell/src/Commands.vala"
			while (TRUE) {
#line 20321 "Commands.c"
				gint _tmp12_;
				gint _tmp13_;
				gint _tmp14_;
				Tag* t = NULL;
				GeeList* _tmp15_;
				gint _tmp16_;
				gpointer _tmp17_;
#line 2280 "/home/jens/Source/shotwell/src/Commands.vala"
				_tmp12_ = _t_index;
#line 2280 "/home/jens/Source/shotwell/src/Commands.vala"
				_t_index = _tmp12_ + 1;
#line 2280 "/home/jens/Source/shotwell/src/Commands.vala"
				_tmp13_ = _t_index;
#line 2280 "/home/jens/Source/shotwell/src/Commands.vala"
				_tmp14_ = _t_size;
#line 2280 "/home/jens/Source/shotwell/src/Commands.vala"
				if (!(_tmp13_ < _tmp14_)) {
#line 2280 "/home/jens/Source/shotwell/src/Commands.vala"
					break;
#line 20341 "Commands.c"
				}
#line 2280 "/home/jens/Source/shotwell/src/Commands.vala"
				_tmp15_ = _t_list;
#line 2280 "/home/jens/Source/shotwell/src/Commands.vala"
				_tmp16_ = _t_index;
#line 2280 "/home/jens/Source/shotwell/src/Commands.vala"
				_tmp17_ = gee_list_get (_tmp15_, _tmp16_);
#line 2280 "/home/jens/Source/shotwell/src/Commands.vala"
				t = (Tag*) _tmp17_;
#line 20351 "Commands.c"
				{
					GeeIterator* _ms_it = NULL;
					GeeCollection* _tmp18_;
					GeeIterator* _tmp19_;
#line 2281 "/home/jens/Source/shotwell/src/Commands.vala"
					_tmp18_ = self->priv->sources;
#line 2281 "/home/jens/Source/shotwell/src/Commands.vala"
					_tmp19_ = gee_iterable_iterator (G_TYPE_CHECK_INSTANCE_CAST (_tmp18_, GEE_TYPE_ITERABLE, GeeIterable));
#line 2281 "/home/jens/Source/shotwell/src/Commands.vala"
					_ms_it = _tmp19_;
#line 2281 "/home/jens/Source/shotwell/src/Commands.vala"
					while (TRUE) {
#line 20364 "Commands.c"
						GeeIterator* _tmp20_;
						gboolean _tmp21_;
						MediaSource* ms = NULL;
						GeeIterator* _tmp22_;
						gpointer _tmp23_;
						Tag* _tmp24_;
						MediaSource* _tmp25_;
						gint _tmp26_;
#line 2281 "/home/jens/Source/shotwell/src/Commands.vala"
						_tmp20_ = _ms_it;
#line 2281 "/home/jens/Source/shotwell/src/Commands.vala"
						_tmp21_ = gee_iterator_next (_tmp20_);
#line 2281 "/home/jens/Source/shotwell/src/Commands.vala"
						if (!_tmp21_) {
#line 2281 "/home/jens/Source/shotwell/src/Commands.vala"
							break;
#line 20381 "Commands.c"
						}
#line 2281 "/home/jens/Source/shotwell/src/Commands.vala"
						_tmp22_ = _ms_it;
#line 2281 "/home/jens/Source/shotwell/src/Commands.vala"
						_tmp23_ = gee_iterator_get (_tmp22_);
#line 2281 "/home/jens/Source/shotwell/src/Commands.vala"
						ms = (MediaSource*) _tmp23_;
#line 2283 "/home/jens/Source/shotwell/src/Commands.vala"
						_tmp24_ = t;
#line 2283 "/home/jens/Source/shotwell/src/Commands.vala"
						_tmp25_ = ms;
#line 2283 "/home/jens/Source/shotwell/src/Commands.vala"
						_tmp26_ = tag_get_attachment_count (_tmp24_, _tmp25_);
#line 2283 "/home/jens/Source/shotwell/src/Commands.vala"
						if (_tmp26_ < 2) {
#line 20397 "Commands.c"
							Tag* _tmp27_;
							MediaSource* _tmp28_;
							GeeList* _tmp29_;
							GeeList* _tmp30_;
#line 2285 "/home/jens/Source/shotwell/src/Commands.vala"
							_tmp27_ = t;
#line 2285 "/home/jens/Source/shotwell/src/Commands.vala"
							_tmp28_ = ms;
#line 2285 "/home/jens/Source/shotwell/src/Commands.vala"
							_tmp29_ = tag_detach (_tmp27_, _tmp28_);
#line 2285 "/home/jens/Source/shotwell/src/Commands.vala"
							_tmp30_ = _tmp29_;
#line 2285 "/home/jens/Source/shotwell/src/Commands.vala"
							_g_object_unref0 (_tmp30_);
#line 20412 "Commands.c"
						}
#line 2281 "/home/jens/Source/shotwell/src/Commands.vala"
						_g_object_unref0 (ms);
#line 20416 "Commands.c"
					}
#line 2281 "/home/jens/Source/shotwell/src/Commands.vala"
					_g_object_unref0 (_ms_it);
#line 20420 "Commands.c"
				}
#line 2280 "/home/jens/Source/shotwell/src/Commands.vala"
				_g_object_unref0 (t);
#line 20424 "Commands.c"
			}
#line 2280 "/home/jens/Source/shotwell/src/Commands.vala"
			_g_object_unref0 (_t_list);
#line 20428 "Commands.c"
		}
	}
}


static void tag_untag_photos_command_on_source_destroyed (TagUntagPhotosCommand* self, DataSource* source) {
	DataSource* _tmp0_;
	gchar* _tmp1_;
	gchar* _tmp2_;
	GeeCollection* _tmp3_;
	DataSource* _tmp4_;
	gboolean _tmp5_;
#line 2292 "/home/jens/Source/shotwell/src/Commands.vala"
	g_return_if_fail (IS_TAG_UNTAG_PHOTOS_COMMAND (self));
#line 2292 "/home/jens/Source/shotwell/src/Commands.vala"
	g_return_if_fail (IS_DATA_SOURCE (source));
#line 2293 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp0_ = source;
#line 2293 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp1_ = data_object_to_string (G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, TYPE_DATA_OBJECT, DataObject));
#line 2293 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp2_ = _tmp1_;
#line 2293 "/home/jens/Source/shotwell/src/Commands.vala"
	g_debug ("Commands.vala:2293: on_source_destroyed: %s", _tmp2_);
#line 2293 "/home/jens/Source/shotwell/src/Commands.vala"
	_g_free0 (_tmp2_);
#line 2294 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp3_ = self->priv->sources;
#line 2294 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp4_ = source;
#line 2294 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp5_ = gee_collection_contains (_tmp3_, G_TYPE_CHECK_INSTANCE_CAST (_tmp4_, TYPE_MEDIA_SOURCE, MediaSource));
#line 2294 "/home/jens/Source/shotwell/src/Commands.vala"
	if (_tmp5_) {
#line 20463 "Commands.c"
		CommandManager* _tmp6_;
		CommandManager* _tmp7_;
#line 2295 "/home/jens/Source/shotwell/src/Commands.vala"
		_tmp6_ = command_get_command_manager (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_COMMAND, Command));
#line 2295 "/home/jens/Source/shotwell/src/Commands.vala"
		_tmp7_ = _tmp6_;
#line 2295 "/home/jens/Source/shotwell/src/Commands.vala"
		command_manager_reset (_tmp7_);
#line 2295 "/home/jens/Source/shotwell/src/Commands.vala"
		_command_manager_unref0 (_tmp7_);
#line 20474 "Commands.c"
	}
}


static void tag_untag_photos_command_class_init (TagUntagPhotosCommandClass * klass) {
#line 2206 "/home/jens/Source/shotwell/src/Commands.vala"
	tag_untag_photos_command_parent_class = g_type_class_peek_parent (klass);
#line 2206 "/home/jens/Source/shotwell/src/Commands.vala"
	g_type_class_add_private (klass, sizeof (TagUntagPhotosCommandPrivate));
#line 2206 "/home/jens/Source/shotwell/src/Commands.vala"
	((SimpleProxyableCommandClass *) klass)->execute_on_source = (void (*) (SimpleProxyableCommand *, DataSource*)) tag_untag_photos_command_real_execute_on_source;
#line 2206 "/home/jens/Source/shotwell/src/Commands.vala"
	((SimpleProxyableCommandClass *) klass)->undo_on_source = (void (*) (SimpleProxyableCommand *, DataSource*)) tag_untag_photos_command_real_undo_on_source;
#line 2206 "/home/jens/Source/shotwell/src/Commands.vala"
	G_OBJECT_CLASS (klass)->finalize = tag_untag_photos_command_finalize;
#line 20490 "Commands.c"
}


static void tag_untag_photos_command_instance_init (TagUntagPhotosCommand * self) {
#line 2206 "/home/jens/Source/shotwell/src/Commands.vala"
	self->priv = TAG_UNTAG_PHOTOS_COMMAND_GET_PRIVATE (self);
#line 2209 "/home/jens/Source/shotwell/src/Commands.vala"
	self->priv->detached_from = NULL;
#line 2210 "/home/jens/Source/shotwell/src/Commands.vala"
	self->priv->attached_to = NULL;
#line 20501 "Commands.c"
}


static void tag_untag_photos_command_finalize (GObject * obj) {
	TagUntagPhotosCommand * self;
	LibraryPhotoSourceCollection* _tmp0_;
	guint _tmp1_;
	VideoSourceCollection* _tmp2_;
	guint _tmp3_;
#line 2206 "/home/jens/Source/shotwell/src/Commands.vala"
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, TYPE_TAG_UNTAG_PHOTOS_COMMAND, TagUntagPhotosCommand);
#line 2226 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp0_ = library_photo_global;
#line 2226 "/home/jens/Source/shotwell/src/Commands.vala"
	g_signal_parse_name ("item-destroyed", TYPE_SOURCE_COLLECTION, &_tmp1_, NULL, FALSE);
#line 2226 "/home/jens/Source/shotwell/src/Commands.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) _tag_untag_photos_command_on_source_destroyed_source_collection_item_destroyed, self);
#line 2227 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp2_ = video_global;
#line 2227 "/home/jens/Source/shotwell/src/Commands.vala"
	g_signal_parse_name ("item-destroyed", TYPE_SOURCE_COLLECTION, &_tmp3_, NULL, FALSE);
#line 2227 "/home/jens/Source/shotwell/src/Commands.vala"
	g_signal_handlers_disconnect_matched (G_TYPE_CHECK_INSTANCE_CAST (_tmp2_, TYPE_SOURCE_COLLECTION, SourceCollection), G_SIGNAL_MATCH_ID | G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA, _tmp3_, 0, NULL, (GCallback) _tag_untag_photos_command_on_source_destroyed_source_collection_item_destroyed, self);
#line 2207 "/home/jens/Source/shotwell/src/Commands.vala"
	_g_object_unref0 (self->priv->sources);
#line 2209 "/home/jens/Source/shotwell/src/Commands.vala"
	_g_object_unref0 (self->priv->detached_from);
#line 2210 "/home/jens/Source/shotwell/src/Commands.vala"
	_g_object_unref0 (self->priv->attached_to);
#line 2206 "/home/jens/Source/shotwell/src/Commands.vala"
	G_OBJECT_CLASS (tag_untag_photos_command_parent_class)->finalize (obj);
#line 20533 "Commands.c"
}


GType tag_untag_photos_command_get_type (void) {
	static volatile gsize tag_untag_photos_command_type_id__volatile = 0;
	if (g_once_init_enter (&tag_untag_photos_command_type_id__volatile)) {
		static const GTypeInfo g_define_type_info = { sizeof (TagUntagPhotosCommandClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) tag_untag_photos_command_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (TagUntagPhotosCommand), 0, (GInstanceInitFunc) tag_untag_photos_command_instance_init, NULL };
		GType tag_untag_photos_command_type_id;
		tag_untag_photos_command_type_id = g_type_register_static (TYPE_SIMPLE_PROXYABLE_COMMAND, "TagUntagPhotosCommand", &g_define_type_info, 0);
		g_once_init_leave (&tag_untag_photos_command_type_id__volatile, tag_untag_photos_command_type_id);
	}
	return tag_untag_photos_command_type_id__volatile;
}


RenameSavedSearchCommand* rename_saved_search_command_construct (GType object_type, SavedSearch* search, const gchar* new_name) {
	RenameSavedSearchCommand * self = NULL;
	SavedSearch* _tmp0_;
	SavedSearch* _tmp1_;
	gchar* _tmp2_;
	gchar* _tmp3_;
	const gchar* _tmp4_;
	gchar* _tmp5_;
	gchar* _tmp6_;
	SavedSearch* _tmp7_;
	gchar* _tmp8_;
	gchar* _tmp9_;
	SavedSearch* _tmp10_;
	SavedSearch* _tmp11_;
	SavedSearch* _tmp12_;
	gchar* _tmp13_;
	const gchar* _tmp14_;
	gchar* _tmp15_;
#line 2304 "/home/jens/Source/shotwell/src/Commands.vala"
	g_return_val_if_fail (IS_SAVED_SEARCH (search), NULL);
#line 2304 "/home/jens/Source/shotwell/src/Commands.vala"
	g_return_val_if_fail (new_name != NULL, NULL);
#line 2305 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp0_ = search;
#line 2305 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp1_ = search;
#line 2305 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp2_ = data_object_get_name (G_TYPE_CHECK_INSTANCE_CAST (_tmp1_, TYPE_DATA_OBJECT, DataObject));
#line 2305 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp3_ = _tmp2_;
#line 2305 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp4_ = new_name;
#line 2305 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp5_ = resources_rename_search_label (_tmp3_, _tmp4_);
#line 2305 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp6_ = _tmp5_;
#line 2305 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp7_ = search;
#line 2305 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp8_ = data_object_get_name (G_TYPE_CHECK_INSTANCE_CAST (_tmp7_, TYPE_DATA_OBJECT, DataObject));
#line 2305 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp9_ = _tmp8_;
#line 2305 "/home/jens/Source/shotwell/src/Commands.vala"
	self = (RenameSavedSearchCommand*) single_data_source_command_construct (object_type, G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, TYPE_DATA_SOURCE, DataSource), _tmp6_, _tmp9_);
#line 2305 "/home/jens/Source/shotwell/src/Commands.vala"
	_g_free0 (_tmp9_);
#line 2305 "/home/jens/Source/shotwell/src/Commands.vala"
	_g_free0 (_tmp6_);
#line 2305 "/home/jens/Source/shotwell/src/Commands.vala"
	_g_free0 (_tmp3_);
#line 2307 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp10_ = search;
#line 2307 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp11_ = _g_object_ref0 (_tmp10_);
#line 2307 "/home/jens/Source/shotwell/src/Commands.vala"
	_g_object_unref0 (self->priv->search);
#line 2307 "/home/jens/Source/shotwell/src/Commands.vala"
	self->priv->search = _tmp11_;
#line 2308 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp12_ = search;
#line 2308 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp13_ = data_object_get_name (G_TYPE_CHECK_INSTANCE_CAST (_tmp12_, TYPE_DATA_OBJECT, DataObject));
#line 2308 "/home/jens/Source/shotwell/src/Commands.vala"
	_g_free0 (self->priv->old_name);
#line 2308 "/home/jens/Source/shotwell/src/Commands.vala"
	self->priv->old_name = _tmp13_;
#line 2309 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp14_ = new_name;
#line 2309 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp15_ = g_strdup (_tmp14_);
#line 2309 "/home/jens/Source/shotwell/src/Commands.vala"
	_g_free0 (self->priv->new_name);
#line 2309 "/home/jens/Source/shotwell/src/Commands.vala"
	self->priv->new_name = _tmp15_;
#line 2304 "/home/jens/Source/shotwell/src/Commands.vala"
	return self;
#line 20625 "Commands.c"
}


RenameSavedSearchCommand* rename_saved_search_command_new (SavedSearch* search, const gchar* new_name) {
#line 2304 "/home/jens/Source/shotwell/src/Commands.vala"
	return rename_saved_search_command_construct (TYPE_RENAME_SAVED_SEARCH_COMMAND, search, new_name);
#line 20632 "Commands.c"
}


static void rename_saved_search_command_real_execute (Command* base) {
	RenameSavedSearchCommand * self;
	SavedSearch* _tmp0_;
	const gchar* _tmp1_;
	gboolean _tmp2_;
#line 2312 "/home/jens/Source/shotwell/src/Commands.vala"
	self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_RENAME_SAVED_SEARCH_COMMAND, RenameSavedSearchCommand);
#line 2313 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp0_ = self->priv->search;
#line 2313 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp1_ = self->priv->new_name;
#line 2313 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp2_ = saved_search_rename (_tmp0_, _tmp1_);
#line 2313 "/home/jens/Source/shotwell/src/Commands.vala"
	if (!_tmp2_) {
#line 20651 "Commands.c"
		const gchar* _tmp3_;
		gchar* _tmp4_;
		gchar* _tmp5_;
#line 2314 "/home/jens/Source/shotwell/src/Commands.vala"
		_tmp3_ = self->priv->new_name;
#line 2314 "/home/jens/Source/shotwell/src/Commands.vala"
		_tmp4_ = resources_rename_search_exists_message (_tmp3_);
#line 2314 "/home/jens/Source/shotwell/src/Commands.vala"
		_tmp5_ = _tmp4_;
#line 2314 "/home/jens/Source/shotwell/src/Commands.vala"
		app_window_error_message (_tmp5_, NULL);
#line 2314 "/home/jens/Source/shotwell/src/Commands.vala"
		_g_free0 (_tmp5_);
#line 20665 "Commands.c"
	}
}


static void rename_saved_search_command_real_undo (Command* base) {
	RenameSavedSearchCommand * self;
	SavedSearch* _tmp0_;
	const gchar* _tmp1_;
	gboolean _tmp2_;
#line 2317 "/home/jens/Source/shotwell/src/Commands.vala"
	self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_RENAME_SAVED_SEARCH_COMMAND, RenameSavedSearchCommand);
#line 2318 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp0_ = self->priv->search;
#line 2318 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp1_ = self->priv->old_name;
#line 2318 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp2_ = saved_search_rename (_tmp0_, _tmp1_);
#line 2318 "/home/jens/Source/shotwell/src/Commands.vala"
	if (!_tmp2_) {
#line 20685 "Commands.c"
		const gchar* _tmp3_;
		gchar* _tmp4_;
		gchar* _tmp5_;
#line 2319 "/home/jens/Source/shotwell/src/Commands.vala"
		_tmp3_ = self->priv->old_name;
#line 2319 "/home/jens/Source/shotwell/src/Commands.vala"
		_tmp4_ = resources_rename_search_exists_message (_tmp3_);
#line 2319 "/home/jens/Source/shotwell/src/Commands.vala"
		_tmp5_ = _tmp4_;
#line 2319 "/home/jens/Source/shotwell/src/Commands.vala"
		app_window_error_message (_tmp5_, NULL);
#line 2319 "/home/jens/Source/shotwell/src/Commands.vala"
		_g_free0 (_tmp5_);
#line 20699 "Commands.c"
	}
}


static void rename_saved_search_command_class_init (RenameSavedSearchCommandClass * klass) {
#line 2299 "/home/jens/Source/shotwell/src/Commands.vala"
	rename_saved_search_command_parent_class = g_type_class_peek_parent (klass);
#line 2299 "/home/jens/Source/shotwell/src/Commands.vala"
	g_type_class_add_private (klass, sizeof (RenameSavedSearchCommandPrivate));
#line 2299 "/home/jens/Source/shotwell/src/Commands.vala"
	((CommandClass *) klass)->execute = (void (*) (Command *)) rename_saved_search_command_real_execute;
#line 2299 "/home/jens/Source/shotwell/src/Commands.vala"
	((CommandClass *) klass)->undo = (void (*) (Command *)) rename_saved_search_command_real_undo;
#line 2299 "/home/jens/Source/shotwell/src/Commands.vala"
	G_OBJECT_CLASS (klass)->finalize = rename_saved_search_command_finalize;
#line 20715 "Commands.c"
}


static void rename_saved_search_command_instance_init (RenameSavedSearchCommand * self) {
#line 2299 "/home/jens/Source/shotwell/src/Commands.vala"
	self->priv = RENAME_SAVED_SEARCH_COMMAND_GET_PRIVATE (self);
#line 20722 "Commands.c"
}


static void rename_saved_search_command_finalize (GObject * obj) {
	RenameSavedSearchCommand * self;
#line 2299 "/home/jens/Source/shotwell/src/Commands.vala"
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, TYPE_RENAME_SAVED_SEARCH_COMMAND, RenameSavedSearchCommand);
#line 2300 "/home/jens/Source/shotwell/src/Commands.vala"
	_g_object_unref0 (self->priv->search);
#line 2301 "/home/jens/Source/shotwell/src/Commands.vala"
	_g_free0 (self->priv->old_name);
#line 2302 "/home/jens/Source/shotwell/src/Commands.vala"
	_g_free0 (self->priv->new_name);
#line 2299 "/home/jens/Source/shotwell/src/Commands.vala"
	G_OBJECT_CLASS (rename_saved_search_command_parent_class)->finalize (obj);
#line 20738 "Commands.c"
}


GType rename_saved_search_command_get_type (void) {
	static volatile gsize rename_saved_search_command_type_id__volatile = 0;
	if (g_once_init_enter (&rename_saved_search_command_type_id__volatile)) {
		static const GTypeInfo g_define_type_info = { sizeof (RenameSavedSearchCommandClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) rename_saved_search_command_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (RenameSavedSearchCommand), 0, (GInstanceInitFunc) rename_saved_search_command_instance_init, NULL };
		GType rename_saved_search_command_type_id;
		rename_saved_search_command_type_id = g_type_register_static (TYPE_SINGLE_DATA_SOURCE_COMMAND, "RenameSavedSearchCommand", &g_define_type_info, 0);
		g_once_init_leave (&rename_saved_search_command_type_id__volatile, rename_saved_search_command_type_id);
	}
	return rename_saved_search_command_type_id__volatile;
}


DeleteSavedSearchCommand* delete_saved_search_command_construct (GType object_type, SavedSearch* search) {
	DeleteSavedSearchCommand * self = NULL;
	SavedSearch* _tmp0_;
	SavedSearch* _tmp1_;
	gchar* _tmp2_;
	gchar* _tmp3_;
	gchar* _tmp4_;
	gchar* _tmp5_;
	SavedSearch* _tmp6_;
	gchar* _tmp7_;
	gchar* _tmp8_;
	SavedSearch* _tmp9_;
	SavedSearch* _tmp10_;
#line 2326 "/home/jens/Source/shotwell/src/Commands.vala"
	g_return_val_if_fail (IS_SAVED_SEARCH (search), NULL);
#line 2327 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp0_ = search;
#line 2327 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp1_ = search;
#line 2327 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp2_ = data_object_get_name (G_TYPE_CHECK_INSTANCE_CAST (_tmp1_, TYPE_DATA_OBJECT, DataObject));
#line 2327 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp3_ = _tmp2_;
#line 2327 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp4_ = resources_delete_search_label (_tmp3_);
#line 2327 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp5_ = _tmp4_;
#line 2327 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp6_ = search;
#line 2327 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp7_ = data_object_get_name (G_TYPE_CHECK_INSTANCE_CAST (_tmp6_, TYPE_DATA_OBJECT, DataObject));
#line 2327 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp8_ = _tmp7_;
#line 2327 "/home/jens/Source/shotwell/src/Commands.vala"
	self = (DeleteSavedSearchCommand*) single_data_source_command_construct (object_type, G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, TYPE_DATA_SOURCE, DataSource), _tmp5_, _tmp8_);
#line 2327 "/home/jens/Source/shotwell/src/Commands.vala"
	_g_free0 (_tmp8_);
#line 2327 "/home/jens/Source/shotwell/src/Commands.vala"
	_g_free0 (_tmp5_);
#line 2327 "/home/jens/Source/shotwell/src/Commands.vala"
	_g_free0 (_tmp3_);
#line 2329 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp9_ = search;
#line 2329 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp10_ = _g_object_ref0 (_tmp9_);
#line 2329 "/home/jens/Source/shotwell/src/Commands.vala"
	_g_object_unref0 (self->priv->search);
#line 2329 "/home/jens/Source/shotwell/src/Commands.vala"
	self->priv->search = _tmp10_;
#line 2326 "/home/jens/Source/shotwell/src/Commands.vala"
	return self;
#line 20805 "Commands.c"
}


DeleteSavedSearchCommand* delete_saved_search_command_new (SavedSearch* search) {
#line 2326 "/home/jens/Source/shotwell/src/Commands.vala"
	return delete_saved_search_command_construct (TYPE_DELETE_SAVED_SEARCH_COMMAND, search);
#line 20812 "Commands.c"
}


static void delete_saved_search_command_real_execute (Command* base) {
	DeleteSavedSearchCommand * self;
	SavedSearchTable* _tmp0_;
	SavedSearchTable* _tmp1_;
	SavedSearch* _tmp2_;
#line 2332 "/home/jens/Source/shotwell/src/Commands.vala"
	self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_DELETE_SAVED_SEARCH_COMMAND, DeleteSavedSearchCommand);
#line 2333 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp0_ = saved_search_table_get_instance ();
#line 2333 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp1_ = _tmp0_;
#line 2333 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp2_ = self->priv->search;
#line 2333 "/home/jens/Source/shotwell/src/Commands.vala"
	saved_search_table_remove (_tmp1_, _tmp2_);
#line 2333 "/home/jens/Source/shotwell/src/Commands.vala"
	_saved_search_table_unref0 (_tmp1_);
#line 20833 "Commands.c"
}


static void delete_saved_search_command_real_undo (Command* base) {
	DeleteSavedSearchCommand * self;
	SavedSearch* _tmp0_;
#line 2336 "/home/jens/Source/shotwell/src/Commands.vala"
	self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_DELETE_SAVED_SEARCH_COMMAND, DeleteSavedSearchCommand);
#line 2337 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp0_ = self->priv->search;
#line 2337 "/home/jens/Source/shotwell/src/Commands.vala"
	saved_search_reconstitute (_tmp0_);
#line 20846 "Commands.c"
}


static void delete_saved_search_command_class_init (DeleteSavedSearchCommandClass * klass) {
#line 2323 "/home/jens/Source/shotwell/src/Commands.vala"
	delete_saved_search_command_parent_class = g_type_class_peek_parent (klass);
#line 2323 "/home/jens/Source/shotwell/src/Commands.vala"
	g_type_class_add_private (klass, sizeof (DeleteSavedSearchCommandPrivate));
#line 2323 "/home/jens/Source/shotwell/src/Commands.vala"
	((CommandClass *) klass)->execute = (void (*) (Command *)) delete_saved_search_command_real_execute;
#line 2323 "/home/jens/Source/shotwell/src/Commands.vala"
	((CommandClass *) klass)->undo = (void (*) (Command *)) delete_saved_search_command_real_undo;
#line 2323 "/home/jens/Source/shotwell/src/Commands.vala"
	G_OBJECT_CLASS (klass)->finalize = delete_saved_search_command_finalize;
#line 20861 "Commands.c"
}


static void delete_saved_search_command_instance_init (DeleteSavedSearchCommand * self) {
#line 2323 "/home/jens/Source/shotwell/src/Commands.vala"
	self->priv = DELETE_SAVED_SEARCH_COMMAND_GET_PRIVATE (self);
#line 20868 "Commands.c"
}


static void delete_saved_search_command_finalize (GObject * obj) {
	DeleteSavedSearchCommand * self;
#line 2323 "/home/jens/Source/shotwell/src/Commands.vala"
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, TYPE_DELETE_SAVED_SEARCH_COMMAND, DeleteSavedSearchCommand);
#line 2324 "/home/jens/Source/shotwell/src/Commands.vala"
	_g_object_unref0 (self->priv->search);
#line 2323 "/home/jens/Source/shotwell/src/Commands.vala"
	G_OBJECT_CLASS (delete_saved_search_command_parent_class)->finalize (obj);
#line 20880 "Commands.c"
}


GType delete_saved_search_command_get_type (void) {
	static volatile gsize delete_saved_search_command_type_id__volatile = 0;
	if (g_once_init_enter (&delete_saved_search_command_type_id__volatile)) {
		static const GTypeInfo g_define_type_info = { sizeof (DeleteSavedSearchCommandClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) delete_saved_search_command_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (DeleteSavedSearchCommand), 0, (GInstanceInitFunc) delete_saved_search_command_instance_init, NULL };
		GType delete_saved_search_command_type_id;
		delete_saved_search_command_type_id = g_type_register_static (TYPE_SINGLE_DATA_SOURCE_COMMAND, "DeleteSavedSearchCommand", &g_define_type_info, 0);
		g_once_init_leave (&delete_saved_search_command_type_id__volatile, delete_saved_search_command_type_id);
	}
	return delete_saved_search_command_type_id__volatile;
}


static void _trash_untrash_photos_command_on_photo_destroyed_source_collection_item_destroyed (SourceCollection* _sender, DataSource* source, gpointer self) {
#line 2358 "/home/jens/Source/shotwell/src/Commands.vala"
	trash_untrash_photos_command_on_photo_destroyed ((TrashUntrashPhotosCommand*) self, source);
#line 20899 "Commands.c"
}


TrashUntrashPhotosCommand* trash_untrash_photos_command_construct (GType object_type, GeeCollection* sources, gboolean to_trash) {
	TrashUntrashPhotosCommand * self = NULL;
	const gchar* _tmp0_ = NULL;
	gboolean _tmp1_;
	const gchar* _tmp2_ = NULL;
	gboolean _tmp3_;
	GeeCollection* _tmp4_;
	GeeCollection* _tmp5_;
	gboolean _tmp6_;
	LibraryPhotoSourceCollection* _tmp7_;
	VideoSourceCollection* _tmp8_;
#line 2345 "/home/jens/Source/shotwell/src/Commands.vala"
	g_return_val_if_fail (GEE_IS_COLLECTION (sources), NULL);
#line 2347 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp1_ = to_trash;
#line 2347 "/home/jens/Source/shotwell/src/Commands.vala"
	if (_tmp1_) {
#line 2347 "/home/jens/Source/shotwell/src/Commands.vala"
		_tmp0_ = _ ("Move Photos to Trash");
#line 20922 "Commands.c"
	} else {
#line 2347 "/home/jens/Source/shotwell/src/Commands.vala"
		_tmp0_ = _ ("Restore Photos from Trash");
#line 20926 "Commands.c"
	}
#line 2348 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp3_ = to_trash;
#line 2348 "/home/jens/Source/shotwell/src/Commands.vala"
	if (_tmp3_) {
#line 2348 "/home/jens/Source/shotwell/src/Commands.vala"
		_tmp2_ = _ ("Move the photos to the Shotwell trash");
#line 20934 "Commands.c"
	} else {
#line 2348 "/home/jens/Source/shotwell/src/Commands.vala"
		_tmp2_ = _ ("Restore the photos back to the Shotwell library");
#line 20938 "Commands.c"
	}
#line 2346 "/home/jens/Source/shotwell/src/Commands.vala"
	self = (TrashUntrashPhotosCommand*) page_command_construct (object_type, _tmp0_, _tmp2_);
#line 2350 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp4_ = sources;
#line 2350 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp5_ = _g_object_ref0 (_tmp4_);
#line 2350 "/home/jens/Source/shotwell/src/Commands.vala"
	_g_object_unref0 (self->priv->sources);
#line 2350 "/home/jens/Source/shotwell/src/Commands.vala"
	self->priv->sources = _tmp5_;
#line 2351 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp6_ = to_trash;
#line 2351 "/home/jens/Source/shotwell/src/Commands.vala"
	self->priv->to_trash = _tmp6_;
#line 2353 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp7_ = library_photo_global;
#line 2353 "/home/jens/Source/shotwell/src/Commands.vala"
	g_signal_connect_object (G_TYPE_CHECK_INSTANCE_CAST (_tmp7_, TYPE_SOURCE_COLLECTION, SourceCollection), "item-destroyed", (GCallback) _trash_untrash_photos_command_on_photo_destroyed_source_collection_item_destroyed, self, 0);
#line 2354 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp8_ = video_global;
#line 2354 "/home/jens/Source/shotwell/src/Commands.vala"
	g_signal_connect_object (G_TYPE_CHECK_INSTANCE_CAST (_tmp8_, TYPE_SOURCE_COLLECTION, SourceCollection), "item-destroyed", (GCallback) _trash_untrash_photos_command_on_photo_destroyed_source_collection_item_destroyed, self, 0);
#line 2345 "/home/jens/Source/shotwell/src/Commands.vala"
	return self;
#line 20964 "Commands.c"
}


TrashUntrashPhotosCommand* trash_untrash_photos_command_new (GeeCollection* sources, gboolean to_trash) {
#line 2345 "/home/jens/Source/shotwell/src/Commands.vala"
	return trash_untrash_photos_command_construct (TYPE_TRASH_UNTRASH_PHOTOS_COMMAND, sources, to_trash);
#line 20971 "Commands.c"
}


static ProgressDialog* trash_untrash_photos_command_get_progress_dialog (TrashUntrashPhotosCommand* self, gboolean to_trash) {
	ProgressDialog* result = NULL;
	GeeCollection* _tmp0_;
	gint _tmp1_;
	gint _tmp2_;
	const gchar* _tmp3_ = NULL;
	gboolean _tmp4_;
	ProgressDialog* dialog = NULL;
	AppWindow* _tmp5_;
	AppWindow* _tmp6_;
	ProgressDialog* _tmp7_;
	ProgressDialog* _tmp8_;
	ProgressDialog* _tmp9_;
	GeeCollection* _tmp10_;
	gint _tmp11_;
	gint _tmp12_;
	gint _tmp13_;
#line 2362 "/home/jens/Source/shotwell/src/Commands.vala"
	g_return_val_if_fail (IS_TRASH_UNTRASH_PHOTOS_COMMAND (self), NULL);
#line 2363 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp0_ = self->priv->sources;
#line 2363 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp1_ = gee_collection_get_size (_tmp0_);
#line 2363 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp2_ = _tmp1_;
#line 2363 "/home/jens/Source/shotwell/src/Commands.vala"
	if (_tmp2_ <= 5) {
#line 2364 "/home/jens/Source/shotwell/src/Commands.vala"
		result = NULL;
#line 2364 "/home/jens/Source/shotwell/src/Commands.vala"
		return result;
#line 21006 "Commands.c"
	}
#line 2367 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp4_ = to_trash;
#line 2367 "/home/jens/Source/shotwell/src/Commands.vala"
	if (_tmp4_) {
#line 2367 "/home/jens/Source/shotwell/src/Commands.vala"
		_tmp3_ = _ ("Moving Photos to Trash");
#line 21014 "Commands.c"
	} else {
#line 2367 "/home/jens/Source/shotwell/src/Commands.vala"
		_tmp3_ = _ ("Restoring Photos From Trash");
#line 21018 "Commands.c"
	}
#line 2366 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp5_ = app_window_get_instance ();
#line 2366 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp6_ = _tmp5_;
#line 2366 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp7_ = progress_dialog_new (G_TYPE_CHECK_INSTANCE_CAST (_tmp6_, gtk_window_get_type (), GtkWindow), _tmp3_, NULL);
#line 2366 "/home/jens/Source/shotwell/src/Commands.vala"
	g_object_ref_sink (_tmp7_);
#line 2366 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp8_ = _tmp7_;
#line 2366 "/home/jens/Source/shotwell/src/Commands.vala"
	_g_object_unref0 (_tmp6_);
#line 2366 "/home/jens/Source/shotwell/src/Commands.vala"
	dialog = _tmp8_;
#line 2368 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp9_ = dialog;
#line 2368 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp10_ = self->priv->sources;
#line 2368 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp11_ = gee_collection_get_size (_tmp10_);
#line 2368 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp12_ = _tmp11_;
#line 2368 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp13_ = CLAMP (_tmp12_ / 5, 2, 10);
#line 2368 "/home/jens/Source/shotwell/src/Commands.vala"
	progress_dialog_update_display_every (_tmp9_, _tmp13_);
#line 2370 "/home/jens/Source/shotwell/src/Commands.vala"
	result = dialog;
#line 2370 "/home/jens/Source/shotwell/src/Commands.vala"
	return result;
#line 21050 "Commands.c"
}


static gboolean _progress_dialog_monitor_progress_monitor (guint64 current, guint64 total, gboolean do_event_loop, gpointer self) {
	gboolean result;
	result = progress_dialog_monitor ((ProgressDialog*) self, current, total, do_event_loop);
#line 2378 "/home/jens/Source/shotwell/src/Commands.vala"
	return result;
#line 21059 "Commands.c"
}


static void trash_untrash_photos_command_real_execute (Command* base) {
	TrashUntrashPhotosCommand * self;
	ProgressDialog* dialog = NULL;
	gboolean _tmp0_;
	ProgressDialog* _tmp1_;
	ProgressMonitor monitor = NULL;
	void* monitor_target;
	GDestroyNotify monitor_target_destroy_notify;
	ProgressDialog* _tmp2_;
	gboolean _tmp4_;
	ProgressDialog* _tmp7_;
#line 2373 "/home/jens/Source/shotwell/src/Commands.vala"
	self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_TRASH_UNTRASH_PHOTOS_COMMAND, TrashUntrashPhotosCommand);
#line 2374 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp0_ = self->priv->to_trash;
#line 2374 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp1_ = trash_untrash_photos_command_get_progress_dialog (self, _tmp0_);
#line 2374 "/home/jens/Source/shotwell/src/Commands.vala"
	dialog = _tmp1_;
#line 2376 "/home/jens/Source/shotwell/src/Commands.vala"
	monitor = NULL;
#line 2376 "/home/jens/Source/shotwell/src/Commands.vala"
	monitor_target = NULL;
#line 2376 "/home/jens/Source/shotwell/src/Commands.vala"
	monitor_target_destroy_notify = NULL;
#line 2377 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp2_ = dialog;
#line 2377 "/home/jens/Source/shotwell/src/Commands.vala"
	if (_tmp2_ != NULL) {
#line 21092 "Commands.c"
		ProgressDialog* _tmp3_;
#line 2378 "/home/jens/Source/shotwell/src/Commands.vala"
		_tmp3_ = dialog;
#line 2378 "/home/jens/Source/shotwell/src/Commands.vala"
		(monitor_target_destroy_notify == NULL) ? NULL : (monitor_target_destroy_notify (monitor_target), NULL);
#line 2378 "/home/jens/Source/shotwell/src/Commands.vala"
		monitor = NULL;
#line 2378 "/home/jens/Source/shotwell/src/Commands.vala"
		monitor_target = NULL;
#line 2378 "/home/jens/Source/shotwell/src/Commands.vala"
		monitor_target_destroy_notify = NULL;
#line 2378 "/home/jens/Source/shotwell/src/Commands.vala"
		monitor = _progress_dialog_monitor_progress_monitor;
#line 2378 "/home/jens/Source/shotwell/src/Commands.vala"
		monitor_target = g_object_ref (_tmp3_);
#line 2378 "/home/jens/Source/shotwell/src/Commands.vala"
		monitor_target_destroy_notify = g_object_unref;
#line 21110 "Commands.c"
	}
#line 2380 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp4_ = self->priv->to_trash;
#line 2380 "/home/jens/Source/shotwell/src/Commands.vala"
	if (_tmp4_) {
#line 21116 "Commands.c"
		ProgressMonitor _tmp5_;
		void* _tmp5__target;
#line 2381 "/home/jens/Source/shotwell/src/Commands.vala"
		_tmp5_ = monitor;
#line 2381 "/home/jens/Source/shotwell/src/Commands.vala"
		_tmp5__target = monitor_target;
#line 2381 "/home/jens/Source/shotwell/src/Commands.vala"
		trash_untrash_photos_command_trash (self, _tmp5_, _tmp5__target);
#line 21125 "Commands.c"
	} else {
		ProgressMonitor _tmp6_;
		void* _tmp6__target;
#line 2383 "/home/jens/Source/shotwell/src/Commands.vala"
		_tmp6_ = monitor;
#line 2383 "/home/jens/Source/shotwell/src/Commands.vala"
		_tmp6__target = monitor_target;
#line 2383 "/home/jens/Source/shotwell/src/Commands.vala"
		trash_untrash_photos_command_untrash (self, _tmp6_, _tmp6__target);
#line 21135 "Commands.c"
	}
#line 2385 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp7_ = dialog;
#line 2385 "/home/jens/Source/shotwell/src/Commands.vala"
	if (_tmp7_ != NULL) {
#line 21141 "Commands.c"
		ProgressDialog* _tmp8_;
#line 2386 "/home/jens/Source/shotwell/src/Commands.vala"
		_tmp8_ = dialog;
#line 2386 "/home/jens/Source/shotwell/src/Commands.vala"
		progress_dialog_close (_tmp8_);
#line 21147 "Commands.c"
	}
#line 2373 "/home/jens/Source/shotwell/src/Commands.vala"
	(monitor_target_destroy_notify == NULL) ? NULL : (monitor_target_destroy_notify (monitor_target), NULL);
#line 2373 "/home/jens/Source/shotwell/src/Commands.vala"
	monitor = NULL;
#line 2373 "/home/jens/Source/shotwell/src/Commands.vala"
	monitor_target = NULL;
#line 2373 "/home/jens/Source/shotwell/src/Commands.vala"
	monitor_target_destroy_notify = NULL;
#line 2373 "/home/jens/Source/shotwell/src/Commands.vala"
	_g_object_unref0 (dialog);
#line 21159 "Commands.c"
}


static void trash_untrash_photos_command_real_undo (Command* base) {
	TrashUntrashPhotosCommand * self;
	ProgressDialog* dialog = NULL;
	gboolean _tmp0_;
	ProgressDialog* _tmp1_;
	ProgressMonitor monitor = NULL;
	void* monitor_target;
	GDestroyNotify monitor_target_destroy_notify;
	ProgressDialog* _tmp2_;
	gboolean _tmp4_;
	ProgressDialog* _tmp7_;
#line 2389 "/home/jens/Source/shotwell/src/Commands.vala"
	self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_TRASH_UNTRASH_PHOTOS_COMMAND, TrashUntrashPhotosCommand);
#line 2390 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp0_ = self->priv->to_trash;
#line 2390 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp1_ = trash_untrash_photos_command_get_progress_dialog (self, !_tmp0_);
#line 2390 "/home/jens/Source/shotwell/src/Commands.vala"
	dialog = _tmp1_;
#line 2392 "/home/jens/Source/shotwell/src/Commands.vala"
	monitor = NULL;
#line 2392 "/home/jens/Source/shotwell/src/Commands.vala"
	monitor_target = NULL;
#line 2392 "/home/jens/Source/shotwell/src/Commands.vala"
	monitor_target_destroy_notify = NULL;
#line 2393 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp2_ = dialog;
#line 2393 "/home/jens/Source/shotwell/src/Commands.vala"
	if (_tmp2_ != NULL) {
#line 21192 "Commands.c"
		ProgressDialog* _tmp3_;
#line 2394 "/home/jens/Source/shotwell/src/Commands.vala"
		_tmp3_ = dialog;
#line 2394 "/home/jens/Source/shotwell/src/Commands.vala"
		(monitor_target_destroy_notify == NULL) ? NULL : (monitor_target_destroy_notify (monitor_target), NULL);
#line 2394 "/home/jens/Source/shotwell/src/Commands.vala"
		monitor = NULL;
#line 2394 "/home/jens/Source/shotwell/src/Commands.vala"
		monitor_target = NULL;
#line 2394 "/home/jens/Source/shotwell/src/Commands.vala"
		monitor_target_destroy_notify = NULL;
#line 2394 "/home/jens/Source/shotwell/src/Commands.vala"
		monitor = _progress_dialog_monitor_progress_monitor;
#line 2394 "/home/jens/Source/shotwell/src/Commands.vala"
		monitor_target = g_object_ref (_tmp3_);
#line 2394 "/home/jens/Source/shotwell/src/Commands.vala"
		monitor_target_destroy_notify = g_object_unref;
#line 21210 "Commands.c"
	}
#line 2396 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp4_ = self->priv->to_trash;
#line 2396 "/home/jens/Source/shotwell/src/Commands.vala"
	if (_tmp4_) {
#line 21216 "Commands.c"
		ProgressMonitor _tmp5_;
		void* _tmp5__target;
#line 2397 "/home/jens/Source/shotwell/src/Commands.vala"
		_tmp5_ = monitor;
#line 2397 "/home/jens/Source/shotwell/src/Commands.vala"
		_tmp5__target = monitor_target;
#line 2397 "/home/jens/Source/shotwell/src/Commands.vala"
		trash_untrash_photos_command_untrash (self, _tmp5_, _tmp5__target);
#line 21225 "Commands.c"
	} else {
		ProgressMonitor _tmp6_;
		void* _tmp6__target;
#line 2399 "/home/jens/Source/shotwell/src/Commands.vala"
		_tmp6_ = monitor;
#line 2399 "/home/jens/Source/shotwell/src/Commands.vala"
		_tmp6__target = monitor_target;
#line 2399 "/home/jens/Source/shotwell/src/Commands.vala"
		trash_untrash_photos_command_trash (self, _tmp6_, _tmp6__target);
#line 21235 "Commands.c"
	}
#line 2401 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp7_ = dialog;
#line 2401 "/home/jens/Source/shotwell/src/Commands.vala"
	if (_tmp7_ != NULL) {
#line 21241 "Commands.c"
		ProgressDialog* _tmp8_;
#line 2402 "/home/jens/Source/shotwell/src/Commands.vala"
		_tmp8_ = dialog;
#line 2402 "/home/jens/Source/shotwell/src/Commands.vala"
		progress_dialog_close (_tmp8_);
#line 21247 "Commands.c"
	}
#line 2389 "/home/jens/Source/shotwell/src/Commands.vala"
	(monitor_target_destroy_notify == NULL) ? NULL : (monitor_target_destroy_notify (monitor_target), NULL);
#line 2389 "/home/jens/Source/shotwell/src/Commands.vala"
	monitor = NULL;
#line 2389 "/home/jens/Source/shotwell/src/Commands.vala"
	monitor_target = NULL;
#line 2389 "/home/jens/Source/shotwell/src/Commands.vala"
	monitor_target_destroy_notify = NULL;
#line 2389 "/home/jens/Source/shotwell/src/Commands.vala"
	_g_object_unref0 (dialog);
#line 21259 "Commands.c"
}


static void trash_untrash_photos_command_trash (TrashUntrashPhotosCommand* self, ProgressMonitor monitor, void* monitor_target) {
	gint ctr = 0;
	gint count = 0;
	GeeCollection* _tmp0_;
	gint _tmp1_;
	gint _tmp2_;
	LibraryPhotoSourceCollection* _tmp3_;
	TransactionController* _tmp4_;
	TransactionController* _tmp5_;
	VideoSourceCollection* _tmp6_;
	TransactionController* _tmp7_;
	TransactionController* _tmp8_;
	LibraryPhotoSourceCollection* _tmp21_;
	TransactionController* _tmp22_;
	TransactionController* _tmp23_;
	VideoSourceCollection* _tmp24_;
	TransactionController* _tmp25_;
	TransactionController* _tmp26_;
#line 2405 "/home/jens/Source/shotwell/src/Commands.vala"
	g_return_if_fail (IS_TRASH_UNTRASH_PHOTOS_COMMAND (self));
#line 2406 "/home/jens/Source/shotwell/src/Commands.vala"
	ctr = 0;
#line 2407 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp0_ = self->priv->sources;
#line 2407 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp1_ = gee_collection_get_size (_tmp0_);
#line 2407 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp2_ = _tmp1_;
#line 2407 "/home/jens/Source/shotwell/src/Commands.vala"
	count = _tmp2_;
#line 2409 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp3_ = library_photo_global;
#line 2409 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp4_ = media_source_collection_get_transaction_controller (G_TYPE_CHECK_INSTANCE_CAST (_tmp3_, TYPE_MEDIA_SOURCE_COLLECTION, MediaSourceCollection));
#line 2409 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp5_ = _tmp4_;
#line 2409 "/home/jens/Source/shotwell/src/Commands.vala"
	transaction_controller_begin (_tmp5_);
#line 2410 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp6_ = video_global;
#line 2410 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp7_ = media_source_collection_get_transaction_controller (G_TYPE_CHECK_INSTANCE_CAST (_tmp6_, TYPE_MEDIA_SOURCE_COLLECTION, MediaSourceCollection));
#line 2410 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp8_ = _tmp7_;
#line 2410 "/home/jens/Source/shotwell/src/Commands.vala"
	transaction_controller_begin (_tmp8_);
#line 21309 "Commands.c"
	{
		GeeIterator* _source_it = NULL;
		GeeCollection* _tmp9_;
		GeeIterator* _tmp10_;
#line 2412 "/home/jens/Source/shotwell/src/Commands.vala"
		_tmp9_ = self->priv->sources;
#line 2412 "/home/jens/Source/shotwell/src/Commands.vala"
		_tmp10_ = gee_iterable_iterator (G_TYPE_CHECK_INSTANCE_CAST (_tmp9_, GEE_TYPE_ITERABLE, GeeIterable));
#line 2412 "/home/jens/Source/shotwell/src/Commands.vala"
		_source_it = _tmp10_;
#line 2412 "/home/jens/Source/shotwell/src/Commands.vala"
		while (TRUE) {
#line 21322 "Commands.c"
			GeeIterator* _tmp11_;
			gboolean _tmp12_;
			MediaSource* source = NULL;
			GeeIterator* _tmp13_;
			gpointer _tmp14_;
			MediaSource* _tmp15_;
			ProgressMonitor _tmp16_;
			void* _tmp16__target;
#line 2412 "/home/jens/Source/shotwell/src/Commands.vala"
			_tmp11_ = _source_it;
#line 2412 "/home/jens/Source/shotwell/src/Commands.vala"
			_tmp12_ = gee_iterator_next (_tmp11_);
#line 2412 "/home/jens/Source/shotwell/src/Commands.vala"
			if (!_tmp12_) {
#line 2412 "/home/jens/Source/shotwell/src/Commands.vala"
				break;
#line 21339 "Commands.c"
			}
#line 2412 "/home/jens/Source/shotwell/src/Commands.vala"
			_tmp13_ = _source_it;
#line 2412 "/home/jens/Source/shotwell/src/Commands.vala"
			_tmp14_ = gee_iterator_get (_tmp13_);
#line 2412 "/home/jens/Source/shotwell/src/Commands.vala"
			source = (MediaSource*) _tmp14_;
#line 2413 "/home/jens/Source/shotwell/src/Commands.vala"
			_tmp15_ = source;
#line 2413 "/home/jens/Source/shotwell/src/Commands.vala"
			media_source_trash (_tmp15_);
#line 2414 "/home/jens/Source/shotwell/src/Commands.vala"
			_tmp16_ = monitor;
#line 2414 "/home/jens/Source/shotwell/src/Commands.vala"
			_tmp16__target = monitor_target;
#line 2414 "/home/jens/Source/shotwell/src/Commands.vala"
			if (_tmp16_ != NULL) {
#line 21357 "Commands.c"
				ProgressMonitor _tmp17_;
				void* _tmp17__target;
				gint _tmp18_;
				gint _tmp19_;
				gint _tmp20_;
#line 2415 "/home/jens/Source/shotwell/src/Commands.vala"
				_tmp17_ = monitor;
#line 2415 "/home/jens/Source/shotwell/src/Commands.vala"
				_tmp17__target = monitor_target;
#line 2415 "/home/jens/Source/shotwell/src/Commands.vala"
				_tmp18_ = ctr;
#line 2415 "/home/jens/Source/shotwell/src/Commands.vala"
				ctr = _tmp18_ + 1;
#line 2415 "/home/jens/Source/shotwell/src/Commands.vala"
				_tmp19_ = ctr;
#line 2415 "/home/jens/Source/shotwell/src/Commands.vala"
				_tmp20_ = count;
#line 2415 "/home/jens/Source/shotwell/src/Commands.vala"
				_tmp17_ ((guint64) _tmp19_, (guint64) _tmp20_, TRUE, _tmp17__target);
#line 21377 "Commands.c"
			}
#line 2412 "/home/jens/Source/shotwell/src/Commands.vala"
			_g_object_unref0 (source);
#line 21381 "Commands.c"
		}
#line 2412 "/home/jens/Source/shotwell/src/Commands.vala"
		_g_object_unref0 (_source_it);
#line 21385 "Commands.c"
	}
#line 2418 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp21_ = library_photo_global;
#line 2418 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp22_ = media_source_collection_get_transaction_controller (G_TYPE_CHECK_INSTANCE_CAST (_tmp21_, TYPE_MEDIA_SOURCE_COLLECTION, MediaSourceCollection));
#line 2418 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp23_ = _tmp22_;
#line 2418 "/home/jens/Source/shotwell/src/Commands.vala"
	transaction_controller_commit (_tmp23_);
#line 2419 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp24_ = video_global;
#line 2419 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp25_ = media_source_collection_get_transaction_controller (G_TYPE_CHECK_INSTANCE_CAST (_tmp24_, TYPE_MEDIA_SOURCE_COLLECTION, MediaSourceCollection));
#line 2419 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp26_ = _tmp25_;
#line 2419 "/home/jens/Source/shotwell/src/Commands.vala"
	transaction_controller_commit (_tmp26_);
#line 21403 "Commands.c"
}


static void trash_untrash_photos_command_untrash (TrashUntrashPhotosCommand* self, ProgressMonitor monitor, void* monitor_target) {
	gint ctr = 0;
	gint count = 0;
	GeeCollection* _tmp0_;
	gint _tmp1_;
	gint _tmp2_;
	LibraryPhotoSourceCollection* _tmp3_;
	TransactionController* _tmp4_;
	TransactionController* _tmp5_;
	VideoSourceCollection* _tmp6_;
	TransactionController* _tmp7_;
	TransactionController* _tmp8_;
	LibraryPhotoSourceCollection* _tmp21_;
	TransactionController* _tmp22_;
	TransactionController* _tmp23_;
	VideoSourceCollection* _tmp24_;
	TransactionController* _tmp25_;
	TransactionController* _tmp26_;
#line 2422 "/home/jens/Source/shotwell/src/Commands.vala"
	g_return_if_fail (IS_TRASH_UNTRASH_PHOTOS_COMMAND (self));
#line 2423 "/home/jens/Source/shotwell/src/Commands.vala"
	ctr = 0;
#line 2424 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp0_ = self->priv->sources;
#line 2424 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp1_ = gee_collection_get_size (_tmp0_);
#line 2424 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp2_ = _tmp1_;
#line 2424 "/home/jens/Source/shotwell/src/Commands.vala"
	count = _tmp2_;
#line 2426 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp3_ = library_photo_global;
#line 2426 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp4_ = media_source_collection_get_transaction_controller (G_TYPE_CHECK_INSTANCE_CAST (_tmp3_, TYPE_MEDIA_SOURCE_COLLECTION, MediaSourceCollection));
#line 2426 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp5_ = _tmp4_;
#line 2426 "/home/jens/Source/shotwell/src/Commands.vala"
	transaction_controller_begin (_tmp5_);
#line 2427 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp6_ = video_global;
#line 2427 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp7_ = media_source_collection_get_transaction_controller (G_TYPE_CHECK_INSTANCE_CAST (_tmp6_, TYPE_MEDIA_SOURCE_COLLECTION, MediaSourceCollection));
#line 2427 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp8_ = _tmp7_;
#line 2427 "/home/jens/Source/shotwell/src/Commands.vala"
	transaction_controller_begin (_tmp8_);
#line 21453 "Commands.c"
	{
		GeeIterator* _source_it = NULL;
		GeeCollection* _tmp9_;
		GeeIterator* _tmp10_;
#line 2429 "/home/jens/Source/shotwell/src/Commands.vala"
		_tmp9_ = self->priv->sources;
#line 2429 "/home/jens/Source/shotwell/src/Commands.vala"
		_tmp10_ = gee_iterable_iterator (G_TYPE_CHECK_INSTANCE_CAST (_tmp9_, GEE_TYPE_ITERABLE, GeeIterable));
#line 2429 "/home/jens/Source/shotwell/src/Commands.vala"
		_source_it = _tmp10_;
#line 2429 "/home/jens/Source/shotwell/src/Commands.vala"
		while (TRUE) {
#line 21466 "Commands.c"
			GeeIterator* _tmp11_;
			gboolean _tmp12_;
			MediaSource* source = NULL;
			GeeIterator* _tmp13_;
			gpointer _tmp14_;
			MediaSource* _tmp15_;
			ProgressMonitor _tmp16_;
			void* _tmp16__target;
#line 2429 "/home/jens/Source/shotwell/src/Commands.vala"
			_tmp11_ = _source_it;
#line 2429 "/home/jens/Source/shotwell/src/Commands.vala"
			_tmp12_ = gee_iterator_next (_tmp11_);
#line 2429 "/home/jens/Source/shotwell/src/Commands.vala"
			if (!_tmp12_) {
#line 2429 "/home/jens/Source/shotwell/src/Commands.vala"
				break;
#line 21483 "Commands.c"
			}
#line 2429 "/home/jens/Source/shotwell/src/Commands.vala"
			_tmp13_ = _source_it;
#line 2429 "/home/jens/Source/shotwell/src/Commands.vala"
			_tmp14_ = gee_iterator_get (_tmp13_);
#line 2429 "/home/jens/Source/shotwell/src/Commands.vala"
			source = (MediaSource*) _tmp14_;
#line 2430 "/home/jens/Source/shotwell/src/Commands.vala"
			_tmp15_ = source;
#line 2430 "/home/jens/Source/shotwell/src/Commands.vala"
			media_source_untrash (_tmp15_);
#line 2431 "/home/jens/Source/shotwell/src/Commands.vala"
			_tmp16_ = monitor;
#line 2431 "/home/jens/Source/shotwell/src/Commands.vala"
			_tmp16__target = monitor_target;
#line 2431 "/home/jens/Source/shotwell/src/Commands.vala"
			if (_tmp16_ != NULL) {
#line 21501 "Commands.c"
				ProgressMonitor _tmp17_;
				void* _tmp17__target;
				gint _tmp18_;
				gint _tmp19_;
				gint _tmp20_;
#line 2432 "/home/jens/Source/shotwell/src/Commands.vala"
				_tmp17_ = monitor;
#line 2432 "/home/jens/Source/shotwell/src/Commands.vala"
				_tmp17__target = monitor_target;
#line 2432 "/home/jens/Source/shotwell/src/Commands.vala"
				_tmp18_ = ctr;
#line 2432 "/home/jens/Source/shotwell/src/Commands.vala"
				ctr = _tmp18_ + 1;
#line 2432 "/home/jens/Source/shotwell/src/Commands.vala"
				_tmp19_ = ctr;
#line 2432 "/home/jens/Source/shotwell/src/Commands.vala"
				_tmp20_ = count;
#line 2432 "/home/jens/Source/shotwell/src/Commands.vala"
				_tmp17_ ((guint64) _tmp19_, (guint64) _tmp20_, TRUE, _tmp17__target);
#line 21521 "Commands.c"
			}
#line 2429 "/home/jens/Source/shotwell/src/Commands.vala"
			_g_object_unref0 (source);
#line 21525 "Commands.c"
		}
#line 2429 "/home/jens/Source/shotwell/src/Commands.vala"
		_g_object_unref0 (_source_it);
#line 21529 "Commands.c"
	}
#line 2435 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp21_ = library_photo_global;
#line 2435 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp22_ = media_source_collection_get_transaction_controller (G_TYPE_CHECK_INSTANCE_CAST (_tmp21_, TYPE_MEDIA_SOURCE_COLLECTION, MediaSourceCollection));
#line 2435 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp23_ = _tmp22_;
#line 2435 "/home/jens/Source/shotwell/src/Commands.vala"
	transaction_controller_commit (_tmp23_);
#line 2436 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp24_ = video_global;
#line 2436 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp25_ = media_source_collection_get_transaction_controller (G_TYPE_CHECK_INSTANCE_CAST (_tmp24_, TYPE_MEDIA_SOURCE_COLLECTION, MediaSourceCollection));
#line 2436 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp26_ = _tmp25_;
#line 2436 "/home/jens/Source/shotwell/src/Commands.vala"
	transaction_controller_commit (_tmp26_);
#line 21547 "Commands.c"
}


static void trash_untrash_photos_command_on_photo_destroyed (TrashUntrashPhotosCommand* self, DataSource* source) {
	GeeCollection* _tmp0_;
	DataSource* _tmp1_;
	GeeCollection* _tmp2_;
	gint _tmp3_;
	gint _tmp4_;
#line 2439 "/home/jens/Source/shotwell/src/Commands.vala"
	g_return_if_fail (IS_TRASH_UNTRASH_PHOTOS_COMMAND (self));
#line 2439 "/home/jens/Source/shotwell/src/Commands.vala"
	g_return_if_fail (IS_DATA_SOURCE (source));
#line 2442 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp0_ = self->priv->sources;
#line 2442 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp1_ = source;
#line 2442 "/home/jens/Source/shotwell/src/Commands.vala"
	gee_collection_remove (_tmp0_, G_TYPE_CHECK_INSTANCE_CAST (_tmp1_, TYPE_MEDIA_SOURCE, MediaSource));
#line 2446 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp2_ = self->priv->sources;
#line 2446 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp3_ = gee_collection_get_size (_tmp2_);
#line 2446 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp4_ = _tmp3_;
#line 2446 "/home/jens/Source/shotwell/src/Commands.vala"
	if (_tmp4_ == 0) {
#line 21575 "Commands.c"
		CommandManager* _tmp5_;
		CommandManager* _tmp6_;
#line 2447 "/home/jens/Source/shotwell/src/Commands.vala"
		_tmp5_ = command_get_command_manager (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_COMMAND, Command));
#line 2447 "/home/jens/Source/shotwell/src/Commands.vala"
		_tmp6_ = _tmp5_;
#line 2447 "/home/jens/Source/shotwell/src/Commands.vala"
		command_manager_reset (_tmp6_);
#line 2447 "/home/jens/Source/shotwell/src/Commands.vala"
		_command_manager_unref0 (_tmp6_);
#line 21586 "Commands.c"
	}
}


static void trash_untrash_photos_command_class_init (TrashUntrashPhotosCommandClass * klass) {
#line 2341 "/home/jens/Source/shotwell/src/Commands.vala"
	trash_untrash_photos_command_parent_class = g_type_class_peek_parent (klass);
#line 2341 "/home/jens/Source/shotwell/src/Commands.vala"
	g_type_class_add_private (klass, sizeof (TrashUntrashPhotosCommandPrivate));
#line 2341 "/home/jens/Source/shotwell/src/Commands.vala"
	((CommandClass *) klass)->execute = (void (*) (Command *)) trash_untrash_photos_command_real_execute;
#line 2341 "/home/jens/Source/shotwell/src/Commands.vala"
	((CommandClass *) klass)->undo = (void (*) (Command *)) trash_untrash_photos_command_real_undo;
#line 2341 "/home/jens/Source/shotwell/src/Commands.vala"
	G_OBJECT_CLASS (klass)->finalize = trash_untrash_photos_command_finalize;
#line 21602 "Commands.c"
}


static void trash_untrash_photos_command_instance_init (TrashUntrashPhotosCommand * self) {
#line 2341 "/home/jens/Source/shotwell/src/Commands.vala"
	self->priv = TRASH_UNTRASH_PHOTOS_COMMAND_GET_PRIVATE (self);
#line 21609 "Commands.c"
}


static void trash_untrash_photos_command_finalize (GObject * obj) {
	TrashUntrashPhotosCommand * self;
	LibraryPhotoSourceCollection* _tmp0_;
	guint _tmp1_;
	VideoSourceCollection* _tmp2_;
	guint _tmp3_;
#line 2341 "/home/jens/Source/shotwell/src/Commands.vala"
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, TYPE_TRASH_UNTRASH_PHOTOS_COMMAND, TrashUntrashPhotosCommand);
#line 2358 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp0_ = library_photo_global;
#line 2358 "/home/jens/Source/shotwell/src/Commands.vala"
	g_signal_parse_name ("item-destroyed", TYPE_SOURCE_COLLECTION, &_tmp1_, NULL, FALSE);
#line 2358 "/home/jens/Source/shotwell/src/Commands.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) _trash_untrash_photos_command_on_photo_destroyed_source_collection_item_destroyed, self);
#line 2359 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp2_ = video_global;
#line 2359 "/home/jens/Source/shotwell/src/Commands.vala"
	g_signal_parse_name ("item-destroyed", TYPE_SOURCE_COLLECTION, &_tmp3_, NULL, FALSE);
#line 2359 "/home/jens/Source/shotwell/src/Commands.vala"
	g_signal_handlers_disconnect_matched (G_TYPE_CHECK_INSTANCE_CAST (_tmp2_, TYPE_SOURCE_COLLECTION, SourceCollection), G_SIGNAL_MATCH_ID | G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA, _tmp3_, 0, NULL, (GCallback) _trash_untrash_photos_command_on_photo_destroyed_source_collection_item_destroyed, self);
#line 2342 "/home/jens/Source/shotwell/src/Commands.vala"
	_g_object_unref0 (self->priv->sources);
#line 2341 "/home/jens/Source/shotwell/src/Commands.vala"
	G_OBJECT_CLASS (trash_untrash_photos_command_parent_class)->finalize (obj);
#line 21637 "Commands.c"
}


GType trash_untrash_photos_command_get_type (void) {
	static volatile gsize trash_untrash_photos_command_type_id__volatile = 0;
	if (g_once_init_enter (&trash_untrash_photos_command_type_id__volatile)) {
		static const GTypeInfo g_define_type_info = { sizeof (TrashUntrashPhotosCommandClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) trash_untrash_photos_command_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (TrashUntrashPhotosCommand), 0, (GInstanceInitFunc) trash_untrash_photos_command_instance_init, NULL };
		GType trash_untrash_photos_command_type_id;
		trash_untrash_photos_command_type_id = g_type_register_static (TYPE_PAGE_COMMAND, "TrashUntrashPhotosCommand", &g_define_type_info, 0);
		g_once_init_leave (&trash_untrash_photos_command_type_id__volatile, trash_untrash_photos_command_type_id);
	}
	return trash_untrash_photos_command_type_id__volatile;
}


FlagUnflagCommand* flag_unflag_command_construct (GType object_type, GeeCollection* sources, gboolean flag) {
	FlagUnflagCommand * self = NULL;
	const gchar* _tmp0_ = NULL;
	gboolean _tmp1_;
	const gchar* _tmp2_ = NULL;
	gboolean _tmp3_;
	GeeCollection* _tmp4_;
	gboolean _tmp5_;
	GeeCollection* _tmp6_;
	gint _tmp7_;
	gint _tmp8_;
#line 2461 "/home/jens/Source/shotwell/src/Commands.vala"
	g_return_val_if_fail (GEE_IS_COLLECTION (sources), NULL);
#line 2463 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp1_ = flag;
#line 2463 "/home/jens/Source/shotwell/src/Commands.vala"
	if (_tmp1_) {
#line 2463 "/home/jens/Source/shotwell/src/Commands.vala"
		_tmp0_ = _ ("Flag");
#line 21672 "Commands.c"
	} else {
#line 2463 "/home/jens/Source/shotwell/src/Commands.vala"
		_tmp0_ = _ ("Unflag");
#line 21676 "Commands.c"
	}
#line 2464 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp3_ = flag;
#line 2464 "/home/jens/Source/shotwell/src/Commands.vala"
	if (_tmp3_) {
#line 2464 "/home/jens/Source/shotwell/src/Commands.vala"
		_tmp2_ = FLAG_UNFLAG_COMMAND_FLAG_SELECTED_STRING;
#line 21684 "Commands.c"
	} else {
#line 2464 "/home/jens/Source/shotwell/src/Commands.vala"
		_tmp2_ = FLAG_UNFLAG_COMMAND_UNFLAG_SELECTED_STRING;
#line 21688 "Commands.c"
	}
#line 2462 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp4_ = sources;
#line 2462 "/home/jens/Source/shotwell/src/Commands.vala"
	self = (FlagUnflagCommand*) multiple_data_source_at_once_command_construct (object_type, _tmp4_, _tmp0_, _tmp2_);
#line 2466 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp5_ = flag;
#line 2466 "/home/jens/Source/shotwell/src/Commands.vala"
	self->priv->flag = _tmp5_;
#line 2468 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp6_ = sources;
#line 2468 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp7_ = gee_collection_get_size (_tmp6_);
#line 2468 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp8_ = _tmp7_;
#line 2468 "/home/jens/Source/shotwell/src/Commands.vala"
	if (_tmp8_ >= FLAG_UNFLAG_COMMAND_MIN_PROGRESS_BAR_THRESHOLD) {
#line 21706 "Commands.c"
		const gchar* _tmp9_ = NULL;
		gboolean _tmp10_;
		ProgressDialog* _tmp11_;
		ProgressDialog* _tmp12_;
#line 2470 "/home/jens/Source/shotwell/src/Commands.vala"
		_tmp10_ = flag;
#line 2470 "/home/jens/Source/shotwell/src/Commands.vala"
		if (_tmp10_) {
#line 2470 "/home/jens/Source/shotwell/src/Commands.vala"
			_tmp9_ = FLAG_UNFLAG_COMMAND_FLAG_PROGRESS;
#line 21717 "Commands.c"
		} else {
#line 2470 "/home/jens/Source/shotwell/src/Commands.vala"
			_tmp9_ = FLAG_UNFLAG_COMMAND_UNFLAG_PROGRESS;
#line 21721 "Commands.c"
		}
#line 2469 "/home/jens/Source/shotwell/src/Commands.vala"
		_tmp11_ = progress_dialog_new (NULL, _tmp9_, NULL);
#line 2469 "/home/jens/Source/shotwell/src/Commands.vala"
		g_object_ref_sink (_tmp11_);
#line 2469 "/home/jens/Source/shotwell/src/Commands.vala"
		_g_object_unref0 (self->priv->progress_dialog);
#line 2469 "/home/jens/Source/shotwell/src/Commands.vala"
		self->priv->progress_dialog = _tmp11_;
#line 2472 "/home/jens/Source/shotwell/src/Commands.vala"
		_tmp12_ = self->priv->progress_dialog;
#line 2472 "/home/jens/Source/shotwell/src/Commands.vala"
		gtk_widget_show_all (G_TYPE_CHECK_INSTANCE_CAST (_tmp12_, gtk_widget_get_type (), GtkWidget));
#line 21735 "Commands.c"
	}
#line 2461 "/home/jens/Source/shotwell/src/Commands.vala"
	return self;
#line 21739 "Commands.c"
}


FlagUnflagCommand* flag_unflag_command_new (GeeCollection* sources, gboolean flag) {
#line 2461 "/home/jens/Source/shotwell/src/Commands.vala"
	return flag_unflag_command_construct (TYPE_FLAG_UNFLAG_COMMAND, sources, flag);
#line 21746 "Commands.c"
}


static void flag_unflag_command_real_execute_on_all (MultipleDataSourceAtOnceCommand* base, GeeCollection* sources) {
	FlagUnflagCommand * self;
	gint num_processed = 0;
	ProgressDialog* _tmp16_;
#line 2476 "/home/jens/Source/shotwell/src/Commands.vala"
	self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_FLAG_UNFLAG_COMMAND, FlagUnflagCommand);
#line 2476 "/home/jens/Source/shotwell/src/Commands.vala"
	g_return_if_fail (GEE_IS_COLLECTION (sources));
#line 2477 "/home/jens/Source/shotwell/src/Commands.vala"
	num_processed = 0;
#line 21760 "Commands.c"
	{
		GeeIterator* _source_it = NULL;
		GeeCollection* _tmp0_;
		GeeIterator* _tmp1_;
#line 2479 "/home/jens/Source/shotwell/src/Commands.vala"
		_tmp0_ = sources;
#line 2479 "/home/jens/Source/shotwell/src/Commands.vala"
		_tmp1_ = gee_iterable_iterator (G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, GEE_TYPE_ITERABLE, GeeIterable));
#line 2479 "/home/jens/Source/shotwell/src/Commands.vala"
		_source_it = _tmp1_;
#line 2479 "/home/jens/Source/shotwell/src/Commands.vala"
		while (TRUE) {
#line 21773 "Commands.c"
			GeeIterator* _tmp2_;
			gboolean _tmp3_;
			DataSource* source = NULL;
			GeeIterator* _tmp4_;
			gpointer _tmp5_;
			DataSource* _tmp6_;
			gboolean _tmp7_;
			gint _tmp8_;
			ProgressDialog* _tmp9_;
#line 2479 "/home/jens/Source/shotwell/src/Commands.vala"
			_tmp2_ = _source_it;
#line 2479 "/home/jens/Source/shotwell/src/Commands.vala"
			_tmp3_ = gee_iterator_next (_tmp2_);
#line 2479 "/home/jens/Source/shotwell/src/Commands.vala"
			if (!_tmp3_) {
#line 2479 "/home/jens/Source/shotwell/src/Commands.vala"
				break;
#line 21791 "Commands.c"
			}
#line 2479 "/home/jens/Source/shotwell/src/Commands.vala"
			_tmp4_ = _source_it;
#line 2479 "/home/jens/Source/shotwell/src/Commands.vala"
			_tmp5_ = gee_iterator_get (_tmp4_);
#line 2479 "/home/jens/Source/shotwell/src/Commands.vala"
			source = (DataSource*) _tmp5_;
#line 2480 "/home/jens/Source/shotwell/src/Commands.vala"
			_tmp6_ = source;
#line 2480 "/home/jens/Source/shotwell/src/Commands.vala"
			_tmp7_ = self->priv->flag;
#line 2480 "/home/jens/Source/shotwell/src/Commands.vala"
			flag_unflag_command_flag_unflag (self, _tmp6_, _tmp7_);
#line 2482 "/home/jens/Source/shotwell/src/Commands.vala"
			_tmp8_ = num_processed;
#line 2482 "/home/jens/Source/shotwell/src/Commands.vala"
			num_processed = _tmp8_ + 1;
#line 2484 "/home/jens/Source/shotwell/src/Commands.vala"
			_tmp9_ = self->priv->progress_dialog;
#line 2484 "/home/jens/Source/shotwell/src/Commands.vala"
			if (_tmp9_ != NULL) {
#line 21813 "Commands.c"
				ProgressDialog* _tmp10_;
				gint _tmp11_;
				GeeCollection* _tmp12_;
				gint _tmp13_;
				gint _tmp14_;
				ProgressDialog* _tmp15_;
#line 2485 "/home/jens/Source/shotwell/src/Commands.vala"
				_tmp10_ = self->priv->progress_dialog;
#line 2485 "/home/jens/Source/shotwell/src/Commands.vala"
				_tmp11_ = num_processed;
#line 2485 "/home/jens/Source/shotwell/src/Commands.vala"
				_tmp12_ = sources;
#line 2485 "/home/jens/Source/shotwell/src/Commands.vala"
				_tmp13_ = gee_collection_get_size (_tmp12_);
#line 2485 "/home/jens/Source/shotwell/src/Commands.vala"
				_tmp14_ = _tmp13_;
#line 2485 "/home/jens/Source/shotwell/src/Commands.vala"
				progress_dialog_set_fraction (_tmp10_, _tmp11_, _tmp14_);
#line 2486 "/home/jens/Source/shotwell/src/Commands.vala"
				_tmp15_ = self->priv->progress_dialog;
#line 2486 "/home/jens/Source/shotwell/src/Commands.vala"
				gtk_widget_queue_draw (G_TYPE_CHECK_INSTANCE_CAST (_tmp15_, gtk_widget_get_type (), GtkWidget));
#line 2487 "/home/jens/Source/shotwell/src/Commands.vala"
				spin_event_loop ();
#line 21838 "Commands.c"
			}
#line 2479 "/home/jens/Source/shotwell/src/Commands.vala"
			_g_object_unref0 (source);
#line 21842 "Commands.c"
		}
#line 2479 "/home/jens/Source/shotwell/src/Commands.vala"
		_g_object_unref0 (_source_it);
#line 21846 "Commands.c"
	}
#line 2491 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp16_ = self->priv->progress_dialog;
#line 2491 "/home/jens/Source/shotwell/src/Commands.vala"
	if (_tmp16_ != NULL) {
#line 21852 "Commands.c"
		ProgressDialog* _tmp17_;
#line 2492 "/home/jens/Source/shotwell/src/Commands.vala"
		_tmp17_ = self->priv->progress_dialog;
#line 2492 "/home/jens/Source/shotwell/src/Commands.vala"
		gtk_widget_hide (G_TYPE_CHECK_INSTANCE_CAST (_tmp17_, gtk_widget_get_type (), GtkWidget));
#line 21858 "Commands.c"
	}
}


static void flag_unflag_command_real_undo_on_all (MultipleDataSourceAtOnceCommand* base, GeeCollection* sources) {
	FlagUnflagCommand * self;
#line 2495 "/home/jens/Source/shotwell/src/Commands.vala"
	self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_FLAG_UNFLAG_COMMAND, FlagUnflagCommand);
#line 2495 "/home/jens/Source/shotwell/src/Commands.vala"
	g_return_if_fail (GEE_IS_COLLECTION (sources));
#line 21869 "Commands.c"
	{
		GeeIterator* _source_it = NULL;
		GeeCollection* _tmp0_;
		GeeIterator* _tmp1_;
#line 2496 "/home/jens/Source/shotwell/src/Commands.vala"
		_tmp0_ = sources;
#line 2496 "/home/jens/Source/shotwell/src/Commands.vala"
		_tmp1_ = gee_iterable_iterator (G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, GEE_TYPE_ITERABLE, GeeIterable));
#line 2496 "/home/jens/Source/shotwell/src/Commands.vala"
		_source_it = _tmp1_;
#line 2496 "/home/jens/Source/shotwell/src/Commands.vala"
		while (TRUE) {
#line 21882 "Commands.c"
			GeeIterator* _tmp2_;
			gboolean _tmp3_;
			DataSource* source = NULL;
			GeeIterator* _tmp4_;
			gpointer _tmp5_;
			DataSource* _tmp6_;
			gboolean _tmp7_;
#line 2496 "/home/jens/Source/shotwell/src/Commands.vala"
			_tmp2_ = _source_it;
#line 2496 "/home/jens/Source/shotwell/src/Commands.vala"
			_tmp3_ = gee_iterator_next (_tmp2_);
#line 2496 "/home/jens/Source/shotwell/src/Commands.vala"
			if (!_tmp3_) {
#line 2496 "/home/jens/Source/shotwell/src/Commands.vala"
				break;
#line 21898 "Commands.c"
			}
#line 2496 "/home/jens/Source/shotwell/src/Commands.vala"
			_tmp4_ = _source_it;
#line 2496 "/home/jens/Source/shotwell/src/Commands.vala"
			_tmp5_ = gee_iterator_get (_tmp4_);
#line 2496 "/home/jens/Source/shotwell/src/Commands.vala"
			source = (DataSource*) _tmp5_;
#line 2497 "/home/jens/Source/shotwell/src/Commands.vala"
			_tmp6_ = source;
#line 2497 "/home/jens/Source/shotwell/src/Commands.vala"
			_tmp7_ = self->priv->flag;
#line 2497 "/home/jens/Source/shotwell/src/Commands.vala"
			flag_unflag_command_flag_unflag (self, _tmp6_, !_tmp7_);
#line 2496 "/home/jens/Source/shotwell/src/Commands.vala"
			_g_object_unref0 (source);
#line 21914 "Commands.c"
		}
#line 2496 "/home/jens/Source/shotwell/src/Commands.vala"
		_g_object_unref0 (_source_it);
#line 21918 "Commands.c"
	}
}


static void flag_unflag_command_flag_unflag (FlagUnflagCommand* self, DataSource* source, gboolean flag) {
	Flaggable* flaggable = NULL;
	DataSource* _tmp0_;
	Flaggable* _tmp1_;
	Flaggable* _tmp2_;
#line 2500 "/home/jens/Source/shotwell/src/Commands.vala"
	g_return_if_fail (IS_FLAG_UNFLAG_COMMAND (self));
#line 2500 "/home/jens/Source/shotwell/src/Commands.vala"
	g_return_if_fail (IS_DATA_SOURCE (source));
#line 2501 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp0_ = source;
#line 2501 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp1_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_TYPE (_tmp0_, TYPE_FLAGGABLE) ? ((Flaggable*) _tmp0_) : NULL);
#line 2501 "/home/jens/Source/shotwell/src/Commands.vala"
	flaggable = _tmp1_;
#line 2502 "/home/jens/Source/shotwell/src/Commands.vala"
	_tmp2_ = flaggable;
#line 2502 "/home/jens/Source/shotwell/src/Commands.vala"
	if (_tmp2_ != NULL) {
#line 21942 "Commands.c"
		gboolean _tmp3_;
#line 2503 "/home/jens/Source/shotwell/src/Commands.vala"
		_tmp3_ = flag;
#line 2503 "/home/jens/Source/shotwell/src/Commands.vala"
		if (_tmp3_) {
#line 21948 "Commands.c"
			Flaggable* _tmp4_;
#line 2504 "/home/jens/Source/shotwell/src/Commands.vala"
			_tmp4_ = flaggable;
#line 2504 "/home/jens/Source/shotwell/src/Commands.vala"
			flaggable_mark_flagged (_tmp4_);
#line 21954 "Commands.c"
		} else {
			Flaggable* _tmp5_;
#line 2506 "/home/jens/Source/shotwell/src/Commands.vala"
			_tmp5_ = flaggable;
#line 2506 "/home/jens/Source/shotwell/src/Commands.vala"
			flaggable_mark_unflagged (_tmp5_);
#line 21961 "Commands.c"
		}
	}
#line 2500 "/home/jens/Source/shotwell/src/Commands.vala"
	_g_object_unref0 (flaggable);
#line 21966 "Commands.c"
}


static void flag_unflag_command_class_init (FlagUnflagCommandClass * klass) {
#line 2451 "/home/jens/Source/shotwell/src/Commands.vala"
	flag_unflag_command_parent_class = g_type_class_peek_parent (klass);
#line 2451 "/home/jens/Source/shotwell/src/Commands.vala"
	g_type_class_add_private (klass, sizeof (FlagUnflagCommandPrivate));
#line 2451 "/home/jens/Source/shotwell/src/Commands.vala"
	((MultipleDataSourceAtOnceCommandClass *) klass)->execute_on_all = (void (*) (MultipleDataSourceAtOnceCommand *, GeeCollection*)) flag_unflag_command_real_execute_on_all;
#line 2451 "/home/jens/Source/shotwell/src/Commands.vala"
	((MultipleDataSourceAtOnceCommandClass *) klass)->undo_on_all = (void (*) (MultipleDataSourceAtOnceCommand *, GeeCollection*)) flag_unflag_command_real_undo_on_all;
#line 2451 "/home/jens/Source/shotwell/src/Commands.vala"
	G_OBJECT_CLASS (klass)->finalize = flag_unflag_command_finalize;
#line 21981 "Commands.c"
}


static void flag_unflag_command_instance_init (FlagUnflagCommand * self) {
#line 2451 "/home/jens/Source/shotwell/src/Commands.vala"
	self->priv = FLAG_UNFLAG_COMMAND_GET_PRIVATE (self);
#line 2459 "/home/jens/Source/shotwell/src/Commands.vala"
	self->priv->progress_dialog = NULL;
#line 21990 "Commands.c"
}


static void flag_unflag_command_finalize (GObject * obj) {
	FlagUnflagCommand * self;
#line 2451 "/home/jens/Source/shotwell/src/Commands.vala"
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, TYPE_FLAG_UNFLAG_COMMAND, FlagUnflagCommand);
#line 2459 "/home/jens/Source/shotwell/src/Commands.vala"
	_g_object_unref0 (self->priv->progress_dialog);
#line 2451 "/home/jens/Source/shotwell/src/Commands.vala"
	G_OBJECT_CLASS (flag_unflag_command_parent_class)->finalize (obj);
#line 22002 "Commands.c"
}


GType flag_unflag_command_get_type (void) {
	static volatile gsize flag_unflag_command_type_id__volatile = 0;
	if (g_once_init_enter (&flag_unflag_command_type_id__volatile)) {
		static const GTypeInfo g_define_type_info = { sizeof (FlagUnflagCommandClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) flag_unflag_command_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (FlagUnflagCommand), 0, (GInstanceInitFunc) flag_unflag_command_instance_init, NULL };
		GType flag_unflag_command_type_id;
		flag_unflag_command_type_id = g_type_register_static (TYPE_MULTIPLE_DATA_SOURCE_AT_ONCE_COMMAND, "FlagUnflagCommand", &g_define_type_info, 0);
		g_once_init_leave (&flag_unflag_command_type_id__volatile, flag_unflag_command_type_id);
	}
	return flag_unflag_command_type_id__volatile;
}



