/* Event.c generated by valac 0.34.2, 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 #include #include #include #include #include #include #include #include #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; 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; #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)) enum { EVENT_SOURCE_COLLECTION_DUMMY_PROPERTY }; 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; enum { EVENT_SOURCE_COLLECTION_NO_EVENT_VIEW_MANAGER_DUMMY_PROPERTY }; 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)) enum { EVENT_DUMMY_PROPERTY }; 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)) enum { EVENT_EVENT_SNAPSHOT_DUMMY_PROPERTY }; 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); enum { EVENT_EVENT_PROXY_DUMMY_PROPERTY }; 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 1280 "Event.c" } EventSourceCollection* event_source_collection_construct (GType object_type) { EventSourceCollection* self = NULL; LibraryPhotoSourceCollection* _tmp0_ = NULL; VideoSourceCollection* _tmp1_ = NULL; #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 1300 "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 1307 "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 1314 "Event.c" } void event_source_collection_init (EventSourceCollection* self) { ViewCollection* _tmp0_ = NULL; EventSourceCollectionNoEventViewManager* view_manager = NULL; EventSourceCollectionNoEventViewManager* _tmp1_ = NULL; Alteration* filter_alteration = NULL; Alteration* _tmp2_ = NULL; ViewCollection* _tmp3_ = NULL; LibraryPhotoSourceCollection* _tmp4_ = NULL; ViewCollectionMonitor* _tmp5_ = NULL; ViewCollectionMonitor* _tmp6_ = NULL; ViewCollection* _tmp7_ = NULL; VideoSourceCollection* _tmp8_ = NULL; ViewCollectionMonitor* _tmp9_ = NULL; ViewCollectionMonitor* _tmp10_ = NULL; ViewCollection* _tmp11_ = NULL; #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 1377 "Event.c" } static gboolean event_source_collection_real_holds_type_of_source (SourceCollection* base, DataSource* source) { EventSourceCollection * self; gboolean result = FALSE; DataSource* _tmp0_ = NULL; #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" _tmp0_ = source; #line 44 "/home/jens/Source/shotwell/src/Event.vala" result = G_TYPE_CHECK_INSTANCE_TYPE (_tmp0_, TYPE_EVENT); #line 44 "/home/jens/Source/shotwell/src/Event.vala" return result; #line 1395 "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 1402 "Event.c" } static gint64 event_source_collection_get_event_key (DataSource* source) { gint64 result = 0LL; Event* event = NULL; DataSource* _tmp0_ = NULL; Event* _tmp1_ = NULL; EventID event_id = {0}; EventID _tmp2_ = {0}; EventID _tmp3_ = {0}; gint64 _tmp4_ = 0LL; #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_ = source; #line 48 "/home/jens/Source/shotwell/src/Event.vala" _tmp1_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, TYPE_EVENT, Event)); #line 48 "/home/jens/Source/shotwell/src/Event.vala" event = _tmp1_; #line 49 "/home/jens/Source/shotwell/src/Event.vala" event_get_event_id (event, &_tmp2_); #line 49 "/home/jens/Source/shotwell/src/Event.vala" event_id = _tmp2_; #line 51 "/home/jens/Source/shotwell/src/Event.vala" _tmp3_ = event_id; #line 51 "/home/jens/Source/shotwell/src/Event.vala" _tmp4_ = _tmp3_.id; #line 51 "/home/jens/Source/shotwell/src/Event.vala" result = _tmp4_; #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 1437 "Event.c" } Event* event_source_collection_fetch (EventSourceCollection* self, EventID* event_id) { Event* result = NULL; EventID _tmp0_ = {0}; gint64 _tmp1_ = 0LL; DataSource* _tmp2_ = NULL; #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 1460 "Event.c" } static GeeCollection* event_source_collection_real_get_containers_holding_source (ContainerSourceCollection* base, DataSource* source) { EventSourceCollection * self; GeeCollection* result = NULL; Event* event = NULL; DataSource* _tmp0_ = NULL; Event* _tmp1_ = NULL; Event* _tmp2_ = NULL; GeeArrayList* list = NULL; GeeArrayList* _tmp3_ = NULL; GeeArrayList* _tmp4_ = NULL; Event* _tmp5_ = NULL; #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_ = source; #line 59 "/home/jens/Source/shotwell/src/Event.vala" _tmp1_ = media_source_get_event (G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, TYPE_MEDIA_SOURCE, MediaSource)); #line 59 "/home/jens/Source/shotwell/src/Event.vala" event = _tmp1_; #line 60 "/home/jens/Source/shotwell/src/Event.vala" _tmp2_ = event; #line 60 "/home/jens/Source/shotwell/src/Event.vala" if (_tmp2_ == 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 1495 "Event.c" } #line 63 "/home/jens/Source/shotwell/src/Event.vala" _tmp3_ = gee_array_list_new (TYPE_CONTAINER_SOURCE, (GBoxedCopyFunc) g_object_ref, g_object_unref, NULL, NULL, NULL); #line 63 "/home/jens/Source/shotwell/src/Event.vala" list = _tmp3_; #line 64 "/home/jens/Source/shotwell/src/Event.vala" _tmp4_ = list; #line 64 "/home/jens/Source/shotwell/src/Event.vala" _tmp5_ = event; #line 64 "/home/jens/Source/shotwell/src/Event.vala" gee_abstract_collection_add (G_TYPE_CHECK_INSTANCE_CAST (_tmp4_, GEE_TYPE_ABSTRACT_COLLECTION, GeeAbstractCollection), G_TYPE_CHECK_INSTANCE_CAST (_tmp5_, 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 1513 "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}; SourceBacklink* _tmp0_ = NULL; gint64 _tmp1_ = 0LL; gint64 _tmp2_ = 0LL; Event* event = NULL; EventID _tmp3_ = {0}; Event* _tmp4_ = NULL; Event* _tmp5_ = NULL; #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_ = backlink; #line 70 "/home/jens/Source/shotwell/src/Event.vala" _tmp1_ = source_backlink_get_instance_id (_tmp0_); #line 70 "/home/jens/Source/shotwell/src/Event.vala" _tmp2_ = _tmp1_; #line 70 "/home/jens/Source/shotwell/src/Event.vala" event_id_init (&event_id, _tmp2_); #line 72 "/home/jens/Source/shotwell/src/Event.vala" _tmp3_ = event_id; #line 72 "/home/jens/Source/shotwell/src/Event.vala" _tmp4_ = event_source_collection_fetch (self, &_tmp3_); #line 72 "/home/jens/Source/shotwell/src/Event.vala" event = _tmp4_; #line 73 "/home/jens/Source/shotwell/src/Event.vala" _tmp5_ = event; #line 73 "/home/jens/Source/shotwell/src/Event.vala" if (_tmp5_ != 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 1554 "Event.c" } { GeeIterator* _container_it = NULL; GeeCollection* _tmp6_ = NULL; GeeCollection* _tmp7_ = NULL; GeeIterator* _tmp8_ = NULL; GeeIterator* _tmp9_ = NULL; #line 76 "/home/jens/Source/shotwell/src/Event.vala" _tmp6_ = 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" _tmp7_ = _tmp6_; #line 76 "/home/jens/Source/shotwell/src/Event.vala" _tmp8_ = gee_iterable_iterator (G_TYPE_CHECK_INSTANCE_CAST (_tmp7_, GEE_TYPE_ITERABLE, GeeIterable)); #line 76 "/home/jens/Source/shotwell/src/Event.vala" _tmp9_ = _tmp8_; #line 76 "/home/jens/Source/shotwell/src/Event.vala" _g_object_unref0 (_tmp7_); #line 76 "/home/jens/Source/shotwell/src/Event.vala" _container_it = _tmp9_; #line 76 "/home/jens/Source/shotwell/src/Event.vala" while (TRUE) { #line 1576 "Event.c" GeeIterator* _tmp10_ = NULL; gboolean _tmp11_ = FALSE; ContainerSource* container = NULL; GeeIterator* _tmp12_ = NULL; gpointer _tmp13_ = NULL; ContainerSource* _tmp14_ = NULL; EventID _tmp15_ = {0}; gint64 _tmp16_ = 0LL; EventID _tmp17_ = {0}; gint64 _tmp18_ = 0LL; #line 76 "/home/jens/Source/shotwell/src/Event.vala" _tmp10_ = _container_it; #line 76 "/home/jens/Source/shotwell/src/Event.vala" _tmp11_ = gee_iterator_next (_tmp10_); #line 76 "/home/jens/Source/shotwell/src/Event.vala" if (!_tmp11_) { #line 76 "/home/jens/Source/shotwell/src/Event.vala" break; #line 1595 "Event.c" } #line 76 "/home/jens/Source/shotwell/src/Event.vala" _tmp12_ = _container_it; #line 76 "/home/jens/Source/shotwell/src/Event.vala" _tmp13_ = gee_iterator_get (_tmp12_); #line 76 "/home/jens/Source/shotwell/src/Event.vala" container = (ContainerSource*) _tmp13_; #line 77 "/home/jens/Source/shotwell/src/Event.vala" _tmp14_ = container; #line 77 "/home/jens/Source/shotwell/src/Event.vala" event_get_event_id (G_TYPE_CHECK_INSTANCE_CAST (_tmp14_, TYPE_EVENT, Event), &_tmp15_); #line 77 "/home/jens/Source/shotwell/src/Event.vala" _tmp16_ = _tmp15_.id; #line 77 "/home/jens/Source/shotwell/src/Event.vala" _tmp17_ = event_id; #line 77 "/home/jens/Source/shotwell/src/Event.vala" _tmp18_ = _tmp17_.id; #line 77 "/home/jens/Source/shotwell/src/Event.vala" if (_tmp16_ == _tmp18_) { #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 1623 "Event.c" } #line 76 "/home/jens/Source/shotwell/src/Event.vala" _g_object_unref0 (container); #line 1627 "Event.c" } #line 76 "/home/jens/Source/shotwell/src/Event.vala" _g_object_unref0 (_container_it); #line 1631 "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 1639 "Event.c" } GeeCollection* event_source_collection_get_no_event_objects (EventSourceCollection* self) { GeeCollection* result = NULL; ViewCollection* _tmp0_ = NULL; GeeCollection* _tmp1_ = NULL; #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 1657 "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_by_name (self, "no-event-collection-altered"); #line 1670 "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; DataSource* _tmp1_ = NULL; EventID _tmp2_ = {0}; gint64 _tmp3_ = 0LL; #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" _tmp1_ = source; #line 15 "/home/jens/Source/shotwell/src/Event.vala" media_source_get_event_id (G_TYPE_CHECK_INSTANCE_CAST (_tmp1_, TYPE_MEDIA_SOURCE, MediaSource), &_tmp2_); #line 15 "/home/jens/Source/shotwell/src/Event.vala" _tmp3_ = _tmp2_.id; #line 15 "/home/jens/Source/shotwell/src/Event.vala" if (_tmp3_ != EVENT_ID_INVALID) { #line 15 "/home/jens/Source/shotwell/src/Event.vala" _tmp0_ = FALSE; #line 1695 "Event.c" } else { DataSource* _tmp4_ = NULL; gboolean _tmp5_ = FALSE; #line 16 "/home/jens/Source/shotwell/src/Event.vala" _tmp4_ = source; #line 16 "/home/jens/Source/shotwell/src/Event.vala" _tmp5_ = 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), _tmp4_); #line 16 "/home/jens/Source/shotwell/src/Event.vala" _tmp0_ = _tmp5_; #line 1705 "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 1711 "Event.c" } static DataView* event_source_collection_no_event_view_manager_real_create_view (ViewManager* base, DataSource* source) { EventSourceCollectionNoEventViewManager * self; DataView* result = NULL; DataSource* _tmp0_ = NULL; ThumbnailView* _tmp1_ = NULL; #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_ = source; #line 20 "/home/jens/Source/shotwell/src/Event.vala" _tmp1_ = thumbnail_view_new (G_TYPE_CHECK_INSTANCE_CAST (G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, TYPE_MEDIA_SOURCE, MediaSource), TYPE_THUMBNAIL_SOURCE, ThumbnailSource)); #line 20 "/home/jens/Source/shotwell/src/Event.vala" result = G_TYPE_CHECK_INSTANCE_CAST (_tmp1_, TYPE_DATA_VIEW, DataView); #line 20 "/home/jens/Source/shotwell/src/Event.vala" return result; #line 1732 "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 1742 "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 1749 "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 = event_source_collection_no_event_view_manager_real_include_in_view; #line 12 "/home/jens/Source/shotwell/src/Event.vala" ((ViewManagerClass *) klass)->create_view = event_source_collection_no_event_view_manager_real_create_view; #line 1760 "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 = event_source_collection_real_holds_type_of_source; #line 7 "/home/jens/Source/shotwell/src/Event.vala" ((ContainerSourceCollectionClass *) klass)->get_containers_holding_source = event_source_collection_real_get_containers_holding_source; #line 7 "/home/jens/Source/shotwell/src/Event.vala" ((ContainerSourceCollectionClass *) klass)->convert_backlink_to_container = event_source_collection_real_convert_backlink_to_container; #line 7 "/home/jens/Source/shotwell/src/Event.vala" 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 1795 "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 1802 "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 1814 "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 1833 "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 1840 "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 1847 "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 1854 "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 1861 "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 1870 "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 1879 "Event.c" } static Event* event_construct (GType object_type, EventRow* event_row, gint64 object_id) { Event * self = NULL; gint64 _tmp0_ = 0LL; EventRow* _tmp1_ = NULL; EventRow* _tmp2_ = NULL; const gchar* _tmp3_ = NULL; gchar* _tmp4_ = NULL; EventRow* _tmp5_ = NULL; EventID _tmp6_ = {0}; EventRow* _tmp7_ = NULL; const gchar* _tmp8_ = NULL; gchar* _tmp9_ = NULL; EventRow* _tmp10_ = NULL; const gchar* _tmp11_ = NULL; gchar* _tmp12_ = NULL; GeeCollection* event_source_ids = NULL; MediaCollectionRegistry* _tmp13_ = NULL; MediaCollectionRegistry* _tmp14_ = NULL; EventID _tmp15_ = {0}; GeeCollection* _tmp16_ = NULL; GeeCollection* _tmp17_ = NULL; GeeArrayList* event_thumbs = NULL; GeeArrayList* _tmp18_ = NULL; EventID _tmp35_ = {0}; gint64 _tmp36_ = 0LL; gchar* _tmp37_ = NULL; gchar* _tmp38_ = NULL; gchar* _tmp39_ = NULL; gchar* _tmp40_ = NULL; ViewCollection* _tmp41_ = NULL; ViewCollection* _tmp42_ = NULL; ViewCollection* _tmp43_ = NULL; GeeArrayList* _tmp44_ = NULL; GeeCollection* _tmp45_ = NULL; GeeCollection* _tmp46_ = NULL; GeeArrayList* _tmp47_ = NULL; gint _tmp48_ = 0; gint _tmp49_ = 0; MediaCollectionRegistry* _tmp54_ = NULL; MediaCollectionRegistry* _tmp55_ = NULL; EventRow* _tmp56_ = NULL; const gchar* _tmp57_ = NULL; MediaSource* _tmp58_ = NULL; gboolean _tmp59_ = FALSE; MediaSource* _tmp60_ = NULL; MediaSource* _tmp72_ = NULL; ViewCollection* _tmp74_ = NULL; ViewCollection* _tmp75_ = NULL; ViewCollection* _tmp76_ = NULL; LibraryPhotoSourceCollection* _tmp77_ = NULL; VideoSourceCollection* _tmp78_ = NULL; #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" _tmp0_ = object_id; #line 181 "/home/jens/Source/shotwell/src/Event.vala" self = (Event*) event_source_construct (object_type, _tmp0_); #line 184 "/home/jens/Source/shotwell/src/Event.vala" _tmp1_ = event_row; #line 184 "/home/jens/Source/shotwell/src/Event.vala" _tmp2_ = event_row; #line 184 "/home/jens/Source/shotwell/src/Event.vala" _tmp3_ = _tmp2_->name; #line 184 "/home/jens/Source/shotwell/src/Event.vala" _tmp4_ = event_prep_event_name (_tmp3_); #line 184 "/home/jens/Source/shotwell/src/Event.vala" _g_free0 (_tmp1_->name); #line 184 "/home/jens/Source/shotwell/src/Event.vala" _tmp1_->name = _tmp4_; #line 186 "/home/jens/Source/shotwell/src/Event.vala" _tmp5_ = event_row; #line 186 "/home/jens/Source/shotwell/src/Event.vala" _tmp6_ = _tmp5_->event_id; #line 186 "/home/jens/Source/shotwell/src/Event.vala" self->priv->event_id = _tmp6_; #line 187 "/home/jens/Source/shotwell/src/Event.vala" _tmp7_ = event_row; #line 187 "/home/jens/Source/shotwell/src/Event.vala" _tmp8_ = _tmp7_->name; #line 187 "/home/jens/Source/shotwell/src/Event.vala" _tmp9_ = g_strdup (_tmp8_); #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 = _tmp9_; #line 188 "/home/jens/Source/shotwell/src/Event.vala" _tmp10_ = event_row; #line 188 "/home/jens/Source/shotwell/src/Event.vala" _tmp11_ = _tmp10_->comment; #line 188 "/home/jens/Source/shotwell/src/Event.vala" _tmp12_ = g_strdup (_tmp11_); #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 = _tmp12_; #line 190 "/home/jens/Source/shotwell/src/Event.vala" _tmp13_ = media_collection_registry_get_instance (); #line 190 "/home/jens/Source/shotwell/src/Event.vala" _tmp14_ = _tmp13_; #line 190 "/home/jens/Source/shotwell/src/Event.vala" _tmp15_ = self->priv->event_id; #line 190 "/home/jens/Source/shotwell/src/Event.vala" _tmp16_ = media_collection_registry_get_source_ids_for_event_id (_tmp14_, &_tmp15_); #line 190 "/home/jens/Source/shotwell/src/Event.vala" _tmp17_ = _tmp16_; #line 190 "/home/jens/Source/shotwell/src/Event.vala" _media_collection_registry_unref0 (_tmp14_); #line 190 "/home/jens/Source/shotwell/src/Event.vala" event_source_ids = _tmp17_; #line 192 "/home/jens/Source/shotwell/src/Event.vala" _tmp18_ = gee_array_list_new (TYPE_THUMBNAIL_VIEW, (GBoxedCopyFunc) g_object_ref, g_object_unref, NULL, NULL, NULL); #line 192 "/home/jens/Source/shotwell/src/Event.vala" event_thumbs = _tmp18_; #line 1996 "Event.c" { GeeIterator* _current_source_id_it = NULL; GeeCollection* _tmp19_ = NULL; GeeIterator* _tmp20_ = NULL; #line 193 "/home/jens/Source/shotwell/src/Event.vala" _tmp19_ = event_source_ids; #line 193 "/home/jens/Source/shotwell/src/Event.vala" _tmp20_ = gee_iterable_iterator (G_TYPE_CHECK_INSTANCE_CAST (_tmp19_, GEE_TYPE_ITERABLE, GeeIterable)); #line 193 "/home/jens/Source/shotwell/src/Event.vala" _current_source_id_it = _tmp20_; #line 193 "/home/jens/Source/shotwell/src/Event.vala" while (TRUE) { #line 2009 "Event.c" GeeIterator* _tmp21_ = NULL; gboolean _tmp22_ = FALSE; gchar* current_source_id = NULL; GeeIterator* _tmp23_ = NULL; gpointer _tmp24_ = NULL; MediaSource* media = NULL; MediaCollectionRegistry* _tmp25_ = NULL; MediaCollectionRegistry* _tmp26_ = NULL; const gchar* _tmp27_ = NULL; MediaSource* _tmp28_ = NULL; MediaSource* _tmp29_ = NULL; MediaSource* _tmp30_ = NULL; #line 193 "/home/jens/Source/shotwell/src/Event.vala" _tmp21_ = _current_source_id_it; #line 193 "/home/jens/Source/shotwell/src/Event.vala" _tmp22_ = gee_iterator_next (_tmp21_); #line 193 "/home/jens/Source/shotwell/src/Event.vala" if (!_tmp22_) { #line 193 "/home/jens/Source/shotwell/src/Event.vala" break; #line 2030 "Event.c" } #line 193 "/home/jens/Source/shotwell/src/Event.vala" _tmp23_ = _current_source_id_it; #line 193 "/home/jens/Source/shotwell/src/Event.vala" _tmp24_ = gee_iterator_get (_tmp23_); #line 193 "/home/jens/Source/shotwell/src/Event.vala" current_source_id = (gchar*) _tmp24_; #line 194 "/home/jens/Source/shotwell/src/Event.vala" _tmp25_ = media_collection_registry_get_instance (); #line 194 "/home/jens/Source/shotwell/src/Event.vala" _tmp26_ = _tmp25_; #line 194 "/home/jens/Source/shotwell/src/Event.vala" _tmp27_ = current_source_id; #line 194 "/home/jens/Source/shotwell/src/Event.vala" _tmp28_ = media_collection_registry_fetch_media (_tmp26_, _tmp27_); #line 194 "/home/jens/Source/shotwell/src/Event.vala" _tmp29_ = _tmp28_; #line 194 "/home/jens/Source/shotwell/src/Event.vala" _media_collection_registry_unref0 (_tmp26_); #line 194 "/home/jens/Source/shotwell/src/Event.vala" media = _tmp29_; #line 196 "/home/jens/Source/shotwell/src/Event.vala" _tmp30_ = media; #line 196 "/home/jens/Source/shotwell/src/Event.vala" if (_tmp30_ != NULL) { #line 2056 "Event.c" GeeArrayList* _tmp31_ = NULL; MediaSource* _tmp32_ = NULL; ThumbnailView* _tmp33_ = NULL; ThumbnailView* _tmp34_ = NULL; #line 197 "/home/jens/Source/shotwell/src/Event.vala" _tmp31_ = event_thumbs; #line 197 "/home/jens/Source/shotwell/src/Event.vala" _tmp32_ = media; #line 197 "/home/jens/Source/shotwell/src/Event.vala" _tmp33_ = thumbnail_view_new (G_TYPE_CHECK_INSTANCE_CAST (_tmp32_, TYPE_THUMBNAIL_SOURCE, ThumbnailSource)); #line 197 "/home/jens/Source/shotwell/src/Event.vala" _tmp34_ = _tmp33_; #line 197 "/home/jens/Source/shotwell/src/Event.vala" gee_abstract_collection_add (G_TYPE_CHECK_INSTANCE_CAST (_tmp31_, GEE_TYPE_ABSTRACT_COLLECTION, GeeAbstractCollection), _tmp34_); #line 197 "/home/jens/Source/shotwell/src/Event.vala" _g_object_unref0 (_tmp34_); #line 2073 "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 2079 "Event.c" } #line 193 "/home/jens/Source/shotwell/src/Event.vala" _g_object_unref0 (_current_source_id_it); #line 2083 "Event.c" } #line 200 "/home/jens/Source/shotwell/src/Event.vala" _tmp35_ = self->priv->event_id; #line 200 "/home/jens/Source/shotwell/src/Event.vala" _tmp36_ = _tmp35_.id; #line 200 "/home/jens/Source/shotwell/src/Event.vala" _tmp37_ = g_strdup_printf ("%" G_GINT64_FORMAT, _tmp36_); #line 200 "/home/jens/Source/shotwell/src/Event.vala" _tmp38_ = _tmp37_; #line 200 "/home/jens/Source/shotwell/src/Event.vala" _tmp39_ = g_strdup_printf ("ViewCollection for Event %s", _tmp38_); #line 200 "/home/jens/Source/shotwell/src/Event.vala" _tmp40_ = _tmp39_; #line 200 "/home/jens/Source/shotwell/src/Event.vala" _tmp41_ = view_collection_new (_tmp40_); #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 = _tmp41_; #line 200 "/home/jens/Source/shotwell/src/Event.vala" _g_free0 (_tmp40_); #line 200 "/home/jens/Source/shotwell/src/Event.vala" _g_free0 (_tmp38_); #line 201 "/home/jens/Source/shotwell/src/Event.vala" _tmp42_ = self->priv->view; #line 201 "/home/jens/Source/shotwell/src/Event.vala" data_collection_set_comparator (G_TYPE_CHECK_INSTANCE_CAST (_tmp42_, 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" _tmp43_ = self->priv->view; #line 202 "/home/jens/Source/shotwell/src/Event.vala" _tmp44_ = event_thumbs; #line 202 "/home/jens/Source/shotwell/src/Event.vala" _tmp45_ = data_collection_add_many (G_TYPE_CHECK_INSTANCE_CAST (_tmp43_, TYPE_DATA_COLLECTION, DataCollection), G_TYPE_CHECK_INSTANCE_CAST (_tmp44_, GEE_TYPE_COLLECTION, GeeCollection), NULL, NULL); #line 202 "/home/jens/Source/shotwell/src/Event.vala" _tmp46_ = _tmp45_; #line 202 "/home/jens/Source/shotwell/src/Event.vala" _g_object_unref0 (_tmp46_); #line 206 "/home/jens/Source/shotwell/src/Event.vala" _tmp47_ = event_thumbs; #line 206 "/home/jens/Source/shotwell/src/Event.vala" _tmp48_ = gee_abstract_collection_get_size (G_TYPE_CHECK_INSTANCE_CAST (_tmp47_, GEE_TYPE_COLLECTION, GeeCollection)); #line 206 "/home/jens/Source/shotwell/src/Event.vala" _tmp49_ = _tmp48_; #line 206 "/home/jens/Source/shotwell/src/Event.vala" if (_tmp49_ > 0) { #line 2129 "Event.c" EventSourceCollection* _tmp50_ = NULL; GeeArrayList* _tmp51_ = NULL; EventSourceCollection* _tmp52_ = NULL; GeeArrayList* _tmp53_ = NULL; #line 207 "/home/jens/Source/shotwell/src/Event.vala" _tmp50_ = event_global; #line 207 "/home/jens/Source/shotwell/src/Event.vala" _tmp51_ = event_thumbs; #line 207 "/home/jens/Source/shotwell/src/Event.vala" container_source_collection_notify_container_contents_added (G_TYPE_CHECK_INSTANCE_CAST (_tmp50_, TYPE_CONTAINER_SOURCE_COLLECTION, ContainerSourceCollection), G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_CONTAINER_SOURCE, ContainerSource), G_TYPE_CHECK_INSTANCE_CAST (_tmp51_, GEE_TYPE_COLLECTION, GeeCollection), FALSE); #line 208 "/home/jens/Source/shotwell/src/Event.vala" _tmp52_ = event_global; #line 208 "/home/jens/Source/shotwell/src/Event.vala" _tmp53_ = event_thumbs; #line 208 "/home/jens/Source/shotwell/src/Event.vala" container_source_collection_notify_container_contents_altered (G_TYPE_CHECK_INSTANCE_CAST (_tmp52_, TYPE_CONTAINER_SOURCE_COLLECTION, ContainerSourceCollection), G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_CONTAINER_SOURCE, ContainerSource), G_TYPE_CHECK_INSTANCE_CAST (_tmp53_, GEE_TYPE_COLLECTION, GeeCollection), FALSE, NULL, FALSE); #line 2146 "Event.c" } #line 213 "/home/jens/Source/shotwell/src/Event.vala" _tmp54_ = media_collection_registry_get_instance (); #line 213 "/home/jens/Source/shotwell/src/Event.vala" _tmp55_ = _tmp54_; #line 213 "/home/jens/Source/shotwell/src/Event.vala" _tmp56_ = event_row; #line 213 "/home/jens/Source/shotwell/src/Event.vala" _tmp57_ = _tmp56_->primary_source_id; #line 213 "/home/jens/Source/shotwell/src/Event.vala" _tmp58_ = media_collection_registry_fetch_media (_tmp55_, _tmp57_); #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 = _tmp58_; #line 213 "/home/jens/Source/shotwell/src/Event.vala" _media_collection_registry_unref0 (_tmp55_); #line 214 "/home/jens/Source/shotwell/src/Event.vala" _tmp60_ = self->priv->primary_source; #line 214 "/home/jens/Source/shotwell/src/Event.vala" if (_tmp60_ == NULL) { #line 2168 "Event.c" ViewCollection* _tmp61_ = NULL; gint _tmp62_ = 0; #line 214 "/home/jens/Source/shotwell/src/Event.vala" _tmp61_ = self->priv->view; #line 214 "/home/jens/Source/shotwell/src/Event.vala" _tmp62_ = data_collection_get_count (G_TYPE_CHECK_INSTANCE_CAST (_tmp61_, TYPE_DATA_COLLECTION, DataCollection)); #line 214 "/home/jens/Source/shotwell/src/Event.vala" _tmp59_ = _tmp62_ > 0; #line 2177 "Event.c" } else { #line 214 "/home/jens/Source/shotwell/src/Event.vala" _tmp59_ = FALSE; #line 2181 "Event.c" } #line 214 "/home/jens/Source/shotwell/src/Event.vala" if (_tmp59_) { #line 2185 "Event.c" ViewCollection* _tmp63_ = NULL; DataView* _tmp64_ = NULL; DataView* _tmp65_ = NULL; DataSource* _tmp66_ = NULL; EventTable* _tmp67_ = NULL; EventID _tmp68_ = {0}; MediaSource* _tmp69_ = NULL; gchar* _tmp70_ = NULL; gchar* _tmp71_ = NULL; #line 215 "/home/jens/Source/shotwell/src/Event.vala" _tmp63_ = self->priv->view; #line 215 "/home/jens/Source/shotwell/src/Event.vala" _tmp64_ = view_collection_get_first_unrejected (_tmp63_); #line 215 "/home/jens/Source/shotwell/src/Event.vala" _tmp65_ = G_TYPE_CHECK_INSTANCE_CAST (_tmp64_, TYPE_DATA_VIEW, DataView); #line 215 "/home/jens/Source/shotwell/src/Event.vala" _tmp66_ = data_view_get_source (_tmp65_); #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 (_tmp66_, TYPE_MEDIA_SOURCE, MediaSource); #line 215 "/home/jens/Source/shotwell/src/Event.vala" _g_object_unref0 (_tmp65_); #line 216 "/home/jens/Source/shotwell/src/Event.vala" _tmp67_ = event_event_table; #line 216 "/home/jens/Source/shotwell/src/Event.vala" _tmp68_ = self->priv->event_id; #line 216 "/home/jens/Source/shotwell/src/Event.vala" _tmp69_ = self->priv->primary_source; #line 216 "/home/jens/Source/shotwell/src/Event.vala" _tmp70_ = data_source_get_source_id (G_TYPE_CHECK_INSTANCE_CAST (_tmp69_, TYPE_DATA_SOURCE, DataSource)); #line 216 "/home/jens/Source/shotwell/src/Event.vala" _tmp71_ = _tmp70_; #line 216 "/home/jens/Source/shotwell/src/Event.vala" event_table_set_primary_source_id (_tmp67_, &_tmp68_, _tmp71_); #line 216 "/home/jens/Source/shotwell/src/Event.vala" _g_free0 (_tmp71_); #line 2223 "Event.c" } #line 220 "/home/jens/Source/shotwell/src/Event.vala" _tmp72_ = self->priv->primary_source; #line 220 "/home/jens/Source/shotwell/src/Event.vala" if (_tmp72_ != NULL) { #line 2229 "Event.c" MediaSource* _tmp73_ = NULL; #line 221 "/home/jens/Source/shotwell/src/Event.vala" _tmp73_ = self->priv->primary_source; #line 221 "/home/jens/Source/shotwell/src/Event.vala" g_signal_connect_object (G_TYPE_CHECK_INSTANCE_CAST (_tmp73_, TYPE_THUMBNAIL_SOURCE, ThumbnailSource), "thumbnail-altered", (GCallback) _event_on_primary_thumbnail_altered_thumbnail_source_thumbnail_altered, self, 0); #line 2235 "Event.c" } #line 224 "/home/jens/Source/shotwell/src/Event.vala" _tmp74_ = self->priv->view; #line 224 "/home/jens/Source/shotwell/src/Event.vala" g_signal_connect_object (G_TYPE_CHECK_INSTANCE_CAST (_tmp74_, 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" _tmp75_ = self->priv->view; #line 225 "/home/jens/Source/shotwell/src/Event.vala" g_signal_connect_object (G_TYPE_CHECK_INSTANCE_CAST (_tmp75_, 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" _tmp76_ = self->priv->view; #line 226 "/home/jens/Source/shotwell/src/Event.vala" g_signal_connect_object (G_TYPE_CHECK_INSTANCE_CAST (_tmp76_, 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" _tmp77_ = library_photo_global; #line 230 "/home/jens/Source/shotwell/src/Event.vala" g_signal_connect_object (G_TYPE_CHECK_INSTANCE_CAST (_tmp77_, 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" _tmp78_ = video_global; #line 231 "/home/jens/Source/shotwell/src/Event.vala" g_signal_connect_object (G_TYPE_CHECK_INSTANCE_CAST (_tmp78_, 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 2265 "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 2272 "Event.c" } static gchar* event_real_get_typename (DataSource* base) { Event * self; gchar* result = NULL; gchar* _tmp0_ = NULL; #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 2288 "Event.c" } static gint64 event_real_get_instance_id (DataSource* base) { Event * self; gint64 result = 0LL; EventID _tmp0_ = {0}; gint64 _tmp1_ = 0LL; #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 2307 "Event.c" } static gchar* event_real_get_representative_id (ThumbnailSource* base) { Event * self; gchar* result = NULL; gchar* _tmp0_ = NULL; MediaSource* _tmp1_ = NULL; #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 2322 "Event.c" MediaSource* _tmp2_ = NULL; gchar* _tmp3_ = NULL; #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 2333 "Event.c" } else { gchar* _tmp4_ = NULL; #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 2342 "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 2348 "Event.c" } static PhotoFileFormat event_real_get_preferred_thumbnail_format (ThumbnailSource* base) { Event * self; PhotoFileFormat result = 0; PhotoFileFormat _tmp0_ = 0; MediaSource* _tmp1_ = NULL; #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 2363 "Event.c" MediaSource* _tmp2_ = NULL; PhotoFileFormat _tmp3_ = 0; #line 261 "/home/jens/Source/shotwell/src/Event.vala" _tmp2_ = self->priv->primary_source; #line 261 "/home/jens/Source/shotwell/src/Event.vala" _tmp3_ = thumbnail_source_get_preferred_thumbnail_format (G_TYPE_CHECK_INSTANCE_CAST (_tmp2_, TYPE_THUMBNAIL_SOURCE, ThumbnailSource)); #line 261 "/home/jens/Source/shotwell/src/Event.vala" _tmp0_ = _tmp3_; #line 2372 "Event.c" } else { PhotoFileFormat _tmp4_ = 0; #line 262 "/home/jens/Source/shotwell/src/Event.vala" _tmp4_ = photo_file_format_get_system_default_format (); #line 262 "/home/jens/Source/shotwell/src/Event.vala" _tmp0_ = _tmp4_; #line 2379 "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 2385 "Event.c" } static GdkPixbuf* event_real_create_thumbnail (ThumbnailSource* base, gint scale, GError** error) { Event * self; GdkPixbuf* result = NULL; GdkPixbuf* _tmp0_ = NULL; MediaSource* _tmp1_ = NULL; 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 2401 "Event.c" MediaSource* _tmp2_ = NULL; gint _tmp3_ = 0; GdkPixbuf* _tmp4_ = NULL; #line 266 "/home/jens/Source/shotwell/src/Event.vala" _tmp2_ = self->priv->primary_source; #line 266 "/home/jens/Source/shotwell/src/Event.vala" _tmp3_ = scale; #line 266 "/home/jens/Source/shotwell/src/Event.vala" _tmp4_ = thumbnail_source_create_thumbnail (G_TYPE_CHECK_INSTANCE_CAST (_tmp2_, TYPE_THUMBNAIL_SOURCE, ThumbnailSource), _tmp3_, &_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_ = _tmp4_; #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 2423 "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 2430 "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 2436 "Event.c" } void event_init (ProgressMonitor monitor, void* monitor_target) { EventTable* _tmp0_ = NULL; EventSourceCollection* _tmp1_ = NULL; EventSourceCollection* _tmp2_ = NULL; GeeArrayList* events = NULL; GeeArrayList* _tmp3_ = NULL; GeeArrayList* unlinked = NULL; GeeArrayList* _tmp4_ = NULL; GeeArrayList* event_rows = NULL; EventTable* _tmp5_ = NULL; GeeArrayList* _tmp6_ = NULL; gint count = 0; GeeArrayList* _tmp7_ = NULL; gint _tmp8_ = 0; gint _tmp9_ = 0; EventSourceCollection* _tmp32_ = NULL; GeeArrayList* _tmp33_ = NULL; GeeCollection* _tmp34_ = NULL; GeeCollection* _tmp35_ = NULL; EventSourceCollection* _tmp36_ = NULL; GeeArrayList* _tmp37_ = NULL; #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, 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, 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_COLLECTION, GeeCollection)); #line 279 "/home/jens/Source/shotwell/src/Event.vala" _tmp9_ = _tmp8_; #line 279 "/home/jens/Source/shotwell/src/Event.vala" count = _tmp9_; #line 2499 "Event.c" { gint ctr = 0; #line 280 "/home/jens/Source/shotwell/src/Event.vala" ctr = 0; #line 2504 "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 2511 "Event.c" gint _tmp12_ = 0; gint _tmp13_ = 0; Event* event = NULL; GeeArrayList* _tmp14_ = NULL; gint _tmp15_ = 0; gpointer _tmp16_ = NULL; EventRow* _tmp17_ = NULL; Event* _tmp18_ = NULL; Event* _tmp19_ = NULL; ProgressMonitor _tmp20_ = NULL; void* _tmp20__target = NULL; Event* _tmp24_ = NULL; gint _tmp25_ = 0; Event* _tmp28_ = NULL; EventSourceCollection* _tmp29_ = NULL; GeeArrayList* _tmp30_ = NULL; Event* _tmp31_ = NULL; #line 280 "/home/jens/Source/shotwell/src/Event.vala" if (!_tmp10_) { #line 2531 "Event.c" gint _tmp11_ = 0; #line 280 "/home/jens/Source/shotwell/src/Event.vala" _tmp11_ = ctr; #line 280 "/home/jens/Source/shotwell/src/Event.vala" ctr = _tmp11_ + 1; #line 2537 "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 2549 "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" _tmp20_ = monitor; #line 282 "/home/jens/Source/shotwell/src/Event.vala" _tmp20__target = monitor_target; #line 282 "/home/jens/Source/shotwell/src/Event.vala" if (_tmp20_ != NULL) { #line 2573 "Event.c" ProgressMonitor _tmp21_ = NULL; void* _tmp21__target = NULL; gint _tmp22_ = 0; gint _tmp23_ = 0; #line 283 "/home/jens/Source/shotwell/src/Event.vala" _tmp21_ = monitor; #line 283 "/home/jens/Source/shotwell/src/Event.vala" _tmp21__target = monitor_target; #line 283 "/home/jens/Source/shotwell/src/Event.vala" _tmp22_ = ctr; #line 283 "/home/jens/Source/shotwell/src/Event.vala" _tmp23_ = count; #line 283 "/home/jens/Source/shotwell/src/Event.vala" _tmp21_ ((guint64) _tmp22_, (guint64) _tmp23_, TRUE, _tmp21__target); #line 2588 "Event.c" } #line 285 "/home/jens/Source/shotwell/src/Event.vala" _tmp24_ = event; #line 285 "/home/jens/Source/shotwell/src/Event.vala" _tmp25_ = event_source_get_media_count (G_TYPE_CHECK_INSTANCE_CAST (_tmp24_, TYPE_EVENT_SOURCE, EventSource)); #line 285 "/home/jens/Source/shotwell/src/Event.vala" if (_tmp25_ != 0) { #line 2596 "Event.c" GeeArrayList* _tmp26_ = NULL; Event* _tmp27_ = NULL; #line 286 "/home/jens/Source/shotwell/src/Event.vala" _tmp26_ = events; #line 286 "/home/jens/Source/shotwell/src/Event.vala" _tmp27_ = event; #line 286 "/home/jens/Source/shotwell/src/Event.vala" gee_abstract_collection_add (G_TYPE_CHECK_INSTANCE_CAST (_tmp26_, GEE_TYPE_ABSTRACT_COLLECTION, GeeAbstractCollection), _tmp27_); #line 288 "/home/jens/Source/shotwell/src/Event.vala" _g_object_unref0 (event); #line 288 "/home/jens/Source/shotwell/src/Event.vala" continue; #line 2609 "Event.c" } #line 294 "/home/jens/Source/shotwell/src/Event.vala" _tmp28_ = event; #line 294 "/home/jens/Source/shotwell/src/Event.vala" _tmp29_ = event_global; #line 294 "/home/jens/Source/shotwell/src/Event.vala" data_source_rehydrate_backlinks (G_TYPE_CHECK_INSTANCE_CAST (_tmp28_, TYPE_DATA_SOURCE, DataSource), G_TYPE_CHECK_INSTANCE_CAST (_tmp29_, TYPE_SOURCE_COLLECTION, SourceCollection), NULL); #line 295 "/home/jens/Source/shotwell/src/Event.vala" _tmp30_ = unlinked; #line 295 "/home/jens/Source/shotwell/src/Event.vala" _tmp31_ = event; #line 295 "/home/jens/Source/shotwell/src/Event.vala" gee_abstract_collection_add (G_TYPE_CHECK_INSTANCE_CAST (_tmp30_, GEE_TYPE_ABSTRACT_COLLECTION, GeeAbstractCollection), _tmp31_); #line 280 "/home/jens/Source/shotwell/src/Event.vala" _g_object_unref0 (event); #line 2625 "Event.c" } } } #line 298 "/home/jens/Source/shotwell/src/Event.vala" _tmp32_ = event_global; #line 298 "/home/jens/Source/shotwell/src/Event.vala" _tmp33_ = events; #line 298 "/home/jens/Source/shotwell/src/Event.vala" _tmp34_ = data_collection_add_many (G_TYPE_CHECK_INSTANCE_CAST (_tmp32_, TYPE_DATA_COLLECTION, DataCollection), G_TYPE_CHECK_INSTANCE_CAST (_tmp33_, GEE_TYPE_COLLECTION, GeeCollection), NULL, NULL); #line 298 "/home/jens/Source/shotwell/src/Event.vala" _tmp35_ = _tmp34_; #line 298 "/home/jens/Source/shotwell/src/Event.vala" _g_object_unref0 (_tmp35_); #line 299 "/home/jens/Source/shotwell/src/Event.vala" _tmp36_ = event_global; #line 299 "/home/jens/Source/shotwell/src/Event.vala" _tmp37_ = unlinked; #line 299 "/home/jens/Source/shotwell/src/Event.vala" container_source_collection_init_add_many_unlinked (G_TYPE_CHECK_INSTANCE_CAST (_tmp36_, TYPE_CONTAINER_SOURCE_COLLECTION, ContainerSourceCollection), G_TYPE_CHECK_INSTANCE_CAST (_tmp37_, 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 2651 "Event.c" } void event_terminate (void) { } static gint64 event_view_comparator (void* a, void* b) { gint64 result = 0LL; void* _tmp0_ = NULL; DataSource* _tmp1_ = NULL; MediaSource* _tmp2_ = NULL; time_t _tmp3_ = 0; void* _tmp4_ = NULL; DataSource* _tmp5_ = NULL; MediaSource* _tmp6_ = NULL; time_t _tmp7_ = 0; gint64 _tmp8_ = 0LL; #line 306 "/home/jens/Source/shotwell/src/Event.vala" _tmp0_ = a; #line 306 "/home/jens/Source/shotwell/src/Event.vala" _tmp1_ = data_view_get_source (G_TYPE_CHECK_INSTANCE_CAST ((ThumbnailView*) _tmp0_, TYPE_DATA_VIEW, DataView)); #line 306 "/home/jens/Source/shotwell/src/Event.vala" _tmp2_ = G_TYPE_CHECK_INSTANCE_CAST (_tmp1_, TYPE_MEDIA_SOURCE, MediaSource); #line 306 "/home/jens/Source/shotwell/src/Event.vala" _tmp3_ = media_source_get_exposure_time (_tmp2_); #line 306 "/home/jens/Source/shotwell/src/Event.vala" _tmp4_ = b; #line 306 "/home/jens/Source/shotwell/src/Event.vala" _tmp5_ = data_view_get_source (G_TYPE_CHECK_INSTANCE_CAST ((ThumbnailView*) _tmp4_, TYPE_DATA_VIEW, DataView)); #line 306 "/home/jens/Source/shotwell/src/Event.vala" _tmp6_ = G_TYPE_CHECK_INSTANCE_CAST (_tmp5_, TYPE_MEDIA_SOURCE, MediaSource); #line 306 "/home/jens/Source/shotwell/src/Event.vala" _tmp7_ = media_source_get_exposure_time (_tmp6_); #line 306 "/home/jens/Source/shotwell/src/Event.vala" _tmp8_ = (gint64) (_tmp3_ - _tmp7_); #line 306 "/home/jens/Source/shotwell/src/Event.vala" _g_object_unref0 (_tmp6_); #line 306 "/home/jens/Source/shotwell/src/Event.vala" _g_object_unref0 (_tmp2_); #line 306 "/home/jens/Source/shotwell/src/Event.vala" result = _tmp8_; #line 306 "/home/jens/Source/shotwell/src/Event.vala" return result; #line 2696 "Event.c" } static gboolean event_view_comparator_predicate (DataObject* object, Alteration* alteration) { gboolean result = FALSE; Alteration* _tmp0_ = NULL; gboolean _tmp1_ = 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" _tmp0_ = alteration; #line 311 "/home/jens/Source/shotwell/src/Event.vala" _tmp1_ = alteration_has_detail (_tmp0_, "metadata", "exposure-time"); #line 311 "/home/jens/Source/shotwell/src/Event.vala" result = _tmp1_; #line 311 "/home/jens/Source/shotwell/src/Event.vala" return result; #line 2716 "Event.c" } gchar* event_prep_event_name (const gchar* name) { gchar* result = NULL; const gchar* _tmp0_ = NULL; gchar* _tmp1_ = NULL; #line 319 "/home/jens/Source/shotwell/src/Event.vala" _tmp0_ = name; #line 319 "/home/jens/Source/shotwell/src/Event.vala" _tmp1_ = prepare_input_text (_tmp0_, (((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 = _tmp1_; #line 319 "/home/jens/Source/shotwell/src/Event.vala" return result; #line 2732 "Event.c" } void event_attach (Event* self, MediaSource* source) { ViewCollection* _tmp0_ = NULL; MediaSource* _tmp1_ = NULL; ThumbnailView* _tmp2_ = NULL; ThumbnailView* _tmp3_ = NULL; #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_ = source; #line 328 "/home/jens/Source/shotwell/src/Event.vala" _tmp2_ = thumbnail_view_new (G_TYPE_CHECK_INSTANCE_CAST (_tmp1_, TYPE_THUMBNAIL_SOURCE, ThumbnailSource)); #line 328 "/home/jens/Source/shotwell/src/Event.vala" _tmp3_ = _tmp2_; #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 (_tmp3_, TYPE_DATA_OBJECT, DataObject)); #line 328 "/home/jens/Source/shotwell/src/Event.vala" _g_object_unref0 (_tmp3_); #line 2757 "Event.c" } void event_attach_many (Event* self, GeeCollection* media) { GeeArrayList* views = NULL; GeeArrayList* _tmp0_ = NULL; ViewCollection* _tmp11_ = NULL; GeeArrayList* _tmp12_ = NULL; GeeCollection* _tmp13_ = NULL; GeeCollection* _tmp14_ = NULL; #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, g_object_unref, NULL, NULL, NULL); #line 332 "/home/jens/Source/shotwell/src/Event.vala" views = _tmp0_; #line 2776 "Event.c" { GeeIterator* _current_source_it = NULL; GeeCollection* _tmp1_ = NULL; GeeIterator* _tmp2_ = NULL; #line 333 "/home/jens/Source/shotwell/src/Event.vala" _tmp1_ = media; #line 333 "/home/jens/Source/shotwell/src/Event.vala" _tmp2_ = gee_iterable_iterator (G_TYPE_CHECK_INSTANCE_CAST (_tmp1_, GEE_TYPE_ITERABLE, GeeIterable)); #line 333 "/home/jens/Source/shotwell/src/Event.vala" _current_source_it = _tmp2_; #line 333 "/home/jens/Source/shotwell/src/Event.vala" while (TRUE) { #line 2789 "Event.c" GeeIterator* _tmp3_ = NULL; gboolean _tmp4_ = FALSE; MediaSource* current_source = NULL; GeeIterator* _tmp5_ = NULL; gpointer _tmp6_ = NULL; GeeArrayList* _tmp7_ = NULL; MediaSource* _tmp8_ = NULL; ThumbnailView* _tmp9_ = NULL; ThumbnailView* _tmp10_ = NULL; #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_next (_tmp3_); #line 333 "/home/jens/Source/shotwell/src/Event.vala" if (!_tmp4_) { #line 333 "/home/jens/Source/shotwell/src/Event.vala" break; #line 2807 "Event.c" } #line 333 "/home/jens/Source/shotwell/src/Event.vala" _tmp5_ = _current_source_it; #line 333 "/home/jens/Source/shotwell/src/Event.vala" _tmp6_ = gee_iterator_get (_tmp5_); #line 333 "/home/jens/Source/shotwell/src/Event.vala" current_source = (MediaSource*) _tmp6_; #line 334 "/home/jens/Source/shotwell/src/Event.vala" _tmp7_ = views; #line 334 "/home/jens/Source/shotwell/src/Event.vala" _tmp8_ = current_source; #line 334 "/home/jens/Source/shotwell/src/Event.vala" _tmp9_ = thumbnail_view_new (G_TYPE_CHECK_INSTANCE_CAST (_tmp8_, TYPE_THUMBNAIL_SOURCE, ThumbnailSource)); #line 334 "/home/jens/Source/shotwell/src/Event.vala" _tmp10_ = _tmp9_; #line 334 "/home/jens/Source/shotwell/src/Event.vala" gee_abstract_collection_add (G_TYPE_CHECK_INSTANCE_CAST (_tmp7_, GEE_TYPE_ABSTRACT_COLLECTION, GeeAbstractCollection), _tmp10_); #line 334 "/home/jens/Source/shotwell/src/Event.vala" _g_object_unref0 (_tmp10_); #line 333 "/home/jens/Source/shotwell/src/Event.vala" _g_object_unref0 (current_source); #line 2829 "Event.c" } #line 333 "/home/jens/Source/shotwell/src/Event.vala" _g_object_unref0 (_current_source_it); #line 2833 "Event.c" } #line 336 "/home/jens/Source/shotwell/src/Event.vala" _tmp11_ = self->priv->view; #line 336 "/home/jens/Source/shotwell/src/Event.vala" _tmp12_ = views; #line 336 "/home/jens/Source/shotwell/src/Event.vala" _tmp13_ = data_collection_add_many (G_TYPE_CHECK_INSTANCE_CAST (_tmp11_, TYPE_DATA_COLLECTION, DataCollection), G_TYPE_CHECK_INSTANCE_CAST (_tmp12_, GEE_TYPE_COLLECTION, GeeCollection), NULL, NULL); #line 336 "/home/jens/Source/shotwell/src/Event.vala" _tmp14_ = _tmp13_; #line 336 "/home/jens/Source/shotwell/src/Event.vala" _g_object_unref0 (_tmp14_); #line 331 "/home/jens/Source/shotwell/src/Event.vala" _g_object_unref0 (views); #line 2847 "Event.c" } void event_detach (Event* self, MediaSource* source) { ViewCollection* _tmp0_ = NULL; ViewCollection* _tmp1_ = NULL; ViewCollection* _tmp2_ = NULL; MediaSource* _tmp3_ = NULL; DataView* _tmp4_ = NULL; DataView* _tmp5_ = NULL; Marker* _tmp6_ = NULL; Marker* _tmp7_ = NULL; #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_ = source; #line 343 "/home/jens/Source/shotwell/src/Event.vala" _tmp4_ = view_collection_get_view_for_source (_tmp2_, G_TYPE_CHECK_INSTANCE_CAST (_tmp3_, TYPE_DATA_SOURCE, DataSource)); #line 343 "/home/jens/Source/shotwell/src/Event.vala" _tmp5_ = _tmp4_; #line 343 "/home/jens/Source/shotwell/src/Event.vala" _tmp6_ = data_collection_mark (G_TYPE_CHECK_INSTANCE_CAST (_tmp1_, TYPE_DATA_COLLECTION, DataCollection), G_TYPE_CHECK_INSTANCE_CAST (_tmp5_, TYPE_DATA_OBJECT, DataObject)); #line 343 "/home/jens/Source/shotwell/src/Event.vala" _tmp7_ = _tmp6_; #line 343 "/home/jens/Source/shotwell/src/Event.vala" data_collection_remove_marked (G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, TYPE_DATA_COLLECTION, DataCollection), _tmp7_); #line 343 "/home/jens/Source/shotwell/src/Event.vala" _g_object_unref0 (_tmp7_); #line 343 "/home/jens/Source/shotwell/src/Event.vala" _g_object_unref0 (_tmp5_); #line 2886 "Event.c" } void event_detach_many (Event* self, GeeCollection* media) { GeeArrayList* views = NULL; GeeArrayList* _tmp0_ = NULL; ViewCollection* _tmp13_ = NULL; ViewCollection* _tmp14_ = NULL; GeeArrayList* _tmp15_ = NULL; Marker* _tmp16_ = NULL; Marker* _tmp17_ = NULL; #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, g_object_unref, NULL, NULL, NULL); #line 347 "/home/jens/Source/shotwell/src/Event.vala" views = _tmp0_; #line 2906 "Event.c" { GeeIterator* _current_source_it = NULL; GeeCollection* _tmp1_ = NULL; GeeIterator* _tmp2_ = NULL; #line 348 "/home/jens/Source/shotwell/src/Event.vala" _tmp1_ = media; #line 348 "/home/jens/Source/shotwell/src/Event.vala" _tmp2_ = gee_iterable_iterator (G_TYPE_CHECK_INSTANCE_CAST (_tmp1_, GEE_TYPE_ITERABLE, GeeIterable)); #line 348 "/home/jens/Source/shotwell/src/Event.vala" _current_source_it = _tmp2_; #line 348 "/home/jens/Source/shotwell/src/Event.vala" while (TRUE) { #line 2919 "Event.c" GeeIterator* _tmp3_ = NULL; gboolean _tmp4_ = FALSE; MediaSource* current_source = NULL; GeeIterator* _tmp5_ = NULL; gpointer _tmp6_ = NULL; ThumbnailView* view = NULL; ViewCollection* _tmp7_ = NULL; MediaSource* _tmp8_ = NULL; DataView* _tmp9_ = NULL; ThumbnailView* _tmp10_ = NULL; #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_next (_tmp3_); #line 348 "/home/jens/Source/shotwell/src/Event.vala" if (!_tmp4_) { #line 348 "/home/jens/Source/shotwell/src/Event.vala" break; #line 2938 "Event.c" } #line 348 "/home/jens/Source/shotwell/src/Event.vala" _tmp5_ = _current_source_it; #line 348 "/home/jens/Source/shotwell/src/Event.vala" _tmp6_ = gee_iterator_get (_tmp5_); #line 348 "/home/jens/Source/shotwell/src/Event.vala" current_source = (MediaSource*) _tmp6_; #line 349 "/home/jens/Source/shotwell/src/Event.vala" _tmp7_ = self->priv->view; #line 349 "/home/jens/Source/shotwell/src/Event.vala" _tmp8_ = current_source; #line 349 "/home/jens/Source/shotwell/src/Event.vala" _tmp9_ = view_collection_get_view_for_source (_tmp7_, G_TYPE_CHECK_INSTANCE_CAST (_tmp8_, TYPE_DATA_SOURCE, DataSource)); #line 349 "/home/jens/Source/shotwell/src/Event.vala" view = G_TYPE_CHECK_INSTANCE_CAST (_tmp9_, TYPE_THUMBNAIL_VIEW, ThumbnailView); #line 350 "/home/jens/Source/shotwell/src/Event.vala" _tmp10_ = view; #line 350 "/home/jens/Source/shotwell/src/Event.vala" if (_tmp10_ != NULL) { #line 2958 "Event.c" GeeArrayList* _tmp11_ = NULL; ThumbnailView* _tmp12_ = NULL; #line 351 "/home/jens/Source/shotwell/src/Event.vala" _tmp11_ = views; #line 351 "/home/jens/Source/shotwell/src/Event.vala" _tmp12_ = view; #line 351 "/home/jens/Source/shotwell/src/Event.vala" gee_abstract_collection_add (G_TYPE_CHECK_INSTANCE_CAST (_tmp11_, GEE_TYPE_ABSTRACT_COLLECTION, GeeAbstractCollection), _tmp12_); #line 2967 "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 2973 "Event.c" } #line 348 "/home/jens/Source/shotwell/src/Event.vala" _g_object_unref0 (_current_source_it); #line 2977 "Event.c" } #line 354 "/home/jens/Source/shotwell/src/Event.vala" _tmp13_ = self->priv->view; #line 354 "/home/jens/Source/shotwell/src/Event.vala" _tmp14_ = self->priv->view; #line 354 "/home/jens/Source/shotwell/src/Event.vala" _tmp15_ = views; #line 354 "/home/jens/Source/shotwell/src/Event.vala" _tmp16_ = data_collection_mark_many (G_TYPE_CHECK_INSTANCE_CAST (_tmp14_, TYPE_DATA_COLLECTION, DataCollection), G_TYPE_CHECK_INSTANCE_CAST (_tmp15_, GEE_TYPE_COLLECTION, GeeCollection)); #line 354 "/home/jens/Source/shotwell/src/Event.vala" _tmp17_ = _tmp16_; #line 354 "/home/jens/Source/shotwell/src/Event.vala" data_collection_remove_marked (G_TYPE_CHECK_INSTANCE_CAST (_tmp13_, TYPE_DATA_COLLECTION, DataCollection), _tmp17_); #line 354 "/home/jens/Source/shotwell/src/Event.vala" _g_object_unref0 (_tmp17_); #line 346 "/home/jens/Source/shotwell/src/Event.vala" _g_object_unref0 (views); #line 2995 "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 3005 "Event.c" { GeeIterator* _media_it = NULL; GeeCollection* _tmp0_ = NULL; GeeCollection* _tmp1_ = NULL; GeeIterator* _tmp2_ = NULL; GeeIterator* _tmp3_ = NULL; #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 3026 "Event.c" GeeIterator* _tmp4_ = NULL; gboolean _tmp5_ = FALSE; MediaSource* media = NULL; GeeIterator* _tmp6_ = NULL; gpointer _tmp7_ = NULL; MediaSource* _tmp8_ = NULL; gchar* _tmp9_ = NULL; gchar* _tmp10_ = NULL; const gchar* _tmp11_ = NULL; gboolean _tmp12_ = FALSE; #line 361 "/home/jens/Source/shotwell/src/Event.vala" _tmp4_ = _media_it; #line 361 "/home/jens/Source/shotwell/src/Event.vala" _tmp5_ = gee_iterator_next (_tmp4_); #line 361 "/home/jens/Source/shotwell/src/Event.vala" if (!_tmp5_) { #line 361 "/home/jens/Source/shotwell/src/Event.vala" break; #line 3045 "Event.c" } #line 361 "/home/jens/Source/shotwell/src/Event.vala" _tmp6_ = _media_it; #line 361 "/home/jens/Source/shotwell/src/Event.vala" _tmp7_ = gee_iterator_get (_tmp6_); #line 361 "/home/jens/Source/shotwell/src/Event.vala" media = (MediaSource*) _tmp7_; #line 362 "/home/jens/Source/shotwell/src/Event.vala" _tmp8_ = media; #line 362 "/home/jens/Source/shotwell/src/Event.vala" _tmp9_ = data_source_get_typename (G_TYPE_CHECK_INSTANCE_CAST (_tmp8_, TYPE_DATA_SOURCE, DataSource)); #line 362 "/home/jens/Source/shotwell/src/Event.vala" _tmp10_ = _tmp9_; #line 362 "/home/jens/Source/shotwell/src/Event.vala" _tmp11_ = media_type; #line 362 "/home/jens/Source/shotwell/src/Event.vala" _tmp12_ = g_strcmp0 (_tmp10_, _tmp11_) == 0; #line 362 "/home/jens/Source/shotwell/src/Event.vala" _g_free0 (_tmp10_); #line 362 "/home/jens/Source/shotwell/src/Event.vala" if (_tmp12_) { #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 3075 "Event.c" } #line 361 "/home/jens/Source/shotwell/src/Event.vala" _g_object_unref0 (media); #line 3079 "Event.c" } #line 361 "/home/jens/Source/shotwell/src/Event.vala" _g_object_unref0 (_media_it); #line 3083 "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 3089 "Event.c" } static GeeArrayList* event_views_to_media (Event* self, GeeIterable* views) { GeeArrayList* result = NULL; GeeArrayList* media = NULL; GeeArrayList* _tmp0_ = NULL; #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, g_object_unref, NULL, NULL, NULL); #line 370 "/home/jens/Source/shotwell/src/Event.vala" media = _tmp0_; #line 3105 "Event.c" { GeeIterator* _object_it = NULL; GeeIterable* _tmp1_ = NULL; GeeIterator* _tmp2_ = NULL; #line 371 "/home/jens/Source/shotwell/src/Event.vala" _tmp1_ = views; #line 371 "/home/jens/Source/shotwell/src/Event.vala" _tmp2_ = gee_iterable_iterator (_tmp1_); #line 371 "/home/jens/Source/shotwell/src/Event.vala" _object_it = _tmp2_; #line 371 "/home/jens/Source/shotwell/src/Event.vala" while (TRUE) { #line 3118 "Event.c" GeeIterator* _tmp3_ = NULL; gboolean _tmp4_ = FALSE; DataObject* object = NULL; GeeIterator* _tmp5_ = NULL; gpointer _tmp6_ = NULL; GeeArrayList* _tmp7_ = NULL; DataObject* _tmp8_ = NULL; DataSource* _tmp9_ = NULL; MediaSource* _tmp10_ = NULL; #line 371 "/home/jens/Source/shotwell/src/Event.vala" _tmp3_ = _object_it; #line 371 "/home/jens/Source/shotwell/src/Event.vala" _tmp4_ = gee_iterator_next (_tmp3_); #line 371 "/home/jens/Source/shotwell/src/Event.vala" if (!_tmp4_) { #line 371 "/home/jens/Source/shotwell/src/Event.vala" break; #line 3136 "Event.c" } #line 371 "/home/jens/Source/shotwell/src/Event.vala" _tmp5_ = _object_it; #line 371 "/home/jens/Source/shotwell/src/Event.vala" _tmp6_ = gee_iterator_get (_tmp5_); #line 371 "/home/jens/Source/shotwell/src/Event.vala" object = (DataObject*) _tmp6_; #line 372 "/home/jens/Source/shotwell/src/Event.vala" _tmp7_ = media; #line 372 "/home/jens/Source/shotwell/src/Event.vala" _tmp8_ = object; #line 372 "/home/jens/Source/shotwell/src/Event.vala" _tmp9_ = data_view_get_source (G_TYPE_CHECK_INSTANCE_CAST (_tmp8_, TYPE_DATA_VIEW, DataView)); #line 372 "/home/jens/Source/shotwell/src/Event.vala" _tmp10_ = G_TYPE_CHECK_INSTANCE_CAST (_tmp9_, TYPE_MEDIA_SOURCE, MediaSource); #line 372 "/home/jens/Source/shotwell/src/Event.vala" gee_abstract_collection_add (G_TYPE_CHECK_INSTANCE_CAST (_tmp7_, GEE_TYPE_ABSTRACT_COLLECTION, GeeAbstractCollection), _tmp10_); #line 372 "/home/jens/Source/shotwell/src/Event.vala" _g_object_unref0 (_tmp10_); #line 371 "/home/jens/Source/shotwell/src/Event.vala" _g_object_unref0 (object); #line 3158 "Event.c" } #line 371 "/home/jens/Source/shotwell/src/Event.vala" _g_object_unref0 (_object_it); #line 3162 "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 3168 "Event.c" } static void event_on_media_added (Event* self, GeeIterable* added) { GeeCollection* media = NULL; GeeIterable* _tmp0_ = NULL; GeeArrayList* _tmp1_ = NULL; EventSourceCollection* _tmp2_ = NULL; gboolean _tmp3_ = FALSE; EventSourceCollection* _tmp4_ = NULL; gboolean _tmp5_ = FALSE; Alteration* _tmp6_ = NULL; Alteration* _tmp7_ = NULL; #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_ = added; #line 378 "/home/jens/Source/shotwell/src/Event.vala" _tmp1_ = event_views_to_media (self, _tmp0_); #line 378 "/home/jens/Source/shotwell/src/Event.vala" media = G_TYPE_CHECK_INSTANCE_CAST (_tmp1_, GEE_TYPE_COLLECTION, GeeCollection); #line 379 "/home/jens/Source/shotwell/src/Event.vala" _tmp2_ = event_global; #line 379 "/home/jens/Source/shotwell/src/Event.vala" _tmp3_ = self->priv->relinking; #line 379 "/home/jens/Source/shotwell/src/Event.vala" container_source_collection_notify_container_contents_added (G_TYPE_CHECK_INSTANCE_CAST (_tmp2_, TYPE_CONTAINER_SOURCE_COLLECTION, ContainerSourceCollection), G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_CONTAINER_SOURCE, ContainerSource), media, _tmp3_); #line 380 "/home/jens/Source/shotwell/src/Event.vala" _tmp4_ = event_global; #line 380 "/home/jens/Source/shotwell/src/Event.vala" _tmp5_ = self->priv->relinking; #line 380 "/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), media, _tmp5_, NULL, FALSE); #line 382 "/home/jens/Source/shotwell/src/Event.vala" _tmp6_ = alteration_new_from_list ("contents:added, metadata:time"); #line 382 "/home/jens/Source/shotwell/src/Event.vala" _tmp7_ = _tmp6_; #line 382 "/home/jens/Source/shotwell/src/Event.vala" data_object_notify_altered (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_DATA_OBJECT, DataObject), _tmp7_); #line 382 "/home/jens/Source/shotwell/src/Event.vala" _alteration_unref0 (_tmp7_); #line 377 "/home/jens/Source/shotwell/src/Event.vala" _g_object_unref0 (media); #line 3214 "Event.c" } static void event_on_media_removed (Event* self, GeeIterable* removed) { GeeArrayList* media = NULL; GeeIterable* _tmp0_ = NULL; GeeArrayList* _tmp1_ = NULL; EventSourceCollection* _tmp2_ = NULL; GeeArrayList* _tmp3_ = NULL; gboolean _tmp4_ = FALSE; EventSourceCollection* _tmp5_ = NULL; GeeArrayList* _tmp6_ = NULL; gboolean _tmp7_ = FALSE; gint _tmp27_ = 0; Alteration* _tmp29_ = NULL; Alteration* _tmp30_ = NULL; #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_ = removed; #line 387 "/home/jens/Source/shotwell/src/Event.vala" _tmp1_ = event_views_to_media (self, _tmp0_); #line 387 "/home/jens/Source/shotwell/src/Event.vala" media = _tmp1_; #line 389 "/home/jens/Source/shotwell/src/Event.vala" _tmp2_ = event_global; #line 389 "/home/jens/Source/shotwell/src/Event.vala" _tmp3_ = media; #line 389 "/home/jens/Source/shotwell/src/Event.vala" _tmp4_ = self->priv->unlinking; #line 389 "/home/jens/Source/shotwell/src/Event.vala" container_source_collection_notify_container_contents_removed (G_TYPE_CHECK_INSTANCE_CAST (_tmp2_, TYPE_CONTAINER_SOURCE_COLLECTION, ContainerSourceCollection), G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_CONTAINER_SOURCE, ContainerSource), G_TYPE_CHECK_INSTANCE_CAST (_tmp3_, GEE_TYPE_COLLECTION, GeeCollection), _tmp4_); #line 390 "/home/jens/Source/shotwell/src/Event.vala" _tmp5_ = event_global; #line 390 "/home/jens/Source/shotwell/src/Event.vala" _tmp6_ = media; #line 390 "/home/jens/Source/shotwell/src/Event.vala" _tmp7_ = self->priv->unlinking; #line 390 "/home/jens/Source/shotwell/src/Event.vala" container_source_collection_notify_container_contents_altered (G_TYPE_CHECK_INSTANCE_CAST (_tmp5_, TYPE_CONTAINER_SOURCE_COLLECTION, ContainerSourceCollection), G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_CONTAINER_SOURCE, ContainerSource), NULL, FALSE, G_TYPE_CHECK_INSTANCE_CAST (_tmp6_, GEE_TYPE_COLLECTION, GeeCollection), _tmp7_); #line 3257 "Event.c" { GeeArrayList* _current_source_list = NULL; GeeArrayList* _tmp8_ = NULL; GeeArrayList* _tmp9_ = NULL; gint _current_source_size = 0; GeeArrayList* _tmp10_ = NULL; gint _tmp11_ = 0; gint _tmp12_ = 0; gint _current_source_index = 0; #line 393 "/home/jens/Source/shotwell/src/Event.vala" _tmp8_ = media; #line 393 "/home/jens/Source/shotwell/src/Event.vala" _tmp9_ = _g_object_ref0 (_tmp8_); #line 393 "/home/jens/Source/shotwell/src/Event.vala" _current_source_list = _tmp9_; #line 393 "/home/jens/Source/shotwell/src/Event.vala" _tmp10_ = _current_source_list; #line 393 "/home/jens/Source/shotwell/src/Event.vala" _tmp11_ = gee_abstract_collection_get_size (G_TYPE_CHECK_INSTANCE_CAST (_tmp10_, GEE_TYPE_COLLECTION, GeeCollection)); #line 393 "/home/jens/Source/shotwell/src/Event.vala" _tmp12_ = _tmp11_; #line 393 "/home/jens/Source/shotwell/src/Event.vala" _current_source_size = _tmp12_; #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 3285 "Event.c" gint _tmp13_ = 0; gint _tmp14_ = 0; gint _tmp15_ = 0; MediaSource* current_source = NULL; GeeArrayList* _tmp16_ = NULL; gint _tmp17_ = 0; gpointer _tmp18_ = NULL; MediaSource* _tmp19_ = NULL; MediaSource* _tmp20_ = NULL; #line 393 "/home/jens/Source/shotwell/src/Event.vala" _tmp13_ = _current_source_index; #line 393 "/home/jens/Source/shotwell/src/Event.vala" _current_source_index = _tmp13_ + 1; #line 393 "/home/jens/Source/shotwell/src/Event.vala" _tmp14_ = _current_source_index; #line 393 "/home/jens/Source/shotwell/src/Event.vala" _tmp15_ = _current_source_size; #line 393 "/home/jens/Source/shotwell/src/Event.vala" if (!(_tmp14_ < _tmp15_)) { #line 393 "/home/jens/Source/shotwell/src/Event.vala" break; #line 3307 "Event.c" } #line 393 "/home/jens/Source/shotwell/src/Event.vala" _tmp16_ = _current_source_list; #line 393 "/home/jens/Source/shotwell/src/Event.vala" _tmp17_ = _current_source_index; #line 393 "/home/jens/Source/shotwell/src/Event.vala" _tmp18_ = gee_abstract_list_get (G_TYPE_CHECK_INSTANCE_CAST (_tmp16_, GEE_TYPE_ABSTRACT_LIST, GeeAbstractList), _tmp17_); #line 393 "/home/jens/Source/shotwell/src/Event.vala" current_source = (MediaSource*) _tmp18_; #line 394 "/home/jens/Source/shotwell/src/Event.vala" _tmp19_ = current_source; #line 394 "/home/jens/Source/shotwell/src/Event.vala" _tmp20_ = self->priv->primary_source; #line 394 "/home/jens/Source/shotwell/src/Event.vala" if (_tmp19_ == _tmp20_) { #line 3323 "Event.c" gint _tmp21_ = 0; #line 395 "/home/jens/Source/shotwell/src/Event.vala" _tmp21_ = event_source_get_media_count (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_EVENT_SOURCE, EventSource)); #line 395 "/home/jens/Source/shotwell/src/Event.vala" if (_tmp21_ > 0) { #line 3329 "Event.c" ViewCollection* _tmp22_ = NULL; DataView* _tmp23_ = NULL; DataView* _tmp24_ = NULL; DataSource* _tmp25_ = NULL; MediaSource* _tmp26_ = NULL; #line 396 "/home/jens/Source/shotwell/src/Event.vala" _tmp22_ = self->priv->view; #line 396 "/home/jens/Source/shotwell/src/Event.vala" _tmp23_ = view_collection_get_first_unrejected (_tmp22_); #line 396 "/home/jens/Source/shotwell/src/Event.vala" _tmp24_ = _tmp23_; #line 396 "/home/jens/Source/shotwell/src/Event.vala" _tmp25_ = data_view_get_source (_tmp24_); #line 396 "/home/jens/Source/shotwell/src/Event.vala" _tmp26_ = G_TYPE_CHECK_INSTANCE_CAST (_tmp25_, TYPE_MEDIA_SOURCE, MediaSource); #line 396 "/home/jens/Source/shotwell/src/Event.vala" event_set_primary_source (self, _tmp26_); #line 396 "/home/jens/Source/shotwell/src/Event.vala" _g_object_unref0 (_tmp26_); #line 396 "/home/jens/Source/shotwell/src/Event.vala" _g_object_unref0 (_tmp24_); #line 3351 "Event.c" } else { #line 398 "/home/jens/Source/shotwell/src/Event.vala" event_release_primary_source (self); #line 3355 "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 3361 "Event.c" } #line 393 "/home/jens/Source/shotwell/src/Event.vala" _g_object_unref0 (current_source); #line 3365 "Event.c" } #line 393 "/home/jens/Source/shotwell/src/Event.vala" _g_object_unref0 (_current_source_list); #line 3369 "Event.c" } #line 405 "/home/jens/Source/shotwell/src/Event.vala" _tmp27_ = event_source_get_media_count (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_EVENT_SOURCE, EventSource)); #line 405 "/home/jens/Source/shotwell/src/Event.vala" if (_tmp27_ == 0) { #line 3375 "Event.c" EventSourceCollection* _tmp28_ = NULL; #line 406 "/home/jens/Source/shotwell/src/Event.vala" _tmp28_ = event_global; #line 406 "/home/jens/Source/shotwell/src/Event.vala" container_source_collection_evaporate (G_TYPE_CHECK_INSTANCE_CAST (_tmp28_, 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 3385 "Event.c" } #line 413 "/home/jens/Source/shotwell/src/Event.vala" _tmp29_ = alteration_new_from_list ("contents:removed, metadata:time"); #line 413 "/home/jens/Source/shotwell/src/Event.vala" _tmp30_ = _tmp29_; #line 413 "/home/jens/Source/shotwell/src/Event.vala" data_object_notify_altered (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_DATA_OBJECT, DataObject), _tmp30_); #line 413 "/home/jens/Source/shotwell/src/Event.vala" _alteration_unref0 (_tmp30_); #line 386 "/home/jens/Source/shotwell/src/Event.vala" _g_object_unref0 (media); #line 3397 "Event.c" } static void event_on_media_destroyed (Event* self, DataSource* source) { ThumbnailView* thumbnail_view = NULL; ViewCollection* _tmp0_ = NULL; DataSource* _tmp1_ = NULL; DataView* _tmp2_ = NULL; ThumbnailView* _tmp3_ = NULL; #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_ = source; #line 417 "/home/jens/Source/shotwell/src/Event.vala" _tmp2_ = view_collection_get_view_for_source (_tmp0_, _tmp1_); #line 417 "/home/jens/Source/shotwell/src/Event.vala" thumbnail_view = G_TYPE_CHECK_INSTANCE_CAST (_tmp2_, TYPE_THUMBNAIL_VIEW, ThumbnailView); #line 418 "/home/jens/Source/shotwell/src/Event.vala" _tmp3_ = thumbnail_view; #line 418 "/home/jens/Source/shotwell/src/Event.vala" if (_tmp3_ != NULL) { #line 3423 "Event.c" ViewCollection* _tmp4_ = NULL; ViewCollection* _tmp5_ = NULL; ThumbnailView* _tmp6_ = NULL; Marker* _tmp7_ = NULL; Marker* _tmp8_ = NULL; #line 419 "/home/jens/Source/shotwell/src/Event.vala" _tmp4_ = self->priv->view; #line 419 "/home/jens/Source/shotwell/src/Event.vala" _tmp5_ = self->priv->view; #line 419 "/home/jens/Source/shotwell/src/Event.vala" _tmp6_ = thumbnail_view; #line 419 "/home/jens/Source/shotwell/src/Event.vala" _tmp7_ = data_collection_mark (G_TYPE_CHECK_INSTANCE_CAST (_tmp5_, TYPE_DATA_COLLECTION, DataCollection), G_TYPE_CHECK_INSTANCE_CAST (_tmp6_, TYPE_DATA_OBJECT, DataObject)); #line 419 "/home/jens/Source/shotwell/src/Event.vala" _tmp8_ = _tmp7_; #line 419 "/home/jens/Source/shotwell/src/Event.vala" data_collection_remove_marked (G_TYPE_CHECK_INSTANCE_CAST (_tmp4_, TYPE_DATA_COLLECTION, DataCollection), _tmp8_); #line 419 "/home/jens/Source/shotwell/src/Event.vala" _g_object_unref0 (_tmp8_); #line 3443 "Event.c" } #line 416 "/home/jens/Source/shotwell/src/Event.vala" _g_object_unref0 (thumbnail_view); #line 3447 "Event.c" } static void event_real_notify_relinking (DataSource* base, SourceCollection* sources) { Event * self; gint _tmp0_ = 0; MediaSource* _tmp1_ = NULL; SourceCollection* _tmp7_ = NULL; #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" _tmp0_ = event_source_get_media_count (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_EVENT_SOURCE, EventSource)); #line 423 "/home/jens/Source/shotwell/src/Event.vala" _vala_assert (_tmp0_ > 0, "get_media_count() > 0"); #line 426 "/home/jens/Source/shotwell/src/Event.vala" _tmp1_ = self->priv->primary_source; #line 426 "/home/jens/Source/shotwell/src/Event.vala" if (_tmp1_ == NULL) { #line 3468 "Event.c" ViewCollection* _tmp2_ = NULL; DataView* _tmp3_ = NULL; DataView* _tmp4_ = NULL; DataSource* _tmp5_ = NULL; MediaSource* _tmp6_ = NULL; #line 427 "/home/jens/Source/shotwell/src/Event.vala" _tmp2_ = self->priv->view; #line 427 "/home/jens/Source/shotwell/src/Event.vala" _tmp3_ = view_collection_get_first_unrejected (_tmp2_); #line 427 "/home/jens/Source/shotwell/src/Event.vala" _tmp4_ = _tmp3_; #line 427 "/home/jens/Source/shotwell/src/Event.vala" _tmp5_ = data_view_get_source (_tmp4_); #line 427 "/home/jens/Source/shotwell/src/Event.vala" _tmp6_ = G_TYPE_CHECK_INSTANCE_CAST (_tmp5_, TYPE_MEDIA_SOURCE, MediaSource); #line 427 "/home/jens/Source/shotwell/src/Event.vala" event_set_primary_source (self, _tmp6_); #line 427 "/home/jens/Source/shotwell/src/Event.vala" _g_object_unref0 (_tmp6_); #line 427 "/home/jens/Source/shotwell/src/Event.vala" _g_object_unref0 (_tmp4_); #line 3490 "Event.c" } #line 429 "/home/jens/Source/shotwell/src/Event.vala" _tmp7_ = sources; #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), _tmp7_); #line 3496 "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 _tmp21_ = FALSE; #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 3518 "Event.c" { GeeIterator* _alteration_it = NULL; GeeMap* _tmp0_ = NULL; GeeCollection* _tmp1_ = NULL; GeeCollection* _tmp2_ = NULL; GeeCollection* _tmp3_ = NULL; GeeIterator* _tmp4_ = NULL; GeeIterator* _tmp5_ = NULL; #line 444 "/home/jens/Source/shotwell/src/Event.vala" _tmp0_ = items; #line 444 "/home/jens/Source/shotwell/src/Event.vala" _tmp1_ = gee_map_get_values (_tmp0_); #line 444 "/home/jens/Source/shotwell/src/Event.vala" _tmp2_ = _tmp1_; #line 444 "/home/jens/Source/shotwell/src/Event.vala" _tmp3_ = _tmp2_; #line 444 "/home/jens/Source/shotwell/src/Event.vala" _tmp4_ = gee_iterable_iterator (G_TYPE_CHECK_INSTANCE_CAST (_tmp3_, GEE_TYPE_ITERABLE, GeeIterable)); #line 444 "/home/jens/Source/shotwell/src/Event.vala" _tmp5_ = _tmp4_; #line 444 "/home/jens/Source/shotwell/src/Event.vala" _g_object_unref0 (_tmp3_); #line 444 "/home/jens/Source/shotwell/src/Event.vala" _alteration_it = _tmp5_; #line 444 "/home/jens/Source/shotwell/src/Event.vala" while (TRUE) { #line 3545 "Event.c" GeeIterator* _tmp6_ = NULL; gboolean _tmp7_ = FALSE; Alteration* alteration = NULL; GeeIterator* _tmp8_ = NULL; gpointer _tmp9_ = NULL; Alteration* _tmp10_ = NULL; gboolean _tmp11_ = FALSE; Alteration* _tmp19_ = NULL; gboolean _tmp20_ = FALSE; #line 444 "/home/jens/Source/shotwell/src/Event.vala" _tmp6_ = _alteration_it; #line 444 "/home/jens/Source/shotwell/src/Event.vala" _tmp7_ = gee_iterator_next (_tmp6_); #line 444 "/home/jens/Source/shotwell/src/Event.vala" if (!_tmp7_) { #line 444 "/home/jens/Source/shotwell/src/Event.vala" break; #line 3563 "Event.c" } #line 444 "/home/jens/Source/shotwell/src/Event.vala" _tmp8_ = _alteration_it; #line 444 "/home/jens/Source/shotwell/src/Event.vala" _tmp9_ = gee_iterator_get (_tmp8_); #line 444 "/home/jens/Source/shotwell/src/Event.vala" alteration = (Alteration*) _tmp9_; #line 445 "/home/jens/Source/shotwell/src/Event.vala" _tmp10_ = alteration; #line 445 "/home/jens/Source/shotwell/src/Event.vala" _tmp11_ = alteration_has_detail (_tmp10_, "metadata", "exposure-time"); #line 445 "/home/jens/Source/shotwell/src/Event.vala" if (_tmp11_) { #line 3577 "Event.c" gchar* alt_list = NULL; gchar* _tmp12_ = NULL; gboolean _tmp13_ = FALSE; const gchar* _tmp16_ = NULL; Alteration* _tmp17_ = NULL; Alteration* _tmp18_ = NULL; #line 447 "/home/jens/Source/shotwell/src/Event.vala" _tmp12_ = g_strdup ("metadata:time"); #line 447 "/home/jens/Source/shotwell/src/Event.vala" alt_list = _tmp12_; #line 449 "/home/jens/Source/shotwell/src/Event.vala" _tmp13_ = event_has_name (self); #line 449 "/home/jens/Source/shotwell/src/Event.vala" if (!_tmp13_) { #line 3592 "Event.c" const gchar* _tmp14_ = NULL; gchar* _tmp15_ = NULL; #line 450 "/home/jens/Source/shotwell/src/Event.vala" _tmp14_ = alt_list; #line 450 "/home/jens/Source/shotwell/src/Event.vala" _tmp15_ = g_strconcat (_tmp14_, ", 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 = _tmp15_; #line 3603 "Event.c" } #line 452 "/home/jens/Source/shotwell/src/Event.vala" _tmp16_ = alt_list; #line 452 "/home/jens/Source/shotwell/src/Event.vala" _tmp17_ = alteration_new_from_list (_tmp16_); #line 452 "/home/jens/Source/shotwell/src/Event.vala" _tmp18_ = _tmp17_; #line 452 "/home/jens/Source/shotwell/src/Event.vala" data_object_notify_altered (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_DATA_OBJECT, DataObject), _tmp18_); #line 452 "/home/jens/Source/shotwell/src/Event.vala" _alteration_unref0 (_tmp18_); #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 3621 "Event.c" } #line 457 "/home/jens/Source/shotwell/src/Event.vala" _tmp19_ = alteration; #line 457 "/home/jens/Source/shotwell/src/Event.vala" _tmp20_ = alteration_has_detail (_tmp19_, "metadata", "rating"); #line 457 "/home/jens/Source/shotwell/src/Event.vala" if (_tmp20_) { #line 458 "/home/jens/Source/shotwell/src/Event.vala" should_remake_thumb = TRUE; #line 3631 "Event.c" } #line 444 "/home/jens/Source/shotwell/src/Event.vala" _alteration_unref0 (alteration); #line 3635 "Event.c" } #line 444 "/home/jens/Source/shotwell/src/Event.vala" _g_object_unref0 (_alteration_it); #line 3639 "Event.c" } #line 461 "/home/jens/Source/shotwell/src/Event.vala" _tmp21_ = should_remake_thumb; #line 461 "/home/jens/Source/shotwell/src/Event.vala" if (_tmp21_) { #line 3645 "Event.c" gboolean _tmp22_ = FALSE; MediaSource* _tmp23_ = NULL; MediaSource* _tmp24_ = NULL; gboolean _tmp25_ = FALSE; #line 463 "/home/jens/Source/shotwell/src/Event.vala" _tmp23_ = event_get_primary_source (self); #line 463 "/home/jens/Source/shotwell/src/Event.vala" _tmp24_ = _tmp23_; #line 463 "/home/jens/Source/shotwell/src/Event.vala" _tmp25_ = _tmp24_ == NULL; #line 463 "/home/jens/Source/shotwell/src/Event.vala" _g_object_unref0 (_tmp24_); #line 463 "/home/jens/Source/shotwell/src/Event.vala" if (_tmp25_) { #line 463 "/home/jens/Source/shotwell/src/Event.vala" _tmp22_ = TRUE; #line 3662 "Event.c" } else { MediaSource* _tmp26_ = NULL; MediaSource* _tmp27_ = NULL; Rating _tmp28_ = 0; #line 463 "/home/jens/Source/shotwell/src/Event.vala" _tmp26_ = event_get_primary_source (self); #line 463 "/home/jens/Source/shotwell/src/Event.vala" _tmp27_ = _tmp26_; #line 463 "/home/jens/Source/shotwell/src/Event.vala" _tmp28_ = media_source_get_rating (_tmp27_); #line 463 "/home/jens/Source/shotwell/src/Event.vala" _tmp22_ = _tmp28_ == RATING_REJECTED; #line 463 "/home/jens/Source/shotwell/src/Event.vala" _g_object_unref0 (_tmp27_); #line 3677 "Event.c" } #line 463 "/home/jens/Source/shotwell/src/Event.vala" if (_tmp22_) { #line 3681 "Event.c" ViewCollection* _tmp29_ = NULL; DataView* _tmp30_ = NULL; DataView* _tmp31_ = NULL; DataSource* _tmp32_ = NULL; MediaSource* _tmp33_ = NULL; #line 465 "/home/jens/Source/shotwell/src/Event.vala" _tmp29_ = self->priv->view; #line 465 "/home/jens/Source/shotwell/src/Event.vala" _tmp30_ = view_collection_get_first_unrejected (_tmp29_); #line 465 "/home/jens/Source/shotwell/src/Event.vala" _tmp31_ = _tmp30_; #line 465 "/home/jens/Source/shotwell/src/Event.vala" _tmp32_ = data_view_get_source (_tmp31_); #line 465 "/home/jens/Source/shotwell/src/Event.vala" _tmp33_ = G_TYPE_CHECK_INSTANCE_CAST (_tmp32_, TYPE_MEDIA_SOURCE, MediaSource); #line 465 "/home/jens/Source/shotwell/src/Event.vala" event_set_primary_source (self, _tmp33_); #line 465 "/home/jens/Source/shotwell/src/Event.vala" _g_object_unref0 (_tmp33_); #line 465 "/home/jens/Source/shotwell/src/Event.vala" _g_object_unref0 (_tmp31_); #line 3703 "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 3714 "Event.c" { EventRow* _tmp0_ = NULL; EventTable* _tmp1_ = NULL; EventTable* _tmp2_ = NULL; MediaSource* _tmp3_ = NULL; gchar* _tmp4_ = NULL; gchar* _tmp5_ = NULL; EventRow* _tmp6_ = NULL; EventRow* _tmp7_ = NULL; Event* event = NULL; Event* _tmp8_ = NULL; EventSourceCollection* _tmp9_ = NULL; Event* _tmp10_ = NULL; Event* _tmp11_ = NULL; gchar* _tmp12_ = NULL; gchar* _tmp13_ = NULL; #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_ = source; #line 476 "/home/jens/Source/shotwell/src/Event.vala" _tmp4_ = data_source_get_source_id (G_TYPE_CHECK_INSTANCE_CAST (_tmp3_, TYPE_DATA_SOURCE, DataSource)); #line 476 "/home/jens/Source/shotwell/src/Event.vala" _tmp5_ = _tmp4_; #line 476 "/home/jens/Source/shotwell/src/Event.vala" _tmp6_ = event_table_create (_tmp2_, _tmp5_, NULL, &_inner_error_); #line 476 "/home/jens/Source/shotwell/src/Event.vala" _tmp7_ = _tmp6_; #line 476 "/home/jens/Source/shotwell/src/Event.vala" _g_free0 (_tmp5_); #line 476 "/home/jens/Source/shotwell/src/Event.vala" _database_table_unref0 (_tmp2_); #line 476 "/home/jens/Source/shotwell/src/Event.vala" _tmp0_ = _tmp7_; #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 3755 "Event.c" goto __catch437_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 3764 "Event.c" } #line 476 "/home/jens/Source/shotwell/src/Event.vala" _tmp8_ = event_new (_tmp0_, DATA_OBJECT_INVALID_OBJECT_ID); #line 476 "/home/jens/Source/shotwell/src/Event.vala" event = _tmp8_; #line 477 "/home/jens/Source/shotwell/src/Event.vala" _tmp9_ = event_global; #line 477 "/home/jens/Source/shotwell/src/Event.vala" _tmp10_ = event; #line 477 "/home/jens/Source/shotwell/src/Event.vala" data_collection_add (G_TYPE_CHECK_INSTANCE_CAST (_tmp9_, TYPE_DATA_COLLECTION, DataCollection), G_TYPE_CHECK_INSTANCE_CAST (_tmp10_, TYPE_DATA_OBJECT, DataObject)); #line 479 "/home/jens/Source/shotwell/src/Event.vala" _tmp11_ = event; #line 479 "/home/jens/Source/shotwell/src/Event.vala" _tmp12_ = data_object_to_string (G_TYPE_CHECK_INSTANCE_CAST (_tmp11_, TYPE_DATA_OBJECT, DataObject)); #line 479 "/home/jens/Source/shotwell/src/Event.vala" _tmp13_ = _tmp12_; #line 479 "/home/jens/Source/shotwell/src/Event.vala" g_debug ("Event.vala:479: Created empty event %s", _tmp13_); #line 479 "/home/jens/Source/shotwell/src/Event.vala" _g_free0 (_tmp13_); #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 3792 "Event.c" } goto __finally437; __catch437_database_error: { GError* err = NULL; GError* _tmp14_ = NULL; #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" _tmp14_ = err; #line 483 "/home/jens/Source/shotwell/src/Event.vala" app_window_database_error (_tmp14_); #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 3813 "Event.c" } __finally437: #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 3822 "Event.c" } static Event* event_reconstitute (gint64 object_id, EventRow* row) { Event* result = NULL; EventRow* _tmp0_ = NULL; EventTable* _tmp1_ = NULL; EventTable* _tmp2_ = NULL; EventRow* _tmp3_ = NULL; EventID _tmp4_ = {0}; Event* event = NULL; EventRow* _tmp5_ = NULL; gint64 _tmp6_ = 0LL; Event* _tmp7_ = NULL; EventSourceCollection* _tmp8_ = NULL; EventSourceCollection* _tmp9_ = NULL; gboolean _tmp10_ = FALSE; gchar* _tmp11_ = NULL; gchar* _tmp12_ = NULL; #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_ = row; #line 491 "/home/jens/Source/shotwell/src/Event.vala" _tmp1_ = event_table_get_instance (); #line 491 "/home/jens/Source/shotwell/src/Event.vala" _tmp2_ = _tmp1_; #line 491 "/home/jens/Source/shotwell/src/Event.vala" _tmp3_ = row; #line 491 "/home/jens/Source/shotwell/src/Event.vala" event_table_create_from_row (_tmp2_, _tmp3_, &_tmp4_); #line 491 "/home/jens/Source/shotwell/src/Event.vala" _tmp0_->event_id = _tmp4_; #line 491 "/home/jens/Source/shotwell/src/Event.vala" _database_table_unref0 (_tmp2_); #line 492 "/home/jens/Source/shotwell/src/Event.vala" _tmp5_ = row; #line 492 "/home/jens/Source/shotwell/src/Event.vala" _tmp6_ = object_id; #line 492 "/home/jens/Source/shotwell/src/Event.vala" _tmp7_ = event_new (_tmp5_, _tmp6_); #line 492 "/home/jens/Source/shotwell/src/Event.vala" event = _tmp7_; #line 493 "/home/jens/Source/shotwell/src/Event.vala" _tmp8_ = event_global; #line 493 "/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 (event, TYPE_DATA_OBJECT, DataObject)); #line 494 "/home/jens/Source/shotwell/src/Event.vala" _tmp9_ = event_global; #line 494 "/home/jens/Source/shotwell/src/Event.vala" _tmp10_ = data_collection_contains (G_TYPE_CHECK_INSTANCE_CAST (_tmp9_, TYPE_DATA_COLLECTION, DataCollection), G_TYPE_CHECK_INSTANCE_CAST (event, TYPE_DATA_OBJECT, DataObject)); #line 494 "/home/jens/Source/shotwell/src/Event.vala" _vala_assert (_tmp10_, "global.contains(event)"); #line 496 "/home/jens/Source/shotwell/src/Event.vala" _tmp11_ = data_object_to_string (G_TYPE_CHECK_INSTANCE_CAST (event, TYPE_DATA_OBJECT, DataObject)); #line 496 "/home/jens/Source/shotwell/src/Event.vala" _tmp12_ = _tmp11_; #line 496 "/home/jens/Source/shotwell/src/Event.vala" g_debug ("Event.vala:496: Reconstituted event %s", _tmp12_); #line 496 "/home/jens/Source/shotwell/src/Event.vala" _g_free0 (_tmp12_); #line 498 "/home/jens/Source/shotwell/src/Event.vala" result = event; #line 498 "/home/jens/Source/shotwell/src/Event.vala" return result; #line 3888 "Event.c" } static gboolean event_real_has_links (ContainerSource* base) { Event * self; gboolean result = FALSE; gboolean _tmp0_ = FALSE; LibraryPhotoSourceCollection* _tmp1_ = NULL; SourceBacklink* _tmp2_ = NULL; SourceBacklink* _tmp3_ = NULL; gboolean _tmp4_ = FALSE; gboolean _tmp5_ = FALSE; #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" _tmp5_ = _tmp4_; #line 502 "/home/jens/Source/shotwell/src/Event.vala" _source_backlink_unref0 (_tmp3_); #line 502 "/home/jens/Source/shotwell/src/Event.vala" if (_tmp5_) { #line 502 "/home/jens/Source/shotwell/src/Event.vala" _tmp0_ = TRUE; #line 3919 "Event.c" } else { VideoSourceCollection* _tmp6_ = NULL; SourceBacklink* _tmp7_ = NULL; SourceBacklink* _tmp8_ = NULL; gboolean _tmp9_ = FALSE; #line 503 "/home/jens/Source/shotwell/src/Event.vala" _tmp6_ = video_global; #line 503 "/home/jens/Source/shotwell/src/Event.vala" _tmp7_ = container_source_get_backlink (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_CONTAINER_SOURCE, ContainerSource)); #line 503 "/home/jens/Source/shotwell/src/Event.vala" _tmp8_ = _tmp7_; #line 503 "/home/jens/Source/shotwell/src/Event.vala" _tmp9_ = source_collection_has_backlink (G_TYPE_CHECK_INSTANCE_CAST (_tmp6_, TYPE_SOURCE_COLLECTION, SourceCollection), _tmp8_); #line 503 "/home/jens/Source/shotwell/src/Event.vala" _tmp0_ = _tmp9_; #line 503 "/home/jens/Source/shotwell/src/Event.vala" _source_backlink_unref0 (_tmp8_); #line 3937 "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 3943 "Event.c" } static SourceBacklink* event_real_get_backlink (ContainerSource* base) { Event * self; SourceBacklink* result = NULL; SourceBacklink* _tmp0_ = NULL; #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 3959 "Event.c" } static void event_real_break_link (ContainerSource* base, DataSource* source) { Event * self; DataSource* _tmp0_ = NULL; #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" _tmp0_ = source; #line 513 "/home/jens/Source/shotwell/src/Event.vala" media_source_set_event (G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, TYPE_MEDIA_SOURCE, MediaSource), NULL); #line 515 "/home/jens/Source/shotwell/src/Event.vala" self->priv->unlinking = FALSE; #line 3978 "Event.c" } static void event_real_break_link_many (ContainerSource* base, GeeCollection* sources) { Event * self; GeeArrayList* photos = NULL; GeeArrayList* _tmp0_ = NULL; GeeArrayList* videos = NULL; GeeArrayList* _tmp1_ = NULL; GeeCollection* _tmp2_ = NULL; 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, 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, 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" _tmp2_ = sources; #line 523 "/home/jens/Source/shotwell/src/Event.vala" media_source_collection_filter_media (G_TYPE_CHECK_INSTANCE_CAST (_tmp2_, 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 4008 "Event.c" { LibraryPhotoSourceCollection* _tmp3_ = NULL; TransactionController* _tmp4_ = NULL; TransactionController* _tmp5_ = NULL; #line 526 "/home/jens/Source/shotwell/src/Event.vala" _tmp3_ = library_photo_global; #line 526 "/home/jens/Source/shotwell/src/Event.vala" _tmp4_ = media_source_collection_get_transaction_controller (G_TYPE_CHECK_INSTANCE_CAST (_tmp3_, TYPE_MEDIA_SOURCE_COLLECTION, MediaSourceCollection)); #line 526 "/home/jens/Source/shotwell/src/Event.vala" _tmp5_ = _tmp4_; #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, _tmp5_, &_inner_error_); #line 526 "/home/jens/Source/shotwell/src/Event.vala" if (G_UNLIKELY (_inner_error_ != NULL)) { #line 4023 "Event.c" goto __catch438_g_error; } } goto __finally438; __catch438_g_error: { GError* err = NULL; GError* _tmp6_ = NULL; const gchar* _tmp7_ = NULL; gchar* _tmp8_ = NULL; gchar* _tmp9_ = NULL; #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" _tmp6_ = err; #line 528 "/home/jens/Source/shotwell/src/Event.vala" _tmp7_ = _tmp6_->message; #line 528 "/home/jens/Source/shotwell/src/Event.vala" _tmp8_ = g_strdup_printf ("%s", _tmp7_); #line 528 "/home/jens/Source/shotwell/src/Event.vala" _tmp9_ = _tmp8_; #line 528 "/home/jens/Source/shotwell/src/Event.vala" app_window_error_message (_tmp9_, NULL); #line 528 "/home/jens/Source/shotwell/src/Event.vala" _g_free0 (_tmp9_); #line 525 "/home/jens/Source/shotwell/src/Event.vala" _g_error_free0 (err); #line 4053 "Event.c" } __finally438: #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 4068 "Event.c" } { VideoSourceCollection* _tmp10_ = NULL; TransactionController* _tmp11_ = NULL; TransactionController* _tmp12_ = NULL; #line 532 "/home/jens/Source/shotwell/src/Event.vala" _tmp10_ = video_global; #line 532 "/home/jens/Source/shotwell/src/Event.vala" _tmp11_ = media_source_collection_get_transaction_controller (G_TYPE_CHECK_INSTANCE_CAST (_tmp10_, TYPE_MEDIA_SOURCE_COLLECTION, MediaSourceCollection)); #line 532 "/home/jens/Source/shotwell/src/Event.vala" _tmp12_ = _tmp11_; #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, _tmp12_, &_inner_error_); #line 532 "/home/jens/Source/shotwell/src/Event.vala" if (G_UNLIKELY (_inner_error_ != NULL)) { #line 4084 "Event.c" goto __catch439_g_error; } } goto __finally439; __catch439_g_error: { GError* err = NULL; GError* _tmp13_ = NULL; const gchar* _tmp14_ = NULL; gchar* _tmp15_ = NULL; gchar* _tmp16_ = NULL; #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" _tmp13_ = err; #line 534 "/home/jens/Source/shotwell/src/Event.vala" _tmp14_ = _tmp13_->message; #line 534 "/home/jens/Source/shotwell/src/Event.vala" _tmp15_ = g_strdup_printf ("%s", _tmp14_); #line 534 "/home/jens/Source/shotwell/src/Event.vala" _tmp16_ = _tmp15_; #line 534 "/home/jens/Source/shotwell/src/Event.vala" app_window_error_message (_tmp16_, NULL); #line 534 "/home/jens/Source/shotwell/src/Event.vala" _g_free0 (_tmp16_); #line 531 "/home/jens/Source/shotwell/src/Event.vala" _g_error_free0 (err); #line 4114 "Event.c" } __finally439: #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 4129 "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 4137 "Event.c" } static void event_real_establish_link (ContainerSource* base, DataSource* source) { Event * self; DataSource* _tmp0_ = NULL; #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" _tmp0_ = source; #line 543 "/home/jens/Source/shotwell/src/Event.vala" media_source_set_event (G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, TYPE_MEDIA_SOURCE, MediaSource), self); #line 545 "/home/jens/Source/shotwell/src/Event.vala" self->priv->relinking = FALSE; #line 4156 "Event.c" } static void event_real_establish_link_many (ContainerSource* base, GeeCollection* sources) { Event * self; GeeArrayList* photos = NULL; GeeArrayList* _tmp0_ = NULL; GeeArrayList* videos = NULL; GeeArrayList* _tmp1_ = NULL; GeeCollection* _tmp2_ = NULL; 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, 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, 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" _tmp2_ = sources; #line 553 "/home/jens/Source/shotwell/src/Event.vala" media_source_collection_filter_media (G_TYPE_CHECK_INSTANCE_CAST (_tmp2_, 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 4186 "Event.c" { LibraryPhotoSourceCollection* _tmp3_ = NULL; TransactionController* _tmp4_ = NULL; TransactionController* _tmp5_ = NULL; #line 556 "/home/jens/Source/shotwell/src/Event.vala" _tmp3_ = library_photo_global; #line 556 "/home/jens/Source/shotwell/src/Event.vala" _tmp4_ = media_source_collection_get_transaction_controller (G_TYPE_CHECK_INSTANCE_CAST (_tmp3_, TYPE_MEDIA_SOURCE_COLLECTION, MediaSourceCollection)); #line 556 "/home/jens/Source/shotwell/src/Event.vala" _tmp5_ = _tmp4_; #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, _tmp5_, &_inner_error_); #line 556 "/home/jens/Source/shotwell/src/Event.vala" if (G_UNLIKELY (_inner_error_ != NULL)) { #line 4201 "Event.c" goto __catch440_g_error; } } goto __finally440; __catch440_g_error: { GError* err = NULL; GError* _tmp6_ = NULL; const gchar* _tmp7_ = NULL; gchar* _tmp8_ = NULL; gchar* _tmp9_ = NULL; #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" _tmp6_ = err; #line 558 "/home/jens/Source/shotwell/src/Event.vala" _tmp7_ = _tmp6_->message; #line 558 "/home/jens/Source/shotwell/src/Event.vala" _tmp8_ = g_strdup_printf ("%s", _tmp7_); #line 558 "/home/jens/Source/shotwell/src/Event.vala" _tmp9_ = _tmp8_; #line 558 "/home/jens/Source/shotwell/src/Event.vala" app_window_error_message (_tmp9_, NULL); #line 558 "/home/jens/Source/shotwell/src/Event.vala" _g_free0 (_tmp9_); #line 555 "/home/jens/Source/shotwell/src/Event.vala" _g_error_free0 (err); #line 4231 "Event.c" } __finally440: #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 4246 "Event.c" } { VideoSourceCollection* _tmp10_ = NULL; TransactionController* _tmp11_ = NULL; TransactionController* _tmp12_ = NULL; #line 562 "/home/jens/Source/shotwell/src/Event.vala" _tmp10_ = video_global; #line 562 "/home/jens/Source/shotwell/src/Event.vala" _tmp11_ = media_source_collection_get_transaction_controller (G_TYPE_CHECK_INSTANCE_CAST (_tmp10_, TYPE_MEDIA_SOURCE_COLLECTION, MediaSourceCollection)); #line 562 "/home/jens/Source/shotwell/src/Event.vala" _tmp12_ = _tmp11_; #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, _tmp12_, &_inner_error_); #line 562 "/home/jens/Source/shotwell/src/Event.vala" if (G_UNLIKELY (_inner_error_ != NULL)) { #line 4262 "Event.c" goto __catch441_g_error; } } goto __finally441; __catch441_g_error: { GError* err = NULL; GError* _tmp13_ = NULL; const gchar* _tmp14_ = NULL; gchar* _tmp15_ = NULL; gchar* _tmp16_ = NULL; #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" _tmp13_ = err; #line 564 "/home/jens/Source/shotwell/src/Event.vala" _tmp14_ = _tmp13_->message; #line 564 "/home/jens/Source/shotwell/src/Event.vala" _tmp15_ = g_strdup_printf ("%s", _tmp14_); #line 564 "/home/jens/Source/shotwell/src/Event.vala" _tmp16_ = _tmp15_; #line 564 "/home/jens/Source/shotwell/src/Event.vala" app_window_error_message (_tmp16_, NULL); #line 564 "/home/jens/Source/shotwell/src/Event.vala" _g_free0 (_tmp16_); #line 561 "/home/jens/Source/shotwell/src/Event.vala" _g_error_free0 (err); #line 4292 "Event.c" } __finally441: #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 4307 "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 4315 "Event.c" } static gchar* _vala_g_strjoinv (const gchar* separator, gchar** str_array, int str_array_length1) { gchar* result = NULL; const gchar* _tmp0_ = NULL; gboolean _tmp1_ = FALSE; gboolean _tmp2_ = FALSE; gchar** _tmp3_ = NULL; gint _tmp3__length1 = 0; #line 1054 "/usr/share/vala-0.34/vapi/glib-2.0.vapi" _tmp0_ = separator; #line 1054 "/usr/share/vala-0.34/vapi/glib-2.0.vapi" if (_tmp0_ == NULL) { #line 1055 "/usr/share/vala-0.34/vapi/glib-2.0.vapi" separator = ""; #line 4332 "Event.c" } #line 1057 "/usr/share/vala-0.34/vapi/glib-2.0.vapi" _tmp3_ = str_array; #line 1057 "/usr/share/vala-0.34/vapi/glib-2.0.vapi" _tmp3__length1 = str_array_length1; #line 1057 "/usr/share/vala-0.34/vapi/glib-2.0.vapi" if (_tmp3_ != NULL) { #line 1057 "/usr/share/vala-0.34/vapi/glib-2.0.vapi" _tmp2_ = TRUE; #line 4342 "Event.c" } else { gchar** _tmp4_ = NULL; gint _tmp4__length1 = 0; #line 1057 "/usr/share/vala-0.34/vapi/glib-2.0.vapi" _tmp4_ = str_array; #line 1057 "/usr/share/vala-0.34/vapi/glib-2.0.vapi" _tmp4__length1 = str_array_length1; #line 1057 "/usr/share/vala-0.34/vapi/glib-2.0.vapi" _tmp2_ = _tmp4__length1 > 0; #line 4352 "Event.c" } #line 1057 "/usr/share/vala-0.34/vapi/glib-2.0.vapi" if (_tmp2_) { #line 1057 "/usr/share/vala-0.34/vapi/glib-2.0.vapi" _tmp1_ = TRUE; #line 4358 "Event.c" } else { gboolean _tmp5_ = FALSE; gchar** _tmp6_ = NULL; gint _tmp6__length1 = 0; #line 1057 "/usr/share/vala-0.34/vapi/glib-2.0.vapi" _tmp6_ = str_array; #line 1057 "/usr/share/vala-0.34/vapi/glib-2.0.vapi" _tmp6__length1 = str_array_length1; #line 1057 "/usr/share/vala-0.34/vapi/glib-2.0.vapi" if (_tmp6__length1 == -1) { #line 4369 "Event.c" gchar** _tmp7_ = NULL; gint _tmp7__length1 = 0; const gchar* _tmp8_ = NULL; #line 1057 "/usr/share/vala-0.34/vapi/glib-2.0.vapi" _tmp7_ = str_array; #line 1057 "/usr/share/vala-0.34/vapi/glib-2.0.vapi" _tmp7__length1 = str_array_length1; #line 1057 "/usr/share/vala-0.34/vapi/glib-2.0.vapi" _tmp8_ = _tmp7_[0]; #line 1057 "/usr/share/vala-0.34/vapi/glib-2.0.vapi" _tmp5_ = _tmp8_ != NULL; #line 4381 "Event.c" } else { #line 1057 "/usr/share/vala-0.34/vapi/glib-2.0.vapi" _tmp5_ = FALSE; #line 4385 "Event.c" } #line 1057 "/usr/share/vala-0.34/vapi/glib-2.0.vapi" _tmp1_ = _tmp5_; #line 4389 "Event.c" } #line 1057 "/usr/share/vala-0.34/vapi/glib-2.0.vapi" if (_tmp1_) { #line 4393 "Event.c" gint i = 0; gsize len = 0UL; gint _tmp31_ = 0; gint _tmp33_ = 0; gint _tmp34_ = 0; gsize _tmp35_ = 0UL; const gchar* _tmp36_ = NULL; gint _tmp37_ = 0; gint _tmp38_ = 0; gint _tmp39_ = 0; const gchar* res = NULL; gsize _tmp40_ = 0UL; void* _tmp41_ = NULL; void* ptr = NULL; const gchar* _tmp42_ = NULL; gchar** _tmp43_ = NULL; gint _tmp43__length1 = 0; const gchar* _tmp44_ = NULL; void* _tmp45_ = NULL; const gchar* _tmp62_ = NULL; #line 1059 "/usr/share/vala-0.34/vapi/glib-2.0.vapi" len = (gsize) 1; #line 4416 "Event.c" { gboolean _tmp9_ = FALSE; #line 1060 "/usr/share/vala-0.34/vapi/glib-2.0.vapi" i = 0; #line 1060 "/usr/share/vala-0.34/vapi/glib-2.0.vapi" _tmp9_ = TRUE; #line 1060 "/usr/share/vala-0.34/vapi/glib-2.0.vapi" while (TRUE) { #line 4425 "Event.c" gboolean _tmp11_ = FALSE; gboolean _tmp12_ = FALSE; gchar** _tmp13_ = NULL; gint _tmp13__length1 = 0; gint _tmp21_ = 0; gchar** _tmp22_ = NULL; gint _tmp22__length1 = 0; gint _tmp23_ = 0; const gchar* _tmp24_ = NULL; gsize _tmp30_ = 0UL; #line 1060 "/usr/share/vala-0.34/vapi/glib-2.0.vapi" if (!_tmp9_) { #line 4438 "Event.c" gint _tmp10_ = 0; #line 1060 "/usr/share/vala-0.34/vapi/glib-2.0.vapi" _tmp10_ = i; #line 1060 "/usr/share/vala-0.34/vapi/glib-2.0.vapi" i = _tmp10_ + 1; #line 4444 "Event.c" } #line 1060 "/usr/share/vala-0.34/vapi/glib-2.0.vapi" _tmp9_ = FALSE; #line 1060 "/usr/share/vala-0.34/vapi/glib-2.0.vapi" _tmp13_ = str_array; #line 1060 "/usr/share/vala-0.34/vapi/glib-2.0.vapi" _tmp13__length1 = str_array_length1; #line 1060 "/usr/share/vala-0.34/vapi/glib-2.0.vapi" if (_tmp13__length1 != -1) { #line 4454 "Event.c" gint _tmp14_ = 0; gchar** _tmp15_ = NULL; gint _tmp15__length1 = 0; #line 1060 "/usr/share/vala-0.34/vapi/glib-2.0.vapi" _tmp14_ = i; #line 1060 "/usr/share/vala-0.34/vapi/glib-2.0.vapi" _tmp15_ = str_array; #line 1060 "/usr/share/vala-0.34/vapi/glib-2.0.vapi" _tmp15__length1 = str_array_length1; #line 1060 "/usr/share/vala-0.34/vapi/glib-2.0.vapi" _tmp12_ = _tmp14_ < _tmp15__length1; #line 4466 "Event.c" } else { #line 1060 "/usr/share/vala-0.34/vapi/glib-2.0.vapi" _tmp12_ = FALSE; #line 4470 "Event.c" } #line 1060 "/usr/share/vala-0.34/vapi/glib-2.0.vapi" if (_tmp12_) { #line 1060 "/usr/share/vala-0.34/vapi/glib-2.0.vapi" _tmp11_ = TRUE; #line 4476 "Event.c" } else { gboolean _tmp16_ = FALSE; gchar** _tmp17_ = NULL; gint _tmp17__length1 = 0; #line 1060 "/usr/share/vala-0.34/vapi/glib-2.0.vapi" _tmp17_ = str_array; #line 1060 "/usr/share/vala-0.34/vapi/glib-2.0.vapi" _tmp17__length1 = str_array_length1; #line 1060 "/usr/share/vala-0.34/vapi/glib-2.0.vapi" if (_tmp17__length1 == -1) { #line 4487 "Event.c" gchar** _tmp18_ = NULL; gint _tmp18__length1 = 0; gint _tmp19_ = 0; const gchar* _tmp20_ = NULL; #line 1060 "/usr/share/vala-0.34/vapi/glib-2.0.vapi" _tmp18_ = str_array; #line 1060 "/usr/share/vala-0.34/vapi/glib-2.0.vapi" _tmp18__length1 = str_array_length1; #line 1060 "/usr/share/vala-0.34/vapi/glib-2.0.vapi" _tmp19_ = i; #line 1060 "/usr/share/vala-0.34/vapi/glib-2.0.vapi" _tmp20_ = _tmp18_[_tmp19_]; #line 1060 "/usr/share/vala-0.34/vapi/glib-2.0.vapi" _tmp16_ = _tmp20_ != NULL; #line 4502 "Event.c" } else { #line 1060 "/usr/share/vala-0.34/vapi/glib-2.0.vapi" _tmp16_ = FALSE; #line 4506 "Event.c" } #line 1060 "/usr/share/vala-0.34/vapi/glib-2.0.vapi" _tmp11_ = _tmp16_; #line 4510 "Event.c" } #line 1060 "/usr/share/vala-0.34/vapi/glib-2.0.vapi" if (!_tmp11_) { #line 1060 "/usr/share/vala-0.34/vapi/glib-2.0.vapi" break; #line 4516 "Event.c" } #line 1061 "/usr/share/vala-0.34/vapi/glib-2.0.vapi" _tmp22_ = str_array; #line 1061 "/usr/share/vala-0.34/vapi/glib-2.0.vapi" _tmp22__length1 = str_array_length1; #line 1061 "/usr/share/vala-0.34/vapi/glib-2.0.vapi" _tmp23_ = i; #line 1061 "/usr/share/vala-0.34/vapi/glib-2.0.vapi" _tmp24_ = _tmp22_[_tmp23_]; #line 1061 "/usr/share/vala-0.34/vapi/glib-2.0.vapi" if (_tmp24_ != NULL) { #line 4528 "Event.c" gchar** _tmp25_ = NULL; gint _tmp25__length1 = 0; gint _tmp26_ = 0; const gchar* _tmp27_ = NULL; gint _tmp28_ = 0; gint _tmp29_ = 0; #line 1061 "/usr/share/vala-0.34/vapi/glib-2.0.vapi" _tmp25_ = str_array; #line 1061 "/usr/share/vala-0.34/vapi/glib-2.0.vapi" _tmp25__length1 = str_array_length1; #line 1061 "/usr/share/vala-0.34/vapi/glib-2.0.vapi" _tmp26_ = i; #line 1061 "/usr/share/vala-0.34/vapi/glib-2.0.vapi" _tmp27_ = _tmp25_[_tmp26_]; #line 1061 "/usr/share/vala-0.34/vapi/glib-2.0.vapi" _tmp28_ = strlen ((const gchar*) _tmp27_); #line 1061 "/usr/share/vala-0.34/vapi/glib-2.0.vapi" _tmp29_ = _tmp28_; #line 1061 "/usr/share/vala-0.34/vapi/glib-2.0.vapi" _tmp21_ = _tmp29_; #line 4549 "Event.c" } else { #line 1061 "/usr/share/vala-0.34/vapi/glib-2.0.vapi" _tmp21_ = 0; #line 4553 "Event.c" } #line 1061 "/usr/share/vala-0.34/vapi/glib-2.0.vapi" _tmp30_ = len; #line 1061 "/usr/share/vala-0.34/vapi/glib-2.0.vapi" len = _tmp30_ + _tmp21_; #line 4559 "Event.c" } } #line 1063 "/usr/share/vala-0.34/vapi/glib-2.0.vapi" _tmp31_ = i; #line 1063 "/usr/share/vala-0.34/vapi/glib-2.0.vapi" if (_tmp31_ == 0) { #line 4566 "Event.c" gchar* _tmp32_ = NULL; #line 1064 "/usr/share/vala-0.34/vapi/glib-2.0.vapi" _tmp32_ = g_strdup (""); #line 1064 "/usr/share/vala-0.34/vapi/glib-2.0.vapi" result = _tmp32_; #line 1064 "/usr/share/vala-0.34/vapi/glib-2.0.vapi" return result; #line 4574 "Event.c" } #line 1066 "/usr/share/vala-0.34/vapi/glib-2.0.vapi" _tmp33_ = i; #line 1066 "/usr/share/vala-0.34/vapi/glib-2.0.vapi" str_array_length1 = _tmp33_; #line 1066 "/usr/share/vala-0.34/vapi/glib-2.0.vapi" _tmp34_ = str_array_length1; #line 1067 "/usr/share/vala-0.34/vapi/glib-2.0.vapi" _tmp35_ = len; #line 1067 "/usr/share/vala-0.34/vapi/glib-2.0.vapi" _tmp36_ = separator; #line 1067 "/usr/share/vala-0.34/vapi/glib-2.0.vapi" _tmp37_ = strlen ((const gchar*) _tmp36_); #line 1067 "/usr/share/vala-0.34/vapi/glib-2.0.vapi" _tmp38_ = _tmp37_; #line 1067 "/usr/share/vala-0.34/vapi/glib-2.0.vapi" _tmp39_ = i; #line 1067 "/usr/share/vala-0.34/vapi/glib-2.0.vapi" len = _tmp35_ + (_tmp38_ * (_tmp39_ - 1)); #line 1069 "/usr/share/vala-0.34/vapi/glib-2.0.vapi" _tmp40_ = len; #line 1069 "/usr/share/vala-0.34/vapi/glib-2.0.vapi" _tmp41_ = g_malloc (_tmp40_); #line 1069 "/usr/share/vala-0.34/vapi/glib-2.0.vapi" res = _tmp41_; #line 1070 "/usr/share/vala-0.34/vapi/glib-2.0.vapi" _tmp42_ = res; #line 1070 "/usr/share/vala-0.34/vapi/glib-2.0.vapi" _tmp43_ = str_array; #line 1070 "/usr/share/vala-0.34/vapi/glib-2.0.vapi" _tmp43__length1 = str_array_length1; #line 1070 "/usr/share/vala-0.34/vapi/glib-2.0.vapi" _tmp44_ = _tmp43_[0]; #line 1070 "/usr/share/vala-0.34/vapi/glib-2.0.vapi" _tmp45_ = g_stpcpy ((void*) _tmp42_, (const gchar*) _tmp44_); #line 1070 "/usr/share/vala-0.34/vapi/glib-2.0.vapi" ptr = _tmp45_; #line 4612 "Event.c" { gboolean _tmp46_ = FALSE; #line 1071 "/usr/share/vala-0.34/vapi/glib-2.0.vapi" i = 1; #line 1071 "/usr/share/vala-0.34/vapi/glib-2.0.vapi" _tmp46_ = TRUE; #line 1071 "/usr/share/vala-0.34/vapi/glib-2.0.vapi" while (TRUE) { #line 4621 "Event.c" gint _tmp48_ = 0; gchar** _tmp49_ = NULL; gint _tmp49__length1 = 0; void* _tmp50_ = NULL; const gchar* _tmp51_ = NULL; void* _tmp52_ = NULL; const gchar* _tmp53_ = NULL; gchar** _tmp54_ = NULL; gint _tmp54__length1 = 0; gint _tmp55_ = 0; const gchar* _tmp56_ = NULL; void* _tmp60_ = NULL; void* _tmp61_ = NULL; #line 1071 "/usr/share/vala-0.34/vapi/glib-2.0.vapi" if (!_tmp46_) { #line 4637 "Event.c" gint _tmp47_ = 0; #line 1071 "/usr/share/vala-0.34/vapi/glib-2.0.vapi" _tmp47_ = i; #line 1071 "/usr/share/vala-0.34/vapi/glib-2.0.vapi" i = _tmp47_ + 1; #line 4643 "Event.c" } #line 1071 "/usr/share/vala-0.34/vapi/glib-2.0.vapi" _tmp46_ = FALSE; #line 1071 "/usr/share/vala-0.34/vapi/glib-2.0.vapi" _tmp48_ = i; #line 1071 "/usr/share/vala-0.34/vapi/glib-2.0.vapi" _tmp49_ = str_array; #line 1071 "/usr/share/vala-0.34/vapi/glib-2.0.vapi" _tmp49__length1 = str_array_length1; #line 1071 "/usr/share/vala-0.34/vapi/glib-2.0.vapi" if (!(_tmp48_ < _tmp49__length1)) { #line 1071 "/usr/share/vala-0.34/vapi/glib-2.0.vapi" break; #line 4657 "Event.c" } #line 1072 "/usr/share/vala-0.34/vapi/glib-2.0.vapi" _tmp50_ = ptr; #line 1072 "/usr/share/vala-0.34/vapi/glib-2.0.vapi" _tmp51_ = separator; #line 1072 "/usr/share/vala-0.34/vapi/glib-2.0.vapi" _tmp52_ = g_stpcpy (_tmp50_, (const gchar*) _tmp51_); #line 1072 "/usr/share/vala-0.34/vapi/glib-2.0.vapi" ptr = _tmp52_; #line 1073 "/usr/share/vala-0.34/vapi/glib-2.0.vapi" _tmp54_ = str_array; #line 1073 "/usr/share/vala-0.34/vapi/glib-2.0.vapi" _tmp54__length1 = str_array_length1; #line 1073 "/usr/share/vala-0.34/vapi/glib-2.0.vapi" _tmp55_ = i; #line 1073 "/usr/share/vala-0.34/vapi/glib-2.0.vapi" _tmp56_ = _tmp54_[_tmp55_]; #line 1073 "/usr/share/vala-0.34/vapi/glib-2.0.vapi" if (_tmp56_ != NULL) { #line 4677 "Event.c" gchar** _tmp57_ = NULL; gint _tmp57__length1 = 0; gint _tmp58_ = 0; const gchar* _tmp59_ = NULL; #line 1073 "/usr/share/vala-0.34/vapi/glib-2.0.vapi" _tmp57_ = str_array; #line 1073 "/usr/share/vala-0.34/vapi/glib-2.0.vapi" _tmp57__length1 = str_array_length1; #line 1073 "/usr/share/vala-0.34/vapi/glib-2.0.vapi" _tmp58_ = i; #line 1073 "/usr/share/vala-0.34/vapi/glib-2.0.vapi" _tmp59_ = _tmp57_[_tmp58_]; #line 1073 "/usr/share/vala-0.34/vapi/glib-2.0.vapi" _tmp53_ = (const gchar*) _tmp59_; #line 4692 "Event.c" } else { #line 1073 "/usr/share/vala-0.34/vapi/glib-2.0.vapi" _tmp53_ = ""; #line 4696 "Event.c" } #line 1073 "/usr/share/vala-0.34/vapi/glib-2.0.vapi" _tmp60_ = ptr; #line 1073 "/usr/share/vala-0.34/vapi/glib-2.0.vapi" _tmp61_ = g_stpcpy (_tmp60_, _tmp53_); #line 1073 "/usr/share/vala-0.34/vapi/glib-2.0.vapi" ptr = _tmp61_; #line 4704 "Event.c" } } #line 1076 "/usr/share/vala-0.34/vapi/glib-2.0.vapi" _tmp62_ = res; #line 1076 "/usr/share/vala-0.34/vapi/glib-2.0.vapi" res = NULL; #line 1076 "/usr/share/vala-0.34/vapi/glib-2.0.vapi" result = (gchar*) _tmp62_; #line 1076 "/usr/share/vala-0.34/vapi/glib-2.0.vapi" return result; #line 4715 "Event.c" } else { gchar* _tmp63_ = NULL; #line 1078 "/usr/share/vala-0.34/vapi/glib-2.0.vapi" _tmp63_ = g_strdup (""); #line 1078 "/usr/share/vala-0.34/vapi/glib-2.0.vapi" result = _tmp63_; #line 1078 "/usr/share/vala-0.34/vapi/glib-2.0.vapi" return result; #line 4724 "Event.c" } } static void event_update_indexable_keywords (Event* self) { gchar** components = NULL; gchar** _tmp0_ = NULL; gint components_length1 = 0; gint _components_size_ = 0; gint i = 0; gchar* rawname = NULL; gchar* _tmp1_ = NULL; const gchar* _tmp2_ = NULL; gchar* comment = NULL; gchar* _tmp8_ = NULL; const gchar* _tmp9_ = NULL; gint _tmp15_ = 0; #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 4762 "Event.c" gchar** _tmp3_ = NULL; gint _tmp3__length1 = 0; gint _tmp4_ = 0; const gchar* _tmp5_ = NULL; gchar* _tmp6_ = NULL; gchar* _tmp7_ = NULL; #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 4787 "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 4797 "Event.c" gchar** _tmp10_ = NULL; gint _tmp10__length1 = 0; gint _tmp11_ = 0; const gchar* _tmp12_ = NULL; gchar* _tmp13_ = NULL; gchar* _tmp14_ = NULL; #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 4822 "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 4832 "Event.c" } else { gchar** _tmp16_ = NULL; gint _tmp16__length1 = 0; gint _tmp17_ = 0; gchar* _tmp18_ = NULL; gchar** _tmp19_ = NULL; gint _tmp19__length1 = 0; gchar* _tmp20_ = NULL; gchar* _tmp21_ = NULL; gchar* _tmp22_ = NULL; #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 4871 "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 4879 "Event.c" } static const gchar* event_real_get_indexable_keywords (Indexable* base) { Event * self; const gchar* result = NULL; const gchar* _tmp0_ = NULL; #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 4895 "Event.c" } static void g_time_local (time_t time, struct tm* result) { struct tm _result_ = {0}; struct tm _tmp0_ = {0}; #line 2750 "/usr/share/vala-0.34/vapi/glib-2.0.vapi" localtime_r (&time, &_tmp0_); #line 2750 "/usr/share/vala-0.34/vapi/glib-2.0.vapi" _result_ = _tmp0_; #line 2751 "/usr/share/vala-0.34/vapi/glib-2.0.vapi" *result = _result_; #line 2751 "/usr/share/vala-0.34/vapi/glib-2.0.vapi" return; #line 4910 "Event.c" } gboolean event_is_in_starting_day (Event* self, time_t time) { gboolean result = FALSE; ViewCollection* _tmp0_ = NULL; gint _tmp1_ = 0; MediaSource* earliest_media = NULL; ViewCollection* _tmp2_ = NULL; DataObject* _tmp3_ = NULL; DataView* _tmp4_ = NULL; DataSource* _tmp5_ = NULL; MediaSource* _tmp6_ = NULL; struct tm earliest_tm = {0}; MediaSource* _tmp7_ = NULL; time_t _tmp8_ = 0; struct tm _tmp9_ = {0}; struct tm start_boundary_tm = {0}; struct tm _tmp10_ = {0}; gint _tmp11_ = 0; struct tm _tmp12_ = {0}; gint _tmp13_ = 0; struct tm _tmp14_ = {0}; gint _tmp15_ = 0; time_t start_boundary = 0; time_t _tmp16_ = 0; struct tm _tmp17_ = {0}; gint _tmp18_ = 0; time_t end_boundary = 0; time_t _tmp20_ = 0; gboolean _tmp21_ = FALSE; time_t _tmp22_ = 0; time_t _tmp23_ = 0; #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" _tmp1_ = data_collection_get_count (G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, TYPE_DATA_COLLECTION, DataCollection)); #line 599 "/home/jens/Source/shotwell/src/Event.vala" if (_tmp1_ == 0) { #line 600 "/home/jens/Source/shotwell/src/Event.vala" result = FALSE; #line 600 "/home/jens/Source/shotwell/src/Event.vala" return result; #line 4956 "Event.c" } #line 603 "/home/jens/Source/shotwell/src/Event.vala" _tmp2_ = self->priv->view; #line 603 "/home/jens/Source/shotwell/src/Event.vala" _tmp3_ = data_collection_get_at (G_TYPE_CHECK_INSTANCE_CAST (_tmp2_, TYPE_DATA_COLLECTION, DataCollection), 0); #line 603 "/home/jens/Source/shotwell/src/Event.vala" _tmp4_ = G_TYPE_CHECK_INSTANCE_CAST (_tmp3_, TYPE_DATA_VIEW, DataView); #line 603 "/home/jens/Source/shotwell/src/Event.vala" _tmp5_ = data_view_get_source (_tmp4_); #line 603 "/home/jens/Source/shotwell/src/Event.vala" _tmp6_ = G_TYPE_CHECK_INSTANCE_CAST (_tmp5_, TYPE_MEDIA_SOURCE, MediaSource); #line 603 "/home/jens/Source/shotwell/src/Event.vala" _g_object_unref0 (_tmp4_); #line 603 "/home/jens/Source/shotwell/src/Event.vala" earliest_media = _tmp6_; #line 604 "/home/jens/Source/shotwell/src/Event.vala" _tmp7_ = earliest_media; #line 604 "/home/jens/Source/shotwell/src/Event.vala" _tmp8_ = media_source_get_exposure_time (_tmp7_); #line 604 "/home/jens/Source/shotwell/src/Event.vala" g_time_local (_tmp8_, &_tmp9_); #line 604 "/home/jens/Source/shotwell/src/Event.vala" earliest_tm = _tmp9_; #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" _tmp10_ = earliest_tm; #line 611 "/home/jens/Source/shotwell/src/Event.vala" _tmp11_ = _tmp10_.tm_mday; #line 611 "/home/jens/Source/shotwell/src/Event.vala" start_boundary_tm.tm_mday = _tmp11_; #line 612 "/home/jens/Source/shotwell/src/Event.vala" _tmp12_ = earliest_tm; #line 612 "/home/jens/Source/shotwell/src/Event.vala" _tmp13_ = _tmp12_.tm_mon; #line 612 "/home/jens/Source/shotwell/src/Event.vala" start_boundary_tm.tm_mon = _tmp13_; #line 613 "/home/jens/Source/shotwell/src/Event.vala" _tmp14_ = earliest_tm; #line 613 "/home/jens/Source/shotwell/src/Event.vala" _tmp15_ = _tmp14_.tm_year; #line 613 "/home/jens/Source/shotwell/src/Event.vala" start_boundary_tm.tm_year = _tmp15_; #line 614 "/home/jens/Source/shotwell/src/Event.vala" start_boundary_tm.tm_isdst = -1; #line 616 "/home/jens/Source/shotwell/src/Event.vala" _tmp16_ = mktime (&start_boundary_tm); #line 616 "/home/jens/Source/shotwell/src/Event.vala" start_boundary = _tmp16_; #line 620 "/home/jens/Source/shotwell/src/Event.vala" _tmp17_ = earliest_tm; #line 620 "/home/jens/Source/shotwell/src/Event.vala" _tmp18_ = _tmp17_.tm_hour; #line 620 "/home/jens/Source/shotwell/src/Event.vala" if (_tmp18_ < EVENT_EVENT_BOUNDARY_HOUR) { #line 5018 "Event.c" time_t _tmp19_ = 0; #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" _tmp19_ = start_boundary; #line 622 "/home/jens/Source/shotwell/src/Event.vala" start_boundary = _tmp19_ - EVENT_TIME_T_DAY; #line 5026 "Event.c" } #line 625 "/home/jens/Source/shotwell/src/Event.vala" _tmp20_ = start_boundary; #line 625 "/home/jens/Source/shotwell/src/Event.vala" end_boundary = (_tmp20_ + EVENT_TIME_T_DAY) - 1; #line 627 "/home/jens/Source/shotwell/src/Event.vala" _tmp22_ = time; #line 627 "/home/jens/Source/shotwell/src/Event.vala" _tmp23_ = start_boundary; #line 627 "/home/jens/Source/shotwell/src/Event.vala" if (_tmp22_ >= _tmp23_) { #line 5038 "Event.c" time_t _tmp24_ = 0; time_t _tmp25_ = 0; #line 627 "/home/jens/Source/shotwell/src/Event.vala" _tmp24_ = time; #line 627 "/home/jens/Source/shotwell/src/Event.vala" _tmp25_ = end_boundary; #line 627 "/home/jens/Source/shotwell/src/Event.vala" _tmp21_ = _tmp24_ <= _tmp25_; #line 5047 "Event.c" } else { #line 627 "/home/jens/Source/shotwell/src/Event.vala" _tmp21_ = FALSE; #line 5051 "Event.c" } #line 627 "/home/jens/Source/shotwell/src/Event.vala" result = _tmp21_; #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 5059 "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; MediaSource* _tmp0_ = NULL; time_t _tmp1_ = 0; gboolean _tmp2_ = FALSE; time_t _tmp3_ = 0; gint count = 0; ViewCollection* _tmp8_ = NULL; gint _tmp9_ = 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" _tmp0_ = media; #line 635 "/home/jens/Source/shotwell/src/Event.vala" _tmp1_ = media_source_get_exposure_time (_tmp0_); #line 635 "/home/jens/Source/shotwell/src/Event.vala" exposure_time = _tmp1_; #line 637 "/home/jens/Source/shotwell/src/Event.vala" _tmp3_ = exposure_time; #line 637 "/home/jens/Source/shotwell/src/Event.vala" if (_tmp3_ == ((time_t) 0)) { #line 5089 "Event.c" const gchar* _tmp4_ = NULL; #line 637 "/home/jens/Source/shotwell/src/Event.vala" _tmp4_ = event_name; #line 637 "/home/jens/Source/shotwell/src/Event.vala" _tmp2_ = _tmp4_ == NULL; #line 5095 "Event.c" } else { #line 637 "/home/jens/Source/shotwell/src/Event.vala" _tmp2_ = FALSE; #line 5099 "Event.c" } #line 637 "/home/jens/Source/shotwell/src/Event.vala" if (_tmp2_) { #line 5103 "Event.c" MediaSource* _tmp5_ = NULL; gchar* _tmp6_ = NULL; gchar* _tmp7_ = NULL; #line 638 "/home/jens/Source/shotwell/src/Event.vala" _tmp5_ = media; #line 638 "/home/jens/Source/shotwell/src/Event.vala" _tmp6_ = data_object_to_string (G_TYPE_CHECK_INSTANCE_CAST (_tmp5_, TYPE_DATA_OBJECT, DataObject)); #line 638 "/home/jens/Source/shotwell/src/Event.vala" _tmp7_ = _tmp6_; #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", _tmp7_); #line 638 "/home/jens/Source/shotwell/src/Event.vala" _g_free0 (_tmp7_); #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 5125 "Event.c" } #line 641 "/home/jens/Source/shotwell/src/Event.vala" return result; #line 5129 "Event.c" } #line 644 "/home/jens/Source/shotwell/src/Event.vala" _tmp8_ = events_so_far; #line 644 "/home/jens/Source/shotwell/src/Event.vala" _tmp9_ = data_collection_get_count (G_TYPE_CHECK_INSTANCE_CAST (_tmp8_, TYPE_DATA_COLLECTION, DataCollection)); #line 644 "/home/jens/Source/shotwell/src/Event.vala" count = _tmp9_; #line 5137 "Event.c" { gint ctr = 0; #line 645 "/home/jens/Source/shotwell/src/Event.vala" ctr = 0; #line 5142 "Event.c" { gboolean _tmp10_ = FALSE; #line 645 "/home/jens/Source/shotwell/src/Event.vala" _tmp10_ = TRUE; #line 645 "/home/jens/Source/shotwell/src/Event.vala" while (TRUE) { #line 5149 "Event.c" gint _tmp12_ = 0; gint _tmp13_ = 0; Event* event = NULL; ViewCollection* _tmp14_ = NULL; gint _tmp15_ = 0; DataObject* _tmp16_ = NULL; EventView* _tmp17_ = NULL; DataSource* _tmp18_ = NULL; Event* _tmp19_ = NULL; gboolean _tmp20_ = FALSE; gboolean _tmp21_ = FALSE; gboolean _tmp22_ = FALSE; const gchar* _tmp23_ = NULL; #line 645 "/home/jens/Source/shotwell/src/Event.vala" if (!_tmp10_) { #line 5165 "Event.c" gint _tmp11_ = 0; #line 645 "/home/jens/Source/shotwell/src/Event.vala" _tmp11_ = ctr; #line 645 "/home/jens/Source/shotwell/src/Event.vala" ctr = _tmp11_ + 1; #line 5171 "Event.c" } #line 645 "/home/jens/Source/shotwell/src/Event.vala" _tmp10_ = FALSE; #line 645 "/home/jens/Source/shotwell/src/Event.vala" _tmp12_ = ctr; #line 645 "/home/jens/Source/shotwell/src/Event.vala" _tmp13_ = count; #line 645 "/home/jens/Source/shotwell/src/Event.vala" if (!(_tmp12_ < _tmp13_)) { #line 645 "/home/jens/Source/shotwell/src/Event.vala" break; #line 5183 "Event.c" } #line 646 "/home/jens/Source/shotwell/src/Event.vala" _tmp14_ = events_so_far; #line 646 "/home/jens/Source/shotwell/src/Event.vala" _tmp15_ = ctr; #line 646 "/home/jens/Source/shotwell/src/Event.vala" _tmp16_ = data_collection_get_at (G_TYPE_CHECK_INSTANCE_CAST (_tmp14_, TYPE_DATA_COLLECTION, DataCollection), _tmp15_); #line 646 "/home/jens/Source/shotwell/src/Event.vala" _tmp17_ = G_TYPE_CHECK_INSTANCE_CAST (_tmp16_, TYPE_EVENT_VIEW, EventView); #line 646 "/home/jens/Source/shotwell/src/Event.vala" _tmp18_ = data_view_get_source (G_TYPE_CHECK_INSTANCE_CAST (_tmp17_, TYPE_DATA_VIEW, DataView)); #line 646 "/home/jens/Source/shotwell/src/Event.vala" _tmp19_ = G_TYPE_CHECK_INSTANCE_CAST (_tmp18_, TYPE_EVENT, Event); #line 646 "/home/jens/Source/shotwell/src/Event.vala" _g_object_unref0 (_tmp17_); #line 646 "/home/jens/Source/shotwell/src/Event.vala" event = _tmp19_; #line 648 "/home/jens/Source/shotwell/src/Event.vala" _tmp23_ = event_name; #line 648 "/home/jens/Source/shotwell/src/Event.vala" if (_tmp23_ != NULL) { #line 5205 "Event.c" Event* _tmp24_ = NULL; gboolean _tmp25_ = FALSE; #line 648 "/home/jens/Source/shotwell/src/Event.vala" _tmp24_ = event; #line 648 "/home/jens/Source/shotwell/src/Event.vala" _tmp25_ = event_has_name (_tmp24_); #line 648 "/home/jens/Source/shotwell/src/Event.vala" _tmp22_ = _tmp25_; #line 5214 "Event.c" } else { #line 648 "/home/jens/Source/shotwell/src/Event.vala" _tmp22_ = FALSE; #line 5218 "Event.c" } #line 648 "/home/jens/Source/shotwell/src/Event.vala" if (_tmp22_) { #line 5222 "Event.c" const gchar* _tmp26_ = NULL; Event* _tmp27_ = NULL; gchar* _tmp28_ = NULL; gchar* _tmp29_ = NULL; #line 648 "/home/jens/Source/shotwell/src/Event.vala" _tmp26_ = event_name; #line 648 "/home/jens/Source/shotwell/src/Event.vala" _tmp27_ = event; #line 648 "/home/jens/Source/shotwell/src/Event.vala" _tmp28_ = data_object_get_name (G_TYPE_CHECK_INSTANCE_CAST (_tmp27_, TYPE_DATA_OBJECT, DataObject)); #line 648 "/home/jens/Source/shotwell/src/Event.vala" _tmp29_ = _tmp28_; #line 648 "/home/jens/Source/shotwell/src/Event.vala" _tmp21_ = g_strcmp0 (_tmp26_, _tmp29_) == 0; #line 648 "/home/jens/Source/shotwell/src/Event.vala" _g_free0 (_tmp29_); #line 5239 "Event.c" } else { #line 648 "/home/jens/Source/shotwell/src/Event.vala" _tmp21_ = FALSE; #line 5243 "Event.c" } #line 648 "/home/jens/Source/shotwell/src/Event.vala" if (_tmp21_) { #line 648 "/home/jens/Source/shotwell/src/Event.vala" _tmp20_ = TRUE; #line 5249 "Event.c" } else { Event* _tmp30_ = NULL; time_t _tmp31_ = 0; gboolean _tmp32_ = FALSE; #line 649 "/home/jens/Source/shotwell/src/Event.vala" _tmp30_ = event; #line 649 "/home/jens/Source/shotwell/src/Event.vala" _tmp31_ = exposure_time; #line 649 "/home/jens/Source/shotwell/src/Event.vala" _tmp32_ = event_is_in_starting_day (_tmp30_, _tmp31_); #line 649 "/home/jens/Source/shotwell/src/Event.vala" _tmp20_ = _tmp32_; #line 5262 "Event.c" } #line 648 "/home/jens/Source/shotwell/src/Event.vala" if (_tmp20_) { #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 5274 "Event.c" } #line 652 "/home/jens/Source/shotwell/src/Event.vala" return result; #line 5278 "Event.c" } #line 645 "/home/jens/Source/shotwell/src/Event.vala" _g_object_unref0 (event); #line 5282 "Event.c" } } } { EventRow* _tmp33_ = NULL; EventTable* _tmp34_ = NULL; EventTable* _tmp35_ = NULL; MediaSource* _tmp36_ = NULL; gchar* _tmp37_ = NULL; gchar* _tmp38_ = NULL; EventRow* _tmp39_ = NULL; EventRow* _tmp40_ = NULL; Event* event = NULL; Event* _tmp41_ = NULL; const gchar* _tmp42_ = NULL; ViewCollection* _tmp45_ = NULL; Event* _tmp46_ = NULL; EventView* _tmp47_ = NULL; EventView* _tmp48_ = NULL; #line 658 "/home/jens/Source/shotwell/src/Event.vala" _tmp34_ = event_table_get_instance (); #line 658 "/home/jens/Source/shotwell/src/Event.vala" _tmp35_ = _tmp34_; #line 658 "/home/jens/Source/shotwell/src/Event.vala" _tmp36_ = media; #line 658 "/home/jens/Source/shotwell/src/Event.vala" _tmp37_ = data_source_get_source_id (G_TYPE_CHECK_INSTANCE_CAST (_tmp36_, TYPE_DATA_SOURCE, DataSource)); #line 658 "/home/jens/Source/shotwell/src/Event.vala" _tmp38_ = _tmp37_; #line 658 "/home/jens/Source/shotwell/src/Event.vala" _tmp39_ = event_table_create (_tmp35_, _tmp38_, NULL, &_inner_error_); #line 658 "/home/jens/Source/shotwell/src/Event.vala" _tmp40_ = _tmp39_; #line 658 "/home/jens/Source/shotwell/src/Event.vala" _g_free0 (_tmp38_); #line 658 "/home/jens/Source/shotwell/src/Event.vala" _database_table_unref0 (_tmp35_); #line 658 "/home/jens/Source/shotwell/src/Event.vala" _tmp33_ = _tmp40_; #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 5326 "Event.c" goto __catch442_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 5335 "Event.c" } #line 658 "/home/jens/Source/shotwell/src/Event.vala" _tmp41_ = event_new (_tmp33_, DATA_OBJECT_INVALID_OBJECT_ID); #line 658 "/home/jens/Source/shotwell/src/Event.vala" event = _tmp41_; #line 659 "/home/jens/Source/shotwell/src/Event.vala" _tmp42_ = event_name; #line 659 "/home/jens/Source/shotwell/src/Event.vala" if (_tmp42_ != NULL) { #line 5345 "Event.c" Event* _tmp43_ = NULL; const gchar* _tmp44_ = NULL; #line 660 "/home/jens/Source/shotwell/src/Event.vala" _tmp43_ = event; #line 660 "/home/jens/Source/shotwell/src/Event.vala" _tmp44_ = event_name; #line 660 "/home/jens/Source/shotwell/src/Event.vala" event_rename (_tmp43_, _tmp44_); #line 5354 "Event.c" } #line 662 "/home/jens/Source/shotwell/src/Event.vala" _tmp45_ = events_so_far; #line 662 "/home/jens/Source/shotwell/src/Event.vala" _tmp46_ = event; #line 662 "/home/jens/Source/shotwell/src/Event.vala" _tmp47_ = event_view_new (G_TYPE_CHECK_INSTANCE_CAST (_tmp46_, TYPE_EVENT_SOURCE, EventSource)); #line 662 "/home/jens/Source/shotwell/src/Event.vala" _tmp48_ = _tmp47_; #line 662 "/home/jens/Source/shotwell/src/Event.vala" data_collection_add (G_TYPE_CHECK_INSTANCE_CAST (_tmp45_, TYPE_DATA_COLLECTION, DataCollection), G_TYPE_CHECK_INSTANCE_CAST (_tmp48_, TYPE_DATA_OBJECT, DataObject)); #line 662 "/home/jens/Source/shotwell/src/Event.vala" _g_object_unref0 (_tmp48_); #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 (_tmp33_); #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 5378 "Event.c" } #line 665 "/home/jens/Source/shotwell/src/Event.vala" return result; #line 5382 "Event.c" } goto __finally442; __catch442_database_error: { GError* err = NULL; GError* _tmp49_ = NULL; #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" _tmp49_ = err; #line 667 "/home/jens/Source/shotwell/src/Event.vala" app_window_database_error (_tmp49_); #line 657 "/home/jens/Source/shotwell/src/Event.vala" _g_error_free0 (err); #line 5399 "Event.c" } __finally442: #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 5410 "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 5420 "Event.c" } #line 672 "/home/jens/Source/shotwell/src/Event.vala" return result; #line 5424 "Event.c" } void event_generate_single_event (MediaSource* media, ViewCollection* events_so_far, const gchar* event_name) { MediaSource* _tmp0_ = NULL; Event* _tmp1_ = NULL; Event* _tmp2_ = NULL; gboolean _tmp3_ = FALSE; gboolean new_event = FALSE; Event* event = NULL; MediaSource* _tmp4_ = NULL; ViewCollection* _tmp5_ = NULL; const gchar* _tmp6_ = NULL; gboolean _tmp7_ = FALSE; Event* _tmp8_ = NULL; Event* _tmp9_ = NULL; MediaSource* _tmp10_ = NULL; Event* _tmp11_ = NULL; gboolean _tmp12_ = FALSE; #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; #line 678 "/home/jens/Source/shotwell/src/Event.vala" _tmp1_ = media_source_get_event (_tmp0_); #line 678 "/home/jens/Source/shotwell/src/Event.vala" _tmp2_ = _tmp1_; #line 678 "/home/jens/Source/shotwell/src/Event.vala" _tmp3_ = _tmp2_ != NULL; #line 678 "/home/jens/Source/shotwell/src/Event.vala" _g_object_unref0 (_tmp2_); #line 678 "/home/jens/Source/shotwell/src/Event.vala" if (_tmp3_) { #line 679 "/home/jens/Source/shotwell/src/Event.vala" return; #line 5462 "Event.c" } #line 682 "/home/jens/Source/shotwell/src/Event.vala" _tmp4_ = media; #line 682 "/home/jens/Source/shotwell/src/Event.vala" _tmp5_ = events_so_far; #line 682 "/home/jens/Source/shotwell/src/Event.vala" _tmp6_ = event_name; #line 682 "/home/jens/Source/shotwell/src/Event.vala" _tmp8_ = event_generate_event (_tmp4_, _tmp5_, _tmp6_, &_tmp7_); #line 682 "/home/jens/Source/shotwell/src/Event.vala" new_event = _tmp7_; #line 682 "/home/jens/Source/shotwell/src/Event.vala" event = _tmp8_; #line 683 "/home/jens/Source/shotwell/src/Event.vala" _tmp9_ = event; #line 683 "/home/jens/Source/shotwell/src/Event.vala" if (_tmp9_ == 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 5484 "Event.c" } #line 686 "/home/jens/Source/shotwell/src/Event.vala" _tmp10_ = media; #line 686 "/home/jens/Source/shotwell/src/Event.vala" _tmp11_ = event; #line 686 "/home/jens/Source/shotwell/src/Event.vala" media_source_set_event (_tmp10_, _tmp11_); #line 688 "/home/jens/Source/shotwell/src/Event.vala" _tmp12_ = new_event; #line 688 "/home/jens/Source/shotwell/src/Event.vala" if (_tmp12_) { #line 5496 "Event.c" EventSourceCollection* _tmp13_ = NULL; Event* _tmp14_ = NULL; #line 689 "/home/jens/Source/shotwell/src/Event.vala" _tmp13_ = event_global; #line 689 "/home/jens/Source/shotwell/src/Event.vala" _tmp14_ = event; #line 689 "/home/jens/Source/shotwell/src/Event.vala" data_collection_add (G_TYPE_CHECK_INSTANCE_CAST (_tmp13_, TYPE_DATA_COLLECTION, DataCollection), G_TYPE_CHECK_INSTANCE_CAST (_tmp14_, TYPE_DATA_OBJECT, DataObject)); #line 5505 "Event.c" } #line 675 "/home/jens/Source/shotwell/src/Event.vala" _g_object_unref0 (event); #line 5509 "Event.c" } void event_generate_many_events (GeeCollection* sources, ViewCollection* events_so_far) { GeeCollection* to_add = NULL; GeeArrayList* _tmp0_ = NULL; GeeCollection* _tmp21_ = NULL; gint _tmp22_ = 0; gint _tmp23_ = 0; #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, 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 5527 "Event.c" { GeeIterator* _media_it = NULL; GeeCollection* _tmp1_ = NULL; GeeIterator* _tmp2_ = NULL; #line 694 "/home/jens/Source/shotwell/src/Event.vala" _tmp1_ = sources; #line 694 "/home/jens/Source/shotwell/src/Event.vala" _tmp2_ = gee_iterable_iterator (G_TYPE_CHECK_INSTANCE_CAST (_tmp1_, GEE_TYPE_ITERABLE, GeeIterable)); #line 694 "/home/jens/Source/shotwell/src/Event.vala" _media_it = _tmp2_; #line 694 "/home/jens/Source/shotwell/src/Event.vala" while (TRUE) { #line 5540 "Event.c" GeeIterator* _tmp3_ = NULL; gboolean _tmp4_ = FALSE; MediaSource* media = NULL; GeeIterator* _tmp5_ = NULL; gpointer _tmp6_ = NULL; MediaSource* _tmp7_ = NULL; Event* _tmp8_ = NULL; Event* _tmp9_ = NULL; gboolean _tmp10_ = FALSE; gboolean new_event = FALSE; Event* event = NULL; MediaSource* _tmp11_ = NULL; ViewCollection* _tmp12_ = NULL; gboolean _tmp13_ = FALSE; Event* _tmp14_ = NULL; Event* _tmp15_ = NULL; MediaSource* _tmp16_ = NULL; Event* _tmp17_ = NULL; gboolean _tmp18_ = FALSE; #line 694 "/home/jens/Source/shotwell/src/Event.vala" _tmp3_ = _media_it; #line 694 "/home/jens/Source/shotwell/src/Event.vala" _tmp4_ = gee_iterator_next (_tmp3_); #line 694 "/home/jens/Source/shotwell/src/Event.vala" if (!_tmp4_) { #line 694 "/home/jens/Source/shotwell/src/Event.vala" break; #line 5568 "Event.c" } #line 694 "/home/jens/Source/shotwell/src/Event.vala" _tmp5_ = _media_it; #line 694 "/home/jens/Source/shotwell/src/Event.vala" _tmp6_ = gee_iterator_get (_tmp5_); #line 694 "/home/jens/Source/shotwell/src/Event.vala" media = (MediaSource*) _tmp6_; #line 696 "/home/jens/Source/shotwell/src/Event.vala" _tmp7_ = media; #line 696 "/home/jens/Source/shotwell/src/Event.vala" _tmp8_ = media_source_get_event (_tmp7_); #line 696 "/home/jens/Source/shotwell/src/Event.vala" _tmp9_ = _tmp8_; #line 696 "/home/jens/Source/shotwell/src/Event.vala" _tmp10_ = _tmp9_ != NULL; #line 696 "/home/jens/Source/shotwell/src/Event.vala" _g_object_unref0 (_tmp9_); #line 696 "/home/jens/Source/shotwell/src/Event.vala" if (_tmp10_) { #line 697 "/home/jens/Source/shotwell/src/Event.vala" _g_object_unref0 (media); #line 697 "/home/jens/Source/shotwell/src/Event.vala" continue; #line 5592 "Event.c" } #line 700 "/home/jens/Source/shotwell/src/Event.vala" _tmp11_ = media; #line 700 "/home/jens/Source/shotwell/src/Event.vala" _tmp12_ = events_so_far; #line 700 "/home/jens/Source/shotwell/src/Event.vala" _tmp14_ = event_generate_event (_tmp11_, _tmp12_, NULL, &_tmp13_); #line 700 "/home/jens/Source/shotwell/src/Event.vala" new_event = _tmp13_; #line 700 "/home/jens/Source/shotwell/src/Event.vala" event = _tmp14_; #line 701 "/home/jens/Source/shotwell/src/Event.vala" _tmp15_ = event; #line 701 "/home/jens/Source/shotwell/src/Event.vala" if (_tmp15_ == 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 5614 "Event.c" } #line 704 "/home/jens/Source/shotwell/src/Event.vala" _tmp16_ = media; #line 704 "/home/jens/Source/shotwell/src/Event.vala" _tmp17_ = event; #line 704 "/home/jens/Source/shotwell/src/Event.vala" media_source_set_event (_tmp16_, _tmp17_); #line 706 "/home/jens/Source/shotwell/src/Event.vala" _tmp18_ = new_event; #line 706 "/home/jens/Source/shotwell/src/Event.vala" if (_tmp18_) { #line 5626 "Event.c" GeeCollection* _tmp19_ = NULL; Event* _tmp20_ = NULL; #line 707 "/home/jens/Source/shotwell/src/Event.vala" _tmp19_ = to_add; #line 707 "/home/jens/Source/shotwell/src/Event.vala" _tmp20_ = event; #line 707 "/home/jens/Source/shotwell/src/Event.vala" gee_collection_add (_tmp19_, _tmp20_); #line 5635 "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 5641 "Event.c" } #line 694 "/home/jens/Source/shotwell/src/Event.vala" _g_object_unref0 (_media_it); #line 5645 "Event.c" } #line 710 "/home/jens/Source/shotwell/src/Event.vala" _tmp21_ = to_add; #line 710 "/home/jens/Source/shotwell/src/Event.vala" _tmp22_ = gee_collection_get_size (_tmp21_); #line 710 "/home/jens/Source/shotwell/src/Event.vala" _tmp23_ = _tmp22_; #line 710 "/home/jens/Source/shotwell/src/Event.vala" if (_tmp23_ > 0) { #line 5655 "Event.c" EventSourceCollection* _tmp24_ = NULL; GeeCollection* _tmp25_ = NULL; GeeCollection* _tmp26_ = NULL; GeeCollection* _tmp27_ = NULL; #line 711 "/home/jens/Source/shotwell/src/Event.vala" _tmp24_ = event_global; #line 711 "/home/jens/Source/shotwell/src/Event.vala" _tmp25_ = to_add; #line 711 "/home/jens/Source/shotwell/src/Event.vala" _tmp26_ = data_collection_add_many (G_TYPE_CHECK_INSTANCE_CAST (_tmp24_, TYPE_DATA_COLLECTION, DataCollection), _tmp25_, NULL, NULL); #line 711 "/home/jens/Source/shotwell/src/Event.vala" _tmp27_ = _tmp26_; #line 711 "/home/jens/Source/shotwell/src/Event.vala" _g_object_unref0 (_tmp27_); #line 5670 "Event.c" } #line 692 "/home/jens/Source/shotwell/src/Event.vala" _g_object_unref0 (to_add); #line 5674 "Event.c" } void event_get_event_id (Event* self, EventID* result) { EventID _tmp0_ = {0}; #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 5688 "Event.c" } static SourceSnapshot* event_real_save_snapshot (DataSource* base) { Event * self; SourceSnapshot* result = NULL; EventEventSnapshot* _tmp0_ = NULL; #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 5704 "Event.c" } static SourceProxy* event_real_get_proxy (Proxyable* base) { Event * self; SourceProxy* result = NULL; EventEventProxy* _tmp0_ = NULL; #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 5720 "Event.c" } static gboolean event_real_equals (DataSource* base, DataSource* source) { Event * self; gboolean result = FALSE; Event* event = NULL; DataSource* _tmp0_ = NULL; Event* _tmp1_ = NULL; Event* _tmp2_ = NULL; DataSource* _tmp9_ = NULL; gboolean _tmp10_ = FALSE; #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_ = source; #line 728 "/home/jens/Source/shotwell/src/Event.vala" _tmp1_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_TYPE (_tmp0_, TYPE_EVENT) ? ((Event*) _tmp0_) : NULL); #line 728 "/home/jens/Source/shotwell/src/Event.vala" event = _tmp1_; #line 729 "/home/jens/Source/shotwell/src/Event.vala" _tmp2_ = event; #line 729 "/home/jens/Source/shotwell/src/Event.vala" if (_tmp2_ != NULL) { #line 5747 "Event.c" Event* _tmp3_ = NULL; #line 730 "/home/jens/Source/shotwell/src/Event.vala" _tmp3_ = event; #line 730 "/home/jens/Source/shotwell/src/Event.vala" if (self != _tmp3_) { #line 5753 "Event.c" EventID _tmp4_ = {0}; gint64 _tmp5_ = 0LL; Event* _tmp6_ = NULL; EventID _tmp7_ = {0}; gint64 _tmp8_ = 0LL; #line 731 "/home/jens/Source/shotwell/src/Event.vala" _tmp4_ = self->priv->event_id; #line 731 "/home/jens/Source/shotwell/src/Event.vala" _tmp5_ = _tmp4_.id; #line 731 "/home/jens/Source/shotwell/src/Event.vala" _tmp6_ = event; #line 731 "/home/jens/Source/shotwell/src/Event.vala" _tmp7_ = _tmp6_->priv->event_id; #line 731 "/home/jens/Source/shotwell/src/Event.vala" _tmp8_ = _tmp7_.id; #line 731 "/home/jens/Source/shotwell/src/Event.vala" _vala_assert (_tmp5_ != _tmp8_, "event_id.id != event.event_id.id"); #line 5771 "Event.c" } } #line 735 "/home/jens/Source/shotwell/src/Event.vala" _tmp9_ = source; #line 735 "/home/jens/Source/shotwell/src/Event.vala" _tmp10_ = 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), _tmp9_); #line 735 "/home/jens/Source/shotwell/src/Event.vala" result = _tmp10_; #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 5784 "Event.c" } static gchar* event_real_to_string (DataObject* base) { Event * self; gchar* result = NULL; EventID _tmp0_ = {0}; gint64 _tmp1_ = 0LL; gchar* _tmp2_ = NULL; gchar* _tmp3_ = NULL; gint64 _tmp4_ = 0LL; gchar* _tmp5_ = NULL; gchar* _tmp6_ = NULL; gchar* _tmp7_ = NULL; gchar* _tmp8_ = NULL; gchar* _tmp9_ = NULL; gchar* _tmp10_ = NULL; #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_ = 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_ = g_strdup_printf ("%" G_GINT64_FORMAT, _tmp4_); #line 739 "/home/jens/Source/shotwell/src/Event.vala" _tmp6_ = _tmp5_; #line 739 "/home/jens/Source/shotwell/src/Event.vala" _tmp7_ = data_object_get_name (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_DATA_OBJECT, DataObject)); #line 739 "/home/jens/Source/shotwell/src/Event.vala" _tmp8_ = _tmp7_; #line 739 "/home/jens/Source/shotwell/src/Event.vala" _tmp9_ = g_strdup_printf ("Event [%s/%s] %s", _tmp3_, _tmp6_, _tmp8_); #line 739 "/home/jens/Source/shotwell/src/Event.vala" _tmp10_ = _tmp9_; #line 739 "/home/jens/Source/shotwell/src/Event.vala" _g_free0 (_tmp8_); #line 739 "/home/jens/Source/shotwell/src/Event.vala" _g_free0 (_tmp6_); #line 739 "/home/jens/Source/shotwell/src/Event.vala" _g_free0 (_tmp3_); #line 739 "/home/jens/Source/shotwell/src/Event.vala" result = _tmp10_; #line 739 "/home/jens/Source/shotwell/src/Event.vala" return result; #line 5836 "Event.c" } gboolean event_has_name (Event* self) { gboolean result = FALSE; gboolean _tmp0_ = FALSE; const gchar* _tmp1_ = NULL; #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 5850 "Event.c" const gchar* _tmp2_ = NULL; gint _tmp3_ = 0; gint _tmp4_ = 0; #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 5862 "Event.c" } else { #line 743 "/home/jens/Source/shotwell/src/Event.vala" _tmp0_ = FALSE; #line 5866 "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 5872 "Event.c" } static gchar* event_real_get_name (DataObject* base) { Event * self; gchar* result = NULL; gboolean _tmp0_ = FALSE; gchar* datestring = NULL; gchar* _tmp2_ = NULL; gchar* _tmp3_ = NULL; const gchar* _tmp4_ = NULL; gboolean _tmp5_ = FALSE; #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" _tmp0_ = event_has_name (self); #line 747 "/home/jens/Source/shotwell/src/Event.vala" if (_tmp0_) { #line 5891 "Event.c" gchar* _tmp1_ = NULL; #line 748 "/home/jens/Source/shotwell/src/Event.vala" _tmp1_ = event_get_raw_name (self); #line 748 "/home/jens/Source/shotwell/src/Event.vala" result = _tmp1_; #line 748 "/home/jens/Source/shotwell/src/Event.vala" return result; #line 5899 "Event.c" } #line 751 "/home/jens/Source/shotwell/src/Event.vala" _tmp2_ = event_get_formatted_daterange (self); #line 751 "/home/jens/Source/shotwell/src/Event.vala" datestring = _tmp2_; #line 753 "/home/jens/Source/shotwell/src/Event.vala" _tmp4_ = datestring; #line 753 "/home/jens/Source/shotwell/src/Event.vala" _tmp5_ = is_string_empty (_tmp4_); #line 753 "/home/jens/Source/shotwell/src/Event.vala" if (!_tmp5_) { #line 5911 "Event.c" const gchar* _tmp6_ = NULL; gchar* _tmp7_ = NULL; #line 753 "/home/jens/Source/shotwell/src/Event.vala" _tmp6_ = datestring; #line 753 "/home/jens/Source/shotwell/src/Event.vala" _tmp7_ = g_strdup (_tmp6_); #line 753 "/home/jens/Source/shotwell/src/Event.vala" _g_free0 (_tmp3_); #line 753 "/home/jens/Source/shotwell/src/Event.vala" _tmp3_ = _tmp7_; #line 5922 "Event.c" } else { const gchar* _tmp8_ = NULL; EventID _tmp9_ = {0}; gint64 _tmp10_ = 0LL; gchar* _tmp11_ = NULL; gchar* _tmp12_ = NULL; gchar* _tmp13_ = NULL; #line 753 "/home/jens/Source/shotwell/src/Event.vala" _tmp8_ = _ ("Event %s"); #line 753 "/home/jens/Source/shotwell/src/Event.vala" _tmp9_ = self->priv->event_id; #line 753 "/home/jens/Source/shotwell/src/Event.vala" _tmp10_ = _tmp9_.id; #line 753 "/home/jens/Source/shotwell/src/Event.vala" _tmp11_ = g_strdup_printf ("%" G_GINT64_FORMAT, _tmp10_); #line 753 "/home/jens/Source/shotwell/src/Event.vala" _tmp12_ = _tmp11_; #line 753 "/home/jens/Source/shotwell/src/Event.vala" _tmp13_ = g_strdup_printf (_tmp8_, _tmp12_); #line 753 "/home/jens/Source/shotwell/src/Event.vala" _g_free0 (_tmp3_); #line 753 "/home/jens/Source/shotwell/src/Event.vala" _tmp3_ = _tmp13_; #line 753 "/home/jens/Source/shotwell/src/Event.vala" _g_free0 (_tmp12_); #line 5948 "Event.c" } #line 753 "/home/jens/Source/shotwell/src/Event.vala" result = _tmp3_; #line 753 "/home/jens/Source/shotwell/src/Event.vala" _g_free0 (datestring); #line 753 "/home/jens/Source/shotwell/src/Event.vala" return result; #line 5956 "Event.c" } gchar* event_get_formatted_daterange (Event* self) { gchar* result = NULL; time_t start_time = 0; time_t _tmp0_ = 0; time_t end_time = 0; time_t _tmp1_ = 0; gboolean _tmp2_ = FALSE; time_t _tmp3_ = 0; gboolean _tmp5_ = FALSE; time_t _tmp6_ = 0; struct tm start = {0}; time_t _tmp11_ = 0; struct tm _tmp12_ = {0}; struct tm end = {0}; time_t _tmp13_ = 0; struct tm _tmp14_ = {0}; gboolean _tmp15_ = FALSE; gboolean _tmp16_ = FALSE; struct tm _tmp17_ = {0}; gint _tmp18_ = 0; struct tm _tmp19_ = {0}; gint _tmp20_ = 0; struct tm _tmp32_ = {0}; struct tm _tmp33_ = {0}; gchar* _tmp34_ = NULL; #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" _tmp0_ = event_source_get_start_time (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_EVENT_SOURCE, EventSource)); #line 757 "/home/jens/Source/shotwell/src/Event.vala" start_time = _tmp0_; #line 758 "/home/jens/Source/shotwell/src/Event.vala" _tmp1_ = event_source_get_end_time (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_EVENT_SOURCE, EventSource)); #line 758 "/home/jens/Source/shotwell/src/Event.vala" end_time = _tmp1_; #line 760 "/home/jens/Source/shotwell/src/Event.vala" _tmp3_ = end_time; #line 760 "/home/jens/Source/shotwell/src/Event.vala" if (_tmp3_ == ((time_t) 0)) { #line 5999 "Event.c" time_t _tmp4_ = 0; #line 760 "/home/jens/Source/shotwell/src/Event.vala" _tmp4_ = start_time; #line 760 "/home/jens/Source/shotwell/src/Event.vala" _tmp2_ = _tmp4_ == ((time_t) 0); #line 6005 "Event.c" } else { #line 760 "/home/jens/Source/shotwell/src/Event.vala" _tmp2_ = FALSE; #line 6009 "Event.c" } #line 760 "/home/jens/Source/shotwell/src/Event.vala" if (_tmp2_) { #line 761 "/home/jens/Source/shotwell/src/Event.vala" result = NULL; #line 761 "/home/jens/Source/shotwell/src/Event.vala" return result; #line 6017 "Event.c" } #line 763 "/home/jens/Source/shotwell/src/Event.vala" _tmp6_ = end_time; #line 763 "/home/jens/Source/shotwell/src/Event.vala" if (_tmp6_ == ((time_t) 0)) { #line 6023 "Event.c" time_t _tmp7_ = 0; #line 763 "/home/jens/Source/shotwell/src/Event.vala" _tmp7_ = start_time; #line 763 "/home/jens/Source/shotwell/src/Event.vala" _tmp5_ = _tmp7_ != ((time_t) 0); #line 6029 "Event.c" } else { #line 763 "/home/jens/Source/shotwell/src/Event.vala" _tmp5_ = FALSE; #line 6033 "Event.c" } #line 763 "/home/jens/Source/shotwell/src/Event.vala" if (_tmp5_) { #line 6037 "Event.c" time_t _tmp8_ = 0; struct tm _tmp9_ = {0}; gchar* _tmp10_ = NULL; #line 764 "/home/jens/Source/shotwell/src/Event.vala" _tmp8_ = start_time; #line 764 "/home/jens/Source/shotwell/src/Event.vala" g_time_local (_tmp8_, &_tmp9_); #line 764 "/home/jens/Source/shotwell/src/Event.vala" _tmp10_ = format_local_date (&_tmp9_); #line 764 "/home/jens/Source/shotwell/src/Event.vala" result = _tmp10_; #line 764 "/home/jens/Source/shotwell/src/Event.vala" return result; #line 6051 "Event.c" } #line 766 "/home/jens/Source/shotwell/src/Event.vala" _tmp11_ = start_time; #line 766 "/home/jens/Source/shotwell/src/Event.vala" g_time_local (_tmp11_, &_tmp12_); #line 766 "/home/jens/Source/shotwell/src/Event.vala" start = _tmp12_; #line 767 "/home/jens/Source/shotwell/src/Event.vala" _tmp13_ = end_time; #line 767 "/home/jens/Source/shotwell/src/Event.vala" g_time_local (_tmp13_, &_tmp14_); #line 767 "/home/jens/Source/shotwell/src/Event.vala" end = _tmp14_; #line 769 "/home/jens/Source/shotwell/src/Event.vala" _tmp17_ = start; #line 769 "/home/jens/Source/shotwell/src/Event.vala" _tmp18_ = _tmp17_.tm_mday; #line 769 "/home/jens/Source/shotwell/src/Event.vala" _tmp19_ = end; #line 769 "/home/jens/Source/shotwell/src/Event.vala" _tmp20_ = _tmp19_.tm_mday; #line 769 "/home/jens/Source/shotwell/src/Event.vala" if (_tmp18_ == _tmp20_) { #line 6075 "Event.c" struct tm _tmp21_ = {0}; gint _tmp22_ = 0; struct tm _tmp23_ = {0}; gint _tmp24_ = 0; #line 769 "/home/jens/Source/shotwell/src/Event.vala" _tmp21_ = start; #line 769 "/home/jens/Source/shotwell/src/Event.vala" _tmp22_ = _tmp21_.tm_mon; #line 769 "/home/jens/Source/shotwell/src/Event.vala" _tmp23_ = end; #line 769 "/home/jens/Source/shotwell/src/Event.vala" _tmp24_ = _tmp23_.tm_mon; #line 769 "/home/jens/Source/shotwell/src/Event.vala" _tmp16_ = _tmp22_ == _tmp24_; #line 6090 "Event.c" } else { #line 769 "/home/jens/Source/shotwell/src/Event.vala" _tmp16_ = FALSE; #line 6094 "Event.c" } #line 769 "/home/jens/Source/shotwell/src/Event.vala" if (_tmp16_) { #line 6098 "Event.c" struct tm _tmp25_ = {0}; gint _tmp26_ = 0; struct tm _tmp27_ = {0}; gint _tmp28_ = 0; #line 769 "/home/jens/Source/shotwell/src/Event.vala" _tmp25_ = start; #line 769 "/home/jens/Source/shotwell/src/Event.vala" _tmp26_ = _tmp25_.tm_mday; #line 769 "/home/jens/Source/shotwell/src/Event.vala" _tmp27_ = end; #line 769 "/home/jens/Source/shotwell/src/Event.vala" _tmp28_ = _tmp27_.tm_mday; #line 769 "/home/jens/Source/shotwell/src/Event.vala" _tmp15_ = _tmp26_ == _tmp28_; #line 6113 "Event.c" } else { #line 769 "/home/jens/Source/shotwell/src/Event.vala" _tmp15_ = FALSE; #line 6117 "Event.c" } #line 769 "/home/jens/Source/shotwell/src/Event.vala" if (_tmp15_) { #line 6121 "Event.c" time_t _tmp29_ = 0; struct tm _tmp30_ = {0}; gchar* _tmp31_ = NULL; #line 770 "/home/jens/Source/shotwell/src/Event.vala" _tmp29_ = start_time; #line 770 "/home/jens/Source/shotwell/src/Event.vala" g_time_local (_tmp29_, &_tmp30_); #line 770 "/home/jens/Source/shotwell/src/Event.vala" _tmp31_ = format_local_date (&_tmp30_); #line 770 "/home/jens/Source/shotwell/src/Event.vala" result = _tmp31_; #line 770 "/home/jens/Source/shotwell/src/Event.vala" return result; #line 6135 "Event.c" } #line 772 "/home/jens/Source/shotwell/src/Event.vala" _tmp32_ = start; #line 772 "/home/jens/Source/shotwell/src/Event.vala" _tmp33_ = end; #line 772 "/home/jens/Source/shotwell/src/Event.vala" _tmp34_ = format_local_datespan (&_tmp32_, &_tmp33_); #line 772 "/home/jens/Source/shotwell/src/Event.vala" result = _tmp34_; #line 772 "/home/jens/Source/shotwell/src/Event.vala" return result; #line 6147 "Event.c" } gchar* event_get_raw_name (Event* self) { gchar* result = NULL; const gchar* _tmp0_ = NULL; gchar* _tmp1_ = NULL; #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 6165 "Event.c" } static gchar* event_real_get_comment (EventSource* base) { Event * self; gchar* result = NULL; const gchar* _tmp0_ = NULL; gchar* _tmp1_ = NULL; #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 6184 "Event.c" } gboolean event_rename (Event* self, const gchar* name) { gboolean result = FALSE; gchar* new_name = NULL; const gchar* _tmp0_ = NULL; gchar* _tmp1_ = NULL; const gchar* _tmp2_ = NULL; gchar* _tmp3_ = NULL; gchar* _tmp4_ = NULL; gboolean _tmp5_ = FALSE; gboolean renamed = FALSE; EventTable* _tmp7_ = NULL; EventID _tmp8_ = {0}; const gchar* _tmp9_ = NULL; gboolean _tmp10_ = FALSE; gboolean _tmp11_ = FALSE; #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_ = name; #line 784 "/home/jens/Source/shotwell/src/Event.vala" _tmp1_ = event_prep_event_name (_tmp0_); #line 784 "/home/jens/Source/shotwell/src/Event.vala" new_name = _tmp1_; #line 787 "/home/jens/Source/shotwell/src/Event.vala" _tmp2_ = new_name; #line 787 "/home/jens/Source/shotwell/src/Event.vala" _tmp3_ = event_get_formatted_daterange (self); #line 787 "/home/jens/Source/shotwell/src/Event.vala" _tmp4_ = _tmp3_; #line 787 "/home/jens/Source/shotwell/src/Event.vala" _tmp5_ = g_strcmp0 (_tmp2_, _tmp4_) == 0; #line 787 "/home/jens/Source/shotwell/src/Event.vala" _g_free0 (_tmp4_); #line 787 "/home/jens/Source/shotwell/src/Event.vala" if (_tmp5_) { #line 6223 "Event.c" gchar* _tmp6_ = NULL; #line 788 "/home/jens/Source/shotwell/src/Event.vala" _tmp6_ = 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 = _tmp6_; #line 6231 "Event.c" } #line 791 "/home/jens/Source/shotwell/src/Event.vala" _tmp7_ = event_event_table; #line 791 "/home/jens/Source/shotwell/src/Event.vala" _tmp8_ = self->priv->event_id; #line 791 "/home/jens/Source/shotwell/src/Event.vala" _tmp9_ = new_name; #line 791 "/home/jens/Source/shotwell/src/Event.vala" _tmp10_ = event_table_rename (_tmp7_, &_tmp8_, _tmp9_); #line 791 "/home/jens/Source/shotwell/src/Event.vala" renamed = _tmp10_; #line 792 "/home/jens/Source/shotwell/src/Event.vala" _tmp11_ = renamed; #line 792 "/home/jens/Source/shotwell/src/Event.vala" if (_tmp11_) { #line 6247 "Event.c" const gchar* _tmp12_ = NULL; gchar* _tmp13_ = NULL; Alteration* _tmp14_ = NULL; Alteration* _tmp15_ = NULL; #line 793 "/home/jens/Source/shotwell/src/Event.vala" _tmp12_ = new_name; #line 793 "/home/jens/Source/shotwell/src/Event.vala" _tmp13_ = g_strdup (_tmp12_); #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 = _tmp13_; #line 794 "/home/jens/Source/shotwell/src/Event.vala" event_update_indexable_keywords (self); #line 795 "/home/jens/Source/shotwell/src/Event.vala" _tmp14_ = alteration_new_from_list ("metadata:name, indexable:keywords"); #line 795 "/home/jens/Source/shotwell/src/Event.vala" _tmp15_ = _tmp14_; #line 795 "/home/jens/Source/shotwell/src/Event.vala" data_object_notify_altered (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_DATA_OBJECT, DataObject), _tmp15_); #line 795 "/home/jens/Source/shotwell/src/Event.vala" _alteration_unref0 (_tmp15_); #line 6270 "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 6278 "Event.c" } static gboolean event_real_set_comment (EventSource* base, const gchar* comment) { Event * self; gboolean result = FALSE; gchar* new_comment = NULL; const gchar* _tmp0_ = NULL; gchar* _tmp1_ = NULL; gboolean committed = FALSE; EventTable* _tmp2_ = NULL; EventID _tmp3_ = {0}; const gchar* _tmp4_ = NULL; gboolean _tmp5_ = FALSE; gboolean _tmp6_ = FALSE; #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_ = comment; #line 802 "/home/jens/Source/shotwell/src/Event.vala" _tmp1_ = media_source_prep_comment (_tmp0_); #line 802 "/home/jens/Source/shotwell/src/Event.vala" new_comment = _tmp1_; #line 804 "/home/jens/Source/shotwell/src/Event.vala" _tmp2_ = event_event_table; #line 804 "/home/jens/Source/shotwell/src/Event.vala" _tmp3_ = self->priv->event_id; #line 804 "/home/jens/Source/shotwell/src/Event.vala" _tmp4_ = new_comment; #line 804 "/home/jens/Source/shotwell/src/Event.vala" _tmp5_ = event_table_set_comment (_tmp2_, &_tmp3_, _tmp4_); #line 804 "/home/jens/Source/shotwell/src/Event.vala" committed = _tmp5_; #line 805 "/home/jens/Source/shotwell/src/Event.vala" _tmp6_ = committed; #line 805 "/home/jens/Source/shotwell/src/Event.vala" if (_tmp6_) { #line 6316 "Event.c" const gchar* _tmp7_ = NULL; gchar* _tmp8_ = NULL; Alteration* _tmp9_ = NULL; Alteration* _tmp10_ = NULL; #line 806 "/home/jens/Source/shotwell/src/Event.vala" _tmp7_ = new_comment; #line 806 "/home/jens/Source/shotwell/src/Event.vala" _tmp8_ = g_strdup (_tmp7_); #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 = _tmp8_; #line 807 "/home/jens/Source/shotwell/src/Event.vala" event_update_indexable_keywords (self); #line 808 "/home/jens/Source/shotwell/src/Event.vala" _tmp9_ = alteration_new_from_list ("metadata:comment, indexable:keywords"); #line 808 "/home/jens/Source/shotwell/src/Event.vala" _tmp10_ = _tmp9_; #line 808 "/home/jens/Source/shotwell/src/Event.vala" data_object_notify_altered (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_DATA_OBJECT, DataObject), _tmp10_); #line 808 "/home/jens/Source/shotwell/src/Event.vala" _alteration_unref0 (_tmp10_); #line 6339 "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 6347 "Event.c" } time_t event_get_creation_time (Event* self) { time_t result = 0; EventTable* _tmp0_ = NULL; EventID _tmp1_ = {0}; time_t _tmp2_ = 0; #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" _tmp2_ = event_table_get_time_created (_tmp0_, &_tmp1_); #line 815 "/home/jens/Source/shotwell/src/Event.vala" result = _tmp2_; #line 815 "/home/jens/Source/shotwell/src/Event.vala" return result; #line 6368 "Event.c" } static time_t event_real_get_start_time (EventSource* base) { Event * self; time_t result = 0; gint count = 0; ViewCollection* _tmp0_ = NULL; gint _tmp1_ = 0; #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" _tmp1_ = data_collection_get_count (G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, TYPE_DATA_COLLECTION, DataCollection)); #line 821 "/home/jens/Source/shotwell/src/Event.vala" count = _tmp1_; #line 6386 "Event.c" { gint i = 0; #line 822 "/home/jens/Source/shotwell/src/Event.vala" i = 0; #line 6391 "Event.c" { gboolean _tmp2_ = FALSE; #line 822 "/home/jens/Source/shotwell/src/Event.vala" _tmp2_ = TRUE; #line 822 "/home/jens/Source/shotwell/src/Event.vala" while (TRUE) { #line 6398 "Event.c" gint _tmp4_ = 0; gint _tmp5_ = 0; time_t time = 0; ViewCollection* _tmp6_ = NULL; gint _tmp7_ = 0; DataObject* _tmp8_ = NULL; DataView* _tmp9_ = NULL; DataSource* _tmp10_ = NULL; MediaSource* _tmp11_ = NULL; time_t _tmp12_ = 0; time_t _tmp13_ = 0; time_t _tmp14_ = 0; #line 822 "/home/jens/Source/shotwell/src/Event.vala" if (!_tmp2_) { #line 6413 "Event.c" gint _tmp3_ = 0; #line 822 "/home/jens/Source/shotwell/src/Event.vala" _tmp3_ = i; #line 822 "/home/jens/Source/shotwell/src/Event.vala" i = _tmp3_ + 1; #line 6419 "Event.c" } #line 822 "/home/jens/Source/shotwell/src/Event.vala" _tmp2_ = FALSE; #line 822 "/home/jens/Source/shotwell/src/Event.vala" _tmp4_ = i; #line 822 "/home/jens/Source/shotwell/src/Event.vala" _tmp5_ = count; #line 822 "/home/jens/Source/shotwell/src/Event.vala" if (!(_tmp4_ < _tmp5_)) { #line 822 "/home/jens/Source/shotwell/src/Event.vala" break; #line 6431 "Event.c" } #line 823 "/home/jens/Source/shotwell/src/Event.vala" _tmp6_ = self->priv->view; #line 823 "/home/jens/Source/shotwell/src/Event.vala" _tmp7_ = i; #line 823 "/home/jens/Source/shotwell/src/Event.vala" _tmp8_ = data_collection_get_at (G_TYPE_CHECK_INSTANCE_CAST (_tmp6_, TYPE_DATA_COLLECTION, DataCollection), _tmp7_); #line 823 "/home/jens/Source/shotwell/src/Event.vala" _tmp9_ = G_TYPE_CHECK_INSTANCE_CAST (_tmp8_, TYPE_DATA_VIEW, DataView); #line 823 "/home/jens/Source/shotwell/src/Event.vala" _tmp10_ = data_view_get_source (_tmp9_); #line 823 "/home/jens/Source/shotwell/src/Event.vala" _tmp11_ = G_TYPE_CHECK_INSTANCE_CAST (_tmp10_, TYPE_MEDIA_SOURCE, MediaSource); #line 823 "/home/jens/Source/shotwell/src/Event.vala" _tmp12_ = media_source_get_exposure_time (_tmp11_); #line 823 "/home/jens/Source/shotwell/src/Event.vala" _tmp13_ = _tmp12_; #line 823 "/home/jens/Source/shotwell/src/Event.vala" _g_object_unref0 (_tmp11_); #line 823 "/home/jens/Source/shotwell/src/Event.vala" _g_object_unref0 (_tmp9_); #line 823 "/home/jens/Source/shotwell/src/Event.vala" time = _tmp13_; #line 824 "/home/jens/Source/shotwell/src/Event.vala" _tmp14_ = time; #line 824 "/home/jens/Source/shotwell/src/Event.vala" if (_tmp14_ != ((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 6463 "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 6472 "Event.c" } static time_t event_real_get_end_time (EventSource* base) { Event * self; time_t result = 0; gint count = 0; ViewCollection* _tmp0_ = NULL; gint _tmp1_ = 0; gint _tmp2_ = 0; ViewCollection* _tmp3_ = NULL; gint _tmp4_ = 0; DataObject* _tmp5_ = NULL; DataView* _tmp6_ = NULL; DataSource* _tmp7_ = NULL; MediaSource* _tmp8_ = NULL; time_t _tmp9_ = 0; time_t _tmp10_ = 0; #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" _tmp1_ = data_collection_get_count (G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, TYPE_DATA_COLLECTION, DataCollection)); #line 832 "/home/jens/Source/shotwell/src/Event.vala" count = _tmp1_; #line 836 "/home/jens/Source/shotwell/src/Event.vala" _tmp2_ = count; #line 836 "/home/jens/Source/shotwell/src/Event.vala" if (_tmp2_ == 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 6507 "Event.c" } #line 839 "/home/jens/Source/shotwell/src/Event.vala" _tmp3_ = self->priv->view; #line 839 "/home/jens/Source/shotwell/src/Event.vala" _tmp4_ = count; #line 839 "/home/jens/Source/shotwell/src/Event.vala" _tmp5_ = data_collection_get_at (G_TYPE_CHECK_INSTANCE_CAST (_tmp3_, TYPE_DATA_COLLECTION, DataCollection), _tmp4_ - 1); #line 839 "/home/jens/Source/shotwell/src/Event.vala" _tmp6_ = G_TYPE_CHECK_INSTANCE_CAST (_tmp5_, TYPE_DATA_VIEW, DataView); #line 839 "/home/jens/Source/shotwell/src/Event.vala" _tmp7_ = data_view_get_source (_tmp6_); #line 839 "/home/jens/Source/shotwell/src/Event.vala" _tmp8_ = G_TYPE_CHECK_INSTANCE_CAST (_tmp7_, TYPE_MEDIA_SOURCE, MediaSource); #line 839 "/home/jens/Source/shotwell/src/Event.vala" _tmp9_ = media_source_get_exposure_time (_tmp8_); #line 839 "/home/jens/Source/shotwell/src/Event.vala" _tmp10_ = _tmp9_; #line 839 "/home/jens/Source/shotwell/src/Event.vala" _g_object_unref0 (_tmp8_); #line 839 "/home/jens/Source/shotwell/src/Event.vala" _g_object_unref0 (_tmp6_); #line 839 "/home/jens/Source/shotwell/src/Event.vala" result = _tmp10_; #line 839 "/home/jens/Source/shotwell/src/Event.vala" return result; #line 6533 "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 6545 "Event.c" { GeeIterator* _current_source_it = NULL; GeeCollection* _tmp0_ = NULL; GeeCollection* _tmp1_ = NULL; GeeIterator* _tmp2_ = NULL; GeeIterator* _tmp3_ = NULL; #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 6566 "Event.c" GeeIterator* _tmp4_ = NULL; gboolean _tmp5_ = FALSE; MediaSource* current_source = NULL; GeeIterator* _tmp6_ = NULL; gpointer _tmp7_ = NULL; guint64 _tmp8_ = 0ULL; MediaSource* _tmp9_ = NULL; guint64 _tmp10_ = 0ULL; #line 844 "/home/jens/Source/shotwell/src/Event.vala" _tmp4_ = _current_source_it; #line 844 "/home/jens/Source/shotwell/src/Event.vala" _tmp5_ = gee_iterator_next (_tmp4_); #line 844 "/home/jens/Source/shotwell/src/Event.vala" if (!_tmp5_) { #line 844 "/home/jens/Source/shotwell/src/Event.vala" break; #line 6583 "Event.c" } #line 844 "/home/jens/Source/shotwell/src/Event.vala" _tmp6_ = _current_source_it; #line 844 "/home/jens/Source/shotwell/src/Event.vala" _tmp7_ = gee_iterator_get (_tmp6_); #line 844 "/home/jens/Source/shotwell/src/Event.vala" current_source = (MediaSource*) _tmp7_; #line 845 "/home/jens/Source/shotwell/src/Event.vala" _tmp8_ = total; #line 845 "/home/jens/Source/shotwell/src/Event.vala" _tmp9_ = current_source; #line 845 "/home/jens/Source/shotwell/src/Event.vala" _tmp10_ = media_source_get_filesize (_tmp9_); #line 845 "/home/jens/Source/shotwell/src/Event.vala" total = _tmp8_ + _tmp10_; #line 844 "/home/jens/Source/shotwell/src/Event.vala" _g_object_unref0 (current_source); #line 6601 "Event.c" } #line 844 "/home/jens/Source/shotwell/src/Event.vala" _g_object_unref0 (_current_source_it); #line 6605 "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 6611 "Event.c" } static gint event_real_get_media_count (EventSource* base) { Event * self; gint result = 0; ViewCollection* _tmp0_ = NULL; gint _tmp1_ = 0; #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" _tmp1_ = data_collection_get_count (G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, TYPE_DATA_COLLECTION, DataCollection)); #line 852 "/home/jens/Source/shotwell/src/Event.vala" result = _tmp1_; #line 852 "/home/jens/Source/shotwell/src/Event.vala" return result; #line 6630 "Event.c" } static GeeCollection* event_real_get_media (EventSource* base) { Event * self; GeeCollection* result = NULL; ViewCollection* _tmp0_ = NULL; GeeCollection* _tmp1_ = NULL; #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 6649 "Event.c" } void event_mirror_photos (Event* self, ViewCollection* view, CreateView mirroring_ctor, void* mirroring_ctor_target) { ViewCollection* _tmp0_ = NULL; ViewCollection* _tmp1_ = NULL; CreateView _tmp2_ = NULL; void* _tmp2__target = NULL; #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_ = view; #line 860 "/home/jens/Source/shotwell/src/Event.vala" _tmp1_ = self->priv->view; #line 860 "/home/jens/Source/shotwell/src/Event.vala" _tmp2_ = mirroring_ctor; #line 860 "/home/jens/Source/shotwell/src/Event.vala" _tmp2__target = mirroring_ctor_target; #line 860 "/home/jens/Source/shotwell/src/Event.vala" view_collection_mirror (_tmp0_, _tmp1_, _tmp2_, _tmp2__target, NULL, NULL); #line 6672 "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 6681 "Event.c" } MediaSource* event_get_primary_source (Event* self) { MediaSource* result = NULL; MediaSource* _tmp0_ = NULL; MediaSource* _tmp1_ = NULL; #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 6699 "Event.c" } gboolean event_set_primary_source (Event* self, MediaSource* source) { gboolean result = FALSE; ViewCollection* _tmp0_ = NULL; MediaSource* _tmp1_ = NULL; gboolean _tmp2_ = FALSE; gboolean committed = FALSE; EventTable* _tmp3_ = NULL; EventID _tmp4_ = {0}; MediaSource* _tmp5_ = NULL; gchar* _tmp6_ = NULL; gchar* _tmp7_ = NULL; gboolean _tmp8_ = FALSE; gboolean _tmp9_ = FALSE; gboolean _tmp10_ = FALSE; #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" _tmp1_ = source; #line 872 "/home/jens/Source/shotwell/src/Event.vala" _tmp2_ = view_collection_has_view_for_source (_tmp0_, G_TYPE_CHECK_INSTANCE_CAST (_tmp1_, TYPE_DATA_SOURCE, DataSource)); #line 872 "/home/jens/Source/shotwell/src/Event.vala" _vala_assert (_tmp2_, "view.has_view_for_source(source)"); #line 874 "/home/jens/Source/shotwell/src/Event.vala" _tmp3_ = event_event_table; #line 874 "/home/jens/Source/shotwell/src/Event.vala" _tmp4_ = self->priv->event_id; #line 874 "/home/jens/Source/shotwell/src/Event.vala" _tmp5_ = source; #line 874 "/home/jens/Source/shotwell/src/Event.vala" _tmp6_ = data_source_get_source_id (G_TYPE_CHECK_INSTANCE_CAST (_tmp5_, TYPE_DATA_SOURCE, DataSource)); #line 874 "/home/jens/Source/shotwell/src/Event.vala" _tmp7_ = _tmp6_; #line 874 "/home/jens/Source/shotwell/src/Event.vala" _tmp8_ = event_table_set_primary_source_id (_tmp3_, &_tmp4_, _tmp7_); #line 874 "/home/jens/Source/shotwell/src/Event.vala" _tmp9_ = _tmp8_; #line 874 "/home/jens/Source/shotwell/src/Event.vala" _g_free0 (_tmp7_); #line 874 "/home/jens/Source/shotwell/src/Event.vala" committed = _tmp9_; #line 875 "/home/jens/Source/shotwell/src/Event.vala" _tmp10_ = committed; #line 875 "/home/jens/Source/shotwell/src/Event.vala" if (_tmp10_) { #line 6751 "Event.c" MediaSource* _tmp11_ = NULL; MediaSource* _tmp14_ = NULL; MediaSource* _tmp15_ = NULL; MediaSource* _tmp16_ = NULL; #line 877 "/home/jens/Source/shotwell/src/Event.vala" _tmp11_ = self->priv->primary_source; #line 877 "/home/jens/Source/shotwell/src/Event.vala" if (_tmp11_ != NULL) { #line 6760 "Event.c" MediaSource* _tmp12_ = NULL; guint _tmp13_ = 0U; #line 878 "/home/jens/Source/shotwell/src/Event.vala" _tmp12_ = self->priv->primary_source; #line 878 "/home/jens/Source/shotwell/src/Event.vala" g_signal_parse_name ("thumbnail-altered", TYPE_THUMBNAIL_SOURCE, &_tmp13_, NULL, FALSE); #line 878 "/home/jens/Source/shotwell/src/Event.vala" g_signal_handlers_disconnect_matched (G_TYPE_CHECK_INSTANCE_CAST (_tmp12_, TYPE_THUMBNAIL_SOURCE, ThumbnailSource), G_SIGNAL_MATCH_ID | G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA, _tmp13_, 0, NULL, (GCallback) _event_on_primary_thumbnail_altered_thumbnail_source_thumbnail_altered, self); #line 6769 "Event.c" } #line 880 "/home/jens/Source/shotwell/src/Event.vala" _tmp14_ = source; #line 880 "/home/jens/Source/shotwell/src/Event.vala" _tmp15_ = _g_object_ref0 (_tmp14_); #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 = _tmp15_; #line 881 "/home/jens/Source/shotwell/src/Event.vala" _tmp16_ = self->priv->primary_source; #line 881 "/home/jens/Source/shotwell/src/Event.vala" g_signal_connect_object (G_TYPE_CHECK_INSTANCE_CAST (_tmp16_, 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 6785 "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 6791 "Event.c" } static void event_release_primary_source (Event* self) { MediaSource* _tmp0_ = NULL; MediaSource* _tmp1_ = NULL; guint _tmp2_ = 0U; #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 6807 "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 6819 "Event.c" } static GdkPixbuf* event_real_get_thumbnail (ThumbnailSource* base, gint scale, GError** error) { Event * self; GdkPixbuf* result = NULL; GdkPixbuf* _tmp0_ = NULL; MediaSource* _tmp1_ = NULL; 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 6835 "Event.c" MediaSource* _tmp2_ = NULL; gint _tmp3_ = 0; GdkPixbuf* _tmp4_ = NULL; #line 898 "/home/jens/Source/shotwell/src/Event.vala" _tmp2_ = self->priv->primary_source; #line 898 "/home/jens/Source/shotwell/src/Event.vala" _tmp3_ = scale; #line 898 "/home/jens/Source/shotwell/src/Event.vala" _tmp4_ = thumbnail_source_get_thumbnail (G_TYPE_CHECK_INSTANCE_CAST (_tmp2_, TYPE_THUMBNAIL_SOURCE, ThumbnailSource), _tmp3_, &_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_ = _tmp4_; #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 6857 "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 6864 "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 6870 "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 6881 "Event.c" { GdkPixbuf* _tmp0_ = NULL; MediaSource* _tmp1_ = NULL; MediaSource* _tmp2_ = NULL; Scaling _tmp3_ = {0}; GdkPixbuf* _tmp4_ = NULL; GdkPixbuf* _tmp5_ = NULL; GdkPixbuf* _tmp6_ = NULL; #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 6906 "Event.c" goto __catch443_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 6919 "Event.c" } goto __finally443; __catch443_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 6935 "Event.c" } __finally443: #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 6944 "Event.c" } static void event_real_destroy (DataSource* base) { Event * self; ViewCollection* _tmp0_ = NULL; PhotoTable* _tmp4_ = NULL; PhotoTable* _tmp5_ = NULL; EventID _tmp6_ = {0}; VideoTable* _tmp7_ = NULL; VideoTable* _tmp8_ = NULL; EventID _tmp9_ = {0}; 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 6964 "Event.c" { EventTable* _tmp1_ = NULL; EventID _tmp2_ = {0}; #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 6978 "Event.c" goto __catch444_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 6987 "Event.c" } } goto __finally444; __catch444_database_error: { GError* err = NULL; GError* _tmp3_ = NULL; #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 7005 "Event.c" } __finally444: #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 7016 "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 7040 "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 7047 "Event.c" } static EventEventSnapshot* event_event_snapshot_construct (GType object_type, Event* event) { EventEventSnapshot* self = NULL; EventTable* _tmp0_ = NULL; EventTable* _tmp1_ = NULL; Event* _tmp2_ = NULL; EventID _tmp3_ = {0}; EventRow* _tmp4_ = NULL; Event* _tmp5_ = NULL; MediaSource* _tmp6_ = NULL; LibraryPhotoSourceCollection* _tmp18_ = NULL; VideoSourceCollection* _tmp19_ = NULL; #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" _tmp2_ = event; #line 112 "/home/jens/Source/shotwell/src/Event.vala" event_get_event_id (_tmp2_, &_tmp3_); #line 112 "/home/jens/Source/shotwell/src/Event.vala" _tmp4_ = event_table_get_row (_tmp1_, &_tmp3_); #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 = _tmp4_; #line 112 "/home/jens/Source/shotwell/src/Event.vala" _database_table_unref0 (_tmp1_); #line 113 "/home/jens/Source/shotwell/src/Event.vala" _tmp5_ = event; #line 113 "/home/jens/Source/shotwell/src/Event.vala" _tmp6_ = event_get_primary_source (_tmp5_); #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 = _tmp6_; #line 7090 "Event.c" { GeeIterator* _source_it = NULL; Event* _tmp7_ = NULL; GeeCollection* _tmp8_ = NULL; GeeCollection* _tmp9_ = NULL; GeeIterator* _tmp10_ = NULL; GeeIterator* _tmp11_ = NULL; #line 118 "/home/jens/Source/shotwell/src/Event.vala" _tmp7_ = event; #line 118 "/home/jens/Source/shotwell/src/Event.vala" _tmp8_ = event_source_get_media (G_TYPE_CHECK_INSTANCE_CAST (_tmp7_, TYPE_EVENT_SOURCE, EventSource)); #line 118 "/home/jens/Source/shotwell/src/Event.vala" _tmp9_ = _tmp8_; #line 118 "/home/jens/Source/shotwell/src/Event.vala" _tmp10_ = gee_iterable_iterator (G_TYPE_CHECK_INSTANCE_CAST (_tmp9_, GEE_TYPE_ITERABLE, GeeIterable)); #line 118 "/home/jens/Source/shotwell/src/Event.vala" _tmp11_ = _tmp10_; #line 118 "/home/jens/Source/shotwell/src/Event.vala" _g_object_unref0 (_tmp9_); #line 118 "/home/jens/Source/shotwell/src/Event.vala" _source_it = _tmp11_; #line 118 "/home/jens/Source/shotwell/src/Event.vala" while (TRUE) { #line 7114 "Event.c" GeeIterator* _tmp12_ = NULL; gboolean _tmp13_ = FALSE; MediaSource* source = NULL; GeeIterator* _tmp14_ = NULL; gpointer _tmp15_ = NULL; GeeArrayList* _tmp16_ = NULL; MediaSource* _tmp17_ = NULL; #line 118 "/home/jens/Source/shotwell/src/Event.vala" _tmp12_ = _source_it; #line 118 "/home/jens/Source/shotwell/src/Event.vala" _tmp13_ = gee_iterator_next (_tmp12_); #line 118 "/home/jens/Source/shotwell/src/Event.vala" if (!_tmp13_) { #line 118 "/home/jens/Source/shotwell/src/Event.vala" break; #line 7130 "Event.c" } #line 118 "/home/jens/Source/shotwell/src/Event.vala" _tmp14_ = _source_it; #line 118 "/home/jens/Source/shotwell/src/Event.vala" _tmp15_ = gee_iterator_get (_tmp14_); #line 118 "/home/jens/Source/shotwell/src/Event.vala" source = (MediaSource*) _tmp15_; #line 119 "/home/jens/Source/shotwell/src/Event.vala" _tmp16_ = self->priv->attached_sources; #line 119 "/home/jens/Source/shotwell/src/Event.vala" _tmp17_ = source; #line 119 "/home/jens/Source/shotwell/src/Event.vala" gee_abstract_collection_add (G_TYPE_CHECK_INSTANCE_CAST (_tmp16_, GEE_TYPE_ABSTRACT_COLLECTION, GeeAbstractCollection), _tmp17_); #line 118 "/home/jens/Source/shotwell/src/Event.vala" _g_object_unref0 (source); #line 7146 "Event.c" } #line 118 "/home/jens/Source/shotwell/src/Event.vala" _g_object_unref0 (_source_it); #line 7150 "Event.c" } #line 121 "/home/jens/Source/shotwell/src/Event.vala" _tmp18_ = library_photo_global; #line 121 "/home/jens/Source/shotwell/src/Event.vala" g_signal_connect (G_TYPE_CHECK_INSTANCE_CAST (_tmp18_, 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" _tmp19_ = video_global; #line 122 "/home/jens/Source/shotwell/src/Event.vala" g_signal_connect (G_TYPE_CHECK_INSTANCE_CAST (_tmp19_, 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 7162 "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 7169 "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 7176 "Event.c" } static EventRow* event_event_snapshot_get_row (EventEventSnapshot* self) { EventRow* result = NULL; EventRow* _tmp0_ = NULL; EventRow* _tmp1_ = NULL; #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 7194 "Event.c" } static void event_event_snapshot_real_notify_broken (SourceSnapshot* base) { EventEventSnapshot * self; EventRow* _tmp0_ = NULL; GeeArrayList* _tmp1_ = NULL; #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 7220 "Event.c" } static void event_event_snapshot_on_attached_source_destroyed (EventEventSnapshot* self, DataSource* source) { MediaSource* media_source = NULL; DataSource* _tmp0_ = NULL; MediaSource* _tmp1_ = NULL; gboolean _tmp2_ = FALSE; MediaSource* _tmp3_ = NULL; #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_ = source; #line 143 "/home/jens/Source/shotwell/src/Event.vala" _tmp1_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, TYPE_MEDIA_SOURCE, MediaSource)); #line 143 "/home/jens/Source/shotwell/src/Event.vala" media_source = _tmp1_; #line 146 "/home/jens/Source/shotwell/src/Event.vala" _tmp3_ = media_source; #line 146 "/home/jens/Source/shotwell/src/Event.vala" if (_tmp3_ != NULL) { #line 7244 "Event.c" MediaSource* _tmp4_ = NULL; MediaSource* _tmp5_ = NULL; gboolean _tmp6_ = FALSE; #line 146 "/home/jens/Source/shotwell/src/Event.vala" _tmp4_ = self->priv->primary_source; #line 146 "/home/jens/Source/shotwell/src/Event.vala" _tmp5_ = media_source; #line 146 "/home/jens/Source/shotwell/src/Event.vala" _tmp6_ = data_source_equals (G_TYPE_CHECK_INSTANCE_CAST (_tmp4_, TYPE_DATA_SOURCE, DataSource), G_TYPE_CHECK_INSTANCE_CAST (_tmp5_, TYPE_DATA_SOURCE, DataSource)); #line 146 "/home/jens/Source/shotwell/src/Event.vala" _tmp2_ = _tmp6_; #line 7256 "Event.c" } else { #line 146 "/home/jens/Source/shotwell/src/Event.vala" _tmp2_ = FALSE; #line 7260 "Event.c" } #line 146 "/home/jens/Source/shotwell/src/Event.vala" if (_tmp2_) { #line 147 "/home/jens/Source/shotwell/src/Event.vala" source_snapshot_notify_broken (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_SOURCE_SNAPSHOT, SourceSnapshot)); #line 7266 "Event.c" } else { GeeArrayList* _tmp7_ = NULL; MediaSource* _tmp8_ = NULL; gboolean _tmp9_ = FALSE; #line 148 "/home/jens/Source/shotwell/src/Event.vala" _tmp7_ = self->priv->attached_sources; #line 148 "/home/jens/Source/shotwell/src/Event.vala" _tmp8_ = media_source; #line 148 "/home/jens/Source/shotwell/src/Event.vala" _tmp9_ = gee_abstract_collection_contains (G_TYPE_CHECK_INSTANCE_CAST (_tmp7_, GEE_TYPE_ABSTRACT_COLLECTION, GeeAbstractCollection), _tmp8_); #line 148 "/home/jens/Source/shotwell/src/Event.vala" if (_tmp9_) { #line 149 "/home/jens/Source/shotwell/src/Event.vala" source_snapshot_notify_broken (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_SOURCE_SNAPSHOT, SourceSnapshot)); #line 7281 "Event.c" } } #line 142 "/home/jens/Source/shotwell/src/Event.vala" _g_object_unref0 (media_source); #line 7286 "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 = event_event_snapshot_real_notify_broken; #line 7299 "Event.c" } static void event_event_snapshot_instance_init (EventEventSnapshot * self) { GeeArrayList* _tmp0_ = NULL; #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, g_object_unref, NULL, NULL, NULL); #line 108 "/home/jens/Source/shotwell/src/Event.vala" self->priv->attached_sources = _tmp0_; #line 7311 "Event.c" } static void event_event_snapshot_finalize (SourceSnapshot* obj) { EventEventSnapshot * self; LibraryPhotoSourceCollection* _tmp0_ = NULL; guint _tmp1_ = 0U; VideoSourceCollection* _tmp2_ = NULL; guint _tmp3_ = 0U; #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 7343 "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; Event* _tmp0_ = 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" _tmp0_ = event; #line 155 "/home/jens/Source/shotwell/src/Event.vala" self = (EventEventProxy*) source_proxy_construct (object_type, G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, TYPE_DATA_SOURCE, DataSource)); #line 154 "/home/jens/Source/shotwell/src/Event.vala" return self; #line 7370 "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 7377 "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 7384 "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; SourceSnapshot* _tmp0_ = NULL; EventEventSnapshot* _tmp1_ = NULL; gint64 _tmp2_ = 0LL; EventRow* _tmp3_ = NULL; EventRow* _tmp4_ = NULL; Event* _tmp5_ = NULL; DataSource* _tmp6_ = NULL; #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_ = snapshot; #line 159 "/home/jens/Source/shotwell/src/Event.vala" _tmp1_ = _source_snapshot_ref0 (G_TYPE_CHECK_INSTANCE_TYPE (_tmp0_, EVENT_TYPE_EVENT_SNAPSHOT) ? ((EventEventSnapshot*) _tmp0_) : NULL); #line 159 "/home/jens/Source/shotwell/src/Event.vala" event_snapshot = _tmp1_; #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" _tmp2_ = object_id; #line 162 "/home/jens/Source/shotwell/src/Event.vala" _tmp3_ = event_event_snapshot_get_row (event_snapshot); #line 162 "/home/jens/Source/shotwell/src/Event.vala" _tmp4_ = _tmp3_; #line 162 "/home/jens/Source/shotwell/src/Event.vala" _tmp5_ = event_reconstitute (_tmp2_, _tmp4_); #line 162 "/home/jens/Source/shotwell/src/Event.vala" _tmp6_ = G_TYPE_CHECK_INSTANCE_CAST (_tmp5_, TYPE_DATA_SOURCE, DataSource); #line 162 "/home/jens/Source/shotwell/src/Event.vala" _event_row_unref0 (_tmp4_); #line 162 "/home/jens/Source/shotwell/src/Event.vala" result = _tmp6_; #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 7429 "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 = event_event_proxy_real_reconstitute; #line 7438 "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 = event_real_get_typename; #line 94 "/home/jens/Source/shotwell/src/Event.vala" ((DataSourceClass *) klass)->get_instance_id = event_real_get_instance_id; #line 94 "/home/jens/Source/shotwell/src/Event.vala" ((ThumbnailSourceClass *) klass)->get_representative_id = event_real_get_representative_id; #line 94 "/home/jens/Source/shotwell/src/Event.vala" ((ThumbnailSourceClass *) klass)->get_preferred_thumbnail_format = event_real_get_preferred_thumbnail_format; #line 94 "/home/jens/Source/shotwell/src/Event.vala" ((ThumbnailSourceClass *) klass)->create_thumbnail = event_real_create_thumbnail; #line 94 "/home/jens/Source/shotwell/src/Event.vala" ((DataSourceClass *) klass)->notify_relinking = event_real_notify_relinking; #line 94 "/home/jens/Source/shotwell/src/Event.vala" ((DataSourceClass *) klass)->save_snapshot = event_real_save_snapshot; #line 94 "/home/jens/Source/shotwell/src/Event.vala" ((DataSourceClass *) klass)->equals = event_real_equals; #line 94 "/home/jens/Source/shotwell/src/Event.vala" ((DataObjectClass *) klass)->to_string = event_real_to_string; #line 94 "/home/jens/Source/shotwell/src/Event.vala" ((DataObjectClass *) klass)->get_name = event_real_get_name; #line 94 "/home/jens/Source/shotwell/src/Event.vala" ((EventSourceClass *) klass)->get_comment = event_real_get_comment; #line 94 "/home/jens/Source/shotwell/src/Event.vala" ((EventSourceClass *) klass)->set_comment = event_real_set_comment; #line 94 "/home/jens/Source/shotwell/src/Event.vala" ((EventSourceClass *) klass)->get_start_time = event_real_get_start_time; #line 94 "/home/jens/Source/shotwell/src/Event.vala" ((EventSourceClass *) klass)->get_end_time = event_real_get_end_time; #line 94 "/home/jens/Source/shotwell/src/Event.vala" ((EventSourceClass *) klass)->get_total_filesize = event_real_get_total_filesize; #line 94 "/home/jens/Source/shotwell/src/Event.vala" ((EventSourceClass *) klass)->get_media_count = event_real_get_media_count; #line 94 "/home/jens/Source/shotwell/src/Event.vala" ((EventSourceClass *) klass)->get_media = event_real_get_media; #line 94 "/home/jens/Source/shotwell/src/Event.vala" ((ThumbnailSourceClass *) klass)->get_thumbnail = event_real_get_thumbnail; #line 94 "/home/jens/Source/shotwell/src/Event.vala" ((DataSourceClass *) klass)->destroy = event_real_destroy; #line 94 "/home/jens/Source/shotwell/src/Event.vala" G_OBJECT_CLASS (klass)->finalize = event_finalize; #line 7503 "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 7522 "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 7531 "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 7540 "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 7555 "Event.c" } static void event_finalize (GObject* obj) { Event * self; MediaSource* _tmp0_ = NULL; ViewCollection* _tmp3_ = NULL; guint _tmp4_ = 0U; ViewCollection* _tmp5_ = NULL; guint _tmp6_ = 0U; ViewCollection* _tmp7_ = NULL; guint _tmp8_ = 0U; LibraryPhotoSourceCollection* _tmp9_ = NULL; guint _tmp10_ = 0U; VideoSourceCollection* _tmp11_ = NULL; guint _tmp12_ = 0U; #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 7578 "Event.c" MediaSource* _tmp1_ = NULL; guint _tmp2_ = 0U; #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 7587 "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 7631 "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); }