diff options
author | Jörg Frings-Fürst <debian@jff.email> | 2018-09-30 14:09:32 +0200 |
---|---|---|
committer | Jörg Frings-Fürst <debian@jff.email> | 2018-09-30 14:09:32 +0200 |
commit | 0537caaf4af94a9ead8b292679f6b34c90b55e06 (patch) | |
tree | 6761cfdf959926be7af3147cf770e7f253390fe8 /src/Commands.c | |
parent | eca5837e235a356c8db9416bbbc13577db3e6f76 (diff) | |
parent | 5e9f4eea451a77ba3b93db3747841ed2bd969e9f (diff) |
Update upstream source from tag 'upstream/0.30.1'
Update to upstream version '0.30.1'
with Debian dir dc242531effff8d9c6fab093414edee28b403c6a
Diffstat (limited to 'src/Commands.c')
-rw-r--r-- | src/Commands.c | 22414 |
1 files changed, 0 insertions, 22414 deletions
diff --git a/src/Commands.c b/src/Commands.c deleted file mode 100644 index 9bbd51a..0000000 --- a/src/Commands.c +++ /dev/null @@ -1,22414 +0,0 @@ -/* Commands.c generated by valac 0.40.4, 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 "shotwell-graphics-processor.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; -enum { - PAGE_COMMAND_0_PROPERTY, - PAGE_COMMAND_NUM_PROPERTIES -}; -static GParamSpec* page_command_properties[PAGE_COMMAND_NUM_PROPERTIES]; -#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; -enum { - SINGLE_DATA_SOURCE_COMMAND_0_PROPERTY, - SINGLE_DATA_SOURCE_COMMAND_NUM_PROPERTIES -}; -static GParamSpec* single_data_source_command_properties[SINGLE_DATA_SOURCE_COMMAND_NUM_PROPERTIES]; - -#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; -enum { - SIMPLE_PROXYABLE_COMMAND_0_PROPERTY, - SIMPLE_PROXYABLE_COMMAND_NUM_PROPERTIES -}; -static GParamSpec* simple_proxyable_command_properties[SIMPLE_PROXYABLE_COMMAND_NUM_PROPERTIES]; -#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; -enum { - SINGLE_PHOTO_TRANSFORMATION_COMMAND_0_PROPERTY, - SINGLE_PHOTO_TRANSFORMATION_COMMAND_NUM_PROPERTIES -}; -static GParamSpec* single_photo_transformation_command_properties[SINGLE_PHOTO_TRANSFORMATION_COMMAND_NUM_PROPERTIES]; - -#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; -enum { - GENERIC_PHOTO_TRANSFORMATION_COMMAND_0_PROPERTY, - GENERIC_PHOTO_TRANSFORMATION_COMMAND_NUM_PROPERTIES -}; -static GParamSpec* generic_photo_transformation_command_properties[GENERIC_PHOTO_TRANSFORMATION_COMMAND_NUM_PROPERTIES]; - -#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; -enum { - MULTIPLE_DATA_SOURCE_COMMAND_0_PROPERTY, - MULTIPLE_DATA_SOURCE_COMMAND_NUM_PROPERTIES -}; -static GParamSpec* multiple_data_source_command_properties[MULTIPLE_DATA_SOURCE_COMMAND_NUM_PROPERTIES]; -#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; -enum { - MULTIPLE_DATA_SOURCE_AT_ONCE_COMMAND_0_PROPERTY, - MULTIPLE_DATA_SOURCE_AT_ONCE_COMMAND_NUM_PROPERTIES -}; -static GParamSpec* multiple_data_source_at_once_command_properties[MULTIPLE_DATA_SOURCE_AT_ONCE_COMMAND_NUM_PROPERTIES]; - -#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; -enum { - MULTIPLE_PHOTO_TRANSFORMATION_COMMAND_0_PROPERTY, - MULTIPLE_PHOTO_TRANSFORMATION_COMMAND_NUM_PROPERTIES -}; -static GParamSpec* multiple_photo_transformation_command_properties[MULTIPLE_PHOTO_TRANSFORMATION_COMMAND_NUM_PROPERTIES]; - -#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 ()) -enum { - ROTATE_SINGLE_COMMAND_0_PROPERTY, - ROTATE_SINGLE_COMMAND_NUM_PROPERTIES -}; -static GParamSpec* rotate_single_command_properties[ROTATE_SINGLE_COMMAND_NUM_PROPERTIES]; - -#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; -enum { - ROTATE_MULTIPLE_COMMAND_0_PROPERTY, - ROTATE_MULTIPLE_COMMAND_NUM_PROPERTIES -}; -static GParamSpec* rotate_multiple_command_properties[ROTATE_MULTIPLE_COMMAND_NUM_PROPERTIES]; - -#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; -enum { - EDIT_TITLE_COMMAND_0_PROPERTY, - EDIT_TITLE_COMMAND_NUM_PROPERTIES -}; -static GParamSpec* edit_title_command_properties[EDIT_TITLE_COMMAND_NUM_PROPERTIES]; - -#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; -enum { - EDIT_COMMENT_COMMAND_0_PROPERTY, - EDIT_COMMENT_COMMAND_NUM_PROPERTIES -}; -static GParamSpec* edit_comment_command_properties[EDIT_COMMENT_COMMAND_NUM_PROPERTIES]; - -#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; -enum { - EDIT_MULTIPLE_TITLES_COMMAND_0_PROPERTY, - EDIT_MULTIPLE_TITLES_COMMAND_NUM_PROPERTIES -}; -static GParamSpec* edit_multiple_titles_command_properties[EDIT_MULTIPLE_TITLES_COMMAND_NUM_PROPERTIES]; - -#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; -enum { - EDIT_MULTIPLE_COMMENTS_COMMAND_0_PROPERTY, - EDIT_MULTIPLE_COMMENTS_COMMAND_NUM_PROPERTIES -}; -static GParamSpec* edit_multiple_comments_command_properties[EDIT_MULTIPLE_COMMENTS_COMMAND_NUM_PROPERTIES]; - -#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; -enum { - RENAME_EVENT_COMMAND_0_PROPERTY, - RENAME_EVENT_COMMAND_NUM_PROPERTIES -}; -static GParamSpec* rename_event_command_properties[RENAME_EVENT_COMMAND_NUM_PROPERTIES]; - -#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; -enum { - EDIT_EVENT_COMMENT_COMMAND_0_PROPERTY, - EDIT_EVENT_COMMENT_COMMAND_NUM_PROPERTIES -}; -static GParamSpec* edit_event_comment_command_properties[EDIT_EVENT_COMMENT_COMMAND_NUM_PROPERTIES]; - -#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; -enum { - SET_KEY_PHOTO_COMMAND_0_PROPERTY, - SET_KEY_PHOTO_COMMAND_NUM_PROPERTIES -}; -static GParamSpec* set_key_photo_command_properties[SET_KEY_PHOTO_COMMAND_NUM_PROPERTIES]; - -#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; -enum { - REVERT_SINGLE_COMMAND_0_PROPERTY, - REVERT_SINGLE_COMMAND_NUM_PROPERTIES -}; -static GParamSpec* revert_single_command_properties[REVERT_SINGLE_COMMAND_NUM_PROPERTIES]; - -#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; -enum { - REVERT_MULTIPLE_COMMAND_0_PROPERTY, - REVERT_MULTIPLE_COMMAND_NUM_PROPERTIES -}; -static GParamSpec* revert_multiple_command_properties[REVERT_MULTIPLE_COMMAND_NUM_PROPERTIES]; - -#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; -enum { - ENHANCE_SINGLE_COMMAND_0_PROPERTY, - ENHANCE_SINGLE_COMMAND_NUM_PROPERTIES -}; -static GParamSpec* enhance_single_command_properties[ENHANCE_SINGLE_COMMAND_NUM_PROPERTIES]; - -#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; -enum { - ENHANCE_MULTIPLE_COMMAND_0_PROPERTY, - ENHANCE_MULTIPLE_COMMAND_NUM_PROPERTIES -}; -static GParamSpec* enhance_multiple_command_properties[ENHANCE_MULTIPLE_COMMAND_NUM_PROPERTIES]; - -#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; -enum { - STRAIGHTEN_COMMAND_0_PROPERTY, - STRAIGHTEN_COMMAND_NUM_PROPERTIES -}; -static GParamSpec* straighten_command_properties[STRAIGHTEN_COMMAND_NUM_PROPERTIES]; - -#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; -enum { - CROP_COMMAND_0_PROPERTY, - CROP_COMMAND_NUM_PROPERTIES -}; -static GParamSpec* crop_command_properties[CROP_COMMAND_NUM_PROPERTIES]; - -#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; -enum { - ADJUST_COLORS_SINGLE_COMMAND_0_PROPERTY, - ADJUST_COLORS_SINGLE_COMMAND_NUM_PROPERTIES -}; -static GParamSpec* adjust_colors_single_command_properties[ADJUST_COLORS_SINGLE_COMMAND_NUM_PROPERTIES]; -#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; -enum { - ADJUST_COLORS_MULTIPLE_COMMAND_0_PROPERTY, - ADJUST_COLORS_MULTIPLE_COMMAND_NUM_PROPERTIES -}; -static GParamSpec* adjust_colors_multiple_command_properties[ADJUST_COLORS_MULTIPLE_COMMAND_NUM_PROPERTIES]; - -#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; -enum { - REDEYE_COMMAND_0_PROPERTY, - REDEYE_COMMAND_NUM_PROPERTIES -}; -static GParamSpec* redeye_command_properties[REDEYE_COMMAND_NUM_PROPERTIES]; - -#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; -enum { - MOVE_PHOTOS_COMMAND_0_PROPERTY, - MOVE_PHOTOS_COMMAND_NUM_PROPERTIES -}; -static GParamSpec* move_photos_command_properties[MOVE_PHOTOS_COMMAND_NUM_PROPERTIES]; -typedef struct _MovePhotosCommandRealMovePhotosCommandPrivate MovePhotosCommandRealMovePhotosCommandPrivate; -enum { - MOVE_PHOTOS_COMMAND_REAL_MOVE_PHOTOS_COMMAND_0_PROPERTY, - MOVE_PHOTOS_COMMAND_REAL_MOVE_PHOTOS_COMMAND_NUM_PROPERTIES -}; -static GParamSpec* move_photos_command_real_move_photos_command_properties[MOVE_PHOTOS_COMMAND_REAL_MOVE_PHOTOS_COMMAND_NUM_PROPERTIES]; - -#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; -enum { - NEW_EVENT_COMMAND_0_PROPERTY, - NEW_EVENT_COMMAND_NUM_PROPERTIES -}; -static GParamSpec* new_event_command_properties[NEW_EVENT_COMMAND_NUM_PROPERTIES]; - -#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; -enum { - SET_EVENT_COMMAND_0_PROPERTY, - SET_EVENT_COMMAND_NUM_PROPERTIES -}; -static GParamSpec* set_event_command_properties[SET_EVENT_COMMAND_NUM_PROPERTIES]; - -#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; -enum { - MERGE_EVENTS_COMMAND_0_PROPERTY, - MERGE_EVENTS_COMMAND_NUM_PROPERTIES -}; -static GParamSpec* merge_events_command_properties[MERGE_EVENTS_COMMAND_NUM_PROPERTIES]; - -#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; -enum { - DUPLICATE_MULTIPLE_PHOTOS_COMMAND_0_PROPERTY, - DUPLICATE_MULTIPLE_PHOTOS_COMMAND_NUM_PROPERTIES -}; -static GParamSpec* duplicate_multiple_photos_command_properties[DUPLICATE_MULTIPLE_PHOTOS_COMMAND_NUM_PROPERTIES]; - -#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 ()) -enum { - SET_RATING_SINGLE_COMMAND_0_PROPERTY, - SET_RATING_SINGLE_COMMAND_NUM_PROPERTIES -}; -static GParamSpec* set_rating_single_command_properties[SET_RATING_SINGLE_COMMAND_NUM_PROPERTIES]; - -#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; -enum { - SET_RATING_COMMAND_0_PROPERTY, - SET_RATING_COMMAND_NUM_PROPERTIES -}; -static GParamSpec* set_rating_command_properties[SET_RATING_COMMAND_NUM_PROPERTIES]; - -#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 ()) -enum { - SET_RAW_DEVELOPER_COMMAND_0_PROPERTY, - SET_RAW_DEVELOPER_COMMAND_NUM_PROPERTIES -}; -static GParamSpec* set_raw_developer_command_properties[SET_RAW_DEVELOPER_COMMAND_NUM_PROPERTIES]; - -#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; -enum { - ADJUST_DATE_TIME_PHOTO_COMMAND_0_PROPERTY, - ADJUST_DATE_TIME_PHOTO_COMMAND_NUM_PROPERTIES -}; -static GParamSpec* adjust_date_time_photo_command_properties[ADJUST_DATE_TIME_PHOTO_COMMAND_NUM_PROPERTIES]; - -#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; -enum { - ADJUST_DATE_TIME_PHOTOS_COMMAND_0_PROPERTY, - ADJUST_DATE_TIME_PHOTOS_COMMAND_NUM_PROPERTIES -}; -static GParamSpec* adjust_date_time_photos_command_properties[ADJUST_DATE_TIME_PHOTOS_COMMAND_NUM_PROPERTIES]; - -#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; -enum { - ADD_TAGS_COMMAND_0_PROPERTY, - ADD_TAGS_COMMAND_NUM_PROPERTIES -}; -static GParamSpec* add_tags_command_properties[ADD_TAGS_COMMAND_NUM_PROPERTIES]; - -#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; -enum { - RENAME_TAG_COMMAND_0_PROPERTY, - RENAME_TAG_COMMAND_NUM_PROPERTIES -}; -static GParamSpec* rename_tag_command_properties[RENAME_TAG_COMMAND_NUM_PROPERTIES]; - -#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; -enum { - DELETE_TAG_COMMAND_0_PROPERTY, - DELETE_TAG_COMMAND_NUM_PROPERTIES -}; -static GParamSpec* delete_tag_command_properties[DELETE_TAG_COMMAND_NUM_PROPERTIES]; - -#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; -enum { - NEW_CHILD_TAG_COMMAND_0_PROPERTY, - NEW_CHILD_TAG_COMMAND_NUM_PROPERTIES -}; -static GParamSpec* new_child_tag_command_properties[NEW_CHILD_TAG_COMMAND_NUM_PROPERTIES]; - -#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; -enum { - NEW_ROOT_TAG_COMMAND_0_PROPERTY, - NEW_ROOT_TAG_COMMAND_NUM_PROPERTIES -}; -static GParamSpec* new_root_tag_command_properties[NEW_ROOT_TAG_COMMAND_NUM_PROPERTIES]; - -#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; -enum { - REPARENT_TAG_COMMAND_0_PROPERTY, - REPARENT_TAG_COMMAND_NUM_PROPERTIES -}; -static GParamSpec* reparent_tag_command_properties[REPARENT_TAG_COMMAND_NUM_PROPERTIES]; -#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; -enum { - MODIFY_TAGS_COMMAND_0_PROPERTY, - MODIFY_TAGS_COMMAND_NUM_PROPERTIES -}; -static GParamSpec* modify_tags_command_properties[MODIFY_TAGS_COMMAND_NUM_PROPERTIES]; - -#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; -enum { - TAG_UNTAG_PHOTOS_COMMAND_0_PROPERTY, - TAG_UNTAG_PHOTOS_COMMAND_NUM_PROPERTIES -}; -static GParamSpec* tag_untag_photos_command_properties[TAG_UNTAG_PHOTOS_COMMAND_NUM_PROPERTIES]; - -#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; -enum { - RENAME_SAVED_SEARCH_COMMAND_0_PROPERTY, - RENAME_SAVED_SEARCH_COMMAND_NUM_PROPERTIES -}; -static GParamSpec* rename_saved_search_command_properties[RENAME_SAVED_SEARCH_COMMAND_NUM_PROPERTIES]; - -#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; -enum { - DELETE_SAVED_SEARCH_COMMAND_0_PROPERTY, - DELETE_SAVED_SEARCH_COMMAND_NUM_PROPERTIES -}; -static GParamSpec* delete_saved_search_command_properties[DELETE_SAVED_SEARCH_COMMAND_NUM_PROPERTIES]; - -#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; -enum { - TRASH_UNTRASH_PHOTOS_COMMAND_0_PROPERTY, - TRASH_UNTRASH_PHOTOS_COMMAND_NUM_PROPERTIES -}; -static GParamSpec* trash_untrash_photos_command_properties[TRASH_UNTRASH_PHOTOS_COMMAND_NUM_PROPERTIES]; - -#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; -enum { - FLAG_UNFLAG_COMMAND_0_PROPERTY, - FLAG_UNFLAG_COMMAND_NUM_PROPERTIES -}; -static GParamSpec* flag_unflag_command_properties[FLAG_UNFLAG_COMMAND_NUM_PROPERTIES]; - -#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)) -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; -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)) -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)) -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)) -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)) -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)) -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)) -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)) -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)) -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)) -EditTitleCommand* edit_title_command_new (MediaSource* source, - const gchar* new_title); -EditTitleCommand* edit_title_command_construct (GType object_type, - MediaSource* source, - const gchar* new_title); -#define RESOURCES_EDIT_TITLE_LABEL NC_ ("Button Label", "Edit Title") -gchar* media_source_get_title (MediaSource* self); -static void edit_title_command_real_execute (Command* base); -void media_source_set_title (MediaSource* self, - const gchar* title); -static void edit_title_command_real_undo (Command* base); -static void edit_title_command_finalize (GObject * obj); -GType edit_comment_command_get_type (void) G_GNUC_CONST; -#define EDIT_COMMENT_COMMAND_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), TYPE_EDIT_COMMENT_COMMAND, EditCommentCommandPrivate)) -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; -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; -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)) -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)) -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)) -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; -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; -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; -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; -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)) -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)) -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; -#define ADJUST_COLORS_SINGLE_COMMAND_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), TYPE_ADJUST_COLORS_SINGLE_COMMAND, AdjustColorsSingleCommandPrivate)) -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)) -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)) -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; -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)) -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; -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; -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; -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)) -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)) -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)) -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)) -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, - gboolean notify); -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)) -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)) -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)) -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)) -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)) -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)) -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)) -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)) -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)) -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)) -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)) -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)) -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)) -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)) -#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 3261 "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 3271 "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 3281 "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 3290 "Commands.c" -} - - -PageCommand* -page_command_construct (GType object_type, - const gchar* name, - const gchar* explanation) -{ - PageCommand * self = NULL; - AppWindow* _tmp0_; - AppWindow* _tmp1_; - Page* _tmp2_; - Page* _tmp3_; -#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" - self = (PageCommand*) command_construct (object_type, name, explanation); -#line 18 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp0_ = app_window_get_instance (); -#line 18 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp1_ = _tmp0_; -#line 18 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp2_ = page_window_get_current_page (G_TYPE_CHECK_INSTANCE_CAST (_tmp1_, 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 = _tmp2_; -#line 18 "/home/jens/Source/shotwell/src/Commands.vala" - _g_object_unref0 (_tmp1_); -#line 20 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp3_ = self->priv->page; -#line 20 "/home/jens/Source/shotwell/src/Commands.vala" - if (_tmp3_ != NULL) { -#line 3326 "Commands.c" - Page* _tmp4_; - LibraryPhotoPage* photo_page = NULL; - Page* _tmp5_; - LibraryPhotoPage* _tmp6_; - LibraryPhotoPage* _tmp7_; -#line 21 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp4_ = self->priv->page; -#line 21 "/home/jens/Source/shotwell/src/Commands.vala" - g_signal_connect_object (G_TYPE_CHECK_INSTANCE_CAST (_tmp4_, 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" - _tmp5_ = self->priv->page; -#line 27 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp6_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_TYPE (_tmp5_, TYPE_LIBRARY_PHOTO_PAGE) ? ((LibraryPhotoPage*) _tmp5_) : NULL); -#line 27 "/home/jens/Source/shotwell/src/Commands.vala" - photo_page = _tmp6_; -#line 28 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp7_ = photo_page; -#line 28 "/home/jens/Source/shotwell/src/Commands.vala" - if (_tmp7_ != NULL) { -#line 3346 "Commands.c" - LibraryPhotoPage* _tmp8_; - Photo* _tmp9_; - LibraryPhotoPage* _tmp10_; - CollectionPage* _tmp11_; - gboolean _tmp12_ = FALSE; - Photo* _tmp13_; -#line 29 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp8_ = photo_page; -#line 29 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp9_ = editing_host_page_get_photo (G_TYPE_CHECK_INSTANCE_CAST (_tmp8_, 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 = _tmp9_; -#line 30 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp10_ = photo_page; -#line 30 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp11_ = library_photo_page_get_controller_page (_tmp10_); -#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 = _tmp11_; -#line 32 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp13_ = self->priv->library_photo; -#line 32 "/home/jens/Source/shotwell/src/Commands.vala" - if (_tmp13_ != NULL) { -#line 3373 "Commands.c" - CollectionPage* _tmp14_; -#line 32 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp14_ = self->priv->collection_page; -#line 32 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp12_ = _tmp14_ != NULL; -#line 3379 "Commands.c" - } else { -#line 32 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp12_ = FALSE; -#line 3383 "Commands.c" - } -#line 32 "/home/jens/Source/shotwell/src/Commands.vala" - if (_tmp12_) { -#line 3387 "Commands.c" - Photo* _tmp15_; - CollectionPage* _tmp16_; -#line 33 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp15_ = self->priv->library_photo; -#line 33 "/home/jens/Source/shotwell/src/Commands.vala" - g_signal_connect_object (G_TYPE_CHECK_INSTANCE_CAST (_tmp15_, 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" - _tmp16_ = self->priv->collection_page; -#line 34 "/home/jens/Source/shotwell/src/Commands.vala" - g_signal_connect_object (G_TYPE_CHECK_INSTANCE_CAST (_tmp16_, gtk_widget_get_type (), GtkWidget), "destroy", (GCallback) _page_command_on_controller_destroyed_gtk_widget_destroy, self, 0); -#line 3398 "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 3408 "Commands.c" - } - } -#line 20 "/home/jens/Source/shotwell/src/Commands.vala" - _g_object_unref0 (photo_page); -#line 3413 "Commands.c" - } -#line 15 "/home/jens/Source/shotwell/src/Commands.vala" - return self; -#line 3417 "Commands.c" -} - - -void -page_command_set_auto_return_to_page (PageCommand* self, - gboolean auto_return) -{ -#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" - self->priv->auto_return = auto_return; -#line 3429 "Commands.c" -} - - -static void -page_command_real_prepare (Command* base) -{ - PageCommand * self; - gboolean _tmp0_; -#line 58 "/home/jens/Source/shotwell/src/Commands.vala" - self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_PAGE_COMMAND, PageCommand); -#line 59 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp0_ = self->priv->auto_return; -#line 59 "/home/jens/Source/shotwell/src/Commands.vala" - if (_tmp0_) { -#line 60 "/home/jens/Source/shotwell/src/Commands.vala" - page_command_return_to_page (self); -#line 3446 "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 3450 "Commands.c" -} - - -void -page_command_return_to_page (PageCommand* self) -{ - LibraryPhotoPage* photo_page = NULL; - Page* _tmp0_; - LibraryPhotoPage* _tmp1_; - LibraryPhotoPage* _tmp2_; -#line 65 "/home/jens/Source/shotwell/src/Commands.vala" - g_return_if_fail (IS_PAGE_COMMAND (self)); -#line 66 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp0_ = self->priv->page; -#line 66 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp1_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_TYPE (_tmp0_, TYPE_LIBRARY_PHOTO_PAGE) ? ((LibraryPhotoPage*) _tmp0_) : NULL); -#line 66 "/home/jens/Source/shotwell/src/Commands.vala" - photo_page = _tmp1_; -#line 68 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp2_ = photo_page; -#line 68 "/home/jens/Source/shotwell/src/Commands.vala" - if (_tmp2_ != NULL) { -#line 3473 "Commands.c" - gboolean _tmp3_ = FALSE; - Photo* _tmp4_; -#line 69 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp4_ = self->priv->library_photo; -#line 69 "/home/jens/Source/shotwell/src/Commands.vala" - if (_tmp4_ != NULL) { -#line 3480 "Commands.c" - CollectionPage* _tmp5_; -#line 69 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp5_ = self->priv->collection_page; -#line 69 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp3_ = _tmp5_ != NULL; -#line 3486 "Commands.c" - } else { -#line 69 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp3_ = FALSE; -#line 3490 "Commands.c" - } -#line 69 "/home/jens/Source/shotwell/src/Commands.vala" - if (_tmp3_) { -#line 3494 "Commands.c" - gboolean photo_in_collection = FALSE; - gint count = 0; - CollectionPage* _tmp6_; - ViewCollection* _tmp7_; - ViewCollection* _tmp8_; - gint _tmp9_; - gboolean _tmp24_; -#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" - _data_collection_unref0 (_tmp8_); -#line 71 "/home/jens/Source/shotwell/src/Commands.vala" - count = _tmp9_; -#line 3516 "Commands.c" - { - gint i = 0; -#line 72 "/home/jens/Source/shotwell/src/Commands.vala" - i = 0; -#line 3521 "Commands.c" - { - gboolean _tmp10_ = FALSE; -#line 72 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp10_ = TRUE; -#line 72 "/home/jens/Source/shotwell/src/Commands.vala" - while (TRUE) { -#line 3528 "Commands.c" - gint _tmp12_; - gint _tmp13_; - CollectionPage* _tmp14_; - ViewCollection* _tmp15_; - ViewCollection* _tmp16_; - gint _tmp17_; - DataObject* _tmp18_; - Thumbnail* _tmp19_; - MediaSource* _tmp20_; - MediaSource* _tmp21_; - Photo* _tmp22_; - gboolean _tmp23_; -#line 72 "/home/jens/Source/shotwell/src/Commands.vala" - if (!_tmp10_) { -#line 3543 "Commands.c" - gint _tmp11_; -#line 72 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp11_ = i; -#line 72 "/home/jens/Source/shotwell/src/Commands.vala" - i = _tmp11_ + 1; -#line 3549 "Commands.c" - } -#line 72 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp10_ = FALSE; -#line 72 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp12_ = i; -#line 72 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp13_ = count; -#line 72 "/home/jens/Source/shotwell/src/Commands.vala" - if (!(_tmp12_ < _tmp13_)) { -#line 72 "/home/jens/Source/shotwell/src/Commands.vala" - break; -#line 3561 "Commands.c" - } -#line 73 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp14_ = self->priv->collection_page; -#line 73 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp15_ = page_get_view (G_TYPE_CHECK_INSTANCE_CAST (_tmp14_, TYPE_PAGE, Page)); -#line 73 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp16_ = _tmp15_; -#line 73 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp17_ = i; -#line 73 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp18_ = data_collection_get_at (G_TYPE_CHECK_INSTANCE_CAST (_tmp16_, TYPE_DATA_COLLECTION, DataCollection), _tmp17_); -#line 73 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp19_ = G_TYPE_CHECK_INSTANCE_CAST (_tmp18_, TYPE_THUMBNAIL, Thumbnail); -#line 73 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp20_ = thumbnail_get_media_source (_tmp19_); -#line 73 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp21_ = _tmp20_; -#line 73 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp22_ = self->priv->library_photo; -#line 73 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp23_ = _tmp21_ == G_TYPE_CHECK_INSTANCE_CAST (_tmp22_, TYPE_MEDIA_SOURCE, MediaSource); -#line 73 "/home/jens/Source/shotwell/src/Commands.vala" - _g_object_unref0 (_tmp21_); -#line 73 "/home/jens/Source/shotwell/src/Commands.vala" - _g_object_unref0 (_tmp19_); -#line 73 "/home/jens/Source/shotwell/src/Commands.vala" - _data_collection_unref0 (_tmp16_); -#line 73 "/home/jens/Source/shotwell/src/Commands.vala" - if (_tmp23_) { -#line 74 "/home/jens/Source/shotwell/src/Commands.vala" - photo_in_collection = TRUE; -#line 75 "/home/jens/Source/shotwell/src/Commands.vala" - break; -#line 3595 "Commands.c" - } - } - } - } -#line 79 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp24_ = photo_in_collection; -#line 79 "/home/jens/Source/shotwell/src/Commands.vala" - if (_tmp24_) { -#line 3604 "Commands.c" - LibraryWindow* _tmp25_; - LibraryWindow* _tmp26_; - CollectionPage* _tmp27_; - Photo* _tmp28_; -#line 80 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp25_ = library_window_get_app (); -#line 80 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp26_ = _tmp25_; -#line 80 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp27_ = self->priv->collection_page; -#line 80 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp28_ = self->priv->library_photo; -#line 80 "/home/jens/Source/shotwell/src/Commands.vala" - library_window_switch_to_photo_page (_tmp26_, _tmp27_, _tmp28_); -#line 80 "/home/jens/Source/shotwell/src/Commands.vala" - _g_object_unref0 (_tmp26_); -#line 3621 "Commands.c" - } - } - } else { - Page* _tmp29_; -#line 82 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp29_ = self->priv->page; -#line 82 "/home/jens/Source/shotwell/src/Commands.vala" - if (_tmp29_ != NULL) { -#line 3630 "Commands.c" - AppWindow* _tmp30_; - AppWindow* _tmp31_; - Page* _tmp32_; -#line 83 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp30_ = app_window_get_instance (); -#line 83 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp31_ = _tmp30_; -#line 83 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp32_ = self->priv->page; -#line 83 "/home/jens/Source/shotwell/src/Commands.vala" - page_window_set_current_page (G_TYPE_CHECK_INSTANCE_CAST (_tmp31_, TYPE_PAGE_WINDOW, PageWindow), _tmp32_); -#line 83 "/home/jens/Source/shotwell/src/Commands.vala" - _g_object_unref0 (_tmp31_); -#line 3644 "Commands.c" - } - } -#line 65 "/home/jens/Source/shotwell/src/Commands.vala" - _g_object_unref0 (photo_page); -#line 3649 "Commands.c" -} - - -static void -page_command_on_page_destroyed (PageCommand* self) -{ - Page* _tmp0_; - guint _tmp1_; -#line 86 "/home/jens/Source/shotwell/src/Commands.vala" - g_return_if_fail (IS_PAGE_COMMAND (self)); -#line 87 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp0_ = self->priv->page; -#line 87 "/home/jens/Source/shotwell/src/Commands.vala" - g_signal_parse_name ("destroy", gtk_widget_get_type (), &_tmp1_, NULL, FALSE); -#line 87 "/home/jens/Source/shotwell/src/Commands.vala" - g_signal_handlers_disconnect_matched (G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, gtk_widget_get_type (), GtkWidget), G_SIGNAL_MATCH_ID | G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA, _tmp1_, 0, NULL, (GCallback) _page_command_on_page_destroyed_gtk_widget_destroy, self); -#line 88 "/home/jens/Source/shotwell/src/Commands.vala" - _g_object_unref0 (self->priv->page); -#line 88 "/home/jens/Source/shotwell/src/Commands.vala" - self->priv->page = NULL; -#line 3670 "Commands.c" -} - - -static void -page_command_on_photo_destroyed (PageCommand* self) -{ - Photo* _tmp0_; - guint _tmp1_; -#line 91 "/home/jens/Source/shotwell/src/Commands.vala" - g_return_if_fail (IS_PAGE_COMMAND (self)); -#line 92 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp0_ = self->priv->library_photo; -#line 92 "/home/jens/Source/shotwell/src/Commands.vala" - g_signal_parse_name ("destroyed", TYPE_DATA_SOURCE, &_tmp1_, NULL, FALSE); -#line 92 "/home/jens/Source/shotwell/src/Commands.vala" - g_signal_handlers_disconnect_matched (G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, TYPE_DATA_SOURCE, DataSource), G_SIGNAL_MATCH_ID | G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA, _tmp1_, 0, NULL, (GCallback) _page_command_on_photo_destroyed_data_source_destroyed, self); -#line 93 "/home/jens/Source/shotwell/src/Commands.vala" - _g_object_unref0 (self->priv->library_photo); -#line 93 "/home/jens/Source/shotwell/src/Commands.vala" - self->priv->library_photo = NULL; -#line 3691 "Commands.c" -} - - -static void -page_command_on_controller_destroyed (PageCommand* self) -{ - CollectionPage* _tmp0_; - guint _tmp1_; -#line 96 "/home/jens/Source/shotwell/src/Commands.vala" - g_return_if_fail (IS_PAGE_COMMAND (self)); -#line 97 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp0_ = self->priv->collection_page; -#line 97 "/home/jens/Source/shotwell/src/Commands.vala" - g_signal_parse_name ("destroy", gtk_widget_get_type (), &_tmp1_, NULL, FALSE); -#line 97 "/home/jens/Source/shotwell/src/Commands.vala" - g_signal_handlers_disconnect_matched (G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, gtk_widget_get_type (), GtkWidget), G_SIGNAL_MATCH_ID | G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA, _tmp1_, 0, NULL, (GCallback) _page_command_on_controller_destroyed_gtk_widget_destroy, self); -#line 98 "/home/jens/Source/shotwell/src/Commands.vala" - _g_object_unref0 (self->priv->collection_page); -#line 98 "/home/jens/Source/shotwell/src/Commands.vala" - self->priv->collection_page = NULL; -#line 3712 "Commands.c" -} - - -static void -page_command_class_init (PageCommandClass * klass) -{ -#line 9 "/home/jens/Source/shotwell/src/Commands.vala" - page_command_parent_class = g_type_class_peek_parent (klass); -#line 9 "/home/jens/Source/shotwell/src/Commands.vala" - g_type_class_add_private (klass, sizeof (PageCommandPrivate)); -#line 9 "/home/jens/Source/shotwell/src/Commands.vala" - ((CommandClass *) klass)->prepare = (void (*) (Command *)) page_command_real_prepare; -#line 9 "/home/jens/Source/shotwell/src/Commands.vala" - G_OBJECT_CLASS (klass)->finalize = page_command_finalize; -#line 3727 "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 3742 "Commands.c" -} - - -static void -page_command_finalize (GObject * obj) -{ - PageCommand * self; - Page* _tmp0_; - Photo* _tmp3_; - CollectionPage* _tmp6_; -#line 9 "/home/jens/Source/shotwell/src/Commands.vala" - self = G_TYPE_CHECK_INSTANCE_CAST (obj, TYPE_PAGE_COMMAND, PageCommand); -#line 44 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp0_ = self->priv->page; -#line 44 "/home/jens/Source/shotwell/src/Commands.vala" - if (_tmp0_ != NULL) { -#line 3759 "Commands.c" - Page* _tmp1_; - guint _tmp2_; -#line 45 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp1_ = self->priv->page; -#line 45 "/home/jens/Source/shotwell/src/Commands.vala" - g_signal_parse_name ("destroy", gtk_widget_get_type (), &_tmp2_, NULL, FALSE); -#line 45 "/home/jens/Source/shotwell/src/Commands.vala" - g_signal_handlers_disconnect_matched (G_TYPE_CHECK_INSTANCE_CAST (_tmp1_, gtk_widget_get_type (), GtkWidget), G_SIGNAL_MATCH_ID | G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA, _tmp2_, 0, NULL, (GCallback) _page_command_on_page_destroyed_gtk_widget_destroy, self); -#line 3768 "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 3774 "Commands.c" - Photo* _tmp4_; - guint _tmp5_; -#line 48 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp4_ = self->priv->library_photo; -#line 48 "/home/jens/Source/shotwell/src/Commands.vala" - g_signal_parse_name ("destroyed", TYPE_DATA_SOURCE, &_tmp5_, NULL, FALSE); -#line 48 "/home/jens/Source/shotwell/src/Commands.vala" - g_signal_handlers_disconnect_matched (G_TYPE_CHECK_INSTANCE_CAST (_tmp4_, TYPE_DATA_SOURCE, DataSource), G_SIGNAL_MATCH_ID | G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA, _tmp5_, 0, NULL, (GCallback) _page_command_on_photo_destroyed_data_source_destroyed, self); -#line 3783 "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 3789 "Commands.c" - CollectionPage* _tmp7_; - guint _tmp8_; -#line 51 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp7_ = self->priv->collection_page; -#line 51 "/home/jens/Source/shotwell/src/Commands.vala" - g_signal_parse_name ("destroy", gtk_widget_get_type (), &_tmp8_, NULL, FALSE); -#line 51 "/home/jens/Source/shotwell/src/Commands.vala" - g_signal_handlers_disconnect_matched (G_TYPE_CHECK_INSTANCE_CAST (_tmp7_, gtk_widget_get_type (), GtkWidget), G_SIGNAL_MATCH_ID | G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA, _tmp8_, 0, NULL, (GCallback) _page_command_on_controller_destroyed_gtk_widget_destroy, self); -#line 3798 "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 3808 "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 3832 "Commands.c" -} - - -SingleDataSourceCommand* -single_data_source_command_construct (GType object_type, - DataSource* source, - const gchar* name, - const gchar* explanation) -{ - SingleDataSourceCommand * self = NULL; - DataSource* _tmp0_; -#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" - self = (SingleDataSourceCommand*) page_command_construct (object_type, name, explanation); -#line 109 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp0_ = _g_object_ref0 (source); -#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 = _tmp0_; -#line 111 "/home/jens/Source/shotwell/src/Commands.vala" - g_signal_connect_object (source, "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 3862 "Commands.c" -} - - -DataSource* -single_data_source_command_get_source (SingleDataSourceCommand* self) -{ - DataSource* result = NULL; - DataSource* _tmp0_; - DataSource* _tmp1_; -#line 118 "/home/jens/Source/shotwell/src/Commands.vala" - g_return_val_if_fail (IS_SINGLE_DATA_SOURCE_COMMAND (self), NULL); -#line 119 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp0_ = self->source; -#line 119 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp1_ = _g_object_ref0 (_tmp0_); -#line 119 "/home/jens/Source/shotwell/src/Commands.vala" - result = _tmp1_; -#line 119 "/home/jens/Source/shotwell/src/Commands.vala" - return result; -#line 3882 "Commands.c" -} - - -static void -single_data_source_command_on_source_destroyed (SingleDataSourceCommand* self) -{ - CommandManager* _tmp0_; - CommandManager* _tmp1_; -#line 122 "/home/jens/Source/shotwell/src/Commands.vala" - g_return_if_fail (IS_SINGLE_DATA_SOURCE_COMMAND (self)); -#line 125 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp0_ = command_get_command_manager (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_COMMAND, Command)); -#line 125 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp1_ = _tmp0_; -#line 125 "/home/jens/Source/shotwell/src/Commands.vala" - command_manager_reset (_tmp1_); -#line 125 "/home/jens/Source/shotwell/src/Commands.vala" - _command_manager_unref0 (_tmp1_); -#line 3901 "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 3912 "Commands.c" -} - - -static void -single_data_source_command_instance_init (SingleDataSourceCommand * self) -{ -} - - -static void -single_data_source_command_finalize (GObject * obj) -{ - SingleDataSourceCommand * self; - DataSource* _tmp0_; - guint _tmp1_; -#line 103 "/home/jens/Source/shotwell/src/Commands.vala" - self = G_TYPE_CHECK_INSTANCE_CAST (obj, TYPE_SINGLE_DATA_SOURCE_COMMAND, SingleDataSourceCommand); -#line 115 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp0_ = self->source; -#line 115 "/home/jens/Source/shotwell/src/Commands.vala" - g_signal_parse_name ("destroyed", TYPE_DATA_SOURCE, &_tmp1_, NULL, FALSE); -#line 115 "/home/jens/Source/shotwell/src/Commands.vala" - g_signal_handlers_disconnect_matched (_tmp0_, G_SIGNAL_MATCH_ID | G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA, _tmp1_, 0, NULL, (GCallback) _single_data_source_command_on_source_destroyed_data_source_destroyed, self); -#line 104 "/home/jens/Source/shotwell/src/Commands.vala" - _g_object_unref0 (self->source); -#line 103 "/home/jens/Source/shotwell/src/Commands.vala" - G_OBJECT_CLASS (single_data_source_command_parent_class)->finalize (obj); -#line 3940 "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 3964 "Commands.c" -} - - -SimpleProxyableCommand* -simple_proxyable_command_construct (GType object_type, - Proxyable* proxyable, - const gchar* name, - const gchar* explanation) -{ - SimpleProxyableCommand * self = NULL; - SourceProxy* _tmp0_; - SourceProxy* _tmp1_; -#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" - self = (SimpleProxyableCommand*) page_command_construct (object_type, name, explanation); -#line 136 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp0_ = proxyable_get_proxy (proxyable); -#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 = _tmp0_; -#line 137 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp1_ = self->priv->proxy; -#line 137 "/home/jens/Source/shotwell/src/Commands.vala" - g_signal_connect_object (_tmp1_, "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 3997 "Commands.c" -} - - -static void -simple_proxyable_command_real_execute (Command* base) -{ - SimpleProxyableCommand * self; - SourceProxy* _tmp0_; - DataSource* _tmp1_; - DataSource* _tmp2_; -#line 145 "/home/jens/Source/shotwell/src/Commands.vala" - self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_SIMPLE_PROXYABLE_COMMAND, SimpleProxyableCommand); -#line 146 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp0_ = self->priv->proxy; -#line 146 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp1_ = source_proxy_get_source (_tmp0_); -#line 146 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp2_ = _tmp1_; -#line 146 "/home/jens/Source/shotwell/src/Commands.vala" - simple_proxyable_command_execute_on_source (self, _tmp2_); -#line 146 "/home/jens/Source/shotwell/src/Commands.vala" - _g_object_unref0 (_tmp2_); -#line 4020 "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 4032 "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 4044 "Commands.c" -} - - -static void -simple_proxyable_command_real_undo (Command* base) -{ - SimpleProxyableCommand * self; - SourceProxy* _tmp0_; - DataSource* _tmp1_; - DataSource* _tmp2_; -#line 151 "/home/jens/Source/shotwell/src/Commands.vala" - self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_SIMPLE_PROXYABLE_COMMAND, SimpleProxyableCommand); -#line 152 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp0_ = self->priv->proxy; -#line 152 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp1_ = source_proxy_get_source (_tmp0_); -#line 152 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp2_ = _tmp1_; -#line 152 "/home/jens/Source/shotwell/src/Commands.vala" - simple_proxyable_command_undo_on_source (self, _tmp2_); -#line 152 "/home/jens/Source/shotwell/src/Commands.vala" - _g_object_unref0 (_tmp2_); -#line 4067 "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 4079 "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 4091 "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 4103 "Commands.c" - { - GeeIterator* _proxyable_it = NULL; - GeeIterator* _tmp0_; -#line 162 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp0_ = gee_iterable_iterator (G_TYPE_CHECK_INSTANCE_CAST (proxyables, GEE_TYPE_ITERABLE, GeeIterable)); -#line 162 "/home/jens/Source/shotwell/src/Commands.vala" - _proxyable_it = _tmp0_; -#line 162 "/home/jens/Source/shotwell/src/Commands.vala" - while (TRUE) { -#line 4113 "Commands.c" - GeeIterator* _tmp1_; - Proxyable* proxyable = NULL; - GeeIterator* _tmp2_; - gpointer _tmp3_; - SourceProxy* added_proxy = NULL; - Proxyable* _tmp4_; - SourceProxy* _tmp5_; - SourceProxy* _tmp6_; - GeeHashSet* _tmp7_; - SourceProxy* _tmp8_; -#line 162 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp1_ = _proxyable_it; -#line 162 "/home/jens/Source/shotwell/src/Commands.vala" - if (!gee_iterator_next (_tmp1_)) { -#line 162 "/home/jens/Source/shotwell/src/Commands.vala" - break; -#line 4130 "Commands.c" - } -#line 162 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp2_ = _proxyable_it; -#line 162 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp3_ = gee_iterator_get (_tmp2_); -#line 162 "/home/jens/Source/shotwell/src/Commands.vala" - proxyable = (Proxyable*) _tmp3_; -#line 163 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp4_ = proxyable; -#line 163 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp5_ = proxyable_get_proxy (_tmp4_); -#line 163 "/home/jens/Source/shotwell/src/Commands.vala" - added_proxy = _tmp5_; -#line 164 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp6_ = added_proxy; -#line 164 "/home/jens/Source/shotwell/src/Commands.vala" - g_signal_connect_object (_tmp6_, "broken", (GCallback) _simple_proxyable_command_on_proxy_broken_source_proxy_broken, self, 0); -#line 165 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp7_ = self->priv->proxies; -#line 165 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp8_ = added_proxy; -#line 165 "/home/jens/Source/shotwell/src/Commands.vala" - gee_abstract_collection_add (G_TYPE_CHECK_INSTANCE_CAST (_tmp7_, GEE_TYPE_ABSTRACT_COLLECTION, GeeAbstractCollection), _tmp8_); -#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 4158 "Commands.c" - } -#line 162 "/home/jens/Source/shotwell/src/Commands.vala" - _g_object_unref0 (_proxyable_it); -#line 4162 "Commands.c" - } -} - - -void -simple_proxyable_command_clear_added_proxies (SimpleProxyableCommand* self) -{ - GeeHashSet* _tmp7_; -#line 170 "/home/jens/Source/shotwell/src/Commands.vala" - g_return_if_fail (IS_SIMPLE_PROXYABLE_COMMAND (self)); -#line 4173 "Commands.c" - { - GeeIterator* _added_proxy_it = NULL; - GeeHashSet* _tmp0_; - GeeIterator* _tmp1_; -#line 171 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp0_ = self->priv->proxies; -#line 171 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp1_ = gee_abstract_collection_iterator (G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, GEE_TYPE_ABSTRACT_COLLECTION, GeeAbstractCollection)); -#line 171 "/home/jens/Source/shotwell/src/Commands.vala" - _added_proxy_it = _tmp1_; -#line 171 "/home/jens/Source/shotwell/src/Commands.vala" - while (TRUE) { -#line 4186 "Commands.c" - GeeIterator* _tmp2_; - SourceProxy* added_proxy = NULL; - GeeIterator* _tmp3_; - gpointer _tmp4_; - SourceProxy* _tmp5_; - guint _tmp6_; -#line 171 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp2_ = _added_proxy_it; -#line 171 "/home/jens/Source/shotwell/src/Commands.vala" - if (!gee_iterator_next (_tmp2_)) { -#line 171 "/home/jens/Source/shotwell/src/Commands.vala" - break; -#line 4199 "Commands.c" - } -#line 171 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp3_ = _added_proxy_it; -#line 171 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp4_ = gee_iterator_get (_tmp3_); -#line 171 "/home/jens/Source/shotwell/src/Commands.vala" - added_proxy = (SourceProxy*) _tmp4_; -#line 172 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp5_ = added_proxy; -#line 172 "/home/jens/Source/shotwell/src/Commands.vala" - g_signal_parse_name ("broken", TYPE_SOURCE_PROXY, &_tmp6_, NULL, FALSE); -#line 172 "/home/jens/Source/shotwell/src/Commands.vala" - g_signal_handlers_disconnect_matched (_tmp5_, G_SIGNAL_MATCH_ID | G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA, _tmp6_, 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 4215 "Commands.c" - } -#line 171 "/home/jens/Source/shotwell/src/Commands.vala" - _g_object_unref0 (_added_proxy_it); -#line 4219 "Commands.c" - } -#line 174 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp7_ = self->priv->proxies; -#line 174 "/home/jens/Source/shotwell/src/Commands.vala" - gee_abstract_collection_clear (G_TYPE_CHECK_INSTANCE_CAST (_tmp7_, GEE_TYPE_ABSTRACT_COLLECTION, GeeAbstractCollection)); -#line 4225 "Commands.c" -} - - -static void -simple_proxyable_command_on_proxy_broken (SimpleProxyableCommand* self) -{ - CommandManager* _tmp0_; - CommandManager* _tmp1_; -#line 177 "/home/jens/Source/shotwell/src/Commands.vala" - g_return_if_fail (IS_SIMPLE_PROXYABLE_COMMAND (self)); -#line 178 "/home/jens/Source/shotwell/src/Commands.vala" - g_debug ("Commands.vala:178: on_proxy_broken"); -#line 179 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp0_ = command_get_command_manager (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_COMMAND, Command)); -#line 179 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp1_ = _tmp0_; -#line 179 "/home/jens/Source/shotwell/src/Commands.vala" - command_manager_reset (_tmp1_); -#line 179 "/home/jens/Source/shotwell/src/Commands.vala" - _command_manager_unref0 (_tmp1_); -#line 4246 "Commands.c" -} - - -static void -simple_proxyable_command_class_init (SimpleProxyableCommandClass * klass) -{ -#line 129 "/home/jens/Source/shotwell/src/Commands.vala" - simple_proxyable_command_parent_class = g_type_class_peek_parent (klass); -#line 129 "/home/jens/Source/shotwell/src/Commands.vala" - g_type_class_add_private (klass, sizeof (SimpleProxyableCommandPrivate)); -#line 129 "/home/jens/Source/shotwell/src/Commands.vala" - ((CommandClass *) klass)->execute = (void (*) (Command *)) simple_proxyable_command_real_execute; -#line 129 "/home/jens/Source/shotwell/src/Commands.vala" - ((SimpleProxyableCommandClass *) klass)->execute_on_source = (void (*) (SimpleProxyableCommand *, DataSource*)) simple_proxyable_command_real_execute_on_source; -#line 129 "/home/jens/Source/shotwell/src/Commands.vala" - ((CommandClass *) klass)->undo = (void (*) (Command *)) simple_proxyable_command_real_undo; -#line 129 "/home/jens/Source/shotwell/src/Commands.vala" - ((SimpleProxyableCommandClass *) klass)->undo_on_source = (void (*) (SimpleProxyableCommand *, DataSource*)) simple_proxyable_command_real_undo_on_source; -#line 129 "/home/jens/Source/shotwell/src/Commands.vala" - G_OBJECT_CLASS (klass)->finalize = simple_proxyable_command_finalize; -#line 4267 "Commands.c" -} - - -static void -simple_proxyable_command_instance_init (SimpleProxyableCommand * self) -{ - GeeHashSet* _tmp0_; -#line 129 "/home/jens/Source/shotwell/src/Commands.vala" - self->priv = SIMPLE_PROXYABLE_COMMAND_GET_PRIVATE (self); -#line 131 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp0_ = gee_hash_set_new (TYPE_SOURCE_PROXY, (GBoxedCopyFunc) source_proxy_ref, (GDestroyNotify) source_proxy_unref, NULL, NULL, NULL, NULL, NULL, NULL); -#line 131 "/home/jens/Source/shotwell/src/Commands.vala" - self->priv->proxies = _tmp0_; -#line 4281 "Commands.c" -} - - -static void -simple_proxyable_command_finalize (GObject * obj) -{ - SimpleProxyableCommand * self; - SourceProxy* _tmp0_; - guint _tmp1_; -#line 129 "/home/jens/Source/shotwell/src/Commands.vala" - self = G_TYPE_CHECK_INSTANCE_CAST (obj, TYPE_SIMPLE_PROXYABLE_COMMAND, SimpleProxyableCommand); -#line 141 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp0_ = self->priv->proxy; -#line 141 "/home/jens/Source/shotwell/src/Commands.vala" - g_signal_parse_name ("broken", TYPE_SOURCE_PROXY, &_tmp1_, NULL, FALSE); -#line 141 "/home/jens/Source/shotwell/src/Commands.vala" - g_signal_handlers_disconnect_matched (_tmp0_, G_SIGNAL_MATCH_ID | G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA, _tmp1_, 0, NULL, (GCallback) _simple_proxyable_command_on_proxy_broken_source_proxy_broken, self); -#line 142 "/home/jens/Source/shotwell/src/Commands.vala" - simple_proxyable_command_clear_added_proxies (self); -#line 130 "/home/jens/Source/shotwell/src/Commands.vala" - _source_proxy_unref0 (self->priv->proxy); -#line 131 "/home/jens/Source/shotwell/src/Commands.vala" - _g_object_unref0 (self->priv->proxies); -#line 129 "/home/jens/Source/shotwell/src/Commands.vala" - G_OBJECT_CLASS (simple_proxyable_command_parent_class)->finalize (obj); -#line 4307 "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 4331 "Commands.c" -} - - -SinglePhotoTransformationCommand* -single_photo_transformation_command_construct (GType object_type, - Photo* photo, - const gchar* name, - const gchar* explanation) -{ - SinglePhotoTransformationCommand * self = NULL; - PhotoTransformationState* _tmp0_; - PhotoTransformationState* _tmp1_; -#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" - self = (SinglePhotoTransformationCommand*) single_data_source_command_construct (object_type, G_TYPE_CHECK_INSTANCE_CAST (photo, TYPE_DATA_SOURCE, DataSource), name, explanation); -#line 189 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp0_ = photo_save_transformation_state (photo); -#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 = _tmp0_; -#line 190 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp1_ = self->priv->state; -#line 190 "/home/jens/Source/shotwell/src/Commands.vala" - g_signal_connect_object (_tmp1_, "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 4364 "Commands.c" -} - - -static void -single_photo_transformation_command_real_undo (Command* base) -{ - SinglePhotoTransformationCommand * self; - DataSource* _tmp0_; - PhotoTransformationState* _tmp1_; -#line 197 "/home/jens/Source/shotwell/src/Commands.vala" - self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_SINGLE_PHOTO_TRANSFORMATION_COMMAND, SinglePhotoTransformationCommand); -#line 198 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp0_ = G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_SINGLE_DATA_SOURCE_COMMAND, SingleDataSourceCommand)->source; -#line 198 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp1_ = self->priv->state; -#line 198 "/home/jens/Source/shotwell/src/Commands.vala" - photo_load_transformation_state (G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, TYPE_PHOTO, Photo), _tmp1_); -#line 4382 "Commands.c" -} - - -static void -single_photo_transformation_command_on_state_broken (SinglePhotoTransformationCommand* self) -{ - CommandManager* _tmp0_; - CommandManager* _tmp1_; -#line 201 "/home/jens/Source/shotwell/src/Commands.vala" - g_return_if_fail (IS_SINGLE_PHOTO_TRANSFORMATION_COMMAND (self)); -#line 202 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp0_ = command_get_command_manager (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_COMMAND, Command)); -#line 202 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp1_ = _tmp0_; -#line 202 "/home/jens/Source/shotwell/src/Commands.vala" - command_manager_reset (_tmp1_); -#line 202 "/home/jens/Source/shotwell/src/Commands.vala" - _command_manager_unref0 (_tmp1_); -#line 4401 "Commands.c" -} - - -static void -single_photo_transformation_command_class_init (SinglePhotoTransformationCommandClass * klass) -{ -#line 183 "/home/jens/Source/shotwell/src/Commands.vala" - single_photo_transformation_command_parent_class = g_type_class_peek_parent (klass); -#line 183 "/home/jens/Source/shotwell/src/Commands.vala" - g_type_class_add_private (klass, sizeof (SinglePhotoTransformationCommandPrivate)); -#line 183 "/home/jens/Source/shotwell/src/Commands.vala" - ((CommandClass *) klass)->undo = (void (*) (Command *)) single_photo_transformation_command_real_undo; -#line 183 "/home/jens/Source/shotwell/src/Commands.vala" - G_OBJECT_CLASS (klass)->finalize = single_photo_transformation_command_finalize; -#line 4416 "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 4425 "Commands.c" -} - - -static void -single_photo_transformation_command_finalize (GObject * obj) -{ - SinglePhotoTransformationCommand * self; - PhotoTransformationState* _tmp0_; - guint _tmp1_; -#line 183 "/home/jens/Source/shotwell/src/Commands.vala" - self = G_TYPE_CHECK_INSTANCE_CAST (obj, TYPE_SINGLE_PHOTO_TRANSFORMATION_COMMAND, SinglePhotoTransformationCommand); -#line 194 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp0_ = self->priv->state; -#line 194 "/home/jens/Source/shotwell/src/Commands.vala" - g_signal_parse_name ("broken", TYPE_PHOTO_TRANSFORMATION_STATE, &_tmp1_, NULL, FALSE); -#line 194 "/home/jens/Source/shotwell/src/Commands.vala" - g_signal_handlers_disconnect_matched (_tmp0_, G_SIGNAL_MATCH_ID | G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA, _tmp1_, 0, NULL, (GCallback) _single_photo_transformation_command_on_state_broken_photo_transformation_state_broken, self); -#line 184 "/home/jens/Source/shotwell/src/Commands.vala" - _g_object_unref0 (self->priv->state); -#line 183 "/home/jens/Source/shotwell/src/Commands.vala" - G_OBJECT_CLASS (single_photo_transformation_command_parent_class)->finalize (obj); -#line 4447 "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 4471 "Commands.c" -} - - -GenericPhotoTransformationCommand* -generic_photo_transformation_command_construct (GType object_type, - Photo* photo, - const gchar* name, - const gchar* explanation) -{ - GenericPhotoTransformationCommand * self = 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" - self = (GenericPhotoTransformationCommand*) single_data_source_command_construct (object_type, G_TYPE_CHECK_INSTANCE_CAST (photo, TYPE_DATA_SOURCE, DataSource), name, explanation); -#line 210 "/home/jens/Source/shotwell/src/Commands.vala" - return self; -#line 4492 "Commands.c" -} - - -static void -generic_photo_transformation_command_real_execute (Command* base) -{ - GenericPhotoTransformationCommand * self; - Photo* photo = NULL; - DataSource* _tmp0_; - Photo* _tmp1_; - PhotoTransformationState* _tmp2_; - PhotoTransformationState* _tmp3_; - PhotoTransformationState* _tmp4_; - PhotoTransformationState* _tmp5_; -#line 222 "/home/jens/Source/shotwell/src/Commands.vala" - self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_GENERIC_PHOTO_TRANSFORMATION_COMMAND, GenericPhotoTransformationCommand); -#line 223 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp0_ = G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_SINGLE_DATA_SOURCE_COMMAND, SingleDataSourceCommand)->source; -#line 223 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp1_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, TYPE_PHOTO, Photo)); -#line 223 "/home/jens/Source/shotwell/src/Commands.vala" - photo = _tmp1_; -#line 225 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp2_ = photo_save_transformation_state (photo); -#line 225 "/home/jens/Source/shotwell/src/Commands.vala" - _g_object_unref0 (self->priv->original_state); -#line 225 "/home/jens/Source/shotwell/src/Commands.vala" - self->priv->original_state = _tmp2_; -#line 226 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp3_ = self->priv->original_state; -#line 226 "/home/jens/Source/shotwell/src/Commands.vala" - g_signal_connect_object (_tmp3_, "broken", (GCallback) _generic_photo_transformation_command_on_state_broken_photo_transformation_state_broken, self, 0); -#line 228 "/home/jens/Source/shotwell/src/Commands.vala" - generic_photo_transformation_command_execute_on_photo (self, photo); -#line 230 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp4_ = photo_save_transformation_state (photo); -#line 230 "/home/jens/Source/shotwell/src/Commands.vala" - _g_object_unref0 (self->priv->transformed_state); -#line 230 "/home/jens/Source/shotwell/src/Commands.vala" - self->priv->transformed_state = _tmp4_; -#line 231 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp5_ = self->priv->transformed_state; -#line 231 "/home/jens/Source/shotwell/src/Commands.vala" - g_signal_connect_object (_tmp5_, "broken", (GCallback) _generic_photo_transformation_command_on_state_broken_photo_transformation_state_broken, self, 0); -#line 222 "/home/jens/Source/shotwell/src/Commands.vala" - _g_object_unref0 (photo); -#line 4539 "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 4551 "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 4563 "Commands.c" -} - - -static void -generic_photo_transformation_command_real_undo (Command* base) -{ - GenericPhotoTransformationCommand * self; - DataSource* _tmp0_; - PhotoTransformationState* _tmp1_; -#line 236 "/home/jens/Source/shotwell/src/Commands.vala" - self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_GENERIC_PHOTO_TRANSFORMATION_COMMAND, GenericPhotoTransformationCommand); -#line 238 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp0_ = G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_SINGLE_DATA_SOURCE_COMMAND, SingleDataSourceCommand)->source; -#line 238 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp1_ = self->priv->original_state; -#line 238 "/home/jens/Source/shotwell/src/Commands.vala" - photo_load_transformation_state (G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, TYPE_PHOTO, Photo), _tmp1_); -#line 4581 "Commands.c" -} - - -static void -generic_photo_transformation_command_real_redo (Command* base) -{ - GenericPhotoTransformationCommand * self; - DataSource* _tmp0_; - PhotoTransformationState* _tmp1_; -#line 241 "/home/jens/Source/shotwell/src/Commands.vala" - self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_GENERIC_PHOTO_TRANSFORMATION_COMMAND, GenericPhotoTransformationCommand); -#line 243 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp0_ = G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_SINGLE_DATA_SOURCE_COMMAND, SingleDataSourceCommand)->source; -#line 243 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp1_ = self->priv->transformed_state; -#line 243 "/home/jens/Source/shotwell/src/Commands.vala" - photo_load_transformation_state (G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, TYPE_PHOTO, Photo), _tmp1_); -#line 4599 "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 4614 "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 4626 "Commands.c" -} - - -static gboolean -generic_photo_transformation_command_real_compress (Command* base, - Command* command) -{ - GenericPhotoTransformationCommand * self; - gboolean result = FALSE; - GenericPhotoTransformationCommand* generic = NULL; - GenericPhotoTransformationCommand* _tmp0_; - GenericPhotoTransformationCommand* _tmp1_; - GenericPhotoTransformationCommand* _tmp2_; - DataSource* _tmp3_; - DataSource* _tmp4_; - GenericPhotoTransformationCommand* _tmp5_; - GenericPhotoTransformationCommand* _tmp6_; - PhotoTransformationState* _tmp7_; - PhotoTransformationState* _tmp8_; -#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" - if (!generic_photo_transformation_command_can_compress (self, command)) { -#line 252 "/home/jens/Source/shotwell/src/Commands.vala" - result = FALSE; -#line 252 "/home/jens/Source/shotwell/src/Commands.vala" - return result; -#line 4656 "Commands.c" - } -#line 254 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp0_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_TYPE (command, TYPE_GENERIC_PHOTO_TRANSFORMATION_COMMAND) ? ((GenericPhotoTransformationCommand*) command) : NULL); -#line 254 "/home/jens/Source/shotwell/src/Commands.vala" - generic = _tmp0_; -#line 255 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp1_ = generic; -#line 255 "/home/jens/Source/shotwell/src/Commands.vala" - if (_tmp1_ == 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 4672 "Commands.c" - } -#line 258 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp2_ = generic; -#line 258 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp3_ = G_TYPE_CHECK_INSTANCE_CAST (_tmp2_, TYPE_SINGLE_DATA_SOURCE_COMMAND, SingleDataSourceCommand)->source; -#line 258 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp4_ = G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_SINGLE_DATA_SOURCE_COMMAND, SingleDataSourceCommand)->source; -#line 258 "/home/jens/Source/shotwell/src/Commands.vala" - if (_tmp3_ != _tmp4_) { -#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 4688 "Commands.c" - } -#line 262 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp5_ = generic; -#line 262 "/home/jens/Source/shotwell/src/Commands.vala" - command_execute (G_TYPE_CHECK_INSTANCE_CAST (_tmp5_, TYPE_COMMAND, Command)); -#line 265 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp6_ = generic; -#line 265 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp7_ = _tmp6_->priv->transformed_state; -#line 265 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp8_ = _g_object_ref0 (_tmp7_); -#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 = _tmp8_; -#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 4710 "Commands.c" -} - - -static void -generic_photo_transformation_command_on_state_broken (GenericPhotoTransformationCommand* self) -{ - CommandManager* _tmp0_; - CommandManager* _tmp1_; -#line 270 "/home/jens/Source/shotwell/src/Commands.vala" - g_return_if_fail (IS_GENERIC_PHOTO_TRANSFORMATION_COMMAND (self)); -#line 271 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp0_ = command_get_command_manager (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_COMMAND, Command)); -#line 271 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp1_ = _tmp0_; -#line 271 "/home/jens/Source/shotwell/src/Commands.vala" - command_manager_reset (_tmp1_); -#line 271 "/home/jens/Source/shotwell/src/Commands.vala" - _command_manager_unref0 (_tmp1_); -#line 4729 "Commands.c" -} - - -static void -generic_photo_transformation_command_class_init (GenericPhotoTransformationCommandClass * klass) -{ -#line 206 "/home/jens/Source/shotwell/src/Commands.vala" - generic_photo_transformation_command_parent_class = g_type_class_peek_parent (klass); -#line 206 "/home/jens/Source/shotwell/src/Commands.vala" - g_type_class_add_private (klass, sizeof (GenericPhotoTransformationCommandPrivate)); -#line 206 "/home/jens/Source/shotwell/src/Commands.vala" - ((CommandClass *) klass)->execute = (void (*) (Command *)) generic_photo_transformation_command_real_execute; -#line 206 "/home/jens/Source/shotwell/src/Commands.vala" - ((GenericPhotoTransformationCommandClass *) klass)->execute_on_photo = (void (*) (GenericPhotoTransformationCommand *, Photo*)) generic_photo_transformation_command_real_execute_on_photo; -#line 206 "/home/jens/Source/shotwell/src/Commands.vala" - ((CommandClass *) klass)->undo = (void (*) (Command *)) generic_photo_transformation_command_real_undo; -#line 206 "/home/jens/Source/shotwell/src/Commands.vala" - ((CommandClass *) klass)->redo = (void (*) (Command *)) generic_photo_transformation_command_real_redo; -#line 206 "/home/jens/Source/shotwell/src/Commands.vala" - ((GenericPhotoTransformationCommandClass *) klass)->can_compress = (gboolean (*) (GenericPhotoTransformationCommand *, Command*)) generic_photo_transformation_command_real_can_compress; -#line 206 "/home/jens/Source/shotwell/src/Commands.vala" - ((CommandClass *) klass)->compress = (gboolean (*) (Command *, Command*)) generic_photo_transformation_command_real_compress; -#line 206 "/home/jens/Source/shotwell/src/Commands.vala" - G_OBJECT_CLASS (klass)->finalize = generic_photo_transformation_command_finalize; -#line 4754 "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 4767 "Commands.c" -} - - -static void -generic_photo_transformation_command_finalize (GObject * obj) -{ - GenericPhotoTransformationCommand * self; - PhotoTransformationState* _tmp0_; - PhotoTransformationState* _tmp3_; -#line 206 "/home/jens/Source/shotwell/src/Commands.vala" - self = G_TYPE_CHECK_INSTANCE_CAST (obj, TYPE_GENERIC_PHOTO_TRANSFORMATION_COMMAND, GenericPhotoTransformationCommand); -#line 215 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp0_ = self->priv->original_state; -#line 215 "/home/jens/Source/shotwell/src/Commands.vala" - if (_tmp0_ != NULL) { -#line 4783 "Commands.c" - PhotoTransformationState* _tmp1_; - guint _tmp2_; -#line 216 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp1_ = self->priv->original_state; -#line 216 "/home/jens/Source/shotwell/src/Commands.vala" - g_signal_parse_name ("broken", TYPE_PHOTO_TRANSFORMATION_STATE, &_tmp2_, NULL, FALSE); -#line 216 "/home/jens/Source/shotwell/src/Commands.vala" - g_signal_handlers_disconnect_matched (_tmp1_, G_SIGNAL_MATCH_ID | G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA, _tmp2_, 0, NULL, (GCallback) _generic_photo_transformation_command_on_state_broken_photo_transformation_state_broken, self); -#line 4792 "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 4798 "Commands.c" - PhotoTransformationState* _tmp4_; - guint _tmp5_; -#line 219 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp4_ = self->priv->transformed_state; -#line 219 "/home/jens/Source/shotwell/src/Commands.vala" - g_signal_parse_name ("broken", TYPE_PHOTO_TRANSFORMATION_STATE, &_tmp5_, NULL, FALSE); -#line 219 "/home/jens/Source/shotwell/src/Commands.vala" - g_signal_handlers_disconnect_matched (_tmp4_, G_SIGNAL_MATCH_ID | G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA, _tmp5_, 0, NULL, (GCallback) _generic_photo_transformation_command_on_state_broken_photo_transformation_state_broken, self); -#line 4807 "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 4815 "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 4840 "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; - gchar* _tmp0_; - gchar* _tmp1_; -#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" - self = (MultipleDataSourceCommand*) page_command_construct (object_type, name, explanation); -#line 289 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp0_ = g_strdup (progress_text); -#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 = _tmp0_; -#line 290 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp1_ = g_strdup (undo_progress_text); -#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 = _tmp1_; -#line 4879 "Commands.c" - { - GeeIterator* _view_it = NULL; - GeeIterator* _tmp2_; -#line 292 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp2_ = gee_iterable_iterator (iter); -#line 292 "/home/jens/Source/shotwell/src/Commands.vala" - _view_it = _tmp2_; -#line 292 "/home/jens/Source/shotwell/src/Commands.vala" - while (TRUE) { -#line 4889 "Commands.c" - GeeIterator* _tmp3_; - DataView* view = NULL; - GeeIterator* _tmp4_; - gpointer _tmp5_; - DataSource* source = NULL; - DataView* _tmp6_; - DataSource* _tmp7_; - SourceCollection* collection = NULL; - DataSource* _tmp8_; - DataCollection* _tmp9_; - SourceCollection* _tmp10_; - GeeArrayList* _tmp13_; - DataSource* _tmp14_; -#line 292 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp3_ = _view_it; -#line 292 "/home/jens/Source/shotwell/src/Commands.vala" - if (!gee_iterator_next (_tmp3_)) { -#line 292 "/home/jens/Source/shotwell/src/Commands.vala" - break; -#line 4909 "Commands.c" - } -#line 292 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp4_ = _view_it; -#line 292 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp5_ = gee_iterator_get (_tmp4_); -#line 292 "/home/jens/Source/shotwell/src/Commands.vala" - view = (DataView*) _tmp5_; -#line 293 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp6_ = view; -#line 293 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp7_ = data_view_get_source (_tmp6_); -#line 293 "/home/jens/Source/shotwell/src/Commands.vala" - source = _tmp7_; -#line 294 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp8_ = source; -#line 294 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp9_ = data_object_get_membership (G_TYPE_CHECK_INSTANCE_CAST (_tmp8_, TYPE_DATA_OBJECT, DataObject)); -#line 294 "/home/jens/Source/shotwell/src/Commands.vala" - collection = G_TYPE_CHECK_INSTANCE_CAST (_tmp9_, TYPE_SOURCE_COLLECTION, SourceCollection); -#line 296 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp10_ = collection; -#line 296 "/home/jens/Source/shotwell/src/Commands.vala" - if (_tmp10_ != NULL) { -#line 4933 "Commands.c" - GeeHashSet* _tmp11_; - SourceCollection* _tmp12_; -#line 297 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp11_ = self->priv->hooked_collections; -#line 297 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp12_ = collection; -#line 297 "/home/jens/Source/shotwell/src/Commands.vala" - gee_abstract_collection_add (G_TYPE_CHECK_INSTANCE_CAST (_tmp11_, GEE_TYPE_ABSTRACT_COLLECTION, GeeAbstractCollection), _tmp12_); -#line 4942 "Commands.c" - } -#line 299 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp13_ = self->source_list; -#line 299 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp14_ = source; -#line 299 "/home/jens/Source/shotwell/src/Commands.vala" - gee_abstract_collection_add (G_TYPE_CHECK_INSTANCE_CAST (_tmp13_, GEE_TYPE_ABSTRACT_COLLECTION, GeeAbstractCollection), _tmp14_); -#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 4956 "Commands.c" - } -#line 292 "/home/jens/Source/shotwell/src/Commands.vala" - _g_object_unref0 (_view_it); -#line 4960 "Commands.c" - } - { - GeeIterator* _current_collection_it = NULL; - GeeHashSet* _tmp15_; - GeeIterator* _tmp16_; -#line 302 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp15_ = self->priv->hooked_collections; -#line 302 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp16_ = gee_abstract_collection_iterator (G_TYPE_CHECK_INSTANCE_CAST (_tmp15_, GEE_TYPE_ABSTRACT_COLLECTION, GeeAbstractCollection)); -#line 302 "/home/jens/Source/shotwell/src/Commands.vala" - _current_collection_it = _tmp16_; -#line 302 "/home/jens/Source/shotwell/src/Commands.vala" - while (TRUE) { -#line 4974 "Commands.c" - GeeIterator* _tmp17_; - SourceCollection* current_collection = NULL; - GeeIterator* _tmp18_; - gpointer _tmp19_; - SourceCollection* _tmp20_; -#line 302 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp17_ = _current_collection_it; -#line 302 "/home/jens/Source/shotwell/src/Commands.vala" - if (!gee_iterator_next (_tmp17_)) { -#line 302 "/home/jens/Source/shotwell/src/Commands.vala" - break; -#line 4986 "Commands.c" - } -#line 302 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp18_ = _current_collection_it; -#line 302 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp19_ = gee_iterator_get (_tmp18_); -#line 302 "/home/jens/Source/shotwell/src/Commands.vala" - current_collection = (SourceCollection*) _tmp19_; -#line 303 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp20_ = current_collection; -#line 303 "/home/jens/Source/shotwell/src/Commands.vala" - g_signal_connect_object (_tmp20_, "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 5000 "Commands.c" - } -#line 302 "/home/jens/Source/shotwell/src/Commands.vala" - _g_object_unref0 (_current_collection_it); -#line 5004 "Commands.c" - } -#line 285 "/home/jens/Source/shotwell/src/Commands.vala" - return self; -#line 5008 "Commands.c" -} - - -GeeIterable* -multiple_data_source_command_get_sources (MultipleDataSourceCommand* self) -{ - GeeIterable* result = NULL; - GeeArrayList* _tmp0_; - GeeIterable* _tmp1_; -#line 313 "/home/jens/Source/shotwell/src/Commands.vala" - g_return_val_if_fail (IS_MULTIPLE_DATA_SOURCE_COMMAND (self), NULL); -#line 314 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp0_ = self->source_list; -#line 314 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp1_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, GEE_TYPE_ITERABLE, GeeIterable)); -#line 314 "/home/jens/Source/shotwell/src/Commands.vala" - result = _tmp1_; -#line 314 "/home/jens/Source/shotwell/src/Commands.vala" - return result; -#line 5028 "Commands.c" -} - - -gint -multiple_data_source_command_get_source_count (MultipleDataSourceCommand* self) -{ - gint result = 0; - GeeArrayList* _tmp0_; - gint _tmp1_; - gint _tmp2_; -#line 317 "/home/jens/Source/shotwell/src/Commands.vala" - g_return_val_if_fail (IS_MULTIPLE_DATA_SOURCE_COMMAND (self), 0); -#line 318 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp0_ = self->source_list; -#line 318 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp1_ = gee_abstract_collection_get_size (G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, GEE_TYPE_ABSTRACT_COLLECTION, GeeAbstractCollection)); -#line 318 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp2_ = _tmp1_; -#line 318 "/home/jens/Source/shotwell/src/Commands.vala" - result = _tmp2_; -#line 318 "/home/jens/Source/shotwell/src/Commands.vala" - return result; -#line 5051 "Commands.c" -} - - -static void -multiple_data_source_command_on_source_destroyed (MultipleDataSourceCommand* self, - DataSource* source) -{ - GeeArrayList* _tmp0_; -#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" - if (gee_abstract_collection_contains (G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, GEE_TYPE_ABSTRACT_COLLECTION, GeeAbstractCollection), source)) { -#line 5068 "Commands.c" - CommandManager* _tmp1_; - CommandManager* _tmp2_; -#line 325 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp1_ = command_get_command_manager (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_COMMAND, Command)); -#line 325 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp2_ = _tmp1_; -#line 325 "/home/jens/Source/shotwell/src/Commands.vala" - command_manager_reset (_tmp2_); -#line 325 "/home/jens/Source/shotwell/src/Commands.vala" - _command_manager_unref0 (_tmp2_); -#line 5079 "Commands.c" - } -} - - -static void -multiple_data_source_command_real_execute (Command* base) -{ - MultipleDataSourceCommand * self; - GeeArrayList* _tmp0_; - GeeArrayList* _tmp1_; - GeeArrayList* _tmp2_; -#line 328 "/home/jens/Source/shotwell/src/Commands.vala" - self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_MULTIPLE_DATA_SOURCE_COMMAND, MultipleDataSourceCommand); -#line 329 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp0_ = self->priv->acted_upon; -#line 329 "/home/jens/Source/shotwell/src/Commands.vala" - gee_abstract_collection_clear (G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, GEE_TYPE_ABSTRACT_COLLECTION, GeeAbstractCollection)); -#line 331 "/home/jens/Source/shotwell/src/Commands.vala" - multiple_data_source_command_start_transaction (self); -#line 332 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp1_ = self->source_list; -#line 332 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp2_ = self->priv->acted_upon; -#line 332 "/home/jens/Source/shotwell/src/Commands.vala" - multiple_data_source_command_execute_all (self, TRUE, TRUE, _tmp1_, _tmp2_); -#line 333 "/home/jens/Source/shotwell/src/Commands.vala" - multiple_data_source_command_commit_transaction (self); -#line 5107 "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 5119 "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 5131 "Commands.c" -} - - -static void -multiple_data_source_command_real_undo (Command* base) -{ - MultipleDataSourceCommand * self; - GeeArrayList* _tmp0_; - gint _tmp1_; - gint _tmp2_; -#line 338 "/home/jens/Source/shotwell/src/Commands.vala" - self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_MULTIPLE_DATA_SOURCE_COMMAND, MultipleDataSourceCommand); -#line 339 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp0_ = self->priv->acted_upon; -#line 339 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp1_ = gee_abstract_collection_get_size (G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, GEE_TYPE_ABSTRACT_COLLECTION, GeeAbstractCollection)); -#line 339 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp2_ = _tmp1_; -#line 339 "/home/jens/Source/shotwell/src/Commands.vala" - if (_tmp2_ > 0) { -#line 5152 "Commands.c" - GeeArrayList* _tmp3_; - GeeArrayList* _tmp4_; -#line 340 "/home/jens/Source/shotwell/src/Commands.vala" - multiple_data_source_command_start_transaction (self); -#line 341 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp3_ = self->priv->acted_upon; -#line 341 "/home/jens/Source/shotwell/src/Commands.vala" - multiple_data_source_command_execute_all (self, FALSE, FALSE, _tmp3_, NULL); -#line 342 "/home/jens/Source/shotwell/src/Commands.vala" - multiple_data_source_command_commit_transaction (self); -#line 344 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp4_ = self->priv->acted_upon; -#line 344 "/home/jens/Source/shotwell/src/Commands.vala" - gee_abstract_collection_clear (G_TYPE_CHECK_INSTANCE_CAST (_tmp4_, GEE_TYPE_ABSTRACT_COLLECTION, GeeAbstractCollection)); -#line 5167 "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 5180 "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 5192 "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 5201 "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 5210 "Commands.c" - { - GeeIterator* _sources_it = NULL; - GeeHashSet* _tmp0_; - GeeIterator* _tmp1_; -#line 351 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp0_ = self->priv->hooked_collections; -#line 351 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp1_ = gee_abstract_collection_iterator (G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, GEE_TYPE_ABSTRACT_COLLECTION, GeeAbstractCollection)); -#line 351 "/home/jens/Source/shotwell/src/Commands.vala" - _sources_it = _tmp1_; -#line 351 "/home/jens/Source/shotwell/src/Commands.vala" - while (TRUE) { -#line 5223 "Commands.c" - GeeIterator* _tmp2_; - SourceCollection* sources = NULL; - GeeIterator* _tmp3_; - gpointer _tmp4_; - MediaSourceCollection* media_collection = NULL; - SourceCollection* _tmp5_; - MediaSourceCollection* _tmp6_; - MediaSourceCollection* _tmp7_; -#line 351 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp2_ = _sources_it; -#line 351 "/home/jens/Source/shotwell/src/Commands.vala" - if (!gee_iterator_next (_tmp2_)) { -#line 351 "/home/jens/Source/shotwell/src/Commands.vala" - break; -#line 5238 "Commands.c" - } -#line 351 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp3_ = _sources_it; -#line 351 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp4_ = gee_iterator_get (_tmp3_); -#line 351 "/home/jens/Source/shotwell/src/Commands.vala" - sources = (SourceCollection*) _tmp4_; -#line 352 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp5_ = sources; -#line 352 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp6_ = _data_collection_ref0 (G_TYPE_CHECK_INSTANCE_TYPE (_tmp5_, TYPE_MEDIA_SOURCE_COLLECTION) ? ((MediaSourceCollection*) _tmp5_) : NULL); -#line 352 "/home/jens/Source/shotwell/src/Commands.vala" - media_collection = _tmp6_; -#line 353 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp7_ = media_collection; -#line 353 "/home/jens/Source/shotwell/src/Commands.vala" - if (_tmp7_ != NULL) { -#line 5256 "Commands.c" - MediaSourceCollection* _tmp8_; - TransactionController* _tmp9_; - TransactionController* _tmp10_; -#line 354 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp8_ = media_collection; -#line 354 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp9_ = media_source_collection_get_transaction_controller (_tmp8_); -#line 354 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp10_ = _tmp9_; -#line 354 "/home/jens/Source/shotwell/src/Commands.vala" - transaction_controller_begin (_tmp10_); -#line 5268 "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 5274 "Commands.c" - } -#line 351 "/home/jens/Source/shotwell/src/Commands.vala" - _g_object_unref0 (_sources_it); -#line 5278 "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 5288 "Commands.c" - { - GeeIterator* _sources_it = NULL; - GeeHashSet* _tmp0_; - GeeIterator* _tmp1_; -#line 359 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp0_ = self->priv->hooked_collections; -#line 359 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp1_ = gee_abstract_collection_iterator (G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, GEE_TYPE_ABSTRACT_COLLECTION, GeeAbstractCollection)); -#line 359 "/home/jens/Source/shotwell/src/Commands.vala" - _sources_it = _tmp1_; -#line 359 "/home/jens/Source/shotwell/src/Commands.vala" - while (TRUE) { -#line 5301 "Commands.c" - GeeIterator* _tmp2_; - SourceCollection* sources = NULL; - GeeIterator* _tmp3_; - gpointer _tmp4_; - MediaSourceCollection* media_collection = NULL; - SourceCollection* _tmp5_; - MediaSourceCollection* _tmp6_; - MediaSourceCollection* _tmp7_; -#line 359 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp2_ = _sources_it; -#line 359 "/home/jens/Source/shotwell/src/Commands.vala" - if (!gee_iterator_next (_tmp2_)) { -#line 359 "/home/jens/Source/shotwell/src/Commands.vala" - break; -#line 5316 "Commands.c" - } -#line 359 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp3_ = _sources_it; -#line 359 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp4_ = gee_iterator_get (_tmp3_); -#line 359 "/home/jens/Source/shotwell/src/Commands.vala" - sources = (SourceCollection*) _tmp4_; -#line 360 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp5_ = sources; -#line 360 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp6_ = _data_collection_ref0 (G_TYPE_CHECK_INSTANCE_TYPE (_tmp5_, TYPE_MEDIA_SOURCE_COLLECTION) ? ((MediaSourceCollection*) _tmp5_) : NULL); -#line 360 "/home/jens/Source/shotwell/src/Commands.vala" - media_collection = _tmp6_; -#line 361 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp7_ = media_collection; -#line 361 "/home/jens/Source/shotwell/src/Commands.vala" - if (_tmp7_ != NULL) { -#line 5334 "Commands.c" - MediaSourceCollection* _tmp8_; - TransactionController* _tmp9_; - TransactionController* _tmp10_; -#line 362 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp8_ = media_collection; -#line 362 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp9_ = media_source_collection_get_transaction_controller (_tmp8_); -#line 362 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp10_ = _tmp9_; -#line 362 "/home/jens/Source/shotwell/src/Commands.vala" - transaction_controller_commit (_tmp10_); -#line 5346 "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 5352 "Commands.c" - } -#line 359 "/home/jens/Source/shotwell/src/Commands.vala" - _g_object_unref0 (_sources_it); -#line 5356 "Commands.c" - } -} - - -static void -multiple_data_source_command_execute_all (MultipleDataSourceCommand* self, - gboolean exec, - gboolean can_cancel, - GeeArrayList* todo, - GeeArrayList* completed) -{ - AppWindow* _tmp0_; - AppWindow* _tmp1_; - gint count = 0; - gint total = 0; - gint _tmp2_; - gint _tmp3_; - gint two_percent = 0; - gint _tmp4_; - gint _tmp5_; - const gchar* _tmp6_ = NULL; - gchar* text = NULL; - gchar* _tmp9_; - GCancellable* cancellable = NULL; - ProgressDialog* progress = NULL; - gint _tmp10_; - ProgressDialog* _tmp42_; - AppWindow* _tmp44_; - AppWindow* _tmp45_; -#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_ = gee_abstract_collection_get_size (G_TYPE_CHECK_INSTANCE_CAST (todo, GEE_TYPE_ABSTRACT_COLLECTION, GeeAbstractCollection)); -#line 371 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp3_ = _tmp2_; -#line 371 "/home/jens/Source/shotwell/src/Commands.vala" - total = _tmp3_; -#line 372 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp4_ = total; -#line 372 "/home/jens/Source/shotwell/src/Commands.vala" - two_percent = (gint) (((gdouble) _tmp4_) / 50.0); -#line 373 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp5_ = two_percent; -#line 373 "/home/jens/Source/shotwell/src/Commands.vala" - if (_tmp5_ <= 0) { -#line 374 "/home/jens/Source/shotwell/src/Commands.vala" - two_percent = 1; -#line 5418 "Commands.c" - } -#line 376 "/home/jens/Source/shotwell/src/Commands.vala" - if (exec) { -#line 5422 "Commands.c" - const gchar* _tmp7_; -#line 376 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp7_ = self->priv->progress_text; -#line 376 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp6_ = _tmp7_; -#line 5428 "Commands.c" - } else { - const gchar* _tmp8_; -#line 376 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp8_ = self->priv->undo_progress_text; -#line 376 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp6_ = _tmp8_; -#line 5435 "Commands.c" - } -#line 376 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp9_ = g_strdup (_tmp6_); -#line 376 "/home/jens/Source/shotwell/src/Commands.vala" - text = _tmp9_; -#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" - _tmp10_ = total; -#line 380 "/home/jens/Source/shotwell/src/Commands.vala" - if (_tmp10_ >= MULTIPLE_DATA_SOURCE_COMMAND_MIN_OPS_FOR_PROGRESS_WINDOW) { -#line 5449 "Commands.c" - GCancellable* _tmp11_ = NULL; - GCancellable* _tmp13_; - AppWindow* _tmp14_; - AppWindow* _tmp15_; - const gchar* _tmp16_; - GCancellable* _tmp17_; - ProgressDialog* _tmp18_; -#line 381 "/home/jens/Source/shotwell/src/Commands.vala" - if (can_cancel) { -#line 5459 "Commands.c" - GCancellable* _tmp12_; -#line 381 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp12_ = g_cancellable_new (); -#line 381 "/home/jens/Source/shotwell/src/Commands.vala" - _g_object_unref0 (_tmp11_); -#line 381 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp11_ = _tmp12_; -#line 5467 "Commands.c" - } else { -#line 381 "/home/jens/Source/shotwell/src/Commands.vala" - _g_object_unref0 (_tmp11_); -#line 381 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp11_ = NULL; -#line 5473 "Commands.c" - } -#line 381 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp13_ = _g_object_ref0 (_tmp11_); -#line 381 "/home/jens/Source/shotwell/src/Commands.vala" - _g_object_unref0 (cancellable); -#line 381 "/home/jens/Source/shotwell/src/Commands.vala" - cancellable = _tmp13_; -#line 382 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp14_ = app_window_get_instance (); -#line 382 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp15_ = _tmp14_; -#line 382 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp16_ = text; -#line 382 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp17_ = cancellable; -#line 382 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp18_ = progress_dialog_new (G_TYPE_CHECK_INSTANCE_CAST (_tmp15_, gtk_window_get_type (), GtkWindow), _tmp16_, _tmp17_); -#line 382 "/home/jens/Source/shotwell/src/Commands.vala" - g_object_ref_sink (_tmp18_); -#line 382 "/home/jens/Source/shotwell/src/Commands.vala" - _g_object_unref0 (progress); -#line 382 "/home/jens/Source/shotwell/src/Commands.vala" - progress = _tmp18_; -#line 382 "/home/jens/Source/shotwell/src/Commands.vala" - _g_object_unref0 (_tmp15_); -#line 380 "/home/jens/Source/shotwell/src/Commands.vala" - _g_object_unref0 (_tmp11_); -#line 5501 "Commands.c" - } - { - GeeArrayList* _source_list = NULL; - GeeArrayList* _tmp19_; - gint _source_size = 0; - GeeArrayList* _tmp20_; - gint _tmp21_; - gint _tmp22_; - gint _source_index = 0; -#line 385 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp19_ = _g_object_ref0 (todo); -#line 385 "/home/jens/Source/shotwell/src/Commands.vala" - _source_list = _tmp19_; -#line 385 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp20_ = _source_list; -#line 385 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp21_ = gee_abstract_collection_get_size (G_TYPE_CHECK_INSTANCE_CAST (_tmp20_, GEE_TYPE_ABSTRACT_COLLECTION, GeeAbstractCollection)); -#line 385 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp22_ = _tmp21_; -#line 385 "/home/jens/Source/shotwell/src/Commands.vala" - _source_size = _tmp22_; -#line 385 "/home/jens/Source/shotwell/src/Commands.vala" - _source_index = -1; -#line 385 "/home/jens/Source/shotwell/src/Commands.vala" - while (TRUE) { -#line 5527 "Commands.c" - gint _tmp23_; - gint _tmp24_; - gint _tmp25_; - DataSource* source = NULL; - GeeArrayList* _tmp26_; - gint _tmp27_; - gpointer _tmp28_; - ProgressDialog* _tmp32_; -#line 385 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp23_ = _source_index; -#line 385 "/home/jens/Source/shotwell/src/Commands.vala" - _source_index = _tmp23_ + 1; -#line 385 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp24_ = _source_index; -#line 385 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp25_ = _source_size; -#line 385 "/home/jens/Source/shotwell/src/Commands.vala" - if (!(_tmp24_ < _tmp25_)) { -#line 385 "/home/jens/Source/shotwell/src/Commands.vala" - break; -#line 5548 "Commands.c" - } -#line 385 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp26_ = _source_list; -#line 385 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp27_ = _source_index; -#line 385 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp28_ = gee_abstract_list_get (G_TYPE_CHECK_INSTANCE_CAST (_tmp26_, GEE_TYPE_ABSTRACT_LIST, GeeAbstractList), _tmp27_); -#line 385 "/home/jens/Source/shotwell/src/Commands.vala" - source = (DataSource*) _tmp28_; -#line 386 "/home/jens/Source/shotwell/src/Commands.vala" - if (exec) { -#line 5560 "Commands.c" - DataSource* _tmp29_; -#line 387 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp29_ = source; -#line 387 "/home/jens/Source/shotwell/src/Commands.vala" - multiple_data_source_command_execute_on_source (self, _tmp29_); -#line 5566 "Commands.c" - } else { - DataSource* _tmp30_; -#line 389 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp30_ = source; -#line 389 "/home/jens/Source/shotwell/src/Commands.vala" - multiple_data_source_command_undo_on_source (self, _tmp30_); -#line 5573 "Commands.c" - } -#line 391 "/home/jens/Source/shotwell/src/Commands.vala" - if (completed != NULL) { -#line 5577 "Commands.c" - DataSource* _tmp31_; -#line 392 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp31_ = source; -#line 392 "/home/jens/Source/shotwell/src/Commands.vala" - gee_abstract_collection_add (G_TYPE_CHECK_INSTANCE_CAST (completed, GEE_TYPE_ABSTRACT_COLLECTION, GeeAbstractCollection), _tmp31_); -#line 5583 "Commands.c" - } -#line 394 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp32_ = progress; -#line 394 "/home/jens/Source/shotwell/src/Commands.vala" - if (_tmp32_ != NULL) { -#line 5589 "Commands.c" - gint _tmp33_; - gint _tmp34_; - gint _tmp35_; - gboolean _tmp39_ = FALSE; - GCancellable* _tmp40_; -#line 395 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp33_ = count; -#line 395 "/home/jens/Source/shotwell/src/Commands.vala" - count = _tmp33_ + 1; -#line 395 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp34_ = count; -#line 395 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp35_ = two_percent; -#line 395 "/home/jens/Source/shotwell/src/Commands.vala" - if ((_tmp34_ % _tmp35_) == 0) { -#line 5605 "Commands.c" - ProgressDialog* _tmp36_; - gint _tmp37_; - gint _tmp38_; -#line 396 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp36_ = progress; -#line 396 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp37_ = count; -#line 396 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp38_ = total; -#line 396 "/home/jens/Source/shotwell/src/Commands.vala" - progress_dialog_set_fraction (_tmp36_, _tmp37_, _tmp38_); -#line 397 "/home/jens/Source/shotwell/src/Commands.vala" - spin_event_loop (); -#line 5619 "Commands.c" - } -#line 400 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp40_ = cancellable; -#line 400 "/home/jens/Source/shotwell/src/Commands.vala" - if (_tmp40_ != NULL) { -#line 5625 "Commands.c" - GCancellable* _tmp41_; -#line 400 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp41_ = cancellable; -#line 400 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp39_ = g_cancellable_is_cancelled (_tmp41_); -#line 5631 "Commands.c" - } else { -#line 400 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp39_ = FALSE; -#line 5635 "Commands.c" - } -#line 400 "/home/jens/Source/shotwell/src/Commands.vala" - if (_tmp39_) { -#line 401 "/home/jens/Source/shotwell/src/Commands.vala" - _g_object_unref0 (source); -#line 401 "/home/jens/Source/shotwell/src/Commands.vala" - break; -#line 5643 "Commands.c" - } - } -#line 385 "/home/jens/Source/shotwell/src/Commands.vala" - _g_object_unref0 (source); -#line 5648 "Commands.c" - } -#line 385 "/home/jens/Source/shotwell/src/Commands.vala" - _g_object_unref0 (_source_list); -#line 5652 "Commands.c" - } -#line 405 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp42_ = progress; -#line 405 "/home/jens/Source/shotwell/src/Commands.vala" - if (_tmp42_ != NULL) { -#line 5658 "Commands.c" - ProgressDialog* _tmp43_; -#line 406 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp43_ = progress; -#line 406 "/home/jens/Source/shotwell/src/Commands.vala" - progress_dialog_close (_tmp43_); -#line 5664 "Commands.c" - } -#line 408 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp44_ = app_window_get_instance (); -#line 408 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp45_ = _tmp44_; -#line 408 "/home/jens/Source/shotwell/src/Commands.vala" - page_window_set_normal_cursor (G_TYPE_CHECK_INSTANCE_CAST (_tmp45_, TYPE_PAGE_WINDOW, PageWindow)); -#line 408 "/home/jens/Source/shotwell/src/Commands.vala" - _g_object_unref0 (_tmp45_); -#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 5680 "Commands.c" -} - - -static void -multiple_data_source_command_class_init (MultipleDataSourceCommandClass * klass) -{ -#line 275 "/home/jens/Source/shotwell/src/Commands.vala" - multiple_data_source_command_parent_class = g_type_class_peek_parent (klass); -#line 275 "/home/jens/Source/shotwell/src/Commands.vala" - g_type_class_add_private (klass, sizeof (MultipleDataSourceCommandPrivate)); -#line 275 "/home/jens/Source/shotwell/src/Commands.vala" - ((CommandClass *) klass)->execute = (void (*) (Command *)) multiple_data_source_command_real_execute; -#line 275 "/home/jens/Source/shotwell/src/Commands.vala" - ((MultipleDataSourceCommandClass *) klass)->execute_on_source = (void (*) (MultipleDataSourceCommand *, DataSource*)) multiple_data_source_command_real_execute_on_source; -#line 275 "/home/jens/Source/shotwell/src/Commands.vala" - ((CommandClass *) klass)->undo = (void (*) (Command *)) multiple_data_source_command_real_undo; -#line 275 "/home/jens/Source/shotwell/src/Commands.vala" - ((MultipleDataSourceCommandClass *) klass)->undo_on_source = (void (*) (MultipleDataSourceCommand *, DataSource*)) multiple_data_source_command_real_undo_on_source; -#line 275 "/home/jens/Source/shotwell/src/Commands.vala" - G_OBJECT_CLASS (klass)->finalize = multiple_data_source_command_finalize; -#line 5701 "Commands.c" -} - - -static void -multiple_data_source_command_instance_init (MultipleDataSourceCommand * self) -{ - GeeArrayList* _tmp0_; - GeeArrayList* _tmp1_; - GeeHashSet* _tmp2_; -#line 275 "/home/jens/Source/shotwell/src/Commands.vala" - self->priv = MULTIPLE_DATA_SOURCE_COMMAND_GET_PRIVATE (self); -#line 278 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp0_ = gee_array_list_new (TYPE_DATA_SOURCE, (GBoxedCopyFunc) g_object_ref, (GDestroyNotify) g_object_unref, NULL, NULL, NULL); -#line 278 "/home/jens/Source/shotwell/src/Commands.vala" - self->source_list = _tmp0_; -#line 282 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp1_ = gee_array_list_new (TYPE_DATA_SOURCE, (GBoxedCopyFunc) g_object_ref, (GDestroyNotify) g_object_unref, NULL, NULL, NULL); -#line 282 "/home/jens/Source/shotwell/src/Commands.vala" - self->priv->acted_upon = _tmp1_; -#line 283 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp2_ = gee_hash_set_new (TYPE_SOURCE_COLLECTION, (GBoxedCopyFunc) data_collection_ref, (GDestroyNotify) data_collection_unref, NULL, NULL, NULL, NULL, NULL, NULL); -#line 283 "/home/jens/Source/shotwell/src/Commands.vala" - self->priv->hooked_collections = _tmp2_; -#line 5725 "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 5735 "Commands.c" - { - GeeIterator* _current_collection_it = NULL; - GeeHashSet* _tmp0_; - GeeIterator* _tmp1_; -#line 308 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp0_ = self->priv->hooked_collections; -#line 308 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp1_ = gee_abstract_collection_iterator (G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, GEE_TYPE_ABSTRACT_COLLECTION, GeeAbstractCollection)); -#line 308 "/home/jens/Source/shotwell/src/Commands.vala" - _current_collection_it = _tmp1_; -#line 308 "/home/jens/Source/shotwell/src/Commands.vala" - while (TRUE) { -#line 5748 "Commands.c" - GeeIterator* _tmp2_; - SourceCollection* current_collection = NULL; - GeeIterator* _tmp3_; - gpointer _tmp4_; - SourceCollection* _tmp5_; - guint _tmp6_; -#line 308 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp2_ = _current_collection_it; -#line 308 "/home/jens/Source/shotwell/src/Commands.vala" - if (!gee_iterator_next (_tmp2_)) { -#line 308 "/home/jens/Source/shotwell/src/Commands.vala" - break; -#line 5761 "Commands.c" - } -#line 308 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp3_ = _current_collection_it; -#line 308 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp4_ = gee_iterator_get (_tmp3_); -#line 308 "/home/jens/Source/shotwell/src/Commands.vala" - current_collection = (SourceCollection*) _tmp4_; -#line 309 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp5_ = current_collection; -#line 309 "/home/jens/Source/shotwell/src/Commands.vala" - g_signal_parse_name ("item-destroyed", TYPE_SOURCE_COLLECTION, &_tmp6_, NULL, FALSE); -#line 309 "/home/jens/Source/shotwell/src/Commands.vala" - g_signal_handlers_disconnect_matched (_tmp5_, G_SIGNAL_MATCH_ID | G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA, _tmp6_, 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 5777 "Commands.c" - } -#line 308 "/home/jens/Source/shotwell/src/Commands.vala" - _g_object_unref0 (_current_collection_it); -#line 5781 "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 5795 "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 5820 "Commands.c" -} - - -MultipleDataSourceAtOnceCommand* -multiple_data_source_at_once_command_construct (GType object_type, - GeeCollection* sources, - const gchar* name, - const gchar* explanation) -{ - MultipleDataSourceAtOnceCommand * self = NULL; - GeeHashSet* _tmp0_; -#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" - self = (MultipleDataSourceAtOnceCommand*) page_command_construct (object_type, name, explanation); -#line 421 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp0_ = self->priv->sources; -#line 421 "/home/jens/Source/shotwell/src/Commands.vala" - gee_collection_add_all (G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, GEE_TYPE_COLLECTION, GeeCollection), sources); -#line 5844 "Commands.c" - { - GeeIterator* _source_it = NULL; - GeeHashSet* _tmp1_; - GeeIterator* _tmp2_; -#line 423 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp1_ = self->priv->sources; -#line 423 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp2_ = gee_abstract_collection_iterator (G_TYPE_CHECK_INSTANCE_CAST (_tmp1_, GEE_TYPE_ABSTRACT_COLLECTION, GeeAbstractCollection)); -#line 423 "/home/jens/Source/shotwell/src/Commands.vala" - _source_it = _tmp2_; -#line 423 "/home/jens/Source/shotwell/src/Commands.vala" - while (TRUE) { -#line 5857 "Commands.c" - GeeIterator* _tmp3_; - DataSource* source = NULL; - GeeIterator* _tmp4_; - gpointer _tmp5_; - SourceCollection* membership = NULL; - DataSource* _tmp6_; - DataCollection* _tmp7_; - SourceCollection* _tmp8_; - SourceCollection* _tmp9_; -#line 423 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp3_ = _source_it; -#line 423 "/home/jens/Source/shotwell/src/Commands.vala" - if (!gee_iterator_next (_tmp3_)) { -#line 423 "/home/jens/Source/shotwell/src/Commands.vala" - break; -#line 5873 "Commands.c" - } -#line 423 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp4_ = _source_it; -#line 423 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp5_ = gee_iterator_get (_tmp4_); -#line 423 "/home/jens/Source/shotwell/src/Commands.vala" - source = (DataSource*) _tmp5_; -#line 424 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp6_ = source; -#line 424 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp7_ = data_object_get_membership (G_TYPE_CHECK_INSTANCE_CAST (_tmp6_, TYPE_DATA_OBJECT, DataObject)); -#line 424 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp8_ = G_TYPE_CHECK_INSTANCE_TYPE (_tmp7_, TYPE_SOURCE_COLLECTION) ? ((SourceCollection*) _tmp7_) : NULL; -#line 424 "/home/jens/Source/shotwell/src/Commands.vala" - if (_tmp8_ == NULL) { -#line 424 "/home/jens/Source/shotwell/src/Commands.vala" - _data_collection_unref0 (_tmp7_); -#line 5891 "Commands.c" - } -#line 424 "/home/jens/Source/shotwell/src/Commands.vala" - membership = _tmp8_; -#line 425 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp9_ = membership; -#line 425 "/home/jens/Source/shotwell/src/Commands.vala" - if (_tmp9_ != NULL) { -#line 5899 "Commands.c" - GeeHashSet* _tmp10_; - SourceCollection* _tmp11_; -#line 426 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp10_ = self->priv->hooked_collections; -#line 426 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp11_ = membership; -#line 426 "/home/jens/Source/shotwell/src/Commands.vala" - gee_abstract_collection_add (G_TYPE_CHECK_INSTANCE_CAST (_tmp10_, GEE_TYPE_ABSTRACT_COLLECTION, GeeAbstractCollection), _tmp11_); -#line 5908 "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 5914 "Commands.c" - } -#line 423 "/home/jens/Source/shotwell/src/Commands.vala" - _g_object_unref0 (_source_it); -#line 5918 "Commands.c" - } - { - GeeIterator* _source_collection_it = NULL; - GeeHashSet* _tmp12_; - GeeIterator* _tmp13_; -#line 429 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp12_ = self->priv->hooked_collections; -#line 429 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp13_ = gee_abstract_collection_iterator (G_TYPE_CHECK_INSTANCE_CAST (_tmp12_, GEE_TYPE_ABSTRACT_COLLECTION, GeeAbstractCollection)); -#line 429 "/home/jens/Source/shotwell/src/Commands.vala" - _source_collection_it = _tmp13_; -#line 429 "/home/jens/Source/shotwell/src/Commands.vala" - while (TRUE) { -#line 5932 "Commands.c" - GeeIterator* _tmp14_; - SourceCollection* source_collection = NULL; - GeeIterator* _tmp15_; - gpointer _tmp16_; - SourceCollection* _tmp17_; -#line 429 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp14_ = _source_collection_it; -#line 429 "/home/jens/Source/shotwell/src/Commands.vala" - if (!gee_iterator_next (_tmp14_)) { -#line 429 "/home/jens/Source/shotwell/src/Commands.vala" - break; -#line 5944 "Commands.c" - } -#line 429 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp15_ = _source_collection_it; -#line 429 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp16_ = gee_iterator_get (_tmp15_); -#line 429 "/home/jens/Source/shotwell/src/Commands.vala" - source_collection = (SourceCollection*) _tmp16_; -#line 430 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp17_ = source_collection; -#line 430 "/home/jens/Source/shotwell/src/Commands.vala" - g_signal_connect_object (_tmp17_, "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 5958 "Commands.c" - } -#line 429 "/home/jens/Source/shotwell/src/Commands.vala" - _g_object_unref0 (_source_collection_it); -#line 5962 "Commands.c" - } -#line 417 "/home/jens/Source/shotwell/src/Commands.vala" - return self; -#line 5966 "Commands.c" -} - - -static void -multiple_data_source_at_once_command_real_execute (Command* base) -{ - MultipleDataSourceAtOnceCommand * self; - AppWindow* _tmp0_; - AppWindow* _tmp1_; - MediaCollectionRegistry* _tmp2_; - MediaCollectionRegistry* _tmp3_; - GeeHashSet* _tmp4_; - MediaCollectionRegistry* _tmp5_; - MediaCollectionRegistry* _tmp6_; - GError * _inner_error_ = NULL; -#line 438 "/home/jens/Source/shotwell/src/Commands.vala" - self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_MULTIPLE_DATA_SOURCE_AT_ONCE_COMMAND, MultipleDataSourceAtOnceCommand); -#line 439 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp0_ = app_window_get_instance (); -#line 439 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp1_ = _tmp0_; -#line 439 "/home/jens/Source/shotwell/src/Commands.vala" - page_window_set_busy_cursor (G_TYPE_CHECK_INSTANCE_CAST (_tmp1_, TYPE_PAGE_WINDOW, PageWindow)); -#line 439 "/home/jens/Source/shotwell/src/Commands.vala" - _g_object_unref0 (_tmp1_); -#line 441 "/home/jens/Source/shotwell/src/Commands.vala" - database_table_begin_transaction (); -#line 442 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp2_ = media_collection_registry_get_instance (); -#line 442 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp3_ = _tmp2_; -#line 442 "/home/jens/Source/shotwell/src/Commands.vala" - media_collection_registry_freeze_all (_tmp3_); -#line 442 "/home/jens/Source/shotwell/src/Commands.vala" - _media_collection_registry_unref0 (_tmp3_); -#line 444 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp4_ = self->priv->sources; -#line 444 "/home/jens/Source/shotwell/src/Commands.vala" - multiple_data_source_at_once_command_execute_on_all (self, G_TYPE_CHECK_INSTANCE_CAST (_tmp4_, GEE_TYPE_COLLECTION, GeeCollection)); -#line 446 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp5_ = media_collection_registry_get_instance (); -#line 446 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp6_ = _tmp5_; -#line 446 "/home/jens/Source/shotwell/src/Commands.vala" - media_collection_registry_thaw_all (_tmp6_); -#line 446 "/home/jens/Source/shotwell/src/Commands.vala" - _media_collection_registry_unref0 (_tmp6_); -#line 6014 "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 6022 "Commands.c" - goto __catch464_database_error; - } - { - AppWindow* _tmp7_; - AppWindow* _tmp8_; -#line 452 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp7_ = app_window_get_instance (); -#line 452 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp8_ = _tmp7_; -#line 452 "/home/jens/Source/shotwell/src/Commands.vala" - page_window_set_normal_cursor (G_TYPE_CHECK_INSTANCE_CAST (_tmp8_, TYPE_PAGE_WINDOW, PageWindow)); -#line 452 "/home/jens/Source/shotwell/src/Commands.vala" - _g_object_unref0 (_tmp8_); -#line 6036 "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 6044 "Commands.c" - } - } - goto __finally464; - __catch464_database_error: - { - GError* err = NULL; - GError* _tmp9_; -#line 447 "/home/jens/Source/shotwell/src/Commands.vala" - err = _inner_error_; -#line 447 "/home/jens/Source/shotwell/src/Commands.vala" - _inner_error_ = NULL; -#line 450 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp9_ = err; -#line 450 "/home/jens/Source/shotwell/src/Commands.vala" - app_window_database_error (_tmp9_); -#line 447 "/home/jens/Source/shotwell/src/Commands.vala" - _g_error_free0 (err); -#line 6062 "Commands.c" - } - __finally464: - { - AppWindow* _tmp10_; - AppWindow* _tmp11_; -#line 452 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp10_ = app_window_get_instance (); -#line 452 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp11_ = _tmp10_; -#line 452 "/home/jens/Source/shotwell/src/Commands.vala" - page_window_set_normal_cursor (G_TYPE_CHECK_INSTANCE_CAST (_tmp11_, TYPE_PAGE_WINDOW, PageWindow)); -#line 452 "/home/jens/Source/shotwell/src/Commands.vala" - _g_object_unref0 (_tmp11_); -#line 6076 "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 6086 "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 6099 "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 6111 "Commands.c" -} - - -static void -multiple_data_source_at_once_command_real_undo (Command* base) -{ - MultipleDataSourceAtOnceCommand * self; - AppWindow* _tmp0_; - AppWindow* _tmp1_; - MediaCollectionRegistry* _tmp2_; - MediaCollectionRegistry* _tmp3_; - GeeHashSet* _tmp4_; - MediaCollectionRegistry* _tmp5_; - MediaCollectionRegistry* _tmp6_; - GError * _inner_error_ = NULL; -#line 458 "/home/jens/Source/shotwell/src/Commands.vala" - self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_MULTIPLE_DATA_SOURCE_AT_ONCE_COMMAND, MultipleDataSourceAtOnceCommand); -#line 459 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp0_ = app_window_get_instance (); -#line 459 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp1_ = _tmp0_; -#line 459 "/home/jens/Source/shotwell/src/Commands.vala" - page_window_set_busy_cursor (G_TYPE_CHECK_INSTANCE_CAST (_tmp1_, TYPE_PAGE_WINDOW, PageWindow)); -#line 459 "/home/jens/Source/shotwell/src/Commands.vala" - _g_object_unref0 (_tmp1_); -#line 461 "/home/jens/Source/shotwell/src/Commands.vala" - database_table_begin_transaction (); -#line 462 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp2_ = media_collection_registry_get_instance (); -#line 462 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp3_ = _tmp2_; -#line 462 "/home/jens/Source/shotwell/src/Commands.vala" - media_collection_registry_freeze_all (_tmp3_); -#line 462 "/home/jens/Source/shotwell/src/Commands.vala" - _media_collection_registry_unref0 (_tmp3_); -#line 464 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp4_ = self->priv->sources; -#line 464 "/home/jens/Source/shotwell/src/Commands.vala" - multiple_data_source_at_once_command_undo_on_all (self, G_TYPE_CHECK_INSTANCE_CAST (_tmp4_, GEE_TYPE_COLLECTION, GeeCollection)); -#line 466 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp5_ = media_collection_registry_get_instance (); -#line 466 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp6_ = _tmp5_; -#line 466 "/home/jens/Source/shotwell/src/Commands.vala" - media_collection_registry_thaw_all (_tmp6_); -#line 466 "/home/jens/Source/shotwell/src/Commands.vala" - _media_collection_registry_unref0 (_tmp6_); -#line 6159 "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 6167 "Commands.c" - goto __catch465_database_error; - } - { - AppWindow* _tmp7_; - AppWindow* _tmp8_; -#line 472 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp7_ = app_window_get_instance (); -#line 472 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp8_ = _tmp7_; -#line 472 "/home/jens/Source/shotwell/src/Commands.vala" - page_window_set_normal_cursor (G_TYPE_CHECK_INSTANCE_CAST (_tmp8_, TYPE_PAGE_WINDOW, PageWindow)); -#line 472 "/home/jens/Source/shotwell/src/Commands.vala" - _g_object_unref0 (_tmp8_); -#line 6181 "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 6189 "Commands.c" - } - } - goto __finally465; - __catch465_database_error: - { - GError* err = NULL; - GError* _tmp9_; -#line 467 "/home/jens/Source/shotwell/src/Commands.vala" - err = _inner_error_; -#line 467 "/home/jens/Source/shotwell/src/Commands.vala" - _inner_error_ = NULL; -#line 470 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp9_ = err; -#line 470 "/home/jens/Source/shotwell/src/Commands.vala" - app_window_database_error (_tmp9_); -#line 467 "/home/jens/Source/shotwell/src/Commands.vala" - _g_error_free0 (err); -#line 6207 "Commands.c" - } - __finally465: - { - AppWindow* _tmp10_; - AppWindow* _tmp11_; -#line 472 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp10_ = app_window_get_instance (); -#line 472 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp11_ = _tmp10_; -#line 472 "/home/jens/Source/shotwell/src/Commands.vala" - page_window_set_normal_cursor (G_TYPE_CHECK_INSTANCE_CAST (_tmp11_, TYPE_PAGE_WINDOW, PageWindow)); -#line 472 "/home/jens/Source/shotwell/src/Commands.vala" - _g_object_unref0 (_tmp11_); -#line 6221 "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 6231 "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 6244 "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 6256 "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 6268 "Commands.c" - { - GeeIterator* _source_it = NULL; - GeeIterator* _tmp0_; -#line 479 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp0_ = gee_iterable_iterator (G_TYPE_CHECK_INSTANCE_CAST (destroyed, GEE_TYPE_ITERABLE, GeeIterable)); -#line 479 "/home/jens/Source/shotwell/src/Commands.vala" - _source_it = _tmp0_; -#line 479 "/home/jens/Source/shotwell/src/Commands.vala" - while (TRUE) { -#line 6278 "Commands.c" - GeeIterator* _tmp1_; - DataSource* source = NULL; - GeeIterator* _tmp2_; - gpointer _tmp3_; - GeeHashSet* _tmp4_; - DataSource* _tmp5_; -#line 479 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp1_ = _source_it; -#line 479 "/home/jens/Source/shotwell/src/Commands.vala" - if (!gee_iterator_next (_tmp1_)) { -#line 479 "/home/jens/Source/shotwell/src/Commands.vala" - break; -#line 6291 "Commands.c" - } -#line 479 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp2_ = _source_it; -#line 479 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp3_ = gee_iterator_get (_tmp2_); -#line 479 "/home/jens/Source/shotwell/src/Commands.vala" - source = (DataSource*) _tmp3_; -#line 480 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp4_ = self->priv->sources; -#line 480 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp5_ = source; -#line 480 "/home/jens/Source/shotwell/src/Commands.vala" - if (gee_abstract_collection_contains (G_TYPE_CHECK_INSTANCE_CAST (_tmp4_, GEE_TYPE_ABSTRACT_COLLECTION, GeeAbstractCollection), _tmp5_)) { -#line 6305 "Commands.c" - CommandManager* _tmp6_; - CommandManager* _tmp7_; -#line 481 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp6_ = command_get_command_manager (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_COMMAND, Command)); -#line 481 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp7_ = _tmp6_; -#line 481 "/home/jens/Source/shotwell/src/Commands.vala" - command_manager_reset (_tmp7_); -#line 481 "/home/jens/Source/shotwell/src/Commands.vala" - _command_manager_unref0 (_tmp7_); -#line 483 "/home/jens/Source/shotwell/src/Commands.vala" - _g_object_unref0 (source); -#line 483 "/home/jens/Source/shotwell/src/Commands.vala" - break; -#line 6320 "Commands.c" - } -#line 479 "/home/jens/Source/shotwell/src/Commands.vala" - _g_object_unref0 (source); -#line 6324 "Commands.c" - } -#line 479 "/home/jens/Source/shotwell/src/Commands.vala" - _g_object_unref0 (_source_it); -#line 6328 "Commands.c" - } -} - - -static void -multiple_data_source_at_once_command_class_init (MultipleDataSourceAtOnceCommandClass * klass) -{ -#line 413 "/home/jens/Source/shotwell/src/Commands.vala" - multiple_data_source_at_once_command_parent_class = g_type_class_peek_parent (klass); -#line 413 "/home/jens/Source/shotwell/src/Commands.vala" - g_type_class_add_private (klass, sizeof (MultipleDataSourceAtOnceCommandPrivate)); -#line 413 "/home/jens/Source/shotwell/src/Commands.vala" - ((CommandClass *) klass)->execute = (void (*) (Command *)) multiple_data_source_at_once_command_real_execute; -#line 413 "/home/jens/Source/shotwell/src/Commands.vala" - ((MultipleDataSourceAtOnceCommandClass *) klass)->execute_on_all = (void (*) (MultipleDataSourceAtOnceCommand *, GeeCollection*)) multiple_data_source_at_once_command_real_execute_on_all; -#line 413 "/home/jens/Source/shotwell/src/Commands.vala" - ((CommandClass *) klass)->undo = (void (*) (Command *)) multiple_data_source_at_once_command_real_undo; -#line 413 "/home/jens/Source/shotwell/src/Commands.vala" - ((MultipleDataSourceAtOnceCommandClass *) klass)->undo_on_all = (void (*) (MultipleDataSourceAtOnceCommand *, GeeCollection*)) multiple_data_source_at_once_command_real_undo_on_all; -#line 413 "/home/jens/Source/shotwell/src/Commands.vala" - G_OBJECT_CLASS (klass)->finalize = multiple_data_source_at_once_command_finalize; -#line 6350 "Commands.c" -} - - -static void -multiple_data_source_at_once_command_instance_init (MultipleDataSourceAtOnceCommand * self) -{ - GeeHashSet* _tmp0_; - GeeHashSet* _tmp1_; -#line 413 "/home/jens/Source/shotwell/src/Commands.vala" - self->priv = MULTIPLE_DATA_SOURCE_AT_ONCE_COMMAND_GET_PRIVATE (self); -#line 414 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp0_ = gee_hash_set_new (TYPE_DATA_SOURCE, (GBoxedCopyFunc) g_object_ref, (GDestroyNotify) g_object_unref, NULL, NULL, NULL, NULL, NULL, NULL); -#line 414 "/home/jens/Source/shotwell/src/Commands.vala" - self->priv->sources = _tmp0_; -#line 415 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp1_ = gee_hash_set_new (TYPE_SOURCE_COLLECTION, (GBoxedCopyFunc) data_collection_ref, (GDestroyNotify) data_collection_unref, NULL, NULL, NULL, NULL, NULL, NULL); -#line 415 "/home/jens/Source/shotwell/src/Commands.vala" - self->priv->hooked_collections = _tmp1_; -#line 6369 "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 6379 "Commands.c" - { - GeeIterator* _source_collection_it = NULL; - GeeHashSet* _tmp0_; - GeeIterator* _tmp1_; -#line 434 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp0_ = self->priv->hooked_collections; -#line 434 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp1_ = gee_abstract_collection_iterator (G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, GEE_TYPE_ABSTRACT_COLLECTION, GeeAbstractCollection)); -#line 434 "/home/jens/Source/shotwell/src/Commands.vala" - _source_collection_it = _tmp1_; -#line 434 "/home/jens/Source/shotwell/src/Commands.vala" - while (TRUE) { -#line 6392 "Commands.c" - GeeIterator* _tmp2_; - SourceCollection* source_collection = NULL; - GeeIterator* _tmp3_; - gpointer _tmp4_; - SourceCollection* _tmp5_; - guint _tmp6_; -#line 434 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp2_ = _source_collection_it; -#line 434 "/home/jens/Source/shotwell/src/Commands.vala" - if (!gee_iterator_next (_tmp2_)) { -#line 434 "/home/jens/Source/shotwell/src/Commands.vala" - break; -#line 6405 "Commands.c" - } -#line 434 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp3_ = _source_collection_it; -#line 434 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp4_ = gee_iterator_get (_tmp3_); -#line 434 "/home/jens/Source/shotwell/src/Commands.vala" - source_collection = (SourceCollection*) _tmp4_; -#line 435 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp5_ = source_collection; -#line 435 "/home/jens/Source/shotwell/src/Commands.vala" - g_signal_parse_name ("items-destroyed", TYPE_SOURCE_COLLECTION, &_tmp6_, NULL, FALSE); -#line 435 "/home/jens/Source/shotwell/src/Commands.vala" - g_signal_handlers_disconnect_matched (_tmp5_, G_SIGNAL_MATCH_ID | G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA, _tmp6_, 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 6421 "Commands.c" - } -#line 434 "/home/jens/Source/shotwell/src/Commands.vala" - _g_object_unref0 (_source_collection_it); -#line 6425 "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 6433 "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 6457 "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; -#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" - self = (MultiplePhotoTransformationCommand*) multiple_data_source_command_construct (object_type, iter, progress_text, undo_progress_text, name, explanation); -#line 6482 "Commands.c" - { - GeeArrayList* _source_list = NULL; - GeeArrayList* _tmp0_; - GeeArrayList* _tmp1_; - gint _source_size = 0; - GeeArrayList* _tmp2_; - gint _tmp3_; - gint _tmp4_; - gint _source_index = 0; -#line 497 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp0_ = G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_MULTIPLE_DATA_SOURCE_COMMAND, MultipleDataSourceCommand)->source_list; -#line 497 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp1_ = _g_object_ref0 (_tmp0_); -#line 497 "/home/jens/Source/shotwell/src/Commands.vala" - _source_list = _tmp1_; -#line 497 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp2_ = _source_list; -#line 497 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp3_ = gee_abstract_collection_get_size (G_TYPE_CHECK_INSTANCE_CAST (_tmp2_, GEE_TYPE_ABSTRACT_COLLECTION, GeeAbstractCollection)); -#line 497 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp4_ = _tmp3_; -#line 497 "/home/jens/Source/shotwell/src/Commands.vala" - _source_size = _tmp4_; -#line 497 "/home/jens/Source/shotwell/src/Commands.vala" - _source_index = -1; -#line 497 "/home/jens/Source/shotwell/src/Commands.vala" - while (TRUE) { -#line 6510 "Commands.c" - gint _tmp5_; - gint _tmp6_; - gint _tmp7_; - DataSource* source = NULL; - GeeArrayList* _tmp8_; - gint _tmp9_; - gpointer _tmp10_; - Photo* photo = NULL; - DataSource* _tmp11_; - Photo* _tmp12_; - PhotoTransformationState* state = NULL; - Photo* _tmp13_; - PhotoTransformationState* _tmp14_; - PhotoTransformationState* _tmp15_; - GeeHashMap* _tmp16_; - Photo* _tmp17_; - PhotoTransformationState* _tmp18_; -#line 497 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp5_ = _source_index; -#line 497 "/home/jens/Source/shotwell/src/Commands.vala" - _source_index = _tmp5_ + 1; -#line 497 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp6_ = _source_index; -#line 497 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp7_ = _source_size; -#line 497 "/home/jens/Source/shotwell/src/Commands.vala" - if (!(_tmp6_ < _tmp7_)) { -#line 497 "/home/jens/Source/shotwell/src/Commands.vala" - break; -#line 6540 "Commands.c" - } -#line 497 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp8_ = _source_list; -#line 497 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp9_ = _source_index; -#line 497 "/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 497 "/home/jens/Source/shotwell/src/Commands.vala" - source = (DataSource*) _tmp10_; -#line 498 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp11_ = source; -#line 498 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp12_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_CAST (_tmp11_, TYPE_PHOTO, Photo)); -#line 498 "/home/jens/Source/shotwell/src/Commands.vala" - photo = _tmp12_; -#line 499 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp13_ = photo; -#line 499 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp14_ = photo_save_transformation_state (_tmp13_); -#line 499 "/home/jens/Source/shotwell/src/Commands.vala" - state = _tmp14_; -#line 500 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp15_ = state; -#line 500 "/home/jens/Source/shotwell/src/Commands.vala" - g_signal_connect_object (_tmp15_, "broken", (GCallback) _multiple_photo_transformation_command_on_state_broken_photo_transformation_state_broken, self, 0); -#line 502 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp16_ = self->priv->map; -#line 502 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp17_ = photo; -#line 502 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp18_ = state; -#line 502 "/home/jens/Source/shotwell/src/Commands.vala" - gee_abstract_map_set (G_TYPE_CHECK_INSTANCE_CAST (_tmp16_, GEE_TYPE_ABSTRACT_MAP, GeeAbstractMap), _tmp17_, _tmp18_); -#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 6580 "Commands.c" - } -#line 497 "/home/jens/Source/shotwell/src/Commands.vala" - _g_object_unref0 (_source_list); -#line 6584 "Commands.c" - } -#line 493 "/home/jens/Source/shotwell/src/Commands.vala" - return self; -#line 6588 "Commands.c" -} - - -static void -multiple_photo_transformation_command_real_undo_on_source (MultipleDataSourceCommand* base, - DataSource* source) -{ - MultiplePhotoTransformationCommand * self; - Photo* photo = NULL; - Photo* _tmp0_; - PhotoTransformationState* state = NULL; - GeeHashMap* _tmp1_; - gpointer _tmp2_; -#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_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_CAST (source, TYPE_PHOTO, Photo)); -#line 512 "/home/jens/Source/shotwell/src/Commands.vala" - photo = _tmp0_; -#line 514 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp1_ = self->priv->map; -#line 514 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp2_ = gee_abstract_map_get (G_TYPE_CHECK_INSTANCE_CAST (_tmp1_, GEE_TYPE_ABSTRACT_MAP, GeeAbstractMap), photo); -#line 514 "/home/jens/Source/shotwell/src/Commands.vala" - state = (PhotoTransformationState*) _tmp2_; -#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 6624 "Commands.c" -} - - -static void -multiple_photo_transformation_command_on_state_broken (MultiplePhotoTransformationCommand* self) -{ - CommandManager* _tmp0_; - CommandManager* _tmp1_; -#line 520 "/home/jens/Source/shotwell/src/Commands.vala" - g_return_if_fail (IS_MULTIPLE_PHOTO_TRANSFORMATION_COMMAND (self)); -#line 521 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp0_ = command_get_command_manager (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_COMMAND, Command)); -#line 521 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp1_ = _tmp0_; -#line 521 "/home/jens/Source/shotwell/src/Commands.vala" - command_manager_reset (_tmp1_); -#line 521 "/home/jens/Source/shotwell/src/Commands.vala" - _command_manager_unref0 (_tmp1_); -#line 6643 "Commands.c" -} - - -static void -multiple_photo_transformation_command_class_init (MultiplePhotoTransformationCommandClass * klass) -{ -#line 489 "/home/jens/Source/shotwell/src/Commands.vala" - multiple_photo_transformation_command_parent_class = g_type_class_peek_parent (klass); -#line 489 "/home/jens/Source/shotwell/src/Commands.vala" - g_type_class_add_private (klass, sizeof (MultiplePhotoTransformationCommandPrivate)); -#line 489 "/home/jens/Source/shotwell/src/Commands.vala" - ((MultipleDataSourceCommandClass *) klass)->undo_on_source = (void (*) (MultipleDataSourceCommand *, DataSource*)) multiple_photo_transformation_command_real_undo_on_source; -#line 489 "/home/jens/Source/shotwell/src/Commands.vala" - G_OBJECT_CLASS (klass)->finalize = multiple_photo_transformation_command_finalize; -#line 6658 "Commands.c" -} - - -static void -multiple_photo_transformation_command_instance_init (MultiplePhotoTransformationCommand * self) -{ - GeeHashMap* _tmp0_; -#line 489 "/home/jens/Source/shotwell/src/Commands.vala" - self->priv = MULTIPLE_PHOTO_TRANSFORMATION_COMMAND_GET_PRIVATE (self); -#line 490 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp0_ = gee_hash_map_new (TYPE_PHOTO, (GBoxedCopyFunc) g_object_ref, (GDestroyNotify) g_object_unref, TYPE_PHOTO_TRANSFORMATION_STATE, (GBoxedCopyFunc) g_object_ref, (GDestroyNotify) g_object_unref, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL); -#line 490 "/home/jens/Source/shotwell/src/Commands.vala" - self->priv->map = _tmp0_; -#line 6672 "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 6682 "Commands.c" - { - GeeIterator* _state_it = NULL; - GeeHashMap* _tmp0_; - GeeCollection* _tmp1_; - GeeCollection* _tmp2_; - GeeCollection* _tmp3_; - GeeIterator* _tmp4_; - GeeIterator* _tmp5_; -#line 507 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp0_ = self->priv->map; -#line 507 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp1_ = gee_abstract_map_get_values (G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, GEE_TYPE_ABSTRACT_MAP, GeeAbstractMap)); -#line 507 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp2_ = _tmp1_; -#line 507 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp3_ = _tmp2_; -#line 507 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp4_ = gee_iterable_iterator (G_TYPE_CHECK_INSTANCE_CAST (_tmp3_, GEE_TYPE_ITERABLE, GeeIterable)); -#line 507 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp5_ = _tmp4_; -#line 507 "/home/jens/Source/shotwell/src/Commands.vala" - _g_object_unref0 (_tmp3_); -#line 507 "/home/jens/Source/shotwell/src/Commands.vala" - _state_it = _tmp5_; -#line 507 "/home/jens/Source/shotwell/src/Commands.vala" - while (TRUE) { -#line 6709 "Commands.c" - GeeIterator* _tmp6_; - PhotoTransformationState* state = NULL; - GeeIterator* _tmp7_; - gpointer _tmp8_; - PhotoTransformationState* _tmp9_; - guint _tmp10_; -#line 507 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp6_ = _state_it; -#line 507 "/home/jens/Source/shotwell/src/Commands.vala" - if (!gee_iterator_next (_tmp6_)) { -#line 507 "/home/jens/Source/shotwell/src/Commands.vala" - break; -#line 6722 "Commands.c" - } -#line 507 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp7_ = _state_it; -#line 507 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp8_ = gee_iterator_get (_tmp7_); -#line 507 "/home/jens/Source/shotwell/src/Commands.vala" - state = (PhotoTransformationState*) _tmp8_; -#line 508 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp9_ = state; -#line 508 "/home/jens/Source/shotwell/src/Commands.vala" - g_signal_parse_name ("broken", TYPE_PHOTO_TRANSFORMATION_STATE, &_tmp10_, NULL, FALSE); -#line 508 "/home/jens/Source/shotwell/src/Commands.vala" - g_signal_handlers_disconnect_matched (_tmp9_, G_SIGNAL_MATCH_ID | G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA, _tmp10_, 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 6738 "Commands.c" - } -#line 507 "/home/jens/Source/shotwell/src/Commands.vala" - _g_object_unref0 (_state_it); -#line 6742 "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 6748 "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; -#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" - self = (RotateSingleCommand*) single_data_source_command_construct (object_type, G_TYPE_CHECK_INSTANCE_CAST (photo, TYPE_DATA_SOURCE, DataSource), name, explanation); -#line 531 "/home/jens/Source/shotwell/src/Commands.vala" - self->priv->rotation = rotation; -#line 528 "/home/jens/Source/shotwell/src/Commands.vala" - return self; -#line 6786 "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 6798 "Commands.c" -} - - -static void -rotate_single_command_real_execute (Command* base) -{ - RotateSingleCommand * self; - DataSource* _tmp0_; - Rotation _tmp1_; -#line 534 "/home/jens/Source/shotwell/src/Commands.vala" - self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_ROTATE_SINGLE_COMMAND, RotateSingleCommand); -#line 535 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp0_ = G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_SINGLE_DATA_SOURCE_COMMAND, SingleDataSourceCommand)->source; -#line 535 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp1_ = self->priv->rotation; -#line 535 "/home/jens/Source/shotwell/src/Commands.vala" - photo_rotate (G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, TYPE_PHOTO, Photo), _tmp1_); -#line 6816 "Commands.c" -} - - -static void -rotate_single_command_real_undo (Command* base) -{ - RotateSingleCommand * self; - DataSource* _tmp0_; - Rotation _tmp1_; -#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" - photo_rotate (G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, TYPE_PHOTO, Photo), rotation_opposite (_tmp1_)); -#line 6834 "Commands.c" -} - - -static void -rotate_single_command_class_init (RotateSingleCommandClass * klass) -{ -#line 525 "/home/jens/Source/shotwell/src/Commands.vala" - rotate_single_command_parent_class = g_type_class_peek_parent (klass); -#line 525 "/home/jens/Source/shotwell/src/Commands.vala" - g_type_class_add_private (klass, sizeof (RotateSingleCommandPrivate)); -#line 525 "/home/jens/Source/shotwell/src/Commands.vala" - ((CommandClass *) klass)->execute = (void (*) (Command *)) rotate_single_command_real_execute; -#line 525 "/home/jens/Source/shotwell/src/Commands.vala" - ((CommandClass *) klass)->undo = (void (*) (Command *)) rotate_single_command_real_undo; -#line 525 "/home/jens/Source/shotwell/src/Commands.vala" - G_OBJECT_CLASS (klass)->finalize = rotate_single_command_finalize; -#line 6851 "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 6860 "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 6872 "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; -#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" - self = (RotateMultipleCommand*) multiple_data_source_command_construct (object_type, iter, progress_text, undo_progress_text, name, explanation); -#line 550 "/home/jens/Source/shotwell/src/Commands.vala" - self->priv->rotation = rotation; -#line 546 "/home/jens/Source/shotwell/src/Commands.vala" - return self; -#line 6916 "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 6930 "Commands.c" -} - - -static void -rotate_multiple_command_real_execute_on_source (MultipleDataSourceCommand* base, - DataSource* source) -{ - RotateMultipleCommand * self; - Rotation _tmp0_; -#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_ = self->priv->rotation; -#line 554 "/home/jens/Source/shotwell/src/Commands.vala" - photo_rotate (G_TYPE_CHECK_INSTANCE_CAST (source, TYPE_PHOTO, Photo), _tmp0_); -#line 6948 "Commands.c" -} - - -static void -rotate_multiple_command_real_undo_on_source (MultipleDataSourceCommand* base, - DataSource* source) -{ - RotateMultipleCommand * self; - Rotation _tmp0_; -#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_ = self->priv->rotation; -#line 558 "/home/jens/Source/shotwell/src/Commands.vala" - photo_rotate (G_TYPE_CHECK_INSTANCE_CAST (source, TYPE_PHOTO, Photo), rotation_opposite (_tmp0_)); -#line 6966 "Commands.c" -} - - -static void -rotate_multiple_command_class_init (RotateMultipleCommandClass * klass) -{ -#line 543 "/home/jens/Source/shotwell/src/Commands.vala" - rotate_multiple_command_parent_class = g_type_class_peek_parent (klass); -#line 543 "/home/jens/Source/shotwell/src/Commands.vala" - g_type_class_add_private (klass, sizeof (RotateMultipleCommandPrivate)); -#line 543 "/home/jens/Source/shotwell/src/Commands.vala" - ((MultipleDataSourceCommandClass *) klass)->execute_on_source = (void (*) (MultipleDataSourceCommand *, DataSource*)) rotate_multiple_command_real_execute_on_source; -#line 543 "/home/jens/Source/shotwell/src/Commands.vala" - ((MultipleDataSourceCommandClass *) klass)->undo_on_source = (void (*) (MultipleDataSourceCommand *, DataSource*)) rotate_multiple_command_real_undo_on_source; -#line 543 "/home/jens/Source/shotwell/src/Commands.vala" - G_OBJECT_CLASS (klass)->finalize = rotate_multiple_command_finalize; -#line 6983 "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 6992 "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 7004 "Commands.c" -} - - -GType -rotate_multiple_command_get_type (void) -{ - static volatile gsize rotate_multiple_command_type_id__volatile = 0; - if (g_once_init_enter (&rotate_multiple_command_type_id__volatile)) { - static const GTypeInfo g_define_type_info = { sizeof (RotateMultipleCommandClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) rotate_multiple_command_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (RotateMultipleCommand), 0, (GInstanceInitFunc) rotate_multiple_command_instance_init, NULL }; - GType rotate_multiple_command_type_id; - rotate_multiple_command_type_id = g_type_register_static (TYPE_MULTIPLE_DATA_SOURCE_COMMAND, "RotateMultipleCommand", &g_define_type_info, 0); - g_once_init_leave (&rotate_multiple_command_type_id__volatile, rotate_multiple_command_type_id); - } - return rotate_multiple_command_type_id__volatile; -} - - -EditTitleCommand* -edit_title_command_construct (GType object_type, - MediaSource* source, - const gchar* new_title) -{ - EditTitleCommand * self = NULL; - gchar* title = NULL; - gchar* _tmp0_; - gchar* _tmp1_; - gchar* _tmp2_; -#line 566 "/home/jens/Source/shotwell/src/Commands.vala" - g_return_val_if_fail (IS_MEDIA_SOURCE (source), NULL); -#line 566 "/home/jens/Source/shotwell/src/Commands.vala" - g_return_val_if_fail (new_title != NULL, NULL); -#line 567 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp0_ = g_strdup (g_dpgettext2 (NULL, "Button Label", RESOURCES_EDIT_TITLE_LABEL)); -#line 567 "/home/jens/Source/shotwell/src/Commands.vala" - title = _tmp0_; -#line 569 "/home/jens/Source/shotwell/src/Commands.vala" - self = (EditTitleCommand*) single_data_source_command_construct (object_type, G_TYPE_CHECK_INSTANCE_CAST (source, TYPE_DATA_SOURCE, DataSource), title, ""); -#line 571 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp1_ = g_strdup (new_title); -#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 = _tmp1_; -#line 572 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp2_ = media_source_get_title (source); -#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 = _tmp2_; -#line 566 "/home/jens/Source/shotwell/src/Commands.vala" - _g_free0 (title); -#line 566 "/home/jens/Source/shotwell/src/Commands.vala" - return self; -#line 7058 "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 7068 "Commands.c" -} - - -static void -edit_title_command_real_execute (Command* base) -{ - EditTitleCommand * self; - DataSource* _tmp0_; - const gchar* _tmp1_; -#line 575 "/home/jens/Source/shotwell/src/Commands.vala" - self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_EDIT_TITLE_COMMAND, EditTitleCommand); -#line 576 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp0_ = G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_SINGLE_DATA_SOURCE_COMMAND, SingleDataSourceCommand)->source; -#line 576 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp1_ = self->priv->new_title; -#line 576 "/home/jens/Source/shotwell/src/Commands.vala" - media_source_set_title (G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, TYPE_MEDIA_SOURCE, MediaSource), _tmp1_); -#line 7086 "Commands.c" -} - - -static void -edit_title_command_real_undo (Command* base) -{ - EditTitleCommand * self; - DataSource* _tmp0_; - const gchar* _tmp1_; -#line 579 "/home/jens/Source/shotwell/src/Commands.vala" - self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_EDIT_TITLE_COMMAND, EditTitleCommand); -#line 580 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp0_ = G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_SINGLE_DATA_SOURCE_COMMAND, SingleDataSourceCommand)->source; -#line 580 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp1_ = self->priv->old_title; -#line 580 "/home/jens/Source/shotwell/src/Commands.vala" - media_source_set_title (G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, TYPE_MEDIA_SOURCE, MediaSource), _tmp1_); -#line 7104 "Commands.c" -} - - -static void -edit_title_command_class_init (EditTitleCommandClass * klass) -{ -#line 562 "/home/jens/Source/shotwell/src/Commands.vala" - edit_title_command_parent_class = g_type_class_peek_parent (klass); -#line 562 "/home/jens/Source/shotwell/src/Commands.vala" - g_type_class_add_private (klass, sizeof (EditTitleCommandPrivate)); -#line 562 "/home/jens/Source/shotwell/src/Commands.vala" - ((CommandClass *) klass)->execute = (void (*) (Command *)) edit_title_command_real_execute; -#line 562 "/home/jens/Source/shotwell/src/Commands.vala" - ((CommandClass *) klass)->undo = (void (*) (Command *)) edit_title_command_real_undo; -#line 562 "/home/jens/Source/shotwell/src/Commands.vala" - G_OBJECT_CLASS (klass)->finalize = edit_title_command_finalize; -#line 7121 "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 7130 "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 7146 "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; - gchar* _tmp0_; - gchar* _tmp1_; -#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" - self = (EditCommentCommand*) single_data_source_command_construct (object_type, G_TYPE_CHECK_INSTANCE_CAST (source, TYPE_DATA_SOURCE, DataSource), RESOURCES_EDIT_COMMENT_LABEL, ""); -#line 591 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp0_ = g_strdup (new_comment); -#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 = _tmp0_; -#line 592 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp1_ = media_source_get_comment (source); -#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 = _tmp1_; -#line 588 "/home/jens/Source/shotwell/src/Commands.vala" - return self; -#line 7192 "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 7202 "Commands.c" -} - - -static void -edit_comment_command_real_execute (Command* base) -{ - EditCommentCommand * self; - DataSource* _tmp0_; - const gchar* _tmp1_; -#line 595 "/home/jens/Source/shotwell/src/Commands.vala" - self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_EDIT_COMMENT_COMMAND, EditCommentCommand); -#line 596 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp0_ = G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_SINGLE_DATA_SOURCE_COMMAND, SingleDataSourceCommand)->source; -#line 596 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp1_ = self->priv->new_comment; -#line 596 "/home/jens/Source/shotwell/src/Commands.vala" - media_source_set_comment (G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, TYPE_MEDIA_SOURCE, MediaSource), _tmp1_); -#line 7220 "Commands.c" -} - - -static void -edit_comment_command_real_undo (Command* base) -{ - EditCommentCommand * self; - DataSource* _tmp0_; - const gchar* _tmp1_; -#line 599 "/home/jens/Source/shotwell/src/Commands.vala" - self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_EDIT_COMMENT_COMMAND, EditCommentCommand); -#line 600 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp0_ = G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_SINGLE_DATA_SOURCE_COMMAND, SingleDataSourceCommand)->source; -#line 600 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp1_ = self->priv->old_comment; -#line 600 "/home/jens/Source/shotwell/src/Commands.vala" - media_source_set_comment (G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, TYPE_MEDIA_SOURCE, MediaSource), _tmp1_); -#line 7238 "Commands.c" -} - - -static void -edit_comment_command_class_init (EditCommentCommandClass * klass) -{ -#line 584 "/home/jens/Source/shotwell/src/Commands.vala" - edit_comment_command_parent_class = g_type_class_peek_parent (klass); -#line 584 "/home/jens/Source/shotwell/src/Commands.vala" - g_type_class_add_private (klass, sizeof (EditCommentCommandPrivate)); -#line 584 "/home/jens/Source/shotwell/src/Commands.vala" - ((CommandClass *) klass)->execute = (void (*) (Command *)) edit_comment_command_real_execute; -#line 584 "/home/jens/Source/shotwell/src/Commands.vala" - ((CommandClass *) klass)->undo = (void (*) (Command *)) edit_comment_command_real_undo; -#line 584 "/home/jens/Source/shotwell/src/Commands.vala" - G_OBJECT_CLASS (klass)->finalize = edit_comment_command_finalize; -#line 7255 "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 7264 "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 7280 "Commands.c" -} - - -GType -edit_comment_command_get_type (void) -{ - static volatile gsize edit_comment_command_type_id__volatile = 0; - if (g_once_init_enter (&edit_comment_command_type_id__volatile)) { - static const GTypeInfo g_define_type_info = { sizeof (EditCommentCommandClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) edit_comment_command_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (EditCommentCommand), 0, (GInstanceInitFunc) edit_comment_command_instance_init, NULL }; - GType edit_comment_command_type_id; - edit_comment_command_type_id = g_type_register_static (TYPE_SINGLE_DATA_SOURCE_COMMAND, "EditCommentCommand", &g_define_type_info, 0); - g_once_init_leave (&edit_comment_command_type_id__volatile, edit_comment_command_type_id); - } - return edit_comment_command_type_id__volatile; -} - - -EditMultipleTitlesCommand* -edit_multiple_titles_command_construct (GType object_type, - GeeCollection* media_sources, - const gchar* new_title) -{ - EditMultipleTitlesCommand * self = NULL; - gchar* title = NULL; - gchar* _tmp0_; - const gchar* _tmp1_; - gchar* _tmp2_; -#line 608 "/home/jens/Source/shotwell/src/Commands.vala" - g_return_val_if_fail (GEE_IS_COLLECTION (media_sources), NULL); -#line 608 "/home/jens/Source/shotwell/src/Commands.vala" - g_return_val_if_fail (new_title != NULL, NULL); -#line 609 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp0_ = g_strdup (g_dpgettext2 (NULL, "Button Label", RESOURCES_EDIT_TITLE_LABEL)); -#line 609 "/home/jens/Source/shotwell/src/Commands.vala" - title = _tmp0_; -#line 611 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp1_ = title; -#line 611 "/home/jens/Source/shotwell/src/Commands.vala" - self = (EditMultipleTitlesCommand*) multiple_data_source_at_once_command_construct (object_type, media_sources, _tmp1_, ""); -#line 613 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp2_ = g_strdup (new_title); -#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 = _tmp2_; -#line 7326 "Commands.c" - { - GeeIterator* _media_it = NULL; - GeeIterator* _tmp3_; -#line 614 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp3_ = gee_iterable_iterator (G_TYPE_CHECK_INSTANCE_CAST (media_sources, GEE_TYPE_ITERABLE, GeeIterable)); -#line 614 "/home/jens/Source/shotwell/src/Commands.vala" - _media_it = _tmp3_; -#line 614 "/home/jens/Source/shotwell/src/Commands.vala" - while (TRUE) { -#line 7336 "Commands.c" - GeeIterator* _tmp4_; - MediaSource* media = NULL; - GeeIterator* _tmp5_; - gpointer _tmp6_; - GeeHashMap* _tmp7_; - MediaSource* _tmp8_; - MediaSource* _tmp9_; - gchar* _tmp10_; - gchar* _tmp11_; -#line 614 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp4_ = _media_it; -#line 614 "/home/jens/Source/shotwell/src/Commands.vala" - if (!gee_iterator_next (_tmp4_)) { -#line 614 "/home/jens/Source/shotwell/src/Commands.vala" - break; -#line 7352 "Commands.c" - } -#line 614 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp5_ = _media_it; -#line 614 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp6_ = gee_iterator_get (_tmp5_); -#line 614 "/home/jens/Source/shotwell/src/Commands.vala" - media = (MediaSource*) _tmp6_; -#line 615 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp7_ = self->old_titles; -#line 615 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp8_ = media; -#line 615 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp9_ = media; -#line 615 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp10_ = media_source_get_title (_tmp9_); -#line 615 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp11_ = _tmp10_; -#line 615 "/home/jens/Source/shotwell/src/Commands.vala" - gee_abstract_map_set (G_TYPE_CHECK_INSTANCE_CAST (_tmp7_, GEE_TYPE_ABSTRACT_MAP, GeeAbstractMap), _tmp8_, _tmp11_); -#line 615 "/home/jens/Source/shotwell/src/Commands.vala" - _g_free0 (_tmp11_); -#line 614 "/home/jens/Source/shotwell/src/Commands.vala" - _g_object_unref0 (media); -#line 7376 "Commands.c" - } -#line 614 "/home/jens/Source/shotwell/src/Commands.vala" - _g_object_unref0 (_media_it); -#line 7380 "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 7386 "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 7396 "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 7409 "Commands.c" - { - GeeIterator* _source_it = NULL; - GeeIterator* _tmp0_; -#line 619 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp0_ = gee_iterable_iterator (G_TYPE_CHECK_INSTANCE_CAST (sources, GEE_TYPE_ITERABLE, GeeIterable)); -#line 619 "/home/jens/Source/shotwell/src/Commands.vala" - _source_it = _tmp0_; -#line 619 "/home/jens/Source/shotwell/src/Commands.vala" - while (TRUE) { -#line 7419 "Commands.c" - GeeIterator* _tmp1_; - DataSource* source = NULL; - GeeIterator* _tmp2_; - gpointer _tmp3_; - DataSource* _tmp4_; - const gchar* _tmp5_; -#line 619 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp1_ = _source_it; -#line 619 "/home/jens/Source/shotwell/src/Commands.vala" - if (!gee_iterator_next (_tmp1_)) { -#line 619 "/home/jens/Source/shotwell/src/Commands.vala" - break; -#line 7432 "Commands.c" - } -#line 619 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp2_ = _source_it; -#line 619 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp3_ = gee_iterator_get (_tmp2_); -#line 619 "/home/jens/Source/shotwell/src/Commands.vala" - source = (DataSource*) _tmp3_; -#line 620 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp4_ = source; -#line 620 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp5_ = self->new_title; -#line 620 "/home/jens/Source/shotwell/src/Commands.vala" - media_source_set_title (G_TYPE_CHECK_INSTANCE_CAST (_tmp4_, TYPE_MEDIA_SOURCE, MediaSource), _tmp5_); -#line 619 "/home/jens/Source/shotwell/src/Commands.vala" - _g_object_unref0 (source); -#line 7448 "Commands.c" - } -#line 619 "/home/jens/Source/shotwell/src/Commands.vala" - _g_object_unref0 (_source_it); -#line 7452 "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 7466 "Commands.c" - { - GeeIterator* _source_it = NULL; - GeeIterator* _tmp0_; -#line 624 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp0_ = gee_iterable_iterator (G_TYPE_CHECK_INSTANCE_CAST (sources, GEE_TYPE_ITERABLE, GeeIterable)); -#line 624 "/home/jens/Source/shotwell/src/Commands.vala" - _source_it = _tmp0_; -#line 624 "/home/jens/Source/shotwell/src/Commands.vala" - while (TRUE) { -#line 7476 "Commands.c" - GeeIterator* _tmp1_; - DataSource* source = NULL; - GeeIterator* _tmp2_; - gpointer _tmp3_; - DataSource* _tmp4_; - GeeHashMap* _tmp5_; - DataSource* _tmp6_; - gpointer _tmp7_; - gchar* _tmp8_; -#line 624 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp1_ = _source_it; -#line 624 "/home/jens/Source/shotwell/src/Commands.vala" - if (!gee_iterator_next (_tmp1_)) { -#line 624 "/home/jens/Source/shotwell/src/Commands.vala" - break; -#line 7492 "Commands.c" - } -#line 624 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp2_ = _source_it; -#line 624 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp3_ = gee_iterator_get (_tmp2_); -#line 624 "/home/jens/Source/shotwell/src/Commands.vala" - source = (DataSource*) _tmp3_; -#line 625 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp4_ = source; -#line 625 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp5_ = self->old_titles; -#line 625 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp6_ = source; -#line 625 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp7_ = gee_abstract_map_get (G_TYPE_CHECK_INSTANCE_CAST (_tmp5_, GEE_TYPE_ABSTRACT_MAP, GeeAbstractMap), G_TYPE_CHECK_INSTANCE_CAST (_tmp6_, TYPE_MEDIA_SOURCE, MediaSource)); -#line 625 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp8_ = (gchar*) _tmp7_; -#line 625 "/home/jens/Source/shotwell/src/Commands.vala" - media_source_set_title (G_TYPE_CHECK_INSTANCE_CAST (_tmp4_, TYPE_MEDIA_SOURCE, MediaSource), _tmp8_); -#line 625 "/home/jens/Source/shotwell/src/Commands.vala" - _g_free0 (_tmp8_); -#line 624 "/home/jens/Source/shotwell/src/Commands.vala" - _g_object_unref0 (source); -#line 7516 "Commands.c" - } -#line 624 "/home/jens/Source/shotwell/src/Commands.vala" - _g_object_unref0 (_source_it); -#line 7520 "Commands.c" - } -} - - -static void -edit_multiple_titles_command_class_init (EditMultipleTitlesCommandClass * klass) -{ -#line 604 "/home/jens/Source/shotwell/src/Commands.vala" - edit_multiple_titles_command_parent_class = g_type_class_peek_parent (klass); -#line 604 "/home/jens/Source/shotwell/src/Commands.vala" - ((MultipleDataSourceAtOnceCommandClass *) klass)->execute_on_all = (void (*) (MultipleDataSourceAtOnceCommand *, GeeCollection*)) edit_multiple_titles_command_real_execute_on_all; -#line 604 "/home/jens/Source/shotwell/src/Commands.vala" - ((MultipleDataSourceAtOnceCommandClass *) klass)->undo_on_all = (void (*) (MultipleDataSourceAtOnceCommand *, GeeCollection*)) edit_multiple_titles_command_real_undo_on_all; -#line 604 "/home/jens/Source/shotwell/src/Commands.vala" - G_OBJECT_CLASS (klass)->finalize = edit_multiple_titles_command_finalize; -#line 7536 "Commands.c" -} - - -static void -edit_multiple_titles_command_instance_init (EditMultipleTitlesCommand * self) -{ - GeeHashMap* _tmp0_; -#line 606 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp0_ = gee_hash_map_new (TYPE_MEDIA_SOURCE, (GBoxedCopyFunc) g_object_ref, (GDestroyNotify) g_object_unref, G_TYPE_STRING, (GBoxedCopyFunc) g_strdup, (GDestroyNotify) g_free, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL); -#line 606 "/home/jens/Source/shotwell/src/Commands.vala" - self->old_titles = _tmp0_; -#line 7548 "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 7564 "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; - gchar* _tmp0_; -#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" - self = (EditMultipleCommentsCommand*) multiple_data_source_at_once_command_construct (object_type, media_sources, RESOURCES_EDIT_COMMENT_LABEL, ""); -#line 636 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp0_ = g_strdup (new_comment); -#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 = _tmp0_; -#line 7601 "Commands.c" - { - GeeIterator* _media_it = NULL; - GeeIterator* _tmp1_; -#line 637 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp1_ = gee_iterable_iterator (G_TYPE_CHECK_INSTANCE_CAST (media_sources, GEE_TYPE_ITERABLE, GeeIterable)); -#line 637 "/home/jens/Source/shotwell/src/Commands.vala" - _media_it = _tmp1_; -#line 637 "/home/jens/Source/shotwell/src/Commands.vala" - while (TRUE) { -#line 7611 "Commands.c" - GeeIterator* _tmp2_; - MediaSource* media = NULL; - GeeIterator* _tmp3_; - gpointer _tmp4_; - GeeHashMap* _tmp5_; - MediaSource* _tmp6_; - MediaSource* _tmp7_; - gchar* _tmp8_; - gchar* _tmp9_; -#line 637 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp2_ = _media_it; -#line 637 "/home/jens/Source/shotwell/src/Commands.vala" - if (!gee_iterator_next (_tmp2_)) { -#line 637 "/home/jens/Source/shotwell/src/Commands.vala" - break; -#line 7627 "Commands.c" - } -#line 637 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp3_ = _media_it; -#line 637 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp4_ = gee_iterator_get (_tmp3_); -#line 637 "/home/jens/Source/shotwell/src/Commands.vala" - media = (MediaSource*) _tmp4_; -#line 638 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp5_ = self->old_comments; -#line 638 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp6_ = media; -#line 638 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp7_ = media; -#line 638 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp8_ = media_source_get_comment (_tmp7_); -#line 638 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp9_ = _tmp8_; -#line 638 "/home/jens/Source/shotwell/src/Commands.vala" - gee_abstract_map_set (G_TYPE_CHECK_INSTANCE_CAST (_tmp5_, GEE_TYPE_ABSTRACT_MAP, GeeAbstractMap), _tmp6_, _tmp9_); -#line 638 "/home/jens/Source/shotwell/src/Commands.vala" - _g_free0 (_tmp9_); -#line 637 "/home/jens/Source/shotwell/src/Commands.vala" - _g_object_unref0 (media); -#line 7651 "Commands.c" - } -#line 637 "/home/jens/Source/shotwell/src/Commands.vala" - _g_object_unref0 (_media_it); -#line 7655 "Commands.c" - } -#line 633 "/home/jens/Source/shotwell/src/Commands.vala" - return self; -#line 7659 "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 7669 "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 7682 "Commands.c" - { - GeeIterator* _source_it = NULL; - GeeIterator* _tmp0_; -#line 642 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp0_ = gee_iterable_iterator (G_TYPE_CHECK_INSTANCE_CAST (sources, GEE_TYPE_ITERABLE, GeeIterable)); -#line 642 "/home/jens/Source/shotwell/src/Commands.vala" - _source_it = _tmp0_; -#line 642 "/home/jens/Source/shotwell/src/Commands.vala" - while (TRUE) { -#line 7692 "Commands.c" - GeeIterator* _tmp1_; - DataSource* source = NULL; - GeeIterator* _tmp2_; - gpointer _tmp3_; - DataSource* _tmp4_; - const gchar* _tmp5_; -#line 642 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp1_ = _source_it; -#line 642 "/home/jens/Source/shotwell/src/Commands.vala" - if (!gee_iterator_next (_tmp1_)) { -#line 642 "/home/jens/Source/shotwell/src/Commands.vala" - break; -#line 7705 "Commands.c" - } -#line 642 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp2_ = _source_it; -#line 642 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp3_ = gee_iterator_get (_tmp2_); -#line 642 "/home/jens/Source/shotwell/src/Commands.vala" - source = (DataSource*) _tmp3_; -#line 643 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp4_ = source; -#line 643 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp5_ = self->new_comment; -#line 643 "/home/jens/Source/shotwell/src/Commands.vala" - media_source_set_comment (G_TYPE_CHECK_INSTANCE_CAST (_tmp4_, TYPE_MEDIA_SOURCE, MediaSource), _tmp5_); -#line 642 "/home/jens/Source/shotwell/src/Commands.vala" - _g_object_unref0 (source); -#line 7721 "Commands.c" - } -#line 642 "/home/jens/Source/shotwell/src/Commands.vala" - _g_object_unref0 (_source_it); -#line 7725 "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 7739 "Commands.c" - { - GeeIterator* _source_it = NULL; - GeeIterator* _tmp0_; -#line 647 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp0_ = gee_iterable_iterator (G_TYPE_CHECK_INSTANCE_CAST (sources, GEE_TYPE_ITERABLE, GeeIterable)); -#line 647 "/home/jens/Source/shotwell/src/Commands.vala" - _source_it = _tmp0_; -#line 647 "/home/jens/Source/shotwell/src/Commands.vala" - while (TRUE) { -#line 7749 "Commands.c" - GeeIterator* _tmp1_; - DataSource* source = NULL; - GeeIterator* _tmp2_; - gpointer _tmp3_; - DataSource* _tmp4_; - GeeHashMap* _tmp5_; - DataSource* _tmp6_; - gpointer _tmp7_; - gchar* _tmp8_; -#line 647 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp1_ = _source_it; -#line 647 "/home/jens/Source/shotwell/src/Commands.vala" - if (!gee_iterator_next (_tmp1_)) { -#line 647 "/home/jens/Source/shotwell/src/Commands.vala" - break; -#line 7765 "Commands.c" - } -#line 647 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp2_ = _source_it; -#line 647 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp3_ = gee_iterator_get (_tmp2_); -#line 647 "/home/jens/Source/shotwell/src/Commands.vala" - source = (DataSource*) _tmp3_; -#line 648 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp4_ = source; -#line 648 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp5_ = self->old_comments; -#line 648 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp6_ = source; -#line 648 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp7_ = gee_abstract_map_get (G_TYPE_CHECK_INSTANCE_CAST (_tmp5_, GEE_TYPE_ABSTRACT_MAP, GeeAbstractMap), G_TYPE_CHECK_INSTANCE_CAST (_tmp6_, TYPE_MEDIA_SOURCE, MediaSource)); -#line 648 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp8_ = (gchar*) _tmp7_; -#line 648 "/home/jens/Source/shotwell/src/Commands.vala" - media_source_set_comment (G_TYPE_CHECK_INSTANCE_CAST (_tmp4_, TYPE_MEDIA_SOURCE, MediaSource), _tmp8_); -#line 648 "/home/jens/Source/shotwell/src/Commands.vala" - _g_free0 (_tmp8_); -#line 647 "/home/jens/Source/shotwell/src/Commands.vala" - _g_object_unref0 (source); -#line 7789 "Commands.c" - } -#line 647 "/home/jens/Source/shotwell/src/Commands.vala" - _g_object_unref0 (_source_it); -#line 7793 "Commands.c" - } -} - - -static void -edit_multiple_comments_command_class_init (EditMultipleCommentsCommandClass * klass) -{ -#line 629 "/home/jens/Source/shotwell/src/Commands.vala" - edit_multiple_comments_command_parent_class = g_type_class_peek_parent (klass); -#line 629 "/home/jens/Source/shotwell/src/Commands.vala" - ((MultipleDataSourceAtOnceCommandClass *) klass)->execute_on_all = (void (*) (MultipleDataSourceAtOnceCommand *, GeeCollection*)) edit_multiple_comments_command_real_execute_on_all; -#line 629 "/home/jens/Source/shotwell/src/Commands.vala" - ((MultipleDataSourceAtOnceCommandClass *) klass)->undo_on_all = (void (*) (MultipleDataSourceAtOnceCommand *, GeeCollection*)) edit_multiple_comments_command_real_undo_on_all; -#line 629 "/home/jens/Source/shotwell/src/Commands.vala" - G_OBJECT_CLASS (klass)->finalize = edit_multiple_comments_command_finalize; -#line 7809 "Commands.c" -} - - -static void -edit_multiple_comments_command_instance_init (EditMultipleCommentsCommand * self) -{ - GeeHashMap* _tmp0_; -#line 631 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp0_ = gee_hash_map_new (TYPE_MEDIA_SOURCE, (GBoxedCopyFunc) g_object_ref, (GDestroyNotify) g_object_unref, G_TYPE_STRING, (GBoxedCopyFunc) g_strdup, (GDestroyNotify) g_free, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL); -#line 631 "/home/jens/Source/shotwell/src/Commands.vala" - self->old_comments = _tmp0_; -#line 7821 "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 7837 "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; - gchar* _tmp0_; - gchar* _tmp1_; -#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" - self = (RenameEventCommand*) simple_proxyable_command_construct (object_type, G_TYPE_CHECK_INSTANCE_CAST (event, TYPE_PROXYABLE, Proxyable), RESOURCES_RENAME_EVENT_LABEL, ""); -#line 659 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp0_ = g_strdup (new_name); -#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 = _tmp0_; -#line 660 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp1_ = event_get_raw_name (event); -#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 = _tmp1_; -#line 656 "/home/jens/Source/shotwell/src/Commands.vala" - return self; -#line 7883 "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 7893 "Commands.c" -} - - -static void -rename_event_command_real_execute_on_source (SimpleProxyableCommand* base, - DataSource* source) -{ - RenameEventCommand * self; - const gchar* _tmp0_; -#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_ = self->priv->new_name; -#line 664 "/home/jens/Source/shotwell/src/Commands.vala" - event_rename (G_TYPE_CHECK_INSTANCE_CAST (source, TYPE_EVENT, Event), _tmp0_); -#line 7911 "Commands.c" -} - - -static void -rename_event_command_real_undo_on_source (SimpleProxyableCommand* base, - DataSource* source) -{ - RenameEventCommand * self; - const gchar* _tmp0_; -#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_ = self->priv->old_name; -#line 668 "/home/jens/Source/shotwell/src/Commands.vala" - event_rename (G_TYPE_CHECK_INSTANCE_CAST (source, TYPE_EVENT, Event), _tmp0_); -#line 7929 "Commands.c" -} - - -static void -rename_event_command_class_init (RenameEventCommandClass * klass) -{ -#line 652 "/home/jens/Source/shotwell/src/Commands.vala" - rename_event_command_parent_class = g_type_class_peek_parent (klass); -#line 652 "/home/jens/Source/shotwell/src/Commands.vala" - g_type_class_add_private (klass, sizeof (RenameEventCommandPrivate)); -#line 652 "/home/jens/Source/shotwell/src/Commands.vala" - ((SimpleProxyableCommandClass *) klass)->execute_on_source = (void (*) (SimpleProxyableCommand *, DataSource*)) rename_event_command_real_execute_on_source; -#line 652 "/home/jens/Source/shotwell/src/Commands.vala" - ((SimpleProxyableCommandClass *) klass)->undo_on_source = (void (*) (SimpleProxyableCommand *, DataSource*)) rename_event_command_real_undo_on_source; -#line 652 "/home/jens/Source/shotwell/src/Commands.vala" - G_OBJECT_CLASS (klass)->finalize = rename_event_command_finalize; -#line 7946 "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 7955 "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 7971 "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; - gchar* _tmp0_; - gchar* _tmp1_; -#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" - self = (EditEventCommentCommand*) simple_proxyable_command_construct (object_type, G_TYPE_CHECK_INSTANCE_CAST (event, TYPE_PROXYABLE, Proxyable), RESOURCES_EDIT_COMMENT_LABEL, ""); -#line 679 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp0_ = g_strdup (new_comment); -#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 = _tmp0_; -#line 680 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp1_ = event_source_get_comment (G_TYPE_CHECK_INSTANCE_CAST (event, 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 = _tmp1_; -#line 676 "/home/jens/Source/shotwell/src/Commands.vala" - return self; -#line 8017 "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 8027 "Commands.c" -} - - -static void -edit_event_comment_command_real_execute_on_source (SimpleProxyableCommand* base, - DataSource* source) -{ - EditEventCommentCommand * self; - const gchar* _tmp0_; -#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_ = 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 (source, TYPE_EVENT, Event), TYPE_EVENT_SOURCE, EventSource), _tmp0_); -#line 8045 "Commands.c" -} - - -static void -edit_event_comment_command_real_undo_on_source (SimpleProxyableCommand* base, - DataSource* source) -{ - EditEventCommentCommand * self; - const gchar* _tmp0_; -#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_ = 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 (source, TYPE_EVENT, Event), TYPE_EVENT_SOURCE, EventSource), _tmp0_); -#line 8063 "Commands.c" -} - - -static void -edit_event_comment_command_class_init (EditEventCommentCommandClass * klass) -{ -#line 672 "/home/jens/Source/shotwell/src/Commands.vala" - edit_event_comment_command_parent_class = g_type_class_peek_parent (klass); -#line 672 "/home/jens/Source/shotwell/src/Commands.vala" - g_type_class_add_private (klass, sizeof (EditEventCommentCommandPrivate)); -#line 672 "/home/jens/Source/shotwell/src/Commands.vala" - ((SimpleProxyableCommandClass *) klass)->execute_on_source = (void (*) (SimpleProxyableCommand *, DataSource*)) edit_event_comment_command_real_execute_on_source; -#line 672 "/home/jens/Source/shotwell/src/Commands.vala" - ((SimpleProxyableCommandClass *) klass)->undo_on_source = (void (*) (SimpleProxyableCommand *, DataSource*)) edit_event_comment_command_real_undo_on_source; -#line 672 "/home/jens/Source/shotwell/src/Commands.vala" - G_OBJECT_CLASS (klass)->finalize = edit_event_comment_command_finalize; -#line 8080 "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 8089 "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 8105 "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; - MediaSource* _tmp0_; - MediaSource* _tmp1_; -#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" - self = (SetKeyPhotoCommand*) single_data_source_command_construct (object_type, G_TYPE_CHECK_INSTANCE_CAST (event, TYPE_DATA_SOURCE, DataSource), RESOURCES_MAKE_KEY_PHOTO_LABEL, ""); -#line 699 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp0_ = _g_object_ref0 (new_primary_source); -#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 = _tmp0_; -#line 700 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp1_ = event_get_primary_source (event); -#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 = _tmp1_; -#line 696 "/home/jens/Source/shotwell/src/Commands.vala" - return self; -#line 8151 "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 8161 "Commands.c" -} - - -static void -set_key_photo_command_real_execute (Command* base) -{ - SetKeyPhotoCommand * self; - DataSource* _tmp0_; - MediaSource* _tmp1_; -#line 703 "/home/jens/Source/shotwell/src/Commands.vala" - self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_SET_KEY_PHOTO_COMMAND, SetKeyPhotoCommand); -#line 704 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp0_ = G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_SINGLE_DATA_SOURCE_COMMAND, SingleDataSourceCommand)->source; -#line 704 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp1_ = self->priv->new_primary_source; -#line 704 "/home/jens/Source/shotwell/src/Commands.vala" - event_set_primary_source (G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, TYPE_EVENT, Event), _tmp1_); -#line 8179 "Commands.c" -} - - -static void -set_key_photo_command_real_undo (Command* base) -{ - SetKeyPhotoCommand * self; - DataSource* _tmp0_; - MediaSource* _tmp1_; -#line 707 "/home/jens/Source/shotwell/src/Commands.vala" - self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_SET_KEY_PHOTO_COMMAND, SetKeyPhotoCommand); -#line 708 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp0_ = G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_SINGLE_DATA_SOURCE_COMMAND, SingleDataSourceCommand)->source; -#line 708 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp1_ = self->priv->old_primary_source; -#line 708 "/home/jens/Source/shotwell/src/Commands.vala" - event_set_primary_source (G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, TYPE_EVENT, Event), _tmp1_); -#line 8197 "Commands.c" -} - - -static void -set_key_photo_command_class_init (SetKeyPhotoCommandClass * klass) -{ -#line 692 "/home/jens/Source/shotwell/src/Commands.vala" - set_key_photo_command_parent_class = g_type_class_peek_parent (klass); -#line 692 "/home/jens/Source/shotwell/src/Commands.vala" - g_type_class_add_private (klass, sizeof (SetKeyPhotoCommandPrivate)); -#line 692 "/home/jens/Source/shotwell/src/Commands.vala" - ((CommandClass *) klass)->execute = (void (*) (Command *)) set_key_photo_command_real_execute; -#line 692 "/home/jens/Source/shotwell/src/Commands.vala" - ((CommandClass *) klass)->undo = (void (*) (Command *)) set_key_photo_command_real_undo; -#line 692 "/home/jens/Source/shotwell/src/Commands.vala" - G_OBJECT_CLASS (klass)->finalize = set_key_photo_command_finalize; -#line 8214 "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 8223 "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 8239 "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; -#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" - self = (RevertSingleCommand*) generic_photo_transformation_command_construct (object_type, photo, RESOURCES_REVERT_LABEL, ""); -#line 713 "/home/jens/Source/shotwell/src/Commands.vala" - return self; -#line 8268 "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 8277 "Commands.c" -} - - -static void -revert_single_command_real_execute_on_photo (GenericPhotoTransformationCommand* base, - Photo* photo) -{ - RevertSingleCommand * self; -#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" - photo_remove_all_transformations (photo); -#line 8292 "Commands.c" -} - - -static gboolean -revert_single_command_real_compress (Command* base, - Command* command) -{ - RevertSingleCommand * self; - gboolean result = FALSE; - RevertSingleCommand* revert_single_command = NULL; - RevertSingleCommand* _tmp0_; - RevertSingleCommand* _tmp1_; - RevertSingleCommand* _tmp2_; - DataSource* _tmp3_; - DataSource* _tmp4_; -#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_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_TYPE (command, TYPE_REVERT_SINGLE_COMMAND) ? ((RevertSingleCommand*) command) : NULL); -#line 722 "/home/jens/Source/shotwell/src/Commands.vala" - revert_single_command = _tmp0_; -#line 723 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp1_ = revert_single_command; -#line 723 "/home/jens/Source/shotwell/src/Commands.vala" - if (_tmp1_ == 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 8326 "Commands.c" - } -#line 726 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp2_ = revert_single_command; -#line 726 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp3_ = G_TYPE_CHECK_INSTANCE_CAST (_tmp2_, TYPE_SINGLE_DATA_SOURCE_COMMAND, SingleDataSourceCommand)->source; -#line 726 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp4_ = G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_SINGLE_DATA_SOURCE_COMMAND, SingleDataSourceCommand)->source; -#line 726 "/home/jens/Source/shotwell/src/Commands.vala" - if (_tmp3_ != _tmp4_) { -#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 8342 "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 8350 "Commands.c" -} - - -static void -revert_single_command_class_init (RevertSingleCommandClass * klass) -{ -#line 712 "/home/jens/Source/shotwell/src/Commands.vala" - revert_single_command_parent_class = g_type_class_peek_parent (klass); -#line 712 "/home/jens/Source/shotwell/src/Commands.vala" - ((GenericPhotoTransformationCommandClass *) klass)->execute_on_photo = (void (*) (GenericPhotoTransformationCommand *, Photo*)) revert_single_command_real_execute_on_photo; -#line 712 "/home/jens/Source/shotwell/src/Commands.vala" - ((CommandClass *) klass)->compress = (gboolean (*) (Command *, Command*)) revert_single_command_real_compress; -#line 8363 "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; -#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" - self = (RevertMultipleCommand*) multiple_photo_transformation_command_construct (object_type, iter, _ ("Reverting"), _ ("Undoing Revert"), RESOURCES_REVERT_LABEL, ""); -#line 736 "/home/jens/Source/shotwell/src/Commands.vala" - return self; -#line 8398 "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 8407 "Commands.c" -} - - -static void -revert_multiple_command_real_execute_on_source (MultipleDataSourceCommand* base, - DataSource* source) -{ - RevertMultipleCommand * self; -#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" - photo_remove_all_transformations (G_TYPE_CHECK_INSTANCE_CAST (source, TYPE_PHOTO, Photo)); -#line 8422 "Commands.c" -} - - -static void -revert_multiple_command_class_init (RevertMultipleCommandClass * klass) -{ -#line 735 "/home/jens/Source/shotwell/src/Commands.vala" - revert_multiple_command_parent_class = g_type_class_peek_parent (klass); -#line 735 "/home/jens/Source/shotwell/src/Commands.vala" - ((MultipleDataSourceCommandClass *) klass)->execute_on_source = (void (*) (MultipleDataSourceCommand *, DataSource*)) revert_multiple_command_real_execute_on_source; -#line 8433 "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; -#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" - self = (EnhanceSingleCommand*) generic_photo_transformation_command_construct (object_type, photo, RESOURCES_ENHANCE_LABEL, RESOURCES_ENHANCE_TOOLTIP); -#line 747 "/home/jens/Source/shotwell/src/Commands.vala" - return self; -#line 8468 "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 8477 "Commands.c" -} - - -static void -enhance_single_command_real_execute_on_photo (GenericPhotoTransformationCommand* base, - Photo* photo) -{ - EnhanceSingleCommand * self; - AppWindow* _tmp0_; - AppWindow* _tmp1_; - AppWindow* _tmp2_; - AppWindow* _tmp3_; -#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" - photo_enhance (photo); -#line 763 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp2_ = app_window_get_instance (); -#line 763 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp3_ = _tmp2_; -#line 763 "/home/jens/Source/shotwell/src/Commands.vala" - page_window_set_normal_cursor (G_TYPE_CHECK_INSTANCE_CAST (_tmp3_, TYPE_PAGE_WINDOW, PageWindow)); -#line 763 "/home/jens/Source/shotwell/src/Commands.vala" - _g_object_unref0 (_tmp3_); -#line 8512 "Commands.c" -} - - -static gboolean -enhance_single_command_real_compress (Command* base, - Command* command) -{ - EnhanceSingleCommand * self; - gboolean result = FALSE; - EnhanceSingleCommand* enhance_single_command = NULL; - EnhanceSingleCommand* _tmp0_; - EnhanceSingleCommand* _tmp1_; - EnhanceSingleCommand* _tmp2_; - DataSource* _tmp3_; - DataSource* _tmp4_; -#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_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_TYPE (command, TYPE_ENHANCE_SINGLE_COMMAND) ? ((EnhanceSingleCommand*) command) : NULL); -#line 767 "/home/jens/Source/shotwell/src/Commands.vala" - enhance_single_command = _tmp0_; -#line 768 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp1_ = enhance_single_command; -#line 768 "/home/jens/Source/shotwell/src/Commands.vala" - if (_tmp1_ == 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 8546 "Commands.c" - } -#line 771 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp2_ = enhance_single_command; -#line 771 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp3_ = G_TYPE_CHECK_INSTANCE_CAST (_tmp2_, TYPE_SINGLE_DATA_SOURCE_COMMAND, SingleDataSourceCommand)->source; -#line 771 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp4_ = G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_SINGLE_DATA_SOURCE_COMMAND, SingleDataSourceCommand)->source; -#line 771 "/home/jens/Source/shotwell/src/Commands.vala" - if (_tmp3_ != _tmp4_) { -#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 8562 "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 8570 "Commands.c" -} - - -static void -enhance_single_command_class_init (EnhanceSingleCommandClass * klass) -{ -#line 746 "/home/jens/Source/shotwell/src/Commands.vala" - enhance_single_command_parent_class = g_type_class_peek_parent (klass); -#line 746 "/home/jens/Source/shotwell/src/Commands.vala" - ((GenericPhotoTransformationCommandClass *) klass)->execute_on_photo = (void (*) (GenericPhotoTransformationCommand *, Photo*)) enhance_single_command_real_execute_on_photo; -#line 746 "/home/jens/Source/shotwell/src/Commands.vala" - ((CommandClass *) klass)->compress = (gboolean (*) (Command *, Command*)) enhance_single_command_real_compress; -#line 8583 "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; -#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" - self = (EnhanceMultipleCommand*) multiple_photo_transformation_command_construct (object_type, iter, _ ("Enhancing"), _ ("Undoing Enhance"), RESOURCES_ENHANCE_LABEL, RESOURCES_ENHANCE_TOOLTIP); -#line 780 "/home/jens/Source/shotwell/src/Commands.vala" - return self; -#line 8618 "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 8627 "Commands.c" -} - - -static void -enhance_multiple_command_real_execute_on_source (MultipleDataSourceCommand* base, - DataSource* source) -{ - EnhanceMultipleCommand * self; -#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" - photo_enhance (G_TYPE_CHECK_INSTANCE_CAST (source, TYPE_PHOTO, Photo)); -#line 8642 "Commands.c" -} - - -static void -enhance_multiple_command_class_init (EnhanceMultipleCommandClass * klass) -{ -#line 779 "/home/jens/Source/shotwell/src/Commands.vala" - enhance_multiple_command_parent_class = g_type_class_peek_parent (klass); -#line 779 "/home/jens/Source/shotwell/src/Commands.vala" - ((MultipleDataSourceCommandClass *) klass)->execute_on_source = (void (*) (MultipleDataSourceCommand *, DataSource*)) enhance_multiple_command_real_execute_on_source; -#line 8653 "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; - Box _tmp0_; -#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" - self = (StraightenCommand*) generic_photo_transformation_command_construct (object_type, photo, name, explanation); -#line 797 "/home/jens/Source/shotwell/src/Commands.vala" - self->priv->theta = theta; -#line 798 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp0_ = *crop; -#line 798 "/home/jens/Source/shotwell/src/Commands.vala" - self->priv->crop = _tmp0_; -#line 794 "/home/jens/Source/shotwell/src/Commands.vala" - return self; -#line 8705 "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 8718 "Commands.c" -} - - -static void -straighten_command_real_execute_on_photo (GenericPhotoTransformationCommand* base, - Photo* photo) -{ - StraightenCommand * self; - DataCollection* collection = NULL; - DataCollection* _tmp0_; - DataCollection* _tmp1_; - gdouble _tmp3_; - Box _tmp4_; - DataCollection* _tmp5_; -#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_ = data_object_get_membership (G_TYPE_CHECK_INSTANCE_CAST (photo, TYPE_DATA_OBJECT, DataObject)); -#line 803 "/home/jens/Source/shotwell/src/Commands.vala" - collection = _tmp0_; -#line 804 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp1_ = collection; -#line 804 "/home/jens/Source/shotwell/src/Commands.vala" - if (_tmp1_ != NULL) { -#line 8745 "Commands.c" - DataCollection* _tmp2_; -#line 805 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp2_ = collection; -#line 805 "/home/jens/Source/shotwell/src/Commands.vala" - data_collection_freeze_notifications (_tmp2_); -#line 8751 "Commands.c" - } -#line 807 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp3_ = self->priv->theta; -#line 807 "/home/jens/Source/shotwell/src/Commands.vala" - photo_set_straighten (photo, _tmp3_); -#line 808 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp4_ = self->priv->crop; -#line 808 "/home/jens/Source/shotwell/src/Commands.vala" - photo_set_crop (photo, &_tmp4_); -#line 810 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp5_ = collection; -#line 810 "/home/jens/Source/shotwell/src/Commands.vala" - if (_tmp5_ != NULL) { -#line 8765 "Commands.c" - DataCollection* _tmp6_; -#line 811 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp6_ = collection; -#line 811 "/home/jens/Source/shotwell/src/Commands.vala" - data_collection_thaw_notifications (_tmp6_); -#line 8771 "Commands.c" - } -#line 801 "/home/jens/Source/shotwell/src/Commands.vala" - _data_collection_unref0 (collection); -#line 8775 "Commands.c" -} - - -static void -straighten_command_class_init (StraightenCommandClass * klass) -{ -#line 790 "/home/jens/Source/shotwell/src/Commands.vala" - straighten_command_parent_class = g_type_class_peek_parent (klass); -#line 790 "/home/jens/Source/shotwell/src/Commands.vala" - g_type_class_add_private (klass, sizeof (StraightenCommandPrivate)); -#line 790 "/home/jens/Source/shotwell/src/Commands.vala" - ((GenericPhotoTransformationCommandClass *) klass)->execute_on_photo = (void (*) (GenericPhotoTransformationCommand *, Photo*)) straighten_command_real_execute_on_photo; -#line 790 "/home/jens/Source/shotwell/src/Commands.vala" - G_OBJECT_CLASS (klass)->finalize = straighten_command_finalize; -#line 8790 "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 8799 "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 8811 "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; - Box _tmp0_; -#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" - self = (CropCommand*) generic_photo_transformation_command_construct (object_type, photo, name, explanation); -#line 821 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp0_ = *crop; -#line 821 "/home/jens/Source/shotwell/src/Commands.vala" - self->priv->crop = _tmp0_; -#line 818 "/home/jens/Source/shotwell/src/Commands.vala" - return self; -#line 8854 "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 8866 "Commands.c" -} - - -static void -crop_command_real_execute_on_photo (GenericPhotoTransformationCommand* base, - Photo* photo) -{ - CropCommand * self; - Box _tmp0_; -#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_ = self->priv->crop; -#line 825 "/home/jens/Source/shotwell/src/Commands.vala" - photo_set_crop (photo, &_tmp0_); -#line 8884 "Commands.c" -} - - -static void -crop_command_class_init (CropCommandClass * klass) -{ -#line 815 "/home/jens/Source/shotwell/src/Commands.vala" - crop_command_parent_class = g_type_class_peek_parent (klass); -#line 815 "/home/jens/Source/shotwell/src/Commands.vala" - g_type_class_add_private (klass, sizeof (CropCommandPrivate)); -#line 815 "/home/jens/Source/shotwell/src/Commands.vala" - ((GenericPhotoTransformationCommandClass *) klass)->execute_on_photo = (void (*) (GenericPhotoTransformationCommand *, Photo*)) crop_command_real_execute_on_photo; -#line 815 "/home/jens/Source/shotwell/src/Commands.vala" - G_OBJECT_CLASS (klass)->finalize = crop_command_finalize; -#line 8899 "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 8908 "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 8920 "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 8943 "Commands.c" -} - - -AdjustColorsSingleCommand* -adjust_colors_single_command_construct (GType object_type, - Photo* photo, - PixelTransformationBundle* transformations, - const gchar* name, - const gchar* explanation) -{ - AdjustColorsSingleCommand * self = NULL; - PixelTransformationBundle* _tmp0_; -#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" - self = (AdjustColorsSingleCommand*) generic_photo_transformation_command_construct (object_type, photo, name, explanation); -#line 836 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp0_ = _pixel_transformation_bundle_ref0 (transformations); -#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 = _tmp0_; -#line 832 "/home/jens/Source/shotwell/src/Commands.vala" - return self; -#line 8974 "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 8986 "Commands.c" -} - - -static void -adjust_colors_single_command_real_execute_on_photo (GenericPhotoTransformationCommand* base, - Photo* photo) -{ - AdjustColorsSingleCommand * self; - AppWindow* _tmp0_; - AppWindow* _tmp1_; - PixelTransformationBundle* _tmp2_; - AppWindow* _tmp3_; - AppWindow* _tmp4_; -#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_ = self->priv->transformations; -#line 842 "/home/jens/Source/shotwell/src/Commands.vala" - photo_set_color_adjustments (photo, _tmp2_); -#line 844 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp3_ = app_window_get_instance (); -#line 844 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp4_ = _tmp3_; -#line 844 "/home/jens/Source/shotwell/src/Commands.vala" - page_window_set_normal_cursor (G_TYPE_CHECK_INSTANCE_CAST (_tmp4_, TYPE_PAGE_WINDOW, PageWindow)); -#line 844 "/home/jens/Source/shotwell/src/Commands.vala" - _g_object_unref0 (_tmp4_); -#line 9024 "Commands.c" -} - - -static gboolean -adjust_colors_single_command_real_can_compress (GenericPhotoTransformationCommand* base, - Command* command) -{ - AdjustColorsSingleCommand * self; - gboolean result = FALSE; -#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" - result = G_TYPE_CHECK_INSTANCE_TYPE (command, TYPE_ADJUST_COLORS_SINGLE_COMMAND); -#line 848 "/home/jens/Source/shotwell/src/Commands.vala" - return result; -#line 9042 "Commands.c" -} - - -static void -adjust_colors_single_command_class_init (AdjustColorsSingleCommandClass * klass) -{ -#line 829 "/home/jens/Source/shotwell/src/Commands.vala" - adjust_colors_single_command_parent_class = g_type_class_peek_parent (klass); -#line 829 "/home/jens/Source/shotwell/src/Commands.vala" - g_type_class_add_private (klass, sizeof (AdjustColorsSingleCommandPrivate)); -#line 829 "/home/jens/Source/shotwell/src/Commands.vala" - ((GenericPhotoTransformationCommandClass *) klass)->execute_on_photo = (void (*) (GenericPhotoTransformationCommand *, Photo*)) adjust_colors_single_command_real_execute_on_photo; -#line 829 "/home/jens/Source/shotwell/src/Commands.vala" - ((GenericPhotoTransformationCommandClass *) klass)->can_compress = (gboolean (*) (GenericPhotoTransformationCommand *, Command*)) adjust_colors_single_command_real_can_compress; -#line 829 "/home/jens/Source/shotwell/src/Commands.vala" - G_OBJECT_CLASS (klass)->finalize = adjust_colors_single_command_finalize; -#line 9059 "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 9068 "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 9082 "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; - PixelTransformationBundle* _tmp0_; -#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" - self = (AdjustColorsMultipleCommand*) multiple_photo_transformation_command_construct (object_type, iter, _ ("Applying Color Transformations"), _ ("Undoing Color Transformations"), name, explanation); -#line 860 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp0_ = _pixel_transformation_bundle_ref0 (transformations); -#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 = _tmp0_; -#line 855 "/home/jens/Source/shotwell/src/Commands.vala" - return self; -#line 9127 "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 9139 "Commands.c" -} - - -static void -adjust_colors_multiple_command_real_execute_on_source (MultipleDataSourceCommand* base, - DataSource* source) -{ - AdjustColorsMultipleCommand * self; - PixelTransformationBundle* _tmp0_; -#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_ = self->priv->transformations; -#line 864 "/home/jens/Source/shotwell/src/Commands.vala" - photo_set_color_adjustments (G_TYPE_CHECK_INSTANCE_CAST (source, TYPE_PHOTO, Photo), _tmp0_); -#line 9157 "Commands.c" -} - - -static void -adjust_colors_multiple_command_class_init (AdjustColorsMultipleCommandClass * klass) -{ -#line 852 "/home/jens/Source/shotwell/src/Commands.vala" - adjust_colors_multiple_command_parent_class = g_type_class_peek_parent (klass); -#line 852 "/home/jens/Source/shotwell/src/Commands.vala" - g_type_class_add_private (klass, sizeof (AdjustColorsMultipleCommandPrivate)); -#line 852 "/home/jens/Source/shotwell/src/Commands.vala" - ((MultipleDataSourceCommandClass *) klass)->execute_on_source = (void (*) (MultipleDataSourceCommand *, DataSource*)) adjust_colors_multiple_command_real_execute_on_source; -#line 852 "/home/jens/Source/shotwell/src/Commands.vala" - G_OBJECT_CLASS (klass)->finalize = adjust_colors_multiple_command_finalize; -#line 9172 "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 9181 "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 9195 "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; - EditingToolsRedeyeInstance _tmp0_; -#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" - self = (RedeyeCommand*) generic_photo_transformation_command_construct (object_type, photo, name, explanation); -#line 875 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp0_ = *redeye_instance; -#line 875 "/home/jens/Source/shotwell/src/Commands.vala" - self->priv->redeye_instance = _tmp0_; -#line 871 "/home/jens/Source/shotwell/src/Commands.vala" - return self; -#line 9238 "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 9250 "Commands.c" -} - - -static void -redeye_command_real_execute_on_photo (GenericPhotoTransformationCommand* base, - Photo* photo) -{ - RedeyeCommand * self; - EditingToolsRedeyeInstance _tmp0_; -#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_ = self->priv->redeye_instance; -#line 879 "/home/jens/Source/shotwell/src/Commands.vala" - photo_add_redeye_instance (photo, &_tmp0_); -#line 9268 "Commands.c" -} - - -static void -redeye_command_class_init (RedeyeCommandClass * klass) -{ -#line 868 "/home/jens/Source/shotwell/src/Commands.vala" - redeye_command_parent_class = g_type_class_peek_parent (klass); -#line 868 "/home/jens/Source/shotwell/src/Commands.vala" - g_type_class_add_private (klass, sizeof (RedeyeCommandPrivate)); -#line 868 "/home/jens/Source/shotwell/src/Commands.vala" - ((GenericPhotoTransformationCommandClass *) klass)->execute_on_photo = (void (*) (GenericPhotoTransformationCommand *, Photo*)) redeye_command_real_execute_on_photo; -#line 868 "/home/jens/Source/shotwell/src/Commands.vala" - G_OBJECT_CLASS (klass)->finalize = redeye_command_finalize; -#line 9283 "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 9292 "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 9304 "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; -#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" - self = (MovePhotosCommand*) command_construct (object_type, name, explanation); -#line 967 "/home/jens/Source/shotwell/src/Commands.vala" - return self; -#line 9336 "Commands.c" -} - - -static void -move_photos_command_real_prepare (Command* base) -{ - MovePhotosCommand * self; - MovePhotosCommandRealMovePhotosCommand* _tmp0_; - MovePhotosCommandRealMovePhotosCommand* _tmp1_; -#line 971 "/home/jens/Source/shotwell/src/Commands.vala" - self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_MOVE_PHOTOS_COMMAND, MovePhotosCommand); -#line 972 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp0_ = self->real_command; -#line 972 "/home/jens/Source/shotwell/src/Commands.vala" - _vala_assert (_tmp0_ != NULL, "real_command != null"); -#line 973 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp1_ = self->real_command; -#line 973 "/home/jens/Source/shotwell/src/Commands.vala" - command_prepare (G_TYPE_CHECK_INSTANCE_CAST (_tmp1_, TYPE_COMMAND, Command)); -#line 9356 "Commands.c" -} - - -static void -move_photos_command_real_execute (Command* base) -{ - MovePhotosCommand * self; - MovePhotosCommandRealMovePhotosCommand* _tmp0_; - MovePhotosCommandRealMovePhotosCommand* _tmp1_; -#line 976 "/home/jens/Source/shotwell/src/Commands.vala" - self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_MOVE_PHOTOS_COMMAND, MovePhotosCommand); -#line 977 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp0_ = self->real_command; -#line 977 "/home/jens/Source/shotwell/src/Commands.vala" - _vala_assert (_tmp0_ != NULL, "real_command != null"); -#line 978 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp1_ = self->real_command; -#line 978 "/home/jens/Source/shotwell/src/Commands.vala" - command_execute (G_TYPE_CHECK_INSTANCE_CAST (_tmp1_, TYPE_COMMAND, Command)); -#line 9376 "Commands.c" -} - - -static void -move_photos_command_real_undo (Command* base) -{ - MovePhotosCommand * self; - MovePhotosCommandRealMovePhotosCommand* _tmp0_; - MovePhotosCommandRealMovePhotosCommand* _tmp1_; -#line 981 "/home/jens/Source/shotwell/src/Commands.vala" - self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_MOVE_PHOTOS_COMMAND, MovePhotosCommand); -#line 982 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp0_ = self->real_command; -#line 982 "/home/jens/Source/shotwell/src/Commands.vala" - _vala_assert (_tmp0_ != NULL, "real_command != null"); -#line 983 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp1_ = self->real_command; -#line 983 "/home/jens/Source/shotwell/src/Commands.vala" - command_undo (G_TYPE_CHECK_INSTANCE_CAST (_tmp1_, TYPE_COMMAND, Command)); -#line 9396 "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 9406 "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 9415 "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; - SourceProxy* _tmp25_; - SourceProxy* _tmp26_; -#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" - self = (MovePhotosCommandRealMovePhotosCommand*) multiple_data_source_command_construct (object_type, source_views, progress_text, undo_progress_text, name, explanation); -#line 9445 "Commands.c" - { - GeeArrayList* _source_list = NULL; - GeeArrayList* _tmp0_; - GeeArrayList* _tmp1_; - gint _source_size = 0; - GeeArrayList* _tmp2_; - gint _tmp3_; - gint _tmp4_; - gint _source_index = 0; -#line 896 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp0_ = G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_MULTIPLE_DATA_SOURCE_COMMAND, MultipleDataSourceCommand)->source_list; -#line 896 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp1_ = _g_object_ref0 (_tmp0_); -#line 896 "/home/jens/Source/shotwell/src/Commands.vala" - _source_list = _tmp1_; -#line 896 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp2_ = _source_list; -#line 896 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp3_ = gee_abstract_collection_get_size (G_TYPE_CHECK_INSTANCE_CAST (_tmp2_, GEE_TYPE_ABSTRACT_COLLECTION, GeeAbstractCollection)); -#line 896 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp4_ = _tmp3_; -#line 896 "/home/jens/Source/shotwell/src/Commands.vala" - _source_size = _tmp4_; -#line 896 "/home/jens/Source/shotwell/src/Commands.vala" - _source_index = -1; -#line 896 "/home/jens/Source/shotwell/src/Commands.vala" - while (TRUE) { -#line 9473 "Commands.c" - gint _tmp5_; - gint _tmp6_; - gint _tmp7_; - DataSource* source = NULL; - GeeArrayList* _tmp8_; - gint _tmp9_; - gpointer _tmp10_; - MediaSource* current_media = NULL; - DataSource* _tmp11_; - MediaSource* _tmp12_; - Event* old_event = NULL; - MediaSource* _tmp13_; - Event* _tmp14_; - SourceProxy* _tmp15_ = NULL; - Event* _tmp16_; - SourceProxy* old_event_proxy = NULL; - SourceProxy* _tmp19_; - SourceProxy* _tmp20_; - GeeHashMap* _tmp22_; - MediaSource* _tmp23_; - SourceProxy* _tmp24_; -#line 896 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp5_ = _source_index; -#line 896 "/home/jens/Source/shotwell/src/Commands.vala" - _source_index = _tmp5_ + 1; -#line 896 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp6_ = _source_index; -#line 896 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp7_ = _source_size; -#line 896 "/home/jens/Source/shotwell/src/Commands.vala" - if (!(_tmp6_ < _tmp7_)) { -#line 896 "/home/jens/Source/shotwell/src/Commands.vala" - break; -#line 9507 "Commands.c" - } -#line 896 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp8_ = _source_list; -#line 896 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp9_ = _source_index; -#line 896 "/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 896 "/home/jens/Source/shotwell/src/Commands.vala" - source = (DataSource*) _tmp10_; -#line 897 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp11_ = source; -#line 897 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp12_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_CAST (_tmp11_, TYPE_MEDIA_SOURCE, MediaSource)); -#line 897 "/home/jens/Source/shotwell/src/Commands.vala" - current_media = _tmp12_; -#line 898 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp13_ = current_media; -#line 898 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp14_ = media_source_get_event (_tmp13_); -#line 898 "/home/jens/Source/shotwell/src/Commands.vala" - old_event = _tmp14_; -#line 899 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp16_ = old_event; -#line 899 "/home/jens/Source/shotwell/src/Commands.vala" - if (_tmp16_ != NULL) { -#line 9533 "Commands.c" - Event* _tmp17_; - SourceProxy* _tmp18_; -#line 899 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp17_ = old_event; -#line 899 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp18_ = proxyable_get_proxy (G_TYPE_CHECK_INSTANCE_CAST (_tmp17_, TYPE_PROXYABLE, Proxyable)); -#line 899 "/home/jens/Source/shotwell/src/Commands.vala" - _source_proxy_unref0 (_tmp15_); -#line 899 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp15_ = _tmp18_; -#line 9544 "Commands.c" - } else { -#line 899 "/home/jens/Source/shotwell/src/Commands.vala" - _source_proxy_unref0 (_tmp15_); -#line 899 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp15_ = NULL; -#line 9550 "Commands.c" - } -#line 899 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp19_ = _source_proxy_ref0 (_tmp15_); -#line 899 "/home/jens/Source/shotwell/src/Commands.vala" - old_event_proxy = _tmp19_; -#line 902 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp20_ = old_event_proxy; -#line 902 "/home/jens/Source/shotwell/src/Commands.vala" - if (_tmp20_ != NULL) { -#line 9560 "Commands.c" - SourceProxy* _tmp21_; -#line 903 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp21_ = old_event_proxy; -#line 903 "/home/jens/Source/shotwell/src/Commands.vala" - g_signal_connect_object (_tmp21_, "broken", (GCallback) _move_photos_command_real_move_photos_command_on_proxy_broken_source_proxy_broken, self, 0); -#line 9566 "Commands.c" - } -#line 905 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp22_ = self->priv->old_events; -#line 905 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp23_ = current_media; -#line 905 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp24_ = old_event_proxy; -#line 905 "/home/jens/Source/shotwell/src/Commands.vala" - gee_abstract_map_set (G_TYPE_CHECK_INSTANCE_CAST (_tmp22_, GEE_TYPE_ABSTRACT_MAP, GeeAbstractMap), _tmp23_, _tmp24_); -#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 (_tmp15_); -#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 9586 "Commands.c" - } -#line 896 "/home/jens/Source/shotwell/src/Commands.vala" - _g_object_unref0 (_source_list); -#line 9590 "Commands.c" - } -#line 909 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp25_ = proxyable_get_proxy (G_TYPE_CHECK_INSTANCE_CAST (new_event, 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 = _tmp25_; -#line 910 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp26_ = self->priv->new_event_proxy; -#line 910 "/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 891 "/home/jens/Source/shotwell/src/Commands.vala" - return self; -#line 9604 "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 9618 "Commands.c" -} - - -static void -move_photos_command_real_move_photos_command_real_execute (Command* base) -{ - MovePhotosCommandRealMovePhotosCommand * self; - LibraryWindow* _tmp0_; - LibraryWindow* _tmp1_; - Page* _tmp2_; - Page* _tmp3_; - gboolean _tmp4_; -#line 922 "/home/jens/Source/shotwell/src/Commands.vala" - self = G_TYPE_CHECK_INSTANCE_CAST (base, MOVE_PHOTOS_COMMAND_TYPE_REAL_MOVE_PHOTOS_COMMAND, MovePhotosCommandRealMovePhotosCommand); -#line 925 "/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 928 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp0_ = library_window_get_app (); -#line 928 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp1_ = _tmp0_; -#line 928 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp2_ = page_window_get_current_page (G_TYPE_CHECK_INSTANCE_CAST (_tmp1_, TYPE_PAGE_WINDOW, PageWindow)); -#line 928 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp3_ = _tmp2_; -#line 928 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp4_ = G_TYPE_CHECK_INSTANCE_TYPE (_tmp3_, TYPE_EVENT_PAGE); -#line 928 "/home/jens/Source/shotwell/src/Commands.vala" - _g_object_unref0 (_tmp3_); -#line 928 "/home/jens/Source/shotwell/src/Commands.vala" - _g_object_unref0 (_tmp1_); -#line 928 "/home/jens/Source/shotwell/src/Commands.vala" - if (_tmp4_) { -#line 9651 "Commands.c" - Event* evt = NULL; - LibraryWindow* _tmp5_; - LibraryWindow* _tmp6_; - Page* _tmp7_; - EventPage* _tmp8_; - Event* _tmp9_; - Event* _tmp10_; - Event* _tmp11_; - GeeArrayList* _tmp12_; - gint _tmp13_; - gint _tmp14_; -#line 929 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp5_ = library_window_get_app (); -#line 929 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp6_ = _tmp5_; -#line 929 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp7_ = page_window_get_current_page (G_TYPE_CHECK_INSTANCE_CAST (_tmp6_, TYPE_PAGE_WINDOW, PageWindow)); -#line 929 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp8_ = G_TYPE_CHECK_INSTANCE_CAST (_tmp7_, TYPE_EVENT_PAGE, EventPage); -#line 929 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp9_ = event_page_get_event (_tmp8_); -#line 929 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp10_ = _tmp9_; -#line 929 "/home/jens/Source/shotwell/src/Commands.vala" - _g_object_unref0 (_tmp8_); -#line 929 "/home/jens/Source/shotwell/src/Commands.vala" - _g_object_unref0 (_tmp6_); -#line 929 "/home/jens/Source/shotwell/src/Commands.vala" - evt = _tmp10_; -#line 932 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp11_ = evt; -#line 932 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp12_ = G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_MULTIPLE_DATA_SOURCE_COMMAND, MultipleDataSourceCommand)->source_list; -#line 932 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp13_ = gee_abstract_collection_get_size (G_TYPE_CHECK_INSTANCE_CAST (_tmp12_, GEE_TYPE_ABSTRACT_COLLECTION, GeeAbstractCollection)); -#line 932 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp14_ = _tmp13_; -#line 932 "/home/jens/Source/shotwell/src/Commands.vala" - if (event_source_get_media_count (G_TYPE_CHECK_INSTANCE_CAST (_tmp11_, TYPE_EVENT_SOURCE, EventSource)) == _tmp14_) { -#line 9691 "Commands.c" - LibraryWindow* _tmp15_; - LibraryWindow* _tmp16_; - SourceProxy* _tmp17_; - DataSource* _tmp18_; - Event* _tmp19_; -#line 935 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp15_ = library_window_get_app (); -#line 935 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp16_ = _tmp15_; -#line 935 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp17_ = self->priv->new_event_proxy; -#line 935 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp18_ = source_proxy_get_source (_tmp17_); -#line 935 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp19_ = G_TYPE_CHECK_INSTANCE_CAST (_tmp18_, TYPE_EVENT, Event); -#line 935 "/home/jens/Source/shotwell/src/Commands.vala" - library_window_switch_to_event (_tmp16_, _tmp19_); -#line 935 "/home/jens/Source/shotwell/src/Commands.vala" - _g_object_unref0 (_tmp19_); -#line 935 "/home/jens/Source/shotwell/src/Commands.vala" - _g_object_unref0 (_tmp16_); -#line 9713 "Commands.c" - } -#line 928 "/home/jens/Source/shotwell/src/Commands.vala" - _g_object_unref0 (evt); -#line 9717 "Commands.c" - } else { - SourceProxy* _tmp20_; - DataSource* _tmp21_; - Event* _tmp22_; - GeeArrayList* _tmp23_; - gint _tmp24_; - gint _tmp25_; - gboolean _tmp26_; -#line 941 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp20_ = self->priv->new_event_proxy; -#line 941 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp21_ = source_proxy_get_source (_tmp20_); -#line 941 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp22_ = G_TYPE_CHECK_INSTANCE_CAST (_tmp21_, TYPE_EVENT, Event); -#line 941 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp23_ = G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_MULTIPLE_DATA_SOURCE_COMMAND, MultipleDataSourceCommand)->source_list; -#line 941 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp24_ = gee_abstract_collection_get_size (G_TYPE_CHECK_INSTANCE_CAST (_tmp23_, GEE_TYPE_ABSTRACT_COLLECTION, GeeAbstractCollection)); -#line 941 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp25_ = _tmp24_; -#line 941 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp26_ = event_source_get_media_count (G_TYPE_CHECK_INSTANCE_CAST (_tmp22_, TYPE_EVENT_SOURCE, EventSource)) == _tmp25_; -#line 941 "/home/jens/Source/shotwell/src/Commands.vala" - _g_object_unref0 (_tmp22_); -#line 941 "/home/jens/Source/shotwell/src/Commands.vala" - if (_tmp26_) { -#line 9744 "Commands.c" - LibraryWindow* _tmp27_; - LibraryWindow* _tmp28_; - SourceProxy* _tmp29_; - DataSource* _tmp30_; - Event* _tmp31_; -#line 943 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp27_ = library_window_get_app (); -#line 943 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp28_ = _tmp27_; -#line 943 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp29_ = self->priv->new_event_proxy; -#line 943 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp30_ = source_proxy_get_source (_tmp29_); -#line 943 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp31_ = G_TYPE_CHECK_INSTANCE_CAST (_tmp30_, TYPE_EVENT, Event); -#line 943 "/home/jens/Source/shotwell/src/Commands.vala" - library_window_switch_to_event (_tmp28_, _tmp31_); -#line 943 "/home/jens/Source/shotwell/src/Commands.vala" - _g_object_unref0 (_tmp31_); -#line 943 "/home/jens/Source/shotwell/src/Commands.vala" - _g_object_unref0 (_tmp28_); -#line 9766 "Commands.c" - } - } -} - - -static void -move_photos_command_real_move_photos_command_real_execute_on_source (MultipleDataSourceCommand* base, - DataSource* source) -{ - MovePhotosCommandRealMovePhotosCommand * self; - SourceProxy* _tmp0_; - DataSource* _tmp1_; - Event* _tmp2_; -#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_ = self->priv->new_event_proxy; -#line 950 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp1_ = source_proxy_get_source (_tmp0_); -#line 950 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp2_ = G_TYPE_CHECK_INSTANCE_CAST (_tmp1_, TYPE_EVENT, Event); -#line 950 "/home/jens/Source/shotwell/src/Commands.vala" - media_source_set_event (G_TYPE_CHECK_INSTANCE_CAST (source, TYPE_MEDIA_SOURCE, MediaSource), _tmp2_); -#line 950 "/home/jens/Source/shotwell/src/Commands.vala" - _g_object_unref0 (_tmp2_); -#line 9794 "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; - MediaSource* _tmp0_; - SourceProxy* event_proxy = NULL; - GeeHashMap* _tmp1_; - MediaSource* _tmp2_; - gpointer _tmp3_; - Event* _tmp4_ = NULL; - SourceProxy* _tmp5_; - MediaSource* _tmp8_; -#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_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_CAST (source, TYPE_MEDIA_SOURCE, MediaSource)); -#line 954 "/home/jens/Source/shotwell/src/Commands.vala" - current_media = _tmp0_; -#line 955 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp1_ = self->priv->old_events; -#line 955 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp2_ = current_media; -#line 955 "/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 955 "/home/jens/Source/shotwell/src/Commands.vala" - event_proxy = (SourceProxy*) _tmp3_; -#line 957 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp5_ = event_proxy; -#line 957 "/home/jens/Source/shotwell/src/Commands.vala" - if (_tmp5_ != NULL) { -#line 9832 "Commands.c" - SourceProxy* _tmp6_; - DataSource* _tmp7_; -#line 957 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp6_ = event_proxy; -#line 957 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp7_ = source_proxy_get_source (_tmp6_); -#line 957 "/home/jens/Source/shotwell/src/Commands.vala" - _g_object_unref0 (_tmp4_); -#line 957 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp4_ = G_TYPE_CHECK_INSTANCE_CAST (_tmp7_, TYPE_EVENT, Event); -#line 9843 "Commands.c" - } else { -#line 957 "/home/jens/Source/shotwell/src/Commands.vala" - _g_object_unref0 (_tmp4_); -#line 957 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp4_ = NULL; -#line 9849 "Commands.c" - } -#line 957 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp8_ = current_media; -#line 957 "/home/jens/Source/shotwell/src/Commands.vala" - media_source_set_event (_tmp8_, _tmp4_); -#line 953 "/home/jens/Source/shotwell/src/Commands.vala" - _g_object_unref0 (_tmp4_); -#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 9861 "Commands.c" -} - - -static void -move_photos_command_real_move_photos_command_on_proxy_broken (MovePhotosCommandRealMovePhotosCommand* self) -{ - CommandManager* _tmp0_; - CommandManager* _tmp1_; -#line 960 "/home/jens/Source/shotwell/src/Commands.vala" - g_return_if_fail (MOVE_PHOTOS_COMMAND_IS_REAL_MOVE_PHOTOS_COMMAND (self)); -#line 961 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp0_ = command_get_command_manager (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_COMMAND, Command)); -#line 961 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp1_ = _tmp0_; -#line 961 "/home/jens/Source/shotwell/src/Commands.vala" - command_manager_reset (_tmp1_); -#line 961 "/home/jens/Source/shotwell/src/Commands.vala" - _command_manager_unref0 (_tmp1_); -#line 9880 "Commands.c" -} - - -static void -move_photos_command_real_move_photos_command_class_init (MovePhotosCommandRealMovePhotosCommandClass * klass) -{ -#line 886 "/home/jens/Source/shotwell/src/Commands.vala" - move_photos_command_real_move_photos_command_parent_class = g_type_class_peek_parent (klass); -#line 886 "/home/jens/Source/shotwell/src/Commands.vala" - g_type_class_add_private (klass, sizeof (MovePhotosCommandRealMovePhotosCommandPrivate)); -#line 886 "/home/jens/Source/shotwell/src/Commands.vala" - ((CommandClass *) klass)->execute = (void (*) (Command *)) move_photos_command_real_move_photos_command_real_execute; -#line 886 "/home/jens/Source/shotwell/src/Commands.vala" - ((MultipleDataSourceCommandClass *) klass)->execute_on_source = (void (*) (MultipleDataSourceCommand *, DataSource*)) move_photos_command_real_move_photos_command_real_execute_on_source; -#line 886 "/home/jens/Source/shotwell/src/Commands.vala" - ((MultipleDataSourceCommandClass *) klass)->undo_on_source = (void (*) (MultipleDataSourceCommand *, DataSource*)) move_photos_command_real_move_photos_command_real_undo_on_source; -#line 886 "/home/jens/Source/shotwell/src/Commands.vala" - G_OBJECT_CLASS (klass)->finalize = move_photos_command_real_move_photos_command_finalize; -#line 9899 "Commands.c" -} - - -static void -move_photos_command_real_move_photos_command_instance_init (MovePhotosCommandRealMovePhotosCommand * self) -{ - GeeHashMap* _tmp0_; -#line 886 "/home/jens/Source/shotwell/src/Commands.vala" - self->priv = MOVE_PHOTOS_COMMAND_REAL_MOVE_PHOTOS_COMMAND_GET_PRIVATE (self); -#line 887 "/home/jens/Source/shotwell/src/Commands.vala" - self->priv->new_event_proxy = NULL; -#line 888 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp0_ = gee_hash_map_new (TYPE_MEDIA_SOURCE, (GBoxedCopyFunc) g_object_ref, (GDestroyNotify) g_object_unref, TYPE_SOURCE_PROXY, (GBoxedCopyFunc) source_proxy_ref, (GDestroyNotify) source_proxy_unref, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL); -#line 888 "/home/jens/Source/shotwell/src/Commands.vala" - self->priv->old_events = _tmp0_; -#line 9915 "Commands.c" -} - - -static void -move_photos_command_real_move_photos_command_finalize (GObject * obj) -{ - MovePhotosCommandRealMovePhotosCommand * self; - SourceProxy* _tmp0_; - guint _tmp1_; -#line 886 "/home/jens/Source/shotwell/src/Commands.vala" - self = G_TYPE_CHECK_INSTANCE_CAST (obj, MOVE_PHOTOS_COMMAND_TYPE_REAL_MOVE_PHOTOS_COMMAND, MovePhotosCommandRealMovePhotosCommand); -#line 914 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp0_ = self->priv->new_event_proxy; -#line 914 "/home/jens/Source/shotwell/src/Commands.vala" - g_signal_parse_name ("broken", TYPE_SOURCE_PROXY, &_tmp1_, NULL, FALSE); -#line 914 "/home/jens/Source/shotwell/src/Commands.vala" - g_signal_handlers_disconnect_matched (_tmp0_, G_SIGNAL_MATCH_ID | G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA, _tmp1_, 0, NULL, (GCallback) _move_photos_command_real_move_photos_command_on_proxy_broken_source_proxy_broken, self); -#line 9933 "Commands.c" - { - GeeIterator* _proxy_it = NULL; - GeeHashMap* _tmp2_; - GeeCollection* _tmp3_; - GeeCollection* _tmp4_; - GeeCollection* _tmp5_; - GeeIterator* _tmp6_; - GeeIterator* _tmp7_; -#line 916 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp2_ = self->priv->old_events; -#line 916 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp3_ = gee_abstract_map_get_values (G_TYPE_CHECK_INSTANCE_CAST (_tmp2_, GEE_TYPE_ABSTRACT_MAP, GeeAbstractMap)); -#line 916 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp4_ = _tmp3_; -#line 916 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp5_ = _tmp4_; -#line 916 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp6_ = gee_iterable_iterator (G_TYPE_CHECK_INSTANCE_CAST (_tmp5_, GEE_TYPE_ITERABLE, GeeIterable)); -#line 916 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp7_ = _tmp6_; -#line 916 "/home/jens/Source/shotwell/src/Commands.vala" - _g_object_unref0 (_tmp5_); -#line 916 "/home/jens/Source/shotwell/src/Commands.vala" - _proxy_it = _tmp7_; -#line 916 "/home/jens/Source/shotwell/src/Commands.vala" - while (TRUE) { -#line 9960 "Commands.c" - GeeIterator* _tmp8_; - SourceProxy* proxy = NULL; - GeeIterator* _tmp9_; - gpointer _tmp10_; - SourceProxy* _tmp11_; -#line 916 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp8_ = _proxy_it; -#line 916 "/home/jens/Source/shotwell/src/Commands.vala" - if (!gee_iterator_next (_tmp8_)) { -#line 916 "/home/jens/Source/shotwell/src/Commands.vala" - break; -#line 9972 "Commands.c" - } -#line 916 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp9_ = _proxy_it; -#line 916 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp10_ = gee_iterator_get (_tmp9_); -#line 916 "/home/jens/Source/shotwell/src/Commands.vala" - proxy = (SourceProxy*) _tmp10_; -#line 917 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp11_ = proxy; -#line 917 "/home/jens/Source/shotwell/src/Commands.vala" - if (_tmp11_ != NULL) { -#line 9984 "Commands.c" - SourceProxy* _tmp12_; - guint _tmp13_; -#line 918 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp12_ = proxy; -#line 918 "/home/jens/Source/shotwell/src/Commands.vala" - g_signal_parse_name ("broken", TYPE_SOURCE_PROXY, &_tmp13_, NULL, FALSE); -#line 918 "/home/jens/Source/shotwell/src/Commands.vala" - g_signal_handlers_disconnect_matched (_tmp12_, G_SIGNAL_MATCH_ID | G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA, _tmp13_, 0, NULL, (GCallback) _move_photos_command_real_move_photos_command_on_proxy_broken_source_proxy_broken, self); -#line 9993 "Commands.c" - } -#line 916 "/home/jens/Source/shotwell/src/Commands.vala" - _source_proxy_unref0 (proxy); -#line 9997 "Commands.c" - } -#line 916 "/home/jens/Source/shotwell/src/Commands.vala" - _g_object_unref0 (_proxy_it); -#line 10001 "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 10009 "Commands.c" -} - - -GType -move_photos_command_real_move_photos_command_get_type (void) -{ - static volatile gsize move_photos_command_real_move_photos_command_type_id__volatile = 0; - if (g_once_init_enter (&move_photos_command_real_move_photos_command_type_id__volatile)) { - static const GTypeInfo g_define_type_info = { sizeof (MovePhotosCommandRealMovePhotosCommandClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) move_photos_command_real_move_photos_command_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (MovePhotosCommandRealMovePhotosCommand), 0, (GInstanceInitFunc) move_photos_command_real_move_photos_command_instance_init, NULL }; - GType move_photos_command_real_move_photos_command_type_id; - move_photos_command_real_move_photos_command_type_id = g_type_register_static (TYPE_MULTIPLE_DATA_SOURCE_COMMAND, "MovePhotosCommandRealMovePhotosCommand", &g_define_type_info, 0); - g_once_init_leave (&move_photos_command_real_move_photos_command_type_id__volatile, move_photos_command_real_move_photos_command_type_id); - } - return move_photos_command_real_move_photos_command_type_id__volatile; -} - - -static void -move_photos_command_class_init (MovePhotosCommandClass * klass) -{ -#line 883 "/home/jens/Source/shotwell/src/Commands.vala" - move_photos_command_parent_class = g_type_class_peek_parent (klass); -#line 883 "/home/jens/Source/shotwell/src/Commands.vala" - ((CommandClass *) klass)->prepare = (void (*) (Command *)) move_photos_command_real_prepare; -#line 883 "/home/jens/Source/shotwell/src/Commands.vala" - ((CommandClass *) klass)->execute = (void (*) (Command *)) move_photos_command_real_execute; -#line 883 "/home/jens/Source/shotwell/src/Commands.vala" - ((CommandClass *) klass)->undo = (void (*) (Command *)) move_photos_command_real_undo; -#line 883 "/home/jens/Source/shotwell/src/Commands.vala" - G_OBJECT_CLASS (klass)->finalize = move_photos_command_finalize; -#line 10040 "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 10060 "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* _tmp9_; - Event* new_event = NULL; - MediaSource* _tmp10_; - Event* _tmp11_; - MovePhotosCommandRealMovePhotosCommand* _tmp12_; -#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 10095 "Commands.c" - { - GeeIterator* _view_it = NULL; - GeeIterator* _tmp0_; -#line 993 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp0_ = gee_iterable_iterator (iter); -#line 993 "/home/jens/Source/shotwell/src/Commands.vala" - _view_it = _tmp0_; -#line 993 "/home/jens/Source/shotwell/src/Commands.vala" - while (TRUE) { -#line 10105 "Commands.c" - GeeIterator* _tmp1_; - DataView* view = NULL; - GeeIterator* _tmp2_; - gpointer _tmp3_; - MediaSource* current_source = NULL; - DataView* _tmp4_; - DataSource* _tmp5_; - MediaSource* _tmp6_; -#line 993 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp1_ = _view_it; -#line 993 "/home/jens/Source/shotwell/src/Commands.vala" - if (!gee_iterator_next (_tmp1_)) { -#line 993 "/home/jens/Source/shotwell/src/Commands.vala" - break; -#line 10120 "Commands.c" - } -#line 993 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp2_ = _view_it; -#line 993 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp3_ = gee_iterator_get (_tmp2_); -#line 993 "/home/jens/Source/shotwell/src/Commands.vala" - view = (DataView*) _tmp3_; -#line 994 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp4_ = view; -#line 994 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp5_ = data_view_get_source (_tmp4_); -#line 994 "/home/jens/Source/shotwell/src/Commands.vala" - current_source = G_TYPE_CHECK_INSTANCE_CAST (_tmp5_, TYPE_MEDIA_SOURCE, MediaSource); -#line 996 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp6_ = key_source; -#line 996 "/home/jens/Source/shotwell/src/Commands.vala" - if (_tmp6_ == NULL) { -#line 10138 "Commands.c" - MediaSource* _tmp7_; - MediaSource* _tmp8_; -#line 997 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp7_ = current_source; -#line 997 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp8_ = _g_object_ref0 (_tmp7_); -#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 = _tmp8_; -#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 10155 "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 10161 "Commands.c" - } -#line 993 "/home/jens/Source/shotwell/src/Commands.vala" - _g_object_unref0 (_view_it); -#line 10165 "Commands.c" - } -#line 1003 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp9_ = key_source; -#line 1003 "/home/jens/Source/shotwell/src/Commands.vala" - _vala_assert (_tmp9_ != NULL, "key_source != null"); -#line 1005 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp10_ = key_source; -#line 1005 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp11_ = event_create_empty_event (_tmp10_); -#line 1005 "/home/jens/Source/shotwell/src/Commands.vala" - new_event = _tmp11_; -#line 1007 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp12_ = move_photos_command_real_move_photos_command_new (new_event, iter, _ ("Creating New Event"), _ ("Removing Event"), RESOURCES_NEW_EVENT_LABEL, ""); -#line 1007 "/home/jens/Source/shotwell/src/Commands.vala" - _g_object_unref0 (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_MOVE_PHOTOS_COMMAND, MovePhotosCommand)->real_command); -#line 1007 "/home/jens/Source/shotwell/src/Commands.vala" - G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_MOVE_PHOTOS_COMMAND, MovePhotosCommand)->real_command = _tmp12_; -#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 10189 "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 10198 "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 10207 "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; - MovePhotosCommandRealMovePhotosCommand* _tmp0_; -#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_ = move_photos_command_real_move_photos_command_new (new_event, iter, _ ("Moving Photos to New Event"), _ ("Setting Photos to Previous Event"), RESOURCES_SET_PHOTO_EVENT_LABEL, ""); -#line 1017 "/home/jens/Source/shotwell/src/Commands.vala" - _g_object_unref0 (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_MOVE_PHOTOS_COMMAND, MovePhotosCommand)->real_command); -#line 1017 "/home/jens/Source/shotwell/src/Commands.vala" - G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_MOVE_PHOTOS_COMMAND, MovePhotosCommand)->real_command = _tmp0_; -#line 1014 "/home/jens/Source/shotwell/src/Commands.vala" - return self; -#line 10252 "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 10262 "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 10271 "Commands.c" -} - - -static void -set_event_command_instance_init (SetEventCommand * self) -{ -} - - -GType -set_event_command_get_type (void) -{ - static volatile gsize set_event_command_type_id__volatile = 0; - if (g_once_init_enter (&set_event_command_type_id__volatile)) { - static const GTypeInfo g_define_type_info = { sizeof (SetEventCommandClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) set_event_command_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (SetEventCommand), 0, (GInstanceInitFunc) set_event_command_instance_init, NULL }; - GType set_event_command_type_id; - set_event_command_type_id = g_type_register_static (TYPE_MOVE_PHOTOS_COMMAND, "SetEventCommand", &g_define_type_info, 0); - g_once_init_leave (&set_event_command_type_id__volatile, set_event_command_type_id); - } - return set_event_command_type_id__volatile; -} - - -MergeEventsCommand* -merge_events_command_construct (GType object_type, - GeeIterable* iter) -{ - MergeEventsCommand * self = NULL; - Event* master_event = NULL; - gint named_evt_src_count = 0; - gint unnamed_evt_src_count = 0; - GeeArrayList* media_thumbs = NULL; - GeeArrayList* _tmp0_; - Event* _tmp37_; - GeeArrayList* _tmp38_; - gint _tmp39_; - gint _tmp40_; - Event* _tmp41_; - GeeArrayList* _tmp42_; - MovePhotosCommandRealMovePhotosCommand* _tmp43_; -#line 1024 "/home/jens/Source/shotwell/src/Commands.vala" - g_return_val_if_fail (GEE_IS_ITERABLE (iter), NULL); -#line 1025 "/home/jens/Source/shotwell/src/Commands.vala" - self = (MergeEventsCommand*) move_photos_command_construct (object_type, RESOURCES_MERGE_LABEL, ""); -#line 1031 "/home/jens/Source/shotwell/src/Commands.vala" - master_event = NULL; -#line 1032 "/home/jens/Source/shotwell/src/Commands.vala" - named_evt_src_count = 0; -#line 1033 "/home/jens/Source/shotwell/src/Commands.vala" - unnamed_evt_src_count = 0; -#line 1034 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp0_ = gee_array_list_new (TYPE_THUMBNAIL_VIEW, (GBoxedCopyFunc) g_object_ref, (GDestroyNotify) g_object_unref, NULL, NULL, NULL); -#line 1034 "/home/jens/Source/shotwell/src/Commands.vala" - media_thumbs = _tmp0_; -#line 10326 "Commands.c" - { - GeeIterator* _view_it = NULL; - GeeIterator* _tmp1_; -#line 1036 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp1_ = gee_iterable_iterator (iter); -#line 1036 "/home/jens/Source/shotwell/src/Commands.vala" - _view_it = _tmp1_; -#line 1036 "/home/jens/Source/shotwell/src/Commands.vala" - while (TRUE) { -#line 10336 "Commands.c" - GeeIterator* _tmp2_; - DataView* view = NULL; - GeeIterator* _tmp3_; - gpointer _tmp4_; - Event* event = NULL; - DataView* _tmp5_; - DataSource* _tmp6_; - Event* _tmp7_; -#line 1036 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp2_ = _view_it; -#line 1036 "/home/jens/Source/shotwell/src/Commands.vala" - if (!gee_iterator_next (_tmp2_)) { -#line 1036 "/home/jens/Source/shotwell/src/Commands.vala" - break; -#line 10351 "Commands.c" - } -#line 1036 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp3_ = _view_it; -#line 1036 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp4_ = gee_iterator_get (_tmp3_); -#line 1036 "/home/jens/Source/shotwell/src/Commands.vala" - view = (DataView*) _tmp4_; -#line 1037 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp5_ = view; -#line 1037 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp6_ = data_view_get_source (_tmp5_); -#line 1037 "/home/jens/Source/shotwell/src/Commands.vala" - event = G_TYPE_CHECK_INSTANCE_CAST (_tmp6_, TYPE_EVENT, Event); -#line 1040 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp7_ = master_event; -#line 1040 "/home/jens/Source/shotwell/src/Commands.vala" - if (_tmp7_ == NULL) { -#line 10369 "Commands.c" - Event* _tmp8_; - Event* _tmp9_; - Event* _tmp10_; - Event* _tmp11_; -#line 1043 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp8_ = event; -#line 1043 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp9_ = _g_object_ref0 (_tmp8_); -#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 = _tmp9_; -#line 1044 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp10_ = master_event; -#line 1044 "/home/jens/Source/shotwell/src/Commands.vala" - unnamed_evt_src_count = event_source_get_media_count (G_TYPE_CHECK_INSTANCE_CAST (_tmp10_, TYPE_EVENT_SOURCE, EventSource)); -#line 1045 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp11_ = event; -#line 1045 "/home/jens/Source/shotwell/src/Commands.vala" - if (event_has_name (_tmp11_)) { -#line 10390 "Commands.c" - Event* _tmp12_; -#line 1046 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp12_ = master_event; -#line 1046 "/home/jens/Source/shotwell/src/Commands.vala" - named_evt_src_count = event_source_get_media_count (G_TYPE_CHECK_INSTANCE_CAST (_tmp12_, TYPE_EVENT_SOURCE, EventSource)); -#line 10396 "Commands.c" - } - } else { - Event* _tmp13_; -#line 1050 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp13_ = event; -#line 1050 "/home/jens/Source/shotwell/src/Commands.vala" - if (event_has_name (_tmp13_)) { -#line 10404 "Commands.c" - Event* _tmp14_; - gint _tmp15_; -#line 1051 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp14_ = event; -#line 1051 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp15_ = named_evt_src_count; -#line 1051 "/home/jens/Source/shotwell/src/Commands.vala" - if (event_source_get_media_count (G_TYPE_CHECK_INSTANCE_CAST (_tmp14_, TYPE_EVENT_SOURCE, EventSource)) > _tmp15_) { -#line 10413 "Commands.c" - Event* _tmp16_; - Event* _tmp17_; - Event* _tmp18_; -#line 1052 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp16_ = event; -#line 1052 "/home/jens/Source/shotwell/src/Commands.vala" - named_evt_src_count = event_source_get_media_count (G_TYPE_CHECK_INSTANCE_CAST (_tmp16_, TYPE_EVENT_SOURCE, EventSource)); -#line 1053 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp17_ = event; -#line 1053 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp18_ = _g_object_ref0 (_tmp17_); -#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 = _tmp18_; -#line 10429 "Commands.c" - } - } else { - gint _tmp19_; -#line 1055 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp19_ = named_evt_src_count; -#line 1055 "/home/jens/Source/shotwell/src/Commands.vala" - if (_tmp19_ == 0) { -#line 10437 "Commands.c" - Event* _tmp20_; - gint _tmp21_; -#line 1059 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp20_ = event; -#line 1059 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp21_ = unnamed_evt_src_count; -#line 1059 "/home/jens/Source/shotwell/src/Commands.vala" - if (event_source_get_media_count (G_TYPE_CHECK_INSTANCE_CAST (_tmp20_, TYPE_EVENT_SOURCE, EventSource)) > _tmp21_) { -#line 10446 "Commands.c" - Event* _tmp22_; - Event* _tmp23_; - Event* _tmp24_; -#line 1060 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp22_ = event; -#line 1060 "/home/jens/Source/shotwell/src/Commands.vala" - unnamed_evt_src_count = event_source_get_media_count (G_TYPE_CHECK_INSTANCE_CAST (_tmp22_, TYPE_EVENT_SOURCE, EventSource)); -#line 1061 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp23_ = event; -#line 1061 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp24_ = _g_object_ref0 (_tmp23_); -#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 = _tmp24_; -#line 10462 "Commands.c" - } - } - } - } - { - GeeIterator* _media_source_it = NULL; - Event* _tmp25_; - GeeCollection* _tmp26_; - GeeCollection* _tmp27_; - GeeIterator* _tmp28_; - GeeIterator* _tmp29_; -#line 1068 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp25_ = event; -#line 1068 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp26_ = event_source_get_media (G_TYPE_CHECK_INSTANCE_CAST (_tmp25_, TYPE_EVENT_SOURCE, EventSource)); -#line 1068 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp27_ = _tmp26_; -#line 1068 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp28_ = gee_iterable_iterator (G_TYPE_CHECK_INSTANCE_CAST (_tmp27_, GEE_TYPE_ITERABLE, GeeIterable)); -#line 1068 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp29_ = _tmp28_; -#line 1068 "/home/jens/Source/shotwell/src/Commands.vala" - _g_object_unref0 (_tmp27_); -#line 1068 "/home/jens/Source/shotwell/src/Commands.vala" - _media_source_it = _tmp29_; -#line 1068 "/home/jens/Source/shotwell/src/Commands.vala" - while (TRUE) { -#line 10490 "Commands.c" - GeeIterator* _tmp30_; - MediaSource* media_source = NULL; - GeeIterator* _tmp31_; - gpointer _tmp32_; - GeeArrayList* _tmp33_; - MediaSource* _tmp34_; - ThumbnailView* _tmp35_; - ThumbnailView* _tmp36_; -#line 1068 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp30_ = _media_source_it; -#line 1068 "/home/jens/Source/shotwell/src/Commands.vala" - if (!gee_iterator_next (_tmp30_)) { -#line 1068 "/home/jens/Source/shotwell/src/Commands.vala" - break; -#line 10505 "Commands.c" - } -#line 1068 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp31_ = _media_source_it; -#line 1068 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp32_ = gee_iterator_get (_tmp31_); -#line 1068 "/home/jens/Source/shotwell/src/Commands.vala" - media_source = (MediaSource*) _tmp32_; -#line 1069 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp33_ = media_thumbs; -#line 1069 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp34_ = media_source; -#line 1069 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp35_ = thumbnail_view_new (G_TYPE_CHECK_INSTANCE_CAST (_tmp34_, TYPE_THUMBNAIL_SOURCE, ThumbnailSource)); -#line 1069 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp36_ = _tmp35_; -#line 1069 "/home/jens/Source/shotwell/src/Commands.vala" - gee_abstract_collection_add (G_TYPE_CHECK_INSTANCE_CAST (_tmp33_, GEE_TYPE_ABSTRACT_COLLECTION, GeeAbstractCollection), _tmp36_); -#line 1069 "/home/jens/Source/shotwell/src/Commands.vala" - _g_object_unref0 (_tmp36_); -#line 1068 "/home/jens/Source/shotwell/src/Commands.vala" - _g_object_unref0 (media_source); -#line 10527 "Commands.c" - } -#line 1068 "/home/jens/Source/shotwell/src/Commands.vala" - _g_object_unref0 (_media_source_it); -#line 10531 "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 10537 "Commands.c" - } -#line 1036 "/home/jens/Source/shotwell/src/Commands.vala" - _g_object_unref0 (_view_it); -#line 10541 "Commands.c" - } -#line 1072 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp37_ = master_event; -#line 1072 "/home/jens/Source/shotwell/src/Commands.vala" - _vala_assert (_tmp37_ != NULL, "master_event != null"); -#line 1073 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp38_ = media_thumbs; -#line 1073 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp39_ = gee_abstract_collection_get_size (G_TYPE_CHECK_INSTANCE_CAST (_tmp38_, GEE_TYPE_ABSTRACT_COLLECTION, GeeAbstractCollection)); -#line 1073 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp40_ = _tmp39_; -#line 1073 "/home/jens/Source/shotwell/src/Commands.vala" - _vala_assert (_tmp40_ > 0, "media_thumbs.size > 0"); -#line 1075 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp41_ = master_event; -#line 1075 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp42_ = media_thumbs; -#line 1075 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp43_ = move_photos_command_real_move_photos_command_new (_tmp41_, G_TYPE_CHECK_INSTANCE_CAST (_tmp42_, GEE_TYPE_ITERABLE, GeeIterable), _ ("Merging"), _ ("Unmerging"), RESOURCES_MERGE_LABEL, ""); -#line 1075 "/home/jens/Source/shotwell/src/Commands.vala" - _g_object_unref0 (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_MOVE_PHOTOS_COMMAND, MovePhotosCommand)->real_command); -#line 1075 "/home/jens/Source/shotwell/src/Commands.vala" - G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_MOVE_PHOTOS_COMMAND, MovePhotosCommand)->real_command = _tmp43_; -#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 10571 "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 10580 "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 10589 "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 10620 "Commands.c" -} - - -DuplicateMultiplePhotosCommand* -duplicate_multiple_photos_command_construct (GType object_type, - GeeIterable* iter) -{ - DuplicateMultiplePhotosCommand * self = NULL; - LibraryPhotoSourceCollection* _tmp0_; -#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" - self = (DuplicateMultiplePhotosCommand*) multiple_data_source_command_construct (object_type, iter, _ ("Duplicating photos"), _ ("Removing duplicated photos"), RESOURCES_DUPLICATE_PHOTO_LABEL, RESOURCES_DUPLICATE_PHOTO_TOOLTIP); -#line 1088 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp0_ = library_photo_global; -#line 1088 "/home/jens/Source/shotwell/src/Commands.vala" - g_signal_connect_object (G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, 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 10640 "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 10649 "Commands.c" -} - - -static void -duplicate_multiple_photos_command_on_photo_destroyed (DuplicateMultiplePhotosCommand* self, - DataSource* source) -{ - GeeHashMap* _tmp0_; - GeeCollection* _tmp1_; - GeeCollection* _tmp2_; - GeeCollection* _tmp3_; - gboolean _tmp4_; -#line 1095 "/home/jens/Source/shotwell/src/Commands.vala" - g_return_if_fail (IS_DUPLICATE_MULTIPLE_PHOTOS_COMMAND (self)); -#line 1095 "/home/jens/Source/shotwell/src/Commands.vala" - g_return_if_fail (IS_DATA_SOURCE (source)); -#line 1097 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp0_ = self->priv->dupes; -#line 1097 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp1_ = gee_abstract_map_get_values (G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, GEE_TYPE_ABSTRACT_MAP, GeeAbstractMap)); -#line 1097 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp2_ = _tmp1_; -#line 1097 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp3_ = _tmp2_; -#line 1097 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp4_ = gee_collection_contains (_tmp3_, G_TYPE_CHECK_INSTANCE_CAST (source, TYPE_LIBRARY_PHOTO, LibraryPhoto)); -#line 1097 "/home/jens/Source/shotwell/src/Commands.vala" - _g_object_unref0 (_tmp3_); -#line 1097 "/home/jens/Source/shotwell/src/Commands.vala" - if (_tmp4_) { -#line 10680 "Commands.c" - CommandManager* _tmp5_; - CommandManager* _tmp6_; -#line 1098 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp5_ = command_get_command_manager (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_COMMAND, Command)); -#line 1098 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp6_ = _tmp5_; -#line 1098 "/home/jens/Source/shotwell/src/Commands.vala" - command_manager_reset (_tmp6_); -#line 1098 "/home/jens/Source/shotwell/src/Commands.vala" - _command_manager_unref0 (_tmp6_); -#line 10691 "Commands.c" - } -} - - -static void -duplicate_multiple_photos_command_real_execute (Command* base) -{ - DuplicateMultiplePhotosCommand * self; - GeeHashMap* _tmp0_; - gint _tmp1_; -#line 1101 "/home/jens/Source/shotwell/src/Commands.vala" - self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_DUPLICATE_MULTIPLE_PHOTOS_COMMAND, DuplicateMultiplePhotosCommand); -#line 1102 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp0_ = self->priv->dupes; -#line 1102 "/home/jens/Source/shotwell/src/Commands.vala" - gee_abstract_map_clear (G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, GEE_TYPE_ABSTRACT_MAP, GeeAbstractMap)); -#line 1103 "/home/jens/Source/shotwell/src/Commands.vala" - self->priv->failed = 0; -#line 1105 "/home/jens/Source/shotwell/src/Commands.vala" - COMMAND_CLASS (duplicate_multiple_photos_command_parent_class)->execute (G_TYPE_CHECK_INSTANCE_CAST (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_MULTIPLE_DATA_SOURCE_COMMAND, MultipleDataSourceCommand), TYPE_COMMAND, Command)); -#line 1107 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp1_ = self->priv->failed; -#line 1107 "/home/jens/Source/shotwell/src/Commands.vala" - if (_tmp1_ > 0) { -#line 10716 "Commands.c" - gchar* error_string = NULL; - gint _tmp2_; - gint _tmp3_; - gchar* _tmp4_; - const gchar* _tmp5_; -#line 1108 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp2_ = self->priv->failed; -#line 1108 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp3_ = self->priv->failed; -#line 1108 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp4_ = g_strdup_printf (ngettext ("Unable to duplicate one photo due to a file error", "Unable to duplicate %d photos due to file errors", (gulong) _tmp2_), _tmp3_); -#line 1108 "/home/jens/Source/shotwell/src/Commands.vala" - error_string = _tmp4_; -#line 1110 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp5_ = error_string; -#line 1110 "/home/jens/Source/shotwell/src/Commands.vala" - app_window_error_message (_tmp5_, NULL); -#line 1107 "/home/jens/Source/shotwell/src/Commands.vala" - _g_free0 (error_string); -#line 10736 "Commands.c" - } -} - - -static void -duplicate_multiple_photos_command_real_execute_on_source (MultipleDataSourceCommand* base, - DataSource* source) -{ - DuplicateMultiplePhotosCommand * self; - LibraryPhoto* photo = NULL; - LibraryPhoto* _tmp0_; - 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_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_CAST (source, TYPE_LIBRARY_PHOTO, LibraryPhoto)); -#line 1115 "/home/jens/Source/shotwell/src/Commands.vala" - photo = _tmp0_; -#line 10757 "Commands.c" - { - LibraryPhoto* dupe = NULL; - LibraryPhoto* _tmp1_; - GeeHashMap* _tmp2_; -#line 1118 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp1_ = library_photo_duplicate (photo, &_inner_error_); -#line 1118 "/home/jens/Source/shotwell/src/Commands.vala" - dupe = _tmp1_; -#line 1118 "/home/jens/Source/shotwell/src/Commands.vala" - if (G_UNLIKELY (_inner_error_ != NULL)) { -#line 10768 "Commands.c" - goto __catch466_g_error; - } -#line 1119 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp2_ = self->priv->dupes; -#line 1119 "/home/jens/Source/shotwell/src/Commands.vala" - gee_abstract_map_set (G_TYPE_CHECK_INSTANCE_CAST (_tmp2_, GEE_TYPE_ABSTRACT_MAP, GeeAbstractMap), photo, dupe); -#line 1117 "/home/jens/Source/shotwell/src/Commands.vala" - _g_object_unref0 (dupe); -#line 10777 "Commands.c" - } - goto __finally466; - __catch466_g_error: - { - GError* err = NULL; - GFile* _tmp3_; - GFile* _tmp4_; - gchar* _tmp5_; - gchar* _tmp6_; - GError* _tmp7_; - const gchar* _tmp8_; - gint _tmp9_; -#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" - _tmp3_ = media_source_get_file (G_TYPE_CHECK_INSTANCE_CAST (photo, TYPE_MEDIA_SOURCE, MediaSource)); -#line 1121 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp4_ = _tmp3_; -#line 1121 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp5_ = g_file_get_path (_tmp4_); -#line 1121 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp6_ = _tmp5_; -#line 1121 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp7_ = err; -#line 1121 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp8_ = _tmp7_->message; -#line 1121 "/home/jens/Source/shotwell/src/Commands.vala" - g_critical ("Commands.vala:1121: Unable to duplicate file %s: %s", _tmp6_, _tmp8_); -#line 1121 "/home/jens/Source/shotwell/src/Commands.vala" - _g_free0 (_tmp6_); -#line 1121 "/home/jens/Source/shotwell/src/Commands.vala" - _g_object_unref0 (_tmp4_); -#line 1122 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp9_ = self->priv->failed; -#line 1122 "/home/jens/Source/shotwell/src/Commands.vala" - self->priv->failed = _tmp9_ + 1; -#line 1117 "/home/jens/Source/shotwell/src/Commands.vala" - _g_error_free0 (err); -#line 10818 "Commands.c" - } - __finally466: -#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 10831 "Commands.c" - } -#line 1114 "/home/jens/Source/shotwell/src/Commands.vala" - _g_object_unref0 (photo); -#line 10835 "Commands.c" -} - - -static void -duplicate_multiple_photos_command_real_undo (Command* base) -{ - DuplicateMultiplePhotosCommand * self; - LibraryPhotoSourceCollection* _tmp0_; - guint _tmp1_; - GeeHashMap* _tmp2_; - LibraryPhotoSourceCollection* _tmp3_; -#line 1126 "/home/jens/Source/shotwell/src/Commands.vala" - self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_DUPLICATE_MULTIPLE_PHOTOS_COMMAND, DuplicateMultiplePhotosCommand); -#line 1128 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp0_ = library_photo_global; -#line 1128 "/home/jens/Source/shotwell/src/Commands.vala" - g_signal_parse_name ("item-destroyed", TYPE_SOURCE_COLLECTION, &_tmp1_, NULL, FALSE); -#line 1128 "/home/jens/Source/shotwell/src/Commands.vala" - g_signal_handlers_disconnect_matched (G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, TYPE_SOURCE_COLLECTION, SourceCollection), G_SIGNAL_MATCH_ID | G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA, _tmp1_, 0, NULL, (GCallback) _duplicate_multiple_photos_command_on_photo_destroyed_source_collection_item_destroyed, self); -#line 1130 "/home/jens/Source/shotwell/src/Commands.vala" - COMMAND_CLASS (duplicate_multiple_photos_command_parent_class)->undo (G_TYPE_CHECK_INSTANCE_CAST (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_MULTIPLE_DATA_SOURCE_COMMAND, MultipleDataSourceCommand), TYPE_COMMAND, Command)); -#line 1133 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp2_ = self->priv->dupes; -#line 1133 "/home/jens/Source/shotwell/src/Commands.vala" - gee_abstract_map_clear (G_TYPE_CHECK_INSTANCE_CAST (_tmp2_, GEE_TYPE_ABSTRACT_MAP, GeeAbstractMap)); -#line 1134 "/home/jens/Source/shotwell/src/Commands.vala" - self->priv->failed = 0; -#line 1137 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp3_ = library_photo_global; -#line 1137 "/home/jens/Source/shotwell/src/Commands.vala" - g_signal_connect_object (G_TYPE_CHECK_INSTANCE_CAST (_tmp3_, TYPE_SOURCE_COLLECTION, SourceCollection), "item-destroyed", (GCallback) _duplicate_multiple_photos_command_on_photo_destroyed_source_collection_item_destroyed, self, 0); -#line 10867 "Commands.c" -} - - -static void -duplicate_multiple_photos_command_real_undo_on_source (MultipleDataSourceCommand* base, - DataSource* source) -{ - DuplicateMultiplePhotosCommand * self; - LibraryPhoto* photo = NULL; - LibraryPhoto* _tmp0_; - Marker* marker = NULL; - LibraryPhotoSourceCollection* _tmp1_; - GeeHashMap* _tmp2_; - gpointer _tmp3_; - LibraryPhoto* _tmp4_; - Marker* _tmp5_; - Marker* _tmp6_; - LibraryPhotoSourceCollection* _tmp7_; -#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_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_CAST (source, TYPE_LIBRARY_PHOTO, LibraryPhoto)); -#line 1141 "/home/jens/Source/shotwell/src/Commands.vala" - photo = _tmp0_; -#line 1143 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp1_ = library_photo_global; -#line 1143 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp2_ = self->priv->dupes; -#line 1143 "/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 1143 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp4_ = (LibraryPhoto*) _tmp3_; -#line 1143 "/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 1143 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp6_ = _tmp5_; -#line 1143 "/home/jens/Source/shotwell/src/Commands.vala" - _g_object_unref0 (_tmp4_); -#line 1143 "/home/jens/Source/shotwell/src/Commands.vala" - marker = _tmp6_; -#line 1144 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp7_ = library_photo_global; -#line 1144 "/home/jens/Source/shotwell/src/Commands.vala" - source_collection_destroy_marked (G_TYPE_CHECK_INSTANCE_CAST (_tmp7_, 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 10918 "Commands.c" -} - - -static void -duplicate_multiple_photos_command_class_init (DuplicateMultiplePhotosCommandClass * klass) -{ -#line 1080 "/home/jens/Source/shotwell/src/Commands.vala" - duplicate_multiple_photos_command_parent_class = g_type_class_peek_parent (klass); -#line 1080 "/home/jens/Source/shotwell/src/Commands.vala" - g_type_class_add_private (klass, sizeof (DuplicateMultiplePhotosCommandPrivate)); -#line 1080 "/home/jens/Source/shotwell/src/Commands.vala" - ((CommandClass *) klass)->execute = (void (*) (Command *)) duplicate_multiple_photos_command_real_execute; -#line 1080 "/home/jens/Source/shotwell/src/Commands.vala" - ((MultipleDataSourceCommandClass *) klass)->execute_on_source = (void (*) (MultipleDataSourceCommand *, DataSource*)) duplicate_multiple_photos_command_real_execute_on_source; -#line 1080 "/home/jens/Source/shotwell/src/Commands.vala" - ((CommandClass *) klass)->undo = (void (*) (Command *)) duplicate_multiple_photos_command_real_undo; -#line 1080 "/home/jens/Source/shotwell/src/Commands.vala" - ((MultipleDataSourceCommandClass *) klass)->undo_on_source = (void (*) (MultipleDataSourceCommand *, DataSource*)) duplicate_multiple_photos_command_real_undo_on_source; -#line 1080 "/home/jens/Source/shotwell/src/Commands.vala" - G_OBJECT_CLASS (klass)->finalize = duplicate_multiple_photos_command_finalize; -#line 10939 "Commands.c" -} - - -static void -duplicate_multiple_photos_command_instance_init (DuplicateMultiplePhotosCommand * self) -{ - GeeHashMap* _tmp0_; -#line 1080 "/home/jens/Source/shotwell/src/Commands.vala" - self->priv = DUPLICATE_MULTIPLE_PHOTOS_COMMAND_GET_PRIVATE (self); -#line 1081 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp0_ = gee_hash_map_new (TYPE_LIBRARY_PHOTO, (GBoxedCopyFunc) g_object_ref, (GDestroyNotify) g_object_unref, TYPE_LIBRARY_PHOTO, (GBoxedCopyFunc) g_object_ref, (GDestroyNotify) g_object_unref, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL); -#line 1081 "/home/jens/Source/shotwell/src/Commands.vala" - self->priv->dupes = _tmp0_; -#line 1082 "/home/jens/Source/shotwell/src/Commands.vala" - self->priv->failed = 0; -#line 10955 "Commands.c" -} - - -static void -duplicate_multiple_photos_command_finalize (GObject * obj) -{ - DuplicateMultiplePhotosCommand * self; - LibraryPhotoSourceCollection* _tmp0_; - guint _tmp1_; -#line 1080 "/home/jens/Source/shotwell/src/Commands.vala" - self = G_TYPE_CHECK_INSTANCE_CAST (obj, TYPE_DUPLICATE_MULTIPLE_PHOTOS_COMMAND, DuplicateMultiplePhotosCommand); -#line 1092 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp0_ = library_photo_global; -#line 1092 "/home/jens/Source/shotwell/src/Commands.vala" - g_signal_parse_name ("item-destroyed", TYPE_SOURCE_COLLECTION, &_tmp1_, NULL, FALSE); -#line 1092 "/home/jens/Source/shotwell/src/Commands.vala" - g_signal_handlers_disconnect_matched (G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, TYPE_SOURCE_COLLECTION, SourceCollection), G_SIGNAL_MATCH_ID | G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA, _tmp1_, 0, NULL, (GCallback) _duplicate_multiple_photos_command_on_photo_destroyed_source_collection_item_destroyed, self); -#line 1081 "/home/jens/Source/shotwell/src/Commands.vala" - _g_object_unref0 (self->priv->dupes); -#line 1080 "/home/jens/Source/shotwell/src/Commands.vala" - G_OBJECT_CLASS (duplicate_multiple_photos_command_parent_class)->finalize (obj); -#line 10977 "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; - const gchar* _tmp0_; -#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_ = resources_rating_label (rating); -#line 1155 "/home/jens/Source/shotwell/src/Commands.vala" - self = (SetRatingSingleCommand*) single_data_source_command_construct (object_type, source, _tmp0_, ""); -#line 1156 "/home/jens/Source/shotwell/src/Commands.vala" - self->priv->set_direct = TRUE; -#line 1157 "/home/jens/Source/shotwell/src/Commands.vala" - self->priv->new_rating = rating; -#line 1159 "/home/jens/Source/shotwell/src/Commands.vala" - self->priv->last_rating = media_source_get_rating (G_TYPE_CHECK_INSTANCE_CAST (G_TYPE_CHECK_INSTANCE_CAST (source, TYPE_LIBRARY_PHOTO, LibraryPhoto), TYPE_MEDIA_SOURCE, MediaSource)); -#line 1154 "/home/jens/Source/shotwell/src/Commands.vala" - return self; -#line 11016 "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 11026 "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; -#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" - if (is_incrementing) { -#line 1163 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp0_ = RESOURCES_INCREASE_RATING_LABEL; -#line 11043 "Commands.c" - } else { -#line 1164 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp0_ = RESOURCES_DECREASE_RATING_LABEL; -#line 11047 "Commands.c" - } -#line 1163 "/home/jens/Source/shotwell/src/Commands.vala" - self = (SetRatingSingleCommand*) single_data_source_command_construct (object_type, source, _tmp0_, ""); -#line 1165 "/home/jens/Source/shotwell/src/Commands.vala" - self->priv->set_direct = FALSE; -#line 1166 "/home/jens/Source/shotwell/src/Commands.vala" - self->priv->incrementing = is_incrementing; -#line 1168 "/home/jens/Source/shotwell/src/Commands.vala" - self->priv->last_rating = media_source_get_rating (G_TYPE_CHECK_INSTANCE_CAST (source, TYPE_MEDIA_SOURCE, MediaSource)); -#line 1162 "/home/jens/Source/shotwell/src/Commands.vala" - return self; -#line 11059 "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 11069 "Commands.c" -} - - -static void -set_rating_single_command_real_execute (Command* base) -{ - SetRatingSingleCommand * self; - gboolean _tmp0_; -#line 1171 "/home/jens/Source/shotwell/src/Commands.vala" - self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_SET_RATING_SINGLE_COMMAND, SetRatingSingleCommand); -#line 1172 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp0_ = self->priv->set_direct; -#line 1172 "/home/jens/Source/shotwell/src/Commands.vala" - if (_tmp0_) { -#line 11084 "Commands.c" - DataSource* _tmp1_; - Rating _tmp2_; -#line 1173 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp1_ = G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_SINGLE_DATA_SOURCE_COMMAND, SingleDataSourceCommand)->source; -#line 1173 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp2_ = self->priv->new_rating; -#line 1173 "/home/jens/Source/shotwell/src/Commands.vala" - media_source_set_rating (G_TYPE_CHECK_INSTANCE_CAST (_tmp1_, TYPE_MEDIA_SOURCE, MediaSource), _tmp2_); -#line 11093 "Commands.c" - } else { - gboolean _tmp3_; -#line 1175 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp3_ = self->priv->incrementing; -#line 1175 "/home/jens/Source/shotwell/src/Commands.vala" - if (_tmp3_) { -#line 11100 "Commands.c" - DataSource* _tmp4_; -#line 1176 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp4_ = G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_SINGLE_DATA_SOURCE_COMMAND, SingleDataSourceCommand)->source; -#line 1176 "/home/jens/Source/shotwell/src/Commands.vala" - media_source_increase_rating (G_TYPE_CHECK_INSTANCE_CAST (_tmp4_, TYPE_MEDIA_SOURCE, MediaSource)); -#line 11106 "Commands.c" - } else { - DataSource* _tmp5_; -#line 1178 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp5_ = G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_SINGLE_DATA_SOURCE_COMMAND, SingleDataSourceCommand)->source; -#line 1178 "/home/jens/Source/shotwell/src/Commands.vala" - media_source_decrease_rating (G_TYPE_CHECK_INSTANCE_CAST (_tmp5_, TYPE_MEDIA_SOURCE, MediaSource)); -#line 11113 "Commands.c" - } - } -} - - -static void -set_rating_single_command_real_undo (Command* base) -{ - SetRatingSingleCommand * self; - DataSource* _tmp0_; - Rating _tmp1_; -#line 1182 "/home/jens/Source/shotwell/src/Commands.vala" - self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_SET_RATING_SINGLE_COMMAND, SetRatingSingleCommand); -#line 1183 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp0_ = G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_SINGLE_DATA_SOURCE_COMMAND, SingleDataSourceCommand)->source; -#line 1183 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp1_ = self->priv->last_rating; -#line 1183 "/home/jens/Source/shotwell/src/Commands.vala" - media_source_set_rating (G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, TYPE_MEDIA_SOURCE, MediaSource), _tmp1_); -#line 11133 "Commands.c" -} - - -static void -set_rating_single_command_class_init (SetRatingSingleCommandClass * klass) -{ -#line 1148 "/home/jens/Source/shotwell/src/Commands.vala" - set_rating_single_command_parent_class = g_type_class_peek_parent (klass); -#line 1148 "/home/jens/Source/shotwell/src/Commands.vala" - g_type_class_add_private (klass, sizeof (SetRatingSingleCommandPrivate)); -#line 1148 "/home/jens/Source/shotwell/src/Commands.vala" - ((CommandClass *) klass)->execute = (void (*) (Command *)) set_rating_single_command_real_execute; -#line 1148 "/home/jens/Source/shotwell/src/Commands.vala" - ((CommandClass *) klass)->undo = (void (*) (Command *)) set_rating_single_command_real_undo; -#line 1148 "/home/jens/Source/shotwell/src/Commands.vala" - G_OBJECT_CLASS (klass)->finalize = set_rating_single_command_finalize; -#line 11150 "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 11159 "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 11171 "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; - gchar* _tmp0_; - gchar* _tmp1_; - const gchar* _tmp2_; -#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_ = resources_rating_progress (rating); -#line 1195 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp1_ = _tmp0_; -#line 1195 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp2_ = resources_rating_label (rating); -#line 1195 "/home/jens/Source/shotwell/src/Commands.vala" - self = (SetRatingCommand*) multiple_data_source_command_construct (object_type, iter, _tmp1_, _ ("Restoring previous rating"), _tmp2_, ""); -#line 1195 "/home/jens/Source/shotwell/src/Commands.vala" - _g_free0 (_tmp1_); -#line 1197 "/home/jens/Source/shotwell/src/Commands.vala" - self->priv->set_direct = TRUE; -#line 1198 "/home/jens/Source/shotwell/src/Commands.vala" - self->priv->new_rating = rating; -#line 1200 "/home/jens/Source/shotwell/src/Commands.vala" - set_rating_command_save_source_states (self, iter); -#line 1194 "/home/jens/Source/shotwell/src/Commands.vala" - return self; -#line 11218 "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 11228 "Commands.c" -} - - -SetRatingCommand* -set_rating_command_construct_inc_dec (GType object_type, - GeeIterable* iter, - gboolean is_incrementing) -{ - SetRatingCommand * self = NULL; - const gchar* _tmp0_ = NULL; - const gchar* _tmp1_ = NULL; - const gchar* _tmp2_ = 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" - if (is_incrementing) { -#line 1205 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp0_ = _ ("Increasing ratings"); -#line 11247 "Commands.c" - } else { -#line 1205 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp0_ = _ ("Decreasing ratings"); -#line 11251 "Commands.c" - } -#line 1206 "/home/jens/Source/shotwell/src/Commands.vala" - if (is_incrementing) { -#line 1206 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp1_ = _ ("Decreasing ratings"); -#line 11257 "Commands.c" - } else { -#line 1206 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp1_ = _ ("Increasing ratings"); -#line 11261 "Commands.c" - } -#line 1207 "/home/jens/Source/shotwell/src/Commands.vala" - if (is_incrementing) { -#line 1207 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp2_ = RESOURCES_INCREASE_RATING_LABEL; -#line 11267 "Commands.c" - } else { -#line 1207 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp2_ = RESOURCES_DECREASE_RATING_LABEL; -#line 11271 "Commands.c" - } -#line 1204 "/home/jens/Source/shotwell/src/Commands.vala" - self = (SetRatingCommand*) multiple_data_source_command_construct (object_type, iter, _tmp0_, _tmp1_, _tmp2_, ""); -#line 1209 "/home/jens/Source/shotwell/src/Commands.vala" - self->priv->set_direct = FALSE; -#line 1210 "/home/jens/Source/shotwell/src/Commands.vala" - self->priv->incrementing = is_incrementing; -#line 1212 "/home/jens/Source/shotwell/src/Commands.vala" - set_rating_command_save_source_states (self, iter); -#line 1203 "/home/jens/Source/shotwell/src/Commands.vala" - return self; -#line 11283 "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 11293 "Commands.c" -} - - -static void -set_rating_command_save_source_states (SetRatingCommand* self, - GeeIterable* iter) -{ - GeeHashMap* _tmp0_; -#line 1215 "/home/jens/Source/shotwell/src/Commands.vala" - g_return_if_fail (IS_SET_RATING_COMMAND (self)); -#line 1215 "/home/jens/Source/shotwell/src/Commands.vala" - g_return_if_fail (GEE_IS_ITERABLE (iter)); -#line 1216 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp0_ = gee_hash_map_new (TYPE_DATA_SOURCE, (GBoxedCopyFunc) g_object_ref, (GDestroyNotify) g_object_unref, TYPE_RATING, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL); -#line 1216 "/home/jens/Source/shotwell/src/Commands.vala" - _g_object_unref0 (self->priv->last_rating_map); -#line 1216 "/home/jens/Source/shotwell/src/Commands.vala" - self->priv->last_rating_map = _tmp0_; -#line 11312 "Commands.c" - { - GeeIterator* _view_it = NULL; - GeeIterator* _tmp1_; -#line 1218 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp1_ = gee_iterable_iterator (iter); -#line 1218 "/home/jens/Source/shotwell/src/Commands.vala" - _view_it = _tmp1_; -#line 1218 "/home/jens/Source/shotwell/src/Commands.vala" - while (TRUE) { -#line 11322 "Commands.c" - GeeIterator* _tmp2_; - DataView* view = NULL; - GeeIterator* _tmp3_; - gpointer _tmp4_; - DataSource* source = NULL; - DataView* _tmp5_; - DataSource* _tmp6_; - GeeHashMap* _tmp7_; - DataSource* _tmp8_; - DataSource* _tmp9_; -#line 1218 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp2_ = _view_it; -#line 1218 "/home/jens/Source/shotwell/src/Commands.vala" - if (!gee_iterator_next (_tmp2_)) { -#line 1218 "/home/jens/Source/shotwell/src/Commands.vala" - break; -#line 11339 "Commands.c" - } -#line 1218 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp3_ = _view_it; -#line 1218 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp4_ = gee_iterator_get (_tmp3_); -#line 1218 "/home/jens/Source/shotwell/src/Commands.vala" - view = (DataView*) _tmp4_; -#line 1219 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp5_ = view; -#line 1219 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp6_ = data_view_get_source (_tmp5_); -#line 1219 "/home/jens/Source/shotwell/src/Commands.vala" - source = _tmp6_; -#line 1220 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp7_ = self->priv->last_rating_map; -#line 1220 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp8_ = source; -#line 1220 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp9_ = source; -#line 1220 "/home/jens/Source/shotwell/src/Commands.vala" - gee_abstract_map_set (G_TYPE_CHECK_INSTANCE_CAST (_tmp7_, GEE_TYPE_ABSTRACT_MAP, GeeAbstractMap), _tmp8_, (gpointer) ((gintptr) media_source_get_rating (G_TYPE_CHECK_INSTANCE_CAST (_tmp9_, TYPE_MEDIA_SOURCE, MediaSource)))); -#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 11365 "Commands.c" - } -#line 1218 "/home/jens/Source/shotwell/src/Commands.vala" - _g_object_unref0 (_view_it); -#line 11369 "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 11384 "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 11398 "Commands.c" -} - - -static void -set_rating_command_real_execute_on_source (MultipleDataSourceCommand* base, - DataSource* source) -{ - SetRatingCommand * self; - gboolean _tmp0_; -#line 1234 "/home/jens/Source/shotwell/src/Commands.vala" - self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_SET_RATING_COMMAND, SetRatingCommand); -#line 1234 "/home/jens/Source/shotwell/src/Commands.vala" - g_return_if_fail (IS_DATA_SOURCE (source)); -#line 1235 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp0_ = self->priv->set_direct; -#line 1235 "/home/jens/Source/shotwell/src/Commands.vala" - if (_tmp0_) { -#line 11416 "Commands.c" - Rating _tmp1_; -#line 1236 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp1_ = self->priv->new_rating; -#line 1236 "/home/jens/Source/shotwell/src/Commands.vala" - media_source_set_rating (G_TYPE_CHECK_INSTANCE_CAST (source, TYPE_MEDIA_SOURCE, MediaSource), _tmp1_); -#line 11422 "Commands.c" - } else { - gboolean _tmp2_; -#line 1238 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp2_ = self->priv->incrementing; -#line 1238 "/home/jens/Source/shotwell/src/Commands.vala" - if (_tmp2_) { -#line 1239 "/home/jens/Source/shotwell/src/Commands.vala" - media_source_increase_rating (G_TYPE_CHECK_INSTANCE_CAST (source, TYPE_MEDIA_SOURCE, MediaSource)); -#line 11431 "Commands.c" - } else { -#line 1241 "/home/jens/Source/shotwell/src/Commands.vala" - media_source_decrease_rating (G_TYPE_CHECK_INSTANCE_CAST (source, TYPE_MEDIA_SOURCE, MediaSource)); -#line 11435 "Commands.c" - } - } -} - - -static void -set_rating_command_real_undo_on_source (MultipleDataSourceCommand* base, - DataSource* source) -{ - SetRatingCommand * self; - GeeHashMap* _tmp0_; - gpointer _tmp1_; -#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_ = self->priv->last_rating_map; -#line 1246 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp1_ = gee_abstract_map_get (G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, GEE_TYPE_ABSTRACT_MAP, GeeAbstractMap), source); -#line 1246 "/home/jens/Source/shotwell/src/Commands.vala" - media_source_set_rating (G_TYPE_CHECK_INSTANCE_CAST (source, TYPE_MEDIA_SOURCE, MediaSource), (Rating) ((gintptr) _tmp1_)); -#line 11458 "Commands.c" -} - - -static void -set_rating_command_class_init (SetRatingCommandClass * klass) -{ -#line 1187 "/home/jens/Source/shotwell/src/Commands.vala" - set_rating_command_parent_class = g_type_class_peek_parent (klass); -#line 1187 "/home/jens/Source/shotwell/src/Commands.vala" - g_type_class_add_private (klass, sizeof (SetRatingCommandPrivate)); -#line 1187 "/home/jens/Source/shotwell/src/Commands.vala" - ((CommandClass *) klass)->execute = (void (*) (Command *)) set_rating_command_real_execute; -#line 1187 "/home/jens/Source/shotwell/src/Commands.vala" - ((CommandClass *) klass)->undo = (void (*) (Command *)) set_rating_command_real_undo; -#line 1187 "/home/jens/Source/shotwell/src/Commands.vala" - ((MultipleDataSourceCommandClass *) klass)->execute_on_source = (void (*) (MultipleDataSourceCommand *, DataSource*)) set_rating_command_real_execute_on_source; -#line 1187 "/home/jens/Source/shotwell/src/Commands.vala" - ((MultipleDataSourceCommandClass *) klass)->undo_on_source = (void (*) (MultipleDataSourceCommand *, DataSource*)) set_rating_command_real_undo_on_source; -#line 1187 "/home/jens/Source/shotwell/src/Commands.vala" - G_OBJECT_CLASS (klass)->finalize = set_rating_command_finalize; -#line 11479 "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 11490 "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 11504 "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; -#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" - self = (SetRawDeveloperCommand*) multiple_data_source_command_construct (object_type, iter, _ ("Setting RAW developer"), _ ("Restoring previous RAW developer"), _ ("Set Developer"), ""); -#line 1258 "/home/jens/Source/shotwell/src/Commands.vala" - self->priv->new_developer = developer; -#line 1259 "/home/jens/Source/shotwell/src/Commands.vala" - set_raw_developer_command_save_source_states (self, iter); -#line 1255 "/home/jens/Source/shotwell/src/Commands.vala" - return self; -#line 11538 "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 11548 "Commands.c" -} - - -static void -set_raw_developer_command_save_source_states (SetRawDeveloperCommand* self, - GeeIterable* iter) -{ - GeeHashMap* _tmp0_; - GeeHashMap* _tmp1_; -#line 1262 "/home/jens/Source/shotwell/src/Commands.vala" - g_return_if_fail (IS_SET_RAW_DEVELOPER_COMMAND (self)); -#line 1262 "/home/jens/Source/shotwell/src/Commands.vala" - g_return_if_fail (GEE_IS_ITERABLE (iter)); -#line 1263 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp0_ = gee_hash_map_new (TYPE_PHOTO, (GBoxedCopyFunc) g_object_ref, (GDestroyNotify) g_object_unref, TYPE_RAW_DEVELOPER, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL); -#line 1263 "/home/jens/Source/shotwell/src/Commands.vala" - _g_object_unref0 (self->priv->last_developer_map); -#line 1263 "/home/jens/Source/shotwell/src/Commands.vala" - self->priv->last_developer_map = _tmp0_; -#line 1264 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp1_ = gee_hash_map_new (TYPE_PHOTO, (GBoxedCopyFunc) g_object_ref, (GDestroyNotify) g_object_unref, TYPE_PHOTO_TRANSFORMATION_STATE, (GBoxedCopyFunc) g_object_ref, (GDestroyNotify) g_object_unref, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL); -#line 1264 "/home/jens/Source/shotwell/src/Commands.vala" - _g_object_unref0 (self->priv->last_transformation_map); -#line 1264 "/home/jens/Source/shotwell/src/Commands.vala" - self->priv->last_transformation_map = _tmp1_; -#line 11574 "Commands.c" - { - GeeIterator* _view_it = NULL; - GeeIterator* _tmp2_; -#line 1266 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp2_ = gee_iterable_iterator (iter); -#line 1266 "/home/jens/Source/shotwell/src/Commands.vala" - _view_it = _tmp2_; -#line 1266 "/home/jens/Source/shotwell/src/Commands.vala" - while (TRUE) { -#line 11584 "Commands.c" - GeeIterator* _tmp3_; - DataView* view = NULL; - GeeIterator* _tmp4_; - gpointer _tmp5_; - Photo* photo = NULL; - DataView* _tmp6_; - DataSource* _tmp7_; - Photo* _tmp8_; - Photo* _tmp9_; -#line 1266 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp3_ = _view_it; -#line 1266 "/home/jens/Source/shotwell/src/Commands.vala" - if (!gee_iterator_next (_tmp3_)) { -#line 1266 "/home/jens/Source/shotwell/src/Commands.vala" - break; -#line 11600 "Commands.c" - } -#line 1266 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp4_ = _view_it; -#line 1266 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp5_ = gee_iterator_get (_tmp4_); -#line 1266 "/home/jens/Source/shotwell/src/Commands.vala" - view = (DataView*) _tmp5_; -#line 1267 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp6_ = view; -#line 1267 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp7_ = data_view_get_source (_tmp6_); -#line 1267 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp8_ = G_TYPE_CHECK_INSTANCE_TYPE (_tmp7_, TYPE_PHOTO) ? ((Photo*) _tmp7_) : NULL; -#line 1267 "/home/jens/Source/shotwell/src/Commands.vala" - if (_tmp8_ == NULL) { -#line 1267 "/home/jens/Source/shotwell/src/Commands.vala" - _g_object_unref0 (_tmp7_); -#line 11618 "Commands.c" - } -#line 1267 "/home/jens/Source/shotwell/src/Commands.vala" - photo = _tmp8_; -#line 1268 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp9_ = photo; -#line 1268 "/home/jens/Source/shotwell/src/Commands.vala" - if (set_raw_developer_command_is_raw_photo (self, _tmp9_)) { -#line 11626 "Commands.c" - GeeHashMap* _tmp10_; - Photo* _tmp11_; - Photo* _tmp12_; - GeeHashMap* _tmp13_; - Photo* _tmp14_; - Photo* _tmp15_; - PhotoTransformationState* _tmp16_; - PhotoTransformationState* _tmp17_; -#line 1269 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp10_ = self->priv->last_developer_map; -#line 1269 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp11_ = photo; -#line 1269 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp12_ = photo; -#line 1269 "/home/jens/Source/shotwell/src/Commands.vala" - gee_abstract_map_set (G_TYPE_CHECK_INSTANCE_CAST (_tmp10_, GEE_TYPE_ABSTRACT_MAP, GeeAbstractMap), _tmp11_, (gpointer) ((gintptr) photo_get_raw_developer (_tmp12_))); -#line 1270 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp13_ = self->priv->last_transformation_map; -#line 1270 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp14_ = photo; -#line 1270 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp15_ = photo; -#line 1270 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp16_ = photo_save_transformation_state (_tmp15_); -#line 1270 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp17_ = _tmp16_; -#line 1270 "/home/jens/Source/shotwell/src/Commands.vala" - gee_abstract_map_set (G_TYPE_CHECK_INSTANCE_CAST (_tmp13_, GEE_TYPE_ABSTRACT_MAP, GeeAbstractMap), _tmp14_, _tmp17_); -#line 1270 "/home/jens/Source/shotwell/src/Commands.vala" - _g_object_unref0 (_tmp17_); -#line 11657 "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 11663 "Commands.c" - } -#line 1266 "/home/jens/Source/shotwell/src/Commands.vala" - _g_object_unref0 (_view_it); -#line 11667 "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 11680 "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 11692 "Commands.c" -} - - -static void -set_raw_developer_command_real_execute_on_source (MultipleDataSourceCommand* base, - DataSource* source) -{ - SetRawDeveloperCommand * self; - Photo* photo = NULL; - Photo* _tmp0_; - Photo* _tmp1_; -#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_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_TYPE (source, TYPE_PHOTO) ? ((Photo*) source) : NULL); -#line 1284 "/home/jens/Source/shotwell/src/Commands.vala" - photo = _tmp0_; -#line 1285 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp1_ = photo; -#line 1285 "/home/jens/Source/shotwell/src/Commands.vala" - if (set_raw_developer_command_is_raw_photo (self, _tmp1_)) { -#line 11716 "Commands.c" - gboolean _tmp2_ = FALSE; - RawDeveloper _tmp3_; -#line 1286 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp3_ = self->priv->new_developer; -#line 1286 "/home/jens/Source/shotwell/src/Commands.vala" - if (_tmp3_ == RAW_DEVELOPER_CAMERA) { -#line 11723 "Commands.c" - Photo* _tmp4_; -#line 1286 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp4_ = photo; -#line 1286 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp2_ = !photo_is_raw_developer_available (_tmp4_, RAW_DEVELOPER_CAMERA); -#line 11729 "Commands.c" - } else { -#line 1286 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp2_ = FALSE; -#line 11733 "Commands.c" - } -#line 1286 "/home/jens/Source/shotwell/src/Commands.vala" - if (_tmp2_) { -#line 11737 "Commands.c" - Photo* _tmp5_; -#line 1287 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp5_ = photo; -#line 1287 "/home/jens/Source/shotwell/src/Commands.vala" - photo_set_raw_developer (_tmp5_, RAW_DEVELOPER_EMBEDDED, TRUE); -#line 11743 "Commands.c" - } else { - Photo* _tmp6_; - RawDeveloper _tmp7_; -#line 1289 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp6_ = photo; -#line 1289 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp7_ = self->priv->new_developer; -#line 1289 "/home/jens/Source/shotwell/src/Commands.vala" - photo_set_raw_developer (_tmp6_, _tmp7_, TRUE); -#line 11753 "Commands.c" - } - } -#line 1283 "/home/jens/Source/shotwell/src/Commands.vala" - _g_object_unref0 (photo); -#line 11758 "Commands.c" -} - - -static void -set_raw_developer_command_real_undo_on_source (MultipleDataSourceCommand* base, - DataSource* source) -{ - SetRawDeveloperCommand * self; - Photo* photo = NULL; - Photo* _tmp0_; - Photo* _tmp1_; -#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_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_TYPE (source, TYPE_PHOTO) ? ((Photo*) source) : NULL); -#line 1294 "/home/jens/Source/shotwell/src/Commands.vala" - photo = _tmp0_; -#line 1295 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp1_ = photo; -#line 1295 "/home/jens/Source/shotwell/src/Commands.vala" - if (set_raw_developer_command_is_raw_photo (self, _tmp1_)) { -#line 11782 "Commands.c" - Photo* _tmp2_; - GeeHashMap* _tmp3_; - Photo* _tmp4_; - gpointer _tmp5_; - Photo* _tmp6_; - GeeHashMap* _tmp7_; - Photo* _tmp8_; - gpointer _tmp9_; - PhotoTransformationState* _tmp10_; -#line 1296 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp2_ = photo; -#line 1296 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp3_ = self->priv->last_developer_map; -#line 1296 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp4_ = photo; -#line 1296 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp5_ = gee_abstract_map_get (G_TYPE_CHECK_INSTANCE_CAST (_tmp3_, GEE_TYPE_ABSTRACT_MAP, GeeAbstractMap), _tmp4_); -#line 1296 "/home/jens/Source/shotwell/src/Commands.vala" - photo_set_raw_developer (_tmp2_, (RawDeveloper) ((gintptr) _tmp5_), TRUE); -#line 1297 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp6_ = photo; -#line 1297 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp7_ = self->priv->last_transformation_map; -#line 1297 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp8_ = photo; -#line 1297 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp9_ = gee_abstract_map_get (G_TYPE_CHECK_INSTANCE_CAST (_tmp7_, GEE_TYPE_ABSTRACT_MAP, GeeAbstractMap), _tmp8_); -#line 1297 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp10_ = (PhotoTransformationState*) _tmp9_; -#line 1297 "/home/jens/Source/shotwell/src/Commands.vala" - photo_load_transformation_state (_tmp6_, _tmp10_); -#line 1297 "/home/jens/Source/shotwell/src/Commands.vala" - _g_object_unref0 (_tmp10_); -#line 11816 "Commands.c" - } -#line 1293 "/home/jens/Source/shotwell/src/Commands.vala" - _g_object_unref0 (photo); -#line 11820 "Commands.c" -} - - -static gboolean -set_raw_developer_command_is_raw_photo (SetRawDeveloperCommand* self, - Photo* photo) -{ - gboolean result = FALSE; - gboolean _tmp0_ = FALSE; -#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" - if (photo != NULL) { -#line 1302 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp0_ = photo_get_master_file_format (photo) == PHOTO_FILE_FORMAT_RAW; -#line 11838 "Commands.c" - } else { -#line 1302 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp0_ = FALSE; -#line 11842 "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 11848 "Commands.c" -} - - -static void -set_raw_developer_command_class_init (SetRawDeveloperCommandClass * klass) -{ -#line 1250 "/home/jens/Source/shotwell/src/Commands.vala" - set_raw_developer_command_parent_class = g_type_class_peek_parent (klass); -#line 1250 "/home/jens/Source/shotwell/src/Commands.vala" - g_type_class_add_private (klass, sizeof (SetRawDeveloperCommandPrivate)); -#line 1250 "/home/jens/Source/shotwell/src/Commands.vala" - ((CommandClass *) klass)->execute = (void (*) (Command *)) set_raw_developer_command_real_execute; -#line 1250 "/home/jens/Source/shotwell/src/Commands.vala" - ((CommandClass *) klass)->undo = (void (*) (Command *)) set_raw_developer_command_real_undo; -#line 1250 "/home/jens/Source/shotwell/src/Commands.vala" - ((MultipleDataSourceCommandClass *) klass)->execute_on_source = (void (*) (MultipleDataSourceCommand *, DataSource*)) set_raw_developer_command_real_execute_on_source; -#line 1250 "/home/jens/Source/shotwell/src/Commands.vala" - ((MultipleDataSourceCommandClass *) klass)->undo_on_source = (void (*) (MultipleDataSourceCommand *, DataSource*)) set_raw_developer_command_real_undo_on_source; -#line 1250 "/home/jens/Source/shotwell/src/Commands.vala" - G_OBJECT_CLASS (klass)->finalize = set_raw_developer_command_finalize; -#line 11869 "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 11878 "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 11894 "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_; -#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" - self = (AdjustDateTimePhotoCommand*) single_data_source_command_construct (object_type, G_TYPE_CHECK_INSTANCE_CAST (dateable, TYPE_DATA_SOURCE, DataSource), RESOURCES_ADJUST_DATE_TIME_LABEL, ""); -#line 1315 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp0_ = _g_object_ref0 (dateable); -#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 = _tmp0_; -#line 1316 "/home/jens/Source/shotwell/src/Commands.vala" - self->priv->time_shift = time_shift; -#line 1317 "/home/jens/Source/shotwell/src/Commands.vala" - self->priv->modify_original = modify_original; -#line 1312 "/home/jens/Source/shotwell/src/Commands.vala" - return self; -#line 11936 "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 11947 "Commands.c" -} - - -static void -adjust_date_time_photo_command_real_execute (Command* base) -{ - AdjustDateTimePhotoCommand * self; - Dateable* _tmp0_; - Dateable* _tmp1_; - gint64 _tmp2_; - Dateable* _tmp3_; - Event* _tmp4_; - ViewCollection* all_events = NULL; - ViewCollection* _tmp5_; - Dateable* _tmp21_; - ViewCollection* _tmp22_; -#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_ = self->priv->time_shift; -#line 1321 "/home/jens/Source/shotwell/src/Commands.vala" - adjust_date_time_photo_command_set_time (self, _tmp0_, dateable_get_exposure_time (_tmp1_) + ((time_t) _tmp2_)); -#line 1323 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp3_ = self->priv->dateable; -#line 1323 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp4_ = media_source_get_event (G_TYPE_CHECK_INSTANCE_CAST (_tmp3_, 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 = _tmp4_; -#line 1325 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp5_ = view_collection_new ("tmp"); -#line 1325 "/home/jens/Source/shotwell/src/Commands.vala" - all_events = _tmp5_; -#line 11986 "Commands.c" - { - GeeIterator* _dobj_it = NULL; - EventSourceCollection* _tmp6_; - GeeCollection* _tmp7_; - GeeCollection* _tmp8_; - GeeIterator* _tmp9_; - GeeIterator* _tmp10_; -#line 1327 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp6_ = event_global; -#line 1327 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp7_ = data_collection_get_all (G_TYPE_CHECK_INSTANCE_CAST (_tmp6_, TYPE_DATA_COLLECTION, DataCollection)); -#line 1327 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp8_ = _tmp7_; -#line 1327 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp9_ = gee_iterable_iterator (G_TYPE_CHECK_INSTANCE_CAST (_tmp8_, GEE_TYPE_ITERABLE, GeeIterable)); -#line 1327 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp10_ = _tmp9_; -#line 1327 "/home/jens/Source/shotwell/src/Commands.vala" - _g_object_unref0 (_tmp8_); -#line 1327 "/home/jens/Source/shotwell/src/Commands.vala" - _dobj_it = _tmp10_; -#line 1327 "/home/jens/Source/shotwell/src/Commands.vala" - while (TRUE) { -#line 12010 "Commands.c" - GeeIterator* _tmp11_; - DataObject* dobj = NULL; - GeeIterator* _tmp12_; - gpointer _tmp13_; - Event* event = NULL; - DataObject* _tmp14_; - Event* _tmp15_; - Event* _tmp16_; -#line 1327 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp11_ = _dobj_it; -#line 1327 "/home/jens/Source/shotwell/src/Commands.vala" - if (!gee_iterator_next (_tmp11_)) { -#line 1327 "/home/jens/Source/shotwell/src/Commands.vala" - break; -#line 12025 "Commands.c" - } -#line 1327 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp12_ = _dobj_it; -#line 1327 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp13_ = gee_iterator_get (_tmp12_); -#line 1327 "/home/jens/Source/shotwell/src/Commands.vala" - dobj = (DataObject*) _tmp13_; -#line 1328 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp14_ = dobj; -#line 1328 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp15_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_TYPE (_tmp14_, TYPE_EVENT) ? ((Event*) _tmp14_) : NULL); -#line 1328 "/home/jens/Source/shotwell/src/Commands.vala" - event = _tmp15_; -#line 1329 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp16_ = event; -#line 1329 "/home/jens/Source/shotwell/src/Commands.vala" - if (_tmp16_ != NULL) { -#line 12043 "Commands.c" - ViewCollection* _tmp17_; - Event* _tmp18_; - EventView* _tmp19_; - EventView* _tmp20_; -#line 1330 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp17_ = all_events; -#line 1330 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp18_ = event; -#line 1330 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp19_ = event_view_new (G_TYPE_CHECK_INSTANCE_CAST (_tmp18_, TYPE_EVENT_SOURCE, EventSource)); -#line 1330 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp20_ = _tmp19_; -#line 1330 "/home/jens/Source/shotwell/src/Commands.vala" - data_collection_add (G_TYPE_CHECK_INSTANCE_CAST (_tmp17_, TYPE_DATA_COLLECTION, DataCollection), G_TYPE_CHECK_INSTANCE_CAST (_tmp20_, TYPE_DATA_OBJECT, DataObject)); -#line 1330 "/home/jens/Source/shotwell/src/Commands.vala" - _g_object_unref0 (_tmp20_); -#line 12060 "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 12066 "Commands.c" - } -#line 1327 "/home/jens/Source/shotwell/src/Commands.vala" - _g_object_unref0 (_dobj_it); -#line 12070 "Commands.c" - } -#line 1333 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp21_ = self->priv->dateable; -#line 1333 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp22_ = all_events; -#line 1333 "/home/jens/Source/shotwell/src/Commands.vala" - event_generate_single_event (G_TYPE_CHECK_INSTANCE_CAST (_tmp21_, TYPE_MEDIA_SOURCE, MediaSource), _tmp22_, NULL); -#line 1320 "/home/jens/Source/shotwell/src/Commands.vala" - _data_collection_unref0 (all_events); -#line 12080 "Commands.c" -} - - -static void -adjust_date_time_photo_command_real_undo (Command* base) -{ - AdjustDateTimePhotoCommand * self; - Dateable* _tmp0_; - Dateable* _tmp1_; - gint64 _tmp2_; - Dateable* _tmp3_; - Event* _tmp4_; -#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_ = self->priv->time_shift; -#line 1337 "/home/jens/Source/shotwell/src/Commands.vala" - adjust_date_time_photo_command_set_time (self, _tmp0_, dateable_get_exposure_time (_tmp1_) - ((time_t) _tmp2_)); -#line 1339 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp3_ = self->priv->dateable; -#line 1339 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp4_ = self->priv->prev_event; -#line 1339 "/home/jens/Source/shotwell/src/Commands.vala" - media_source_set_event (G_TYPE_CHECK_INSTANCE_CAST (_tmp3_, TYPE_MEDIA_SOURCE, MediaSource), _tmp4_); -#line 12109 "Commands.c" -} - - -static void -adjust_date_time_photo_command_set_time (AdjustDateTimePhotoCommand* self, - Dateable* dateable, - time_t exposure_time) -{ - gboolean _tmp0_ = FALSE; - gboolean _tmp1_; - GError * _inner_error_ = NULL; -#line 1342 "/home/jens/Source/shotwell/src/Commands.vala" - g_return_if_fail (IS_ADJUST_DATE_TIME_PHOTO_COMMAND (self)); -#line 1342 "/home/jens/Source/shotwell/src/Commands.vala" - g_return_if_fail (IS_DATEABLE (dateable)); -#line 1343 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp1_ = self->priv->modify_original; -#line 1343 "/home/jens/Source/shotwell/src/Commands.vala" - if (_tmp1_) { -#line 1343 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp0_ = G_TYPE_CHECK_INSTANCE_TYPE (dateable, TYPE_PHOTO); -#line 12131 "Commands.c" - } else { -#line 1343 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp0_ = FALSE; -#line 12135 "Commands.c" - } -#line 1343 "/home/jens/Source/shotwell/src/Commands.vala" - if (_tmp0_) { -#line 12139 "Commands.c" - { -#line 1345 "/home/jens/Source/shotwell/src/Commands.vala" - photo_set_exposure_time_persistent (G_TYPE_CHECK_INSTANCE_CAST (dateable, TYPE_PHOTO, Photo), exposure_time, &_inner_error_); -#line 1345 "/home/jens/Source/shotwell/src/Commands.vala" - if (G_UNLIKELY (_inner_error_ != NULL)) { -#line 12145 "Commands.c" - goto __catch467_g_error; - } - } - goto __finally467; - __catch467_g_error: - { - GError* err = NULL; -#line 1344 "/home/jens/Source/shotwell/src/Commands.vala" - err = _inner_error_; -#line 1344 "/home/jens/Source/shotwell/src/Commands.vala" - _inner_error_ = NULL; -#line 1347 "/home/jens/Source/shotwell/src/Commands.vala" - app_window_error_message (_ ("Original photo could not be adjusted."), NULL); -#line 1344 "/home/jens/Source/shotwell/src/Commands.vala" - _g_error_free0 (err); -#line 12161 "Commands.c" - } - __finally467: -#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 12172 "Commands.c" - } - } else { -#line 1350 "/home/jens/Source/shotwell/src/Commands.vala" - dateable_set_exposure_time (dateable, exposure_time); -#line 12177 "Commands.c" - } -} - - -static void -adjust_date_time_photo_command_class_init (AdjustDateTimePhotoCommandClass * klass) -{ -#line 1306 "/home/jens/Source/shotwell/src/Commands.vala" - adjust_date_time_photo_command_parent_class = g_type_class_peek_parent (klass); -#line 1306 "/home/jens/Source/shotwell/src/Commands.vala" - g_type_class_add_private (klass, sizeof (AdjustDateTimePhotoCommandPrivate)); -#line 1306 "/home/jens/Source/shotwell/src/Commands.vala" - ((CommandClass *) klass)->execute = (void (*) (Command *)) adjust_date_time_photo_command_real_execute; -#line 1306 "/home/jens/Source/shotwell/src/Commands.vala" - ((CommandClass *) klass)->undo = (void (*) (Command *)) adjust_date_time_photo_command_real_undo; -#line 1306 "/home/jens/Source/shotwell/src/Commands.vala" - G_OBJECT_CLASS (klass)->finalize = adjust_date_time_photo_command_finalize; -#line 12195 "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 12204 "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 12220 "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 12248 "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 12257 "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; - GeeHashMap* _tmp0_; - GeeHashMap* _tmp22_; -#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" - self = (AdjustDateTimePhotosCommand*) multiple_data_source_command_construct (object_type, iter, _ ("Adjusting Date and Time"), _ ("Undoing Date and Time Adjustment"), RESOURCES_ADJUST_DATE_TIME_LABEL, ""); -#line 1371 "/home/jens/Source/shotwell/src/Commands.vala" - self->priv->time_shift = time_shift; -#line 1372 "/home/jens/Source/shotwell/src/Commands.vala" - self->priv->keep_relativity = keep_relativity; -#line 1373 "/home/jens/Source/shotwell/src/Commands.vala" - self->priv->modify_originals = modify_originals; -#line 1377 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp0_ = gee_hash_map_new (TYPE_DATEABLE, (GBoxedCopyFunc) g_object_ref, (GDestroyNotify) g_object_unref, TYPE_EVENT, (GBoxedCopyFunc) g_object_ref, (GDestroyNotify) g_object_unref, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL); -#line 1377 "/home/jens/Source/shotwell/src/Commands.vala" - _g_object_unref0 (self->priv->prev_events); -#line 1377 "/home/jens/Source/shotwell/src/Commands.vala" - self->priv->prev_events = G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, GEE_TYPE_MAP, GeeMap); -#line 12287 "Commands.c" - { - GeeIterator* _view_it = NULL; - GeeIterator* _tmp1_; -#line 1380 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp1_ = gee_iterable_iterator (iter); -#line 1380 "/home/jens/Source/shotwell/src/Commands.vala" - _view_it = _tmp1_; -#line 1380 "/home/jens/Source/shotwell/src/Commands.vala" - while (TRUE) { -#line 12297 "Commands.c" - GeeIterator* _tmp2_; - DataView* view = NULL; - GeeIterator* _tmp3_; - gpointer _tmp4_; - GeeMap* _tmp5_; - DataView* _tmp6_; - DataSource* _tmp7_; - Dateable* _tmp8_; - Dateable* _tmp9_; - DataView* _tmp10_; - DataSource* _tmp11_; - MediaSource* _tmp12_; - MediaSource* _tmp13_; - Event* _tmp14_; - Event* _tmp15_; - time_t* _tmp16_; -#line 1380 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp2_ = _view_it; -#line 1380 "/home/jens/Source/shotwell/src/Commands.vala" - if (!gee_iterator_next (_tmp2_)) { -#line 1380 "/home/jens/Source/shotwell/src/Commands.vala" - break; -#line 12320 "Commands.c" - } -#line 1380 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp3_ = _view_it; -#line 1380 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp4_ = gee_iterator_get (_tmp3_); -#line 1380 "/home/jens/Source/shotwell/src/Commands.vala" - view = (DataView*) _tmp4_; -#line 1381 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp5_ = self->priv->prev_events; -#line 1381 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp6_ = view; -#line 1381 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp7_ = data_view_get_source (_tmp6_); -#line 1381 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp8_ = G_TYPE_CHECK_INSTANCE_TYPE (_tmp7_, TYPE_DATEABLE) ? ((Dateable*) _tmp7_) : NULL; -#line 1381 "/home/jens/Source/shotwell/src/Commands.vala" - if (_tmp8_ == NULL) { -#line 1381 "/home/jens/Source/shotwell/src/Commands.vala" - _g_object_unref0 (_tmp7_); -#line 12340 "Commands.c" - } -#line 1381 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp9_ = _tmp8_; -#line 1381 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp10_ = view; -#line 1381 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp11_ = data_view_get_source (_tmp10_); -#line 1381 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp12_ = G_TYPE_CHECK_INSTANCE_TYPE (_tmp11_, TYPE_MEDIA_SOURCE) ? ((MediaSource*) _tmp11_) : NULL; -#line 1381 "/home/jens/Source/shotwell/src/Commands.vala" - if (_tmp12_ == NULL) { -#line 1381 "/home/jens/Source/shotwell/src/Commands.vala" - _g_object_unref0 (_tmp11_); -#line 12354 "Commands.c" - } -#line 1381 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp13_ = _tmp12_; -#line 1381 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp14_ = media_source_get_event (_tmp13_); -#line 1381 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp15_ = _tmp14_; -#line 1381 "/home/jens/Source/shotwell/src/Commands.vala" - gee_map_set (_tmp5_, _tmp9_, _tmp15_); -#line 1381 "/home/jens/Source/shotwell/src/Commands.vala" - _g_object_unref0 (_tmp15_); -#line 1381 "/home/jens/Source/shotwell/src/Commands.vala" - _g_object_unref0 (_tmp13_); -#line 1381 "/home/jens/Source/shotwell/src/Commands.vala" - _g_object_unref0 (_tmp9_); -#line 1383 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp16_ = self->priv->new_time; -#line 1383 "/home/jens/Source/shotwell/src/Commands.vala" - if (_tmp16_ == NULL) { -#line 12374 "Commands.c" - DataView* _tmp17_; - DataSource* _tmp18_; - Dateable* _tmp19_; - time_t _tmp20_; - time_t* _tmp21_; -#line 1384 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp17_ = view; -#line 1384 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp18_ = data_view_get_source (_tmp17_); -#line 1384 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp19_ = G_TYPE_CHECK_INSTANCE_CAST (_tmp18_, TYPE_DATEABLE, Dateable); -#line 1384 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp20_ = dateable_get_exposure_time (_tmp19_) + ((time_t) time_shift); -#line 1384 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp21_ = __time_t_dup0 (&_tmp20_); -#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 = _tmp21_; -#line 1384 "/home/jens/Source/shotwell/src/Commands.vala" - _g_object_unref0 (_tmp19_); -#line 1386 "/home/jens/Source/shotwell/src/Commands.vala" - _g_object_unref0 (view); -#line 1386 "/home/jens/Source/shotwell/src/Commands.vala" - break; -#line 12400 "Commands.c" - } -#line 1380 "/home/jens/Source/shotwell/src/Commands.vala" - _g_object_unref0 (view); -#line 12404 "Commands.c" - } -#line 1380 "/home/jens/Source/shotwell/src/Commands.vala" - _g_object_unref0 (_view_it); -#line 12408 "Commands.c" - } -#line 1390 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp22_ = gee_hash_map_new (TYPE_DATEABLE, (GBoxedCopyFunc) g_object_ref, (GDestroyNotify) g_object_unref, G_TYPE_INVALID, (GBoxedCopyFunc) _time_t_dup, (GDestroyNotify) g_free, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL); -#line 1390 "/home/jens/Source/shotwell/src/Commands.vala" - _g_object_unref0 (self->priv->old_times); -#line 1390 "/home/jens/Source/shotwell/src/Commands.vala" - self->priv->old_times = _tmp22_; -#line 1366 "/home/jens/Source/shotwell/src/Commands.vala" - return self; -#line 12418 "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 12430 "Commands.c" -} - - -static void -adjust_date_time_photos_command_real_execute (Command* base) -{ - AdjustDateTimePhotosCommand * self; - GeeArrayList* _tmp0_; - GeeArrayList* _tmp1_; - gint _tmp2_; - gint _tmp3_; - ViewCollection* all_events = NULL; - ViewCollection* _tmp8_; -#line 1393 "/home/jens/Source/shotwell/src/Commands.vala" - self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_ADJUST_DATE_TIME_PHOTOS_COMMAND, AdjustDateTimePhotosCommand); -#line 1394 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp0_ = gee_array_list_new (TYPE_DATEABLE, (GBoxedCopyFunc) g_object_ref, (GDestroyNotify) g_object_unref, NULL, NULL, NULL); -#line 1394 "/home/jens/Source/shotwell/src/Commands.vala" - _g_object_unref0 (self->priv->error_list); -#line 1394 "/home/jens/Source/shotwell/src/Commands.vala" - self->priv->error_list = _tmp0_; -#line 1395 "/home/jens/Source/shotwell/src/Commands.vala" - COMMAND_CLASS (adjust_date_time_photos_command_parent_class)->execute (G_TYPE_CHECK_INSTANCE_CAST (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_MULTIPLE_DATA_SOURCE_COMMAND, MultipleDataSourceCommand), TYPE_COMMAND, Command)); -#line 1397 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp1_ = self->priv->error_list; -#line 1397 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp2_ = gee_abstract_collection_get_size (G_TYPE_CHECK_INSTANCE_CAST (_tmp1_, GEE_TYPE_ABSTRACT_COLLECTION, GeeAbstractCollection)); -#line 1397 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp3_ = _tmp2_; -#line 1397 "/home/jens/Source/shotwell/src/Commands.vala" - if (_tmp3_ > 0) { -#line 12462 "Commands.c" - GeeArrayList* _tmp4_; - GeeArrayList* _tmp5_; - gint _tmp6_; - gint _tmp7_; -#line 1398 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp4_ = self->priv->error_list; -#line 1398 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp5_ = self->priv->error_list; -#line 1398 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp6_ = gee_abstract_collection_get_size (G_TYPE_CHECK_INSTANCE_CAST (_tmp5_, GEE_TYPE_ABSTRACT_COLLECTION, GeeAbstractCollection)); -#line 1398 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp7_ = _tmp6_; -#line 1398 "/home/jens/Source/shotwell/src/Commands.vala" - multiple_object_error_dialog (_tmp4_, ngettext ("One original photo could not be adjusted.", "The following original photos could not be adjusted.", (gulong) _tmp7_), _ ("Time Adjustment Error")); -#line 12477 "Commands.c" - } -#line 1404 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp8_ = view_collection_new ("tmp"); -#line 1404 "/home/jens/Source/shotwell/src/Commands.vala" - all_events = _tmp8_; -#line 12483 "Commands.c" - { - GeeIterator* _d_it = NULL; - GeeMap* _tmp9_; - GeeSet* _tmp10_; - GeeSet* _tmp11_; - GeeSet* _tmp12_; - GeeIterator* _tmp13_; - GeeIterator* _tmp14_; -#line 1406 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp9_ = self->priv->prev_events; -#line 1406 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp10_ = gee_map_get_keys (_tmp9_); -#line 1406 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp11_ = _tmp10_; -#line 1406 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp12_ = _tmp11_; -#line 1406 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp13_ = gee_iterable_iterator (G_TYPE_CHECK_INSTANCE_CAST (_tmp12_, GEE_TYPE_ITERABLE, GeeIterable)); -#line 1406 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp14_ = _tmp13_; -#line 1406 "/home/jens/Source/shotwell/src/Commands.vala" - _g_object_unref0 (_tmp12_); -#line 1406 "/home/jens/Source/shotwell/src/Commands.vala" - _d_it = _tmp14_; -#line 1406 "/home/jens/Source/shotwell/src/Commands.vala" - while (TRUE) { -#line 12510 "Commands.c" - GeeIterator* _tmp15_; - Dateable* d = NULL; - GeeIterator* _tmp16_; - gpointer _tmp17_; - Dateable* _tmp33_; - ViewCollection* _tmp34_; -#line 1406 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp15_ = _d_it; -#line 1406 "/home/jens/Source/shotwell/src/Commands.vala" - if (!gee_iterator_next (_tmp15_)) { -#line 1406 "/home/jens/Source/shotwell/src/Commands.vala" - break; -#line 12523 "Commands.c" - } -#line 1406 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp16_ = _d_it; -#line 1406 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp17_ = gee_iterator_get (_tmp16_); -#line 1406 "/home/jens/Source/shotwell/src/Commands.vala" - d = (Dateable*) _tmp17_; -#line 12531 "Commands.c" - { - GeeIterator* _dobj_it = NULL; - EventSourceCollection* _tmp18_; - GeeCollection* _tmp19_; - GeeCollection* _tmp20_; - GeeIterator* _tmp21_; - GeeIterator* _tmp22_; -#line 1407 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp18_ = event_global; -#line 1407 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp19_ = data_collection_get_all (G_TYPE_CHECK_INSTANCE_CAST (_tmp18_, TYPE_DATA_COLLECTION, DataCollection)); -#line 1407 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp20_ = _tmp19_; -#line 1407 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp21_ = gee_iterable_iterator (G_TYPE_CHECK_INSTANCE_CAST (_tmp20_, GEE_TYPE_ITERABLE, GeeIterable)); -#line 1407 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp22_ = _tmp21_; -#line 1407 "/home/jens/Source/shotwell/src/Commands.vala" - _g_object_unref0 (_tmp20_); -#line 1407 "/home/jens/Source/shotwell/src/Commands.vala" - _dobj_it = _tmp22_; -#line 1407 "/home/jens/Source/shotwell/src/Commands.vala" - while (TRUE) { -#line 12555 "Commands.c" - GeeIterator* _tmp23_; - DataObject* dobj = NULL; - GeeIterator* _tmp24_; - gpointer _tmp25_; - Event* event = NULL; - DataObject* _tmp26_; - Event* _tmp27_; - Event* _tmp28_; -#line 1407 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp23_ = _dobj_it; -#line 1407 "/home/jens/Source/shotwell/src/Commands.vala" - if (!gee_iterator_next (_tmp23_)) { -#line 1407 "/home/jens/Source/shotwell/src/Commands.vala" - break; -#line 12570 "Commands.c" - } -#line 1407 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp24_ = _dobj_it; -#line 1407 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp25_ = gee_iterator_get (_tmp24_); -#line 1407 "/home/jens/Source/shotwell/src/Commands.vala" - dobj = (DataObject*) _tmp25_; -#line 1408 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp26_ = dobj; -#line 1408 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp27_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_TYPE (_tmp26_, TYPE_EVENT) ? ((Event*) _tmp26_) : NULL); -#line 1408 "/home/jens/Source/shotwell/src/Commands.vala" - event = _tmp27_; -#line 1409 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp28_ = event; -#line 1409 "/home/jens/Source/shotwell/src/Commands.vala" - if (_tmp28_ != NULL) { -#line 12588 "Commands.c" - ViewCollection* _tmp29_; - Event* _tmp30_; - EventView* _tmp31_; - EventView* _tmp32_; -#line 1410 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp29_ = all_events; -#line 1410 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp30_ = event; -#line 1410 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp31_ = event_view_new (G_TYPE_CHECK_INSTANCE_CAST (_tmp30_, TYPE_EVENT_SOURCE, EventSource)); -#line 1410 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp32_ = _tmp31_; -#line 1410 "/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 1410 "/home/jens/Source/shotwell/src/Commands.vala" - _g_object_unref0 (_tmp32_); -#line 12605 "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 12611 "Commands.c" - } -#line 1407 "/home/jens/Source/shotwell/src/Commands.vala" - _g_object_unref0 (_dobj_it); -#line 12615 "Commands.c" - } -#line 1413 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp33_ = d; -#line 1413 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp34_ = all_events; -#line 1413 "/home/jens/Source/shotwell/src/Commands.vala" - event_generate_single_event (G_TYPE_CHECK_INSTANCE_CAST (_tmp33_, TYPE_MEDIA_SOURCE, MediaSource), _tmp34_, NULL); -#line 1406 "/home/jens/Source/shotwell/src/Commands.vala" - _g_object_unref0 (d); -#line 12625 "Commands.c" - } -#line 1406 "/home/jens/Source/shotwell/src/Commands.vala" - _g_object_unref0 (_d_it); -#line 12629 "Commands.c" - } -#line 1393 "/home/jens/Source/shotwell/src/Commands.vala" - _data_collection_unref0 (all_events); -#line 12633 "Commands.c" -} - - -static void -adjust_date_time_photos_command_real_undo (Command* base) -{ - AdjustDateTimePhotosCommand * self; - GeeArrayList* _tmp0_; - GeeArrayList* _tmp1_; - gint _tmp2_; - gint _tmp3_; -#line 1417 "/home/jens/Source/shotwell/src/Commands.vala" - self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_ADJUST_DATE_TIME_PHOTOS_COMMAND, AdjustDateTimePhotosCommand); -#line 1418 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp0_ = gee_array_list_new (TYPE_DATEABLE, (GBoxedCopyFunc) g_object_ref, (GDestroyNotify) g_object_unref, NULL, NULL, NULL); -#line 1418 "/home/jens/Source/shotwell/src/Commands.vala" - _g_object_unref0 (self->priv->error_list); -#line 1418 "/home/jens/Source/shotwell/src/Commands.vala" - self->priv->error_list = _tmp0_; -#line 1419 "/home/jens/Source/shotwell/src/Commands.vala" - COMMAND_CLASS (adjust_date_time_photos_command_parent_class)->undo (G_TYPE_CHECK_INSTANCE_CAST (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_MULTIPLE_DATA_SOURCE_COMMAND, MultipleDataSourceCommand), TYPE_COMMAND, Command)); -#line 1421 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp1_ = self->priv->error_list; -#line 1421 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp2_ = gee_abstract_collection_get_size (G_TYPE_CHECK_INSTANCE_CAST (_tmp1_, GEE_TYPE_ABSTRACT_COLLECTION, GeeAbstractCollection)); -#line 1421 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp3_ = _tmp2_; -#line 1421 "/home/jens/Source/shotwell/src/Commands.vala" - if (_tmp3_ > 0) { -#line 12663 "Commands.c" - GeeArrayList* _tmp4_; - GeeArrayList* _tmp5_; - gint _tmp6_; - gint _tmp7_; -#line 1422 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp4_ = self->priv->error_list; -#line 1422 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp5_ = self->priv->error_list; -#line 1422 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp6_ = gee_abstract_collection_get_size (G_TYPE_CHECK_INSTANCE_CAST (_tmp5_, GEE_TYPE_ABSTRACT_COLLECTION, GeeAbstractCollection)); -#line 1422 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp7_ = _tmp6_; -#line 1422 "/home/jens/Source/shotwell/src/Commands.vala" - multiple_object_error_dialog (_tmp4_, ngettext ("Time adjustments could not be undone on the following photo file.", "Time adjustments could not be undone on the following photo files.", (gulong) _tmp7_), _ ("Time Adjustment Error")); -#line 12678 "Commands.c" - } -} - - -static void -adjust_date_time_photos_command_set_time (AdjustDateTimePhotosCommand* self, - Dateable* dateable, - time_t exposure_time) -{ - gboolean _tmp0_ = FALSE; - gboolean _tmp1_; - GError * _inner_error_ = NULL; -#line 1429 "/home/jens/Source/shotwell/src/Commands.vala" - g_return_if_fail (IS_ADJUST_DATE_TIME_PHOTOS_COMMAND (self)); -#line 1429 "/home/jens/Source/shotwell/src/Commands.vala" - g_return_if_fail (IS_DATEABLE (dateable)); -#line 1433 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp1_ = self->priv->modify_originals; -#line 1433 "/home/jens/Source/shotwell/src/Commands.vala" - if (_tmp1_) { -#line 1433 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp0_ = G_TYPE_CHECK_INSTANCE_TYPE (dateable, TYPE_PHOTO); -#line 12701 "Commands.c" - } else { -#line 1433 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp0_ = FALSE; -#line 12705 "Commands.c" - } -#line 1433 "/home/jens/Source/shotwell/src/Commands.vala" - if (_tmp0_) { -#line 12709 "Commands.c" - { -#line 1435 "/home/jens/Source/shotwell/src/Commands.vala" - photo_set_exposure_time_persistent (G_TYPE_CHECK_INSTANCE_CAST (dateable, TYPE_PHOTO, Photo), exposure_time, &_inner_error_); -#line 1435 "/home/jens/Source/shotwell/src/Commands.vala" - if (G_UNLIKELY (_inner_error_ != NULL)) { -#line 12715 "Commands.c" - goto __catch468_g_error; - } - } - goto __finally468; - __catch468_g_error: - { - GError* err = NULL; - GeeArrayList* _tmp2_; -#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" - _tmp2_ = self->priv->error_list; -#line 1437 "/home/jens/Source/shotwell/src/Commands.vala" - gee_abstract_collection_add (G_TYPE_CHECK_INSTANCE_CAST (_tmp2_, GEE_TYPE_ABSTRACT_COLLECTION, GeeAbstractCollection), dateable); -#line 1434 "/home/jens/Source/shotwell/src/Commands.vala" - _g_error_free0 (err); -#line 12734 "Commands.c" - } - __finally468: -#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 12745 "Commands.c" - } - } else { -#line 1442 "/home/jens/Source/shotwell/src/Commands.vala" - dateable_set_exposure_time (dateable, exposure_time); -#line 12750 "Commands.c" - } -} - - -static void -adjust_date_time_photos_command_real_execute_on_source (MultipleDataSourceCommand* base, - DataSource* source) -{ - AdjustDateTimePhotosCommand * self; - Dateable* dateable = NULL; - Dateable* _tmp0_; - gboolean _tmp1_ = FALSE; - gboolean _tmp2_; - ViewCollection* all_events = NULL; - ViewCollection* _tmp13_; - Dateable* _tmp29_; - ViewCollection* _tmp30_; -#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_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_CAST (source, TYPE_DATEABLE, Dateable)); -#line 1447 "/home/jens/Source/shotwell/src/Commands.vala" - dateable = _tmp0_; -#line 1449 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp2_ = self->priv->keep_relativity; -#line 1449 "/home/jens/Source/shotwell/src/Commands.vala" - if (_tmp2_) { -#line 12780 "Commands.c" - Dateable* _tmp3_; -#line 1449 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp3_ = dateable; -#line 1449 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp1_ = dateable_get_exposure_time (_tmp3_) != ((time_t) 0); -#line 12786 "Commands.c" - } else { -#line 1449 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp1_ = FALSE; -#line 12790 "Commands.c" - } -#line 1449 "/home/jens/Source/shotwell/src/Commands.vala" - if (_tmp1_) { -#line 12794 "Commands.c" - Dateable* _tmp4_; - Dateable* _tmp5_; - gint64 _tmp6_; -#line 1450 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp4_ = dateable; -#line 1450 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp5_ = dateable; -#line 1450 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp6_ = self->priv->time_shift; -#line 1450 "/home/jens/Source/shotwell/src/Commands.vala" - adjust_date_time_photos_command_set_time (self, _tmp4_, dateable_get_exposure_time (_tmp5_) + ((time_t) _tmp6_)); -#line 12806 "Commands.c" - } else { - GeeHashMap* _tmp7_; - Dateable* _tmp8_; - Dateable* _tmp9_; - time_t _tmp10_; - Dateable* _tmp11_; - time_t* _tmp12_; -#line 1452 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp7_ = self->priv->old_times; -#line 1452 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp8_ = dateable; -#line 1452 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp9_ = dateable; -#line 1452 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp10_ = dateable_get_exposure_time (_tmp9_); -#line 1452 "/home/jens/Source/shotwell/src/Commands.vala" - gee_abstract_map_set (G_TYPE_CHECK_INSTANCE_CAST (_tmp7_, GEE_TYPE_ABSTRACT_MAP, GeeAbstractMap), _tmp8_, &_tmp10_); -#line 1453 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp11_ = dateable; -#line 1453 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp12_ = self->priv->new_time; -#line 1453 "/home/jens/Source/shotwell/src/Commands.vala" - adjust_date_time_photos_command_set_time (self, _tmp11_, *_tmp12_); -#line 12830 "Commands.c" - } -#line 1456 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp13_ = view_collection_new ("tmp"); -#line 1456 "/home/jens/Source/shotwell/src/Commands.vala" - all_events = _tmp13_; -#line 12836 "Commands.c" - { - GeeIterator* _dobj_it = NULL; - EventSourceCollection* _tmp14_; - GeeCollection* _tmp15_; - GeeCollection* _tmp16_; - GeeIterator* _tmp17_; - GeeIterator* _tmp18_; -#line 1458 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp14_ = event_global; -#line 1458 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp15_ = data_collection_get_all (G_TYPE_CHECK_INSTANCE_CAST (_tmp14_, TYPE_DATA_COLLECTION, DataCollection)); -#line 1458 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp16_ = _tmp15_; -#line 1458 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp17_ = gee_iterable_iterator (G_TYPE_CHECK_INSTANCE_CAST (_tmp16_, GEE_TYPE_ITERABLE, GeeIterable)); -#line 1458 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp18_ = _tmp17_; -#line 1458 "/home/jens/Source/shotwell/src/Commands.vala" - _g_object_unref0 (_tmp16_); -#line 1458 "/home/jens/Source/shotwell/src/Commands.vala" - _dobj_it = _tmp18_; -#line 1458 "/home/jens/Source/shotwell/src/Commands.vala" - while (TRUE) { -#line 12860 "Commands.c" - GeeIterator* _tmp19_; - DataObject* dobj = NULL; - GeeIterator* _tmp20_; - gpointer _tmp21_; - Event* event = NULL; - DataObject* _tmp22_; - Event* _tmp23_; - Event* _tmp24_; -#line 1458 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp19_ = _dobj_it; -#line 1458 "/home/jens/Source/shotwell/src/Commands.vala" - if (!gee_iterator_next (_tmp19_)) { -#line 1458 "/home/jens/Source/shotwell/src/Commands.vala" - break; -#line 12875 "Commands.c" - } -#line 1458 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp20_ = _dobj_it; -#line 1458 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp21_ = gee_iterator_get (_tmp20_); -#line 1458 "/home/jens/Source/shotwell/src/Commands.vala" - dobj = (DataObject*) _tmp21_; -#line 1459 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp22_ = dobj; -#line 1459 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp23_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_TYPE (_tmp22_, TYPE_EVENT) ? ((Event*) _tmp22_) : NULL); -#line 1459 "/home/jens/Source/shotwell/src/Commands.vala" - event = _tmp23_; -#line 1460 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp24_ = event; -#line 1460 "/home/jens/Source/shotwell/src/Commands.vala" - if (_tmp24_ != NULL) { -#line 12893 "Commands.c" - ViewCollection* _tmp25_; - Event* _tmp26_; - EventView* _tmp27_; - EventView* _tmp28_; -#line 1461 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp25_ = all_events; -#line 1461 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp26_ = event; -#line 1461 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp27_ = event_view_new (G_TYPE_CHECK_INSTANCE_CAST (_tmp26_, TYPE_EVENT_SOURCE, EventSource)); -#line 1461 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp28_ = _tmp27_; -#line 1461 "/home/jens/Source/shotwell/src/Commands.vala" - data_collection_add (G_TYPE_CHECK_INSTANCE_CAST (_tmp25_, TYPE_DATA_COLLECTION, DataCollection), G_TYPE_CHECK_INSTANCE_CAST (_tmp28_, TYPE_DATA_OBJECT, DataObject)); -#line 1461 "/home/jens/Source/shotwell/src/Commands.vala" - _g_object_unref0 (_tmp28_); -#line 12910 "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 12916 "Commands.c" - } -#line 1458 "/home/jens/Source/shotwell/src/Commands.vala" - _g_object_unref0 (_dobj_it); -#line 12920 "Commands.c" - } -#line 1464 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp29_ = dateable; -#line 1464 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp30_ = all_events; -#line 1464 "/home/jens/Source/shotwell/src/Commands.vala" - event_generate_single_event (G_TYPE_CHECK_INSTANCE_CAST (_tmp29_, TYPE_MEDIA_SOURCE, MediaSource), _tmp30_, 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 12932 "Commands.c" -} - - -static void -adjust_date_time_photos_command_real_undo_on_source (MultipleDataSourceCommand* base, - DataSource* source) -{ - AdjustDateTimePhotosCommand * self; - Dateable* photo = NULL; - Dateable* _tmp0_; - GeeHashMap* _tmp1_; - Dateable* _tmp2_; - GeeMap* _tmp13_; - gpointer _tmp14_; - Event* _tmp15_; -#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_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_CAST (source, TYPE_DATEABLE, Dateable)); -#line 1468 "/home/jens/Source/shotwell/src/Commands.vala" - photo = _tmp0_; -#line 1470 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp1_ = self->priv->old_times; -#line 1470 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp2_ = photo; -#line 1470 "/home/jens/Source/shotwell/src/Commands.vala" - if (gee_abstract_map_has_key (G_TYPE_CHECK_INSTANCE_CAST (_tmp1_, GEE_TYPE_ABSTRACT_MAP, GeeAbstractMap), _tmp2_)) { -#line 12962 "Commands.c" - Dateable* _tmp3_; - GeeHashMap* _tmp4_; - Dateable* _tmp5_; - gpointer _tmp6_; - time_t* _tmp7_; - GeeHashMap* _tmp8_; - Dateable* _tmp9_; -#line 1471 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp3_ = photo; -#line 1471 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp4_ = self->priv->old_times; -#line 1471 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp5_ = photo; -#line 1471 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp6_ = gee_abstract_map_get (G_TYPE_CHECK_INSTANCE_CAST (_tmp4_, GEE_TYPE_ABSTRACT_MAP, GeeAbstractMap), _tmp5_); -#line 1471 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp7_ = (time_t*) _tmp6_; -#line 1471 "/home/jens/Source/shotwell/src/Commands.vala" - adjust_date_time_photos_command_set_time (self, _tmp3_, *_tmp7_); -#line 1471 "/home/jens/Source/shotwell/src/Commands.vala" - _g_free0 (_tmp7_); -#line 1472 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp8_ = self->priv->old_times; -#line 1472 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp9_ = photo; -#line 1472 "/home/jens/Source/shotwell/src/Commands.vala" - gee_abstract_map_unset (G_TYPE_CHECK_INSTANCE_CAST (_tmp8_, GEE_TYPE_ABSTRACT_MAP, GeeAbstractMap), _tmp9_, NULL); -#line 12990 "Commands.c" - } else { - Dateable* _tmp10_; - Dateable* _tmp11_; - gint64 _tmp12_; -#line 1474 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp10_ = photo; -#line 1474 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp11_ = photo; -#line 1474 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp12_ = self->priv->time_shift; -#line 1474 "/home/jens/Source/shotwell/src/Commands.vala" - adjust_date_time_photos_command_set_time (self, _tmp10_, dateable_get_exposure_time (_tmp11_) - ((time_t) _tmp12_)); -#line 13003 "Commands.c" - } -#line 1477 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp13_ = self->priv->prev_events; -#line 1477 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp14_ = gee_map_get (_tmp13_, G_TYPE_CHECK_INSTANCE_TYPE (source, TYPE_DATEABLE) ? ((Dateable*) source) : NULL); -#line 1477 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp15_ = (Event*) _tmp14_; -#line 1477 "/home/jens/Source/shotwell/src/Commands.vala" - media_source_set_event (G_TYPE_CHECK_INSTANCE_TYPE (source, TYPE_MEDIA_SOURCE) ? ((MediaSource*) source) : NULL, _tmp15_); -#line 1477 "/home/jens/Source/shotwell/src/Commands.vala" - _g_object_unref0 (_tmp15_); -#line 1467 "/home/jens/Source/shotwell/src/Commands.vala" - _g_object_unref0 (photo); -#line 13017 "Commands.c" -} - - -static void -adjust_date_time_photos_command_class_init (AdjustDateTimePhotosCommandClass * klass) -{ -#line 1355 "/home/jens/Source/shotwell/src/Commands.vala" - adjust_date_time_photos_command_parent_class = g_type_class_peek_parent (klass); -#line 1355 "/home/jens/Source/shotwell/src/Commands.vala" - g_type_class_add_private (klass, sizeof (AdjustDateTimePhotosCommandPrivate)); -#line 1355 "/home/jens/Source/shotwell/src/Commands.vala" - ((CommandClass *) klass)->execute = (void (*) (Command *)) adjust_date_time_photos_command_real_execute; -#line 1355 "/home/jens/Source/shotwell/src/Commands.vala" - ((CommandClass *) klass)->undo = (void (*) (Command *)) adjust_date_time_photos_command_real_undo; -#line 1355 "/home/jens/Source/shotwell/src/Commands.vala" - ((MultipleDataSourceCommandClass *) klass)->execute_on_source = (void (*) (MultipleDataSourceCommand *, DataSource*)) adjust_date_time_photos_command_real_execute_on_source; -#line 1355 "/home/jens/Source/shotwell/src/Commands.vala" - ((MultipleDataSourceCommandClass *) klass)->undo_on_source = (void (*) (MultipleDataSourceCommand *, DataSource*)) adjust_date_time_photos_command_real_undo_on_source; -#line 1355 "/home/jens/Source/shotwell/src/Commands.vala" - G_OBJECT_CLASS (klass)->finalize = adjust_date_time_photos_command_finalize; -#line 13038 "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 13049 "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 13069 "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 13093 "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 13104 "Commands.c" -} - - -AddTagsCommand* -add_tags_command_construct (GType object_type, - gchar** paths, - int paths_length1, - GeeCollection* sources) -{ - AddTagsCommand * self = NULL; - gchar* _tmp0_; - gchar* _tmp1_; - LibraryPhotoSourceCollection* _tmp38_; - VideoSourceCollection* _tmp39_; -#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_ = resources_add_tags_label (paths, paths_length1); -#line 1486 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp1_ = _tmp0_; -#line 1486 "/home/jens/Source/shotwell/src/Commands.vala" - self = (AddTagsCommand*) page_command_construct (object_type, _tmp1_, ""); -#line 1486 "/home/jens/Source/shotwell/src/Commands.vala" - _g_free0 (_tmp1_); -#line 13129 "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 = paths; -#line 1491 "/home/jens/Source/shotwell/src/Commands.vala" - path_collection_length1 = paths_length1; -#line 1491 "/home/jens/Source/shotwell/src/Commands.vala" - for (path_it = 0; path_it < paths_length1; path_it = path_it + 1) { -#line 13141 "Commands.c" - gchar* _tmp2_; - gchar* path = NULL; -#line 1491 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp2_ = g_strdup (path_collection[path_it]); -#line 1491 "/home/jens/Source/shotwell/src/Commands.vala" - path = _tmp2_; -#line 13148 "Commands.c" - { - GeeList* paths_to_create = NULL; - const gchar* _tmp3_; - GeeList* _tmp4_; - GeeList* _tmp5_; - const gchar* _tmp6_; -#line 1492 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp3_ = path; -#line 1492 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp4_ = hierarchical_tag_utilities_enumerate_parent_paths (_tmp3_); -#line 1492 "/home/jens/Source/shotwell/src/Commands.vala" - paths_to_create = _tmp4_; -#line 1494 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp5_ = paths_to_create; -#line 1494 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp6_ = path; -#line 1494 "/home/jens/Source/shotwell/src/Commands.vala" - gee_collection_add (G_TYPE_CHECK_INSTANCE_CAST (_tmp5_, GEE_TYPE_COLLECTION, GeeCollection), _tmp6_); -#line 13167 "Commands.c" - { - GeeList* _create_path_list = NULL; - GeeList* _tmp7_; - GeeList* _tmp8_; - gint _create_path_size = 0; - GeeList* _tmp9_; - gint _tmp10_; - gint _tmp11_; - gint _create_path_index = 0; -#line 1496 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp7_ = paths_to_create; -#line 1496 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp8_ = _g_object_ref0 (_tmp7_); -#line 1496 "/home/jens/Source/shotwell/src/Commands.vala" - _create_path_list = _tmp8_; -#line 1496 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp9_ = _create_path_list; -#line 1496 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp10_ = gee_collection_get_size (G_TYPE_CHECK_INSTANCE_CAST (_tmp9_, GEE_TYPE_COLLECTION, GeeCollection)); -#line 1496 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp11_ = _tmp10_; -#line 1496 "/home/jens/Source/shotwell/src/Commands.vala" - _create_path_size = _tmp11_; -#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 13195 "Commands.c" - gint _tmp12_; - gint _tmp13_; - gint _tmp14_; - gchar* create_path = NULL; - GeeList* _tmp15_; - gint _tmp16_; - gpointer _tmp17_; - Tag* tag = NULL; - const gchar* _tmp18_; - Tag* _tmp19_; - SourceProxy* tag_proxy = NULL; - Tag* _tmp20_; - SourceProxy* _tmp21_; - GeeArrayList* add_sources = NULL; - GeeArrayList* _tmp22_; - GeeArrayList* _tmp31_; - gint _tmp32_; - gint _tmp33_; -#line 1496 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp12_ = _create_path_index; -#line 1496 "/home/jens/Source/shotwell/src/Commands.vala" - _create_path_index = _tmp12_ + 1; -#line 1496 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp13_ = _create_path_index; -#line 1496 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp14_ = _create_path_size; -#line 1496 "/home/jens/Source/shotwell/src/Commands.vala" - if (!(_tmp13_ < _tmp14_)) { -#line 1496 "/home/jens/Source/shotwell/src/Commands.vala" - break; -#line 13226 "Commands.c" - } -#line 1496 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp15_ = _create_path_list; -#line 1496 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp16_ = _create_path_index; -#line 1496 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp17_ = gee_list_get (_tmp15_, _tmp16_); -#line 1496 "/home/jens/Source/shotwell/src/Commands.vala" - create_path = (gchar*) _tmp17_; -#line 1497 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp18_ = create_path; -#line 1497 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp19_ = tag_for_path (_tmp18_); -#line 1497 "/home/jens/Source/shotwell/src/Commands.vala" - tag = _tmp19_; -#line 1498 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp20_ = tag; -#line 1498 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp21_ = proxyable_get_proxy (G_TYPE_CHECK_INSTANCE_CAST (_tmp20_, TYPE_PROXYABLE, Proxyable)); -#line 1498 "/home/jens/Source/shotwell/src/Commands.vala" - tag_proxy = _tmp21_; -#line 1502 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp22_ = gee_array_list_new (TYPE_MEDIA_SOURCE, (GBoxedCopyFunc) g_object_ref, (GDestroyNotify) g_object_unref, NULL, NULL, NULL); -#line 1502 "/home/jens/Source/shotwell/src/Commands.vala" - add_sources = _tmp22_; -#line 13252 "Commands.c" - { - GeeIterator* _source_it = NULL; - GeeIterator* _tmp23_; -#line 1503 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp23_ = gee_iterable_iterator (G_TYPE_CHECK_INSTANCE_CAST (sources, GEE_TYPE_ITERABLE, GeeIterable)); -#line 1503 "/home/jens/Source/shotwell/src/Commands.vala" - _source_it = _tmp23_; -#line 1503 "/home/jens/Source/shotwell/src/Commands.vala" - while (TRUE) { -#line 13262 "Commands.c" - GeeIterator* _tmp24_; - MediaSource* source = NULL; - GeeIterator* _tmp25_; - gpointer _tmp26_; - Tag* _tmp27_; - MediaSource* _tmp28_; -#line 1503 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp24_ = _source_it; -#line 1503 "/home/jens/Source/shotwell/src/Commands.vala" - if (!gee_iterator_next (_tmp24_)) { -#line 1503 "/home/jens/Source/shotwell/src/Commands.vala" - break; -#line 13275 "Commands.c" - } -#line 1503 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp25_ = _source_it; -#line 1503 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp26_ = gee_iterator_get (_tmp25_); -#line 1503 "/home/jens/Source/shotwell/src/Commands.vala" - source = (MediaSource*) _tmp26_; -#line 1504 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp27_ = tag; -#line 1504 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp28_ = source; -#line 1504 "/home/jens/Source/shotwell/src/Commands.vala" - if (!tag_contains (_tmp27_, _tmp28_)) { -#line 13289 "Commands.c" - GeeArrayList* _tmp29_; - MediaSource* _tmp30_; -#line 1505 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp29_ = add_sources; -#line 1505 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp30_ = source; -#line 1505 "/home/jens/Source/shotwell/src/Commands.vala" - gee_abstract_collection_add (G_TYPE_CHECK_INSTANCE_CAST (_tmp29_, GEE_TYPE_ABSTRACT_COLLECTION, GeeAbstractCollection), _tmp30_); -#line 13298 "Commands.c" - } -#line 1503 "/home/jens/Source/shotwell/src/Commands.vala" - _g_object_unref0 (source); -#line 13302 "Commands.c" - } -#line 1503 "/home/jens/Source/shotwell/src/Commands.vala" - _g_object_unref0 (_source_it); -#line 13306 "Commands.c" - } -#line 1508 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp31_ = add_sources; -#line 1508 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp32_ = gee_abstract_collection_get_size (G_TYPE_CHECK_INSTANCE_CAST (_tmp31_, GEE_TYPE_ABSTRACT_COLLECTION, GeeAbstractCollection)); -#line 1508 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp33_ = _tmp32_; -#line 1508 "/home/jens/Source/shotwell/src/Commands.vala" - if (_tmp33_ > 0) { -#line 13316 "Commands.c" - SourceProxy* _tmp34_; - GeeHashMap* _tmp35_; - SourceProxy* _tmp36_; - GeeArrayList* _tmp37_; -#line 1509 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp34_ = tag_proxy; -#line 1509 "/home/jens/Source/shotwell/src/Commands.vala" - g_signal_connect_object (_tmp34_, "broken", (GCallback) _add_tags_command_on_proxy_broken_source_proxy_broken, self, 0); -#line 1510 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp35_ = self->priv->map; -#line 1510 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp36_ = tag_proxy; -#line 1510 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp37_ = add_sources; -#line 1510 "/home/jens/Source/shotwell/src/Commands.vala" - gee_abstract_map_set (G_TYPE_CHECK_INSTANCE_CAST (_tmp35_, GEE_TYPE_ABSTRACT_MAP, GeeAbstractMap), _tmp36_, _tmp37_); -#line 13333 "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 13343 "Commands.c" - } -#line 1496 "/home/jens/Source/shotwell/src/Commands.vala" - _g_object_unref0 (_create_path_list); -#line 13347 "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 13353 "Commands.c" - } - } - } -#line 1515 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp38_ = library_photo_global; -#line 1515 "/home/jens/Source/shotwell/src/Commands.vala" - g_signal_connect_object (G_TYPE_CHECK_INSTANCE_CAST (_tmp38_, 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" - _tmp39_ = video_global; -#line 1516 "/home/jens/Source/shotwell/src/Commands.vala" - g_signal_connect_object (G_TYPE_CHECK_INSTANCE_CAST (_tmp39_, 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 13367 "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 13378 "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 13388 "Commands.c" - { - GeeIterator* _tag_proxy_it = NULL; - GeeHashMap* _tmp0_; - GeeSet* _tmp1_; - GeeSet* _tmp2_; - GeeSet* _tmp3_; - GeeIterator* _tmp4_; - GeeIterator* _tmp5_; -#line 1528 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp0_ = self->priv->map; -#line 1528 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp1_ = gee_abstract_map_get_keys (G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, GEE_TYPE_ABSTRACT_MAP, GeeAbstractMap)); -#line 1528 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp2_ = _tmp1_; -#line 1528 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp3_ = _tmp2_; -#line 1528 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp4_ = gee_iterable_iterator (G_TYPE_CHECK_INSTANCE_CAST (_tmp3_, GEE_TYPE_ITERABLE, GeeIterable)); -#line 1528 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp5_ = _tmp4_; -#line 1528 "/home/jens/Source/shotwell/src/Commands.vala" - _g_object_unref0 (_tmp3_); -#line 1528 "/home/jens/Source/shotwell/src/Commands.vala" - _tag_proxy_it = _tmp5_; -#line 1528 "/home/jens/Source/shotwell/src/Commands.vala" - while (TRUE) { -#line 13415 "Commands.c" - GeeIterator* _tmp6_; - SourceProxy* tag_proxy = NULL; - GeeIterator* _tmp7_; - gpointer _tmp8_; - SourceProxy* _tmp9_; - DataSource* _tmp10_; - Tag* _tmp11_; - GeeHashMap* _tmp12_; - SourceProxy* _tmp13_; - gpointer _tmp14_; - GeeArrayList* _tmp15_; -#line 1528 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp6_ = _tag_proxy_it; -#line 1528 "/home/jens/Source/shotwell/src/Commands.vala" - if (!gee_iterator_next (_tmp6_)) { -#line 1528 "/home/jens/Source/shotwell/src/Commands.vala" - break; -#line 13433 "Commands.c" - } -#line 1528 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp7_ = _tag_proxy_it; -#line 1528 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp8_ = gee_iterator_get (_tmp7_); -#line 1528 "/home/jens/Source/shotwell/src/Commands.vala" - tag_proxy = (SourceProxy*) _tmp8_; -#line 1529 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp9_ = tag_proxy; -#line 1529 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp10_ = source_proxy_get_source (_tmp9_); -#line 1529 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp11_ = G_TYPE_CHECK_INSTANCE_CAST (_tmp10_, TYPE_TAG, Tag); -#line 1529 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp12_ = self->priv->map; -#line 1529 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp13_ = tag_proxy; -#line 1529 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp14_ = gee_abstract_map_get (G_TYPE_CHECK_INSTANCE_CAST (_tmp12_, GEE_TYPE_ABSTRACT_MAP, GeeAbstractMap), _tmp13_); -#line 1529 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp15_ = (GeeArrayList*) _tmp14_; -#line 1529 "/home/jens/Source/shotwell/src/Commands.vala" - tag_attach_many (_tmp11_, G_TYPE_CHECK_INSTANCE_CAST (_tmp15_, GEE_TYPE_COLLECTION, GeeCollection)); -#line 1529 "/home/jens/Source/shotwell/src/Commands.vala" - _g_object_unref0 (_tmp15_); -#line 1529 "/home/jens/Source/shotwell/src/Commands.vala" - _g_object_unref0 (_tmp11_); -#line 1528 "/home/jens/Source/shotwell/src/Commands.vala" - _source_proxy_unref0 (tag_proxy); -#line 13463 "Commands.c" - } -#line 1528 "/home/jens/Source/shotwell/src/Commands.vala" - _g_object_unref0 (_tag_proxy_it); -#line 13467 "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 13478 "Commands.c" - { - GeeIterator* _tag_proxy_it = NULL; - GeeHashMap* _tmp0_; - GeeSet* _tmp1_; - GeeSet* _tmp2_; - GeeSet* _tmp3_; - GeeIterator* _tmp4_; - GeeIterator* _tmp5_; -#line 1533 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp0_ = self->priv->map; -#line 1533 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp1_ = gee_abstract_map_get_keys (G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, GEE_TYPE_ABSTRACT_MAP, GeeAbstractMap)); -#line 1533 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp2_ = _tmp1_; -#line 1533 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp3_ = _tmp2_; -#line 1533 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp4_ = gee_iterable_iterator (G_TYPE_CHECK_INSTANCE_CAST (_tmp3_, GEE_TYPE_ITERABLE, GeeIterable)); -#line 1533 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp5_ = _tmp4_; -#line 1533 "/home/jens/Source/shotwell/src/Commands.vala" - _g_object_unref0 (_tmp3_); -#line 1533 "/home/jens/Source/shotwell/src/Commands.vala" - _tag_proxy_it = _tmp5_; -#line 1533 "/home/jens/Source/shotwell/src/Commands.vala" - while (TRUE) { -#line 13505 "Commands.c" - GeeIterator* _tmp6_; - SourceProxy* tag_proxy = NULL; - GeeIterator* _tmp7_; - gpointer _tmp8_; - Tag* tag = NULL; - SourceProxy* _tmp9_; - DataSource* _tmp10_; - Tag* _tmp11_; - GeeHashMap* _tmp12_; - SourceProxy* _tmp13_; - gpointer _tmp14_; - GeeArrayList* _tmp15_; - GeeMultiMap* _tmp16_; - GeeMultiMap* _tmp17_; -#line 1533 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp6_ = _tag_proxy_it; -#line 1533 "/home/jens/Source/shotwell/src/Commands.vala" - if (!gee_iterator_next (_tmp6_)) { -#line 1533 "/home/jens/Source/shotwell/src/Commands.vala" - break; -#line 13526 "Commands.c" - } -#line 1533 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp7_ = _tag_proxy_it; -#line 1533 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp8_ = gee_iterator_get (_tmp7_); -#line 1533 "/home/jens/Source/shotwell/src/Commands.vala" - tag_proxy = (SourceProxy*) _tmp8_; -#line 1534 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp9_ = tag_proxy; -#line 1534 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp10_ = source_proxy_get_source (_tmp9_); -#line 1534 "/home/jens/Source/shotwell/src/Commands.vala" - tag = G_TYPE_CHECK_INSTANCE_CAST (_tmp10_, TYPE_TAG, Tag); -#line 1536 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp11_ = tag; -#line 1536 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp12_ = self->priv->map; -#line 1536 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp13_ = tag_proxy; -#line 1536 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp14_ = gee_abstract_map_get (G_TYPE_CHECK_INSTANCE_CAST (_tmp12_, GEE_TYPE_ABSTRACT_MAP, GeeAbstractMap), _tmp13_); -#line 1536 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp15_ = (GeeArrayList*) _tmp14_; -#line 1536 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp16_ = tag_detach_many (_tmp11_, G_TYPE_CHECK_INSTANCE_CAST (_tmp15_, GEE_TYPE_COLLECTION, GeeCollection)); -#line 1536 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp17_ = _tmp16_; -#line 1536 "/home/jens/Source/shotwell/src/Commands.vala" - _g_object_unref0 (_tmp17_); -#line 1536 "/home/jens/Source/shotwell/src/Commands.vala" - _g_object_unref0 (_tmp15_); -#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 13562 "Commands.c" - } -#line 1533 "/home/jens/Source/shotwell/src/Commands.vala" - _g_object_unref0 (_tag_proxy_it); -#line 13566 "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 13579 "Commands.c" - { - GeeIterator* _sources_it = NULL; - GeeHashMap* _tmp0_; - GeeCollection* _tmp1_; - GeeCollection* _tmp2_; - GeeCollection* _tmp3_; - GeeIterator* _tmp4_; - GeeIterator* _tmp5_; -#line 1541 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp0_ = self->priv->map; -#line 1541 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp1_ = gee_abstract_map_get_values (G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, GEE_TYPE_ABSTRACT_MAP, GeeAbstractMap)); -#line 1541 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp2_ = _tmp1_; -#line 1541 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp3_ = _tmp2_; -#line 1541 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp4_ = gee_iterable_iterator (G_TYPE_CHECK_INSTANCE_CAST (_tmp3_, GEE_TYPE_ITERABLE, GeeIterable)); -#line 1541 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp5_ = _tmp4_; -#line 1541 "/home/jens/Source/shotwell/src/Commands.vala" - _g_object_unref0 (_tmp3_); -#line 1541 "/home/jens/Source/shotwell/src/Commands.vala" - _sources_it = _tmp5_; -#line 1541 "/home/jens/Source/shotwell/src/Commands.vala" - while (TRUE) { -#line 13606 "Commands.c" - GeeIterator* _tmp6_; - GeeArrayList* sources = NULL; - GeeIterator* _tmp7_; - gpointer _tmp8_; - GeeArrayList* _tmp9_; -#line 1541 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp6_ = _sources_it; -#line 1541 "/home/jens/Source/shotwell/src/Commands.vala" - if (!gee_iterator_next (_tmp6_)) { -#line 1541 "/home/jens/Source/shotwell/src/Commands.vala" - break; -#line 13618 "Commands.c" - } -#line 1541 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp7_ = _sources_it; -#line 1541 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp8_ = gee_iterator_get (_tmp7_); -#line 1541 "/home/jens/Source/shotwell/src/Commands.vala" - sources = (GeeArrayList*) _tmp8_; -#line 1542 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp9_ = sources; -#line 1542 "/home/jens/Source/shotwell/src/Commands.vala" - if (gee_abstract_collection_contains (G_TYPE_CHECK_INSTANCE_CAST (_tmp9_, GEE_TYPE_ABSTRACT_COLLECTION, GeeAbstractCollection), G_TYPE_CHECK_INSTANCE_CAST (source, TYPE_MEDIA_SOURCE, MediaSource))) { -#line 13630 "Commands.c" - CommandManager* _tmp10_; - CommandManager* _tmp11_; -#line 1543 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp10_ = command_get_command_manager (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_COMMAND, Command)); -#line 1543 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp11_ = _tmp10_; -#line 1543 "/home/jens/Source/shotwell/src/Commands.vala" - command_manager_reset (_tmp11_); -#line 1543 "/home/jens/Source/shotwell/src/Commands.vala" - _command_manager_unref0 (_tmp11_); -#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 13647 "Commands.c" - } -#line 1541 "/home/jens/Source/shotwell/src/Commands.vala" - _g_object_unref0 (sources); -#line 13651 "Commands.c" - } -#line 1541 "/home/jens/Source/shotwell/src/Commands.vala" - _g_object_unref0 (_sources_it); -#line 13655 "Commands.c" - } -} - - -static void -add_tags_command_on_proxy_broken (AddTagsCommand* self) -{ - CommandManager* _tmp0_; - CommandManager* _tmp1_; -#line 1550 "/home/jens/Source/shotwell/src/Commands.vala" - g_return_if_fail (IS_ADD_TAGS_COMMAND (self)); -#line 1551 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp0_ = command_get_command_manager (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_COMMAND, Command)); -#line 1551 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp1_ = _tmp0_; -#line 1551 "/home/jens/Source/shotwell/src/Commands.vala" - command_manager_reset (_tmp1_); -#line 1551 "/home/jens/Source/shotwell/src/Commands.vala" - _command_manager_unref0 (_tmp1_); -#line 13675 "Commands.c" -} - - -static void -add_tags_command_class_init (AddTagsCommandClass * klass) -{ -#line 1481 "/home/jens/Source/shotwell/src/Commands.vala" - add_tags_command_parent_class = g_type_class_peek_parent (klass); -#line 1481 "/home/jens/Source/shotwell/src/Commands.vala" - g_type_class_add_private (klass, sizeof (AddTagsCommandPrivate)); -#line 1481 "/home/jens/Source/shotwell/src/Commands.vala" - ((CommandClass *) klass)->execute = (void (*) (Command *)) add_tags_command_real_execute; -#line 1481 "/home/jens/Source/shotwell/src/Commands.vala" - ((CommandClass *) klass)->undo = (void (*) (Command *)) add_tags_command_real_undo; -#line 1481 "/home/jens/Source/shotwell/src/Commands.vala" - G_OBJECT_CLASS (klass)->finalize = add_tags_command_finalize; -#line 13692 "Commands.c" -} - - -static void -add_tags_command_instance_init (AddTagsCommand * self) -{ - GeeHashMap* _tmp0_; -#line 1481 "/home/jens/Source/shotwell/src/Commands.vala" - self->priv = ADD_TAGS_COMMAND_GET_PRIVATE (self); -#line 1482 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp0_ = gee_hash_map_new (TYPE_SOURCE_PROXY, (GBoxedCopyFunc) source_proxy_ref, (GDestroyNotify) source_proxy_unref, GEE_TYPE_ARRAY_LIST, (GBoxedCopyFunc) g_object_ref, (GDestroyNotify) g_object_unref, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL); -#line 1482 "/home/jens/Source/shotwell/src/Commands.vala" - self->priv->map = _tmp0_; -#line 13706 "Commands.c" -} - - -static void -add_tags_command_finalize (GObject * obj) -{ - AddTagsCommand * self; - LibraryPhotoSourceCollection* _tmp11_; - guint _tmp12_; - VideoSourceCollection* _tmp13_; - guint _tmp14_; -#line 1481 "/home/jens/Source/shotwell/src/Commands.vala" - self = G_TYPE_CHECK_INSTANCE_CAST (obj, TYPE_ADD_TAGS_COMMAND, AddTagsCommand); -#line 13720 "Commands.c" - { - GeeIterator* _tag_proxy_it = NULL; - GeeHashMap* _tmp0_; - GeeSet* _tmp1_; - GeeSet* _tmp2_; - GeeSet* _tmp3_; - GeeIterator* _tmp4_; - GeeIterator* _tmp5_; -#line 1520 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp0_ = self->priv->map; -#line 1520 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp1_ = gee_abstract_map_get_keys (G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, GEE_TYPE_ABSTRACT_MAP, GeeAbstractMap)); -#line 1520 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp2_ = _tmp1_; -#line 1520 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp3_ = _tmp2_; -#line 1520 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp4_ = gee_iterable_iterator (G_TYPE_CHECK_INSTANCE_CAST (_tmp3_, GEE_TYPE_ITERABLE, GeeIterable)); -#line 1520 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp5_ = _tmp4_; -#line 1520 "/home/jens/Source/shotwell/src/Commands.vala" - _g_object_unref0 (_tmp3_); -#line 1520 "/home/jens/Source/shotwell/src/Commands.vala" - _tag_proxy_it = _tmp5_; -#line 1520 "/home/jens/Source/shotwell/src/Commands.vala" - while (TRUE) { -#line 13747 "Commands.c" - GeeIterator* _tmp6_; - SourceProxy* tag_proxy = NULL; - GeeIterator* _tmp7_; - gpointer _tmp8_; - SourceProxy* _tmp9_; - guint _tmp10_; -#line 1520 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp6_ = _tag_proxy_it; -#line 1520 "/home/jens/Source/shotwell/src/Commands.vala" - if (!gee_iterator_next (_tmp6_)) { -#line 1520 "/home/jens/Source/shotwell/src/Commands.vala" - break; -#line 13760 "Commands.c" - } -#line 1520 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp7_ = _tag_proxy_it; -#line 1520 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp8_ = gee_iterator_get (_tmp7_); -#line 1520 "/home/jens/Source/shotwell/src/Commands.vala" - tag_proxy = (SourceProxy*) _tmp8_; -#line 1521 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp9_ = tag_proxy; -#line 1521 "/home/jens/Source/shotwell/src/Commands.vala" - g_signal_parse_name ("broken", TYPE_SOURCE_PROXY, &_tmp10_, NULL, FALSE); -#line 1521 "/home/jens/Source/shotwell/src/Commands.vala" - g_signal_handlers_disconnect_matched (_tmp9_, G_SIGNAL_MATCH_ID | G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA, _tmp10_, 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 13776 "Commands.c" - } -#line 1520 "/home/jens/Source/shotwell/src/Commands.vala" - _g_object_unref0 (_tag_proxy_it); -#line 13780 "Commands.c" - } -#line 1523 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp11_ = library_photo_global; -#line 1523 "/home/jens/Source/shotwell/src/Commands.vala" - g_signal_parse_name ("item-destroyed", TYPE_SOURCE_COLLECTION, &_tmp12_, NULL, FALSE); -#line 1523 "/home/jens/Source/shotwell/src/Commands.vala" - g_signal_handlers_disconnect_matched (G_TYPE_CHECK_INSTANCE_CAST (_tmp11_, TYPE_SOURCE_COLLECTION, SourceCollection), G_SIGNAL_MATCH_ID | G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA, _tmp12_, 0, NULL, (GCallback) _add_tags_command_on_source_destroyed_source_collection_item_destroyed, self); -#line 1524 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp13_ = video_global; -#line 1524 "/home/jens/Source/shotwell/src/Commands.vala" - g_signal_parse_name ("item-destroyed", TYPE_SOURCE_COLLECTION, &_tmp14_, NULL, FALSE); -#line 1524 "/home/jens/Source/shotwell/src/Commands.vala" - g_signal_handlers_disconnect_matched (G_TYPE_CHECK_INSTANCE_CAST (_tmp13_, TYPE_SOURCE_COLLECTION, SourceCollection), G_SIGNAL_MATCH_ID | G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA, _tmp14_, 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 13798 "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; - gchar* _tmp0_; - gchar* _tmp1_; - gchar* _tmp2_; - gchar* _tmp3_; - gchar* _tmp4_; - gchar* _tmp5_; - gchar* _tmp6_; - gchar* _tmp7_; -#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_get_user_visible_name (tag); -#line 1561 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp1_ = _tmp0_; -#line 1561 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp2_ = resources_rename_tag_label (_tmp1_, new_name); -#line 1561 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp3_ = _tmp2_; -#line 1561 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp4_ = data_object_get_name (G_TYPE_CHECK_INSTANCE_CAST (tag, TYPE_DATA_OBJECT, DataObject)); -#line 1561 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp5_ = _tmp4_; -#line 1561 "/home/jens/Source/shotwell/src/Commands.vala" - self = (RenameTagCommand*) simple_proxyable_command_construct (object_type, G_TYPE_CHECK_INSTANCE_CAST (tag, TYPE_PROXYABLE, Proxyable), _tmp3_, _tmp5_); -#line 1561 "/home/jens/Source/shotwell/src/Commands.vala" - _g_free0 (_tmp5_); -#line 1561 "/home/jens/Source/shotwell/src/Commands.vala" - _g_free0 (_tmp3_); -#line 1561 "/home/jens/Source/shotwell/src/Commands.vala" - _g_free0 (_tmp1_); -#line 1564 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp6_ = tag_get_user_visible_name (tag); -#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 = _tmp6_; -#line 1565 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp7_ = g_strdup (new_name); -#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 = _tmp7_; -#line 1560 "/home/jens/Source/shotwell/src/Commands.vala" - return self; -#line 13868 "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 13878 "Commands.c" -} - - -static void -rename_tag_command_real_execute_on_source (SimpleProxyableCommand* base, - DataSource* source) -{ - RenameTagCommand * self; - const gchar* _tmp0_; -#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_ = self->priv->new_name; -#line 1569 "/home/jens/Source/shotwell/src/Commands.vala" - if (!tag_rename (G_TYPE_CHECK_INSTANCE_CAST (source, TYPE_TAG, Tag), _tmp0_)) { -#line 13896 "Commands.c" - const gchar* _tmp1_; - gchar* _tmp2_; - gchar* _tmp3_; -#line 1570 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp1_ = self->priv->new_name; -#line 1570 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp2_ = resources_rename_tag_exists_message (_tmp1_); -#line 1570 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp3_ = _tmp2_; -#line 1570 "/home/jens/Source/shotwell/src/Commands.vala" - app_window_error_message (_tmp3_, NULL); -#line 1570 "/home/jens/Source/shotwell/src/Commands.vala" - _g_free0 (_tmp3_); -#line 13910 "Commands.c" - } -} - - -static void -rename_tag_command_real_undo_on_source (SimpleProxyableCommand* base, - DataSource* source) -{ - RenameTagCommand * self; - const gchar* _tmp0_; -#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_ = self->priv->old_name; -#line 1574 "/home/jens/Source/shotwell/src/Commands.vala" - if (!tag_rename (G_TYPE_CHECK_INSTANCE_CAST (source, TYPE_TAG, Tag), _tmp0_)) { -#line 13929 "Commands.c" - const gchar* _tmp1_; - gchar* _tmp2_; - gchar* _tmp3_; -#line 1575 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp1_ = self->priv->old_name; -#line 1575 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp2_ = resources_rename_tag_exists_message (_tmp1_); -#line 1575 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp3_ = _tmp2_; -#line 1575 "/home/jens/Source/shotwell/src/Commands.vala" - app_window_error_message (_tmp3_, NULL); -#line 1575 "/home/jens/Source/shotwell/src/Commands.vala" - _g_free0 (_tmp3_); -#line 13943 "Commands.c" - } -} - - -static void -rename_tag_command_class_init (RenameTagCommandClass * klass) -{ -#line 1555 "/home/jens/Source/shotwell/src/Commands.vala" - rename_tag_command_parent_class = g_type_class_peek_parent (klass); -#line 1555 "/home/jens/Source/shotwell/src/Commands.vala" - g_type_class_add_private (klass, sizeof (RenameTagCommandPrivate)); -#line 1555 "/home/jens/Source/shotwell/src/Commands.vala" - ((SimpleProxyableCommandClass *) klass)->execute_on_source = (void (*) (SimpleProxyableCommand *, DataSource*)) rename_tag_command_real_execute_on_source; -#line 1555 "/home/jens/Source/shotwell/src/Commands.vala" - ((SimpleProxyableCommandClass *) klass)->undo_on_source = (void (*) (SimpleProxyableCommand *, DataSource*)) rename_tag_command_real_undo_on_source; -#line 1555 "/home/jens/Source/shotwell/src/Commands.vala" - G_OBJECT_CLASS (klass)->finalize = rename_tag_command_finalize; -#line 13961 "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 13970 "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 13986 "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; - gchar* _tmp0_; - gchar* _tmp1_; - gchar* _tmp2_; - gchar* _tmp3_; - gchar* _tmp4_; - gchar* _tmp5_; -#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_get_user_visible_name (tag); -#line 1583 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp1_ = _tmp0_; -#line 1583 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp2_ = resources_delete_tag_label (_tmp1_); -#line 1583 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp3_ = _tmp2_; -#line 1583 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp4_ = data_object_get_name (G_TYPE_CHECK_INSTANCE_CAST (tag, TYPE_DATA_OBJECT, DataObject)); -#line 1583 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp5_ = _tmp4_; -#line 1583 "/home/jens/Source/shotwell/src/Commands.vala" - self = (DeleteTagCommand*) simple_proxyable_command_construct (object_type, G_TYPE_CHECK_INSTANCE_CAST (tag, TYPE_PROXYABLE, Proxyable), _tmp3_, _tmp5_); -#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 1583 "/home/jens/Source/shotwell/src/Commands.vala" - _g_free0 (_tmp1_); -#line 1582 "/home/jens/Source/shotwell/src/Commands.vala" - return self; -#line 14039 "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 14048 "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 14058 "Commands.c" -} - - -static void -delete_tag_command_real_execute_on_source (SimpleProxyableCommand* base, - DataSource* source) -{ - DeleteTagCommand * self; - Tag* tag = NULL; - Tag* _tmp0_; - GeeList* recursive_victims = NULL; - Tag* _tmp1_; - GeeList* _tmp2_; - GeeList* _tmp3_; - gint _tmp4_; - gint _tmp5_; - TagSourceCollection* _tmp28_; - TagSourceCollection* _tmp29_; - Marker* _tmp30_; - Marker* _tmp31_; -#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_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_CAST (source, TYPE_TAG, Tag)); -#line 1587 "/home/jens/Source/shotwell/src/Commands.vala" - tag = _tmp0_; -#line 1590 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp1_ = tag; -#line 1590 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp2_ = tag_get_hierarchical_children (_tmp1_); -#line 1590 "/home/jens/Source/shotwell/src/Commands.vala" - recursive_victims = _tmp2_; -#line 1591 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp3_ = recursive_victims; -#line 1591 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp4_ = gee_collection_get_size (G_TYPE_CHECK_INSTANCE_CAST (_tmp3_, GEE_TYPE_COLLECTION, GeeCollection)); -#line 1591 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp5_ = _tmp4_; -#line 1591 "/home/jens/Source/shotwell/src/Commands.vala" - if (_tmp5_ > 0) { -#line 14101 "Commands.c" - GeeArrayList* _tmp6_; -#line 1594 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp6_ = gee_array_list_new (TYPE_SOURCE_PROXY, (GBoxedCopyFunc) source_proxy_ref, (GDestroyNotify) source_proxy_unref, NULL, NULL, NULL); -#line 1594 "/home/jens/Source/shotwell/src/Commands.vala" - _g_object_unref0 (self->priv->recursive_victim_proxies); -#line 1594 "/home/jens/Source/shotwell/src/Commands.vala" - self->priv->recursive_victim_proxies = G_TYPE_CHECK_INSTANCE_CAST (_tmp6_, GEE_TYPE_LIST, GeeList); -#line 14109 "Commands.c" - { - GeeList* _victim_list = NULL; - GeeList* _tmp7_; - GeeList* _tmp8_; - gint _victim_size = 0; - GeeList* _tmp9_; - gint _tmp10_; - gint _tmp11_; - gint _victim_index = 0; -#line 1595 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp7_ = recursive_victims; -#line 1595 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp8_ = _g_object_ref0 (_tmp7_); -#line 1595 "/home/jens/Source/shotwell/src/Commands.vala" - _victim_list = _tmp8_; -#line 1595 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp9_ = _victim_list; -#line 1595 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp10_ = gee_collection_get_size (G_TYPE_CHECK_INSTANCE_CAST (_tmp9_, GEE_TYPE_COLLECTION, GeeCollection)); -#line 1595 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp11_ = _tmp10_; -#line 1595 "/home/jens/Source/shotwell/src/Commands.vala" - _victim_size = _tmp11_; -#line 1595 "/home/jens/Source/shotwell/src/Commands.vala" - _victim_index = -1; -#line 1595 "/home/jens/Source/shotwell/src/Commands.vala" - while (TRUE) { -#line 14137 "Commands.c" - gint _tmp12_; - gint _tmp13_; - gint _tmp14_; - Tag* victim = NULL; - GeeList* _tmp15_; - gint _tmp16_; - gpointer _tmp17_; - SourceProxy* proxy = NULL; - Tag* _tmp18_; - SourceProxy* _tmp19_; - SourceProxy* _tmp20_; - GeeList* _tmp21_; - SourceProxy* _tmp22_; - TagSourceCollection* _tmp23_; - TagSourceCollection* _tmp24_; - Tag* _tmp25_; - Marker* _tmp26_; - Marker* _tmp27_; -#line 1595 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp12_ = _victim_index; -#line 1595 "/home/jens/Source/shotwell/src/Commands.vala" - _victim_index = _tmp12_ + 1; -#line 1595 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp13_ = _victim_index; -#line 1595 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp14_ = _victim_size; -#line 1595 "/home/jens/Source/shotwell/src/Commands.vala" - if (!(_tmp13_ < _tmp14_)) { -#line 1595 "/home/jens/Source/shotwell/src/Commands.vala" - break; -#line 14168 "Commands.c" - } -#line 1595 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp15_ = _victim_list; -#line 1595 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp16_ = _victim_index; -#line 1595 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp17_ = gee_list_get (_tmp15_, _tmp16_); -#line 1595 "/home/jens/Source/shotwell/src/Commands.vala" - victim = (Tag*) _tmp17_; -#line 1596 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp18_ = victim; -#line 1596 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp19_ = proxyable_get_proxy (G_TYPE_CHECK_INSTANCE_CAST (_tmp18_, TYPE_PROXYABLE, Proxyable)); -#line 1596 "/home/jens/Source/shotwell/src/Commands.vala" - proxy = _tmp19_; -#line 1597 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp20_ = proxy; -#line 1597 "/home/jens/Source/shotwell/src/Commands.vala" - g_signal_connect_object (_tmp20_, "broken", (GCallback) _delete_tag_command_on_proxy_broken_source_proxy_broken, self, 0); -#line 1598 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp21_ = self->priv->recursive_victim_proxies; -#line 1598 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp22_ = proxy; -#line 1598 "/home/jens/Source/shotwell/src/Commands.vala" - gee_collection_add (G_TYPE_CHECK_INSTANCE_CAST (_tmp21_, GEE_TYPE_COLLECTION, GeeCollection), _tmp22_); -#line 1600 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp23_ = tag_global; -#line 1600 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp24_ = tag_global; -#line 1600 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp25_ = victim; -#line 1600 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp26_ = data_collection_mark (G_TYPE_CHECK_INSTANCE_CAST (_tmp24_, TYPE_DATA_COLLECTION, DataCollection), G_TYPE_CHECK_INSTANCE_CAST (_tmp25_, TYPE_DATA_OBJECT, DataObject)); -#line 1600 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp27_ = _tmp26_; -#line 1600 "/home/jens/Source/shotwell/src/Commands.vala" - source_collection_destroy_marked (G_TYPE_CHECK_INSTANCE_CAST (_tmp23_, TYPE_SOURCE_COLLECTION, SourceCollection), _tmp27_, FALSE, NULL, NULL, NULL); -#line 1600 "/home/jens/Source/shotwell/src/Commands.vala" - _g_object_unref0 (_tmp27_); -#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 14212 "Commands.c" - } -#line 1595 "/home/jens/Source/shotwell/src/Commands.vala" - _g_object_unref0 (_victim_list); -#line 14216 "Commands.c" - } - } -#line 1605 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp28_ = tag_global; -#line 1605 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp29_ = tag_global; -#line 1605 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp30_ = data_collection_mark (G_TYPE_CHECK_INSTANCE_CAST (_tmp29_, TYPE_DATA_COLLECTION, DataCollection), G_TYPE_CHECK_INSTANCE_CAST (source, TYPE_DATA_OBJECT, DataObject)); -#line 1605 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp31_ = _tmp30_; -#line 1605 "/home/jens/Source/shotwell/src/Commands.vala" - source_collection_destroy_marked (G_TYPE_CHECK_INSTANCE_CAST (_tmp28_, TYPE_SOURCE_COLLECTION, SourceCollection), _tmp31_, FALSE, NULL, NULL, NULL); -#line 1605 "/home/jens/Source/shotwell/src/Commands.vala" - _g_object_unref0 (_tmp31_); -#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 14235 "Commands.c" -} - - -static void -delete_tag_command_real_undo_on_source (SimpleProxyableCommand* base, - DataSource* source) -{ - DeleteTagCommand * self; - GeeList* _tmp0_; -#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" - _vala_assert (G_TYPE_CHECK_INSTANCE_TYPE (source, TYPE_TAG), "source is Tag"); -#line 1614 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp0_ = self->priv->recursive_victim_proxies; -#line 1614 "/home/jens/Source/shotwell/src/Commands.vala" - if (_tmp0_ != NULL) { -#line 14255 "Commands.c" - { - gint i = 0; - GeeList* _tmp1_; - gint _tmp2_; - gint _tmp3_; -#line 1615 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp1_ = self->priv->recursive_victim_proxies; -#line 1615 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp2_ = gee_collection_get_size (G_TYPE_CHECK_INSTANCE_CAST (_tmp1_, GEE_TYPE_COLLECTION, GeeCollection)); -#line 1615 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp3_ = _tmp2_; -#line 1615 "/home/jens/Source/shotwell/src/Commands.vala" - i = _tmp3_ - 1; -#line 14269 "Commands.c" - { - gboolean _tmp4_ = FALSE; -#line 1615 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp4_ = TRUE; -#line 1615 "/home/jens/Source/shotwell/src/Commands.vala" - while (TRUE) { -#line 14276 "Commands.c" - gint _tmp6_; - SourceProxy* proxy = NULL; - GeeList* _tmp7_; - gint _tmp8_; - gpointer _tmp9_; - DataSource* victim_source = NULL; - SourceProxy* _tmp10_; - DataSource* _tmp11_; - DataSource* _tmp12_; - SourceProxy* _tmp13_; - guint _tmp14_; -#line 1615 "/home/jens/Source/shotwell/src/Commands.vala" - if (!_tmp4_) { -#line 14290 "Commands.c" - gint _tmp5_; -#line 1615 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp5_ = i; -#line 1615 "/home/jens/Source/shotwell/src/Commands.vala" - i = _tmp5_ - 1; -#line 14296 "Commands.c" - } -#line 1615 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp4_ = FALSE; -#line 1615 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp6_ = i; -#line 1615 "/home/jens/Source/shotwell/src/Commands.vala" - if (!(_tmp6_ >= 0)) { -#line 1615 "/home/jens/Source/shotwell/src/Commands.vala" - break; -#line 14306 "Commands.c" - } -#line 1616 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp7_ = self->priv->recursive_victim_proxies; -#line 1616 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp8_ = i; -#line 1616 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp9_ = gee_list_get (_tmp7_, _tmp8_); -#line 1616 "/home/jens/Source/shotwell/src/Commands.vala" - proxy = (SourceProxy*) _tmp9_; -#line 1618 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp10_ = proxy; -#line 1618 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp11_ = source_proxy_get_source (_tmp10_); -#line 1618 "/home/jens/Source/shotwell/src/Commands.vala" - victim_source = _tmp11_; -#line 1619 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp12_ = victim_source; -#line 1619 "/home/jens/Source/shotwell/src/Commands.vala" - _vala_assert (G_TYPE_CHECK_INSTANCE_TYPE (_tmp12_, TYPE_TAG), "victim_source is Tag"); -#line 1621 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp13_ = proxy; -#line 1621 "/home/jens/Source/shotwell/src/Commands.vala" - g_signal_parse_name ("broken", TYPE_SOURCE_PROXY, &_tmp14_, NULL, FALSE); -#line 1621 "/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) _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 14336 "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 14344 "Commands.c" - } -} - - -static void -delete_tag_command_on_proxy_broken (DeleteTagCommand* self) -{ - CommandManager* _tmp0_; - CommandManager* _tmp1_; -#line 1628 "/home/jens/Source/shotwell/src/Commands.vala" - g_return_if_fail (IS_DELETE_TAG_COMMAND (self)); -#line 1629 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp0_ = command_get_command_manager (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_COMMAND, Command)); -#line 1629 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp1_ = _tmp0_; -#line 1629 "/home/jens/Source/shotwell/src/Commands.vala" - command_manager_reset (_tmp1_); -#line 1629 "/home/jens/Source/shotwell/src/Commands.vala" - _command_manager_unref0 (_tmp1_); -#line 14364 "Commands.c" -} - - -static void -delete_tag_command_class_init (DeleteTagCommandClass * klass) -{ -#line 1579 "/home/jens/Source/shotwell/src/Commands.vala" - delete_tag_command_parent_class = g_type_class_peek_parent (klass); -#line 1579 "/home/jens/Source/shotwell/src/Commands.vala" - g_type_class_add_private (klass, sizeof (DeleteTagCommandPrivate)); -#line 1579 "/home/jens/Source/shotwell/src/Commands.vala" - ((SimpleProxyableCommandClass *) klass)->execute_on_source = (void (*) (SimpleProxyableCommand *, DataSource*)) delete_tag_command_real_execute_on_source; -#line 1579 "/home/jens/Source/shotwell/src/Commands.vala" - ((SimpleProxyableCommandClass *) klass)->undo_on_source = (void (*) (SimpleProxyableCommand *, DataSource*)) delete_tag_command_real_undo_on_source; -#line 1579 "/home/jens/Source/shotwell/src/Commands.vala" - G_OBJECT_CLASS (klass)->finalize = delete_tag_command_finalize; -#line 14381 "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 14392 "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 14406 "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; - gchar* _tmp0_; - gchar* _tmp1_; -#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_ = data_object_get_name (G_TYPE_CHECK_INSTANCE_CAST (tag, TYPE_DATA_OBJECT, DataObject)); -#line 1637 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp1_ = _tmp0_; -#line 1637 "/home/jens/Source/shotwell/src/Commands.vala" - self = (NewChildTagCommand*) simple_proxyable_command_construct (object_type, G_TYPE_CHECK_INSTANCE_CAST (tag, TYPE_PROXYABLE, Proxyable), _ ("Create Tag"), _tmp1_); -#line 1637 "/home/jens/Source/shotwell/src/Commands.vala" - _g_free0 (_tmp1_); -#line 1636 "/home/jens/Source/shotwell/src/Commands.vala" - return self; -#line 14443 "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 14452 "Commands.c" -} - - -static void -new_child_tag_command_real_execute_on_source (SimpleProxyableCommand* base, - DataSource* source) -{ - NewChildTagCommand * self; - Tag* tag = NULL; - Tag* _tmp0_; - Tag* _tmp1_; -#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_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_CAST (source, TYPE_TAG, Tag)); -#line 1641 "/home/jens/Source/shotwell/src/Commands.vala" - tag = _tmp0_; -#line 1642 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp1_ = 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 = _tmp1_; -#line 1640 "/home/jens/Source/shotwell/src/Commands.vala" - _g_object_unref0 (tag); -#line 14480 "Commands.c" -} - - -static void -new_child_tag_command_real_undo_on_source (SimpleProxyableCommand* base, - DataSource* source) -{ - NewChildTagCommand * self; - TagSourceCollection* _tmp0_; - TagSourceCollection* _tmp1_; - Tag* _tmp2_; - Marker* _tmp3_; - Marker* _tmp4_; -#line 1645 "/home/jens/Source/shotwell/src/Commands.vala" - self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_NEW_CHILD_TAG_COMMAND, NewChildTagCommand); -#line 1645 "/home/jens/Source/shotwell/src/Commands.vala" - g_return_if_fail (IS_DATA_SOURCE (source)); -#line 1646 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp0_ = tag_global; -#line 1646 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp1_ = tag_global; -#line 1646 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp2_ = self->priv->created_child; -#line 1646 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp3_ = data_collection_mark (G_TYPE_CHECK_INSTANCE_CAST (_tmp1_, TYPE_DATA_COLLECTION, DataCollection), G_TYPE_CHECK_INSTANCE_CAST (_tmp2_, TYPE_DATA_OBJECT, DataObject)); -#line 1646 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp4_ = _tmp3_; -#line 1646 "/home/jens/Source/shotwell/src/Commands.vala" - source_collection_destroy_marked (G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, TYPE_SOURCE_COLLECTION, SourceCollection), _tmp4_, TRUE, NULL, NULL, NULL); -#line 1646 "/home/jens/Source/shotwell/src/Commands.vala" - _g_object_unref0 (_tmp4_); -#line 14512 "Commands.c" -} - - -Tag* -new_child_tag_command_get_created_child (NewChildTagCommand* self) -{ - Tag* result = NULL; - Tag* _tmp0_; - Tag* _tmp1_; - Tag* _tmp2_; -#line 1649 "/home/jens/Source/shotwell/src/Commands.vala" - g_return_val_if_fail (IS_NEW_CHILD_TAG_COMMAND (self), NULL); -#line 1650 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp0_ = self->priv->created_child; -#line 1650 "/home/jens/Source/shotwell/src/Commands.vala" - _vala_assert (_tmp0_ != NULL, "created_child != null"); -#line 1652 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp1_ = self->priv->created_child; -#line 1652 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp2_ = _g_object_ref0 (_tmp1_); -#line 1652 "/home/jens/Source/shotwell/src/Commands.vala" - result = _tmp2_; -#line 1652 "/home/jens/Source/shotwell/src/Commands.vala" - return result; -#line 14537 "Commands.c" -} - - -static void -new_child_tag_command_class_init (NewChildTagCommandClass * klass) -{ -#line 1633 "/home/jens/Source/shotwell/src/Commands.vala" - new_child_tag_command_parent_class = g_type_class_peek_parent (klass); -#line 1633 "/home/jens/Source/shotwell/src/Commands.vala" - g_type_class_add_private (klass, sizeof (NewChildTagCommandPrivate)); -#line 1633 "/home/jens/Source/shotwell/src/Commands.vala" - ((SimpleProxyableCommandClass *) klass)->execute_on_source = (void (*) (SimpleProxyableCommand *, DataSource*)) new_child_tag_command_real_execute_on_source; -#line 1633 "/home/jens/Source/shotwell/src/Commands.vala" - ((SimpleProxyableCommandClass *) klass)->undo_on_source = (void (*) (SimpleProxyableCommand *, DataSource*)) new_child_tag_command_real_undo_on_source; -#line 1633 "/home/jens/Source/shotwell/src/Commands.vala" - G_OBJECT_CLASS (klass)->finalize = new_child_tag_command_finalize; -#line 14554 "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 14565 "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 14579 "Commands.c" -} - - -GType -new_child_tag_command_get_type (void) -{ - static volatile gsize new_child_tag_command_type_id__volatile = 0; - if (g_once_init_enter (&new_child_tag_command_type_id__volatile)) { - static const GTypeInfo g_define_type_info = { sizeof (NewChildTagCommandClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) new_child_tag_command_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (NewChildTagCommand), 0, (GInstanceInitFunc) new_child_tag_command_instance_init, NULL }; - GType new_child_tag_command_type_id; - new_child_tag_command_type_id = g_type_register_static (TYPE_SIMPLE_PROXYABLE_COMMAND, "NewChildTagCommand", &g_define_type_info, 0); - g_once_init_leave (&new_child_tag_command_type_id__volatile, new_child_tag_command_type_id); - } - return new_child_tag_command_type_id__volatile; -} - - -NewRootTagCommand* -new_root_tag_command_construct (GType object_type) -{ - NewRootTagCommand * self = NULL; -#line 1660 "/home/jens/Source/shotwell/src/Commands.vala" - self = (NewRootTagCommand*) page_command_construct (object_type, _ ("Create Tag"), ""); -#line 1659 "/home/jens/Source/shotwell/src/Commands.vala" - return self; -#line 14605 "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 14614 "Commands.c" -} - - -static void -new_root_tag_command_real_execute (Command* base) -{ - NewRootTagCommand * self; - SourceProxy* _tmp0_; -#line 1663 "/home/jens/Source/shotwell/src/Commands.vala" - self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_NEW_ROOT_TAG_COMMAND, NewRootTagCommand); -#line 1664 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp0_ = self->priv->created_proxy; -#line 1664 "/home/jens/Source/shotwell/src/Commands.vala" - if (_tmp0_ == NULL) { -#line 14629 "Commands.c" - Tag* _tmp1_; - Tag* _tmp2_; - SourceProxy* _tmp3_; -#line 1665 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp1_ = tag_create_new_root (); -#line 1665 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp2_ = _tmp1_; -#line 1665 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp3_ = proxyable_get_proxy (G_TYPE_CHECK_INSTANCE_CAST (_tmp2_, TYPE_PROXYABLE, Proxyable)); -#line 1665 "/home/jens/Source/shotwell/src/Commands.vala" - _source_proxy_unref0 (self->priv->created_proxy); -#line 1665 "/home/jens/Source/shotwell/src/Commands.vala" - self->priv->created_proxy = _tmp3_; -#line 1665 "/home/jens/Source/shotwell/src/Commands.vala" - _g_object_unref0 (_tmp2_); -#line 14645 "Commands.c" - } else { - SourceProxy* _tmp4_; - DataSource* _tmp5_; - DataSource* _tmp6_; -#line 1667 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp4_ = self->priv->created_proxy; -#line 1667 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp5_ = source_proxy_get_source (_tmp4_); -#line 1667 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp6_ = _tmp5_; -#line 1667 "/home/jens/Source/shotwell/src/Commands.vala" - _g_object_unref0 (_tmp6_); -#line 14658 "Commands.c" - } -} - - -static void -new_root_tag_command_real_undo (Command* base) -{ - NewRootTagCommand * self; - TagSourceCollection* _tmp0_; - TagSourceCollection* _tmp1_; - SourceProxy* _tmp2_; - DataSource* _tmp3_; - DataSource* _tmp4_; - Marker* _tmp5_; - Marker* _tmp6_; -#line 1670 "/home/jens/Source/shotwell/src/Commands.vala" - self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_NEW_ROOT_TAG_COMMAND, NewRootTagCommand); -#line 1671 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp0_ = tag_global; -#line 1671 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp1_ = tag_global; -#line 1671 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp2_ = self->priv->created_proxy; -#line 1671 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp3_ = source_proxy_get_source (_tmp2_); -#line 1671 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp4_ = _tmp3_; -#line 1671 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp5_ = data_collection_mark (G_TYPE_CHECK_INSTANCE_CAST (_tmp1_, TYPE_DATA_COLLECTION, DataCollection), G_TYPE_CHECK_INSTANCE_CAST (_tmp4_, TYPE_DATA_OBJECT, DataObject)); -#line 1671 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp6_ = _tmp5_; -#line 1671 "/home/jens/Source/shotwell/src/Commands.vala" - source_collection_destroy_marked (G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, TYPE_SOURCE_COLLECTION, SourceCollection), _tmp6_, TRUE, NULL, NULL, NULL); -#line 1671 "/home/jens/Source/shotwell/src/Commands.vala" - _g_object_unref0 (_tmp6_); -#line 1671 "/home/jens/Source/shotwell/src/Commands.vala" - _g_object_unref0 (_tmp4_); -#line 14696 "Commands.c" -} - - -Tag* -new_root_tag_command_get_created_tag (NewRootTagCommand* self) -{ - Tag* result = NULL; - SourceProxy* _tmp0_; - DataSource* _tmp1_; -#line 1674 "/home/jens/Source/shotwell/src/Commands.vala" - g_return_val_if_fail (IS_NEW_ROOT_TAG_COMMAND (self), NULL); -#line 1675 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp0_ = self->priv->created_proxy; -#line 1675 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp1_ = source_proxy_get_source (_tmp0_); -#line 1675 "/home/jens/Source/shotwell/src/Commands.vala" - result = G_TYPE_CHECK_INSTANCE_CAST (_tmp1_, TYPE_TAG, Tag); -#line 1675 "/home/jens/Source/shotwell/src/Commands.vala" - return result; -#line 14716 "Commands.c" -} - - -static void -new_root_tag_command_class_init (NewRootTagCommandClass * klass) -{ -#line 1656 "/home/jens/Source/shotwell/src/Commands.vala" - new_root_tag_command_parent_class = g_type_class_peek_parent (klass); -#line 1656 "/home/jens/Source/shotwell/src/Commands.vala" - g_type_class_add_private (klass, sizeof (NewRootTagCommandPrivate)); -#line 1656 "/home/jens/Source/shotwell/src/Commands.vala" - ((CommandClass *) klass)->execute = (void (*) (Command *)) new_root_tag_command_real_execute; -#line 1656 "/home/jens/Source/shotwell/src/Commands.vala" - ((CommandClass *) klass)->undo = (void (*) (Command *)) new_root_tag_command_real_undo; -#line 1656 "/home/jens/Source/shotwell/src/Commands.vala" - G_OBJECT_CLASS (klass)->finalize = new_root_tag_command_finalize; -#line 14733 "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 14744 "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 14758 "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 14783 "Commands.c" -} - - -ReparentTagCommand* -reparent_tag_command_construct (GType object_type, - Tag* tag, - const gchar* new_parent_path) -{ - ReparentTagCommand * self = NULL; - gchar* _tmp0_; - gchar* _tmp1_; - gchar* _tmp2_; - gchar* _tmp3_; - gchar* _tmp4_; - gboolean has_children = FALSE; - GeeList* _tmp5_; - GeeList* _tmp6_; - gint _tmp7_; - gint _tmp8_; - gboolean _tmp9_; - gchar* basename = NULL; - gchar* _tmp10_; - gchar* new_to_path = NULL; - const gchar* _tmp28_; - gchar* _tmp29_; - const gchar* _tmp30_; - TagSourceCollection* _tmp33_; - const gchar* _tmp34_; - GeeHashSet* _tmp35_; - GeeCollection* _tmp36_; - GeeCollection* _tmp37_; - LibraryPhotoSourceCollection* _tmp38_; - VideoSourceCollection* _tmp39_; -#line 1694 "/home/jens/Source/shotwell/src/Commands.vala" - g_return_val_if_fail (IS_TAG (tag), NULL); -#line 1694 "/home/jens/Source/shotwell/src/Commands.vala" - g_return_val_if_fail (new_parent_path != NULL, NULL); -#line 1695 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp0_ = tag_get_user_visible_name (tag); -#line 1695 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp1_ = _tmp0_; -#line 1695 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp2_ = g_strdup_printf (_ ("Move Tag “%s”"), _tmp1_); -#line 1695 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp3_ = _tmp2_; -#line 1695 "/home/jens/Source/shotwell/src/Commands.vala" - self = (ReparentTagCommand*) page_command_construct (object_type, _tmp3_, ""); -#line 1695 "/home/jens/Source/shotwell/src/Commands.vala" - _g_free0 (_tmp3_); -#line 1695 "/home/jens/Source/shotwell/src/Commands.vala" - _g_free0 (_tmp1_); -#line 1697 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp4_ = tag_get_path (tag); -#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 = _tmp4_; -#line 1699 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp5_ = tag_get_hierarchical_children (tag); -#line 1699 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp6_ = _tmp5_; -#line 1699 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp7_ = gee_collection_get_size (G_TYPE_CHECK_INSTANCE_CAST (_tmp6_, GEE_TYPE_COLLECTION, GeeCollection)); -#line 1699 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp8_ = _tmp7_; -#line 1699 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp9_ = _tmp8_ > 0; -#line 1699 "/home/jens/Source/shotwell/src/Commands.vala" - _g_object_unref0 (_tmp6_); -#line 1699 "/home/jens/Source/shotwell/src/Commands.vala" - has_children = _tmp9_; -#line 1700 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp10_ = tag_get_user_visible_name (tag); -#line 1700 "/home/jens/Source/shotwell/src/Commands.vala" - basename = _tmp10_; -#line 1702 "/home/jens/Source/shotwell/src/Commands.vala" - if (g_strcmp0 (new_parent_path, TAG_PATH_SEPARATOR_STRING) == 0) { -#line 14861 "Commands.c" - gchar* _tmp11_ = NULL; - gboolean _tmp12_; - gchar* _tmp17_; -#line 1703 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp12_ = has_children; -#line 1703 "/home/jens/Source/shotwell/src/Commands.vala" - if (_tmp12_) { -#line 14869 "Commands.c" - const gchar* _tmp13_; - gchar* _tmp14_; -#line 1703 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp13_ = basename; -#line 1703 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp14_ = g_strconcat (TAG_PATH_SEPARATOR_STRING, _tmp13_, NULL); -#line 1703 "/home/jens/Source/shotwell/src/Commands.vala" - _g_free0 (_tmp11_); -#line 1703 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp11_ = _tmp14_; -#line 14880 "Commands.c" - } else { - const gchar* _tmp15_; - gchar* _tmp16_; -#line 1703 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp15_ = basename; -#line 1703 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp16_ = g_strdup (_tmp15_); -#line 1703 "/home/jens/Source/shotwell/src/Commands.vala" - _g_free0 (_tmp11_); -#line 1703 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp11_ = _tmp16_; -#line 14892 "Commands.c" - } -#line 1703 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp17_ = g_strdup (_tmp11_); -#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 = _tmp17_; -#line 1702 "/home/jens/Source/shotwell/src/Commands.vala" - _g_free0 (_tmp11_); -#line 14902 "Commands.c" - } else { -#line 1704 "/home/jens/Source/shotwell/src/Commands.vala" - if (g_str_has_prefix (new_parent_path, TAG_PATH_SEPARATOR_STRING)) { -#line 14906 "Commands.c" - gchar* _tmp18_; - gchar* _tmp19_; - const gchar* _tmp20_; - gchar* _tmp21_; -#line 1705 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp18_ = g_strconcat (new_parent_path, TAG_PATH_SEPARATOR_STRING, NULL); -#line 1705 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp19_ = _tmp18_; -#line 1705 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp20_ = basename; -#line 1705 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp21_ = g_strconcat (_tmp19_, _tmp20_, 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 = _tmp21_; -#line 1705 "/home/jens/Source/shotwell/src/Commands.vala" - _g_free0 (_tmp19_); -#line 14925 "Commands.c" - } else { - gchar* _tmp22_; - gchar* _tmp23_; - gchar* _tmp24_; - gchar* _tmp25_; - const gchar* _tmp26_; - gchar* _tmp27_; -#line 1707 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp22_ = g_strconcat (TAG_PATH_SEPARATOR_STRING, new_parent_path, NULL); -#line 1707 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp23_ = _tmp22_; -#line 1707 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp24_ = g_strconcat (_tmp23_, TAG_PATH_SEPARATOR_STRING, NULL); -#line 1707 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp25_ = _tmp24_; -#line 1707 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp26_ = basename; -#line 1707 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp27_ = g_strconcat (_tmp25_, _tmp26_, 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 = _tmp27_; -#line 1707 "/home/jens/Source/shotwell/src/Commands.vala" - _g_free0 (_tmp25_); -#line 1707 "/home/jens/Source/shotwell/src/Commands.vala" - _g_free0 (_tmp23_); -#line 14953 "Commands.c" - } - } -#line 1710 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp28_ = self->priv->to_path; -#line 1710 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp29_ = hierarchical_tag_utilities_get_root_path_form (_tmp28_); -#line 1710 "/home/jens/Source/shotwell/src/Commands.vala" - new_to_path = _tmp29_; -#line 1711 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp30_ = new_to_path; -#line 1711 "/home/jens/Source/shotwell/src/Commands.vala" - if (_tmp30_ != NULL) { -#line 14966 "Commands.c" - const gchar* _tmp31_; - gchar* _tmp32_; -#line 1712 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp31_ = new_to_path; -#line 1712 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp32_ = g_strdup (_tmp31_); -#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 = _tmp32_; -#line 14977 "Commands.c" - } -#line 1714 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp33_ = tag_global; -#line 1714 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp34_ = self->priv->to_path; -#line 1714 "/home/jens/Source/shotwell/src/Commands.vala" - if (tag_source_collection_exists (_tmp33_, _tmp34_, FALSE)) { -#line 1715 "/home/jens/Source/shotwell/src/Commands.vala" - self->priv->to_path_exists = TRUE; -#line 14987 "Commands.c" - } -#line 1717 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp35_ = self->priv->sources_in_play; -#line 1717 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp36_ = tag_get_sources (tag); -#line 1717 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp37_ = _tmp36_; -#line 1717 "/home/jens/Source/shotwell/src/Commands.vala" - gee_collection_add_all (G_TYPE_CHECK_INSTANCE_CAST (_tmp35_, GEE_TYPE_COLLECTION, GeeCollection), _tmp37_); -#line 1717 "/home/jens/Source/shotwell/src/Commands.vala" - _g_object_unref0 (_tmp37_); -#line 1719 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp38_ = library_photo_global; -#line 1719 "/home/jens/Source/shotwell/src/Commands.vala" - g_signal_connect_object (G_TYPE_CHECK_INSTANCE_CAST (_tmp38_, 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" - _tmp39_ = video_global; -#line 1720 "/home/jens/Source/shotwell/src/Commands.vala" - g_signal_connect_object (G_TYPE_CHECK_INSTANCE_CAST (_tmp39_, 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 15013 "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 15023 "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 15035 "Commands.c" - { - GeeIterator* _source_it = NULL; - GeeIterator* _tmp0_; -#line 1729 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp0_ = gee_iterable_iterator (G_TYPE_CHECK_INSTANCE_CAST (destroyed, GEE_TYPE_ITERABLE, GeeIterable)); -#line 1729 "/home/jens/Source/shotwell/src/Commands.vala" - _source_it = _tmp0_; -#line 1729 "/home/jens/Source/shotwell/src/Commands.vala" - while (TRUE) { -#line 15045 "Commands.c" - GeeIterator* _tmp1_; - DataSource* source = NULL; - GeeIterator* _tmp2_; - gpointer _tmp3_; - GeeHashSet* _tmp4_; - DataSource* _tmp5_; -#line 1729 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp1_ = _source_it; -#line 1729 "/home/jens/Source/shotwell/src/Commands.vala" - if (!gee_iterator_next (_tmp1_)) { -#line 1729 "/home/jens/Source/shotwell/src/Commands.vala" - break; -#line 15058 "Commands.c" - } -#line 1729 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp2_ = _source_it; -#line 1729 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp3_ = gee_iterator_get (_tmp2_); -#line 1729 "/home/jens/Source/shotwell/src/Commands.vala" - source = (DataSource*) _tmp3_; -#line 1730 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp4_ = self->priv->sources_in_play; -#line 1730 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp5_ = source; -#line 1730 "/home/jens/Source/shotwell/src/Commands.vala" - if (gee_abstract_collection_contains (G_TYPE_CHECK_INSTANCE_CAST (_tmp4_, GEE_TYPE_ABSTRACT_COLLECTION, GeeAbstractCollection), G_TYPE_CHECK_INSTANCE_CAST (_tmp5_, TYPE_MEDIA_SOURCE, MediaSource))) { -#line 15072 "Commands.c" - CommandManager* _tmp6_; - CommandManager* _tmp7_; -#line 1731 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp6_ = command_get_command_manager (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_COMMAND, Command)); -#line 1731 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp7_ = _tmp6_; -#line 1731 "/home/jens/Source/shotwell/src/Commands.vala" - command_manager_reset (_tmp7_); -#line 1731 "/home/jens/Source/shotwell/src/Commands.vala" - _command_manager_unref0 (_tmp7_); -#line 15083 "Commands.c" - } -#line 1729 "/home/jens/Source/shotwell/src/Commands.vala" - _g_object_unref0 (source); -#line 15087 "Commands.c" - } -#line 1729 "/home/jens/Source/shotwell/src/Commands.vala" - _g_object_unref0 (_source_it); -#line 15091 "Commands.c" - } -} - - -static gchar* -string_replace (const gchar* self, - const gchar* old, - const gchar* replacement) -{ - gchar* result = NULL; - gboolean _tmp0_ = FALSE; - gboolean _tmp1_ = FALSE; - GError * _inner_error_ = NULL; -#line 1421 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" - g_return_val_if_fail (self != NULL, NULL); -#line 1421 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" - g_return_val_if_fail (old != NULL, NULL); -#line 1421 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" - g_return_val_if_fail (replacement != NULL, NULL); -#line 1422 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" - if ((*((gchar*) self)) == '\0') { -#line 1422 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" - _tmp1_ = TRUE; -#line 15115 "Commands.c" - } else { -#line 1422 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" - _tmp1_ = (*((gchar*) old)) == '\0'; -#line 15119 "Commands.c" - } -#line 1422 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" - if (_tmp1_) { -#line 1422 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" - _tmp0_ = TRUE; -#line 15125 "Commands.c" - } else { -#line 1422 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" - _tmp0_ = g_strcmp0 (old, replacement) == 0; -#line 15129 "Commands.c" - } -#line 1422 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" - if (_tmp0_) { -#line 15133 "Commands.c" - gchar* _tmp2_; -#line 1423 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" - _tmp2_ = g_strdup (self); -#line 1423 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" - result = _tmp2_; -#line 1423 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" - return result; -#line 15141 "Commands.c" - } - { - GRegex* regex = NULL; - gchar* _tmp3_; - gchar* _tmp4_; - GRegex* _tmp5_; - GRegex* _tmp6_; - gchar* _tmp7_ = NULL; - GRegex* _tmp8_; - gchar* _tmp9_; - gchar* _tmp10_; -#line 1426 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" - _tmp3_ = g_regex_escape_string (old, -1); -#line 1426 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" - _tmp4_ = _tmp3_; -#line 1426 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" - _tmp5_ = g_regex_new (_tmp4_, 0, 0, &_inner_error_); -#line 1426 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" - _tmp6_ = _tmp5_; -#line 1426 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" - _g_free0 (_tmp4_); -#line 1426 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" - regex = _tmp6_; -#line 1426 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" - if (G_UNLIKELY (_inner_error_ != NULL)) { -#line 1426 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" - if (_inner_error_->domain == G_REGEX_ERROR) { -#line 15169 "Commands.c" - goto __catch469_g_regex_error; - } -#line 1426 "/usr/share/vala-0.40/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 1426 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" - g_clear_error (&_inner_error_); -#line 1426 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" - return NULL; -#line 15178 "Commands.c" - } -#line 1427 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" - _tmp8_ = regex; -#line 1427 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" - _tmp9_ = g_regex_replace_literal (_tmp8_, self, (gssize) -1, 0, replacement, 0, &_inner_error_); -#line 1427 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" - _tmp7_ = _tmp9_; -#line 1427 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" - if (G_UNLIKELY (_inner_error_ != NULL)) { -#line 1427 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" - _g_regex_unref0 (regex); -#line 1427 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" - if (_inner_error_->domain == G_REGEX_ERROR) { -#line 15192 "Commands.c" - goto __catch469_g_regex_error; - } -#line 1427 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" - _g_regex_unref0 (regex); -#line 1427 "/usr/share/vala-0.40/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 1427 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" - g_clear_error (&_inner_error_); -#line 1427 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" - return NULL; -#line 15203 "Commands.c" - } -#line 1427 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" - _tmp10_ = _tmp7_; -#line 1427 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" - _tmp7_ = NULL; -#line 1427 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" - result = _tmp10_; -#line 1427 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" - _g_free0 (_tmp7_); -#line 1427 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" - _g_regex_unref0 (regex); -#line 1427 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" - return result; -#line 15217 "Commands.c" - } - goto __finally469; - __catch469_g_regex_error: - { - GError* e = NULL; -#line 1425 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" - e = _inner_error_; -#line 1425 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" - _inner_error_ = NULL; -#line 1429 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" - g_assert_not_reached (); -#line 1425 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" - _g_error_free0 (e); -#line 15231 "Commands.c" - } - __finally469: -#line 1425 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" - if (G_UNLIKELY (_inner_error_ != NULL)) { -#line 1425 "/usr/share/vala-0.40/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 1425 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" - g_clear_error (&_inner_error_); -#line 1425 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" - return NULL; -#line 15242 "Commands.c" - } -} - - -static GeeMap* -reparent_tag_command_get_child_structure_at (ReparentTagCommand* self, - const gchar* client_path) -{ - GeeMap* result = NULL; - gchar* path = NULL; - gchar* _tmp0_; - const gchar* _tmp1_ = NULL; - const gchar* _tmp2_; - gchar* _tmp4_; - GeeMap* _result_ = NULL; - GeeHashMap* _tmp5_; - TagSourceCollection* _tmp6_; - const gchar* _tmp7_; - Tag* tag = NULL; - const gchar* _tmp8_; - Tag* _tmp9_; - gchar* path_prefix = NULL; - Tag* _tmp10_; - gchar* _tmp11_; - gchar* _tmp12_; - gchar* _tmp13_; - gchar* _tmp14_; -#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_ = hierarchical_tag_utilities_get_root_path_form (client_path); -#line 1736 "/home/jens/Source/shotwell/src/Commands.vala" - path = _tmp0_; -#line 1737 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp2_ = path; -#line 1737 "/home/jens/Source/shotwell/src/Commands.vala" - if (_tmp2_ != NULL) { -#line 15282 "Commands.c" - const gchar* _tmp3_; -#line 1737 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp3_ = path; -#line 1737 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp1_ = _tmp3_; -#line 15288 "Commands.c" - } else { -#line 1737 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp1_ = client_path; -#line 15292 "Commands.c" - } -#line 1737 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp4_ = g_strdup (_tmp1_); -#line 1737 "/home/jens/Source/shotwell/src/Commands.vala" - _g_free0 (path); -#line 1737 "/home/jens/Source/shotwell/src/Commands.vala" - path = _tmp4_; -#line 1739 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp5_ = gee_hash_map_new (G_TYPE_STRING, (GBoxedCopyFunc) g_strdup, (GDestroyNotify) g_free, GEE_TYPE_SET, (GBoxedCopyFunc) g_object_ref, (GDestroyNotify) g_object_unref, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL); -#line 1739 "/home/jens/Source/shotwell/src/Commands.vala" - _result_ = G_TYPE_CHECK_INSTANCE_CAST (_tmp5_, GEE_TYPE_MAP, GeeMap); -#line 1742 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp6_ = tag_global; -#line 1742 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp7_ = path; -#line 1742 "/home/jens/Source/shotwell/src/Commands.vala" - if (!tag_source_collection_exists (_tmp6_, _tmp7_, FALSE)) { -#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 15316 "Commands.c" - } -#line 1745 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp8_ = path; -#line 1745 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp9_ = tag_for_path (_tmp8_); -#line 1745 "/home/jens/Source/shotwell/src/Commands.vala" - tag = _tmp9_; -#line 1747 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp10_ = tag; -#line 1747 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp11_ = tag_get_path (_tmp10_); -#line 1747 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp12_ = _tmp11_; -#line 1747 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp13_ = g_strconcat (_tmp12_, TAG_PATH_SEPARATOR_STRING, NULL); -#line 1747 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp14_ = _tmp13_; -#line 1747 "/home/jens/Source/shotwell/src/Commands.vala" - _g_free0 (_tmp12_); -#line 1747 "/home/jens/Source/shotwell/src/Commands.vala" - path_prefix = _tmp14_; -#line 15338 "Commands.c" - { - GeeList* _t_list = NULL; - Tag* _tmp15_; - GeeList* _tmp16_; - gint _t_size = 0; - GeeList* _tmp17_; - gint _tmp18_; - gint _tmp19_; - gint _t_index = 0; -#line 1748 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp15_ = tag; -#line 1748 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp16_ = tag_get_hierarchical_children (_tmp15_); -#line 1748 "/home/jens/Source/shotwell/src/Commands.vala" - _t_list = _tmp16_; -#line 1748 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp17_ = _t_list; -#line 1748 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp18_ = gee_collection_get_size (G_TYPE_CHECK_INSTANCE_CAST (_tmp17_, GEE_TYPE_COLLECTION, GeeCollection)); -#line 1748 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp19_ = _tmp18_; -#line 1748 "/home/jens/Source/shotwell/src/Commands.vala" - _t_size = _tmp19_; -#line 1748 "/home/jens/Source/shotwell/src/Commands.vala" - _t_index = -1; -#line 1748 "/home/jens/Source/shotwell/src/Commands.vala" - while (TRUE) { -#line 15366 "Commands.c" - gint _tmp20_; - gint _tmp21_; - gint _tmp22_; - Tag* t = NULL; - GeeList* _tmp23_; - gint _tmp24_; - gpointer _tmp25_; - gchar* child_subpath = NULL; - Tag* _tmp26_; - gchar* _tmp27_; - gchar* _tmp28_; - const gchar* _tmp29_; - gchar* _tmp30_; - gchar* _tmp31_; - GeeMap* _tmp32_; - const gchar* _tmp33_; - GeeHashSet* _tmp34_; - GeeHashSet* _tmp35_; - GeeMap* _tmp36_; - const gchar* _tmp37_; - gpointer _tmp38_; - GeeSet* _tmp39_; - Tag* _tmp40_; - GeeCollection* _tmp41_; - GeeCollection* _tmp42_; -#line 1748 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp20_ = _t_index; -#line 1748 "/home/jens/Source/shotwell/src/Commands.vala" - _t_index = _tmp20_ + 1; -#line 1748 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp21_ = _t_index; -#line 1748 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp22_ = _t_size; -#line 1748 "/home/jens/Source/shotwell/src/Commands.vala" - if (!(_tmp21_ < _tmp22_)) { -#line 1748 "/home/jens/Source/shotwell/src/Commands.vala" - break; -#line 15404 "Commands.c" - } -#line 1748 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp23_ = _t_list; -#line 1748 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp24_ = _t_index; -#line 1748 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp25_ = gee_list_get (_tmp23_, _tmp24_); -#line 1748 "/home/jens/Source/shotwell/src/Commands.vala" - t = (Tag*) _tmp25_; -#line 1749 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp26_ = t; -#line 1749 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp27_ = tag_get_path (_tmp26_); -#line 1749 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp28_ = _tmp27_; -#line 1749 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp29_ = path_prefix; -#line 1749 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp30_ = string_replace (_tmp28_, _tmp29_, ""); -#line 1749 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp31_ = _tmp30_; -#line 1749 "/home/jens/Source/shotwell/src/Commands.vala" - _g_free0 (_tmp28_); -#line 1749 "/home/jens/Source/shotwell/src/Commands.vala" - child_subpath = _tmp31_; -#line 1751 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp32_ = _result_; -#line 1751 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp33_ = child_subpath; -#line 1751 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp34_ = gee_hash_set_new (TYPE_MEDIA_SOURCE, (GBoxedCopyFunc) g_object_ref, (GDestroyNotify) g_object_unref, NULL, NULL, NULL, NULL, NULL, NULL); -#line 1751 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp35_ = _tmp34_; -#line 1751 "/home/jens/Source/shotwell/src/Commands.vala" - gee_map_set (_tmp32_, _tmp33_, G_TYPE_CHECK_INSTANCE_CAST (_tmp35_, GEE_TYPE_SET, GeeSet)); -#line 1751 "/home/jens/Source/shotwell/src/Commands.vala" - _g_object_unref0 (_tmp35_); -#line 1752 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp36_ = _result_; -#line 1752 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp37_ = child_subpath; -#line 1752 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp38_ = gee_map_get (_tmp36_, _tmp37_); -#line 1752 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp39_ = (GeeSet*) _tmp38_; -#line 1752 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp40_ = t; -#line 1752 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp41_ = tag_get_sources (_tmp40_); -#line 1752 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp42_ = _tmp41_; -#line 1752 "/home/jens/Source/shotwell/src/Commands.vala" - gee_collection_add_all (G_TYPE_CHECK_INSTANCE_CAST (_tmp39_, GEE_TYPE_COLLECTION, GeeCollection), _tmp42_); -#line 1752 "/home/jens/Source/shotwell/src/Commands.vala" - _g_object_unref0 (_tmp42_); -#line 1752 "/home/jens/Source/shotwell/src/Commands.vala" - _g_object_unref0 (_tmp39_); -#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 15466 "Commands.c" - } -#line 1748 "/home/jens/Source/shotwell/src/Commands.vala" - _g_object_unref0 (_t_list); -#line 15470 "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 15482 "Commands.c" -} - - -static void -reparent_tag_command_restore_child_attachments_at (ReparentTagCommand* self, - const gchar* client_path, - GeeMap* child_structure) -{ - gchar* new_path = NULL; - gchar* _tmp0_; - const gchar* _tmp1_ = NULL; - const gchar* _tmp2_; - gchar* path = NULL; - gchar* _tmp4_; - TagSourceCollection* _tmp5_; - const gchar* _tmp6_; - Tag* tag = NULL; - const gchar* _tmp7_; - Tag* _tmp8_; -#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_ = hierarchical_tag_utilities_get_root_path_form (client_path); -#line 1761 "/home/jens/Source/shotwell/src/Commands.vala" - new_path = _tmp0_; -#line 1762 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp2_ = new_path; -#line 1762 "/home/jens/Source/shotwell/src/Commands.vala" - if (_tmp2_ != NULL) { -#line 15516 "Commands.c" - const gchar* _tmp3_; -#line 1762 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp3_ = new_path; -#line 1762 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp1_ = _tmp3_; -#line 15522 "Commands.c" - } else { -#line 1762 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp1_ = client_path; -#line 15526 "Commands.c" - } -#line 1762 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp4_ = g_strdup (_tmp1_); -#line 1762 "/home/jens/Source/shotwell/src/Commands.vala" - path = _tmp4_; -#line 1764 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp5_ = tag_global; -#line 1764 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp6_ = path; -#line 1764 "/home/jens/Source/shotwell/src/Commands.vala" - _vala_assert (tag_source_collection_exists (_tmp5_, _tmp6_, FALSE), "Tag.global.exists(path)"); -#line 1765 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp7_ = path; -#line 1765 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp8_ = tag_for_path (_tmp7_); -#line 1765 "/home/jens/Source/shotwell/src/Commands.vala" - tag = _tmp8_; -#line 15544 "Commands.c" - { - GeeIterator* _child_subpath_it = NULL; - GeeSet* _tmp9_; - GeeSet* _tmp10_; - GeeSet* _tmp11_; - GeeIterator* _tmp12_; - GeeIterator* _tmp13_; -#line 1767 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp9_ = gee_map_get_keys (child_structure); -#line 1767 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp10_ = _tmp9_; -#line 1767 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp11_ = _tmp10_; -#line 1767 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp12_ = gee_iterable_iterator (G_TYPE_CHECK_INSTANCE_CAST (_tmp11_, GEE_TYPE_ITERABLE, GeeIterable)); -#line 1767 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp13_ = _tmp12_; -#line 1767 "/home/jens/Source/shotwell/src/Commands.vala" - _g_object_unref0 (_tmp11_); -#line 1767 "/home/jens/Source/shotwell/src/Commands.vala" - _child_subpath_it = _tmp13_; -#line 1767 "/home/jens/Source/shotwell/src/Commands.vala" - while (TRUE) { -#line 15568 "Commands.c" - GeeIterator* _tmp14_; - gchar* child_subpath = NULL; - GeeIterator* _tmp15_; - gpointer _tmp16_; - gchar* child_path = NULL; - Tag* _tmp17_; - gchar* _tmp18_; - gchar* _tmp19_; - gchar* _tmp20_; - gchar* _tmp21_; - const gchar* _tmp22_; - gchar* _tmp23_; - gchar* _tmp24_; - Tag* _tmp25_; - gchar* _tmp26_; - gchar* _tmp27_; - gboolean _tmp28_; - TagSourceCollection* _tmp37_; - const gchar* _tmp38_; -#line 1767 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp14_ = _child_subpath_it; -#line 1767 "/home/jens/Source/shotwell/src/Commands.vala" - if (!gee_iterator_next (_tmp14_)) { -#line 1767 "/home/jens/Source/shotwell/src/Commands.vala" - break; -#line 15594 "Commands.c" - } -#line 1767 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp15_ = _child_subpath_it; -#line 1767 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp16_ = gee_iterator_get (_tmp15_); -#line 1767 "/home/jens/Source/shotwell/src/Commands.vala" - child_subpath = (gchar*) _tmp16_; -#line 1768 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp17_ = tag; -#line 1768 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp18_ = tag_get_path (_tmp17_); -#line 1768 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp19_ = _tmp18_; -#line 1768 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp20_ = g_strconcat (_tmp19_, TAG_PATH_SEPARATOR_STRING, NULL); -#line 1768 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp21_ = _tmp20_; -#line 1768 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp22_ = child_subpath; -#line 1768 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp23_ = g_strconcat (_tmp21_, _tmp22_, NULL); -#line 1768 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp24_ = _tmp23_; -#line 1768 "/home/jens/Source/shotwell/src/Commands.vala" - _g_free0 (_tmp21_); -#line 1768 "/home/jens/Source/shotwell/src/Commands.vala" - _g_free0 (_tmp19_); -#line 1768 "/home/jens/Source/shotwell/src/Commands.vala" - child_path = _tmp24_; -#line 1770 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp25_ = tag; -#line 1770 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp26_ = tag_get_path (_tmp25_); -#line 1770 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp27_ = _tmp26_; -#line 1770 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp28_ = !g_str_has_prefix (_tmp27_, TAG_PATH_SEPARATOR_STRING); -#line 1770 "/home/jens/Source/shotwell/src/Commands.vala" - _g_free0 (_tmp27_); -#line 1770 "/home/jens/Source/shotwell/src/Commands.vala" - if (_tmp28_) { -#line 15636 "Commands.c" - Tag* _tmp29_; - Tag* _tmp30_; - gchar* _tmp31_; - gchar* _tmp32_; - gchar* _tmp33_; - gchar* _tmp34_; - const gchar* _tmp35_; - gchar* _tmp36_; -#line 1771 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp29_ = tag; -#line 1771 "/home/jens/Source/shotwell/src/Commands.vala" - tag_promote (_tmp29_); -#line 1772 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp30_ = tag; -#line 1772 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp31_ = tag_get_path (_tmp30_); -#line 1772 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp32_ = _tmp31_; -#line 1772 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp33_ = g_strconcat (_tmp32_, TAG_PATH_SEPARATOR_STRING, NULL); -#line 1772 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp34_ = _tmp33_; -#line 1772 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp35_ = child_subpath; -#line 1772 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp36_ = g_strconcat (_tmp34_, _tmp35_, 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 = _tmp36_; -#line 1772 "/home/jens/Source/shotwell/src/Commands.vala" - _g_free0 (_tmp34_); -#line 1772 "/home/jens/Source/shotwell/src/Commands.vala" - _g_free0 (_tmp32_); -#line 15671 "Commands.c" - } -#line 1775 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp37_ = tag_global; -#line 1775 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp38_ = child_path; -#line 1775 "/home/jens/Source/shotwell/src/Commands.vala" - _vala_assert (tag_source_collection_exists (_tmp37_, _tmp38_, FALSE), "Tag.global.exists(child_path)"); -#line 15679 "Commands.c" - { - GeeIterator* _s_it = NULL; - const gchar* _tmp39_; - gpointer _tmp40_; - GeeSet* _tmp41_; - GeeIterator* _tmp42_; - GeeIterator* _tmp43_; -#line 1777 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp39_ = child_subpath; -#line 1777 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp40_ = gee_map_get (child_structure, _tmp39_); -#line 1777 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp41_ = (GeeSet*) _tmp40_; -#line 1777 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp42_ = gee_iterable_iterator (G_TYPE_CHECK_INSTANCE_CAST (_tmp41_, GEE_TYPE_ITERABLE, GeeIterable)); -#line 1777 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp43_ = _tmp42_; -#line 1777 "/home/jens/Source/shotwell/src/Commands.vala" - _g_object_unref0 (_tmp41_); -#line 1777 "/home/jens/Source/shotwell/src/Commands.vala" - _s_it = _tmp43_; -#line 1777 "/home/jens/Source/shotwell/src/Commands.vala" - while (TRUE) { -#line 15703 "Commands.c" - GeeIterator* _tmp44_; - MediaSource* s = NULL; - GeeIterator* _tmp45_; - gpointer _tmp46_; - const gchar* _tmp47_; - Tag* _tmp48_; - Tag* _tmp49_; - MediaSource* _tmp50_; -#line 1777 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp44_ = _s_it; -#line 1777 "/home/jens/Source/shotwell/src/Commands.vala" - if (!gee_iterator_next (_tmp44_)) { -#line 1777 "/home/jens/Source/shotwell/src/Commands.vala" - break; -#line 15718 "Commands.c" - } -#line 1777 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp45_ = _s_it; -#line 1777 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp46_ = gee_iterator_get (_tmp45_); -#line 1777 "/home/jens/Source/shotwell/src/Commands.vala" - s = (MediaSource*) _tmp46_; -#line 1778 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp47_ = child_path; -#line 1778 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp48_ = tag_for_path (_tmp47_); -#line 1778 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp49_ = _tmp48_; -#line 1778 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp50_ = s; -#line 1778 "/home/jens/Source/shotwell/src/Commands.vala" - tag_attach (_tmp49_, _tmp50_); -#line 1778 "/home/jens/Source/shotwell/src/Commands.vala" - _g_object_unref0 (_tmp49_); -#line 1777 "/home/jens/Source/shotwell/src/Commands.vala" - _g_object_unref0 (s); -#line 15740 "Commands.c" - } -#line 1777 "/home/jens/Source/shotwell/src/Commands.vala" - _g_object_unref0 (_s_it); -#line 15744 "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 15750 "Commands.c" - } -#line 1767 "/home/jens/Source/shotwell/src/Commands.vala" - _g_object_unref0 (_child_subpath_it); -#line 15754 "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 15762 "Commands.c" -} - - -static void -reparent_tag_command_reattach_in_play_sources_at (ReparentTagCommand* self, - const gchar* client_path) -{ - gchar* new_path = NULL; - gchar* _tmp0_; - const gchar* _tmp1_ = NULL; - const gchar* _tmp2_; - gchar* path = NULL; - gchar* _tmp4_; - TagSourceCollection* _tmp5_; - const gchar* _tmp6_; - Tag* tag = NULL; - const gchar* _tmp7_; - Tag* _tmp8_; -#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_ = hierarchical_tag_utilities_get_root_path_form (client_path); -#line 1783 "/home/jens/Source/shotwell/src/Commands.vala" - new_path = _tmp0_; -#line 1784 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp2_ = new_path; -#line 1784 "/home/jens/Source/shotwell/src/Commands.vala" - if (_tmp2_ != NULL) { -#line 15793 "Commands.c" - const gchar* _tmp3_; -#line 1784 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp3_ = new_path; -#line 1784 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp1_ = _tmp3_; -#line 15799 "Commands.c" - } else { -#line 1784 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp1_ = client_path; -#line 15803 "Commands.c" - } -#line 1784 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp4_ = g_strdup (_tmp1_); -#line 1784 "/home/jens/Source/shotwell/src/Commands.vala" - path = _tmp4_; -#line 1786 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp5_ = tag_global; -#line 1786 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp6_ = path; -#line 1786 "/home/jens/Source/shotwell/src/Commands.vala" - _vala_assert (tag_source_collection_exists (_tmp5_, _tmp6_, FALSE), "Tag.global.exists(path)"); -#line 1788 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp7_ = path; -#line 1788 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp8_ = tag_for_path (_tmp7_); -#line 1788 "/home/jens/Source/shotwell/src/Commands.vala" - tag = _tmp8_; -#line 15821 "Commands.c" - { - GeeIterator* _s_it = NULL; - GeeHashSet* _tmp9_; - GeeIterator* _tmp10_; -#line 1790 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp9_ = self->priv->sources_in_play; -#line 1790 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp10_ = gee_abstract_collection_iterator (G_TYPE_CHECK_INSTANCE_CAST (_tmp9_, GEE_TYPE_ABSTRACT_COLLECTION, GeeAbstractCollection)); -#line 1790 "/home/jens/Source/shotwell/src/Commands.vala" - _s_it = _tmp10_; -#line 1790 "/home/jens/Source/shotwell/src/Commands.vala" - while (TRUE) { -#line 15834 "Commands.c" - GeeIterator* _tmp11_; - MediaSource* s = NULL; - GeeIterator* _tmp12_; - gpointer _tmp13_; - Tag* _tmp14_; - MediaSource* _tmp15_; -#line 1790 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp11_ = _s_it; -#line 1790 "/home/jens/Source/shotwell/src/Commands.vala" - if (!gee_iterator_next (_tmp11_)) { -#line 1790 "/home/jens/Source/shotwell/src/Commands.vala" - break; -#line 15847 "Commands.c" - } -#line 1790 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp12_ = _s_it; -#line 1790 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp13_ = gee_iterator_get (_tmp12_); -#line 1790 "/home/jens/Source/shotwell/src/Commands.vala" - s = (MediaSource*) _tmp13_; -#line 1791 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp14_ = tag; -#line 1791 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp15_ = s; -#line 1791 "/home/jens/Source/shotwell/src/Commands.vala" - tag_attach (_tmp14_, _tmp15_); -#line 1790 "/home/jens/Source/shotwell/src/Commands.vala" - _g_object_unref0 (s); -#line 15863 "Commands.c" - } -#line 1790 "/home/jens/Source/shotwell/src/Commands.vala" - _g_object_unref0 (_s_it); -#line 15867 "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 15875 "Commands.c" -} - - -static void -reparent_tag_command_save_before_state (ReparentTagCommand* self) -{ - GeeList* _tmp0_; - GeeList* _tmp1_; - GeeArrayList* _tmp2_; - GeeArrayList* _tmp3_; - GeeMap* _tmp4_; - const gchar* _tmp5_; - GeeMap* _tmp6_; - TagSourceCollection* _tmp7_; - const gchar* _tmp8_; - Tag* from_tag = NULL; - const gchar* _tmp9_; - Tag* _tmp10_; - GeeList* _tmp11_; - Tag* _tmp12_; - SourceProxy* _tmp13_; - SourceProxy* _tmp14_; - GeeList* parent_paths = NULL; - const gchar* _tmp15_; - GeeList* _tmp16_; - GeeList* _tmp17_; - gint _tmp18_; - gint _tmp19_; - const gchar* _tmp25_; - const gchar* _tmp29_; - const gchar* _tmp41_; - const gchar* _tmp57_; - GeeList* from_children = NULL; - Tag* _tmp64_; - GeeList* _tmp65_; - const gchar* _tmp79_; - const gchar* _tmp98_; -#line 1794 "/home/jens/Source/shotwell/src/Commands.vala" - g_return_if_fail (IS_REPARENT_TAG_COMMAND (self)); -#line 1795 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp0_ = self->priv->src_before_state; -#line 1795 "/home/jens/Source/shotwell/src/Commands.vala" - _vala_assert (_tmp0_ == NULL, "src_before_state == null"); -#line 1796 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp1_ = self->priv->dest_before_state; -#line 1796 "/home/jens/Source/shotwell/src/Commands.vala" - _vala_assert (_tmp1_ == NULL, "dest_before_state == null"); -#line 1798 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp2_ = gee_array_list_new (TYPE_SOURCE_PROXY, (GBoxedCopyFunc) source_proxy_ref, (GDestroyNotify) source_proxy_unref, NULL, NULL, NULL); -#line 1798 "/home/jens/Source/shotwell/src/Commands.vala" - _g_object_unref0 (self->priv->src_before_state); -#line 1798 "/home/jens/Source/shotwell/src/Commands.vala" - self->priv->src_before_state = G_TYPE_CHECK_INSTANCE_CAST (_tmp2_, GEE_TYPE_LIST, GeeList); -#line 1799 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp3_ = gee_array_list_new (TYPE_SOURCE_PROXY, (GBoxedCopyFunc) source_proxy_ref, (GDestroyNotify) source_proxy_unref, NULL, NULL, NULL); -#line 1799 "/home/jens/Source/shotwell/src/Commands.vala" - _g_object_unref0 (self->priv->dest_before_state); -#line 1799 "/home/jens/Source/shotwell/src/Commands.vala" - self->priv->dest_before_state = G_TYPE_CHECK_INSTANCE_CAST (_tmp3_, GEE_TYPE_LIST, GeeList); -#line 1802 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp4_ = self->priv->in_play_child_structure; -#line 1802 "/home/jens/Source/shotwell/src/Commands.vala" - _vala_assert (_tmp4_ == NULL, "in_play_child_structure == null"); -#line 1803 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp5_ = self->priv->from_path; -#line 1803 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp6_ = reparent_tag_command_get_child_structure_at (self, _tmp5_); -#line 1803 "/home/jens/Source/shotwell/src/Commands.vala" - _g_object_unref0 (self->priv->in_play_child_structure); -#line 1803 "/home/jens/Source/shotwell/src/Commands.vala" - self->priv->in_play_child_structure = _tmp6_; -#line 1806 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp7_ = tag_global; -#line 1806 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp8_ = self->priv->from_path; -#line 1806 "/home/jens/Source/shotwell/src/Commands.vala" - _vala_assert (tag_source_collection_exists (_tmp7_, _tmp8_, FALSE), "Tag.global.exists(from_path)"); -#line 1807 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp9_ = self->priv->from_path; -#line 1807 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp10_ = tag_for_path (_tmp9_); -#line 1807 "/home/jens/Source/shotwell/src/Commands.vala" - from_tag = _tmp10_; -#line 1808 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp11_ = self->priv->src_before_state; -#line 1808 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp12_ = from_tag; -#line 1808 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp13_ = proxyable_get_proxy (G_TYPE_CHECK_INSTANCE_CAST (_tmp12_, TYPE_PROXYABLE, Proxyable)); -#line 1808 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp14_ = _tmp13_; -#line 1808 "/home/jens/Source/shotwell/src/Commands.vala" - gee_collection_add (G_TYPE_CHECK_INSTANCE_CAST (_tmp11_, GEE_TYPE_COLLECTION, GeeCollection), _tmp14_); -#line 1808 "/home/jens/Source/shotwell/src/Commands.vala" - _source_proxy_unref0 (_tmp14_); -#line 1811 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp15_ = self->priv->to_path; -#line 1811 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp16_ = hierarchical_tag_utilities_enumerate_parent_paths (_tmp15_); -#line 1811 "/home/jens/Source/shotwell/src/Commands.vala" - parent_paths = _tmp16_; -#line 1812 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp17_ = parent_paths; -#line 1812 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp18_ = gee_collection_get_size (G_TYPE_CHECK_INSTANCE_CAST (_tmp17_, GEE_TYPE_COLLECTION, GeeCollection)); -#line 1812 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp19_ = _tmp18_; -#line 1812 "/home/jens/Source/shotwell/src/Commands.vala" - if (_tmp19_ > 0) { -#line 15985 "Commands.c" - GeeList* _tmp20_; - GeeList* _tmp21_; - gint _tmp22_; - gint _tmp23_; - gpointer _tmp24_; -#line 1813 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp20_ = parent_paths; -#line 1813 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp21_ = parent_paths; -#line 1813 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp22_ = gee_collection_get_size (G_TYPE_CHECK_INSTANCE_CAST (_tmp21_, GEE_TYPE_COLLECTION, GeeCollection)); -#line 1813 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp23_ = _tmp22_; -#line 1813 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp24_ = gee_list_get (_tmp20_, _tmp23_ - 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*) _tmp24_; -#line 16005 "Commands.c" - } -#line 1814 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp25_ = self->priv->to_path_parent_path; -#line 1814 "/home/jens/Source/shotwell/src/Commands.vala" - if (_tmp25_ != NULL) { -#line 16011 "Commands.c" - GeeMap* _tmp26_; - const gchar* _tmp27_; - GeeMap* _tmp28_; -#line 1815 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp26_ = self->priv->existing_dest_child_structure; -#line 1815 "/home/jens/Source/shotwell/src/Commands.vala" - _vala_assert (_tmp26_ == NULL, "existing_dest_child_structure == null"); -#line 1816 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp27_ = self->priv->to_path_parent_path; -#line 1816 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp28_ = reparent_tag_command_get_child_structure_at (self, _tmp27_); -#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 = _tmp28_; -#line 16027 "Commands.c" - } -#line 1820 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp29_ = self->priv->to_path_parent_path; -#line 1820 "/home/jens/Source/shotwell/src/Commands.vala" - if (_tmp29_ == NULL) { -#line 16033 "Commands.c" - GeeMap* _tmp30_; - GeeSet* _tmp31_; - const gchar* _tmp32_; - GeeMap* _tmp33_; - GeeHashSet* _tmp34_; - GeeSet* _tmp35_; - const gchar* _tmp36_; - Tag* _tmp37_; - Tag* _tmp38_; - GeeCollection* _tmp39_; - GeeCollection* _tmp40_; -#line 1821 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp30_ = self->priv->existing_dest_child_structure; -#line 1821 "/home/jens/Source/shotwell/src/Commands.vala" - _vala_assert (_tmp30_ == NULL, "existing_dest_child_structure == null"); -#line 1822 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp31_ = self->priv->existing_dest_membership; -#line 1822 "/home/jens/Source/shotwell/src/Commands.vala" - _vala_assert (_tmp31_ == NULL, "existing_dest_membership == null"); -#line 1823 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp32_ = self->priv->to_path; -#line 1823 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp33_ = reparent_tag_command_get_child_structure_at (self, _tmp32_); -#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 = _tmp33_; -#line 1824 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp34_ = gee_hash_set_new (TYPE_MEDIA_SOURCE, (GBoxedCopyFunc) g_object_ref, (GDestroyNotify) g_object_unref, NULL, NULL, NULL, NULL, NULL, NULL); -#line 1824 "/home/jens/Source/shotwell/src/Commands.vala" - _g_object_unref0 (self->priv->existing_dest_membership); -#line 1824 "/home/jens/Source/shotwell/src/Commands.vala" - self->priv->existing_dest_membership = G_TYPE_CHECK_INSTANCE_CAST (_tmp34_, GEE_TYPE_SET, GeeSet); -#line 1825 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp35_ = self->priv->existing_dest_membership; -#line 1825 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp36_ = self->priv->to_path; -#line 1825 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp37_ = tag_for_path (_tmp36_); -#line 1825 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp38_ = _tmp37_; -#line 1825 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp39_ = tag_get_sources (_tmp38_); -#line 1825 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp40_ = _tmp39_; -#line 1825 "/home/jens/Source/shotwell/src/Commands.vala" - gee_collection_add_all (G_TYPE_CHECK_INSTANCE_CAST (_tmp35_, GEE_TYPE_COLLECTION, GeeCollection), _tmp40_); -#line 1825 "/home/jens/Source/shotwell/src/Commands.vala" - _g_object_unref0 (_tmp40_); -#line 1825 "/home/jens/Source/shotwell/src/Commands.vala" - _g_object_unref0 (_tmp38_); -#line 16085 "Commands.c" - } -#line 1829 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp41_ = self->priv->to_path_parent_path; -#line 1829 "/home/jens/Source/shotwell/src/Commands.vala" - if (_tmp41_ != NULL) { -#line 16091 "Commands.c" - gchar* new_tpp = NULL; - const gchar* _tmp42_; - gchar* _tmp43_; - const gchar* _tmp44_ = NULL; - const gchar* _tmp45_; - gchar* _tmp48_; - TagSourceCollection* _tmp49_; - const gchar* _tmp50_; - GeeList* _tmp51_; - const gchar* _tmp52_; - Tag* _tmp53_; - Tag* _tmp54_; - SourceProxy* _tmp55_; - SourceProxy* _tmp56_; -#line 1830 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp42_ = self->priv->to_path_parent_path; -#line 1830 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp43_ = hierarchical_tag_utilities_get_root_path_form (_tmp42_); -#line 1830 "/home/jens/Source/shotwell/src/Commands.vala" - new_tpp = _tmp43_; -#line 1831 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp45_ = new_tpp; -#line 1831 "/home/jens/Source/shotwell/src/Commands.vala" - if (_tmp45_ != NULL) { -#line 16116 "Commands.c" - const gchar* _tmp46_; -#line 1831 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp46_ = new_tpp; -#line 1831 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp44_ = _tmp46_; -#line 16122 "Commands.c" - } else { - const gchar* _tmp47_; -#line 1831 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp47_ = self->priv->to_path_parent_path; -#line 1831 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp44_ = _tmp47_; -#line 16129 "Commands.c" - } -#line 1831 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp48_ = g_strdup (_tmp44_); -#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 = _tmp48_; -#line 1832 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp49_ = tag_global; -#line 1832 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp50_ = self->priv->to_path_parent_path; -#line 1832 "/home/jens/Source/shotwell/src/Commands.vala" - _vala_assert (tag_source_collection_exists (_tmp49_, _tmp50_, FALSE), "Tag.global.exists(to_path_parent_path)"); -#line 1833 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp51_ = self->priv->dest_before_state; -#line 1833 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp52_ = self->priv->to_path_parent_path; -#line 1833 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp53_ = tag_for_path (_tmp52_); -#line 1833 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp54_ = _tmp53_; -#line 1833 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp55_ = proxyable_get_proxy (G_TYPE_CHECK_INSTANCE_CAST (_tmp54_, TYPE_PROXYABLE, Proxyable)); -#line 1833 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp56_ = _tmp55_; -#line 1833 "/home/jens/Source/shotwell/src/Commands.vala" - gee_collection_add (G_TYPE_CHECK_INSTANCE_CAST (_tmp51_, GEE_TYPE_COLLECTION, GeeCollection), _tmp56_); -#line 1833 "/home/jens/Source/shotwell/src/Commands.vala" - _source_proxy_unref0 (_tmp56_); -#line 1833 "/home/jens/Source/shotwell/src/Commands.vala" - _g_object_unref0 (_tmp54_); -#line 1829 "/home/jens/Source/shotwell/src/Commands.vala" - _g_free0 (new_tpp); -#line 16163 "Commands.c" - } -#line 1837 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp57_ = self->priv->to_path_parent_path; -#line 1837 "/home/jens/Source/shotwell/src/Commands.vala" - if (_tmp57_ == NULL) { -#line 16169 "Commands.c" - GeeList* _tmp58_; - const gchar* _tmp59_; - Tag* _tmp60_; - Tag* _tmp61_; - SourceProxy* _tmp62_; - SourceProxy* _tmp63_; -#line 1838 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp58_ = self->priv->dest_before_state; -#line 1838 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp59_ = self->priv->to_path; -#line 1838 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp60_ = tag_for_path (_tmp59_); -#line 1838 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp61_ = _tmp60_; -#line 1838 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp62_ = proxyable_get_proxy (G_TYPE_CHECK_INSTANCE_CAST (_tmp61_, TYPE_PROXYABLE, Proxyable)); -#line 1838 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp63_ = _tmp62_; -#line 1838 "/home/jens/Source/shotwell/src/Commands.vala" - gee_collection_add (G_TYPE_CHECK_INSTANCE_CAST (_tmp58_, GEE_TYPE_COLLECTION, GeeCollection), _tmp63_); -#line 1838 "/home/jens/Source/shotwell/src/Commands.vala" - _source_proxy_unref0 (_tmp63_); -#line 1838 "/home/jens/Source/shotwell/src/Commands.vala" - _g_object_unref0 (_tmp61_); -#line 16194 "Commands.c" - } -#line 1842 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp64_ = from_tag; -#line 1842 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp65_ = tag_get_hierarchical_children (_tmp64_); -#line 1842 "/home/jens/Source/shotwell/src/Commands.vala" - from_children = _tmp65_; -#line 16202 "Commands.c" - { - gint i = 0; - GeeList* _tmp66_; - gint _tmp67_; - gint _tmp68_; -#line 1843 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp66_ = from_children; -#line 1843 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp67_ = gee_collection_get_size (G_TYPE_CHECK_INSTANCE_CAST (_tmp66_, GEE_TYPE_COLLECTION, GeeCollection)); -#line 1843 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp68_ = _tmp67_; -#line 1843 "/home/jens/Source/shotwell/src/Commands.vala" - i = _tmp68_ - 1; -#line 16216 "Commands.c" - { - gboolean _tmp69_ = FALSE; -#line 1843 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp69_ = TRUE; -#line 1843 "/home/jens/Source/shotwell/src/Commands.vala" - while (TRUE) { -#line 16223 "Commands.c" - gint _tmp71_; - GeeList* _tmp72_; - GeeList* _tmp73_; - gint _tmp74_; - gpointer _tmp75_; - Tag* _tmp76_; - SourceProxy* _tmp77_; - SourceProxy* _tmp78_; -#line 1843 "/home/jens/Source/shotwell/src/Commands.vala" - if (!_tmp69_) { -#line 16234 "Commands.c" - gint _tmp70_; -#line 1843 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp70_ = i; -#line 1843 "/home/jens/Source/shotwell/src/Commands.vala" - i = _tmp70_ - 1; -#line 16240 "Commands.c" - } -#line 1843 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp69_ = FALSE; -#line 1843 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp71_ = i; -#line 1843 "/home/jens/Source/shotwell/src/Commands.vala" - if (!(_tmp71_ >= 0)) { -#line 1843 "/home/jens/Source/shotwell/src/Commands.vala" - break; -#line 16250 "Commands.c" - } -#line 1844 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp72_ = self->priv->src_before_state; -#line 1844 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp73_ = from_children; -#line 1844 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp74_ = i; -#line 1844 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp75_ = gee_list_get (_tmp73_, _tmp74_); -#line 1844 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp76_ = (Tag*) _tmp75_; -#line 1844 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp77_ = proxyable_get_proxy (G_TYPE_CHECK_INSTANCE_CAST (_tmp76_, TYPE_PROXYABLE, Proxyable)); -#line 1844 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp78_ = _tmp77_; -#line 1844 "/home/jens/Source/shotwell/src/Commands.vala" - gee_collection_add (G_TYPE_CHECK_INSTANCE_CAST (_tmp72_, GEE_TYPE_COLLECTION, GeeCollection), _tmp78_); -#line 1844 "/home/jens/Source/shotwell/src/Commands.vala" - _source_proxy_unref0 (_tmp78_); -#line 1844 "/home/jens/Source/shotwell/src/Commands.vala" - _g_object_unref0 (_tmp76_); -#line 16272 "Commands.c" - } - } - } -#line 1848 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp79_ = self->priv->to_path_parent_path; -#line 1848 "/home/jens/Source/shotwell/src/Commands.vala" - if (_tmp79_ != NULL) { -#line 16280 "Commands.c" - GeeList* to_children = NULL; - const gchar* _tmp80_; - Tag* _tmp81_; - Tag* _tmp82_; - GeeList* _tmp83_; - GeeList* _tmp84_; -#line 1849 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp80_ = self->priv->to_path_parent_path; -#line 1849 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp81_ = tag_for_path (_tmp80_); -#line 1849 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp82_ = _tmp81_; -#line 1849 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp83_ = tag_get_hierarchical_children (_tmp82_); -#line 1849 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp84_ = _tmp83_; -#line 1849 "/home/jens/Source/shotwell/src/Commands.vala" - _g_object_unref0 (_tmp82_); -#line 1849 "/home/jens/Source/shotwell/src/Commands.vala" - to_children = _tmp84_; -#line 16301 "Commands.c" - { - gint i = 0; - GeeList* _tmp85_; - gint _tmp86_; - gint _tmp87_; -#line 1850 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp85_ = to_children; -#line 1850 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp86_ = gee_collection_get_size (G_TYPE_CHECK_INSTANCE_CAST (_tmp85_, GEE_TYPE_COLLECTION, GeeCollection)); -#line 1850 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp87_ = _tmp86_; -#line 1850 "/home/jens/Source/shotwell/src/Commands.vala" - i = _tmp87_ - 1; -#line 16315 "Commands.c" - { - gboolean _tmp88_ = FALSE; -#line 1850 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp88_ = TRUE; -#line 1850 "/home/jens/Source/shotwell/src/Commands.vala" - while (TRUE) { -#line 16322 "Commands.c" - gint _tmp90_; - GeeList* _tmp91_; - GeeList* _tmp92_; - gint _tmp93_; - gpointer _tmp94_; - Tag* _tmp95_; - SourceProxy* _tmp96_; - SourceProxy* _tmp97_; -#line 1850 "/home/jens/Source/shotwell/src/Commands.vala" - if (!_tmp88_) { -#line 16333 "Commands.c" - gint _tmp89_; -#line 1850 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp89_ = i; -#line 1850 "/home/jens/Source/shotwell/src/Commands.vala" - i = _tmp89_ - 1; -#line 16339 "Commands.c" - } -#line 1850 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp88_ = FALSE; -#line 1850 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp90_ = i; -#line 1850 "/home/jens/Source/shotwell/src/Commands.vala" - if (!(_tmp90_ >= 0)) { -#line 1850 "/home/jens/Source/shotwell/src/Commands.vala" - break; -#line 16349 "Commands.c" - } -#line 1851 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp91_ = self->priv->dest_before_state; -#line 1851 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp92_ = to_children; -#line 1851 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp93_ = i; -#line 1851 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp94_ = gee_list_get (_tmp92_, _tmp93_); -#line 1851 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp95_ = (Tag*) _tmp94_; -#line 1851 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp96_ = proxyable_get_proxy (G_TYPE_CHECK_INSTANCE_CAST (_tmp95_, TYPE_PROXYABLE, Proxyable)); -#line 1851 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp97_ = _tmp96_; -#line 1851 "/home/jens/Source/shotwell/src/Commands.vala" - gee_collection_add (G_TYPE_CHECK_INSTANCE_CAST (_tmp91_, GEE_TYPE_COLLECTION, GeeCollection), _tmp97_); -#line 1851 "/home/jens/Source/shotwell/src/Commands.vala" - _source_proxy_unref0 (_tmp97_); -#line 1851 "/home/jens/Source/shotwell/src/Commands.vala" - _g_object_unref0 (_tmp95_); -#line 16371 "Commands.c" - } - } - } -#line 1848 "/home/jens/Source/shotwell/src/Commands.vala" - _g_object_unref0 (to_children); -#line 16377 "Commands.c" - } -#line 1856 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp98_ = self->priv->to_path_parent_path; -#line 1856 "/home/jens/Source/shotwell/src/Commands.vala" - if (_tmp98_ == NULL) { -#line 16383 "Commands.c" - GeeList* to_children = NULL; - const gchar* _tmp99_; - Tag* _tmp100_; - Tag* _tmp101_; - GeeList* _tmp102_; - GeeList* _tmp103_; -#line 1857 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp99_ = self->priv->to_path; -#line 1857 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp100_ = tag_for_path (_tmp99_); -#line 1857 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp101_ = _tmp100_; -#line 1857 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp102_ = tag_get_hierarchical_children (_tmp101_); -#line 1857 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp103_ = _tmp102_; -#line 1857 "/home/jens/Source/shotwell/src/Commands.vala" - _g_object_unref0 (_tmp101_); -#line 1857 "/home/jens/Source/shotwell/src/Commands.vala" - to_children = _tmp103_; -#line 16404 "Commands.c" - { - gint i = 0; - GeeList* _tmp104_; - gint _tmp105_; - gint _tmp106_; -#line 1858 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp104_ = to_children; -#line 1858 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp105_ = gee_collection_get_size (G_TYPE_CHECK_INSTANCE_CAST (_tmp104_, GEE_TYPE_COLLECTION, GeeCollection)); -#line 1858 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp106_ = _tmp105_; -#line 1858 "/home/jens/Source/shotwell/src/Commands.vala" - i = _tmp106_ - 1; -#line 16418 "Commands.c" - { - gboolean _tmp107_ = FALSE; -#line 1858 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp107_ = TRUE; -#line 1858 "/home/jens/Source/shotwell/src/Commands.vala" - while (TRUE) { -#line 16425 "Commands.c" - gint _tmp109_; - GeeList* _tmp110_; - GeeList* _tmp111_; - gint _tmp112_; - gpointer _tmp113_; - Tag* _tmp114_; - SourceProxy* _tmp115_; - SourceProxy* _tmp116_; -#line 1858 "/home/jens/Source/shotwell/src/Commands.vala" - if (!_tmp107_) { -#line 16436 "Commands.c" - gint _tmp108_; -#line 1858 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp108_ = i; -#line 1858 "/home/jens/Source/shotwell/src/Commands.vala" - i = _tmp108_ - 1; -#line 16442 "Commands.c" - } -#line 1858 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp107_ = FALSE; -#line 1858 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp109_ = i; -#line 1858 "/home/jens/Source/shotwell/src/Commands.vala" - if (!(_tmp109_ >= 0)) { -#line 1858 "/home/jens/Source/shotwell/src/Commands.vala" - break; -#line 16452 "Commands.c" - } -#line 1859 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp110_ = self->priv->dest_before_state; -#line 1859 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp111_ = to_children; -#line 1859 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp112_ = i; -#line 1859 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp113_ = gee_list_get (_tmp111_, _tmp112_); -#line 1859 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp114_ = (Tag*) _tmp113_; -#line 1859 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp115_ = proxyable_get_proxy (G_TYPE_CHECK_INSTANCE_CAST (_tmp114_, TYPE_PROXYABLE, Proxyable)); -#line 1859 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp116_ = _tmp115_; -#line 1859 "/home/jens/Source/shotwell/src/Commands.vala" - gee_collection_add (G_TYPE_CHECK_INSTANCE_CAST (_tmp110_, GEE_TYPE_COLLECTION, GeeCollection), _tmp116_); -#line 1859 "/home/jens/Source/shotwell/src/Commands.vala" - _source_proxy_unref0 (_tmp116_); -#line 1859 "/home/jens/Source/shotwell/src/Commands.vala" - _g_object_unref0 (_tmp114_); -#line 16474 "Commands.c" - } - } - } -#line 1856 "/home/jens/Source/shotwell/src/Commands.vala" - _g_object_unref0 (to_children); -#line 16480 "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 16488 "Commands.c" -} - - -static glong -string_strnlen (gchar* str, - glong maxlen) -{ - glong result = 0L; - gchar* end = NULL; - gchar* _tmp0_; - gchar* _tmp1_; -#line 1336 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" - _tmp0_ = memchr (str, 0, (gsize) maxlen); -#line 1336 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" - end = _tmp0_; -#line 1337 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" - _tmp1_ = end; -#line 1337 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" - if (_tmp1_ == NULL) { -#line 1338 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" - result = maxlen; -#line 1338 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" - return result; -#line 16512 "Commands.c" - } else { - gchar* _tmp2_; -#line 1340 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" - _tmp2_ = end; -#line 1340 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" - result = (glong) (_tmp2_ - str); -#line 1340 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" - return result; -#line 16521 "Commands.c" - } -} - - -static gchar* -string_substring (const gchar* self, - glong offset, - glong len) -{ - gchar* result = NULL; - glong string_length = 0L; - gboolean _tmp0_ = FALSE; - glong _tmp6_; - gchar* _tmp7_; -#line 1347 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" - g_return_val_if_fail (self != NULL, NULL); -#line 1349 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" - if (offset >= ((glong) 0)) { -#line 1349 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" - _tmp0_ = len >= ((glong) 0); -#line 16542 "Commands.c" - } else { -#line 1349 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" - _tmp0_ = FALSE; -#line 16546 "Commands.c" - } -#line 1349 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" - if (_tmp0_) { -#line 1351 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" - string_length = string_strnlen ((gchar*) self, offset + len); -#line 16552 "Commands.c" - } else { - gint _tmp1_; - gint _tmp2_; -#line 1353 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" - _tmp1_ = strlen (self); -#line 1353 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" - _tmp2_ = _tmp1_; -#line 1353 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" - string_length = (glong) _tmp2_; -#line 16562 "Commands.c" - } -#line 1356 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" - if (offset < ((glong) 0)) { -#line 16566 "Commands.c" - glong _tmp3_; -#line 1357 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" - _tmp3_ = string_length; -#line 1357 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" - offset = _tmp3_ + offset; -#line 1358 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" - g_return_val_if_fail (offset >= ((glong) 0), NULL); -#line 16574 "Commands.c" - } else { - glong _tmp4_; -#line 1360 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" - _tmp4_ = string_length; -#line 1360 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" - g_return_val_if_fail (offset <= _tmp4_, NULL); -#line 16581 "Commands.c" - } -#line 1362 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" - if (len < ((glong) 0)) { -#line 16585 "Commands.c" - glong _tmp5_; -#line 1363 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" - _tmp5_ = string_length; -#line 1363 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" - len = _tmp5_ - offset; -#line 16591 "Commands.c" - } -#line 1365 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" - _tmp6_ = string_length; -#line 1365 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" - g_return_val_if_fail ((offset + len) <= _tmp6_, NULL); -#line 1366 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" - _tmp7_ = g_strndup (((gchar*) self) + offset, (gsize) len); -#line 1366 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" - result = _tmp7_; -#line 1366 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" - return result; -#line 16603 "Commands.c" -} - - -static void -reparent_tag_command_restore_before_state (ReparentTagCommand* self) -{ - GeeList* _tmp0_; - GeeMap* _tmp1_; - const gchar* _tmp2_; - const gchar* _tmp10_ = NULL; - const gchar* _tmp11_; - gchar* unwind_target = NULL; - gchar* _tmp14_; - const gchar* _tmp89_; -#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 16632 "Commands.c" - gchar* new_tpp = NULL; - const gchar* _tmp3_; - gchar* _tmp4_; - const gchar* _tmp5_ = NULL; - const gchar* _tmp6_; - gchar* _tmp9_; -#line 1869 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp3_ = self->priv->to_path_parent_path; -#line 1869 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp4_ = hierarchical_tag_utilities_get_root_path_form (_tmp3_); -#line 1869 "/home/jens/Source/shotwell/src/Commands.vala" - new_tpp = _tmp4_; -#line 1870 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp6_ = new_tpp; -#line 1870 "/home/jens/Source/shotwell/src/Commands.vala" - if (_tmp6_ != NULL) { -#line 16649 "Commands.c" - const gchar* _tmp7_; -#line 1870 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp7_ = new_tpp; -#line 1870 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp5_ = _tmp7_; -#line 16655 "Commands.c" - } else { - const gchar* _tmp8_; -#line 1870 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp8_ = self->priv->to_path_parent_path; -#line 1870 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp5_ = _tmp8_; -#line 16662 "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 16672 "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 16678 "Commands.c" - const gchar* _tmp12_; -#line 1873 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp12_ = self->priv->to_path_parent_path; -#line 1873 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp10_ = _tmp12_; -#line 16684 "Commands.c" - } else { - const gchar* _tmp13_; -#line 1873 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp13_ = self->priv->to_path; -#line 1873 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp10_ = _tmp13_; -#line 16691 "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 16697 "Commands.c" - { - GeeList* _t_list = NULL; - const gchar* _tmp15_; - Tag* _tmp16_; - Tag* _tmp17_; - GeeList* _tmp18_; - GeeList* _tmp19_; - gint _t_size = 0; - GeeList* _tmp20_; - gint _tmp21_; - gint _tmp22_; - gint _t_index = 0; -#line 1874 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp15_ = unwind_target; -#line 1874 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp16_ = tag_for_path (_tmp15_); -#line 1874 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp17_ = _tmp16_; -#line 1874 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp18_ = tag_get_hierarchical_children (_tmp17_); -#line 1874 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp19_ = _tmp18_; -#line 1874 "/home/jens/Source/shotwell/src/Commands.vala" - _g_object_unref0 (_tmp17_); -#line 1874 "/home/jens/Source/shotwell/src/Commands.vala" - _t_list = _tmp19_; -#line 1874 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp20_ = _t_list; -#line 1874 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp21_ = gee_collection_get_size (G_TYPE_CHECK_INSTANCE_CAST (_tmp20_, GEE_TYPE_COLLECTION, GeeCollection)); -#line 1874 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp22_ = _tmp21_; -#line 1874 "/home/jens/Source/shotwell/src/Commands.vala" - _t_size = _tmp22_; -#line 1874 "/home/jens/Source/shotwell/src/Commands.vala" - _t_index = -1; -#line 1874 "/home/jens/Source/shotwell/src/Commands.vala" - while (TRUE) { -#line 16736 "Commands.c" - gint _tmp23_; - gint _tmp24_; - gint _tmp25_; - Tag* t = NULL; - GeeList* _tmp26_; - gint _tmp27_; - gpointer _tmp28_; - gchar* child_subpath = NULL; - Tag* _tmp29_; - gchar* _tmp30_; - gchar* _tmp31_; - const gchar* _tmp32_; - gchar* _tmp33_; - gchar* _tmp34_; - const gchar* _tmp35_; - GeeMap* _tmp38_; - const gchar* _tmp39_; -#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 16766 "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" - if (g_str_has_prefix (_tmp35_, TAG_PATH_SEPARATOR_STRING)) { -#line 16796 "Commands.c" - const gchar* _tmp36_; - gchar* _tmp37_; -#line 1877 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp36_ = child_subpath; -#line 1877 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp37_ = string_substring (_tmp36_, (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 = _tmp37_; -#line 16807 "Commands.c" - } -#line 1879 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp38_ = self->priv->existing_dest_child_structure; -#line 1879 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp39_ = child_subpath; -#line 1879 "/home/jens/Source/shotwell/src/Commands.vala" - if (!gee_map_has_key (_tmp38_, _tmp39_)) { -#line 16815 "Commands.c" - TagSourceCollection* _tmp40_; - TagSourceCollection* _tmp41_; - Tag* _tmp42_; - Marker* _tmp43_; - Marker* _tmp44_; -#line 1880 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp40_ = tag_global; -#line 1880 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp41_ = tag_global; -#line 1880 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp42_ = t; -#line 1880 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp43_ = data_collection_mark (G_TYPE_CHECK_INSTANCE_CAST (_tmp41_, TYPE_DATA_COLLECTION, DataCollection), G_TYPE_CHECK_INSTANCE_CAST (_tmp42_, TYPE_DATA_OBJECT, DataObject)); -#line 1880 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp44_ = _tmp43_; -#line 1880 "/home/jens/Source/shotwell/src/Commands.vala" - source_collection_destroy_marked (G_TYPE_CHECK_INSTANCE_CAST (_tmp40_, TYPE_SOURCE_COLLECTION, SourceCollection), _tmp44_, TRUE, NULL, NULL, NULL); -#line 1880 "/home/jens/Source/shotwell/src/Commands.vala" - _g_object_unref0 (_tmp44_); -#line 16835 "Commands.c" - } else { - GeeSet* starting_sources = NULL; - GeeHashSet* _tmp45_; - GeeSet* _tmp46_; - Tag* _tmp47_; - GeeCollection* _tmp48_; - GeeCollection* _tmp49_; -#line 1882 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp45_ = gee_hash_set_new (TYPE_MEDIA_SOURCE, (GBoxedCopyFunc) g_object_ref, (GDestroyNotify) g_object_unref, NULL, NULL, NULL, NULL, NULL, NULL); -#line 1882 "/home/jens/Source/shotwell/src/Commands.vala" - starting_sources = G_TYPE_CHECK_INSTANCE_CAST (_tmp45_, GEE_TYPE_SET, GeeSet); -#line 1883 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp46_ = starting_sources; -#line 1883 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp47_ = t; -#line 1883 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp48_ = tag_get_sources (_tmp47_); -#line 1883 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp49_ = _tmp48_; -#line 1883 "/home/jens/Source/shotwell/src/Commands.vala" - gee_collection_add_all (G_TYPE_CHECK_INSTANCE_CAST (_tmp46_, GEE_TYPE_COLLECTION, GeeCollection), _tmp49_); -#line 1883 "/home/jens/Source/shotwell/src/Commands.vala" - _g_object_unref0 (_tmp49_); -#line 16859 "Commands.c" - { - GeeIterator* _source_it = NULL; - GeeSet* _tmp50_; - GeeIterator* _tmp51_; -#line 1884 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp50_ = starting_sources; -#line 1884 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp51_ = gee_iterable_iterator (G_TYPE_CHECK_INSTANCE_CAST (_tmp50_, GEE_TYPE_ITERABLE, GeeIterable)); -#line 1884 "/home/jens/Source/shotwell/src/Commands.vala" - _source_it = _tmp51_; -#line 1884 "/home/jens/Source/shotwell/src/Commands.vala" - while (TRUE) { -#line 16872 "Commands.c" - GeeIterator* _tmp52_; - MediaSource* source = NULL; - GeeIterator* _tmp53_; - gpointer _tmp54_; - GeeMap* _tmp55_; - const gchar* _tmp56_; - gpointer _tmp57_; - GeeSet* _tmp58_; - MediaSource* _tmp59_; - gboolean _tmp60_; -#line 1884 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp52_ = _source_it; -#line 1884 "/home/jens/Source/shotwell/src/Commands.vala" - if (!gee_iterator_next (_tmp52_)) { -#line 1884 "/home/jens/Source/shotwell/src/Commands.vala" - break; -#line 16889 "Commands.c" - } -#line 1884 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp53_ = _source_it; -#line 1884 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp54_ = gee_iterator_get (_tmp53_); -#line 1884 "/home/jens/Source/shotwell/src/Commands.vala" - source = (MediaSource*) _tmp54_; -#line 1885 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp55_ = self->priv->existing_dest_child_structure; -#line 1885 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp56_ = child_subpath; -#line 1885 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp57_ = gee_map_get (_tmp55_, _tmp56_); -#line 1885 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp58_ = (GeeSet*) _tmp57_; -#line 1885 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp59_ = source; -#line 1885 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp60_ = !gee_collection_contains (G_TYPE_CHECK_INSTANCE_CAST (_tmp58_, GEE_TYPE_COLLECTION, GeeCollection), _tmp59_); -#line 1885 "/home/jens/Source/shotwell/src/Commands.vala" - _g_object_unref0 (_tmp58_); -#line 1885 "/home/jens/Source/shotwell/src/Commands.vala" - if (_tmp60_) { -#line 16913 "Commands.c" - Tag* _tmp61_; - MediaSource* _tmp62_; - GeeList* _tmp63_; - GeeList* _tmp64_; -#line 1886 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp61_ = t; -#line 1886 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp62_ = source; -#line 1886 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp63_ = tag_detach (_tmp61_, _tmp62_); -#line 1886 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp64_ = _tmp63_; -#line 1886 "/home/jens/Source/shotwell/src/Commands.vala" - _g_object_unref0 (_tmp64_); -#line 16928 "Commands.c" - } -#line 1884 "/home/jens/Source/shotwell/src/Commands.vala" - _g_object_unref0 (source); -#line 16932 "Commands.c" - } -#line 1884 "/home/jens/Source/shotwell/src/Commands.vala" - _g_object_unref0 (_source_it); -#line 16936 "Commands.c" - } -#line 1879 "/home/jens/Source/shotwell/src/Commands.vala" - _g_object_unref0 (starting_sources); -#line 16940 "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 16946 "Commands.c" - } -#line 1874 "/home/jens/Source/shotwell/src/Commands.vala" - _g_object_unref0 (_t_list); -#line 16950 "Commands.c" - } - { - gint i = 0; -#line 1890 "/home/jens/Source/shotwell/src/Commands.vala" - i = 0; -#line 16956 "Commands.c" - { - gboolean _tmp65_ = FALSE; -#line 1890 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp65_ = TRUE; -#line 1890 "/home/jens/Source/shotwell/src/Commands.vala" - while (TRUE) { -#line 16963 "Commands.c" - gint _tmp67_; - GeeList* _tmp68_; - gint _tmp69_; - gint _tmp70_; - GeeList* _tmp71_; - gint _tmp72_; - gpointer _tmp73_; - SourceProxy* _tmp74_; - DataSource* _tmp75_; - DataSource* _tmp76_; -#line 1890 "/home/jens/Source/shotwell/src/Commands.vala" - if (!_tmp65_) { -#line 16976 "Commands.c" - gint _tmp66_; -#line 1890 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp66_ = i; -#line 1890 "/home/jens/Source/shotwell/src/Commands.vala" - i = _tmp66_ + 1; -#line 16982 "Commands.c" - } -#line 1890 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp65_ = FALSE; -#line 1890 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp67_ = i; -#line 1890 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp68_ = self->priv->src_before_state; -#line 1890 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp69_ = gee_collection_get_size (G_TYPE_CHECK_INSTANCE_CAST (_tmp68_, GEE_TYPE_COLLECTION, GeeCollection)); -#line 1890 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp70_ = _tmp69_; -#line 1890 "/home/jens/Source/shotwell/src/Commands.vala" - if (!(_tmp67_ < _tmp70_)) { -#line 1890 "/home/jens/Source/shotwell/src/Commands.vala" - break; -#line 16998 "Commands.c" - } -#line 1891 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp71_ = self->priv->src_before_state; -#line 1891 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp72_ = i; -#line 1891 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp73_ = gee_list_get (_tmp71_, _tmp72_); -#line 1891 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp74_ = (SourceProxy*) _tmp73_; -#line 1891 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp75_ = source_proxy_get_source (_tmp74_); -#line 1891 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp76_ = _tmp75_; -#line 1891 "/home/jens/Source/shotwell/src/Commands.vala" - _g_object_unref0 (_tmp76_); -#line 1891 "/home/jens/Source/shotwell/src/Commands.vala" - _source_proxy_unref0 (_tmp74_); -#line 17016 "Commands.c" - } - } - } - { - gint i = 0; -#line 1893 "/home/jens/Source/shotwell/src/Commands.vala" - i = 0; -#line 17024 "Commands.c" - { - gboolean _tmp77_ = FALSE; -#line 1893 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp77_ = TRUE; -#line 1893 "/home/jens/Source/shotwell/src/Commands.vala" - while (TRUE) { -#line 17031 "Commands.c" - gint _tmp79_; - GeeList* _tmp80_; - gint _tmp81_; - gint _tmp82_; - GeeList* _tmp83_; - gint _tmp84_; - gpointer _tmp85_; - SourceProxy* _tmp86_; - DataSource* _tmp87_; - DataSource* _tmp88_; -#line 1893 "/home/jens/Source/shotwell/src/Commands.vala" - if (!_tmp77_) { -#line 17044 "Commands.c" - gint _tmp78_; -#line 1893 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp78_ = i; -#line 1893 "/home/jens/Source/shotwell/src/Commands.vala" - i = _tmp78_ + 1; -#line 17050 "Commands.c" - } -#line 1893 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp77_ = FALSE; -#line 1893 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp79_ = i; -#line 1893 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp80_ = self->priv->dest_before_state; -#line 1893 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp81_ = gee_collection_get_size (G_TYPE_CHECK_INSTANCE_CAST (_tmp80_, GEE_TYPE_COLLECTION, GeeCollection)); -#line 1893 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp82_ = _tmp81_; -#line 1893 "/home/jens/Source/shotwell/src/Commands.vala" - if (!(_tmp79_ < _tmp82_)) { -#line 1893 "/home/jens/Source/shotwell/src/Commands.vala" - break; -#line 17066 "Commands.c" - } -#line 1894 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp83_ = self->priv->dest_before_state; -#line 1894 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp84_ = i; -#line 1894 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp85_ = gee_list_get (_tmp83_, _tmp84_); -#line 1894 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp86_ = (SourceProxy*) _tmp85_; -#line 1894 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp87_ = source_proxy_get_source (_tmp86_); -#line 1894 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp88_ = _tmp87_; -#line 1894 "/home/jens/Source/shotwell/src/Commands.vala" - _g_object_unref0 (_tmp88_); -#line 1894 "/home/jens/Source/shotwell/src/Commands.vala" - _source_proxy_unref0 (_tmp86_); -#line 17084 "Commands.c" - } - } - } -#line 1896 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp89_ = self->priv->to_path_parent_path; -#line 1896 "/home/jens/Source/shotwell/src/Commands.vala" - if (_tmp89_ != NULL) { -#line 17092 "Commands.c" - gchar* new_path = NULL; - const gchar* _tmp90_; - gchar* _tmp91_; - const gchar* _tmp92_ = NULL; - const gchar* _tmp93_; - gchar* path = NULL; - gchar* _tmp96_; - TagSourceCollection* _tmp97_; - const gchar* _tmp98_; - Tag* t = NULL; - const gchar* _tmp99_; - Tag* _tmp100_; - GeeList* kids = NULL; - Tag* _tmp101_; - GeeList* _tmp102_; - const gchar* _tmp120_; - GeeMap* _tmp121_; -#line 1897 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp90_ = self->priv->to_path_parent_path; -#line 1897 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp91_ = hierarchical_tag_utilities_get_root_path_form (_tmp90_); -#line 1897 "/home/jens/Source/shotwell/src/Commands.vala" - new_path = _tmp91_; -#line 1898 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp93_ = new_path; -#line 1898 "/home/jens/Source/shotwell/src/Commands.vala" - if (_tmp93_ != NULL) { -#line 17120 "Commands.c" - const gchar* _tmp94_; -#line 1898 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp94_ = new_path; -#line 1898 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp92_ = _tmp94_; -#line 17126 "Commands.c" - } else { - const gchar* _tmp95_; -#line 1898 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp95_ = self->priv->to_path_parent_path; -#line 1898 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp92_ = _tmp95_; -#line 17133 "Commands.c" - } -#line 1898 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp96_ = g_strdup (_tmp92_); -#line 1898 "/home/jens/Source/shotwell/src/Commands.vala" - path = _tmp96_; -#line 1900 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp97_ = tag_global; -#line 1900 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp98_ = path; -#line 1900 "/home/jens/Source/shotwell/src/Commands.vala" - _vala_assert (tag_source_collection_exists (_tmp97_, _tmp98_, FALSE), "Tag.global.exists(path)"); -#line 1902 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp99_ = path; -#line 1902 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp100_ = tag_for_path (_tmp99_); -#line 1902 "/home/jens/Source/shotwell/src/Commands.vala" - t = _tmp100_; -#line 1904 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp101_ = t; -#line 1904 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp102_ = tag_get_hierarchical_children (_tmp101_); -#line 1904 "/home/jens/Source/shotwell/src/Commands.vala" - kids = _tmp102_; -#line 17157 "Commands.c" - { - GeeList* _kidtag_list = NULL; - GeeList* _tmp103_; - GeeList* _tmp104_; - gint _kidtag_size = 0; - GeeList* _tmp105_; - gint _tmp106_; - gint _tmp107_; - gint _kidtag_index = 0; -#line 1905 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp103_ = kids; -#line 1905 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp104_ = _g_object_ref0 (_tmp103_); -#line 1905 "/home/jens/Source/shotwell/src/Commands.vala" - _kidtag_list = _tmp104_; -#line 1905 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp105_ = _kidtag_list; -#line 1905 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp106_ = gee_collection_get_size (G_TYPE_CHECK_INSTANCE_CAST (_tmp105_, GEE_TYPE_COLLECTION, GeeCollection)); -#line 1905 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp107_ = _tmp106_; -#line 1905 "/home/jens/Source/shotwell/src/Commands.vala" - _kidtag_size = _tmp107_; -#line 1905 "/home/jens/Source/shotwell/src/Commands.vala" - _kidtag_index = -1; -#line 1905 "/home/jens/Source/shotwell/src/Commands.vala" - while (TRUE) { -#line 17185 "Commands.c" - gint _tmp108_; - gint _tmp109_; - gint _tmp110_; - Tag* kidtag = NULL; - GeeList* _tmp111_; - gint _tmp112_; - gpointer _tmp113_; - Tag* _tmp114_; - Tag* _tmp115_; - GeeCollection* _tmp116_; - GeeCollection* _tmp117_; - GeeMultiMap* _tmp118_; - GeeMultiMap* _tmp119_; -#line 1905 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp108_ = _kidtag_index; -#line 1905 "/home/jens/Source/shotwell/src/Commands.vala" - _kidtag_index = _tmp108_ + 1; -#line 1905 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp109_ = _kidtag_index; -#line 1905 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp110_ = _kidtag_size; -#line 1905 "/home/jens/Source/shotwell/src/Commands.vala" - if (!(_tmp109_ < _tmp110_)) { -#line 1905 "/home/jens/Source/shotwell/src/Commands.vala" - break; -#line 17211 "Commands.c" - } -#line 1905 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp111_ = _kidtag_list; -#line 1905 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp112_ = _kidtag_index; -#line 1905 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp113_ = gee_list_get (_tmp111_, _tmp112_); -#line 1905 "/home/jens/Source/shotwell/src/Commands.vala" - kidtag = (Tag*) _tmp113_; -#line 1906 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp114_ = kidtag; -#line 1906 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp115_ = kidtag; -#line 1906 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp116_ = tag_get_sources (_tmp115_); -#line 1906 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp117_ = _tmp116_; -#line 1906 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp118_ = tag_detach_many (_tmp114_, _tmp117_); -#line 1906 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp119_ = _tmp118_; -#line 1906 "/home/jens/Source/shotwell/src/Commands.vala" - _g_object_unref0 (_tmp119_); -#line 1906 "/home/jens/Source/shotwell/src/Commands.vala" - _g_object_unref0 (_tmp117_); -#line 1905 "/home/jens/Source/shotwell/src/Commands.vala" - _g_object_unref0 (kidtag); -#line 17239 "Commands.c" - } -#line 1905 "/home/jens/Source/shotwell/src/Commands.vala" - _g_object_unref0 (_kidtag_list); -#line 17243 "Commands.c" - } -#line 1908 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp120_ = path; -#line 1908 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp121_ = self->priv->existing_dest_child_structure; -#line 1908 "/home/jens/Source/shotwell/src/Commands.vala" - reparent_tag_command_restore_child_attachments_at (self, _tmp120_, _tmp121_); -#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 17259 "Commands.c" - } else { - GeeSet* _tmp122_; - const gchar* _tmp123_; - Tag* _tmp124_; - Tag* _tmp125_; - const gchar* _tmp126_; - Tag* _tmp127_; - Tag* _tmp128_; - GeeCollection* _tmp129_; - GeeCollection* _tmp130_; - GeeMultiMap* _tmp131_; - GeeMultiMap* _tmp132_; - const gchar* _tmp133_; - Tag* _tmp134_; - Tag* _tmp135_; - GeeSet* _tmp136_; - GeeList* kids = NULL; - const gchar* _tmp137_; - Tag* _tmp138_; - Tag* _tmp139_; - GeeList* _tmp140_; - GeeList* _tmp141_; - const gchar* _tmp159_; - GeeMap* _tmp160_; -#line 1910 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp122_ = self->priv->existing_dest_membership; -#line 1910 "/home/jens/Source/shotwell/src/Commands.vala" - _vala_assert (_tmp122_ != NULL, "existing_dest_membership != null"); -#line 1911 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp123_ = self->priv->to_path; -#line 1911 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp124_ = tag_for_path (_tmp123_); -#line 1911 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp125_ = _tmp124_; -#line 1911 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp126_ = self->priv->to_path; -#line 1911 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp127_ = tag_for_path (_tmp126_); -#line 1911 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp128_ = _tmp127_; -#line 1911 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp129_ = tag_get_sources (_tmp128_); -#line 1911 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp130_ = _tmp129_; -#line 1911 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp131_ = tag_detach_many (_tmp125_, _tmp130_); -#line 1911 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp132_ = _tmp131_; -#line 1911 "/home/jens/Source/shotwell/src/Commands.vala" - _g_object_unref0 (_tmp132_); -#line 1911 "/home/jens/Source/shotwell/src/Commands.vala" - _g_object_unref0 (_tmp130_); -#line 1911 "/home/jens/Source/shotwell/src/Commands.vala" - _g_object_unref0 (_tmp128_); -#line 1911 "/home/jens/Source/shotwell/src/Commands.vala" - _g_object_unref0 (_tmp125_); -#line 1912 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp133_ = self->priv->to_path; -#line 1912 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp134_ = tag_for_path (_tmp133_); -#line 1912 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp135_ = _tmp134_; -#line 1912 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp136_ = self->priv->existing_dest_membership; -#line 1912 "/home/jens/Source/shotwell/src/Commands.vala" - tag_attach_many (_tmp135_, G_TYPE_CHECK_INSTANCE_CAST (_tmp136_, GEE_TYPE_COLLECTION, GeeCollection)); -#line 1912 "/home/jens/Source/shotwell/src/Commands.vala" - _g_object_unref0 (_tmp135_); -#line 1914 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp137_ = self->priv->to_path; -#line 1914 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp138_ = tag_for_path (_tmp137_); -#line 1914 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp139_ = _tmp138_; -#line 1914 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp140_ = tag_get_hierarchical_children (_tmp139_); -#line 1914 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp141_ = _tmp140_; -#line 1914 "/home/jens/Source/shotwell/src/Commands.vala" - _g_object_unref0 (_tmp139_); -#line 1914 "/home/jens/Source/shotwell/src/Commands.vala" - kids = _tmp141_; -#line 17342 "Commands.c" - { - GeeList* _kidtag_list = NULL; - GeeList* _tmp142_; - GeeList* _tmp143_; - gint _kidtag_size = 0; - GeeList* _tmp144_; - gint _tmp145_; - gint _tmp146_; - gint _kidtag_index = 0; -#line 1915 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp142_ = kids; -#line 1915 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp143_ = _g_object_ref0 (_tmp142_); -#line 1915 "/home/jens/Source/shotwell/src/Commands.vala" - _kidtag_list = _tmp143_; -#line 1915 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp144_ = _kidtag_list; -#line 1915 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp145_ = gee_collection_get_size (G_TYPE_CHECK_INSTANCE_CAST (_tmp144_, GEE_TYPE_COLLECTION, GeeCollection)); -#line 1915 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp146_ = _tmp145_; -#line 1915 "/home/jens/Source/shotwell/src/Commands.vala" - _kidtag_size = _tmp146_; -#line 1915 "/home/jens/Source/shotwell/src/Commands.vala" - _kidtag_index = -1; -#line 1915 "/home/jens/Source/shotwell/src/Commands.vala" - while (TRUE) { -#line 17370 "Commands.c" - gint _tmp147_; - gint _tmp148_; - gint _tmp149_; - Tag* kidtag = NULL; - GeeList* _tmp150_; - gint _tmp151_; - gpointer _tmp152_; - Tag* _tmp153_; - Tag* _tmp154_; - GeeCollection* _tmp155_; - GeeCollection* _tmp156_; - GeeMultiMap* _tmp157_; - GeeMultiMap* _tmp158_; -#line 1915 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp147_ = _kidtag_index; -#line 1915 "/home/jens/Source/shotwell/src/Commands.vala" - _kidtag_index = _tmp147_ + 1; -#line 1915 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp148_ = _kidtag_index; -#line 1915 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp149_ = _kidtag_size; -#line 1915 "/home/jens/Source/shotwell/src/Commands.vala" - if (!(_tmp148_ < _tmp149_)) { -#line 1915 "/home/jens/Source/shotwell/src/Commands.vala" - break; -#line 17396 "Commands.c" - } -#line 1915 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp150_ = _kidtag_list; -#line 1915 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp151_ = _kidtag_index; -#line 1915 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp152_ = gee_list_get (_tmp150_, _tmp151_); -#line 1915 "/home/jens/Source/shotwell/src/Commands.vala" - kidtag = (Tag*) _tmp152_; -#line 1916 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp153_ = kidtag; -#line 1916 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp154_ = kidtag; -#line 1916 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp155_ = tag_get_sources (_tmp154_); -#line 1916 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp156_ = _tmp155_; -#line 1916 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp157_ = tag_detach_many (_tmp153_, _tmp156_); -#line 1916 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp158_ = _tmp157_; -#line 1916 "/home/jens/Source/shotwell/src/Commands.vala" - _g_object_unref0 (_tmp158_); -#line 1916 "/home/jens/Source/shotwell/src/Commands.vala" - _g_object_unref0 (_tmp156_); -#line 1915 "/home/jens/Source/shotwell/src/Commands.vala" - _g_object_unref0 (kidtag); -#line 17424 "Commands.c" - } -#line 1915 "/home/jens/Source/shotwell/src/Commands.vala" - _g_object_unref0 (_kidtag_list); -#line 17428 "Commands.c" - } -#line 1918 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp159_ = self->priv->to_path; -#line 1918 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp160_ = self->priv->existing_dest_child_structure; -#line 1918 "/home/jens/Source/shotwell/src/Commands.vala" - reparent_tag_command_restore_child_attachments_at (self, _tmp159_, _tmp160_); -#line 1896 "/home/jens/Source/shotwell/src/Commands.vala" - _g_object_unref0 (kids); -#line 17438 "Commands.c" - } -#line 1863 "/home/jens/Source/shotwell/src/Commands.vala" - _g_free0 (unwind_target); -#line 17442 "Commands.c" -} - - -static void -reparent_tag_command_save_after_state (ReparentTagCommand* self) -{ - GeeList* _tmp0_; - GeeArrayList* _tmp1_; - TagSourceCollection* _tmp2_; - const gchar* _tmp3_; - Tag* to_tag = NULL; - const gchar* _tmp4_; - Tag* _tmp5_; - GeeList* _tmp6_; - Tag* _tmp7_; - SourceProxy* _tmp8_; - SourceProxy* _tmp9_; - GeeList* to_children = NULL; - Tag* _tmp10_; - GeeList* _tmp11_; -#line 1922 "/home/jens/Source/shotwell/src/Commands.vala" - g_return_if_fail (IS_REPARENT_TAG_COMMAND (self)); -#line 1923 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp0_ = self->priv->after_state; -#line 1923 "/home/jens/Source/shotwell/src/Commands.vala" - _vala_assert (_tmp0_ == NULL, "after_state == null"); -#line 1925 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp1_ = gee_array_list_new (TYPE_SOURCE_PROXY, (GBoxedCopyFunc) source_proxy_ref, (GDestroyNotify) source_proxy_unref, NULL, NULL, NULL); -#line 1925 "/home/jens/Source/shotwell/src/Commands.vala" - _g_object_unref0 (self->priv->after_state); -#line 1925 "/home/jens/Source/shotwell/src/Commands.vala" - self->priv->after_state = G_TYPE_CHECK_INSTANCE_CAST (_tmp1_, GEE_TYPE_LIST, GeeList); -#line 1928 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp2_ = tag_global; -#line 1928 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp3_ = self->priv->to_path; -#line 1928 "/home/jens/Source/shotwell/src/Commands.vala" - _vala_assert (tag_source_collection_exists (_tmp2_, _tmp3_, FALSE), "Tag.global.exists(to_path)"); -#line 1929 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp4_ = self->priv->to_path; -#line 1929 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp5_ = tag_for_path (_tmp4_); -#line 1929 "/home/jens/Source/shotwell/src/Commands.vala" - to_tag = _tmp5_; -#line 1930 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp6_ = self->priv->after_state; -#line 1930 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp7_ = to_tag; -#line 1930 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp8_ = proxyable_get_proxy (G_TYPE_CHECK_INSTANCE_CAST (_tmp7_, TYPE_PROXYABLE, Proxyable)); -#line 1930 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp9_ = _tmp8_; -#line 1930 "/home/jens/Source/shotwell/src/Commands.vala" - gee_collection_add (G_TYPE_CHECK_INSTANCE_CAST (_tmp6_, GEE_TYPE_COLLECTION, GeeCollection), _tmp9_); -#line 1930 "/home/jens/Source/shotwell/src/Commands.vala" - _source_proxy_unref0 (_tmp9_); -#line 1933 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp10_ = to_tag; -#line 1933 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp11_ = tag_get_hierarchical_children (_tmp10_); -#line 1933 "/home/jens/Source/shotwell/src/Commands.vala" - to_children = _tmp11_; -#line 17505 "Commands.c" - { - gint i = 0; - GeeList* _tmp12_; - gint _tmp13_; - gint _tmp14_; -#line 1934 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp12_ = to_children; -#line 1934 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp13_ = gee_collection_get_size (G_TYPE_CHECK_INSTANCE_CAST (_tmp12_, GEE_TYPE_COLLECTION, GeeCollection)); -#line 1934 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp14_ = _tmp13_; -#line 1934 "/home/jens/Source/shotwell/src/Commands.vala" - i = _tmp14_ - 1; -#line 17519 "Commands.c" - { - gboolean _tmp15_ = FALSE; -#line 1934 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp15_ = TRUE; -#line 1934 "/home/jens/Source/shotwell/src/Commands.vala" - while (TRUE) { -#line 17526 "Commands.c" - gint _tmp17_; - GeeList* _tmp18_; - GeeList* _tmp19_; - gint _tmp20_; - gpointer _tmp21_; - Tag* _tmp22_; - SourceProxy* _tmp23_; - SourceProxy* _tmp24_; -#line 1934 "/home/jens/Source/shotwell/src/Commands.vala" - if (!_tmp15_) { -#line 17537 "Commands.c" - gint _tmp16_; -#line 1934 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp16_ = i; -#line 1934 "/home/jens/Source/shotwell/src/Commands.vala" - i = _tmp16_ - 1; -#line 17543 "Commands.c" - } -#line 1934 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp15_ = FALSE; -#line 1934 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp17_ = i; -#line 1934 "/home/jens/Source/shotwell/src/Commands.vala" - if (!(_tmp17_ >= 0)) { -#line 1934 "/home/jens/Source/shotwell/src/Commands.vala" - break; -#line 17553 "Commands.c" - } -#line 1935 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp18_ = self->priv->after_state; -#line 1935 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp19_ = to_children; -#line 1935 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp20_ = i; -#line 1935 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp21_ = gee_list_get (_tmp19_, _tmp20_); -#line 1935 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp22_ = (Tag*) _tmp21_; -#line 1935 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp23_ = proxyable_get_proxy (G_TYPE_CHECK_INSTANCE_CAST (_tmp22_, TYPE_PROXYABLE, Proxyable)); -#line 1935 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp24_ = _tmp23_; -#line 1935 "/home/jens/Source/shotwell/src/Commands.vala" - gee_collection_add (G_TYPE_CHECK_INSTANCE_CAST (_tmp18_, GEE_TYPE_COLLECTION, GeeCollection), _tmp24_); -#line 1935 "/home/jens/Source/shotwell/src/Commands.vala" - _source_proxy_unref0 (_tmp24_); -#line 1935 "/home/jens/Source/shotwell/src/Commands.vala" - _g_object_unref0 (_tmp22_); -#line 17575 "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 17583 "Commands.c" -} - - -static void -reparent_tag_command_restore_after_state (ReparentTagCommand* self) -{ - GeeList* _tmp0_; -#line 1938 "/home/jens/Source/shotwell/src/Commands.vala" - g_return_if_fail (IS_REPARENT_TAG_COMMAND (self)); -#line 1939 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp0_ = self->priv->after_state; -#line 1939 "/home/jens/Source/shotwell/src/Commands.vala" - _vala_assert (_tmp0_ != NULL, "after_state != null"); -#line 17597 "Commands.c" - { - gint i = 0; -#line 1941 "/home/jens/Source/shotwell/src/Commands.vala" - i = 0; -#line 17602 "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 17609 "Commands.c" - gint _tmp3_; - GeeList* _tmp4_; - gint _tmp5_; - gint _tmp6_; - GeeList* _tmp7_; - gint _tmp8_; - gpointer _tmp9_; - SourceProxy* _tmp10_; - DataSource* _tmp11_; - DataSource* _tmp12_; -#line 1941 "/home/jens/Source/shotwell/src/Commands.vala" - if (!_tmp1_) { -#line 17622 "Commands.c" - gint _tmp2_; -#line 1941 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp2_ = i; -#line 1941 "/home/jens/Source/shotwell/src/Commands.vala" - i = _tmp2_ + 1; -#line 17628 "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 17644 "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 17662 "Commands.c" - } - } - } -} - - -static void -reparent_tag_command_prepare_parent (ReparentTagCommand* self, - const gchar* path) -{ - Tag* new_parent = NULL; - Tag* _tmp22_; -#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" - if (g_str_has_prefix (path, TAG_PATH_SEPARATOR_STRING)) { -#line 17683 "Commands.c" - GeeList* parent_paths = NULL; - GeeList* _tmp0_; - GeeList* _tmp1_; - gint _tmp2_; - gint _tmp3_; -#line 1949 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp0_ = hierarchical_tag_utilities_enumerate_parent_paths (path); -#line 1949 "/home/jens/Source/shotwell/src/Commands.vala" - parent_paths = _tmp0_; -#line 1950 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp1_ = parent_paths; -#line 1950 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp2_ = gee_collection_get_size (G_TYPE_CHECK_INSTANCE_CAST (_tmp1_, GEE_TYPE_COLLECTION, GeeCollection)); -#line 1950 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp3_ = _tmp2_; -#line 1950 "/home/jens/Source/shotwell/src/Commands.vala" - if (_tmp3_ > 0) { -#line 17701 "Commands.c" - gchar* immediate_parent_path = NULL; - GeeList* _tmp4_; - GeeList* _tmp5_; - gint _tmp6_; - gint _tmp7_; - gpointer _tmp8_; - TagSourceCollection* _tmp9_; - const gchar* _tmp10_; -#line 1951 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp4_ = parent_paths; -#line 1951 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp5_ = parent_paths; -#line 1951 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp6_ = gee_collection_get_size (G_TYPE_CHECK_INSTANCE_CAST (_tmp5_, GEE_TYPE_COLLECTION, GeeCollection)); -#line 1951 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp7_ = _tmp6_; -#line 1951 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp8_ = gee_list_get (_tmp4_, _tmp7_ - 1); -#line 1951 "/home/jens/Source/shotwell/src/Commands.vala" - immediate_parent_path = (gchar*) _tmp8_; -#line 1952 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp9_ = tag_global; -#line 1952 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp10_ = immediate_parent_path; -#line 1952 "/home/jens/Source/shotwell/src/Commands.vala" - if (tag_source_collection_exists (_tmp9_, _tmp10_, FALSE)) { -#line 17728 "Commands.c" - const gchar* _tmp11_; - Tag* _tmp12_; -#line 1953 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp11_ = immediate_parent_path; -#line 1953 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp12_ = tag_for_path (_tmp11_); -#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 = _tmp12_; -#line 17739 "Commands.c" - } else { - TagSourceCollection* _tmp13_; - const gchar* _tmp14_; - gchar* _tmp15_; - gchar* _tmp16_; - gboolean _tmp17_; -#line 1954 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp13_ = tag_global; -#line 1954 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp14_ = immediate_parent_path; -#line 1954 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp15_ = string_substring (_tmp14_, (glong) 1, (glong) -1); -#line 1954 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp16_ = _tmp15_; -#line 1954 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp17_ = tag_source_collection_exists (_tmp13_, _tmp16_, FALSE); -#line 1954 "/home/jens/Source/shotwell/src/Commands.vala" - _g_free0 (_tmp16_); -#line 1954 "/home/jens/Source/shotwell/src/Commands.vala" - if (_tmp17_) { -#line 17760 "Commands.c" - const gchar* _tmp18_; - gchar* _tmp19_; - gchar* _tmp20_; - Tag* _tmp21_; -#line 1955 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp18_ = immediate_parent_path; -#line 1955 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp19_ = string_substring (_tmp18_, (glong) 1, (glong) -1); -#line 1955 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp20_ = _tmp19_; -#line 1955 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp21_ = tag_for_path (_tmp20_); -#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 = _tmp21_; -#line 1955 "/home/jens/Source/shotwell/src/Commands.vala" - _g_free0 (_tmp20_); -#line 17779 "Commands.c" - } else { -#line 1957 "/home/jens/Source/shotwell/src/Commands.vala" - g_assert_not_reached (); -#line 17783 "Commands.c" - } - } -#line 1950 "/home/jens/Source/shotwell/src/Commands.vala" - _g_free0 (immediate_parent_path); -#line 17788 "Commands.c" - } -#line 1948 "/home/jens/Source/shotwell/src/Commands.vala" - _g_object_unref0 (parent_paths); -#line 17792 "Commands.c" - } -#line 1960 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp22_ = new_parent; -#line 1960 "/home/jens/Source/shotwell/src/Commands.vala" - if (_tmp22_ != NULL) { -#line 17798 "Commands.c" - Tag* _tmp23_; -#line 1961 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp23_ = new_parent; -#line 1961 "/home/jens/Source/shotwell/src/Commands.vala" - tag_promote (_tmp23_); -#line 17804 "Commands.c" - } -#line 1945 "/home/jens/Source/shotwell/src/Commands.vala" - _g_object_unref0 (new_parent); -#line 17808 "Commands.c" -} - - -static void -reparent_tag_command_do_source_parent_detachments (ReparentTagCommand* self) -{ - TagSourceCollection* _tmp0_; - const gchar* _tmp1_; - Tag* from_tag = NULL; - const gchar* _tmp2_; - Tag* _tmp3_; - GeeMap* _tmp4_; -#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" - _vala_assert (tag_source_collection_exists (_tmp0_, _tmp1_, FALSE), "Tag.global.exists(from_path)"); -#line 1966 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp2_ = self->priv->from_path; -#line 1966 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp3_ = tag_for_path (_tmp2_); -#line 1966 "/home/jens/Source/shotwell/src/Commands.vala" - from_tag = _tmp3_; -#line 1969 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp4_ = self->priv->src_parent_detachments; -#line 1969 "/home/jens/Source/shotwell/src/Commands.vala" - if (_tmp4_ == NULL) { -#line 17839 "Commands.c" - GeeHashMap* _tmp5_; -#line 1970 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp5_ = gee_hash_map_new (G_TYPE_STRING, (GBoxedCopyFunc) g_strdup, (GDestroyNotify) g_free, GEE_TYPE_SET, (GBoxedCopyFunc) g_object_ref, (GDestroyNotify) g_object_unref, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL); -#line 1970 "/home/jens/Source/shotwell/src/Commands.vala" - _g_object_unref0 (self->priv->src_parent_detachments); -#line 1970 "/home/jens/Source/shotwell/src/Commands.vala" - self->priv->src_parent_detachments = G_TYPE_CHECK_INSTANCE_CAST (_tmp5_, GEE_TYPE_MAP, GeeMap); -#line 17847 "Commands.c" - { - GeeIterator* _source_it = NULL; - Tag* _tmp6_; - GeeCollection* _tmp7_; - GeeCollection* _tmp8_; - GeeIterator* _tmp9_; - GeeIterator* _tmp10_; -#line 1971 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp6_ = from_tag; -#line 1971 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp7_ = tag_get_sources (_tmp6_); -#line 1971 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp8_ = _tmp7_; -#line 1971 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp9_ = gee_iterable_iterator (G_TYPE_CHECK_INSTANCE_CAST (_tmp8_, GEE_TYPE_ITERABLE, GeeIterable)); -#line 1971 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp10_ = _tmp9_; -#line 1971 "/home/jens/Source/shotwell/src/Commands.vala" - _g_object_unref0 (_tmp8_); -#line 1971 "/home/jens/Source/shotwell/src/Commands.vala" - _source_it = _tmp10_; -#line 1971 "/home/jens/Source/shotwell/src/Commands.vala" - while (TRUE) { -#line 17871 "Commands.c" - GeeIterator* _tmp11_; - MediaSource* source = NULL; - GeeIterator* _tmp12_; - gpointer _tmp13_; - Tag* current_parent = NULL; - Tag* _tmp14_; - Tag* _tmp15_; - gint running_attach_count = 0; - Tag* _tmp16_; - MediaSource* _tmp17_; -#line 1971 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp11_ = _source_it; -#line 1971 "/home/jens/Source/shotwell/src/Commands.vala" - if (!gee_iterator_next (_tmp11_)) { -#line 1971 "/home/jens/Source/shotwell/src/Commands.vala" - break; -#line 17888 "Commands.c" - } -#line 1971 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp12_ = _source_it; -#line 1971 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp13_ = gee_iterator_get (_tmp12_); -#line 1971 "/home/jens/Source/shotwell/src/Commands.vala" - source = (MediaSource*) _tmp13_; -#line 1972 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp14_ = from_tag; -#line 1972 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp15_ = tag_get_hierarchical_parent (_tmp14_); -#line 1972 "/home/jens/Source/shotwell/src/Commands.vala" - current_parent = _tmp15_; -#line 1973 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp16_ = from_tag; -#line 1973 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp17_ = source; -#line 1973 "/home/jens/Source/shotwell/src/Commands.vala" - running_attach_count = tag_get_attachment_count (_tmp16_, _tmp17_) + 1; -#line 1974 "/home/jens/Source/shotwell/src/Commands.vala" - while (TRUE) { -#line 17910 "Commands.c" - Tag* _tmp18_; - gchar* current_parent_path = NULL; - Tag* _tmp19_; - gchar* _tmp20_; - GeeMap* _tmp21_; - const gchar* _tmp22_; - gint curr_parent_attach_count = 0; - Tag* _tmp27_; - MediaSource* _tmp28_; - gint _tmp29_; - gint _tmp30_; - gint _tmp31_; - gint _tmp32_; - gint _tmp38_; - Tag* _tmp39_; - Tag* _tmp40_; -#line 1974 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp18_ = current_parent; -#line 1974 "/home/jens/Source/shotwell/src/Commands.vala" - if (!(_tmp18_ != NULL)) { -#line 1974 "/home/jens/Source/shotwell/src/Commands.vala" - break; -#line 17933 "Commands.c" - } -#line 1975 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp19_ = current_parent; -#line 1975 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp20_ = tag_get_path (_tmp19_); -#line 1975 "/home/jens/Source/shotwell/src/Commands.vala" - current_parent_path = _tmp20_; -#line 1976 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp21_ = self->priv->src_parent_detachments; -#line 1976 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp22_ = current_parent_path; -#line 1976 "/home/jens/Source/shotwell/src/Commands.vala" - if (!gee_map_has_key (_tmp21_, _tmp22_)) { -#line 17947 "Commands.c" - GeeMap* _tmp23_; - const gchar* _tmp24_; - GeeHashSet* _tmp25_; - GeeHashSet* _tmp26_; -#line 1977 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp23_ = self->priv->src_parent_detachments; -#line 1977 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp24_ = current_parent_path; -#line 1977 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp25_ = gee_hash_set_new (TYPE_MEDIA_SOURCE, (GBoxedCopyFunc) g_object_ref, (GDestroyNotify) g_object_unref, NULL, NULL, NULL, NULL, NULL, NULL); -#line 1977 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp26_ = _tmp25_; -#line 1977 "/home/jens/Source/shotwell/src/Commands.vala" - gee_map_set (_tmp23_, _tmp24_, G_TYPE_CHECK_INSTANCE_CAST (_tmp26_, GEE_TYPE_SET, GeeSet)); -#line 1977 "/home/jens/Source/shotwell/src/Commands.vala" - _g_object_unref0 (_tmp26_); -#line 17964 "Commands.c" - } -#line 1979 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp27_ = current_parent; -#line 1979 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp28_ = source; -#line 1979 "/home/jens/Source/shotwell/src/Commands.vala" - curr_parent_attach_count = tag_get_attachment_count (_tmp27_, _tmp28_); -#line 1981 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp29_ = curr_parent_attach_count; -#line 1981 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp30_ = running_attach_count; -#line 1981 "/home/jens/Source/shotwell/src/Commands.vala" - _vala_assert (_tmp29_ >= _tmp30_, "curr_parent_attach_count >= running_attach_count"); -#line 1985 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp31_ = curr_parent_attach_count; -#line 1985 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp32_ = running_attach_count; -#line 1985 "/home/jens/Source/shotwell/src/Commands.vala" - if (_tmp31_ == _tmp32_) { -#line 17984 "Commands.c" - GeeMap* _tmp33_; - const gchar* _tmp34_; - gpointer _tmp35_; - GeeSet* _tmp36_; - MediaSource* _tmp37_; -#line 1986 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp33_ = self->priv->src_parent_detachments; -#line 1986 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp34_ = current_parent_path; -#line 1986 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp35_ = gee_map_get (_tmp33_, _tmp34_); -#line 1986 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp36_ = (GeeSet*) _tmp35_; -#line 1986 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp37_ = source; -#line 1986 "/home/jens/Source/shotwell/src/Commands.vala" - gee_collection_add (G_TYPE_CHECK_INSTANCE_CAST (_tmp36_, GEE_TYPE_COLLECTION, GeeCollection), _tmp37_); -#line 1986 "/home/jens/Source/shotwell/src/Commands.vala" - _g_object_unref0 (_tmp36_); -#line 18004 "Commands.c" - } -#line 1988 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp38_ = running_attach_count; -#line 1988 "/home/jens/Source/shotwell/src/Commands.vala" - running_attach_count = _tmp38_ + 1; -#line 1989 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp39_ = current_parent; -#line 1989 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp40_ = tag_get_hierarchical_parent (_tmp39_); -#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 = _tmp40_; -#line 1974 "/home/jens/Source/shotwell/src/Commands.vala" - _g_free0 (current_parent_path); -#line 18020 "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 18026 "Commands.c" - } -#line 1971 "/home/jens/Source/shotwell/src/Commands.vala" - _g_object_unref0 (_source_it); -#line 18030 "Commands.c" - } - } - { - GeeIterator* _p_it = NULL; - GeeMap* _tmp41_; - GeeSet* _tmp42_; - GeeSet* _tmp43_; - GeeSet* _tmp44_; - GeeIterator* _tmp45_; - GeeIterator* _tmp46_; -#line 1995 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp41_ = self->priv->src_parent_detachments; -#line 1995 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp42_ = gee_map_get_keys (_tmp41_); -#line 1995 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp43_ = _tmp42_; -#line 1995 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp44_ = _tmp43_; -#line 1995 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp45_ = gee_iterable_iterator (G_TYPE_CHECK_INSTANCE_CAST (_tmp44_, GEE_TYPE_ITERABLE, GeeIterable)); -#line 1995 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp46_ = _tmp45_; -#line 1995 "/home/jens/Source/shotwell/src/Commands.vala" - _g_object_unref0 (_tmp44_); -#line 1995 "/home/jens/Source/shotwell/src/Commands.vala" - _p_it = _tmp46_; -#line 1995 "/home/jens/Source/shotwell/src/Commands.vala" - while (TRUE) { -#line 18059 "Commands.c" - GeeIterator* _tmp47_; - gchar* p = NULL; - GeeIterator* _tmp48_; - gpointer _tmp49_; -#line 1995 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp47_ = _p_it; -#line 1995 "/home/jens/Source/shotwell/src/Commands.vala" - if (!gee_iterator_next (_tmp47_)) { -#line 1995 "/home/jens/Source/shotwell/src/Commands.vala" - break; -#line 18070 "Commands.c" - } -#line 1995 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp48_ = _p_it; -#line 1995 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp49_ = gee_iterator_get (_tmp48_); -#line 1995 "/home/jens/Source/shotwell/src/Commands.vala" - p = (gchar*) _tmp49_; -#line 18078 "Commands.c" - { - GeeIterator* _s_it = NULL; - GeeMap* _tmp50_; - const gchar* _tmp51_; - gpointer _tmp52_; - GeeSet* _tmp53_; - GeeIterator* _tmp54_; - GeeIterator* _tmp55_; -#line 1996 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp50_ = self->priv->src_parent_detachments; -#line 1996 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp51_ = p; -#line 1996 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp52_ = gee_map_get (_tmp50_, _tmp51_); -#line 1996 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp53_ = (GeeSet*) _tmp52_; -#line 1996 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp54_ = gee_iterable_iterator (G_TYPE_CHECK_INSTANCE_CAST (_tmp53_, GEE_TYPE_ITERABLE, GeeIterable)); -#line 1996 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp55_ = _tmp54_; -#line 1996 "/home/jens/Source/shotwell/src/Commands.vala" - _g_object_unref0 (_tmp53_); -#line 1996 "/home/jens/Source/shotwell/src/Commands.vala" - _s_it = _tmp55_; -#line 1996 "/home/jens/Source/shotwell/src/Commands.vala" - while (TRUE) { -#line 18105 "Commands.c" - GeeIterator* _tmp56_; - MediaSource* s = NULL; - GeeIterator* _tmp57_; - gpointer _tmp58_; - const gchar* _tmp59_; - Tag* _tmp60_; - Tag* _tmp61_; - MediaSource* _tmp62_; - GeeList* _tmp63_; - GeeList* _tmp64_; -#line 1996 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp56_ = _s_it; -#line 1996 "/home/jens/Source/shotwell/src/Commands.vala" - if (!gee_iterator_next (_tmp56_)) { -#line 1996 "/home/jens/Source/shotwell/src/Commands.vala" - break; -#line 18122 "Commands.c" - } -#line 1996 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp57_ = _s_it; -#line 1996 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp58_ = gee_iterator_get (_tmp57_); -#line 1996 "/home/jens/Source/shotwell/src/Commands.vala" - s = (MediaSource*) _tmp58_; -#line 1997 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp59_ = p; -#line 1997 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp60_ = tag_for_path (_tmp59_); -#line 1997 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp61_ = _tmp60_; -#line 1997 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp62_ = s; -#line 1997 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp63_ = tag_detach (_tmp61_, _tmp62_); -#line 1997 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp64_ = _tmp63_; -#line 1997 "/home/jens/Source/shotwell/src/Commands.vala" - _g_object_unref0 (_tmp64_); -#line 1997 "/home/jens/Source/shotwell/src/Commands.vala" - _g_object_unref0 (_tmp61_); -#line 1996 "/home/jens/Source/shotwell/src/Commands.vala" - _g_object_unref0 (s); -#line 18148 "Commands.c" - } -#line 1996 "/home/jens/Source/shotwell/src/Commands.vala" - _g_object_unref0 (_s_it); -#line 18152 "Commands.c" - } -#line 1995 "/home/jens/Source/shotwell/src/Commands.vala" - _g_free0 (p); -#line 18156 "Commands.c" - } -#line 1995 "/home/jens/Source/shotwell/src/Commands.vala" - _g_object_unref0 (_p_it); -#line 18160 "Commands.c" - } -#line 1964 "/home/jens/Source/shotwell/src/Commands.vala" - _g_object_unref0 (from_tag); -#line 18164 "Commands.c" -} - - -static void -reparent_tag_command_do_source_parent_reattachments (ReparentTagCommand* self) -{ - GeeMap* _tmp0_; -#line 2000 "/home/jens/Source/shotwell/src/Commands.vala" - g_return_if_fail (IS_REPARENT_TAG_COMMAND (self)); -#line 2001 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp0_ = self->priv->src_parent_detachments; -#line 2001 "/home/jens/Source/shotwell/src/Commands.vala" - _vala_assert (_tmp0_ != NULL, "src_parent_detachments != null"); -#line 18178 "Commands.c" - { - GeeIterator* _p_it = NULL; - GeeMap* _tmp1_; - GeeSet* _tmp2_; - GeeSet* _tmp3_; - GeeSet* _tmp4_; - GeeIterator* _tmp5_; - GeeIterator* _tmp6_; -#line 2003 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp1_ = self->priv->src_parent_detachments; -#line 2003 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp2_ = gee_map_get_keys (_tmp1_); -#line 2003 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp3_ = _tmp2_; -#line 2003 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp4_ = _tmp3_; -#line 2003 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp5_ = gee_iterable_iterator (G_TYPE_CHECK_INSTANCE_CAST (_tmp4_, GEE_TYPE_ITERABLE, GeeIterable)); -#line 2003 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp6_ = _tmp5_; -#line 2003 "/home/jens/Source/shotwell/src/Commands.vala" - _g_object_unref0 (_tmp4_); -#line 2003 "/home/jens/Source/shotwell/src/Commands.vala" - _p_it = _tmp6_; -#line 2003 "/home/jens/Source/shotwell/src/Commands.vala" - while (TRUE) { -#line 18205 "Commands.c" - GeeIterator* _tmp7_; - gchar* p = NULL; - GeeIterator* _tmp8_; - gpointer _tmp9_; -#line 2003 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp7_ = _p_it; -#line 2003 "/home/jens/Source/shotwell/src/Commands.vala" - if (!gee_iterator_next (_tmp7_)) { -#line 2003 "/home/jens/Source/shotwell/src/Commands.vala" - break; -#line 18216 "Commands.c" - } -#line 2003 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp8_ = _p_it; -#line 2003 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp9_ = gee_iterator_get (_tmp8_); -#line 2003 "/home/jens/Source/shotwell/src/Commands.vala" - p = (gchar*) _tmp9_; -#line 18224 "Commands.c" - { - GeeIterator* _s_it = NULL; - GeeMap* _tmp10_; - const gchar* _tmp11_; - gpointer _tmp12_; - GeeSet* _tmp13_; - GeeIterator* _tmp14_; - GeeIterator* _tmp15_; -#line 2004 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp10_ = self->priv->src_parent_detachments; -#line 2004 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp11_ = p; -#line 2004 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp12_ = gee_map_get (_tmp10_, _tmp11_); -#line 2004 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp13_ = (GeeSet*) _tmp12_; -#line 2004 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp14_ = gee_iterable_iterator (G_TYPE_CHECK_INSTANCE_CAST (_tmp13_, GEE_TYPE_ITERABLE, GeeIterable)); -#line 2004 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp15_ = _tmp14_; -#line 2004 "/home/jens/Source/shotwell/src/Commands.vala" - _g_object_unref0 (_tmp13_); -#line 2004 "/home/jens/Source/shotwell/src/Commands.vala" - _s_it = _tmp15_; -#line 2004 "/home/jens/Source/shotwell/src/Commands.vala" - while (TRUE) { -#line 18251 "Commands.c" - GeeIterator* _tmp16_; - MediaSource* s = NULL; - GeeIterator* _tmp17_; - gpointer _tmp18_; - const gchar* _tmp19_; - Tag* _tmp20_; - Tag* _tmp21_; - MediaSource* _tmp22_; -#line 2004 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp16_ = _s_it; -#line 2004 "/home/jens/Source/shotwell/src/Commands.vala" - if (!gee_iterator_next (_tmp16_)) { -#line 2004 "/home/jens/Source/shotwell/src/Commands.vala" - break; -#line 18266 "Commands.c" - } -#line 2004 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp17_ = _s_it; -#line 2004 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp18_ = gee_iterator_get (_tmp17_); -#line 2004 "/home/jens/Source/shotwell/src/Commands.vala" - s = (MediaSource*) _tmp18_; -#line 2005 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp19_ = p; -#line 2005 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp20_ = tag_for_path (_tmp19_); -#line 2005 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp21_ = _tmp20_; -#line 2005 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp22_ = s; -#line 2005 "/home/jens/Source/shotwell/src/Commands.vala" - tag_attach (_tmp21_, _tmp22_); -#line 2005 "/home/jens/Source/shotwell/src/Commands.vala" - _g_object_unref0 (_tmp21_); -#line 2004 "/home/jens/Source/shotwell/src/Commands.vala" - _g_object_unref0 (s); -#line 18288 "Commands.c" - } -#line 2004 "/home/jens/Source/shotwell/src/Commands.vala" - _g_object_unref0 (_s_it); -#line 18292 "Commands.c" - } -#line 2003 "/home/jens/Source/shotwell/src/Commands.vala" - _g_free0 (p); -#line 18296 "Commands.c" - } -#line 2003 "/home/jens/Source/shotwell/src/Commands.vala" - _g_object_unref0 (_p_it); -#line 18300 "Commands.c" - } -} - - -static void -reparent_tag_command_do_destination_parent_detachments (ReparentTagCommand* self) -{ - GeeMap* _tmp0_; -#line 2008 "/home/jens/Source/shotwell/src/Commands.vala" - g_return_if_fail (IS_REPARENT_TAG_COMMAND (self)); -#line 2009 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp0_ = self->priv->dest_parent_attachments; -#line 2009 "/home/jens/Source/shotwell/src/Commands.vala" - _vala_assert (_tmp0_ != NULL, "dest_parent_attachments != null"); -#line 18315 "Commands.c" - { - GeeIterator* _p_it = NULL; - GeeMap* _tmp1_; - GeeSet* _tmp2_; - GeeSet* _tmp3_; - GeeSet* _tmp4_; - GeeIterator* _tmp5_; - GeeIterator* _tmp6_; -#line 2011 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp1_ = self->priv->dest_parent_attachments; -#line 2011 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp2_ = gee_map_get_keys (_tmp1_); -#line 2011 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp3_ = _tmp2_; -#line 2011 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp4_ = _tmp3_; -#line 2011 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp5_ = gee_iterable_iterator (G_TYPE_CHECK_INSTANCE_CAST (_tmp4_, GEE_TYPE_ITERABLE, GeeIterable)); -#line 2011 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp6_ = _tmp5_; -#line 2011 "/home/jens/Source/shotwell/src/Commands.vala" - _g_object_unref0 (_tmp4_); -#line 2011 "/home/jens/Source/shotwell/src/Commands.vala" - _p_it = _tmp6_; -#line 2011 "/home/jens/Source/shotwell/src/Commands.vala" - while (TRUE) { -#line 18342 "Commands.c" - GeeIterator* _tmp7_; - gchar* p = NULL; - GeeIterator* _tmp8_; - gpointer _tmp9_; -#line 2011 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp7_ = _p_it; -#line 2011 "/home/jens/Source/shotwell/src/Commands.vala" - if (!gee_iterator_next (_tmp7_)) { -#line 2011 "/home/jens/Source/shotwell/src/Commands.vala" - break; -#line 18353 "Commands.c" - } -#line 2011 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp8_ = _p_it; -#line 2011 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp9_ = gee_iterator_get (_tmp8_); -#line 2011 "/home/jens/Source/shotwell/src/Commands.vala" - p = (gchar*) _tmp9_; -#line 18361 "Commands.c" - { - GeeIterator* _s_it = NULL; - GeeMap* _tmp10_; - const gchar* _tmp11_; - gpointer _tmp12_; - GeeSet* _tmp13_; - GeeIterator* _tmp14_; - GeeIterator* _tmp15_; -#line 2012 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp10_ = self->priv->dest_parent_attachments; -#line 2012 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp11_ = p; -#line 2012 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp12_ = gee_map_get (_tmp10_, _tmp11_); -#line 2012 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp13_ = (GeeSet*) _tmp12_; -#line 2012 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp14_ = gee_iterable_iterator (G_TYPE_CHECK_INSTANCE_CAST (_tmp13_, GEE_TYPE_ITERABLE, GeeIterable)); -#line 2012 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp15_ = _tmp14_; -#line 2012 "/home/jens/Source/shotwell/src/Commands.vala" - _g_object_unref0 (_tmp13_); -#line 2012 "/home/jens/Source/shotwell/src/Commands.vala" - _s_it = _tmp15_; -#line 2012 "/home/jens/Source/shotwell/src/Commands.vala" - while (TRUE) { -#line 18388 "Commands.c" - GeeIterator* _tmp16_; - MediaSource* s = NULL; - GeeIterator* _tmp17_; - gpointer _tmp18_; - const gchar* _tmp19_; - Tag* _tmp20_; - Tag* _tmp21_; - MediaSource* _tmp22_; - GeeList* _tmp23_; - GeeList* _tmp24_; -#line 2012 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp16_ = _s_it; -#line 2012 "/home/jens/Source/shotwell/src/Commands.vala" - if (!gee_iterator_next (_tmp16_)) { -#line 2012 "/home/jens/Source/shotwell/src/Commands.vala" - break; -#line 18405 "Commands.c" - } -#line 2012 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp17_ = _s_it; -#line 2012 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp18_ = gee_iterator_get (_tmp17_); -#line 2012 "/home/jens/Source/shotwell/src/Commands.vala" - s = (MediaSource*) _tmp18_; -#line 2013 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp19_ = p; -#line 2013 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp20_ = tag_for_path (_tmp19_); -#line 2013 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp21_ = _tmp20_; -#line 2013 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp22_ = s; -#line 2013 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp23_ = tag_detach (_tmp21_, _tmp22_); -#line 2013 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp24_ = _tmp23_; -#line 2013 "/home/jens/Source/shotwell/src/Commands.vala" - _g_object_unref0 (_tmp24_); -#line 2013 "/home/jens/Source/shotwell/src/Commands.vala" - _g_object_unref0 (_tmp21_); -#line 2012 "/home/jens/Source/shotwell/src/Commands.vala" - _g_object_unref0 (s); -#line 18431 "Commands.c" - } -#line 2012 "/home/jens/Source/shotwell/src/Commands.vala" - _g_object_unref0 (_s_it); -#line 18435 "Commands.c" - } -#line 2011 "/home/jens/Source/shotwell/src/Commands.vala" - _g_free0 (p); -#line 18439 "Commands.c" - } -#line 2011 "/home/jens/Source/shotwell/src/Commands.vala" - _g_object_unref0 (_p_it); -#line 18443 "Commands.c" - } -} - - -static void -reparent_tag_command_do_destination_parent_reattachments (ReparentTagCommand* self) -{ - GeeMap* _tmp0_; -#line 2016 "/home/jens/Source/shotwell/src/Commands.vala" - g_return_if_fail (IS_REPARENT_TAG_COMMAND (self)); -#line 2017 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp0_ = self->priv->dest_parent_attachments; -#line 2017 "/home/jens/Source/shotwell/src/Commands.vala" - _vala_assert (_tmp0_ != NULL, "dest_parent_attachments != null"); -#line 18458 "Commands.c" - { - GeeIterator* _p_it = NULL; - GeeMap* _tmp1_; - GeeSet* _tmp2_; - GeeSet* _tmp3_; - GeeSet* _tmp4_; - GeeIterator* _tmp5_; - GeeIterator* _tmp6_; -#line 2019 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp1_ = self->priv->dest_parent_attachments; -#line 2019 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp2_ = gee_map_get_keys (_tmp1_); -#line 2019 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp3_ = _tmp2_; -#line 2019 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp4_ = _tmp3_; -#line 2019 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp5_ = gee_iterable_iterator (G_TYPE_CHECK_INSTANCE_CAST (_tmp4_, GEE_TYPE_ITERABLE, GeeIterable)); -#line 2019 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp6_ = _tmp5_; -#line 2019 "/home/jens/Source/shotwell/src/Commands.vala" - _g_object_unref0 (_tmp4_); -#line 2019 "/home/jens/Source/shotwell/src/Commands.vala" - _p_it = _tmp6_; -#line 2019 "/home/jens/Source/shotwell/src/Commands.vala" - while (TRUE) { -#line 18485 "Commands.c" - GeeIterator* _tmp7_; - gchar* p = NULL; - GeeIterator* _tmp8_; - gpointer _tmp9_; -#line 2019 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp7_ = _p_it; -#line 2019 "/home/jens/Source/shotwell/src/Commands.vala" - if (!gee_iterator_next (_tmp7_)) { -#line 2019 "/home/jens/Source/shotwell/src/Commands.vala" - break; -#line 18496 "Commands.c" - } -#line 2019 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp8_ = _p_it; -#line 2019 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp9_ = gee_iterator_get (_tmp8_); -#line 2019 "/home/jens/Source/shotwell/src/Commands.vala" - p = (gchar*) _tmp9_; -#line 18504 "Commands.c" - { - GeeIterator* _s_it = NULL; - GeeMap* _tmp10_; - const gchar* _tmp11_; - gpointer _tmp12_; - GeeSet* _tmp13_; - GeeIterator* _tmp14_; - GeeIterator* _tmp15_; -#line 2020 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp10_ = self->priv->dest_parent_attachments; -#line 2020 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp11_ = p; -#line 2020 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp12_ = gee_map_get (_tmp10_, _tmp11_); -#line 2020 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp13_ = (GeeSet*) _tmp12_; -#line 2020 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp14_ = gee_iterable_iterator (G_TYPE_CHECK_INSTANCE_CAST (_tmp13_, GEE_TYPE_ITERABLE, GeeIterable)); -#line 2020 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp15_ = _tmp14_; -#line 2020 "/home/jens/Source/shotwell/src/Commands.vala" - _g_object_unref0 (_tmp13_); -#line 2020 "/home/jens/Source/shotwell/src/Commands.vala" - _s_it = _tmp15_; -#line 2020 "/home/jens/Source/shotwell/src/Commands.vala" - while (TRUE) { -#line 18531 "Commands.c" - GeeIterator* _tmp16_; - MediaSource* s = NULL; - GeeIterator* _tmp17_; - gpointer _tmp18_; - const gchar* _tmp19_; - Tag* _tmp20_; - Tag* _tmp21_; - MediaSource* _tmp22_; -#line 2020 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp16_ = _s_it; -#line 2020 "/home/jens/Source/shotwell/src/Commands.vala" - if (!gee_iterator_next (_tmp16_)) { -#line 2020 "/home/jens/Source/shotwell/src/Commands.vala" - break; -#line 18546 "Commands.c" - } -#line 2020 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp17_ = _s_it; -#line 2020 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp18_ = gee_iterator_get (_tmp17_); -#line 2020 "/home/jens/Source/shotwell/src/Commands.vala" - s = (MediaSource*) _tmp18_; -#line 2021 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp19_ = p; -#line 2021 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp20_ = tag_for_path (_tmp19_); -#line 2021 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp21_ = _tmp20_; -#line 2021 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp22_ = s; -#line 2021 "/home/jens/Source/shotwell/src/Commands.vala" - tag_attach (_tmp21_, _tmp22_); -#line 2021 "/home/jens/Source/shotwell/src/Commands.vala" - _g_object_unref0 (_tmp21_); -#line 2020 "/home/jens/Source/shotwell/src/Commands.vala" - _g_object_unref0 (s); -#line 18568 "Commands.c" - } -#line 2020 "/home/jens/Source/shotwell/src/Commands.vala" - _g_object_unref0 (_s_it); -#line 18572 "Commands.c" - } -#line 2019 "/home/jens/Source/shotwell/src/Commands.vala" - _g_free0 (p); -#line 18576 "Commands.c" - } -#line 2019 "/home/jens/Source/shotwell/src/Commands.vala" - _g_object_unref0 (_p_it); -#line 18580 "Commands.c" - } -} - - -static void -reparent_tag_command_copy_subtree (ReparentTagCommand* self, - const gchar* from, - const gchar* to) -{ - TagSourceCollection* _tmp0_; - Tag* from_tag = NULL; - Tag* _tmp1_; - Tag* to_tag = NULL; - Tag* _tmp2_; - GeeHashMap* _tmp3_; - GeeList* from_children = NULL; - Tag* _tmp42_; - GeeList* _tmp43_; -#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" - _vala_assert (tag_source_collection_exists (_tmp0_, from, FALSE), "Tag.global.exists(from)"); -#line 2026 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp1_ = tag_for_path (from); -#line 2026 "/home/jens/Source/shotwell/src/Commands.vala" - from_tag = _tmp1_; -#line 2029 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp2_ = tag_for_path (to); -#line 2029 "/home/jens/Source/shotwell/src/Commands.vala" - to_tag = _tmp2_; -#line 2033 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp3_ = gee_hash_map_new (G_TYPE_STRING, (GBoxedCopyFunc) g_strdup, (GDestroyNotify) g_free, GEE_TYPE_SET, (GBoxedCopyFunc) g_object_ref, (GDestroyNotify) g_object_unref, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL); -#line 2033 "/home/jens/Source/shotwell/src/Commands.vala" - _g_object_unref0 (self->priv->dest_parent_attachments); -#line 2033 "/home/jens/Source/shotwell/src/Commands.vala" - self->priv->dest_parent_attachments = G_TYPE_CHECK_INSTANCE_CAST (_tmp3_, GEE_TYPE_MAP, GeeMap); -#line 18623 "Commands.c" - { - GeeIterator* _source_it = NULL; - Tag* _tmp4_; - GeeCollection* _tmp5_; - GeeCollection* _tmp6_; - GeeIterator* _tmp7_; - GeeIterator* _tmp8_; -#line 2034 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp4_ = from_tag; -#line 2034 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp5_ = tag_get_sources (_tmp4_); -#line 2034 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp6_ = _tmp5_; -#line 2034 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp7_ = gee_iterable_iterator (G_TYPE_CHECK_INSTANCE_CAST (_tmp6_, GEE_TYPE_ITERABLE, GeeIterable)); -#line 2034 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp8_ = _tmp7_; -#line 2034 "/home/jens/Source/shotwell/src/Commands.vala" - _g_object_unref0 (_tmp6_); -#line 2034 "/home/jens/Source/shotwell/src/Commands.vala" - _source_it = _tmp8_; -#line 2034 "/home/jens/Source/shotwell/src/Commands.vala" - while (TRUE) { -#line 18647 "Commands.c" - GeeIterator* _tmp9_; - MediaSource* source = NULL; - GeeIterator* _tmp10_; - gpointer _tmp11_; - Tag* current_parent = NULL; - Tag* _tmp12_; - Tag* _tmp13_; -#line 2034 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp9_ = _source_it; -#line 2034 "/home/jens/Source/shotwell/src/Commands.vala" - if (!gee_iterator_next (_tmp9_)) { -#line 2034 "/home/jens/Source/shotwell/src/Commands.vala" - break; -#line 18661 "Commands.c" - } -#line 2034 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp10_ = _source_it; -#line 2034 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp11_ = gee_iterator_get (_tmp10_); -#line 2034 "/home/jens/Source/shotwell/src/Commands.vala" - source = (MediaSource*) _tmp11_; -#line 2035 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp12_ = to_tag; -#line 2035 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp13_ = tag_get_hierarchical_parent (_tmp12_); -#line 2035 "/home/jens/Source/shotwell/src/Commands.vala" - current_parent = _tmp13_; -#line 2036 "/home/jens/Source/shotwell/src/Commands.vala" - while (TRUE) { -#line 18677 "Commands.c" - Tag* _tmp14_; - gchar* current_parent_path = NULL; - Tag* _tmp15_; - gchar* _tmp16_; - GeeMap* _tmp17_; - const gchar* _tmp18_; - Tag* _tmp23_; - MediaSource* _tmp24_; - Tag* _tmp30_; - Tag* _tmp31_; -#line 2036 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp14_ = current_parent; -#line 2036 "/home/jens/Source/shotwell/src/Commands.vala" - if (!(_tmp14_ != NULL)) { -#line 2036 "/home/jens/Source/shotwell/src/Commands.vala" - break; -#line 18694 "Commands.c" - } -#line 2037 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp15_ = current_parent; -#line 2037 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp16_ = tag_get_path (_tmp15_); -#line 2037 "/home/jens/Source/shotwell/src/Commands.vala" - current_parent_path = _tmp16_; -#line 2038 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp17_ = self->priv->dest_parent_attachments; -#line 2038 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp18_ = current_parent_path; -#line 2038 "/home/jens/Source/shotwell/src/Commands.vala" - if (!gee_map_has_key (_tmp17_, _tmp18_)) { -#line 18708 "Commands.c" - GeeMap* _tmp19_; - const gchar* _tmp20_; - GeeHashSet* _tmp21_; - GeeHashSet* _tmp22_; -#line 2039 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp19_ = self->priv->dest_parent_attachments; -#line 2039 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp20_ = current_parent_path; -#line 2039 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp21_ = gee_hash_set_new (TYPE_MEDIA_SOURCE, (GBoxedCopyFunc) g_object_ref, (GDestroyNotify) g_object_unref, NULL, NULL, NULL, NULL, NULL, NULL); -#line 2039 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp22_ = _tmp21_; -#line 2039 "/home/jens/Source/shotwell/src/Commands.vala" - gee_map_set (_tmp19_, _tmp20_, G_TYPE_CHECK_INSTANCE_CAST (_tmp22_, GEE_TYPE_SET, GeeSet)); -#line 2039 "/home/jens/Source/shotwell/src/Commands.vala" - _g_object_unref0 (_tmp22_); -#line 18725 "Commands.c" - } -#line 2041 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp23_ = current_parent; -#line 2041 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp24_ = source; -#line 2041 "/home/jens/Source/shotwell/src/Commands.vala" - if (!tag_contains (_tmp23_, _tmp24_)) { -#line 18733 "Commands.c" - GeeMap* _tmp25_; - const gchar* _tmp26_; - gpointer _tmp27_; - GeeSet* _tmp28_; - MediaSource* _tmp29_; -#line 2042 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp25_ = self->priv->dest_parent_attachments; -#line 2042 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp26_ = current_parent_path; -#line 2042 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp27_ = gee_map_get (_tmp25_, _tmp26_); -#line 2042 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp28_ = (GeeSet*) _tmp27_; -#line 2042 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp29_ = source; -#line 2042 "/home/jens/Source/shotwell/src/Commands.vala" - gee_collection_add (G_TYPE_CHECK_INSTANCE_CAST (_tmp28_, GEE_TYPE_COLLECTION, GeeCollection), _tmp29_); -#line 2042 "/home/jens/Source/shotwell/src/Commands.vala" - _g_object_unref0 (_tmp28_); -#line 18753 "Commands.c" - } -#line 2044 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp30_ = current_parent; -#line 2044 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp31_ = tag_get_hierarchical_parent (_tmp30_); -#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 = _tmp31_; -#line 2036 "/home/jens/Source/shotwell/src/Commands.vala" - _g_free0 (current_parent_path); -#line 18765 "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 18771 "Commands.c" - } -#line 2034 "/home/jens/Source/shotwell/src/Commands.vala" - _g_object_unref0 (_source_it); -#line 18775 "Commands.c" - } - { - GeeIterator* _source_it = NULL; - Tag* _tmp32_; - GeeCollection* _tmp33_; - GeeCollection* _tmp34_; - GeeIterator* _tmp35_; - GeeIterator* _tmp36_; -#line 2048 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp32_ = from_tag; -#line 2048 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp33_ = tag_get_sources (_tmp32_); -#line 2048 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp34_ = _tmp33_; -#line 2048 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp35_ = gee_iterable_iterator (G_TYPE_CHECK_INSTANCE_CAST (_tmp34_, GEE_TYPE_ITERABLE, GeeIterable)); -#line 2048 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp36_ = _tmp35_; -#line 2048 "/home/jens/Source/shotwell/src/Commands.vala" - _g_object_unref0 (_tmp34_); -#line 2048 "/home/jens/Source/shotwell/src/Commands.vala" - _source_it = _tmp36_; -#line 2048 "/home/jens/Source/shotwell/src/Commands.vala" - while (TRUE) { -#line 18800 "Commands.c" - GeeIterator* _tmp37_; - MediaSource* source = NULL; - GeeIterator* _tmp38_; - gpointer _tmp39_; - Tag* _tmp40_; - MediaSource* _tmp41_; -#line 2048 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp37_ = _source_it; -#line 2048 "/home/jens/Source/shotwell/src/Commands.vala" - if (!gee_iterator_next (_tmp37_)) { -#line 2048 "/home/jens/Source/shotwell/src/Commands.vala" - break; -#line 18813 "Commands.c" - } -#line 2048 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp38_ = _source_it; -#line 2048 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp39_ = gee_iterator_get (_tmp38_); -#line 2048 "/home/jens/Source/shotwell/src/Commands.vala" - source = (MediaSource*) _tmp39_; -#line 2049 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp40_ = to_tag; -#line 2049 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp41_ = source; -#line 2049 "/home/jens/Source/shotwell/src/Commands.vala" - tag_attach (_tmp40_, _tmp41_); -#line 2048 "/home/jens/Source/shotwell/src/Commands.vala" - _g_object_unref0 (source); -#line 18829 "Commands.c" - } -#line 2048 "/home/jens/Source/shotwell/src/Commands.vala" - _g_object_unref0 (_source_it); -#line 18833 "Commands.c" - } -#line 2053 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp42_ = from_tag; -#line 2053 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp43_ = tag_get_hierarchical_children (_tmp42_); -#line 2053 "/home/jens/Source/shotwell/src/Commands.vala" - from_children = _tmp43_; -#line 18841 "Commands.c" - { - gint i = 0; - GeeList* _tmp44_; - gint _tmp45_; - gint _tmp46_; -#line 2054 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp44_ = from_children; -#line 2054 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp45_ = gee_collection_get_size (G_TYPE_CHECK_INSTANCE_CAST (_tmp44_, GEE_TYPE_COLLECTION, GeeCollection)); -#line 2054 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp46_ = _tmp45_; -#line 2054 "/home/jens/Source/shotwell/src/Commands.vala" - i = _tmp46_ - 1; -#line 18855 "Commands.c" - { - gboolean _tmp47_ = FALSE; -#line 2054 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp47_ = TRUE; -#line 2054 "/home/jens/Source/shotwell/src/Commands.vala" - while (TRUE) { -#line 18862 "Commands.c" - gint _tmp49_; - Tag* from_child = NULL; - GeeList* _tmp50_; - gint _tmp51_; - gpointer _tmp52_; - gchar* child_subpath = NULL; - Tag* _tmp53_; - gchar* _tmp54_; - gchar* _tmp55_; - gchar* _tmp56_; - gchar* _tmp57_; - gchar* _tmp58_; - gchar* _tmp59_; - Tag* to_child = NULL; - Tag* _tmp60_; - gchar* _tmp61_; - gchar* _tmp62_; - gchar* _tmp63_; - gchar* _tmp64_; - const gchar* _tmp65_; - gchar* _tmp66_; - gchar* _tmp67_; - Tag* _tmp68_; - Tag* _tmp69_; -#line 2054 "/home/jens/Source/shotwell/src/Commands.vala" - if (!_tmp47_) { -#line 18889 "Commands.c" - gint _tmp48_; -#line 2054 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp48_ = i; -#line 2054 "/home/jens/Source/shotwell/src/Commands.vala" - i = _tmp48_ - 1; -#line 18895 "Commands.c" - } -#line 2054 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp47_ = FALSE; -#line 2054 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp49_ = i; -#line 2054 "/home/jens/Source/shotwell/src/Commands.vala" - if (!(_tmp49_ >= 0)) { -#line 2054 "/home/jens/Source/shotwell/src/Commands.vala" - break; -#line 18905 "Commands.c" - } -#line 2055 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp50_ = from_children; -#line 2055 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp51_ = i; -#line 2055 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp52_ = gee_list_get (_tmp50_, _tmp51_); -#line 2055 "/home/jens/Source/shotwell/src/Commands.vala" - from_child = (Tag*) _tmp52_; -#line 2057 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp53_ = from_child; -#line 2057 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp54_ = tag_get_path (_tmp53_); -#line 2057 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp55_ = _tmp54_; -#line 2057 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp56_ = g_strconcat (from, TAG_PATH_SEPARATOR_STRING, NULL); -#line 2057 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp57_ = _tmp56_; -#line 2057 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp58_ = string_replace (_tmp55_, _tmp57_, ""); -#line 2057 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp59_ = _tmp58_; -#line 2057 "/home/jens/Source/shotwell/src/Commands.vala" - _g_free0 (_tmp57_); -#line 2057 "/home/jens/Source/shotwell/src/Commands.vala" - _g_free0 (_tmp55_); -#line 2057 "/home/jens/Source/shotwell/src/Commands.vala" - child_subpath = _tmp59_; -#line 2060 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp60_ = to_tag; -#line 2060 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp61_ = tag_get_path (_tmp60_); -#line 2060 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp62_ = _tmp61_; -#line 2060 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp63_ = g_strconcat (_tmp62_, TAG_PATH_SEPARATOR_STRING, NULL); -#line 2060 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp64_ = _tmp63_; -#line 2060 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp65_ = child_subpath; -#line 2060 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp66_ = g_strconcat (_tmp64_, _tmp65_, NULL); -#line 2060 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp67_ = _tmp66_; -#line 2060 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp68_ = tag_for_path (_tmp67_); -#line 2060 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp69_ = _tmp68_; -#line 2060 "/home/jens/Source/shotwell/src/Commands.vala" - _g_free0 (_tmp67_); -#line 2060 "/home/jens/Source/shotwell/src/Commands.vala" - _g_free0 (_tmp64_); -#line 2060 "/home/jens/Source/shotwell/src/Commands.vala" - _g_free0 (_tmp62_); -#line 2060 "/home/jens/Source/shotwell/src/Commands.vala" - to_child = _tmp69_; -#line 18963 "Commands.c" - { - GeeIterator* _source_it = NULL; - Tag* _tmp70_; - GeeCollection* _tmp71_; - GeeCollection* _tmp72_; - GeeIterator* _tmp73_; - GeeIterator* _tmp74_; -#line 2063 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp70_ = from_child; -#line 2063 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp71_ = tag_get_sources (_tmp70_); -#line 2063 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp72_ = _tmp71_; -#line 2063 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp73_ = gee_iterable_iterator (G_TYPE_CHECK_INSTANCE_CAST (_tmp72_, GEE_TYPE_ITERABLE, GeeIterable)); -#line 2063 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp74_ = _tmp73_; -#line 2063 "/home/jens/Source/shotwell/src/Commands.vala" - _g_object_unref0 (_tmp72_); -#line 2063 "/home/jens/Source/shotwell/src/Commands.vala" - _source_it = _tmp74_; -#line 2063 "/home/jens/Source/shotwell/src/Commands.vala" - while (TRUE) { -#line 18987 "Commands.c" - GeeIterator* _tmp75_; - MediaSource* source = NULL; - GeeIterator* _tmp76_; - gpointer _tmp77_; - Tag* _tmp78_; - MediaSource* _tmp79_; -#line 2063 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp75_ = _source_it; -#line 2063 "/home/jens/Source/shotwell/src/Commands.vala" - if (!gee_iterator_next (_tmp75_)) { -#line 2063 "/home/jens/Source/shotwell/src/Commands.vala" - break; -#line 19000 "Commands.c" - } -#line 2063 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp76_ = _source_it; -#line 2063 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp77_ = gee_iterator_get (_tmp76_); -#line 2063 "/home/jens/Source/shotwell/src/Commands.vala" - source = (MediaSource*) _tmp77_; -#line 2064 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp78_ = to_child; -#line 2064 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp79_ = source; -#line 2064 "/home/jens/Source/shotwell/src/Commands.vala" - tag_attach (_tmp78_, _tmp79_); -#line 2063 "/home/jens/Source/shotwell/src/Commands.vala" - _g_object_unref0 (source); -#line 19016 "Commands.c" - } -#line 2063 "/home/jens/Source/shotwell/src/Commands.vala" - _g_object_unref0 (_source_it); -#line 19020 "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 19028 "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 19038 "Commands.c" -} - - -static void -reparent_tag_command_destroy_subtree (ReparentTagCommand* self, - const gchar* client_path) -{ - gchar* victim_path = NULL; - gchar* _tmp0_; - const gchar* _tmp1_; - TagSourceCollection* _tmp3_; - const gchar* _tmp4_; - Tag* victim = NULL; - const gchar* _tmp5_; - Tag* _tmp6_; - GeeList* victim_children = NULL; - Tag* _tmp7_; - GeeList* _tmp8_; - TagSourceCollection* _tmp23_; - TagSourceCollection* _tmp24_; - Tag* _tmp25_; - Marker* _tmp26_; - Marker* _tmp27_; -#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_ = hierarchical_tag_utilities_get_root_path_form (client_path); -#line 2069 "/home/jens/Source/shotwell/src/Commands.vala" - victim_path = _tmp0_; -#line 2070 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp1_ = victim_path; -#line 2070 "/home/jens/Source/shotwell/src/Commands.vala" - if (_tmp1_ == NULL) { -#line 19074 "Commands.c" - gchar* _tmp2_; -#line 2071 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp2_ = g_strdup (client_path); -#line 2071 "/home/jens/Source/shotwell/src/Commands.vala" - _g_free0 (victim_path); -#line 2071 "/home/jens/Source/shotwell/src/Commands.vala" - victim_path = _tmp2_; -#line 19082 "Commands.c" - } -#line 2073 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp3_ = tag_global; -#line 2073 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp4_ = victim_path; -#line 2073 "/home/jens/Source/shotwell/src/Commands.vala" - if (!tag_source_collection_exists (_tmp3_, _tmp4_, FALSE)) { -#line 2074 "/home/jens/Source/shotwell/src/Commands.vala" - _g_free0 (victim_path); -#line 2074 "/home/jens/Source/shotwell/src/Commands.vala" - return; -#line 19094 "Commands.c" - } -#line 2076 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp5_ = victim_path; -#line 2076 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp6_ = tag_for_path (_tmp5_); -#line 2076 "/home/jens/Source/shotwell/src/Commands.vala" - victim = _tmp6_; -#line 2079 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp7_ = victim; -#line 2079 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp8_ = tag_get_hierarchical_children (_tmp7_); -#line 2079 "/home/jens/Source/shotwell/src/Commands.vala" - victim_children = _tmp8_; -#line 19108 "Commands.c" - { - gint i = 0; -#line 2080 "/home/jens/Source/shotwell/src/Commands.vala" - i = 0; -#line 19113 "Commands.c" - { - gboolean _tmp9_ = FALSE; -#line 2080 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp9_ = TRUE; -#line 2080 "/home/jens/Source/shotwell/src/Commands.vala" - while (TRUE) { -#line 19120 "Commands.c" - gint _tmp11_; - GeeList* _tmp12_; - gint _tmp13_; - gint _tmp14_; - TagSourceCollection* _tmp15_; - TagSourceCollection* _tmp16_; - GeeList* _tmp17_; - gint _tmp18_; - gpointer _tmp19_; - Tag* _tmp20_; - Marker* _tmp21_; - Marker* _tmp22_; -#line 2080 "/home/jens/Source/shotwell/src/Commands.vala" - if (!_tmp9_) { -#line 19135 "Commands.c" - gint _tmp10_; -#line 2080 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp10_ = i; -#line 2080 "/home/jens/Source/shotwell/src/Commands.vala" - i = _tmp10_ + 1; -#line 19141 "Commands.c" - } -#line 2080 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp9_ = FALSE; -#line 2080 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp11_ = i; -#line 2080 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp12_ = victim_children; -#line 2080 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp13_ = gee_collection_get_size (G_TYPE_CHECK_INSTANCE_CAST (_tmp12_, GEE_TYPE_COLLECTION, GeeCollection)); -#line 2080 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp14_ = _tmp13_; -#line 2080 "/home/jens/Source/shotwell/src/Commands.vala" - if (!(_tmp11_ < _tmp14_)) { -#line 2080 "/home/jens/Source/shotwell/src/Commands.vala" - break; -#line 19157 "Commands.c" - } -#line 2081 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp15_ = tag_global; -#line 2081 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp16_ = tag_global; -#line 2081 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp17_ = victim_children; -#line 2081 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp18_ = i; -#line 2081 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp19_ = gee_list_get (_tmp17_, _tmp18_); -#line 2081 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp20_ = (Tag*) _tmp19_; -#line 2081 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp21_ = data_collection_mark (G_TYPE_CHECK_INSTANCE_CAST (_tmp16_, TYPE_DATA_COLLECTION, DataCollection), G_TYPE_CHECK_INSTANCE_CAST (_tmp20_, TYPE_DATA_OBJECT, DataObject)); -#line 2081 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp22_ = _tmp21_; -#line 2081 "/home/jens/Source/shotwell/src/Commands.vala" - source_collection_destroy_marked (G_TYPE_CHECK_INSTANCE_CAST (_tmp15_, TYPE_SOURCE_COLLECTION, SourceCollection), _tmp22_, TRUE, NULL, NULL, NULL); -#line 2081 "/home/jens/Source/shotwell/src/Commands.vala" - _g_object_unref0 (_tmp22_); -#line 2081 "/home/jens/Source/shotwell/src/Commands.vala" - _g_object_unref0 (_tmp20_); -#line 19181 "Commands.c" - } - } - } -#line 2084 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp23_ = tag_global; -#line 2084 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp24_ = tag_global; -#line 2084 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp25_ = victim; -#line 2084 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp26_ = data_collection_mark (G_TYPE_CHECK_INSTANCE_CAST (_tmp24_, TYPE_DATA_COLLECTION, DataCollection), G_TYPE_CHECK_INSTANCE_CAST (_tmp25_, TYPE_DATA_OBJECT, DataObject)); -#line 2084 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp27_ = _tmp26_; -#line 2084 "/home/jens/Source/shotwell/src/Commands.vala" - source_collection_destroy_marked (G_TYPE_CHECK_INSTANCE_CAST (_tmp23_, TYPE_SOURCE_COLLECTION, SourceCollection), _tmp27_, TRUE, NULL, NULL, NULL); -#line 2084 "/home/jens/Source/shotwell/src/Commands.vala" - _g_object_unref0 (_tmp27_); -#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 19205 "Commands.c" -} - - -static void -reparent_tag_command_real_execute (Command* base) -{ - ReparentTagCommand * self; - GeeList* _tmp0_; -#line 2087 "/home/jens/Source/shotwell/src/Commands.vala" - self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_REPARENT_TAG_COMMAND, ReparentTagCommand); -#line 2088 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp0_ = self->priv->after_state; -#line 2088 "/home/jens/Source/shotwell/src/Commands.vala" - if (_tmp0_ == NULL) { -#line 19220 "Commands.c" - const gchar* _tmp1_; - const gchar* _tmp2_; - const gchar* _tmp3_; - const gchar* _tmp4_; -#line 2089 "/home/jens/Source/shotwell/src/Commands.vala" - reparent_tag_command_save_before_state (self); -#line 2091 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp1_ = self->priv->to_path; -#line 2091 "/home/jens/Source/shotwell/src/Commands.vala" - reparent_tag_command_prepare_parent (self, _tmp1_); -#line 2093 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp2_ = self->priv->from_path; -#line 2093 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp3_ = self->priv->to_path; -#line 2093 "/home/jens/Source/shotwell/src/Commands.vala" - reparent_tag_command_copy_subtree (self, _tmp2_, _tmp3_); -#line 2095 "/home/jens/Source/shotwell/src/Commands.vala" - reparent_tag_command_save_after_state (self); -#line 2097 "/home/jens/Source/shotwell/src/Commands.vala" - reparent_tag_command_do_source_parent_detachments (self); -#line 2099 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp4_ = self->priv->from_path; -#line 2099 "/home/jens/Source/shotwell/src/Commands.vala" - reparent_tag_command_destroy_subtree (self, _tmp4_); -#line 19245 "Commands.c" - } else { - const gchar* _tmp5_; - const gchar* _tmp6_; - GeeMap* _tmp7_; - const gchar* _tmp8_; - const gchar* _tmp9_; -#line 2101 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp5_ = self->priv->to_path; -#line 2101 "/home/jens/Source/shotwell/src/Commands.vala" - reparent_tag_command_prepare_parent (self, _tmp5_); -#line 2103 "/home/jens/Source/shotwell/src/Commands.vala" - reparent_tag_command_restore_after_state (self); -#line 2105 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp6_ = self->priv->to_path; -#line 2105 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp7_ = self->priv->in_play_child_structure; -#line 2105 "/home/jens/Source/shotwell/src/Commands.vala" - reparent_tag_command_restore_child_attachments_at (self, _tmp6_, _tmp7_); -#line 2106 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp8_ = self->priv->to_path; -#line 2106 "/home/jens/Source/shotwell/src/Commands.vala" - reparent_tag_command_reattach_in_play_sources_at (self, _tmp8_); -#line 2108 "/home/jens/Source/shotwell/src/Commands.vala" - reparent_tag_command_do_source_parent_detachments (self); -#line 2109 "/home/jens/Source/shotwell/src/Commands.vala" - reparent_tag_command_do_destination_parent_reattachments (self); -#line 2111 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp9_ = self->priv->from_path; -#line 2111 "/home/jens/Source/shotwell/src/Commands.vala" - reparent_tag_command_destroy_subtree (self, _tmp9_); -#line 19276 "Commands.c" - } -} - - -static void -reparent_tag_command_real_undo (Command* base) -{ - ReparentTagCommand * self; - GeeList* _tmp0_; - const gchar* _tmp1_; - gboolean _tmp2_; - const gchar* _tmp4_; - GeeMap* _tmp5_; - const gchar* _tmp6_; - const gchar* _tmp7_; - const gchar* _tmp8_; - const gchar* _tmp9_; -#line 2115 "/home/jens/Source/shotwell/src/Commands.vala" - self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_REPARENT_TAG_COMMAND, ReparentTagCommand); -#line 2116 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp0_ = self->priv->src_before_state; -#line 2116 "/home/jens/Source/shotwell/src/Commands.vala" - _vala_assert (_tmp0_ != NULL, "src_before_state != null"); -#line 2118 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp1_ = self->priv->from_path; -#line 2118 "/home/jens/Source/shotwell/src/Commands.vala" - reparent_tag_command_prepare_parent (self, _tmp1_); -#line 2120 "/home/jens/Source/shotwell/src/Commands.vala" - reparent_tag_command_restore_before_state (self); -#line 2122 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp2_ = self->priv->to_path_exists; -#line 2122 "/home/jens/Source/shotwell/src/Commands.vala" - if (!_tmp2_) { -#line 19310 "Commands.c" - const gchar* _tmp3_; -#line 2123 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp3_ = self->priv->to_path; -#line 2123 "/home/jens/Source/shotwell/src/Commands.vala" - reparent_tag_command_destroy_subtree (self, _tmp3_); -#line 19316 "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 19344 "Commands.c" - const gchar* _tmp10_; -#line 2134 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp10_ = self->priv->to_path_parent_path; -#line 2134 "/home/jens/Source/shotwell/src/Commands.vala" - hierarchical_tag_utilities_cleanup_root_path (_tmp10_); -#line 19350 "Commands.c" - } -} - - -static void -reparent_tag_command_class_init (ReparentTagCommandClass * klass) -{ -#line 1679 "/home/jens/Source/shotwell/src/Commands.vala" - reparent_tag_command_parent_class = g_type_class_peek_parent (klass); -#line 1679 "/home/jens/Source/shotwell/src/Commands.vala" - g_type_class_add_private (klass, sizeof (ReparentTagCommandPrivate)); -#line 1679 "/home/jens/Source/shotwell/src/Commands.vala" - ((CommandClass *) klass)->execute = (void (*) (Command *)) reparent_tag_command_real_execute; -#line 1679 "/home/jens/Source/shotwell/src/Commands.vala" - ((CommandClass *) klass)->undo = (void (*) (Command *)) reparent_tag_command_real_undo; -#line 1679 "/home/jens/Source/shotwell/src/Commands.vala" - G_OBJECT_CLASS (klass)->finalize = reparent_tag_command_finalize; -#line 19368 "Commands.c" -} - - -static void -reparent_tag_command_instance_init (ReparentTagCommand * self) -{ - GeeHashSet* _tmp0_; -#line 1679 "/home/jens/Source/shotwell/src/Commands.vala" - self->priv = REPARENT_TAG_COMMAND_GET_PRIVATE (self); -#line 1683 "/home/jens/Source/shotwell/src/Commands.vala" - self->priv->src_before_state = NULL; -#line 1684 "/home/jens/Source/shotwell/src/Commands.vala" - self->priv->dest_before_state = NULL; -#line 1685 "/home/jens/Source/shotwell/src/Commands.vala" - self->priv->after_state = NULL; -#line 1686 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp0_ = gee_hash_set_new (TYPE_MEDIA_SOURCE, (GBoxedCopyFunc) g_object_ref, (GDestroyNotify) g_object_unref, NULL, NULL, NULL, NULL, NULL, NULL); -#line 1686 "/home/jens/Source/shotwell/src/Commands.vala" - self->priv->sources_in_play = _tmp0_; -#line 1687 "/home/jens/Source/shotwell/src/Commands.vala" - self->priv->dest_parent_attachments = NULL; -#line 1688 "/home/jens/Source/shotwell/src/Commands.vala" - self->priv->src_parent_detachments = NULL; -#line 1689 "/home/jens/Source/shotwell/src/Commands.vala" - self->priv->in_play_child_structure = NULL; -#line 1690 "/home/jens/Source/shotwell/src/Commands.vala" - self->priv->existing_dest_child_structure = NULL; -#line 1691 "/home/jens/Source/shotwell/src/Commands.vala" - self->priv->existing_dest_membership = NULL; -#line 1692 "/home/jens/Source/shotwell/src/Commands.vala" - self->priv->to_path_exists = FALSE; -#line 19400 "Commands.c" -} - - -static void -reparent_tag_command_finalize (GObject * obj) -{ - ReparentTagCommand * self; - LibraryPhotoSourceCollection* _tmp0_; - guint _tmp1_; - VideoSourceCollection* _tmp2_; - guint _tmp3_; -#line 1679 "/home/jens/Source/shotwell/src/Commands.vala" - self = G_TYPE_CHECK_INSTANCE_CAST (obj, TYPE_REPARENT_TAG_COMMAND, ReparentTagCommand); -#line 1724 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp0_ = library_photo_global; -#line 1724 "/home/jens/Source/shotwell/src/Commands.vala" - g_signal_parse_name ("items-destroyed", TYPE_SOURCE_COLLECTION, &_tmp1_, NULL, FALSE); -#line 1724 "/home/jens/Source/shotwell/src/Commands.vala" - g_signal_handlers_disconnect_matched (G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, TYPE_SOURCE_COLLECTION, SourceCollection), G_SIGNAL_MATCH_ID | G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA, _tmp1_, 0, NULL, (GCallback) _reparent_tag_command_on_items_destroyed_source_collection_items_destroyed, self); -#line 1725 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp2_ = video_global; -#line 1725 "/home/jens/Source/shotwell/src/Commands.vala" - g_signal_parse_name ("items-destroyed", TYPE_SOURCE_COLLECTION, &_tmp3_, NULL, FALSE); -#line 1725 "/home/jens/Source/shotwell/src/Commands.vala" - g_signal_handlers_disconnect_matched (G_TYPE_CHECK_INSTANCE_CAST (_tmp2_, TYPE_SOURCE_COLLECTION, SourceCollection), G_SIGNAL_MATCH_ID | G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA, _tmp3_, 0, NULL, (GCallback) _reparent_tag_command_on_items_destroyed_source_collection_items_destroyed, self); -#line 1680 "/home/jens/Source/shotwell/src/Commands.vala" - _g_free0 (self->priv->from_path); -#line 1681 "/home/jens/Source/shotwell/src/Commands.vala" - _g_free0 (self->priv->to_path); -#line 1682 "/home/jens/Source/shotwell/src/Commands.vala" - _g_free0 (self->priv->to_path_parent_path); -#line 1683 "/home/jens/Source/shotwell/src/Commands.vala" - _g_object_unref0 (self->priv->src_before_state); -#line 1684 "/home/jens/Source/shotwell/src/Commands.vala" - _g_object_unref0 (self->priv->dest_before_state); -#line 1685 "/home/jens/Source/shotwell/src/Commands.vala" - _g_object_unref0 (self->priv->after_state); -#line 1686 "/home/jens/Source/shotwell/src/Commands.vala" - _g_object_unref0 (self->priv->sources_in_play); -#line 1687 "/home/jens/Source/shotwell/src/Commands.vala" - _g_object_unref0 (self->priv->dest_parent_attachments); -#line 1688 "/home/jens/Source/shotwell/src/Commands.vala" - _g_object_unref0 (self->priv->src_parent_detachments); -#line 1689 "/home/jens/Source/shotwell/src/Commands.vala" - _g_object_unref0 (self->priv->in_play_child_structure); -#line 1690 "/home/jens/Source/shotwell/src/Commands.vala" - _g_object_unref0 (self->priv->existing_dest_child_structure); -#line 1691 "/home/jens/Source/shotwell/src/Commands.vala" - _g_object_unref0 (self->priv->existing_dest_membership); -#line 1679 "/home/jens/Source/shotwell/src/Commands.vala" - G_OBJECT_CLASS (reparent_tag_command_parent_class)->finalize (obj); -#line 19452 "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 19476 "Commands.c" -} - - -ModifyTagsCommand* -modify_tags_command_construct (GType object_type, - MediaSource* media, - GeeCollection* new_tag_list) -{ - ModifyTagsCommand * self = NULL; - MediaSource* _tmp0_; - GeeList* original_tags = NULL; - TagSourceCollection* _tmp1_; - GeeList* _tmp2_; - GeeList* _tmp3_; - GeeSortedSet* new_paths = NULL; - GeeTreeSet* _tmp20_; -#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" - self = (ModifyTagsCommand*) single_data_source_command_construct (object_type, G_TYPE_CHECK_INSTANCE_CAST (media, TYPE_DATA_SOURCE, DataSource), RESOURCES_MODIFY_TAGS_LABEL, ""); -#line 2146 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp0_ = _g_object_ref0 (media); -#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 = _tmp0_; -#line 2149 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp1_ = tag_global; -#line 2149 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp2_ = tag_source_collection_fetch_for_source (_tmp1_, media); -#line 2149 "/home/jens/Source/shotwell/src/Commands.vala" - original_tags = _tmp2_; -#line 2150 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp3_ = original_tags; -#line 2150 "/home/jens/Source/shotwell/src/Commands.vala" - if (_tmp3_ != NULL) { -#line 19515 "Commands.c" - { - GeeList* _tag_list = NULL; - GeeList* _tmp4_; - GeeList* _tmp5_; - gint _tag_size = 0; - GeeList* _tmp6_; - gint _tmp7_; - gint _tmp8_; - gint _tag_index = 0; -#line 2151 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp4_ = original_tags; -#line 2151 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp5_ = _g_object_ref0 (_tmp4_); -#line 2151 "/home/jens/Source/shotwell/src/Commands.vala" - _tag_list = _tmp5_; -#line 2151 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp6_ = _tag_list; -#line 2151 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp7_ = gee_collection_get_size (G_TYPE_CHECK_INSTANCE_CAST (_tmp6_, GEE_TYPE_COLLECTION, GeeCollection)); -#line 2151 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp8_ = _tmp7_; -#line 2151 "/home/jens/Source/shotwell/src/Commands.vala" - _tag_size = _tmp8_; -#line 2151 "/home/jens/Source/shotwell/src/Commands.vala" - _tag_index = -1; -#line 2151 "/home/jens/Source/shotwell/src/Commands.vala" - while (TRUE) { -#line 19543 "Commands.c" - gint _tmp9_; - gint _tmp10_; - gint _tmp11_; - Tag* tag = NULL; - GeeList* _tmp12_; - gint _tmp13_; - gpointer _tmp14_; - SourceProxy* proxy = NULL; - Tag* _tmp15_; - SourceProxy* _tmp16_; - GeeArrayList* _tmp17_; - SourceProxy* _tmp18_; - SourceProxy* _tmp19_; -#line 2151 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp9_ = _tag_index; -#line 2151 "/home/jens/Source/shotwell/src/Commands.vala" - _tag_index = _tmp9_ + 1; -#line 2151 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp10_ = _tag_index; -#line 2151 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp11_ = _tag_size; -#line 2151 "/home/jens/Source/shotwell/src/Commands.vala" - if (!(_tmp10_ < _tmp11_)) { -#line 2151 "/home/jens/Source/shotwell/src/Commands.vala" - break; -#line 19569 "Commands.c" - } -#line 2151 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp12_ = _tag_list; -#line 2151 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp13_ = _tag_index; -#line 2151 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp14_ = gee_list_get (_tmp12_, _tmp13_); -#line 2151 "/home/jens/Source/shotwell/src/Commands.vala" - tag = (Tag*) _tmp14_; -#line 2152 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp15_ = tag; -#line 2152 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp16_ = proxyable_get_proxy (G_TYPE_CHECK_INSTANCE_CAST (_tmp15_, TYPE_PROXYABLE, Proxyable)); -#line 2152 "/home/jens/Source/shotwell/src/Commands.vala" - proxy = _tmp16_; -#line 2153 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp17_ = self->priv->to_remove; -#line 2153 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp18_ = proxy; -#line 2153 "/home/jens/Source/shotwell/src/Commands.vala" - gee_abstract_collection_add (G_TYPE_CHECK_INSTANCE_CAST (_tmp17_, GEE_TYPE_ABSTRACT_COLLECTION, GeeAbstractCollection), _tmp18_); -#line 2154 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp19_ = proxy; -#line 2154 "/home/jens/Source/shotwell/src/Commands.vala" - g_signal_connect_object (_tmp19_, "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 19599 "Commands.c" - } -#line 2151 "/home/jens/Source/shotwell/src/Commands.vala" - _g_object_unref0 (_tag_list); -#line 19603 "Commands.c" - } - } -#line 2160 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp20_ = gee_tree_set_new (G_TYPE_STRING, (GBoxedCopyFunc) g_strdup, (GDestroyNotify) g_free, NULL, NULL, NULL); -#line 2160 "/home/jens/Source/shotwell/src/Commands.vala" - new_paths = G_TYPE_CHECK_INSTANCE_CAST (_tmp20_, GEE_TYPE_SORTED_SET, GeeSortedSet); -#line 19610 "Commands.c" - { - GeeIterator* _new_tag_it = NULL; - GeeIterator* _tmp21_; -#line 2161 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp21_ = gee_iterable_iterator (G_TYPE_CHECK_INSTANCE_CAST (new_tag_list, GEE_TYPE_ITERABLE, GeeIterable)); -#line 2161 "/home/jens/Source/shotwell/src/Commands.vala" - _new_tag_it = _tmp21_; -#line 2161 "/home/jens/Source/shotwell/src/Commands.vala" - while (TRUE) { -#line 19620 "Commands.c" - GeeIterator* _tmp22_; - Tag* new_tag = NULL; - GeeIterator* _tmp23_; - gpointer _tmp24_; - gchar* new_tag_path = NULL; - Tag* _tmp25_; - gchar* _tmp26_; - GeeSortedSet* _tmp27_; - const gchar* _tmp28_; - GeeSortedSet* _tmp29_; - const gchar* _tmp30_; - GeeList* _tmp31_; - GeeList* _tmp32_; -#line 2161 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp22_ = _new_tag_it; -#line 2161 "/home/jens/Source/shotwell/src/Commands.vala" - if (!gee_iterator_next (_tmp22_)) { -#line 2161 "/home/jens/Source/shotwell/src/Commands.vala" - break; -#line 19640 "Commands.c" - } -#line 2161 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp23_ = _new_tag_it; -#line 2161 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp24_ = gee_iterator_get (_tmp23_); -#line 2161 "/home/jens/Source/shotwell/src/Commands.vala" - new_tag = (Tag*) _tmp24_; -#line 2162 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp25_ = new_tag; -#line 2162 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp26_ = tag_get_path (_tmp25_); -#line 2162 "/home/jens/Source/shotwell/src/Commands.vala" - new_tag_path = _tmp26_; -#line 2164 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp27_ = new_paths; -#line 2164 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp28_ = new_tag_path; -#line 2164 "/home/jens/Source/shotwell/src/Commands.vala" - gee_collection_add (G_TYPE_CHECK_INSTANCE_CAST (_tmp27_, GEE_TYPE_COLLECTION, GeeCollection), _tmp28_); -#line 2165 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp29_ = new_paths; -#line 2165 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp30_ = new_tag_path; -#line 2165 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp31_ = hierarchical_tag_utilities_enumerate_parent_paths (_tmp30_); -#line 2165 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp32_ = _tmp31_; -#line 2165 "/home/jens/Source/shotwell/src/Commands.vala" - gee_collection_add_all (G_TYPE_CHECK_INSTANCE_CAST (_tmp29_, GEE_TYPE_COLLECTION, GeeCollection), G_TYPE_CHECK_INSTANCE_CAST (_tmp32_, GEE_TYPE_COLLECTION, GeeCollection)); -#line 2165 "/home/jens/Source/shotwell/src/Commands.vala" - _g_object_unref0 (_tmp32_); -#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 19676 "Commands.c" - } -#line 2161 "/home/jens/Source/shotwell/src/Commands.vala" - _g_object_unref0 (_new_tag_it); -#line 19680 "Commands.c" - } - { - GeeIterator* _path_it = NULL; - GeeSortedSet* _tmp33_; - GeeIterator* _tmp34_; -#line 2168 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp33_ = new_paths; -#line 2168 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp34_ = gee_iterable_iterator (G_TYPE_CHECK_INSTANCE_CAST (_tmp33_, GEE_TYPE_ITERABLE, GeeIterable)); -#line 2168 "/home/jens/Source/shotwell/src/Commands.vala" - _path_it = _tmp34_; -#line 2168 "/home/jens/Source/shotwell/src/Commands.vala" - while (TRUE) { -#line 19694 "Commands.c" - GeeIterator* _tmp35_; - gchar* path = NULL; - GeeIterator* _tmp36_; - gpointer _tmp37_; - TagSourceCollection* _tmp38_; - const gchar* _tmp39_; - SourceProxy* proxy = NULL; - const gchar* _tmp40_; - Tag* _tmp41_; - Tag* _tmp42_; - SourceProxy* _tmp43_; - SourceProxy* _tmp44_; - GeeArrayList* _tmp45_; - SourceProxy* _tmp46_; - SourceProxy* _tmp47_; -#line 2168 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp35_ = _path_it; -#line 2168 "/home/jens/Source/shotwell/src/Commands.vala" - if (!gee_iterator_next (_tmp35_)) { -#line 2168 "/home/jens/Source/shotwell/src/Commands.vala" - break; -#line 19716 "Commands.c" - } -#line 2168 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp36_ = _path_it; -#line 2168 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp37_ = gee_iterator_get (_tmp36_); -#line 2168 "/home/jens/Source/shotwell/src/Commands.vala" - path = (gchar*) _tmp37_; -#line 2169 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp38_ = tag_global; -#line 2169 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp39_ = path; -#line 2169 "/home/jens/Source/shotwell/src/Commands.vala" - _vala_assert (tag_source_collection_exists (_tmp38_, _tmp39_, FALSE), "Tag.global.exists(path)"); -#line 2171 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp40_ = path; -#line 2171 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp41_ = tag_for_path (_tmp40_); -#line 2171 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp42_ = _tmp41_; -#line 2171 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp43_ = proxyable_get_proxy (G_TYPE_CHECK_INSTANCE_CAST (_tmp42_, TYPE_PROXYABLE, Proxyable)); -#line 2171 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp44_ = _tmp43_; -#line 2171 "/home/jens/Source/shotwell/src/Commands.vala" - _g_object_unref0 (_tmp42_); -#line 2171 "/home/jens/Source/shotwell/src/Commands.vala" - proxy = _tmp44_; -#line 2172 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp45_ = self->priv->to_add; -#line 2172 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp46_ = proxy; -#line 2172 "/home/jens/Source/shotwell/src/Commands.vala" - gee_abstract_collection_add (G_TYPE_CHECK_INSTANCE_CAST (_tmp45_, GEE_TYPE_ABSTRACT_COLLECTION, GeeAbstractCollection), _tmp46_); -#line 2173 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp47_ = proxy; -#line 2173 "/home/jens/Source/shotwell/src/Commands.vala" - g_signal_connect_object (_tmp47_, "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 19758 "Commands.c" - } -#line 2168 "/home/jens/Source/shotwell/src/Commands.vala" - _g_object_unref0 (_path_it); -#line 19762 "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 19770 "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 19780 "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 19790 "Commands.c" - { - GeeArrayList* _proxy_list = NULL; - GeeArrayList* _tmp0_; - GeeArrayList* _tmp1_; - gint _proxy_size = 0; - GeeArrayList* _tmp2_; - gint _tmp3_; - gint _tmp4_; - gint _proxy_index = 0; -#line 2186 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp0_ = self->priv->to_remove; -#line 2186 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp1_ = _g_object_ref0 (_tmp0_); -#line 2186 "/home/jens/Source/shotwell/src/Commands.vala" - _proxy_list = _tmp1_; -#line 2186 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp2_ = _proxy_list; -#line 2186 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp3_ = gee_abstract_collection_get_size (G_TYPE_CHECK_INSTANCE_CAST (_tmp2_, GEE_TYPE_ABSTRACT_COLLECTION, GeeAbstractCollection)); -#line 2186 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp4_ = _tmp3_; -#line 2186 "/home/jens/Source/shotwell/src/Commands.vala" - _proxy_size = _tmp4_; -#line 2186 "/home/jens/Source/shotwell/src/Commands.vala" - _proxy_index = -1; -#line 2186 "/home/jens/Source/shotwell/src/Commands.vala" - while (TRUE) { -#line 19818 "Commands.c" - gint _tmp5_; - gint _tmp6_; - gint _tmp7_; - SourceProxy* proxy = NULL; - GeeArrayList* _tmp8_; - gint _tmp9_; - gpointer _tmp10_; - SourceProxy* _tmp11_; - DataSource* _tmp12_; - Tag* _tmp13_; - MediaSource* _tmp14_; - GeeList* _tmp15_; - GeeList* _tmp16_; -#line 2186 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp5_ = _proxy_index; -#line 2186 "/home/jens/Source/shotwell/src/Commands.vala" - _proxy_index = _tmp5_ + 1; -#line 2186 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp6_ = _proxy_index; -#line 2186 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp7_ = _proxy_size; -#line 2186 "/home/jens/Source/shotwell/src/Commands.vala" - if (!(_tmp6_ < _tmp7_)) { -#line 2186 "/home/jens/Source/shotwell/src/Commands.vala" - break; -#line 19844 "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 19872 "Commands.c" - } -#line 2186 "/home/jens/Source/shotwell/src/Commands.vala" - _g_object_unref0 (_proxy_list); -#line 19876 "Commands.c" - } - { - GeeArrayList* _proxy_list = NULL; - GeeArrayList* _tmp17_; - GeeArrayList* _tmp18_; - gint _proxy_size = 0; - GeeArrayList* _tmp19_; - gint _tmp20_; - gint _tmp21_; - gint _proxy_index = 0; -#line 2189 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp17_ = self->priv->to_add; -#line 2189 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp18_ = _g_object_ref0 (_tmp17_); -#line 2189 "/home/jens/Source/shotwell/src/Commands.vala" - _proxy_list = _tmp18_; -#line 2189 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp19_ = _proxy_list; -#line 2189 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp20_ = gee_abstract_collection_get_size (G_TYPE_CHECK_INSTANCE_CAST (_tmp19_, GEE_TYPE_ABSTRACT_COLLECTION, GeeAbstractCollection)); -#line 2189 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp21_ = _tmp20_; -#line 2189 "/home/jens/Source/shotwell/src/Commands.vala" - _proxy_size = _tmp21_; -#line 2189 "/home/jens/Source/shotwell/src/Commands.vala" - _proxy_index = -1; -#line 2189 "/home/jens/Source/shotwell/src/Commands.vala" - while (TRUE) { -#line 19905 "Commands.c" - gint _tmp22_; - gint _tmp23_; - gint _tmp24_; - SourceProxy* proxy = NULL; - GeeArrayList* _tmp25_; - gint _tmp26_; - gpointer _tmp27_; - SourceProxy* _tmp28_; - DataSource* _tmp29_; - Tag* _tmp30_; - MediaSource* _tmp31_; -#line 2189 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp22_ = _proxy_index; -#line 2189 "/home/jens/Source/shotwell/src/Commands.vala" - _proxy_index = _tmp22_ + 1; -#line 2189 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp23_ = _proxy_index; -#line 2189 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp24_ = _proxy_size; -#line 2189 "/home/jens/Source/shotwell/src/Commands.vala" - if (!(_tmp23_ < _tmp24_)) { -#line 2189 "/home/jens/Source/shotwell/src/Commands.vala" - break; -#line 19929 "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 19953 "Commands.c" - } -#line 2189 "/home/jens/Source/shotwell/src/Commands.vala" - _g_object_unref0 (_proxy_list); -#line 19957 "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 19968 "Commands.c" - { - GeeArrayList* _proxy_list = NULL; - GeeArrayList* _tmp0_; - GeeArrayList* _tmp1_; - gint _proxy_size = 0; - GeeArrayList* _tmp2_; - gint _tmp3_; - gint _tmp4_; - gint _proxy_index = 0; -#line 2194 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp0_ = self->priv->to_add; -#line 2194 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp1_ = _g_object_ref0 (_tmp0_); -#line 2194 "/home/jens/Source/shotwell/src/Commands.vala" - _proxy_list = _tmp1_; -#line 2194 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp2_ = _proxy_list; -#line 2194 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp3_ = gee_abstract_collection_get_size (G_TYPE_CHECK_INSTANCE_CAST (_tmp2_, GEE_TYPE_ABSTRACT_COLLECTION, GeeAbstractCollection)); -#line 2194 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp4_ = _tmp3_; -#line 2194 "/home/jens/Source/shotwell/src/Commands.vala" - _proxy_size = _tmp4_; -#line 2194 "/home/jens/Source/shotwell/src/Commands.vala" - _proxy_index = -1; -#line 2194 "/home/jens/Source/shotwell/src/Commands.vala" - while (TRUE) { -#line 19996 "Commands.c" - gint _tmp5_; - gint _tmp6_; - gint _tmp7_; - SourceProxy* proxy = NULL; - GeeArrayList* _tmp8_; - gint _tmp9_; - gpointer _tmp10_; - SourceProxy* _tmp11_; - DataSource* _tmp12_; - Tag* _tmp13_; - MediaSource* _tmp14_; - GeeList* _tmp15_; - GeeList* _tmp16_; -#line 2194 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp5_ = _proxy_index; -#line 2194 "/home/jens/Source/shotwell/src/Commands.vala" - _proxy_index = _tmp5_ + 1; -#line 2194 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp6_ = _proxy_index; -#line 2194 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp7_ = _proxy_size; -#line 2194 "/home/jens/Source/shotwell/src/Commands.vala" - if (!(_tmp6_ < _tmp7_)) { -#line 2194 "/home/jens/Source/shotwell/src/Commands.vala" - break; -#line 20022 "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 20050 "Commands.c" - } -#line 2194 "/home/jens/Source/shotwell/src/Commands.vala" - _g_object_unref0 (_proxy_list); -#line 20054 "Commands.c" - } - { - GeeArrayList* _proxy_list = NULL; - GeeArrayList* _tmp17_; - GeeArrayList* _tmp18_; - gint _proxy_size = 0; - GeeArrayList* _tmp19_; - gint _tmp20_; - gint _tmp21_; - gint _proxy_index = 0; -#line 2197 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp17_ = self->priv->to_remove; -#line 2197 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp18_ = _g_object_ref0 (_tmp17_); -#line 2197 "/home/jens/Source/shotwell/src/Commands.vala" - _proxy_list = _tmp18_; -#line 2197 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp19_ = _proxy_list; -#line 2197 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp20_ = gee_abstract_collection_get_size (G_TYPE_CHECK_INSTANCE_CAST (_tmp19_, GEE_TYPE_ABSTRACT_COLLECTION, GeeAbstractCollection)); -#line 2197 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp21_ = _tmp20_; -#line 2197 "/home/jens/Source/shotwell/src/Commands.vala" - _proxy_size = _tmp21_; -#line 2197 "/home/jens/Source/shotwell/src/Commands.vala" - _proxy_index = -1; -#line 2197 "/home/jens/Source/shotwell/src/Commands.vala" - while (TRUE) { -#line 20083 "Commands.c" - gint _tmp22_; - gint _tmp23_; - gint _tmp24_; - SourceProxy* proxy = NULL; - GeeArrayList* _tmp25_; - gint _tmp26_; - gpointer _tmp27_; - SourceProxy* _tmp28_; - DataSource* _tmp29_; - Tag* _tmp30_; - MediaSource* _tmp31_; -#line 2197 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp22_ = _proxy_index; -#line 2197 "/home/jens/Source/shotwell/src/Commands.vala" - _proxy_index = _tmp22_ + 1; -#line 2197 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp23_ = _proxy_index; -#line 2197 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp24_ = _proxy_size; -#line 2197 "/home/jens/Source/shotwell/src/Commands.vala" - if (!(_tmp23_ < _tmp24_)) { -#line 2197 "/home/jens/Source/shotwell/src/Commands.vala" - break; -#line 20107 "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 20131 "Commands.c" - } -#line 2197 "/home/jens/Source/shotwell/src/Commands.vala" - _g_object_unref0 (_proxy_list); -#line 20135 "Commands.c" - } -} - - -static void -modify_tags_command_on_proxy_broken (ModifyTagsCommand* self) -{ - CommandManager* _tmp0_; - CommandManager* _tmp1_; -#line 2201 "/home/jens/Source/shotwell/src/Commands.vala" - g_return_if_fail (IS_MODIFY_TAGS_COMMAND (self)); -#line 2202 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp0_ = command_get_command_manager (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_COMMAND, Command)); -#line 2202 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp1_ = _tmp0_; -#line 2202 "/home/jens/Source/shotwell/src/Commands.vala" - command_manager_reset (_tmp1_); -#line 2202 "/home/jens/Source/shotwell/src/Commands.vala" - _command_manager_unref0 (_tmp1_); -#line 20155 "Commands.c" -} - - -static void -modify_tags_command_class_init (ModifyTagsCommandClass * klass) -{ -#line 2138 "/home/jens/Source/shotwell/src/Commands.vala" - modify_tags_command_parent_class = g_type_class_peek_parent (klass); -#line 2138 "/home/jens/Source/shotwell/src/Commands.vala" - g_type_class_add_private (klass, sizeof (ModifyTagsCommandPrivate)); -#line 2138 "/home/jens/Source/shotwell/src/Commands.vala" - ((CommandClass *) klass)->execute = (void (*) (Command *)) modify_tags_command_real_execute; -#line 2138 "/home/jens/Source/shotwell/src/Commands.vala" - ((CommandClass *) klass)->undo = (void (*) (Command *)) modify_tags_command_real_undo; -#line 2138 "/home/jens/Source/shotwell/src/Commands.vala" - G_OBJECT_CLASS (klass)->finalize = modify_tags_command_finalize; -#line 20172 "Commands.c" -} - - -static void -modify_tags_command_instance_init (ModifyTagsCommand * self) -{ - GeeArrayList* _tmp0_; - GeeArrayList* _tmp1_; -#line 2138 "/home/jens/Source/shotwell/src/Commands.vala" - self->priv = MODIFY_TAGS_COMMAND_GET_PRIVATE (self); -#line 2140 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp0_ = gee_array_list_new (TYPE_SOURCE_PROXY, (GBoxedCopyFunc) source_proxy_ref, (GDestroyNotify) source_proxy_unref, NULL, NULL, NULL); -#line 2140 "/home/jens/Source/shotwell/src/Commands.vala" - self->priv->to_add = _tmp0_; -#line 2141 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp1_ = gee_array_list_new (TYPE_SOURCE_PROXY, (GBoxedCopyFunc) source_proxy_ref, (GDestroyNotify) source_proxy_unref, NULL, NULL, NULL); -#line 2141 "/home/jens/Source/shotwell/src/Commands.vala" - self->priv->to_remove = _tmp1_; -#line 20191 "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 20201 "Commands.c" - { - GeeArrayList* _proxy_list = NULL; - GeeArrayList* _tmp0_; - GeeArrayList* _tmp1_; - gint _proxy_size = 0; - GeeArrayList* _tmp2_; - gint _tmp3_; - gint _tmp4_; - gint _proxy_index = 0; -#line 2178 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp0_ = self->priv->to_add; -#line 2178 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp1_ = _g_object_ref0 (_tmp0_); -#line 2178 "/home/jens/Source/shotwell/src/Commands.vala" - _proxy_list = _tmp1_; -#line 2178 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp2_ = _proxy_list; -#line 2178 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp3_ = gee_abstract_collection_get_size (G_TYPE_CHECK_INSTANCE_CAST (_tmp2_, GEE_TYPE_ABSTRACT_COLLECTION, GeeAbstractCollection)); -#line 2178 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp4_ = _tmp3_; -#line 2178 "/home/jens/Source/shotwell/src/Commands.vala" - _proxy_size = _tmp4_; -#line 2178 "/home/jens/Source/shotwell/src/Commands.vala" - _proxy_index = -1; -#line 2178 "/home/jens/Source/shotwell/src/Commands.vala" - while (TRUE) { -#line 20229 "Commands.c" - gint _tmp5_; - gint _tmp6_; - gint _tmp7_; - SourceProxy* proxy = NULL; - GeeArrayList* _tmp8_; - gint _tmp9_; - gpointer _tmp10_; - SourceProxy* _tmp11_; - guint _tmp12_; -#line 2178 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp5_ = _proxy_index; -#line 2178 "/home/jens/Source/shotwell/src/Commands.vala" - _proxy_index = _tmp5_ + 1; -#line 2178 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp6_ = _proxy_index; -#line 2178 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp7_ = _proxy_size; -#line 2178 "/home/jens/Source/shotwell/src/Commands.vala" - if (!(_tmp6_ < _tmp7_)) { -#line 2178 "/home/jens/Source/shotwell/src/Commands.vala" - break; -#line 20251 "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 20269 "Commands.c" - } -#line 2178 "/home/jens/Source/shotwell/src/Commands.vala" - _g_object_unref0 (_proxy_list); -#line 20273 "Commands.c" - } - { - GeeArrayList* _proxy_list = NULL; - GeeArrayList* _tmp13_; - GeeArrayList* _tmp14_; - gint _proxy_size = 0; - GeeArrayList* _tmp15_; - gint _tmp16_; - gint _tmp17_; - gint _proxy_index = 0; -#line 2181 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp13_ = self->priv->to_remove; -#line 2181 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp14_ = _g_object_ref0 (_tmp13_); -#line 2181 "/home/jens/Source/shotwell/src/Commands.vala" - _proxy_list = _tmp14_; -#line 2181 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp15_ = _proxy_list; -#line 2181 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp16_ = gee_abstract_collection_get_size (G_TYPE_CHECK_INSTANCE_CAST (_tmp15_, GEE_TYPE_ABSTRACT_COLLECTION, GeeAbstractCollection)); -#line 2181 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp17_ = _tmp16_; -#line 2181 "/home/jens/Source/shotwell/src/Commands.vala" - _proxy_size = _tmp17_; -#line 2181 "/home/jens/Source/shotwell/src/Commands.vala" - _proxy_index = -1; -#line 2181 "/home/jens/Source/shotwell/src/Commands.vala" - while (TRUE) { -#line 20302 "Commands.c" - gint _tmp18_; - gint _tmp19_; - gint _tmp20_; - SourceProxy* proxy = NULL; - GeeArrayList* _tmp21_; - gint _tmp22_; - gpointer _tmp23_; - SourceProxy* _tmp24_; - guint _tmp25_; -#line 2181 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp18_ = _proxy_index; -#line 2181 "/home/jens/Source/shotwell/src/Commands.vala" - _proxy_index = _tmp18_ + 1; -#line 2181 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp19_ = _proxy_index; -#line 2181 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp20_ = _proxy_size; -#line 2181 "/home/jens/Source/shotwell/src/Commands.vala" - if (!(_tmp19_ < _tmp20_)) { -#line 2181 "/home/jens/Source/shotwell/src/Commands.vala" - break; -#line 20324 "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 20342 "Commands.c" - } -#line 2181 "/home/jens/Source/shotwell/src/Commands.vala" - _g_object_unref0 (_proxy_list); -#line 20346 "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 20356 "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 20381 "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; - gchar* _tmp7_; - gchar* _tmp8_; - GeeCollection* _tmp9_; - LibraryPhotoSourceCollection* _tmp10_; - VideoSourceCollection* _tmp11_; -#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" - if (attach) { -#line 20405 "Commands.c" - gchar* _tmp1_; - gchar* _tmp2_; - gchar* _tmp3_; -#line 2214 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp1_ = tag_get_user_visible_name (tag); -#line 2214 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp2_ = _tmp1_; -#line 2214 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp3_ = resources_tag_photos_label (_tmp2_, count); -#line 2214 "/home/jens/Source/shotwell/src/Commands.vala" - _g_free0 (_tmp0_); -#line 2214 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp0_ = _tmp3_; -#line 2214 "/home/jens/Source/shotwell/src/Commands.vala" - _g_free0 (_tmp2_); -#line 20421 "Commands.c" - } else { - gchar* _tmp4_; - gchar* _tmp5_; - gchar* _tmp6_; -#line 2215 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp4_ = tag_get_user_visible_name (tag); -#line 2215 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp5_ = _tmp4_; -#line 2215 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp6_ = resources_untag_photos_label (_tmp5_, count); -#line 2215 "/home/jens/Source/shotwell/src/Commands.vala" - _g_free0 (_tmp0_); -#line 2215 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp0_ = _tmp6_; -#line 2215 "/home/jens/Source/shotwell/src/Commands.vala" - _g_free0 (_tmp5_); -#line 20438 "Commands.c" - } -#line 2213 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp7_ = data_object_get_name (G_TYPE_CHECK_INSTANCE_CAST (tag, TYPE_DATA_OBJECT, DataObject)); -#line 2213 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp8_ = _tmp7_; -#line 2213 "/home/jens/Source/shotwell/src/Commands.vala" - self = (TagUntagPhotosCommand*) simple_proxyable_command_construct (object_type, G_TYPE_CHECK_INSTANCE_CAST (tag, TYPE_PROXYABLE, Proxyable), _tmp0_, _tmp8_); -#line 2213 "/home/jens/Source/shotwell/src/Commands.vala" - _g_free0 (_tmp8_); -#line 2218 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp9_ = _g_object_ref0 (sources); -#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 = _tmp9_; -#line 2219 "/home/jens/Source/shotwell/src/Commands.vala" - self->priv->attach = attach; -#line 2221 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp10_ = library_photo_global; -#line 2221 "/home/jens/Source/shotwell/src/Commands.vala" - g_signal_connect_object (G_TYPE_CHECK_INSTANCE_CAST (_tmp10_, 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" - _tmp11_ = video_global; -#line 2222 "/home/jens/Source/shotwell/src/Commands.vala" - g_signal_connect_object (G_TYPE_CHECK_INSTANCE_CAST (_tmp11_, 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 20468 "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 20480 "Commands.c" -} - - -static void -tag_untag_photos_command_real_execute_on_source (SimpleProxyableCommand* base, - DataSource* source) -{ - TagUntagPhotosCommand * self; - gboolean _tmp0_; -#line 2230 "/home/jens/Source/shotwell/src/Commands.vala" - self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_TAG_UNTAG_PHOTOS_COMMAND, TagUntagPhotosCommand); -#line 2230 "/home/jens/Source/shotwell/src/Commands.vala" - g_return_if_fail (IS_DATA_SOURCE (source)); -#line 2231 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp0_ = self->priv->attach; -#line 2231 "/home/jens/Source/shotwell/src/Commands.vala" - if (_tmp0_) { -#line 2232 "/home/jens/Source/shotwell/src/Commands.vala" - tag_untag_photos_command_do_attach (self, G_TYPE_CHECK_INSTANCE_CAST (source, TYPE_TAG, Tag)); -#line 20500 "Commands.c" - } else { -#line 2234 "/home/jens/Source/shotwell/src/Commands.vala" - tag_untag_photos_command_do_detach (self, G_TYPE_CHECK_INSTANCE_CAST (source, TYPE_TAG, Tag)); -#line 20504 "Commands.c" - } -} - - -static void -tag_untag_photos_command_real_undo_on_source (SimpleProxyableCommand* base, - DataSource* source) -{ - TagUntagPhotosCommand * self; - gboolean _tmp0_; -#line 2237 "/home/jens/Source/shotwell/src/Commands.vala" - self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_TAG_UNTAG_PHOTOS_COMMAND, TagUntagPhotosCommand); -#line 2237 "/home/jens/Source/shotwell/src/Commands.vala" - g_return_if_fail (IS_DATA_SOURCE (source)); -#line 2238 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp0_ = self->priv->attach; -#line 2238 "/home/jens/Source/shotwell/src/Commands.vala" - if (_tmp0_) { -#line 2239 "/home/jens/Source/shotwell/src/Commands.vala" - tag_untag_photos_command_do_detach (self, G_TYPE_CHECK_INSTANCE_CAST (source, TYPE_TAG, Tag)); -#line 20525 "Commands.c" - } else { -#line 2241 "/home/jens/Source/shotwell/src/Commands.vala" - tag_untag_photos_command_do_attach (self, G_TYPE_CHECK_INSTANCE_CAST (source, TYPE_TAG, Tag)); -#line 20529 "Commands.c" - } -} - - -static void -tag_untag_photos_command_do_attach (TagUntagPhotosCommand* self, - Tag* tag) -{ - GeeMultiMap* _tmp0_; -#line 2244 "/home/jens/Source/shotwell/src/Commands.vala" - g_return_if_fail (IS_TAG_UNTAG_PHOTOS_COMMAND (self)); -#line 2244 "/home/jens/Source/shotwell/src/Commands.vala" - g_return_if_fail (IS_TAG (tag)); -#line 2246 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp0_ = self->priv->detached_from; -#line 2246 "/home/jens/Source/shotwell/src/Commands.vala" - if (_tmp0_ == NULL) { -#line 20547 "Commands.c" - GeeCollection* _tmp1_; - GeeArrayList* _tmp2_; - Tag* curr_tmp = NULL; - Tag* _tmp3_; -#line 2247 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp1_ = self->priv->sources; -#line 2247 "/home/jens/Source/shotwell/src/Commands.vala" - tag_attach_many (tag, _tmp1_); -#line 2249 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp2_ = gee_array_list_new (TYPE_TAG, (GBoxedCopyFunc) g_object_ref, (GDestroyNotify) g_object_unref, NULL, NULL, NULL); -#line 2249 "/home/jens/Source/shotwell/src/Commands.vala" - _g_object_unref0 (self->priv->attached_to); -#line 2249 "/home/jens/Source/shotwell/src/Commands.vala" - self->priv->attached_to = G_TYPE_CHECK_INSTANCE_CAST (_tmp2_, GEE_TYPE_LIST, GeeList); -#line 2251 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp3_ = _g_object_ref0 (tag); -#line 2251 "/home/jens/Source/shotwell/src/Commands.vala" - curr_tmp = _tmp3_; -#line 2253 "/home/jens/Source/shotwell/src/Commands.vala" - while (TRUE) { -#line 20568 "Commands.c" - Tag* _tmp4_; - GeeList* _tmp5_; - Tag* _tmp6_; - Tag* _tmp7_; - Tag* _tmp8_; -#line 2253 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp4_ = curr_tmp; -#line 2253 "/home/jens/Source/shotwell/src/Commands.vala" - if (!(_tmp4_ != NULL)) { -#line 2253 "/home/jens/Source/shotwell/src/Commands.vala" - break; -#line 20580 "Commands.c" - } -#line 2254 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp5_ = self->priv->attached_to; -#line 2254 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp6_ = curr_tmp; -#line 2254 "/home/jens/Source/shotwell/src/Commands.vala" - gee_collection_add (G_TYPE_CHECK_INSTANCE_CAST (_tmp5_, GEE_TYPE_COLLECTION, GeeCollection), _tmp6_); -#line 2255 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp7_ = curr_tmp; -#line 2255 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp8_ = tag_get_hierarchical_parent (_tmp7_); -#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 = _tmp8_; -#line 20596 "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 20602 "Commands.c" - } - { - GeeIterator* _detached_tag_it = NULL; - GeeMultiMap* _tmp9_; - GeeMultiSet* _tmp10_; - GeeMultiSet* _tmp11_; - GeeIterator* _tmp12_; - GeeIterator* _tmp13_; -#line 2262 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp9_ = self->priv->detached_from; -#line 2262 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp10_ = gee_multi_map_get_all_keys (_tmp9_); -#line 2262 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp11_ = _tmp10_; -#line 2262 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp12_ = gee_iterable_iterator (G_TYPE_CHECK_INSTANCE_CAST (_tmp11_, GEE_TYPE_ITERABLE, GeeIterable)); -#line 2262 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp13_ = _tmp12_; -#line 2262 "/home/jens/Source/shotwell/src/Commands.vala" - _g_object_unref0 (_tmp11_); -#line 2262 "/home/jens/Source/shotwell/src/Commands.vala" - _detached_tag_it = _tmp13_; -#line 2262 "/home/jens/Source/shotwell/src/Commands.vala" - while (TRUE) { -#line 20627 "Commands.c" - GeeIterator* _tmp14_; - Tag* detached_tag = NULL; - GeeIterator* _tmp15_; - gpointer _tmp16_; - Tag* _tmp17_; - GeeMultiMap* _tmp18_; - Tag* _tmp19_; - GeeCollection* _tmp20_; - GeeCollection* _tmp21_; -#line 2262 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp14_ = _detached_tag_it; -#line 2262 "/home/jens/Source/shotwell/src/Commands.vala" - if (!gee_iterator_next (_tmp14_)) { -#line 2262 "/home/jens/Source/shotwell/src/Commands.vala" - break; -#line 20643 "Commands.c" - } -#line 2262 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp15_ = _detached_tag_it; -#line 2262 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp16_ = gee_iterator_get (_tmp15_); -#line 2262 "/home/jens/Source/shotwell/src/Commands.vala" - detached_tag = (Tag*) _tmp16_; -#line 2263 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp17_ = detached_tag; -#line 2263 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp18_ = self->priv->detached_from; -#line 2263 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp19_ = detached_tag; -#line 2263 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp20_ = gee_multi_map_get (_tmp18_, _tmp19_); -#line 2263 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp21_ = _tmp20_; -#line 2263 "/home/jens/Source/shotwell/src/Commands.vala" - tag_attach_many (_tmp17_, _tmp21_); -#line 2263 "/home/jens/Source/shotwell/src/Commands.vala" - _g_object_unref0 (_tmp21_); -#line 2262 "/home/jens/Source/shotwell/src/Commands.vala" - _g_object_unref0 (detached_tag); -#line 20667 "Commands.c" - } -#line 2262 "/home/jens/Source/shotwell/src/Commands.vala" - _g_object_unref0 (_detached_tag_it); -#line 20671 "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 20679 "Commands.c" -} - - -static void -tag_untag_photos_command_do_detach (TagUntagPhotosCommand* self, - Tag* tag) -{ - GeeList* _tmp0_; -#line 2269 "/home/jens/Source/shotwell/src/Commands.vala" - g_return_if_fail (IS_TAG_UNTAG_PHOTOS_COMMAND (self)); -#line 2269 "/home/jens/Source/shotwell/src/Commands.vala" - g_return_if_fail (IS_TAG (tag)); -#line 2270 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp0_ = self->priv->attached_to; -#line 2270 "/home/jens/Source/shotwell/src/Commands.vala" - if (_tmp0_ == NULL) { -#line 20696 "Commands.c" - GeeCollection* _tmp1_; - GeeMultiMap* _tmp2_; - GeeMultiMap* _tmp3_; - GeeSet* _tmp4_; - GeeSet* _tmp5_; -#line 2274 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp1_ = self->priv->sources; -#line 2274 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp2_ = tag_detach_many (tag, _tmp1_); -#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 = _tmp2_; -#line 2278 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp3_ = self->priv->detached_from; -#line 2278 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp4_ = gee_multi_map_get_keys (_tmp3_); -#line 2278 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp5_ = _tmp4_; -#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 (_tmp5_, GEE_TYPE_COLLECTION, GeeCollection)); -#line 2278 "/home/jens/Source/shotwell/src/Commands.vala" - _g_object_unref0 (_tmp5_); -#line 20720 "Commands.c" - } else { - { - GeeList* _t_list = NULL; - GeeList* _tmp6_; - GeeList* _tmp7_; - gint _t_size = 0; - GeeList* _tmp8_; - gint _tmp9_; - gint _tmp10_; - gint _t_index = 0; -#line 2280 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp6_ = self->priv->attached_to; -#line 2280 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp7_ = _g_object_ref0 (_tmp6_); -#line 2280 "/home/jens/Source/shotwell/src/Commands.vala" - _t_list = _tmp7_; -#line 2280 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp8_ = _t_list; -#line 2280 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp9_ = gee_collection_get_size (G_TYPE_CHECK_INSTANCE_CAST (_tmp8_, GEE_TYPE_COLLECTION, GeeCollection)); -#line 2280 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp10_ = _tmp9_; -#line 2280 "/home/jens/Source/shotwell/src/Commands.vala" - _t_size = _tmp10_; -#line 2280 "/home/jens/Source/shotwell/src/Commands.vala" - _t_index = -1; -#line 2280 "/home/jens/Source/shotwell/src/Commands.vala" - while (TRUE) { -#line 20749 "Commands.c" - gint _tmp11_; - gint _tmp12_; - gint _tmp13_; - Tag* t = NULL; - GeeList* _tmp14_; - gint _tmp15_; - gpointer _tmp16_; -#line 2280 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp11_ = _t_index; -#line 2280 "/home/jens/Source/shotwell/src/Commands.vala" - _t_index = _tmp11_ + 1; -#line 2280 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp12_ = _t_index; -#line 2280 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp13_ = _t_size; -#line 2280 "/home/jens/Source/shotwell/src/Commands.vala" - if (!(_tmp12_ < _tmp13_)) { -#line 2280 "/home/jens/Source/shotwell/src/Commands.vala" - break; -#line 20769 "Commands.c" - } -#line 2280 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp14_ = _t_list; -#line 2280 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp15_ = _t_index; -#line 2280 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp16_ = gee_list_get (_tmp14_, _tmp15_); -#line 2280 "/home/jens/Source/shotwell/src/Commands.vala" - t = (Tag*) _tmp16_; -#line 20779 "Commands.c" - { - GeeIterator* _ms_it = NULL; - GeeCollection* _tmp17_; - GeeIterator* _tmp18_; -#line 2281 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp17_ = self->priv->sources; -#line 2281 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp18_ = gee_iterable_iterator (G_TYPE_CHECK_INSTANCE_CAST (_tmp17_, GEE_TYPE_ITERABLE, GeeIterable)); -#line 2281 "/home/jens/Source/shotwell/src/Commands.vala" - _ms_it = _tmp18_; -#line 2281 "/home/jens/Source/shotwell/src/Commands.vala" - while (TRUE) { -#line 20792 "Commands.c" - GeeIterator* _tmp19_; - MediaSource* ms = NULL; - GeeIterator* _tmp20_; - gpointer _tmp21_; - Tag* _tmp22_; - MediaSource* _tmp23_; -#line 2281 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp19_ = _ms_it; -#line 2281 "/home/jens/Source/shotwell/src/Commands.vala" - if (!gee_iterator_next (_tmp19_)) { -#line 2281 "/home/jens/Source/shotwell/src/Commands.vala" - break; -#line 20805 "Commands.c" - } -#line 2281 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp20_ = _ms_it; -#line 2281 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp21_ = gee_iterator_get (_tmp20_); -#line 2281 "/home/jens/Source/shotwell/src/Commands.vala" - ms = (MediaSource*) _tmp21_; -#line 2283 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp22_ = t; -#line 2283 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp23_ = ms; -#line 2283 "/home/jens/Source/shotwell/src/Commands.vala" - if (tag_get_attachment_count (_tmp22_, _tmp23_) < 2) { -#line 20819 "Commands.c" - Tag* _tmp24_; - MediaSource* _tmp25_; - GeeList* _tmp26_; - GeeList* _tmp27_; -#line 2285 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp24_ = t; -#line 2285 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp25_ = ms; -#line 2285 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp26_ = tag_detach (_tmp24_, _tmp25_); -#line 2285 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp27_ = _tmp26_; -#line 2285 "/home/jens/Source/shotwell/src/Commands.vala" - _g_object_unref0 (_tmp27_); -#line 20834 "Commands.c" - } -#line 2281 "/home/jens/Source/shotwell/src/Commands.vala" - _g_object_unref0 (ms); -#line 20838 "Commands.c" - } -#line 2281 "/home/jens/Source/shotwell/src/Commands.vala" - _g_object_unref0 (_ms_it); -#line 20842 "Commands.c" - } -#line 2280 "/home/jens/Source/shotwell/src/Commands.vala" - _g_object_unref0 (t); -#line 20846 "Commands.c" - } -#line 2280 "/home/jens/Source/shotwell/src/Commands.vala" - _g_object_unref0 (_t_list); -#line 20850 "Commands.c" - } - } -} - - -static void -tag_untag_photos_command_on_source_destroyed (TagUntagPhotosCommand* self, - DataSource* source) -{ - gchar* _tmp0_; - gchar* _tmp1_; - GeeCollection* _tmp2_; -#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_ = data_object_to_string (G_TYPE_CHECK_INSTANCE_CAST (source, TYPE_DATA_OBJECT, DataObject)); -#line 2293 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp1_ = _tmp0_; -#line 2293 "/home/jens/Source/shotwell/src/Commands.vala" - g_debug ("Commands.vala:2293: on_source_destroyed: %s", _tmp1_); -#line 2293 "/home/jens/Source/shotwell/src/Commands.vala" - _g_free0 (_tmp1_); -#line 2294 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp2_ = self->priv->sources; -#line 2294 "/home/jens/Source/shotwell/src/Commands.vala" - if (gee_collection_contains (_tmp2_, G_TYPE_CHECK_INSTANCE_CAST (source, TYPE_MEDIA_SOURCE, MediaSource))) { -#line 20879 "Commands.c" - CommandManager* _tmp3_; - CommandManager* _tmp4_; -#line 2295 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp3_ = command_get_command_manager (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_COMMAND, Command)); -#line 2295 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp4_ = _tmp3_; -#line 2295 "/home/jens/Source/shotwell/src/Commands.vala" - command_manager_reset (_tmp4_); -#line 2295 "/home/jens/Source/shotwell/src/Commands.vala" - _command_manager_unref0 (_tmp4_); -#line 20890 "Commands.c" - } -} - - -static void -tag_untag_photos_command_class_init (TagUntagPhotosCommandClass * klass) -{ -#line 2206 "/home/jens/Source/shotwell/src/Commands.vala" - tag_untag_photos_command_parent_class = g_type_class_peek_parent (klass); -#line 2206 "/home/jens/Source/shotwell/src/Commands.vala" - g_type_class_add_private (klass, sizeof (TagUntagPhotosCommandPrivate)); -#line 2206 "/home/jens/Source/shotwell/src/Commands.vala" - ((SimpleProxyableCommandClass *) klass)->execute_on_source = (void (*) (SimpleProxyableCommand *, DataSource*)) tag_untag_photos_command_real_execute_on_source; -#line 2206 "/home/jens/Source/shotwell/src/Commands.vala" - ((SimpleProxyableCommandClass *) klass)->undo_on_source = (void (*) (SimpleProxyableCommand *, DataSource*)) tag_untag_photos_command_real_undo_on_source; -#line 2206 "/home/jens/Source/shotwell/src/Commands.vala" - G_OBJECT_CLASS (klass)->finalize = tag_untag_photos_command_finalize; -#line 20908 "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 20921 "Commands.c" -} - - -static void -tag_untag_photos_command_finalize (GObject * obj) -{ - TagUntagPhotosCommand * self; - LibraryPhotoSourceCollection* _tmp0_; - guint _tmp1_; - VideoSourceCollection* _tmp2_; - guint _tmp3_; -#line 2206 "/home/jens/Source/shotwell/src/Commands.vala" - self = G_TYPE_CHECK_INSTANCE_CAST (obj, TYPE_TAG_UNTAG_PHOTOS_COMMAND, TagUntagPhotosCommand); -#line 2226 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp0_ = library_photo_global; -#line 2226 "/home/jens/Source/shotwell/src/Commands.vala" - g_signal_parse_name ("item-destroyed", TYPE_SOURCE_COLLECTION, &_tmp1_, NULL, FALSE); -#line 2226 "/home/jens/Source/shotwell/src/Commands.vala" - g_signal_handlers_disconnect_matched (G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, TYPE_SOURCE_COLLECTION, SourceCollection), G_SIGNAL_MATCH_ID | G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA, _tmp1_, 0, NULL, (GCallback) _tag_untag_photos_command_on_source_destroyed_source_collection_item_destroyed, self); -#line 2227 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp2_ = video_global; -#line 2227 "/home/jens/Source/shotwell/src/Commands.vala" - g_signal_parse_name ("item-destroyed", TYPE_SOURCE_COLLECTION, &_tmp3_, NULL, FALSE); -#line 2227 "/home/jens/Source/shotwell/src/Commands.vala" - g_signal_handlers_disconnect_matched (G_TYPE_CHECK_INSTANCE_CAST (_tmp2_, TYPE_SOURCE_COLLECTION, SourceCollection), G_SIGNAL_MATCH_ID | G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA, _tmp3_, 0, NULL, (GCallback) _tag_untag_photos_command_on_source_destroyed_source_collection_item_destroyed, self); -#line 2207 "/home/jens/Source/shotwell/src/Commands.vala" - _g_object_unref0 (self->priv->sources); -#line 2209 "/home/jens/Source/shotwell/src/Commands.vala" - _g_object_unref0 (self->priv->detached_from); -#line 2210 "/home/jens/Source/shotwell/src/Commands.vala" - _g_object_unref0 (self->priv->attached_to); -#line 2206 "/home/jens/Source/shotwell/src/Commands.vala" - G_OBJECT_CLASS (tag_untag_photos_command_parent_class)->finalize (obj); -#line 20955 "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; - gchar* _tmp0_; - gchar* _tmp1_; - gchar* _tmp2_; - gchar* _tmp3_; - gchar* _tmp4_; - gchar* _tmp5_; - SavedSearch* _tmp6_; - gchar* _tmp7_; - gchar* _tmp8_; -#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_ = data_object_get_name (G_TYPE_CHECK_INSTANCE_CAST (search, TYPE_DATA_OBJECT, DataObject)); -#line 2305 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp1_ = _tmp0_; -#line 2305 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp2_ = resources_rename_search_label (_tmp1_, new_name); -#line 2305 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp3_ = _tmp2_; -#line 2305 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp4_ = data_object_get_name (G_TYPE_CHECK_INSTANCE_CAST (search, TYPE_DATA_OBJECT, DataObject)); -#line 2305 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp5_ = _tmp4_; -#line 2305 "/home/jens/Source/shotwell/src/Commands.vala" - self = (RenameSavedSearchCommand*) single_data_source_command_construct (object_type, G_TYPE_CHECK_INSTANCE_CAST (search, TYPE_DATA_SOURCE, DataSource), _tmp3_, _tmp5_); -#line 2305 "/home/jens/Source/shotwell/src/Commands.vala" - _g_free0 (_tmp5_); -#line 2305 "/home/jens/Source/shotwell/src/Commands.vala" - _g_free0 (_tmp3_); -#line 2305 "/home/jens/Source/shotwell/src/Commands.vala" - _g_free0 (_tmp1_); -#line 2307 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp6_ = _g_object_ref0 (search); -#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 = _tmp6_; -#line 2308 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp7_ = data_object_get_name (G_TYPE_CHECK_INSTANCE_CAST (search, 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 = _tmp7_; -#line 2309 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp8_ = g_strdup (new_name); -#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 = _tmp8_; -#line 2304 "/home/jens/Source/shotwell/src/Commands.vala" - return self; -#line 21032 "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 21042 "Commands.c" -} - - -static void -rename_saved_search_command_real_execute (Command* base) -{ - RenameSavedSearchCommand * self; - SavedSearch* _tmp0_; - const gchar* _tmp1_; -#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" - if (!saved_search_rename (_tmp0_, _tmp1_)) { -#line 21060 "Commands.c" - const gchar* _tmp2_; - gchar* _tmp3_; - gchar* _tmp4_; -#line 2314 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp2_ = self->priv->new_name; -#line 2314 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp3_ = resources_rename_search_exists_message (_tmp2_); -#line 2314 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp4_ = _tmp3_; -#line 2314 "/home/jens/Source/shotwell/src/Commands.vala" - app_window_error_message (_tmp4_, NULL); -#line 2314 "/home/jens/Source/shotwell/src/Commands.vala" - _g_free0 (_tmp4_); -#line 21074 "Commands.c" - } -} - - -static void -rename_saved_search_command_real_undo (Command* base) -{ - RenameSavedSearchCommand * self; - SavedSearch* _tmp0_; - const gchar* _tmp1_; -#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" - if (!saved_search_rename (_tmp0_, _tmp1_)) { -#line 21093 "Commands.c" - const gchar* _tmp2_; - gchar* _tmp3_; - gchar* _tmp4_; -#line 2319 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp2_ = self->priv->old_name; -#line 2319 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp3_ = resources_rename_search_exists_message (_tmp2_); -#line 2319 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp4_ = _tmp3_; -#line 2319 "/home/jens/Source/shotwell/src/Commands.vala" - app_window_error_message (_tmp4_, NULL); -#line 2319 "/home/jens/Source/shotwell/src/Commands.vala" - _g_free0 (_tmp4_); -#line 21107 "Commands.c" - } -} - - -static void -rename_saved_search_command_class_init (RenameSavedSearchCommandClass * klass) -{ -#line 2299 "/home/jens/Source/shotwell/src/Commands.vala" - rename_saved_search_command_parent_class = g_type_class_peek_parent (klass); -#line 2299 "/home/jens/Source/shotwell/src/Commands.vala" - g_type_class_add_private (klass, sizeof (RenameSavedSearchCommandPrivate)); -#line 2299 "/home/jens/Source/shotwell/src/Commands.vala" - ((CommandClass *) klass)->execute = (void (*) (Command *)) rename_saved_search_command_real_execute; -#line 2299 "/home/jens/Source/shotwell/src/Commands.vala" - ((CommandClass *) klass)->undo = (void (*) (Command *)) rename_saved_search_command_real_undo; -#line 2299 "/home/jens/Source/shotwell/src/Commands.vala" - G_OBJECT_CLASS (klass)->finalize = rename_saved_search_command_finalize; -#line 21125 "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 21134 "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 21152 "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; - gchar* _tmp0_; - gchar* _tmp1_; - gchar* _tmp2_; - gchar* _tmp3_; - gchar* _tmp4_; - gchar* _tmp5_; - SavedSearch* _tmp6_; -#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_ = data_object_get_name (G_TYPE_CHECK_INSTANCE_CAST (search, TYPE_DATA_OBJECT, DataObject)); -#line 2327 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp1_ = _tmp0_; -#line 2327 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp2_ = resources_delete_search_label (_tmp1_); -#line 2327 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp3_ = _tmp2_; -#line 2327 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp4_ = data_object_get_name (G_TYPE_CHECK_INSTANCE_CAST (search, TYPE_DATA_OBJECT, DataObject)); -#line 2327 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp5_ = _tmp4_; -#line 2327 "/home/jens/Source/shotwell/src/Commands.vala" - self = (DeleteSavedSearchCommand*) single_data_source_command_construct (object_type, G_TYPE_CHECK_INSTANCE_CAST (search, TYPE_DATA_SOURCE, DataSource), _tmp3_, _tmp5_); -#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 2327 "/home/jens/Source/shotwell/src/Commands.vala" - _g_free0 (_tmp1_); -#line 2329 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp6_ = _g_object_ref0 (search); -#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 = _tmp6_; -#line 2326 "/home/jens/Source/shotwell/src/Commands.vala" - return self; -#line 21212 "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 21221 "Commands.c" -} - - -static void -delete_saved_search_command_real_execute (Command* base) -{ - DeleteSavedSearchCommand * self; - SavedSearchTable* _tmp0_; - SavedSearchTable* _tmp1_; - SavedSearch* _tmp2_; -#line 2332 "/home/jens/Source/shotwell/src/Commands.vala" - self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_DELETE_SAVED_SEARCH_COMMAND, DeleteSavedSearchCommand); -#line 2333 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp0_ = saved_search_table_get_instance (); -#line 2333 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp1_ = _tmp0_; -#line 2333 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp2_ = self->priv->search; -#line 2333 "/home/jens/Source/shotwell/src/Commands.vala" - saved_search_table_remove (_tmp1_, _tmp2_); -#line 2333 "/home/jens/Source/shotwell/src/Commands.vala" - _saved_search_table_unref0 (_tmp1_); -#line 21244 "Commands.c" -} - - -static void -delete_saved_search_command_real_undo (Command* base) -{ - DeleteSavedSearchCommand * self; - SavedSearch* _tmp0_; -#line 2336 "/home/jens/Source/shotwell/src/Commands.vala" - self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_DELETE_SAVED_SEARCH_COMMAND, DeleteSavedSearchCommand); -#line 2337 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp0_ = self->priv->search; -#line 2337 "/home/jens/Source/shotwell/src/Commands.vala" - saved_search_reconstitute (_tmp0_); -#line 21259 "Commands.c" -} - - -static void -delete_saved_search_command_class_init (DeleteSavedSearchCommandClass * klass) -{ -#line 2323 "/home/jens/Source/shotwell/src/Commands.vala" - delete_saved_search_command_parent_class = g_type_class_peek_parent (klass); -#line 2323 "/home/jens/Source/shotwell/src/Commands.vala" - g_type_class_add_private (klass, sizeof (DeleteSavedSearchCommandPrivate)); -#line 2323 "/home/jens/Source/shotwell/src/Commands.vala" - ((CommandClass *) klass)->execute = (void (*) (Command *)) delete_saved_search_command_real_execute; -#line 2323 "/home/jens/Source/shotwell/src/Commands.vala" - ((CommandClass *) klass)->undo = (void (*) (Command *)) delete_saved_search_command_real_undo; -#line 2323 "/home/jens/Source/shotwell/src/Commands.vala" - G_OBJECT_CLASS (klass)->finalize = delete_saved_search_command_finalize; -#line 21276 "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 21285 "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 21299 "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 21324 "Commands.c" -} - - -TrashUntrashPhotosCommand* -trash_untrash_photos_command_construct (GType object_type, - GeeCollection* sources, - gboolean to_trash) -{ - TrashUntrashPhotosCommand * self = NULL; - const gchar* _tmp0_ = NULL; - const gchar* _tmp1_ = NULL; - GeeCollection* _tmp2_; - LibraryPhotoSourceCollection* _tmp3_; - VideoSourceCollection* _tmp4_; -#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" - if (to_trash) { -#line 2347 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp0_ = _ ("Move Photos to Trash"); -#line 21345 "Commands.c" - } else { -#line 2347 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp0_ = _ ("Restore Photos from Trash"); -#line 21349 "Commands.c" - } -#line 2348 "/home/jens/Source/shotwell/src/Commands.vala" - if (to_trash) { -#line 2348 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp1_ = _ ("Move the photos to the Shotwell trash"); -#line 21355 "Commands.c" - } else { -#line 2348 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp1_ = _ ("Restore the photos back to the Shotwell library"); -#line 21359 "Commands.c" - } -#line 2346 "/home/jens/Source/shotwell/src/Commands.vala" - self = (TrashUntrashPhotosCommand*) page_command_construct (object_type, _tmp0_, _tmp1_); -#line 2350 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp2_ = _g_object_ref0 (sources); -#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 = _tmp2_; -#line 2351 "/home/jens/Source/shotwell/src/Commands.vala" - self->priv->to_trash = to_trash; -#line 2353 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp3_ = library_photo_global; -#line 2353 "/home/jens/Source/shotwell/src/Commands.vala" - g_signal_connect_object (G_TYPE_CHECK_INSTANCE_CAST (_tmp3_, 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" - _tmp4_ = video_global; -#line 2354 "/home/jens/Source/shotwell/src/Commands.vala" - g_signal_connect_object (G_TYPE_CHECK_INSTANCE_CAST (_tmp4_, 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 21381 "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 21391 "Commands.c" -} - - -static ProgressDialog* -trash_untrash_photos_command_get_progress_dialog (TrashUntrashPhotosCommand* self, - gboolean to_trash) -{ - ProgressDialog* result = NULL; - GeeCollection* _tmp0_; - gint _tmp1_; - gint _tmp2_; - const gchar* _tmp3_ = NULL; - ProgressDialog* dialog = NULL; - AppWindow* _tmp4_; - AppWindow* _tmp5_; - ProgressDialog* _tmp6_; - ProgressDialog* _tmp7_; - ProgressDialog* _tmp8_; - GeeCollection* _tmp9_; - gint _tmp10_; - gint _tmp11_; -#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 21427 "Commands.c" - } -#line 2367 "/home/jens/Source/shotwell/src/Commands.vala" - if (to_trash) { -#line 2367 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp3_ = _ ("Moving Photos to Trash"); -#line 21433 "Commands.c" - } else { -#line 2367 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp3_ = _ ("Restoring Photos From Trash"); -#line 21437 "Commands.c" - } -#line 2366 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp4_ = app_window_get_instance (); -#line 2366 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp5_ = _tmp4_; -#line 2366 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp6_ = progress_dialog_new (G_TYPE_CHECK_INSTANCE_CAST (_tmp5_, gtk_window_get_type (), GtkWindow), _tmp3_, NULL); -#line 2366 "/home/jens/Source/shotwell/src/Commands.vala" - g_object_ref_sink (_tmp6_); -#line 2366 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp7_ = _tmp6_; -#line 2366 "/home/jens/Source/shotwell/src/Commands.vala" - _g_object_unref0 (_tmp5_); -#line 2366 "/home/jens/Source/shotwell/src/Commands.vala" - dialog = _tmp7_; -#line 2368 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp8_ = dialog; -#line 2368 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp9_ = self->priv->sources; -#line 2368 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp10_ = gee_collection_get_size (_tmp9_); -#line 2368 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp11_ = _tmp10_; -#line 2368 "/home/jens/Source/shotwell/src/Commands.vala" - progress_dialog_update_display_every (_tmp8_, CLAMP (_tmp11_ / 5, 2, 10)); -#line 2370 "/home/jens/Source/shotwell/src/Commands.vala" - result = dialog; -#line 2370 "/home/jens/Source/shotwell/src/Commands.vala" - return result; -#line 21467 "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 21481 "Commands.c" -} - - -static void -trash_untrash_photos_command_real_execute (Command* base) -{ - TrashUntrashPhotosCommand * self; - ProgressDialog* dialog = NULL; - gboolean _tmp0_; - ProgressDialog* _tmp1_; - ProgressMonitor monitor = NULL; - void* monitor_target; - GDestroyNotify monitor_target_destroy_notify; - ProgressDialog* _tmp2_; - gboolean _tmp4_; - ProgressDialog* _tmp7_; -#line 2373 "/home/jens/Source/shotwell/src/Commands.vala" - self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_TRASH_UNTRASH_PHOTOS_COMMAND, TrashUntrashPhotosCommand); -#line 2374 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp0_ = self->priv->to_trash; -#line 2374 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp1_ = trash_untrash_photos_command_get_progress_dialog (self, _tmp0_); -#line 2374 "/home/jens/Source/shotwell/src/Commands.vala" - dialog = _tmp1_; -#line 2376 "/home/jens/Source/shotwell/src/Commands.vala" - monitor = NULL; -#line 2376 "/home/jens/Source/shotwell/src/Commands.vala" - monitor_target = NULL; -#line 2376 "/home/jens/Source/shotwell/src/Commands.vala" - monitor_target_destroy_notify = NULL; -#line 2377 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp2_ = dialog; -#line 2377 "/home/jens/Source/shotwell/src/Commands.vala" - if (_tmp2_ != NULL) { -#line 21516 "Commands.c" - ProgressDialog* _tmp3_; -#line 2378 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp3_ = dialog; -#line 2378 "/home/jens/Source/shotwell/src/Commands.vala" - (monitor_target_destroy_notify == NULL) ? NULL : (monitor_target_destroy_notify (monitor_target), NULL); -#line 2378 "/home/jens/Source/shotwell/src/Commands.vala" - monitor = NULL; -#line 2378 "/home/jens/Source/shotwell/src/Commands.vala" - monitor_target = NULL; -#line 2378 "/home/jens/Source/shotwell/src/Commands.vala" - monitor_target_destroy_notify = NULL; -#line 2378 "/home/jens/Source/shotwell/src/Commands.vala" - monitor = _progress_dialog_monitor_progress_monitor; -#line 2378 "/home/jens/Source/shotwell/src/Commands.vala" - monitor_target = g_object_ref (_tmp3_); -#line 2378 "/home/jens/Source/shotwell/src/Commands.vala" - monitor_target_destroy_notify = g_object_unref; -#line 21534 "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 21540 "Commands.c" - ProgressMonitor _tmp5_; - void* _tmp5__target; -#line 2381 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp5_ = monitor; -#line 2381 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp5__target = monitor_target; -#line 2381 "/home/jens/Source/shotwell/src/Commands.vala" - trash_untrash_photos_command_trash (self, _tmp5_, _tmp5__target); -#line 21549 "Commands.c" - } else { - ProgressMonitor _tmp6_; - void* _tmp6__target; -#line 2383 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp6_ = monitor; -#line 2383 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp6__target = monitor_target; -#line 2383 "/home/jens/Source/shotwell/src/Commands.vala" - trash_untrash_photos_command_untrash (self, _tmp6_, _tmp6__target); -#line 21559 "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 21565 "Commands.c" - ProgressDialog* _tmp8_; -#line 2386 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp8_ = dialog; -#line 2386 "/home/jens/Source/shotwell/src/Commands.vala" - progress_dialog_close (_tmp8_); -#line 21571 "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 21583 "Commands.c" -} - - -static void -trash_untrash_photos_command_real_undo (Command* base) -{ - TrashUntrashPhotosCommand * self; - ProgressDialog* dialog = NULL; - gboolean _tmp0_; - ProgressDialog* _tmp1_; - ProgressMonitor monitor = NULL; - void* monitor_target; - GDestroyNotify monitor_target_destroy_notify; - ProgressDialog* _tmp2_; - gboolean _tmp4_; - ProgressDialog* _tmp7_; -#line 2389 "/home/jens/Source/shotwell/src/Commands.vala" - self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_TRASH_UNTRASH_PHOTOS_COMMAND, TrashUntrashPhotosCommand); -#line 2390 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp0_ = self->priv->to_trash; -#line 2390 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp1_ = trash_untrash_photos_command_get_progress_dialog (self, !_tmp0_); -#line 2390 "/home/jens/Source/shotwell/src/Commands.vala" - dialog = _tmp1_; -#line 2392 "/home/jens/Source/shotwell/src/Commands.vala" - monitor = NULL; -#line 2392 "/home/jens/Source/shotwell/src/Commands.vala" - monitor_target = NULL; -#line 2392 "/home/jens/Source/shotwell/src/Commands.vala" - monitor_target_destroy_notify = NULL; -#line 2393 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp2_ = dialog; -#line 2393 "/home/jens/Source/shotwell/src/Commands.vala" - if (_tmp2_ != NULL) { -#line 21618 "Commands.c" - ProgressDialog* _tmp3_; -#line 2394 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp3_ = dialog; -#line 2394 "/home/jens/Source/shotwell/src/Commands.vala" - (monitor_target_destroy_notify == NULL) ? NULL : (monitor_target_destroy_notify (monitor_target), NULL); -#line 2394 "/home/jens/Source/shotwell/src/Commands.vala" - monitor = NULL; -#line 2394 "/home/jens/Source/shotwell/src/Commands.vala" - monitor_target = NULL; -#line 2394 "/home/jens/Source/shotwell/src/Commands.vala" - monitor_target_destroy_notify = NULL; -#line 2394 "/home/jens/Source/shotwell/src/Commands.vala" - monitor = _progress_dialog_monitor_progress_monitor; -#line 2394 "/home/jens/Source/shotwell/src/Commands.vala" - monitor_target = g_object_ref (_tmp3_); -#line 2394 "/home/jens/Source/shotwell/src/Commands.vala" - monitor_target_destroy_notify = g_object_unref; -#line 21636 "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 21642 "Commands.c" - ProgressMonitor _tmp5_; - void* _tmp5__target; -#line 2397 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp5_ = monitor; -#line 2397 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp5__target = monitor_target; -#line 2397 "/home/jens/Source/shotwell/src/Commands.vala" - trash_untrash_photos_command_untrash (self, _tmp5_, _tmp5__target); -#line 21651 "Commands.c" - } else { - ProgressMonitor _tmp6_; - void* _tmp6__target; -#line 2399 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp6_ = monitor; -#line 2399 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp6__target = monitor_target; -#line 2399 "/home/jens/Source/shotwell/src/Commands.vala" - trash_untrash_photos_command_trash (self, _tmp6_, _tmp6__target); -#line 21661 "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 21667 "Commands.c" - ProgressDialog* _tmp8_; -#line 2402 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp8_ = dialog; -#line 2402 "/home/jens/Source/shotwell/src/Commands.vala" - progress_dialog_close (_tmp8_); -#line 21673 "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 21685 "Commands.c" -} - - -static void -trash_untrash_photos_command_trash (TrashUntrashPhotosCommand* self, - ProgressMonitor monitor, - void* monitor_target) -{ - gint ctr = 0; - gint count = 0; - GeeCollection* _tmp0_; - gint _tmp1_; - gint _tmp2_; - LibraryPhotoSourceCollection* _tmp3_; - TransactionController* _tmp4_; - TransactionController* _tmp5_; - VideoSourceCollection* _tmp6_; - TransactionController* _tmp7_; - TransactionController* _tmp8_; - LibraryPhotoSourceCollection* _tmp18_; - TransactionController* _tmp19_; - TransactionController* _tmp20_; - VideoSourceCollection* _tmp21_; - TransactionController* _tmp22_; - TransactionController* _tmp23_; -#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 21739 "Commands.c" - { - GeeIterator* _source_it = NULL; - GeeCollection* _tmp9_; - GeeIterator* _tmp10_; -#line 2412 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp9_ = self->priv->sources; -#line 2412 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp10_ = gee_iterable_iterator (G_TYPE_CHECK_INSTANCE_CAST (_tmp9_, GEE_TYPE_ITERABLE, GeeIterable)); -#line 2412 "/home/jens/Source/shotwell/src/Commands.vala" - _source_it = _tmp10_; -#line 2412 "/home/jens/Source/shotwell/src/Commands.vala" - while (TRUE) { -#line 21752 "Commands.c" - GeeIterator* _tmp11_; - MediaSource* source = NULL; - GeeIterator* _tmp12_; - gpointer _tmp13_; - MediaSource* _tmp14_; -#line 2412 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp11_ = _source_it; -#line 2412 "/home/jens/Source/shotwell/src/Commands.vala" - if (!gee_iterator_next (_tmp11_)) { -#line 2412 "/home/jens/Source/shotwell/src/Commands.vala" - break; -#line 21764 "Commands.c" - } -#line 2412 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp12_ = _source_it; -#line 2412 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp13_ = gee_iterator_get (_tmp12_); -#line 2412 "/home/jens/Source/shotwell/src/Commands.vala" - source = (MediaSource*) _tmp13_; -#line 2413 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp14_ = source; -#line 2413 "/home/jens/Source/shotwell/src/Commands.vala" - media_source_trash (_tmp14_); -#line 2414 "/home/jens/Source/shotwell/src/Commands.vala" - if (monitor != NULL) { -#line 21778 "Commands.c" - gint _tmp15_; - gint _tmp16_; - gint _tmp17_; -#line 2415 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp15_ = ctr; -#line 2415 "/home/jens/Source/shotwell/src/Commands.vala" - ctr = _tmp15_ + 1; -#line 2415 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp16_ = ctr; -#line 2415 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp17_ = count; -#line 2415 "/home/jens/Source/shotwell/src/Commands.vala" - monitor ((guint64) _tmp16_, (guint64) _tmp17_, TRUE, monitor_target); -#line 21792 "Commands.c" - } -#line 2412 "/home/jens/Source/shotwell/src/Commands.vala" - _g_object_unref0 (source); -#line 21796 "Commands.c" - } -#line 2412 "/home/jens/Source/shotwell/src/Commands.vala" - _g_object_unref0 (_source_it); -#line 21800 "Commands.c" - } -#line 2418 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp18_ = library_photo_global; -#line 2418 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp19_ = media_source_collection_get_transaction_controller (G_TYPE_CHECK_INSTANCE_CAST (_tmp18_, TYPE_MEDIA_SOURCE_COLLECTION, MediaSourceCollection)); -#line 2418 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp20_ = _tmp19_; -#line 2418 "/home/jens/Source/shotwell/src/Commands.vala" - transaction_controller_commit (_tmp20_); -#line 2419 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp21_ = video_global; -#line 2419 "/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 2419 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp23_ = _tmp22_; -#line 2419 "/home/jens/Source/shotwell/src/Commands.vala" - transaction_controller_commit (_tmp23_); -#line 21818 "Commands.c" -} - - -static void -trash_untrash_photos_command_untrash (TrashUntrashPhotosCommand* self, - ProgressMonitor monitor, - void* monitor_target) -{ - gint ctr = 0; - gint count = 0; - GeeCollection* _tmp0_; - gint _tmp1_; - gint _tmp2_; - LibraryPhotoSourceCollection* _tmp3_; - TransactionController* _tmp4_; - TransactionController* _tmp5_; - VideoSourceCollection* _tmp6_; - TransactionController* _tmp7_; - TransactionController* _tmp8_; - LibraryPhotoSourceCollection* _tmp18_; - TransactionController* _tmp19_; - TransactionController* _tmp20_; - VideoSourceCollection* _tmp21_; - TransactionController* _tmp22_; - TransactionController* _tmp23_; -#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 21872 "Commands.c" - { - GeeIterator* _source_it = NULL; - GeeCollection* _tmp9_; - GeeIterator* _tmp10_; -#line 2429 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp9_ = self->priv->sources; -#line 2429 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp10_ = gee_iterable_iterator (G_TYPE_CHECK_INSTANCE_CAST (_tmp9_, GEE_TYPE_ITERABLE, GeeIterable)); -#line 2429 "/home/jens/Source/shotwell/src/Commands.vala" - _source_it = _tmp10_; -#line 2429 "/home/jens/Source/shotwell/src/Commands.vala" - while (TRUE) { -#line 21885 "Commands.c" - GeeIterator* _tmp11_; - MediaSource* source = NULL; - GeeIterator* _tmp12_; - gpointer _tmp13_; - MediaSource* _tmp14_; -#line 2429 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp11_ = _source_it; -#line 2429 "/home/jens/Source/shotwell/src/Commands.vala" - if (!gee_iterator_next (_tmp11_)) { -#line 2429 "/home/jens/Source/shotwell/src/Commands.vala" - break; -#line 21897 "Commands.c" - } -#line 2429 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp12_ = _source_it; -#line 2429 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp13_ = gee_iterator_get (_tmp12_); -#line 2429 "/home/jens/Source/shotwell/src/Commands.vala" - source = (MediaSource*) _tmp13_; -#line 2430 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp14_ = source; -#line 2430 "/home/jens/Source/shotwell/src/Commands.vala" - media_source_untrash (_tmp14_); -#line 2431 "/home/jens/Source/shotwell/src/Commands.vala" - if (monitor != NULL) { -#line 21911 "Commands.c" - gint _tmp15_; - gint _tmp16_; - gint _tmp17_; -#line 2432 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp15_ = ctr; -#line 2432 "/home/jens/Source/shotwell/src/Commands.vala" - ctr = _tmp15_ + 1; -#line 2432 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp16_ = ctr; -#line 2432 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp17_ = count; -#line 2432 "/home/jens/Source/shotwell/src/Commands.vala" - monitor ((guint64) _tmp16_, (guint64) _tmp17_, TRUE, monitor_target); -#line 21925 "Commands.c" - } -#line 2429 "/home/jens/Source/shotwell/src/Commands.vala" - _g_object_unref0 (source); -#line 21929 "Commands.c" - } -#line 2429 "/home/jens/Source/shotwell/src/Commands.vala" - _g_object_unref0 (_source_it); -#line 21933 "Commands.c" - } -#line 2435 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp18_ = library_photo_global; -#line 2435 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp19_ = media_source_collection_get_transaction_controller (G_TYPE_CHECK_INSTANCE_CAST (_tmp18_, TYPE_MEDIA_SOURCE_COLLECTION, MediaSourceCollection)); -#line 2435 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp20_ = _tmp19_; -#line 2435 "/home/jens/Source/shotwell/src/Commands.vala" - transaction_controller_commit (_tmp20_); -#line 2436 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp21_ = video_global; -#line 2436 "/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 2436 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp23_ = _tmp22_; -#line 2436 "/home/jens/Source/shotwell/src/Commands.vala" - transaction_controller_commit (_tmp23_); -#line 21951 "Commands.c" -} - - -static void -trash_untrash_photos_command_on_photo_destroyed (TrashUntrashPhotosCommand* self, - DataSource* source) -{ - GeeCollection* _tmp0_; - GeeCollection* _tmp1_; - gint _tmp2_; - gint _tmp3_; -#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" - gee_collection_remove (_tmp0_, G_TYPE_CHECK_INSTANCE_CAST (source, TYPE_MEDIA_SOURCE, MediaSource)); -#line 2446 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp1_ = self->priv->sources; -#line 2446 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp2_ = gee_collection_get_size (_tmp1_); -#line 2446 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp3_ = _tmp2_; -#line 2446 "/home/jens/Source/shotwell/src/Commands.vala" - if (_tmp3_ == 0) { -#line 21979 "Commands.c" - CommandManager* _tmp4_; - CommandManager* _tmp5_; -#line 2447 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp4_ = command_get_command_manager (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_COMMAND, Command)); -#line 2447 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp5_ = _tmp4_; -#line 2447 "/home/jens/Source/shotwell/src/Commands.vala" - command_manager_reset (_tmp5_); -#line 2447 "/home/jens/Source/shotwell/src/Commands.vala" - _command_manager_unref0 (_tmp5_); -#line 21990 "Commands.c" - } -} - - -static void -trash_untrash_photos_command_class_init (TrashUntrashPhotosCommandClass * klass) -{ -#line 2341 "/home/jens/Source/shotwell/src/Commands.vala" - trash_untrash_photos_command_parent_class = g_type_class_peek_parent (klass); -#line 2341 "/home/jens/Source/shotwell/src/Commands.vala" - g_type_class_add_private (klass, sizeof (TrashUntrashPhotosCommandPrivate)); -#line 2341 "/home/jens/Source/shotwell/src/Commands.vala" - ((CommandClass *) klass)->execute = (void (*) (Command *)) trash_untrash_photos_command_real_execute; -#line 2341 "/home/jens/Source/shotwell/src/Commands.vala" - ((CommandClass *) klass)->undo = (void (*) (Command *)) trash_untrash_photos_command_real_undo; -#line 2341 "/home/jens/Source/shotwell/src/Commands.vala" - G_OBJECT_CLASS (klass)->finalize = trash_untrash_photos_command_finalize; -#line 22008 "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 22017 "Commands.c" -} - - -static void -trash_untrash_photos_command_finalize (GObject * obj) -{ - TrashUntrashPhotosCommand * self; - LibraryPhotoSourceCollection* _tmp0_; - guint _tmp1_; - VideoSourceCollection* _tmp2_; - guint _tmp3_; -#line 2341 "/home/jens/Source/shotwell/src/Commands.vala" - self = G_TYPE_CHECK_INSTANCE_CAST (obj, TYPE_TRASH_UNTRASH_PHOTOS_COMMAND, TrashUntrashPhotosCommand); -#line 2358 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp0_ = library_photo_global; -#line 2358 "/home/jens/Source/shotwell/src/Commands.vala" - g_signal_parse_name ("item-destroyed", TYPE_SOURCE_COLLECTION, &_tmp1_, NULL, FALSE); -#line 2358 "/home/jens/Source/shotwell/src/Commands.vala" - g_signal_handlers_disconnect_matched (G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, TYPE_SOURCE_COLLECTION, SourceCollection), G_SIGNAL_MATCH_ID | G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA, _tmp1_, 0, NULL, (GCallback) _trash_untrash_photos_command_on_photo_destroyed_source_collection_item_destroyed, self); -#line 2359 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp2_ = video_global; -#line 2359 "/home/jens/Source/shotwell/src/Commands.vala" - g_signal_parse_name ("item-destroyed", TYPE_SOURCE_COLLECTION, &_tmp3_, NULL, FALSE); -#line 2359 "/home/jens/Source/shotwell/src/Commands.vala" - g_signal_handlers_disconnect_matched (G_TYPE_CHECK_INSTANCE_CAST (_tmp2_, TYPE_SOURCE_COLLECTION, SourceCollection), G_SIGNAL_MATCH_ID | G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA, _tmp3_, 0, NULL, (GCallback) _trash_untrash_photos_command_on_photo_destroyed_source_collection_item_destroyed, self); -#line 2342 "/home/jens/Source/shotwell/src/Commands.vala" - _g_object_unref0 (self->priv->sources); -#line 2341 "/home/jens/Source/shotwell/src/Commands.vala" - G_OBJECT_CLASS (trash_untrash_photos_command_parent_class)->finalize (obj); -#line 22047 "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; - const gchar* _tmp1_ = NULL; - gint _tmp2_; - gint _tmp3_; -#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" - if (flag) { -#line 2463 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp0_ = _ ("Flag"); -#line 22081 "Commands.c" - } else { -#line 2463 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp0_ = _ ("Unflag"); -#line 22085 "Commands.c" - } -#line 2464 "/home/jens/Source/shotwell/src/Commands.vala" - if (flag) { -#line 2464 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp1_ = FLAG_UNFLAG_COMMAND_FLAG_SELECTED_STRING; -#line 22091 "Commands.c" - } else { -#line 2464 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp1_ = FLAG_UNFLAG_COMMAND_UNFLAG_SELECTED_STRING; -#line 22095 "Commands.c" - } -#line 2462 "/home/jens/Source/shotwell/src/Commands.vala" - self = (FlagUnflagCommand*) multiple_data_source_at_once_command_construct (object_type, sources, _tmp0_, _tmp1_); -#line 2466 "/home/jens/Source/shotwell/src/Commands.vala" - self->priv->flag = flag; -#line 2468 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp2_ = gee_collection_get_size (sources); -#line 2468 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp3_ = _tmp2_; -#line 2468 "/home/jens/Source/shotwell/src/Commands.vala" - if (_tmp3_ >= FLAG_UNFLAG_COMMAND_MIN_PROGRESS_BAR_THRESHOLD) { -#line 22107 "Commands.c" - const gchar* _tmp4_ = NULL; - ProgressDialog* _tmp5_; - ProgressDialog* _tmp6_; -#line 2470 "/home/jens/Source/shotwell/src/Commands.vala" - if (flag) { -#line 2470 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp4_ = FLAG_UNFLAG_COMMAND_FLAG_PROGRESS; -#line 22115 "Commands.c" - } else { -#line 2470 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp4_ = FLAG_UNFLAG_COMMAND_UNFLAG_PROGRESS; -#line 22119 "Commands.c" - } -#line 2469 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp5_ = progress_dialog_new (NULL, _tmp4_, NULL); -#line 2469 "/home/jens/Source/shotwell/src/Commands.vala" - g_object_ref_sink (_tmp5_); -#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 = _tmp5_; -#line 2472 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp6_ = self->priv->progress_dialog; -#line 2472 "/home/jens/Source/shotwell/src/Commands.vala" - gtk_widget_show_all (G_TYPE_CHECK_INSTANCE_CAST (_tmp6_, gtk_widget_get_type (), GtkWidget)); -#line 22133 "Commands.c" - } -#line 2461 "/home/jens/Source/shotwell/src/Commands.vala" - return self; -#line 22137 "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 22147 "Commands.c" -} - - -static void -flag_unflag_command_real_execute_on_all (MultipleDataSourceAtOnceCommand* base, - GeeCollection* sources) -{ - FlagUnflagCommand * self; - gint num_processed = 0; - ProgressDialog* _tmp13_; -#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 22164 "Commands.c" - { - GeeIterator* _source_it = NULL; - GeeIterator* _tmp0_; -#line 2479 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp0_ = gee_iterable_iterator (G_TYPE_CHECK_INSTANCE_CAST (sources, GEE_TYPE_ITERABLE, GeeIterable)); -#line 2479 "/home/jens/Source/shotwell/src/Commands.vala" - _source_it = _tmp0_; -#line 2479 "/home/jens/Source/shotwell/src/Commands.vala" - while (TRUE) { -#line 22174 "Commands.c" - GeeIterator* _tmp1_; - DataSource* source = NULL; - GeeIterator* _tmp2_; - gpointer _tmp3_; - DataSource* _tmp4_; - gboolean _tmp5_; - gint _tmp6_; - ProgressDialog* _tmp7_; -#line 2479 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp1_ = _source_it; -#line 2479 "/home/jens/Source/shotwell/src/Commands.vala" - if (!gee_iterator_next (_tmp1_)) { -#line 2479 "/home/jens/Source/shotwell/src/Commands.vala" - break; -#line 22189 "Commands.c" - } -#line 2479 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp2_ = _source_it; -#line 2479 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp3_ = gee_iterator_get (_tmp2_); -#line 2479 "/home/jens/Source/shotwell/src/Commands.vala" - source = (DataSource*) _tmp3_; -#line 2480 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp4_ = source; -#line 2480 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp5_ = self->priv->flag; -#line 2480 "/home/jens/Source/shotwell/src/Commands.vala" - flag_unflag_command_flag_unflag (self, _tmp4_, _tmp5_); -#line 2482 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp6_ = num_processed; -#line 2482 "/home/jens/Source/shotwell/src/Commands.vala" - num_processed = _tmp6_ + 1; -#line 2484 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp7_ = self->priv->progress_dialog; -#line 2484 "/home/jens/Source/shotwell/src/Commands.vala" - if (_tmp7_ != NULL) { -#line 22211 "Commands.c" - ProgressDialog* _tmp8_; - gint _tmp9_; - gint _tmp10_; - gint _tmp11_; - ProgressDialog* _tmp12_; -#line 2485 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp8_ = self->priv->progress_dialog; -#line 2485 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp9_ = num_processed; -#line 2485 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp10_ = gee_collection_get_size (sources); -#line 2485 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp11_ = _tmp10_; -#line 2485 "/home/jens/Source/shotwell/src/Commands.vala" - progress_dialog_set_fraction (_tmp8_, _tmp9_, _tmp11_); -#line 2486 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp12_ = self->priv->progress_dialog; -#line 2486 "/home/jens/Source/shotwell/src/Commands.vala" - gtk_widget_queue_draw (G_TYPE_CHECK_INSTANCE_CAST (_tmp12_, gtk_widget_get_type (), GtkWidget)); -#line 2487 "/home/jens/Source/shotwell/src/Commands.vala" - spin_event_loop (); -#line 22233 "Commands.c" - } -#line 2479 "/home/jens/Source/shotwell/src/Commands.vala" - _g_object_unref0 (source); -#line 22237 "Commands.c" - } -#line 2479 "/home/jens/Source/shotwell/src/Commands.vala" - _g_object_unref0 (_source_it); -#line 22241 "Commands.c" - } -#line 2491 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp13_ = self->priv->progress_dialog; -#line 2491 "/home/jens/Source/shotwell/src/Commands.vala" - if (_tmp13_ != NULL) { -#line 22247 "Commands.c" - ProgressDialog* _tmp14_; -#line 2492 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp14_ = self->priv->progress_dialog; -#line 2492 "/home/jens/Source/shotwell/src/Commands.vala" - gtk_widget_hide (G_TYPE_CHECK_INSTANCE_CAST (_tmp14_, gtk_widget_get_type (), GtkWidget)); -#line 22253 "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 22267 "Commands.c" - { - GeeIterator* _source_it = NULL; - GeeIterator* _tmp0_; -#line 2496 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp0_ = gee_iterable_iterator (G_TYPE_CHECK_INSTANCE_CAST (sources, GEE_TYPE_ITERABLE, GeeIterable)); -#line 2496 "/home/jens/Source/shotwell/src/Commands.vala" - _source_it = _tmp0_; -#line 2496 "/home/jens/Source/shotwell/src/Commands.vala" - while (TRUE) { -#line 22277 "Commands.c" - GeeIterator* _tmp1_; - DataSource* source = NULL; - GeeIterator* _tmp2_; - gpointer _tmp3_; - DataSource* _tmp4_; - gboolean _tmp5_; -#line 2496 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp1_ = _source_it; -#line 2496 "/home/jens/Source/shotwell/src/Commands.vala" - if (!gee_iterator_next (_tmp1_)) { -#line 2496 "/home/jens/Source/shotwell/src/Commands.vala" - break; -#line 22290 "Commands.c" - } -#line 2496 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp2_ = _source_it; -#line 2496 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp3_ = gee_iterator_get (_tmp2_); -#line 2496 "/home/jens/Source/shotwell/src/Commands.vala" - source = (DataSource*) _tmp3_; -#line 2497 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp4_ = source; -#line 2497 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp5_ = self->priv->flag; -#line 2497 "/home/jens/Source/shotwell/src/Commands.vala" - flag_unflag_command_flag_unflag (self, _tmp4_, !_tmp5_); -#line 2496 "/home/jens/Source/shotwell/src/Commands.vala" - _g_object_unref0 (source); -#line 22306 "Commands.c" - } -#line 2496 "/home/jens/Source/shotwell/src/Commands.vala" - _g_object_unref0 (_source_it); -#line 22310 "Commands.c" - } -} - - -static void -flag_unflag_command_flag_unflag (FlagUnflagCommand* self, - DataSource* source, - gboolean flag) -{ - Flaggable* flaggable = NULL; - Flaggable* _tmp0_; - Flaggable* _tmp1_; -#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_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_TYPE (source, TYPE_FLAGGABLE) ? ((Flaggable*) source) : NULL); -#line 2501 "/home/jens/Source/shotwell/src/Commands.vala" - flaggable = _tmp0_; -#line 2502 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp1_ = flaggable; -#line 2502 "/home/jens/Source/shotwell/src/Commands.vala" - if (_tmp1_ != NULL) { -#line 2503 "/home/jens/Source/shotwell/src/Commands.vala" - if (flag) { -#line 22337 "Commands.c" - Flaggable* _tmp2_; -#line 2504 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp2_ = flaggable; -#line 2504 "/home/jens/Source/shotwell/src/Commands.vala" - flaggable_mark_flagged (_tmp2_); -#line 22343 "Commands.c" - } else { - Flaggable* _tmp3_; -#line 2506 "/home/jens/Source/shotwell/src/Commands.vala" - _tmp3_ = flaggable; -#line 2506 "/home/jens/Source/shotwell/src/Commands.vala" - flaggable_mark_unflagged (_tmp3_); -#line 22350 "Commands.c" - } - } -#line 2500 "/home/jens/Source/shotwell/src/Commands.vala" - _g_object_unref0 (flaggable); -#line 22355 "Commands.c" -} - - -static void -flag_unflag_command_class_init (FlagUnflagCommandClass * klass) -{ -#line 2451 "/home/jens/Source/shotwell/src/Commands.vala" - flag_unflag_command_parent_class = g_type_class_peek_parent (klass); -#line 2451 "/home/jens/Source/shotwell/src/Commands.vala" - g_type_class_add_private (klass, sizeof (FlagUnflagCommandPrivate)); -#line 2451 "/home/jens/Source/shotwell/src/Commands.vala" - ((MultipleDataSourceAtOnceCommandClass *) klass)->execute_on_all = (void (*) (MultipleDataSourceAtOnceCommand *, GeeCollection*)) flag_unflag_command_real_execute_on_all; -#line 2451 "/home/jens/Source/shotwell/src/Commands.vala" - ((MultipleDataSourceAtOnceCommandClass *) klass)->undo_on_all = (void (*) (MultipleDataSourceAtOnceCommand *, GeeCollection*)) flag_unflag_command_real_undo_on_all; -#line 2451 "/home/jens/Source/shotwell/src/Commands.vala" - G_OBJECT_CLASS (klass)->finalize = flag_unflag_command_finalize; -#line 22372 "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 22383 "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 22397 "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; -} - - - |