diff options
author | Jörg Frings-Fürst <debian@jff.email> | 2018-09-30 14:11:00 +0200 |
---|---|---|
committer | Jörg Frings-Fürst <debian@jff.email> | 2018-09-30 14:11:00 +0200 |
commit | 0ac947a9070322180e94d1b71e30836cce4d74bc (patch) | |
tree | 4a6f3923c250377536a5004ed203768111a1d27f /src/Event.c | |
parent | eca5837e235a356c8db9416bbbc13577db3e6f76 (diff) | |
parent | 01b2b5ec9177046f64c6d0a6e73a6ac8a42089a1 (diff) |
Merge branch 'feature/upstream' into develop
Diffstat (limited to 'src/Event.c')
-rw-r--r-- | src/Event.c | 7743 |
1 files changed, 0 insertions, 7743 deletions
diff --git a/src/Event.c b/src/Event.c deleted file mode 100644 index 7ebadad..0000000 --- a/src/Event.c +++ /dev/null @@ -1,7743 +0,0 @@ -/* Event.c generated by valac 0.40.4, the Vala compiler - * generated from Event.vala, do not modify */ - -/* Copyright 2016 Software Freedom Conservancy Inc. - * - * This software is licensed under the GNU LGPL (version 2.1 or later). - * See the COPYING file in this distribution. - */ - - -#include <glib.h> -#include <glib-object.h> -#include <stdlib.h> -#include <string.h> -#include <gee.h> -#include <gdk-pixbuf/gdk-pixbuf.h> -#include <time.h> -#include <gtk/gtk.h> -#include <glib/gi18n-lib.h> - - -#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; -typedef struct _DataCollectionPrivate DataCollectionPrivate; - -#define TYPE_DATA_OBJECT (data_object_get_type ()) -#define DATA_OBJECT(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_DATA_OBJECT, DataObject)) -#define DATA_OBJECT_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_DATA_OBJECT, DataObjectClass)) -#define IS_DATA_OBJECT(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_DATA_OBJECT)) -#define IS_DATA_OBJECT_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_DATA_OBJECT)) -#define DATA_OBJECT_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_DATA_OBJECT, DataObjectClass)) - -typedef struct _DataObject DataObject; -typedef struct _DataObjectClass DataObjectClass; - -#define TYPE_ALTERATION (alteration_get_type ()) -#define ALTERATION(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_ALTERATION, Alteration)) -#define ALTERATION_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_ALTERATION, AlterationClass)) -#define IS_ALTERATION(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_ALTERATION)) -#define IS_ALTERATION_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_ALTERATION)) -#define ALTERATION_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_ALTERATION, AlterationClass)) - -typedef struct _Alteration Alteration; -typedef struct _AlterationClass AlterationClass; - -#define 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_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; -typedef struct _SourceCollectionPrivate SourceCollectionPrivate; - -#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_SOURCE_BACKLINK (source_backlink_get_type ()) -#define SOURCE_BACKLINK(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_SOURCE_BACKLINK, SourceBacklink)) -#define SOURCE_BACKLINK_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_SOURCE_BACKLINK, SourceBacklinkClass)) -#define IS_SOURCE_BACKLINK(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_SOURCE_BACKLINK)) -#define IS_SOURCE_BACKLINK_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_SOURCE_BACKLINK)) -#define SOURCE_BACKLINK_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_SOURCE_BACKLINK, SourceBacklinkClass)) - -typedef struct _SourceBacklink SourceBacklink; -typedef struct _SourceBacklinkClass SourceBacklinkClass; - -#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; -typedef struct _DatabaseSourceCollectionPrivate DatabaseSourceCollectionPrivate; - -#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; -typedef struct _ContainerSourceCollectionPrivate ContainerSourceCollectionPrivate; - -#define TYPE_CONTAINER_SOURCE (container_source_get_type ()) -#define CONTAINER_SOURCE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_CONTAINER_SOURCE, ContainerSource)) -#define IS_CONTAINER_SOURCE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_CONTAINER_SOURCE)) -#define CONTAINER_SOURCE_GET_INTERFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE ((obj), TYPE_CONTAINER_SOURCE, ContainerSourceIface)) - -typedef struct _ContainerSource ContainerSource; -typedef struct _ContainerSourceIface ContainerSourceIface; - -#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; -typedef struct _EventSourceCollectionPrivate EventSourceCollectionPrivate; - -#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_MEDIA_SOURCE_COLLECTION (media_source_collection_get_type ()) -#define MEDIA_SOURCE_COLLECTION(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_MEDIA_SOURCE_COLLECTION, MediaSourceCollection)) -#define MEDIA_SOURCE_COLLECTION_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_MEDIA_SOURCE_COLLECTION, MediaSourceCollectionClass)) -#define IS_MEDIA_SOURCE_COLLECTION(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_MEDIA_SOURCE_COLLECTION)) -#define IS_MEDIA_SOURCE_COLLECTION_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_MEDIA_SOURCE_COLLECTION)) -#define MEDIA_SOURCE_COLLECTION_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_MEDIA_SOURCE_COLLECTION, MediaSourceCollectionClass)) - -typedef struct _MediaSourceCollection MediaSourceCollection; -typedef struct _MediaSourceCollectionClass MediaSourceCollectionClass; - -#define TYPE_LIBRARY_PHOTO_SOURCE_COLLECTION (library_photo_source_collection_get_type ()) -#define LIBRARY_PHOTO_SOURCE_COLLECTION(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_LIBRARY_PHOTO_SOURCE_COLLECTION, LibraryPhotoSourceCollection)) -#define LIBRARY_PHOTO_SOURCE_COLLECTION_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_LIBRARY_PHOTO_SOURCE_COLLECTION, LibraryPhotoSourceCollectionClass)) -#define IS_LIBRARY_PHOTO_SOURCE_COLLECTION(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_LIBRARY_PHOTO_SOURCE_COLLECTION)) -#define IS_LIBRARY_PHOTO_SOURCE_COLLECTION_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_LIBRARY_PHOTO_SOURCE_COLLECTION)) -#define LIBRARY_PHOTO_SOURCE_COLLECTION_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_LIBRARY_PHOTO_SOURCE_COLLECTION, LibraryPhotoSourceCollectionClass)) - -typedef struct _LibraryPhotoSourceCollection LibraryPhotoSourceCollection; -typedef struct _LibraryPhotoSourceCollectionClass LibraryPhotoSourceCollectionClass; - -#define TYPE_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_VIEW_MANAGER (view_manager_get_type ()) -#define VIEW_MANAGER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_VIEW_MANAGER, ViewManager)) -#define VIEW_MANAGER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_VIEW_MANAGER, ViewManagerClass)) -#define IS_VIEW_MANAGER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_VIEW_MANAGER)) -#define IS_VIEW_MANAGER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_VIEW_MANAGER)) -#define VIEW_MANAGER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_VIEW_MANAGER, ViewManagerClass)) - -typedef struct _ViewManager ViewManager; -typedef struct _ViewManagerClass ViewManagerClass; - -#define EVENT_SOURCE_COLLECTION_TYPE_NO_EVENT_VIEW_MANAGER (event_source_collection_no_event_view_manager_get_type ()) -#define EVENT_SOURCE_COLLECTION_NO_EVENT_VIEW_MANAGER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), EVENT_SOURCE_COLLECTION_TYPE_NO_EVENT_VIEW_MANAGER, EventSourceCollectionNoEventViewManager)) -#define EVENT_SOURCE_COLLECTION_NO_EVENT_VIEW_MANAGER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), EVENT_SOURCE_COLLECTION_TYPE_NO_EVENT_VIEW_MANAGER, EventSourceCollectionNoEventViewManagerClass)) -#define EVENT_SOURCE_COLLECTION_IS_NO_EVENT_VIEW_MANAGER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), EVENT_SOURCE_COLLECTION_TYPE_NO_EVENT_VIEW_MANAGER)) -#define EVENT_SOURCE_COLLECTION_IS_NO_EVENT_VIEW_MANAGER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), EVENT_SOURCE_COLLECTION_TYPE_NO_EVENT_VIEW_MANAGER)) -#define EVENT_SOURCE_COLLECTION_NO_EVENT_VIEW_MANAGER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), EVENT_SOURCE_COLLECTION_TYPE_NO_EVENT_VIEW_MANAGER, EventSourceCollectionNoEventViewManagerClass)) - -typedef struct _EventSourceCollectionNoEventViewManager EventSourceCollectionNoEventViewManager; -typedef struct _EventSourceCollectionNoEventViewManagerClass EventSourceCollectionNoEventViewManagerClass; - -#define VIEW_COLLECTION_TYPE_MONITOR (view_collection_monitor_get_type ()) -#define VIEW_COLLECTION_MONITOR(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), VIEW_COLLECTION_TYPE_MONITOR, ViewCollectionMonitor)) -#define VIEW_COLLECTION_MONITOR_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), VIEW_COLLECTION_TYPE_MONITOR, ViewCollectionMonitorClass)) -#define VIEW_COLLECTION_IS_MONITOR(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), VIEW_COLLECTION_TYPE_MONITOR)) -#define VIEW_COLLECTION_IS_MONITOR_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), VIEW_COLLECTION_TYPE_MONITOR)) -#define VIEW_COLLECTION_MONITOR_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), VIEW_COLLECTION_TYPE_MONITOR, ViewCollectionMonitorClass)) - -typedef struct _ViewCollectionMonitor ViewCollectionMonitor; -typedef struct _ViewCollectionMonitorClass ViewCollectionMonitorClass; -#define _view_collection_monitor_unref0(var) ((var == NULL) ? NULL : (var = (view_collection_monitor_unref (var), NULL))) -#define _alteration_unref0(var) ((var == NULL) ? NULL : (var = (alteration_unref (var), NULL))) -#define _view_manager_unref0(var) ((var == NULL) ? NULL : (var = (view_manager_unref (var), NULL))) - -#define TYPE_THUMBNAIL_SOURCE (thumbnail_source_get_type ()) -#define THUMBNAIL_SOURCE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_THUMBNAIL_SOURCE, ThumbnailSource)) -#define THUMBNAIL_SOURCE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_THUMBNAIL_SOURCE, ThumbnailSourceClass)) -#define IS_THUMBNAIL_SOURCE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_THUMBNAIL_SOURCE)) -#define IS_THUMBNAIL_SOURCE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_THUMBNAIL_SOURCE)) -#define THUMBNAIL_SOURCE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_THUMBNAIL_SOURCE, ThumbnailSourceClass)) - -typedef struct _ThumbnailSource ThumbnailSource; -typedef struct _ThumbnailSourceClass ThumbnailSourceClass; - -#define TYPE_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_EVENT_ID (event_id_get_type ()) -typedef struct _EventID EventID; -#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL))) - -#define TYPE_MEDIA_SOURCE (media_source_get_type ()) -#define MEDIA_SOURCE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_MEDIA_SOURCE, MediaSource)) -#define MEDIA_SOURCE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_MEDIA_SOURCE, MediaSourceClass)) -#define IS_MEDIA_SOURCE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_MEDIA_SOURCE)) -#define IS_MEDIA_SOURCE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_MEDIA_SOURCE)) -#define MEDIA_SOURCE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_MEDIA_SOURCE, MediaSourceClass)) - -typedef struct _MediaSource MediaSource; -typedef struct _MediaSourceClass MediaSourceClass; -typedef struct _ViewManagerPrivate ViewManagerPrivate; - -#define TYPE_DATA_VIEW (data_view_get_type ()) -#define DATA_VIEW(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_DATA_VIEW, DataView)) -#define DATA_VIEW_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_DATA_VIEW, DataViewClass)) -#define IS_DATA_VIEW(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_DATA_VIEW)) -#define IS_DATA_VIEW_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_DATA_VIEW)) -#define DATA_VIEW_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_DATA_VIEW, DataViewClass)) - -typedef struct _DataView DataView; -typedef struct _DataViewClass DataViewClass; -typedef struct _EventSourceCollectionNoEventViewManagerPrivate EventSourceCollectionNoEventViewManagerPrivate; - -#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; -enum { - EVENT_SOURCE_COLLECTION_NO_EVENT_COLLECTION_ALTERED_SIGNAL, - EVENT_SOURCE_COLLECTION_NUM_SIGNALS -}; -static guint event_source_collection_signals[EVENT_SOURCE_COLLECTION_NUM_SIGNALS] = {0}; -typedef struct _DataObjectPrivate DataObjectPrivate; -typedef struct _DataSourcePrivate DataSourcePrivate; - -#define TYPE_SOURCE_HOLDING_TANK (source_holding_tank_get_type ()) -#define SOURCE_HOLDING_TANK(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_SOURCE_HOLDING_TANK, SourceHoldingTank)) -#define SOURCE_HOLDING_TANK_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_SOURCE_HOLDING_TANK, SourceHoldingTankClass)) -#define IS_SOURCE_HOLDING_TANK(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_SOURCE_HOLDING_TANK)) -#define IS_SOURCE_HOLDING_TANK_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_SOURCE_HOLDING_TANK)) -#define SOURCE_HOLDING_TANK_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_SOURCE_HOLDING_TANK, SourceHoldingTankClass)) - -typedef struct _SourceHoldingTank SourceHoldingTank; -typedef struct _SourceHoldingTankClass SourceHoldingTankClass; - -#define TYPE_SOURCE_SNAPSHOT (source_snapshot_get_type ()) -#define SOURCE_SNAPSHOT(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_SOURCE_SNAPSHOT, SourceSnapshot)) -#define SOURCE_SNAPSHOT_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_SOURCE_SNAPSHOT, SourceSnapshotClass)) -#define IS_SOURCE_SNAPSHOT(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_SOURCE_SNAPSHOT)) -#define IS_SOURCE_SNAPSHOT_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_SOURCE_SNAPSHOT)) -#define SOURCE_SNAPSHOT_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_SOURCE_SNAPSHOT, SourceSnapshotClass)) - -typedef struct _SourceSnapshot SourceSnapshot; -typedef struct _SourceSnapshotClass SourceSnapshotClass; -typedef struct _ThumbnailSourcePrivate ThumbnailSourcePrivate; - -#define TYPE_PHOTO_FILE_FORMAT (photo_file_format_get_type ()) -typedef struct _EventSourcePrivate EventSourcePrivate; - -#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_SOURCE_PROXY (source_proxy_get_type ()) -#define SOURCE_PROXY(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_SOURCE_PROXY, SourceProxy)) -#define SOURCE_PROXY_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_SOURCE_PROXY, SourceProxyClass)) -#define IS_SOURCE_PROXY(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_SOURCE_PROXY)) -#define IS_SOURCE_PROXY_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_SOURCE_PROXY)) -#define SOURCE_PROXY_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_SOURCE_PROXY, SourceProxyClass)) - -typedef struct _SourceProxy SourceProxy; -typedef struct _SourceProxyClass SourceProxyClass; - -#define TYPE_INDEXABLE (indexable_get_type ()) -#define INDEXABLE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_INDEXABLE, Indexable)) -#define IS_INDEXABLE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_INDEXABLE)) -#define INDEXABLE_GET_INTERFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE ((obj), TYPE_INDEXABLE, IndexableIface)) - -typedef struct _Indexable Indexable; -typedef struct _IndexableIface IndexableIface; -typedef struct _EventPrivate EventPrivate; -enum { - EVENT_0_PROPERTY, - EVENT_NUM_PROPERTIES -}; -static GParamSpec* event_properties[EVENT_NUM_PROPERTIES]; - -#define TYPE_DATABASE_TABLE (database_table_get_type ()) -#define DATABASE_TABLE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_DATABASE_TABLE, DatabaseTable)) -#define DATABASE_TABLE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_DATABASE_TABLE, DatabaseTableClass)) -#define IS_DATABASE_TABLE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_DATABASE_TABLE)) -#define IS_DATABASE_TABLE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_DATABASE_TABLE)) -#define DATABASE_TABLE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_DATABASE_TABLE, DatabaseTableClass)) - -typedef struct _DatabaseTable DatabaseTable; -typedef struct _DatabaseTableClass DatabaseTableClass; - -#define TYPE_EVENT_TABLE (event_table_get_type ()) -#define EVENT_TABLE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_EVENT_TABLE, EventTable)) -#define EVENT_TABLE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_EVENT_TABLE, EventTableClass)) -#define IS_EVENT_TABLE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_EVENT_TABLE)) -#define IS_EVENT_TABLE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_EVENT_TABLE)) -#define EVENT_TABLE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_EVENT_TABLE, EventTableClass)) - -typedef struct _EventTable EventTable; -typedef struct _EventTableClass EventTableClass; -#define _g_free0(var) (var = (g_free (var), NULL)) - -#define TYPE_EVENT_ROW (event_row_get_type ()) -#define EVENT_ROW(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_EVENT_ROW, EventRow)) -#define EVENT_ROW_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_EVENT_ROW, EventRowClass)) -#define IS_EVENT_ROW(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_EVENT_ROW)) -#define IS_EVENT_ROW_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_EVENT_ROW)) -#define EVENT_ROW_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_EVENT_ROW, EventRowClass)) - -typedef struct _EventRow EventRow; -typedef struct _EventRowClass EventRowClass; -typedef struct _EventRowPrivate EventRowPrivate; - -#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 _database_table_unref0(var) ((var == NULL) ? NULL : (var = (database_table_unref (var), NULL))) -#define _event_row_unref0(var) ((var == NULL) ? NULL : (var = (event_row_unref (var), NULL))) - -#define TYPE_PREPARE_INPUT_TEXT_OPTIONS (prepare_input_text_options_get_type ()) - -#define TYPE_RATING (rating_get_type ()) -#define _g_error_free0(var) ((var == NULL) ? NULL : (var = (g_error_free (var), NULL))) -#define _source_backlink_unref0(var) ((var == NULL) ? NULL : (var = (source_backlink_unref (var), NULL))) - -#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_LIBRARY_PHOTO (library_photo_get_type ()) -#define LIBRARY_PHOTO(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_LIBRARY_PHOTO, LibraryPhoto)) -#define LIBRARY_PHOTO_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_LIBRARY_PHOTO, LibraryPhotoClass)) -#define IS_LIBRARY_PHOTO(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_LIBRARY_PHOTO)) -#define IS_LIBRARY_PHOTO_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_LIBRARY_PHOTO)) -#define LIBRARY_PHOTO_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_LIBRARY_PHOTO, LibraryPhotoClass)) - -typedef struct _LibraryPhoto LibraryPhoto; -typedef struct _LibraryPhotoClass LibraryPhotoClass; - -#define TYPE_VIDEO_SOURCE (video_source_get_type ()) -#define VIDEO_SOURCE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_VIDEO_SOURCE, VideoSource)) -#define VIDEO_SOURCE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_VIDEO_SOURCE, VideoSourceClass)) -#define IS_VIDEO_SOURCE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_VIDEO_SOURCE)) -#define IS_VIDEO_SOURCE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_VIDEO_SOURCE)) -#define VIDEO_SOURCE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_VIDEO_SOURCE, VideoSourceClass)) - -typedef struct _VideoSource VideoSource; -typedef struct _VideoSourceClass VideoSourceClass; - -#define TYPE_VIDEO (video_get_type ()) -#define VIDEO(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_VIDEO, Video)) -#define VIDEO_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_VIDEO, VideoClass)) -#define IS_VIDEO(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_VIDEO)) -#define IS_VIDEO_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_VIDEO)) -#define VIDEO_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_VIDEO, VideoClass)) - -typedef struct _Video Video; -typedef struct _VideoClass VideoClass; - -#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_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 EVENT_TYPE_EVENT_SNAPSHOT (event_event_snapshot_get_type ()) -#define EVENT_EVENT_SNAPSHOT(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), EVENT_TYPE_EVENT_SNAPSHOT, EventEventSnapshot)) -#define EVENT_EVENT_SNAPSHOT_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), EVENT_TYPE_EVENT_SNAPSHOT, EventEventSnapshotClass)) -#define EVENT_IS_EVENT_SNAPSHOT(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), EVENT_TYPE_EVENT_SNAPSHOT)) -#define EVENT_IS_EVENT_SNAPSHOT_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), EVENT_TYPE_EVENT_SNAPSHOT)) -#define EVENT_EVENT_SNAPSHOT_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), EVENT_TYPE_EVENT_SNAPSHOT, EventEventSnapshotClass)) - -typedef struct _EventEventSnapshot EventEventSnapshot; -typedef struct _EventEventSnapshotClass EventEventSnapshotClass; - -#define EVENT_TYPE_EVENT_PROXY (event_event_proxy_get_type ()) -#define EVENT_EVENT_PROXY(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), EVENT_TYPE_EVENT_PROXY, EventEventProxy)) -#define EVENT_EVENT_PROXY_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), EVENT_TYPE_EVENT_PROXY, EventEventProxyClass)) -#define EVENT_IS_EVENT_PROXY(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), EVENT_TYPE_EVENT_PROXY)) -#define EVENT_IS_EVENT_PROXY_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), EVENT_TYPE_EVENT_PROXY)) -#define EVENT_EVENT_PROXY_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), EVENT_TYPE_EVENT_PROXY, EventEventProxyClass)) - -typedef struct _EventEventProxy EventEventProxy; -typedef struct _EventEventProxyClass EventEventProxyClass; - -#define TYPE_SCALING (scaling_get_type ()) - -#define TYPE_SCALE_CONSTRAINT (scale_constraint_get_type ()) - -#define TYPE_DIMENSIONS (dimensions_get_type ()) -typedef struct _Dimensions Dimensions; -typedef struct _Scaling Scaling; - -#define TYPE_PHOTO_TABLE (photo_table_get_type ()) -#define PHOTO_TABLE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_PHOTO_TABLE, PhotoTable)) -#define PHOTO_TABLE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_PHOTO_TABLE, PhotoTableClass)) -#define IS_PHOTO_TABLE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_PHOTO_TABLE)) -#define IS_PHOTO_TABLE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_PHOTO_TABLE)) -#define PHOTO_TABLE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_PHOTO_TABLE, PhotoTableClass)) - -typedef struct _PhotoTable PhotoTable; -typedef struct _PhotoTableClass PhotoTableClass; - -#define TYPE_VIDEO_TABLE (video_table_get_type ()) -#define VIDEO_TABLE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_VIDEO_TABLE, VideoTable)) -#define VIDEO_TABLE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_VIDEO_TABLE, VideoTableClass)) -#define IS_VIDEO_TABLE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_VIDEO_TABLE)) -#define IS_VIDEO_TABLE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_VIDEO_TABLE)) -#define VIDEO_TABLE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_VIDEO_TABLE, VideoTableClass)) - -typedef struct _VideoTable VideoTable; -typedef struct _VideoTableClass VideoTableClass; -typedef struct _SourceSnapshotPrivate SourceSnapshotPrivate; -typedef struct _EventEventSnapshotPrivate EventEventSnapshotPrivate; -typedef struct _SourceProxyPrivate SourceProxyPrivate; -typedef struct _EventEventProxyPrivate EventEventProxyPrivate; -#define _source_snapshot_unref0(var) ((var == NULL) ? NULL : (var = (source_snapshot_unref (var), NULL))) -#define _vala_assert(expr, msg) if G_LIKELY (expr) ; else g_assertion_message_expr (G_LOG_DOMAIN, __FILE__, __LINE__, G_STRFUNC, msg); -#define _vala_return_if_fail(expr, msg) if G_LIKELY (expr) ; else { g_return_if_fail_warning (G_LOG_DOMAIN, G_STRFUNC, msg); return; } -#define _vala_return_val_if_fail(expr, msg, val) if G_LIKELY (expr) ; else { g_return_if_fail_warning (G_LOG_DOMAIN, G_STRFUNC, msg); return val; } -#define _vala_warn_if_fail(expr, msg) if G_LIKELY (expr) ; else g_warn_message (G_LOG_DOMAIN, __FILE__, __LINE__, G_STRFUNC, msg); - -typedef gint64 (*Comparator) (void* a, void* b, void* user_data); -typedef gboolean (*ComparatorPredicate) (DataObject* object, Alteration* alteration, void* user_data); -typedef gboolean (*ProgressMonitor) (guint64 current, guint64 total, gboolean do_event_loop, void* user_data); -struct _MarkerIface { - GTypeInterface parent_iface; - void (*mark) (Marker* self, DataObject* object); - void (*unmark) (Marker* self, DataObject* object); - gboolean (*toggle) (Marker* self, DataObject* object); - void (*mark_many) (Marker* self, GeeCollection* list); - void (*unmark_many) (Marker* self, GeeCollection* list); - void (*mark_all) (Marker* self); - gint (*get_count) (Marker* self); - GeeCollection* (*get_all) (Marker* self); -}; - -struct _DataCollection { - GTypeInstance parent_instance; - volatile int ref_count; - DataCollectionPrivate * priv; -}; - -struct _DataCollectionClass { - GTypeClass parent_class; - void (*finalize) (DataCollection *self); - gchar* (*to_string) (DataCollection* self); - void (*notify_items_added) (DataCollection* self, GeeIterable* added); - void (*notify_items_removed) (DataCollection* self, GeeIterable* removed); - void (*notify_contents_altered) (DataCollection* self, GeeIterable* added, GeeIterable* removed); - void (*notify_items_altered) (DataCollection* self, GeeMap* items); - void (*notify_ordering_changed) (DataCollection* self); - void (*notify_property_set) (DataCollection* self, const gchar* name, GValue* old, GValue* val); - void (*notify_property_cleared) (DataCollection* self, const gchar* name); - gboolean (*valid_type) (DataCollection* self, DataObject* object); - void (*set_comparator) (DataCollection* self, Comparator comparator, void* comparator_target, ComparatorPredicate predicate, void* predicate_target); - void (*reset_comparator) (DataCollection* self); - GeeCollection* (*get_all) (DataCollection* self); - gint (*get_count) (DataCollection* self); - DataObject* (*get_at) (DataCollection* self, gint index); - gint (*index_of) (DataCollection* self, DataObject* object); - gboolean (*contains) (DataCollection* self, DataObject* object); - gboolean (*add) (DataCollection* self, DataObject* object); - GeeCollection* (*add_many) (DataCollection* self, GeeCollection* objects, ProgressMonitor monitor, void* monitor_target); - void (*remove_marked) (DataCollection* self, Marker* m); - void (*clear) (DataCollection* self); - void (*close) (DataCollection* self); - void (*notify_frozen) (DataCollection* self); - void (*notify_thawed) (DataCollection* self); - void (*items_added) (DataCollection* self, GeeIterable* added); - void (*items_removed) (DataCollection* self, GeeIterable* removed); - void (*contents_altered) (DataCollection* self, GeeIterable* added, GeeIterable* removed); - void (*items_altered) (DataCollection* self, GeeMap* items); - void (*ordering_changed) (DataCollection* self); - void (*property_set) (DataCollection* self, const gchar* name, GValue* old, GValue* val); - void (*property_cleared) (DataCollection* self, const gchar* name); - void (*frozen) (DataCollection* self); - void (*thawed) (DataCollection* self); -}; - -struct _SourceCollection { - DataCollection parent_instance; - SourceCollectionPrivate * priv; -}; - -struct _SourceCollectionClass { - DataCollectionClass parent_class; - gboolean (*holds_type_of_source) (SourceCollection* self, DataSource* source); - void (*notify_items_unlinking) (SourceCollection* self, GeeCollection* unlinking); - void (*notify_items_relinked) (SourceCollection* self, GeeCollection* relinked); - void (*notify_item_destroyed) (SourceCollection* self, DataSource* source); - void (*notify_items_destroyed) (SourceCollection* self, GeeCollection* destroyed); - void (*notify_unlinked_destroyed) (SourceCollection* self, DataSource* unlinked); - void (*notify_backlink_removed) (SourceCollection* self, SourceBacklink* backlink, GeeCollection* sources); - gboolean (*has_backlink) (SourceCollection* self, SourceBacklink* backlink); - void (*remove_backlink) (SourceCollection* self, SourceBacklink* backlink); - void (*items_unlinking) (SourceCollection* self, GeeCollection* unlinking); - void (*items_relinked) (SourceCollection* self, GeeCollection* relinked); - void (*item_destroyed) (SourceCollection* self, DataSource* source); - void (*items_destroyed) (SourceCollection* self, GeeCollection* destroyed); - void (*unlinked_destroyed) (SourceCollection* self, DataSource* source); - void (*backlink_removed) (SourceCollection* self, SourceBacklink* backlink, GeeCollection* sources); -}; - -struct _DatabaseSourceCollection { - SourceCollection parent_instance; - DatabaseSourceCollectionPrivate * priv; -}; - -struct _DatabaseSourceCollectionClass { - SourceCollectionClass parent_class; -}; - -struct _ContainerSourceIface { - GTypeInterface parent_iface; - gboolean (*has_links) (ContainerSource* self); - SourceBacklink* (*get_backlink) (ContainerSource* self); - void (*break_link) (ContainerSource* self, DataSource* source); - void (*break_link_many) (ContainerSource* self, GeeCollection* sources); - void (*establish_link) (ContainerSource* self, DataSource* source); - void (*establish_link_many) (ContainerSource* self, GeeCollection* sources); -}; - -struct _ContainerSourceCollection { - DatabaseSourceCollection parent_instance; - ContainerSourceCollectionPrivate * priv; -}; - -struct _ContainerSourceCollectionClass { - DatabaseSourceCollectionClass parent_class; - void (*notify_container_contents_added) (ContainerSourceCollection* self, ContainerSource* container, GeeCollection* added, gboolean relinked); - void (*notify_container_contents_removed) (ContainerSourceCollection* self, ContainerSource* container, GeeCollection* removed, gboolean unlinked); - void (*notify_container_contents_altered) (ContainerSourceCollection* self, ContainerSource* container, GeeCollection* added, gboolean relinked, GeeCollection* removed, gboolean unlinked); - void (*notify_backlink_to_container_removed) (ContainerSourceCollection* self, ContainerSource* container, GeeCollection* sources); - GeeCollection* (*get_containers_holding_source) (ContainerSourceCollection* self, DataSource* source); - ContainerSource* (*convert_backlink_to_container) (ContainerSourceCollection* self, SourceBacklink* backlink); - void (*container_contents_added) (ContainerSourceCollection* self, ContainerSource* container, GeeCollection* added, gboolean relinked); - void (*container_contents_removed) (ContainerSourceCollection* self, ContainerSource* container, GeeCollection* removed, gboolean unlinked); - void (*container_contents_altered) (ContainerSourceCollection* self, ContainerSource* container, GeeCollection* added, gboolean relinked, GeeCollection* removed, gboolean unlinked); - void (*backlink_to_container_removed) (ContainerSourceCollection* self, ContainerSource* container, GeeCollection* sources); -}; - -struct _EventSourceCollection { - ContainerSourceCollection parent_instance; - EventSourceCollectionPrivate * priv; -}; - -struct _EventSourceCollectionClass { - ContainerSourceCollectionClass parent_class; -}; - -struct _EventSourceCollectionPrivate { - ViewCollection* no_event; -}; - -typedef gint64 (*GetSourceDatabaseKey) (DataSource* source, void* user_data); -struct _EventID { - gint64 id; -}; - -struct _ViewManager { - GTypeInstance parent_instance; - volatile int ref_count; - ViewManagerPrivate * priv; -}; - -struct _ViewManagerClass { - GTypeClass parent_class; - void (*finalize) (ViewManager *self); - gboolean (*include_in_view) (ViewManager* self, DataSource* source); - DataView* (*create_view) (ViewManager* self, DataSource* source); -}; - -struct _EventSourceCollectionNoEventViewManager { - ViewManager parent_instance; - EventSourceCollectionNoEventViewManagerPrivate * priv; -}; - -struct _EventSourceCollectionNoEventViewManagerClass { - ViewManagerClass parent_class; -}; - -struct _DataObject { - GObject parent_instance; - DataObjectPrivate * priv; -}; - -struct _DataObjectClass { - GObjectClass parent_class; - void (*notify_altered) (DataObject* self, Alteration* alteration); - void (*notify_membership_changed) (DataObject* self, DataCollection* collection); - void (*notify_collection_property_set) (DataObject* self, const gchar* name, GValue* old, GValue* val); - void (*notify_collection_property_cleared) (DataObject* self, const gchar* name); - gchar* (*get_name) (DataObject* self); - gchar* (*to_string) (DataObject* self); -}; - -struct _DataSource { - DataObject parent_instance; - DataSourcePrivate * priv; -}; - -struct _DataSourceClass { - DataObjectClass parent_class; - void (*notify_held_in_tank) (DataSource* self, SourceHoldingTank* holding_tank); - void (*notify_unlinking) (DataSource* self, SourceCollection* collection); - void (*notify_unlinked) (DataSource* self); - void (*notify_relinking) (DataSource* self, SourceCollection* collection); - void (*notify_relinked) (DataSource* self); - gchar* (*get_typename) (DataSource* self); - gint64 (*get_instance_id) (DataSource* self); - gchar* (*get_source_id) (DataSource* self); - void (*commit_backlinks) (DataSource* self, SourceCollection* sources, const gchar* dehydrated); - SourceSnapshot* (*save_snapshot) (DataSource* self); - gboolean (*internal_delete_backing) (DataSource* self, GError** error); - gboolean (*equals) (DataSource* self, DataSource* source); - void (*destroy) (DataSource* self); - void (*unlinked) (DataSource* self, SourceCollection* sources); - void (*relinked) (DataSource* self, SourceCollection* sources); - void (*destroyed) (DataSource* self); -}; - -typedef enum { - PHOTO_FILE_FORMAT_JFIF, - PHOTO_FILE_FORMAT_RAW, - PHOTO_FILE_FORMAT_PNG, - PHOTO_FILE_FORMAT_TIFF, - PHOTO_FILE_FORMAT_BMP, - PHOTO_FILE_FORMAT_UNKNOWN -} PhotoFileFormat; - -struct _ThumbnailSource { - DataSource parent_instance; - ThumbnailSourcePrivate * priv; -}; - -struct _ThumbnailSourceClass { - DataSourceClass parent_class; - void (*notify_thumbnail_altered) (ThumbnailSource* self); - GdkPixbuf* (*get_thumbnail) (ThumbnailSource* self, gint scale, GError** error); - GdkPixbuf* (*create_thumbnail) (ThumbnailSource* self, gint scale, GError** error); - gchar* (*get_representative_id) (ThumbnailSource* self); - PhotoFileFormat (*get_preferred_thumbnail_format) (ThumbnailSource* self); - void (*thumbnail_altered) (ThumbnailSource* self); -}; - -struct _EventSource { - ThumbnailSource parent_instance; - EventSourcePrivate * priv; -}; - -struct _EventSourceClass { - ThumbnailSourceClass parent_class; - time_t (*get_start_time) (EventSource* self); - time_t (*get_end_time) (EventSource* self); - guint64 (*get_total_filesize) (EventSource* self); - gint (*get_media_count) (EventSource* self); - GeeCollection* (*get_media) (EventSource* self); - gchar* (*get_comment) (EventSource* self); - gboolean (*set_comment) (EventSource* self, const gchar* comment); -}; - -struct _ProxyableIface { - GTypeInterface parent_iface; - SourceProxy* (*get_proxy) (Proxyable* self); -}; - -struct _IndexableIface { - GTypeInterface parent_iface; - const gchar* (*get_indexable_keywords) (Indexable* self); -}; - -struct _Event { - EventSource parent_instance; - EventPrivate * priv; -}; - -struct _EventClass { - EventSourceClass parent_class; -}; - -struct _EventPrivate { - EventID event_id; - gchar* raw_name; - MediaSource* primary_source; - ViewCollection* view; - gboolean unlinking; - gboolean relinking; - gchar* indexable_keywords; - gchar* comment; -}; - -struct _EventRow { - GTypeInstance parent_instance; - volatile int ref_count; - EventRowPrivate * priv; - EventID event_id; - gchar* name; - time_t time_created; - gchar* primary_source_id; - gchar* comment; -}; - -struct _EventRowClass { - GTypeClass parent_class; - void (*finalize) (EventRow *self); -}; - -typedef enum { - PREPARE_INPUT_TEXT_OPTIONS_EMPTY_IS_NULL = 1 << 0, - PREPARE_INPUT_TEXT_OPTIONS_VALIDATE = 1 << 1, - PREPARE_INPUT_TEXT_OPTIONS_INVALID_IS_NULL = 1 << 2, - PREPARE_INPUT_TEXT_OPTIONS_STRIP = 1 << 3, - PREPARE_INPUT_TEXT_OPTIONS_STRIP_CRLF = 1 << 4, - PREPARE_INPUT_TEXT_OPTIONS_NORMALIZE = 1 << 5, - PREPARE_INPUT_TEXT_OPTIONS_DEFAULT = ((((PREPARE_INPUT_TEXT_OPTIONS_EMPTY_IS_NULL | PREPARE_INPUT_TEXT_OPTIONS_VALIDATE) | PREPARE_INPUT_TEXT_OPTIONS_INVALID_IS_NULL) | PREPARE_INPUT_TEXT_OPTIONS_STRIP_CRLF) | PREPARE_INPUT_TEXT_OPTIONS_STRIP) | PREPARE_INPUT_TEXT_OPTIONS_NORMALIZE -} PrepareInputTextOptions; - -typedef enum { - RATING_REJECTED = -1, - RATING_UNRATED = 0, - RATING_ONE = 1, - RATING_TWO = 2, - RATING_THREE = 3, - RATING_FOUR = 4, - RATING_FIVE = 5 -} Rating; - -typedef enum { - DATABASE_ERROR_ERROR, - DATABASE_ERROR_BACKING, - DATABASE_ERROR_MEMORY, - DATABASE_ERROR_ABORT, - DATABASE_ERROR_LIMITS, - DATABASE_ERROR_TYPESPEC -} DatabaseError; -#define DATABASE_ERROR database_error_quark () -typedef DataView* (*CreateView) (DataSource* source, void* user_data); -typedef gboolean (*CreateViewPredicate) (DataSource* source, void* user_data); -typedef enum { - SCALE_CONSTRAINT_ORIGINAL, - SCALE_CONSTRAINT_DIMENSIONS, - SCALE_CONSTRAINT_WIDTH, - SCALE_CONSTRAINT_HEIGHT, - SCALE_CONSTRAINT_FILL_VIEWPORT -} ScaleConstraint; - -struct _Dimensions { - gint width; - gint height; -}; - -struct _Scaling { - ScaleConstraint constraint; - gint scale; - Dimensions viewport; - gboolean scale_up; -}; - -struct _SourceSnapshot { - GTypeInstance parent_instance; - volatile int ref_count; - SourceSnapshotPrivate * priv; -}; - -struct _SourceSnapshotClass { - GTypeClass parent_class; - void (*finalize) (SourceSnapshot *self); - void (*notify_broken) (SourceSnapshot* self); - void (*broken) (SourceSnapshot* self); -}; - -struct _EventEventSnapshot { - SourceSnapshot parent_instance; - EventEventSnapshotPrivate * priv; -}; - -struct _EventEventSnapshotClass { - SourceSnapshotClass parent_class; -}; - -struct _EventEventSnapshotPrivate { - EventRow* row; - MediaSource* primary_source; - GeeArrayList* attached_sources; -}; - -struct _SourceProxy { - GTypeInstance parent_instance; - volatile int ref_count; - SourceProxyPrivate * priv; -}; - -struct _SourceProxyClass { - GTypeClass parent_class; - void (*finalize) (SourceProxy *self); - DataSource* (*reconstitute) (SourceProxy* self, gint64 object_id, SourceSnapshot* snapshot); - void (*notify_reconstituted) (SourceProxy* self, DataSource* source); - void (*notify_dehydrated) (SourceProxy* self); - void (*notify_broken) (SourceProxy* self); - void (*reconstituted) (SourceProxy* self, DataSource* source); - void (*dehydrated) (SourceProxy* self); - void (*broken) (SourceProxy* self); -}; - -struct _EventEventProxy { - SourceProxy parent_instance; - EventEventProxyPrivate * priv; -}; - -struct _EventEventProxyClass { - SourceProxyClass parent_class; -}; - - -static gpointer event_source_collection_parent_class = NULL; -extern LibraryPhotoSourceCollection* library_photo_global; -extern VideoSourceCollection* video_global; -static gpointer event_source_collection_no_event_view_manager_parent_class = NULL; -static gpointer event_parent_class = NULL; -extern EventSourceCollection* event_global; -EventSourceCollection* event_global = NULL; -static EventTable* event_event_table; -static EventTable* event_event_table = NULL; -static gpointer event_event_snapshot_parent_class = NULL; -static gpointer event_event_proxy_parent_class = NULL; -static ContainerSourceIface * event_container_source_parent_iface = NULL; -static ProxyableIface * event_proxyable_parent_iface = NULL; -static IndexableIface * event_indexable_parent_iface = NULL; - -gpointer data_collection_ref (gpointer instance); -void data_collection_unref (gpointer instance); -GParamSpec* param_spec_data_collection (const gchar* name, - const gchar* nick, - const gchar* blurb, - GType object_type, - GParamFlags flags); -void value_set_data_collection (GValue* value, - gpointer v_object); -void value_take_data_collection (GValue* value, - gpointer v_object); -gpointer value_get_data_collection (const GValue* value); -GType data_collection_get_type (void) G_GNUC_CONST; -GType data_object_get_type (void) G_GNUC_CONST; -gpointer alteration_ref (gpointer instance); -void alteration_unref (gpointer instance); -GParamSpec* param_spec_alteration (const gchar* name, - const gchar* nick, - const gchar* blurb, - GType object_type, - GParamFlags flags); -void value_set_alteration (GValue* value, - gpointer v_object); -void value_take_alteration (GValue* value, - gpointer v_object); -gpointer value_get_alteration (const GValue* value); -GType alteration_get_type (void) G_GNUC_CONST; -GType marker_get_type (void) G_GNUC_CONST; -GType source_collection_get_type (void) G_GNUC_CONST; -GType data_source_get_type (void) G_GNUC_CONST; -gpointer source_backlink_ref (gpointer instance); -void source_backlink_unref (gpointer instance); -GParamSpec* param_spec_source_backlink (const gchar* name, - const gchar* nick, - const gchar* blurb, - GType object_type, - GParamFlags flags); -void value_set_source_backlink (GValue* value, - gpointer v_object); -void value_take_source_backlink (GValue* value, - gpointer v_object); -gpointer value_get_source_backlink (const GValue* value); -GType source_backlink_get_type (void) G_GNUC_CONST; -GType database_source_collection_get_type (void) G_GNUC_CONST; -GType container_source_collection_get_type (void) G_GNUC_CONST; -GType container_source_get_type (void) G_GNUC_CONST; -GType event_source_collection_get_type (void) G_GNUC_CONST; -GType view_collection_get_type (void) G_GNUC_CONST; -#define EVENT_SOURCE_COLLECTION_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), TYPE_EVENT_SOURCE_COLLECTION, EventSourceCollectionPrivate)) -EventSourceCollection* event_source_collection_new (void); -EventSourceCollection* event_source_collection_construct (GType object_type); -#define EVENT_TYPENAME "event" -static gint64 event_source_collection_get_event_key (DataSource* source); -static gint64 _event_source_collection_get_event_key_get_source_database_key (DataSource* source, - gpointer self); -ContainerSourceCollection* container_source_collection_construct (GType object_type, - const gchar* backlink_name, - const gchar* name, - GetSourceDatabaseKey source_key_func, - void* source_key_func_target); -void container_source_collection_attach_collection (ContainerSourceCollection* self, - SourceCollection* collection); -GType media_source_collection_get_type (void) G_GNUC_CONST; -GType library_photo_source_collection_get_type (void) G_GNUC_CONST; -GType video_source_collection_get_type (void) G_GNUC_CONST; -void event_source_collection_init (EventSourceCollection* self); -ViewCollection* view_collection_new (const gchar* name); -ViewCollection* view_collection_construct (GType object_type, - const gchar* name); -gpointer view_manager_ref (gpointer instance); -void view_manager_unref (gpointer instance); -GParamSpec* param_spec_view_manager (const gchar* name, - const gchar* nick, - const gchar* blurb, - GType object_type, - GParamFlags flags); -void value_set_view_manager (GValue* value, - gpointer v_object); -void value_take_view_manager (GValue* value, - gpointer v_object); -gpointer value_get_view_manager (const GValue* value); -GType view_manager_get_type (void) G_GNUC_CONST; -static GType event_source_collection_no_event_view_manager_get_type (void) G_GNUC_CONST G_GNUC_UNUSED; -static EventSourceCollectionNoEventViewManager* event_source_collection_no_event_view_manager_new (void); -static EventSourceCollectionNoEventViewManager* event_source_collection_no_event_view_manager_construct (GType object_type); -Alteration* alteration_new (const gchar* subject, - const gchar* detail); -Alteration* alteration_construct (GType object_type, - const gchar* subject, - const gchar* detail); -gpointer view_collection_monitor_ref (gpointer instance); -void view_collection_monitor_unref (gpointer instance); -GParamSpec* view_collection_param_spec_monitor (const gchar* name, - const gchar* nick, - const gchar* blurb, - GType object_type, - GParamFlags flags); -void view_collection_value_set_monitor (GValue* value, - gpointer v_object); -void view_collection_value_take_monitor (GValue* value, - gpointer v_object); -gpointer view_collection_value_get_monitor (const GValue* value); -GType view_collection_monitor_get_type (void) G_GNUC_CONST; -ViewCollectionMonitor* view_collection_monitor_source_collection (ViewCollection* self, - SourceCollection* sources, - ViewManager* manager, - Alteration* prereq, - GeeCollection* initial, - ProgressMonitor progress_monitor, - void* progress_monitor_target); -static void event_source_collection_on_no_event_collection_altered (EventSourceCollection* self, - GeeIterable* added, - GeeIterable* removed); -static void _event_source_collection_on_no_event_collection_altered_data_collection_contents_altered (DataCollection* _sender, - GeeIterable* added, - GeeIterable* removed, - gpointer self); -static gboolean event_source_collection_real_holds_type_of_source (SourceCollection* base, - DataSource* source); -GType thumbnail_source_get_type (void) G_GNUC_CONST; -GType event_source_get_type (void) G_GNUC_CONST; -GType event_get_type (void) G_GNUC_CONST; -GType event_id_get_type (void) G_GNUC_CONST; -EventID* event_id_dup (const EventID* self); -void event_id_free (EventID* self); -void event_get_event_id (Event* self, - EventID* result); -Event* event_source_collection_fetch (EventSourceCollection* self, - EventID* event_id); -DataSource* database_source_collection_fetch_by_key (DatabaseSourceCollection* self, - gint64 key); -static GeeCollection* event_source_collection_real_get_containers_holding_source (ContainerSourceCollection* base, - DataSource* source); -GType media_source_get_type (void) G_GNUC_CONST; -Event* media_source_get_event (MediaSource* self); -static ContainerSource* event_source_collection_real_convert_backlink_to_container (ContainerSourceCollection* base, - SourceBacklink* backlink); -gint64 source_backlink_get_instance_id (SourceBacklink* self); -void event_id_init (EventID *self, - gint64 id); -GeeCollection* container_source_collection_get_holding_tank (ContainerSourceCollection* self); -GeeCollection* event_source_collection_get_no_event_objects (EventSourceCollection* self); -GeeCollection* view_collection_get_sources (ViewCollection* self); -GType data_view_get_type (void) G_GNUC_CONST; -static gboolean event_source_collection_no_event_view_manager_real_include_in_view (ViewManager* base, - DataSource* source); -void media_source_get_event_id (MediaSource* self, - EventID* result); -#define EVENT_ID_INVALID ((gint64) -1) -gboolean view_manager_include_in_view (ViewManager* self, - DataSource* source); -static DataView* event_source_collection_no_event_view_manager_real_create_view (ViewManager* base, - DataSource* source); -ThumbnailView* thumbnail_view_new (ThumbnailSource* source); -ThumbnailView* thumbnail_view_construct (GType object_type, - ThumbnailSource* source); -GType thumbnail_view_get_type (void) G_GNUC_CONST; -ViewManager* view_manager_construct (GType object_type); -static void event_source_collection_finalize (DataCollection * obj); -gpointer source_holding_tank_ref (gpointer instance); -void source_holding_tank_unref (gpointer instance); -GParamSpec* param_spec_source_holding_tank (const gchar* name, - const gchar* nick, - const gchar* blurb, - GType object_type, - GParamFlags flags); -void value_set_source_holding_tank (GValue* value, - gpointer v_object); -void value_take_source_holding_tank (GValue* value, - gpointer v_object); -gpointer value_get_source_holding_tank (const GValue* value); -GType source_holding_tank_get_type (void) G_GNUC_CONST; -gpointer source_snapshot_ref (gpointer instance); -void source_snapshot_unref (gpointer instance); -GParamSpec* param_spec_source_snapshot (const gchar* name, - const gchar* nick, - const gchar* blurb, - GType object_type, - GParamFlags flags); -void value_set_source_snapshot (GValue* value, - gpointer v_object); -void value_take_source_snapshot (GValue* value, - gpointer v_object); -gpointer value_get_source_snapshot (const GValue* value); -GType source_snapshot_get_type (void) G_GNUC_CONST; -GType photo_file_format_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; -GType proxyable_get_type (void) G_GNUC_CONST; -GType indexable_get_type (void) G_GNUC_CONST; -#define EVENT_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), TYPE_EVENT, EventPrivate)) -static void event_on_primary_thumbnail_altered (Event* self); -static void _event_on_primary_thumbnail_altered_thumbnail_source_thumbnail_altered (ThumbnailSource* _sender, - gpointer self); -static void event_on_media_altered (Event* self, - GeeMap* items); -static void _event_on_media_altered_data_collection_items_altered (DataCollection* _sender, - GeeMap* items, - gpointer self); -static void event_on_media_removed (Event* self, - GeeIterable* removed); -static void _event_on_media_removed_data_collection_items_removed (DataCollection* _sender, - GeeIterable* removed, - gpointer self); -static void event_on_media_added (Event* self, - GeeIterable* added); -static void _event_on_media_added_data_collection_items_added (DataCollection* _sender, - GeeIterable* added, - gpointer self); -static void event_on_media_destroyed (Event* self, - DataSource* source); -static void _event_on_media_destroyed_source_collection_item_destroyed (SourceCollection* _sender, - DataSource* source, - gpointer self); -gpointer database_table_ref (gpointer instance); -void database_table_unref (gpointer instance); -GParamSpec* param_spec_database_table (const gchar* name, - const gchar* nick, - const gchar* blurb, - GType object_type, - GParamFlags flags); -void value_set_database_table (GValue* value, - gpointer v_object); -void value_take_database_table (GValue* value, - gpointer v_object); -gpointer value_get_database_table (const GValue* value); -GType database_table_get_type (void) G_GNUC_CONST; -GType event_table_get_type (void) G_GNUC_CONST; -#define EVENT_PROP_SHOW_COMMENTS "show-comments" -#define EVENT_EVENT_BOUNDARY_HOUR 4 -#define EVENT_TIME_T_DAY ((time_t) ((24 * 60) * 60)) -gpointer event_row_ref (gpointer instance); -void event_row_unref (gpointer instance); -GParamSpec* param_spec_event_row (const gchar* name, - const gchar* nick, - const gchar* blurb, - GType object_type, - GParamFlags flags); -void value_set_event_row (GValue* value, - gpointer v_object); -void value_take_event_row (GValue* value, - gpointer v_object); -gpointer value_get_event_row (const GValue* value); -GType event_row_get_type (void) G_GNUC_CONST; -static Event* event_new (EventRow* event_row, - gint64 object_id); -static Event* event_construct (GType object_type, - EventRow* event_row, - gint64 object_id); -EventSource* event_source_construct (GType object_type, - gint64 object_id); -gchar* event_prep_event_name (const gchar* name); -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); -GeeCollection* media_collection_registry_get_source_ids_for_event_id (MediaCollectionRegistry* self, - EventID* event_id); -MediaSource* media_collection_registry_fetch_media (MediaCollectionRegistry* self, - const gchar* source_id); -void data_collection_set_comparator (DataCollection* self, - Comparator comparator, - void* comparator_target, - ComparatorPredicate predicate, - void* predicate_target); -static gint64 event_view_comparator (void* a, - void* b); -static gint64 _event_view_comparator_comparator (void* a, - void* b, - gpointer self); -static gboolean event_view_comparator_predicate (DataObject* object, - Alteration* alteration); -static gboolean _event_view_comparator_predicate_comparator_predicate (DataObject* object, - Alteration* alteration, - gpointer self); -GeeCollection* data_collection_add_many (DataCollection* self, - GeeCollection* objects, - ProgressMonitor monitor, - void* monitor_target); -void container_source_collection_notify_container_contents_added (ContainerSourceCollection* self, - ContainerSource* container, - GeeCollection* added, - gboolean relinked); -void container_source_collection_notify_container_contents_altered (ContainerSourceCollection* self, - ContainerSource* container, - GeeCollection* added, - gboolean relinked, - GeeCollection* removed, - gboolean unlinked); -gint data_collection_get_count (DataCollection* self); -DataView* view_collection_get_first_unrejected (ViewCollection* self); -DataSource* data_view_get_source (DataView* self); -gboolean event_table_set_primary_source_id (EventTable* self, - EventID* event_id, - const gchar* primary_source_id); -gchar* data_source_get_source_id (DataSource* self); -static void event_update_indexable_keywords (Event* self); -static gchar* event_real_get_typename (DataSource* base); -static gint64 event_real_get_instance_id (DataSource* base); -static gchar* event_real_get_representative_id (ThumbnailSource* base); -static PhotoFileFormat event_real_get_preferred_thumbnail_format (ThumbnailSource* base); -PhotoFileFormat thumbnail_source_get_preferred_thumbnail_format (ThumbnailSource* self); -PhotoFileFormat photo_file_format_get_system_default_format (void); -static GdkPixbuf* event_real_create_thumbnail (ThumbnailSource* base, - gint scale, - GError** error); -GdkPixbuf* thumbnail_source_create_thumbnail (ThumbnailSource* self, - gint scale, - GError** error); -void event_init (ProgressMonitor monitor, - void* monitor_target); -EventTable* event_table_get_instance (void); -GeeArrayList* event_table_get_events (EventTable* self); -#define DATA_OBJECT_INVALID_OBJECT_ID ((gint64) -1) -gint event_source_get_media_count (EventSource* self); -void data_source_rehydrate_backlinks (DataSource* self, - SourceCollection* unlinked_from, - const gchar* dehydrated); -void container_source_collection_init_add_many_unlinked (ContainerSourceCollection* self, - GeeCollection* unlinked); -void event_terminate (void); -time_t media_source_get_exposure_time (MediaSource* self); -gboolean alteration_has_detail (Alteration* self, - const gchar* subject, - const gchar* detail); -GType prepare_input_text_options_get_type (void) G_GNUC_CONST; -gchar* prepare_input_text (const gchar* text, - PrepareInputTextOptions options, - gint dest_length); -#define DEFAULT_USER_TEXT_INPUT_LENGTH 1024 -void event_attach (Event* self, - MediaSource* source); -gboolean data_collection_add (DataCollection* self, - DataObject* object); -void event_attach_many (Event* self, - GeeCollection* media); -void event_detach (Event* self, - MediaSource* source); -void data_collection_remove_marked (DataCollection* self, - Marker* m); -Marker* data_collection_mark (DataCollection* self, - DataObject* object); -DataView* view_collection_get_view_for_source (ViewCollection* self, - DataSource* source); -void event_detach_many (Event* self, - GeeCollection* media); -Marker* data_collection_mark_many (DataCollection* self, - GeeCollection* objects); -gboolean event_contains_media_type (Event* self, - const gchar* media_type); -GeeCollection* event_source_get_media (EventSource* self); -gchar* data_source_get_typename (DataSource* self); -static GeeArrayList* event_views_to_media (Event* self, - GeeIterable* views); -void data_object_notify_altered (DataObject* self, - Alteration* alteration); -Alteration* alteration_new_from_list (const gchar* list); -Alteration* alteration_construct_from_list (GType object_type, - const gchar* list); -void container_source_collection_notify_container_contents_removed (ContainerSourceCollection* self, - ContainerSource* container, - GeeCollection* removed, - gboolean unlinked); -gboolean event_set_primary_source (Event* self, - MediaSource* source); -static void event_release_primary_source (Event* self); -void container_source_collection_evaporate (ContainerSourceCollection* self, - ContainerSource* container); -static void event_real_notify_relinking (DataSource* base, - SourceCollection* sources); -void data_source_notify_relinking (DataSource* self, - SourceCollection* collection); -gboolean event_has_name (Event* self); -MediaSource* event_get_primary_source (Event* self); -GType rating_get_type (void) G_GNUC_CONST; -Rating media_source_get_rating (MediaSource* self); -Event* event_create_empty_event (MediaSource* source); -GQuark database_error_quark (void); -EventRow* event_table_create (EventTable* self, - const gchar* primary_source_id, - const gchar* comment, - GError** error); -gchar* data_object_to_string (DataObject* self); -void app_window_database_error (GError* err); -static Event* event_reconstitute (gint64 object_id, - EventRow* row); -void event_table_create_from_row (EventTable* self, - EventRow* row, - EventID* result); -gboolean data_collection_contains (DataCollection* self, - DataObject* object); -static gboolean event_real_has_links (ContainerSource* base); -gboolean source_collection_has_backlink (SourceCollection* self, - SourceBacklink* backlink); -SourceBacklink* container_source_get_backlink (ContainerSource* self); -static SourceBacklink* event_real_get_backlink (ContainerSource* base); -SourceBacklink* source_backlink_new_from_source (DataSource* source); -SourceBacklink* source_backlink_construct_from_source (GType object_type, - DataSource* source); -static void event_real_break_link (ContainerSource* base, - DataSource* source); -gboolean media_source_set_event (MediaSource* self, - Event* new_event); -static void event_real_break_link_many (ContainerSource* base, - GeeCollection* sources); -GType photo_source_get_type (void) G_GNUC_CONST; -GType photo_get_type (void) G_GNUC_CONST; -GType library_photo_get_type (void) G_GNUC_CONST; -GType video_source_get_type (void) G_GNUC_CONST; -GType video_get_type (void) G_GNUC_CONST; -void media_source_collection_filter_media (GeeCollection* media, - GeeCollection* photos, - GeeCollection* videos); -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; -void media_source_set_many_to_event (GeeCollection* media_sources, - Event* event, - TransactionController* controller, - GError** error); -TransactionController* media_source_collection_get_transaction_controller (MediaSourceCollection* self); -void app_window_error_message (const gchar* message, - GtkWindow* parent); -static void event_real_establish_link (ContainerSource* base, - DataSource* source); -static void event_real_establish_link_many (ContainerSource* base, - GeeCollection* sources); -gchar* event_get_raw_name (Event* self); -gchar* event_source_get_comment (EventSource* self); -gchar* indexable_prepare_indexable_string (const gchar* str); -static const gchar* event_real_get_indexable_keywords (Indexable* base); -gboolean event_is_in_starting_day (Event* self, - time_t time); -DataObject* data_collection_get_at (DataCollection* self, - gint index); -static Event* event_generate_event (MediaSource* media, - ViewCollection* events_so_far, - const gchar* event_name, - gboolean* new_event); -GType event_view_get_type (void) G_GNUC_CONST; -gchar* data_object_get_name (DataObject* self); -gboolean event_rename (Event* self, - const gchar* name); -EventView* event_view_new (EventSource* source); -EventView* event_view_construct (GType object_type, - EventSource* source); -void event_generate_single_event (MediaSource* media, - ViewCollection* events_so_far, - const gchar* event_name); -void event_generate_many_events (GeeCollection* sources, - ViewCollection* events_so_far); -static SourceSnapshot* event_real_save_snapshot (DataSource* base); -static EventEventSnapshot* event_event_snapshot_new (Event* event); -static EventEventSnapshot* event_event_snapshot_construct (GType object_type, - Event* event); -static GType event_event_snapshot_get_type (void) G_GNUC_CONST G_GNUC_UNUSED; -static SourceProxy* event_real_get_proxy (Proxyable* base); -static EventEventProxy* event_event_proxy_new (Event* event); -static EventEventProxy* event_event_proxy_construct (GType object_type, - Event* event); -static GType event_event_proxy_get_type (void) G_GNUC_CONST G_GNUC_UNUSED; -static gboolean event_real_equals (DataSource* base, - DataSource* source); -gboolean data_source_equals (DataSource* self, - DataSource* source); -static gchar* event_real_to_string (DataObject* base); -gint64 data_object_get_object_id (DataObject* self); -static gchar* event_real_get_name (DataObject* base); -gchar* event_get_formatted_daterange (Event* self); -gboolean is_string_empty (const gchar* s); -time_t event_source_get_start_time (EventSource* self); -time_t event_source_get_end_time (EventSource* self); -gchar* format_local_date (struct tm* date); -gchar* format_local_datespan (struct tm* from_date, - struct tm* to_date); -static gchar* event_real_get_comment (EventSource* base); -gboolean event_table_rename (EventTable* self, - EventID* event_id, - const gchar* name); -static gboolean event_real_set_comment (EventSource* base, - const gchar* comment); -gchar* media_source_prep_comment (const gchar* comment); -gboolean event_table_set_comment (EventTable* self, - EventID* event_id, - const gchar* new_comment); -time_t event_get_creation_time (Event* self); -time_t event_table_get_time_created (EventTable* self, - EventID* event_id); -static time_t event_real_get_start_time (EventSource* base); -static time_t event_real_get_end_time (EventSource* base); -static guint64 event_real_get_total_filesize (EventSource* base); -guint64 media_source_get_filesize (MediaSource* self); -static gint event_real_get_media_count (EventSource* base); -static GeeCollection* event_real_get_media (EventSource* base); -void event_mirror_photos (Event* self, - ViewCollection* view, - CreateView mirroring_ctor, - void* mirroring_ctor_target); -void view_collection_mirror (ViewCollection* self, - ViewCollection* to_mirror, - CreateView mirroring_ctor, - void* mirroring_ctor_target, - CreateViewPredicate should_mirror, - void* should_mirror_target); -void thumbnail_source_notify_thumbnail_altered (ThumbnailSource* self); -gboolean view_collection_has_view_for_source (ViewCollection* self, - DataSource* source); -static GdkPixbuf* event_real_get_thumbnail (ThumbnailSource* base, - gint scale, - GError** error); -GdkPixbuf* thumbnail_source_get_thumbnail (ThumbnailSource* self, - gint scale, - GError** error); -GType scaling_get_type (void) G_GNUC_CONST; -GType scale_constraint_get_type (void) G_GNUC_CONST; -GType dimensions_get_type (void) G_GNUC_CONST; -Dimensions* dimensions_dup (const Dimensions* self); -void dimensions_free (Dimensions* self); -Scaling* scaling_dup (const Scaling* self); -void scaling_free (Scaling* self); -GdkPixbuf* event_get_preview_pixbuf (Event* self, - Scaling* scaling); -GdkPixbuf* media_source_get_preview_pixbuf (MediaSource* self, - Scaling* scaling, - GError** error); -static void event_real_destroy (DataSource* base); -void view_collection_halt_all_monitoring (ViewCollection* self); -void event_table_remove (EventTable* self, - EventID* event_id, - GError** error); -GType photo_table_get_type (void) G_GNUC_CONST; -PhotoTable* photo_table_get_instance (void); -gboolean photo_table_drop_event (PhotoTable* self, - EventID* event_id); -GType video_table_get_type (void) G_GNUC_CONST; -VideoTable* video_table_get_instance (void); -gboolean video_table_drop_event (VideoTable* self, - EventID* event_id); -void data_source_destroy (DataSource* self); -#define EVENT_EVENT_SNAPSHOT_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), EVENT_TYPE_EVENT_SNAPSHOT, EventEventSnapshotPrivate)) -static void event_event_snapshot_on_attached_source_destroyed (EventEventSnapshot* self, - DataSource* source); -static void _event_event_snapshot_on_attached_source_destroyed_source_collection_item_destroyed (SourceCollection* _sender, - DataSource* source, - gpointer self); -SourceSnapshot* source_snapshot_construct (GType object_type); -EventRow* event_table_get_row (EventTable* self, - EventID* event_id); -static EventRow* event_event_snapshot_get_row (EventEventSnapshot* self); -static void event_event_snapshot_real_notify_broken (SourceSnapshot* base); -EventRow* event_row_new (void); -EventRow* event_row_construct (GType object_type); -void source_snapshot_notify_broken (SourceSnapshot* self); -static void event_event_snapshot_finalize (SourceSnapshot * obj); -SourceProxy* source_proxy_construct (GType object_type, - DataSource* source); -static DataSource* event_event_proxy_real_reconstitute (SourceProxy* base, - gint64 object_id, - SourceSnapshot* snapshot); -static void event_finalize (GObject * obj); -static void _vala_array_destroy (gpointer array, - gint array_length, - GDestroyNotify destroy_func); -static void _vala_array_free (gpointer array, - gint array_length, - GDestroyNotify destroy_func); - - -static gint64 -_event_source_collection_get_event_key_get_source_database_key (DataSource* source, - gpointer self) -{ - gint64 result; - result = event_source_collection_get_event_key (source); -#line 25 "/home/jens/Source/shotwell/src/Event.vala" - return result; -#line 1530 "Event.c" -} - - -EventSourceCollection* -event_source_collection_construct (GType object_type) -{ - EventSourceCollection* self = NULL; - LibraryPhotoSourceCollection* _tmp0_; - VideoSourceCollection* _tmp1_; -#line 25 "/home/jens/Source/shotwell/src/Event.vala" - self = (EventSourceCollection*) container_source_collection_construct (object_type, EVENT_TYPENAME, "EventSourceCollection", _event_source_collection_get_event_key_get_source_database_key, NULL); -#line 27 "/home/jens/Source/shotwell/src/Event.vala" - _tmp0_ = library_photo_global; -#line 27 "/home/jens/Source/shotwell/src/Event.vala" - container_source_collection_attach_collection (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_CONTAINER_SOURCE_COLLECTION, ContainerSourceCollection), G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, TYPE_SOURCE_COLLECTION, SourceCollection)); -#line 28 "/home/jens/Source/shotwell/src/Event.vala" - _tmp1_ = video_global; -#line 28 "/home/jens/Source/shotwell/src/Event.vala" - container_source_collection_attach_collection (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_CONTAINER_SOURCE_COLLECTION, ContainerSourceCollection), G_TYPE_CHECK_INSTANCE_CAST (_tmp1_, TYPE_SOURCE_COLLECTION, SourceCollection)); -#line 24 "/home/jens/Source/shotwell/src/Event.vala" - return self; -#line 1552 "Event.c" -} - - -EventSourceCollection* -event_source_collection_new (void) -{ -#line 24 "/home/jens/Source/shotwell/src/Event.vala" - return event_source_collection_construct (TYPE_EVENT_SOURCE_COLLECTION); -#line 1561 "Event.c" -} - - -static void -_event_source_collection_on_no_event_collection_altered_data_collection_contents_altered (DataCollection* _sender, - GeeIterable* added, - GeeIterable* removed, - gpointer self) -{ -#line 40 "/home/jens/Source/shotwell/src/Event.vala" - event_source_collection_on_no_event_collection_altered ((EventSourceCollection*) self, added, removed); -#line 1573 "Event.c" -} - - -void -event_source_collection_init (EventSourceCollection* self) -{ - ViewCollection* _tmp0_; - EventSourceCollectionNoEventViewManager* view_manager = NULL; - EventSourceCollectionNoEventViewManager* _tmp1_; - Alteration* filter_alteration = NULL; - Alteration* _tmp2_; - ViewCollection* _tmp3_; - LibraryPhotoSourceCollection* _tmp4_; - ViewCollectionMonitor* _tmp5_; - ViewCollectionMonitor* _tmp6_; - ViewCollection* _tmp7_; - VideoSourceCollection* _tmp8_; - ViewCollectionMonitor* _tmp9_; - ViewCollectionMonitor* _tmp10_; - ViewCollection* _tmp11_; -#line 31 "/home/jens/Source/shotwell/src/Event.vala" - g_return_if_fail (IS_EVENT_SOURCE_COLLECTION (self)); -#line 32 "/home/jens/Source/shotwell/src/Event.vala" - _tmp0_ = view_collection_new ("No Event View Collection"); -#line 32 "/home/jens/Source/shotwell/src/Event.vala" - _data_collection_unref0 (self->priv->no_event); -#line 32 "/home/jens/Source/shotwell/src/Event.vala" - self->priv->no_event = _tmp0_; -#line 34 "/home/jens/Source/shotwell/src/Event.vala" - _tmp1_ = event_source_collection_no_event_view_manager_new (); -#line 34 "/home/jens/Source/shotwell/src/Event.vala" - view_manager = _tmp1_; -#line 35 "/home/jens/Source/shotwell/src/Event.vala" - _tmp2_ = alteration_new ("metadata", "event"); -#line 35 "/home/jens/Source/shotwell/src/Event.vala" - filter_alteration = _tmp2_; -#line 37 "/home/jens/Source/shotwell/src/Event.vala" - _tmp3_ = self->priv->no_event; -#line 37 "/home/jens/Source/shotwell/src/Event.vala" - _tmp4_ = library_photo_global; -#line 37 "/home/jens/Source/shotwell/src/Event.vala" - _tmp5_ = view_collection_monitor_source_collection (_tmp3_, G_TYPE_CHECK_INSTANCE_CAST (_tmp4_, TYPE_SOURCE_COLLECTION, SourceCollection), G_TYPE_CHECK_INSTANCE_CAST (view_manager, TYPE_VIEW_MANAGER, ViewManager), filter_alteration, NULL, NULL, NULL); -#line 37 "/home/jens/Source/shotwell/src/Event.vala" - _tmp6_ = _tmp5_; -#line 37 "/home/jens/Source/shotwell/src/Event.vala" - _view_collection_monitor_unref0 (_tmp6_); -#line 38 "/home/jens/Source/shotwell/src/Event.vala" - _tmp7_ = self->priv->no_event; -#line 38 "/home/jens/Source/shotwell/src/Event.vala" - _tmp8_ = video_global; -#line 38 "/home/jens/Source/shotwell/src/Event.vala" - _tmp9_ = view_collection_monitor_source_collection (_tmp7_, G_TYPE_CHECK_INSTANCE_CAST (_tmp8_, TYPE_SOURCE_COLLECTION, SourceCollection), G_TYPE_CHECK_INSTANCE_CAST (view_manager, TYPE_VIEW_MANAGER, ViewManager), filter_alteration, NULL, NULL, NULL); -#line 38 "/home/jens/Source/shotwell/src/Event.vala" - _tmp10_ = _tmp9_; -#line 38 "/home/jens/Source/shotwell/src/Event.vala" - _view_collection_monitor_unref0 (_tmp10_); -#line 40 "/home/jens/Source/shotwell/src/Event.vala" - _tmp11_ = self->priv->no_event; -#line 40 "/home/jens/Source/shotwell/src/Event.vala" - g_signal_connect (G_TYPE_CHECK_INSTANCE_CAST (_tmp11_, TYPE_DATA_COLLECTION, DataCollection), "contents-altered", (GCallback) _event_source_collection_on_no_event_collection_altered_data_collection_contents_altered, self); -#line 31 "/home/jens/Source/shotwell/src/Event.vala" - _alteration_unref0 (filter_alteration); -#line 31 "/home/jens/Source/shotwell/src/Event.vala" - _view_manager_unref0 (view_manager); -#line 1638 "Event.c" -} - - -static gboolean -event_source_collection_real_holds_type_of_source (SourceCollection* base, - DataSource* source) -{ - EventSourceCollection * self; - gboolean result = FALSE; -#line 43 "/home/jens/Source/shotwell/src/Event.vala" - self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_EVENT_SOURCE_COLLECTION, EventSourceCollection); -#line 43 "/home/jens/Source/shotwell/src/Event.vala" - g_return_val_if_fail (IS_DATA_SOURCE (source), FALSE); -#line 44 "/home/jens/Source/shotwell/src/Event.vala" - result = G_TYPE_CHECK_INSTANCE_TYPE (source, TYPE_EVENT); -#line 44 "/home/jens/Source/shotwell/src/Event.vala" - return result; -#line 1656 "Event.c" -} - - -static gpointer -_g_object_ref0 (gpointer self) -{ -#line 48 "/home/jens/Source/shotwell/src/Event.vala" - return self ? g_object_ref (self) : NULL; -#line 1665 "Event.c" -} - - -static gint64 -event_source_collection_get_event_key (DataSource* source) -{ - gint64 result = 0LL; - Event* event = NULL; - Event* _tmp0_; - EventID event_id = {0}; - EventID _tmp1_ = {0}; - EventID _tmp2_; - gint64 _tmp3_; -#line 47 "/home/jens/Source/shotwell/src/Event.vala" - g_return_val_if_fail (IS_DATA_SOURCE (source), 0LL); -#line 48 "/home/jens/Source/shotwell/src/Event.vala" - _tmp0_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_CAST (source, TYPE_EVENT, Event)); -#line 48 "/home/jens/Source/shotwell/src/Event.vala" - event = _tmp0_; -#line 49 "/home/jens/Source/shotwell/src/Event.vala" - event_get_event_id (event, &_tmp1_); -#line 49 "/home/jens/Source/shotwell/src/Event.vala" - event_id = _tmp1_; -#line 51 "/home/jens/Source/shotwell/src/Event.vala" - _tmp2_ = event_id; -#line 51 "/home/jens/Source/shotwell/src/Event.vala" - _tmp3_ = _tmp2_.id; -#line 51 "/home/jens/Source/shotwell/src/Event.vala" - result = _tmp3_; -#line 51 "/home/jens/Source/shotwell/src/Event.vala" - _g_object_unref0 (event); -#line 51 "/home/jens/Source/shotwell/src/Event.vala" - return result; -#line 1699 "Event.c" -} - - -Event* -event_source_collection_fetch (EventSourceCollection* self, - EventID* event_id) -{ - Event* result = NULL; - EventID _tmp0_; - gint64 _tmp1_; - DataSource* _tmp2_; -#line 54 "/home/jens/Source/shotwell/src/Event.vala" - g_return_val_if_fail (IS_EVENT_SOURCE_COLLECTION (self), NULL); -#line 54 "/home/jens/Source/shotwell/src/Event.vala" - g_return_val_if_fail (event_id != NULL, NULL); -#line 55 "/home/jens/Source/shotwell/src/Event.vala" - _tmp0_ = *event_id; -#line 55 "/home/jens/Source/shotwell/src/Event.vala" - _tmp1_ = _tmp0_.id; -#line 55 "/home/jens/Source/shotwell/src/Event.vala" - _tmp2_ = database_source_collection_fetch_by_key (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_DATABASE_SOURCE_COLLECTION, DatabaseSourceCollection), _tmp1_); -#line 55 "/home/jens/Source/shotwell/src/Event.vala" - result = G_TYPE_CHECK_INSTANCE_CAST (_tmp2_, TYPE_EVENT, Event); -#line 55 "/home/jens/Source/shotwell/src/Event.vala" - return result; -#line 1725 "Event.c" -} - - -static GeeCollection* -event_source_collection_real_get_containers_holding_source (ContainerSourceCollection* base, - DataSource* source) -{ - EventSourceCollection * self; - GeeCollection* result = NULL; - Event* event = NULL; - Event* _tmp0_; - Event* _tmp1_; - GeeArrayList* list = NULL; - GeeArrayList* _tmp2_; - GeeArrayList* _tmp3_; - Event* _tmp4_; -#line 58 "/home/jens/Source/shotwell/src/Event.vala" - self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_EVENT_SOURCE_COLLECTION, EventSourceCollection); -#line 58 "/home/jens/Source/shotwell/src/Event.vala" - g_return_val_if_fail (IS_DATA_SOURCE (source), NULL); -#line 59 "/home/jens/Source/shotwell/src/Event.vala" - _tmp0_ = media_source_get_event (G_TYPE_CHECK_INSTANCE_CAST (source, TYPE_MEDIA_SOURCE, MediaSource)); -#line 59 "/home/jens/Source/shotwell/src/Event.vala" - event = _tmp0_; -#line 60 "/home/jens/Source/shotwell/src/Event.vala" - _tmp1_ = event; -#line 60 "/home/jens/Source/shotwell/src/Event.vala" - if (_tmp1_ == NULL) { -#line 61 "/home/jens/Source/shotwell/src/Event.vala" - result = NULL; -#line 61 "/home/jens/Source/shotwell/src/Event.vala" - _g_object_unref0 (event); -#line 61 "/home/jens/Source/shotwell/src/Event.vala" - return result; -#line 1760 "Event.c" - } -#line 63 "/home/jens/Source/shotwell/src/Event.vala" - _tmp2_ = gee_array_list_new (TYPE_CONTAINER_SOURCE, (GBoxedCopyFunc) g_object_ref, (GDestroyNotify) g_object_unref, NULL, NULL, NULL); -#line 63 "/home/jens/Source/shotwell/src/Event.vala" - list = _tmp2_; -#line 64 "/home/jens/Source/shotwell/src/Event.vala" - _tmp3_ = list; -#line 64 "/home/jens/Source/shotwell/src/Event.vala" - _tmp4_ = event; -#line 64 "/home/jens/Source/shotwell/src/Event.vala" - gee_abstract_collection_add (G_TYPE_CHECK_INSTANCE_CAST (_tmp3_, GEE_TYPE_ABSTRACT_COLLECTION, GeeAbstractCollection), G_TYPE_CHECK_INSTANCE_CAST (_tmp4_, TYPE_CONTAINER_SOURCE, ContainerSource)); -#line 66 "/home/jens/Source/shotwell/src/Event.vala" - result = G_TYPE_CHECK_INSTANCE_CAST (list, GEE_TYPE_COLLECTION, GeeCollection); -#line 66 "/home/jens/Source/shotwell/src/Event.vala" - _g_object_unref0 (event); -#line 66 "/home/jens/Source/shotwell/src/Event.vala" - return result; -#line 1778 "Event.c" -} - - -static ContainerSource* -event_source_collection_real_convert_backlink_to_container (ContainerSourceCollection* base, - SourceBacklink* backlink) -{ - EventSourceCollection * self; - ContainerSource* result = NULL; - EventID event_id = {0}; - gint64 _tmp0_; - gint64 _tmp1_; - Event* event = NULL; - EventID _tmp2_; - Event* _tmp3_; - Event* _tmp4_; -#line 69 "/home/jens/Source/shotwell/src/Event.vala" - self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_EVENT_SOURCE_COLLECTION, EventSourceCollection); -#line 69 "/home/jens/Source/shotwell/src/Event.vala" - g_return_val_if_fail (IS_SOURCE_BACKLINK (backlink), NULL); -#line 70 "/home/jens/Source/shotwell/src/Event.vala" - _tmp0_ = source_backlink_get_instance_id (backlink); -#line 70 "/home/jens/Source/shotwell/src/Event.vala" - _tmp1_ = _tmp0_; -#line 70 "/home/jens/Source/shotwell/src/Event.vala" - event_id_init (&event_id, _tmp1_); -#line 72 "/home/jens/Source/shotwell/src/Event.vala" - _tmp2_ = event_id; -#line 72 "/home/jens/Source/shotwell/src/Event.vala" - _tmp3_ = event_source_collection_fetch (self, &_tmp2_); -#line 72 "/home/jens/Source/shotwell/src/Event.vala" - event = _tmp3_; -#line 73 "/home/jens/Source/shotwell/src/Event.vala" - _tmp4_ = event; -#line 73 "/home/jens/Source/shotwell/src/Event.vala" - if (_tmp4_ != NULL) { -#line 74 "/home/jens/Source/shotwell/src/Event.vala" - result = G_TYPE_CHECK_INSTANCE_CAST (event, TYPE_CONTAINER_SOURCE, ContainerSource); -#line 74 "/home/jens/Source/shotwell/src/Event.vala" - return result; -#line 1819 "Event.c" - } - { - GeeIterator* _container_it = NULL; - GeeCollection* _tmp5_; - GeeCollection* _tmp6_; - GeeIterator* _tmp7_; - GeeIterator* _tmp8_; -#line 76 "/home/jens/Source/shotwell/src/Event.vala" - _tmp5_ = container_source_collection_get_holding_tank (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_CONTAINER_SOURCE_COLLECTION, ContainerSourceCollection)); -#line 76 "/home/jens/Source/shotwell/src/Event.vala" - _tmp6_ = _tmp5_; -#line 76 "/home/jens/Source/shotwell/src/Event.vala" - _tmp7_ = gee_iterable_iterator (G_TYPE_CHECK_INSTANCE_CAST (_tmp6_, GEE_TYPE_ITERABLE, GeeIterable)); -#line 76 "/home/jens/Source/shotwell/src/Event.vala" - _tmp8_ = _tmp7_; -#line 76 "/home/jens/Source/shotwell/src/Event.vala" - _g_object_unref0 (_tmp6_); -#line 76 "/home/jens/Source/shotwell/src/Event.vala" - _container_it = _tmp8_; -#line 76 "/home/jens/Source/shotwell/src/Event.vala" - while (TRUE) { -#line 1841 "Event.c" - GeeIterator* _tmp9_; - ContainerSource* container = NULL; - GeeIterator* _tmp10_; - gpointer _tmp11_; - ContainerSource* _tmp12_; - EventID _tmp13_ = {0}; - gint64 _tmp14_; - EventID _tmp15_; - gint64 _tmp16_; -#line 76 "/home/jens/Source/shotwell/src/Event.vala" - _tmp9_ = _container_it; -#line 76 "/home/jens/Source/shotwell/src/Event.vala" - if (!gee_iterator_next (_tmp9_)) { -#line 76 "/home/jens/Source/shotwell/src/Event.vala" - break; -#line 1857 "Event.c" - } -#line 76 "/home/jens/Source/shotwell/src/Event.vala" - _tmp10_ = _container_it; -#line 76 "/home/jens/Source/shotwell/src/Event.vala" - _tmp11_ = gee_iterator_get (_tmp10_); -#line 76 "/home/jens/Source/shotwell/src/Event.vala" - container = (ContainerSource*) _tmp11_; -#line 77 "/home/jens/Source/shotwell/src/Event.vala" - _tmp12_ = container; -#line 77 "/home/jens/Source/shotwell/src/Event.vala" - event_get_event_id (G_TYPE_CHECK_INSTANCE_CAST (_tmp12_, TYPE_EVENT, Event), &_tmp13_); -#line 77 "/home/jens/Source/shotwell/src/Event.vala" - _tmp14_ = _tmp13_.id; -#line 77 "/home/jens/Source/shotwell/src/Event.vala" - _tmp15_ = event_id; -#line 77 "/home/jens/Source/shotwell/src/Event.vala" - _tmp16_ = _tmp15_.id; -#line 77 "/home/jens/Source/shotwell/src/Event.vala" - if (_tmp14_ == _tmp16_) { -#line 78 "/home/jens/Source/shotwell/src/Event.vala" - result = container; -#line 78 "/home/jens/Source/shotwell/src/Event.vala" - _g_object_unref0 (_container_it); -#line 78 "/home/jens/Source/shotwell/src/Event.vala" - _g_object_unref0 (event); -#line 78 "/home/jens/Source/shotwell/src/Event.vala" - return result; -#line 1885 "Event.c" - } -#line 76 "/home/jens/Source/shotwell/src/Event.vala" - _g_object_unref0 (container); -#line 1889 "Event.c" - } -#line 76 "/home/jens/Source/shotwell/src/Event.vala" - _g_object_unref0 (_container_it); -#line 1893 "Event.c" - } -#line 81 "/home/jens/Source/shotwell/src/Event.vala" - result = NULL; -#line 81 "/home/jens/Source/shotwell/src/Event.vala" - _g_object_unref0 (event); -#line 81 "/home/jens/Source/shotwell/src/Event.vala" - return result; -#line 1901 "Event.c" -} - - -GeeCollection* -event_source_collection_get_no_event_objects (EventSourceCollection* self) -{ - GeeCollection* result = NULL; - ViewCollection* _tmp0_; - GeeCollection* _tmp1_; -#line 84 "/home/jens/Source/shotwell/src/Event.vala" - g_return_val_if_fail (IS_EVENT_SOURCE_COLLECTION (self), NULL); -#line 85 "/home/jens/Source/shotwell/src/Event.vala" - _tmp0_ = self->priv->no_event; -#line 85 "/home/jens/Source/shotwell/src/Event.vala" - _tmp1_ = view_collection_get_sources (_tmp0_); -#line 85 "/home/jens/Source/shotwell/src/Event.vala" - result = _tmp1_; -#line 85 "/home/jens/Source/shotwell/src/Event.vala" - return result; -#line 1921 "Event.c" -} - - -static void -event_source_collection_on_no_event_collection_altered (EventSourceCollection* self, - GeeIterable* added, - GeeIterable* removed) -{ -#line 88 "/home/jens/Source/shotwell/src/Event.vala" - g_return_if_fail (IS_EVENT_SOURCE_COLLECTION (self)); -#line 88 "/home/jens/Source/shotwell/src/Event.vala" - g_return_if_fail ((added == NULL) || GEE_IS_ITERABLE (added)); -#line 88 "/home/jens/Source/shotwell/src/Event.vala" - g_return_if_fail ((removed == NULL) || GEE_IS_ITERABLE (removed)); -#line 90 "/home/jens/Source/shotwell/src/Event.vala" - g_signal_emit (self, event_source_collection_signals[EVENT_SOURCE_COLLECTION_NO_EVENT_COLLECTION_ALTERED_SIGNAL], 0); -#line 1938 "Event.c" -} - - -static gboolean -event_source_collection_no_event_view_manager_real_include_in_view (ViewManager* base, - DataSource* source) -{ - EventSourceCollectionNoEventViewManager * self; - gboolean result = FALSE; - gboolean _tmp0_ = FALSE; - EventID _tmp1_ = {0}; - gint64 _tmp2_; -#line 13 "/home/jens/Source/shotwell/src/Event.vala" - self = G_TYPE_CHECK_INSTANCE_CAST (base, EVENT_SOURCE_COLLECTION_TYPE_NO_EVENT_VIEW_MANAGER, EventSourceCollectionNoEventViewManager); -#line 13 "/home/jens/Source/shotwell/src/Event.vala" - g_return_val_if_fail (IS_DATA_SOURCE (source), FALSE); -#line 15 "/home/jens/Source/shotwell/src/Event.vala" - media_source_get_event_id (G_TYPE_CHECK_INSTANCE_CAST (source, TYPE_MEDIA_SOURCE, MediaSource), &_tmp1_); -#line 15 "/home/jens/Source/shotwell/src/Event.vala" - _tmp2_ = _tmp1_.id; -#line 15 "/home/jens/Source/shotwell/src/Event.vala" - if (_tmp2_ != EVENT_ID_INVALID) { -#line 15 "/home/jens/Source/shotwell/src/Event.vala" - _tmp0_ = FALSE; -#line 1963 "Event.c" - } else { -#line 16 "/home/jens/Source/shotwell/src/Event.vala" - _tmp0_ = VIEW_MANAGER_CLASS (event_source_collection_no_event_view_manager_parent_class)->include_in_view (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_VIEW_MANAGER, ViewManager), source); -#line 1967 "Event.c" - } -#line 15 "/home/jens/Source/shotwell/src/Event.vala" - result = _tmp0_; -#line 15 "/home/jens/Source/shotwell/src/Event.vala" - return result; -#line 1973 "Event.c" -} - - -static DataView* -event_source_collection_no_event_view_manager_real_create_view (ViewManager* base, - DataSource* source) -{ - EventSourceCollectionNoEventViewManager * self; - DataView* result = NULL; - ThumbnailView* _tmp0_; -#line 19 "/home/jens/Source/shotwell/src/Event.vala" - self = G_TYPE_CHECK_INSTANCE_CAST (base, EVENT_SOURCE_COLLECTION_TYPE_NO_EVENT_VIEW_MANAGER, EventSourceCollectionNoEventViewManager); -#line 19 "/home/jens/Source/shotwell/src/Event.vala" - g_return_val_if_fail (IS_DATA_SOURCE (source), NULL); -#line 20 "/home/jens/Source/shotwell/src/Event.vala" - _tmp0_ = thumbnail_view_new (G_TYPE_CHECK_INSTANCE_CAST (G_TYPE_CHECK_INSTANCE_CAST (source, TYPE_MEDIA_SOURCE, MediaSource), TYPE_THUMBNAIL_SOURCE, ThumbnailSource)); -#line 20 "/home/jens/Source/shotwell/src/Event.vala" - result = G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, TYPE_DATA_VIEW, DataView); -#line 20 "/home/jens/Source/shotwell/src/Event.vala" - return result; -#line 1994 "Event.c" -} - - -static EventSourceCollectionNoEventViewManager* -event_source_collection_no_event_view_manager_construct (GType object_type) -{ - EventSourceCollectionNoEventViewManager* self = NULL; -#line 12 "/home/jens/Source/shotwell/src/Event.vala" - self = (EventSourceCollectionNoEventViewManager*) view_manager_construct (object_type); -#line 12 "/home/jens/Source/shotwell/src/Event.vala" - return self; -#line 2006 "Event.c" -} - - -static EventSourceCollectionNoEventViewManager* -event_source_collection_no_event_view_manager_new (void) -{ -#line 12 "/home/jens/Source/shotwell/src/Event.vala" - return event_source_collection_no_event_view_manager_construct (EVENT_SOURCE_COLLECTION_TYPE_NO_EVENT_VIEW_MANAGER); -#line 2015 "Event.c" -} - - -static void -event_source_collection_no_event_view_manager_class_init (EventSourceCollectionNoEventViewManagerClass * klass) -{ -#line 12 "/home/jens/Source/shotwell/src/Event.vala" - event_source_collection_no_event_view_manager_parent_class = g_type_class_peek_parent (klass); -#line 12 "/home/jens/Source/shotwell/src/Event.vala" - ((ViewManagerClass *) klass)->include_in_view = (gboolean (*) (ViewManager *, DataSource*)) event_source_collection_no_event_view_manager_real_include_in_view; -#line 12 "/home/jens/Source/shotwell/src/Event.vala" - ((ViewManagerClass *) klass)->create_view = (DataView* (*) (ViewManager *, DataSource*)) event_source_collection_no_event_view_manager_real_create_view; -#line 2028 "Event.c" -} - - -static void -event_source_collection_no_event_view_manager_instance_init (EventSourceCollectionNoEventViewManager * self) -{ -} - - -static GType -event_source_collection_no_event_view_manager_get_type (void) -{ - static volatile gsize event_source_collection_no_event_view_manager_type_id__volatile = 0; - if (g_once_init_enter (&event_source_collection_no_event_view_manager_type_id__volatile)) { - static const GTypeInfo g_define_type_info = { sizeof (EventSourceCollectionNoEventViewManagerClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) event_source_collection_no_event_view_manager_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (EventSourceCollectionNoEventViewManager), 0, (GInstanceInitFunc) event_source_collection_no_event_view_manager_instance_init, NULL }; - GType event_source_collection_no_event_view_manager_type_id; - event_source_collection_no_event_view_manager_type_id = g_type_register_static (TYPE_VIEW_MANAGER, "EventSourceCollectionNoEventViewManager", &g_define_type_info, 0); - g_once_init_leave (&event_source_collection_no_event_view_manager_type_id__volatile, event_source_collection_no_event_view_manager_type_id); - } - return event_source_collection_no_event_view_manager_type_id__volatile; -} - - -static void -event_source_collection_class_init (EventSourceCollectionClass * klass) -{ -#line 7 "/home/jens/Source/shotwell/src/Event.vala" - event_source_collection_parent_class = g_type_class_peek_parent (klass); -#line 7 "/home/jens/Source/shotwell/src/Event.vala" - ((DataCollectionClass *) klass)->finalize = event_source_collection_finalize; -#line 7 "/home/jens/Source/shotwell/src/Event.vala" - g_type_class_add_private (klass, sizeof (EventSourceCollectionPrivate)); -#line 7 "/home/jens/Source/shotwell/src/Event.vala" - ((SourceCollectionClass *) klass)->holds_type_of_source = (gboolean (*) (SourceCollection *, DataSource*)) event_source_collection_real_holds_type_of_source; -#line 7 "/home/jens/Source/shotwell/src/Event.vala" - ((ContainerSourceCollectionClass *) klass)->get_containers_holding_source = (GeeCollection* (*) (ContainerSourceCollection *, DataSource*)) event_source_collection_real_get_containers_holding_source; -#line 7 "/home/jens/Source/shotwell/src/Event.vala" - ((ContainerSourceCollectionClass *) klass)->convert_backlink_to_container = (ContainerSource* (*) (ContainerSourceCollection *, SourceBacklink*)) event_source_collection_real_convert_backlink_to_container; -#line 7 "/home/jens/Source/shotwell/src/Event.vala" - event_source_collection_signals[EVENT_SOURCE_COLLECTION_NO_EVENT_COLLECTION_ALTERED_SIGNAL] = g_signal_new ("no-event-collection-altered", TYPE_EVENT_SOURCE_COLLECTION, G_SIGNAL_RUN_LAST, 0, NULL, NULL, g_cclosure_marshal_VOID__VOID, G_TYPE_NONE, 0); -#line 2069 "Event.c" -} - - -static void -event_source_collection_instance_init (EventSourceCollection * self) -{ -#line 7 "/home/jens/Source/shotwell/src/Event.vala" - self->priv = EVENT_SOURCE_COLLECTION_GET_PRIVATE (self); -#line 2078 "Event.c" -} - - -static void -event_source_collection_finalize (DataCollection * obj) -{ - EventSourceCollection * self; -#line 7 "/home/jens/Source/shotwell/src/Event.vala" - self = G_TYPE_CHECK_INSTANCE_CAST (obj, TYPE_EVENT_SOURCE_COLLECTION, EventSourceCollection); -#line 10 "/home/jens/Source/shotwell/src/Event.vala" - _data_collection_unref0 (self->priv->no_event); -#line 7 "/home/jens/Source/shotwell/src/Event.vala" - DATA_COLLECTION_CLASS (event_source_collection_parent_class)->finalize (obj); -#line 2092 "Event.c" -} - - -GType -event_source_collection_get_type (void) -{ - static volatile gsize event_source_collection_type_id__volatile = 0; - if (g_once_init_enter (&event_source_collection_type_id__volatile)) { - static const GTypeInfo g_define_type_info = { sizeof (EventSourceCollectionClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) event_source_collection_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (EventSourceCollection), 0, (GInstanceInitFunc) event_source_collection_instance_init, NULL }; - GType event_source_collection_type_id; - event_source_collection_type_id = g_type_register_static (TYPE_CONTAINER_SOURCE_COLLECTION, "EventSourceCollection", &g_define_type_info, 0); - g_once_init_leave (&event_source_collection_type_id__volatile, event_source_collection_type_id); - } - return event_source_collection_type_id__volatile; -} - - -static void -_event_on_primary_thumbnail_altered_thumbnail_source_thumbnail_altered (ThumbnailSource* _sender, - gpointer self) -{ -#line 238 "/home/jens/Source/shotwell/src/Event.vala" - event_on_primary_thumbnail_altered ((Event*) self); -#line 2116 "Event.c" -} - - -static void -_event_on_media_altered_data_collection_items_altered (DataCollection* _sender, - GeeMap* items, - gpointer self) -{ -#line 240 "/home/jens/Source/shotwell/src/Event.vala" - event_on_media_altered ((Event*) self, items); -#line 2127 "Event.c" -} - - -static void -_event_on_media_removed_data_collection_items_removed (DataCollection* _sender, - GeeIterable* removed, - gpointer self) -{ -#line 241 "/home/jens/Source/shotwell/src/Event.vala" - event_on_media_removed ((Event*) self, removed); -#line 2138 "Event.c" -} - - -static void -_event_on_media_added_data_collection_items_added (DataCollection* _sender, - GeeIterable* added, - gpointer self) -{ -#line 242 "/home/jens/Source/shotwell/src/Event.vala" - event_on_media_added ((Event*) self, added); -#line 2149 "Event.c" -} - - -static void -_event_on_media_destroyed_source_collection_item_destroyed (SourceCollection* _sender, - DataSource* source, - gpointer self) -{ -#line 244 "/home/jens/Source/shotwell/src/Event.vala" - event_on_media_destroyed ((Event*) self, source); -#line 2160 "Event.c" -} - - -static gint64 -_event_view_comparator_comparator (void* a, - void* b, - gpointer self) -{ - gint64 result; - result = event_view_comparator (a, b); -#line 201 "/home/jens/Source/shotwell/src/Event.vala" - return result; -#line 2173 "Event.c" -} - - -static gboolean -_event_view_comparator_predicate_comparator_predicate (DataObject* object, - Alteration* alteration, - gpointer self) -{ - gboolean result; - result = event_view_comparator_predicate (object, alteration); -#line 201 "/home/jens/Source/shotwell/src/Event.vala" - return result; -#line 2186 "Event.c" -} - - -static Event* -event_construct (GType object_type, - EventRow* event_row, - gint64 object_id) -{ - Event * self = NULL; - const gchar* _tmp0_; - gchar* _tmp1_; - EventID _tmp2_; - const gchar* _tmp3_; - gchar* _tmp4_; - const gchar* _tmp5_; - gchar* _tmp6_; - GeeCollection* event_source_ids = NULL; - MediaCollectionRegistry* _tmp7_; - MediaCollectionRegistry* _tmp8_; - EventID _tmp9_; - GeeCollection* _tmp10_; - GeeCollection* _tmp11_; - GeeArrayList* event_thumbs = NULL; - GeeArrayList* _tmp12_; - EventID _tmp28_; - gint64 _tmp29_; - gchar* _tmp30_; - gchar* _tmp31_; - gchar* _tmp32_; - gchar* _tmp33_; - ViewCollection* _tmp34_; - ViewCollection* _tmp35_; - ViewCollection* _tmp36_; - GeeArrayList* _tmp37_; - GeeCollection* _tmp38_; - GeeCollection* _tmp39_; - GeeArrayList* _tmp40_; - gint _tmp41_; - gint _tmp42_; - MediaCollectionRegistry* _tmp47_; - MediaCollectionRegistry* _tmp48_; - const gchar* _tmp49_; - MediaSource* _tmp50_; - gboolean _tmp51_ = FALSE; - MediaSource* _tmp52_; - MediaSource* _tmp63_; - ViewCollection* _tmp65_; - ViewCollection* _tmp66_; - ViewCollection* _tmp67_; - LibraryPhotoSourceCollection* _tmp68_; - VideoSourceCollection* _tmp69_; -#line 180 "/home/jens/Source/shotwell/src/Event.vala" - g_return_val_if_fail (IS_EVENT_ROW (event_row), NULL); -#line 181 "/home/jens/Source/shotwell/src/Event.vala" - self = (Event*) event_source_construct (object_type, object_id); -#line 184 "/home/jens/Source/shotwell/src/Event.vala" - _tmp0_ = event_row->name; -#line 184 "/home/jens/Source/shotwell/src/Event.vala" - _tmp1_ = event_prep_event_name (_tmp0_); -#line 184 "/home/jens/Source/shotwell/src/Event.vala" - _g_free0 (event_row->name); -#line 184 "/home/jens/Source/shotwell/src/Event.vala" - event_row->name = _tmp1_; -#line 186 "/home/jens/Source/shotwell/src/Event.vala" - _tmp2_ = event_row->event_id; -#line 186 "/home/jens/Source/shotwell/src/Event.vala" - self->priv->event_id = _tmp2_; -#line 187 "/home/jens/Source/shotwell/src/Event.vala" - _tmp3_ = event_row->name; -#line 187 "/home/jens/Source/shotwell/src/Event.vala" - _tmp4_ = g_strdup (_tmp3_); -#line 187 "/home/jens/Source/shotwell/src/Event.vala" - _g_free0 (self->priv->raw_name); -#line 187 "/home/jens/Source/shotwell/src/Event.vala" - self->priv->raw_name = _tmp4_; -#line 188 "/home/jens/Source/shotwell/src/Event.vala" - _tmp5_ = event_row->comment; -#line 188 "/home/jens/Source/shotwell/src/Event.vala" - _tmp6_ = g_strdup (_tmp5_); -#line 188 "/home/jens/Source/shotwell/src/Event.vala" - _g_free0 (self->priv->comment); -#line 188 "/home/jens/Source/shotwell/src/Event.vala" - self->priv->comment = _tmp6_; -#line 190 "/home/jens/Source/shotwell/src/Event.vala" - _tmp7_ = media_collection_registry_get_instance (); -#line 190 "/home/jens/Source/shotwell/src/Event.vala" - _tmp8_ = _tmp7_; -#line 190 "/home/jens/Source/shotwell/src/Event.vala" - _tmp9_ = self->priv->event_id; -#line 190 "/home/jens/Source/shotwell/src/Event.vala" - _tmp10_ = media_collection_registry_get_source_ids_for_event_id (_tmp8_, &_tmp9_); -#line 190 "/home/jens/Source/shotwell/src/Event.vala" - _tmp11_ = _tmp10_; -#line 190 "/home/jens/Source/shotwell/src/Event.vala" - _media_collection_registry_unref0 (_tmp8_); -#line 190 "/home/jens/Source/shotwell/src/Event.vala" - event_source_ids = _tmp11_; -#line 192 "/home/jens/Source/shotwell/src/Event.vala" - _tmp12_ = gee_array_list_new (TYPE_THUMBNAIL_VIEW, (GBoxedCopyFunc) g_object_ref, (GDestroyNotify) g_object_unref, NULL, NULL, NULL); -#line 192 "/home/jens/Source/shotwell/src/Event.vala" - event_thumbs = _tmp12_; -#line 2288 "Event.c" - { - GeeIterator* _current_source_id_it = NULL; - GeeCollection* _tmp13_; - GeeIterator* _tmp14_; -#line 193 "/home/jens/Source/shotwell/src/Event.vala" - _tmp13_ = event_source_ids; -#line 193 "/home/jens/Source/shotwell/src/Event.vala" - _tmp14_ = gee_iterable_iterator (G_TYPE_CHECK_INSTANCE_CAST (_tmp13_, GEE_TYPE_ITERABLE, GeeIterable)); -#line 193 "/home/jens/Source/shotwell/src/Event.vala" - _current_source_id_it = _tmp14_; -#line 193 "/home/jens/Source/shotwell/src/Event.vala" - while (TRUE) { -#line 2301 "Event.c" - GeeIterator* _tmp15_; - gchar* current_source_id = NULL; - GeeIterator* _tmp16_; - gpointer _tmp17_; - MediaSource* media = NULL; - MediaCollectionRegistry* _tmp18_; - MediaCollectionRegistry* _tmp19_; - const gchar* _tmp20_; - MediaSource* _tmp21_; - MediaSource* _tmp22_; - MediaSource* _tmp23_; -#line 193 "/home/jens/Source/shotwell/src/Event.vala" - _tmp15_ = _current_source_id_it; -#line 193 "/home/jens/Source/shotwell/src/Event.vala" - if (!gee_iterator_next (_tmp15_)) { -#line 193 "/home/jens/Source/shotwell/src/Event.vala" - break; -#line 2319 "Event.c" - } -#line 193 "/home/jens/Source/shotwell/src/Event.vala" - _tmp16_ = _current_source_id_it; -#line 193 "/home/jens/Source/shotwell/src/Event.vala" - _tmp17_ = gee_iterator_get (_tmp16_); -#line 193 "/home/jens/Source/shotwell/src/Event.vala" - current_source_id = (gchar*) _tmp17_; -#line 194 "/home/jens/Source/shotwell/src/Event.vala" - _tmp18_ = media_collection_registry_get_instance (); -#line 194 "/home/jens/Source/shotwell/src/Event.vala" - _tmp19_ = _tmp18_; -#line 194 "/home/jens/Source/shotwell/src/Event.vala" - _tmp20_ = current_source_id; -#line 194 "/home/jens/Source/shotwell/src/Event.vala" - _tmp21_ = media_collection_registry_fetch_media (_tmp19_, _tmp20_); -#line 194 "/home/jens/Source/shotwell/src/Event.vala" - _tmp22_ = _tmp21_; -#line 194 "/home/jens/Source/shotwell/src/Event.vala" - _media_collection_registry_unref0 (_tmp19_); -#line 194 "/home/jens/Source/shotwell/src/Event.vala" - media = _tmp22_; -#line 196 "/home/jens/Source/shotwell/src/Event.vala" - _tmp23_ = media; -#line 196 "/home/jens/Source/shotwell/src/Event.vala" - if (_tmp23_ != NULL) { -#line 2345 "Event.c" - GeeArrayList* _tmp24_; - MediaSource* _tmp25_; - ThumbnailView* _tmp26_; - ThumbnailView* _tmp27_; -#line 197 "/home/jens/Source/shotwell/src/Event.vala" - _tmp24_ = event_thumbs; -#line 197 "/home/jens/Source/shotwell/src/Event.vala" - _tmp25_ = media; -#line 197 "/home/jens/Source/shotwell/src/Event.vala" - _tmp26_ = thumbnail_view_new (G_TYPE_CHECK_INSTANCE_CAST (_tmp25_, TYPE_THUMBNAIL_SOURCE, ThumbnailSource)); -#line 197 "/home/jens/Source/shotwell/src/Event.vala" - _tmp27_ = _tmp26_; -#line 197 "/home/jens/Source/shotwell/src/Event.vala" - gee_abstract_collection_add (G_TYPE_CHECK_INSTANCE_CAST (_tmp24_, GEE_TYPE_ABSTRACT_COLLECTION, GeeAbstractCollection), _tmp27_); -#line 197 "/home/jens/Source/shotwell/src/Event.vala" - _g_object_unref0 (_tmp27_); -#line 2362 "Event.c" - } -#line 193 "/home/jens/Source/shotwell/src/Event.vala" - _g_object_unref0 (media); -#line 193 "/home/jens/Source/shotwell/src/Event.vala" - _g_free0 (current_source_id); -#line 2368 "Event.c" - } -#line 193 "/home/jens/Source/shotwell/src/Event.vala" - _g_object_unref0 (_current_source_id_it); -#line 2372 "Event.c" - } -#line 200 "/home/jens/Source/shotwell/src/Event.vala" - _tmp28_ = self->priv->event_id; -#line 200 "/home/jens/Source/shotwell/src/Event.vala" - _tmp29_ = _tmp28_.id; -#line 200 "/home/jens/Source/shotwell/src/Event.vala" - _tmp30_ = g_strdup_printf ("%" G_GINT64_FORMAT, _tmp29_); -#line 200 "/home/jens/Source/shotwell/src/Event.vala" - _tmp31_ = _tmp30_; -#line 200 "/home/jens/Source/shotwell/src/Event.vala" - _tmp32_ = g_strdup_printf ("ViewCollection for Event %s", _tmp31_); -#line 200 "/home/jens/Source/shotwell/src/Event.vala" - _tmp33_ = _tmp32_; -#line 200 "/home/jens/Source/shotwell/src/Event.vala" - _tmp34_ = view_collection_new (_tmp33_); -#line 200 "/home/jens/Source/shotwell/src/Event.vala" - _data_collection_unref0 (self->priv->view); -#line 200 "/home/jens/Source/shotwell/src/Event.vala" - self->priv->view = _tmp34_; -#line 200 "/home/jens/Source/shotwell/src/Event.vala" - _g_free0 (_tmp33_); -#line 200 "/home/jens/Source/shotwell/src/Event.vala" - _g_free0 (_tmp31_); -#line 201 "/home/jens/Source/shotwell/src/Event.vala" - _tmp35_ = self->priv->view; -#line 201 "/home/jens/Source/shotwell/src/Event.vala" - data_collection_set_comparator (G_TYPE_CHECK_INSTANCE_CAST (_tmp35_, TYPE_DATA_COLLECTION, DataCollection), _event_view_comparator_comparator, NULL, _event_view_comparator_predicate_comparator_predicate, NULL); -#line 202 "/home/jens/Source/shotwell/src/Event.vala" - _tmp36_ = self->priv->view; -#line 202 "/home/jens/Source/shotwell/src/Event.vala" - _tmp37_ = event_thumbs; -#line 202 "/home/jens/Source/shotwell/src/Event.vala" - _tmp38_ = data_collection_add_many (G_TYPE_CHECK_INSTANCE_CAST (_tmp36_, TYPE_DATA_COLLECTION, DataCollection), G_TYPE_CHECK_INSTANCE_CAST (_tmp37_, GEE_TYPE_COLLECTION, GeeCollection), NULL, NULL); -#line 202 "/home/jens/Source/shotwell/src/Event.vala" - _tmp39_ = _tmp38_; -#line 202 "/home/jens/Source/shotwell/src/Event.vala" - _g_object_unref0 (_tmp39_); -#line 206 "/home/jens/Source/shotwell/src/Event.vala" - _tmp40_ = event_thumbs; -#line 206 "/home/jens/Source/shotwell/src/Event.vala" - _tmp41_ = gee_abstract_collection_get_size (G_TYPE_CHECK_INSTANCE_CAST (_tmp40_, GEE_TYPE_ABSTRACT_COLLECTION, GeeAbstractCollection)); -#line 206 "/home/jens/Source/shotwell/src/Event.vala" - _tmp42_ = _tmp41_; -#line 206 "/home/jens/Source/shotwell/src/Event.vala" - if (_tmp42_ > 0) { -#line 2418 "Event.c" - EventSourceCollection* _tmp43_; - GeeArrayList* _tmp44_; - EventSourceCollection* _tmp45_; - GeeArrayList* _tmp46_; -#line 207 "/home/jens/Source/shotwell/src/Event.vala" - _tmp43_ = event_global; -#line 207 "/home/jens/Source/shotwell/src/Event.vala" - _tmp44_ = event_thumbs; -#line 207 "/home/jens/Source/shotwell/src/Event.vala" - container_source_collection_notify_container_contents_added (G_TYPE_CHECK_INSTANCE_CAST (_tmp43_, TYPE_CONTAINER_SOURCE_COLLECTION, ContainerSourceCollection), G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_CONTAINER_SOURCE, ContainerSource), G_TYPE_CHECK_INSTANCE_CAST (_tmp44_, GEE_TYPE_COLLECTION, GeeCollection), FALSE); -#line 208 "/home/jens/Source/shotwell/src/Event.vala" - _tmp45_ = event_global; -#line 208 "/home/jens/Source/shotwell/src/Event.vala" - _tmp46_ = event_thumbs; -#line 208 "/home/jens/Source/shotwell/src/Event.vala" - container_source_collection_notify_container_contents_altered (G_TYPE_CHECK_INSTANCE_CAST (_tmp45_, TYPE_CONTAINER_SOURCE_COLLECTION, ContainerSourceCollection), G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_CONTAINER_SOURCE, ContainerSource), G_TYPE_CHECK_INSTANCE_CAST (_tmp46_, GEE_TYPE_COLLECTION, GeeCollection), FALSE, NULL, FALSE); -#line 2435 "Event.c" - } -#line 213 "/home/jens/Source/shotwell/src/Event.vala" - _tmp47_ = media_collection_registry_get_instance (); -#line 213 "/home/jens/Source/shotwell/src/Event.vala" - _tmp48_ = _tmp47_; -#line 213 "/home/jens/Source/shotwell/src/Event.vala" - _tmp49_ = event_row->primary_source_id; -#line 213 "/home/jens/Source/shotwell/src/Event.vala" - _tmp50_ = media_collection_registry_fetch_media (_tmp48_, _tmp49_); -#line 213 "/home/jens/Source/shotwell/src/Event.vala" - _g_object_unref0 (self->priv->primary_source); -#line 213 "/home/jens/Source/shotwell/src/Event.vala" - self->priv->primary_source = _tmp50_; -#line 213 "/home/jens/Source/shotwell/src/Event.vala" - _media_collection_registry_unref0 (_tmp48_); -#line 214 "/home/jens/Source/shotwell/src/Event.vala" - _tmp52_ = self->priv->primary_source; -#line 214 "/home/jens/Source/shotwell/src/Event.vala" - if (_tmp52_ == NULL) { -#line 2455 "Event.c" - ViewCollection* _tmp53_; -#line 214 "/home/jens/Source/shotwell/src/Event.vala" - _tmp53_ = self->priv->view; -#line 214 "/home/jens/Source/shotwell/src/Event.vala" - _tmp51_ = data_collection_get_count (G_TYPE_CHECK_INSTANCE_CAST (_tmp53_, TYPE_DATA_COLLECTION, DataCollection)) > 0; -#line 2461 "Event.c" - } else { -#line 214 "/home/jens/Source/shotwell/src/Event.vala" - _tmp51_ = FALSE; -#line 2465 "Event.c" - } -#line 214 "/home/jens/Source/shotwell/src/Event.vala" - if (_tmp51_) { -#line 2469 "Event.c" - ViewCollection* _tmp54_; - DataView* _tmp55_; - DataView* _tmp56_; - DataSource* _tmp57_; - EventTable* _tmp58_; - EventID _tmp59_; - MediaSource* _tmp60_; - gchar* _tmp61_; - gchar* _tmp62_; -#line 215 "/home/jens/Source/shotwell/src/Event.vala" - _tmp54_ = self->priv->view; -#line 215 "/home/jens/Source/shotwell/src/Event.vala" - _tmp55_ = view_collection_get_first_unrejected (_tmp54_); -#line 215 "/home/jens/Source/shotwell/src/Event.vala" - _tmp56_ = G_TYPE_CHECK_INSTANCE_CAST (_tmp55_, TYPE_DATA_VIEW, DataView); -#line 215 "/home/jens/Source/shotwell/src/Event.vala" - _tmp57_ = data_view_get_source (_tmp56_); -#line 215 "/home/jens/Source/shotwell/src/Event.vala" - _g_object_unref0 (self->priv->primary_source); -#line 215 "/home/jens/Source/shotwell/src/Event.vala" - self->priv->primary_source = G_TYPE_CHECK_INSTANCE_CAST (_tmp57_, TYPE_MEDIA_SOURCE, MediaSource); -#line 215 "/home/jens/Source/shotwell/src/Event.vala" - _g_object_unref0 (_tmp56_); -#line 216 "/home/jens/Source/shotwell/src/Event.vala" - _tmp58_ = event_event_table; -#line 216 "/home/jens/Source/shotwell/src/Event.vala" - _tmp59_ = self->priv->event_id; -#line 216 "/home/jens/Source/shotwell/src/Event.vala" - _tmp60_ = self->priv->primary_source; -#line 216 "/home/jens/Source/shotwell/src/Event.vala" - _tmp61_ = data_source_get_source_id (G_TYPE_CHECK_INSTANCE_CAST (_tmp60_, TYPE_DATA_SOURCE, DataSource)); -#line 216 "/home/jens/Source/shotwell/src/Event.vala" - _tmp62_ = _tmp61_; -#line 216 "/home/jens/Source/shotwell/src/Event.vala" - event_table_set_primary_source_id (_tmp58_, &_tmp59_, _tmp62_); -#line 216 "/home/jens/Source/shotwell/src/Event.vala" - _g_free0 (_tmp62_); -#line 2507 "Event.c" - } -#line 220 "/home/jens/Source/shotwell/src/Event.vala" - _tmp63_ = self->priv->primary_source; -#line 220 "/home/jens/Source/shotwell/src/Event.vala" - if (_tmp63_ != NULL) { -#line 2513 "Event.c" - MediaSource* _tmp64_; -#line 221 "/home/jens/Source/shotwell/src/Event.vala" - _tmp64_ = self->priv->primary_source; -#line 221 "/home/jens/Source/shotwell/src/Event.vala" - g_signal_connect_object (G_TYPE_CHECK_INSTANCE_CAST (_tmp64_, TYPE_THUMBNAIL_SOURCE, ThumbnailSource), "thumbnail-altered", (GCallback) _event_on_primary_thumbnail_altered_thumbnail_source_thumbnail_altered, self, 0); -#line 2519 "Event.c" - } -#line 224 "/home/jens/Source/shotwell/src/Event.vala" - _tmp65_ = self->priv->view; -#line 224 "/home/jens/Source/shotwell/src/Event.vala" - g_signal_connect_object (G_TYPE_CHECK_INSTANCE_CAST (_tmp65_, TYPE_DATA_COLLECTION, DataCollection), "items-added", (GCallback) _event_on_media_added_data_collection_items_added, self, 0); -#line 225 "/home/jens/Source/shotwell/src/Event.vala" - _tmp66_ = self->priv->view; -#line 225 "/home/jens/Source/shotwell/src/Event.vala" - g_signal_connect_object (G_TYPE_CHECK_INSTANCE_CAST (_tmp66_, TYPE_DATA_COLLECTION, DataCollection), "items-removed", (GCallback) _event_on_media_removed_data_collection_items_removed, self, 0); -#line 226 "/home/jens/Source/shotwell/src/Event.vala" - _tmp67_ = self->priv->view; -#line 226 "/home/jens/Source/shotwell/src/Event.vala" - g_signal_connect_object (G_TYPE_CHECK_INSTANCE_CAST (_tmp67_, TYPE_DATA_COLLECTION, DataCollection), "items-altered", (GCallback) _event_on_media_altered_data_collection_items_altered, self, 0); -#line 230 "/home/jens/Source/shotwell/src/Event.vala" - _tmp68_ = library_photo_global; -#line 230 "/home/jens/Source/shotwell/src/Event.vala" - g_signal_connect_object (G_TYPE_CHECK_INSTANCE_CAST (_tmp68_, TYPE_SOURCE_COLLECTION, SourceCollection), "item-destroyed", (GCallback) _event_on_media_destroyed_source_collection_item_destroyed, self, 0); -#line 231 "/home/jens/Source/shotwell/src/Event.vala" - _tmp69_ = video_global; -#line 231 "/home/jens/Source/shotwell/src/Event.vala" - g_signal_connect_object (G_TYPE_CHECK_INSTANCE_CAST (_tmp69_, TYPE_SOURCE_COLLECTION, SourceCollection), "item-destroyed", (GCallback) _event_on_media_destroyed_source_collection_item_destroyed, self, 0); -#line 233 "/home/jens/Source/shotwell/src/Event.vala" - event_update_indexable_keywords (self); -#line 180 "/home/jens/Source/shotwell/src/Event.vala" - _g_object_unref0 (event_thumbs); -#line 180 "/home/jens/Source/shotwell/src/Event.vala" - _g_object_unref0 (event_source_ids); -#line 180 "/home/jens/Source/shotwell/src/Event.vala" - return self; -#line 2549 "Event.c" -} - - -static Event* -event_new (EventRow* event_row, - gint64 object_id) -{ -#line 180 "/home/jens/Source/shotwell/src/Event.vala" - return event_construct (TYPE_EVENT, event_row, object_id); -#line 2559 "Event.c" -} - - -static gchar* -event_real_get_typename (DataSource* base) -{ - Event * self; - gchar* result = NULL; - gchar* _tmp0_; -#line 248 "/home/jens/Source/shotwell/src/Event.vala" - self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_EVENT, Event); -#line 249 "/home/jens/Source/shotwell/src/Event.vala" - _tmp0_ = g_strdup (EVENT_TYPENAME); -#line 249 "/home/jens/Source/shotwell/src/Event.vala" - result = _tmp0_; -#line 249 "/home/jens/Source/shotwell/src/Event.vala" - return result; -#line 2577 "Event.c" -} - - -static gint64 -event_real_get_instance_id (DataSource* base) -{ - Event * self; - gint64 result = 0LL; - EventID _tmp0_ = {0}; - gint64 _tmp1_; -#line 252 "/home/jens/Source/shotwell/src/Event.vala" - self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_EVENT, Event); -#line 253 "/home/jens/Source/shotwell/src/Event.vala" - event_get_event_id (self, &_tmp0_); -#line 253 "/home/jens/Source/shotwell/src/Event.vala" - _tmp1_ = _tmp0_.id; -#line 253 "/home/jens/Source/shotwell/src/Event.vala" - result = _tmp1_; -#line 253 "/home/jens/Source/shotwell/src/Event.vala" - return result; -#line 2598 "Event.c" -} - - -static gchar* -event_real_get_representative_id (ThumbnailSource* base) -{ - Event * self; - gchar* result = NULL; - gchar* _tmp0_ = NULL; - MediaSource* _tmp1_; -#line 256 "/home/jens/Source/shotwell/src/Event.vala" - self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_EVENT, Event); -#line 257 "/home/jens/Source/shotwell/src/Event.vala" - _tmp1_ = self->priv->primary_source; -#line 257 "/home/jens/Source/shotwell/src/Event.vala" - if (_tmp1_ != NULL) { -#line 2615 "Event.c" - MediaSource* _tmp2_; - gchar* _tmp3_; -#line 257 "/home/jens/Source/shotwell/src/Event.vala" - _tmp2_ = self->priv->primary_source; -#line 257 "/home/jens/Source/shotwell/src/Event.vala" - _tmp3_ = data_source_get_source_id (G_TYPE_CHECK_INSTANCE_CAST (_tmp2_, TYPE_DATA_SOURCE, DataSource)); -#line 257 "/home/jens/Source/shotwell/src/Event.vala" - _g_free0 (_tmp0_); -#line 257 "/home/jens/Source/shotwell/src/Event.vala" - _tmp0_ = _tmp3_; -#line 2626 "Event.c" - } else { - gchar* _tmp4_; -#line 257 "/home/jens/Source/shotwell/src/Event.vala" - _tmp4_ = data_source_get_source_id (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_DATA_SOURCE, DataSource)); -#line 257 "/home/jens/Source/shotwell/src/Event.vala" - _g_free0 (_tmp0_); -#line 257 "/home/jens/Source/shotwell/src/Event.vala" - _tmp0_ = _tmp4_; -#line 2635 "Event.c" - } -#line 257 "/home/jens/Source/shotwell/src/Event.vala" - result = _tmp0_; -#line 257 "/home/jens/Source/shotwell/src/Event.vala" - return result; -#line 2641 "Event.c" -} - - -static PhotoFileFormat -event_real_get_preferred_thumbnail_format (ThumbnailSource* base) -{ - Event * self; - PhotoFileFormat result = 0; - PhotoFileFormat _tmp0_ = 0; - MediaSource* _tmp1_; -#line 260 "/home/jens/Source/shotwell/src/Event.vala" - self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_EVENT, Event); -#line 261 "/home/jens/Source/shotwell/src/Event.vala" - _tmp1_ = self->priv->primary_source; -#line 261 "/home/jens/Source/shotwell/src/Event.vala" - if (_tmp1_ != NULL) { -#line 2658 "Event.c" - MediaSource* _tmp2_; -#line 261 "/home/jens/Source/shotwell/src/Event.vala" - _tmp2_ = self->priv->primary_source; -#line 261 "/home/jens/Source/shotwell/src/Event.vala" - _tmp0_ = thumbnail_source_get_preferred_thumbnail_format (G_TYPE_CHECK_INSTANCE_CAST (_tmp2_, TYPE_THUMBNAIL_SOURCE, ThumbnailSource)); -#line 2664 "Event.c" - } else { -#line 262 "/home/jens/Source/shotwell/src/Event.vala" - _tmp0_ = photo_file_format_get_system_default_format (); -#line 2668 "Event.c" - } -#line 261 "/home/jens/Source/shotwell/src/Event.vala" - result = _tmp0_; -#line 261 "/home/jens/Source/shotwell/src/Event.vala" - return result; -#line 2674 "Event.c" -} - - -static GdkPixbuf* -event_real_create_thumbnail (ThumbnailSource* base, - gint scale, - GError** error) -{ - Event * self; - GdkPixbuf* result = NULL; - GdkPixbuf* _tmp0_ = NULL; - MediaSource* _tmp1_; - GError * _inner_error_ = NULL; -#line 265 "/home/jens/Source/shotwell/src/Event.vala" - self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_EVENT, Event); -#line 266 "/home/jens/Source/shotwell/src/Event.vala" - _tmp1_ = self->priv->primary_source; -#line 266 "/home/jens/Source/shotwell/src/Event.vala" - if (_tmp1_ != NULL) { -#line 2694 "Event.c" - MediaSource* _tmp2_; - GdkPixbuf* _tmp3_; -#line 266 "/home/jens/Source/shotwell/src/Event.vala" - _tmp2_ = self->priv->primary_source; -#line 266 "/home/jens/Source/shotwell/src/Event.vala" - _tmp3_ = thumbnail_source_create_thumbnail (G_TYPE_CHECK_INSTANCE_CAST (_tmp2_, TYPE_THUMBNAIL_SOURCE, ThumbnailSource), scale, &_inner_error_); -#line 266 "/home/jens/Source/shotwell/src/Event.vala" - _g_object_unref0 (_tmp0_); -#line 266 "/home/jens/Source/shotwell/src/Event.vala" - _tmp0_ = _tmp3_; -#line 266 "/home/jens/Source/shotwell/src/Event.vala" - if (G_UNLIKELY (_inner_error_ != NULL)) { -#line 266 "/home/jens/Source/shotwell/src/Event.vala" - g_propagate_error (error, _inner_error_); -#line 266 "/home/jens/Source/shotwell/src/Event.vala" - _g_object_unref0 (_tmp0_); -#line 266 "/home/jens/Source/shotwell/src/Event.vala" - return NULL; -#line 2713 "Event.c" - } - } else { -#line 266 "/home/jens/Source/shotwell/src/Event.vala" - _g_object_unref0 (_tmp0_); -#line 266 "/home/jens/Source/shotwell/src/Event.vala" - _tmp0_ = NULL; -#line 2720 "Event.c" - } -#line 266 "/home/jens/Source/shotwell/src/Event.vala" - result = _tmp0_; -#line 266 "/home/jens/Source/shotwell/src/Event.vala" - return result; -#line 2726 "Event.c" -} - - -void -event_init (ProgressMonitor monitor, - void* monitor_target) -{ - EventTable* _tmp0_; - EventSourceCollection* _tmp1_; - EventSourceCollection* _tmp2_; - GeeArrayList* events = NULL; - GeeArrayList* _tmp3_; - GeeArrayList* unlinked = NULL; - GeeArrayList* _tmp4_; - GeeArrayList* event_rows = NULL; - EventTable* _tmp5_; - GeeArrayList* _tmp6_; - gint count = 0; - GeeArrayList* _tmp7_; - gint _tmp8_; - gint _tmp9_; - EventSourceCollection* _tmp29_; - GeeArrayList* _tmp30_; - GeeCollection* _tmp31_; - GeeCollection* _tmp32_; - EventSourceCollection* _tmp33_; - GeeArrayList* _tmp34_; -#line 270 "/home/jens/Source/shotwell/src/Event.vala" - _tmp0_ = event_table_get_instance (); -#line 270 "/home/jens/Source/shotwell/src/Event.vala" - _database_table_unref0 (event_event_table); -#line 270 "/home/jens/Source/shotwell/src/Event.vala" - event_event_table = _tmp0_; -#line 271 "/home/jens/Source/shotwell/src/Event.vala" - _tmp1_ = event_source_collection_new (); -#line 271 "/home/jens/Source/shotwell/src/Event.vala" - _data_collection_unref0 (event_global); -#line 271 "/home/jens/Source/shotwell/src/Event.vala" - event_global = _tmp1_; -#line 272 "/home/jens/Source/shotwell/src/Event.vala" - _tmp2_ = event_global; -#line 272 "/home/jens/Source/shotwell/src/Event.vala" - event_source_collection_init (_tmp2_); -#line 275 "/home/jens/Source/shotwell/src/Event.vala" - _tmp3_ = gee_array_list_new (TYPE_EVENT, (GBoxedCopyFunc) g_object_ref, (GDestroyNotify) g_object_unref, NULL, NULL, NULL); -#line 275 "/home/jens/Source/shotwell/src/Event.vala" - events = _tmp3_; -#line 276 "/home/jens/Source/shotwell/src/Event.vala" - _tmp4_ = gee_array_list_new (TYPE_EVENT, (GBoxedCopyFunc) g_object_ref, (GDestroyNotify) g_object_unref, NULL, NULL, NULL); -#line 276 "/home/jens/Source/shotwell/src/Event.vala" - unlinked = _tmp4_; -#line 278 "/home/jens/Source/shotwell/src/Event.vala" - _tmp5_ = event_event_table; -#line 278 "/home/jens/Source/shotwell/src/Event.vala" - _tmp6_ = event_table_get_events (_tmp5_); -#line 278 "/home/jens/Source/shotwell/src/Event.vala" - event_rows = _tmp6_; -#line 279 "/home/jens/Source/shotwell/src/Event.vala" - _tmp7_ = event_rows; -#line 279 "/home/jens/Source/shotwell/src/Event.vala" - _tmp8_ = gee_abstract_collection_get_size (G_TYPE_CHECK_INSTANCE_CAST (_tmp7_, GEE_TYPE_ABSTRACT_COLLECTION, GeeAbstractCollection)); -#line 279 "/home/jens/Source/shotwell/src/Event.vala" - _tmp9_ = _tmp8_; -#line 279 "/home/jens/Source/shotwell/src/Event.vala" - count = _tmp9_; -#line 2792 "Event.c" - { - gint ctr = 0; -#line 280 "/home/jens/Source/shotwell/src/Event.vala" - ctr = 0; -#line 2797 "Event.c" - { - gboolean _tmp10_ = FALSE; -#line 280 "/home/jens/Source/shotwell/src/Event.vala" - _tmp10_ = TRUE; -#line 280 "/home/jens/Source/shotwell/src/Event.vala" - while (TRUE) { -#line 2804 "Event.c" - gint _tmp12_; - gint _tmp13_; - Event* event = NULL; - GeeArrayList* _tmp14_; - gint _tmp15_; - gpointer _tmp16_; - EventRow* _tmp17_; - Event* _tmp18_; - Event* _tmp19_; - Event* _tmp22_; - Event* _tmp25_; - EventSourceCollection* _tmp26_; - GeeArrayList* _tmp27_; - Event* _tmp28_; -#line 280 "/home/jens/Source/shotwell/src/Event.vala" - if (!_tmp10_) { -#line 2821 "Event.c" - gint _tmp11_; -#line 280 "/home/jens/Source/shotwell/src/Event.vala" - _tmp11_ = ctr; -#line 280 "/home/jens/Source/shotwell/src/Event.vala" - ctr = _tmp11_ + 1; -#line 2827 "Event.c" - } -#line 280 "/home/jens/Source/shotwell/src/Event.vala" - _tmp10_ = FALSE; -#line 280 "/home/jens/Source/shotwell/src/Event.vala" - _tmp12_ = ctr; -#line 280 "/home/jens/Source/shotwell/src/Event.vala" - _tmp13_ = count; -#line 280 "/home/jens/Source/shotwell/src/Event.vala" - if (!(_tmp12_ < _tmp13_)) { -#line 280 "/home/jens/Source/shotwell/src/Event.vala" - break; -#line 2839 "Event.c" - } -#line 281 "/home/jens/Source/shotwell/src/Event.vala" - _tmp14_ = event_rows; -#line 281 "/home/jens/Source/shotwell/src/Event.vala" - _tmp15_ = ctr; -#line 281 "/home/jens/Source/shotwell/src/Event.vala" - _tmp16_ = gee_abstract_list_get (G_TYPE_CHECK_INSTANCE_CAST (_tmp14_, GEE_TYPE_ABSTRACT_LIST, GeeAbstractList), _tmp15_); -#line 281 "/home/jens/Source/shotwell/src/Event.vala" - _tmp17_ = (EventRow*) _tmp16_; -#line 281 "/home/jens/Source/shotwell/src/Event.vala" - _tmp18_ = event_new (_tmp17_, DATA_OBJECT_INVALID_OBJECT_ID); -#line 281 "/home/jens/Source/shotwell/src/Event.vala" - _tmp19_ = _tmp18_; -#line 281 "/home/jens/Source/shotwell/src/Event.vala" - _event_row_unref0 (_tmp17_); -#line 281 "/home/jens/Source/shotwell/src/Event.vala" - event = _tmp19_; -#line 282 "/home/jens/Source/shotwell/src/Event.vala" - if (monitor != NULL) { -#line 2859 "Event.c" - gint _tmp20_; - gint _tmp21_; -#line 283 "/home/jens/Source/shotwell/src/Event.vala" - _tmp20_ = ctr; -#line 283 "/home/jens/Source/shotwell/src/Event.vala" - _tmp21_ = count; -#line 283 "/home/jens/Source/shotwell/src/Event.vala" - monitor ((guint64) _tmp20_, (guint64) _tmp21_, TRUE, monitor_target); -#line 2868 "Event.c" - } -#line 285 "/home/jens/Source/shotwell/src/Event.vala" - _tmp22_ = event; -#line 285 "/home/jens/Source/shotwell/src/Event.vala" - if (event_source_get_media_count (G_TYPE_CHECK_INSTANCE_CAST (_tmp22_, TYPE_EVENT_SOURCE, EventSource)) != 0) { -#line 2874 "Event.c" - GeeArrayList* _tmp23_; - Event* _tmp24_; -#line 286 "/home/jens/Source/shotwell/src/Event.vala" - _tmp23_ = events; -#line 286 "/home/jens/Source/shotwell/src/Event.vala" - _tmp24_ = event; -#line 286 "/home/jens/Source/shotwell/src/Event.vala" - gee_abstract_collection_add (G_TYPE_CHECK_INSTANCE_CAST (_tmp23_, GEE_TYPE_ABSTRACT_COLLECTION, GeeAbstractCollection), _tmp24_); -#line 288 "/home/jens/Source/shotwell/src/Event.vala" - _g_object_unref0 (event); -#line 288 "/home/jens/Source/shotwell/src/Event.vala" - continue; -#line 2887 "Event.c" - } -#line 294 "/home/jens/Source/shotwell/src/Event.vala" - _tmp25_ = event; -#line 294 "/home/jens/Source/shotwell/src/Event.vala" - _tmp26_ = event_global; -#line 294 "/home/jens/Source/shotwell/src/Event.vala" - data_source_rehydrate_backlinks (G_TYPE_CHECK_INSTANCE_CAST (_tmp25_, TYPE_DATA_SOURCE, DataSource), G_TYPE_CHECK_INSTANCE_CAST (_tmp26_, TYPE_SOURCE_COLLECTION, SourceCollection), NULL); -#line 295 "/home/jens/Source/shotwell/src/Event.vala" - _tmp27_ = unlinked; -#line 295 "/home/jens/Source/shotwell/src/Event.vala" - _tmp28_ = event; -#line 295 "/home/jens/Source/shotwell/src/Event.vala" - gee_abstract_collection_add (G_TYPE_CHECK_INSTANCE_CAST (_tmp27_, GEE_TYPE_ABSTRACT_COLLECTION, GeeAbstractCollection), _tmp28_); -#line 280 "/home/jens/Source/shotwell/src/Event.vala" - _g_object_unref0 (event); -#line 2903 "Event.c" - } - } - } -#line 298 "/home/jens/Source/shotwell/src/Event.vala" - _tmp29_ = event_global; -#line 298 "/home/jens/Source/shotwell/src/Event.vala" - _tmp30_ = events; -#line 298 "/home/jens/Source/shotwell/src/Event.vala" - _tmp31_ = data_collection_add_many (G_TYPE_CHECK_INSTANCE_CAST (_tmp29_, TYPE_DATA_COLLECTION, DataCollection), G_TYPE_CHECK_INSTANCE_CAST (_tmp30_, GEE_TYPE_COLLECTION, GeeCollection), NULL, NULL); -#line 298 "/home/jens/Source/shotwell/src/Event.vala" - _tmp32_ = _tmp31_; -#line 298 "/home/jens/Source/shotwell/src/Event.vala" - _g_object_unref0 (_tmp32_); -#line 299 "/home/jens/Source/shotwell/src/Event.vala" - _tmp33_ = event_global; -#line 299 "/home/jens/Source/shotwell/src/Event.vala" - _tmp34_ = unlinked; -#line 299 "/home/jens/Source/shotwell/src/Event.vala" - container_source_collection_init_add_many_unlinked (G_TYPE_CHECK_INSTANCE_CAST (_tmp33_, TYPE_CONTAINER_SOURCE_COLLECTION, ContainerSourceCollection), G_TYPE_CHECK_INSTANCE_CAST (_tmp34_, GEE_TYPE_COLLECTION, GeeCollection)); -#line 269 "/home/jens/Source/shotwell/src/Event.vala" - _g_object_unref0 (event_rows); -#line 269 "/home/jens/Source/shotwell/src/Event.vala" - _g_object_unref0 (unlinked); -#line 269 "/home/jens/Source/shotwell/src/Event.vala" - _g_object_unref0 (events); -#line 2929 "Event.c" -} - - -void -event_terminate (void) -{ -} - - -static gint64 -event_view_comparator (void* a, - void* b) -{ - gint64 result = 0LL; - DataSource* _tmp0_; - MediaSource* _tmp1_; - DataSource* _tmp2_; - MediaSource* _tmp3_; - gint64 _tmp4_; -#line 306 "/home/jens/Source/shotwell/src/Event.vala" - _tmp0_ = data_view_get_source (G_TYPE_CHECK_INSTANCE_CAST ((ThumbnailView*) a, TYPE_DATA_VIEW, DataView)); -#line 306 "/home/jens/Source/shotwell/src/Event.vala" - _tmp1_ = G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, TYPE_MEDIA_SOURCE, MediaSource); -#line 306 "/home/jens/Source/shotwell/src/Event.vala" - _tmp2_ = data_view_get_source (G_TYPE_CHECK_INSTANCE_CAST ((ThumbnailView*) b, TYPE_DATA_VIEW, DataView)); -#line 306 "/home/jens/Source/shotwell/src/Event.vala" - _tmp3_ = G_TYPE_CHECK_INSTANCE_CAST (_tmp2_, TYPE_MEDIA_SOURCE, MediaSource); -#line 306 "/home/jens/Source/shotwell/src/Event.vala" - _tmp4_ = (gint64) (media_source_get_exposure_time (_tmp1_) - media_source_get_exposure_time (_tmp3_)); -#line 306 "/home/jens/Source/shotwell/src/Event.vala" - _g_object_unref0 (_tmp3_); -#line 306 "/home/jens/Source/shotwell/src/Event.vala" - _g_object_unref0 (_tmp1_); -#line 306 "/home/jens/Source/shotwell/src/Event.vala" - result = _tmp4_; -#line 306 "/home/jens/Source/shotwell/src/Event.vala" - return result; -#line 2967 "Event.c" -} - - -static gboolean -event_view_comparator_predicate (DataObject* object, - Alteration* alteration) -{ - gboolean result = FALSE; -#line 310 "/home/jens/Source/shotwell/src/Event.vala" - g_return_val_if_fail (IS_DATA_OBJECT (object), FALSE); -#line 310 "/home/jens/Source/shotwell/src/Event.vala" - g_return_val_if_fail (IS_ALTERATION (alteration), FALSE); -#line 311 "/home/jens/Source/shotwell/src/Event.vala" - result = alteration_has_detail (alteration, "metadata", "exposure-time"); -#line 311 "/home/jens/Source/shotwell/src/Event.vala" - return result; -#line 2984 "Event.c" -} - - -gchar* -event_prep_event_name (const gchar* name) -{ - gchar* result = NULL; - gchar* _tmp0_; -#line 319 "/home/jens/Source/shotwell/src/Event.vala" - _tmp0_ = prepare_input_text (name, (((PREPARE_INPUT_TEXT_OPTIONS_NORMALIZE | PREPARE_INPUT_TEXT_OPTIONS_VALIDATE) | PREPARE_INPUT_TEXT_OPTIONS_INVALID_IS_NULL) | PREPARE_INPUT_TEXT_OPTIONS_STRIP) | PREPARE_INPUT_TEXT_OPTIONS_STRIP_CRLF, DEFAULT_USER_TEXT_INPUT_LENGTH); -#line 319 "/home/jens/Source/shotwell/src/Event.vala" - result = _tmp0_; -#line 319 "/home/jens/Source/shotwell/src/Event.vala" - return result; -#line 2999 "Event.c" -} - - -void -event_attach (Event* self, - MediaSource* source) -{ - ViewCollection* _tmp0_; - ThumbnailView* _tmp1_; - ThumbnailView* _tmp2_; -#line 327 "/home/jens/Source/shotwell/src/Event.vala" - g_return_if_fail (IS_EVENT (self)); -#line 327 "/home/jens/Source/shotwell/src/Event.vala" - g_return_if_fail (IS_MEDIA_SOURCE (source)); -#line 328 "/home/jens/Source/shotwell/src/Event.vala" - _tmp0_ = self->priv->view; -#line 328 "/home/jens/Source/shotwell/src/Event.vala" - _tmp1_ = thumbnail_view_new (G_TYPE_CHECK_INSTANCE_CAST (source, TYPE_THUMBNAIL_SOURCE, ThumbnailSource)); -#line 328 "/home/jens/Source/shotwell/src/Event.vala" - _tmp2_ = _tmp1_; -#line 328 "/home/jens/Source/shotwell/src/Event.vala" - data_collection_add (G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, TYPE_DATA_COLLECTION, DataCollection), G_TYPE_CHECK_INSTANCE_CAST (_tmp2_, TYPE_DATA_OBJECT, DataObject)); -#line 328 "/home/jens/Source/shotwell/src/Event.vala" - _g_object_unref0 (_tmp2_); -#line 3024 "Event.c" -} - - -void -event_attach_many (Event* self, - GeeCollection* media) -{ - GeeArrayList* views = NULL; - GeeArrayList* _tmp0_; - ViewCollection* _tmp9_; - GeeArrayList* _tmp10_; - GeeCollection* _tmp11_; - GeeCollection* _tmp12_; -#line 331 "/home/jens/Source/shotwell/src/Event.vala" - g_return_if_fail (IS_EVENT (self)); -#line 331 "/home/jens/Source/shotwell/src/Event.vala" - g_return_if_fail (GEE_IS_COLLECTION (media)); -#line 332 "/home/jens/Source/shotwell/src/Event.vala" - _tmp0_ = gee_array_list_new (TYPE_THUMBNAIL_VIEW, (GBoxedCopyFunc) g_object_ref, (GDestroyNotify) g_object_unref, NULL, NULL, NULL); -#line 332 "/home/jens/Source/shotwell/src/Event.vala" - views = _tmp0_; -#line 3046 "Event.c" - { - GeeIterator* _current_source_it = NULL; - GeeIterator* _tmp1_; -#line 333 "/home/jens/Source/shotwell/src/Event.vala" - _tmp1_ = gee_iterable_iterator (G_TYPE_CHECK_INSTANCE_CAST (media, GEE_TYPE_ITERABLE, GeeIterable)); -#line 333 "/home/jens/Source/shotwell/src/Event.vala" - _current_source_it = _tmp1_; -#line 333 "/home/jens/Source/shotwell/src/Event.vala" - while (TRUE) { -#line 3056 "Event.c" - GeeIterator* _tmp2_; - MediaSource* current_source = NULL; - GeeIterator* _tmp3_; - gpointer _tmp4_; - GeeArrayList* _tmp5_; - MediaSource* _tmp6_; - ThumbnailView* _tmp7_; - ThumbnailView* _tmp8_; -#line 333 "/home/jens/Source/shotwell/src/Event.vala" - _tmp2_ = _current_source_it; -#line 333 "/home/jens/Source/shotwell/src/Event.vala" - if (!gee_iterator_next (_tmp2_)) { -#line 333 "/home/jens/Source/shotwell/src/Event.vala" - break; -#line 3071 "Event.c" - } -#line 333 "/home/jens/Source/shotwell/src/Event.vala" - _tmp3_ = _current_source_it; -#line 333 "/home/jens/Source/shotwell/src/Event.vala" - _tmp4_ = gee_iterator_get (_tmp3_); -#line 333 "/home/jens/Source/shotwell/src/Event.vala" - current_source = (MediaSource*) _tmp4_; -#line 334 "/home/jens/Source/shotwell/src/Event.vala" - _tmp5_ = views; -#line 334 "/home/jens/Source/shotwell/src/Event.vala" - _tmp6_ = current_source; -#line 334 "/home/jens/Source/shotwell/src/Event.vala" - _tmp7_ = thumbnail_view_new (G_TYPE_CHECK_INSTANCE_CAST (_tmp6_, TYPE_THUMBNAIL_SOURCE, ThumbnailSource)); -#line 334 "/home/jens/Source/shotwell/src/Event.vala" - _tmp8_ = _tmp7_; -#line 334 "/home/jens/Source/shotwell/src/Event.vala" - gee_abstract_collection_add (G_TYPE_CHECK_INSTANCE_CAST (_tmp5_, GEE_TYPE_ABSTRACT_COLLECTION, GeeAbstractCollection), _tmp8_); -#line 334 "/home/jens/Source/shotwell/src/Event.vala" - _g_object_unref0 (_tmp8_); -#line 333 "/home/jens/Source/shotwell/src/Event.vala" - _g_object_unref0 (current_source); -#line 3093 "Event.c" - } -#line 333 "/home/jens/Source/shotwell/src/Event.vala" - _g_object_unref0 (_current_source_it); -#line 3097 "Event.c" - } -#line 336 "/home/jens/Source/shotwell/src/Event.vala" - _tmp9_ = self->priv->view; -#line 336 "/home/jens/Source/shotwell/src/Event.vala" - _tmp10_ = views; -#line 336 "/home/jens/Source/shotwell/src/Event.vala" - _tmp11_ = data_collection_add_many (G_TYPE_CHECK_INSTANCE_CAST (_tmp9_, TYPE_DATA_COLLECTION, DataCollection), G_TYPE_CHECK_INSTANCE_CAST (_tmp10_, GEE_TYPE_COLLECTION, GeeCollection), NULL, NULL); -#line 336 "/home/jens/Source/shotwell/src/Event.vala" - _tmp12_ = _tmp11_; -#line 336 "/home/jens/Source/shotwell/src/Event.vala" - _g_object_unref0 (_tmp12_); -#line 331 "/home/jens/Source/shotwell/src/Event.vala" - _g_object_unref0 (views); -#line 3111 "Event.c" -} - - -void -event_detach (Event* self, - MediaSource* source) -{ - ViewCollection* _tmp0_; - ViewCollection* _tmp1_; - ViewCollection* _tmp2_; - DataView* _tmp3_; - DataView* _tmp4_; - Marker* _tmp5_; - Marker* _tmp6_; -#line 342 "/home/jens/Source/shotwell/src/Event.vala" - g_return_if_fail (IS_EVENT (self)); -#line 342 "/home/jens/Source/shotwell/src/Event.vala" - g_return_if_fail (IS_MEDIA_SOURCE (source)); -#line 343 "/home/jens/Source/shotwell/src/Event.vala" - _tmp0_ = self->priv->view; -#line 343 "/home/jens/Source/shotwell/src/Event.vala" - _tmp1_ = self->priv->view; -#line 343 "/home/jens/Source/shotwell/src/Event.vala" - _tmp2_ = self->priv->view; -#line 343 "/home/jens/Source/shotwell/src/Event.vala" - _tmp3_ = view_collection_get_view_for_source (_tmp2_, G_TYPE_CHECK_INSTANCE_CAST (source, TYPE_DATA_SOURCE, DataSource)); -#line 343 "/home/jens/Source/shotwell/src/Event.vala" - _tmp4_ = _tmp3_; -#line 343 "/home/jens/Source/shotwell/src/Event.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 343 "/home/jens/Source/shotwell/src/Event.vala" - _tmp6_ = _tmp5_; -#line 343 "/home/jens/Source/shotwell/src/Event.vala" - data_collection_remove_marked (G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, TYPE_DATA_COLLECTION, DataCollection), _tmp6_); -#line 343 "/home/jens/Source/shotwell/src/Event.vala" - _g_object_unref0 (_tmp6_); -#line 343 "/home/jens/Source/shotwell/src/Event.vala" - _g_object_unref0 (_tmp4_); -#line 3150 "Event.c" -} - - -void -event_detach_many (Event* self, - GeeCollection* media) -{ - GeeArrayList* views = NULL; - GeeArrayList* _tmp0_; - ViewCollection* _tmp11_; - ViewCollection* _tmp12_; - GeeArrayList* _tmp13_; - Marker* _tmp14_; - Marker* _tmp15_; -#line 346 "/home/jens/Source/shotwell/src/Event.vala" - g_return_if_fail (IS_EVENT (self)); -#line 346 "/home/jens/Source/shotwell/src/Event.vala" - g_return_if_fail (GEE_IS_COLLECTION (media)); -#line 347 "/home/jens/Source/shotwell/src/Event.vala" - _tmp0_ = gee_array_list_new (TYPE_THUMBNAIL_VIEW, (GBoxedCopyFunc) g_object_ref, (GDestroyNotify) g_object_unref, NULL, NULL, NULL); -#line 347 "/home/jens/Source/shotwell/src/Event.vala" - views = _tmp0_; -#line 3173 "Event.c" - { - GeeIterator* _current_source_it = NULL; - GeeIterator* _tmp1_; -#line 348 "/home/jens/Source/shotwell/src/Event.vala" - _tmp1_ = gee_iterable_iterator (G_TYPE_CHECK_INSTANCE_CAST (media, GEE_TYPE_ITERABLE, GeeIterable)); -#line 348 "/home/jens/Source/shotwell/src/Event.vala" - _current_source_it = _tmp1_; -#line 348 "/home/jens/Source/shotwell/src/Event.vala" - while (TRUE) { -#line 3183 "Event.c" - GeeIterator* _tmp2_; - MediaSource* current_source = NULL; - GeeIterator* _tmp3_; - gpointer _tmp4_; - ThumbnailView* view = NULL; - ViewCollection* _tmp5_; - MediaSource* _tmp6_; - DataView* _tmp7_; - ThumbnailView* _tmp8_; -#line 348 "/home/jens/Source/shotwell/src/Event.vala" - _tmp2_ = _current_source_it; -#line 348 "/home/jens/Source/shotwell/src/Event.vala" - if (!gee_iterator_next (_tmp2_)) { -#line 348 "/home/jens/Source/shotwell/src/Event.vala" - break; -#line 3199 "Event.c" - } -#line 348 "/home/jens/Source/shotwell/src/Event.vala" - _tmp3_ = _current_source_it; -#line 348 "/home/jens/Source/shotwell/src/Event.vala" - _tmp4_ = gee_iterator_get (_tmp3_); -#line 348 "/home/jens/Source/shotwell/src/Event.vala" - current_source = (MediaSource*) _tmp4_; -#line 349 "/home/jens/Source/shotwell/src/Event.vala" - _tmp5_ = self->priv->view; -#line 349 "/home/jens/Source/shotwell/src/Event.vala" - _tmp6_ = current_source; -#line 349 "/home/jens/Source/shotwell/src/Event.vala" - _tmp7_ = view_collection_get_view_for_source (_tmp5_, G_TYPE_CHECK_INSTANCE_CAST (_tmp6_, TYPE_DATA_SOURCE, DataSource)); -#line 349 "/home/jens/Source/shotwell/src/Event.vala" - view = G_TYPE_CHECK_INSTANCE_CAST (_tmp7_, TYPE_THUMBNAIL_VIEW, ThumbnailView); -#line 350 "/home/jens/Source/shotwell/src/Event.vala" - _tmp8_ = view; -#line 350 "/home/jens/Source/shotwell/src/Event.vala" - if (_tmp8_ != NULL) { -#line 3219 "Event.c" - GeeArrayList* _tmp9_; - ThumbnailView* _tmp10_; -#line 351 "/home/jens/Source/shotwell/src/Event.vala" - _tmp9_ = views; -#line 351 "/home/jens/Source/shotwell/src/Event.vala" - _tmp10_ = view; -#line 351 "/home/jens/Source/shotwell/src/Event.vala" - gee_abstract_collection_add (G_TYPE_CHECK_INSTANCE_CAST (_tmp9_, GEE_TYPE_ABSTRACT_COLLECTION, GeeAbstractCollection), _tmp10_); -#line 3228 "Event.c" - } -#line 348 "/home/jens/Source/shotwell/src/Event.vala" - _g_object_unref0 (view); -#line 348 "/home/jens/Source/shotwell/src/Event.vala" - _g_object_unref0 (current_source); -#line 3234 "Event.c" - } -#line 348 "/home/jens/Source/shotwell/src/Event.vala" - _g_object_unref0 (_current_source_it); -#line 3238 "Event.c" - } -#line 354 "/home/jens/Source/shotwell/src/Event.vala" - _tmp11_ = self->priv->view; -#line 354 "/home/jens/Source/shotwell/src/Event.vala" - _tmp12_ = self->priv->view; -#line 354 "/home/jens/Source/shotwell/src/Event.vala" - _tmp13_ = views; -#line 354 "/home/jens/Source/shotwell/src/Event.vala" - _tmp14_ = data_collection_mark_many (G_TYPE_CHECK_INSTANCE_CAST (_tmp12_, TYPE_DATA_COLLECTION, DataCollection), G_TYPE_CHECK_INSTANCE_CAST (_tmp13_, GEE_TYPE_COLLECTION, GeeCollection)); -#line 354 "/home/jens/Source/shotwell/src/Event.vala" - _tmp15_ = _tmp14_; -#line 354 "/home/jens/Source/shotwell/src/Event.vala" - data_collection_remove_marked (G_TYPE_CHECK_INSTANCE_CAST (_tmp11_, TYPE_DATA_COLLECTION, DataCollection), _tmp15_); -#line 354 "/home/jens/Source/shotwell/src/Event.vala" - _g_object_unref0 (_tmp15_); -#line 346 "/home/jens/Source/shotwell/src/Event.vala" - _g_object_unref0 (views); -#line 3256 "Event.c" -} - - -gboolean -event_contains_media_type (Event* self, - const gchar* media_type) -{ - gboolean result = FALSE; -#line 360 "/home/jens/Source/shotwell/src/Event.vala" - g_return_val_if_fail (IS_EVENT (self), FALSE); -#line 360 "/home/jens/Source/shotwell/src/Event.vala" - g_return_val_if_fail (media_type != NULL, FALSE); -#line 3269 "Event.c" - { - GeeIterator* _media_it = NULL; - GeeCollection* _tmp0_; - GeeCollection* _tmp1_; - GeeIterator* _tmp2_; - GeeIterator* _tmp3_; -#line 361 "/home/jens/Source/shotwell/src/Event.vala" - _tmp0_ = event_source_get_media (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_EVENT_SOURCE, EventSource)); -#line 361 "/home/jens/Source/shotwell/src/Event.vala" - _tmp1_ = _tmp0_; -#line 361 "/home/jens/Source/shotwell/src/Event.vala" - _tmp2_ = gee_iterable_iterator (G_TYPE_CHECK_INSTANCE_CAST (_tmp1_, GEE_TYPE_ITERABLE, GeeIterable)); -#line 361 "/home/jens/Source/shotwell/src/Event.vala" - _tmp3_ = _tmp2_; -#line 361 "/home/jens/Source/shotwell/src/Event.vala" - _g_object_unref0 (_tmp1_); -#line 361 "/home/jens/Source/shotwell/src/Event.vala" - _media_it = _tmp3_; -#line 361 "/home/jens/Source/shotwell/src/Event.vala" - while (TRUE) { -#line 3290 "Event.c" - GeeIterator* _tmp4_; - MediaSource* media = NULL; - GeeIterator* _tmp5_; - gpointer _tmp6_; - MediaSource* _tmp7_; - gchar* _tmp8_; - gchar* _tmp9_; - gboolean _tmp10_; -#line 361 "/home/jens/Source/shotwell/src/Event.vala" - _tmp4_ = _media_it; -#line 361 "/home/jens/Source/shotwell/src/Event.vala" - if (!gee_iterator_next (_tmp4_)) { -#line 361 "/home/jens/Source/shotwell/src/Event.vala" - break; -#line 3305 "Event.c" - } -#line 361 "/home/jens/Source/shotwell/src/Event.vala" - _tmp5_ = _media_it; -#line 361 "/home/jens/Source/shotwell/src/Event.vala" - _tmp6_ = gee_iterator_get (_tmp5_); -#line 361 "/home/jens/Source/shotwell/src/Event.vala" - media = (MediaSource*) _tmp6_; -#line 362 "/home/jens/Source/shotwell/src/Event.vala" - _tmp7_ = media; -#line 362 "/home/jens/Source/shotwell/src/Event.vala" - _tmp8_ = data_source_get_typename (G_TYPE_CHECK_INSTANCE_CAST (_tmp7_, TYPE_DATA_SOURCE, DataSource)); -#line 362 "/home/jens/Source/shotwell/src/Event.vala" - _tmp9_ = _tmp8_; -#line 362 "/home/jens/Source/shotwell/src/Event.vala" - _tmp10_ = g_strcmp0 (_tmp9_, media_type) == 0; -#line 362 "/home/jens/Source/shotwell/src/Event.vala" - _g_free0 (_tmp9_); -#line 362 "/home/jens/Source/shotwell/src/Event.vala" - if (_tmp10_) { -#line 363 "/home/jens/Source/shotwell/src/Event.vala" - result = TRUE; -#line 363 "/home/jens/Source/shotwell/src/Event.vala" - _g_object_unref0 (media); -#line 363 "/home/jens/Source/shotwell/src/Event.vala" - _g_object_unref0 (_media_it); -#line 363 "/home/jens/Source/shotwell/src/Event.vala" - return result; -#line 3333 "Event.c" - } -#line 361 "/home/jens/Source/shotwell/src/Event.vala" - _g_object_unref0 (media); -#line 3337 "Event.c" - } -#line 361 "/home/jens/Source/shotwell/src/Event.vala" - _g_object_unref0 (_media_it); -#line 3341 "Event.c" - } -#line 366 "/home/jens/Source/shotwell/src/Event.vala" - result = FALSE; -#line 366 "/home/jens/Source/shotwell/src/Event.vala" - return result; -#line 3347 "Event.c" -} - - -static GeeArrayList* -event_views_to_media (Event* self, - GeeIterable* views) -{ - GeeArrayList* result = NULL; - GeeArrayList* media = NULL; - GeeArrayList* _tmp0_; -#line 369 "/home/jens/Source/shotwell/src/Event.vala" - g_return_val_if_fail (IS_EVENT (self), NULL); -#line 369 "/home/jens/Source/shotwell/src/Event.vala" - g_return_val_if_fail (GEE_IS_ITERABLE (views), NULL); -#line 370 "/home/jens/Source/shotwell/src/Event.vala" - _tmp0_ = gee_array_list_new (TYPE_MEDIA_SOURCE, (GBoxedCopyFunc) g_object_ref, (GDestroyNotify) g_object_unref, NULL, NULL, NULL); -#line 370 "/home/jens/Source/shotwell/src/Event.vala" - media = _tmp0_; -#line 3366 "Event.c" - { - GeeIterator* _object_it = NULL; - GeeIterator* _tmp1_; -#line 371 "/home/jens/Source/shotwell/src/Event.vala" - _tmp1_ = gee_iterable_iterator (views); -#line 371 "/home/jens/Source/shotwell/src/Event.vala" - _object_it = _tmp1_; -#line 371 "/home/jens/Source/shotwell/src/Event.vala" - while (TRUE) { -#line 3376 "Event.c" - GeeIterator* _tmp2_; - DataObject* object = NULL; - GeeIterator* _tmp3_; - gpointer _tmp4_; - GeeArrayList* _tmp5_; - DataObject* _tmp6_; - DataSource* _tmp7_; - MediaSource* _tmp8_; -#line 371 "/home/jens/Source/shotwell/src/Event.vala" - _tmp2_ = _object_it; -#line 371 "/home/jens/Source/shotwell/src/Event.vala" - if (!gee_iterator_next (_tmp2_)) { -#line 371 "/home/jens/Source/shotwell/src/Event.vala" - break; -#line 3391 "Event.c" - } -#line 371 "/home/jens/Source/shotwell/src/Event.vala" - _tmp3_ = _object_it; -#line 371 "/home/jens/Source/shotwell/src/Event.vala" - _tmp4_ = gee_iterator_get (_tmp3_); -#line 371 "/home/jens/Source/shotwell/src/Event.vala" - object = (DataObject*) _tmp4_; -#line 372 "/home/jens/Source/shotwell/src/Event.vala" - _tmp5_ = media; -#line 372 "/home/jens/Source/shotwell/src/Event.vala" - _tmp6_ = object; -#line 372 "/home/jens/Source/shotwell/src/Event.vala" - _tmp7_ = data_view_get_source (G_TYPE_CHECK_INSTANCE_CAST (_tmp6_, TYPE_DATA_VIEW, DataView)); -#line 372 "/home/jens/Source/shotwell/src/Event.vala" - _tmp8_ = G_TYPE_CHECK_INSTANCE_CAST (_tmp7_, TYPE_MEDIA_SOURCE, MediaSource); -#line 372 "/home/jens/Source/shotwell/src/Event.vala" - gee_abstract_collection_add (G_TYPE_CHECK_INSTANCE_CAST (_tmp5_, GEE_TYPE_ABSTRACT_COLLECTION, GeeAbstractCollection), _tmp8_); -#line 372 "/home/jens/Source/shotwell/src/Event.vala" - _g_object_unref0 (_tmp8_); -#line 371 "/home/jens/Source/shotwell/src/Event.vala" - _g_object_unref0 (object); -#line 3413 "Event.c" - } -#line 371 "/home/jens/Source/shotwell/src/Event.vala" - _g_object_unref0 (_object_it); -#line 3417 "Event.c" - } -#line 374 "/home/jens/Source/shotwell/src/Event.vala" - result = media; -#line 374 "/home/jens/Source/shotwell/src/Event.vala" - return result; -#line 3423 "Event.c" -} - - -static void -event_on_media_added (Event* self, - GeeIterable* added) -{ - GeeCollection* media = NULL; - GeeArrayList* _tmp0_; - EventSourceCollection* _tmp1_; - gboolean _tmp2_; - EventSourceCollection* _tmp3_; - gboolean _tmp4_; - Alteration* _tmp5_; - Alteration* _tmp6_; -#line 377 "/home/jens/Source/shotwell/src/Event.vala" - g_return_if_fail (IS_EVENT (self)); -#line 377 "/home/jens/Source/shotwell/src/Event.vala" - g_return_if_fail (GEE_IS_ITERABLE (added)); -#line 378 "/home/jens/Source/shotwell/src/Event.vala" - _tmp0_ = event_views_to_media (self, added); -#line 378 "/home/jens/Source/shotwell/src/Event.vala" - media = G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, GEE_TYPE_COLLECTION, GeeCollection); -#line 379 "/home/jens/Source/shotwell/src/Event.vala" - _tmp1_ = event_global; -#line 379 "/home/jens/Source/shotwell/src/Event.vala" - _tmp2_ = self->priv->relinking; -#line 379 "/home/jens/Source/shotwell/src/Event.vala" - container_source_collection_notify_container_contents_added (G_TYPE_CHECK_INSTANCE_CAST (_tmp1_, TYPE_CONTAINER_SOURCE_COLLECTION, ContainerSourceCollection), G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_CONTAINER_SOURCE, ContainerSource), media, _tmp2_); -#line 380 "/home/jens/Source/shotwell/src/Event.vala" - _tmp3_ = event_global; -#line 380 "/home/jens/Source/shotwell/src/Event.vala" - _tmp4_ = self->priv->relinking; -#line 380 "/home/jens/Source/shotwell/src/Event.vala" - container_source_collection_notify_container_contents_altered (G_TYPE_CHECK_INSTANCE_CAST (_tmp3_, TYPE_CONTAINER_SOURCE_COLLECTION, ContainerSourceCollection), G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_CONTAINER_SOURCE, ContainerSource), media, _tmp4_, NULL, FALSE); -#line 382 "/home/jens/Source/shotwell/src/Event.vala" - _tmp5_ = alteration_new_from_list ("contents:added, metadata:time"); -#line 382 "/home/jens/Source/shotwell/src/Event.vala" - _tmp6_ = _tmp5_; -#line 382 "/home/jens/Source/shotwell/src/Event.vala" - data_object_notify_altered (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_DATA_OBJECT, DataObject), _tmp6_); -#line 382 "/home/jens/Source/shotwell/src/Event.vala" - _alteration_unref0 (_tmp6_); -#line 377 "/home/jens/Source/shotwell/src/Event.vala" - _g_object_unref0 (media); -#line 3469 "Event.c" -} - - -static void -event_on_media_removed (Event* self, - GeeIterable* removed) -{ - GeeArrayList* media = NULL; - GeeArrayList* _tmp0_; - EventSourceCollection* _tmp1_; - GeeArrayList* _tmp2_; - gboolean _tmp3_; - EventSourceCollection* _tmp4_; - GeeArrayList* _tmp5_; - gboolean _tmp6_; - Alteration* _tmp26_; - Alteration* _tmp27_; -#line 386 "/home/jens/Source/shotwell/src/Event.vala" - g_return_if_fail (IS_EVENT (self)); -#line 386 "/home/jens/Source/shotwell/src/Event.vala" - g_return_if_fail (GEE_IS_ITERABLE (removed)); -#line 387 "/home/jens/Source/shotwell/src/Event.vala" - _tmp0_ = event_views_to_media (self, removed); -#line 387 "/home/jens/Source/shotwell/src/Event.vala" - media = _tmp0_; -#line 389 "/home/jens/Source/shotwell/src/Event.vala" - _tmp1_ = event_global; -#line 389 "/home/jens/Source/shotwell/src/Event.vala" - _tmp2_ = media; -#line 389 "/home/jens/Source/shotwell/src/Event.vala" - _tmp3_ = self->priv->unlinking; -#line 389 "/home/jens/Source/shotwell/src/Event.vala" - container_source_collection_notify_container_contents_removed (G_TYPE_CHECK_INSTANCE_CAST (_tmp1_, TYPE_CONTAINER_SOURCE_COLLECTION, ContainerSourceCollection), G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_CONTAINER_SOURCE, ContainerSource), G_TYPE_CHECK_INSTANCE_CAST (_tmp2_, GEE_TYPE_COLLECTION, GeeCollection), _tmp3_); -#line 390 "/home/jens/Source/shotwell/src/Event.vala" - _tmp4_ = event_global; -#line 390 "/home/jens/Source/shotwell/src/Event.vala" - _tmp5_ = media; -#line 390 "/home/jens/Source/shotwell/src/Event.vala" - _tmp6_ = self->priv->unlinking; -#line 390 "/home/jens/Source/shotwell/src/Event.vala" - container_source_collection_notify_container_contents_altered (G_TYPE_CHECK_INSTANCE_CAST (_tmp4_, TYPE_CONTAINER_SOURCE_COLLECTION, ContainerSourceCollection), G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_CONTAINER_SOURCE, ContainerSource), NULL, FALSE, G_TYPE_CHECK_INSTANCE_CAST (_tmp5_, GEE_TYPE_COLLECTION, GeeCollection), _tmp6_); -#line 3511 "Event.c" - { - GeeArrayList* _current_source_list = NULL; - GeeArrayList* _tmp7_; - GeeArrayList* _tmp8_; - gint _current_source_size = 0; - GeeArrayList* _tmp9_; - gint _tmp10_; - gint _tmp11_; - gint _current_source_index = 0; -#line 393 "/home/jens/Source/shotwell/src/Event.vala" - _tmp7_ = media; -#line 393 "/home/jens/Source/shotwell/src/Event.vala" - _tmp8_ = _g_object_ref0 (_tmp7_); -#line 393 "/home/jens/Source/shotwell/src/Event.vala" - _current_source_list = _tmp8_; -#line 393 "/home/jens/Source/shotwell/src/Event.vala" - _tmp9_ = _current_source_list; -#line 393 "/home/jens/Source/shotwell/src/Event.vala" - _tmp10_ = gee_abstract_collection_get_size (G_TYPE_CHECK_INSTANCE_CAST (_tmp9_, GEE_TYPE_ABSTRACT_COLLECTION, GeeAbstractCollection)); -#line 393 "/home/jens/Source/shotwell/src/Event.vala" - _tmp11_ = _tmp10_; -#line 393 "/home/jens/Source/shotwell/src/Event.vala" - _current_source_size = _tmp11_; -#line 393 "/home/jens/Source/shotwell/src/Event.vala" - _current_source_index = -1; -#line 393 "/home/jens/Source/shotwell/src/Event.vala" - while (TRUE) { -#line 3539 "Event.c" - gint _tmp12_; - gint _tmp13_; - gint _tmp14_; - MediaSource* current_source = NULL; - GeeArrayList* _tmp15_; - gint _tmp16_; - gpointer _tmp17_; - MediaSource* _tmp18_; - MediaSource* _tmp19_; -#line 393 "/home/jens/Source/shotwell/src/Event.vala" - _tmp12_ = _current_source_index; -#line 393 "/home/jens/Source/shotwell/src/Event.vala" - _current_source_index = _tmp12_ + 1; -#line 393 "/home/jens/Source/shotwell/src/Event.vala" - _tmp13_ = _current_source_index; -#line 393 "/home/jens/Source/shotwell/src/Event.vala" - _tmp14_ = _current_source_size; -#line 393 "/home/jens/Source/shotwell/src/Event.vala" - if (!(_tmp13_ < _tmp14_)) { -#line 393 "/home/jens/Source/shotwell/src/Event.vala" - break; -#line 3561 "Event.c" - } -#line 393 "/home/jens/Source/shotwell/src/Event.vala" - _tmp15_ = _current_source_list; -#line 393 "/home/jens/Source/shotwell/src/Event.vala" - _tmp16_ = _current_source_index; -#line 393 "/home/jens/Source/shotwell/src/Event.vala" - _tmp17_ = gee_abstract_list_get (G_TYPE_CHECK_INSTANCE_CAST (_tmp15_, GEE_TYPE_ABSTRACT_LIST, GeeAbstractList), _tmp16_); -#line 393 "/home/jens/Source/shotwell/src/Event.vala" - current_source = (MediaSource*) _tmp17_; -#line 394 "/home/jens/Source/shotwell/src/Event.vala" - _tmp18_ = current_source; -#line 394 "/home/jens/Source/shotwell/src/Event.vala" - _tmp19_ = self->priv->primary_source; -#line 394 "/home/jens/Source/shotwell/src/Event.vala" - if (_tmp18_ == _tmp19_) { -#line 395 "/home/jens/Source/shotwell/src/Event.vala" - if (event_source_get_media_count (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_EVENT_SOURCE, EventSource)) > 0) { -#line 3579 "Event.c" - ViewCollection* _tmp20_; - DataView* _tmp21_; - DataView* _tmp22_; - DataSource* _tmp23_; - MediaSource* _tmp24_; -#line 396 "/home/jens/Source/shotwell/src/Event.vala" - _tmp20_ = self->priv->view; -#line 396 "/home/jens/Source/shotwell/src/Event.vala" - _tmp21_ = view_collection_get_first_unrejected (_tmp20_); -#line 396 "/home/jens/Source/shotwell/src/Event.vala" - _tmp22_ = _tmp21_; -#line 396 "/home/jens/Source/shotwell/src/Event.vala" - _tmp23_ = data_view_get_source (_tmp22_); -#line 396 "/home/jens/Source/shotwell/src/Event.vala" - _tmp24_ = G_TYPE_CHECK_INSTANCE_CAST (_tmp23_, TYPE_MEDIA_SOURCE, MediaSource); -#line 396 "/home/jens/Source/shotwell/src/Event.vala" - event_set_primary_source (self, _tmp24_); -#line 396 "/home/jens/Source/shotwell/src/Event.vala" - _g_object_unref0 (_tmp24_); -#line 396 "/home/jens/Source/shotwell/src/Event.vala" - _g_object_unref0 (_tmp22_); -#line 3601 "Event.c" - } else { -#line 398 "/home/jens/Source/shotwell/src/Event.vala" - event_release_primary_source (self); -#line 3605 "Event.c" - } -#line 400 "/home/jens/Source/shotwell/src/Event.vala" - _g_object_unref0 (current_source); -#line 400 "/home/jens/Source/shotwell/src/Event.vala" - break; -#line 3611 "Event.c" - } -#line 393 "/home/jens/Source/shotwell/src/Event.vala" - _g_object_unref0 (current_source); -#line 3615 "Event.c" - } -#line 393 "/home/jens/Source/shotwell/src/Event.vala" - _g_object_unref0 (_current_source_list); -#line 3619 "Event.c" - } -#line 405 "/home/jens/Source/shotwell/src/Event.vala" - if (event_source_get_media_count (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_EVENT_SOURCE, EventSource)) == 0) { -#line 3623 "Event.c" - EventSourceCollection* _tmp25_; -#line 406 "/home/jens/Source/shotwell/src/Event.vala" - _tmp25_ = event_global; -#line 406 "/home/jens/Source/shotwell/src/Event.vala" - container_source_collection_evaporate (G_TYPE_CHECK_INSTANCE_CAST (_tmp25_, TYPE_CONTAINER_SOURCE_COLLECTION, ContainerSourceCollection), G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_CONTAINER_SOURCE, ContainerSource)); -#line 410 "/home/jens/Source/shotwell/src/Event.vala" - _g_object_unref0 (media); -#line 410 "/home/jens/Source/shotwell/src/Event.vala" - return; -#line 3633 "Event.c" - } -#line 413 "/home/jens/Source/shotwell/src/Event.vala" - _tmp26_ = alteration_new_from_list ("contents:removed, metadata:time"); -#line 413 "/home/jens/Source/shotwell/src/Event.vala" - _tmp27_ = _tmp26_; -#line 413 "/home/jens/Source/shotwell/src/Event.vala" - data_object_notify_altered (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_DATA_OBJECT, DataObject), _tmp27_); -#line 413 "/home/jens/Source/shotwell/src/Event.vala" - _alteration_unref0 (_tmp27_); -#line 386 "/home/jens/Source/shotwell/src/Event.vala" - _g_object_unref0 (media); -#line 3645 "Event.c" -} - - -static void -event_on_media_destroyed (Event* self, - DataSource* source) -{ - ThumbnailView* thumbnail_view = NULL; - ViewCollection* _tmp0_; - DataView* _tmp1_; - ThumbnailView* _tmp2_; -#line 416 "/home/jens/Source/shotwell/src/Event.vala" - g_return_if_fail (IS_EVENT (self)); -#line 416 "/home/jens/Source/shotwell/src/Event.vala" - g_return_if_fail (IS_DATA_SOURCE (source)); -#line 417 "/home/jens/Source/shotwell/src/Event.vala" - _tmp0_ = self->priv->view; -#line 417 "/home/jens/Source/shotwell/src/Event.vala" - _tmp1_ = view_collection_get_view_for_source (_tmp0_, source); -#line 417 "/home/jens/Source/shotwell/src/Event.vala" - thumbnail_view = G_TYPE_CHECK_INSTANCE_CAST (_tmp1_, TYPE_THUMBNAIL_VIEW, ThumbnailView); -#line 418 "/home/jens/Source/shotwell/src/Event.vala" - _tmp2_ = thumbnail_view; -#line 418 "/home/jens/Source/shotwell/src/Event.vala" - if (_tmp2_ != NULL) { -#line 3671 "Event.c" - ViewCollection* _tmp3_; - ViewCollection* _tmp4_; - ThumbnailView* _tmp5_; - Marker* _tmp6_; - Marker* _tmp7_; -#line 419 "/home/jens/Source/shotwell/src/Event.vala" - _tmp3_ = self->priv->view; -#line 419 "/home/jens/Source/shotwell/src/Event.vala" - _tmp4_ = self->priv->view; -#line 419 "/home/jens/Source/shotwell/src/Event.vala" - _tmp5_ = thumbnail_view; -#line 419 "/home/jens/Source/shotwell/src/Event.vala" - _tmp6_ = data_collection_mark (G_TYPE_CHECK_INSTANCE_CAST (_tmp4_, TYPE_DATA_COLLECTION, DataCollection), G_TYPE_CHECK_INSTANCE_CAST (_tmp5_, TYPE_DATA_OBJECT, DataObject)); -#line 419 "/home/jens/Source/shotwell/src/Event.vala" - _tmp7_ = _tmp6_; -#line 419 "/home/jens/Source/shotwell/src/Event.vala" - data_collection_remove_marked (G_TYPE_CHECK_INSTANCE_CAST (_tmp3_, TYPE_DATA_COLLECTION, DataCollection), _tmp7_); -#line 419 "/home/jens/Source/shotwell/src/Event.vala" - _g_object_unref0 (_tmp7_); -#line 3691 "Event.c" - } -#line 416 "/home/jens/Source/shotwell/src/Event.vala" - _g_object_unref0 (thumbnail_view); -#line 3695 "Event.c" -} - - -static void -event_real_notify_relinking (DataSource* base, - SourceCollection* sources) -{ - Event * self; - MediaSource* _tmp0_; -#line 422 "/home/jens/Source/shotwell/src/Event.vala" - self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_EVENT, Event); -#line 422 "/home/jens/Source/shotwell/src/Event.vala" - g_return_if_fail (IS_SOURCE_COLLECTION (sources)); -#line 423 "/home/jens/Source/shotwell/src/Event.vala" - _vala_assert (event_source_get_media_count (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_EVENT_SOURCE, EventSource)) > 0, "get_media_count() > 0"); -#line 426 "/home/jens/Source/shotwell/src/Event.vala" - _tmp0_ = self->priv->primary_source; -#line 426 "/home/jens/Source/shotwell/src/Event.vala" - if (_tmp0_ == NULL) { -#line 3715 "Event.c" - ViewCollection* _tmp1_; - DataView* _tmp2_; - DataView* _tmp3_; - DataSource* _tmp4_; - MediaSource* _tmp5_; -#line 427 "/home/jens/Source/shotwell/src/Event.vala" - _tmp1_ = self->priv->view; -#line 427 "/home/jens/Source/shotwell/src/Event.vala" - _tmp2_ = view_collection_get_first_unrejected (_tmp1_); -#line 427 "/home/jens/Source/shotwell/src/Event.vala" - _tmp3_ = _tmp2_; -#line 427 "/home/jens/Source/shotwell/src/Event.vala" - _tmp4_ = data_view_get_source (_tmp3_); -#line 427 "/home/jens/Source/shotwell/src/Event.vala" - _tmp5_ = G_TYPE_CHECK_INSTANCE_CAST (_tmp4_, TYPE_MEDIA_SOURCE, MediaSource); -#line 427 "/home/jens/Source/shotwell/src/Event.vala" - event_set_primary_source (self, _tmp5_); -#line 427 "/home/jens/Source/shotwell/src/Event.vala" - _g_object_unref0 (_tmp5_); -#line 427 "/home/jens/Source/shotwell/src/Event.vala" - _g_object_unref0 (_tmp3_); -#line 3737 "Event.c" - } -#line 429 "/home/jens/Source/shotwell/src/Event.vala" - DATA_SOURCE_CLASS (event_parent_class)->notify_relinking (G_TYPE_CHECK_INSTANCE_CAST (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_EVENT_SOURCE, EventSource), TYPE_DATA_SOURCE, DataSource), sources); -#line 3741 "Event.c" -} - - -/** @brief This gets called when one or more media items inside this - * event gets modified in some fashion. If the media item's date changes - * and the event was previously undated, the name of the event needs to - * change as well; all of that happens automatically in here. - * - * In addition, if the _rating_ of one or more media items has changed, - * the thumbnail of this event may need to change, as the primary - * image may have been rejected and should not be the thumbnail anymore. - */ -static void -event_on_media_altered (Event* self, - GeeMap* items) -{ - gboolean should_remake_thumb = FALSE; - gboolean _tmp16_; -#line 441 "/home/jens/Source/shotwell/src/Event.vala" - g_return_if_fail (IS_EVENT (self)); -#line 441 "/home/jens/Source/shotwell/src/Event.vala" - g_return_if_fail (GEE_IS_MAP (items)); -#line 442 "/home/jens/Source/shotwell/src/Event.vala" - should_remake_thumb = FALSE; -#line 3766 "Event.c" - { - GeeIterator* _alteration_it = NULL; - GeeCollection* _tmp0_; - GeeCollection* _tmp1_; - GeeCollection* _tmp2_; - GeeIterator* _tmp3_; - GeeIterator* _tmp4_; -#line 444 "/home/jens/Source/shotwell/src/Event.vala" - _tmp0_ = gee_map_get_values (items); -#line 444 "/home/jens/Source/shotwell/src/Event.vala" - _tmp1_ = _tmp0_; -#line 444 "/home/jens/Source/shotwell/src/Event.vala" - _tmp2_ = _tmp1_; -#line 444 "/home/jens/Source/shotwell/src/Event.vala" - _tmp3_ = gee_iterable_iterator (G_TYPE_CHECK_INSTANCE_CAST (_tmp2_, GEE_TYPE_ITERABLE, GeeIterable)); -#line 444 "/home/jens/Source/shotwell/src/Event.vala" - _tmp4_ = _tmp3_; -#line 444 "/home/jens/Source/shotwell/src/Event.vala" - _g_object_unref0 (_tmp2_); -#line 444 "/home/jens/Source/shotwell/src/Event.vala" - _alteration_it = _tmp4_; -#line 444 "/home/jens/Source/shotwell/src/Event.vala" - while (TRUE) { -#line 3790 "Event.c" - GeeIterator* _tmp5_; - Alteration* alteration = NULL; - GeeIterator* _tmp6_; - gpointer _tmp7_; - Alteration* _tmp8_; - Alteration* _tmp15_; -#line 444 "/home/jens/Source/shotwell/src/Event.vala" - _tmp5_ = _alteration_it; -#line 444 "/home/jens/Source/shotwell/src/Event.vala" - if (!gee_iterator_next (_tmp5_)) { -#line 444 "/home/jens/Source/shotwell/src/Event.vala" - break; -#line 3803 "Event.c" - } -#line 444 "/home/jens/Source/shotwell/src/Event.vala" - _tmp6_ = _alteration_it; -#line 444 "/home/jens/Source/shotwell/src/Event.vala" - _tmp7_ = gee_iterator_get (_tmp6_); -#line 444 "/home/jens/Source/shotwell/src/Event.vala" - alteration = (Alteration*) _tmp7_; -#line 445 "/home/jens/Source/shotwell/src/Event.vala" - _tmp8_ = alteration; -#line 445 "/home/jens/Source/shotwell/src/Event.vala" - if (alteration_has_detail (_tmp8_, "metadata", "exposure-time")) { -#line 3815 "Event.c" - gchar* alt_list = NULL; - gchar* _tmp9_; - const gchar* _tmp12_; - Alteration* _tmp13_; - Alteration* _tmp14_; -#line 447 "/home/jens/Source/shotwell/src/Event.vala" - _tmp9_ = g_strdup ("metadata:time"); -#line 447 "/home/jens/Source/shotwell/src/Event.vala" - alt_list = _tmp9_; -#line 449 "/home/jens/Source/shotwell/src/Event.vala" - if (!event_has_name (self)) { -#line 3827 "Event.c" - const gchar* _tmp10_; - gchar* _tmp11_; -#line 450 "/home/jens/Source/shotwell/src/Event.vala" - _tmp10_ = alt_list; -#line 450 "/home/jens/Source/shotwell/src/Event.vala" - _tmp11_ = g_strconcat (_tmp10_, ", metadata:name", NULL); -#line 450 "/home/jens/Source/shotwell/src/Event.vala" - _g_free0 (alt_list); -#line 450 "/home/jens/Source/shotwell/src/Event.vala" - alt_list = _tmp11_; -#line 3838 "Event.c" - } -#line 452 "/home/jens/Source/shotwell/src/Event.vala" - _tmp12_ = alt_list; -#line 452 "/home/jens/Source/shotwell/src/Event.vala" - _tmp13_ = alteration_new_from_list (_tmp12_); -#line 452 "/home/jens/Source/shotwell/src/Event.vala" - _tmp14_ = _tmp13_; -#line 452 "/home/jens/Source/shotwell/src/Event.vala" - data_object_notify_altered (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_DATA_OBJECT, DataObject), _tmp14_); -#line 452 "/home/jens/Source/shotwell/src/Event.vala" - _alteration_unref0 (_tmp14_); -#line 454 "/home/jens/Source/shotwell/src/Event.vala" - _g_free0 (alt_list); -#line 454 "/home/jens/Source/shotwell/src/Event.vala" - _alteration_unref0 (alteration); -#line 454 "/home/jens/Source/shotwell/src/Event.vala" - break; -#line 3856 "Event.c" - } -#line 457 "/home/jens/Source/shotwell/src/Event.vala" - _tmp15_ = alteration; -#line 457 "/home/jens/Source/shotwell/src/Event.vala" - if (alteration_has_detail (_tmp15_, "metadata", "rating")) { -#line 458 "/home/jens/Source/shotwell/src/Event.vala" - should_remake_thumb = TRUE; -#line 3864 "Event.c" - } -#line 444 "/home/jens/Source/shotwell/src/Event.vala" - _alteration_unref0 (alteration); -#line 3868 "Event.c" - } -#line 444 "/home/jens/Source/shotwell/src/Event.vala" - _g_object_unref0 (_alteration_it); -#line 3872 "Event.c" - } -#line 461 "/home/jens/Source/shotwell/src/Event.vala" - _tmp16_ = should_remake_thumb; -#line 461 "/home/jens/Source/shotwell/src/Event.vala" - if (_tmp16_) { -#line 3878 "Event.c" - gboolean _tmp17_ = FALSE; - MediaSource* _tmp18_; - MediaSource* _tmp19_; - gboolean _tmp20_; -#line 463 "/home/jens/Source/shotwell/src/Event.vala" - _tmp18_ = event_get_primary_source (self); -#line 463 "/home/jens/Source/shotwell/src/Event.vala" - _tmp19_ = _tmp18_; -#line 463 "/home/jens/Source/shotwell/src/Event.vala" - _tmp20_ = _tmp19_ == NULL; -#line 463 "/home/jens/Source/shotwell/src/Event.vala" - _g_object_unref0 (_tmp19_); -#line 463 "/home/jens/Source/shotwell/src/Event.vala" - if (_tmp20_) { -#line 463 "/home/jens/Source/shotwell/src/Event.vala" - _tmp17_ = TRUE; -#line 3895 "Event.c" - } else { - MediaSource* _tmp21_; - MediaSource* _tmp22_; -#line 463 "/home/jens/Source/shotwell/src/Event.vala" - _tmp21_ = event_get_primary_source (self); -#line 463 "/home/jens/Source/shotwell/src/Event.vala" - _tmp22_ = _tmp21_; -#line 463 "/home/jens/Source/shotwell/src/Event.vala" - _tmp17_ = media_source_get_rating (_tmp22_) == RATING_REJECTED; -#line 463 "/home/jens/Source/shotwell/src/Event.vala" - _g_object_unref0 (_tmp22_); -#line 3907 "Event.c" - } -#line 463 "/home/jens/Source/shotwell/src/Event.vala" - if (_tmp17_) { -#line 3911 "Event.c" - ViewCollection* _tmp23_; - DataView* _tmp24_; - DataView* _tmp25_; - DataSource* _tmp26_; - MediaSource* _tmp27_; -#line 465 "/home/jens/Source/shotwell/src/Event.vala" - _tmp23_ = self->priv->view; -#line 465 "/home/jens/Source/shotwell/src/Event.vala" - _tmp24_ = view_collection_get_first_unrejected (_tmp23_); -#line 465 "/home/jens/Source/shotwell/src/Event.vala" - _tmp25_ = _tmp24_; -#line 465 "/home/jens/Source/shotwell/src/Event.vala" - _tmp26_ = data_view_get_source (_tmp25_); -#line 465 "/home/jens/Source/shotwell/src/Event.vala" - _tmp27_ = G_TYPE_CHECK_INSTANCE_CAST (_tmp26_, TYPE_MEDIA_SOURCE, MediaSource); -#line 465 "/home/jens/Source/shotwell/src/Event.vala" - event_set_primary_source (self, _tmp27_); -#line 465 "/home/jens/Source/shotwell/src/Event.vala" - _g_object_unref0 (_tmp27_); -#line 465 "/home/jens/Source/shotwell/src/Event.vala" - _g_object_unref0 (_tmp25_); -#line 3933 "Event.c" - } - } -} - - -Event* -event_create_empty_event (MediaSource* source) -{ - Event* result = NULL; - GError * _inner_error_ = NULL; -#line 474 "/home/jens/Source/shotwell/src/Event.vala" - g_return_val_if_fail (IS_MEDIA_SOURCE (source), NULL); -#line 3946 "Event.c" - { - EventRow* _tmp0_ = NULL; - EventTable* _tmp1_; - EventTable* _tmp2_; - gchar* _tmp3_; - gchar* _tmp4_; - EventRow* _tmp5_; - EventRow* _tmp6_; - Event* event = NULL; - Event* _tmp7_; - EventSourceCollection* _tmp8_; - Event* _tmp9_; - Event* _tmp10_; - gchar* _tmp11_; - gchar* _tmp12_; -#line 476 "/home/jens/Source/shotwell/src/Event.vala" - _tmp1_ = event_table_get_instance (); -#line 476 "/home/jens/Source/shotwell/src/Event.vala" - _tmp2_ = _tmp1_; -#line 476 "/home/jens/Source/shotwell/src/Event.vala" - _tmp3_ = data_source_get_source_id (G_TYPE_CHECK_INSTANCE_CAST (source, TYPE_DATA_SOURCE, DataSource)); -#line 476 "/home/jens/Source/shotwell/src/Event.vala" - _tmp4_ = _tmp3_; -#line 476 "/home/jens/Source/shotwell/src/Event.vala" - _tmp5_ = event_table_create (_tmp2_, _tmp4_, NULL, &_inner_error_); -#line 476 "/home/jens/Source/shotwell/src/Event.vala" - _tmp6_ = _tmp5_; -#line 476 "/home/jens/Source/shotwell/src/Event.vala" - _g_free0 (_tmp4_); -#line 476 "/home/jens/Source/shotwell/src/Event.vala" - _database_table_unref0 (_tmp2_); -#line 476 "/home/jens/Source/shotwell/src/Event.vala" - _tmp0_ = _tmp6_; -#line 476 "/home/jens/Source/shotwell/src/Event.vala" - if (G_UNLIKELY (_inner_error_ != NULL)) { -#line 476 "/home/jens/Source/shotwell/src/Event.vala" - if (_inner_error_->domain == DATABASE_ERROR) { -#line 3984 "Event.c" - goto __catch444_database_error; - } -#line 476 "/home/jens/Source/shotwell/src/Event.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 476 "/home/jens/Source/shotwell/src/Event.vala" - g_clear_error (&_inner_error_); -#line 476 "/home/jens/Source/shotwell/src/Event.vala" - return NULL; -#line 3993 "Event.c" - } -#line 476 "/home/jens/Source/shotwell/src/Event.vala" - _tmp7_ = event_new (_tmp0_, DATA_OBJECT_INVALID_OBJECT_ID); -#line 476 "/home/jens/Source/shotwell/src/Event.vala" - event = _tmp7_; -#line 477 "/home/jens/Source/shotwell/src/Event.vala" - _tmp8_ = event_global; -#line 477 "/home/jens/Source/shotwell/src/Event.vala" - _tmp9_ = event; -#line 477 "/home/jens/Source/shotwell/src/Event.vala" - data_collection_add (G_TYPE_CHECK_INSTANCE_CAST (_tmp8_, TYPE_DATA_COLLECTION, DataCollection), G_TYPE_CHECK_INSTANCE_CAST (_tmp9_, TYPE_DATA_OBJECT, DataObject)); -#line 479 "/home/jens/Source/shotwell/src/Event.vala" - _tmp10_ = event; -#line 479 "/home/jens/Source/shotwell/src/Event.vala" - _tmp11_ = data_object_to_string (G_TYPE_CHECK_INSTANCE_CAST (_tmp10_, TYPE_DATA_OBJECT, DataObject)); -#line 479 "/home/jens/Source/shotwell/src/Event.vala" - _tmp12_ = _tmp11_; -#line 479 "/home/jens/Source/shotwell/src/Event.vala" - g_debug ("Event.vala:479: Created empty event %s", _tmp12_); -#line 479 "/home/jens/Source/shotwell/src/Event.vala" - _g_free0 (_tmp12_); -#line 481 "/home/jens/Source/shotwell/src/Event.vala" - result = event; -#line 481 "/home/jens/Source/shotwell/src/Event.vala" - _event_row_unref0 (_tmp0_); -#line 481 "/home/jens/Source/shotwell/src/Event.vala" - return result; -#line 4021 "Event.c" - } - goto __finally444; - __catch444_database_error: - { - GError* err = NULL; - GError* _tmp13_; -#line 475 "/home/jens/Source/shotwell/src/Event.vala" - err = _inner_error_; -#line 475 "/home/jens/Source/shotwell/src/Event.vala" - _inner_error_ = NULL; -#line 483 "/home/jens/Source/shotwell/src/Event.vala" - _tmp13_ = err; -#line 483 "/home/jens/Source/shotwell/src/Event.vala" - app_window_database_error (_tmp13_); -#line 485 "/home/jens/Source/shotwell/src/Event.vala" - result = NULL; -#line 485 "/home/jens/Source/shotwell/src/Event.vala" - _g_error_free0 (err); -#line 485 "/home/jens/Source/shotwell/src/Event.vala" - return result; -#line 4042 "Event.c" - } - __finally444: -#line 475 "/home/jens/Source/shotwell/src/Event.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 475 "/home/jens/Source/shotwell/src/Event.vala" - g_clear_error (&_inner_error_); -#line 475 "/home/jens/Source/shotwell/src/Event.vala" - return NULL; -#line 4051 "Event.c" -} - - -static Event* -event_reconstitute (gint64 object_id, - EventRow* row) -{ - Event* result = NULL; - EventTable* _tmp0_; - EventTable* _tmp1_; - EventID _tmp2_ = {0}; - Event* event = NULL; - Event* _tmp3_; - EventSourceCollection* _tmp4_; - EventSourceCollection* _tmp5_; - gchar* _tmp6_; - gchar* _tmp7_; -#line 490 "/home/jens/Source/shotwell/src/Event.vala" - g_return_val_if_fail (IS_EVENT_ROW (row), NULL); -#line 491 "/home/jens/Source/shotwell/src/Event.vala" - _tmp0_ = event_table_get_instance (); -#line 491 "/home/jens/Source/shotwell/src/Event.vala" - _tmp1_ = _tmp0_; -#line 491 "/home/jens/Source/shotwell/src/Event.vala" - event_table_create_from_row (_tmp1_, row, &_tmp2_); -#line 491 "/home/jens/Source/shotwell/src/Event.vala" - row->event_id = _tmp2_; -#line 491 "/home/jens/Source/shotwell/src/Event.vala" - _database_table_unref0 (_tmp1_); -#line 492 "/home/jens/Source/shotwell/src/Event.vala" - _tmp3_ = event_new (row, object_id); -#line 492 "/home/jens/Source/shotwell/src/Event.vala" - event = _tmp3_; -#line 493 "/home/jens/Source/shotwell/src/Event.vala" - _tmp4_ = event_global; -#line 493 "/home/jens/Source/shotwell/src/Event.vala" - data_collection_add (G_TYPE_CHECK_INSTANCE_CAST (_tmp4_, TYPE_DATA_COLLECTION, DataCollection), G_TYPE_CHECK_INSTANCE_CAST (event, TYPE_DATA_OBJECT, DataObject)); -#line 494 "/home/jens/Source/shotwell/src/Event.vala" - _tmp5_ = event_global; -#line 494 "/home/jens/Source/shotwell/src/Event.vala" - _vala_assert (data_collection_contains (G_TYPE_CHECK_INSTANCE_CAST (_tmp5_, TYPE_DATA_COLLECTION, DataCollection), G_TYPE_CHECK_INSTANCE_CAST (event, TYPE_DATA_OBJECT, DataObject)), "global.contains(event)"); -#line 496 "/home/jens/Source/shotwell/src/Event.vala" - _tmp6_ = data_object_to_string (G_TYPE_CHECK_INSTANCE_CAST (event, TYPE_DATA_OBJECT, DataObject)); -#line 496 "/home/jens/Source/shotwell/src/Event.vala" - _tmp7_ = _tmp6_; -#line 496 "/home/jens/Source/shotwell/src/Event.vala" - g_debug ("Event.vala:496: Reconstituted event %s", _tmp7_); -#line 496 "/home/jens/Source/shotwell/src/Event.vala" - _g_free0 (_tmp7_); -#line 498 "/home/jens/Source/shotwell/src/Event.vala" - result = event; -#line 498 "/home/jens/Source/shotwell/src/Event.vala" - return result; -#line 4105 "Event.c" -} - - -static gboolean -event_real_has_links (ContainerSource* base) -{ - Event * self; - gboolean result = FALSE; - gboolean _tmp0_ = FALSE; - LibraryPhotoSourceCollection* _tmp1_; - SourceBacklink* _tmp2_; - SourceBacklink* _tmp3_; - gboolean _tmp4_; -#line 501 "/home/jens/Source/shotwell/src/Event.vala" - self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_EVENT, Event); -#line 502 "/home/jens/Source/shotwell/src/Event.vala" - _tmp1_ = library_photo_global; -#line 502 "/home/jens/Source/shotwell/src/Event.vala" - _tmp2_ = container_source_get_backlink (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_CONTAINER_SOURCE, ContainerSource)); -#line 502 "/home/jens/Source/shotwell/src/Event.vala" - _tmp3_ = _tmp2_; -#line 502 "/home/jens/Source/shotwell/src/Event.vala" - _tmp4_ = source_collection_has_backlink (G_TYPE_CHECK_INSTANCE_CAST (_tmp1_, TYPE_SOURCE_COLLECTION, SourceCollection), _tmp3_); -#line 502 "/home/jens/Source/shotwell/src/Event.vala" - _source_backlink_unref0 (_tmp3_); -#line 502 "/home/jens/Source/shotwell/src/Event.vala" - if (_tmp4_) { -#line 502 "/home/jens/Source/shotwell/src/Event.vala" - _tmp0_ = TRUE; -#line 4135 "Event.c" - } else { - VideoSourceCollection* _tmp5_; - SourceBacklink* _tmp6_; - SourceBacklink* _tmp7_; -#line 503 "/home/jens/Source/shotwell/src/Event.vala" - _tmp5_ = video_global; -#line 503 "/home/jens/Source/shotwell/src/Event.vala" - _tmp6_ = container_source_get_backlink (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_CONTAINER_SOURCE, ContainerSource)); -#line 503 "/home/jens/Source/shotwell/src/Event.vala" - _tmp7_ = _tmp6_; -#line 503 "/home/jens/Source/shotwell/src/Event.vala" - _tmp0_ = source_collection_has_backlink (G_TYPE_CHECK_INSTANCE_CAST (_tmp5_, TYPE_SOURCE_COLLECTION, SourceCollection), _tmp7_); -#line 503 "/home/jens/Source/shotwell/src/Event.vala" - _source_backlink_unref0 (_tmp7_); -#line 4150 "Event.c" - } -#line 502 "/home/jens/Source/shotwell/src/Event.vala" - result = _tmp0_; -#line 502 "/home/jens/Source/shotwell/src/Event.vala" - return result; -#line 4156 "Event.c" -} - - -static SourceBacklink* -event_real_get_backlink (ContainerSource* base) -{ - Event * self; - SourceBacklink* result = NULL; - SourceBacklink* _tmp0_; -#line 506 "/home/jens/Source/shotwell/src/Event.vala" - self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_EVENT, Event); -#line 507 "/home/jens/Source/shotwell/src/Event.vala" - _tmp0_ = source_backlink_new_from_source (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_DATA_SOURCE, DataSource)); -#line 507 "/home/jens/Source/shotwell/src/Event.vala" - result = _tmp0_; -#line 507 "/home/jens/Source/shotwell/src/Event.vala" - return result; -#line 4174 "Event.c" -} - - -static void -event_real_break_link (ContainerSource* base, - DataSource* source) -{ - Event * self; -#line 510 "/home/jens/Source/shotwell/src/Event.vala" - self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_EVENT, Event); -#line 510 "/home/jens/Source/shotwell/src/Event.vala" - g_return_if_fail (IS_DATA_SOURCE (source)); -#line 511 "/home/jens/Source/shotwell/src/Event.vala" - self->priv->unlinking = TRUE; -#line 513 "/home/jens/Source/shotwell/src/Event.vala" - media_source_set_event (G_TYPE_CHECK_INSTANCE_CAST (source, TYPE_MEDIA_SOURCE, MediaSource), NULL); -#line 515 "/home/jens/Source/shotwell/src/Event.vala" - self->priv->unlinking = FALSE; -#line 4193 "Event.c" -} - - -static void -event_real_break_link_many (ContainerSource* base, - GeeCollection* sources) -{ - Event * self; - GeeArrayList* photos = NULL; - GeeArrayList* _tmp0_; - GeeArrayList* videos = NULL; - GeeArrayList* _tmp1_; - GError * _inner_error_ = NULL; -#line 518 "/home/jens/Source/shotwell/src/Event.vala" - self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_EVENT, Event); -#line 518 "/home/jens/Source/shotwell/src/Event.vala" - g_return_if_fail (GEE_IS_COLLECTION (sources)); -#line 519 "/home/jens/Source/shotwell/src/Event.vala" - self->priv->unlinking = TRUE; -#line 521 "/home/jens/Source/shotwell/src/Event.vala" - _tmp0_ = gee_array_list_new (TYPE_LIBRARY_PHOTO, (GBoxedCopyFunc) g_object_ref, (GDestroyNotify) g_object_unref, NULL, NULL, NULL); -#line 521 "/home/jens/Source/shotwell/src/Event.vala" - photos = _tmp0_; -#line 522 "/home/jens/Source/shotwell/src/Event.vala" - _tmp1_ = gee_array_list_new (TYPE_VIDEO, (GBoxedCopyFunc) g_object_ref, (GDestroyNotify) g_object_unref, NULL, NULL, NULL); -#line 522 "/home/jens/Source/shotwell/src/Event.vala" - videos = _tmp1_; -#line 523 "/home/jens/Source/shotwell/src/Event.vala" - media_source_collection_filter_media (G_TYPE_CHECK_INSTANCE_CAST (sources, GEE_TYPE_COLLECTION, GeeCollection), G_TYPE_CHECK_INSTANCE_CAST (photos, GEE_TYPE_COLLECTION, GeeCollection), G_TYPE_CHECK_INSTANCE_CAST (videos, GEE_TYPE_COLLECTION, GeeCollection)); -#line 4223 "Event.c" - { - LibraryPhotoSourceCollection* _tmp2_; - TransactionController* _tmp3_; - TransactionController* _tmp4_; -#line 526 "/home/jens/Source/shotwell/src/Event.vala" - _tmp2_ = library_photo_global; -#line 526 "/home/jens/Source/shotwell/src/Event.vala" - _tmp3_ = media_source_collection_get_transaction_controller (G_TYPE_CHECK_INSTANCE_CAST (_tmp2_, TYPE_MEDIA_SOURCE_COLLECTION, MediaSourceCollection)); -#line 526 "/home/jens/Source/shotwell/src/Event.vala" - _tmp4_ = _tmp3_; -#line 526 "/home/jens/Source/shotwell/src/Event.vala" - media_source_set_many_to_event (G_TYPE_CHECK_INSTANCE_CAST (photos, GEE_TYPE_COLLECTION, GeeCollection), NULL, _tmp4_, &_inner_error_); -#line 526 "/home/jens/Source/shotwell/src/Event.vala" - if (G_UNLIKELY (_inner_error_ != NULL)) { -#line 4238 "Event.c" - goto __catch445_g_error; - } - } - goto __finally445; - __catch445_g_error: - { - GError* err = NULL; - GError* _tmp5_; - const gchar* _tmp6_; - gchar* _tmp7_; - gchar* _tmp8_; -#line 525 "/home/jens/Source/shotwell/src/Event.vala" - err = _inner_error_; -#line 525 "/home/jens/Source/shotwell/src/Event.vala" - _inner_error_ = NULL; -#line 528 "/home/jens/Source/shotwell/src/Event.vala" - _tmp5_ = err; -#line 528 "/home/jens/Source/shotwell/src/Event.vala" - _tmp6_ = _tmp5_->message; -#line 528 "/home/jens/Source/shotwell/src/Event.vala" - _tmp7_ = g_strdup_printf ("%s", _tmp6_); -#line 528 "/home/jens/Source/shotwell/src/Event.vala" - _tmp8_ = _tmp7_; -#line 528 "/home/jens/Source/shotwell/src/Event.vala" - app_window_error_message (_tmp8_, NULL); -#line 528 "/home/jens/Source/shotwell/src/Event.vala" - _g_free0 (_tmp8_); -#line 525 "/home/jens/Source/shotwell/src/Event.vala" - _g_error_free0 (err); -#line 4268 "Event.c" - } - __finally445: -#line 525 "/home/jens/Source/shotwell/src/Event.vala" - if (G_UNLIKELY (_inner_error_ != NULL)) { -#line 525 "/home/jens/Source/shotwell/src/Event.vala" - _g_object_unref0 (videos); -#line 525 "/home/jens/Source/shotwell/src/Event.vala" - _g_object_unref0 (photos); -#line 525 "/home/jens/Source/shotwell/src/Event.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 525 "/home/jens/Source/shotwell/src/Event.vala" - g_clear_error (&_inner_error_); -#line 525 "/home/jens/Source/shotwell/src/Event.vala" - return; -#line 4283 "Event.c" - } - { - VideoSourceCollection* _tmp9_; - TransactionController* _tmp10_; - TransactionController* _tmp11_; -#line 532 "/home/jens/Source/shotwell/src/Event.vala" - _tmp9_ = video_global; -#line 532 "/home/jens/Source/shotwell/src/Event.vala" - _tmp10_ = media_source_collection_get_transaction_controller (G_TYPE_CHECK_INSTANCE_CAST (_tmp9_, TYPE_MEDIA_SOURCE_COLLECTION, MediaSourceCollection)); -#line 532 "/home/jens/Source/shotwell/src/Event.vala" - _tmp11_ = _tmp10_; -#line 532 "/home/jens/Source/shotwell/src/Event.vala" - media_source_set_many_to_event (G_TYPE_CHECK_INSTANCE_CAST (videos, GEE_TYPE_COLLECTION, GeeCollection), NULL, _tmp11_, &_inner_error_); -#line 532 "/home/jens/Source/shotwell/src/Event.vala" - if (G_UNLIKELY (_inner_error_ != NULL)) { -#line 4299 "Event.c" - goto __catch446_g_error; - } - } - goto __finally446; - __catch446_g_error: - { - GError* err = NULL; - GError* _tmp12_; - const gchar* _tmp13_; - gchar* _tmp14_; - gchar* _tmp15_; -#line 531 "/home/jens/Source/shotwell/src/Event.vala" - err = _inner_error_; -#line 531 "/home/jens/Source/shotwell/src/Event.vala" - _inner_error_ = NULL; -#line 534 "/home/jens/Source/shotwell/src/Event.vala" - _tmp12_ = err; -#line 534 "/home/jens/Source/shotwell/src/Event.vala" - _tmp13_ = _tmp12_->message; -#line 534 "/home/jens/Source/shotwell/src/Event.vala" - _tmp14_ = g_strdup_printf ("%s", _tmp13_); -#line 534 "/home/jens/Source/shotwell/src/Event.vala" - _tmp15_ = _tmp14_; -#line 534 "/home/jens/Source/shotwell/src/Event.vala" - app_window_error_message (_tmp15_, NULL); -#line 534 "/home/jens/Source/shotwell/src/Event.vala" - _g_free0 (_tmp15_); -#line 531 "/home/jens/Source/shotwell/src/Event.vala" - _g_error_free0 (err); -#line 4329 "Event.c" - } - __finally446: -#line 531 "/home/jens/Source/shotwell/src/Event.vala" - if (G_UNLIKELY (_inner_error_ != NULL)) { -#line 531 "/home/jens/Source/shotwell/src/Event.vala" - _g_object_unref0 (videos); -#line 531 "/home/jens/Source/shotwell/src/Event.vala" - _g_object_unref0 (photos); -#line 531 "/home/jens/Source/shotwell/src/Event.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 531 "/home/jens/Source/shotwell/src/Event.vala" - g_clear_error (&_inner_error_); -#line 531 "/home/jens/Source/shotwell/src/Event.vala" - return; -#line 4344 "Event.c" - } -#line 537 "/home/jens/Source/shotwell/src/Event.vala" - self->priv->unlinking = FALSE; -#line 518 "/home/jens/Source/shotwell/src/Event.vala" - _g_object_unref0 (videos); -#line 518 "/home/jens/Source/shotwell/src/Event.vala" - _g_object_unref0 (photos); -#line 4352 "Event.c" -} - - -static void -event_real_establish_link (ContainerSource* base, - DataSource* source) -{ - Event * self; -#line 540 "/home/jens/Source/shotwell/src/Event.vala" - self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_EVENT, Event); -#line 540 "/home/jens/Source/shotwell/src/Event.vala" - g_return_if_fail (IS_DATA_SOURCE (source)); -#line 541 "/home/jens/Source/shotwell/src/Event.vala" - self->priv->relinking = TRUE; -#line 543 "/home/jens/Source/shotwell/src/Event.vala" - media_source_set_event (G_TYPE_CHECK_INSTANCE_CAST (source, TYPE_MEDIA_SOURCE, MediaSource), self); -#line 545 "/home/jens/Source/shotwell/src/Event.vala" - self->priv->relinking = FALSE; -#line 4371 "Event.c" -} - - -static void -event_real_establish_link_many (ContainerSource* base, - GeeCollection* sources) -{ - Event * self; - GeeArrayList* photos = NULL; - GeeArrayList* _tmp0_; - GeeArrayList* videos = NULL; - GeeArrayList* _tmp1_; - GError * _inner_error_ = NULL; -#line 548 "/home/jens/Source/shotwell/src/Event.vala" - self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_EVENT, Event); -#line 548 "/home/jens/Source/shotwell/src/Event.vala" - g_return_if_fail (GEE_IS_COLLECTION (sources)); -#line 549 "/home/jens/Source/shotwell/src/Event.vala" - self->priv->relinking = TRUE; -#line 551 "/home/jens/Source/shotwell/src/Event.vala" - _tmp0_ = gee_array_list_new (TYPE_LIBRARY_PHOTO, (GBoxedCopyFunc) g_object_ref, (GDestroyNotify) g_object_unref, NULL, NULL, NULL); -#line 551 "/home/jens/Source/shotwell/src/Event.vala" - photos = _tmp0_; -#line 552 "/home/jens/Source/shotwell/src/Event.vala" - _tmp1_ = gee_array_list_new (TYPE_VIDEO, (GBoxedCopyFunc) g_object_ref, (GDestroyNotify) g_object_unref, NULL, NULL, NULL); -#line 552 "/home/jens/Source/shotwell/src/Event.vala" - videos = _tmp1_; -#line 553 "/home/jens/Source/shotwell/src/Event.vala" - media_source_collection_filter_media (G_TYPE_CHECK_INSTANCE_CAST (sources, GEE_TYPE_COLLECTION, GeeCollection), G_TYPE_CHECK_INSTANCE_CAST (photos, GEE_TYPE_COLLECTION, GeeCollection), G_TYPE_CHECK_INSTANCE_CAST (videos, GEE_TYPE_COLLECTION, GeeCollection)); -#line 4401 "Event.c" - { - LibraryPhotoSourceCollection* _tmp2_; - TransactionController* _tmp3_; - TransactionController* _tmp4_; -#line 556 "/home/jens/Source/shotwell/src/Event.vala" - _tmp2_ = library_photo_global; -#line 556 "/home/jens/Source/shotwell/src/Event.vala" - _tmp3_ = media_source_collection_get_transaction_controller (G_TYPE_CHECK_INSTANCE_CAST (_tmp2_, TYPE_MEDIA_SOURCE_COLLECTION, MediaSourceCollection)); -#line 556 "/home/jens/Source/shotwell/src/Event.vala" - _tmp4_ = _tmp3_; -#line 556 "/home/jens/Source/shotwell/src/Event.vala" - media_source_set_many_to_event (G_TYPE_CHECK_INSTANCE_CAST (photos, GEE_TYPE_COLLECTION, GeeCollection), self, _tmp4_, &_inner_error_); -#line 556 "/home/jens/Source/shotwell/src/Event.vala" - if (G_UNLIKELY (_inner_error_ != NULL)) { -#line 4416 "Event.c" - goto __catch447_g_error; - } - } - goto __finally447; - __catch447_g_error: - { - GError* err = NULL; - GError* _tmp5_; - const gchar* _tmp6_; - gchar* _tmp7_; - gchar* _tmp8_; -#line 555 "/home/jens/Source/shotwell/src/Event.vala" - err = _inner_error_; -#line 555 "/home/jens/Source/shotwell/src/Event.vala" - _inner_error_ = NULL; -#line 558 "/home/jens/Source/shotwell/src/Event.vala" - _tmp5_ = err; -#line 558 "/home/jens/Source/shotwell/src/Event.vala" - _tmp6_ = _tmp5_->message; -#line 558 "/home/jens/Source/shotwell/src/Event.vala" - _tmp7_ = g_strdup_printf ("%s", _tmp6_); -#line 558 "/home/jens/Source/shotwell/src/Event.vala" - _tmp8_ = _tmp7_; -#line 558 "/home/jens/Source/shotwell/src/Event.vala" - app_window_error_message (_tmp8_, NULL); -#line 558 "/home/jens/Source/shotwell/src/Event.vala" - _g_free0 (_tmp8_); -#line 555 "/home/jens/Source/shotwell/src/Event.vala" - _g_error_free0 (err); -#line 4446 "Event.c" - } - __finally447: -#line 555 "/home/jens/Source/shotwell/src/Event.vala" - if (G_UNLIKELY (_inner_error_ != NULL)) { -#line 555 "/home/jens/Source/shotwell/src/Event.vala" - _g_object_unref0 (videos); -#line 555 "/home/jens/Source/shotwell/src/Event.vala" - _g_object_unref0 (photos); -#line 555 "/home/jens/Source/shotwell/src/Event.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 555 "/home/jens/Source/shotwell/src/Event.vala" - g_clear_error (&_inner_error_); -#line 555 "/home/jens/Source/shotwell/src/Event.vala" - return; -#line 4461 "Event.c" - } - { - VideoSourceCollection* _tmp9_; - TransactionController* _tmp10_; - TransactionController* _tmp11_; -#line 562 "/home/jens/Source/shotwell/src/Event.vala" - _tmp9_ = video_global; -#line 562 "/home/jens/Source/shotwell/src/Event.vala" - _tmp10_ = media_source_collection_get_transaction_controller (G_TYPE_CHECK_INSTANCE_CAST (_tmp9_, TYPE_MEDIA_SOURCE_COLLECTION, MediaSourceCollection)); -#line 562 "/home/jens/Source/shotwell/src/Event.vala" - _tmp11_ = _tmp10_; -#line 562 "/home/jens/Source/shotwell/src/Event.vala" - media_source_set_many_to_event (G_TYPE_CHECK_INSTANCE_CAST (videos, GEE_TYPE_COLLECTION, GeeCollection), self, _tmp11_, &_inner_error_); -#line 562 "/home/jens/Source/shotwell/src/Event.vala" - if (G_UNLIKELY (_inner_error_ != NULL)) { -#line 4477 "Event.c" - goto __catch448_g_error; - } - } - goto __finally448; - __catch448_g_error: - { - GError* err = NULL; - GError* _tmp12_; - const gchar* _tmp13_; - gchar* _tmp14_; - gchar* _tmp15_; -#line 561 "/home/jens/Source/shotwell/src/Event.vala" - err = _inner_error_; -#line 561 "/home/jens/Source/shotwell/src/Event.vala" - _inner_error_ = NULL; -#line 564 "/home/jens/Source/shotwell/src/Event.vala" - _tmp12_ = err; -#line 564 "/home/jens/Source/shotwell/src/Event.vala" - _tmp13_ = _tmp12_->message; -#line 564 "/home/jens/Source/shotwell/src/Event.vala" - _tmp14_ = g_strdup_printf ("%s", _tmp13_); -#line 564 "/home/jens/Source/shotwell/src/Event.vala" - _tmp15_ = _tmp14_; -#line 564 "/home/jens/Source/shotwell/src/Event.vala" - app_window_error_message (_tmp15_, NULL); -#line 564 "/home/jens/Source/shotwell/src/Event.vala" - _g_free0 (_tmp15_); -#line 561 "/home/jens/Source/shotwell/src/Event.vala" - _g_error_free0 (err); -#line 4507 "Event.c" - } - __finally448: -#line 561 "/home/jens/Source/shotwell/src/Event.vala" - if (G_UNLIKELY (_inner_error_ != NULL)) { -#line 561 "/home/jens/Source/shotwell/src/Event.vala" - _g_object_unref0 (videos); -#line 561 "/home/jens/Source/shotwell/src/Event.vala" - _g_object_unref0 (photos); -#line 561 "/home/jens/Source/shotwell/src/Event.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 561 "/home/jens/Source/shotwell/src/Event.vala" - g_clear_error (&_inner_error_); -#line 561 "/home/jens/Source/shotwell/src/Event.vala" - return; -#line 4522 "Event.c" - } -#line 567 "/home/jens/Source/shotwell/src/Event.vala" - self->priv->relinking = FALSE; -#line 548 "/home/jens/Source/shotwell/src/Event.vala" - _g_object_unref0 (videos); -#line 548 "/home/jens/Source/shotwell/src/Event.vala" - _g_object_unref0 (photos); -#line 4530 "Event.c" -} - - -static gchar* -_vala_g_strjoinv (const gchar* separator, - gchar** str_array, - int str_array_length1) -{ - gchar* result = NULL; - gboolean _tmp0_ = FALSE; -#line 1092 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" - if (separator == NULL) { -#line 1093 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" - separator = ""; -#line 4545 "Event.c" - } -#line 1095 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" - if (str_array != NULL) { -#line 4549 "Event.c" - gboolean _tmp1_ = FALSE; -#line 1095 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" - if (str_array_length1 > 0) { -#line 1095 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" - _tmp1_ = TRUE; -#line 4555 "Event.c" - } else { - gboolean _tmp2_ = FALSE; -#line 1095 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" - if (str_array_length1 == -1) { -#line 4560 "Event.c" - const gchar* _tmp3_; -#line 1095 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" - _tmp3_ = str_array[0]; -#line 1095 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" - _tmp2_ = _tmp3_ != NULL; -#line 4566 "Event.c" - } else { -#line 1095 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" - _tmp2_ = FALSE; -#line 4570 "Event.c" - } -#line 1095 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" - _tmp1_ = _tmp2_; -#line 4574 "Event.c" - } -#line 1095 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" - _tmp0_ = _tmp1_; -#line 4578 "Event.c" - } else { -#line 1095 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" - _tmp0_ = FALSE; -#line 4582 "Event.c" - } -#line 1095 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" - if (_tmp0_) { -#line 4586 "Event.c" - gint i = 0; - gsize len = 0UL; - gint _tmp20_; - gint _tmp22_; - gint _tmp23_; - gsize _tmp24_; - gint _tmp25_; - gint _tmp26_; - gint _tmp27_; - const gchar* res = NULL; - gsize _tmp28_; - void* _tmp29_; - void* ptr = NULL; - const gchar* _tmp30_; - const gchar* _tmp31_; - void* _tmp32_; - const gchar* _tmp45_; -#line 1097 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" - len = (gsize) 1; -#line 4606 "Event.c" - { - gboolean _tmp4_ = FALSE; -#line 1098 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" - i = 0; -#line 1098 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" - _tmp4_ = TRUE; -#line 1098 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" - while (TRUE) { -#line 4615 "Event.c" - gboolean _tmp6_ = FALSE; - gboolean _tmp7_ = FALSE; - gint _tmp12_ = 0; - gint _tmp13_; - const gchar* _tmp14_; - gsize _tmp19_; -#line 1098 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" - if (!_tmp4_) { -#line 4624 "Event.c" - gint _tmp5_; -#line 1098 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" - _tmp5_ = i; -#line 1098 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" - i = _tmp5_ + 1; -#line 4630 "Event.c" - } -#line 1098 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" - _tmp4_ = FALSE; -#line 1098 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" - if (str_array_length1 != -1) { -#line 4636 "Event.c" - gint _tmp8_; -#line 1098 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" - _tmp8_ = i; -#line 1098 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" - _tmp7_ = _tmp8_ < str_array_length1; -#line 4642 "Event.c" - } else { -#line 1098 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" - _tmp7_ = FALSE; -#line 4646 "Event.c" - } -#line 1098 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" - if (_tmp7_) { -#line 1098 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" - _tmp6_ = TRUE; -#line 4652 "Event.c" - } else { - gboolean _tmp9_ = FALSE; -#line 1098 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" - if (str_array_length1 == -1) { -#line 4657 "Event.c" - gint _tmp10_; - const gchar* _tmp11_; -#line 1098 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" - _tmp10_ = i; -#line 1098 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" - _tmp11_ = str_array[_tmp10_]; -#line 1098 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" - _tmp9_ = _tmp11_ != NULL; -#line 4666 "Event.c" - } else { -#line 1098 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" - _tmp9_ = FALSE; -#line 4670 "Event.c" - } -#line 1098 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" - _tmp6_ = _tmp9_; -#line 4674 "Event.c" - } -#line 1098 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" - if (!_tmp6_) { -#line 1098 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" - break; -#line 4680 "Event.c" - } -#line 1099 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" - _tmp13_ = i; -#line 1099 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" - _tmp14_ = str_array[_tmp13_]; -#line 1099 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" - if (_tmp14_ != NULL) { -#line 4688 "Event.c" - gint _tmp15_; - const gchar* _tmp16_; - gint _tmp17_; - gint _tmp18_; -#line 1099 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" - _tmp15_ = i; -#line 1099 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" - _tmp16_ = str_array[_tmp15_]; -#line 1099 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" - _tmp17_ = strlen ((const gchar*) _tmp16_); -#line 1099 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" - _tmp18_ = _tmp17_; -#line 1099 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" - _tmp12_ = _tmp18_; -#line 4703 "Event.c" - } else { -#line 1099 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" - _tmp12_ = 0; -#line 4707 "Event.c" - } -#line 1099 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" - _tmp19_ = len; -#line 1099 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" - len = _tmp19_ + _tmp12_; -#line 4713 "Event.c" - } - } -#line 1101 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" - _tmp20_ = i; -#line 1101 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" - if (_tmp20_ == 0) { -#line 4720 "Event.c" - gchar* _tmp21_; -#line 1102 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" - _tmp21_ = g_strdup (""); -#line 1102 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" - result = _tmp21_; -#line 1102 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" - return result; -#line 4728 "Event.c" - } -#line 1104 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" - _tmp22_ = i; -#line 1104 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" - str_array_length1 = _tmp22_; -#line 1104 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" - _tmp23_ = str_array_length1; -#line 1105 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" - _tmp24_ = len; -#line 1105 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" - _tmp25_ = strlen ((const gchar*) separator); -#line 1105 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" - _tmp26_ = _tmp25_; -#line 1105 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" - _tmp27_ = i; -#line 1105 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" - len = _tmp24_ + (_tmp26_ * (_tmp27_ - 1)); -#line 1107 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" - _tmp28_ = len; -#line 1107 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" - _tmp29_ = g_malloc (_tmp28_); -#line 1107 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" - res = _tmp29_; -#line 1108 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" - _tmp30_ = res; -#line 1108 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" - _tmp31_ = str_array[0]; -#line 1108 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" - _tmp32_ = g_stpcpy ((void*) _tmp30_, (const gchar*) _tmp31_); -#line 1108 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" - ptr = _tmp32_; -#line 4760 "Event.c" - { - gboolean _tmp33_ = FALSE; -#line 1109 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" - i = 1; -#line 1109 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" - _tmp33_ = TRUE; -#line 1109 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" - while (TRUE) { -#line 4769 "Event.c" - gint _tmp35_; - void* _tmp36_; - void* _tmp37_; - const gchar* _tmp38_ = NULL; - gint _tmp39_; - const gchar* _tmp40_; - void* _tmp43_; - void* _tmp44_; -#line 1109 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" - if (!_tmp33_) { -#line 4780 "Event.c" - gint _tmp34_; -#line 1109 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" - _tmp34_ = i; -#line 1109 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" - i = _tmp34_ + 1; -#line 4786 "Event.c" - } -#line 1109 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" - _tmp33_ = FALSE; -#line 1109 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" - _tmp35_ = i; -#line 1109 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" - if (!(_tmp35_ < str_array_length1)) { -#line 1109 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" - break; -#line 4796 "Event.c" - } -#line 1110 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" - _tmp36_ = ptr; -#line 1110 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" - _tmp37_ = g_stpcpy (_tmp36_, (const gchar*) separator); -#line 1110 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" - ptr = _tmp37_; -#line 1111 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" - _tmp39_ = i; -#line 1111 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" - _tmp40_ = str_array[_tmp39_]; -#line 1111 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" - if (_tmp40_ != NULL) { -#line 4810 "Event.c" - gint _tmp41_; - const gchar* _tmp42_; -#line 1111 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" - _tmp41_ = i; -#line 1111 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" - _tmp42_ = str_array[_tmp41_]; -#line 1111 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" - _tmp38_ = (const gchar*) _tmp42_; -#line 4819 "Event.c" - } else { -#line 1111 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" - _tmp38_ = ""; -#line 4823 "Event.c" - } -#line 1111 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" - _tmp43_ = ptr; -#line 1111 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" - _tmp44_ = g_stpcpy (_tmp43_, _tmp38_); -#line 1111 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" - ptr = _tmp44_; -#line 4831 "Event.c" - } - } -#line 1114 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" - _tmp45_ = res; -#line 1114 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" - res = NULL; -#line 1114 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" - result = (gchar*) _tmp45_; -#line 1114 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" - return result; -#line 4842 "Event.c" - } else { - gchar* _tmp46_; -#line 1116 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" - _tmp46_ = g_strdup (""); -#line 1116 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" - result = _tmp46_; -#line 1116 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" - return result; -#line 4851 "Event.c" - } -} - - -static void -event_update_indexable_keywords (Event* self) -{ - gchar** components = NULL; - gchar** _tmp0_; - gint components_length1; - gint _components_size_; - gint i = 0; - gchar* rawname = NULL; - gchar* _tmp1_; - const gchar* _tmp2_; - gchar* comment = NULL; - gchar* _tmp8_; - const gchar* _tmp9_; - gint _tmp15_; -#line 570 "/home/jens/Source/shotwell/src/Event.vala" - g_return_if_fail (IS_EVENT (self)); -#line 571 "/home/jens/Source/shotwell/src/Event.vala" - _tmp0_ = g_new0 (gchar*, 3 + 1); -#line 571 "/home/jens/Source/shotwell/src/Event.vala" - components = _tmp0_; -#line 571 "/home/jens/Source/shotwell/src/Event.vala" - components_length1 = 3; -#line 571 "/home/jens/Source/shotwell/src/Event.vala" - _components_size_ = components_length1; -#line 572 "/home/jens/Source/shotwell/src/Event.vala" - i = 0; -#line 574 "/home/jens/Source/shotwell/src/Event.vala" - _tmp1_ = event_get_raw_name (self); -#line 574 "/home/jens/Source/shotwell/src/Event.vala" - rawname = _tmp1_; -#line 575 "/home/jens/Source/shotwell/src/Event.vala" - _tmp2_ = rawname; -#line 575 "/home/jens/Source/shotwell/src/Event.vala" - if (_tmp2_ != NULL) { -#line 4891 "Event.c" - gchar** _tmp3_; - gint _tmp3__length1; - gint _tmp4_; - const gchar* _tmp5_; - gchar* _tmp6_; - gchar* _tmp7_; -#line 576 "/home/jens/Source/shotwell/src/Event.vala" - _tmp3_ = components; -#line 576 "/home/jens/Source/shotwell/src/Event.vala" - _tmp3__length1 = components_length1; -#line 576 "/home/jens/Source/shotwell/src/Event.vala" - _tmp4_ = i; -#line 576 "/home/jens/Source/shotwell/src/Event.vala" - i = _tmp4_ + 1; -#line 576 "/home/jens/Source/shotwell/src/Event.vala" - _tmp5_ = rawname; -#line 576 "/home/jens/Source/shotwell/src/Event.vala" - _tmp6_ = g_strdup (_tmp5_); -#line 576 "/home/jens/Source/shotwell/src/Event.vala" - _g_free0 (_tmp3_[_tmp4_]); -#line 576 "/home/jens/Source/shotwell/src/Event.vala" - _tmp3_[_tmp4_] = _tmp6_; -#line 576 "/home/jens/Source/shotwell/src/Event.vala" - _tmp7_ = _tmp3_[_tmp4_]; -#line 4916 "Event.c" - } -#line 578 "/home/jens/Source/shotwell/src/Event.vala" - _tmp8_ = event_source_get_comment (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_EVENT_SOURCE, EventSource)); -#line 578 "/home/jens/Source/shotwell/src/Event.vala" - comment = _tmp8_; -#line 579 "/home/jens/Source/shotwell/src/Event.vala" - _tmp9_ = comment; -#line 579 "/home/jens/Source/shotwell/src/Event.vala" - if (_tmp9_ != NULL) { -#line 4926 "Event.c" - gchar** _tmp10_; - gint _tmp10__length1; - gint _tmp11_; - const gchar* _tmp12_; - gchar* _tmp13_; - gchar* _tmp14_; -#line 580 "/home/jens/Source/shotwell/src/Event.vala" - _tmp10_ = components; -#line 580 "/home/jens/Source/shotwell/src/Event.vala" - _tmp10__length1 = components_length1; -#line 580 "/home/jens/Source/shotwell/src/Event.vala" - _tmp11_ = i; -#line 580 "/home/jens/Source/shotwell/src/Event.vala" - i = _tmp11_ + 1; -#line 580 "/home/jens/Source/shotwell/src/Event.vala" - _tmp12_ = comment; -#line 580 "/home/jens/Source/shotwell/src/Event.vala" - _tmp13_ = g_strdup (_tmp12_); -#line 580 "/home/jens/Source/shotwell/src/Event.vala" - _g_free0 (_tmp10_[_tmp11_]); -#line 580 "/home/jens/Source/shotwell/src/Event.vala" - _tmp10_[_tmp11_] = _tmp13_; -#line 580 "/home/jens/Source/shotwell/src/Event.vala" - _tmp14_ = _tmp10_[_tmp11_]; -#line 4951 "Event.c" - } -#line 582 "/home/jens/Source/shotwell/src/Event.vala" - _tmp15_ = i; -#line 582 "/home/jens/Source/shotwell/src/Event.vala" - if (_tmp15_ == 0) { -#line 583 "/home/jens/Source/shotwell/src/Event.vala" - _g_free0 (self->priv->indexable_keywords); -#line 583 "/home/jens/Source/shotwell/src/Event.vala" - self->priv->indexable_keywords = NULL; -#line 4961 "Event.c" - } else { - gchar** _tmp16_; - gint _tmp16__length1; - gint _tmp17_; - gchar* _tmp18_; - gchar** _tmp19_; - gint _tmp19__length1; - gchar* _tmp20_; - gchar* _tmp21_; - gchar* _tmp22_; -#line 585 "/home/jens/Source/shotwell/src/Event.vala" - _tmp16_ = components; -#line 585 "/home/jens/Source/shotwell/src/Event.vala" - _tmp16__length1 = components_length1; -#line 585 "/home/jens/Source/shotwell/src/Event.vala" - _tmp17_ = i; -#line 585 "/home/jens/Source/shotwell/src/Event.vala" - _g_free0 (_tmp16_[_tmp17_]); -#line 585 "/home/jens/Source/shotwell/src/Event.vala" - _tmp16_[_tmp17_] = NULL; -#line 585 "/home/jens/Source/shotwell/src/Event.vala" - _tmp18_ = _tmp16_[_tmp17_]; -#line 586 "/home/jens/Source/shotwell/src/Event.vala" - _tmp19_ = components; -#line 586 "/home/jens/Source/shotwell/src/Event.vala" - _tmp19__length1 = components_length1; -#line 586 "/home/jens/Source/shotwell/src/Event.vala" - _tmp20_ = _vala_g_strjoinv (" ", _tmp19_, _tmp19__length1); -#line 586 "/home/jens/Source/shotwell/src/Event.vala" - _tmp21_ = _tmp20_; -#line 586 "/home/jens/Source/shotwell/src/Event.vala" - _tmp22_ = indexable_prepare_indexable_string (_tmp21_); -#line 586 "/home/jens/Source/shotwell/src/Event.vala" - _g_free0 (self->priv->indexable_keywords); -#line 586 "/home/jens/Source/shotwell/src/Event.vala" - self->priv->indexable_keywords = _tmp22_; -#line 586 "/home/jens/Source/shotwell/src/Event.vala" - _g_free0 (_tmp21_); -#line 5000 "Event.c" - } -#line 570 "/home/jens/Source/shotwell/src/Event.vala" - _g_free0 (comment); -#line 570 "/home/jens/Source/shotwell/src/Event.vala" - _g_free0 (rawname); -#line 570 "/home/jens/Source/shotwell/src/Event.vala" - components = (_vala_array_free (components, components_length1, (GDestroyNotify) g_free), NULL); -#line 5008 "Event.c" -} - - -static const gchar* -event_real_get_indexable_keywords (Indexable* base) -{ - Event * self; - const gchar* result = NULL; - const gchar* _tmp0_; -#line 590 "/home/jens/Source/shotwell/src/Event.vala" - self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_EVENT, Event); -#line 591 "/home/jens/Source/shotwell/src/Event.vala" - _tmp0_ = self->priv->indexable_keywords; -#line 591 "/home/jens/Source/shotwell/src/Event.vala" - result = _tmp0_; -#line 591 "/home/jens/Source/shotwell/src/Event.vala" - return result; -#line 5026 "Event.c" -} - - -static void -g_time_local (time_t time, - struct tm* result) -{ - struct tm _result_ = {0}; - struct tm _tmp0_ = {0}; -#line 2866 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" - localtime_r (&time, &_tmp0_); -#line 2866 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" - _result_ = _tmp0_; -#line 2867 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" - *result = _result_; -#line 2867 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" - return; -#line 5044 "Event.c" -} - - -gboolean -event_is_in_starting_day (Event* self, - time_t time) -{ - gboolean result = FALSE; - ViewCollection* _tmp0_; - MediaSource* earliest_media = NULL; - ViewCollection* _tmp1_; - DataObject* _tmp2_; - DataView* _tmp3_; - DataSource* _tmp4_; - MediaSource* _tmp5_; - struct tm earliest_tm = {0}; - MediaSource* _tmp6_; - struct tm _tmp7_ = {0}; - struct tm start_boundary_tm = {0}; - struct tm _tmp8_; - gint _tmp9_; - struct tm _tmp10_; - gint _tmp11_; - struct tm _tmp12_; - gint _tmp13_; - time_t start_boundary = 0; - struct tm _tmp14_; - gint _tmp15_; - time_t end_boundary = 0; - time_t _tmp17_; - gboolean _tmp18_ = FALSE; - time_t _tmp19_; -#line 594 "/home/jens/Source/shotwell/src/Event.vala" - g_return_val_if_fail (IS_EVENT (self), FALSE); -#line 599 "/home/jens/Source/shotwell/src/Event.vala" - _tmp0_ = self->priv->view; -#line 599 "/home/jens/Source/shotwell/src/Event.vala" - if (data_collection_get_count (G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, TYPE_DATA_COLLECTION, DataCollection)) == 0) { -#line 600 "/home/jens/Source/shotwell/src/Event.vala" - result = FALSE; -#line 600 "/home/jens/Source/shotwell/src/Event.vala" - return result; -#line 5087 "Event.c" - } -#line 603 "/home/jens/Source/shotwell/src/Event.vala" - _tmp1_ = self->priv->view; -#line 603 "/home/jens/Source/shotwell/src/Event.vala" - _tmp2_ = data_collection_get_at (G_TYPE_CHECK_INSTANCE_CAST (_tmp1_, TYPE_DATA_COLLECTION, DataCollection), 0); -#line 603 "/home/jens/Source/shotwell/src/Event.vala" - _tmp3_ = G_TYPE_CHECK_INSTANCE_CAST (_tmp2_, TYPE_DATA_VIEW, DataView); -#line 603 "/home/jens/Source/shotwell/src/Event.vala" - _tmp4_ = data_view_get_source (_tmp3_); -#line 603 "/home/jens/Source/shotwell/src/Event.vala" - _tmp5_ = G_TYPE_CHECK_INSTANCE_CAST (_tmp4_, TYPE_MEDIA_SOURCE, MediaSource); -#line 603 "/home/jens/Source/shotwell/src/Event.vala" - _g_object_unref0 (_tmp3_); -#line 603 "/home/jens/Source/shotwell/src/Event.vala" - earliest_media = _tmp5_; -#line 604 "/home/jens/Source/shotwell/src/Event.vala" - _tmp6_ = earliest_media; -#line 604 "/home/jens/Source/shotwell/src/Event.vala" - g_time_local (media_source_get_exposure_time (_tmp6_), &_tmp7_); -#line 604 "/home/jens/Source/shotwell/src/Event.vala" - earliest_tm = _tmp7_; -#line 607 "/home/jens/Source/shotwell/src/Event.vala" - memset (&start_boundary_tm, 0, sizeof (struct tm)); -#line 608 "/home/jens/Source/shotwell/src/Event.vala" - start_boundary_tm.tm_sec = 0; -#line 609 "/home/jens/Source/shotwell/src/Event.vala" - start_boundary_tm.tm_min = 0; -#line 610 "/home/jens/Source/shotwell/src/Event.vala" - start_boundary_tm.tm_hour = EVENT_EVENT_BOUNDARY_HOUR; -#line 611 "/home/jens/Source/shotwell/src/Event.vala" - _tmp8_ = earliest_tm; -#line 611 "/home/jens/Source/shotwell/src/Event.vala" - _tmp9_ = _tmp8_.tm_mday; -#line 611 "/home/jens/Source/shotwell/src/Event.vala" - start_boundary_tm.tm_mday = _tmp9_; -#line 612 "/home/jens/Source/shotwell/src/Event.vala" - _tmp10_ = earliest_tm; -#line 612 "/home/jens/Source/shotwell/src/Event.vala" - _tmp11_ = _tmp10_.tm_mon; -#line 612 "/home/jens/Source/shotwell/src/Event.vala" - start_boundary_tm.tm_mon = _tmp11_; -#line 613 "/home/jens/Source/shotwell/src/Event.vala" - _tmp12_ = earliest_tm; -#line 613 "/home/jens/Source/shotwell/src/Event.vala" - _tmp13_ = _tmp12_.tm_year; -#line 613 "/home/jens/Source/shotwell/src/Event.vala" - start_boundary_tm.tm_year = _tmp13_; -#line 614 "/home/jens/Source/shotwell/src/Event.vala" - start_boundary_tm.tm_isdst = -1; -#line 616 "/home/jens/Source/shotwell/src/Event.vala" - start_boundary = mktime (&start_boundary_tm); -#line 620 "/home/jens/Source/shotwell/src/Event.vala" - _tmp14_ = earliest_tm; -#line 620 "/home/jens/Source/shotwell/src/Event.vala" - _tmp15_ = _tmp14_.tm_hour; -#line 620 "/home/jens/Source/shotwell/src/Event.vala" - if (_tmp15_ < EVENT_EVENT_BOUNDARY_HOUR) { -#line 5145 "Event.c" - time_t _tmp16_; -#line 621 "/home/jens/Source/shotwell/src/Event.vala" - g_debug ("Event.vala:621: Hour before boundary, shifting back one day"); -#line 622 "/home/jens/Source/shotwell/src/Event.vala" - _tmp16_ = start_boundary; -#line 622 "/home/jens/Source/shotwell/src/Event.vala" - start_boundary = _tmp16_ - EVENT_TIME_T_DAY; -#line 5153 "Event.c" - } -#line 625 "/home/jens/Source/shotwell/src/Event.vala" - _tmp17_ = start_boundary; -#line 625 "/home/jens/Source/shotwell/src/Event.vala" - end_boundary = (_tmp17_ + EVENT_TIME_T_DAY) - 1; -#line 627 "/home/jens/Source/shotwell/src/Event.vala" - _tmp19_ = start_boundary; -#line 627 "/home/jens/Source/shotwell/src/Event.vala" - if (time >= _tmp19_) { -#line 5163 "Event.c" - time_t _tmp20_; -#line 627 "/home/jens/Source/shotwell/src/Event.vala" - _tmp20_ = end_boundary; -#line 627 "/home/jens/Source/shotwell/src/Event.vala" - _tmp18_ = time <= _tmp20_; -#line 5169 "Event.c" - } else { -#line 627 "/home/jens/Source/shotwell/src/Event.vala" - _tmp18_ = FALSE; -#line 5173 "Event.c" - } -#line 627 "/home/jens/Source/shotwell/src/Event.vala" - result = _tmp18_; -#line 627 "/home/jens/Source/shotwell/src/Event.vala" - _g_object_unref0 (earliest_media); -#line 627 "/home/jens/Source/shotwell/src/Event.vala" - return result; -#line 5181 "Event.c" -} - - -static Event* -event_generate_event (MediaSource* media, - ViewCollection* events_so_far, - const gchar* event_name, - gboolean* new_event) -{ - gboolean _vala_new_event = FALSE; - Event* result = NULL; - time_t exposure_time = 0; - gboolean _tmp0_ = FALSE; - time_t _tmp1_; - gint count = 0; - GError * _inner_error_ = NULL; -#line 633 "/home/jens/Source/shotwell/src/Event.vala" - g_return_val_if_fail (IS_MEDIA_SOURCE (media), NULL); -#line 633 "/home/jens/Source/shotwell/src/Event.vala" - g_return_val_if_fail (IS_VIEW_COLLECTION (events_so_far), NULL); -#line 635 "/home/jens/Source/shotwell/src/Event.vala" - exposure_time = media_source_get_exposure_time (media); -#line 637 "/home/jens/Source/shotwell/src/Event.vala" - _tmp1_ = exposure_time; -#line 637 "/home/jens/Source/shotwell/src/Event.vala" - if (_tmp1_ == ((time_t) 0)) { -#line 637 "/home/jens/Source/shotwell/src/Event.vala" - _tmp0_ = event_name == NULL; -#line 5210 "Event.c" - } else { -#line 637 "/home/jens/Source/shotwell/src/Event.vala" - _tmp0_ = FALSE; -#line 5214 "Event.c" - } -#line 637 "/home/jens/Source/shotwell/src/Event.vala" - if (_tmp0_) { -#line 5218 "Event.c" - gchar* _tmp2_; - gchar* _tmp3_; -#line 638 "/home/jens/Source/shotwell/src/Event.vala" - _tmp2_ = data_object_to_string (G_TYPE_CHECK_INSTANCE_CAST (media, TYPE_DATA_OBJECT, DataObject)); -#line 638 "/home/jens/Source/shotwell/src/Event.vala" - _tmp3_ = _tmp2_; -#line 638 "/home/jens/Source/shotwell/src/Event.vala" - g_debug ("Event.vala:638: Skipping event assignment to %s: no exposure time and " \ -"no event name", _tmp3_); -#line 638 "/home/jens/Source/shotwell/src/Event.vala" - _g_free0 (_tmp3_); -#line 639 "/home/jens/Source/shotwell/src/Event.vala" - _vala_new_event = FALSE; -#line 641 "/home/jens/Source/shotwell/src/Event.vala" - result = NULL; -#line 641 "/home/jens/Source/shotwell/src/Event.vala" - if (new_event) { -#line 641 "/home/jens/Source/shotwell/src/Event.vala" - *new_event = _vala_new_event; -#line 5237 "Event.c" - } -#line 641 "/home/jens/Source/shotwell/src/Event.vala" - return result; -#line 5241 "Event.c" - } -#line 644 "/home/jens/Source/shotwell/src/Event.vala" - count = data_collection_get_count (G_TYPE_CHECK_INSTANCE_CAST (events_so_far, TYPE_DATA_COLLECTION, DataCollection)); -#line 5245 "Event.c" - { - gint ctr = 0; -#line 645 "/home/jens/Source/shotwell/src/Event.vala" - ctr = 0; -#line 5250 "Event.c" - { - gboolean _tmp4_ = FALSE; -#line 645 "/home/jens/Source/shotwell/src/Event.vala" - _tmp4_ = TRUE; -#line 645 "/home/jens/Source/shotwell/src/Event.vala" - while (TRUE) { -#line 5257 "Event.c" - gint _tmp6_; - gint _tmp7_; - Event* event = NULL; - gint _tmp8_; - DataObject* _tmp9_; - EventView* _tmp10_; - DataSource* _tmp11_; - Event* _tmp12_; - gboolean _tmp13_ = FALSE; - gboolean _tmp14_ = FALSE; - gboolean _tmp15_ = FALSE; -#line 645 "/home/jens/Source/shotwell/src/Event.vala" - if (!_tmp4_) { -#line 5271 "Event.c" - gint _tmp5_; -#line 645 "/home/jens/Source/shotwell/src/Event.vala" - _tmp5_ = ctr; -#line 645 "/home/jens/Source/shotwell/src/Event.vala" - ctr = _tmp5_ + 1; -#line 5277 "Event.c" - } -#line 645 "/home/jens/Source/shotwell/src/Event.vala" - _tmp4_ = FALSE; -#line 645 "/home/jens/Source/shotwell/src/Event.vala" - _tmp6_ = ctr; -#line 645 "/home/jens/Source/shotwell/src/Event.vala" - _tmp7_ = count; -#line 645 "/home/jens/Source/shotwell/src/Event.vala" - if (!(_tmp6_ < _tmp7_)) { -#line 645 "/home/jens/Source/shotwell/src/Event.vala" - break; -#line 5289 "Event.c" - } -#line 646 "/home/jens/Source/shotwell/src/Event.vala" - _tmp8_ = ctr; -#line 646 "/home/jens/Source/shotwell/src/Event.vala" - _tmp9_ = data_collection_get_at (G_TYPE_CHECK_INSTANCE_CAST (events_so_far, TYPE_DATA_COLLECTION, DataCollection), _tmp8_); -#line 646 "/home/jens/Source/shotwell/src/Event.vala" - _tmp10_ = G_TYPE_CHECK_INSTANCE_CAST (_tmp9_, TYPE_EVENT_VIEW, EventView); -#line 646 "/home/jens/Source/shotwell/src/Event.vala" - _tmp11_ = data_view_get_source (G_TYPE_CHECK_INSTANCE_CAST (_tmp10_, TYPE_DATA_VIEW, DataView)); -#line 646 "/home/jens/Source/shotwell/src/Event.vala" - _tmp12_ = G_TYPE_CHECK_INSTANCE_CAST (_tmp11_, TYPE_EVENT, Event); -#line 646 "/home/jens/Source/shotwell/src/Event.vala" - _g_object_unref0 (_tmp10_); -#line 646 "/home/jens/Source/shotwell/src/Event.vala" - event = _tmp12_; -#line 648 "/home/jens/Source/shotwell/src/Event.vala" - if (event_name != NULL) { -#line 5307 "Event.c" - Event* _tmp16_; -#line 648 "/home/jens/Source/shotwell/src/Event.vala" - _tmp16_ = event; -#line 648 "/home/jens/Source/shotwell/src/Event.vala" - _tmp15_ = event_has_name (_tmp16_); -#line 5313 "Event.c" - } else { -#line 648 "/home/jens/Source/shotwell/src/Event.vala" - _tmp15_ = FALSE; -#line 5317 "Event.c" - } -#line 648 "/home/jens/Source/shotwell/src/Event.vala" - if (_tmp15_) { -#line 5321 "Event.c" - Event* _tmp17_; - gchar* _tmp18_; - gchar* _tmp19_; -#line 648 "/home/jens/Source/shotwell/src/Event.vala" - _tmp17_ = event; -#line 648 "/home/jens/Source/shotwell/src/Event.vala" - _tmp18_ = data_object_get_name (G_TYPE_CHECK_INSTANCE_CAST (_tmp17_, TYPE_DATA_OBJECT, DataObject)); -#line 648 "/home/jens/Source/shotwell/src/Event.vala" - _tmp19_ = _tmp18_; -#line 648 "/home/jens/Source/shotwell/src/Event.vala" - _tmp14_ = g_strcmp0 (event_name, _tmp19_) == 0; -#line 648 "/home/jens/Source/shotwell/src/Event.vala" - _g_free0 (_tmp19_); -#line 5335 "Event.c" - } else { -#line 648 "/home/jens/Source/shotwell/src/Event.vala" - _tmp14_ = FALSE; -#line 5339 "Event.c" - } -#line 648 "/home/jens/Source/shotwell/src/Event.vala" - if (_tmp14_) { -#line 648 "/home/jens/Source/shotwell/src/Event.vala" - _tmp13_ = TRUE; -#line 5345 "Event.c" - } else { - Event* _tmp20_; - time_t _tmp21_; -#line 649 "/home/jens/Source/shotwell/src/Event.vala" - _tmp20_ = event; -#line 649 "/home/jens/Source/shotwell/src/Event.vala" - _tmp21_ = exposure_time; -#line 649 "/home/jens/Source/shotwell/src/Event.vala" - _tmp13_ = event_is_in_starting_day (_tmp20_, _tmp21_); -#line 5355 "Event.c" - } -#line 648 "/home/jens/Source/shotwell/src/Event.vala" - if (_tmp13_) { -#line 650 "/home/jens/Source/shotwell/src/Event.vala" - _vala_new_event = FALSE; -#line 652 "/home/jens/Source/shotwell/src/Event.vala" - result = event; -#line 652 "/home/jens/Source/shotwell/src/Event.vala" - if (new_event) { -#line 652 "/home/jens/Source/shotwell/src/Event.vala" - *new_event = _vala_new_event; -#line 5367 "Event.c" - } -#line 652 "/home/jens/Source/shotwell/src/Event.vala" - return result; -#line 5371 "Event.c" - } -#line 645 "/home/jens/Source/shotwell/src/Event.vala" - _g_object_unref0 (event); -#line 5375 "Event.c" - } - } - } - { - EventRow* _tmp22_ = NULL; - EventTable* _tmp23_; - EventTable* _tmp24_; - gchar* _tmp25_; - gchar* _tmp26_; - EventRow* _tmp27_; - EventRow* _tmp28_; - Event* event = NULL; - Event* _tmp29_; - Event* _tmp31_; - EventView* _tmp32_; - EventView* _tmp33_; -#line 658 "/home/jens/Source/shotwell/src/Event.vala" - _tmp23_ = event_table_get_instance (); -#line 658 "/home/jens/Source/shotwell/src/Event.vala" - _tmp24_ = _tmp23_; -#line 658 "/home/jens/Source/shotwell/src/Event.vala" - _tmp25_ = data_source_get_source_id (G_TYPE_CHECK_INSTANCE_CAST (media, TYPE_DATA_SOURCE, DataSource)); -#line 658 "/home/jens/Source/shotwell/src/Event.vala" - _tmp26_ = _tmp25_; -#line 658 "/home/jens/Source/shotwell/src/Event.vala" - _tmp27_ = event_table_create (_tmp24_, _tmp26_, NULL, &_inner_error_); -#line 658 "/home/jens/Source/shotwell/src/Event.vala" - _tmp28_ = _tmp27_; -#line 658 "/home/jens/Source/shotwell/src/Event.vala" - _g_free0 (_tmp26_); -#line 658 "/home/jens/Source/shotwell/src/Event.vala" - _database_table_unref0 (_tmp24_); -#line 658 "/home/jens/Source/shotwell/src/Event.vala" - _tmp22_ = _tmp28_; -#line 658 "/home/jens/Source/shotwell/src/Event.vala" - if (G_UNLIKELY (_inner_error_ != NULL)) { -#line 658 "/home/jens/Source/shotwell/src/Event.vala" - if (_inner_error_->domain == DATABASE_ERROR) { -#line 5414 "Event.c" - goto __catch449_database_error; - } -#line 658 "/home/jens/Source/shotwell/src/Event.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 658 "/home/jens/Source/shotwell/src/Event.vala" - g_clear_error (&_inner_error_); -#line 658 "/home/jens/Source/shotwell/src/Event.vala" - return NULL; -#line 5423 "Event.c" - } -#line 658 "/home/jens/Source/shotwell/src/Event.vala" - _tmp29_ = event_new (_tmp22_, DATA_OBJECT_INVALID_OBJECT_ID); -#line 658 "/home/jens/Source/shotwell/src/Event.vala" - event = _tmp29_; -#line 659 "/home/jens/Source/shotwell/src/Event.vala" - if (event_name != NULL) { -#line 5431 "Event.c" - Event* _tmp30_; -#line 660 "/home/jens/Source/shotwell/src/Event.vala" - _tmp30_ = event; -#line 660 "/home/jens/Source/shotwell/src/Event.vala" - event_rename (_tmp30_, event_name); -#line 5437 "Event.c" - } -#line 662 "/home/jens/Source/shotwell/src/Event.vala" - _tmp31_ = event; -#line 662 "/home/jens/Source/shotwell/src/Event.vala" - _tmp32_ = event_view_new (G_TYPE_CHECK_INSTANCE_CAST (_tmp31_, TYPE_EVENT_SOURCE, EventSource)); -#line 662 "/home/jens/Source/shotwell/src/Event.vala" - _tmp33_ = _tmp32_; -#line 662 "/home/jens/Source/shotwell/src/Event.vala" - data_collection_add (G_TYPE_CHECK_INSTANCE_CAST (events_so_far, TYPE_DATA_COLLECTION, DataCollection), G_TYPE_CHECK_INSTANCE_CAST (_tmp33_, TYPE_DATA_OBJECT, DataObject)); -#line 662 "/home/jens/Source/shotwell/src/Event.vala" - _g_object_unref0 (_tmp33_); -#line 664 "/home/jens/Source/shotwell/src/Event.vala" - _vala_new_event = TRUE; -#line 665 "/home/jens/Source/shotwell/src/Event.vala" - result = event; -#line 665 "/home/jens/Source/shotwell/src/Event.vala" - _event_row_unref0 (_tmp22_); -#line 665 "/home/jens/Source/shotwell/src/Event.vala" - if (new_event) { -#line 665 "/home/jens/Source/shotwell/src/Event.vala" - *new_event = _vala_new_event; -#line 5459 "Event.c" - } -#line 665 "/home/jens/Source/shotwell/src/Event.vala" - return result; -#line 5463 "Event.c" - } - goto __finally449; - __catch449_database_error: - { - GError* err = NULL; - GError* _tmp34_; -#line 657 "/home/jens/Source/shotwell/src/Event.vala" - err = _inner_error_; -#line 657 "/home/jens/Source/shotwell/src/Event.vala" - _inner_error_ = NULL; -#line 667 "/home/jens/Source/shotwell/src/Event.vala" - _tmp34_ = err; -#line 667 "/home/jens/Source/shotwell/src/Event.vala" - app_window_database_error (_tmp34_); -#line 657 "/home/jens/Source/shotwell/src/Event.vala" - _g_error_free0 (err); -#line 5480 "Event.c" - } - __finally449: -#line 657 "/home/jens/Source/shotwell/src/Event.vala" - if (G_UNLIKELY (_inner_error_ != NULL)) { -#line 657 "/home/jens/Source/shotwell/src/Event.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 657 "/home/jens/Source/shotwell/src/Event.vala" - g_clear_error (&_inner_error_); -#line 657 "/home/jens/Source/shotwell/src/Event.vala" - return NULL; -#line 5491 "Event.c" - } -#line 670 "/home/jens/Source/shotwell/src/Event.vala" - _vala_new_event = FALSE; -#line 672 "/home/jens/Source/shotwell/src/Event.vala" - result = NULL; -#line 672 "/home/jens/Source/shotwell/src/Event.vala" - if (new_event) { -#line 672 "/home/jens/Source/shotwell/src/Event.vala" - *new_event = _vala_new_event; -#line 5501 "Event.c" - } -#line 672 "/home/jens/Source/shotwell/src/Event.vala" - return result; -#line 5505 "Event.c" -} - - -void -event_generate_single_event (MediaSource* media, - ViewCollection* events_so_far, - const gchar* event_name) -{ - Event* _tmp0_; - Event* _tmp1_; - gboolean _tmp2_; - gboolean new_event = FALSE; - Event* event = NULL; - gboolean _tmp3_ = FALSE; - Event* _tmp4_; - Event* _tmp5_; - Event* _tmp6_; - gboolean _tmp7_; -#line 675 "/home/jens/Source/shotwell/src/Event.vala" - g_return_if_fail (IS_MEDIA_SOURCE (media)); -#line 675 "/home/jens/Source/shotwell/src/Event.vala" - g_return_if_fail (IS_VIEW_COLLECTION (events_so_far)); -#line 678 "/home/jens/Source/shotwell/src/Event.vala" - _tmp0_ = media_source_get_event (media); -#line 678 "/home/jens/Source/shotwell/src/Event.vala" - _tmp1_ = _tmp0_; -#line 678 "/home/jens/Source/shotwell/src/Event.vala" - _tmp2_ = _tmp1_ != NULL; -#line 678 "/home/jens/Source/shotwell/src/Event.vala" - _g_object_unref0 (_tmp1_); -#line 678 "/home/jens/Source/shotwell/src/Event.vala" - if (_tmp2_) { -#line 679 "/home/jens/Source/shotwell/src/Event.vala" - return; -#line 5540 "Event.c" - } -#line 682 "/home/jens/Source/shotwell/src/Event.vala" - _tmp4_ = event_generate_event (media, events_so_far, event_name, &_tmp3_); -#line 682 "/home/jens/Source/shotwell/src/Event.vala" - new_event = _tmp3_; -#line 682 "/home/jens/Source/shotwell/src/Event.vala" - event = _tmp4_; -#line 683 "/home/jens/Source/shotwell/src/Event.vala" - _tmp5_ = event; -#line 683 "/home/jens/Source/shotwell/src/Event.vala" - if (_tmp5_ == NULL) { -#line 684 "/home/jens/Source/shotwell/src/Event.vala" - _g_object_unref0 (event); -#line 684 "/home/jens/Source/shotwell/src/Event.vala" - return; -#line 5556 "Event.c" - } -#line 686 "/home/jens/Source/shotwell/src/Event.vala" - _tmp6_ = event; -#line 686 "/home/jens/Source/shotwell/src/Event.vala" - media_source_set_event (media, _tmp6_); -#line 688 "/home/jens/Source/shotwell/src/Event.vala" - _tmp7_ = new_event; -#line 688 "/home/jens/Source/shotwell/src/Event.vala" - if (_tmp7_) { -#line 5566 "Event.c" - EventSourceCollection* _tmp8_; - Event* _tmp9_; -#line 689 "/home/jens/Source/shotwell/src/Event.vala" - _tmp8_ = event_global; -#line 689 "/home/jens/Source/shotwell/src/Event.vala" - _tmp9_ = event; -#line 689 "/home/jens/Source/shotwell/src/Event.vala" - data_collection_add (G_TYPE_CHECK_INSTANCE_CAST (_tmp8_, TYPE_DATA_COLLECTION, DataCollection), G_TYPE_CHECK_INSTANCE_CAST (_tmp9_, TYPE_DATA_OBJECT, DataObject)); -#line 5575 "Event.c" - } -#line 675 "/home/jens/Source/shotwell/src/Event.vala" - _g_object_unref0 (event); -#line 5579 "Event.c" -} - - -void -event_generate_many_events (GeeCollection* sources, - ViewCollection* events_so_far) -{ - GeeCollection* to_add = NULL; - GeeArrayList* _tmp0_; - GeeCollection* _tmp18_; - gint _tmp19_; - gint _tmp20_; -#line 692 "/home/jens/Source/shotwell/src/Event.vala" - g_return_if_fail (GEE_IS_COLLECTION (sources)); -#line 692 "/home/jens/Source/shotwell/src/Event.vala" - g_return_if_fail (IS_VIEW_COLLECTION (events_so_far)); -#line 693 "/home/jens/Source/shotwell/src/Event.vala" - _tmp0_ = gee_array_list_new (TYPE_EVENT, (GBoxedCopyFunc) g_object_ref, (GDestroyNotify) g_object_unref, NULL, NULL, NULL); -#line 693 "/home/jens/Source/shotwell/src/Event.vala" - to_add = G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, GEE_TYPE_COLLECTION, GeeCollection); -#line 5600 "Event.c" - { - GeeIterator* _media_it = NULL; - GeeIterator* _tmp1_; -#line 694 "/home/jens/Source/shotwell/src/Event.vala" - _tmp1_ = gee_iterable_iterator (G_TYPE_CHECK_INSTANCE_CAST (sources, GEE_TYPE_ITERABLE, GeeIterable)); -#line 694 "/home/jens/Source/shotwell/src/Event.vala" - _media_it = _tmp1_; -#line 694 "/home/jens/Source/shotwell/src/Event.vala" - while (TRUE) { -#line 5610 "Event.c" - GeeIterator* _tmp2_; - MediaSource* media = NULL; - GeeIterator* _tmp3_; - gpointer _tmp4_; - MediaSource* _tmp5_; - Event* _tmp6_; - Event* _tmp7_; - gboolean _tmp8_; - gboolean new_event = FALSE; - Event* event = NULL; - MediaSource* _tmp9_; - gboolean _tmp10_ = FALSE; - Event* _tmp11_; - Event* _tmp12_; - MediaSource* _tmp13_; - Event* _tmp14_; - gboolean _tmp15_; -#line 694 "/home/jens/Source/shotwell/src/Event.vala" - _tmp2_ = _media_it; -#line 694 "/home/jens/Source/shotwell/src/Event.vala" - if (!gee_iterator_next (_tmp2_)) { -#line 694 "/home/jens/Source/shotwell/src/Event.vala" - break; -#line 5634 "Event.c" - } -#line 694 "/home/jens/Source/shotwell/src/Event.vala" - _tmp3_ = _media_it; -#line 694 "/home/jens/Source/shotwell/src/Event.vala" - _tmp4_ = gee_iterator_get (_tmp3_); -#line 694 "/home/jens/Source/shotwell/src/Event.vala" - media = (MediaSource*) _tmp4_; -#line 696 "/home/jens/Source/shotwell/src/Event.vala" - _tmp5_ = media; -#line 696 "/home/jens/Source/shotwell/src/Event.vala" - _tmp6_ = media_source_get_event (_tmp5_); -#line 696 "/home/jens/Source/shotwell/src/Event.vala" - _tmp7_ = _tmp6_; -#line 696 "/home/jens/Source/shotwell/src/Event.vala" - _tmp8_ = _tmp7_ != NULL; -#line 696 "/home/jens/Source/shotwell/src/Event.vala" - _g_object_unref0 (_tmp7_); -#line 696 "/home/jens/Source/shotwell/src/Event.vala" - if (_tmp8_) { -#line 697 "/home/jens/Source/shotwell/src/Event.vala" - _g_object_unref0 (media); -#line 697 "/home/jens/Source/shotwell/src/Event.vala" - continue; -#line 5658 "Event.c" - } -#line 700 "/home/jens/Source/shotwell/src/Event.vala" - _tmp9_ = media; -#line 700 "/home/jens/Source/shotwell/src/Event.vala" - _tmp11_ = event_generate_event (_tmp9_, events_so_far, NULL, &_tmp10_); -#line 700 "/home/jens/Source/shotwell/src/Event.vala" - new_event = _tmp10_; -#line 700 "/home/jens/Source/shotwell/src/Event.vala" - event = _tmp11_; -#line 701 "/home/jens/Source/shotwell/src/Event.vala" - _tmp12_ = event; -#line 701 "/home/jens/Source/shotwell/src/Event.vala" - if (_tmp12_ == NULL) { -#line 702 "/home/jens/Source/shotwell/src/Event.vala" - _g_object_unref0 (event); -#line 702 "/home/jens/Source/shotwell/src/Event.vala" - _g_object_unref0 (media); -#line 702 "/home/jens/Source/shotwell/src/Event.vala" - continue; -#line 5678 "Event.c" - } -#line 704 "/home/jens/Source/shotwell/src/Event.vala" - _tmp13_ = media; -#line 704 "/home/jens/Source/shotwell/src/Event.vala" - _tmp14_ = event; -#line 704 "/home/jens/Source/shotwell/src/Event.vala" - media_source_set_event (_tmp13_, _tmp14_); -#line 706 "/home/jens/Source/shotwell/src/Event.vala" - _tmp15_ = new_event; -#line 706 "/home/jens/Source/shotwell/src/Event.vala" - if (_tmp15_) { -#line 5690 "Event.c" - GeeCollection* _tmp16_; - Event* _tmp17_; -#line 707 "/home/jens/Source/shotwell/src/Event.vala" - _tmp16_ = to_add; -#line 707 "/home/jens/Source/shotwell/src/Event.vala" - _tmp17_ = event; -#line 707 "/home/jens/Source/shotwell/src/Event.vala" - gee_collection_add (_tmp16_, _tmp17_); -#line 5699 "Event.c" - } -#line 694 "/home/jens/Source/shotwell/src/Event.vala" - _g_object_unref0 (event); -#line 694 "/home/jens/Source/shotwell/src/Event.vala" - _g_object_unref0 (media); -#line 5705 "Event.c" - } -#line 694 "/home/jens/Source/shotwell/src/Event.vala" - _g_object_unref0 (_media_it); -#line 5709 "Event.c" - } -#line 710 "/home/jens/Source/shotwell/src/Event.vala" - _tmp18_ = to_add; -#line 710 "/home/jens/Source/shotwell/src/Event.vala" - _tmp19_ = gee_collection_get_size (_tmp18_); -#line 710 "/home/jens/Source/shotwell/src/Event.vala" - _tmp20_ = _tmp19_; -#line 710 "/home/jens/Source/shotwell/src/Event.vala" - if (_tmp20_ > 0) { -#line 5719 "Event.c" - EventSourceCollection* _tmp21_; - GeeCollection* _tmp22_; - GeeCollection* _tmp23_; - GeeCollection* _tmp24_; -#line 711 "/home/jens/Source/shotwell/src/Event.vala" - _tmp21_ = event_global; -#line 711 "/home/jens/Source/shotwell/src/Event.vala" - _tmp22_ = to_add; -#line 711 "/home/jens/Source/shotwell/src/Event.vala" - _tmp23_ = data_collection_add_many (G_TYPE_CHECK_INSTANCE_CAST (_tmp21_, TYPE_DATA_COLLECTION, DataCollection), _tmp22_, NULL, NULL); -#line 711 "/home/jens/Source/shotwell/src/Event.vala" - _tmp24_ = _tmp23_; -#line 711 "/home/jens/Source/shotwell/src/Event.vala" - _g_object_unref0 (_tmp24_); -#line 5734 "Event.c" - } -#line 692 "/home/jens/Source/shotwell/src/Event.vala" - _g_object_unref0 (to_add); -#line 5738 "Event.c" -} - - -void -event_get_event_id (Event* self, - EventID* result) -{ - EventID _tmp0_; -#line 714 "/home/jens/Source/shotwell/src/Event.vala" - g_return_if_fail (IS_EVENT (self)); -#line 715 "/home/jens/Source/shotwell/src/Event.vala" - _tmp0_ = self->priv->event_id; -#line 715 "/home/jens/Source/shotwell/src/Event.vala" - *result = _tmp0_; -#line 715 "/home/jens/Source/shotwell/src/Event.vala" - return; -#line 5755 "Event.c" -} - - -static SourceSnapshot* -event_real_save_snapshot (DataSource* base) -{ - Event * self; - SourceSnapshot* result = NULL; - EventEventSnapshot* _tmp0_; -#line 718 "/home/jens/Source/shotwell/src/Event.vala" - self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_EVENT, Event); -#line 719 "/home/jens/Source/shotwell/src/Event.vala" - _tmp0_ = event_event_snapshot_new (self); -#line 719 "/home/jens/Source/shotwell/src/Event.vala" - result = G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, TYPE_SOURCE_SNAPSHOT, SourceSnapshot); -#line 719 "/home/jens/Source/shotwell/src/Event.vala" - return result; -#line 5773 "Event.c" -} - - -static SourceProxy* -event_real_get_proxy (Proxyable* base) -{ - Event * self; - SourceProxy* result = NULL; - EventEventProxy* _tmp0_; -#line 722 "/home/jens/Source/shotwell/src/Event.vala" - self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_EVENT, Event); -#line 723 "/home/jens/Source/shotwell/src/Event.vala" - _tmp0_ = event_event_proxy_new (self); -#line 723 "/home/jens/Source/shotwell/src/Event.vala" - result = G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, TYPE_SOURCE_PROXY, SourceProxy); -#line 723 "/home/jens/Source/shotwell/src/Event.vala" - return result; -#line 5791 "Event.c" -} - - -static gboolean -event_real_equals (DataSource* base, - DataSource* source) -{ - Event * self; - gboolean result = FALSE; - Event* event = NULL; - Event* _tmp0_; - Event* _tmp1_; -#line 726 "/home/jens/Source/shotwell/src/Event.vala" - self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_EVENT, Event); -#line 726 "/home/jens/Source/shotwell/src/Event.vala" - g_return_val_if_fail ((source == NULL) || IS_DATA_SOURCE (source), FALSE); -#line 728 "/home/jens/Source/shotwell/src/Event.vala" - _tmp0_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_TYPE (source, TYPE_EVENT) ? ((Event*) source) : NULL); -#line 728 "/home/jens/Source/shotwell/src/Event.vala" - event = _tmp0_; -#line 729 "/home/jens/Source/shotwell/src/Event.vala" - _tmp1_ = event; -#line 729 "/home/jens/Source/shotwell/src/Event.vala" - if (_tmp1_ != NULL) { -#line 5816 "Event.c" - Event* _tmp2_; -#line 730 "/home/jens/Source/shotwell/src/Event.vala" - _tmp2_ = event; -#line 730 "/home/jens/Source/shotwell/src/Event.vala" - if (self != _tmp2_) { -#line 5822 "Event.c" - EventID _tmp3_; - gint64 _tmp4_; - Event* _tmp5_; - EventID _tmp6_; - gint64 _tmp7_; -#line 731 "/home/jens/Source/shotwell/src/Event.vala" - _tmp3_ = self->priv->event_id; -#line 731 "/home/jens/Source/shotwell/src/Event.vala" - _tmp4_ = _tmp3_.id; -#line 731 "/home/jens/Source/shotwell/src/Event.vala" - _tmp5_ = event; -#line 731 "/home/jens/Source/shotwell/src/Event.vala" - _tmp6_ = _tmp5_->priv->event_id; -#line 731 "/home/jens/Source/shotwell/src/Event.vala" - _tmp7_ = _tmp6_.id; -#line 731 "/home/jens/Source/shotwell/src/Event.vala" - _vala_assert (_tmp4_ != _tmp7_, "event_id.id != event.event_id.id"); -#line 5840 "Event.c" - } - } -#line 735 "/home/jens/Source/shotwell/src/Event.vala" - result = DATA_SOURCE_CLASS (event_parent_class)->equals (G_TYPE_CHECK_INSTANCE_CAST (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_EVENT_SOURCE, EventSource), TYPE_DATA_SOURCE, DataSource), source); -#line 735 "/home/jens/Source/shotwell/src/Event.vala" - _g_object_unref0 (event); -#line 735 "/home/jens/Source/shotwell/src/Event.vala" - return result; -#line 5849 "Event.c" -} - - -static gchar* -event_real_to_string (DataObject* base) -{ - Event * self; - gchar* result = NULL; - EventID _tmp0_; - gint64 _tmp1_; - gchar* _tmp2_; - gchar* _tmp3_; - gchar* _tmp4_; - gchar* _tmp5_; - gchar* _tmp6_; - gchar* _tmp7_; - gchar* _tmp8_; - gchar* _tmp9_; -#line 738 "/home/jens/Source/shotwell/src/Event.vala" - self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_EVENT, Event); -#line 739 "/home/jens/Source/shotwell/src/Event.vala" - _tmp0_ = self->priv->event_id; -#line 739 "/home/jens/Source/shotwell/src/Event.vala" - _tmp1_ = _tmp0_.id; -#line 739 "/home/jens/Source/shotwell/src/Event.vala" - _tmp2_ = g_strdup_printf ("%" G_GINT64_FORMAT, _tmp1_); -#line 739 "/home/jens/Source/shotwell/src/Event.vala" - _tmp3_ = _tmp2_; -#line 739 "/home/jens/Source/shotwell/src/Event.vala" - _tmp4_ = g_strdup_printf ("%" G_GINT64_FORMAT, data_object_get_object_id (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_DATA_OBJECT, DataObject))); -#line 739 "/home/jens/Source/shotwell/src/Event.vala" - _tmp5_ = _tmp4_; -#line 739 "/home/jens/Source/shotwell/src/Event.vala" - _tmp6_ = data_object_get_name (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_DATA_OBJECT, DataObject)); -#line 739 "/home/jens/Source/shotwell/src/Event.vala" - _tmp7_ = _tmp6_; -#line 739 "/home/jens/Source/shotwell/src/Event.vala" - _tmp8_ = g_strdup_printf ("Event [%s/%s] %s", _tmp3_, _tmp5_, _tmp7_); -#line 739 "/home/jens/Source/shotwell/src/Event.vala" - _tmp9_ = _tmp8_; -#line 739 "/home/jens/Source/shotwell/src/Event.vala" - _g_free0 (_tmp7_); -#line 739 "/home/jens/Source/shotwell/src/Event.vala" - _g_free0 (_tmp5_); -#line 739 "/home/jens/Source/shotwell/src/Event.vala" - _g_free0 (_tmp3_); -#line 739 "/home/jens/Source/shotwell/src/Event.vala" - result = _tmp9_; -#line 739 "/home/jens/Source/shotwell/src/Event.vala" - return result; -#line 5900 "Event.c" -} - - -gboolean -event_has_name (Event* self) -{ - gboolean result = FALSE; - gboolean _tmp0_ = FALSE; - const gchar* _tmp1_; -#line 742 "/home/jens/Source/shotwell/src/Event.vala" - g_return_val_if_fail (IS_EVENT (self), FALSE); -#line 743 "/home/jens/Source/shotwell/src/Event.vala" - _tmp1_ = self->priv->raw_name; -#line 743 "/home/jens/Source/shotwell/src/Event.vala" - if (_tmp1_ != NULL) { -#line 5916 "Event.c" - const gchar* _tmp2_; - gint _tmp3_; - gint _tmp4_; -#line 743 "/home/jens/Source/shotwell/src/Event.vala" - _tmp2_ = self->priv->raw_name; -#line 743 "/home/jens/Source/shotwell/src/Event.vala" - _tmp3_ = strlen (_tmp2_); -#line 743 "/home/jens/Source/shotwell/src/Event.vala" - _tmp4_ = _tmp3_; -#line 743 "/home/jens/Source/shotwell/src/Event.vala" - _tmp0_ = _tmp4_ > 0; -#line 5928 "Event.c" - } else { -#line 743 "/home/jens/Source/shotwell/src/Event.vala" - _tmp0_ = FALSE; -#line 5932 "Event.c" - } -#line 743 "/home/jens/Source/shotwell/src/Event.vala" - result = _tmp0_; -#line 743 "/home/jens/Source/shotwell/src/Event.vala" - return result; -#line 5938 "Event.c" -} - - -static gchar* -event_real_get_name (DataObject* base) -{ - Event * self; - gchar* result = NULL; - gchar* datestring = NULL; - gchar* _tmp1_; - gchar* _tmp2_ = NULL; - const gchar* _tmp3_; -#line 746 "/home/jens/Source/shotwell/src/Event.vala" - self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_EVENT, Event); -#line 747 "/home/jens/Source/shotwell/src/Event.vala" - if (event_has_name (self)) { -#line 5955 "Event.c" - gchar* _tmp0_; -#line 748 "/home/jens/Source/shotwell/src/Event.vala" - _tmp0_ = event_get_raw_name (self); -#line 748 "/home/jens/Source/shotwell/src/Event.vala" - result = _tmp0_; -#line 748 "/home/jens/Source/shotwell/src/Event.vala" - return result; -#line 5963 "Event.c" - } -#line 751 "/home/jens/Source/shotwell/src/Event.vala" - _tmp1_ = event_get_formatted_daterange (self); -#line 751 "/home/jens/Source/shotwell/src/Event.vala" - datestring = _tmp1_; -#line 753 "/home/jens/Source/shotwell/src/Event.vala" - _tmp3_ = datestring; -#line 753 "/home/jens/Source/shotwell/src/Event.vala" - if (!is_string_empty (_tmp3_)) { -#line 5973 "Event.c" - const gchar* _tmp4_; - gchar* _tmp5_; -#line 753 "/home/jens/Source/shotwell/src/Event.vala" - _tmp4_ = datestring; -#line 753 "/home/jens/Source/shotwell/src/Event.vala" - _tmp5_ = g_strdup (_tmp4_); -#line 753 "/home/jens/Source/shotwell/src/Event.vala" - _g_free0 (_tmp2_); -#line 753 "/home/jens/Source/shotwell/src/Event.vala" - _tmp2_ = _tmp5_; -#line 5984 "Event.c" - } else { - EventID _tmp6_; - gint64 _tmp7_; - gchar* _tmp8_; - gchar* _tmp9_; - gchar* _tmp10_; -#line 753 "/home/jens/Source/shotwell/src/Event.vala" - _tmp6_ = self->priv->event_id; -#line 753 "/home/jens/Source/shotwell/src/Event.vala" - _tmp7_ = _tmp6_.id; -#line 753 "/home/jens/Source/shotwell/src/Event.vala" - _tmp8_ = g_strdup_printf ("%" G_GINT64_FORMAT, _tmp7_); -#line 753 "/home/jens/Source/shotwell/src/Event.vala" - _tmp9_ = _tmp8_; -#line 753 "/home/jens/Source/shotwell/src/Event.vala" - _tmp10_ = g_strdup_printf (_ ("Event %s"), _tmp9_); -#line 753 "/home/jens/Source/shotwell/src/Event.vala" - _g_free0 (_tmp2_); -#line 753 "/home/jens/Source/shotwell/src/Event.vala" - _tmp2_ = _tmp10_; -#line 753 "/home/jens/Source/shotwell/src/Event.vala" - _g_free0 (_tmp9_); -#line 6007 "Event.c" - } -#line 753 "/home/jens/Source/shotwell/src/Event.vala" - result = _tmp2_; -#line 753 "/home/jens/Source/shotwell/src/Event.vala" - _g_free0 (datestring); -#line 753 "/home/jens/Source/shotwell/src/Event.vala" - return result; -#line 6015 "Event.c" -} - - -gchar* -event_get_formatted_daterange (Event* self) -{ - gchar* result = NULL; - time_t start_time = 0; - time_t end_time = 0; - gboolean _tmp0_ = FALSE; - time_t _tmp1_; - gboolean _tmp3_ = FALSE; - time_t _tmp4_; - struct tm start = {0}; - time_t _tmp9_; - struct tm _tmp10_ = {0}; - struct tm end = {0}; - time_t _tmp11_; - struct tm _tmp12_ = {0}; - gboolean _tmp13_ = FALSE; - gboolean _tmp14_ = FALSE; - struct tm _tmp15_; - gint _tmp16_; - struct tm _tmp17_; - gint _tmp18_; - struct tm _tmp30_; - struct tm _tmp31_; - gchar* _tmp32_; -#line 756 "/home/jens/Source/shotwell/src/Event.vala" - g_return_val_if_fail (IS_EVENT (self), NULL); -#line 757 "/home/jens/Source/shotwell/src/Event.vala" - start_time = event_source_get_start_time (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_EVENT_SOURCE, EventSource)); -#line 758 "/home/jens/Source/shotwell/src/Event.vala" - end_time = event_source_get_end_time (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_EVENT_SOURCE, EventSource)); -#line 760 "/home/jens/Source/shotwell/src/Event.vala" - _tmp1_ = end_time; -#line 760 "/home/jens/Source/shotwell/src/Event.vala" - if (_tmp1_ == ((time_t) 0)) { -#line 6054 "Event.c" - time_t _tmp2_; -#line 760 "/home/jens/Source/shotwell/src/Event.vala" - _tmp2_ = start_time; -#line 760 "/home/jens/Source/shotwell/src/Event.vala" - _tmp0_ = _tmp2_ == ((time_t) 0); -#line 6060 "Event.c" - } else { -#line 760 "/home/jens/Source/shotwell/src/Event.vala" - _tmp0_ = FALSE; -#line 6064 "Event.c" - } -#line 760 "/home/jens/Source/shotwell/src/Event.vala" - if (_tmp0_) { -#line 761 "/home/jens/Source/shotwell/src/Event.vala" - result = NULL; -#line 761 "/home/jens/Source/shotwell/src/Event.vala" - return result; -#line 6072 "Event.c" - } -#line 763 "/home/jens/Source/shotwell/src/Event.vala" - _tmp4_ = end_time; -#line 763 "/home/jens/Source/shotwell/src/Event.vala" - if (_tmp4_ == ((time_t) 0)) { -#line 6078 "Event.c" - time_t _tmp5_; -#line 763 "/home/jens/Source/shotwell/src/Event.vala" - _tmp5_ = start_time; -#line 763 "/home/jens/Source/shotwell/src/Event.vala" - _tmp3_ = _tmp5_ != ((time_t) 0); -#line 6084 "Event.c" - } else { -#line 763 "/home/jens/Source/shotwell/src/Event.vala" - _tmp3_ = FALSE; -#line 6088 "Event.c" - } -#line 763 "/home/jens/Source/shotwell/src/Event.vala" - if (_tmp3_) { -#line 6092 "Event.c" - time_t _tmp6_; - struct tm _tmp7_ = {0}; - gchar* _tmp8_; -#line 764 "/home/jens/Source/shotwell/src/Event.vala" - _tmp6_ = start_time; -#line 764 "/home/jens/Source/shotwell/src/Event.vala" - g_time_local (_tmp6_, &_tmp7_); -#line 764 "/home/jens/Source/shotwell/src/Event.vala" - _tmp8_ = format_local_date (&_tmp7_); -#line 764 "/home/jens/Source/shotwell/src/Event.vala" - result = _tmp8_; -#line 764 "/home/jens/Source/shotwell/src/Event.vala" - return result; -#line 6106 "Event.c" - } -#line 766 "/home/jens/Source/shotwell/src/Event.vala" - _tmp9_ = start_time; -#line 766 "/home/jens/Source/shotwell/src/Event.vala" - g_time_local (_tmp9_, &_tmp10_); -#line 766 "/home/jens/Source/shotwell/src/Event.vala" - start = _tmp10_; -#line 767 "/home/jens/Source/shotwell/src/Event.vala" - _tmp11_ = end_time; -#line 767 "/home/jens/Source/shotwell/src/Event.vala" - g_time_local (_tmp11_, &_tmp12_); -#line 767 "/home/jens/Source/shotwell/src/Event.vala" - end = _tmp12_; -#line 769 "/home/jens/Source/shotwell/src/Event.vala" - _tmp15_ = start; -#line 769 "/home/jens/Source/shotwell/src/Event.vala" - _tmp16_ = _tmp15_.tm_mday; -#line 769 "/home/jens/Source/shotwell/src/Event.vala" - _tmp17_ = end; -#line 769 "/home/jens/Source/shotwell/src/Event.vala" - _tmp18_ = _tmp17_.tm_mday; -#line 769 "/home/jens/Source/shotwell/src/Event.vala" - if (_tmp16_ == _tmp18_) { -#line 6130 "Event.c" - struct tm _tmp19_; - gint _tmp20_; - struct tm _tmp21_; - gint _tmp22_; -#line 769 "/home/jens/Source/shotwell/src/Event.vala" - _tmp19_ = start; -#line 769 "/home/jens/Source/shotwell/src/Event.vala" - _tmp20_ = _tmp19_.tm_mon; -#line 769 "/home/jens/Source/shotwell/src/Event.vala" - _tmp21_ = end; -#line 769 "/home/jens/Source/shotwell/src/Event.vala" - _tmp22_ = _tmp21_.tm_mon; -#line 769 "/home/jens/Source/shotwell/src/Event.vala" - _tmp14_ = _tmp20_ == _tmp22_; -#line 6145 "Event.c" - } else { -#line 769 "/home/jens/Source/shotwell/src/Event.vala" - _tmp14_ = FALSE; -#line 6149 "Event.c" - } -#line 769 "/home/jens/Source/shotwell/src/Event.vala" - if (_tmp14_) { -#line 6153 "Event.c" - struct tm _tmp23_; - gint _tmp24_; - struct tm _tmp25_; - gint _tmp26_; -#line 769 "/home/jens/Source/shotwell/src/Event.vala" - _tmp23_ = start; -#line 769 "/home/jens/Source/shotwell/src/Event.vala" - _tmp24_ = _tmp23_.tm_mday; -#line 769 "/home/jens/Source/shotwell/src/Event.vala" - _tmp25_ = end; -#line 769 "/home/jens/Source/shotwell/src/Event.vala" - _tmp26_ = _tmp25_.tm_mday; -#line 769 "/home/jens/Source/shotwell/src/Event.vala" - _tmp13_ = _tmp24_ == _tmp26_; -#line 6168 "Event.c" - } else { -#line 769 "/home/jens/Source/shotwell/src/Event.vala" - _tmp13_ = FALSE; -#line 6172 "Event.c" - } -#line 769 "/home/jens/Source/shotwell/src/Event.vala" - if (_tmp13_) { -#line 6176 "Event.c" - time_t _tmp27_; - struct tm _tmp28_ = {0}; - gchar* _tmp29_; -#line 770 "/home/jens/Source/shotwell/src/Event.vala" - _tmp27_ = start_time; -#line 770 "/home/jens/Source/shotwell/src/Event.vala" - g_time_local (_tmp27_, &_tmp28_); -#line 770 "/home/jens/Source/shotwell/src/Event.vala" - _tmp29_ = format_local_date (&_tmp28_); -#line 770 "/home/jens/Source/shotwell/src/Event.vala" - result = _tmp29_; -#line 770 "/home/jens/Source/shotwell/src/Event.vala" - return result; -#line 6190 "Event.c" - } -#line 772 "/home/jens/Source/shotwell/src/Event.vala" - _tmp30_ = start; -#line 772 "/home/jens/Source/shotwell/src/Event.vala" - _tmp31_ = end; -#line 772 "/home/jens/Source/shotwell/src/Event.vala" - _tmp32_ = format_local_datespan (&_tmp30_, &_tmp31_); -#line 772 "/home/jens/Source/shotwell/src/Event.vala" - result = _tmp32_; -#line 772 "/home/jens/Source/shotwell/src/Event.vala" - return result; -#line 6202 "Event.c" -} - - -gchar* -event_get_raw_name (Event* self) -{ - gchar* result = NULL; - const gchar* _tmp0_; - gchar* _tmp1_; -#line 775 "/home/jens/Source/shotwell/src/Event.vala" - g_return_val_if_fail (IS_EVENT (self), NULL); -#line 776 "/home/jens/Source/shotwell/src/Event.vala" - _tmp0_ = self->priv->raw_name; -#line 776 "/home/jens/Source/shotwell/src/Event.vala" - _tmp1_ = g_strdup (_tmp0_); -#line 776 "/home/jens/Source/shotwell/src/Event.vala" - result = _tmp1_; -#line 776 "/home/jens/Source/shotwell/src/Event.vala" - return result; -#line 6222 "Event.c" -} - - -static gchar* -event_real_get_comment (EventSource* base) -{ - Event * self; - gchar* result = NULL; - const gchar* _tmp0_; - gchar* _tmp1_; -#line 779 "/home/jens/Source/shotwell/src/Event.vala" - self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_EVENT, Event); -#line 780 "/home/jens/Source/shotwell/src/Event.vala" - _tmp0_ = self->priv->comment; -#line 780 "/home/jens/Source/shotwell/src/Event.vala" - _tmp1_ = g_strdup (_tmp0_); -#line 780 "/home/jens/Source/shotwell/src/Event.vala" - result = _tmp1_; -#line 780 "/home/jens/Source/shotwell/src/Event.vala" - return result; -#line 6243 "Event.c" -} - - -gboolean -event_rename (Event* self, - const gchar* name) -{ - gboolean result = FALSE; - gchar* new_name = NULL; - gchar* _tmp0_; - const gchar* _tmp1_; - gchar* _tmp2_; - gchar* _tmp3_; - gboolean _tmp4_; - gboolean renamed = FALSE; - EventTable* _tmp6_; - EventID _tmp7_; - const gchar* _tmp8_; - gboolean _tmp9_; -#line 783 "/home/jens/Source/shotwell/src/Event.vala" - g_return_val_if_fail (IS_EVENT (self), FALSE); -#line 784 "/home/jens/Source/shotwell/src/Event.vala" - _tmp0_ = event_prep_event_name (name); -#line 784 "/home/jens/Source/shotwell/src/Event.vala" - new_name = _tmp0_; -#line 787 "/home/jens/Source/shotwell/src/Event.vala" - _tmp1_ = new_name; -#line 787 "/home/jens/Source/shotwell/src/Event.vala" - _tmp2_ = event_get_formatted_daterange (self); -#line 787 "/home/jens/Source/shotwell/src/Event.vala" - _tmp3_ = _tmp2_; -#line 787 "/home/jens/Source/shotwell/src/Event.vala" - _tmp4_ = g_strcmp0 (_tmp1_, _tmp3_) == 0; -#line 787 "/home/jens/Source/shotwell/src/Event.vala" - _g_free0 (_tmp3_); -#line 787 "/home/jens/Source/shotwell/src/Event.vala" - if (_tmp4_) { -#line 6281 "Event.c" - gchar* _tmp5_; -#line 788 "/home/jens/Source/shotwell/src/Event.vala" - _tmp5_ = g_strdup (""); -#line 788 "/home/jens/Source/shotwell/src/Event.vala" - _g_free0 (new_name); -#line 788 "/home/jens/Source/shotwell/src/Event.vala" - new_name = _tmp5_; -#line 6289 "Event.c" - } -#line 791 "/home/jens/Source/shotwell/src/Event.vala" - _tmp6_ = event_event_table; -#line 791 "/home/jens/Source/shotwell/src/Event.vala" - _tmp7_ = self->priv->event_id; -#line 791 "/home/jens/Source/shotwell/src/Event.vala" - _tmp8_ = new_name; -#line 791 "/home/jens/Source/shotwell/src/Event.vala" - renamed = event_table_rename (_tmp6_, &_tmp7_, _tmp8_); -#line 792 "/home/jens/Source/shotwell/src/Event.vala" - _tmp9_ = renamed; -#line 792 "/home/jens/Source/shotwell/src/Event.vala" - if (_tmp9_) { -#line 6303 "Event.c" - const gchar* _tmp10_; - gchar* _tmp11_; - Alteration* _tmp12_; - Alteration* _tmp13_; -#line 793 "/home/jens/Source/shotwell/src/Event.vala" - _tmp10_ = new_name; -#line 793 "/home/jens/Source/shotwell/src/Event.vala" - _tmp11_ = g_strdup (_tmp10_); -#line 793 "/home/jens/Source/shotwell/src/Event.vala" - _g_free0 (self->priv->raw_name); -#line 793 "/home/jens/Source/shotwell/src/Event.vala" - self->priv->raw_name = _tmp11_; -#line 794 "/home/jens/Source/shotwell/src/Event.vala" - event_update_indexable_keywords (self); -#line 795 "/home/jens/Source/shotwell/src/Event.vala" - _tmp12_ = alteration_new_from_list ("metadata:name, indexable:keywords"); -#line 795 "/home/jens/Source/shotwell/src/Event.vala" - _tmp13_ = _tmp12_; -#line 795 "/home/jens/Source/shotwell/src/Event.vala" - data_object_notify_altered (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_DATA_OBJECT, DataObject), _tmp13_); -#line 795 "/home/jens/Source/shotwell/src/Event.vala" - _alteration_unref0 (_tmp13_); -#line 6326 "Event.c" - } -#line 798 "/home/jens/Source/shotwell/src/Event.vala" - result = renamed; -#line 798 "/home/jens/Source/shotwell/src/Event.vala" - _g_free0 (new_name); -#line 798 "/home/jens/Source/shotwell/src/Event.vala" - return result; -#line 6334 "Event.c" -} - - -static gboolean -event_real_set_comment (EventSource* base, - const gchar* comment) -{ - Event * self; - gboolean result = FALSE; - gchar* new_comment = NULL; - gchar* _tmp0_; - gboolean committed = FALSE; - EventTable* _tmp1_; - EventID _tmp2_; - const gchar* _tmp3_; - gboolean _tmp4_; -#line 801 "/home/jens/Source/shotwell/src/Event.vala" - self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_EVENT, Event); -#line 802 "/home/jens/Source/shotwell/src/Event.vala" - _tmp0_ = media_source_prep_comment (comment); -#line 802 "/home/jens/Source/shotwell/src/Event.vala" - new_comment = _tmp0_; -#line 804 "/home/jens/Source/shotwell/src/Event.vala" - _tmp1_ = event_event_table; -#line 804 "/home/jens/Source/shotwell/src/Event.vala" - _tmp2_ = self->priv->event_id; -#line 804 "/home/jens/Source/shotwell/src/Event.vala" - _tmp3_ = new_comment; -#line 804 "/home/jens/Source/shotwell/src/Event.vala" - committed = event_table_set_comment (_tmp1_, &_tmp2_, _tmp3_); -#line 805 "/home/jens/Source/shotwell/src/Event.vala" - _tmp4_ = committed; -#line 805 "/home/jens/Source/shotwell/src/Event.vala" - if (_tmp4_) { -#line 6369 "Event.c" - const gchar* _tmp5_; - gchar* _tmp6_; - Alteration* _tmp7_; - Alteration* _tmp8_; -#line 806 "/home/jens/Source/shotwell/src/Event.vala" - _tmp5_ = new_comment; -#line 806 "/home/jens/Source/shotwell/src/Event.vala" - _tmp6_ = g_strdup (_tmp5_); -#line 806 "/home/jens/Source/shotwell/src/Event.vala" - _g_free0 (self->priv->comment); -#line 806 "/home/jens/Source/shotwell/src/Event.vala" - self->priv->comment = _tmp6_; -#line 807 "/home/jens/Source/shotwell/src/Event.vala" - event_update_indexable_keywords (self); -#line 808 "/home/jens/Source/shotwell/src/Event.vala" - _tmp7_ = alteration_new_from_list ("metadata:comment, indexable:keywords"); -#line 808 "/home/jens/Source/shotwell/src/Event.vala" - _tmp8_ = _tmp7_; -#line 808 "/home/jens/Source/shotwell/src/Event.vala" - data_object_notify_altered (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_DATA_OBJECT, DataObject), _tmp8_); -#line 808 "/home/jens/Source/shotwell/src/Event.vala" - _alteration_unref0 (_tmp8_); -#line 6392 "Event.c" - } -#line 811 "/home/jens/Source/shotwell/src/Event.vala" - result = committed; -#line 811 "/home/jens/Source/shotwell/src/Event.vala" - _g_free0 (new_comment); -#line 811 "/home/jens/Source/shotwell/src/Event.vala" - return result; -#line 6400 "Event.c" -} - - -time_t -event_get_creation_time (Event* self) -{ - time_t result = 0; - EventTable* _tmp0_; - EventID _tmp1_; -#line 814 "/home/jens/Source/shotwell/src/Event.vala" - g_return_val_if_fail (IS_EVENT (self), 0); -#line 815 "/home/jens/Source/shotwell/src/Event.vala" - _tmp0_ = event_event_table; -#line 815 "/home/jens/Source/shotwell/src/Event.vala" - _tmp1_ = self->priv->event_id; -#line 815 "/home/jens/Source/shotwell/src/Event.vala" - result = event_table_get_time_created (_tmp0_, &_tmp1_); -#line 815 "/home/jens/Source/shotwell/src/Event.vala" - return result; -#line 6420 "Event.c" -} - - -static time_t -event_real_get_start_time (EventSource* base) -{ - Event * self; - time_t result = 0; - gint count = 0; - ViewCollection* _tmp0_; -#line 818 "/home/jens/Source/shotwell/src/Event.vala" - self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_EVENT, Event); -#line 821 "/home/jens/Source/shotwell/src/Event.vala" - _tmp0_ = self->priv->view; -#line 821 "/home/jens/Source/shotwell/src/Event.vala" - count = data_collection_get_count (G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, TYPE_DATA_COLLECTION, DataCollection)); -#line 6437 "Event.c" - { - gint i = 0; -#line 822 "/home/jens/Source/shotwell/src/Event.vala" - i = 0; -#line 6442 "Event.c" - { - gboolean _tmp1_ = FALSE; -#line 822 "/home/jens/Source/shotwell/src/Event.vala" - _tmp1_ = TRUE; -#line 822 "/home/jens/Source/shotwell/src/Event.vala" - while (TRUE) { -#line 6449 "Event.c" - gint _tmp3_; - gint _tmp4_; - time_t time = 0; - ViewCollection* _tmp5_; - gint _tmp6_; - DataObject* _tmp7_; - DataView* _tmp8_; - DataSource* _tmp9_; - MediaSource* _tmp10_; - time_t _tmp11_; - time_t _tmp12_; -#line 822 "/home/jens/Source/shotwell/src/Event.vala" - if (!_tmp1_) { -#line 6463 "Event.c" - gint _tmp2_; -#line 822 "/home/jens/Source/shotwell/src/Event.vala" - _tmp2_ = i; -#line 822 "/home/jens/Source/shotwell/src/Event.vala" - i = _tmp2_ + 1; -#line 6469 "Event.c" - } -#line 822 "/home/jens/Source/shotwell/src/Event.vala" - _tmp1_ = FALSE; -#line 822 "/home/jens/Source/shotwell/src/Event.vala" - _tmp3_ = i; -#line 822 "/home/jens/Source/shotwell/src/Event.vala" - _tmp4_ = count; -#line 822 "/home/jens/Source/shotwell/src/Event.vala" - if (!(_tmp3_ < _tmp4_)) { -#line 822 "/home/jens/Source/shotwell/src/Event.vala" - break; -#line 6481 "Event.c" - } -#line 823 "/home/jens/Source/shotwell/src/Event.vala" - _tmp5_ = self->priv->view; -#line 823 "/home/jens/Source/shotwell/src/Event.vala" - _tmp6_ = i; -#line 823 "/home/jens/Source/shotwell/src/Event.vala" - _tmp7_ = data_collection_get_at (G_TYPE_CHECK_INSTANCE_CAST (_tmp5_, TYPE_DATA_COLLECTION, DataCollection), _tmp6_); -#line 823 "/home/jens/Source/shotwell/src/Event.vala" - _tmp8_ = G_TYPE_CHECK_INSTANCE_CAST (_tmp7_, TYPE_DATA_VIEW, DataView); -#line 823 "/home/jens/Source/shotwell/src/Event.vala" - _tmp9_ = data_view_get_source (_tmp8_); -#line 823 "/home/jens/Source/shotwell/src/Event.vala" - _tmp10_ = G_TYPE_CHECK_INSTANCE_CAST (_tmp9_, TYPE_MEDIA_SOURCE, MediaSource); -#line 823 "/home/jens/Source/shotwell/src/Event.vala" - _tmp11_ = media_source_get_exposure_time (_tmp10_); -#line 823 "/home/jens/Source/shotwell/src/Event.vala" - _g_object_unref0 (_tmp10_); -#line 823 "/home/jens/Source/shotwell/src/Event.vala" - _g_object_unref0 (_tmp8_); -#line 823 "/home/jens/Source/shotwell/src/Event.vala" - time = _tmp11_; -#line 824 "/home/jens/Source/shotwell/src/Event.vala" - _tmp12_ = time; -#line 824 "/home/jens/Source/shotwell/src/Event.vala" - if (_tmp12_ != ((time_t) 0)) { -#line 825 "/home/jens/Source/shotwell/src/Event.vala" - result = time; -#line 825 "/home/jens/Source/shotwell/src/Event.vala" - return result; -#line 6511 "Event.c" - } - } - } - } -#line 828 "/home/jens/Source/shotwell/src/Event.vala" - result = (time_t) 0; -#line 828 "/home/jens/Source/shotwell/src/Event.vala" - return result; -#line 6520 "Event.c" -} - - -static time_t -event_real_get_end_time (EventSource* base) -{ - Event * self; - time_t result = 0; - gint count = 0; - ViewCollection* _tmp0_; - gint _tmp1_; - ViewCollection* _tmp2_; - gint _tmp3_; - DataObject* _tmp4_; - DataView* _tmp5_; - DataSource* _tmp6_; - MediaSource* _tmp7_; - time_t _tmp8_; -#line 831 "/home/jens/Source/shotwell/src/Event.vala" - self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_EVENT, Event); -#line 832 "/home/jens/Source/shotwell/src/Event.vala" - _tmp0_ = self->priv->view; -#line 832 "/home/jens/Source/shotwell/src/Event.vala" - count = data_collection_get_count (G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, TYPE_DATA_COLLECTION, DataCollection)); -#line 836 "/home/jens/Source/shotwell/src/Event.vala" - _tmp1_ = count; -#line 836 "/home/jens/Source/shotwell/src/Event.vala" - if (_tmp1_ == 0) { -#line 837 "/home/jens/Source/shotwell/src/Event.vala" - result = (time_t) 0; -#line 837 "/home/jens/Source/shotwell/src/Event.vala" - return result; -#line 6553 "Event.c" - } -#line 839 "/home/jens/Source/shotwell/src/Event.vala" - _tmp2_ = self->priv->view; -#line 839 "/home/jens/Source/shotwell/src/Event.vala" - _tmp3_ = count; -#line 839 "/home/jens/Source/shotwell/src/Event.vala" - _tmp4_ = data_collection_get_at (G_TYPE_CHECK_INSTANCE_CAST (_tmp2_, TYPE_DATA_COLLECTION, DataCollection), _tmp3_ - 1); -#line 839 "/home/jens/Source/shotwell/src/Event.vala" - _tmp5_ = G_TYPE_CHECK_INSTANCE_CAST (_tmp4_, TYPE_DATA_VIEW, DataView); -#line 839 "/home/jens/Source/shotwell/src/Event.vala" - _tmp6_ = data_view_get_source (_tmp5_); -#line 839 "/home/jens/Source/shotwell/src/Event.vala" - _tmp7_ = G_TYPE_CHECK_INSTANCE_CAST (_tmp6_, TYPE_MEDIA_SOURCE, MediaSource); -#line 839 "/home/jens/Source/shotwell/src/Event.vala" - _tmp8_ = media_source_get_exposure_time (_tmp7_); -#line 839 "/home/jens/Source/shotwell/src/Event.vala" - _g_object_unref0 (_tmp7_); -#line 839 "/home/jens/Source/shotwell/src/Event.vala" - _g_object_unref0 (_tmp5_); -#line 839 "/home/jens/Source/shotwell/src/Event.vala" - result = _tmp8_; -#line 839 "/home/jens/Source/shotwell/src/Event.vala" - return result; -#line 6577 "Event.c" -} - - -static guint64 -event_real_get_total_filesize (EventSource* base) -{ - Event * self; - guint64 result = 0ULL; - guint64 total = 0ULL; -#line 842 "/home/jens/Source/shotwell/src/Event.vala" - self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_EVENT, Event); -#line 843 "/home/jens/Source/shotwell/src/Event.vala" - total = (guint64) 0; -#line 6591 "Event.c" - { - GeeIterator* _current_source_it = NULL; - GeeCollection* _tmp0_; - GeeCollection* _tmp1_; - GeeIterator* _tmp2_; - GeeIterator* _tmp3_; -#line 844 "/home/jens/Source/shotwell/src/Event.vala" - _tmp0_ = event_source_get_media (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_EVENT_SOURCE, EventSource)); -#line 844 "/home/jens/Source/shotwell/src/Event.vala" - _tmp1_ = _tmp0_; -#line 844 "/home/jens/Source/shotwell/src/Event.vala" - _tmp2_ = gee_iterable_iterator (G_TYPE_CHECK_INSTANCE_CAST (_tmp1_, GEE_TYPE_ITERABLE, GeeIterable)); -#line 844 "/home/jens/Source/shotwell/src/Event.vala" - _tmp3_ = _tmp2_; -#line 844 "/home/jens/Source/shotwell/src/Event.vala" - _g_object_unref0 (_tmp1_); -#line 844 "/home/jens/Source/shotwell/src/Event.vala" - _current_source_it = _tmp3_; -#line 844 "/home/jens/Source/shotwell/src/Event.vala" - while (TRUE) { -#line 6612 "Event.c" - GeeIterator* _tmp4_; - MediaSource* current_source = NULL; - GeeIterator* _tmp5_; - gpointer _tmp6_; - guint64 _tmp7_; - MediaSource* _tmp8_; -#line 844 "/home/jens/Source/shotwell/src/Event.vala" - _tmp4_ = _current_source_it; -#line 844 "/home/jens/Source/shotwell/src/Event.vala" - if (!gee_iterator_next (_tmp4_)) { -#line 844 "/home/jens/Source/shotwell/src/Event.vala" - break; -#line 6625 "Event.c" - } -#line 844 "/home/jens/Source/shotwell/src/Event.vala" - _tmp5_ = _current_source_it; -#line 844 "/home/jens/Source/shotwell/src/Event.vala" - _tmp6_ = gee_iterator_get (_tmp5_); -#line 844 "/home/jens/Source/shotwell/src/Event.vala" - current_source = (MediaSource*) _tmp6_; -#line 845 "/home/jens/Source/shotwell/src/Event.vala" - _tmp7_ = total; -#line 845 "/home/jens/Source/shotwell/src/Event.vala" - _tmp8_ = current_source; -#line 845 "/home/jens/Source/shotwell/src/Event.vala" - total = _tmp7_ + media_source_get_filesize (_tmp8_); -#line 844 "/home/jens/Source/shotwell/src/Event.vala" - _g_object_unref0 (current_source); -#line 6641 "Event.c" - } -#line 844 "/home/jens/Source/shotwell/src/Event.vala" - _g_object_unref0 (_current_source_it); -#line 6645 "Event.c" - } -#line 848 "/home/jens/Source/shotwell/src/Event.vala" - result = total; -#line 848 "/home/jens/Source/shotwell/src/Event.vala" - return result; -#line 6651 "Event.c" -} - - -static gint -event_real_get_media_count (EventSource* base) -{ - Event * self; - gint result = 0; - ViewCollection* _tmp0_; -#line 851 "/home/jens/Source/shotwell/src/Event.vala" - self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_EVENT, Event); -#line 852 "/home/jens/Source/shotwell/src/Event.vala" - _tmp0_ = self->priv->view; -#line 852 "/home/jens/Source/shotwell/src/Event.vala" - result = data_collection_get_count (G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, TYPE_DATA_COLLECTION, DataCollection)); -#line 852 "/home/jens/Source/shotwell/src/Event.vala" - return result; -#line 6669 "Event.c" -} - - -static GeeCollection* -event_real_get_media (EventSource* base) -{ - Event * self; - GeeCollection* result = NULL; - ViewCollection* _tmp0_; - GeeCollection* _tmp1_; -#line 855 "/home/jens/Source/shotwell/src/Event.vala" - self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_EVENT, Event); -#line 856 "/home/jens/Source/shotwell/src/Event.vala" - _tmp0_ = self->priv->view; -#line 856 "/home/jens/Source/shotwell/src/Event.vala" - _tmp1_ = view_collection_get_sources (_tmp0_); -#line 856 "/home/jens/Source/shotwell/src/Event.vala" - result = G_TYPE_CHECK_INSTANCE_CAST (_tmp1_, GEE_TYPE_COLLECTION, GeeCollection); -#line 856 "/home/jens/Source/shotwell/src/Event.vala" - return result; -#line 6690 "Event.c" -} - - -void -event_mirror_photos (Event* self, - ViewCollection* view, - CreateView mirroring_ctor, - void* mirroring_ctor_target) -{ - ViewCollection* _tmp0_; -#line 859 "/home/jens/Source/shotwell/src/Event.vala" - g_return_if_fail (IS_EVENT (self)); -#line 859 "/home/jens/Source/shotwell/src/Event.vala" - g_return_if_fail (IS_VIEW_COLLECTION (view)); -#line 860 "/home/jens/Source/shotwell/src/Event.vala" - _tmp0_ = self->priv->view; -#line 860 "/home/jens/Source/shotwell/src/Event.vala" - view_collection_mirror (view, _tmp0_, mirroring_ctor, mirroring_ctor_target, NULL, NULL); -#line 6709 "Event.c" -} - - -static void -event_on_primary_thumbnail_altered (Event* self) -{ -#line 863 "/home/jens/Source/shotwell/src/Event.vala" - g_return_if_fail (IS_EVENT (self)); -#line 864 "/home/jens/Source/shotwell/src/Event.vala" - thumbnail_source_notify_thumbnail_altered (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_THUMBNAIL_SOURCE, ThumbnailSource)); -#line 6720 "Event.c" -} - - -MediaSource* -event_get_primary_source (Event* self) -{ - MediaSource* result = NULL; - MediaSource* _tmp0_; - MediaSource* _tmp1_; -#line 867 "/home/jens/Source/shotwell/src/Event.vala" - g_return_val_if_fail (IS_EVENT (self), NULL); -#line 868 "/home/jens/Source/shotwell/src/Event.vala" - _tmp0_ = self->priv->primary_source; -#line 868 "/home/jens/Source/shotwell/src/Event.vala" - _tmp1_ = _g_object_ref0 (_tmp0_); -#line 868 "/home/jens/Source/shotwell/src/Event.vala" - result = _tmp1_; -#line 868 "/home/jens/Source/shotwell/src/Event.vala" - return result; -#line 6740 "Event.c" -} - - -gboolean -event_set_primary_source (Event* self, - MediaSource* source) -{ - gboolean result = FALSE; - ViewCollection* _tmp0_; - gboolean committed = FALSE; - EventTable* _tmp1_; - EventID _tmp2_; - gchar* _tmp3_; - gchar* _tmp4_; - gboolean _tmp5_; - gboolean _tmp6_; -#line 871 "/home/jens/Source/shotwell/src/Event.vala" - g_return_val_if_fail (IS_EVENT (self), FALSE); -#line 871 "/home/jens/Source/shotwell/src/Event.vala" - g_return_val_if_fail (IS_MEDIA_SOURCE (source), FALSE); -#line 872 "/home/jens/Source/shotwell/src/Event.vala" - _tmp0_ = self->priv->view; -#line 872 "/home/jens/Source/shotwell/src/Event.vala" - _vala_assert (view_collection_has_view_for_source (_tmp0_, G_TYPE_CHECK_INSTANCE_CAST (source, TYPE_DATA_SOURCE, DataSource)), "view.has_view_for_source(source)"); -#line 874 "/home/jens/Source/shotwell/src/Event.vala" - _tmp1_ = event_event_table; -#line 874 "/home/jens/Source/shotwell/src/Event.vala" - _tmp2_ = self->priv->event_id; -#line 874 "/home/jens/Source/shotwell/src/Event.vala" - _tmp3_ = data_source_get_source_id (G_TYPE_CHECK_INSTANCE_CAST (source, TYPE_DATA_SOURCE, DataSource)); -#line 874 "/home/jens/Source/shotwell/src/Event.vala" - _tmp4_ = _tmp3_; -#line 874 "/home/jens/Source/shotwell/src/Event.vala" - _tmp5_ = event_table_set_primary_source_id (_tmp1_, &_tmp2_, _tmp4_); -#line 874 "/home/jens/Source/shotwell/src/Event.vala" - _g_free0 (_tmp4_); -#line 874 "/home/jens/Source/shotwell/src/Event.vala" - committed = _tmp5_; -#line 875 "/home/jens/Source/shotwell/src/Event.vala" - _tmp6_ = committed; -#line 875 "/home/jens/Source/shotwell/src/Event.vala" - if (_tmp6_) { -#line 6783 "Event.c" - MediaSource* _tmp7_; - MediaSource* _tmp10_; - MediaSource* _tmp11_; -#line 877 "/home/jens/Source/shotwell/src/Event.vala" - _tmp7_ = self->priv->primary_source; -#line 877 "/home/jens/Source/shotwell/src/Event.vala" - if (_tmp7_ != NULL) { -#line 6791 "Event.c" - MediaSource* _tmp8_; - guint _tmp9_; -#line 878 "/home/jens/Source/shotwell/src/Event.vala" - _tmp8_ = self->priv->primary_source; -#line 878 "/home/jens/Source/shotwell/src/Event.vala" - g_signal_parse_name ("thumbnail-altered", TYPE_THUMBNAIL_SOURCE, &_tmp9_, NULL, FALSE); -#line 878 "/home/jens/Source/shotwell/src/Event.vala" - g_signal_handlers_disconnect_matched (G_TYPE_CHECK_INSTANCE_CAST (_tmp8_, TYPE_THUMBNAIL_SOURCE, ThumbnailSource), G_SIGNAL_MATCH_ID | G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA, _tmp9_, 0, NULL, (GCallback) _event_on_primary_thumbnail_altered_thumbnail_source_thumbnail_altered, self); -#line 6800 "Event.c" - } -#line 880 "/home/jens/Source/shotwell/src/Event.vala" - _tmp10_ = _g_object_ref0 (source); -#line 880 "/home/jens/Source/shotwell/src/Event.vala" - _g_object_unref0 (self->priv->primary_source); -#line 880 "/home/jens/Source/shotwell/src/Event.vala" - self->priv->primary_source = _tmp10_; -#line 881 "/home/jens/Source/shotwell/src/Event.vala" - _tmp11_ = self->priv->primary_source; -#line 881 "/home/jens/Source/shotwell/src/Event.vala" - g_signal_connect_object (G_TYPE_CHECK_INSTANCE_CAST (_tmp11_, TYPE_THUMBNAIL_SOURCE, ThumbnailSource), "thumbnail-altered", (GCallback) _event_on_primary_thumbnail_altered_thumbnail_source_thumbnail_altered, self, 0); -#line 883 "/home/jens/Source/shotwell/src/Event.vala" - thumbnail_source_notify_thumbnail_altered (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_THUMBNAIL_SOURCE, ThumbnailSource)); -#line 6814 "Event.c" - } -#line 886 "/home/jens/Source/shotwell/src/Event.vala" - result = committed; -#line 886 "/home/jens/Source/shotwell/src/Event.vala" - return result; -#line 6820 "Event.c" -} - - -static void -event_release_primary_source (Event* self) -{ - MediaSource* _tmp0_; - MediaSource* _tmp1_; - guint _tmp2_; -#line 889 "/home/jens/Source/shotwell/src/Event.vala" - g_return_if_fail (IS_EVENT (self)); -#line 890 "/home/jens/Source/shotwell/src/Event.vala" - _tmp0_ = self->priv->primary_source; -#line 890 "/home/jens/Source/shotwell/src/Event.vala" - if (_tmp0_ == NULL) { -#line 891 "/home/jens/Source/shotwell/src/Event.vala" - return; -#line 6838 "Event.c" - } -#line 893 "/home/jens/Source/shotwell/src/Event.vala" - _tmp1_ = self->priv->primary_source; -#line 893 "/home/jens/Source/shotwell/src/Event.vala" - g_signal_parse_name ("thumbnail-altered", TYPE_THUMBNAIL_SOURCE, &_tmp2_, NULL, FALSE); -#line 893 "/home/jens/Source/shotwell/src/Event.vala" - g_signal_handlers_disconnect_matched (G_TYPE_CHECK_INSTANCE_CAST (_tmp1_, TYPE_THUMBNAIL_SOURCE, ThumbnailSource), G_SIGNAL_MATCH_ID | G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA, _tmp2_, 0, NULL, (GCallback) _event_on_primary_thumbnail_altered_thumbnail_source_thumbnail_altered, self); -#line 894 "/home/jens/Source/shotwell/src/Event.vala" - _g_object_unref0 (self->priv->primary_source); -#line 894 "/home/jens/Source/shotwell/src/Event.vala" - self->priv->primary_source = NULL; -#line 6850 "Event.c" -} - - -static GdkPixbuf* -event_real_get_thumbnail (ThumbnailSource* base, - gint scale, - GError** error) -{ - Event * self; - GdkPixbuf* result = NULL; - GdkPixbuf* _tmp0_ = NULL; - MediaSource* _tmp1_; - GError * _inner_error_ = NULL; -#line 897 "/home/jens/Source/shotwell/src/Event.vala" - self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_EVENT, Event); -#line 898 "/home/jens/Source/shotwell/src/Event.vala" - _tmp1_ = self->priv->primary_source; -#line 898 "/home/jens/Source/shotwell/src/Event.vala" - if (_tmp1_ != NULL) { -#line 6870 "Event.c" - MediaSource* _tmp2_; - GdkPixbuf* _tmp3_; -#line 898 "/home/jens/Source/shotwell/src/Event.vala" - _tmp2_ = self->priv->primary_source; -#line 898 "/home/jens/Source/shotwell/src/Event.vala" - _tmp3_ = thumbnail_source_get_thumbnail (G_TYPE_CHECK_INSTANCE_CAST (_tmp2_, TYPE_THUMBNAIL_SOURCE, ThumbnailSource), scale, &_inner_error_); -#line 898 "/home/jens/Source/shotwell/src/Event.vala" - _g_object_unref0 (_tmp0_); -#line 898 "/home/jens/Source/shotwell/src/Event.vala" - _tmp0_ = _tmp3_; -#line 898 "/home/jens/Source/shotwell/src/Event.vala" - if (G_UNLIKELY (_inner_error_ != NULL)) { -#line 898 "/home/jens/Source/shotwell/src/Event.vala" - g_propagate_error (error, _inner_error_); -#line 898 "/home/jens/Source/shotwell/src/Event.vala" - _g_object_unref0 (_tmp0_); -#line 898 "/home/jens/Source/shotwell/src/Event.vala" - return NULL; -#line 6889 "Event.c" - } - } else { -#line 898 "/home/jens/Source/shotwell/src/Event.vala" - _g_object_unref0 (_tmp0_); -#line 898 "/home/jens/Source/shotwell/src/Event.vala" - _tmp0_ = NULL; -#line 6896 "Event.c" - } -#line 898 "/home/jens/Source/shotwell/src/Event.vala" - result = _tmp0_; -#line 898 "/home/jens/Source/shotwell/src/Event.vala" - return result; -#line 6902 "Event.c" -} - - -GdkPixbuf* -event_get_preview_pixbuf (Event* self, - Scaling* scaling) -{ - GdkPixbuf* result = NULL; - GError * _inner_error_ = NULL; -#line 901 "/home/jens/Source/shotwell/src/Event.vala" - g_return_val_if_fail (IS_EVENT (self), NULL); -#line 901 "/home/jens/Source/shotwell/src/Event.vala" - g_return_val_if_fail (scaling != NULL, NULL); -#line 6916 "Event.c" - { - GdkPixbuf* _tmp0_ = NULL; - MediaSource* _tmp1_; - MediaSource* _tmp2_; - Scaling _tmp3_; - GdkPixbuf* _tmp4_; - GdkPixbuf* _tmp5_; - GdkPixbuf* _tmp6_; -#line 903 "/home/jens/Source/shotwell/src/Event.vala" - _tmp1_ = event_get_primary_source (self); -#line 903 "/home/jens/Source/shotwell/src/Event.vala" - _tmp2_ = _tmp1_; -#line 903 "/home/jens/Source/shotwell/src/Event.vala" - _tmp3_ = *scaling; -#line 903 "/home/jens/Source/shotwell/src/Event.vala" - _tmp4_ = media_source_get_preview_pixbuf (_tmp2_, &_tmp3_, &_inner_error_); -#line 903 "/home/jens/Source/shotwell/src/Event.vala" - _tmp5_ = _tmp4_; -#line 903 "/home/jens/Source/shotwell/src/Event.vala" - _g_object_unref0 (_tmp2_); -#line 903 "/home/jens/Source/shotwell/src/Event.vala" - _tmp0_ = _tmp5_; -#line 903 "/home/jens/Source/shotwell/src/Event.vala" - if (G_UNLIKELY (_inner_error_ != NULL)) { -#line 6941 "Event.c" - goto __catch450_g_error; - } -#line 903 "/home/jens/Source/shotwell/src/Event.vala" - _tmp6_ = _tmp0_; -#line 903 "/home/jens/Source/shotwell/src/Event.vala" - _tmp0_ = NULL; -#line 903 "/home/jens/Source/shotwell/src/Event.vala" - result = _tmp6_; -#line 903 "/home/jens/Source/shotwell/src/Event.vala" - _g_object_unref0 (_tmp0_); -#line 903 "/home/jens/Source/shotwell/src/Event.vala" - return result; -#line 6954 "Event.c" - } - goto __finally450; - __catch450_g_error: - { - GError* err = NULL; -#line 902 "/home/jens/Source/shotwell/src/Event.vala" - err = _inner_error_; -#line 902 "/home/jens/Source/shotwell/src/Event.vala" - _inner_error_ = NULL; -#line 905 "/home/jens/Source/shotwell/src/Event.vala" - result = NULL; -#line 905 "/home/jens/Source/shotwell/src/Event.vala" - _g_error_free0 (err); -#line 905 "/home/jens/Source/shotwell/src/Event.vala" - return result; -#line 6970 "Event.c" - } - __finally450: -#line 902 "/home/jens/Source/shotwell/src/Event.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 902 "/home/jens/Source/shotwell/src/Event.vala" - g_clear_error (&_inner_error_); -#line 902 "/home/jens/Source/shotwell/src/Event.vala" - return NULL; -#line 6979 "Event.c" -} - - -static void -event_real_destroy (DataSource* base) -{ - Event * self; - ViewCollection* _tmp0_; - PhotoTable* _tmp4_; - PhotoTable* _tmp5_; - EventID _tmp6_; - VideoTable* _tmp7_; - VideoTable* _tmp8_; - EventID _tmp9_; - GError * _inner_error_ = NULL; -#line 909 "/home/jens/Source/shotwell/src/Event.vala" - self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_EVENT, Event); -#line 911 "/home/jens/Source/shotwell/src/Event.vala" - _tmp0_ = self->priv->view; -#line 911 "/home/jens/Source/shotwell/src/Event.vala" - view_collection_halt_all_monitoring (_tmp0_); -#line 7001 "Event.c" - { - EventTable* _tmp1_; - EventID _tmp2_; -#line 915 "/home/jens/Source/shotwell/src/Event.vala" - _tmp1_ = event_event_table; -#line 915 "/home/jens/Source/shotwell/src/Event.vala" - _tmp2_ = self->priv->event_id; -#line 915 "/home/jens/Source/shotwell/src/Event.vala" - event_table_remove (_tmp1_, &_tmp2_, &_inner_error_); -#line 915 "/home/jens/Source/shotwell/src/Event.vala" - if (G_UNLIKELY (_inner_error_ != NULL)) { -#line 915 "/home/jens/Source/shotwell/src/Event.vala" - if (_inner_error_->domain == DATABASE_ERROR) { -#line 7015 "Event.c" - goto __catch451_database_error; - } -#line 915 "/home/jens/Source/shotwell/src/Event.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 915 "/home/jens/Source/shotwell/src/Event.vala" - g_clear_error (&_inner_error_); -#line 915 "/home/jens/Source/shotwell/src/Event.vala" - return; -#line 7024 "Event.c" - } - } - goto __finally451; - __catch451_database_error: - { - GError* err = NULL; - GError* _tmp3_; -#line 914 "/home/jens/Source/shotwell/src/Event.vala" - err = _inner_error_; -#line 914 "/home/jens/Source/shotwell/src/Event.vala" - _inner_error_ = NULL; -#line 917 "/home/jens/Source/shotwell/src/Event.vala" - _tmp3_ = err; -#line 917 "/home/jens/Source/shotwell/src/Event.vala" - app_window_database_error (_tmp3_); -#line 914 "/home/jens/Source/shotwell/src/Event.vala" - _g_error_free0 (err); -#line 7042 "Event.c" - } - __finally451: -#line 914 "/home/jens/Source/shotwell/src/Event.vala" - if (G_UNLIKELY (_inner_error_ != NULL)) { -#line 914 "/home/jens/Source/shotwell/src/Event.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 914 "/home/jens/Source/shotwell/src/Event.vala" - g_clear_error (&_inner_error_); -#line 914 "/home/jens/Source/shotwell/src/Event.vala" - return; -#line 7053 "Event.c" - } -#line 921 "/home/jens/Source/shotwell/src/Event.vala" - _tmp4_ = photo_table_get_instance (); -#line 921 "/home/jens/Source/shotwell/src/Event.vala" - _tmp5_ = _tmp4_; -#line 921 "/home/jens/Source/shotwell/src/Event.vala" - _tmp6_ = self->priv->event_id; -#line 921 "/home/jens/Source/shotwell/src/Event.vala" - photo_table_drop_event (_tmp5_, &_tmp6_); -#line 921 "/home/jens/Source/shotwell/src/Event.vala" - _database_table_unref0 (_tmp5_); -#line 922 "/home/jens/Source/shotwell/src/Event.vala" - _tmp7_ = video_table_get_instance (); -#line 922 "/home/jens/Source/shotwell/src/Event.vala" - _tmp8_ = _tmp7_; -#line 922 "/home/jens/Source/shotwell/src/Event.vala" - _tmp9_ = self->priv->event_id; -#line 922 "/home/jens/Source/shotwell/src/Event.vala" - video_table_drop_event (_tmp8_, &_tmp9_); -#line 922 "/home/jens/Source/shotwell/src/Event.vala" - _database_table_unref0 (_tmp8_); -#line 924 "/home/jens/Source/shotwell/src/Event.vala" - DATA_SOURCE_CLASS (event_parent_class)->destroy (G_TYPE_CHECK_INSTANCE_CAST (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_EVENT_SOURCE, EventSource), TYPE_DATA_SOURCE, DataSource)); -#line 7077 "Event.c" -} - - -static void -_event_event_snapshot_on_attached_source_destroyed_source_collection_item_destroyed (SourceCollection* _sender, - DataSource* source, - gpointer self) -{ -#line 126 "/home/jens/Source/shotwell/src/Event.vala" - event_event_snapshot_on_attached_source_destroyed ((EventEventSnapshot*) self, source); -#line 7088 "Event.c" -} - - -static EventEventSnapshot* -event_event_snapshot_construct (GType object_type, - Event* event) -{ - EventEventSnapshot* self = NULL; - EventTable* _tmp0_; - EventTable* _tmp1_; - EventID _tmp2_ = {0}; - EventRow* _tmp3_; - MediaSource* _tmp4_; - LibraryPhotoSourceCollection* _tmp14_; - VideoSourceCollection* _tmp15_; -#line 110 "/home/jens/Source/shotwell/src/Event.vala" - g_return_val_if_fail (IS_EVENT (event), NULL); -#line 110 "/home/jens/Source/shotwell/src/Event.vala" - self = (EventEventSnapshot*) source_snapshot_construct (object_type); -#line 112 "/home/jens/Source/shotwell/src/Event.vala" - _tmp0_ = event_table_get_instance (); -#line 112 "/home/jens/Source/shotwell/src/Event.vala" - _tmp1_ = _tmp0_; -#line 112 "/home/jens/Source/shotwell/src/Event.vala" - event_get_event_id (event, &_tmp2_); -#line 112 "/home/jens/Source/shotwell/src/Event.vala" - _tmp3_ = event_table_get_row (_tmp1_, &_tmp2_); -#line 112 "/home/jens/Source/shotwell/src/Event.vala" - _event_row_unref0 (self->priv->row); -#line 112 "/home/jens/Source/shotwell/src/Event.vala" - self->priv->row = _tmp3_; -#line 112 "/home/jens/Source/shotwell/src/Event.vala" - _database_table_unref0 (_tmp1_); -#line 113 "/home/jens/Source/shotwell/src/Event.vala" - _tmp4_ = event_get_primary_source (event); -#line 113 "/home/jens/Source/shotwell/src/Event.vala" - _g_object_unref0 (self->priv->primary_source); -#line 113 "/home/jens/Source/shotwell/src/Event.vala" - self->priv->primary_source = _tmp4_; -#line 7128 "Event.c" - { - GeeIterator* _source_it = NULL; - GeeCollection* _tmp5_; - GeeCollection* _tmp6_; - GeeIterator* _tmp7_; - GeeIterator* _tmp8_; -#line 118 "/home/jens/Source/shotwell/src/Event.vala" - _tmp5_ = event_source_get_media (G_TYPE_CHECK_INSTANCE_CAST (event, TYPE_EVENT_SOURCE, EventSource)); -#line 118 "/home/jens/Source/shotwell/src/Event.vala" - _tmp6_ = _tmp5_; -#line 118 "/home/jens/Source/shotwell/src/Event.vala" - _tmp7_ = gee_iterable_iterator (G_TYPE_CHECK_INSTANCE_CAST (_tmp6_, GEE_TYPE_ITERABLE, GeeIterable)); -#line 118 "/home/jens/Source/shotwell/src/Event.vala" - _tmp8_ = _tmp7_; -#line 118 "/home/jens/Source/shotwell/src/Event.vala" - _g_object_unref0 (_tmp6_); -#line 118 "/home/jens/Source/shotwell/src/Event.vala" - _source_it = _tmp8_; -#line 118 "/home/jens/Source/shotwell/src/Event.vala" - while (TRUE) { -#line 7149 "Event.c" - GeeIterator* _tmp9_; - MediaSource* source = NULL; - GeeIterator* _tmp10_; - gpointer _tmp11_; - GeeArrayList* _tmp12_; - MediaSource* _tmp13_; -#line 118 "/home/jens/Source/shotwell/src/Event.vala" - _tmp9_ = _source_it; -#line 118 "/home/jens/Source/shotwell/src/Event.vala" - if (!gee_iterator_next (_tmp9_)) { -#line 118 "/home/jens/Source/shotwell/src/Event.vala" - break; -#line 7162 "Event.c" - } -#line 118 "/home/jens/Source/shotwell/src/Event.vala" - _tmp10_ = _source_it; -#line 118 "/home/jens/Source/shotwell/src/Event.vala" - _tmp11_ = gee_iterator_get (_tmp10_); -#line 118 "/home/jens/Source/shotwell/src/Event.vala" - source = (MediaSource*) _tmp11_; -#line 119 "/home/jens/Source/shotwell/src/Event.vala" - _tmp12_ = self->priv->attached_sources; -#line 119 "/home/jens/Source/shotwell/src/Event.vala" - _tmp13_ = source; -#line 119 "/home/jens/Source/shotwell/src/Event.vala" - gee_abstract_collection_add (G_TYPE_CHECK_INSTANCE_CAST (_tmp12_, GEE_TYPE_ABSTRACT_COLLECTION, GeeAbstractCollection), _tmp13_); -#line 118 "/home/jens/Source/shotwell/src/Event.vala" - _g_object_unref0 (source); -#line 7178 "Event.c" - } -#line 118 "/home/jens/Source/shotwell/src/Event.vala" - _g_object_unref0 (_source_it); -#line 7182 "Event.c" - } -#line 121 "/home/jens/Source/shotwell/src/Event.vala" - _tmp14_ = library_photo_global; -#line 121 "/home/jens/Source/shotwell/src/Event.vala" - g_signal_connect (G_TYPE_CHECK_INSTANCE_CAST (_tmp14_, TYPE_SOURCE_COLLECTION, SourceCollection), "item-destroyed", (GCallback) _event_event_snapshot_on_attached_source_destroyed_source_collection_item_destroyed, self); -#line 122 "/home/jens/Source/shotwell/src/Event.vala" - _tmp15_ = video_global; -#line 122 "/home/jens/Source/shotwell/src/Event.vala" - g_signal_connect (G_TYPE_CHECK_INSTANCE_CAST (_tmp15_, TYPE_SOURCE_COLLECTION, SourceCollection), "item-destroyed", (GCallback) _event_event_snapshot_on_attached_source_destroyed_source_collection_item_destroyed, self); -#line 110 "/home/jens/Source/shotwell/src/Event.vala" - return self; -#line 7194 "Event.c" -} - - -static EventEventSnapshot* -event_event_snapshot_new (Event* event) -{ -#line 110 "/home/jens/Source/shotwell/src/Event.vala" - return event_event_snapshot_construct (EVENT_TYPE_EVENT_SNAPSHOT, event); -#line 7203 "Event.c" -} - - -static gpointer -_event_row_ref0 (gpointer self) -{ -#line 131 "/home/jens/Source/shotwell/src/Event.vala" - return self ? event_row_ref (self) : NULL; -#line 7212 "Event.c" -} - - -static EventRow* -event_event_snapshot_get_row (EventEventSnapshot* self) -{ - EventRow* result = NULL; - EventRow* _tmp0_; - EventRow* _tmp1_; -#line 130 "/home/jens/Source/shotwell/src/Event.vala" - g_return_val_if_fail (EVENT_IS_EVENT_SNAPSHOT (self), NULL); -#line 131 "/home/jens/Source/shotwell/src/Event.vala" - _tmp0_ = self->priv->row; -#line 131 "/home/jens/Source/shotwell/src/Event.vala" - _tmp1_ = _event_row_ref0 (_tmp0_); -#line 131 "/home/jens/Source/shotwell/src/Event.vala" - result = _tmp1_; -#line 131 "/home/jens/Source/shotwell/src/Event.vala" - return result; -#line 7232 "Event.c" -} - - -static void -event_event_snapshot_real_notify_broken (SourceSnapshot* base) -{ - EventEventSnapshot * self; - EventRow* _tmp0_; - GeeArrayList* _tmp1_; -#line 134 "/home/jens/Source/shotwell/src/Event.vala" - self = G_TYPE_CHECK_INSTANCE_CAST (base, EVENT_TYPE_EVENT_SNAPSHOT, EventEventSnapshot); -#line 135 "/home/jens/Source/shotwell/src/Event.vala" - _tmp0_ = event_row_new (); -#line 135 "/home/jens/Source/shotwell/src/Event.vala" - _event_row_unref0 (self->priv->row); -#line 135 "/home/jens/Source/shotwell/src/Event.vala" - self->priv->row = _tmp0_; -#line 136 "/home/jens/Source/shotwell/src/Event.vala" - _g_object_unref0 (self->priv->primary_source); -#line 136 "/home/jens/Source/shotwell/src/Event.vala" - self->priv->primary_source = NULL; -#line 137 "/home/jens/Source/shotwell/src/Event.vala" - _tmp1_ = self->priv->attached_sources; -#line 137 "/home/jens/Source/shotwell/src/Event.vala" - gee_abstract_collection_clear (G_TYPE_CHECK_INSTANCE_CAST (_tmp1_, GEE_TYPE_ABSTRACT_COLLECTION, GeeAbstractCollection)); -#line 139 "/home/jens/Source/shotwell/src/Event.vala" - SOURCE_SNAPSHOT_CLASS (event_event_snapshot_parent_class)->notify_broken (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_SOURCE_SNAPSHOT, SourceSnapshot)); -#line 7260 "Event.c" -} - - -static void -event_event_snapshot_on_attached_source_destroyed (EventEventSnapshot* self, - DataSource* source) -{ - MediaSource* media_source = NULL; - MediaSource* _tmp0_; - gboolean _tmp1_ = FALSE; - MediaSource* _tmp2_; -#line 142 "/home/jens/Source/shotwell/src/Event.vala" - g_return_if_fail (EVENT_IS_EVENT_SNAPSHOT (self)); -#line 142 "/home/jens/Source/shotwell/src/Event.vala" - g_return_if_fail (IS_DATA_SOURCE (source)); -#line 143 "/home/jens/Source/shotwell/src/Event.vala" - _tmp0_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_CAST (source, TYPE_MEDIA_SOURCE, MediaSource)); -#line 143 "/home/jens/Source/shotwell/src/Event.vala" - media_source = _tmp0_; -#line 146 "/home/jens/Source/shotwell/src/Event.vala" - _tmp2_ = media_source; -#line 146 "/home/jens/Source/shotwell/src/Event.vala" - if (_tmp2_ != NULL) { -#line 7284 "Event.c" - MediaSource* _tmp3_; - MediaSource* _tmp4_; -#line 146 "/home/jens/Source/shotwell/src/Event.vala" - _tmp3_ = self->priv->primary_source; -#line 146 "/home/jens/Source/shotwell/src/Event.vala" - _tmp4_ = media_source; -#line 146 "/home/jens/Source/shotwell/src/Event.vala" - _tmp1_ = data_source_equals (G_TYPE_CHECK_INSTANCE_CAST (_tmp3_, TYPE_DATA_SOURCE, DataSource), G_TYPE_CHECK_INSTANCE_CAST (_tmp4_, TYPE_DATA_SOURCE, DataSource)); -#line 7293 "Event.c" - } else { -#line 146 "/home/jens/Source/shotwell/src/Event.vala" - _tmp1_ = FALSE; -#line 7297 "Event.c" - } -#line 146 "/home/jens/Source/shotwell/src/Event.vala" - if (_tmp1_) { -#line 147 "/home/jens/Source/shotwell/src/Event.vala" - source_snapshot_notify_broken (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_SOURCE_SNAPSHOT, SourceSnapshot)); -#line 7303 "Event.c" - } else { - GeeArrayList* _tmp5_; - MediaSource* _tmp6_; -#line 148 "/home/jens/Source/shotwell/src/Event.vala" - _tmp5_ = self->priv->attached_sources; -#line 148 "/home/jens/Source/shotwell/src/Event.vala" - _tmp6_ = media_source; -#line 148 "/home/jens/Source/shotwell/src/Event.vala" - if (gee_abstract_collection_contains (G_TYPE_CHECK_INSTANCE_CAST (_tmp5_, GEE_TYPE_ABSTRACT_COLLECTION, GeeAbstractCollection), _tmp6_)) { -#line 149 "/home/jens/Source/shotwell/src/Event.vala" - source_snapshot_notify_broken (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_SOURCE_SNAPSHOT, SourceSnapshot)); -#line 7315 "Event.c" - } - } -#line 142 "/home/jens/Source/shotwell/src/Event.vala" - _g_object_unref0 (media_source); -#line 7320 "Event.c" -} - - -static void -event_event_snapshot_class_init (EventEventSnapshotClass * klass) -{ -#line 105 "/home/jens/Source/shotwell/src/Event.vala" - event_event_snapshot_parent_class = g_type_class_peek_parent (klass); -#line 105 "/home/jens/Source/shotwell/src/Event.vala" - ((SourceSnapshotClass *) klass)->finalize = event_event_snapshot_finalize; -#line 105 "/home/jens/Source/shotwell/src/Event.vala" - g_type_class_add_private (klass, sizeof (EventEventSnapshotPrivate)); -#line 105 "/home/jens/Source/shotwell/src/Event.vala" - ((SourceSnapshotClass *) klass)->notify_broken = (void (*) (SourceSnapshot *)) event_event_snapshot_real_notify_broken; -#line 7335 "Event.c" -} - - -static void -event_event_snapshot_instance_init (EventEventSnapshot * self) -{ - GeeArrayList* _tmp0_; -#line 105 "/home/jens/Source/shotwell/src/Event.vala" - self->priv = EVENT_EVENT_SNAPSHOT_GET_PRIVATE (self); -#line 108 "/home/jens/Source/shotwell/src/Event.vala" - _tmp0_ = gee_array_list_new (TYPE_MEDIA_SOURCE, (GBoxedCopyFunc) g_object_ref, (GDestroyNotify) g_object_unref, NULL, NULL, NULL); -#line 108 "/home/jens/Source/shotwell/src/Event.vala" - self->priv->attached_sources = _tmp0_; -#line 7349 "Event.c" -} - - -static void -event_event_snapshot_finalize (SourceSnapshot * obj) -{ - EventEventSnapshot * self; - LibraryPhotoSourceCollection* _tmp0_; - guint _tmp1_; - VideoSourceCollection* _tmp2_; - guint _tmp3_; -#line 105 "/home/jens/Source/shotwell/src/Event.vala" - self = G_TYPE_CHECK_INSTANCE_CAST (obj, EVENT_TYPE_EVENT_SNAPSHOT, EventEventSnapshot); -#line 126 "/home/jens/Source/shotwell/src/Event.vala" - _tmp0_ = library_photo_global; -#line 126 "/home/jens/Source/shotwell/src/Event.vala" - g_signal_parse_name ("item-destroyed", TYPE_SOURCE_COLLECTION, &_tmp1_, NULL, FALSE); -#line 126 "/home/jens/Source/shotwell/src/Event.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) _event_event_snapshot_on_attached_source_destroyed_source_collection_item_destroyed, self); -#line 127 "/home/jens/Source/shotwell/src/Event.vala" - _tmp2_ = video_global; -#line 127 "/home/jens/Source/shotwell/src/Event.vala" - g_signal_parse_name ("item-destroyed", TYPE_SOURCE_COLLECTION, &_tmp3_, NULL, FALSE); -#line 127 "/home/jens/Source/shotwell/src/Event.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) _event_event_snapshot_on_attached_source_destroyed_source_collection_item_destroyed, self); -#line 106 "/home/jens/Source/shotwell/src/Event.vala" - _event_row_unref0 (self->priv->row); -#line 107 "/home/jens/Source/shotwell/src/Event.vala" - _g_object_unref0 (self->priv->primary_source); -#line 108 "/home/jens/Source/shotwell/src/Event.vala" - _g_object_unref0 (self->priv->attached_sources); -#line 105 "/home/jens/Source/shotwell/src/Event.vala" - SOURCE_SNAPSHOT_CLASS (event_event_snapshot_parent_class)->finalize (obj); -#line 7383 "Event.c" -} - - -static GType -event_event_snapshot_get_type (void) -{ - static volatile gsize event_event_snapshot_type_id__volatile = 0; - if (g_once_init_enter (&event_event_snapshot_type_id__volatile)) { - static const GTypeInfo g_define_type_info = { sizeof (EventEventSnapshotClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) event_event_snapshot_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (EventEventSnapshot), 0, (GInstanceInitFunc) event_event_snapshot_instance_init, NULL }; - GType event_event_snapshot_type_id; - event_event_snapshot_type_id = g_type_register_static (TYPE_SOURCE_SNAPSHOT, "EventEventSnapshot", &g_define_type_info, 0); - g_once_init_leave (&event_event_snapshot_type_id__volatile, event_event_snapshot_type_id); - } - return event_event_snapshot_type_id__volatile; -} - - -static EventEventProxy* -event_event_proxy_construct (GType object_type, - Event* event) -{ - EventEventProxy* self = NULL; -#line 154 "/home/jens/Source/shotwell/src/Event.vala" - g_return_val_if_fail (IS_EVENT (event), NULL); -#line 155 "/home/jens/Source/shotwell/src/Event.vala" - self = (EventEventProxy*) source_proxy_construct (object_type, G_TYPE_CHECK_INSTANCE_CAST (event, TYPE_DATA_SOURCE, DataSource)); -#line 154 "/home/jens/Source/shotwell/src/Event.vala" - return self; -#line 7412 "Event.c" -} - - -static EventEventProxy* -event_event_proxy_new (Event* event) -{ -#line 154 "/home/jens/Source/shotwell/src/Event.vala" - return event_event_proxy_construct (EVENT_TYPE_EVENT_PROXY, event); -#line 7421 "Event.c" -} - - -static gpointer -_source_snapshot_ref0 (gpointer self) -{ -#line 159 "/home/jens/Source/shotwell/src/Event.vala" - return self ? source_snapshot_ref (self) : NULL; -#line 7430 "Event.c" -} - - -static DataSource* -event_event_proxy_real_reconstitute (SourceProxy* base, - gint64 object_id, - SourceSnapshot* snapshot) -{ - EventEventProxy * self; - DataSource* result = NULL; - EventEventSnapshot* event_snapshot = NULL; - EventEventSnapshot* _tmp0_; - EventRow* _tmp1_; - EventRow* _tmp2_; - Event* _tmp3_; - DataSource* _tmp4_; -#line 158 "/home/jens/Source/shotwell/src/Event.vala" - self = G_TYPE_CHECK_INSTANCE_CAST (base, EVENT_TYPE_EVENT_PROXY, EventEventProxy); -#line 158 "/home/jens/Source/shotwell/src/Event.vala" - g_return_val_if_fail (IS_SOURCE_SNAPSHOT (snapshot), NULL); -#line 159 "/home/jens/Source/shotwell/src/Event.vala" - _tmp0_ = _source_snapshot_ref0 (G_TYPE_CHECK_INSTANCE_TYPE (snapshot, EVENT_TYPE_EVENT_SNAPSHOT) ? ((EventEventSnapshot*) snapshot) : NULL); -#line 159 "/home/jens/Source/shotwell/src/Event.vala" - event_snapshot = _tmp0_; -#line 160 "/home/jens/Source/shotwell/src/Event.vala" - _vala_assert (event_snapshot != NULL, "event_snapshot != null"); -#line 162 "/home/jens/Source/shotwell/src/Event.vala" - _tmp1_ = event_event_snapshot_get_row (event_snapshot); -#line 162 "/home/jens/Source/shotwell/src/Event.vala" - _tmp2_ = _tmp1_; -#line 162 "/home/jens/Source/shotwell/src/Event.vala" - _tmp3_ = event_reconstitute (object_id, _tmp2_); -#line 162 "/home/jens/Source/shotwell/src/Event.vala" - _tmp4_ = G_TYPE_CHECK_INSTANCE_CAST (_tmp3_, TYPE_DATA_SOURCE, DataSource); -#line 162 "/home/jens/Source/shotwell/src/Event.vala" - _event_row_unref0 (_tmp2_); -#line 162 "/home/jens/Source/shotwell/src/Event.vala" - result = _tmp4_; -#line 162 "/home/jens/Source/shotwell/src/Event.vala" - _source_snapshot_unref0 (event_snapshot); -#line 162 "/home/jens/Source/shotwell/src/Event.vala" - return result; -#line 7473 "Event.c" -} - - -static void -event_event_proxy_class_init (EventEventProxyClass * klass) -{ -#line 153 "/home/jens/Source/shotwell/src/Event.vala" - event_event_proxy_parent_class = g_type_class_peek_parent (klass); -#line 153 "/home/jens/Source/shotwell/src/Event.vala" - ((SourceProxyClass *) klass)->reconstitute = (DataSource* (*) (SourceProxy *, gint64, SourceSnapshot*)) event_event_proxy_real_reconstitute; -#line 7484 "Event.c" -} - - -static void -event_event_proxy_instance_init (EventEventProxy * self) -{ -} - - -static GType -event_event_proxy_get_type (void) -{ - static volatile gsize event_event_proxy_type_id__volatile = 0; - if (g_once_init_enter (&event_event_proxy_type_id__volatile)) { - static const GTypeInfo g_define_type_info = { sizeof (EventEventProxyClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) event_event_proxy_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (EventEventProxy), 0, (GInstanceInitFunc) event_event_proxy_instance_init, NULL }; - GType event_event_proxy_type_id; - event_event_proxy_type_id = g_type_register_static (TYPE_SOURCE_PROXY, "EventEventProxy", &g_define_type_info, 0); - g_once_init_leave (&event_event_proxy_type_id__volatile, event_event_proxy_type_id); - } - return event_event_proxy_type_id__volatile; -} - - -static void -event_class_init (EventClass * klass) -{ -#line 94 "/home/jens/Source/shotwell/src/Event.vala" - event_parent_class = g_type_class_peek_parent (klass); -#line 94 "/home/jens/Source/shotwell/src/Event.vala" - g_type_class_add_private (klass, sizeof (EventPrivate)); -#line 94 "/home/jens/Source/shotwell/src/Event.vala" - ((DataSourceClass *) klass)->get_typename = (gchar* (*) (DataSource *)) event_real_get_typename; -#line 94 "/home/jens/Source/shotwell/src/Event.vala" - ((DataSourceClass *) klass)->get_instance_id = (gint64 (*) (DataSource *)) event_real_get_instance_id; -#line 94 "/home/jens/Source/shotwell/src/Event.vala" - ((ThumbnailSourceClass *) klass)->get_representative_id = (gchar* (*) (ThumbnailSource *)) event_real_get_representative_id; -#line 94 "/home/jens/Source/shotwell/src/Event.vala" - ((ThumbnailSourceClass *) klass)->get_preferred_thumbnail_format = (PhotoFileFormat (*) (ThumbnailSource *)) event_real_get_preferred_thumbnail_format; -#line 94 "/home/jens/Source/shotwell/src/Event.vala" - ((ThumbnailSourceClass *) klass)->create_thumbnail = (GdkPixbuf* (*) (ThumbnailSource *, gint, GError**)) event_real_create_thumbnail; -#line 94 "/home/jens/Source/shotwell/src/Event.vala" - ((DataSourceClass *) klass)->notify_relinking = (void (*) (DataSource *, SourceCollection*)) event_real_notify_relinking; -#line 94 "/home/jens/Source/shotwell/src/Event.vala" - ((DataSourceClass *) klass)->save_snapshot = (SourceSnapshot* (*) (DataSource *)) event_real_save_snapshot; -#line 94 "/home/jens/Source/shotwell/src/Event.vala" - ((DataSourceClass *) klass)->equals = (gboolean (*) (DataSource *, DataSource*)) event_real_equals; -#line 94 "/home/jens/Source/shotwell/src/Event.vala" - ((DataObjectClass *) klass)->to_string = (gchar* (*) (DataObject *)) event_real_to_string; -#line 94 "/home/jens/Source/shotwell/src/Event.vala" - ((DataObjectClass *) klass)->get_name = (gchar* (*) (DataObject *)) event_real_get_name; -#line 94 "/home/jens/Source/shotwell/src/Event.vala" - ((EventSourceClass *) klass)->get_comment = (gchar* (*) (EventSource *)) event_real_get_comment; -#line 94 "/home/jens/Source/shotwell/src/Event.vala" - ((EventSourceClass *) klass)->set_comment = (gboolean (*) (EventSource *, const gchar*)) event_real_set_comment; -#line 94 "/home/jens/Source/shotwell/src/Event.vala" - ((EventSourceClass *) klass)->get_start_time = (time_t (*) (EventSource *)) event_real_get_start_time; -#line 94 "/home/jens/Source/shotwell/src/Event.vala" - ((EventSourceClass *) klass)->get_end_time = (time_t (*) (EventSource *)) event_real_get_end_time; -#line 94 "/home/jens/Source/shotwell/src/Event.vala" - ((EventSourceClass *) klass)->get_total_filesize = (guint64 (*) (EventSource *)) event_real_get_total_filesize; -#line 94 "/home/jens/Source/shotwell/src/Event.vala" - ((EventSourceClass *) klass)->get_media_count = (gint (*) (EventSource *)) event_real_get_media_count; -#line 94 "/home/jens/Source/shotwell/src/Event.vala" - ((EventSourceClass *) klass)->get_media = (GeeCollection* (*) (EventSource *)) event_real_get_media; -#line 94 "/home/jens/Source/shotwell/src/Event.vala" - ((ThumbnailSourceClass *) klass)->get_thumbnail = (GdkPixbuf* (*) (ThumbnailSource *, gint, GError**)) event_real_get_thumbnail; -#line 94 "/home/jens/Source/shotwell/src/Event.vala" - ((DataSourceClass *) klass)->destroy = (void (*) (DataSource *)) event_real_destroy; -#line 94 "/home/jens/Source/shotwell/src/Event.vala" - G_OBJECT_CLASS (klass)->finalize = event_finalize; -#line 7555 "Event.c" -} - - -static void -event_container_source_interface_init (ContainerSourceIface * iface) -{ -#line 94 "/home/jens/Source/shotwell/src/Event.vala" - event_container_source_parent_iface = g_type_interface_peek_parent (iface); -#line 94 "/home/jens/Source/shotwell/src/Event.vala" - iface->has_links = (gboolean (*) (ContainerSource *)) event_real_has_links; -#line 94 "/home/jens/Source/shotwell/src/Event.vala" - iface->get_backlink = (SourceBacklink* (*) (ContainerSource *)) event_real_get_backlink; -#line 94 "/home/jens/Source/shotwell/src/Event.vala" - iface->break_link = (void (*) (ContainerSource *, DataSource*)) event_real_break_link; -#line 94 "/home/jens/Source/shotwell/src/Event.vala" - iface->break_link_many = (void (*) (ContainerSource *, GeeCollection*)) event_real_break_link_many; -#line 94 "/home/jens/Source/shotwell/src/Event.vala" - iface->establish_link = (void (*) (ContainerSource *, DataSource*)) event_real_establish_link; -#line 94 "/home/jens/Source/shotwell/src/Event.vala" - iface->establish_link_many = (void (*) (ContainerSource *, GeeCollection*)) event_real_establish_link_many; -#line 7576 "Event.c" -} - - -static void -event_proxyable_interface_init (ProxyableIface * iface) -{ -#line 94 "/home/jens/Source/shotwell/src/Event.vala" - event_proxyable_parent_iface = g_type_interface_peek_parent (iface); -#line 94 "/home/jens/Source/shotwell/src/Event.vala" - iface->get_proxy = (SourceProxy* (*) (Proxyable *)) event_real_get_proxy; -#line 7587 "Event.c" -} - - -static void -event_indexable_interface_init (IndexableIface * iface) -{ -#line 94 "/home/jens/Source/shotwell/src/Event.vala" - event_indexable_parent_iface = g_type_interface_peek_parent (iface); -#line 94 "/home/jens/Source/shotwell/src/Event.vala" - iface->get_indexable_keywords = (const gchar* (*) (Indexable *)) event_real_get_indexable_keywords; -#line 7598 "Event.c" -} - - -static void -event_instance_init (Event * self) -{ -#line 94 "/home/jens/Source/shotwell/src/Event.vala" - self->priv = EVENT_GET_PRIVATE (self); -#line 175 "/home/jens/Source/shotwell/src/Event.vala" - self->priv->unlinking = FALSE; -#line 176 "/home/jens/Source/shotwell/src/Event.vala" - self->priv->relinking = FALSE; -#line 177 "/home/jens/Source/shotwell/src/Event.vala" - self->priv->indexable_keywords = NULL; -#line 178 "/home/jens/Source/shotwell/src/Event.vala" - self->priv->comment = NULL; -#line 7615 "Event.c" -} - - -static void -event_finalize (GObject * obj) -{ - Event * self; - MediaSource* _tmp0_; - ViewCollection* _tmp3_; - guint _tmp4_; - ViewCollection* _tmp5_; - guint _tmp6_; - ViewCollection* _tmp7_; - guint _tmp8_; - LibraryPhotoSourceCollection* _tmp9_; - guint _tmp10_; - VideoSourceCollection* _tmp11_; - guint _tmp12_; -#line 94 "/home/jens/Source/shotwell/src/Event.vala" - self = G_TYPE_CHECK_INSTANCE_CAST (obj, TYPE_EVENT, Event); -#line 237 "/home/jens/Source/shotwell/src/Event.vala" - _tmp0_ = self->priv->primary_source; -#line 237 "/home/jens/Source/shotwell/src/Event.vala" - if (_tmp0_ != NULL) { -#line 7640 "Event.c" - MediaSource* _tmp1_; - guint _tmp2_; -#line 238 "/home/jens/Source/shotwell/src/Event.vala" - _tmp1_ = self->priv->primary_source; -#line 238 "/home/jens/Source/shotwell/src/Event.vala" - g_signal_parse_name ("thumbnail-altered", TYPE_THUMBNAIL_SOURCE, &_tmp2_, NULL, FALSE); -#line 238 "/home/jens/Source/shotwell/src/Event.vala" - g_signal_handlers_disconnect_matched (G_TYPE_CHECK_INSTANCE_CAST (_tmp1_, TYPE_THUMBNAIL_SOURCE, ThumbnailSource), G_SIGNAL_MATCH_ID | G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA, _tmp2_, 0, NULL, (GCallback) _event_on_primary_thumbnail_altered_thumbnail_source_thumbnail_altered, self); -#line 7649 "Event.c" - } -#line 240 "/home/jens/Source/shotwell/src/Event.vala" - _tmp3_ = self->priv->view; -#line 240 "/home/jens/Source/shotwell/src/Event.vala" - g_signal_parse_name ("items-altered", TYPE_DATA_COLLECTION, &_tmp4_, NULL, FALSE); -#line 240 "/home/jens/Source/shotwell/src/Event.vala" - g_signal_handlers_disconnect_matched (G_TYPE_CHECK_INSTANCE_CAST (_tmp3_, TYPE_DATA_COLLECTION, DataCollection), G_SIGNAL_MATCH_ID | G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA, _tmp4_, 0, NULL, (GCallback) _event_on_media_altered_data_collection_items_altered, self); -#line 241 "/home/jens/Source/shotwell/src/Event.vala" - _tmp5_ = self->priv->view; -#line 241 "/home/jens/Source/shotwell/src/Event.vala" - g_signal_parse_name ("items-removed", TYPE_DATA_COLLECTION, &_tmp6_, NULL, FALSE); -#line 241 "/home/jens/Source/shotwell/src/Event.vala" - g_signal_handlers_disconnect_matched (G_TYPE_CHECK_INSTANCE_CAST (_tmp5_, TYPE_DATA_COLLECTION, DataCollection), G_SIGNAL_MATCH_ID | G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA, _tmp6_, 0, NULL, (GCallback) _event_on_media_removed_data_collection_items_removed, self); -#line 242 "/home/jens/Source/shotwell/src/Event.vala" - _tmp7_ = self->priv->view; -#line 242 "/home/jens/Source/shotwell/src/Event.vala" - g_signal_parse_name ("items-added", TYPE_DATA_COLLECTION, &_tmp8_, NULL, FALSE); -#line 242 "/home/jens/Source/shotwell/src/Event.vala" - g_signal_handlers_disconnect_matched (G_TYPE_CHECK_INSTANCE_CAST (_tmp7_, TYPE_DATA_COLLECTION, DataCollection), G_SIGNAL_MATCH_ID | G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA, _tmp8_, 0, NULL, (GCallback) _event_on_media_added_data_collection_items_added, self); -#line 244 "/home/jens/Source/shotwell/src/Event.vala" - _tmp9_ = library_photo_global; -#line 244 "/home/jens/Source/shotwell/src/Event.vala" - g_signal_parse_name ("item-destroyed", TYPE_SOURCE_COLLECTION, &_tmp10_, NULL, FALSE); -#line 244 "/home/jens/Source/shotwell/src/Event.vala" - g_signal_handlers_disconnect_matched (G_TYPE_CHECK_INSTANCE_CAST (_tmp9_, TYPE_SOURCE_COLLECTION, SourceCollection), G_SIGNAL_MATCH_ID | G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA, _tmp10_, 0, NULL, (GCallback) _event_on_media_destroyed_source_collection_item_destroyed, self); -#line 245 "/home/jens/Source/shotwell/src/Event.vala" - _tmp11_ = video_global; -#line 245 "/home/jens/Source/shotwell/src/Event.vala" - g_signal_parse_name ("item-destroyed", TYPE_SOURCE_COLLECTION, &_tmp12_, NULL, FALSE); -#line 245 "/home/jens/Source/shotwell/src/Event.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) _event_on_media_destroyed_source_collection_item_destroyed, self); -#line 172 "/home/jens/Source/shotwell/src/Event.vala" - _g_free0 (self->priv->raw_name); -#line 173 "/home/jens/Source/shotwell/src/Event.vala" - _g_object_unref0 (self->priv->primary_source); -#line 174 "/home/jens/Source/shotwell/src/Event.vala" - _data_collection_unref0 (self->priv->view); -#line 177 "/home/jens/Source/shotwell/src/Event.vala" - _g_free0 (self->priv->indexable_keywords); -#line 178 "/home/jens/Source/shotwell/src/Event.vala" - _g_free0 (self->priv->comment); -#line 94 "/home/jens/Source/shotwell/src/Event.vala" - G_OBJECT_CLASS (event_parent_class)->finalize (obj); -#line 7693 "Event.c" -} - - -GType -event_get_type (void) -{ - static volatile gsize event_type_id__volatile = 0; - if (g_once_init_enter (&event_type_id__volatile)) { - static const GTypeInfo g_define_type_info = { sizeof (EventClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) event_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (Event), 0, (GInstanceInitFunc) event_instance_init, NULL }; - static const GInterfaceInfo container_source_info = { (GInterfaceInitFunc) event_container_source_interface_init, (GInterfaceFinalizeFunc) NULL, NULL}; - static const GInterfaceInfo proxyable_info = { (GInterfaceInitFunc) event_proxyable_interface_init, (GInterfaceFinalizeFunc) NULL, NULL}; - static const GInterfaceInfo indexable_info = { (GInterfaceInitFunc) event_indexable_interface_init, (GInterfaceFinalizeFunc) NULL, NULL}; - GType event_type_id; - event_type_id = g_type_register_static (TYPE_EVENT_SOURCE, "Event", &g_define_type_info, 0); - g_type_add_interface_static (event_type_id, TYPE_CONTAINER_SOURCE, &container_source_info); - g_type_add_interface_static (event_type_id, TYPE_PROXYABLE, &proxyable_info); - g_type_add_interface_static (event_type_id, TYPE_INDEXABLE, &indexable_info); - g_once_init_leave (&event_type_id__volatile, event_type_id); - } - return event_type_id__volatile; -} - - -static void -_vala_array_destroy (gpointer array, - gint array_length, - GDestroyNotify destroy_func) -{ - if ((array != NULL) && (destroy_func != NULL)) { - int i; - for (i = 0; i < array_length; i = i + 1) { - if (((gpointer*) array)[i] != NULL) { - destroy_func (((gpointer*) array)[i]); - } - } - } -} - - -static void -_vala_array_free (gpointer array, - gint array_length, - GDestroyNotify destroy_func) -{ - _vala_array_destroy (array, array_length, destroy_func); - g_free (array); -} - - - |