diff options
Diffstat (limited to 'src/Commands.c')
-rw-r--r-- | src/Commands.c | 22110 |
1 files changed, 22110 insertions, 0 deletions
diff --git a/src/Commands.c b/src/Commands.c new file mode 100644 index 0000000..a9d9bc5 --- /dev/null +++ b/src/Commands.c @@ -0,0 +1,22110 @@ +/* Commands.c generated by valac 0.32.1, 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 "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_ = NULL; + const gchar* _tmp1_ = NULL; + AppWindow* _tmp2_ = NULL; + AppWindow* _tmp3_ = NULL; + Page* _tmp4_ = NULL; + Page* _tmp5_ = NULL; +#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_ = NULL; + LibraryPhotoPage* photo_page = NULL; + Page* _tmp7_ = NULL; + LibraryPhotoPage* _tmp8_ = NULL; + LibraryPhotoPage* _tmp9_ = NULL; +#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_ = NULL; + Photo* _tmp11_ = NULL; + LibraryPhotoPage* _tmp12_ = NULL; + CollectionPage* _tmp13_ = NULL; + gboolean _tmp14_ = FALSE; + Photo* _tmp15_ = NULL; +#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_ = NULL; +#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_ = NULL; + CollectionPage* _tmp18_ = NULL; +#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_ = FALSE; +#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_ = FALSE; +#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_ = NULL; + LibraryPhotoPage* _tmp1_ = NULL; + LibraryPhotoPage* _tmp2_ = NULL; +#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_ = NULL; +#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_ = NULL; +#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_ = NULL; + ViewCollection* _tmp7_ = NULL; + ViewCollection* _tmp8_ = NULL; + gint _tmp9_ = 0; + gint _tmp10_ = 0; + gboolean _tmp25_ = FALSE; +#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_ = 0; + gint _tmp14_ = 0; + CollectionPage* _tmp15_ = NULL; + ViewCollection* _tmp16_ = NULL; + ViewCollection* _tmp17_ = NULL; + gint _tmp18_ = 0; + DataObject* _tmp19_ = NULL; + Thumbnail* _tmp20_ = NULL; + MediaSource* _tmp21_ = NULL; + MediaSource* _tmp22_ = NULL; + Photo* _tmp23_ = NULL; + gboolean _tmp24_ = FALSE; +#line 72 "/home/jens/Source/shotwell/src/Commands.vala" + if (!_tmp11_) { +#line 3032 "Commands.c" + gint _tmp12_ = 0; +#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_ = NULL; + LibraryWindow* _tmp27_ = NULL; + CollectionPage* _tmp28_ = NULL; + Photo* _tmp29_ = NULL; +#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_ = NULL; +#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_ = NULL; + AppWindow* _tmp32_ = NULL; + Page* _tmp33_ = NULL; +#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_ = NULL; + guint _tmp1_ = 0U; +#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_ = NULL; + guint _tmp1_ = 0U; +#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_ = NULL; + guint _tmp1_ = 0U; +#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 = 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_ = NULL; + Photo* _tmp3_ = NULL; + CollectionPage* _tmp6_ = NULL; +#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_ = NULL; + guint _tmp2_ = 0U; +#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_ = NULL; + guint _tmp5_ = 0U; +#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_ = NULL; + guint _tmp8_ = 0U; +#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_ = NULL; + const gchar* _tmp1_ = NULL; + DataSource* _tmp2_ = NULL; + DataSource* _tmp3_ = NULL; + DataSource* _tmp4_ = NULL; +#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_ = NULL; + DataSource* _tmp1_ = NULL; +#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_ = NULL; + CommandManager* _tmp1_ = NULL; +#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_ = NULL; + guint _tmp1_ = 0U; +#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_ = NULL; + const gchar* _tmp1_ = NULL; + Proxyable* _tmp2_ = NULL; + SourceProxy* _tmp3_ = NULL; + SourceProxy* _tmp4_ = NULL; +#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_ = NULL; + DataSource* _tmp1_ = NULL; + DataSource* _tmp2_ = NULL; +#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_ = NULL; + DataSource* _tmp1_ = NULL; + DataSource* _tmp2_ = NULL; +#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_ = NULL; + GeeIterator* _tmp1_ = NULL; +#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_ = NULL; + gboolean _tmp3_ = FALSE; + Proxyable* proxyable = NULL; + GeeIterator* _tmp4_ = NULL; + gpointer _tmp5_ = NULL; + SourceProxy* added_proxy = NULL; + Proxyable* _tmp6_ = NULL; + SourceProxy* _tmp7_ = NULL; + SourceProxy* _tmp8_ = NULL; + GeeHashSet* _tmp9_ = NULL; + SourceProxy* _tmp10_ = NULL; +#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_ = NULL; +#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_ = NULL; + GeeIterator* _tmp1_ = NULL; +#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_ = NULL; + gboolean _tmp3_ = FALSE; + SourceProxy* added_proxy = NULL; + GeeIterator* _tmp4_ = NULL; + gpointer _tmp5_ = NULL; + SourceProxy* _tmp6_ = NULL; + guint _tmp7_ = 0U; +#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_ = NULL; + CommandManager* _tmp1_ = NULL; +#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 = simple_proxyable_command_real_execute; +#line 129 "/home/jens/Source/shotwell/src/Commands.vala" + ((SimpleProxyableCommandClass *) klass)->execute_on_source = simple_proxyable_command_real_execute_on_source; +#line 129 "/home/jens/Source/shotwell/src/Commands.vala" + ((CommandClass *) klass)->undo = simple_proxyable_command_real_undo; +#line 129 "/home/jens/Source/shotwell/src/Commands.vala" + ((SimpleProxyableCommandClass *) klass)->undo_on_source = 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_ = NULL; +#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, 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_ = NULL; + guint _tmp1_ = 0U; +#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_ = NULL; + const gchar* _tmp1_ = NULL; + const gchar* _tmp2_ = NULL; + Photo* _tmp3_ = NULL; + PhotoTransformationState* _tmp4_ = NULL; + PhotoTransformationState* _tmp5_ = NULL; +#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_ = NULL; + PhotoTransformationState* _tmp1_ = NULL; +#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_ = NULL; + CommandManager* _tmp1_ = NULL; +#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 = 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_ = NULL; + guint _tmp1_ = 0U; +#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_ = NULL; + const gchar* _tmp1_ = NULL; + const gchar* _tmp2_ = NULL; +#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_ = NULL; + Photo* _tmp1_ = NULL; + PhotoTransformationState* _tmp2_ = NULL; + PhotoTransformationState* _tmp3_ = NULL; + PhotoTransformationState* _tmp4_ = NULL; + PhotoTransformationState* _tmp5_ = NULL; +#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_ = NULL; + PhotoTransformationState* _tmp1_ = NULL; +#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_ = NULL; + PhotoTransformationState* _tmp1_ = NULL; +#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_ = NULL; + gboolean _tmp1_ = FALSE; + GenericPhotoTransformationCommand* generic = NULL; + Command* _tmp2_ = NULL; + GenericPhotoTransformationCommand* _tmp3_ = NULL; + GenericPhotoTransformationCommand* _tmp4_ = NULL; + GenericPhotoTransformationCommand* _tmp5_ = NULL; + DataSource* _tmp6_ = NULL; + DataSource* _tmp7_ = NULL; + GenericPhotoTransformationCommand* _tmp8_ = NULL; + GenericPhotoTransformationCommand* _tmp9_ = NULL; + PhotoTransformationState* _tmp10_ = NULL; + PhotoTransformationState* _tmp11_ = NULL; +#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_ = NULL; + CommandManager* _tmp1_ = NULL; +#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 = generic_photo_transformation_command_real_execute; +#line 206 "/home/jens/Source/shotwell/src/Commands.vala" + ((GenericPhotoTransformationCommandClass *) klass)->execute_on_photo = generic_photo_transformation_command_real_execute_on_photo; +#line 206 "/home/jens/Source/shotwell/src/Commands.vala" + ((CommandClass *) klass)->undo = generic_photo_transformation_command_real_undo; +#line 206 "/home/jens/Source/shotwell/src/Commands.vala" + ((CommandClass *) klass)->redo = generic_photo_transformation_command_real_redo; +#line 206 "/home/jens/Source/shotwell/src/Commands.vala" + ((GenericPhotoTransformationCommandClass *) klass)->can_compress = generic_photo_transformation_command_real_can_compress; +#line 206 "/home/jens/Source/shotwell/src/Commands.vala" + ((CommandClass *) klass)->compress = 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_ = NULL; + PhotoTransformationState* _tmp3_ = NULL; +#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_ = NULL; + guint _tmp2_ = 0U; +#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_ = NULL; + guint _tmp5_ = 0U; +#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_ = NULL; + const gchar* _tmp1_ = NULL; + const gchar* _tmp2_ = NULL; + gchar* _tmp3_ = NULL; + const gchar* _tmp4_ = NULL; + gchar* _tmp5_ = NULL; +#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_ = NULL; + GeeIterator* _tmp7_ = NULL; +#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_ = NULL; + gboolean _tmp9_ = FALSE; + DataView* view = NULL; + GeeIterator* _tmp10_ = NULL; + gpointer _tmp11_ = NULL; + DataSource* source = NULL; + DataView* _tmp12_ = NULL; + DataSource* _tmp13_ = NULL; + SourceCollection* collection = NULL; + DataSource* _tmp14_ = NULL; + DataCollection* _tmp15_ = NULL; + SourceCollection* _tmp16_ = NULL; + GeeArrayList* _tmp19_ = NULL; + DataSource* _tmp20_ = NULL; +#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_ = NULL; + SourceCollection* _tmp18_ = NULL; +#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_ = NULL; + GeeIterator* _tmp22_ = NULL; +#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_ = NULL; + gboolean _tmp24_ = FALSE; + SourceCollection* current_collection = NULL; + GeeIterator* _tmp25_ = NULL; + gpointer _tmp26_ = NULL; + SourceCollection* _tmp27_ = NULL; +#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_ = NULL; + GeeIterable* _tmp1_ = NULL; +#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_ = NULL; + gint _tmp1_ = 0; + gint _tmp2_ = 0; +#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_COLLECTION, GeeCollection)); +#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_ = NULL; + DataSource* _tmp1_ = NULL; + gboolean _tmp2_ = FALSE; +#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_ = NULL; + CommandManager* _tmp4_ = NULL; +#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_ = NULL; + GeeArrayList* _tmp1_ = NULL; + GeeArrayList* _tmp2_ = NULL; +#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_ = NULL; + gint _tmp1_ = 0; + gint _tmp2_ = 0; +#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_COLLECTION, GeeCollection)); +#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_ = NULL; + GeeArrayList* _tmp4_ = NULL; +#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_ = NULL; + GeeIterator* _tmp1_ = NULL; +#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_ = NULL; + gboolean _tmp3_ = FALSE; + SourceCollection* sources = NULL; + GeeIterator* _tmp4_ = NULL; + gpointer _tmp5_ = NULL; + MediaSourceCollection* media_collection = NULL; + SourceCollection* _tmp6_ = NULL; + MediaSourceCollection* _tmp7_ = NULL; + MediaSourceCollection* _tmp8_ = NULL; +#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_ = NULL; + TransactionController* _tmp10_ = NULL; + TransactionController* _tmp11_ = NULL; +#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_ = NULL; + GeeIterator* _tmp1_ = NULL; +#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_ = NULL; + gboolean _tmp3_ = FALSE; + SourceCollection* sources = NULL; + GeeIterator* _tmp4_ = NULL; + gpointer _tmp5_ = NULL; + MediaSourceCollection* media_collection = NULL; + SourceCollection* _tmp6_ = NULL; + MediaSourceCollection* _tmp7_ = NULL; + MediaSourceCollection* _tmp8_ = NULL; +#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_ = NULL; + TransactionController* _tmp10_ = NULL; + TransactionController* _tmp11_ = NULL; +#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_ = NULL; + AppWindow* _tmp1_ = NULL; + gint count = 0; + gint total = 0; + GeeArrayList* _tmp2_ = NULL; + gint _tmp3_ = 0; + gint _tmp4_ = 0; + gint two_percent = 0; + gint _tmp5_ = 0; + gint _tmp6_ = 0; + const gchar* _tmp7_ = NULL; + gboolean _tmp8_ = FALSE; + gchar* text = NULL; + gchar* _tmp11_ = NULL; + GCancellable* cancellable = NULL; + ProgressDialog* progress = NULL; + gint _tmp12_ = 0; + ProgressDialog* _tmp50_ = NULL; + AppWindow* _tmp52_ = NULL; + AppWindow* _tmp53_ = NULL; +#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_COLLECTION, GeeCollection)); +#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_ = NULL; +#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_ = NULL; +#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_ = FALSE; + GCancellable* _tmp16_ = NULL; + AppWindow* _tmp17_ = NULL; + AppWindow* _tmp18_ = NULL; + const gchar* _tmp19_ = NULL; + GCancellable* _tmp20_ = NULL; + ProgressDialog* _tmp21_ = NULL; +#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_ = NULL; +#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_ = NULL; + GeeArrayList* _tmp23_ = NULL; + gint _source_size = 0; + GeeArrayList* _tmp24_ = NULL; + gint _tmp25_ = 0; + gint _tmp26_ = 0; + 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_COLLECTION, GeeCollection)); +#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_ = 0; + gint _tmp28_ = 0; + gint _tmp29_ = 0; + DataSource* source = NULL; + GeeArrayList* _tmp30_ = NULL; + gint _tmp31_ = 0; + gpointer _tmp32_ = NULL; + gboolean _tmp33_ = FALSE; + GeeArrayList* _tmp36_ = NULL; + ProgressDialog* _tmp39_ = NULL; +#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_ = NULL; +#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_ = NULL; +#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_ = NULL; + DataSource* _tmp38_ = NULL; +#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_ = 0; + gint _tmp41_ = 0; + gint _tmp42_ = 0; + gboolean _tmp46_ = FALSE; + GCancellable* _tmp47_ = NULL; +#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_ = NULL; + gint _tmp44_ = 0; + gint _tmp45_ = 0; +#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_ = NULL; + gboolean _tmp49_ = FALSE; +#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_ = NULL; +#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 = multiple_data_source_command_real_execute; +#line 275 "/home/jens/Source/shotwell/src/Commands.vala" + ((MultipleDataSourceCommandClass *) klass)->execute_on_source = multiple_data_source_command_real_execute_on_source; +#line 275 "/home/jens/Source/shotwell/src/Commands.vala" + ((CommandClass *) klass)->undo = multiple_data_source_command_real_undo; +#line 275 "/home/jens/Source/shotwell/src/Commands.vala" + ((MultipleDataSourceCommandClass *) klass)->undo_on_source = 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_ = NULL; + GeeArrayList* _tmp1_ = NULL; + GeeHashSet* _tmp2_ = NULL; +#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, 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, 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, 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_ = NULL; + GeeIterator* _tmp1_ = NULL; +#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_ = NULL; + gboolean _tmp3_ = FALSE; + SourceCollection* current_collection = NULL; + GeeIterator* _tmp4_ = NULL; + gpointer _tmp5_ = NULL; + SourceCollection* _tmp6_ = NULL; + guint _tmp7_ = 0U; +#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_ = NULL; + const gchar* _tmp1_ = NULL; + GeeHashSet* _tmp2_ = NULL; + GeeCollection* _tmp3_ = NULL; +#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_ = NULL; + GeeIterator* _tmp5_ = NULL; +#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_ = NULL; + gboolean _tmp7_ = FALSE; + DataSource* source = NULL; + GeeIterator* _tmp8_ = NULL; + gpointer _tmp9_ = NULL; + SourceCollection* membership = NULL; + DataSource* _tmp10_ = NULL; + DataCollection* _tmp11_ = NULL; + SourceCollection* _tmp12_ = NULL; + SourceCollection* _tmp13_ = NULL; +#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_ = NULL; + SourceCollection* _tmp15_ = NULL; +#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_ = NULL; + GeeIterator* _tmp17_ = NULL; +#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_ = NULL; + gboolean _tmp19_ = FALSE; + SourceCollection* source_collection = NULL; + GeeIterator* _tmp20_ = NULL; + gpointer _tmp21_ = NULL; + SourceCollection* _tmp22_ = NULL; +#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_ = NULL; + AppWindow* _tmp1_ = NULL; + MediaCollectionRegistry* _tmp2_ = NULL; + MediaCollectionRegistry* _tmp3_ = NULL; + GeeHashSet* _tmp4_ = NULL; + MediaCollectionRegistry* _tmp5_ = NULL; + MediaCollectionRegistry* _tmp6_ = NULL; + 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 __catch444_database_error; + } + { + AppWindow* _tmp7_ = NULL; + AppWindow* _tmp8_ = NULL; +#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 __finally444; + __catch444_database_error: + { + GError* err = NULL; + GError* _tmp9_ = NULL; +#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" + } + __finally444: + { + AppWindow* _tmp10_ = NULL; + AppWindow* _tmp11_ = NULL; +#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_ = NULL; + AppWindow* _tmp1_ = NULL; + MediaCollectionRegistry* _tmp2_ = NULL; + MediaCollectionRegistry* _tmp3_ = NULL; + GeeHashSet* _tmp4_ = NULL; + MediaCollectionRegistry* _tmp5_ = NULL; + MediaCollectionRegistry* _tmp6_ = NULL; + 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 __catch445_database_error; + } + { + AppWindow* _tmp7_ = NULL; + AppWindow* _tmp8_ = NULL; +#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 __finally445; + __catch445_database_error: + { + GError* err = NULL; + GError* _tmp9_ = NULL; +#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" + } + __finally445: + { + AppWindow* _tmp10_ = NULL; + AppWindow* _tmp11_ = NULL; +#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_ = NULL; + GeeIterator* _tmp1_ = NULL; +#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_ = NULL; + gboolean _tmp3_ = FALSE; + DataSource* source = NULL; + GeeIterator* _tmp4_ = NULL; + gpointer _tmp5_ = NULL; + GeeHashSet* _tmp6_ = NULL; + DataSource* _tmp7_ = NULL; + gboolean _tmp8_ = FALSE; +#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_ = NULL; + CommandManager* _tmp10_ = NULL; +#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 = multiple_data_source_at_once_command_real_execute; +#line 413 "/home/jens/Source/shotwell/src/Commands.vala" + ((MultipleDataSourceAtOnceCommandClass *) klass)->execute_on_all = multiple_data_source_at_once_command_real_execute_on_all; +#line 413 "/home/jens/Source/shotwell/src/Commands.vala" + ((CommandClass *) klass)->undo = multiple_data_source_at_once_command_real_undo; +#line 413 "/home/jens/Source/shotwell/src/Commands.vala" + ((MultipleDataSourceAtOnceCommandClass *) klass)->undo_on_all = 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_ = NULL; + GeeHashSet* _tmp1_ = NULL; +#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, 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, 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_ = NULL; + GeeIterator* _tmp1_ = NULL; +#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_ = NULL; + gboolean _tmp3_ = FALSE; + SourceCollection* source_collection = NULL; + GeeIterator* _tmp4_ = NULL; + gpointer _tmp5_ = NULL; + SourceCollection* _tmp6_ = NULL; + guint _tmp7_ = 0U; +#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_ = NULL; + const gchar* _tmp1_ = NULL; + const gchar* _tmp2_ = NULL; + const gchar* _tmp3_ = NULL; + const gchar* _tmp4_ = NULL; +#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_ = NULL; + GeeArrayList* _tmp6_ = NULL; + gint _source_size = 0; + GeeArrayList* _tmp7_ = NULL; + gint _tmp8_ = 0; + gint _tmp9_ = 0; + 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_COLLECTION, GeeCollection)); +#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_ = 0; + gint _tmp11_ = 0; + gint _tmp12_ = 0; + DataSource* source = NULL; + GeeArrayList* _tmp13_ = NULL; + gint _tmp14_ = 0; + gpointer _tmp15_ = NULL; + Photo* photo = NULL; + DataSource* _tmp16_ = NULL; + Photo* _tmp17_ = NULL; + PhotoTransformationState* state = NULL; + Photo* _tmp18_ = NULL; + PhotoTransformationState* _tmp19_ = NULL; + PhotoTransformationState* _tmp20_ = NULL; + GeeHashMap* _tmp21_ = NULL; + Photo* _tmp22_ = NULL; + PhotoTransformationState* _tmp23_ = NULL; +#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_ = NULL; + Photo* _tmp1_ = NULL; + PhotoTransformationState* state = NULL; + GeeHashMap* _tmp2_ = NULL; + gpointer _tmp3_ = NULL; +#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_ = NULL; + CommandManager* _tmp1_ = NULL; +#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 = 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_ = NULL; +#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, g_object_unref, TYPE_PHOTO_TRANSFORMATION_STATE, (GBoxedCopyFunc) g_object_ref, 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_ = NULL; + GeeCollection* _tmp1_ = NULL; + GeeCollection* _tmp2_ = NULL; + GeeCollection* _tmp3_ = NULL; + GeeIterator* _tmp4_ = NULL; + GeeIterator* _tmp5_ = NULL; +#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_MAP, GeeMap)); +#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_ = NULL; + gboolean _tmp7_ = FALSE; + PhotoTransformationState* state = NULL; + GeeIterator* _tmp8_ = NULL; + gpointer _tmp9_ = NULL; + PhotoTransformationState* _tmp10_ = NULL; + guint _tmp11_ = 0U; +#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_ = NULL; + const gchar* _tmp1_ = NULL; + const gchar* _tmp2_ = NULL; + Rotation _tmp3_ = 0; +#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_ = NULL; + Rotation _tmp1_ = 0; +#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_ = NULL; + Rotation _tmp1_ = 0; + Rotation _tmp2_ = 0; +#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 = rotate_single_command_real_execute; +#line 525 "/home/jens/Source/shotwell/src/Commands.vala" + ((CommandClass *) klass)->undo = 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_ = NULL; + const gchar* _tmp1_ = NULL; + const gchar* _tmp2_ = NULL; + const gchar* _tmp3_ = NULL; + const gchar* _tmp4_ = NULL; + Rotation _tmp5_ = 0; +#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_ = NULL; + Rotation _tmp1_ = 0; +#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_ = NULL; + Rotation _tmp1_ = 0; + Rotation _tmp2_ = 0; +#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 = rotate_multiple_command_real_execute_on_source; +#line 543 "/home/jens/Source/shotwell/src/Commands.vala" + ((MultipleDataSourceCommandClass *) klass)->undo_on_source = 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; + const gchar* _tmp0_ = NULL; + gchar* _tmp1_ = NULL; + MediaSource* _tmp2_ = NULL; + const gchar* _tmp3_ = NULL; + gchar* _tmp4_ = NULL; + MediaSource* _tmp5_ = NULL; + gchar* _tmp6_ = NULL; +#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_dpgettext2 (NULL, "Button Label", RESOURCES_EDIT_TITLE_LABEL); +#line 567 "/home/jens/Source/shotwell/src/Commands.vala" + _tmp1_ = g_strdup (_tmp0_); +#line 567 "/home/jens/Source/shotwell/src/Commands.vala" + title = _tmp1_; +#line 569 "/home/jens/Source/shotwell/src/Commands.vala" + _tmp2_ = source; +#line 569 "/home/jens/Source/shotwell/src/Commands.vala" + self = (EditTitleCommand*) single_data_source_command_construct (object_type, G_TYPE_CHECK_INSTANCE_CAST (_tmp2_, TYPE_DATA_SOURCE, DataSource), title, ""); +#line 571 "/home/jens/Source/shotwell/src/Commands.vala" + _tmp3_ = new_title; +#line 571 "/home/jens/Source/shotwell/src/Commands.vala" + _tmp4_ = g_strdup (_tmp3_); +#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 = _tmp4_; +#line 572 "/home/jens/Source/shotwell/src/Commands.vala" + _tmp5_ = source; +#line 572 "/home/jens/Source/shotwell/src/Commands.vala" + _tmp6_ = media_source_get_title (_tmp5_); +#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 = _tmp6_; +#line 566 "/home/jens/Source/shotwell/src/Commands.vala" + _g_free0 (title); +#line 566 "/home/jens/Source/shotwell/src/Commands.vala" + return self; +#line 6468 "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 6475 "Commands.c" +} + + +static void edit_title_command_real_execute (Command* base) { + EditTitleCommand * self; + DataSource* _tmp0_ = NULL; + const gchar* _tmp1_ = NULL; +#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 6491 "Commands.c" +} + + +static void edit_title_command_real_undo (Command* base) { + EditTitleCommand * self; + DataSource* _tmp0_ = NULL; + const gchar* _tmp1_ = NULL; +#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 6507 "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 = edit_title_command_real_execute; +#line 562 "/home/jens/Source/shotwell/src/Commands.vala" + ((CommandClass *) klass)->undo = edit_title_command_real_undo; +#line 562 "/home/jens/Source/shotwell/src/Commands.vala" + G_OBJECT_CLASS (klass)->finalize = edit_title_command_finalize; +#line 6522 "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 6529 "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 6543 "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_ = NULL; + const gchar* _tmp1_ = NULL; + gchar* _tmp2_ = NULL; + MediaSource* _tmp3_ = NULL; + gchar* _tmp4_ = NULL; +#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 6592 "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 6599 "Commands.c" +} + + +static void edit_comment_command_real_execute (Command* base) { + EditCommentCommand * self; + DataSource* _tmp0_ = NULL; + const gchar* _tmp1_ = NULL; +#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 6615 "Commands.c" +} + + +static void edit_comment_command_real_undo (Command* base) { + EditCommentCommand * self; + DataSource* _tmp0_ = NULL; + const gchar* _tmp1_ = NULL; +#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 6631 "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 = edit_comment_command_real_execute; +#line 584 "/home/jens/Source/shotwell/src/Commands.vala" + ((CommandClass *) klass)->undo = edit_comment_command_real_undo; +#line 584 "/home/jens/Source/shotwell/src/Commands.vala" + G_OBJECT_CLASS (klass)->finalize = edit_comment_command_finalize; +#line 6646 "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 6653 "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 6667 "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; + const gchar* _tmp0_ = NULL; + gchar* _tmp1_ = NULL; + GeeCollection* _tmp2_ = NULL; + const gchar* _tmp3_ = NULL; + const gchar* _tmp4_ = NULL; + gchar* _tmp5_ = NULL; +#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_dpgettext2 (NULL, "Button Label", RESOURCES_EDIT_TITLE_LABEL); +#line 609 "/home/jens/Source/shotwell/src/Commands.vala" + _tmp1_ = g_strdup (_tmp0_); +#line 609 "/home/jens/Source/shotwell/src/Commands.vala" + title = _tmp1_; +#line 611 "/home/jens/Source/shotwell/src/Commands.vala" + _tmp2_ = media_sources; +#line 611 "/home/jens/Source/shotwell/src/Commands.vala" + _tmp3_ = title; +#line 611 "/home/jens/Source/shotwell/src/Commands.vala" + self = (EditMultipleTitlesCommand*) multiple_data_source_at_once_command_construct (object_type, _tmp2_, _tmp3_, ""); +#line 613 "/home/jens/Source/shotwell/src/Commands.vala" + _tmp4_ = new_title; +#line 613 "/home/jens/Source/shotwell/src/Commands.vala" + _tmp5_ = g_strdup (_tmp4_); +#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 = _tmp5_; +#line 6716 "Commands.c" + { + GeeIterator* _media_it = NULL; + GeeCollection* _tmp6_ = NULL; + GeeIterator* _tmp7_ = NULL; +#line 614 "/home/jens/Source/shotwell/src/Commands.vala" + _tmp6_ = media_sources; +#line 614 "/home/jens/Source/shotwell/src/Commands.vala" + _tmp7_ = gee_iterable_iterator (G_TYPE_CHECK_INSTANCE_CAST (_tmp6_, GEE_TYPE_ITERABLE, GeeIterable)); +#line 614 "/home/jens/Source/shotwell/src/Commands.vala" + _media_it = _tmp7_; +#line 614 "/home/jens/Source/shotwell/src/Commands.vala" + while (TRUE) { +#line 6729 "Commands.c" + GeeIterator* _tmp8_ = NULL; + gboolean _tmp9_ = FALSE; + MediaSource* media = NULL; + GeeIterator* _tmp10_ = NULL; + gpointer _tmp11_ = NULL; + GeeHashMap* _tmp12_ = NULL; + MediaSource* _tmp13_ = NULL; + MediaSource* _tmp14_ = NULL; + gchar* _tmp15_ = NULL; + gchar* _tmp16_ = NULL; +#line 614 "/home/jens/Source/shotwell/src/Commands.vala" + _tmp8_ = _media_it; +#line 614 "/home/jens/Source/shotwell/src/Commands.vala" + _tmp9_ = gee_iterator_next (_tmp8_); +#line 614 "/home/jens/Source/shotwell/src/Commands.vala" + if (!_tmp9_) { +#line 614 "/home/jens/Source/shotwell/src/Commands.vala" + break; +#line 6748 "Commands.c" + } +#line 614 "/home/jens/Source/shotwell/src/Commands.vala" + _tmp10_ = _media_it; +#line 614 "/home/jens/Source/shotwell/src/Commands.vala" + _tmp11_ = gee_iterator_get (_tmp10_); +#line 614 "/home/jens/Source/shotwell/src/Commands.vala" + media = (MediaSource*) _tmp11_; +#line 615 "/home/jens/Source/shotwell/src/Commands.vala" + _tmp12_ = self->old_titles; +#line 615 "/home/jens/Source/shotwell/src/Commands.vala" + _tmp13_ = media; +#line 615 "/home/jens/Source/shotwell/src/Commands.vala" + _tmp14_ = media; +#line 615 "/home/jens/Source/shotwell/src/Commands.vala" + _tmp15_ = media_source_get_title (_tmp14_); +#line 615 "/home/jens/Source/shotwell/src/Commands.vala" + _tmp16_ = _tmp15_; +#line 615 "/home/jens/Source/shotwell/src/Commands.vala" + gee_abstract_map_set (G_TYPE_CHECK_INSTANCE_CAST (_tmp12_, GEE_TYPE_ABSTRACT_MAP, GeeAbstractMap), _tmp13_, _tmp16_); +#line 615 "/home/jens/Source/shotwell/src/Commands.vala" + _g_free0 (_tmp16_); +#line 614 "/home/jens/Source/shotwell/src/Commands.vala" + _g_object_unref0 (media); +#line 6772 "Commands.c" + } +#line 614 "/home/jens/Source/shotwell/src/Commands.vala" + _g_object_unref0 (_media_it); +#line 6776 "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 6782 "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 6789 "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 6799 "Commands.c" + { + GeeIterator* _source_it = NULL; + GeeCollection* _tmp0_ = NULL; + GeeIterator* _tmp1_ = NULL; +#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 6812 "Commands.c" + GeeIterator* _tmp2_ = NULL; + gboolean _tmp3_ = FALSE; + DataSource* source = NULL; + GeeIterator* _tmp4_ = NULL; + gpointer _tmp5_ = NULL; + DataSource* _tmp6_ = NULL; + const gchar* _tmp7_ = NULL; +#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 6828 "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 6844 "Commands.c" + } +#line 619 "/home/jens/Source/shotwell/src/Commands.vala" + _g_object_unref0 (_source_it); +#line 6848 "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 6859 "Commands.c" + { + GeeIterator* _source_it = NULL; + GeeCollection* _tmp0_ = NULL; + GeeIterator* _tmp1_ = NULL; +#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 6872 "Commands.c" + GeeIterator* _tmp2_ = NULL; + gboolean _tmp3_ = FALSE; + DataSource* source = NULL; + GeeIterator* _tmp4_ = NULL; + gpointer _tmp5_ = NULL; + DataSource* _tmp6_ = NULL; + GeeHashMap* _tmp7_ = NULL; + DataSource* _tmp8_ = NULL; + gpointer _tmp9_ = NULL; + gchar* _tmp10_ = NULL; +#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 6891 "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 6915 "Commands.c" + } +#line 624 "/home/jens/Source/shotwell/src/Commands.vala" + _g_object_unref0 (_source_it); +#line 6919 "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 = edit_multiple_titles_command_real_execute_on_all; +#line 604 "/home/jens/Source/shotwell/src/Commands.vala" + ((MultipleDataSourceAtOnceCommandClass *) klass)->undo_on_all = 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 6933 "Commands.c" +} + + +static void edit_multiple_titles_command_instance_init (EditMultipleTitlesCommand * self) { + GeeHashMap* _tmp0_ = NULL; +#line 606 "/home/jens/Source/shotwell/src/Commands.vala" + _tmp0_ = gee_hash_map_new (TYPE_MEDIA_SOURCE, (GBoxedCopyFunc) g_object_ref, g_object_unref, G_TYPE_STRING, (GBoxedCopyFunc) g_strdup, 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 6943 "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 6957 "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_ = NULL; + const gchar* _tmp1_ = NULL; + gchar* _tmp2_ = NULL; +#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 6994 "Commands.c" + { + GeeIterator* _media_it = NULL; + GeeCollection* _tmp3_ = NULL; + GeeIterator* _tmp4_ = NULL; +#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 7007 "Commands.c" + GeeIterator* _tmp5_ = NULL; + gboolean _tmp6_ = FALSE; + MediaSource* media = NULL; + GeeIterator* _tmp7_ = NULL; + gpointer _tmp8_ = NULL; + GeeHashMap* _tmp9_ = NULL; + MediaSource* _tmp10_ = NULL; + MediaSource* _tmp11_ = NULL; + gchar* _tmp12_ = NULL; + gchar* _tmp13_ = NULL; +#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 7026 "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 7050 "Commands.c" + } +#line 637 "/home/jens/Source/shotwell/src/Commands.vala" + _g_object_unref0 (_media_it); +#line 7054 "Commands.c" + } +#line 633 "/home/jens/Source/shotwell/src/Commands.vala" + return self; +#line 7058 "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 7065 "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 7075 "Commands.c" + { + GeeIterator* _source_it = NULL; + GeeCollection* _tmp0_ = NULL; + GeeIterator* _tmp1_ = NULL; +#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 7088 "Commands.c" + GeeIterator* _tmp2_ = NULL; + gboolean _tmp3_ = FALSE; + DataSource* source = NULL; + GeeIterator* _tmp4_ = NULL; + gpointer _tmp5_ = NULL; + DataSource* _tmp6_ = NULL; + const gchar* _tmp7_ = NULL; +#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 7104 "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 7120 "Commands.c" + } +#line 642 "/home/jens/Source/shotwell/src/Commands.vala" + _g_object_unref0 (_source_it); +#line 7124 "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 7135 "Commands.c" + { + GeeIterator* _source_it = NULL; + GeeCollection* _tmp0_ = NULL; + GeeIterator* _tmp1_ = NULL; +#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 7148 "Commands.c" + GeeIterator* _tmp2_ = NULL; + gboolean _tmp3_ = FALSE; + DataSource* source = NULL; + GeeIterator* _tmp4_ = NULL; + gpointer _tmp5_ = NULL; + DataSource* _tmp6_ = NULL; + GeeHashMap* _tmp7_ = NULL; + DataSource* _tmp8_ = NULL; + gpointer _tmp9_ = NULL; + gchar* _tmp10_ = NULL; +#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 7167 "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 7191 "Commands.c" + } +#line 647 "/home/jens/Source/shotwell/src/Commands.vala" + _g_object_unref0 (_source_it); +#line 7195 "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 = edit_multiple_comments_command_real_execute_on_all; +#line 629 "/home/jens/Source/shotwell/src/Commands.vala" + ((MultipleDataSourceAtOnceCommandClass *) klass)->undo_on_all = 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 7209 "Commands.c" +} + + +static void edit_multiple_comments_command_instance_init (EditMultipleCommentsCommand * self) { + GeeHashMap* _tmp0_ = NULL; +#line 631 "/home/jens/Source/shotwell/src/Commands.vala" + _tmp0_ = gee_hash_map_new (TYPE_MEDIA_SOURCE, (GBoxedCopyFunc) g_object_ref, g_object_unref, G_TYPE_STRING, (GBoxedCopyFunc) g_strdup, 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 7219 "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 7233 "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_ = NULL; + const gchar* _tmp1_ = NULL; + gchar* _tmp2_ = NULL; + Event* _tmp3_ = NULL; + gchar* _tmp4_ = NULL; +#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 7282 "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 7289 "Commands.c" +} + + +static void rename_event_command_real_execute_on_source (SimpleProxyableCommand* base, DataSource* source) { + RenameEventCommand * self; + DataSource* _tmp0_ = NULL; + const gchar* _tmp1_ = NULL; +#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 7307 "Commands.c" +} + + +static void rename_event_command_real_undo_on_source (SimpleProxyableCommand* base, DataSource* source) { + RenameEventCommand * self; + DataSource* _tmp0_ = NULL; + const gchar* _tmp1_ = NULL; +#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 7325 "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 = rename_event_command_real_execute_on_source; +#line 652 "/home/jens/Source/shotwell/src/Commands.vala" + ((SimpleProxyableCommandClass *) klass)->undo_on_source = 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 7340 "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 7347 "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 7361 "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_ = NULL; + const gchar* _tmp1_ = NULL; + gchar* _tmp2_ = NULL; + Event* _tmp3_ = NULL; + gchar* _tmp4_ = NULL; +#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 7410 "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 7417 "Commands.c" +} + + +static void edit_event_comment_command_real_execute_on_source (SimpleProxyableCommand* base, DataSource* source) { + EditEventCommentCommand * self; + DataSource* _tmp0_ = NULL; + const gchar* _tmp1_ = NULL; +#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 7435 "Commands.c" +} + + +static void edit_event_comment_command_real_undo_on_source (SimpleProxyableCommand* base, DataSource* source) { + EditEventCommentCommand * self; + DataSource* _tmp0_ = NULL; + const gchar* _tmp1_ = NULL; +#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 7453 "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 = edit_event_comment_command_real_execute_on_source; +#line 672 "/home/jens/Source/shotwell/src/Commands.vala" + ((SimpleProxyableCommandClass *) klass)->undo_on_source = 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 7468 "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 7475 "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 7489 "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_ = NULL; + MediaSource* _tmp1_ = NULL; + MediaSource* _tmp2_ = NULL; + Event* _tmp3_ = NULL; + MediaSource* _tmp4_ = NULL; +#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 7538 "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 7545 "Commands.c" +} + + +static void set_key_photo_command_real_execute (Command* base) { + SetKeyPhotoCommand * self; + DataSource* _tmp0_ = NULL; + MediaSource* _tmp1_ = NULL; +#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 7561 "Commands.c" +} + + +static void set_key_photo_command_real_undo (Command* base) { + SetKeyPhotoCommand * self; + DataSource* _tmp0_ = NULL; + MediaSource* _tmp1_ = NULL; +#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 7577 "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 = set_key_photo_command_real_execute; +#line 692 "/home/jens/Source/shotwell/src/Commands.vala" + ((CommandClass *) klass)->undo = 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 7592 "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 7599 "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 7613 "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_ = NULL; +#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 7640 "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 7647 "Commands.c" +} + + +static void revert_single_command_real_execute_on_photo (GenericPhotoTransformationCommand* base, Photo* photo) { + RevertSingleCommand * self; + Photo* _tmp0_ = NULL; +#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 7662 "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_ = NULL; + RevertSingleCommand* _tmp1_ = NULL; + RevertSingleCommand* _tmp2_ = NULL; + RevertSingleCommand* _tmp3_ = NULL; + DataSource* _tmp4_ = NULL; + DataSource* _tmp5_ = NULL; +#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 7696 "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 7712 "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 7720 "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 = revert_single_command_real_execute_on_photo; +#line 712 "/home/jens/Source/shotwell/src/Commands.vala" + ((CommandClass *) klass)->compress = revert_single_command_real_compress; +#line 7731 "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_ = NULL; + const gchar* _tmp1_ = NULL; + const gchar* _tmp2_ = NULL; +#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" + _tmp1_ = _ ("Reverting"); +#line 737 "/home/jens/Source/shotwell/src/Commands.vala" + _tmp2_ = _ ("Undoing Revert"); +#line 737 "/home/jens/Source/shotwell/src/Commands.vala" + self = (RevertMultipleCommand*) multiple_photo_transformation_command_construct (object_type, _tmp0_, _tmp1_, _tmp2_, RESOURCES_REVERT_LABEL, ""); +#line 736 "/home/jens/Source/shotwell/src/Commands.vala" + return self; +#line 7768 "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 7775 "Commands.c" +} + + +static void revert_multiple_command_real_execute_on_source (MultipleDataSourceCommand* base, DataSource* source) { + RevertMultipleCommand * self; + DataSource* _tmp0_ = NULL; +#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 7790 "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 = revert_multiple_command_real_execute_on_source; +#line 7799 "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_ = NULL; +#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 7830 "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 7837 "Commands.c" +} + + +static void enhance_single_command_real_execute_on_photo (GenericPhotoTransformationCommand* base, Photo* photo) { + EnhanceSingleCommand * self; + AppWindow* _tmp0_ = NULL; + AppWindow* _tmp1_ = NULL; + Photo* _tmp2_ = NULL; + AppWindow* _tmp3_ = NULL; + AppWindow* _tmp4_ = NULL; +#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 7872 "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_ = NULL; + EnhanceSingleCommand* _tmp1_ = NULL; + EnhanceSingleCommand* _tmp2_ = NULL; + EnhanceSingleCommand* _tmp3_ = NULL; + DataSource* _tmp4_ = NULL; + DataSource* _tmp5_ = NULL; +#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 7906 "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 7922 "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 7930 "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 = enhance_single_command_real_execute_on_photo; +#line 746 "/home/jens/Source/shotwell/src/Commands.vala" + ((CommandClass *) klass)->compress = enhance_single_command_real_compress; +#line 7941 "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_ = NULL; + const gchar* _tmp1_ = NULL; + const gchar* _tmp2_ = NULL; +#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" + _tmp1_ = _ ("Enhancing"); +#line 781 "/home/jens/Source/shotwell/src/Commands.vala" + _tmp2_ = _ ("Undoing Enhance"); +#line 781 "/home/jens/Source/shotwell/src/Commands.vala" + self = (EnhanceMultipleCommand*) multiple_photo_transformation_command_construct (object_type, _tmp0_, _tmp1_, _tmp2_, RESOURCES_ENHANCE_LABEL, RESOURCES_ENHANCE_TOOLTIP); +#line 780 "/home/jens/Source/shotwell/src/Commands.vala" + return self; +#line 7978 "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 7985 "Commands.c" +} + + +static void enhance_multiple_command_real_execute_on_source (MultipleDataSourceCommand* base, DataSource* source) { + EnhanceMultipleCommand * self; + DataSource* _tmp0_ = NULL; +#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 8000 "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 = enhance_multiple_command_real_execute_on_source; +#line 8009 "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_ = NULL; + const gchar* _tmp1_ = NULL; + const gchar* _tmp2_ = NULL; + gdouble _tmp3_ = 0.0; + Box _tmp4_ = {0}; +#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 8062 "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 8069 "Commands.c" +} + + +static void straighten_command_real_execute_on_photo (GenericPhotoTransformationCommand* base, Photo* photo) { + StraightenCommand * self; + DataCollection* collection = NULL; + Photo* _tmp0_ = NULL; + DataCollection* _tmp1_ = NULL; + DataCollection* _tmp2_ = NULL; + Photo* _tmp4_ = NULL; + gdouble _tmp5_ = 0.0; + Photo* _tmp6_ = NULL; + Box _tmp7_ = {0}; + DataCollection* _tmp8_ = NULL; +#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 8098 "Commands.c" + DataCollection* _tmp3_ = NULL; +#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 8104 "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 8122 "Commands.c" + DataCollection* _tmp9_ = NULL; +#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 8128 "Commands.c" + } +#line 801 "/home/jens/Source/shotwell/src/Commands.vala" + _data_collection_unref0 (collection); +#line 8132 "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 = straighten_command_real_execute_on_photo; +#line 790 "/home/jens/Source/shotwell/src/Commands.vala" + G_OBJECT_CLASS (klass)->finalize = straighten_command_finalize; +#line 8145 "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 8152 "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 8162 "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_ = NULL; + const gchar* _tmp1_ = NULL; + const gchar* _tmp2_ = NULL; + Box _tmp3_ = {0}; +#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 8206 "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 8213 "Commands.c" +} + + +static void crop_command_real_execute_on_photo (GenericPhotoTransformationCommand* base, Photo* photo) { + CropCommand * self; + Photo* _tmp0_ = NULL; + Box _tmp1_ = {0}; +#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 8231 "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 = crop_command_real_execute_on_photo; +#line 815 "/home/jens/Source/shotwell/src/Commands.vala" + G_OBJECT_CLASS (klass)->finalize = crop_command_finalize; +#line 8244 "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 8251 "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 8261 "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 8280 "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_ = NULL; + const gchar* _tmp1_ = NULL; + const gchar* _tmp2_ = NULL; + PixelTransformationBundle* _tmp3_ = NULL; + PixelTransformationBundle* _tmp4_ = NULL; +#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 8317 "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 8324 "Commands.c" +} + + +static void adjust_colors_single_command_real_execute_on_photo (GenericPhotoTransformationCommand* base, Photo* photo) { + AdjustColorsSingleCommand * self; + AppWindow* _tmp0_ = NULL; + AppWindow* _tmp1_ = NULL; + Photo* _tmp2_ = NULL; + PixelTransformationBundle* _tmp3_ = NULL; + AppWindow* _tmp4_ = NULL; + AppWindow* _tmp5_ = NULL; +#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 8362 "Commands.c" +} + + +static gboolean adjust_colors_single_command_real_can_compress (GenericPhotoTransformationCommand* base, Command* command) { + AdjustColorsSingleCommand * self; + gboolean result = FALSE; + Command* _tmp0_ = NULL; +#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 8380 "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 = adjust_colors_single_command_real_execute_on_photo; +#line 829 "/home/jens/Source/shotwell/src/Commands.vala" + ((GenericPhotoTransformationCommandClass *) klass)->can_compress = 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 8395 "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 8402 "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 8414 "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_ = NULL; + const gchar* _tmp1_ = NULL; + const gchar* _tmp2_ = NULL; + const gchar* _tmp3_ = NULL; + const gchar* _tmp4_ = NULL; + PixelTransformationBundle* _tmp5_ = NULL; + PixelTransformationBundle* _tmp6_ = NULL; +#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_ = _ ("Applying Color Transformations"); +#line 857 "/home/jens/Source/shotwell/src/Commands.vala" + _tmp2_ = _ ("Undoing Color Transformations"); +#line 857 "/home/jens/Source/shotwell/src/Commands.vala" + _tmp3_ = name; +#line 857 "/home/jens/Source/shotwell/src/Commands.vala" + _tmp4_ = explanation; +#line 857 "/home/jens/Source/shotwell/src/Commands.vala" + self = (AdjustColorsMultipleCommand*) multiple_photo_transformation_command_construct (object_type, _tmp0_, _tmp1_, _tmp2_, _tmp3_, _tmp4_); +#line 860 "/home/jens/Source/shotwell/src/Commands.vala" + _tmp5_ = transformations; +#line 860 "/home/jens/Source/shotwell/src/Commands.vala" + _tmp6_ = _pixel_transformation_bundle_ref0 (_tmp5_); +#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 = _tmp6_; +#line 855 "/home/jens/Source/shotwell/src/Commands.vala" + return self; +#line 8469 "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 8476 "Commands.c" +} + + +static void adjust_colors_multiple_command_real_execute_on_source (MultipleDataSourceCommand* base, DataSource* source) { + AdjustColorsMultipleCommand * self; + DataSource* _tmp0_ = NULL; + PixelTransformationBundle* _tmp1_ = NULL; +#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 8494 "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 = 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 8507 "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 8514 "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 8526 "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_ = NULL; + const gchar* _tmp1_ = NULL; + const gchar* _tmp2_ = NULL; + EditingToolsRedeyeInstance _tmp3_ = {0}; +#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 8570 "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 8577 "Commands.c" +} + + +static void redeye_command_real_execute_on_photo (GenericPhotoTransformationCommand* base, Photo* photo) { + RedeyeCommand * self; + Photo* _tmp0_ = NULL; + EditingToolsRedeyeInstance _tmp1_ = {0}; +#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 8595 "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 = redeye_command_real_execute_on_photo; +#line 868 "/home/jens/Source/shotwell/src/Commands.vala" + G_OBJECT_CLASS (klass)->finalize = redeye_command_finalize; +#line 8608 "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 8615 "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 8625 "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_ = NULL; + const gchar* _tmp1_ = NULL; +#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 8657 "Commands.c" +} + + +static void move_photos_command_real_prepare (Command* base) { + MovePhotosCommand * self; + MovePhotosCommandRealMovePhotosCommand* _tmp0_ = NULL; + MovePhotosCommandRealMovePhotosCommand* _tmp1_ = NULL; +#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 8675 "Commands.c" +} + + +static void move_photos_command_real_execute (Command* base) { + MovePhotosCommand * self; + MovePhotosCommandRealMovePhotosCommand* _tmp0_ = NULL; + MovePhotosCommandRealMovePhotosCommand* _tmp1_ = NULL; +#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 8693 "Commands.c" +} + + +static void move_photos_command_real_undo (Command* base) { + MovePhotosCommand * self; + MovePhotosCommandRealMovePhotosCommand* _tmp0_ = NULL; + MovePhotosCommandRealMovePhotosCommand* _tmp1_ = NULL; +#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 8711 "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 8718 "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 8725 "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_ = NULL; + const gchar* _tmp1_ = NULL; + const gchar* _tmp2_ = NULL; + const gchar* _tmp3_ = NULL; + const gchar* _tmp4_ = NULL; + Event* _tmp30_ = NULL; + SourceProxy* _tmp31_ = NULL; + SourceProxy* _tmp32_ = NULL; +#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 8763 "Commands.c" + { + GeeArrayList* _source_list = NULL; + GeeArrayList* _tmp5_ = NULL; + GeeArrayList* _tmp6_ = NULL; + gint _source_size = 0; + GeeArrayList* _tmp7_ = NULL; + gint _tmp8_ = 0; + gint _tmp9_ = 0; + 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_COLLECTION, GeeCollection)); +#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 8791 "Commands.c" + gint _tmp10_ = 0; + gint _tmp11_ = 0; + gint _tmp12_ = 0; + DataSource* source = NULL; + GeeArrayList* _tmp13_ = NULL; + gint _tmp14_ = 0; + gpointer _tmp15_ = NULL; + MediaSource* current_media = NULL; + DataSource* _tmp16_ = NULL; + MediaSource* _tmp17_ = NULL; + Event* old_event = NULL; + MediaSource* _tmp18_ = NULL; + Event* _tmp19_ = NULL; + SourceProxy* _tmp20_ = NULL; + Event* _tmp21_ = NULL; + SourceProxy* old_event_proxy = NULL; + SourceProxy* _tmp24_ = NULL; + SourceProxy* _tmp25_ = NULL; + GeeHashMap* _tmp27_ = NULL; + MediaSource* _tmp28_ = NULL; + SourceProxy* _tmp29_ = NULL; +#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 8825 "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 8851 "Commands.c" + Event* _tmp22_ = NULL; + SourceProxy* _tmp23_ = NULL; +#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 8862 "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 8868 "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 8878 "Commands.c" + SourceProxy* _tmp26_ = NULL; +#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 8884 "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 8904 "Commands.c" + } +#line 896 "/home/jens/Source/shotwell/src/Commands.vala" + _g_object_unref0 (_source_list); +#line 8908 "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 8924 "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 8931 "Commands.c" +} + + +static void move_photos_command_real_move_photos_command_real_execute (Command* base) { + MovePhotosCommandRealMovePhotosCommand * self; + LibraryWindow* _tmp0_ = NULL; + LibraryWindow* _tmp1_ = NULL; + Page* _tmp2_ = NULL; + Page* _tmp3_ = NULL; + gboolean _tmp4_ = FALSE; +#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 8960 "Commands.c" + Event* evt = NULL; + LibraryWindow* _tmp5_ = NULL; + LibraryWindow* _tmp6_ = NULL; + Page* _tmp7_ = NULL; + EventPage* _tmp8_ = NULL; + Event* _tmp9_ = NULL; + Event* _tmp10_ = NULL; + Event* _tmp11_ = NULL; + gint _tmp12_ = 0; + GeeArrayList* _tmp13_ = NULL; + gint _tmp14_ = 0; + gint _tmp15_ = 0; +#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_COLLECTION, GeeCollection)); +#line 928 "/home/jens/Source/shotwell/src/Commands.vala" + _tmp15_ = _tmp14_; +#line 928 "/home/jens/Source/shotwell/src/Commands.vala" + if (_tmp12_ == _tmp15_) { +#line 9003 "Commands.c" + LibraryWindow* _tmp16_ = NULL; + LibraryWindow* _tmp17_ = NULL; + SourceProxy* _tmp18_ = NULL; + DataSource* _tmp19_ = NULL; + Event* _tmp20_ = NULL; +#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 9025 "Commands.c" + } +#line 924 "/home/jens/Source/shotwell/src/Commands.vala" + _g_object_unref0 (evt); +#line 9029 "Commands.c" + } else { + SourceProxy* _tmp21_ = NULL; + DataSource* _tmp22_ = NULL; + Event* _tmp23_ = NULL; + gint _tmp24_ = 0; + gboolean _tmp25_ = FALSE; +#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 9050 "Commands.c" + LibraryWindow* _tmp26_ = NULL; + LibraryWindow* _tmp27_ = NULL; + SourceProxy* _tmp28_ = NULL; + DataSource* _tmp29_ = NULL; + Event* _tmp30_ = NULL; +#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 9072 "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 9077 "Commands.c" +} + + +static void move_photos_command_real_move_photos_command_real_execute_on_source (MultipleDataSourceCommand* base, DataSource* source) { + MovePhotosCommandRealMovePhotosCommand * self; + DataSource* _tmp0_ = NULL; + SourceProxy* _tmp1_ = NULL; + DataSource* _tmp2_ = NULL; + Event* _tmp3_ = NULL; +#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 9103 "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_ = NULL; + MediaSource* _tmp1_ = NULL; + SourceProxy* event_proxy = NULL; + GeeHashMap* _tmp2_ = NULL; + MediaSource* _tmp3_ = NULL; + gpointer _tmp4_ = NULL; + Event* _tmp5_ = NULL; + SourceProxy* _tmp6_ = NULL; + MediaSource* _tmp9_ = NULL; +#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 9141 "Commands.c" + SourceProxy* _tmp7_ = NULL; + DataSource* _tmp8_ = NULL; +#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 9152 "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 9158 "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 9170 "Commands.c" +} + + +static void move_photos_command_real_move_photos_command_on_proxy_broken (MovePhotosCommandRealMovePhotosCommand* self) { + CommandManager* _tmp0_ = NULL; + CommandManager* _tmp1_ = NULL; +#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 9187 "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 = move_photos_command_real_move_photos_command_real_execute; +#line 886 "/home/jens/Source/shotwell/src/Commands.vala" + ((MultipleDataSourceCommandClass *) klass)->execute_on_source = 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 = 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 9204 "Commands.c" +} + + +static void move_photos_command_real_move_photos_command_instance_init (MovePhotosCommandRealMovePhotosCommand * self) { + GeeHashMap* _tmp0_ = NULL; +#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, g_object_unref, TYPE_SOURCE_PROXY, (GBoxedCopyFunc) source_proxy_ref, 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 9218 "Commands.c" +} + + +static void move_photos_command_real_move_photos_command_finalize (GObject* obj) { + MovePhotosCommandRealMovePhotosCommand * self; + SourceProxy* _tmp0_ = NULL; + guint _tmp1_ = 0U; +#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 9234 "Commands.c" + { + GeeIterator* _proxy_it = NULL; + GeeHashMap* _tmp2_ = NULL; + GeeCollection* _tmp3_ = NULL; + GeeCollection* _tmp4_ = NULL; + GeeCollection* _tmp5_ = NULL; + GeeIterator* _tmp6_ = NULL; + GeeIterator* _tmp7_ = NULL; +#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_MAP, GeeMap)); +#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 9261 "Commands.c" + GeeIterator* _tmp8_ = NULL; + gboolean _tmp9_ = FALSE; + SourceProxy* proxy = NULL; + GeeIterator* _tmp10_ = NULL; + gpointer _tmp11_ = NULL; + SourceProxy* _tmp12_ = NULL; +#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 9276 "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 9288 "Commands.c" + SourceProxy* _tmp13_ = NULL; + guint _tmp14_ = 0U; +#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 9297 "Commands.c" + } +#line 916 "/home/jens/Source/shotwell/src/Commands.vala" + _source_proxy_unref0 (proxy); +#line 9301 "Commands.c" + } +#line 916 "/home/jens/Source/shotwell/src/Commands.vala" + _g_object_unref0 (_proxy_it); +#line 9305 "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 9313 "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 = move_photos_command_real_prepare; +#line 883 "/home/jens/Source/shotwell/src/Commands.vala" + ((CommandClass *) klass)->execute = move_photos_command_real_execute; +#line 883 "/home/jens/Source/shotwell/src/Commands.vala" + ((CommandClass *) klass)->undo = move_photos_command_real_undo; +#line 883 "/home/jens/Source/shotwell/src/Commands.vala" + G_OBJECT_CLASS (klass)->finalize = move_photos_command_finalize; +#line 9340 "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 9356 "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_ = NULL; + Event* new_event = NULL; + MediaSource* _tmp12_ = NULL; + Event* _tmp13_ = NULL; + GeeIterable* _tmp14_ = NULL; + const gchar* _tmp15_ = NULL; + const gchar* _tmp16_ = NULL; + MovePhotosCommandRealMovePhotosCommand* _tmp17_ = NULL; +#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 9389 "Commands.c" + { + GeeIterator* _view_it = NULL; + GeeIterable* _tmp0_ = NULL; + GeeIterator* _tmp1_ = NULL; +#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 9402 "Commands.c" + GeeIterator* _tmp2_ = NULL; + gboolean _tmp3_ = FALSE; + DataView* view = NULL; + GeeIterator* _tmp4_ = NULL; + gpointer _tmp5_ = NULL; + MediaSource* current_source = NULL; + DataView* _tmp6_ = NULL; + DataSource* _tmp7_ = NULL; + MediaSource* _tmp8_ = NULL; +#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 9420 "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 9438 "Commands.c" + MediaSource* _tmp9_ = NULL; + MediaSource* _tmp10_ = NULL; +#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 9455 "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 9461 "Commands.c" + } +#line 993 "/home/jens/Source/shotwell/src/Commands.vala" + _g_object_unref0 (_view_it); +#line 9465 "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_ = _ ("Creating New Event"); +#line 1007 "/home/jens/Source/shotwell/src/Commands.vala" + _tmp16_ = _ ("Removing Event"); +#line 1007 "/home/jens/Source/shotwell/src/Commands.vala" + _tmp17_ = move_photos_command_real_move_photos_command_new (new_event, _tmp14_, _tmp15_, _tmp16_, 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 = _tmp17_; +#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 9495 "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 9502 "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 9509 "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_ = NULL; + GeeIterable* _tmp1_ = NULL; + const gchar* _tmp2_ = NULL; + const gchar* _tmp3_ = NULL; + MovePhotosCommandRealMovePhotosCommand* _tmp4_ = NULL; +#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_ = _ ("Moving Photos to New Event"); +#line 1017 "/home/jens/Source/shotwell/src/Commands.vala" + _tmp3_ = _ ("Setting Photos to Previous Event"); +#line 1017 "/home/jens/Source/shotwell/src/Commands.vala" + _tmp4_ = move_photos_command_real_move_photos_command_new (_tmp0_, _tmp1_, _tmp2_, _tmp3_, 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 = _tmp4_; +#line 1014 "/home/jens/Source/shotwell/src/Commands.vala" + return self; +#line 9558 "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 9565 "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 9572 "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_ = NULL; + Event* _tmp48_ = NULL; + GeeArrayList* _tmp49_ = NULL; + gint _tmp50_ = 0; + gint _tmp51_ = 0; + Event* _tmp52_ = NULL; + GeeArrayList* _tmp53_ = NULL; + const gchar* _tmp54_ = NULL; + const gchar* _tmp55_ = NULL; + MovePhotosCommandRealMovePhotosCommand* _tmp56_ = NULL; +#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, g_object_unref, NULL, NULL, NULL); +#line 1034 "/home/jens/Source/shotwell/src/Commands.vala" + media_thumbs = _tmp0_; +#line 9622 "Commands.c" + { + GeeIterator* _view_it = NULL; + GeeIterable* _tmp1_ = NULL; + GeeIterator* _tmp2_ = NULL; +#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 9635 "Commands.c" + GeeIterator* _tmp3_ = NULL; + gboolean _tmp4_ = FALSE; + DataView* view = NULL; + GeeIterator* _tmp5_ = NULL; + gpointer _tmp6_ = NULL; + Event* event = NULL; + DataView* _tmp7_ = NULL; + DataSource* _tmp8_ = NULL; + Event* _tmp9_ = NULL; +#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 9653 "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 9671 "Commands.c" + Event* _tmp10_ = NULL; + Event* _tmp11_ = NULL; + Event* _tmp12_ = NULL; + gint _tmp13_ = 0; + Event* _tmp14_ = NULL; + gboolean _tmp15_ = FALSE; +#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 9698 "Commands.c" + Event* _tmp16_ = NULL; + gint _tmp17_ = 0; +#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 9707 "Commands.c" + } + } else { + Event* _tmp18_ = NULL; + gboolean _tmp19_ = FALSE; +#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 9718 "Commands.c" + Event* _tmp20_ = NULL; + gint _tmp21_ = 0; + gint _tmp22_ = 0; +#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 9730 "Commands.c" + Event* _tmp23_ = NULL; + gint _tmp24_ = 0; + Event* _tmp25_ = NULL; + Event* _tmp26_ = NULL; +#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 9749 "Commands.c" + } + } else { + gint _tmp27_ = 0; +#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 9757 "Commands.c" + Event* _tmp28_ = NULL; + gint _tmp29_ = 0; + gint _tmp30_ = 0; +#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 9769 "Commands.c" + Event* _tmp31_ = NULL; + gint _tmp32_ = 0; + Event* _tmp33_ = NULL; + Event* _tmp34_ = NULL; +#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 9788 "Commands.c" + } + } + } + } + { + GeeIterator* _media_source_it = NULL; + Event* _tmp35_ = NULL; + GeeCollection* _tmp36_ = NULL; + GeeCollection* _tmp37_ = NULL; + GeeIterator* _tmp38_ = NULL; + GeeIterator* _tmp39_ = NULL; +#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 9816 "Commands.c" + GeeIterator* _tmp40_ = NULL; + gboolean _tmp41_ = FALSE; + MediaSource* media_source = NULL; + GeeIterator* _tmp42_ = NULL; + gpointer _tmp43_ = NULL; + GeeArrayList* _tmp44_ = NULL; + MediaSource* _tmp45_ = NULL; + ThumbnailView* _tmp46_ = NULL; + ThumbnailView* _tmp47_ = NULL; +#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 9834 "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 9856 "Commands.c" + } +#line 1068 "/home/jens/Source/shotwell/src/Commands.vala" + _g_object_unref0 (_media_source_it); +#line 9860 "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 9866 "Commands.c" + } +#line 1036 "/home/jens/Source/shotwell/src/Commands.vala" + _g_object_unref0 (_view_it); +#line 9870 "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_COLLECTION, GeeCollection)); +#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_ = _ ("Merging"); +#line 1075 "/home/jens/Source/shotwell/src/Commands.vala" + _tmp55_ = _ ("Unmerging"); +#line 1075 "/home/jens/Source/shotwell/src/Commands.vala" + _tmp56_ = move_photos_command_real_move_photos_command_new (_tmp52_, G_TYPE_CHECK_INSTANCE_CAST (_tmp53_, GEE_TYPE_ITERABLE, GeeIterable), _tmp54_, _tmp55_, 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 = _tmp56_; +#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 9904 "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 9911 "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 9918 "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 9941 "Commands.c" +} + + +DuplicateMultiplePhotosCommand* duplicate_multiple_photos_command_construct (GType object_type, GeeIterable* iter) { + DuplicateMultiplePhotosCommand * self = NULL; + GeeIterable* _tmp0_ = NULL; + const gchar* _tmp1_ = NULL; + const gchar* _tmp2_ = NULL; + LibraryPhotoSourceCollection* _tmp3_ = NULL; +#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" + _tmp1_ = _ ("Duplicating photos"); +#line 1085 "/home/jens/Source/shotwell/src/Commands.vala" + _tmp2_ = _ ("Removing duplicated photos"); +#line 1085 "/home/jens/Source/shotwell/src/Commands.vala" + self = (DuplicateMultiplePhotosCommand*) multiple_data_source_command_construct (object_type, _tmp0_, _tmp1_, _tmp2_, RESOURCES_DUPLICATE_PHOTO_LABEL, RESOURCES_DUPLICATE_PHOTO_TOOLTIP); +#line 1088 "/home/jens/Source/shotwell/src/Commands.vala" + _tmp3_ = library_photo_global; +#line 1088 "/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 1084 "/home/jens/Source/shotwell/src/Commands.vala" + return self; +#line 9967 "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 9974 "Commands.c" +} + + +static void duplicate_multiple_photos_command_on_photo_destroyed (DuplicateMultiplePhotosCommand* self, DataSource* source) { + GeeHashMap* _tmp0_ = NULL; + GeeCollection* _tmp1_ = NULL; + GeeCollection* _tmp2_ = NULL; + GeeCollection* _tmp3_ = NULL; + DataSource* _tmp4_ = NULL; + gboolean _tmp5_ = FALSE; + gboolean _tmp6_ = FALSE; +#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_MAP, GeeMap)); +#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 10008 "Commands.c" + CommandManager* _tmp7_ = NULL; + CommandManager* _tmp8_ = NULL; +#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 10019 "Commands.c" + } +} + + +static void duplicate_multiple_photos_command_real_execute (Command* base) { + DuplicateMultiplePhotosCommand * self; + GeeHashMap* _tmp0_ = NULL; + gint _tmp1_ = 0; +#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 10042 "Commands.c" + gchar* error_string = NULL; + gint _tmp2_ = 0; + const gchar* _tmp3_ = NULL; + gint _tmp4_ = 0; + gchar* _tmp5_ = NULL; + const gchar* _tmp6_ = NULL; +#line 1108 "/home/jens/Source/shotwell/src/Commands.vala" + _tmp2_ = self->priv->failed; +#line 1108 "/home/jens/Source/shotwell/src/Commands.vala" + _tmp3_ = ngettext ("Unable to duplicate one photo due to a file error", "Unable to duplicate %d photos due to file errors", (gulong) _tmp2_); +#line 1108 "/home/jens/Source/shotwell/src/Commands.vala" + _tmp4_ = self->priv->failed; +#line 1108 "/home/jens/Source/shotwell/src/Commands.vala" + _tmp5_ = g_strdup_printf (_tmp3_, _tmp4_); +#line 1108 "/home/jens/Source/shotwell/src/Commands.vala" + error_string = _tmp5_; +#line 1110 "/home/jens/Source/shotwell/src/Commands.vala" + _tmp6_ = error_string; +#line 1110 "/home/jens/Source/shotwell/src/Commands.vala" + app_window_error_message (_tmp6_, NULL); +#line 1107 "/home/jens/Source/shotwell/src/Commands.vala" + _g_free0 (error_string); +#line 10065 "Commands.c" + } +} + + +static void duplicate_multiple_photos_command_real_execute_on_source (MultipleDataSourceCommand* base, DataSource* source) { + DuplicateMultiplePhotosCommand * self; + LibraryPhoto* photo = NULL; + DataSource* _tmp0_ = NULL; + LibraryPhoto* _tmp1_ = NULL; + 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 10086 "Commands.c" + { + LibraryPhoto* dupe = NULL; + LibraryPhoto* _tmp2_ = NULL; + GeeHashMap* _tmp3_ = NULL; +#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 10097 "Commands.c" + goto __catch446_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 10106 "Commands.c" + } + goto __finally446; + __catch446_g_error: + { + GError* err = NULL; + GFile* _tmp4_ = NULL; + GFile* _tmp5_ = NULL; + gchar* _tmp6_ = NULL; + gchar* _tmp7_ = NULL; + GError* _tmp8_ = NULL; + const gchar* _tmp9_ = NULL; + gint _tmp10_ = 0; +#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 10147 "Commands.c" + } + __finally446: +#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 10160 "Commands.c" + } +#line 1114 "/home/jens/Source/shotwell/src/Commands.vala" + _g_object_unref0 (photo); +#line 10164 "Commands.c" +} + + +static void duplicate_multiple_photos_command_real_undo (Command* base) { + DuplicateMultiplePhotosCommand * self; + LibraryPhotoSourceCollection* _tmp0_ = NULL; + guint _tmp1_ = 0U; + GeeHashMap* _tmp2_ = NULL; + LibraryPhotoSourceCollection* _tmp3_ = NULL; +#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 10194 "Commands.c" +} + + +static void duplicate_multiple_photos_command_real_undo_on_source (MultipleDataSourceCommand* base, DataSource* source) { + DuplicateMultiplePhotosCommand * self; + LibraryPhoto* photo = NULL; + DataSource* _tmp0_ = NULL; + LibraryPhoto* _tmp1_ = NULL; + Marker* marker = NULL; + LibraryPhotoSourceCollection* _tmp2_ = NULL; + GeeHashMap* _tmp3_ = NULL; + gpointer _tmp4_ = NULL; + LibraryPhoto* _tmp5_ = NULL; + Marker* _tmp6_ = NULL; + Marker* _tmp7_ = NULL; + LibraryPhotoSourceCollection* _tmp8_ = NULL; +#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 10245 "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 = duplicate_multiple_photos_command_real_execute; +#line 1080 "/home/jens/Source/shotwell/src/Commands.vala" + ((MultipleDataSourceCommandClass *) klass)->execute_on_source = duplicate_multiple_photos_command_real_execute_on_source; +#line 1080 "/home/jens/Source/shotwell/src/Commands.vala" + ((CommandClass *) klass)->undo = duplicate_multiple_photos_command_real_undo; +#line 1080 "/home/jens/Source/shotwell/src/Commands.vala" + ((MultipleDataSourceCommandClass *) klass)->undo_on_source = 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 10264 "Commands.c" +} + + +static void duplicate_multiple_photos_command_instance_init (DuplicateMultiplePhotosCommand * self) { + GeeHashMap* _tmp0_ = NULL; +#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, g_object_unref, TYPE_LIBRARY_PHOTO, (GBoxedCopyFunc) g_object_ref, 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 10278 "Commands.c" +} + + +static void duplicate_multiple_photos_command_finalize (GObject* obj) { + DuplicateMultiplePhotosCommand * self; + LibraryPhotoSourceCollection* _tmp0_ = NULL; + guint _tmp1_ = 0U; +#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 10298 "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_ = NULL; + Rating _tmp1_ = 0; + const gchar* _tmp2_ = NULL; + Rating _tmp3_ = 0; + DataSource* _tmp4_ = NULL; + Rating _tmp5_ = 0; +#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 10346 "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 10353 "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_ = FALSE; + DataSource* _tmp2_ = NULL; + gboolean _tmp3_ = FALSE; + DataSource* _tmp4_ = NULL; + Rating _tmp5_ = 0; +#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 10373 "Commands.c" + } else { +#line 1164 "/home/jens/Source/shotwell/src/Commands.vala" + _tmp0_ = RESOURCES_DECREASE_RATING_LABEL; +#line 10377 "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 10397 "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 10404 "Commands.c" +} + + +static void set_rating_single_command_real_execute (Command* base) { + SetRatingSingleCommand * self; + gboolean _tmp0_ = FALSE; +#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 10417 "Commands.c" + DataSource* _tmp1_ = NULL; + Rating _tmp2_ = 0; +#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 10426 "Commands.c" + } else { + gboolean _tmp3_ = FALSE; +#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 10433 "Commands.c" + DataSource* _tmp4_ = NULL; +#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 10439 "Commands.c" + } else { + DataSource* _tmp5_ = NULL; +#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 10446 "Commands.c" + } + } +} + + +static void set_rating_single_command_real_undo (Command* base) { + SetRatingSingleCommand * self; + DataSource* _tmp0_ = NULL; + Rating _tmp1_ = 0; +#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 10464 "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 = set_rating_single_command_real_execute; +#line 1148 "/home/jens/Source/shotwell/src/Commands.vala" + ((CommandClass *) klass)->undo = 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 10479 "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 10486 "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 10496 "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_ = NULL; + Rating _tmp1_ = 0; + gchar* _tmp2_ = NULL; + gchar* _tmp3_ = NULL; + const gchar* _tmp4_ = NULL; + Rating _tmp5_ = 0; + const gchar* _tmp6_ = NULL; + Rating _tmp7_ = 0; + GeeIterable* _tmp8_ = NULL; +#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_ = _ ("Restoring previous rating"); +#line 1195 "/home/jens/Source/shotwell/src/Commands.vala" + _tmp5_ = rating; +#line 1195 "/home/jens/Source/shotwell/src/Commands.vala" + _tmp6_ = resources_rating_label (_tmp5_); +#line 1195 "/home/jens/Source/shotwell/src/Commands.vala" + self = (SetRatingCommand*) multiple_data_source_command_construct (object_type, _tmp0_, _tmp3_, _tmp4_, _tmp6_, ""); +#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" + _tmp7_ = rating; +#line 1198 "/home/jens/Source/shotwell/src/Commands.vala" + self->priv->new_rating = _tmp7_; +#line 1200 "/home/jens/Source/shotwell/src/Commands.vala" + _tmp8_ = iter; +#line 1200 "/home/jens/Source/shotwell/src/Commands.vala" + set_rating_command_save_source_states (self, _tmp8_); +#line 1194 "/home/jens/Source/shotwell/src/Commands.vala" + return self; +#line 10555 "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 10562 "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_ = FALSE; + const gchar* _tmp4_ = NULL; + gboolean _tmp5_ = FALSE; + const gchar* _tmp8_ = NULL; + gboolean _tmp9_ = FALSE; + GeeIterable* _tmp10_ = NULL; + gboolean _tmp11_ = FALSE; + GeeIterable* _tmp12_ = NULL; +#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 10583 "Commands.c" + const gchar* _tmp2_ = NULL; +#line 1205 "/home/jens/Source/shotwell/src/Commands.vala" + _tmp2_ = _ ("Increasing ratings"); +#line 1205 "/home/jens/Source/shotwell/src/Commands.vala" + _tmp0_ = _tmp2_; +#line 10589 "Commands.c" + } else { + const gchar* _tmp3_ = NULL; +#line 1205 "/home/jens/Source/shotwell/src/Commands.vala" + _tmp3_ = _ ("Decreasing ratings"); +#line 1205 "/home/jens/Source/shotwell/src/Commands.vala" + _tmp0_ = _tmp3_; +#line 10596 "Commands.c" + } +#line 1206 "/home/jens/Source/shotwell/src/Commands.vala" + _tmp5_ = is_incrementing; +#line 1206 "/home/jens/Source/shotwell/src/Commands.vala" + if (_tmp5_) { +#line 10602 "Commands.c" + const gchar* _tmp6_ = NULL; +#line 1206 "/home/jens/Source/shotwell/src/Commands.vala" + _tmp6_ = _ ("Decreasing ratings"); +#line 1206 "/home/jens/Source/shotwell/src/Commands.vala" + _tmp4_ = _tmp6_; +#line 10608 "Commands.c" + } else { + const gchar* _tmp7_ = NULL; +#line 1206 "/home/jens/Source/shotwell/src/Commands.vala" + _tmp7_ = _ ("Increasing ratings"); +#line 1206 "/home/jens/Source/shotwell/src/Commands.vala" + _tmp4_ = _tmp7_; +#line 10615 "Commands.c" + } +#line 1207 "/home/jens/Source/shotwell/src/Commands.vala" + _tmp9_ = is_incrementing; +#line 1207 "/home/jens/Source/shotwell/src/Commands.vala" + if (_tmp9_) { +#line 1207 "/home/jens/Source/shotwell/src/Commands.vala" + _tmp8_ = RESOURCES_INCREASE_RATING_LABEL; +#line 10623 "Commands.c" + } else { +#line 1207 "/home/jens/Source/shotwell/src/Commands.vala" + _tmp8_ = RESOURCES_DECREASE_RATING_LABEL; +#line 10627 "Commands.c" + } +#line 1204 "/home/jens/Source/shotwell/src/Commands.vala" + _tmp10_ = iter; +#line 1204 "/home/jens/Source/shotwell/src/Commands.vala" + self = (SetRatingCommand*) multiple_data_source_command_construct (object_type, _tmp10_, _tmp0_, _tmp4_, _tmp8_, ""); +#line 1209 "/home/jens/Source/shotwell/src/Commands.vala" + self->priv->set_direct = FALSE; +#line 1210 "/home/jens/Source/shotwell/src/Commands.vala" + _tmp11_ = is_incrementing; +#line 1210 "/home/jens/Source/shotwell/src/Commands.vala" + self->priv->incrementing = _tmp11_; +#line 1212 "/home/jens/Source/shotwell/src/Commands.vala" + _tmp12_ = iter; +#line 1212 "/home/jens/Source/shotwell/src/Commands.vala" + set_rating_command_save_source_states (self, _tmp12_); +#line 1203 "/home/jens/Source/shotwell/src/Commands.vala" + return self; +#line 10645 "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 10652 "Commands.c" +} + + +static void set_rating_command_save_source_states (SetRatingCommand* self, GeeIterable* iter) { + GeeHashMap* _tmp0_ = NULL; +#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, 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 10668 "Commands.c" + { + GeeIterator* _view_it = NULL; + GeeIterable* _tmp1_ = NULL; + GeeIterator* _tmp2_ = NULL; +#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 10681 "Commands.c" + GeeIterator* _tmp3_ = NULL; + gboolean _tmp4_ = FALSE; + DataView* view = NULL; + GeeIterator* _tmp5_ = NULL; + gpointer _tmp6_ = NULL; + DataSource* source = NULL; + DataView* _tmp7_ = NULL; + DataSource* _tmp8_ = NULL; + GeeHashMap* _tmp9_ = NULL; + DataSource* _tmp10_ = NULL; + DataSource* _tmp11_ = NULL; + Rating _tmp12_ = 0; +#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 10702 "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 10730 "Commands.c" + } +#line 1218 "/home/jens/Source/shotwell/src/Commands.vala" + _g_object_unref0 (_view_it); +#line 10734 "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 10747 "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 10759 "Commands.c" +} + + +static void set_rating_command_real_execute_on_source (MultipleDataSourceCommand* base, DataSource* source) { + SetRatingCommand * self; + gboolean _tmp0_ = FALSE; +#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 10774 "Commands.c" + DataSource* _tmp1_ = NULL; + Rating _tmp2_ = 0; +#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 10783 "Commands.c" + } else { + gboolean _tmp3_ = FALSE; +#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 10790 "Commands.c" + DataSource* _tmp4_ = NULL; +#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 10796 "Commands.c" + } else { + DataSource* _tmp5_ = NULL; +#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 10803 "Commands.c" + } + } +} + + +static void set_rating_command_real_undo_on_source (MultipleDataSourceCommand* base, DataSource* source) { + SetRatingCommand * self; + DataSource* _tmp0_ = NULL; + GeeHashMap* _tmp1_ = NULL; + DataSource* _tmp2_ = NULL; + gpointer _tmp3_ = NULL; +#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 10829 "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 = set_rating_command_real_execute; +#line 1187 "/home/jens/Source/shotwell/src/Commands.vala" + ((CommandClass *) klass)->undo = set_rating_command_real_undo; +#line 1187 "/home/jens/Source/shotwell/src/Commands.vala" + ((MultipleDataSourceCommandClass *) klass)->execute_on_source = set_rating_command_real_execute_on_source; +#line 1187 "/home/jens/Source/shotwell/src/Commands.vala" + ((MultipleDataSourceCommandClass *) klass)->undo_on_source = 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 10848 "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 10857 "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 10869 "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_ = NULL; + const gchar* _tmp1_ = NULL; + const gchar* _tmp2_ = NULL; + const gchar* _tmp3_ = NULL; + RawDeveloper _tmp4_ = 0; + GeeIterable* _tmp5_ = NULL; +#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" + _tmp1_ = _ ("Setting RAW developer"); +#line 1256 "/home/jens/Source/shotwell/src/Commands.vala" + _tmp2_ = _ ("Restoring previous RAW developer"); +#line 1256 "/home/jens/Source/shotwell/src/Commands.vala" + _tmp3_ = _ ("Set Developer"); +#line 1256 "/home/jens/Source/shotwell/src/Commands.vala" + self = (SetRawDeveloperCommand*) multiple_data_source_command_construct (object_type, _tmp0_, _tmp1_, _tmp2_, _tmp3_, ""); +#line 1258 "/home/jens/Source/shotwell/src/Commands.vala" + _tmp4_ = developer; +#line 1258 "/home/jens/Source/shotwell/src/Commands.vala" + self->priv->new_developer = _tmp4_; +#line 1259 "/home/jens/Source/shotwell/src/Commands.vala" + _tmp5_ = iter; +#line 1259 "/home/jens/Source/shotwell/src/Commands.vala" + set_raw_developer_command_save_source_states (self, _tmp5_); +#line 1255 "/home/jens/Source/shotwell/src/Commands.vala" + return self; +#line 10915 "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 10922 "Commands.c" +} + + +static void set_raw_developer_command_save_source_states (SetRawDeveloperCommand* self, GeeIterable* iter) { + GeeHashMap* _tmp0_ = NULL; + GeeHashMap* _tmp1_ = NULL; +#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, 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, g_object_unref, TYPE_PHOTO_TRANSFORMATION_STATE, (GBoxedCopyFunc) g_object_ref, 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 10945 "Commands.c" + { + GeeIterator* _view_it = NULL; + GeeIterable* _tmp2_ = NULL; + GeeIterator* _tmp3_ = NULL; +#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 10958 "Commands.c" + GeeIterator* _tmp4_ = NULL; + gboolean _tmp5_ = FALSE; + DataView* view = NULL; + GeeIterator* _tmp6_ = NULL; + gpointer _tmp7_ = NULL; + Photo* photo = NULL; + DataView* _tmp8_ = NULL; + DataSource* _tmp9_ = NULL; + Photo* _tmp10_ = NULL; + Photo* _tmp11_ = NULL; + gboolean _tmp12_ = FALSE; +#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 10978 "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 10996 "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 11006 "Commands.c" + GeeHashMap* _tmp13_ = NULL; + Photo* _tmp14_ = NULL; + Photo* _tmp15_ = NULL; + RawDeveloper _tmp16_ = 0; + GeeHashMap* _tmp17_ = NULL; + Photo* _tmp18_ = NULL; + Photo* _tmp19_ = NULL; + PhotoTransformationState* _tmp20_ = NULL; + PhotoTransformationState* _tmp21_ = NULL; +#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 11040 "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 11046 "Commands.c" + } +#line 1266 "/home/jens/Source/shotwell/src/Commands.vala" + _g_object_unref0 (_view_it); +#line 11050 "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 11061 "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 11071 "Commands.c" +} + + +static void set_raw_developer_command_real_execute_on_source (MultipleDataSourceCommand* base, DataSource* source) { + SetRawDeveloperCommand * self; + Photo* photo = NULL; + DataSource* _tmp0_ = NULL; + Photo* _tmp1_ = NULL; + Photo* _tmp2_ = NULL; + gboolean _tmp3_ = FALSE; +#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 11098 "Commands.c" + gboolean _tmp4_ = FALSE; + RawDeveloper _tmp5_ = 0; +#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 11105 "Commands.c" + Photo* _tmp6_ = NULL; + gboolean _tmp7_ = FALSE; +#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 11114 "Commands.c" + } else { +#line 1286 "/home/jens/Source/shotwell/src/Commands.vala" + _tmp4_ = FALSE; +#line 11118 "Commands.c" + } +#line 1286 "/home/jens/Source/shotwell/src/Commands.vala" + if (_tmp4_) { +#line 11122 "Commands.c" + Photo* _tmp8_ = NULL; +#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 11128 "Commands.c" + } else { + Photo* _tmp9_ = NULL; + RawDeveloper _tmp10_ = 0; +#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 11138 "Commands.c" + } + } +#line 1283 "/home/jens/Source/shotwell/src/Commands.vala" + _g_object_unref0 (photo); +#line 11143 "Commands.c" +} + + +static void set_raw_developer_command_real_undo_on_source (MultipleDataSourceCommand* base, DataSource* source) { + SetRawDeveloperCommand * self; + Photo* photo = NULL; + DataSource* _tmp0_ = NULL; + Photo* _tmp1_ = NULL; + Photo* _tmp2_ = NULL; + gboolean _tmp3_ = FALSE; +#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 11170 "Commands.c" + Photo* _tmp4_ = NULL; + GeeHashMap* _tmp5_ = NULL; + Photo* _tmp6_ = NULL; + gpointer _tmp7_ = NULL; + Photo* _tmp8_ = NULL; + GeeHashMap* _tmp9_ = NULL; + Photo* _tmp10_ = NULL; + gpointer _tmp11_ = NULL; + PhotoTransformationState* _tmp12_ = NULL; +#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 11204 "Commands.c" + } +#line 1293 "/home/jens/Source/shotwell/src/Commands.vala" + _g_object_unref0 (photo); +#line 11208 "Commands.c" +} + + +static gboolean set_raw_developer_command_is_raw_photo (SetRawDeveloperCommand* self, Photo* photo) { + gboolean result = FALSE; + gboolean _tmp0_ = FALSE; + Photo* _tmp1_ = NULL; +#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 11224 "Commands.c" + Photo* _tmp2_ = NULL; + PhotoFileFormat _tmp3_ = 0; +#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 11233 "Commands.c" + } else { +#line 1302 "/home/jens/Source/shotwell/src/Commands.vala" + _tmp0_ = FALSE; +#line 11237 "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 11243 "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 = set_raw_developer_command_real_execute; +#line 1250 "/home/jens/Source/shotwell/src/Commands.vala" + ((CommandClass *) klass)->undo = set_raw_developer_command_real_undo; +#line 1250 "/home/jens/Source/shotwell/src/Commands.vala" + ((MultipleDataSourceCommandClass *) klass)->execute_on_source = set_raw_developer_command_real_execute_on_source; +#line 1250 "/home/jens/Source/shotwell/src/Commands.vala" + ((MultipleDataSourceCommandClass *) klass)->undo_on_source = 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 11262 "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 11269 "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 11283 "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_ = NULL; + Dateable* _tmp1_ = NULL; + Dateable* _tmp2_ = NULL; + gint64 _tmp3_ = 0LL; + gboolean _tmp4_ = FALSE; +#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 11330 "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 11337 "Commands.c" +} + + +static void adjust_date_time_photo_command_real_execute (Command* base) { + AdjustDateTimePhotoCommand * self; + Dateable* _tmp0_ = NULL; + Dateable* _tmp1_ = NULL; + time_t _tmp2_ = 0; + gint64 _tmp3_ = 0LL; + Dateable* _tmp4_ = NULL; + Event* _tmp5_ = NULL; + ViewCollection* all_events = NULL; + ViewCollection* _tmp6_ = NULL; + Dateable* _tmp23_ = NULL; + ViewCollection* _tmp24_ = NULL; +#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 11377 "Commands.c" + { + GeeIterator* _dobj_it = NULL; + EventSourceCollection* _tmp7_ = NULL; + GeeCollection* _tmp8_ = NULL; + GeeCollection* _tmp9_ = NULL; + GeeIterator* _tmp10_ = NULL; + GeeIterator* _tmp11_ = NULL; +#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 11401 "Commands.c" + GeeIterator* _tmp12_ = NULL; + gboolean _tmp13_ = FALSE; + DataObject* dobj = NULL; + GeeIterator* _tmp14_ = NULL; + gpointer _tmp15_ = NULL; + Event* event = NULL; + DataObject* _tmp16_ = NULL; + Event* _tmp17_ = NULL; + Event* _tmp18_ = NULL; +#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 11419 "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 11437 "Commands.c" + ViewCollection* _tmp19_ = NULL; + Event* _tmp20_ = NULL; + EventView* _tmp21_ = NULL; + EventView* _tmp22_ = NULL; +#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 11454 "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 11460 "Commands.c" + } +#line 1327 "/home/jens/Source/shotwell/src/Commands.vala" + _g_object_unref0 (_dobj_it); +#line 11464 "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 11474 "Commands.c" +} + + +static void adjust_date_time_photo_command_real_undo (Command* base) { + AdjustDateTimePhotoCommand * self; + Dateable* _tmp0_ = NULL; + Dateable* _tmp1_ = NULL; + time_t _tmp2_ = 0; + gint64 _tmp3_ = 0LL; + Dateable* _tmp4_ = NULL; + Event* _tmp5_ = NULL; +#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 11504 "Commands.c" +} + + +static void adjust_date_time_photo_command_set_time (AdjustDateTimePhotoCommand* self, Dateable* dateable, time_t exposure_time) { + gboolean _tmp0_ = FALSE; + gboolean _tmp1_ = FALSE; + 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 11520 "Commands.c" + Dateable* _tmp2_ = NULL; +#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 11526 "Commands.c" + } else { +#line 1343 "/home/jens/Source/shotwell/src/Commands.vala" + _tmp0_ = FALSE; +#line 11530 "Commands.c" + } +#line 1343 "/home/jens/Source/shotwell/src/Commands.vala" + if (_tmp0_) { +#line 11534 "Commands.c" + { + Dateable* _tmp3_ = NULL; + time_t _tmp4_ = 0; +#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 11546 "Commands.c" + goto __catch447_g_error; + } + } + goto __finally447; + __catch447_g_error: + { + GError* err = NULL; + const gchar* _tmp5_ = 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" + _tmp5_ = _ ("Original photo could not be adjusted."); +#line 1347 "/home/jens/Source/shotwell/src/Commands.vala" + app_window_error_message (_tmp5_, NULL); +#line 1344 "/home/jens/Source/shotwell/src/Commands.vala" + _g_error_free0 (err); +#line 11565 "Commands.c" + } + __finally447: +#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 11576 "Commands.c" + } + } else { + Dateable* _tmp6_ = NULL; + time_t _tmp7_ = 0; +#line 1350 "/home/jens/Source/shotwell/src/Commands.vala" + _tmp6_ = dateable; +#line 1350 "/home/jens/Source/shotwell/src/Commands.vala" + _tmp7_ = exposure_time; +#line 1350 "/home/jens/Source/shotwell/src/Commands.vala" + dateable_set_exposure_time (_tmp6_, _tmp7_); +#line 11587 "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 = adjust_date_time_photo_command_real_execute; +#line 1306 "/home/jens/Source/shotwell/src/Commands.vala" + ((CommandClass *) klass)->undo = 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 11603 "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 11610 "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 11624 "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 11648 "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 11655 "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_ = NULL; + const gchar* _tmp1_ = NULL; + const gchar* _tmp2_ = NULL; + gint64 _tmp3_ = 0LL; + gboolean _tmp4_ = FALSE; + gboolean _tmp5_ = FALSE; + GeeHashMap* _tmp6_ = NULL; + GeeHashMap* _tmp32_ = NULL; +#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" + _tmp1_ = _ ("Adjusting Date and Time"); +#line 1368 "/home/jens/Source/shotwell/src/Commands.vala" + _tmp2_ = _ ("Undoing Date and Time Adjustment"); +#line 1368 "/home/jens/Source/shotwell/src/Commands.vala" + self = (AdjustDateTimePhotosCommand*) multiple_data_source_command_construct (object_type, _tmp0_, _tmp1_, _tmp2_, RESOURCES_ADJUST_DATE_TIME_LABEL, ""); +#line 1371 "/home/jens/Source/shotwell/src/Commands.vala" + _tmp3_ = time_shift; +#line 1371 "/home/jens/Source/shotwell/src/Commands.vala" + self->priv->time_shift = _tmp3_; +#line 1372 "/home/jens/Source/shotwell/src/Commands.vala" + _tmp4_ = keep_relativity; +#line 1372 "/home/jens/Source/shotwell/src/Commands.vala" + self->priv->keep_relativity = _tmp4_; +#line 1373 "/home/jens/Source/shotwell/src/Commands.vala" + _tmp5_ = modify_originals; +#line 1373 "/home/jens/Source/shotwell/src/Commands.vala" + self->priv->modify_originals = _tmp5_; +#line 1377 "/home/jens/Source/shotwell/src/Commands.vala" + _tmp6_ = gee_hash_map_new (TYPE_DATEABLE, (GBoxedCopyFunc) g_object_ref, g_object_unref, TYPE_EVENT, (GBoxedCopyFunc) g_object_ref, 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 (_tmp6_, GEE_TYPE_MAP, GeeMap); +#line 11697 "Commands.c" + { + GeeIterator* _view_it = NULL; + GeeIterable* _tmp7_ = NULL; + GeeIterator* _tmp8_ = NULL; +#line 1380 "/home/jens/Source/shotwell/src/Commands.vala" + _tmp7_ = iter; +#line 1380 "/home/jens/Source/shotwell/src/Commands.vala" + _tmp8_ = gee_iterable_iterator (_tmp7_); +#line 1380 "/home/jens/Source/shotwell/src/Commands.vala" + _view_it = _tmp8_; +#line 1380 "/home/jens/Source/shotwell/src/Commands.vala" + while (TRUE) { +#line 11710 "Commands.c" + GeeIterator* _tmp9_ = NULL; + gboolean _tmp10_ = FALSE; + DataView* view = NULL; + GeeIterator* _tmp11_ = NULL; + gpointer _tmp12_ = NULL; + GeeMap* _tmp13_ = NULL; + DataView* _tmp14_ = NULL; + DataSource* _tmp15_ = NULL; + Dateable* _tmp16_ = NULL; + Dateable* _tmp17_ = NULL; + DataView* _tmp18_ = NULL; + DataSource* _tmp19_ = NULL; + MediaSource* _tmp20_ = NULL; + MediaSource* _tmp21_ = NULL; + Event* _tmp22_ = NULL; + Event* _tmp23_ = NULL; + time_t* _tmp24_ = NULL; +#line 1380 "/home/jens/Source/shotwell/src/Commands.vala" + _tmp9_ = _view_it; +#line 1380 "/home/jens/Source/shotwell/src/Commands.vala" + _tmp10_ = gee_iterator_next (_tmp9_); +#line 1380 "/home/jens/Source/shotwell/src/Commands.vala" + if (!_tmp10_) { +#line 1380 "/home/jens/Source/shotwell/src/Commands.vala" + break; +#line 11736 "Commands.c" + } +#line 1380 "/home/jens/Source/shotwell/src/Commands.vala" + _tmp11_ = _view_it; +#line 1380 "/home/jens/Source/shotwell/src/Commands.vala" + _tmp12_ = gee_iterator_get (_tmp11_); +#line 1380 "/home/jens/Source/shotwell/src/Commands.vala" + view = (DataView*) _tmp12_; +#line 1381 "/home/jens/Source/shotwell/src/Commands.vala" + _tmp13_ = self->priv->prev_events; +#line 1381 "/home/jens/Source/shotwell/src/Commands.vala" + _tmp14_ = view; +#line 1381 "/home/jens/Source/shotwell/src/Commands.vala" + _tmp15_ = data_view_get_source (_tmp14_); +#line 1381 "/home/jens/Source/shotwell/src/Commands.vala" + _tmp16_ = G_TYPE_CHECK_INSTANCE_TYPE (_tmp15_, TYPE_DATEABLE) ? ((Dateable*) _tmp15_) : NULL; +#line 1381 "/home/jens/Source/shotwell/src/Commands.vala" + if (_tmp16_ == NULL) { +#line 1381 "/home/jens/Source/shotwell/src/Commands.vala" + _g_object_unref0 (_tmp15_); +#line 11756 "Commands.c" + } +#line 1381 "/home/jens/Source/shotwell/src/Commands.vala" + _tmp17_ = _tmp16_; +#line 1381 "/home/jens/Source/shotwell/src/Commands.vala" + _tmp18_ = view; +#line 1381 "/home/jens/Source/shotwell/src/Commands.vala" + _tmp19_ = data_view_get_source (_tmp18_); +#line 1381 "/home/jens/Source/shotwell/src/Commands.vala" + _tmp20_ = G_TYPE_CHECK_INSTANCE_TYPE (_tmp19_, TYPE_MEDIA_SOURCE) ? ((MediaSource*) _tmp19_) : NULL; +#line 1381 "/home/jens/Source/shotwell/src/Commands.vala" + if (_tmp20_ == NULL) { +#line 1381 "/home/jens/Source/shotwell/src/Commands.vala" + _g_object_unref0 (_tmp19_); +#line 11770 "Commands.c" + } +#line 1381 "/home/jens/Source/shotwell/src/Commands.vala" + _tmp21_ = _tmp20_; +#line 1381 "/home/jens/Source/shotwell/src/Commands.vala" + _tmp22_ = media_source_get_event (_tmp21_); +#line 1381 "/home/jens/Source/shotwell/src/Commands.vala" + _tmp23_ = _tmp22_; +#line 1381 "/home/jens/Source/shotwell/src/Commands.vala" + gee_map_set (_tmp13_, _tmp17_, _tmp23_); +#line 1381 "/home/jens/Source/shotwell/src/Commands.vala" + _g_object_unref0 (_tmp23_); +#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 (_tmp17_); +#line 1383 "/home/jens/Source/shotwell/src/Commands.vala" + _tmp24_ = self->priv->new_time; +#line 1383 "/home/jens/Source/shotwell/src/Commands.vala" + if (_tmp24_ == NULL) { +#line 11790 "Commands.c" + DataView* _tmp25_ = NULL; + DataSource* _tmp26_ = NULL; + Dateable* _tmp27_ = NULL; + time_t _tmp28_ = 0; + gint64 _tmp29_ = 0LL; + time_t _tmp30_ = 0; + time_t* _tmp31_ = NULL; +#line 1384 "/home/jens/Source/shotwell/src/Commands.vala" + _tmp25_ = view; +#line 1384 "/home/jens/Source/shotwell/src/Commands.vala" + _tmp26_ = data_view_get_source (_tmp25_); +#line 1384 "/home/jens/Source/shotwell/src/Commands.vala" + _tmp27_ = G_TYPE_CHECK_INSTANCE_CAST (_tmp26_, TYPE_DATEABLE, Dateable); +#line 1384 "/home/jens/Source/shotwell/src/Commands.vala" + _tmp28_ = dateable_get_exposure_time (_tmp27_); +#line 1384 "/home/jens/Source/shotwell/src/Commands.vala" + _tmp29_ = time_shift; +#line 1384 "/home/jens/Source/shotwell/src/Commands.vala" + _tmp30_ = _tmp28_ + ((time_t) _tmp29_); +#line 1384 "/home/jens/Source/shotwell/src/Commands.vala" + _tmp31_ = __time_t_dup0 (&_tmp30_); +#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 = _tmp31_; +#line 1384 "/home/jens/Source/shotwell/src/Commands.vala" + _g_object_unref0 (_tmp27_); +#line 1386 "/home/jens/Source/shotwell/src/Commands.vala" + _g_object_unref0 (view); +#line 1386 "/home/jens/Source/shotwell/src/Commands.vala" + break; +#line 11822 "Commands.c" + } +#line 1380 "/home/jens/Source/shotwell/src/Commands.vala" + _g_object_unref0 (view); +#line 11826 "Commands.c" + } +#line 1380 "/home/jens/Source/shotwell/src/Commands.vala" + _g_object_unref0 (_view_it); +#line 11830 "Commands.c" + } +#line 1390 "/home/jens/Source/shotwell/src/Commands.vala" + _tmp32_ = gee_hash_map_new (TYPE_DATEABLE, (GBoxedCopyFunc) g_object_ref, g_object_unref, G_TYPE_INVALID, (GBoxedCopyFunc) _time_t_dup, 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 = _tmp32_; +#line 1366 "/home/jens/Source/shotwell/src/Commands.vala" + return self; +#line 11840 "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 11847 "Commands.c" +} + + +static void adjust_date_time_photos_command_real_execute (Command* base) { + AdjustDateTimePhotosCommand * self; + GeeArrayList* _tmp0_ = NULL; + GeeArrayList* _tmp1_ = NULL; + gint _tmp2_ = 0; + gint _tmp3_ = 0; + ViewCollection* all_events = NULL; + ViewCollection* _tmp10_ = NULL; +#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, 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_COLLECTION, GeeCollection)); +#line 1397 "/home/jens/Source/shotwell/src/Commands.vala" + _tmp3_ = _tmp2_; +#line 1397 "/home/jens/Source/shotwell/src/Commands.vala" + if (_tmp3_ > 0) { +#line 11877 "Commands.c" + GeeArrayList* _tmp4_ = NULL; + GeeArrayList* _tmp5_ = NULL; + gint _tmp6_ = 0; + gint _tmp7_ = 0; + const gchar* _tmp8_ = NULL; + const gchar* _tmp9_ = NULL; +#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_COLLECTION, GeeCollection)); +#line 1398 "/home/jens/Source/shotwell/src/Commands.vala" + _tmp7_ = _tmp6_; +#line 1398 "/home/jens/Source/shotwell/src/Commands.vala" + _tmp8_ = ngettext ("One original photo could not be adjusted.", "The following original photos could not be adjusted.", (gulong) _tmp7_); +#line 1398 "/home/jens/Source/shotwell/src/Commands.vala" + _tmp9_ = _ ("Time Adjustment Error"); +#line 1398 "/home/jens/Source/shotwell/src/Commands.vala" + multiple_object_error_dialog (_tmp4_, _tmp8_, _tmp9_); +#line 11898 "Commands.c" + } +#line 1404 "/home/jens/Source/shotwell/src/Commands.vala" + _tmp10_ = view_collection_new ("tmp"); +#line 1404 "/home/jens/Source/shotwell/src/Commands.vala" + all_events = _tmp10_; +#line 11904 "Commands.c" + { + GeeIterator* _d_it = NULL; + GeeMap* _tmp11_ = NULL; + GeeSet* _tmp12_ = NULL; + GeeSet* _tmp13_ = NULL; + GeeSet* _tmp14_ = NULL; + GeeIterator* _tmp15_ = NULL; + GeeIterator* _tmp16_ = NULL; +#line 1406 "/home/jens/Source/shotwell/src/Commands.vala" + _tmp11_ = self->priv->prev_events; +#line 1406 "/home/jens/Source/shotwell/src/Commands.vala" + _tmp12_ = gee_map_get_keys (_tmp11_); +#line 1406 "/home/jens/Source/shotwell/src/Commands.vala" + _tmp13_ = _tmp12_; +#line 1406 "/home/jens/Source/shotwell/src/Commands.vala" + _tmp14_ = _tmp13_; +#line 1406 "/home/jens/Source/shotwell/src/Commands.vala" + _tmp15_ = gee_iterable_iterator (G_TYPE_CHECK_INSTANCE_CAST (_tmp14_, GEE_TYPE_ITERABLE, GeeIterable)); +#line 1406 "/home/jens/Source/shotwell/src/Commands.vala" + _tmp16_ = _tmp15_; +#line 1406 "/home/jens/Source/shotwell/src/Commands.vala" + _g_object_unref0 (_tmp14_); +#line 1406 "/home/jens/Source/shotwell/src/Commands.vala" + _d_it = _tmp16_; +#line 1406 "/home/jens/Source/shotwell/src/Commands.vala" + while (TRUE) { +#line 11931 "Commands.c" + GeeIterator* _tmp17_ = NULL; + gboolean _tmp18_ = FALSE; + Dateable* d = NULL; + GeeIterator* _tmp19_ = NULL; + gpointer _tmp20_ = NULL; + Dateable* _tmp37_ = NULL; + ViewCollection* _tmp38_ = NULL; +#line 1406 "/home/jens/Source/shotwell/src/Commands.vala" + _tmp17_ = _d_it; +#line 1406 "/home/jens/Source/shotwell/src/Commands.vala" + _tmp18_ = gee_iterator_next (_tmp17_); +#line 1406 "/home/jens/Source/shotwell/src/Commands.vala" + if (!_tmp18_) { +#line 1406 "/home/jens/Source/shotwell/src/Commands.vala" + break; +#line 11947 "Commands.c" + } +#line 1406 "/home/jens/Source/shotwell/src/Commands.vala" + _tmp19_ = _d_it; +#line 1406 "/home/jens/Source/shotwell/src/Commands.vala" + _tmp20_ = gee_iterator_get (_tmp19_); +#line 1406 "/home/jens/Source/shotwell/src/Commands.vala" + d = (Dateable*) _tmp20_; +#line 11955 "Commands.c" + { + GeeIterator* _dobj_it = NULL; + EventSourceCollection* _tmp21_ = NULL; + GeeCollection* _tmp22_ = NULL; + GeeCollection* _tmp23_ = NULL; + GeeIterator* _tmp24_ = NULL; + GeeIterator* _tmp25_ = NULL; +#line 1407 "/home/jens/Source/shotwell/src/Commands.vala" + _tmp21_ = event_global; +#line 1407 "/home/jens/Source/shotwell/src/Commands.vala" + _tmp22_ = data_collection_get_all (G_TYPE_CHECK_INSTANCE_CAST (_tmp21_, TYPE_DATA_COLLECTION, DataCollection)); +#line 1407 "/home/jens/Source/shotwell/src/Commands.vala" + _tmp23_ = _tmp22_; +#line 1407 "/home/jens/Source/shotwell/src/Commands.vala" + _tmp24_ = gee_iterable_iterator (G_TYPE_CHECK_INSTANCE_CAST (_tmp23_, GEE_TYPE_ITERABLE, GeeIterable)); +#line 1407 "/home/jens/Source/shotwell/src/Commands.vala" + _tmp25_ = _tmp24_; +#line 1407 "/home/jens/Source/shotwell/src/Commands.vala" + _g_object_unref0 (_tmp23_); +#line 1407 "/home/jens/Source/shotwell/src/Commands.vala" + _dobj_it = _tmp25_; +#line 1407 "/home/jens/Source/shotwell/src/Commands.vala" + while (TRUE) { +#line 11979 "Commands.c" + GeeIterator* _tmp26_ = NULL; + gboolean _tmp27_ = FALSE; + DataObject* dobj = NULL; + GeeIterator* _tmp28_ = NULL; + gpointer _tmp29_ = NULL; + Event* event = NULL; + DataObject* _tmp30_ = NULL; + Event* _tmp31_ = NULL; + Event* _tmp32_ = NULL; +#line 1407 "/home/jens/Source/shotwell/src/Commands.vala" + _tmp26_ = _dobj_it; +#line 1407 "/home/jens/Source/shotwell/src/Commands.vala" + _tmp27_ = gee_iterator_next (_tmp26_); +#line 1407 "/home/jens/Source/shotwell/src/Commands.vala" + if (!_tmp27_) { +#line 1407 "/home/jens/Source/shotwell/src/Commands.vala" + break; +#line 11997 "Commands.c" + } +#line 1407 "/home/jens/Source/shotwell/src/Commands.vala" + _tmp28_ = _dobj_it; +#line 1407 "/home/jens/Source/shotwell/src/Commands.vala" + _tmp29_ = gee_iterator_get (_tmp28_); +#line 1407 "/home/jens/Source/shotwell/src/Commands.vala" + dobj = (DataObject*) _tmp29_; +#line 1408 "/home/jens/Source/shotwell/src/Commands.vala" + _tmp30_ = dobj; +#line 1408 "/home/jens/Source/shotwell/src/Commands.vala" + _tmp31_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_TYPE (_tmp30_, TYPE_EVENT) ? ((Event*) _tmp30_) : NULL); +#line 1408 "/home/jens/Source/shotwell/src/Commands.vala" + event = _tmp31_; +#line 1409 "/home/jens/Source/shotwell/src/Commands.vala" + _tmp32_ = event; +#line 1409 "/home/jens/Source/shotwell/src/Commands.vala" + if (_tmp32_ != NULL) { +#line 12015 "Commands.c" + ViewCollection* _tmp33_ = NULL; + Event* _tmp34_ = NULL; + EventView* _tmp35_ = NULL; + EventView* _tmp36_ = NULL; +#line 1410 "/home/jens/Source/shotwell/src/Commands.vala" + _tmp33_ = all_events; +#line 1410 "/home/jens/Source/shotwell/src/Commands.vala" + _tmp34_ = event; +#line 1410 "/home/jens/Source/shotwell/src/Commands.vala" + _tmp35_ = event_view_new (G_TYPE_CHECK_INSTANCE_CAST (_tmp34_, TYPE_EVENT_SOURCE, EventSource)); +#line 1410 "/home/jens/Source/shotwell/src/Commands.vala" + _tmp36_ = _tmp35_; +#line 1410 "/home/jens/Source/shotwell/src/Commands.vala" + data_collection_add (G_TYPE_CHECK_INSTANCE_CAST (_tmp33_, TYPE_DATA_COLLECTION, DataCollection), G_TYPE_CHECK_INSTANCE_CAST (_tmp36_, TYPE_DATA_OBJECT, DataObject)); +#line 1410 "/home/jens/Source/shotwell/src/Commands.vala" + _g_object_unref0 (_tmp36_); +#line 12032 "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 12038 "Commands.c" + } +#line 1407 "/home/jens/Source/shotwell/src/Commands.vala" + _g_object_unref0 (_dobj_it); +#line 12042 "Commands.c" + } +#line 1413 "/home/jens/Source/shotwell/src/Commands.vala" + _tmp37_ = d; +#line 1413 "/home/jens/Source/shotwell/src/Commands.vala" + _tmp38_ = all_events; +#line 1413 "/home/jens/Source/shotwell/src/Commands.vala" + event_generate_single_event (G_TYPE_CHECK_INSTANCE_CAST (_tmp37_, TYPE_MEDIA_SOURCE, MediaSource), _tmp38_, NULL); +#line 1406 "/home/jens/Source/shotwell/src/Commands.vala" + _g_object_unref0 (d); +#line 12052 "Commands.c" + } +#line 1406 "/home/jens/Source/shotwell/src/Commands.vala" + _g_object_unref0 (_d_it); +#line 12056 "Commands.c" + } +#line 1393 "/home/jens/Source/shotwell/src/Commands.vala" + _data_collection_unref0 (all_events); +#line 12060 "Commands.c" +} + + +static void adjust_date_time_photos_command_real_undo (Command* base) { + AdjustDateTimePhotosCommand * self; + GeeArrayList* _tmp0_ = NULL; + GeeArrayList* _tmp1_ = NULL; + gint _tmp2_ = 0; + gint _tmp3_ = 0; +#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, 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_COLLECTION, GeeCollection)); +#line 1421 "/home/jens/Source/shotwell/src/Commands.vala" + _tmp3_ = _tmp2_; +#line 1421 "/home/jens/Source/shotwell/src/Commands.vala" + if (_tmp3_ > 0) { +#line 12088 "Commands.c" + GeeArrayList* _tmp4_ = NULL; + GeeArrayList* _tmp5_ = NULL; + gint _tmp6_ = 0; + gint _tmp7_ = 0; + const gchar* _tmp8_ = NULL; + const gchar* _tmp9_ = NULL; +#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_COLLECTION, GeeCollection)); +#line 1422 "/home/jens/Source/shotwell/src/Commands.vala" + _tmp7_ = _tmp6_; +#line 1422 "/home/jens/Source/shotwell/src/Commands.vala" + _tmp8_ = 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_); +#line 1422 "/home/jens/Source/shotwell/src/Commands.vala" + _tmp9_ = _ ("Time Adjustment Error"); +#line 1422 "/home/jens/Source/shotwell/src/Commands.vala" + multiple_object_error_dialog (_tmp4_, _tmp8_, _tmp9_); +#line 12109 "Commands.c" + } +} + + +static void adjust_date_time_photos_command_set_time (AdjustDateTimePhotosCommand* self, Dateable* dateable, time_t exposure_time) { + gboolean _tmp0_ = FALSE; + gboolean _tmp1_ = FALSE; + 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 12126 "Commands.c" + Dateable* _tmp2_ = NULL; +#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 12132 "Commands.c" + } else { +#line 1433 "/home/jens/Source/shotwell/src/Commands.vala" + _tmp0_ = FALSE; +#line 12136 "Commands.c" + } +#line 1433 "/home/jens/Source/shotwell/src/Commands.vala" + if (_tmp0_) { +#line 12140 "Commands.c" + { + Dateable* _tmp3_ = NULL; + time_t _tmp4_ = 0; +#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 12152 "Commands.c" + goto __catch448_g_error; + } + } + goto __finally448; + __catch448_g_error: + { + GError* err = NULL; + GeeArrayList* _tmp5_ = NULL; + Dateable* _tmp6_ = NULL; +#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 12174 "Commands.c" + } + __finally448: +#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 12185 "Commands.c" + } + } else { + Dateable* _tmp7_ = NULL; + time_t _tmp8_ = 0; +#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 12196 "Commands.c" + } +} + + +static void adjust_date_time_photos_command_real_execute_on_source (MultipleDataSourceCommand* base, DataSource* source) { + AdjustDateTimePhotosCommand * self; + Dateable* dateable = NULL; + DataSource* _tmp0_ = NULL; + Dateable* _tmp1_ = NULL; + gboolean _tmp2_ = FALSE; + gboolean _tmp3_ = FALSE; + ViewCollection* all_events = NULL; + ViewCollection* _tmp16_ = NULL; + Dateable* _tmp33_ = NULL; + ViewCollection* _tmp34_ = NULL; +#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 12226 "Commands.c" + Dateable* _tmp4_ = NULL; + time_t _tmp5_ = 0; +#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 12235 "Commands.c" + } else { +#line 1449 "/home/jens/Source/shotwell/src/Commands.vala" + _tmp2_ = FALSE; +#line 12239 "Commands.c" + } +#line 1449 "/home/jens/Source/shotwell/src/Commands.vala" + if (_tmp2_) { +#line 12243 "Commands.c" + Dateable* _tmp6_ = NULL; + Dateable* _tmp7_ = NULL; + time_t _tmp8_ = 0; + gint64 _tmp9_ = 0LL; +#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 12258 "Commands.c" + } else { + GeeHashMap* _tmp10_ = NULL; + Dateable* _tmp11_ = NULL; + Dateable* _tmp12_ = NULL; + time_t _tmp13_ = 0; + Dateable* _tmp14_ = NULL; + time_t* _tmp15_ = NULL; +#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 12282 "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 12288 "Commands.c" + { + GeeIterator* _dobj_it = NULL; + EventSourceCollection* _tmp17_ = NULL; + GeeCollection* _tmp18_ = NULL; + GeeCollection* _tmp19_ = NULL; + GeeIterator* _tmp20_ = NULL; + GeeIterator* _tmp21_ = NULL; +#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 12312 "Commands.c" + GeeIterator* _tmp22_ = NULL; + gboolean _tmp23_ = FALSE; + DataObject* dobj = NULL; + GeeIterator* _tmp24_ = NULL; + gpointer _tmp25_ = NULL; + Event* event = NULL; + DataObject* _tmp26_ = NULL; + Event* _tmp27_ = NULL; + Event* _tmp28_ = NULL; +#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 12330 "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 12348 "Commands.c" + ViewCollection* _tmp29_ = NULL; + Event* _tmp30_ = NULL; + EventView* _tmp31_ = NULL; + EventView* _tmp32_ = NULL; +#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 12365 "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 12371 "Commands.c" + } +#line 1458 "/home/jens/Source/shotwell/src/Commands.vala" + _g_object_unref0 (_dobj_it); +#line 12375 "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 12387 "Commands.c" +} + + +static void adjust_date_time_photos_command_real_undo_on_source (MultipleDataSourceCommand* base, DataSource* source) { + AdjustDateTimePhotosCommand * self; + Dateable* photo = NULL; + DataSource* _tmp0_ = NULL; + Dateable* _tmp1_ = NULL; + GeeHashMap* _tmp2_ = NULL; + Dateable* _tmp3_ = NULL; + gboolean _tmp4_ = FALSE; + DataSource* _tmp16_ = NULL; + GeeMap* _tmp17_ = NULL; + DataSource* _tmp18_ = NULL; + gpointer _tmp19_ = NULL; + Event* _tmp20_ = NULL; +#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 12422 "Commands.c" + Dateable* _tmp5_ = NULL; + GeeHashMap* _tmp6_ = NULL; + Dateable* _tmp7_ = NULL; + gpointer _tmp8_ = NULL; + time_t* _tmp9_ = NULL; + GeeHashMap* _tmp10_ = NULL; + Dateable* _tmp11_ = NULL; +#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 12450 "Commands.c" + } else { + Dateable* _tmp12_ = NULL; + Dateable* _tmp13_ = NULL; + time_t _tmp14_ = 0; + gint64 _tmp15_ = 0LL; +#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 12466 "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 12484 "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 = adjust_date_time_photos_command_real_execute; +#line 1355 "/home/jens/Source/shotwell/src/Commands.vala" + ((CommandClass *) klass)->undo = adjust_date_time_photos_command_real_undo; +#line 1355 "/home/jens/Source/shotwell/src/Commands.vala" + ((MultipleDataSourceCommandClass *) klass)->execute_on_source = adjust_date_time_photos_command_real_execute_on_source; +#line 1355 "/home/jens/Source/shotwell/src/Commands.vala" + ((MultipleDataSourceCommandClass *) klass)->undo_on_source = 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 12503 "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 12512 "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 12530 "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 12549 "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 12556 "Commands.c" +} + + +AddTagsCommand* add_tags_command_construct (GType object_type, gchar** paths, int paths_length1, GeeCollection* sources) { + AddTagsCommand * self = NULL; + gchar** _tmp0_ = NULL; + gint _tmp0__length1 = 0; + gchar* _tmp1_ = NULL; + gchar* _tmp2_ = NULL; + gchar** _tmp3_ = NULL; + gint _tmp3__length1 = 0; + LibraryPhotoSourceCollection* _tmp43_ = NULL; + VideoSourceCollection* _tmp44_ = NULL; +#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 12588 "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 12600 "Commands.c" + gchar* _tmp4_ = NULL; + 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 12607 "Commands.c" + { + GeeList* paths_to_create = NULL; + const gchar* _tmp5_ = NULL; + GeeList* _tmp6_ = NULL; + GeeList* _tmp7_ = NULL; + const gchar* _tmp8_ = NULL; +#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 12626 "Commands.c" + { + GeeList* _create_path_list = NULL; + GeeList* _tmp9_ = NULL; + GeeList* _tmp10_ = NULL; + gint _create_path_size = 0; + GeeList* _tmp11_ = NULL; + gint _tmp12_ = 0; + gint _tmp13_ = 0; + 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 12654 "Commands.c" + gint _tmp14_ = 0; + gint _tmp15_ = 0; + gint _tmp16_ = 0; + gchar* create_path = NULL; + GeeList* _tmp17_ = NULL; + gint _tmp18_ = 0; + gpointer _tmp19_ = NULL; + Tag* tag = NULL; + const gchar* _tmp20_ = NULL; + Tag* _tmp21_ = NULL; + SourceProxy* tag_proxy = NULL; + Tag* _tmp22_ = NULL; + SourceProxy* _tmp23_ = NULL; + GeeArrayList* add_sources = NULL; + GeeArrayList* _tmp24_ = NULL; + GeeArrayList* _tmp36_ = NULL; + gint _tmp37_ = 0; + gint _tmp38_ = 0; +#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 12685 "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, g_object_unref, NULL, NULL, NULL); +#line 1502 "/home/jens/Source/shotwell/src/Commands.vala" + add_sources = _tmp24_; +#line 12711 "Commands.c" + { + GeeIterator* _source_it = NULL; + GeeCollection* _tmp25_ = NULL; + GeeIterator* _tmp26_ = NULL; +#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 12724 "Commands.c" + GeeIterator* _tmp27_ = NULL; + gboolean _tmp28_ = FALSE; + MediaSource* source = NULL; + GeeIterator* _tmp29_ = NULL; + gpointer _tmp30_ = NULL; + Tag* _tmp31_ = NULL; + MediaSource* _tmp32_ = NULL; + gboolean _tmp33_ = FALSE; +#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 12741 "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 12757 "Commands.c" + GeeArrayList* _tmp34_ = NULL; + MediaSource* _tmp35_ = NULL; +#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 12766 "Commands.c" + } +#line 1503 "/home/jens/Source/shotwell/src/Commands.vala" + _g_object_unref0 (source); +#line 12770 "Commands.c" + } +#line 1503 "/home/jens/Source/shotwell/src/Commands.vala" + _g_object_unref0 (_source_it); +#line 12774 "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_COLLECTION, GeeCollection)); +#line 1508 "/home/jens/Source/shotwell/src/Commands.vala" + _tmp38_ = _tmp37_; +#line 1508 "/home/jens/Source/shotwell/src/Commands.vala" + if (_tmp38_ > 0) { +#line 12784 "Commands.c" + SourceProxy* _tmp39_ = NULL; + GeeHashMap* _tmp40_ = NULL; + SourceProxy* _tmp41_ = NULL; + GeeArrayList* _tmp42_ = NULL; +#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 12801 "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 12811 "Commands.c" + } +#line 1496 "/home/jens/Source/shotwell/src/Commands.vala" + _g_object_unref0 (_create_path_list); +#line 12815 "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 12821 "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 12835 "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 12842 "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 12850 "Commands.c" + { + GeeIterator* _tag_proxy_it = NULL; + GeeHashMap* _tmp0_ = NULL; + GeeSet* _tmp1_ = NULL; + GeeSet* _tmp2_ = NULL; + GeeSet* _tmp3_ = NULL; + GeeIterator* _tmp4_ = NULL; + GeeIterator* _tmp5_ = NULL; +#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_MAP, GeeMap)); +#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 12877 "Commands.c" + GeeIterator* _tmp6_ = NULL; + gboolean _tmp7_ = FALSE; + SourceProxy* tag_proxy = NULL; + GeeIterator* _tmp8_ = NULL; + gpointer _tmp9_ = NULL; + SourceProxy* _tmp10_ = NULL; + DataSource* _tmp11_ = NULL; + Tag* _tmp12_ = NULL; + GeeHashMap* _tmp13_ = NULL; + SourceProxy* _tmp14_ = NULL; + gpointer _tmp15_ = NULL; + GeeArrayList* _tmp16_ = NULL; +#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 12898 "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 12928 "Commands.c" + } +#line 1528 "/home/jens/Source/shotwell/src/Commands.vala" + _g_object_unref0 (_tag_proxy_it); +#line 12932 "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 12941 "Commands.c" + { + GeeIterator* _tag_proxy_it = NULL; + GeeHashMap* _tmp0_ = NULL; + GeeSet* _tmp1_ = NULL; + GeeSet* _tmp2_ = NULL; + GeeSet* _tmp3_ = NULL; + GeeIterator* _tmp4_ = NULL; + GeeIterator* _tmp5_ = NULL; +#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_MAP, GeeMap)); +#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 12968 "Commands.c" + GeeIterator* _tmp6_ = NULL; + gboolean _tmp7_ = FALSE; + SourceProxy* tag_proxy = NULL; + GeeIterator* _tmp8_ = NULL; + gpointer _tmp9_ = NULL; + Tag* tag = NULL; + SourceProxy* _tmp10_ = NULL; + DataSource* _tmp11_ = NULL; + Tag* _tmp12_ = NULL; + GeeHashMap* _tmp13_ = NULL; + SourceProxy* _tmp14_ = NULL; + gpointer _tmp15_ = NULL; + GeeArrayList* _tmp16_ = NULL; + GeeMultiMap* _tmp17_ = NULL; + GeeMultiMap* _tmp18_ = NULL; +#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 12992 "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 13028 "Commands.c" + } +#line 1533 "/home/jens/Source/shotwell/src/Commands.vala" + _g_object_unref0 (_tag_proxy_it); +#line 13032 "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 13042 "Commands.c" + { + GeeIterator* _sources_it = NULL; + GeeHashMap* _tmp0_ = NULL; + GeeCollection* _tmp1_ = NULL; + GeeCollection* _tmp2_ = NULL; + GeeCollection* _tmp3_ = NULL; + GeeIterator* _tmp4_ = NULL; + GeeIterator* _tmp5_ = NULL; +#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_MAP, GeeMap)); +#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 13069 "Commands.c" + GeeIterator* _tmp6_ = NULL; + gboolean _tmp7_ = FALSE; + GeeArrayList* sources = NULL; + GeeIterator* _tmp8_ = NULL; + gpointer _tmp9_ = NULL; + GeeArrayList* _tmp10_ = NULL; + DataSource* _tmp11_ = NULL; + gboolean _tmp12_ = FALSE; +#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 13086 "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 13102 "Commands.c" + CommandManager* _tmp13_ = NULL; + CommandManager* _tmp14_ = NULL; +#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 13119 "Commands.c" + } +#line 1541 "/home/jens/Source/shotwell/src/Commands.vala" + _g_object_unref0 (sources); +#line 13123 "Commands.c" + } +#line 1541 "/home/jens/Source/shotwell/src/Commands.vala" + _g_object_unref0 (_sources_it); +#line 13127 "Commands.c" + } +} + + +static void add_tags_command_on_proxy_broken (AddTagsCommand* self) { + CommandManager* _tmp0_ = NULL; + CommandManager* _tmp1_ = NULL; +#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 13145 "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 = add_tags_command_real_execute; +#line 1481 "/home/jens/Source/shotwell/src/Commands.vala" + ((CommandClass *) klass)->undo = add_tags_command_real_undo; +#line 1481 "/home/jens/Source/shotwell/src/Commands.vala" + G_OBJECT_CLASS (klass)->finalize = add_tags_command_finalize; +#line 13160 "Commands.c" +} + + +static void add_tags_command_instance_init (AddTagsCommand * self) { + GeeHashMap* _tmp0_ = NULL; +#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, source_proxy_unref, GEE_TYPE_ARRAY_LIST, (GBoxedCopyFunc) g_object_ref, 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 13172 "Commands.c" +} + + +static void add_tags_command_finalize (GObject* obj) { + AddTagsCommand * self; + LibraryPhotoSourceCollection* _tmp12_ = NULL; + guint _tmp13_ = 0U; + VideoSourceCollection* _tmp14_ = NULL; + guint _tmp15_ = 0U; +#line 1481 "/home/jens/Source/shotwell/src/Commands.vala" + self = G_TYPE_CHECK_INSTANCE_CAST (obj, TYPE_ADD_TAGS_COMMAND, AddTagsCommand); +#line 13184 "Commands.c" + { + GeeIterator* _tag_proxy_it = NULL; + GeeHashMap* _tmp0_ = NULL; + GeeSet* _tmp1_ = NULL; + GeeSet* _tmp2_ = NULL; + GeeSet* _tmp3_ = NULL; + GeeIterator* _tmp4_ = NULL; + GeeIterator* _tmp5_ = NULL; +#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_MAP, GeeMap)); +#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 13211 "Commands.c" + GeeIterator* _tmp6_ = NULL; + gboolean _tmp7_ = FALSE; + SourceProxy* tag_proxy = NULL; + GeeIterator* _tmp8_ = NULL; + gpointer _tmp9_ = NULL; + SourceProxy* _tmp10_ = NULL; + guint _tmp11_ = 0U; +#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 13227 "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 13243 "Commands.c" + } +#line 1520 "/home/jens/Source/shotwell/src/Commands.vala" + _g_object_unref0 (_tag_proxy_it); +#line 13247 "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 13265 "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_ = NULL; + Tag* _tmp1_ = NULL; + gchar* _tmp2_ = NULL; + gchar* _tmp3_ = NULL; + const gchar* _tmp4_ = NULL; + gchar* _tmp5_ = NULL; + gchar* _tmp6_ = NULL; + Tag* _tmp7_ = NULL; + gchar* _tmp8_ = NULL; + gchar* _tmp9_ = NULL; + Tag* _tmp10_ = NULL; + gchar* _tmp11_ = NULL; + const gchar* _tmp12_ = NULL; + gchar* _tmp13_ = NULL; +#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 13347 "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 13354 "Commands.c" +} + + +static void rename_tag_command_real_execute_on_source (SimpleProxyableCommand* base, DataSource* source) { + RenameTagCommand * self; + DataSource* _tmp0_ = NULL; + const gchar* _tmp1_ = NULL; + gboolean _tmp2_ = FALSE; +#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 13375 "Commands.c" + const gchar* _tmp3_ = NULL; + gchar* _tmp4_ = NULL; + gchar* _tmp5_ = NULL; +#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 13389 "Commands.c" + } +} + + +static void rename_tag_command_real_undo_on_source (SimpleProxyableCommand* base, DataSource* source) { + RenameTagCommand * self; + DataSource* _tmp0_ = NULL; + const gchar* _tmp1_ = NULL; + gboolean _tmp2_ = FALSE; +#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 13411 "Commands.c" + const gchar* _tmp3_ = NULL; + gchar* _tmp4_ = NULL; + gchar* _tmp5_ = NULL; +#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 13425 "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 = rename_tag_command_real_execute_on_source; +#line 1555 "/home/jens/Source/shotwell/src/Commands.vala" + ((SimpleProxyableCommandClass *) klass)->undo_on_source = 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 13441 "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 13448 "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 13462 "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_ = NULL; + Tag* _tmp1_ = NULL; + gchar* _tmp2_ = NULL; + gchar* _tmp3_ = NULL; + gchar* _tmp4_ = NULL; + gchar* _tmp5_ = NULL; + Tag* _tmp6_ = NULL; + gchar* _tmp7_ = NULL; + gchar* _tmp8_ = NULL; +#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 13519 "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 13526 "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 13533 "Commands.c" +} + + +static void delete_tag_command_real_execute_on_source (SimpleProxyableCommand* base, DataSource* source) { + DeleteTagCommand * self; + Tag* tag = NULL; + DataSource* _tmp0_ = NULL; + Tag* _tmp1_ = NULL; + GeeList* recursive_victims = NULL; + Tag* _tmp2_ = NULL; + GeeList* _tmp3_ = NULL; + GeeList* _tmp4_ = NULL; + gint _tmp5_ = 0; + gint _tmp6_ = 0; + TagSourceCollection* _tmp29_ = NULL; + TagSourceCollection* _tmp30_ = NULL; + DataSource* _tmp31_ = NULL; + Marker* _tmp32_ = NULL; + Marker* _tmp33_ = NULL; +#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 13577 "Commands.c" + GeeArrayList* _tmp7_ = NULL; +#line 1594 "/home/jens/Source/shotwell/src/Commands.vala" + _tmp7_ = gee_array_list_new (TYPE_SOURCE_PROXY, (GBoxedCopyFunc) source_proxy_ref, 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 13585 "Commands.c" + { + GeeList* _victim_list = NULL; + GeeList* _tmp8_ = NULL; + GeeList* _tmp9_ = NULL; + gint _victim_size = 0; + GeeList* _tmp10_ = NULL; + gint _tmp11_ = 0; + gint _tmp12_ = 0; + 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 13613 "Commands.c" + gint _tmp13_ = 0; + gint _tmp14_ = 0; + gint _tmp15_ = 0; + Tag* victim = NULL; + GeeList* _tmp16_ = NULL; + gint _tmp17_ = 0; + gpointer _tmp18_ = NULL; + SourceProxy* proxy = NULL; + Tag* _tmp19_ = NULL; + SourceProxy* _tmp20_ = NULL; + SourceProxy* _tmp21_ = NULL; + GeeList* _tmp22_ = NULL; + SourceProxy* _tmp23_ = NULL; + TagSourceCollection* _tmp24_ = NULL; + TagSourceCollection* _tmp25_ = NULL; + Tag* _tmp26_ = NULL; + Marker* _tmp27_ = NULL; + Marker* _tmp28_ = NULL; +#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 13644 "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 13688 "Commands.c" + } +#line 1595 "/home/jens/Source/shotwell/src/Commands.vala" + _g_object_unref0 (_victim_list); +#line 13692 "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 13713 "Commands.c" +} + + +static void delete_tag_command_real_undo_on_source (SimpleProxyableCommand* base, DataSource* source) { + DeleteTagCommand * self; + DataSource* _tmp0_ = NULL; + GeeList* _tmp1_ = NULL; +#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 13733 "Commands.c" + { + gint i = 0; + GeeList* _tmp2_ = NULL; + gint _tmp3_ = 0; + gint _tmp4_ = 0; +#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 13747 "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 13754 "Commands.c" + gint _tmp7_ = 0; + SourceProxy* proxy = NULL; + GeeList* _tmp8_ = NULL; + gint _tmp9_ = 0; + gpointer _tmp10_ = NULL; + DataSource* victim_source = NULL; + SourceProxy* _tmp11_ = NULL; + DataSource* _tmp12_ = NULL; + DataSource* _tmp13_ = NULL; + SourceProxy* _tmp14_ = NULL; + guint _tmp15_ = 0U; +#line 1615 "/home/jens/Source/shotwell/src/Commands.vala" + if (!_tmp5_) { +#line 13768 "Commands.c" + gint _tmp6_ = 0; +#line 1615 "/home/jens/Source/shotwell/src/Commands.vala" + _tmp6_ = i; +#line 1615 "/home/jens/Source/shotwell/src/Commands.vala" + i = _tmp6_ - 1; +#line 13774 "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 13784 "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 13814 "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 13822 "Commands.c" + } +} + + +static void delete_tag_command_on_proxy_broken (DeleteTagCommand* self) { + CommandManager* _tmp0_ = NULL; + CommandManager* _tmp1_ = NULL; +#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 13840 "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 = delete_tag_command_real_execute_on_source; +#line 1579 "/home/jens/Source/shotwell/src/Commands.vala" + ((SimpleProxyableCommandClass *) klass)->undo_on_source = 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 13855 "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 13864 "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 13876 "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_ = NULL; + const gchar* _tmp1_ = NULL; + Tag* _tmp2_ = NULL; + gchar* _tmp3_ = NULL; + gchar* _tmp4_ = NULL; +#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_ = _ ("Create Tag"); +#line 1637 "/home/jens/Source/shotwell/src/Commands.vala" + _tmp2_ = tag; +#line 1637 "/home/jens/Source/shotwell/src/Commands.vala" + _tmp3_ = data_object_get_name (G_TYPE_CHECK_INSTANCE_CAST (_tmp2_, TYPE_DATA_OBJECT, DataObject)); +#line 1637 "/home/jens/Source/shotwell/src/Commands.vala" + _tmp4_ = _tmp3_; +#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), _tmp1_, _tmp4_); +#line 1637 "/home/jens/Source/shotwell/src/Commands.vala" + _g_free0 (_tmp4_); +#line 1636 "/home/jens/Source/shotwell/src/Commands.vala" + return self; +#line 13917 "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 13924 "Commands.c" +} + + +static void new_child_tag_command_real_execute_on_source (SimpleProxyableCommand* base, DataSource* source) { + NewChildTagCommand * self; + Tag* tag = NULL; + DataSource* _tmp0_ = NULL; + Tag* _tmp1_ = NULL; + Tag* _tmp2_ = NULL; +#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 13952 "Commands.c" +} + + +static void new_child_tag_command_real_undo_on_source (SimpleProxyableCommand* base, DataSource* source) { + NewChildTagCommand * self; + TagSourceCollection* _tmp0_ = NULL; + TagSourceCollection* _tmp1_ = NULL; + Tag* _tmp2_ = NULL; + Marker* _tmp3_ = NULL; + Marker* _tmp4_ = NULL; +#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 13981 "Commands.c" +} + + +Tag* new_child_tag_command_get_created_child (NewChildTagCommand* self) { + Tag* result = NULL; + Tag* _tmp0_ = NULL; + Tag* _tmp1_ = NULL; + Tag* _tmp2_ = NULL; +#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 14004 "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 = new_child_tag_command_real_execute_on_source; +#line 1633 "/home/jens/Source/shotwell/src/Commands.vala" + ((SimpleProxyableCommandClass *) klass)->undo_on_source = 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 14019 "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 14028 "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 14040 "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; + const gchar* _tmp0_ = NULL; +#line 1660 "/home/jens/Source/shotwell/src/Commands.vala" + _tmp0_ = _ ("Create Tag"); +#line 1660 "/home/jens/Source/shotwell/src/Commands.vala" + self = (NewRootTagCommand*) page_command_construct (object_type, _tmp0_, ""); +#line 1659 "/home/jens/Source/shotwell/src/Commands.vala" + return self; +#line 14065 "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 14072 "Commands.c" +} + + +static void new_root_tag_command_real_execute (Command* base) { + NewRootTagCommand * self; + SourceProxy* _tmp0_ = NULL; +#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 14085 "Commands.c" + Tag* _tmp1_ = NULL; + Tag* _tmp2_ = NULL; + SourceProxy* _tmp3_ = NULL; +#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 14101 "Commands.c" + } else { + SourceProxy* _tmp4_ = NULL; + DataSource* _tmp5_ = NULL; + DataSource* _tmp6_ = NULL; +#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 14114 "Commands.c" + } +} + + +static void new_root_tag_command_real_undo (Command* base) { + NewRootTagCommand * self; + TagSourceCollection* _tmp0_ = NULL; + TagSourceCollection* _tmp1_ = NULL; + SourceProxy* _tmp2_ = NULL; + DataSource* _tmp3_ = NULL; + DataSource* _tmp4_ = NULL; + Marker* _tmp5_ = NULL; + Marker* _tmp6_ = NULL; +#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 14150 "Commands.c" +} + + +Tag* new_root_tag_command_get_created_tag (NewRootTagCommand* self) { + Tag* result = NULL; + SourceProxy* _tmp0_ = NULL; + DataSource* _tmp1_ = NULL; +#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 14168 "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 = new_root_tag_command_real_execute; +#line 1656 "/home/jens/Source/shotwell/src/Commands.vala" + ((CommandClass *) klass)->undo = 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 14183 "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 14192 "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 14204 "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 14223 "Commands.c" +} + + +ReparentTagCommand* reparent_tag_command_construct (GType object_type, Tag* tag, const gchar* new_parent_path) { + ReparentTagCommand * self = NULL; + const gchar* _tmp0_ = NULL; + Tag* _tmp1_ = NULL; + gchar* _tmp2_ = NULL; + gchar* _tmp3_ = NULL; + gchar* _tmp4_ = NULL; + gchar* _tmp5_ = NULL; + Tag* _tmp6_ = NULL; + gchar* _tmp7_ = NULL; + gboolean has_children = FALSE; + Tag* _tmp8_ = NULL; + GeeList* _tmp9_ = NULL; + GeeList* _tmp10_ = NULL; + gint _tmp11_ = 0; + gint _tmp12_ = 0; + gboolean _tmp13_ = FALSE; + gchar* basename = NULL; + Tag* _tmp14_ = NULL; + gchar* _tmp15_ = NULL; + const gchar* _tmp16_ = NULL; + gchar* new_to_path = NULL; + const gchar* _tmp38_ = NULL; + gchar* _tmp39_ = NULL; + const gchar* _tmp40_ = NULL; + TagSourceCollection* _tmp43_ = NULL; + const gchar* _tmp44_ = NULL; + gboolean _tmp45_ = FALSE; + GeeHashSet* _tmp46_ = NULL; + Tag* _tmp47_ = NULL; + GeeCollection* _tmp48_ = NULL; + GeeCollection* _tmp49_ = NULL; + LibraryPhotoSourceCollection* _tmp50_ = NULL; + VideoSourceCollection* _tmp51_ = NULL; +#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_ = _ ("Move Tag \"%s\""); +#line 1695 "/home/jens/Source/shotwell/src/Commands.vala" + _tmp1_ = tag; +#line 1695 "/home/jens/Source/shotwell/src/Commands.vala" + _tmp2_ = tag_get_user_visible_name (_tmp1_); +#line 1695 "/home/jens/Source/shotwell/src/Commands.vala" + _tmp3_ = _tmp2_; +#line 1695 "/home/jens/Source/shotwell/src/Commands.vala" + _tmp4_ = g_strdup_printf (_tmp0_, _tmp3_); +#line 1695 "/home/jens/Source/shotwell/src/Commands.vala" + _tmp5_ = _tmp4_; +#line 1695 "/home/jens/Source/shotwell/src/Commands.vala" + self = (ReparentTagCommand*) page_command_construct (object_type, _tmp5_, ""); +#line 1695 "/home/jens/Source/shotwell/src/Commands.vala" + _g_free0 (_tmp5_); +#line 1695 "/home/jens/Source/shotwell/src/Commands.vala" + _g_free0 (_tmp3_); +#line 1697 "/home/jens/Source/shotwell/src/Commands.vala" + _tmp6_ = tag; +#line 1697 "/home/jens/Source/shotwell/src/Commands.vala" + _tmp7_ = tag_get_path (_tmp6_); +#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 = _tmp7_; +#line 1699 "/home/jens/Source/shotwell/src/Commands.vala" + _tmp8_ = tag; +#line 1699 "/home/jens/Source/shotwell/src/Commands.vala" + _tmp9_ = tag_get_hierarchical_children (_tmp8_); +#line 1699 "/home/jens/Source/shotwell/src/Commands.vala" + _tmp10_ = _tmp9_; +#line 1699 "/home/jens/Source/shotwell/src/Commands.vala" + _tmp11_ = gee_collection_get_size (G_TYPE_CHECK_INSTANCE_CAST (_tmp10_, GEE_TYPE_COLLECTION, GeeCollection)); +#line 1699 "/home/jens/Source/shotwell/src/Commands.vala" + _tmp12_ = _tmp11_; +#line 1699 "/home/jens/Source/shotwell/src/Commands.vala" + _tmp13_ = _tmp12_ > 0; +#line 1699 "/home/jens/Source/shotwell/src/Commands.vala" + _g_object_unref0 (_tmp10_); +#line 1699 "/home/jens/Source/shotwell/src/Commands.vala" + has_children = _tmp13_; +#line 1700 "/home/jens/Source/shotwell/src/Commands.vala" + _tmp14_ = tag; +#line 1700 "/home/jens/Source/shotwell/src/Commands.vala" + _tmp15_ = tag_get_user_visible_name (_tmp14_); +#line 1700 "/home/jens/Source/shotwell/src/Commands.vala" + basename = _tmp15_; +#line 1702 "/home/jens/Source/shotwell/src/Commands.vala" + _tmp16_ = new_parent_path; +#line 1702 "/home/jens/Source/shotwell/src/Commands.vala" + if (g_strcmp0 (_tmp16_, TAG_PATH_SEPARATOR_STRING) == 0) { +#line 14317 "Commands.c" + gchar* _tmp17_ = NULL; + gboolean _tmp18_ = FALSE; + gchar* _tmp23_ = NULL; +#line 1703 "/home/jens/Source/shotwell/src/Commands.vala" + _tmp18_ = has_children; +#line 1703 "/home/jens/Source/shotwell/src/Commands.vala" + if (_tmp18_) { +#line 14325 "Commands.c" + const gchar* _tmp19_ = NULL; + gchar* _tmp20_ = NULL; +#line 1703 "/home/jens/Source/shotwell/src/Commands.vala" + _tmp19_ = basename; +#line 1703 "/home/jens/Source/shotwell/src/Commands.vala" + _tmp20_ = g_strconcat (TAG_PATH_SEPARATOR_STRING, _tmp19_, NULL); +#line 1703 "/home/jens/Source/shotwell/src/Commands.vala" + _g_free0 (_tmp17_); +#line 1703 "/home/jens/Source/shotwell/src/Commands.vala" + _tmp17_ = _tmp20_; +#line 14336 "Commands.c" + } else { + const gchar* _tmp21_ = NULL; + gchar* _tmp22_ = NULL; +#line 1703 "/home/jens/Source/shotwell/src/Commands.vala" + _tmp21_ = basename; +#line 1703 "/home/jens/Source/shotwell/src/Commands.vala" + _tmp22_ = g_strdup (_tmp21_); +#line 1703 "/home/jens/Source/shotwell/src/Commands.vala" + _g_free0 (_tmp17_); +#line 1703 "/home/jens/Source/shotwell/src/Commands.vala" + _tmp17_ = _tmp22_; +#line 14348 "Commands.c" + } +#line 1703 "/home/jens/Source/shotwell/src/Commands.vala" + _tmp23_ = g_strdup (_tmp17_); +#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 = _tmp23_; +#line 1702 "/home/jens/Source/shotwell/src/Commands.vala" + _g_free0 (_tmp17_); +#line 14358 "Commands.c" + } else { + const gchar* _tmp24_ = NULL; + gboolean _tmp25_ = FALSE; +#line 1704 "/home/jens/Source/shotwell/src/Commands.vala" + _tmp24_ = new_parent_path; +#line 1704 "/home/jens/Source/shotwell/src/Commands.vala" + _tmp25_ = g_str_has_prefix (_tmp24_, TAG_PATH_SEPARATOR_STRING); +#line 1704 "/home/jens/Source/shotwell/src/Commands.vala" + if (_tmp25_) { +#line 14368 "Commands.c" + const gchar* _tmp26_ = NULL; + gchar* _tmp27_ = NULL; + gchar* _tmp28_ = NULL; + const gchar* _tmp29_ = NULL; + gchar* _tmp30_ = NULL; +#line 1705 "/home/jens/Source/shotwell/src/Commands.vala" + _tmp26_ = new_parent_path; +#line 1705 "/home/jens/Source/shotwell/src/Commands.vala" + _tmp27_ = g_strconcat (_tmp26_, TAG_PATH_SEPARATOR_STRING, NULL); +#line 1705 "/home/jens/Source/shotwell/src/Commands.vala" + _tmp28_ = _tmp27_; +#line 1705 "/home/jens/Source/shotwell/src/Commands.vala" + _tmp29_ = basename; +#line 1705 "/home/jens/Source/shotwell/src/Commands.vala" + _tmp30_ = g_strconcat (_tmp28_, _tmp29_, 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 = _tmp30_; +#line 1705 "/home/jens/Source/shotwell/src/Commands.vala" + _g_free0 (_tmp28_); +#line 14390 "Commands.c" + } else { + const gchar* _tmp31_ = NULL; + gchar* _tmp32_ = NULL; + gchar* _tmp33_ = NULL; + gchar* _tmp34_ = NULL; + gchar* _tmp35_ = NULL; + const gchar* _tmp36_ = NULL; + gchar* _tmp37_ = NULL; +#line 1707 "/home/jens/Source/shotwell/src/Commands.vala" + _tmp31_ = new_parent_path; +#line 1707 "/home/jens/Source/shotwell/src/Commands.vala" + _tmp32_ = g_strconcat (TAG_PATH_SEPARATOR_STRING, _tmp31_, NULL); +#line 1707 "/home/jens/Source/shotwell/src/Commands.vala" + _tmp33_ = _tmp32_; +#line 1707 "/home/jens/Source/shotwell/src/Commands.vala" + _tmp34_ = g_strconcat (_tmp33_, TAG_PATH_SEPARATOR_STRING, NULL); +#line 1707 "/home/jens/Source/shotwell/src/Commands.vala" + _tmp35_ = _tmp34_; +#line 1707 "/home/jens/Source/shotwell/src/Commands.vala" + _tmp36_ = basename; +#line 1707 "/home/jens/Source/shotwell/src/Commands.vala" + _tmp37_ = g_strconcat (_tmp35_, _tmp36_, 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 = _tmp37_; +#line 1707 "/home/jens/Source/shotwell/src/Commands.vala" + _g_free0 (_tmp35_); +#line 1707 "/home/jens/Source/shotwell/src/Commands.vala" + _g_free0 (_tmp33_); +#line 14421 "Commands.c" + } + } +#line 1710 "/home/jens/Source/shotwell/src/Commands.vala" + _tmp38_ = self->priv->to_path; +#line 1710 "/home/jens/Source/shotwell/src/Commands.vala" + _tmp39_ = hierarchical_tag_utilities_get_root_path_form (_tmp38_); +#line 1710 "/home/jens/Source/shotwell/src/Commands.vala" + new_to_path = _tmp39_; +#line 1711 "/home/jens/Source/shotwell/src/Commands.vala" + _tmp40_ = new_to_path; +#line 1711 "/home/jens/Source/shotwell/src/Commands.vala" + if (_tmp40_ != NULL) { +#line 14434 "Commands.c" + const gchar* _tmp41_ = NULL; + gchar* _tmp42_ = NULL; +#line 1712 "/home/jens/Source/shotwell/src/Commands.vala" + _tmp41_ = new_to_path; +#line 1712 "/home/jens/Source/shotwell/src/Commands.vala" + _tmp42_ = g_strdup (_tmp41_); +#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 = _tmp42_; +#line 14445 "Commands.c" + } +#line 1714 "/home/jens/Source/shotwell/src/Commands.vala" + _tmp43_ = tag_global; +#line 1714 "/home/jens/Source/shotwell/src/Commands.vala" + _tmp44_ = self->priv->to_path; +#line 1714 "/home/jens/Source/shotwell/src/Commands.vala" + _tmp45_ = tag_source_collection_exists (_tmp43_, _tmp44_, FALSE); +#line 1714 "/home/jens/Source/shotwell/src/Commands.vala" + if (_tmp45_) { +#line 1715 "/home/jens/Source/shotwell/src/Commands.vala" + self->priv->to_path_exists = TRUE; +#line 14457 "Commands.c" + } +#line 1717 "/home/jens/Source/shotwell/src/Commands.vala" + _tmp46_ = self->priv->sources_in_play; +#line 1717 "/home/jens/Source/shotwell/src/Commands.vala" + _tmp47_ = tag; +#line 1717 "/home/jens/Source/shotwell/src/Commands.vala" + _tmp48_ = tag_get_sources (_tmp47_); +#line 1717 "/home/jens/Source/shotwell/src/Commands.vala" + _tmp49_ = _tmp48_; +#line 1717 "/home/jens/Source/shotwell/src/Commands.vala" + gee_collection_add_all (G_TYPE_CHECK_INSTANCE_CAST (_tmp46_, GEE_TYPE_COLLECTION, GeeCollection), _tmp49_); +#line 1717 "/home/jens/Source/shotwell/src/Commands.vala" + _g_object_unref0 (_tmp49_); +#line 1719 "/home/jens/Source/shotwell/src/Commands.vala" + _tmp50_ = library_photo_global; +#line 1719 "/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 1720 "/home/jens/Source/shotwell/src/Commands.vala" + _tmp51_ = video_global; +#line 1720 "/home/jens/Source/shotwell/src/Commands.vala" + g_signal_connect_object (G_TYPE_CHECK_INSTANCE_CAST (_tmp51_, 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 14485 "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 14492 "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 14501 "Commands.c" + { + GeeIterator* _source_it = NULL; + GeeCollection* _tmp0_ = NULL; + GeeIterator* _tmp1_ = NULL; +#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 14514 "Commands.c" + GeeIterator* _tmp2_ = NULL; + gboolean _tmp3_ = FALSE; + DataSource* source = NULL; + GeeIterator* _tmp4_ = NULL; + gpointer _tmp5_ = NULL; + GeeHashSet* _tmp6_ = NULL; + DataSource* _tmp7_ = NULL; + gboolean _tmp8_ = FALSE; +#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 14531 "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 14547 "Commands.c" + CommandManager* _tmp9_ = NULL; + CommandManager* _tmp10_ = NULL; +#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 14558 "Commands.c" + } +#line 1729 "/home/jens/Source/shotwell/src/Commands.vala" + _g_object_unref0 (source); +#line 14562 "Commands.c" + } +#line 1729 "/home/jens/Source/shotwell/src/Commands.vala" + _g_object_unref0 (_source_it); +#line 14566 "Commands.c" + } +} + + +static gchar* string_replace (const gchar* self, const gchar* old, const gchar* replacement) { + gchar* result = NULL; + GError * _inner_error_ = NULL; +#line 1380 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + g_return_val_if_fail (self != NULL, NULL); +#line 1380 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + g_return_val_if_fail (old != NULL, NULL); +#line 1380 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + g_return_val_if_fail (replacement != NULL, NULL); +#line 14580 "Commands.c" + { + GRegex* regex = NULL; + const gchar* _tmp0_ = NULL; + gchar* _tmp1_ = NULL; + gchar* _tmp2_ = NULL; + GRegex* _tmp3_ = NULL; + GRegex* _tmp4_ = NULL; + gchar* _tmp5_ = NULL; + GRegex* _tmp6_ = NULL; + const gchar* _tmp7_ = NULL; + gchar* _tmp8_ = NULL; + gchar* _tmp9_ = NULL; +#line 1382 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + _tmp0_ = old; +#line 1382 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + _tmp1_ = g_regex_escape_string (_tmp0_, -1); +#line 1382 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + _tmp2_ = _tmp1_; +#line 1382 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + _tmp3_ = g_regex_new (_tmp2_, 0, 0, &_inner_error_); +#line 1382 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + _tmp4_ = _tmp3_; +#line 1382 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + _g_free0 (_tmp2_); +#line 1382 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + regex = _tmp4_; +#line 1382 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + if (G_UNLIKELY (_inner_error_ != NULL)) { +#line 1382 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + if (_inner_error_->domain == G_REGEX_ERROR) { +#line 14611 "Commands.c" + goto __catch449_g_regex_error; + } +#line 1382 "/usr/share/vala-0.32/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 1382 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + g_clear_error (&_inner_error_); +#line 1382 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + return NULL; +#line 14620 "Commands.c" + } +#line 1383 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + _tmp6_ = regex; +#line 1383 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + _tmp7_ = replacement; +#line 1383 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + _tmp8_ = g_regex_replace_literal (_tmp6_, self, (gssize) -1, 0, _tmp7_, 0, &_inner_error_); +#line 1383 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + _tmp5_ = _tmp8_; +#line 1383 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + if (G_UNLIKELY (_inner_error_ != NULL)) { +#line 1383 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + _g_regex_unref0 (regex); +#line 1383 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + if (_inner_error_->domain == G_REGEX_ERROR) { +#line 14636 "Commands.c" + goto __catch449_g_regex_error; + } +#line 1383 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + _g_regex_unref0 (regex); +#line 1383 "/usr/share/vala-0.32/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 1383 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + g_clear_error (&_inner_error_); +#line 1383 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + return NULL; +#line 14647 "Commands.c" + } +#line 1383 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + _tmp9_ = _tmp5_; +#line 1383 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + _tmp5_ = NULL; +#line 1383 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + result = _tmp9_; +#line 1383 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + _g_free0 (_tmp5_); +#line 1383 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + _g_regex_unref0 (regex); +#line 1383 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + return result; +#line 14661 "Commands.c" + } + goto __finally449; + __catch449_g_regex_error: + { + GError* e = NULL; +#line 1381 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + e = _inner_error_; +#line 1381 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + _inner_error_ = NULL; +#line 1385 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + g_assert_not_reached (); +#line 1381 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + _g_error_free0 (e); +#line 14675 "Commands.c" + } + __finally449: +#line 1381 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + if (G_UNLIKELY (_inner_error_ != NULL)) { +#line 1381 "/usr/share/vala-0.32/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 1381 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + g_clear_error (&_inner_error_); +#line 1381 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + return NULL; +#line 14686 "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_ = NULL; + gchar* _tmp1_ = NULL; + const gchar* _tmp2_ = NULL; + const gchar* _tmp3_ = NULL; + gchar* _tmp6_ = NULL; + GeeMap* _result_ = NULL; + GeeHashMap* _tmp7_ = NULL; + TagSourceCollection* _tmp8_ = NULL; + const gchar* _tmp9_ = NULL; + gboolean _tmp10_ = FALSE; + Tag* tag = NULL; + const gchar* _tmp11_ = NULL; + Tag* _tmp12_ = NULL; + gchar* path_prefix = NULL; + Tag* _tmp13_ = NULL; + gchar* _tmp14_ = NULL; + gchar* _tmp15_ = NULL; + gchar* _tmp16_ = NULL; + gchar* _tmp17_ = NULL; +#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 14727 "Commands.c" + const gchar* _tmp4_ = NULL; +#line 1737 "/home/jens/Source/shotwell/src/Commands.vala" + _tmp4_ = path; +#line 1737 "/home/jens/Source/shotwell/src/Commands.vala" + _tmp2_ = _tmp4_; +#line 14733 "Commands.c" + } else { + const gchar* _tmp5_ = NULL; +#line 1737 "/home/jens/Source/shotwell/src/Commands.vala" + _tmp5_ = client_path; +#line 1737 "/home/jens/Source/shotwell/src/Commands.vala" + _tmp2_ = _tmp5_; +#line 14740 "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, g_free, GEE_TYPE_SET, (GBoxedCopyFunc) g_object_ref, 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 14766 "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 14788 "Commands.c" + { + GeeList* _t_list = NULL; + Tag* _tmp18_ = NULL; + GeeList* _tmp19_ = NULL; + gint _t_size = 0; + GeeList* _tmp20_ = NULL; + gint _tmp21_ = 0; + gint _tmp22_ = 0; + 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 14816 "Commands.c" + gint _tmp23_ = 0; + gint _tmp24_ = 0; + gint _tmp25_ = 0; + Tag* t = NULL; + GeeList* _tmp26_ = NULL; + gint _tmp27_ = 0; + gpointer _tmp28_ = NULL; + gchar* child_subpath = NULL; + Tag* _tmp29_ = NULL; + gchar* _tmp30_ = NULL; + gchar* _tmp31_ = NULL; + const gchar* _tmp32_ = NULL; + gchar* _tmp33_ = NULL; + gchar* _tmp34_ = NULL; + GeeMap* _tmp35_ = NULL; + const gchar* _tmp36_ = NULL; + GeeHashSet* _tmp37_ = NULL; + GeeHashSet* _tmp38_ = NULL; + GeeMap* _tmp39_ = NULL; + const gchar* _tmp40_ = NULL; + gpointer _tmp41_ = NULL; + GeeSet* _tmp42_ = NULL; + Tag* _tmp43_ = NULL; + GeeCollection* _tmp44_ = NULL; + GeeCollection* _tmp45_ = NULL; +#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 14854 "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, 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 14916 "Commands.c" + } +#line 1748 "/home/jens/Source/shotwell/src/Commands.vala" + _g_object_unref0 (_t_list); +#line 14920 "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 14932 "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_ = NULL; + gchar* _tmp1_ = NULL; + const gchar* _tmp2_ = NULL; + const gchar* _tmp3_ = NULL; + gchar* path = NULL; + gchar* _tmp6_ = NULL; + TagSourceCollection* _tmp7_ = NULL; + const gchar* _tmp8_ = NULL; + gboolean _tmp9_ = FALSE; + Tag* tag = NULL; + const gchar* _tmp10_ = NULL; + Tag* _tmp11_ = NULL; +#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 14966 "Commands.c" + const gchar* _tmp4_ = NULL; +#line 1762 "/home/jens/Source/shotwell/src/Commands.vala" + _tmp4_ = new_path; +#line 1762 "/home/jens/Source/shotwell/src/Commands.vala" + _tmp2_ = _tmp4_; +#line 14972 "Commands.c" + } else { + const gchar* _tmp5_ = NULL; +#line 1762 "/home/jens/Source/shotwell/src/Commands.vala" + _tmp5_ = client_path; +#line 1762 "/home/jens/Source/shotwell/src/Commands.vala" + _tmp2_ = _tmp5_; +#line 14979 "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 14999 "Commands.c" + { + GeeIterator* _child_subpath_it = NULL; + GeeMap* _tmp12_ = NULL; + GeeSet* _tmp13_ = NULL; + GeeSet* _tmp14_ = NULL; + GeeSet* _tmp15_ = NULL; + GeeIterator* _tmp16_ = NULL; + GeeIterator* _tmp17_ = NULL; +#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 15026 "Commands.c" + GeeIterator* _tmp18_ = NULL; + gboolean _tmp19_ = FALSE; + gchar* child_subpath = NULL; + GeeIterator* _tmp20_ = NULL; + gpointer _tmp21_ = NULL; + gchar* child_path = NULL; + Tag* _tmp22_ = NULL; + gchar* _tmp23_ = NULL; + gchar* _tmp24_ = NULL; + gchar* _tmp25_ = NULL; + gchar* _tmp26_ = NULL; + const gchar* _tmp27_ = NULL; + gchar* _tmp28_ = NULL; + gchar* _tmp29_ = NULL; + Tag* _tmp30_ = NULL; + gchar* _tmp31_ = NULL; + gchar* _tmp32_ = NULL; + gboolean _tmp33_ = FALSE; + gboolean _tmp34_ = FALSE; + TagSourceCollection* _tmp43_ = NULL; + const gchar* _tmp44_ = NULL; + gboolean _tmp45_ = FALSE; +#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 15057 "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 15101 "Commands.c" + Tag* _tmp35_ = NULL; + Tag* _tmp36_ = NULL; + gchar* _tmp37_ = NULL; + gchar* _tmp38_ = NULL; + gchar* _tmp39_ = NULL; + gchar* _tmp40_ = NULL; + const gchar* _tmp41_ = NULL; + gchar* _tmp42_ = NULL; +#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 15136 "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 15146 "Commands.c" + { + GeeIterator* _s_it = NULL; + GeeMap* _tmp46_ = NULL; + const gchar* _tmp47_ = NULL; + gpointer _tmp48_ = NULL; + GeeSet* _tmp49_ = NULL; + GeeIterator* _tmp50_ = NULL; + GeeIterator* _tmp51_ = NULL; +#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 15173 "Commands.c" + GeeIterator* _tmp52_ = NULL; + gboolean _tmp53_ = FALSE; + MediaSource* s = NULL; + GeeIterator* _tmp54_ = NULL; + gpointer _tmp55_ = NULL; + const gchar* _tmp56_ = NULL; + Tag* _tmp57_ = NULL; + Tag* _tmp58_ = NULL; + MediaSource* _tmp59_ = NULL; +#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 15191 "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 15213 "Commands.c" + } +#line 1777 "/home/jens/Source/shotwell/src/Commands.vala" + _g_object_unref0 (_s_it); +#line 15217 "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 15223 "Commands.c" + } +#line 1767 "/home/jens/Source/shotwell/src/Commands.vala" + _g_object_unref0 (_child_subpath_it); +#line 15227 "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 15235 "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_ = NULL; + gchar* _tmp1_ = NULL; + const gchar* _tmp2_ = NULL; + const gchar* _tmp3_ = NULL; + gchar* path = NULL; + gchar* _tmp6_ = NULL; + TagSourceCollection* _tmp7_ = NULL; + const gchar* _tmp8_ = NULL; + gboolean _tmp9_ = FALSE; + Tag* tag = NULL; + const gchar* _tmp10_ = NULL; + Tag* _tmp11_ = NULL; +#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 15267 "Commands.c" + const gchar* _tmp4_ = NULL; +#line 1784 "/home/jens/Source/shotwell/src/Commands.vala" + _tmp4_ = new_path; +#line 1784 "/home/jens/Source/shotwell/src/Commands.vala" + _tmp2_ = _tmp4_; +#line 15273 "Commands.c" + } else { + const gchar* _tmp5_ = NULL; +#line 1784 "/home/jens/Source/shotwell/src/Commands.vala" + _tmp5_ = client_path; +#line 1784 "/home/jens/Source/shotwell/src/Commands.vala" + _tmp2_ = _tmp5_; +#line 15280 "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 15300 "Commands.c" + { + GeeIterator* _s_it = NULL; + GeeHashSet* _tmp12_ = NULL; + GeeIterator* _tmp13_ = NULL; +#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 15313 "Commands.c" + GeeIterator* _tmp14_ = NULL; + gboolean _tmp15_ = FALSE; + MediaSource* s = NULL; + GeeIterator* _tmp16_ = NULL; + gpointer _tmp17_ = NULL; + Tag* _tmp18_ = NULL; + MediaSource* _tmp19_ = NULL; +#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 15329 "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 15345 "Commands.c" + } +#line 1790 "/home/jens/Source/shotwell/src/Commands.vala" + _g_object_unref0 (_s_it); +#line 15349 "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 15357 "Commands.c" +} + + +static void reparent_tag_command_save_before_state (ReparentTagCommand* self) { + GeeList* _tmp0_ = NULL; + GeeList* _tmp1_ = NULL; + GeeArrayList* _tmp2_ = NULL; + GeeArrayList* _tmp3_ = NULL; + GeeMap* _tmp4_ = NULL; + const gchar* _tmp5_ = NULL; + GeeMap* _tmp6_ = NULL; + TagSourceCollection* _tmp7_ = NULL; + const gchar* _tmp8_ = NULL; + gboolean _tmp9_ = FALSE; + Tag* from_tag = NULL; + const gchar* _tmp10_ = NULL; + Tag* _tmp11_ = NULL; + GeeList* _tmp12_ = NULL; + Tag* _tmp13_ = NULL; + SourceProxy* _tmp14_ = NULL; + SourceProxy* _tmp15_ = NULL; + GeeList* parent_paths = NULL; + const gchar* _tmp16_ = NULL; + GeeList* _tmp17_ = NULL; + GeeList* _tmp18_ = NULL; + gint _tmp19_ = 0; + gint _tmp20_ = 0; + const gchar* _tmp26_ = NULL; + const gchar* _tmp30_ = NULL; + const gchar* _tmp42_ = NULL; + const gchar* _tmp59_ = NULL; + GeeList* from_children = NULL; + Tag* _tmp66_ = NULL; + GeeList* _tmp67_ = NULL; + const gchar* _tmp81_ = NULL; + const gchar* _tmp100_ = NULL; +#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, 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, 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 15468 "Commands.c" + GeeList* _tmp21_ = NULL; + GeeList* _tmp22_ = NULL; + gint _tmp23_ = 0; + gint _tmp24_ = 0; + gpointer _tmp25_ = NULL; +#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 15488 "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 15494 "Commands.c" + GeeMap* _tmp27_ = NULL; + const gchar* _tmp28_ = NULL; + GeeMap* _tmp29_ = NULL; +#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 15510 "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 15516 "Commands.c" + GeeMap* _tmp31_ = NULL; + GeeSet* _tmp32_ = NULL; + const gchar* _tmp33_ = NULL; + GeeMap* _tmp34_ = NULL; + GeeHashSet* _tmp35_ = NULL; + GeeSet* _tmp36_ = NULL; + const gchar* _tmp37_ = NULL; + Tag* _tmp38_ = NULL; + Tag* _tmp39_ = NULL; + GeeCollection* _tmp40_ = NULL; + GeeCollection* _tmp41_ = NULL; +#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, 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 15568 "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 15574 "Commands.c" + gchar* new_tpp = NULL; + const gchar* _tmp43_ = NULL; + gchar* _tmp44_ = NULL; + const gchar* _tmp45_ = NULL; + const gchar* _tmp46_ = NULL; + gchar* _tmp49_ = NULL; + TagSourceCollection* _tmp50_ = NULL; + const gchar* _tmp51_ = NULL; + gboolean _tmp52_ = FALSE; + GeeList* _tmp53_ = NULL; + const gchar* _tmp54_ = NULL; + Tag* _tmp55_ = NULL; + Tag* _tmp56_ = NULL; + SourceProxy* _tmp57_ = NULL; + SourceProxy* _tmp58_ = NULL; +#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 15600 "Commands.c" + const gchar* _tmp47_ = NULL; +#line 1831 "/home/jens/Source/shotwell/src/Commands.vala" + _tmp47_ = new_tpp; +#line 1831 "/home/jens/Source/shotwell/src/Commands.vala" + _tmp45_ = _tmp47_; +#line 15606 "Commands.c" + } else { + const gchar* _tmp48_ = NULL; +#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 15613 "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 15649 "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 15655 "Commands.c" + GeeList* _tmp60_ = NULL; + const gchar* _tmp61_ = NULL; + Tag* _tmp62_ = NULL; + Tag* _tmp63_ = NULL; + SourceProxy* _tmp64_ = NULL; + SourceProxy* _tmp65_ = NULL; +#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 15680 "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 15688 "Commands.c" + { + gint i = 0; + GeeList* _tmp68_ = NULL; + gint _tmp69_ = 0; + gint _tmp70_ = 0; +#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 15702 "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 15709 "Commands.c" + gint _tmp73_ = 0; + GeeList* _tmp74_ = NULL; + GeeList* _tmp75_ = NULL; + gint _tmp76_ = 0; + gpointer _tmp77_ = NULL; + Tag* _tmp78_ = NULL; + SourceProxy* _tmp79_ = NULL; + SourceProxy* _tmp80_ = NULL; +#line 1843 "/home/jens/Source/shotwell/src/Commands.vala" + if (!_tmp71_) { +#line 15720 "Commands.c" + gint _tmp72_ = 0; +#line 1843 "/home/jens/Source/shotwell/src/Commands.vala" + _tmp72_ = i; +#line 1843 "/home/jens/Source/shotwell/src/Commands.vala" + i = _tmp72_ - 1; +#line 15726 "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 15736 "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 15758 "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 15766 "Commands.c" + GeeList* to_children = NULL; + const gchar* _tmp82_ = NULL; + Tag* _tmp83_ = NULL; + Tag* _tmp84_ = NULL; + GeeList* _tmp85_ = NULL; + GeeList* _tmp86_ = NULL; +#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 15787 "Commands.c" + { + gint i = 0; + GeeList* _tmp87_ = NULL; + gint _tmp88_ = 0; + gint _tmp89_ = 0; +#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 15801 "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 15808 "Commands.c" + gint _tmp92_ = 0; + GeeList* _tmp93_ = NULL; + GeeList* _tmp94_ = NULL; + gint _tmp95_ = 0; + gpointer _tmp96_ = NULL; + Tag* _tmp97_ = NULL; + SourceProxy* _tmp98_ = NULL; + SourceProxy* _tmp99_ = NULL; +#line 1850 "/home/jens/Source/shotwell/src/Commands.vala" + if (!_tmp90_) { +#line 15819 "Commands.c" + gint _tmp91_ = 0; +#line 1850 "/home/jens/Source/shotwell/src/Commands.vala" + _tmp91_ = i; +#line 1850 "/home/jens/Source/shotwell/src/Commands.vala" + i = _tmp91_ - 1; +#line 15825 "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 15835 "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 15857 "Commands.c" + } + } + } +#line 1848 "/home/jens/Source/shotwell/src/Commands.vala" + _g_object_unref0 (to_children); +#line 15863 "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 15869 "Commands.c" + GeeList* to_children = NULL; + const gchar* _tmp101_ = NULL; + Tag* _tmp102_ = NULL; + Tag* _tmp103_ = NULL; + GeeList* _tmp104_ = NULL; + GeeList* _tmp105_ = NULL; +#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 15890 "Commands.c" + { + gint i = 0; + GeeList* _tmp106_ = NULL; + gint _tmp107_ = 0; + gint _tmp108_ = 0; +#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 15904 "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 15911 "Commands.c" + gint _tmp111_ = 0; + GeeList* _tmp112_ = NULL; + GeeList* _tmp113_ = NULL; + gint _tmp114_ = 0; + gpointer _tmp115_ = NULL; + Tag* _tmp116_ = NULL; + SourceProxy* _tmp117_ = NULL; + SourceProxy* _tmp118_ = NULL; +#line 1858 "/home/jens/Source/shotwell/src/Commands.vala" + if (!_tmp109_) { +#line 15922 "Commands.c" + gint _tmp110_ = 0; +#line 1858 "/home/jens/Source/shotwell/src/Commands.vala" + _tmp110_ = i; +#line 1858 "/home/jens/Source/shotwell/src/Commands.vala" + i = _tmp110_ - 1; +#line 15928 "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 15938 "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 15960 "Commands.c" + } + } + } +#line 1856 "/home/jens/Source/shotwell/src/Commands.vala" + _g_object_unref0 (to_children); +#line 15966 "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 15974 "Commands.c" +} + + +static glong string_strnlen (gchar* str, glong maxlen) { + glong result = 0L; + gchar* end = NULL; + gchar* _tmp0_ = NULL; + glong _tmp1_ = 0L; + gchar* _tmp2_ = NULL; + gchar* _tmp3_ = NULL; +#line 1295 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + _tmp0_ = str; +#line 1295 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + _tmp1_ = maxlen; +#line 1295 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + _tmp2_ = memchr (_tmp0_, 0, (gsize) _tmp1_); +#line 1295 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + end = _tmp2_; +#line 1296 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + _tmp3_ = end; +#line 1296 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + if (_tmp3_ == NULL) { +#line 15997 "Commands.c" + glong _tmp4_ = 0L; +#line 1297 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + _tmp4_ = maxlen; +#line 1297 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + result = _tmp4_; +#line 1297 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + return result; +#line 16005 "Commands.c" + } else { + gchar* _tmp5_ = NULL; + gchar* _tmp6_ = NULL; +#line 1299 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + _tmp5_ = end; +#line 1299 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + _tmp6_ = str; +#line 1299 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + result = (glong) (_tmp5_ - _tmp6_); +#line 1299 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + return result; +#line 16017 "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_ = 0L; + glong _tmp8_ = 0L; + glong _tmp14_ = 0L; + glong _tmp17_ = 0L; + glong _tmp18_ = 0L; + glong _tmp19_ = 0L; + glong _tmp20_ = 0L; + glong _tmp21_ = 0L; + gchar* _tmp22_ = NULL; +#line 1306 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + g_return_val_if_fail (self != NULL, NULL); +#line 1308 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + _tmp1_ = offset; +#line 1308 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + if (_tmp1_ >= ((glong) 0)) { +#line 16041 "Commands.c" + glong _tmp2_ = 0L; +#line 1308 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + _tmp2_ = len; +#line 1308 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + _tmp0_ = _tmp2_ >= ((glong) 0); +#line 16047 "Commands.c" + } else { +#line 1308 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + _tmp0_ = FALSE; +#line 16051 "Commands.c" + } +#line 1308 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + if (_tmp0_) { +#line 16055 "Commands.c" + glong _tmp3_ = 0L; + glong _tmp4_ = 0L; + glong _tmp5_ = 0L; +#line 1310 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + _tmp3_ = offset; +#line 1310 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + _tmp4_ = len; +#line 1310 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + _tmp5_ = string_strnlen ((gchar*) self, _tmp3_ + _tmp4_); +#line 1310 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + string_length = _tmp5_; +#line 16067 "Commands.c" + } else { + gint _tmp6_ = 0; + gint _tmp7_ = 0; +#line 1312 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + _tmp6_ = strlen (self); +#line 1312 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + _tmp7_ = _tmp6_; +#line 1312 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + string_length = (glong) _tmp7_; +#line 16077 "Commands.c" + } +#line 1315 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + _tmp8_ = offset; +#line 1315 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + if (_tmp8_ < ((glong) 0)) { +#line 16083 "Commands.c" + glong _tmp9_ = 0L; + glong _tmp10_ = 0L; + glong _tmp11_ = 0L; +#line 1316 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + _tmp9_ = string_length; +#line 1316 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + _tmp10_ = offset; +#line 1316 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + offset = _tmp9_ + _tmp10_; +#line 1317 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + _tmp11_ = offset; +#line 1317 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + g_return_val_if_fail (_tmp11_ >= ((glong) 0), NULL); +#line 16097 "Commands.c" + } else { + glong _tmp12_ = 0L; + glong _tmp13_ = 0L; +#line 1319 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + _tmp12_ = offset; +#line 1319 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + _tmp13_ = string_length; +#line 1319 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + g_return_val_if_fail (_tmp12_ <= _tmp13_, NULL); +#line 16107 "Commands.c" + } +#line 1321 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + _tmp14_ = len; +#line 1321 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + if (_tmp14_ < ((glong) 0)) { +#line 16113 "Commands.c" + glong _tmp15_ = 0L; + glong _tmp16_ = 0L; +#line 1322 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + _tmp15_ = string_length; +#line 1322 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + _tmp16_ = offset; +#line 1322 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + len = _tmp15_ - _tmp16_; +#line 16122 "Commands.c" + } +#line 1324 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + _tmp17_ = offset; +#line 1324 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + _tmp18_ = len; +#line 1324 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + _tmp19_ = string_length; +#line 1324 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + g_return_val_if_fail ((_tmp17_ + _tmp18_) <= _tmp19_, NULL); +#line 1325 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + _tmp20_ = offset; +#line 1325 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + _tmp21_ = len; +#line 1325 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + _tmp22_ = g_strndup (((gchar*) self) + _tmp20_, (gsize) _tmp21_); +#line 1325 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + result = _tmp22_; +#line 1325 "/usr/share/vala-0.32/vapi/glib-2.0.vapi" + return result; +#line 16142 "Commands.c" +} + + +static void reparent_tag_command_restore_before_state (ReparentTagCommand* self) { + GeeList* _tmp0_ = NULL; + GeeMap* _tmp1_ = NULL; + const gchar* _tmp2_ = NULL; + const gchar* _tmp10_ = NULL; + const gchar* _tmp11_ = NULL; + gchar* unwind_target = NULL; + gchar* _tmp14_ = NULL; + const gchar* _tmp93_ = NULL; +#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 16169 "Commands.c" + gchar* new_tpp = NULL; + const gchar* _tmp3_ = NULL; + gchar* _tmp4_ = NULL; + const gchar* _tmp5_ = NULL; + const gchar* _tmp6_ = NULL; + gchar* _tmp9_ = NULL; +#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 16186 "Commands.c" + const gchar* _tmp7_ = NULL; +#line 1870 "/home/jens/Source/shotwell/src/Commands.vala" + _tmp7_ = new_tpp; +#line 1870 "/home/jens/Source/shotwell/src/Commands.vala" + _tmp5_ = _tmp7_; +#line 16192 "Commands.c" + } else { + const gchar* _tmp8_ = NULL; +#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 16199 "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 16209 "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 16215 "Commands.c" + const gchar* _tmp12_ = NULL; +#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 16221 "Commands.c" + } else { + const gchar* _tmp13_ = NULL; +#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 16228 "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 16234 "Commands.c" + { + GeeList* _t_list = NULL; + const gchar* _tmp15_ = NULL; + Tag* _tmp16_ = NULL; + Tag* _tmp17_ = NULL; + GeeList* _tmp18_ = NULL; + GeeList* _tmp19_ = NULL; + gint _t_size = 0; + GeeList* _tmp20_ = NULL; + gint _tmp21_ = 0; + gint _tmp22_ = 0; + 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 16273 "Commands.c" + gint _tmp23_ = 0; + gint _tmp24_ = 0; + gint _tmp25_ = 0; + Tag* t = NULL; + GeeList* _tmp26_ = NULL; + gint _tmp27_ = 0; + gpointer _tmp28_ = NULL; + gchar* child_subpath = NULL; + Tag* _tmp29_ = NULL; + gchar* _tmp30_ = NULL; + gchar* _tmp31_ = NULL; + const gchar* _tmp32_ = NULL; + gchar* _tmp33_ = NULL; + gchar* _tmp34_ = NULL; + const gchar* _tmp35_ = NULL; + gboolean _tmp36_ = FALSE; + GeeMap* _tmp39_ = NULL; + const gchar* _tmp40_ = NULL; + gboolean _tmp41_ = FALSE; +#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 16305 "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 16337 "Commands.c" + const gchar* _tmp37_ = NULL; + gchar* _tmp38_ = NULL; +#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 16348 "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 16358 "Commands.c" + TagSourceCollection* _tmp42_ = NULL; + TagSourceCollection* _tmp43_ = NULL; + Tag* _tmp44_ = NULL; + Marker* _tmp45_ = NULL; + Marker* _tmp46_ = NULL; +#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 16378 "Commands.c" + } else { + GeeSet* starting_sources = NULL; + GeeHashSet* _tmp47_ = NULL; + GeeSet* _tmp48_ = NULL; + Tag* _tmp49_ = NULL; + GeeCollection* _tmp50_ = NULL; + GeeCollection* _tmp51_ = NULL; +#line 1882 "/home/jens/Source/shotwell/src/Commands.vala" + _tmp47_ = gee_hash_set_new (TYPE_MEDIA_SOURCE, (GBoxedCopyFunc) g_object_ref, 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 16402 "Commands.c" + { + GeeIterator* _source_it = NULL; + GeeSet* _tmp52_ = NULL; + GeeIterator* _tmp53_ = NULL; +#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 16415 "Commands.c" + GeeIterator* _tmp54_ = NULL; + gboolean _tmp55_ = FALSE; + MediaSource* source = NULL; + GeeIterator* _tmp56_ = NULL; + gpointer _tmp57_ = NULL; + GeeMap* _tmp58_ = NULL; + const gchar* _tmp59_ = NULL; + gpointer _tmp60_ = NULL; + GeeSet* _tmp61_ = NULL; + MediaSource* _tmp62_ = NULL; + gboolean _tmp63_ = FALSE; + gboolean _tmp64_ = FALSE; +#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 16436 "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 16462 "Commands.c" + Tag* _tmp65_ = NULL; + MediaSource* _tmp66_ = NULL; + GeeList* _tmp67_ = NULL; + GeeList* _tmp68_ = NULL; +#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 16477 "Commands.c" + } +#line 1884 "/home/jens/Source/shotwell/src/Commands.vala" + _g_object_unref0 (source); +#line 16481 "Commands.c" + } +#line 1884 "/home/jens/Source/shotwell/src/Commands.vala" + _g_object_unref0 (_source_it); +#line 16485 "Commands.c" + } +#line 1879 "/home/jens/Source/shotwell/src/Commands.vala" + _g_object_unref0 (starting_sources); +#line 16489 "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 16495 "Commands.c" + } +#line 1874 "/home/jens/Source/shotwell/src/Commands.vala" + _g_object_unref0 (_t_list); +#line 16499 "Commands.c" + } + { + gint i = 0; +#line 1890 "/home/jens/Source/shotwell/src/Commands.vala" + i = 0; +#line 16505 "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 16512 "Commands.c" + gint _tmp71_ = 0; + GeeList* _tmp72_ = NULL; + gint _tmp73_ = 0; + gint _tmp74_ = 0; + GeeList* _tmp75_ = NULL; + gint _tmp76_ = 0; + gpointer _tmp77_ = NULL; + SourceProxy* _tmp78_ = NULL; + DataSource* _tmp79_ = NULL; + DataSource* _tmp80_ = NULL; +#line 1890 "/home/jens/Source/shotwell/src/Commands.vala" + if (!_tmp69_) { +#line 16525 "Commands.c" + gint _tmp70_ = 0; +#line 1890 "/home/jens/Source/shotwell/src/Commands.vala" + _tmp70_ = i; +#line 1890 "/home/jens/Source/shotwell/src/Commands.vala" + i = _tmp70_ + 1; +#line 16531 "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 16547 "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 16565 "Commands.c" + } + } + } + { + gint i = 0; +#line 1893 "/home/jens/Source/shotwell/src/Commands.vala" + i = 0; +#line 16573 "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 16580 "Commands.c" + gint _tmp83_ = 0; + GeeList* _tmp84_ = NULL; + gint _tmp85_ = 0; + gint _tmp86_ = 0; + GeeList* _tmp87_ = NULL; + gint _tmp88_ = 0; + gpointer _tmp89_ = NULL; + SourceProxy* _tmp90_ = NULL; + DataSource* _tmp91_ = NULL; + DataSource* _tmp92_ = NULL; +#line 1893 "/home/jens/Source/shotwell/src/Commands.vala" + if (!_tmp81_) { +#line 16593 "Commands.c" + gint _tmp82_ = 0; +#line 1893 "/home/jens/Source/shotwell/src/Commands.vala" + _tmp82_ = i; +#line 1893 "/home/jens/Source/shotwell/src/Commands.vala" + i = _tmp82_ + 1; +#line 16599 "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 16615 "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 16633 "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 16641 "Commands.c" + gchar* new_path = NULL; + const gchar* _tmp94_ = NULL; + gchar* _tmp95_ = NULL; + const gchar* _tmp96_ = NULL; + const gchar* _tmp97_ = NULL; + gchar* path = NULL; + gchar* _tmp100_ = NULL; + TagSourceCollection* _tmp101_ = NULL; + const gchar* _tmp102_ = NULL; + gboolean _tmp103_ = FALSE; + Tag* t = NULL; + const gchar* _tmp104_ = NULL; + Tag* _tmp105_ = NULL; + GeeList* kids = NULL; + Tag* _tmp106_ = NULL; + GeeList* _tmp107_ = NULL; + const gchar* _tmp125_ = NULL; + GeeMap* _tmp126_ = NULL; +#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 16670 "Commands.c" + const gchar* _tmp98_ = NULL; +#line 1898 "/home/jens/Source/shotwell/src/Commands.vala" + _tmp98_ = new_path; +#line 1898 "/home/jens/Source/shotwell/src/Commands.vala" + _tmp96_ = _tmp98_; +#line 16676 "Commands.c" + } else { + const gchar* _tmp99_ = NULL; +#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 16683 "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 16709 "Commands.c" + { + GeeList* _kidtag_list = NULL; + GeeList* _tmp108_ = NULL; + GeeList* _tmp109_ = NULL; + gint _kidtag_size = 0; + GeeList* _tmp110_ = NULL; + gint _tmp111_ = 0; + gint _tmp112_ = 0; + 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 16737 "Commands.c" + gint _tmp113_ = 0; + gint _tmp114_ = 0; + gint _tmp115_ = 0; + Tag* kidtag = NULL; + GeeList* _tmp116_ = NULL; + gint _tmp117_ = 0; + gpointer _tmp118_ = NULL; + Tag* _tmp119_ = NULL; + Tag* _tmp120_ = NULL; + GeeCollection* _tmp121_ = NULL; + GeeCollection* _tmp122_ = NULL; + GeeMultiMap* _tmp123_ = NULL; + GeeMultiMap* _tmp124_ = NULL; +#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 16763 "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 16791 "Commands.c" + } +#line 1905 "/home/jens/Source/shotwell/src/Commands.vala" + _g_object_unref0 (_kidtag_list); +#line 16795 "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 16811 "Commands.c" + } else { + GeeSet* _tmp127_ = NULL; + const gchar* _tmp128_ = NULL; + Tag* _tmp129_ = NULL; + Tag* _tmp130_ = NULL; + const gchar* _tmp131_ = NULL; + Tag* _tmp132_ = NULL; + Tag* _tmp133_ = NULL; + GeeCollection* _tmp134_ = NULL; + GeeCollection* _tmp135_ = NULL; + GeeMultiMap* _tmp136_ = NULL; + GeeMultiMap* _tmp137_ = NULL; + const gchar* _tmp138_ = NULL; + Tag* _tmp139_ = NULL; + Tag* _tmp140_ = NULL; + GeeSet* _tmp141_ = NULL; + GeeList* kids = NULL; + const gchar* _tmp142_ = NULL; + Tag* _tmp143_ = NULL; + Tag* _tmp144_ = NULL; + GeeList* _tmp145_ = NULL; + GeeList* _tmp146_ = NULL; + const gchar* _tmp164_ = NULL; + GeeMap* _tmp165_ = NULL; +#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 16894 "Commands.c" + { + GeeList* _kidtag_list = NULL; + GeeList* _tmp147_ = NULL; + GeeList* _tmp148_ = NULL; + gint _kidtag_size = 0; + GeeList* _tmp149_ = NULL; + gint _tmp150_ = 0; + gint _tmp151_ = 0; + 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 16922 "Commands.c" + gint _tmp152_ = 0; + gint _tmp153_ = 0; + gint _tmp154_ = 0; + Tag* kidtag = NULL; + GeeList* _tmp155_ = NULL; + gint _tmp156_ = 0; + gpointer _tmp157_ = NULL; + Tag* _tmp158_ = NULL; + Tag* _tmp159_ = NULL; + GeeCollection* _tmp160_ = NULL; + GeeCollection* _tmp161_ = NULL; + GeeMultiMap* _tmp162_ = NULL; + GeeMultiMap* _tmp163_ = NULL; +#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 16948 "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 16976 "Commands.c" + } +#line 1915 "/home/jens/Source/shotwell/src/Commands.vala" + _g_object_unref0 (_kidtag_list); +#line 16980 "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 16990 "Commands.c" + } +#line 1863 "/home/jens/Source/shotwell/src/Commands.vala" + _g_free0 (unwind_target); +#line 16994 "Commands.c" +} + + +static void reparent_tag_command_save_after_state (ReparentTagCommand* self) { + GeeList* _tmp0_ = NULL; + GeeArrayList* _tmp1_ = NULL; + TagSourceCollection* _tmp2_ = NULL; + const gchar* _tmp3_ = NULL; + gboolean _tmp4_ = FALSE; + Tag* to_tag = NULL; + const gchar* _tmp5_ = NULL; + Tag* _tmp6_ = NULL; + GeeList* _tmp7_ = NULL; + Tag* _tmp8_ = NULL; + SourceProxy* _tmp9_ = NULL; + SourceProxy* _tmp10_ = NULL; + GeeList* to_children = NULL; + Tag* _tmp11_ = NULL; + GeeList* _tmp12_ = NULL; +#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, 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 17058 "Commands.c" + { + gint i = 0; + GeeList* _tmp13_ = NULL; + gint _tmp14_ = 0; + gint _tmp15_ = 0; +#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 17072 "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 17079 "Commands.c" + gint _tmp18_ = 0; + GeeList* _tmp19_ = NULL; + GeeList* _tmp20_ = NULL; + gint _tmp21_ = 0; + gpointer _tmp22_ = NULL; + Tag* _tmp23_ = NULL; + SourceProxy* _tmp24_ = NULL; + SourceProxy* _tmp25_ = NULL; +#line 1934 "/home/jens/Source/shotwell/src/Commands.vala" + if (!_tmp16_) { +#line 17090 "Commands.c" + gint _tmp17_ = 0; +#line 1934 "/home/jens/Source/shotwell/src/Commands.vala" + _tmp17_ = i; +#line 1934 "/home/jens/Source/shotwell/src/Commands.vala" + i = _tmp17_ - 1; +#line 17096 "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 17106 "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 17128 "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 17136 "Commands.c" +} + + +static void reparent_tag_command_restore_after_state (ReparentTagCommand* self) { + GeeList* _tmp0_ = NULL; +#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 17148 "Commands.c" + { + gint i = 0; +#line 1941 "/home/jens/Source/shotwell/src/Commands.vala" + i = 0; +#line 17153 "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 17160 "Commands.c" + gint _tmp3_ = 0; + GeeList* _tmp4_ = NULL; + gint _tmp5_ = 0; + gint _tmp6_ = 0; + GeeList* _tmp7_ = NULL; + gint _tmp8_ = 0; + gpointer _tmp9_ = NULL; + SourceProxy* _tmp10_ = NULL; + DataSource* _tmp11_ = NULL; + DataSource* _tmp12_ = NULL; +#line 1941 "/home/jens/Source/shotwell/src/Commands.vala" + if (!_tmp1_) { +#line 17173 "Commands.c" + gint _tmp2_ = 0; +#line 1941 "/home/jens/Source/shotwell/src/Commands.vala" + _tmp2_ = i; +#line 1941 "/home/jens/Source/shotwell/src/Commands.vala" + i = _tmp2_ + 1; +#line 17179 "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 17195 "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 17213 "Commands.c" + } + } + } +} + + +static void reparent_tag_command_prepare_parent (ReparentTagCommand* self, const gchar* path) { + Tag* new_parent = NULL; + const gchar* _tmp0_ = NULL; + gboolean _tmp1_ = FALSE; + Tag* _tmp27_ = NULL; +#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 17237 "Commands.c" + GeeList* parent_paths = NULL; + const gchar* _tmp2_ = NULL; + GeeList* _tmp3_ = NULL; + GeeList* _tmp4_ = NULL; + gint _tmp5_ = 0; + gint _tmp6_ = 0; +#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 17258 "Commands.c" + gchar* immediate_parent_path = NULL; + GeeList* _tmp7_ = NULL; + GeeList* _tmp8_ = NULL; + gint _tmp9_ = 0; + gint _tmp10_ = 0; + gpointer _tmp11_ = NULL; + TagSourceCollection* _tmp12_ = NULL; + const gchar* _tmp13_ = NULL; + gboolean _tmp14_ = FALSE; +#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 17288 "Commands.c" + const gchar* _tmp15_ = NULL; + Tag* _tmp16_ = NULL; +#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 17299 "Commands.c" + } else { + TagSourceCollection* _tmp17_ = NULL; + const gchar* _tmp18_ = NULL; + gchar* _tmp19_ = NULL; + gchar* _tmp20_ = NULL; + gboolean _tmp21_ = FALSE; + gboolean _tmp22_ = FALSE; +#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 17323 "Commands.c" + const gchar* _tmp23_ = NULL; + gchar* _tmp24_ = NULL; + gchar* _tmp25_ = NULL; + Tag* _tmp26_ = NULL; +#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 17342 "Commands.c" + } else { +#line 1957 "/home/jens/Source/shotwell/src/Commands.vala" + g_assert_not_reached (); +#line 17346 "Commands.c" + } + } +#line 1950 "/home/jens/Source/shotwell/src/Commands.vala" + _g_free0 (immediate_parent_path); +#line 17351 "Commands.c" + } +#line 1948 "/home/jens/Source/shotwell/src/Commands.vala" + _g_object_unref0 (parent_paths); +#line 17355 "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 17361 "Commands.c" + Tag* _tmp28_ = NULL; +#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 17367 "Commands.c" + } +#line 1945 "/home/jens/Source/shotwell/src/Commands.vala" + _g_object_unref0 (new_parent); +#line 17371 "Commands.c" +} + + +static void reparent_tag_command_do_source_parent_detachments (ReparentTagCommand* self) { + TagSourceCollection* _tmp0_ = NULL; + const gchar* _tmp1_ = NULL; + gboolean _tmp2_ = FALSE; + Tag* from_tag = NULL; + const gchar* _tmp3_ = NULL; + Tag* _tmp4_ = NULL; + GeeMap* _tmp5_ = NULL; +#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 17403 "Commands.c" + GeeHashMap* _tmp6_ = NULL; +#line 1970 "/home/jens/Source/shotwell/src/Commands.vala" + _tmp6_ = gee_hash_map_new (G_TYPE_STRING, (GBoxedCopyFunc) g_strdup, g_free, GEE_TYPE_SET, (GBoxedCopyFunc) g_object_ref, 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 17411 "Commands.c" + { + GeeIterator* _source_it = NULL; + Tag* _tmp7_ = NULL; + GeeCollection* _tmp8_ = NULL; + GeeCollection* _tmp9_ = NULL; + GeeIterator* _tmp10_ = NULL; + GeeIterator* _tmp11_ = NULL; +#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 17435 "Commands.c" + GeeIterator* _tmp12_ = NULL; + gboolean _tmp13_ = FALSE; + MediaSource* source = NULL; + GeeIterator* _tmp14_ = NULL; + gpointer _tmp15_ = NULL; + Tag* current_parent = NULL; + Tag* _tmp16_ = NULL; + Tag* _tmp17_ = NULL; + gint running_attach_count = 0; + Tag* _tmp18_ = NULL; + MediaSource* _tmp19_ = NULL; + gint _tmp20_ = 0; +#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 17456 "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 17480 "Commands.c" + Tag* _tmp21_ = NULL; + gchar* current_parent_path = NULL; + Tag* _tmp22_ = NULL; + gchar* _tmp23_ = NULL; + GeeMap* _tmp24_ = NULL; + const gchar* _tmp25_ = NULL; + gboolean _tmp26_ = FALSE; + gint curr_parent_attach_count = 0; + Tag* _tmp31_ = NULL; + MediaSource* _tmp32_ = NULL; + gint _tmp33_ = 0; + gint _tmp34_ = 0; + gint _tmp35_ = 0; + gint _tmp36_ = 0; + gint _tmp37_ = 0; + gint _tmp43_ = 0; + Tag* _tmp44_ = NULL; + Tag* _tmp45_ = NULL; +#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 17505 "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 17521 "Commands.c" + GeeMap* _tmp27_ = NULL; + const gchar* _tmp28_ = NULL; + GeeHashSet* _tmp29_ = NULL; + GeeHashSet* _tmp30_ = NULL; +#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, 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 17538 "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 17560 "Commands.c" + GeeMap* _tmp38_ = NULL; + const gchar* _tmp39_ = NULL; + gpointer _tmp40_ = NULL; + GeeSet* _tmp41_ = NULL; + MediaSource* _tmp42_ = NULL; +#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 17580 "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 17596 "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 17602 "Commands.c" + } +#line 1971 "/home/jens/Source/shotwell/src/Commands.vala" + _g_object_unref0 (_source_it); +#line 17606 "Commands.c" + } + } + { + GeeIterator* _p_it = NULL; + GeeMap* _tmp46_ = NULL; + GeeSet* _tmp47_ = NULL; + GeeSet* _tmp48_ = NULL; + GeeSet* _tmp49_ = NULL; + GeeIterator* _tmp50_ = NULL; + GeeIterator* _tmp51_ = NULL; +#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 17635 "Commands.c" + GeeIterator* _tmp52_ = NULL; + gboolean _tmp53_ = FALSE; + gchar* p = NULL; + GeeIterator* _tmp54_ = NULL; + gpointer _tmp55_ = NULL; +#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 17649 "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 17657 "Commands.c" + { + GeeIterator* _s_it = NULL; + GeeMap* _tmp56_ = NULL; + const gchar* _tmp57_ = NULL; + gpointer _tmp58_ = NULL; + GeeSet* _tmp59_ = NULL; + GeeIterator* _tmp60_ = NULL; + GeeIterator* _tmp61_ = NULL; +#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 17684 "Commands.c" + GeeIterator* _tmp62_ = NULL; + gboolean _tmp63_ = FALSE; + MediaSource* s = NULL; + GeeIterator* _tmp64_ = NULL; + gpointer _tmp65_ = NULL; + const gchar* _tmp66_ = NULL; + Tag* _tmp67_ = NULL; + Tag* _tmp68_ = NULL; + MediaSource* _tmp69_ = NULL; + GeeList* _tmp70_ = NULL; + GeeList* _tmp71_ = NULL; +#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 17704 "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 17730 "Commands.c" + } +#line 1996 "/home/jens/Source/shotwell/src/Commands.vala" + _g_object_unref0 (_s_it); +#line 17734 "Commands.c" + } +#line 1995 "/home/jens/Source/shotwell/src/Commands.vala" + _g_free0 (p); +#line 17738 "Commands.c" + } +#line 1995 "/home/jens/Source/shotwell/src/Commands.vala" + _g_object_unref0 (_p_it); +#line 17742 "Commands.c" + } +#line 1964 "/home/jens/Source/shotwell/src/Commands.vala" + _g_object_unref0 (from_tag); +#line 17746 "Commands.c" +} + + +static void reparent_tag_command_do_source_parent_reattachments (ReparentTagCommand* self) { + GeeMap* _tmp0_ = NULL; +#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 17758 "Commands.c" + { + GeeIterator* _p_it = NULL; + GeeMap* _tmp1_ = NULL; + GeeSet* _tmp2_ = NULL; + GeeSet* _tmp3_ = NULL; + GeeSet* _tmp4_ = NULL; + GeeIterator* _tmp5_ = NULL; + GeeIterator* _tmp6_ = NULL; +#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 17785 "Commands.c" + GeeIterator* _tmp7_ = NULL; + gboolean _tmp8_ = FALSE; + gchar* p = NULL; + GeeIterator* _tmp9_ = NULL; + gpointer _tmp10_ = NULL; +#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 17799 "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 17807 "Commands.c" + { + GeeIterator* _s_it = NULL; + GeeMap* _tmp11_ = NULL; + const gchar* _tmp12_ = NULL; + gpointer _tmp13_ = NULL; + GeeSet* _tmp14_ = NULL; + GeeIterator* _tmp15_ = NULL; + GeeIterator* _tmp16_ = NULL; +#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 17834 "Commands.c" + GeeIterator* _tmp17_ = NULL; + gboolean _tmp18_ = FALSE; + MediaSource* s = NULL; + GeeIterator* _tmp19_ = NULL; + gpointer _tmp20_ = NULL; + const gchar* _tmp21_ = NULL; + Tag* _tmp22_ = NULL; + Tag* _tmp23_ = NULL; + MediaSource* _tmp24_ = NULL; +#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 17852 "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 17874 "Commands.c" + } +#line 2004 "/home/jens/Source/shotwell/src/Commands.vala" + _g_object_unref0 (_s_it); +#line 17878 "Commands.c" + } +#line 2003 "/home/jens/Source/shotwell/src/Commands.vala" + _g_free0 (p); +#line 17882 "Commands.c" + } +#line 2003 "/home/jens/Source/shotwell/src/Commands.vala" + _g_object_unref0 (_p_it); +#line 17886 "Commands.c" + } +} + + +static void reparent_tag_command_do_destination_parent_detachments (ReparentTagCommand* self) { + GeeMap* _tmp0_ = NULL; +#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 17899 "Commands.c" + { + GeeIterator* _p_it = NULL; + GeeMap* _tmp1_ = NULL; + GeeSet* _tmp2_ = NULL; + GeeSet* _tmp3_ = NULL; + GeeSet* _tmp4_ = NULL; + GeeIterator* _tmp5_ = NULL; + GeeIterator* _tmp6_ = NULL; +#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 17926 "Commands.c" + GeeIterator* _tmp7_ = NULL; + gboolean _tmp8_ = FALSE; + gchar* p = NULL; + GeeIterator* _tmp9_ = NULL; + gpointer _tmp10_ = NULL; +#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 17940 "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 17948 "Commands.c" + { + GeeIterator* _s_it = NULL; + GeeMap* _tmp11_ = NULL; + const gchar* _tmp12_ = NULL; + gpointer _tmp13_ = NULL; + GeeSet* _tmp14_ = NULL; + GeeIterator* _tmp15_ = NULL; + GeeIterator* _tmp16_ = NULL; +#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 17975 "Commands.c" + GeeIterator* _tmp17_ = NULL; + gboolean _tmp18_ = FALSE; + MediaSource* s = NULL; + GeeIterator* _tmp19_ = NULL; + gpointer _tmp20_ = NULL; + const gchar* _tmp21_ = NULL; + Tag* _tmp22_ = NULL; + Tag* _tmp23_ = NULL; + MediaSource* _tmp24_ = NULL; + GeeList* _tmp25_ = NULL; + GeeList* _tmp26_ = NULL; +#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 17995 "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 18021 "Commands.c" + } +#line 2012 "/home/jens/Source/shotwell/src/Commands.vala" + _g_object_unref0 (_s_it); +#line 18025 "Commands.c" + } +#line 2011 "/home/jens/Source/shotwell/src/Commands.vala" + _g_free0 (p); +#line 18029 "Commands.c" + } +#line 2011 "/home/jens/Source/shotwell/src/Commands.vala" + _g_object_unref0 (_p_it); +#line 18033 "Commands.c" + } +} + + +static void reparent_tag_command_do_destination_parent_reattachments (ReparentTagCommand* self) { + GeeMap* _tmp0_ = NULL; +#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 18046 "Commands.c" + { + GeeIterator* _p_it = NULL; + GeeMap* _tmp1_ = NULL; + GeeSet* _tmp2_ = NULL; + GeeSet* _tmp3_ = NULL; + GeeSet* _tmp4_ = NULL; + GeeIterator* _tmp5_ = NULL; + GeeIterator* _tmp6_ = NULL; +#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 18073 "Commands.c" + GeeIterator* _tmp7_ = NULL; + gboolean _tmp8_ = FALSE; + gchar* p = NULL; + GeeIterator* _tmp9_ = NULL; + gpointer _tmp10_ = NULL; +#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 18087 "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 18095 "Commands.c" + { + GeeIterator* _s_it = NULL; + GeeMap* _tmp11_ = NULL; + const gchar* _tmp12_ = NULL; + gpointer _tmp13_ = NULL; + GeeSet* _tmp14_ = NULL; + GeeIterator* _tmp15_ = NULL; + GeeIterator* _tmp16_ = NULL; +#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 18122 "Commands.c" + GeeIterator* _tmp17_ = NULL; + gboolean _tmp18_ = FALSE; + MediaSource* s = NULL; + GeeIterator* _tmp19_ = NULL; + gpointer _tmp20_ = NULL; + const gchar* _tmp21_ = NULL; + Tag* _tmp22_ = NULL; + Tag* _tmp23_ = NULL; + MediaSource* _tmp24_ = NULL; +#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 18140 "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 18162 "Commands.c" + } +#line 2020 "/home/jens/Source/shotwell/src/Commands.vala" + _g_object_unref0 (_s_it); +#line 18166 "Commands.c" + } +#line 2019 "/home/jens/Source/shotwell/src/Commands.vala" + _g_free0 (p); +#line 18170 "Commands.c" + } +#line 2019 "/home/jens/Source/shotwell/src/Commands.vala" + _g_object_unref0 (_p_it); +#line 18174 "Commands.c" + } +} + + +static void reparent_tag_command_copy_subtree (ReparentTagCommand* self, const gchar* from, const gchar* to) { + TagSourceCollection* _tmp0_ = NULL; + const gchar* _tmp1_ = NULL; + gboolean _tmp2_ = FALSE; + Tag* from_tag = NULL; + const gchar* _tmp3_ = NULL; + Tag* _tmp4_ = NULL; + Tag* to_tag = NULL; + const gchar* _tmp5_ = NULL; + Tag* _tmp6_ = NULL; + GeeHashMap* _tmp7_ = NULL; + GeeList* from_children = NULL; + Tag* _tmp50_ = NULL; + GeeList* _tmp51_ = NULL; +#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, g_free, GEE_TYPE_SET, (GBoxedCopyFunc) g_object_ref, 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 18225 "Commands.c" + { + GeeIterator* _source_it = NULL; + Tag* _tmp8_ = NULL; + GeeCollection* _tmp9_ = NULL; + GeeCollection* _tmp10_ = NULL; + GeeIterator* _tmp11_ = NULL; + GeeIterator* _tmp12_ = NULL; +#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 18249 "Commands.c" + GeeIterator* _tmp13_ = NULL; + gboolean _tmp14_ = FALSE; + MediaSource* source = NULL; + GeeIterator* _tmp15_ = NULL; + gpointer _tmp16_ = NULL; + Tag* current_parent = NULL; + Tag* _tmp17_ = NULL; + Tag* _tmp18_ = NULL; +#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 18266 "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 18282 "Commands.c" + Tag* _tmp19_ = NULL; + gchar* current_parent_path = NULL; + Tag* _tmp20_ = NULL; + gchar* _tmp21_ = NULL; + GeeMap* _tmp22_ = NULL; + const gchar* _tmp23_ = NULL; + gboolean _tmp24_ = FALSE; + Tag* _tmp29_ = NULL; + MediaSource* _tmp30_ = NULL; + gboolean _tmp31_ = FALSE; + Tag* _tmp37_ = NULL; + Tag* _tmp38_ = NULL; +#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 18301 "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 18317 "Commands.c" + GeeMap* _tmp25_ = NULL; + const gchar* _tmp26_ = NULL; + GeeHashSet* _tmp27_ = NULL; + GeeHashSet* _tmp28_ = NULL; +#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, 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 18334 "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 18344 "Commands.c" + GeeMap* _tmp32_ = NULL; + const gchar* _tmp33_ = NULL; + gpointer _tmp34_ = NULL; + GeeSet* _tmp35_ = NULL; + MediaSource* _tmp36_ = NULL; +#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 18364 "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 18376 "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 18382 "Commands.c" + } +#line 2034 "/home/jens/Source/shotwell/src/Commands.vala" + _g_object_unref0 (_source_it); +#line 18386 "Commands.c" + } + { + GeeIterator* _source_it = NULL; + Tag* _tmp39_ = NULL; + GeeCollection* _tmp40_ = NULL; + GeeCollection* _tmp41_ = NULL; + GeeIterator* _tmp42_ = NULL; + GeeIterator* _tmp43_ = NULL; +#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 18411 "Commands.c" + GeeIterator* _tmp44_ = NULL; + gboolean _tmp45_ = FALSE; + MediaSource* source = NULL; + GeeIterator* _tmp46_ = NULL; + gpointer _tmp47_ = NULL; + Tag* _tmp48_ = NULL; + MediaSource* _tmp49_ = NULL; +#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 18427 "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 18443 "Commands.c" + } +#line 2048 "/home/jens/Source/shotwell/src/Commands.vala" + _g_object_unref0 (_source_it); +#line 18447 "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 18455 "Commands.c" + { + gint i = 0; + GeeList* _tmp52_ = NULL; + gint _tmp53_ = 0; + gint _tmp54_ = 0; +#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 18469 "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 18476 "Commands.c" + gint _tmp57_ = 0; + Tag* from_child = NULL; + GeeList* _tmp58_ = NULL; + gint _tmp59_ = 0; + gpointer _tmp60_ = NULL; + gchar* child_subpath = NULL; + Tag* _tmp61_ = NULL; + gchar* _tmp62_ = NULL; + gchar* _tmp63_ = NULL; + const gchar* _tmp64_ = NULL; + gchar* _tmp65_ = NULL; + gchar* _tmp66_ = NULL; + gchar* _tmp67_ = NULL; + gchar* _tmp68_ = NULL; + Tag* to_child = NULL; + Tag* _tmp69_ = NULL; + gchar* _tmp70_ = NULL; + gchar* _tmp71_ = NULL; + gchar* _tmp72_ = NULL; + gchar* _tmp73_ = NULL; + const gchar* _tmp74_ = NULL; + gchar* _tmp75_ = NULL; + gchar* _tmp76_ = NULL; + Tag* _tmp77_ = NULL; + Tag* _tmp78_ = NULL; +#line 2054 "/home/jens/Source/shotwell/src/Commands.vala" + if (!_tmp55_) { +#line 18504 "Commands.c" + gint _tmp56_ = 0; +#line 2054 "/home/jens/Source/shotwell/src/Commands.vala" + _tmp56_ = i; +#line 2054 "/home/jens/Source/shotwell/src/Commands.vala" + i = _tmp56_ - 1; +#line 18510 "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 18520 "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 18580 "Commands.c" + { + GeeIterator* _source_it = NULL; + Tag* _tmp79_ = NULL; + GeeCollection* _tmp80_ = NULL; + GeeCollection* _tmp81_ = NULL; + GeeIterator* _tmp82_ = NULL; + GeeIterator* _tmp83_ = NULL; +#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 18604 "Commands.c" + GeeIterator* _tmp84_ = NULL; + gboolean _tmp85_ = FALSE; + MediaSource* source = NULL; + GeeIterator* _tmp86_ = NULL; + gpointer _tmp87_ = NULL; + Tag* _tmp88_ = NULL; + MediaSource* _tmp89_ = NULL; +#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 18620 "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 18636 "Commands.c" + } +#line 2063 "/home/jens/Source/shotwell/src/Commands.vala" + _g_object_unref0 (_source_it); +#line 18640 "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 18648 "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 18658 "Commands.c" +} + + +static void reparent_tag_command_destroy_subtree (ReparentTagCommand* self, const gchar* client_path) { + gchar* victim_path = NULL; + const gchar* _tmp0_ = NULL; + gchar* _tmp1_ = NULL; + const gchar* _tmp2_ = NULL; + TagSourceCollection* _tmp5_ = NULL; + const gchar* _tmp6_ = NULL; + gboolean _tmp7_ = FALSE; + Tag* victim = NULL; + const gchar* _tmp8_ = NULL; + Tag* _tmp9_ = NULL; + GeeList* victim_children = NULL; + Tag* _tmp10_ = NULL; + GeeList* _tmp11_ = NULL; + TagSourceCollection* _tmp26_ = NULL; + TagSourceCollection* _tmp27_ = NULL; + Tag* _tmp28_ = NULL; + Marker* _tmp29_ = NULL; + Marker* _tmp30_ = NULL; +#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 18695 "Commands.c" + const gchar* _tmp3_ = NULL; + gchar* _tmp4_ = NULL; +#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 18706 "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 18720 "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 18734 "Commands.c" + { + gint i = 0; +#line 2080 "/home/jens/Source/shotwell/src/Commands.vala" + i = 0; +#line 18739 "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 18746 "Commands.c" + gint _tmp14_ = 0; + GeeList* _tmp15_ = NULL; + gint _tmp16_ = 0; + gint _tmp17_ = 0; + TagSourceCollection* _tmp18_ = NULL; + TagSourceCollection* _tmp19_ = NULL; + GeeList* _tmp20_ = NULL; + gint _tmp21_ = 0; + gpointer _tmp22_ = NULL; + Tag* _tmp23_ = NULL; + Marker* _tmp24_ = NULL; + Marker* _tmp25_ = NULL; +#line 2080 "/home/jens/Source/shotwell/src/Commands.vala" + if (!_tmp12_) { +#line 18761 "Commands.c" + gint _tmp13_ = 0; +#line 2080 "/home/jens/Source/shotwell/src/Commands.vala" + _tmp13_ = i; +#line 2080 "/home/jens/Source/shotwell/src/Commands.vala" + i = _tmp13_ + 1; +#line 18767 "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 18783 "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 18807 "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 18831 "Commands.c" +} + + +static void reparent_tag_command_real_execute (Command* base) { + ReparentTagCommand * self; + GeeList* _tmp0_ = NULL; +#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 18844 "Commands.c" + const gchar* _tmp1_ = NULL; + const gchar* _tmp2_ = NULL; + const gchar* _tmp3_ = NULL; + const gchar* _tmp4_ = NULL; +#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 18869 "Commands.c" + } else { + const gchar* _tmp5_ = NULL; + const gchar* _tmp6_ = NULL; + GeeMap* _tmp7_ = NULL; + const gchar* _tmp8_ = NULL; + const gchar* _tmp9_ = NULL; +#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 18900 "Commands.c" + } +} + + +static void reparent_tag_command_real_undo (Command* base) { + ReparentTagCommand * self; + GeeList* _tmp0_ = NULL; + const gchar* _tmp1_ = NULL; + gboolean _tmp2_ = FALSE; + const gchar* _tmp4_ = NULL; + GeeMap* _tmp5_ = NULL; + const gchar* _tmp6_ = NULL; + const gchar* _tmp7_ = NULL; + const gchar* _tmp8_ = NULL; + const gchar* _tmp9_ = NULL; +#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 18932 "Commands.c" + const gchar* _tmp3_ = NULL; +#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 18938 "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 18966 "Commands.c" + const gchar* _tmp10_ = NULL; +#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 18972 "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 = reparent_tag_command_real_execute; +#line 1679 "/home/jens/Source/shotwell/src/Commands.vala" + ((CommandClass *) klass)->undo = reparent_tag_command_real_undo; +#line 1679 "/home/jens/Source/shotwell/src/Commands.vala" + G_OBJECT_CLASS (klass)->finalize = reparent_tag_command_finalize; +#line 18988 "Commands.c" +} + + +static void reparent_tag_command_instance_init (ReparentTagCommand * self) { + GeeHashSet* _tmp0_ = NULL; +#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, 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 19018 "Commands.c" +} + + +static void reparent_tag_command_finalize (GObject* obj) { + ReparentTagCommand * self; + LibraryPhotoSourceCollection* _tmp0_ = NULL; + guint _tmp1_ = 0U; + VideoSourceCollection* _tmp2_ = NULL; + guint _tmp3_ = 0U; +#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 19068 "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 19087 "Commands.c" +} + + +ModifyTagsCommand* modify_tags_command_construct (GType object_type, MediaSource* media, GeeCollection* new_tag_list) { + ModifyTagsCommand * self = NULL; + MediaSource* _tmp0_ = NULL; + MediaSource* _tmp1_ = NULL; + MediaSource* _tmp2_ = NULL; + GeeList* original_tags = NULL; + TagSourceCollection* _tmp3_ = NULL; + MediaSource* _tmp4_ = NULL; + GeeList* _tmp5_ = NULL; + GeeList* _tmp6_ = NULL; + GeeSortedSet* new_paths = NULL; + GeeTreeSet* _tmp23_ = NULL; +#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 19131 "Commands.c" + { + GeeList* _tag_list = NULL; + GeeList* _tmp7_ = NULL; + GeeList* _tmp8_ = NULL; + gint _tag_size = 0; + GeeList* _tmp9_ = NULL; + gint _tmp10_ = 0; + gint _tmp11_ = 0; + 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 19159 "Commands.c" + gint _tmp12_ = 0; + gint _tmp13_ = 0; + gint _tmp14_ = 0; + Tag* tag = NULL; + GeeList* _tmp15_ = NULL; + gint _tmp16_ = 0; + gpointer _tmp17_ = NULL; + SourceProxy* proxy = NULL; + Tag* _tmp18_ = NULL; + SourceProxy* _tmp19_ = NULL; + GeeArrayList* _tmp20_ = NULL; + SourceProxy* _tmp21_ = NULL; + SourceProxy* _tmp22_ = NULL; +#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 19185 "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 19215 "Commands.c" + } +#line 2151 "/home/jens/Source/shotwell/src/Commands.vala" + _g_object_unref0 (_tag_list); +#line 19219 "Commands.c" + } + } +#line 2160 "/home/jens/Source/shotwell/src/Commands.vala" + _tmp23_ = gee_tree_set_new (G_TYPE_STRING, (GBoxedCopyFunc) g_strdup, 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 19226 "Commands.c" + { + GeeIterator* _new_tag_it = NULL; + GeeCollection* _tmp24_ = NULL; + GeeIterator* _tmp25_ = NULL; +#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 19239 "Commands.c" + GeeIterator* _tmp26_ = NULL; + gboolean _tmp27_ = FALSE; + Tag* new_tag = NULL; + GeeIterator* _tmp28_ = NULL; + gpointer _tmp29_ = NULL; + gchar* new_tag_path = NULL; + Tag* _tmp30_ = NULL; + gchar* _tmp31_ = NULL; + GeeSortedSet* _tmp32_ = NULL; + const gchar* _tmp33_ = NULL; + GeeSortedSet* _tmp34_ = NULL; + const gchar* _tmp35_ = NULL; + GeeList* _tmp36_ = NULL; + GeeList* _tmp37_ = NULL; +#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 19262 "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 19298 "Commands.c" + } +#line 2161 "/home/jens/Source/shotwell/src/Commands.vala" + _g_object_unref0 (_new_tag_it); +#line 19302 "Commands.c" + } + { + GeeIterator* _path_it = NULL; + GeeSortedSet* _tmp38_ = NULL; + GeeIterator* _tmp39_ = NULL; +#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 19316 "Commands.c" + GeeIterator* _tmp40_ = NULL; + gboolean _tmp41_ = FALSE; + gchar* path = NULL; + GeeIterator* _tmp42_ = NULL; + gpointer _tmp43_ = NULL; + TagSourceCollection* _tmp44_ = NULL; + const gchar* _tmp45_ = NULL; + gboolean _tmp46_ = FALSE; + SourceProxy* proxy = NULL; + const gchar* _tmp47_ = NULL; + Tag* _tmp48_ = NULL; + Tag* _tmp49_ = NULL; + SourceProxy* _tmp50_ = NULL; + SourceProxy* _tmp51_ = NULL; + GeeArrayList* _tmp52_ = NULL; + SourceProxy* _tmp53_ = NULL; + SourceProxy* _tmp54_ = NULL; +#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 19342 "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 19386 "Commands.c" + } +#line 2168 "/home/jens/Source/shotwell/src/Commands.vala" + _g_object_unref0 (_path_it); +#line 19390 "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 19398 "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 19405 "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 19413 "Commands.c" + { + GeeArrayList* _proxy_list = NULL; + GeeArrayList* _tmp0_ = NULL; + GeeArrayList* _tmp1_ = NULL; + gint _proxy_size = 0; + GeeArrayList* _tmp2_ = NULL; + gint _tmp3_ = 0; + gint _tmp4_ = 0; + 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_COLLECTION, GeeCollection)); +#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 19441 "Commands.c" + gint _tmp5_ = 0; + gint _tmp6_ = 0; + gint _tmp7_ = 0; + SourceProxy* proxy = NULL; + GeeArrayList* _tmp8_ = NULL; + gint _tmp9_ = 0; + gpointer _tmp10_ = NULL; + SourceProxy* _tmp11_ = NULL; + DataSource* _tmp12_ = NULL; + Tag* _tmp13_ = NULL; + MediaSource* _tmp14_ = NULL; + GeeList* _tmp15_ = NULL; + GeeList* _tmp16_ = NULL; +#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 19467 "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 19495 "Commands.c" + } +#line 2186 "/home/jens/Source/shotwell/src/Commands.vala" + _g_object_unref0 (_proxy_list); +#line 19499 "Commands.c" + } + { + GeeArrayList* _proxy_list = NULL; + GeeArrayList* _tmp17_ = NULL; + GeeArrayList* _tmp18_ = NULL; + gint _proxy_size = 0; + GeeArrayList* _tmp19_ = NULL; + gint _tmp20_ = 0; + gint _tmp21_ = 0; + 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_COLLECTION, GeeCollection)); +#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 19528 "Commands.c" + gint _tmp22_ = 0; + gint _tmp23_ = 0; + gint _tmp24_ = 0; + SourceProxy* proxy = NULL; + GeeArrayList* _tmp25_ = NULL; + gint _tmp26_ = 0; + gpointer _tmp27_ = NULL; + SourceProxy* _tmp28_ = NULL; + DataSource* _tmp29_ = NULL; + Tag* _tmp30_ = NULL; + MediaSource* _tmp31_ = NULL; +#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 19552 "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 19576 "Commands.c" + } +#line 2189 "/home/jens/Source/shotwell/src/Commands.vala" + _g_object_unref0 (_proxy_list); +#line 19580 "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 19589 "Commands.c" + { + GeeArrayList* _proxy_list = NULL; + GeeArrayList* _tmp0_ = NULL; + GeeArrayList* _tmp1_ = NULL; + gint _proxy_size = 0; + GeeArrayList* _tmp2_ = NULL; + gint _tmp3_ = 0; + gint _tmp4_ = 0; + 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_COLLECTION, GeeCollection)); +#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 19617 "Commands.c" + gint _tmp5_ = 0; + gint _tmp6_ = 0; + gint _tmp7_ = 0; + SourceProxy* proxy = NULL; + GeeArrayList* _tmp8_ = NULL; + gint _tmp9_ = 0; + gpointer _tmp10_ = NULL; + SourceProxy* _tmp11_ = NULL; + DataSource* _tmp12_ = NULL; + Tag* _tmp13_ = NULL; + MediaSource* _tmp14_ = NULL; + GeeList* _tmp15_ = NULL; + GeeList* _tmp16_ = NULL; +#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 19643 "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 19671 "Commands.c" + } +#line 2194 "/home/jens/Source/shotwell/src/Commands.vala" + _g_object_unref0 (_proxy_list); +#line 19675 "Commands.c" + } + { + GeeArrayList* _proxy_list = NULL; + GeeArrayList* _tmp17_ = NULL; + GeeArrayList* _tmp18_ = NULL; + gint _proxy_size = 0; + GeeArrayList* _tmp19_ = NULL; + gint _tmp20_ = 0; + gint _tmp21_ = 0; + 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_COLLECTION, GeeCollection)); +#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 19704 "Commands.c" + gint _tmp22_ = 0; + gint _tmp23_ = 0; + gint _tmp24_ = 0; + SourceProxy* proxy = NULL; + GeeArrayList* _tmp25_ = NULL; + gint _tmp26_ = 0; + gpointer _tmp27_ = NULL; + SourceProxy* _tmp28_ = NULL; + DataSource* _tmp29_ = NULL; + Tag* _tmp30_ = NULL; + MediaSource* _tmp31_ = NULL; +#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 19728 "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 19752 "Commands.c" + } +#line 2197 "/home/jens/Source/shotwell/src/Commands.vala" + _g_object_unref0 (_proxy_list); +#line 19756 "Commands.c" + } +} + + +static void modify_tags_command_on_proxy_broken (ModifyTagsCommand* self) { + CommandManager* _tmp0_ = NULL; + CommandManager* _tmp1_ = NULL; +#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 19774 "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 = modify_tags_command_real_execute; +#line 2138 "/home/jens/Source/shotwell/src/Commands.vala" + ((CommandClass *) klass)->undo = modify_tags_command_real_undo; +#line 2138 "/home/jens/Source/shotwell/src/Commands.vala" + G_OBJECT_CLASS (klass)->finalize = modify_tags_command_finalize; +#line 19789 "Commands.c" +} + + +static void modify_tags_command_instance_init (ModifyTagsCommand * self) { + GeeArrayList* _tmp0_ = NULL; + GeeArrayList* _tmp1_ = NULL; +#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, 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, source_proxy_unref, NULL, NULL, NULL); +#line 2141 "/home/jens/Source/shotwell/src/Commands.vala" + self->priv->to_remove = _tmp1_; +#line 19806 "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 19814 "Commands.c" + { + GeeArrayList* _proxy_list = NULL; + GeeArrayList* _tmp0_ = NULL; + GeeArrayList* _tmp1_ = NULL; + gint _proxy_size = 0; + GeeArrayList* _tmp2_ = NULL; + gint _tmp3_ = 0; + gint _tmp4_ = 0; + 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_COLLECTION, GeeCollection)); +#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 19842 "Commands.c" + gint _tmp5_ = 0; + gint _tmp6_ = 0; + gint _tmp7_ = 0; + SourceProxy* proxy = NULL; + GeeArrayList* _tmp8_ = NULL; + gint _tmp9_ = 0; + gpointer _tmp10_ = NULL; + SourceProxy* _tmp11_ = NULL; + guint _tmp12_ = 0U; +#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 19864 "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 19882 "Commands.c" + } +#line 2178 "/home/jens/Source/shotwell/src/Commands.vala" + _g_object_unref0 (_proxy_list); +#line 19886 "Commands.c" + } + { + GeeArrayList* _proxy_list = NULL; + GeeArrayList* _tmp13_ = NULL; + GeeArrayList* _tmp14_ = NULL; + gint _proxy_size = 0; + GeeArrayList* _tmp15_ = NULL; + gint _tmp16_ = 0; + gint _tmp17_ = 0; + 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_COLLECTION, GeeCollection)); +#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 19915 "Commands.c" + gint _tmp18_ = 0; + gint _tmp19_ = 0; + gint _tmp20_ = 0; + SourceProxy* proxy = NULL; + GeeArrayList* _tmp21_ = NULL; + gint _tmp22_ = 0; + gpointer _tmp23_ = NULL; + SourceProxy* _tmp24_ = NULL; + guint _tmp25_ = 0U; +#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 19937 "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 19955 "Commands.c" + } +#line 2181 "/home/jens/Source/shotwell/src/Commands.vala" + _g_object_unref0 (_proxy_list); +#line 19959 "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 19969 "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 19988 "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_ = FALSE; + Tag* _tmp12_ = NULL; + Tag* _tmp13_ = NULL; + gchar* _tmp14_ = NULL; + gchar* _tmp15_ = NULL; + GeeCollection* _tmp16_ = NULL; + GeeCollection* _tmp17_ = NULL; + gboolean _tmp18_ = FALSE; + LibraryPhotoSourceCollection* _tmp19_ = NULL; + VideoSourceCollection* _tmp20_ = NULL; +#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 20013 "Commands.c" + Tag* _tmp2_ = NULL; + gchar* _tmp3_ = NULL; + gchar* _tmp4_ = NULL; + gint _tmp5_ = 0; + gchar* _tmp6_ = NULL; +#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 20035 "Commands.c" + } else { + Tag* _tmp7_ = NULL; + gchar* _tmp8_ = NULL; + gchar* _tmp9_ = NULL; + gint _tmp10_ = 0; + gchar* _tmp11_ = NULL; +#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 20058 "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 20096 "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 20103 "Commands.c" +} + + +static void tag_untag_photos_command_real_execute_on_source (SimpleProxyableCommand* base, DataSource* source) { + TagUntagPhotosCommand * self; + gboolean _tmp0_ = FALSE; +#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 20118 "Commands.c" + DataSource* _tmp1_ = NULL; +#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 20124 "Commands.c" + } else { + DataSource* _tmp2_ = NULL; +#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 20131 "Commands.c" + } +} + + +static void tag_untag_photos_command_real_undo_on_source (SimpleProxyableCommand* base, DataSource* source) { + TagUntagPhotosCommand * self; + gboolean _tmp0_ = FALSE; +#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 20147 "Commands.c" + DataSource* _tmp1_ = NULL; +#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 20153 "Commands.c" + } else { + DataSource* _tmp2_ = NULL; +#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 20160 "Commands.c" + } +} + + +static void tag_untag_photos_command_do_attach (TagUntagPhotosCommand* self, Tag* tag) { + GeeMultiMap* _tmp0_ = NULL; +#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 20175 "Commands.c" + Tag* _tmp1_ = NULL; + GeeCollection* _tmp2_ = NULL; + GeeArrayList* _tmp3_ = NULL; + Tag* curr_tmp = NULL; + Tag* _tmp4_ = NULL; + Tag* _tmp5_ = NULL; +#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, 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 20202 "Commands.c" + Tag* _tmp6_ = NULL; + GeeList* _tmp7_ = NULL; + Tag* _tmp8_ = NULL; + Tag* _tmp9_ = NULL; + Tag* _tmp10_ = NULL; +#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 20214 "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 20230 "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 20236 "Commands.c" + } + { + GeeIterator* _detached_tag_it = NULL; + GeeMultiMap* _tmp11_ = NULL; + GeeMultiSet* _tmp12_ = NULL; + GeeMultiSet* _tmp13_ = NULL; + GeeIterator* _tmp14_ = NULL; + GeeIterator* _tmp15_ = NULL; +#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 20261 "Commands.c" + GeeIterator* _tmp16_ = NULL; + gboolean _tmp17_ = FALSE; + Tag* detached_tag = NULL; + GeeIterator* _tmp18_ = NULL; + gpointer _tmp19_ = NULL; + Tag* _tmp20_ = NULL; + GeeMultiMap* _tmp21_ = NULL; + Tag* _tmp22_ = NULL; + GeeCollection* _tmp23_ = NULL; + GeeCollection* _tmp24_ = NULL; +#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 20280 "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 20304 "Commands.c" + } +#line 2262 "/home/jens/Source/shotwell/src/Commands.vala" + _g_object_unref0 (_detached_tag_it); +#line 20308 "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 20316 "Commands.c" +} + + +static void tag_untag_photos_command_do_detach (TagUntagPhotosCommand* self, Tag* tag) { + GeeList* _tmp0_ = NULL; +#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 20330 "Commands.c" + Tag* _tmp1_ = NULL; + GeeCollection* _tmp2_ = NULL; + GeeMultiMap* _tmp3_ = NULL; + GeeMultiMap* _tmp4_ = NULL; + GeeSet* _tmp5_ = NULL; + GeeSet* _tmp6_ = NULL; +#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 20357 "Commands.c" + } else { + { + GeeList* _t_list = NULL; + GeeList* _tmp7_ = NULL; + GeeList* _tmp8_ = NULL; + gint _t_size = 0; + GeeList* _tmp9_ = NULL; + gint _tmp10_ = 0; + gint _tmp11_ = 0; + 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 20386 "Commands.c" + gint _tmp12_ = 0; + gint _tmp13_ = 0; + gint _tmp14_ = 0; + Tag* t = NULL; + GeeList* _tmp15_ = NULL; + gint _tmp16_ = 0; + gpointer _tmp17_ = NULL; +#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 20406 "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 20416 "Commands.c" + { + GeeIterator* _ms_it = NULL; + GeeCollection* _tmp18_ = NULL; + GeeIterator* _tmp19_ = NULL; +#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 20429 "Commands.c" + GeeIterator* _tmp20_ = NULL; + gboolean _tmp21_ = FALSE; + MediaSource* ms = NULL; + GeeIterator* _tmp22_ = NULL; + gpointer _tmp23_ = NULL; + Tag* _tmp24_ = NULL; + MediaSource* _tmp25_ = NULL; + gint _tmp26_ = 0; +#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 20446 "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 20462 "Commands.c" + Tag* _tmp27_ = NULL; + MediaSource* _tmp28_ = NULL; + GeeList* _tmp29_ = NULL; + GeeList* _tmp30_ = NULL; +#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 20477 "Commands.c" + } +#line 2281 "/home/jens/Source/shotwell/src/Commands.vala" + _g_object_unref0 (ms); +#line 20481 "Commands.c" + } +#line 2281 "/home/jens/Source/shotwell/src/Commands.vala" + _g_object_unref0 (_ms_it); +#line 20485 "Commands.c" + } +#line 2280 "/home/jens/Source/shotwell/src/Commands.vala" + _g_object_unref0 (t); +#line 20489 "Commands.c" + } +#line 2280 "/home/jens/Source/shotwell/src/Commands.vala" + _g_object_unref0 (_t_list); +#line 20493 "Commands.c" + } + } +} + + +static void tag_untag_photos_command_on_source_destroyed (TagUntagPhotosCommand* self, DataSource* source) { + DataSource* _tmp0_ = NULL; + gchar* _tmp1_ = NULL; + gchar* _tmp2_ = NULL; + GeeCollection* _tmp3_ = NULL; + DataSource* _tmp4_ = NULL; + gboolean _tmp5_ = FALSE; +#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 20528 "Commands.c" + CommandManager* _tmp6_ = NULL; + CommandManager* _tmp7_ = NULL; +#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 20539 "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 = tag_untag_photos_command_real_execute_on_source; +#line 2206 "/home/jens/Source/shotwell/src/Commands.vala" + ((SimpleProxyableCommandClass *) klass)->undo_on_source = 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 20555 "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 20566 "Commands.c" +} + + +static void tag_untag_photos_command_finalize (GObject* obj) { + TagUntagPhotosCommand * self; + LibraryPhotoSourceCollection* _tmp0_ = NULL; + guint _tmp1_ = 0U; + VideoSourceCollection* _tmp2_ = NULL; + guint _tmp3_ = 0U; +#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 20598 "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_ = NULL; + SavedSearch* _tmp1_ = NULL; + gchar* _tmp2_ = NULL; + gchar* _tmp3_ = NULL; + const gchar* _tmp4_ = NULL; + gchar* _tmp5_ = NULL; + gchar* _tmp6_ = NULL; + SavedSearch* _tmp7_ = NULL; + gchar* _tmp8_ = NULL; + gchar* _tmp9_ = NULL; + SavedSearch* _tmp10_ = NULL; + SavedSearch* _tmp11_ = NULL; + SavedSearch* _tmp12_ = NULL; + gchar* _tmp13_ = NULL; + const gchar* _tmp14_ = NULL; + gchar* _tmp15_ = NULL; +#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 20690 "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 20697 "Commands.c" +} + + +static void rename_saved_search_command_real_execute (Command* base) { + RenameSavedSearchCommand * self; + SavedSearch* _tmp0_ = NULL; + const gchar* _tmp1_ = NULL; + gboolean _tmp2_ = FALSE; +#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 20716 "Commands.c" + const gchar* _tmp3_ = NULL; + gchar* _tmp4_ = NULL; + gchar* _tmp5_ = NULL; +#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 20730 "Commands.c" + } +} + + +static void rename_saved_search_command_real_undo (Command* base) { + RenameSavedSearchCommand * self; + SavedSearch* _tmp0_ = NULL; + const gchar* _tmp1_ = NULL; + gboolean _tmp2_ = FALSE; +#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 20750 "Commands.c" + const gchar* _tmp3_ = NULL; + gchar* _tmp4_ = NULL; + gchar* _tmp5_ = NULL; +#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 20764 "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 = rename_saved_search_command_real_execute; +#line 2299 "/home/jens/Source/shotwell/src/Commands.vala" + ((CommandClass *) klass)->undo = 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 20780 "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 20787 "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 20803 "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_ = NULL; + SavedSearch* _tmp1_ = NULL; + gchar* _tmp2_ = NULL; + gchar* _tmp3_ = NULL; + gchar* _tmp4_ = NULL; + gchar* _tmp5_ = NULL; + SavedSearch* _tmp6_ = NULL; + gchar* _tmp7_ = NULL; + gchar* _tmp8_ = NULL; + SavedSearch* _tmp9_ = NULL; + SavedSearch* _tmp10_ = NULL; +#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 20870 "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 20877 "Commands.c" +} + + +static void delete_saved_search_command_real_execute (Command* base) { + DeleteSavedSearchCommand * self; + SavedSearchTable* _tmp0_ = NULL; + SavedSearchTable* _tmp1_ = NULL; + SavedSearch* _tmp2_ = NULL; +#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 20898 "Commands.c" +} + + +static void delete_saved_search_command_real_undo (Command* base) { + DeleteSavedSearchCommand * self; + SavedSearch* _tmp0_ = NULL; +#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 20911 "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 = delete_saved_search_command_real_execute; +#line 2323 "/home/jens/Source/shotwell/src/Commands.vala" + ((CommandClass *) klass)->undo = 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 20926 "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 20933 "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 20945 "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 20964 "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_ = FALSE; + const gchar* _tmp4_ = NULL; + gboolean _tmp5_ = FALSE; + GeeCollection* _tmp8_ = NULL; + GeeCollection* _tmp9_ = NULL; + gboolean _tmp10_ = FALSE; + LibraryPhotoSourceCollection* _tmp11_ = NULL; + VideoSourceCollection* _tmp12_ = NULL; +#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 20985 "Commands.c" + const gchar* _tmp2_ = NULL; +#line 2347 "/home/jens/Source/shotwell/src/Commands.vala" + _tmp2_ = _ ("Move Photos to Trash"); +#line 2347 "/home/jens/Source/shotwell/src/Commands.vala" + _tmp0_ = _tmp2_; +#line 20991 "Commands.c" + } else { + const gchar* _tmp3_ = NULL; +#line 2347 "/home/jens/Source/shotwell/src/Commands.vala" + _tmp3_ = _ ("Restore Photos from Trash"); +#line 2347 "/home/jens/Source/shotwell/src/Commands.vala" + _tmp0_ = _tmp3_; +#line 20998 "Commands.c" + } +#line 2348 "/home/jens/Source/shotwell/src/Commands.vala" + _tmp5_ = to_trash; +#line 2348 "/home/jens/Source/shotwell/src/Commands.vala" + if (_tmp5_) { +#line 21004 "Commands.c" + const gchar* _tmp6_ = NULL; +#line 2348 "/home/jens/Source/shotwell/src/Commands.vala" + _tmp6_ = _ ("Move the photos to the Shotwell trash"); +#line 2348 "/home/jens/Source/shotwell/src/Commands.vala" + _tmp4_ = _tmp6_; +#line 21010 "Commands.c" + } else { + const gchar* _tmp7_ = NULL; +#line 2348 "/home/jens/Source/shotwell/src/Commands.vala" + _tmp7_ = _ ("Restore the photos back to the Shotwell library"); +#line 2348 "/home/jens/Source/shotwell/src/Commands.vala" + _tmp4_ = _tmp7_; +#line 21017 "Commands.c" + } +#line 2346 "/home/jens/Source/shotwell/src/Commands.vala" + self = (TrashUntrashPhotosCommand*) page_command_construct (object_type, _tmp0_, _tmp4_); +#line 2350 "/home/jens/Source/shotwell/src/Commands.vala" + _tmp8_ = sources; +#line 2350 "/home/jens/Source/shotwell/src/Commands.vala" + _tmp9_ = _g_object_ref0 (_tmp8_); +#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 = _tmp9_; +#line 2351 "/home/jens/Source/shotwell/src/Commands.vala" + _tmp10_ = to_trash; +#line 2351 "/home/jens/Source/shotwell/src/Commands.vala" + self->priv->to_trash = _tmp10_; +#line 2353 "/home/jens/Source/shotwell/src/Commands.vala" + _tmp11_ = library_photo_global; +#line 2353 "/home/jens/Source/shotwell/src/Commands.vala" + g_signal_connect_object (G_TYPE_CHECK_INSTANCE_CAST (_tmp11_, 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" + _tmp12_ = video_global; +#line 2354 "/home/jens/Source/shotwell/src/Commands.vala" + g_signal_connect_object (G_TYPE_CHECK_INSTANCE_CAST (_tmp12_, 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 21043 "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 21050 "Commands.c" +} + + +static ProgressDialog* trash_untrash_photos_command_get_progress_dialog (TrashUntrashPhotosCommand* self, gboolean to_trash) { + ProgressDialog* result = NULL; + GeeCollection* _tmp0_ = NULL; + gint _tmp1_ = 0; + gint _tmp2_ = 0; + const gchar* _tmp3_ = NULL; + gboolean _tmp4_ = FALSE; + ProgressDialog* dialog = NULL; + AppWindow* _tmp7_ = NULL; + AppWindow* _tmp8_ = NULL; + ProgressDialog* _tmp9_ = NULL; + ProgressDialog* _tmp10_ = NULL; + ProgressDialog* _tmp11_ = NULL; + GeeCollection* _tmp12_ = NULL; + gint _tmp13_ = 0; + gint _tmp14_ = 0; + gint _tmp15_ = 0; +#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 21085 "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 21091 "Commands.c" + const gchar* _tmp5_ = NULL; +#line 2367 "/home/jens/Source/shotwell/src/Commands.vala" + _tmp5_ = _ ("Moving Photos to Trash"); +#line 2367 "/home/jens/Source/shotwell/src/Commands.vala" + _tmp3_ = _tmp5_; +#line 21097 "Commands.c" + } else { + const gchar* _tmp6_ = NULL; +#line 2367 "/home/jens/Source/shotwell/src/Commands.vala" + _tmp6_ = _ ("Restoring Photos From Trash"); +#line 2367 "/home/jens/Source/shotwell/src/Commands.vala" + _tmp3_ = _tmp6_; +#line 21104 "Commands.c" + } +#line 2366 "/home/jens/Source/shotwell/src/Commands.vala" + _tmp7_ = app_window_get_instance (); +#line 2366 "/home/jens/Source/shotwell/src/Commands.vala" + _tmp8_ = _tmp7_; +#line 2366 "/home/jens/Source/shotwell/src/Commands.vala" + _tmp9_ = progress_dialog_new (G_TYPE_CHECK_INSTANCE_CAST (_tmp8_, gtk_window_get_type (), GtkWindow), _tmp3_, NULL); +#line 2366 "/home/jens/Source/shotwell/src/Commands.vala" + g_object_ref_sink (_tmp9_); +#line 2366 "/home/jens/Source/shotwell/src/Commands.vala" + _tmp10_ = _tmp9_; +#line 2366 "/home/jens/Source/shotwell/src/Commands.vala" + _g_object_unref0 (_tmp8_); +#line 2366 "/home/jens/Source/shotwell/src/Commands.vala" + dialog = _tmp10_; +#line 2368 "/home/jens/Source/shotwell/src/Commands.vala" + _tmp11_ = dialog; +#line 2368 "/home/jens/Source/shotwell/src/Commands.vala" + _tmp12_ = self->priv->sources; +#line 2368 "/home/jens/Source/shotwell/src/Commands.vala" + _tmp13_ = gee_collection_get_size (_tmp12_); +#line 2368 "/home/jens/Source/shotwell/src/Commands.vala" + _tmp14_ = _tmp13_; +#line 2368 "/home/jens/Source/shotwell/src/Commands.vala" + _tmp15_ = CLAMP (_tmp14_ / 5, 2, 10); +#line 2368 "/home/jens/Source/shotwell/src/Commands.vala" + progress_dialog_update_display_every (_tmp11_, _tmp15_); +#line 2370 "/home/jens/Source/shotwell/src/Commands.vala" + result = dialog; +#line 2370 "/home/jens/Source/shotwell/src/Commands.vala" + return result; +#line 21136 "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 21145 "Commands.c" +} + + +static void trash_untrash_photos_command_real_execute (Command* base) { + TrashUntrashPhotosCommand * self; + ProgressDialog* dialog = NULL; + gboolean _tmp0_ = FALSE; + ProgressDialog* _tmp1_ = NULL; + ProgressMonitor monitor = NULL; + void* monitor_target = NULL; + GDestroyNotify monitor_target_destroy_notify = NULL; + ProgressDialog* _tmp2_ = NULL; + gboolean _tmp4_ = FALSE; + ProgressDialog* _tmp7_ = NULL; +#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 21178 "Commands.c" + ProgressDialog* _tmp3_ = NULL; +#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 21196 "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 21202 "Commands.c" + ProgressMonitor _tmp5_ = NULL; + void* _tmp5__target = NULL; +#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 21211 "Commands.c" + } else { + ProgressMonitor _tmp6_ = NULL; + void* _tmp6__target = NULL; +#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 21221 "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 21227 "Commands.c" + ProgressDialog* _tmp8_ = NULL; +#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 21233 "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 21245 "Commands.c" +} + + +static void trash_untrash_photos_command_real_undo (Command* base) { + TrashUntrashPhotosCommand * self; + ProgressDialog* dialog = NULL; + gboolean _tmp0_ = FALSE; + ProgressDialog* _tmp1_ = NULL; + ProgressMonitor monitor = NULL; + void* monitor_target = NULL; + GDestroyNotify monitor_target_destroy_notify = NULL; + ProgressDialog* _tmp2_ = NULL; + gboolean _tmp4_ = FALSE; + ProgressDialog* _tmp7_ = NULL; +#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 21278 "Commands.c" + ProgressDialog* _tmp3_ = NULL; +#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 21296 "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 21302 "Commands.c" + ProgressMonitor _tmp5_ = NULL; + void* _tmp5__target = NULL; +#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 21311 "Commands.c" + } else { + ProgressMonitor _tmp6_ = NULL; + void* _tmp6__target = NULL; +#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 21321 "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 21327 "Commands.c" + ProgressDialog* _tmp8_ = NULL; +#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 21333 "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 21345 "Commands.c" +} + + +static void trash_untrash_photos_command_trash (TrashUntrashPhotosCommand* self, ProgressMonitor monitor, void* monitor_target) { + gint ctr = 0; + gint count = 0; + GeeCollection* _tmp0_ = NULL; + gint _tmp1_ = 0; + gint _tmp2_ = 0; + LibraryPhotoSourceCollection* _tmp3_ = NULL; + TransactionController* _tmp4_ = NULL; + TransactionController* _tmp5_ = NULL; + VideoSourceCollection* _tmp6_ = NULL; + TransactionController* _tmp7_ = NULL; + TransactionController* _tmp8_ = NULL; + LibraryPhotoSourceCollection* _tmp21_ = NULL; + TransactionController* _tmp22_ = NULL; + TransactionController* _tmp23_ = NULL; + VideoSourceCollection* _tmp24_ = NULL; + TransactionController* _tmp25_ = NULL; + TransactionController* _tmp26_ = NULL; +#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 21395 "Commands.c" + { + GeeIterator* _source_it = NULL; + GeeCollection* _tmp9_ = NULL; + GeeIterator* _tmp10_ = NULL; +#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 21408 "Commands.c" + GeeIterator* _tmp11_ = NULL; + gboolean _tmp12_ = FALSE; + MediaSource* source = NULL; + GeeIterator* _tmp13_ = NULL; + gpointer _tmp14_ = NULL; + MediaSource* _tmp15_ = NULL; + ProgressMonitor _tmp16_ = NULL; + void* _tmp16__target = NULL; +#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 21425 "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 21443 "Commands.c" + ProgressMonitor _tmp17_ = NULL; + void* _tmp17__target = NULL; + gint _tmp18_ = 0; + gint _tmp19_ = 0; + gint _tmp20_ = 0; +#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 21463 "Commands.c" + } +#line 2412 "/home/jens/Source/shotwell/src/Commands.vala" + _g_object_unref0 (source); +#line 21467 "Commands.c" + } +#line 2412 "/home/jens/Source/shotwell/src/Commands.vala" + _g_object_unref0 (_source_it); +#line 21471 "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 21489 "Commands.c" +} + + +static void trash_untrash_photos_command_untrash (TrashUntrashPhotosCommand* self, ProgressMonitor monitor, void* monitor_target) { + gint ctr = 0; + gint count = 0; + GeeCollection* _tmp0_ = NULL; + gint _tmp1_ = 0; + gint _tmp2_ = 0; + LibraryPhotoSourceCollection* _tmp3_ = NULL; + TransactionController* _tmp4_ = NULL; + TransactionController* _tmp5_ = NULL; + VideoSourceCollection* _tmp6_ = NULL; + TransactionController* _tmp7_ = NULL; + TransactionController* _tmp8_ = NULL; + LibraryPhotoSourceCollection* _tmp21_ = NULL; + TransactionController* _tmp22_ = NULL; + TransactionController* _tmp23_ = NULL; + VideoSourceCollection* _tmp24_ = NULL; + TransactionController* _tmp25_ = NULL; + TransactionController* _tmp26_ = NULL; +#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 21539 "Commands.c" + { + GeeIterator* _source_it = NULL; + GeeCollection* _tmp9_ = NULL; + GeeIterator* _tmp10_ = NULL; +#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 21552 "Commands.c" + GeeIterator* _tmp11_ = NULL; + gboolean _tmp12_ = FALSE; + MediaSource* source = NULL; + GeeIterator* _tmp13_ = NULL; + gpointer _tmp14_ = NULL; + MediaSource* _tmp15_ = NULL; + ProgressMonitor _tmp16_ = NULL; + void* _tmp16__target = NULL; +#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 21569 "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 21587 "Commands.c" + ProgressMonitor _tmp17_ = NULL; + void* _tmp17__target = NULL; + gint _tmp18_ = 0; + gint _tmp19_ = 0; + gint _tmp20_ = 0; +#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 21607 "Commands.c" + } +#line 2429 "/home/jens/Source/shotwell/src/Commands.vala" + _g_object_unref0 (source); +#line 21611 "Commands.c" + } +#line 2429 "/home/jens/Source/shotwell/src/Commands.vala" + _g_object_unref0 (_source_it); +#line 21615 "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 21633 "Commands.c" +} + + +static void trash_untrash_photos_command_on_photo_destroyed (TrashUntrashPhotosCommand* self, DataSource* source) { + GeeCollection* _tmp0_ = NULL; + DataSource* _tmp1_ = NULL; + GeeCollection* _tmp2_ = NULL; + gint _tmp3_ = 0; + gint _tmp4_ = 0; +#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 21661 "Commands.c" + CommandManager* _tmp5_ = NULL; + CommandManager* _tmp6_ = NULL; +#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 21672 "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 = trash_untrash_photos_command_real_execute; +#line 2341 "/home/jens/Source/shotwell/src/Commands.vala" + ((CommandClass *) klass)->undo = 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 21688 "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 21695 "Commands.c" +} + + +static void trash_untrash_photos_command_finalize (GObject* obj) { + TrashUntrashPhotosCommand * self; + LibraryPhotoSourceCollection* _tmp0_ = NULL; + guint _tmp1_ = 0U; + VideoSourceCollection* _tmp2_ = NULL; + guint _tmp3_ = 0U; +#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 21723 "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_ = FALSE; + const gchar* _tmp4_ = NULL; + gboolean _tmp5_ = FALSE; + GeeCollection* _tmp6_ = NULL; + gboolean _tmp7_ = FALSE; + GeeCollection* _tmp8_ = NULL; + gint _tmp9_ = 0; + gint _tmp10_ = 0; +#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 21756 "Commands.c" + const gchar* _tmp2_ = NULL; +#line 2463 "/home/jens/Source/shotwell/src/Commands.vala" + _tmp2_ = _ ("Flag"); +#line 2463 "/home/jens/Source/shotwell/src/Commands.vala" + _tmp0_ = _tmp2_; +#line 21762 "Commands.c" + } else { + const gchar* _tmp3_ = NULL; +#line 2463 "/home/jens/Source/shotwell/src/Commands.vala" + _tmp3_ = _ ("Unflag"); +#line 2463 "/home/jens/Source/shotwell/src/Commands.vala" + _tmp0_ = _tmp3_; +#line 21769 "Commands.c" + } +#line 2464 "/home/jens/Source/shotwell/src/Commands.vala" + _tmp5_ = flag; +#line 2464 "/home/jens/Source/shotwell/src/Commands.vala" + if (_tmp5_) { +#line 2464 "/home/jens/Source/shotwell/src/Commands.vala" + _tmp4_ = FLAG_UNFLAG_COMMAND_FLAG_SELECTED_STRING; +#line 21777 "Commands.c" + } else { +#line 2464 "/home/jens/Source/shotwell/src/Commands.vala" + _tmp4_ = FLAG_UNFLAG_COMMAND_UNFLAG_SELECTED_STRING; +#line 21781 "Commands.c" + } +#line 2462 "/home/jens/Source/shotwell/src/Commands.vala" + _tmp6_ = sources; +#line 2462 "/home/jens/Source/shotwell/src/Commands.vala" + self = (FlagUnflagCommand*) multiple_data_source_at_once_command_construct (object_type, _tmp6_, _tmp0_, _tmp4_); +#line 2466 "/home/jens/Source/shotwell/src/Commands.vala" + _tmp7_ = flag; +#line 2466 "/home/jens/Source/shotwell/src/Commands.vala" + self->priv->flag = _tmp7_; +#line 2468 "/home/jens/Source/shotwell/src/Commands.vala" + _tmp8_ = sources; +#line 2468 "/home/jens/Source/shotwell/src/Commands.vala" + _tmp9_ = gee_collection_get_size (_tmp8_); +#line 2468 "/home/jens/Source/shotwell/src/Commands.vala" + _tmp10_ = _tmp9_; +#line 2468 "/home/jens/Source/shotwell/src/Commands.vala" + if (_tmp10_ >= FLAG_UNFLAG_COMMAND_MIN_PROGRESS_BAR_THRESHOLD) { +#line 21799 "Commands.c" + const gchar* _tmp11_ = NULL; + gboolean _tmp12_ = FALSE; + ProgressDialog* _tmp13_ = NULL; + ProgressDialog* _tmp14_ = NULL; +#line 2470 "/home/jens/Source/shotwell/src/Commands.vala" + _tmp12_ = flag; +#line 2470 "/home/jens/Source/shotwell/src/Commands.vala" + if (_tmp12_) { +#line 2470 "/home/jens/Source/shotwell/src/Commands.vala" + _tmp11_ = FLAG_UNFLAG_COMMAND_FLAG_PROGRESS; +#line 21810 "Commands.c" + } else { +#line 2470 "/home/jens/Source/shotwell/src/Commands.vala" + _tmp11_ = FLAG_UNFLAG_COMMAND_UNFLAG_PROGRESS; +#line 21814 "Commands.c" + } +#line 2469 "/home/jens/Source/shotwell/src/Commands.vala" + _tmp13_ = progress_dialog_new (NULL, _tmp11_, NULL); +#line 2469 "/home/jens/Source/shotwell/src/Commands.vala" + g_object_ref_sink (_tmp13_); +#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 = _tmp13_; +#line 2472 "/home/jens/Source/shotwell/src/Commands.vala" + _tmp14_ = self->priv->progress_dialog; +#line 2472 "/home/jens/Source/shotwell/src/Commands.vala" + gtk_widget_show_all (G_TYPE_CHECK_INSTANCE_CAST (_tmp14_, gtk_widget_get_type (), GtkWidget)); +#line 21828 "Commands.c" + } +#line 2461 "/home/jens/Source/shotwell/src/Commands.vala" + return self; +#line 21832 "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 21839 "Commands.c" +} + + +static void flag_unflag_command_real_execute_on_all (MultipleDataSourceAtOnceCommand* base, GeeCollection* sources) { + FlagUnflagCommand * self; + gint num_processed = 0; + ProgressDialog* _tmp16_ = NULL; +#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 21853 "Commands.c" + { + GeeIterator* _source_it = NULL; + GeeCollection* _tmp0_ = NULL; + GeeIterator* _tmp1_ = NULL; +#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 21866 "Commands.c" + GeeIterator* _tmp2_ = NULL; + gboolean _tmp3_ = FALSE; + DataSource* source = NULL; + GeeIterator* _tmp4_ = NULL; + gpointer _tmp5_ = NULL; + DataSource* _tmp6_ = NULL; + gboolean _tmp7_ = FALSE; + gint _tmp8_ = 0; + ProgressDialog* _tmp9_ = NULL; +#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 21884 "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 21906 "Commands.c" + ProgressDialog* _tmp10_ = NULL; + gint _tmp11_ = 0; + GeeCollection* _tmp12_ = NULL; + gint _tmp13_ = 0; + gint _tmp14_ = 0; + ProgressDialog* _tmp15_ = NULL; +#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 21931 "Commands.c" + } +#line 2479 "/home/jens/Source/shotwell/src/Commands.vala" + _g_object_unref0 (source); +#line 21935 "Commands.c" + } +#line 2479 "/home/jens/Source/shotwell/src/Commands.vala" + _g_object_unref0 (_source_it); +#line 21939 "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 21945 "Commands.c" + ProgressDialog* _tmp17_ = NULL; +#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 21951 "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 21962 "Commands.c" + { + GeeIterator* _source_it = NULL; + GeeCollection* _tmp0_ = NULL; + GeeIterator* _tmp1_ = NULL; +#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 21975 "Commands.c" + GeeIterator* _tmp2_ = NULL; + gboolean _tmp3_ = FALSE; + DataSource* source = NULL; + GeeIterator* _tmp4_ = NULL; + gpointer _tmp5_ = NULL; + DataSource* _tmp6_ = NULL; + gboolean _tmp7_ = FALSE; +#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 21991 "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 22007 "Commands.c" + } +#line 2496 "/home/jens/Source/shotwell/src/Commands.vala" + _g_object_unref0 (_source_it); +#line 22011 "Commands.c" + } +} + + +static void flag_unflag_command_flag_unflag (FlagUnflagCommand* self, DataSource* source, gboolean flag) { + Flaggable* flaggable = NULL; + DataSource* _tmp0_ = NULL; + Flaggable* _tmp1_ = NULL; + Flaggable* _tmp2_ = NULL; +#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 22035 "Commands.c" + gboolean _tmp3_ = FALSE; +#line 2503 "/home/jens/Source/shotwell/src/Commands.vala" + _tmp3_ = flag; +#line 2503 "/home/jens/Source/shotwell/src/Commands.vala" + if (_tmp3_) { +#line 22041 "Commands.c" + Flaggable* _tmp4_ = NULL; +#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 22047 "Commands.c" + } else { + Flaggable* _tmp5_ = NULL; +#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 22054 "Commands.c" + } + } +#line 2500 "/home/jens/Source/shotwell/src/Commands.vala" + _g_object_unref0 (flaggable); +#line 22059 "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 = flag_unflag_command_real_execute_on_all; +#line 2451 "/home/jens/Source/shotwell/src/Commands.vala" + ((MultipleDataSourceAtOnceCommandClass *) klass)->undo_on_all = 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 22074 "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 22083 "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 22095 "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; +} + + + |