From 49120f48474fc8fdc2448c75d961bc238213cfac Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Frings-F=C3=BCrst?= Date: Tue, 1 May 2018 14:34:32 +0200 Subject: New upstream version 0.28.2 --- src/events/Branch.c | 4443 ----------------------------------- src/events/Branch.vala | 533 ----- src/events/EventDirectoryItem.c | 40 +- src/events/EventPage.c | 99 +- src/events/EventPage.vala | 2 +- src/events/EventsBranch.c | 4443 +++++++++++++++++++++++++++++++++++ src/events/EventsBranch.vala | 534 +++++ src/events/EventsDirectoryPage.c | 783 +++--- src/events/EventsDirectoryPage.vala | 1 - 9 files changed, 5437 insertions(+), 5441 deletions(-) delete mode 100644 src/events/Branch.c delete mode 100644 src/events/Branch.vala create mode 100644 src/events/EventsBranch.c create mode 100644 src/events/EventsBranch.vala (limited to 'src/events') diff --git a/src/events/Branch.c b/src/events/Branch.c deleted file mode 100644 index 32d331d..0000000 --- a/src/events/Branch.c +++ /dev/null @@ -1,4443 +0,0 @@ -/* Branch.c generated by valac 0.36.6, the Vala compiler - * generated from Branch.vala, do not modify */ - -/* Copyright 2016 Software Freedom Conservancy Inc. - * - * This software is licensed under the GNU Lesser General Public License - * (version 2.1 or later). See the COPYING file in this distribution. - */ - -#include -#include -#include -#include -#include -#include -#include -#include -#include - - -#define SIDEBAR_TYPE_BRANCH (sidebar_branch_get_type ()) -#define SIDEBAR_BRANCH(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), SIDEBAR_TYPE_BRANCH, SidebarBranch)) -#define SIDEBAR_BRANCH_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), SIDEBAR_TYPE_BRANCH, SidebarBranchClass)) -#define SIDEBAR_IS_BRANCH(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), SIDEBAR_TYPE_BRANCH)) -#define SIDEBAR_IS_BRANCH_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), SIDEBAR_TYPE_BRANCH)) -#define SIDEBAR_BRANCH_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), SIDEBAR_TYPE_BRANCH, SidebarBranchClass)) - -typedef struct _SidebarBranch SidebarBranch; -typedef struct _SidebarBranchClass SidebarBranchClass; -typedef struct _SidebarBranchPrivate SidebarBranchPrivate; - -#define EVENTS_TYPE_BRANCH (events_branch_get_type ()) -#define EVENTS_BRANCH(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), EVENTS_TYPE_BRANCH, EventsBranch)) -#define EVENTS_BRANCH_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), EVENTS_TYPE_BRANCH, EventsBranchClass)) -#define EVENTS_IS_BRANCH(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), EVENTS_TYPE_BRANCH)) -#define EVENTS_IS_BRANCH_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), EVENTS_TYPE_BRANCH)) -#define EVENTS_BRANCH_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), EVENTS_TYPE_BRANCH, EventsBranchClass)) - -typedef struct _EventsBranch EventsBranch; -typedef struct _EventsBranchClass EventsBranchClass; -typedef struct _EventsBranchPrivate EventsBranchPrivate; - -#define TYPE_DATA_OBJECT (data_object_get_type ()) -#define DATA_OBJECT(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_DATA_OBJECT, DataObject)) -#define DATA_OBJECT_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_DATA_OBJECT, DataObjectClass)) -#define IS_DATA_OBJECT(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_DATA_OBJECT)) -#define IS_DATA_OBJECT_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_DATA_OBJECT)) -#define DATA_OBJECT_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_DATA_OBJECT, DataObjectClass)) - -typedef struct _DataObject DataObject; -typedef struct _DataObjectClass DataObjectClass; - -#define TYPE_DATA_SOURCE (data_source_get_type ()) -#define DATA_SOURCE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_DATA_SOURCE, DataSource)) -#define DATA_SOURCE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_DATA_SOURCE, DataSourceClass)) -#define IS_DATA_SOURCE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_DATA_SOURCE)) -#define IS_DATA_SOURCE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_DATA_SOURCE)) -#define DATA_SOURCE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_DATA_SOURCE, DataSourceClass)) - -typedef struct _DataSource DataSource; -typedef struct _DataSourceClass DataSourceClass; - -#define TYPE_THUMBNAIL_SOURCE (thumbnail_source_get_type ()) -#define THUMBNAIL_SOURCE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_THUMBNAIL_SOURCE, ThumbnailSource)) -#define THUMBNAIL_SOURCE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_THUMBNAIL_SOURCE, ThumbnailSourceClass)) -#define IS_THUMBNAIL_SOURCE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_THUMBNAIL_SOURCE)) -#define IS_THUMBNAIL_SOURCE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_THUMBNAIL_SOURCE)) -#define THUMBNAIL_SOURCE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_THUMBNAIL_SOURCE, ThumbnailSourceClass)) - -typedef struct _ThumbnailSource ThumbnailSource; -typedef struct _ThumbnailSourceClass ThumbnailSourceClass; - -#define TYPE_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 SIDEBAR_TYPE_SIMPLE_PAGE_ENTRY (sidebar_simple_page_entry_get_type ()) -#define SIDEBAR_SIMPLE_PAGE_ENTRY(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), SIDEBAR_TYPE_SIMPLE_PAGE_ENTRY, SidebarSimplePageEntry)) -#define SIDEBAR_SIMPLE_PAGE_ENTRY_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), SIDEBAR_TYPE_SIMPLE_PAGE_ENTRY, SidebarSimplePageEntryClass)) -#define SIDEBAR_IS_SIMPLE_PAGE_ENTRY(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), SIDEBAR_TYPE_SIMPLE_PAGE_ENTRY)) -#define SIDEBAR_IS_SIMPLE_PAGE_ENTRY_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), SIDEBAR_TYPE_SIMPLE_PAGE_ENTRY)) -#define SIDEBAR_SIMPLE_PAGE_ENTRY_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), SIDEBAR_TYPE_SIMPLE_PAGE_ENTRY, SidebarSimplePageEntryClass)) - -typedef struct _SidebarSimplePageEntry SidebarSimplePageEntry; -typedef struct _SidebarSimplePageEntryClass SidebarSimplePageEntryClass; - -#define EVENTS_TYPE_EVENT_ENTRY (events_event_entry_get_type ()) -#define EVENTS_EVENT_ENTRY(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), EVENTS_TYPE_EVENT_ENTRY, EventsEventEntry)) -#define EVENTS_EVENT_ENTRY_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), EVENTS_TYPE_EVENT_ENTRY, EventsEventEntryClass)) -#define EVENTS_IS_EVENT_ENTRY(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), EVENTS_TYPE_EVENT_ENTRY)) -#define EVENTS_IS_EVENT_ENTRY_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), EVENTS_TYPE_EVENT_ENTRY)) -#define EVENTS_EVENT_ENTRY_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), EVENTS_TYPE_EVENT_ENTRY, EventsEventEntryClass)) - -typedef struct _EventsEventEntry EventsEventEntry; -typedef struct _EventsEventEntryClass EventsEventEntryClass; - -#define EVENTS_TYPE_DIRECTORY_ENTRY (events_directory_entry_get_type ()) -#define EVENTS_DIRECTORY_ENTRY(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), EVENTS_TYPE_DIRECTORY_ENTRY, EventsDirectoryEntry)) -#define EVENTS_DIRECTORY_ENTRY_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), EVENTS_TYPE_DIRECTORY_ENTRY, EventsDirectoryEntryClass)) -#define EVENTS_IS_DIRECTORY_ENTRY(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), EVENTS_TYPE_DIRECTORY_ENTRY)) -#define EVENTS_IS_DIRECTORY_ENTRY_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), EVENTS_TYPE_DIRECTORY_ENTRY)) -#define EVENTS_DIRECTORY_ENTRY_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), EVENTS_TYPE_DIRECTORY_ENTRY, EventsDirectoryEntryClass)) - -typedef struct _EventsDirectoryEntry EventsDirectoryEntry; -typedef struct _EventsDirectoryEntryClass EventsDirectoryEntryClass; - -#define EVENTS_TYPE_UNDATED_DIRECTORY_ENTRY (events_undated_directory_entry_get_type ()) -#define EVENTS_UNDATED_DIRECTORY_ENTRY(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), EVENTS_TYPE_UNDATED_DIRECTORY_ENTRY, EventsUndatedDirectoryEntry)) -#define EVENTS_UNDATED_DIRECTORY_ENTRY_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), EVENTS_TYPE_UNDATED_DIRECTORY_ENTRY, EventsUndatedDirectoryEntryClass)) -#define EVENTS_IS_UNDATED_DIRECTORY_ENTRY(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), EVENTS_TYPE_UNDATED_DIRECTORY_ENTRY)) -#define EVENTS_IS_UNDATED_DIRECTORY_ENTRY_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), EVENTS_TYPE_UNDATED_DIRECTORY_ENTRY)) -#define EVENTS_UNDATED_DIRECTORY_ENTRY_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), EVENTS_TYPE_UNDATED_DIRECTORY_ENTRY, EventsUndatedDirectoryEntryClass)) - -typedef struct _EventsUndatedDirectoryEntry EventsUndatedDirectoryEntry; -typedef struct _EventsUndatedDirectoryEntryClass EventsUndatedDirectoryEntryClass; - -#define EVENTS_TYPE_NO_EVENT_ENTRY (events_no_event_entry_get_type ()) -#define EVENTS_NO_EVENT_ENTRY(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), EVENTS_TYPE_NO_EVENT_ENTRY, EventsNoEventEntry)) -#define EVENTS_NO_EVENT_ENTRY_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), EVENTS_TYPE_NO_EVENT_ENTRY, EventsNoEventEntryClass)) -#define EVENTS_IS_NO_EVENT_ENTRY(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), EVENTS_TYPE_NO_EVENT_ENTRY)) -#define EVENTS_IS_NO_EVENT_ENTRY_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), EVENTS_TYPE_NO_EVENT_ENTRY)) -#define EVENTS_NO_EVENT_ENTRY_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), EVENTS_TYPE_NO_EVENT_ENTRY, EventsNoEventEntryClass)) - -typedef struct _EventsNoEventEntry EventsNoEventEntry; -typedef struct _EventsNoEventEntryClass EventsNoEventEntryClass; - -#define EVENTS_TYPE_MASTER_DIRECTORY_ENTRY (events_master_directory_entry_get_type ()) -#define EVENTS_MASTER_DIRECTORY_ENTRY(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), EVENTS_TYPE_MASTER_DIRECTORY_ENTRY, EventsMasterDirectoryEntry)) -#define EVENTS_MASTER_DIRECTORY_ENTRY_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), EVENTS_TYPE_MASTER_DIRECTORY_ENTRY, EventsMasterDirectoryEntryClass)) -#define EVENTS_IS_MASTER_DIRECTORY_ENTRY(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), EVENTS_TYPE_MASTER_DIRECTORY_ENTRY)) -#define EVENTS_IS_MASTER_DIRECTORY_ENTRY_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), EVENTS_TYPE_MASTER_DIRECTORY_ENTRY)) -#define EVENTS_MASTER_DIRECTORY_ENTRY_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), EVENTS_TYPE_MASTER_DIRECTORY_ENTRY, EventsMasterDirectoryEntryClass)) - -typedef struct _EventsMasterDirectoryEntry EventsMasterDirectoryEntry; -typedef struct _EventsMasterDirectoryEntryClass EventsMasterDirectoryEntryClass; - -#define TYPE_DATA_COLLECTION (data_collection_get_type ()) -#define DATA_COLLECTION(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_DATA_COLLECTION, DataCollection)) -#define DATA_COLLECTION_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_DATA_COLLECTION, DataCollectionClass)) -#define IS_DATA_COLLECTION(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_DATA_COLLECTION)) -#define IS_DATA_COLLECTION_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_DATA_COLLECTION)) -#define DATA_COLLECTION_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_DATA_COLLECTION, DataCollectionClass)) - -typedef struct _DataCollection DataCollection; -typedef struct _DataCollectionClass DataCollectionClass; - -#define TYPE_SOURCE_COLLECTION (source_collection_get_type ()) -#define SOURCE_COLLECTION(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_SOURCE_COLLECTION, SourceCollection)) -#define SOURCE_COLLECTION_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_SOURCE_COLLECTION, SourceCollectionClass)) -#define IS_SOURCE_COLLECTION(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_SOURCE_COLLECTION)) -#define IS_SOURCE_COLLECTION_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_SOURCE_COLLECTION)) -#define SOURCE_COLLECTION_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_SOURCE_COLLECTION, SourceCollectionClass)) - -typedef struct _SourceCollection SourceCollection; -typedef struct _SourceCollectionClass SourceCollectionClass; - -#define TYPE_DATABASE_SOURCE_COLLECTION (database_source_collection_get_type ()) -#define DATABASE_SOURCE_COLLECTION(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_DATABASE_SOURCE_COLLECTION, DatabaseSourceCollection)) -#define DATABASE_SOURCE_COLLECTION_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_DATABASE_SOURCE_COLLECTION, DatabaseSourceCollectionClass)) -#define IS_DATABASE_SOURCE_COLLECTION(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_DATABASE_SOURCE_COLLECTION)) -#define IS_DATABASE_SOURCE_COLLECTION_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_DATABASE_SOURCE_COLLECTION)) -#define DATABASE_SOURCE_COLLECTION_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_DATABASE_SOURCE_COLLECTION, DatabaseSourceCollectionClass)) - -typedef struct _DatabaseSourceCollection DatabaseSourceCollection; -typedef struct _DatabaseSourceCollectionClass DatabaseSourceCollectionClass; - -#define TYPE_CONTAINER_SOURCE_COLLECTION (container_source_collection_get_type ()) -#define CONTAINER_SOURCE_COLLECTION(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_CONTAINER_SOURCE_COLLECTION, ContainerSourceCollection)) -#define CONTAINER_SOURCE_COLLECTION_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_CONTAINER_SOURCE_COLLECTION, ContainerSourceCollectionClass)) -#define IS_CONTAINER_SOURCE_COLLECTION(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_CONTAINER_SOURCE_COLLECTION)) -#define IS_CONTAINER_SOURCE_COLLECTION_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_CONTAINER_SOURCE_COLLECTION)) -#define CONTAINER_SOURCE_COLLECTION_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_CONTAINER_SOURCE_COLLECTION, ContainerSourceCollectionClass)) - -typedef struct _ContainerSourceCollection ContainerSourceCollection; -typedef struct _ContainerSourceCollectionClass ContainerSourceCollectionClass; - -#define TYPE_EVENT_SOURCE_COLLECTION (event_source_collection_get_type ()) -#define EVENT_SOURCE_COLLECTION(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_EVENT_SOURCE_COLLECTION, EventSourceCollection)) -#define EVENT_SOURCE_COLLECTION_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_EVENT_SOURCE_COLLECTION, EventSourceCollectionClass)) -#define IS_EVENT_SOURCE_COLLECTION(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_EVENT_SOURCE_COLLECTION)) -#define IS_EVENT_SOURCE_COLLECTION_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_EVENT_SOURCE_COLLECTION)) -#define EVENT_SOURCE_COLLECTION_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_EVENT_SOURCE_COLLECTION, EventSourceCollectionClass)) - -typedef struct _EventSourceCollection EventSourceCollection; -typedef struct _EventSourceCollectionClass EventSourceCollectionClass; - -#define TYPE_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_CONFIGURATION_FACADE (configuration_facade_get_type ()) -#define CONFIGURATION_FACADE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_CONFIGURATION_FACADE, ConfigurationFacade)) -#define CONFIGURATION_FACADE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_CONFIGURATION_FACADE, ConfigurationFacadeClass)) -#define IS_CONFIGURATION_FACADE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_CONFIGURATION_FACADE)) -#define IS_CONFIGURATION_FACADE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_CONFIGURATION_FACADE)) -#define CONFIGURATION_FACADE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_CONFIGURATION_FACADE, ConfigurationFacadeClass)) - -typedef struct _ConfigurationFacade ConfigurationFacade; -typedef struct _ConfigurationFacadeClass ConfigurationFacadeClass; - -#define CONFIG_TYPE_FACADE (config_facade_get_type ()) -#define CONFIG_FACADE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), CONFIG_TYPE_FACADE, ConfigFacade)) -#define CONFIG_FACADE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), CONFIG_TYPE_FACADE, ConfigFacadeClass)) -#define CONFIG_IS_FACADE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), CONFIG_TYPE_FACADE)) -#define CONFIG_IS_FACADE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), CONFIG_TYPE_FACADE)) -#define CONFIG_FACADE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), CONFIG_TYPE_FACADE, ConfigFacadeClass)) - -typedef struct _ConfigFacade ConfigFacade; -typedef struct _ConfigFacadeClass ConfigFacadeClass; -#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL))) - -#define SIDEBAR_TYPE_GROUPING (sidebar_grouping_get_type ()) -#define SIDEBAR_GROUPING(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), SIDEBAR_TYPE_GROUPING, SidebarGrouping)) -#define SIDEBAR_GROUPING_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), SIDEBAR_TYPE_GROUPING, SidebarGroupingClass)) -#define SIDEBAR_IS_GROUPING(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), SIDEBAR_TYPE_GROUPING)) -#define SIDEBAR_IS_GROUPING_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), SIDEBAR_TYPE_GROUPING)) -#define SIDEBAR_GROUPING_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), SIDEBAR_TYPE_GROUPING, SidebarGroupingClass)) - -typedef struct _SidebarGrouping SidebarGrouping; -typedef struct _SidebarGroupingClass SidebarGroupingClass; - -#define SIDEBAR_TYPE_HEADER (sidebar_header_get_type ()) -#define SIDEBAR_HEADER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), SIDEBAR_TYPE_HEADER, SidebarHeader)) -#define SIDEBAR_HEADER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), SIDEBAR_TYPE_HEADER, SidebarHeaderClass)) -#define SIDEBAR_IS_HEADER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), SIDEBAR_TYPE_HEADER)) -#define SIDEBAR_IS_HEADER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), SIDEBAR_TYPE_HEADER)) -#define SIDEBAR_HEADER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), SIDEBAR_TYPE_HEADER, SidebarHeaderClass)) - -typedef struct _SidebarHeader SidebarHeader; -typedef struct _SidebarHeaderClass SidebarHeaderClass; - -#define SIDEBAR_TYPE_ENTRY (sidebar_entry_get_type ()) -#define SIDEBAR_ENTRY(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), SIDEBAR_TYPE_ENTRY, SidebarEntry)) -#define SIDEBAR_IS_ENTRY(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), SIDEBAR_TYPE_ENTRY)) -#define SIDEBAR_ENTRY_GET_INTERFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE ((obj), SIDEBAR_TYPE_ENTRY, SidebarEntryIface)) - -typedef struct _SidebarEntry SidebarEntry; -typedef struct _SidebarEntryIface SidebarEntryIface; - -#define SIDEBAR_TYPE_TREE (sidebar_tree_get_type ()) -#define SIDEBAR_TREE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), SIDEBAR_TYPE_TREE, SidebarTree)) -#define SIDEBAR_TREE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), SIDEBAR_TYPE_TREE, SidebarTreeClass)) -#define SIDEBAR_IS_TREE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), SIDEBAR_TYPE_TREE)) -#define SIDEBAR_IS_TREE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), SIDEBAR_TYPE_TREE)) -#define SIDEBAR_TREE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), SIDEBAR_TYPE_TREE, SidebarTreeClass)) - -typedef struct _SidebarTree SidebarTree; -typedef struct _SidebarTreeClass SidebarTreeClass; - -#define SIDEBAR_BRANCH_TYPE_OPTIONS (sidebar_branch_options_get_type ()) - -#define EVENTS_TYPE_YEAR_DIRECTORY_ENTRY (events_year_directory_entry_get_type ()) -#define EVENTS_YEAR_DIRECTORY_ENTRY(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), EVENTS_TYPE_YEAR_DIRECTORY_ENTRY, EventsYearDirectoryEntry)) -#define EVENTS_YEAR_DIRECTORY_ENTRY_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), EVENTS_TYPE_YEAR_DIRECTORY_ENTRY, EventsYearDirectoryEntryClass)) -#define EVENTS_IS_YEAR_DIRECTORY_ENTRY(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), EVENTS_TYPE_YEAR_DIRECTORY_ENTRY)) -#define EVENTS_IS_YEAR_DIRECTORY_ENTRY_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), EVENTS_TYPE_YEAR_DIRECTORY_ENTRY)) -#define EVENTS_YEAR_DIRECTORY_ENTRY_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), EVENTS_TYPE_YEAR_DIRECTORY_ENTRY, EventsYearDirectoryEntryClass)) - -typedef struct _EventsYearDirectoryEntry EventsYearDirectoryEntry; -typedef struct _EventsYearDirectoryEntryClass EventsYearDirectoryEntryClass; - -#define EVENTS_TYPE_MONTH_DIRECTORY_ENTRY (events_month_directory_entry_get_type ()) -#define EVENTS_MONTH_DIRECTORY_ENTRY(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), EVENTS_TYPE_MONTH_DIRECTORY_ENTRY, EventsMonthDirectoryEntry)) -#define EVENTS_MONTH_DIRECTORY_ENTRY_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), EVENTS_TYPE_MONTH_DIRECTORY_ENTRY, EventsMonthDirectoryEntryClass)) -#define EVENTS_IS_MONTH_DIRECTORY_ENTRY(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), EVENTS_TYPE_MONTH_DIRECTORY_ENTRY)) -#define EVENTS_IS_MONTH_DIRECTORY_ENTRY_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), EVENTS_TYPE_MONTH_DIRECTORY_ENTRY)) -#define EVENTS_MONTH_DIRECTORY_ENTRY_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), EVENTS_TYPE_MONTH_DIRECTORY_ENTRY, EventsMonthDirectoryEntryClass)) - -typedef struct _EventsMonthDirectoryEntry EventsMonthDirectoryEntry; -typedef struct _EventsMonthDirectoryEntryClass EventsMonthDirectoryEntryClass; - -#define TYPE_EVENT_ID (event_id_get_type ()) -typedef struct _EventID EventID; -#define _g_free0(var) (var = (g_free (var), NULL)) - -#define SIDEBAR_TYPE_RENAMEABLE_ENTRY (sidebar_renameable_entry_get_type ()) -#define SIDEBAR_RENAMEABLE_ENTRY(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), SIDEBAR_TYPE_RENAMEABLE_ENTRY, SidebarRenameableEntry)) -#define SIDEBAR_IS_RENAMEABLE_ENTRY(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), SIDEBAR_TYPE_RENAMEABLE_ENTRY)) -#define SIDEBAR_RENAMEABLE_ENTRY_GET_INTERFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE ((obj), SIDEBAR_TYPE_RENAMEABLE_ENTRY, SidebarRenameableEntryIface)) - -typedef struct _SidebarRenameableEntry SidebarRenameableEntry; -typedef struct _SidebarRenameableEntryIface SidebarRenameableEntryIface; -#define _alteration_unref0(var) ((var == NULL) ? NULL : (var = (alteration_unref (var), NULL))) -typedef struct _Block8Data Block8Data; -typedef struct _Block9Data Block9Data; - -#define SIDEBAR_TYPE_SELECTABLE_ENTRY (sidebar_selectable_entry_get_type ()) -#define SIDEBAR_SELECTABLE_ENTRY(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), SIDEBAR_TYPE_SELECTABLE_ENTRY, SidebarSelectableEntry)) -#define SIDEBAR_IS_SELECTABLE_ENTRY(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), SIDEBAR_TYPE_SELECTABLE_ENTRY)) -#define SIDEBAR_SELECTABLE_ENTRY_GET_INTERFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE ((obj), SIDEBAR_TYPE_SELECTABLE_ENTRY, SidebarSelectableEntryIface)) - -typedef struct _SidebarSelectableEntry SidebarSelectableEntry; -typedef struct _SidebarSelectableEntryIface SidebarSelectableEntryIface; - -#define SIDEBAR_TYPE_PAGE_REPRESENTATIVE (sidebar_page_representative_get_type ()) -#define SIDEBAR_PAGE_REPRESENTATIVE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), SIDEBAR_TYPE_PAGE_REPRESENTATIVE, SidebarPageRepresentative)) -#define SIDEBAR_IS_PAGE_REPRESENTATIVE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), SIDEBAR_TYPE_PAGE_REPRESENTATIVE)) -#define SIDEBAR_PAGE_REPRESENTATIVE_GET_INTERFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE ((obj), SIDEBAR_TYPE_PAGE_REPRESENTATIVE, SidebarPageRepresentativeIface)) - -typedef struct _SidebarPageRepresentative SidebarPageRepresentative; -typedef struct _SidebarPageRepresentativeIface SidebarPageRepresentativeIface; - -#define TYPE_PAGE (page_get_type ()) -#define PAGE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_PAGE, Page)) -#define PAGE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_PAGE, PageClass)) -#define IS_PAGE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_PAGE)) -#define IS_PAGE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_PAGE)) -#define PAGE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_PAGE, PageClass)) - -typedef struct _Page Page; -typedef struct _PageClass PageClass; - -#define SIDEBAR_TYPE_CONTEXTABLE (sidebar_contextable_get_type ()) -#define SIDEBAR_CONTEXTABLE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), SIDEBAR_TYPE_CONTEXTABLE, SidebarContextable)) -#define SIDEBAR_IS_CONTEXTABLE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), SIDEBAR_TYPE_CONTEXTABLE)) -#define SIDEBAR_CONTEXTABLE_GET_INTERFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE ((obj), SIDEBAR_TYPE_CONTEXTABLE, SidebarContextableIface)) - -typedef struct _SidebarContextable SidebarContextable; -typedef struct _SidebarContextableIface SidebarContextableIface; -typedef struct _SidebarSimplePageEntryPrivate SidebarSimplePageEntryPrivate; - -#define SIDEBAR_TYPE_EXPANDABLE_ENTRY (sidebar_expandable_entry_get_type ()) -#define SIDEBAR_EXPANDABLE_ENTRY(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), SIDEBAR_TYPE_EXPANDABLE_ENTRY, SidebarExpandableEntry)) -#define SIDEBAR_IS_EXPANDABLE_ENTRY(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), SIDEBAR_TYPE_EXPANDABLE_ENTRY)) -#define SIDEBAR_EXPANDABLE_ENTRY_GET_INTERFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE ((obj), SIDEBAR_TYPE_EXPANDABLE_ENTRY, SidebarExpandableEntryIface)) - -typedef struct _SidebarExpandableEntry SidebarExpandableEntry; -typedef struct _SidebarExpandableEntryIface SidebarExpandableEntryIface; -typedef struct _EventsDirectoryEntryPrivate EventsDirectoryEntryPrivate; -typedef struct _EventsMasterDirectoryEntryPrivate EventsMasterDirectoryEntryPrivate; - -#define TYPE_CHECKERBOARD_PAGE (checkerboard_page_get_type ()) -#define CHECKERBOARD_PAGE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_CHECKERBOARD_PAGE, CheckerboardPage)) -#define CHECKERBOARD_PAGE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_CHECKERBOARD_PAGE, CheckerboardPageClass)) -#define IS_CHECKERBOARD_PAGE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_CHECKERBOARD_PAGE)) -#define IS_CHECKERBOARD_PAGE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_CHECKERBOARD_PAGE)) -#define CHECKERBOARD_PAGE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_CHECKERBOARD_PAGE, CheckerboardPageClass)) - -typedef struct _CheckerboardPage CheckerboardPage; -typedef struct _CheckerboardPageClass CheckerboardPageClass; - -#define TYPE_EVENTS_DIRECTORY_PAGE (events_directory_page_get_type ()) -#define EVENTS_DIRECTORY_PAGE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_EVENTS_DIRECTORY_PAGE, EventsDirectoryPage)) -#define EVENTS_DIRECTORY_PAGE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_EVENTS_DIRECTORY_PAGE, EventsDirectoryPageClass)) -#define IS_EVENTS_DIRECTORY_PAGE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_EVENTS_DIRECTORY_PAGE)) -#define IS_EVENTS_DIRECTORY_PAGE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_EVENTS_DIRECTORY_PAGE)) -#define EVENTS_DIRECTORY_PAGE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_EVENTS_DIRECTORY_PAGE, EventsDirectoryPageClass)) - -typedef struct _EventsDirectoryPage EventsDirectoryPage; -typedef struct _EventsDirectoryPageClass EventsDirectoryPageClass; - -#define TYPE_MASTER_EVENTS_DIRECTORY_PAGE (master_events_directory_page_get_type ()) -#define MASTER_EVENTS_DIRECTORY_PAGE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_MASTER_EVENTS_DIRECTORY_PAGE, MasterEventsDirectoryPage)) -#define MASTER_EVENTS_DIRECTORY_PAGE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_MASTER_EVENTS_DIRECTORY_PAGE, MasterEventsDirectoryPageClass)) -#define IS_MASTER_EVENTS_DIRECTORY_PAGE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_MASTER_EVENTS_DIRECTORY_PAGE)) -#define IS_MASTER_EVENTS_DIRECTORY_PAGE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_MASTER_EVENTS_DIRECTORY_PAGE)) -#define MASTER_EVENTS_DIRECTORY_PAGE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_MASTER_EVENTS_DIRECTORY_PAGE, MasterEventsDirectoryPageClass)) - -typedef struct _MasterEventsDirectoryPage MasterEventsDirectoryPage; -typedef struct _MasterEventsDirectoryPageClass MasterEventsDirectoryPageClass; -typedef struct _EventsYearDirectoryEntryPrivate EventsYearDirectoryEntryPrivate; - -#define SUB_EVENTS_DIRECTORY_PAGE_TYPE_DIRECTORY_TYPE (sub_events_directory_page_directory_type_get_type ()) - -#define TYPE_SUB_EVENTS_DIRECTORY_PAGE (sub_events_directory_page_get_type ()) -#define SUB_EVENTS_DIRECTORY_PAGE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_SUB_EVENTS_DIRECTORY_PAGE, SubEventsDirectoryPage)) -#define SUB_EVENTS_DIRECTORY_PAGE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_SUB_EVENTS_DIRECTORY_PAGE, SubEventsDirectoryPageClass)) -#define IS_SUB_EVENTS_DIRECTORY_PAGE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_SUB_EVENTS_DIRECTORY_PAGE)) -#define IS_SUB_EVENTS_DIRECTORY_PAGE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_SUB_EVENTS_DIRECTORY_PAGE)) -#define SUB_EVENTS_DIRECTORY_PAGE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_SUB_EVENTS_DIRECTORY_PAGE, SubEventsDirectoryPageClass)) - -typedef struct _SubEventsDirectoryPage SubEventsDirectoryPage; -typedef struct _SubEventsDirectoryPageClass SubEventsDirectoryPageClass; -typedef struct _EventsMonthDirectoryEntryPrivate EventsMonthDirectoryEntryPrivate; -typedef struct _EventsUndatedDirectoryEntryPrivate EventsUndatedDirectoryEntryPrivate; - -#define SIDEBAR_TYPE_INTERNAL_DROP_TARGET_ENTRY (sidebar_internal_drop_target_entry_get_type ()) -#define SIDEBAR_INTERNAL_DROP_TARGET_ENTRY(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), SIDEBAR_TYPE_INTERNAL_DROP_TARGET_ENTRY, SidebarInternalDropTargetEntry)) -#define SIDEBAR_IS_INTERNAL_DROP_TARGET_ENTRY(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), SIDEBAR_TYPE_INTERNAL_DROP_TARGET_ENTRY)) -#define SIDEBAR_INTERNAL_DROP_TARGET_ENTRY_GET_INTERFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE ((obj), SIDEBAR_TYPE_INTERNAL_DROP_TARGET_ENTRY, SidebarInternalDropTargetEntryIface)) - -typedef struct _SidebarInternalDropTargetEntry SidebarInternalDropTargetEntry; -typedef struct _SidebarInternalDropTargetEntryIface SidebarInternalDropTargetEntryIface; - -#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 _EventsEventEntryPrivate EventsEventEntryPrivate; - -#define TYPE_MEDIA_PAGE (media_page_get_type ()) -#define MEDIA_PAGE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_MEDIA_PAGE, MediaPage)) -#define MEDIA_PAGE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_MEDIA_PAGE, MediaPageClass)) -#define IS_MEDIA_PAGE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_MEDIA_PAGE)) -#define IS_MEDIA_PAGE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_MEDIA_PAGE)) -#define MEDIA_PAGE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_MEDIA_PAGE, MediaPageClass)) - -typedef struct _MediaPage MediaPage; -typedef struct _MediaPageClass MediaPageClass; - -#define TYPE_COLLECTION_PAGE (collection_page_get_type ()) -#define COLLECTION_PAGE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_COLLECTION_PAGE, CollectionPage)) -#define COLLECTION_PAGE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_COLLECTION_PAGE, CollectionPageClass)) -#define IS_COLLECTION_PAGE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_COLLECTION_PAGE)) -#define IS_COLLECTION_PAGE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_COLLECTION_PAGE)) -#define COLLECTION_PAGE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_COLLECTION_PAGE, CollectionPageClass)) - -typedef struct _CollectionPage CollectionPage; -typedef struct _CollectionPageClass CollectionPageClass; - -#define TYPE_EVENT_PAGE (event_page_get_type ()) -#define EVENT_PAGE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_EVENT_PAGE, EventPage)) -#define EVENT_PAGE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_EVENT_PAGE, EventPageClass)) -#define IS_EVENT_PAGE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_EVENT_PAGE)) -#define IS_EVENT_PAGE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_EVENT_PAGE)) -#define EVENT_PAGE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_EVENT_PAGE, EventPageClass)) - -typedef struct _EventPage EventPage; -typedef struct _EventPageClass EventPageClass; - -#define TYPE_COMMAND_MANAGER (command_manager_get_type ()) -#define COMMAND_MANAGER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_COMMAND_MANAGER, CommandManager)) -#define COMMAND_MANAGER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_COMMAND_MANAGER, CommandManagerClass)) -#define IS_COMMAND_MANAGER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_COMMAND_MANAGER)) -#define IS_COMMAND_MANAGER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_COMMAND_MANAGER)) -#define COMMAND_MANAGER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_COMMAND_MANAGER, CommandManagerClass)) - -typedef struct _CommandManager CommandManager; -typedef struct _CommandManagerClass CommandManagerClass; - -#define TYPE_COMMAND (command_get_type ()) -#define COMMAND(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_COMMAND, Command)) -#define COMMAND_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_COMMAND, CommandClass)) -#define IS_COMMAND(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_COMMAND)) -#define IS_COMMAND_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_COMMAND)) -#define COMMAND_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_COMMAND, CommandClass)) - -typedef struct _Command Command; -typedef struct _CommandClass CommandClass; - -#define TYPE_PAGE_COMMAND (page_command_get_type ()) -#define PAGE_COMMAND(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_PAGE_COMMAND, PageCommand)) -#define PAGE_COMMAND_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_PAGE_COMMAND, PageCommandClass)) -#define IS_PAGE_COMMAND(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_PAGE_COMMAND)) -#define IS_PAGE_COMMAND_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_PAGE_COMMAND)) -#define PAGE_COMMAND_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_PAGE_COMMAND, PageCommandClass)) - -typedef struct _PageCommand PageCommand; -typedef struct _PageCommandClass PageCommandClass; - -#define TYPE_SIMPLE_PROXYABLE_COMMAND (simple_proxyable_command_get_type ()) -#define SIMPLE_PROXYABLE_COMMAND(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_SIMPLE_PROXYABLE_COMMAND, SimpleProxyableCommand)) -#define SIMPLE_PROXYABLE_COMMAND_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_SIMPLE_PROXYABLE_COMMAND, SimpleProxyableCommandClass)) -#define IS_SIMPLE_PROXYABLE_COMMAND(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_SIMPLE_PROXYABLE_COMMAND)) -#define IS_SIMPLE_PROXYABLE_COMMAND_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_SIMPLE_PROXYABLE_COMMAND)) -#define SIMPLE_PROXYABLE_COMMAND_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_SIMPLE_PROXYABLE_COMMAND, SimpleProxyableCommandClass)) - -typedef struct _SimpleProxyableCommand SimpleProxyableCommand; -typedef struct _SimpleProxyableCommandClass SimpleProxyableCommandClass; - -#define TYPE_RENAME_EVENT_COMMAND (rename_event_command_get_type ()) -#define RENAME_EVENT_COMMAND(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_RENAME_EVENT_COMMAND, RenameEventCommand)) -#define RENAME_EVENT_COMMAND_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_RENAME_EVENT_COMMAND, RenameEventCommandClass)) -#define IS_RENAME_EVENT_COMMAND(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_RENAME_EVENT_COMMAND)) -#define IS_RENAME_EVENT_COMMAND_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_RENAME_EVENT_COMMAND)) -#define RENAME_EVENT_COMMAND_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_RENAME_EVENT_COMMAND, RenameEventCommandClass)) - -typedef struct _RenameEventCommand RenameEventCommand; -typedef struct _RenameEventCommandClass RenameEventCommandClass; -#define _command_manager_unref0(var) ((var == NULL) ? NULL : (var = (command_manager_unref (var), NULL))) - -#define TYPE_DATA_VIEW (data_view_get_type ()) -#define DATA_VIEW(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_DATA_VIEW, DataView)) -#define DATA_VIEW_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_DATA_VIEW, DataViewClass)) -#define IS_DATA_VIEW(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_DATA_VIEW)) -#define IS_DATA_VIEW_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_DATA_VIEW)) -#define DATA_VIEW_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_DATA_VIEW, DataViewClass)) - -typedef struct _DataView DataView; -typedef struct _DataViewClass DataViewClass; - -#define TYPE_MOVE_PHOTOS_COMMAND (move_photos_command_get_type ()) -#define MOVE_PHOTOS_COMMAND(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_MOVE_PHOTOS_COMMAND, MovePhotosCommand)) -#define MOVE_PHOTOS_COMMAND_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_MOVE_PHOTOS_COMMAND, MovePhotosCommandClass)) -#define IS_MOVE_PHOTOS_COMMAND(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_MOVE_PHOTOS_COMMAND)) -#define IS_MOVE_PHOTOS_COMMAND_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_MOVE_PHOTOS_COMMAND)) -#define MOVE_PHOTOS_COMMAND_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_MOVE_PHOTOS_COMMAND, MovePhotosCommandClass)) - -typedef struct _MovePhotosCommand MovePhotosCommand; -typedef struct _MovePhotosCommandClass MovePhotosCommandClass; - -#define TYPE_SET_EVENT_COMMAND (set_event_command_get_type ()) -#define SET_EVENT_COMMAND(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_SET_EVENT_COMMAND, SetEventCommand)) -#define SET_EVENT_COMMAND_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_SET_EVENT_COMMAND, SetEventCommandClass)) -#define IS_SET_EVENT_COMMAND(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_SET_EVENT_COMMAND)) -#define IS_SET_EVENT_COMMAND_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_SET_EVENT_COMMAND)) -#define SET_EVENT_COMMAND_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_SET_EVENT_COMMAND, SetEventCommandClass)) - -typedef struct _SetEventCommand SetEventCommand; -typedef struct _SetEventCommandClass SetEventCommandClass; -typedef struct _EventsNoEventEntryPrivate EventsNoEventEntryPrivate; - -#define TYPE_NO_EVENT_PAGE (no_event_page_get_type ()) -#define NO_EVENT_PAGE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_NO_EVENT_PAGE, NoEventPage)) -#define NO_EVENT_PAGE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_NO_EVENT_PAGE, NoEventPageClass)) -#define IS_NO_EVENT_PAGE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_NO_EVENT_PAGE)) -#define IS_NO_EVENT_PAGE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_NO_EVENT_PAGE)) -#define NO_EVENT_PAGE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_NO_EVENT_PAGE, NoEventPageClass)) - -typedef struct _NoEventPage NoEventPage; -typedef struct _NoEventPageClass NoEventPageClass; -#define _vala_assert(expr, msg) if G_LIKELY (expr) ; else g_assertion_message_expr (G_LOG_DOMAIN, __FILE__, __LINE__, G_STRFUNC, msg); -#define _vala_return_if_fail(expr, msg) if G_LIKELY (expr) ; else { g_return_if_fail_warning (G_LOG_DOMAIN, G_STRFUNC, msg); return; } -#define _vala_return_val_if_fail(expr, msg, val) if G_LIKELY (expr) ; else { g_return_if_fail_warning (G_LOG_DOMAIN, G_STRFUNC, msg); return val; } -#define _vala_warn_if_fail(expr, msg) if G_LIKELY (expr) ; else g_warn_message (G_LOG_DOMAIN, __FILE__, __LINE__, G_STRFUNC, msg); - -struct _SidebarBranch { - GObject parent_instance; - SidebarBranchPrivate * priv; -}; - -struct _SidebarBranchClass { - GObjectClass parent_class; -}; - -struct _EventsBranch { - SidebarBranch parent_instance; - EventsBranchPrivate * priv; -}; - -struct _EventsBranchClass { - SidebarBranchClass parent_class; -}; - -struct _EventsBranchPrivate { - GeeHashMap* entry_map; - EventsUndatedDirectoryEntry* undated_entry; - EventsNoEventEntry* no_event_entry; - EventsMasterDirectoryEntry* all_events_entry; -}; - -struct _SidebarEntryIface { - GTypeInterface parent_iface; - gchar* (*get_sidebar_name) (SidebarEntry* self); - gchar* (*get_sidebar_tooltip) (SidebarEntry* self); - gchar* (*get_sidebar_icon) (SidebarEntry* self); - gchar* (*to_string) (SidebarEntry* self); - void (*grafted) (SidebarEntry* self, SidebarTree* tree); - void (*pruned) (SidebarEntry* self, SidebarTree* tree); -}; - -typedef enum { - SIDEBAR_BRANCH_OPTIONS_NONE = 0, - SIDEBAR_BRANCH_OPTIONS_HIDE_IF_EMPTY = 1 << 0, - SIDEBAR_BRANCH_OPTIONS_AUTO_OPEN_ON_NEW_CHILD = 1 << 1, - SIDEBAR_BRANCH_OPTIONS_STARTUP_EXPAND_TO_FIRST_CHILD = 1 << 2, - SIDEBAR_BRANCH_OPTIONS_STARTUP_OPEN_GROUPING = 1 << 3 -} SidebarBranchOptions; - -struct _EventID { - gint64 id; -}; - -struct _SidebarRenameableEntryIface { - GTypeInterface parent_iface; - void (*rename) (SidebarRenameableEntry* self, const gchar* new_name); - gboolean (*is_user_renameable) (SidebarRenameableEntry* self); -}; - -struct _Block8Data { - int _ref_count_; - EventsBranch* self; - gint event_month; -}; - -typedef gboolean (*Locator) (gconstpointer item, void* user_data); -struct _Block9Data { - int _ref_count_; - EventsBranch* self; - gint event_year; -}; - -struct _SidebarSelectableEntryIface { - GTypeInterface parent_iface; -}; - -struct _SidebarPageRepresentativeIface { - GTypeInterface parent_iface; - gboolean (*has_page) (SidebarPageRepresentative* self); - Page* (*get_page) (SidebarPageRepresentative* self); -}; - -struct _SidebarContextableIface { - GTypeInterface parent_iface; - GtkMenu* (*get_sidebar_context_menu) (SidebarContextable* self, GdkEventButton* event); -}; - -struct _SidebarSimplePageEntry { - GObject parent_instance; - SidebarSimplePageEntryPrivate * priv; -}; - -struct _SidebarSimplePageEntryClass { - GObjectClass parent_class; - gchar* (*get_sidebar_name) (SidebarSimplePageEntry* self); - gchar* (*get_sidebar_tooltip) (SidebarSimplePageEntry* self); - gchar* (*get_sidebar_icon) (SidebarSimplePageEntry* self); - gchar* (*to_string) (SidebarSimplePageEntry* self); - Page* (*create_page) (SidebarSimplePageEntry* self); -}; - -struct _SidebarExpandableEntryIface { - GTypeInterface parent_iface; - gboolean (*expand_on_select) (SidebarExpandableEntry* self); -}; - -struct _EventsDirectoryEntry { - SidebarSimplePageEntry parent_instance; - EventsDirectoryEntryPrivate * priv; -}; - -struct _EventsDirectoryEntryClass { - SidebarSimplePageEntryClass parent_class; -}; - -struct _EventsMasterDirectoryEntry { - EventsDirectoryEntry parent_instance; - EventsMasterDirectoryEntryPrivate * priv; -}; - -struct _EventsMasterDirectoryEntryClass { - EventsDirectoryEntryClass parent_class; -}; - -struct _EventsYearDirectoryEntry { - EventsDirectoryEntry parent_instance; - EventsYearDirectoryEntryPrivate * priv; -}; - -struct _EventsYearDirectoryEntryClass { - EventsDirectoryEntryClass parent_class; -}; - -struct _EventsYearDirectoryEntryPrivate { - gchar* name; - struct tm tm; -}; - -typedef enum { - SUB_EVENTS_DIRECTORY_PAGE_DIRECTORY_TYPE_YEAR, - SUB_EVENTS_DIRECTORY_PAGE_DIRECTORY_TYPE_MONTH, - SUB_EVENTS_DIRECTORY_PAGE_DIRECTORY_TYPE_UNDATED -} SubEventsDirectoryPageDirectoryType; - -struct _EventsMonthDirectoryEntry { - EventsDirectoryEntry parent_instance; - EventsMonthDirectoryEntryPrivate * priv; -}; - -struct _EventsMonthDirectoryEntryClass { - EventsDirectoryEntryClass parent_class; -}; - -struct _EventsMonthDirectoryEntryPrivate { - gchar* name; - struct tm tm; -}; - -struct _EventsUndatedDirectoryEntry { - EventsDirectoryEntry parent_instance; - EventsUndatedDirectoryEntryPrivate * priv; -}; - -struct _EventsUndatedDirectoryEntryClass { - EventsDirectoryEntryClass parent_class; -}; - -struct _SidebarInternalDropTargetEntryIface { - GTypeInterface parent_iface; - gboolean (*internal_drop_received) (SidebarInternalDropTargetEntry* self, GeeList* sources); - gboolean (*internal_drop_received_arbitrary) (SidebarInternalDropTargetEntry* self, GtkSelectionData* data); -}; - -struct _EventsEventEntry { - SidebarSimplePageEntry parent_instance; - EventsEventEntryPrivate * priv; -}; - -struct _EventsEventEntryClass { - SidebarSimplePageEntryClass parent_class; -}; - -struct _EventsEventEntryPrivate { - Event* event; -}; - -struct _EventsNoEventEntry { - SidebarSimplePageEntry parent_instance; - EventsNoEventEntryPrivate * priv; -}; - -struct _EventsNoEventEntryClass { - SidebarSimplePageEntryClass parent_class; -}; - - -static gpointer events_branch_parent_class = NULL; -extern EventSourceCollection* event_global; -extern gchar* events_branch_icon; -gchar* events_branch_icon = NULL; -extern gchar* events_branch_events_icon; -gchar* events_branch_events_icon = NULL; -extern gchar* events_branch_single_event_icon; -gchar* events_branch_single_event_icon = NULL; -extern gchar* events_branch_no_event_icon; -gchar* events_branch_no_event_icon = NULL; -static gboolean events_branch_sort_ascending; -static gboolean events_branch_sort_ascending = FALSE; -static gpointer events_directory_entry_parent_class = NULL; -static SidebarExpandableEntryIface * events_directory_entry_sidebar_expandable_entry_parent_iface = NULL; -static gpointer events_master_directory_entry_parent_class = NULL; -static gpointer events_year_directory_entry_parent_class = NULL; -static gpointer events_month_directory_entry_parent_class = NULL; -static gpointer events_undated_directory_entry_parent_class = NULL; -static gpointer events_event_entry_parent_class = NULL; -static SidebarRenameableEntryIface * events_event_entry_sidebar_renameable_entry_parent_iface = NULL; -static SidebarInternalDropTargetEntryIface * events_event_entry_sidebar_internal_drop_target_entry_parent_iface = NULL; -static gpointer events_no_event_entry_parent_class = NULL; - -GType sidebar_branch_get_type (void) G_GNUC_CONST; -GType events_branch_get_type (void) G_GNUC_CONST; -GType data_object_get_type (void) G_GNUC_CONST; -GType data_source_get_type (void) G_GNUC_CONST; -GType thumbnail_source_get_type (void) G_GNUC_CONST; -GType event_source_get_type (void) G_GNUC_CONST; -GType event_get_type (void) G_GNUC_CONST; -GType sidebar_simple_page_entry_get_type (void) G_GNUC_CONST; -GType events_event_entry_get_type (void) G_GNUC_CONST; -GType events_directory_entry_get_type (void) G_GNUC_CONST; -GType events_undated_directory_entry_get_type (void) G_GNUC_CONST; -GType events_no_event_entry_get_type (void) G_GNUC_CONST; -GType events_master_directory_entry_get_type (void) G_GNUC_CONST; -#define EVENTS_BRANCH_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), EVENTS_TYPE_BRANCH, EventsBranchPrivate)) -enum { - EVENTS_BRANCH_DUMMY_PROPERTY -}; -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 source_collection_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 event_source_collection_get_type (void) G_GNUC_CONST; -static void events_branch_on_events_added_removed (EventsBranch* self, GeeIterable* added, GeeIterable* removed); -static void _events_branch_on_events_added_removed_data_collection_contents_altered (DataCollection* _sender, GeeIterable* added, GeeIterable* removed, gpointer self); -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; -static void events_branch_on_events_altered (EventsBranch* self, GeeMap* altered); -static void _events_branch_on_events_altered_data_collection_items_altered (DataCollection* _sender, GeeMap* items, gpointer self); -static void events_branch_on_no_event_collection_altered (EventsBranch* self); -static void _events_branch_on_no_event_collection_altered_event_source_collection_no_event_collection_altered (EventSourceCollection* _sender, gpointer self); -GType configuration_facade_get_type (void) G_GNUC_CONST; -GType config_facade_get_type (void) G_GNUC_CONST; -ConfigFacade* config_facade_get_instance (void); -static void events_branch_on_config_changed (EventsBranch* self); -static void _events_branch_on_config_changed_configuration_facade_events_sort_ascending_changed (ConfigurationFacade* _sender, gpointer self); -#define RESOURCES_ICON_FOLDER "folder" -#define RESOURCES_ICON_EVENTS "multiple-events" -#define RESOURCES_ICON_ONE_EVENT "one-event" -#define RESOURCES_ICON_NO_EVENT "no-event" -EventsUndatedDirectoryEntry* events_undated_directory_entry_new (void); -EventsUndatedDirectoryEntry* events_undated_directory_entry_construct (GType object_type); -EventsNoEventEntry* events_no_event_entry_new (void); -EventsNoEventEntry* events_no_event_entry_construct (GType object_type); -EventsMasterDirectoryEntry* events_master_directory_entry_new (void); -EventsMasterDirectoryEntry* events_master_directory_entry_construct (GType object_type); -EventsBranch* events_branch_new (void); -EventsBranch* events_branch_construct (GType object_type); -SidebarHeader* sidebar_header_new (const gchar* name, gboolean emphasized); -SidebarHeader* sidebar_header_construct (GType object_type, const gchar* name, gboolean emphasized); -GType sidebar_grouping_get_type (void) G_GNUC_CONST; -GType sidebar_header_get_type (void) G_GNUC_CONST; -GType sidebar_tree_get_type (void) G_GNUC_CONST; -GType sidebar_entry_get_type (void) G_GNUC_CONST; -GType sidebar_branch_options_get_type (void) G_GNUC_CONST; -static gint events_branch_event_year_comparator (SidebarEntry* a, SidebarEntry* b); -static gint _events_branch_event_year_comparator_gcompare_func (gconstpointer a, gconstpointer b); -SidebarBranch* sidebar_branch_new (SidebarEntry* root, SidebarBranchOptions options, GCompareFunc default_comparator, GCompareFunc root_comparator); -SidebarBranch* sidebar_branch_construct (GType object_type, SidebarEntry* root, SidebarBranchOptions options, GCompareFunc default_comparator, GCompareFunc root_comparator); -void sidebar_branch_graft (SidebarBranch* self, SidebarEntry* parent, SidebarEntry* entry, GCompareFunc comparator); -SidebarEntry* sidebar_branch_get_root (SidebarBranch* self); -GeeCollection* data_collection_get_all (DataCollection* self); -static void events_branch_add_event (EventsBranch* self, Event* event); -static void events_branch_show_no_events (EventsBranch* self, gboolean show); -GeeCollection* event_source_collection_get_no_event_objects (EventSourceCollection* self); -void events_branch_init (void); -gboolean configuration_facade_get_events_sort_ascending (ConfigurationFacade* self); -void events_branch_terminate (void); -gboolean events_branch_is_user_renameable (EventsBranch* self); -EventsMasterDirectoryEntry* events_branch_get_master_entry (EventsBranch* self); -GType events_year_directory_entry_get_type (void) G_GNUC_CONST; -gint events_year_directory_entry_get_year (EventsYearDirectoryEntry* self); -static gint events_branch_event_month_comparator (SidebarEntry* a, SidebarEntry* b); -GType events_month_directory_entry_get_type (void) G_GNUC_CONST; -gint events_month_directory_entry_get_month (EventsMonthDirectoryEntry* self); -static gint events_branch_event_comparator (SidebarEntry* a, SidebarEntry* b); -Event* events_event_entry_get_event (EventsEventEntry* self); -time_t event_source_get_start_time (EventSource* self); -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); -static gint events_branch_undated_event_comparator (SidebarEntry* a, SidebarEntry* b); -gchar* data_object_get_name (DataObject* self); -gint64 data_source_get_instance_id (DataSource* self); -EventsEventEntry* events_branch_get_entry_for_event (EventsBranch* self, Event* event); -void sidebar_branch_reorder_all (SidebarBranch* self); -static void events_branch_remove_event (EventsBranch* self, Event* event); -gboolean alteration_has_detail (Alteration* self, const gchar* subject, const gchar* detail); -static void events_branch_move_event (EventsBranch* self, Event* event); -GType sidebar_renameable_entry_get_type (void) G_GNUC_CONST; -static void events_branch_add_undated_event (EventsBranch* self, Event* event); -static SidebarEntry* events_branch_find_event_month (EventsBranch* self, Event* event, struct tm* event_tm, SidebarEntry* * found_year); -static void events_branch_graft_event (EventsBranch* self, SidebarEntry* parent, Event* event, GCompareFunc comparator); -static gint _events_branch_event_comparator_gcompare_func (gconstpointer a, gconstpointer b); -#define SUB_EVENTS_DIRECTORY_PAGE_YEAR_FORMAT _ ("%Y") -EventsYearDirectoryEntry* events_year_directory_entry_new (const gchar* name, struct tm* tm); -EventsYearDirectoryEntry* events_year_directory_entry_construct (GType object_type, const gchar* name, struct tm* tm); -static gint _events_branch_event_month_comparator_gcompare_func (gconstpointer a, gconstpointer b); -#define SUB_EVENTS_DIRECTORY_PAGE_MONTH_FORMAT _ ("%B") -EventsMonthDirectoryEntry* events_month_directory_entry_new (const gchar* name, struct tm* tm); -EventsMonthDirectoryEntry* events_month_directory_entry_construct (GType object_type, const gchar* name, struct tm* tm); -static void events_branch_move_to_undated_event (EventsBranch* self, Event* event); -static void events_branch_reparent_event (EventsBranch* self, Event* event, SidebarEntry* new_parent); -SidebarEntry* sidebar_branch_get_parent (SidebarBranch* self, SidebarEntry* entry); -void sidebar_branch_prune (SidebarBranch* self, SidebarEntry* entry); -gint sidebar_branch_get_child_count (SidebarBranch* self, SidebarEntry* parent); -static Block8Data* block8_data_ref (Block8Data* _data8_); -static void block8_data_unref (void * _userdata_); -static SidebarEntry* events_branch_find_event_year (EventsBranch* self, Event* event, struct tm* event_tm); -SidebarEntry* sidebar_branch_find_first_child (SidebarBranch* self, SidebarEntry* parent, Locator locator, void* locator_target); -static gboolean __lambda19_ (Block8Data* _data8_, SidebarEntry* entry); -static gboolean ___lambda19__locator (gconstpointer item, gpointer self); -static Block9Data* block9_data_ref (Block9Data* _data9_); -static void block9_data_unref (void * _userdata_); -static gboolean __lambda18_ (Block9Data* _data9_, SidebarEntry* entry); -static gboolean ___lambda18__locator (gconstpointer item, gpointer self); -gboolean sidebar_branch_has_entry (SidebarBranch* self, SidebarEntry* entry); -static gint _events_branch_undated_event_comparator_gcompare_func (gconstpointer a, gconstpointer b); -EventsEventEntry* events_event_entry_new (Event* event); -EventsEventEntry* events_event_entry_construct (GType object_type, Event* event); -void sidebar_branch_reparent (SidebarBranch* self, SidebarEntry* new_parent, SidebarEntry* entry); -static void events_branch_finalize (GObject * obj); -GType sidebar_selectable_entry_get_type (void) G_GNUC_CONST; -GType page_get_type (void) G_GNUC_CONST; -GType sidebar_page_representative_get_type (void) G_GNUC_CONST; -GType sidebar_contextable_get_type (void) G_GNUC_CONST; -GType sidebar_expandable_entry_get_type (void) G_GNUC_CONST; -enum { - EVENTS_DIRECTORY_ENTRY_DUMMY_PROPERTY -}; -EventsDirectoryEntry* events_directory_entry_construct (GType object_type); -SidebarSimplePageEntry* sidebar_simple_page_entry_construct (GType object_type); -static gchar* events_directory_entry_real_get_sidebar_icon (SidebarSimplePageEntry* base); -static gboolean events_directory_entry_real_expand_on_select (SidebarExpandableEntry* base); -enum { - EVENTS_MASTER_DIRECTORY_ENTRY_DUMMY_PROPERTY -}; -static gchar* events_master_directory_entry_real_get_sidebar_name (SidebarSimplePageEntry* base); -#define MASTER_EVENTS_DIRECTORY_PAGE_NAME _ ("All Events") -static gchar* events_master_directory_entry_real_get_sidebar_icon (SidebarSimplePageEntry* base); -static Page* events_master_directory_entry_real_create_page (SidebarSimplePageEntry* base); -MasterEventsDirectoryPage* master_events_directory_page_new (void); -MasterEventsDirectoryPage* master_events_directory_page_construct (GType object_type); -GType checkerboard_page_get_type (void) G_GNUC_CONST; -GType events_directory_page_get_type (void) G_GNUC_CONST; -GType master_events_directory_page_get_type (void) G_GNUC_CONST; -#define EVENTS_YEAR_DIRECTORY_ENTRY_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), EVENTS_TYPE_YEAR_DIRECTORY_ENTRY, EventsYearDirectoryEntryPrivate)) -enum { - EVENTS_YEAR_DIRECTORY_ENTRY_DUMMY_PROPERTY -}; -static gchar* events_year_directory_entry_real_get_sidebar_name (SidebarSimplePageEntry* base); -static Page* events_year_directory_entry_real_create_page (SidebarSimplePageEntry* base); -GType sub_events_directory_page_directory_type_get_type (void) G_GNUC_CONST; -SubEventsDirectoryPage* sub_events_directory_page_new (SubEventsDirectoryPageDirectoryType type, struct tm* time); -SubEventsDirectoryPage* sub_events_directory_page_construct (GType object_type, SubEventsDirectoryPageDirectoryType type, struct tm* time); -GType sub_events_directory_page_get_type (void) G_GNUC_CONST; -static void events_year_directory_entry_finalize (GObject * obj); -#define EVENTS_MONTH_DIRECTORY_ENTRY_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), EVENTS_TYPE_MONTH_DIRECTORY_ENTRY, EventsMonthDirectoryEntryPrivate)) -enum { - EVENTS_MONTH_DIRECTORY_ENTRY_DUMMY_PROPERTY -}; -static gchar* events_month_directory_entry_real_get_sidebar_name (SidebarSimplePageEntry* base); -gint events_month_directory_entry_get_year (EventsMonthDirectoryEntry* self); -static Page* events_month_directory_entry_real_create_page (SidebarSimplePageEntry* base); -static void events_month_directory_entry_finalize (GObject * obj); -enum { - EVENTS_UNDATED_DIRECTORY_ENTRY_DUMMY_PROPERTY -}; -static gchar* events_undated_directory_entry_real_get_sidebar_name (SidebarSimplePageEntry* base); -#define SUB_EVENTS_DIRECTORY_PAGE_UNDATED_PAGE_NAME _ ("Undated") -static Page* events_undated_directory_entry_real_create_page (SidebarSimplePageEntry* base); -GType media_source_get_type (void) G_GNUC_CONST; -GType sidebar_internal_drop_target_entry_get_type (void) G_GNUC_CONST; -#define EVENTS_EVENT_ENTRY_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), EVENTS_TYPE_EVENT_ENTRY, EventsEventEntryPrivate)) -enum { - EVENTS_EVENT_ENTRY_DUMMY_PROPERTY -}; -static gchar* events_event_entry_real_get_sidebar_name (SidebarSimplePageEntry* base); -static gchar* events_event_entry_real_get_sidebar_icon (SidebarSimplePageEntry* base); -static Page* events_event_entry_real_create_page (SidebarSimplePageEntry* base); -EventPage* event_page_new (Event* page_event); -EventPage* event_page_construct (GType object_type, Event* page_event); -GType media_page_get_type (void) G_GNUC_CONST; -GType collection_page_get_type (void) G_GNUC_CONST; -GType event_page_get_type (void) G_GNUC_CONST; -static gboolean events_event_entry_real_is_user_renameable (SidebarRenameableEntry* base); -static void events_event_entry_real_rename (SidebarRenameableEntry* base, const gchar* new_name); -gchar* event_prep_event_name (const gchar* name); -gpointer command_manager_ref (gpointer instance); -void command_manager_unref (gpointer instance); -GParamSpec* param_spec_command_manager (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags); -void value_set_command_manager (GValue* value, gpointer v_object); -void value_take_command_manager (GValue* value, gpointer v_object); -gpointer value_get_command_manager (const GValue* value); -GType command_manager_get_type (void) G_GNUC_CONST; -CommandManager* app_window_get_command_manager (void); -GType command_get_type (void) G_GNUC_CONST; -void command_manager_execute (CommandManager* self, Command* command); -RenameEventCommand* rename_event_command_new (Event* event, const gchar* new_name); -RenameEventCommand* rename_event_command_construct (GType object_type, Event* event, const gchar* new_name); -GType page_command_get_type (void) G_GNUC_CONST; -GType simple_proxyable_command_get_type (void) G_GNUC_CONST; -GType rename_event_command_get_type (void) G_GNUC_CONST; -static gboolean events_event_entry_real_internal_drop_received (SidebarInternalDropTargetEntry* base, GeeList* media); -GType data_view_get_type (void) G_GNUC_CONST; -DataView* data_view_new (DataSource* source); -DataView* data_view_construct (GType object_type, DataSource* source); -SetEventCommand* set_event_command_new (GeeIterable* iter, Event* new_event); -SetEventCommand* set_event_command_construct (GType object_type, GeeIterable* iter, Event* new_event); -GType move_photos_command_get_type (void) G_GNUC_CONST; -GType set_event_command_get_type (void) G_GNUC_CONST; -static gboolean events_event_entry_real_internal_drop_received_arbitrary (SidebarInternalDropTargetEntry* base, GtkSelectionData* data); -static void events_event_entry_finalize (GObject * obj); -enum { - EVENTS_NO_EVENT_ENTRY_DUMMY_PROPERTY -}; -static gchar* events_no_event_entry_real_get_sidebar_name (SidebarSimplePageEntry* base); -#define NO_EVENT_PAGE_NAME _ ("No Event") -static gchar* events_no_event_entry_real_get_sidebar_icon (SidebarSimplePageEntry* base); -static Page* events_no_event_entry_real_create_page (SidebarSimplePageEntry* base); -NoEventPage* no_event_page_new (void); -NoEventPage* no_event_page_construct (GType object_type); -GType no_event_page_get_type (void) G_GNUC_CONST; - - -static void _events_branch_on_events_added_removed_data_collection_contents_altered (DataCollection* _sender, GeeIterable* added, GeeIterable* removed, gpointer self) { -#line 46 "/home/jens/Source/shotwell/src/events/Branch.vala" - events_branch_on_events_added_removed ((EventsBranch*) self, added, removed); -#line 997 "Branch.c" -} - - -static void _events_branch_on_events_altered_data_collection_items_altered (DataCollection* _sender, GeeMap* items, gpointer self) { -#line 47 "/home/jens/Source/shotwell/src/events/Branch.vala" - events_branch_on_events_altered ((EventsBranch*) self, items); -#line 1004 "Branch.c" -} - - -static void _events_branch_on_no_event_collection_altered_event_source_collection_no_event_collection_altered (EventSourceCollection* _sender, gpointer self) { -#line 48 "/home/jens/Source/shotwell/src/events/Branch.vala" - events_branch_on_no_event_collection_altered ((EventsBranch*) self); -#line 1011 "Branch.c" -} - - -static void _events_branch_on_config_changed_configuration_facade_events_sort_ascending_changed (ConfigurationFacade* _sender, gpointer self) { -#line 50 "/home/jens/Source/shotwell/src/events/Branch.vala" - events_branch_on_config_changed ((EventsBranch*) self); -#line 1018 "Branch.c" -} - - -static gint _events_branch_event_year_comparator_gcompare_func (gconstpointer a, gconstpointer b) { - gint result; - result = events_branch_event_year_comparator ((SidebarEntry*) a, (SidebarEntry*) b); -#line 25 "/home/jens/Source/shotwell/src/events/Branch.vala" - return result; -#line 1027 "Branch.c" -} - - -EventsBranch* events_branch_construct (GType object_type) { - EventsBranch * self = NULL; - SidebarHeader* _tmp0_; - SidebarHeader* _tmp1_; - SidebarEntry* _tmp2_; - SidebarEntry* _tmp3_; - EventsMasterDirectoryEntry* _tmp4_; - EventSourceCollection* _tmp15_; - GeeCollection* _tmp16_; - GeeCollection* _tmp17_; - gint _tmp18_; - gint _tmp19_; - EventSourceCollection* _tmp20_; - EventSourceCollection* _tmp21_; - EventSourceCollection* _tmp22_; - ConfigFacade* _tmp23_; - ConfigFacade* _tmp24_; -#line 25 "/home/jens/Source/shotwell/src/events/Branch.vala" - _tmp0_ = sidebar_header_new (_ ("Events"), TRUE); -#line 25 "/home/jens/Source/shotwell/src/events/Branch.vala" - _tmp1_ = _tmp0_; -#line 25 "/home/jens/Source/shotwell/src/events/Branch.vala" - self = (EventsBranch*) sidebar_branch_construct (object_type, G_TYPE_CHECK_INSTANCE_CAST (_tmp1_, SIDEBAR_TYPE_ENTRY, SidebarEntry), SIDEBAR_BRANCH_OPTIONS_STARTUP_EXPAND_TO_FIRST_CHILD, _events_branch_event_year_comparator_gcompare_func, NULL); -#line 25 "/home/jens/Source/shotwell/src/events/Branch.vala" - _g_object_unref0 (_tmp1_); -#line 28 "/home/jens/Source/shotwell/src/events/Branch.vala" - _tmp2_ = sidebar_branch_get_root (G_TYPE_CHECK_INSTANCE_CAST (self, SIDEBAR_TYPE_BRANCH, SidebarBranch)); -#line 28 "/home/jens/Source/shotwell/src/events/Branch.vala" - _tmp3_ = _tmp2_; -#line 28 "/home/jens/Source/shotwell/src/events/Branch.vala" - _tmp4_ = self->priv->all_events_entry; -#line 28 "/home/jens/Source/shotwell/src/events/Branch.vala" - sidebar_branch_graft (G_TYPE_CHECK_INSTANCE_CAST (self, SIDEBAR_TYPE_BRANCH, SidebarBranch), _tmp3_, G_TYPE_CHECK_INSTANCE_CAST (_tmp4_, SIDEBAR_TYPE_ENTRY, SidebarEntry), NULL); -#line 28 "/home/jens/Source/shotwell/src/events/Branch.vala" - _g_object_unref0 (_tmp3_); -#line 1066 "Branch.c" - { - GeeIterator* _object_it = NULL; - EventSourceCollection* _tmp5_; - GeeCollection* _tmp6_; - GeeCollection* _tmp7_; - GeeIterator* _tmp8_; - GeeIterator* _tmp9_; -#line 31 "/home/jens/Source/shotwell/src/events/Branch.vala" - _tmp5_ = event_global; -#line 31 "/home/jens/Source/shotwell/src/events/Branch.vala" - _tmp6_ = data_collection_get_all (G_TYPE_CHECK_INSTANCE_CAST (_tmp5_, TYPE_DATA_COLLECTION, DataCollection)); -#line 31 "/home/jens/Source/shotwell/src/events/Branch.vala" - _tmp7_ = _tmp6_; -#line 31 "/home/jens/Source/shotwell/src/events/Branch.vala" - _tmp8_ = gee_iterable_iterator (G_TYPE_CHECK_INSTANCE_CAST (_tmp7_, GEE_TYPE_ITERABLE, GeeIterable)); -#line 31 "/home/jens/Source/shotwell/src/events/Branch.vala" - _tmp9_ = _tmp8_; -#line 31 "/home/jens/Source/shotwell/src/events/Branch.vala" - _g_object_unref0 (_tmp7_); -#line 31 "/home/jens/Source/shotwell/src/events/Branch.vala" - _object_it = _tmp9_; -#line 31 "/home/jens/Source/shotwell/src/events/Branch.vala" - while (TRUE) { -#line 1090 "Branch.c" - GeeIterator* _tmp10_; - gboolean _tmp11_; - DataObject* object = NULL; - GeeIterator* _tmp12_; - gpointer _tmp13_; - DataObject* _tmp14_; -#line 31 "/home/jens/Source/shotwell/src/events/Branch.vala" - _tmp10_ = _object_it; -#line 31 "/home/jens/Source/shotwell/src/events/Branch.vala" - _tmp11_ = gee_iterator_next (_tmp10_); -#line 31 "/home/jens/Source/shotwell/src/events/Branch.vala" - if (!_tmp11_) { -#line 31 "/home/jens/Source/shotwell/src/events/Branch.vala" - break; -#line 1105 "Branch.c" - } -#line 31 "/home/jens/Source/shotwell/src/events/Branch.vala" - _tmp12_ = _object_it; -#line 31 "/home/jens/Source/shotwell/src/events/Branch.vala" - _tmp13_ = gee_iterator_get (_tmp12_); -#line 31 "/home/jens/Source/shotwell/src/events/Branch.vala" - object = (DataObject*) _tmp13_; -#line 32 "/home/jens/Source/shotwell/src/events/Branch.vala" - _tmp14_ = object; -#line 32 "/home/jens/Source/shotwell/src/events/Branch.vala" - events_branch_add_event (self, G_TYPE_CHECK_INSTANCE_CAST (_tmp14_, TYPE_EVENT, Event)); -#line 31 "/home/jens/Source/shotwell/src/events/Branch.vala" - _g_object_unref0 (object); -#line 1119 "Branch.c" - } -#line 31 "/home/jens/Source/shotwell/src/events/Branch.vala" - _g_object_unref0 (_object_it); -#line 1123 "Branch.c" - } -#line 34 "/home/jens/Source/shotwell/src/events/Branch.vala" - _tmp15_ = event_global; -#line 34 "/home/jens/Source/shotwell/src/events/Branch.vala" - _tmp16_ = event_source_collection_get_no_event_objects (_tmp15_); -#line 34 "/home/jens/Source/shotwell/src/events/Branch.vala" - _tmp17_ = _tmp16_; -#line 34 "/home/jens/Source/shotwell/src/events/Branch.vala" - _tmp18_ = gee_collection_get_size (_tmp17_); -#line 34 "/home/jens/Source/shotwell/src/events/Branch.vala" - _tmp19_ = _tmp18_; -#line 34 "/home/jens/Source/shotwell/src/events/Branch.vala" - events_branch_show_no_events (self, _tmp19_ > 0); -#line 34 "/home/jens/Source/shotwell/src/events/Branch.vala" - _g_object_unref0 (_tmp17_); -#line 37 "/home/jens/Source/shotwell/src/events/Branch.vala" - _tmp20_ = event_global; -#line 37 "/home/jens/Source/shotwell/src/events/Branch.vala" - g_signal_connect_object (G_TYPE_CHECK_INSTANCE_CAST (_tmp20_, TYPE_DATA_COLLECTION, DataCollection), "contents-altered", (GCallback) _events_branch_on_events_added_removed_data_collection_contents_altered, self, 0); -#line 38 "/home/jens/Source/shotwell/src/events/Branch.vala" - _tmp21_ = event_global; -#line 38 "/home/jens/Source/shotwell/src/events/Branch.vala" - g_signal_connect_object (G_TYPE_CHECK_INSTANCE_CAST (_tmp21_, TYPE_DATA_COLLECTION, DataCollection), "items-altered", (GCallback) _events_branch_on_events_altered_data_collection_items_altered, self, 0); -#line 39 "/home/jens/Source/shotwell/src/events/Branch.vala" - _tmp22_ = event_global; -#line 39 "/home/jens/Source/shotwell/src/events/Branch.vala" - g_signal_connect_object (_tmp22_, "no-event-collection-altered", (GCallback) _events_branch_on_no_event_collection_altered_event_source_collection_no_event_collection_altered, self, 0); -#line 42 "/home/jens/Source/shotwell/src/events/Branch.vala" - _tmp23_ = config_facade_get_instance (); -#line 42 "/home/jens/Source/shotwell/src/events/Branch.vala" - _tmp24_ = _tmp23_; -#line 42 "/home/jens/Source/shotwell/src/events/Branch.vala" - g_signal_connect_object (G_TYPE_CHECK_INSTANCE_CAST (_tmp24_, TYPE_CONFIGURATION_FACADE, ConfigurationFacade), "events-sort-ascending-changed", (GCallback) _events_branch_on_config_changed_configuration_facade_events_sort_ascending_changed, self, 0); -#line 42 "/home/jens/Source/shotwell/src/events/Branch.vala" - _g_object_unref0 (_tmp24_); -#line 24 "/home/jens/Source/shotwell/src/events/Branch.vala" - return self; -#line 1161 "Branch.c" -} - - -EventsBranch* events_branch_new (void) { -#line 24 "/home/jens/Source/shotwell/src/events/Branch.vala" - return events_branch_construct (EVENTS_TYPE_BRANCH); -#line 1168 "Branch.c" -} - - -void events_branch_init (void) { - ConfigFacade* _tmp0_; - ConfigFacade* _tmp1_; - gboolean _tmp2_; -#line 54 "/home/jens/Source/shotwell/src/events/Branch.vala" - _tmp0_ = config_facade_get_instance (); -#line 54 "/home/jens/Source/shotwell/src/events/Branch.vala" - _tmp1_ = _tmp0_; -#line 54 "/home/jens/Source/shotwell/src/events/Branch.vala" - _tmp2_ = configuration_facade_get_events_sort_ascending (G_TYPE_CHECK_INSTANCE_CAST (_tmp1_, TYPE_CONFIGURATION_FACADE, ConfigurationFacade)); -#line 54 "/home/jens/Source/shotwell/src/events/Branch.vala" - events_branch_sort_ascending = _tmp2_; -#line 54 "/home/jens/Source/shotwell/src/events/Branch.vala" - _g_object_unref0 (_tmp1_); -#line 1186 "Branch.c" -} - - -void events_branch_terminate (void) { -} - - -gboolean events_branch_is_user_renameable (EventsBranch* self) { - gboolean result = FALSE; -#line 60 "/home/jens/Source/shotwell/src/events/Branch.vala" - g_return_val_if_fail (EVENTS_IS_BRANCH (self), FALSE); -#line 61 "/home/jens/Source/shotwell/src/events/Branch.vala" - result = TRUE; -#line 61 "/home/jens/Source/shotwell/src/events/Branch.vala" - return result; -#line 1202 "Branch.c" -} - - -static gpointer _g_object_ref0 (gpointer self) { -#line 65 "/home/jens/Source/shotwell/src/events/Branch.vala" - return self ? g_object_ref (self) : NULL; -#line 1209 "Branch.c" -} - - -EventsMasterDirectoryEntry* events_branch_get_master_entry (EventsBranch* self) { - EventsMasterDirectoryEntry* result = NULL; - EventsMasterDirectoryEntry* _tmp0_; - EventsMasterDirectoryEntry* _tmp1_; -#line 64 "/home/jens/Source/shotwell/src/events/Branch.vala" - g_return_val_if_fail (EVENTS_IS_BRANCH (self), NULL); -#line 65 "/home/jens/Source/shotwell/src/events/Branch.vala" - _tmp0_ = self->priv->all_events_entry; -#line 65 "/home/jens/Source/shotwell/src/events/Branch.vala" - _tmp1_ = _g_object_ref0 (_tmp0_); -#line 65 "/home/jens/Source/shotwell/src/events/Branch.vala" - result = _tmp1_; -#line 65 "/home/jens/Source/shotwell/src/events/Branch.vala" - return result; -#line 1227 "Branch.c" -} - - -static gint events_branch_event_year_comparator (SidebarEntry* a, SidebarEntry* b) { - gint result = 0; - SidebarEntry* _tmp0_; - SidebarEntry* _tmp1_; - SidebarEntry* _tmp2_; - SidebarEntry* _tmp6_; - SidebarEntry* _tmp8_; - gboolean _tmp10_; - gint _result_ = 0; - SidebarEntry* _tmp15_; - gint _tmp16_; - SidebarEntry* _tmp17_; - gint _tmp18_; - gint _tmp19_; -#line 68 "/home/jens/Source/shotwell/src/events/Branch.vala" - g_return_val_if_fail (SIDEBAR_IS_ENTRY (a), 0); -#line 68 "/home/jens/Source/shotwell/src/events/Branch.vala" - g_return_val_if_fail (SIDEBAR_IS_ENTRY (b), 0); -#line 69 "/home/jens/Source/shotwell/src/events/Branch.vala" - _tmp0_ = a; -#line 69 "/home/jens/Source/shotwell/src/events/Branch.vala" - _tmp1_ = b; -#line 69 "/home/jens/Source/shotwell/src/events/Branch.vala" - if (_tmp0_ == _tmp1_) { -#line 70 "/home/jens/Source/shotwell/src/events/Branch.vala" - result = 0; -#line 70 "/home/jens/Source/shotwell/src/events/Branch.vala" - return result; -#line 1259 "Branch.c" - } -#line 74 "/home/jens/Source/shotwell/src/events/Branch.vala" - _tmp2_ = a; -#line 74 "/home/jens/Source/shotwell/src/events/Branch.vala" - if (G_TYPE_CHECK_INSTANCE_TYPE (_tmp2_, EVENTS_TYPE_UNDATED_DIRECTORY_ENTRY)) { -#line 1265 "Branch.c" - SidebarEntry* _tmp3_; -#line 75 "/home/jens/Source/shotwell/src/events/Branch.vala" - _tmp3_ = b; -#line 75 "/home/jens/Source/shotwell/src/events/Branch.vala" - if (G_TYPE_CHECK_INSTANCE_TYPE (_tmp3_, EVENTS_TYPE_NO_EVENT_ENTRY)) { -#line 76 "/home/jens/Source/shotwell/src/events/Branch.vala" - result = -1; -#line 76 "/home/jens/Source/shotwell/src/events/Branch.vala" - return result; -#line 1275 "Branch.c" - } -#line 77 "/home/jens/Source/shotwell/src/events/Branch.vala" - result = 1; -#line 77 "/home/jens/Source/shotwell/src/events/Branch.vala" - return result; -#line 1281 "Branch.c" - } else { - SidebarEntry* _tmp4_; -#line 78 "/home/jens/Source/shotwell/src/events/Branch.vala" - _tmp4_ = b; -#line 78 "/home/jens/Source/shotwell/src/events/Branch.vala" - if (G_TYPE_CHECK_INSTANCE_TYPE (_tmp4_, EVENTS_TYPE_UNDATED_DIRECTORY_ENTRY)) { -#line 1288 "Branch.c" - SidebarEntry* _tmp5_; -#line 79 "/home/jens/Source/shotwell/src/events/Branch.vala" - _tmp5_ = a; -#line 79 "/home/jens/Source/shotwell/src/events/Branch.vala" - if (G_TYPE_CHECK_INSTANCE_TYPE (_tmp5_, EVENTS_TYPE_NO_EVENT_ENTRY)) { -#line 80 "/home/jens/Source/shotwell/src/events/Branch.vala" - result = 1; -#line 80 "/home/jens/Source/shotwell/src/events/Branch.vala" - return result; -#line 1298 "Branch.c" - } -#line 81 "/home/jens/Source/shotwell/src/events/Branch.vala" - result = -1; -#line 81 "/home/jens/Source/shotwell/src/events/Branch.vala" - return result; -#line 1304 "Branch.c" - } - } -#line 84 "/home/jens/Source/shotwell/src/events/Branch.vala" - _tmp6_ = a; -#line 84 "/home/jens/Source/shotwell/src/events/Branch.vala" - if (G_TYPE_CHECK_INSTANCE_TYPE (_tmp6_, EVENTS_TYPE_NO_EVENT_ENTRY)) { -#line 85 "/home/jens/Source/shotwell/src/events/Branch.vala" - result = 1; -#line 85 "/home/jens/Source/shotwell/src/events/Branch.vala" - return result; -#line 1315 "Branch.c" - } else { - SidebarEntry* _tmp7_; -#line 86 "/home/jens/Source/shotwell/src/events/Branch.vala" - _tmp7_ = b; -#line 86 "/home/jens/Source/shotwell/src/events/Branch.vala" - if (G_TYPE_CHECK_INSTANCE_TYPE (_tmp7_, EVENTS_TYPE_NO_EVENT_ENTRY)) { -#line 87 "/home/jens/Source/shotwell/src/events/Branch.vala" - result = -1; -#line 87 "/home/jens/Source/shotwell/src/events/Branch.vala" - return result; -#line 1326 "Branch.c" - } - } -#line 90 "/home/jens/Source/shotwell/src/events/Branch.vala" - _tmp8_ = a; -#line 90 "/home/jens/Source/shotwell/src/events/Branch.vala" - if (G_TYPE_CHECK_INSTANCE_TYPE (_tmp8_, EVENTS_TYPE_MASTER_DIRECTORY_ENTRY)) { -#line 91 "/home/jens/Source/shotwell/src/events/Branch.vala" - result = -1; -#line 91 "/home/jens/Source/shotwell/src/events/Branch.vala" - return result; -#line 1337 "Branch.c" - } else { - SidebarEntry* _tmp9_; -#line 92 "/home/jens/Source/shotwell/src/events/Branch.vala" - _tmp9_ = b; -#line 92 "/home/jens/Source/shotwell/src/events/Branch.vala" - if (G_TYPE_CHECK_INSTANCE_TYPE (_tmp9_, EVENTS_TYPE_MASTER_DIRECTORY_ENTRY)) { -#line 93 "/home/jens/Source/shotwell/src/events/Branch.vala" - result = 1; -#line 93 "/home/jens/Source/shotwell/src/events/Branch.vala" - return result; -#line 1348 "Branch.c" - } - } -#line 95 "/home/jens/Source/shotwell/src/events/Branch.vala" - _tmp10_ = events_branch_sort_ascending; -#line 95 "/home/jens/Source/shotwell/src/events/Branch.vala" - if (!_tmp10_) { -#line 1355 "Branch.c" - SidebarEntry* swap = NULL; - SidebarEntry* _tmp11_; - SidebarEntry* _tmp12_; - SidebarEntry* _tmp13_; - SidebarEntry* _tmp14_; -#line 96 "/home/jens/Source/shotwell/src/events/Branch.vala" - _tmp11_ = a; -#line 96 "/home/jens/Source/shotwell/src/events/Branch.vala" - _tmp12_ = _g_object_ref0 (_tmp11_); -#line 96 "/home/jens/Source/shotwell/src/events/Branch.vala" - swap = _tmp12_; -#line 97 "/home/jens/Source/shotwell/src/events/Branch.vala" - _tmp13_ = b; -#line 97 "/home/jens/Source/shotwell/src/events/Branch.vala" - a = _tmp13_; -#line 98 "/home/jens/Source/shotwell/src/events/Branch.vala" - _tmp14_ = swap; -#line 98 "/home/jens/Source/shotwell/src/events/Branch.vala" - b = _tmp14_; -#line 95 "/home/jens/Source/shotwell/src/events/Branch.vala" - _g_object_unref0 (swap); -#line 1377 "Branch.c" - } -#line 101 "/home/jens/Source/shotwell/src/events/Branch.vala" - _tmp15_ = a; -#line 101 "/home/jens/Source/shotwell/src/events/Branch.vala" - _tmp16_ = events_year_directory_entry_get_year (G_TYPE_CHECK_INSTANCE_CAST (_tmp15_, EVENTS_TYPE_YEAR_DIRECTORY_ENTRY, EventsYearDirectoryEntry)); -#line 101 "/home/jens/Source/shotwell/src/events/Branch.vala" - _tmp17_ = b; -#line 101 "/home/jens/Source/shotwell/src/events/Branch.vala" - _tmp18_ = events_year_directory_entry_get_year (G_TYPE_CHECK_INSTANCE_CAST (_tmp17_, EVENTS_TYPE_YEAR_DIRECTORY_ENTRY, EventsYearDirectoryEntry)); -#line 101 "/home/jens/Source/shotwell/src/events/Branch.vala" - _result_ = _tmp16_ - _tmp18_; -#line 103 "/home/jens/Source/shotwell/src/events/Branch.vala" - _tmp19_ = _result_; -#line 103 "/home/jens/Source/shotwell/src/events/Branch.vala" - _vala_assert (_tmp19_ != 0, "result != 0"); -#line 105 "/home/jens/Source/shotwell/src/events/Branch.vala" - result = _result_; -#line 105 "/home/jens/Source/shotwell/src/events/Branch.vala" - return result; -#line 1397 "Branch.c" -} - - -static gint events_branch_event_month_comparator (SidebarEntry* a, SidebarEntry* b) { - gint result = 0; - SidebarEntry* _tmp0_; - SidebarEntry* _tmp1_; - gboolean _tmp2_; - gint _result_ = 0; - SidebarEntry* _tmp7_; - gint _tmp8_; - SidebarEntry* _tmp9_; - gint _tmp10_; - gint _tmp11_; -#line 108 "/home/jens/Source/shotwell/src/events/Branch.vala" - g_return_val_if_fail (SIDEBAR_IS_ENTRY (a), 0); -#line 108 "/home/jens/Source/shotwell/src/events/Branch.vala" - g_return_val_if_fail (SIDEBAR_IS_ENTRY (b), 0); -#line 109 "/home/jens/Source/shotwell/src/events/Branch.vala" - _tmp0_ = a; -#line 109 "/home/jens/Source/shotwell/src/events/Branch.vala" - _tmp1_ = b; -#line 109 "/home/jens/Source/shotwell/src/events/Branch.vala" - if (_tmp0_ == _tmp1_) { -#line 110 "/home/jens/Source/shotwell/src/events/Branch.vala" - result = 0; -#line 110 "/home/jens/Source/shotwell/src/events/Branch.vala" - return result; -#line 1426 "Branch.c" - } -#line 112 "/home/jens/Source/shotwell/src/events/Branch.vala" - _tmp2_ = events_branch_sort_ascending; -#line 112 "/home/jens/Source/shotwell/src/events/Branch.vala" - if (!_tmp2_) { -#line 1432 "Branch.c" - SidebarEntry* swap = NULL; - SidebarEntry* _tmp3_; - SidebarEntry* _tmp4_; - SidebarEntry* _tmp5_; - SidebarEntry* _tmp6_; -#line 113 "/home/jens/Source/shotwell/src/events/Branch.vala" - _tmp3_ = a; -#line 113 "/home/jens/Source/shotwell/src/events/Branch.vala" - _tmp4_ = _g_object_ref0 (_tmp3_); -#line 113 "/home/jens/Source/shotwell/src/events/Branch.vala" - swap = _tmp4_; -#line 114 "/home/jens/Source/shotwell/src/events/Branch.vala" - _tmp5_ = b; -#line 114 "/home/jens/Source/shotwell/src/events/Branch.vala" - a = _tmp5_; -#line 115 "/home/jens/Source/shotwell/src/events/Branch.vala" - _tmp6_ = swap; -#line 115 "/home/jens/Source/shotwell/src/events/Branch.vala" - b = _tmp6_; -#line 112 "/home/jens/Source/shotwell/src/events/Branch.vala" - _g_object_unref0 (swap); -#line 1454 "Branch.c" - } -#line 118 "/home/jens/Source/shotwell/src/events/Branch.vala" - _tmp7_ = a; -#line 118 "/home/jens/Source/shotwell/src/events/Branch.vala" - _tmp8_ = events_month_directory_entry_get_month (G_TYPE_CHECK_INSTANCE_CAST (_tmp7_, EVENTS_TYPE_MONTH_DIRECTORY_ENTRY, EventsMonthDirectoryEntry)); -#line 118 "/home/jens/Source/shotwell/src/events/Branch.vala" - _tmp9_ = b; -#line 118 "/home/jens/Source/shotwell/src/events/Branch.vala" - _tmp10_ = events_month_directory_entry_get_month (G_TYPE_CHECK_INSTANCE_CAST (_tmp9_, EVENTS_TYPE_MONTH_DIRECTORY_ENTRY, EventsMonthDirectoryEntry)); -#line 118 "/home/jens/Source/shotwell/src/events/Branch.vala" - _result_ = _tmp8_ - _tmp10_; -#line 120 "/home/jens/Source/shotwell/src/events/Branch.vala" - _tmp11_ = _result_; -#line 120 "/home/jens/Source/shotwell/src/events/Branch.vala" - _vala_assert (_tmp11_ != 0, "result != 0"); -#line 122 "/home/jens/Source/shotwell/src/events/Branch.vala" - result = _result_; -#line 122 "/home/jens/Source/shotwell/src/events/Branch.vala" - return result; -#line 1474 "Branch.c" -} - - -static gint events_branch_event_comparator (SidebarEntry* a, SidebarEntry* b) { - gint result = 0; - SidebarEntry* _tmp0_; - SidebarEntry* _tmp1_; - gboolean _tmp2_; - gint64 _result_ = 0LL; - SidebarEntry* _tmp7_; - Event* _tmp8_; - Event* _tmp9_; - time_t _tmp10_; - SidebarEntry* _tmp11_; - Event* _tmp12_; - Event* _tmp13_; - time_t _tmp14_; - gint64 _tmp15_; - gint64 _tmp16_; - gint64 _tmp27_; - gint _tmp28_ = 0; - gint64 _tmp29_; -#line 125 "/home/jens/Source/shotwell/src/events/Branch.vala" - g_return_val_if_fail (SIDEBAR_IS_ENTRY (a), 0); -#line 125 "/home/jens/Source/shotwell/src/events/Branch.vala" - g_return_val_if_fail (SIDEBAR_IS_ENTRY (b), 0); -#line 126 "/home/jens/Source/shotwell/src/events/Branch.vala" - _tmp0_ = a; -#line 126 "/home/jens/Source/shotwell/src/events/Branch.vala" - _tmp1_ = b; -#line 126 "/home/jens/Source/shotwell/src/events/Branch.vala" - if (_tmp0_ == _tmp1_) { -#line 127 "/home/jens/Source/shotwell/src/events/Branch.vala" - result = 0; -#line 127 "/home/jens/Source/shotwell/src/events/Branch.vala" - return result; -#line 1511 "Branch.c" - } -#line 129 "/home/jens/Source/shotwell/src/events/Branch.vala" - _tmp2_ = events_branch_sort_ascending; -#line 129 "/home/jens/Source/shotwell/src/events/Branch.vala" - if (!_tmp2_) { -#line 1517 "Branch.c" - SidebarEntry* swap = NULL; - SidebarEntry* _tmp3_; - SidebarEntry* _tmp4_; - SidebarEntry* _tmp5_; - SidebarEntry* _tmp6_; -#line 130 "/home/jens/Source/shotwell/src/events/Branch.vala" - _tmp3_ = a; -#line 130 "/home/jens/Source/shotwell/src/events/Branch.vala" - _tmp4_ = _g_object_ref0 (_tmp3_); -#line 130 "/home/jens/Source/shotwell/src/events/Branch.vala" - swap = _tmp4_; -#line 131 "/home/jens/Source/shotwell/src/events/Branch.vala" - _tmp5_ = b; -#line 131 "/home/jens/Source/shotwell/src/events/Branch.vala" - a = _tmp5_; -#line 132 "/home/jens/Source/shotwell/src/events/Branch.vala" - _tmp6_ = swap; -#line 132 "/home/jens/Source/shotwell/src/events/Branch.vala" - b = _tmp6_; -#line 129 "/home/jens/Source/shotwell/src/events/Branch.vala" - _g_object_unref0 (swap); -#line 1539 "Branch.c" - } -#line 135 "/home/jens/Source/shotwell/src/events/Branch.vala" - _tmp7_ = a; -#line 135 "/home/jens/Source/shotwell/src/events/Branch.vala" - _tmp8_ = events_event_entry_get_event (G_TYPE_CHECK_INSTANCE_CAST (_tmp7_, EVENTS_TYPE_EVENT_ENTRY, EventsEventEntry)); -#line 135 "/home/jens/Source/shotwell/src/events/Branch.vala" - _tmp9_ = _tmp8_; -#line 135 "/home/jens/Source/shotwell/src/events/Branch.vala" - _tmp10_ = event_source_get_start_time (G_TYPE_CHECK_INSTANCE_CAST (_tmp9_, TYPE_EVENT_SOURCE, EventSource)); -#line 135 "/home/jens/Source/shotwell/src/events/Branch.vala" - _tmp11_ = b; -#line 135 "/home/jens/Source/shotwell/src/events/Branch.vala" - _tmp12_ = events_event_entry_get_event (G_TYPE_CHECK_INSTANCE_CAST (_tmp11_, EVENTS_TYPE_EVENT_ENTRY, EventsEventEntry)); -#line 135 "/home/jens/Source/shotwell/src/events/Branch.vala" - _tmp13_ = _tmp12_; -#line 135 "/home/jens/Source/shotwell/src/events/Branch.vala" - _tmp14_ = event_source_get_start_time (G_TYPE_CHECK_INSTANCE_CAST (_tmp13_, TYPE_EVENT_SOURCE, EventSource)); -#line 135 "/home/jens/Source/shotwell/src/events/Branch.vala" - _tmp15_ = (gint64) (_tmp10_ - _tmp14_); -#line 135 "/home/jens/Source/shotwell/src/events/Branch.vala" - _g_object_unref0 (_tmp13_); -#line 135 "/home/jens/Source/shotwell/src/events/Branch.vala" - _g_object_unref0 (_tmp9_); -#line 135 "/home/jens/Source/shotwell/src/events/Branch.vala" - _result_ = _tmp15_; -#line 139 "/home/jens/Source/shotwell/src/events/Branch.vala" - _tmp16_ = _result_; -#line 139 "/home/jens/Source/shotwell/src/events/Branch.vala" - if (_tmp16_ == ((gint64) 0)) { -#line 1569 "Branch.c" - SidebarEntry* _tmp17_; - Event* _tmp18_; - Event* _tmp19_; - EventID _tmp20_ = {0}; - gint64 _tmp21_; - SidebarEntry* _tmp22_; - Event* _tmp23_; - Event* _tmp24_; - EventID _tmp25_ = {0}; - gint64 _tmp26_; -#line 140 "/home/jens/Source/shotwell/src/events/Branch.vala" - _tmp17_ = a; -#line 140 "/home/jens/Source/shotwell/src/events/Branch.vala" - _tmp18_ = events_event_entry_get_event (G_TYPE_CHECK_INSTANCE_CAST (_tmp17_, EVENTS_TYPE_EVENT_ENTRY, EventsEventEntry)); -#line 140 "/home/jens/Source/shotwell/src/events/Branch.vala" - _tmp19_ = _tmp18_; -#line 140 "/home/jens/Source/shotwell/src/events/Branch.vala" - event_get_event_id (_tmp19_, &_tmp20_); -#line 140 "/home/jens/Source/shotwell/src/events/Branch.vala" - _tmp21_ = _tmp20_.id; -#line 140 "/home/jens/Source/shotwell/src/events/Branch.vala" - _tmp22_ = b; -#line 140 "/home/jens/Source/shotwell/src/events/Branch.vala" - _tmp23_ = events_event_entry_get_event (G_TYPE_CHECK_INSTANCE_CAST (_tmp22_, EVENTS_TYPE_EVENT_ENTRY, EventsEventEntry)); -#line 140 "/home/jens/Source/shotwell/src/events/Branch.vala" - _tmp24_ = _tmp23_; -#line 140 "/home/jens/Source/shotwell/src/events/Branch.vala" - event_get_event_id (_tmp24_, &_tmp25_); -#line 140 "/home/jens/Source/shotwell/src/events/Branch.vala" - _tmp26_ = _tmp25_.id; -#line 140 "/home/jens/Source/shotwell/src/events/Branch.vala" - _result_ = _tmp21_ - _tmp26_; -#line 140 "/home/jens/Source/shotwell/src/events/Branch.vala" - _g_object_unref0 (_tmp24_); -#line 140 "/home/jens/Source/shotwell/src/events/Branch.vala" - _g_object_unref0 (_tmp19_); -#line 1606 "Branch.c" - } -#line 144 "/home/jens/Source/shotwell/src/events/Branch.vala" - _tmp27_ = _result_; -#line 144 "/home/jens/Source/shotwell/src/events/Branch.vala" - _vala_assert (_tmp27_ != ((gint64) 0), "result != 0"); -#line 146 "/home/jens/Source/shotwell/src/events/Branch.vala" - _tmp29_ = _result_; -#line 146 "/home/jens/Source/shotwell/src/events/Branch.vala" - if (_tmp29_ < ((gint64) 0)) { -#line 146 "/home/jens/Source/shotwell/src/events/Branch.vala" - _tmp28_ = -1; -#line 1618 "Branch.c" - } else { -#line 146 "/home/jens/Source/shotwell/src/events/Branch.vala" - _tmp28_ = 1; -#line 1622 "Branch.c" - } -#line 146 "/home/jens/Source/shotwell/src/events/Branch.vala" - result = _tmp28_; -#line 146 "/home/jens/Source/shotwell/src/events/Branch.vala" - return result; -#line 1628 "Branch.c" -} - - -static gint events_branch_undated_event_comparator (SidebarEntry* a, SidebarEntry* b) { - gint result = 0; - SidebarEntry* _tmp0_; - SidebarEntry* _tmp1_; - gboolean _tmp2_; - gint ret = 0; - SidebarEntry* _tmp7_; - Event* _tmp8_; - Event* _tmp9_; - gchar* _tmp10_; - gchar* _tmp11_; - SidebarEntry* _tmp12_; - Event* _tmp13_; - Event* _tmp14_; - gchar* _tmp15_; - gchar* _tmp16_; - gint _tmp17_; - gint _tmp18_; - gint _tmp19_; -#line 149 "/home/jens/Source/shotwell/src/events/Branch.vala" - g_return_val_if_fail (SIDEBAR_IS_ENTRY (a), 0); -#line 149 "/home/jens/Source/shotwell/src/events/Branch.vala" - g_return_val_if_fail (SIDEBAR_IS_ENTRY (b), 0); -#line 150 "/home/jens/Source/shotwell/src/events/Branch.vala" - _tmp0_ = a; -#line 150 "/home/jens/Source/shotwell/src/events/Branch.vala" - _tmp1_ = b; -#line 150 "/home/jens/Source/shotwell/src/events/Branch.vala" - if (_tmp0_ == _tmp1_) { -#line 151 "/home/jens/Source/shotwell/src/events/Branch.vala" - result = 0; -#line 151 "/home/jens/Source/shotwell/src/events/Branch.vala" - return result; -#line 1665 "Branch.c" - } -#line 153 "/home/jens/Source/shotwell/src/events/Branch.vala" - _tmp2_ = events_branch_sort_ascending; -#line 153 "/home/jens/Source/shotwell/src/events/Branch.vala" - if (!_tmp2_) { -#line 1671 "Branch.c" - SidebarEntry* swap = NULL; - SidebarEntry* _tmp3_; - SidebarEntry* _tmp4_; - SidebarEntry* _tmp5_; - SidebarEntry* _tmp6_; -#line 154 "/home/jens/Source/shotwell/src/events/Branch.vala" - _tmp3_ = a; -#line 154 "/home/jens/Source/shotwell/src/events/Branch.vala" - _tmp4_ = _g_object_ref0 (_tmp3_); -#line 154 "/home/jens/Source/shotwell/src/events/Branch.vala" - swap = _tmp4_; -#line 155 "/home/jens/Source/shotwell/src/events/Branch.vala" - _tmp5_ = b; -#line 155 "/home/jens/Source/shotwell/src/events/Branch.vala" - a = _tmp5_; -#line 156 "/home/jens/Source/shotwell/src/events/Branch.vala" - _tmp6_ = swap; -#line 156 "/home/jens/Source/shotwell/src/events/Branch.vala" - b = _tmp6_; -#line 153 "/home/jens/Source/shotwell/src/events/Branch.vala" - _g_object_unref0 (swap); -#line 1693 "Branch.c" - } -#line 159 "/home/jens/Source/shotwell/src/events/Branch.vala" - _tmp7_ = a; -#line 159 "/home/jens/Source/shotwell/src/events/Branch.vala" - _tmp8_ = events_event_entry_get_event (G_TYPE_CHECK_INSTANCE_CAST (_tmp7_, EVENTS_TYPE_EVENT_ENTRY, EventsEventEntry)); -#line 159 "/home/jens/Source/shotwell/src/events/Branch.vala" - _tmp9_ = _tmp8_; -#line 159 "/home/jens/Source/shotwell/src/events/Branch.vala" - _tmp10_ = data_object_get_name (G_TYPE_CHECK_INSTANCE_CAST (_tmp9_, TYPE_DATA_OBJECT, DataObject)); -#line 159 "/home/jens/Source/shotwell/src/events/Branch.vala" - _tmp11_ = _tmp10_; -#line 159 "/home/jens/Source/shotwell/src/events/Branch.vala" - _tmp12_ = b; -#line 159 "/home/jens/Source/shotwell/src/events/Branch.vala" - _tmp13_ = events_event_entry_get_event (G_TYPE_CHECK_INSTANCE_CAST (_tmp12_, EVENTS_TYPE_EVENT_ENTRY, EventsEventEntry)); -#line 159 "/home/jens/Source/shotwell/src/events/Branch.vala" - _tmp14_ = _tmp13_; -#line 159 "/home/jens/Source/shotwell/src/events/Branch.vala" - _tmp15_ = data_object_get_name (G_TYPE_CHECK_INSTANCE_CAST (_tmp14_, TYPE_DATA_OBJECT, DataObject)); -#line 159 "/home/jens/Source/shotwell/src/events/Branch.vala" - _tmp16_ = _tmp15_; -#line 159 "/home/jens/Source/shotwell/src/events/Branch.vala" - _tmp17_ = g_utf8_collate (_tmp11_, _tmp16_); -#line 159 "/home/jens/Source/shotwell/src/events/Branch.vala" - _tmp18_ = _tmp17_; -#line 159 "/home/jens/Source/shotwell/src/events/Branch.vala" - _g_free0 (_tmp16_); -#line 159 "/home/jens/Source/shotwell/src/events/Branch.vala" - _g_object_unref0 (_tmp14_); -#line 159 "/home/jens/Source/shotwell/src/events/Branch.vala" - _g_free0 (_tmp11_); -#line 159 "/home/jens/Source/shotwell/src/events/Branch.vala" - _g_object_unref0 (_tmp9_); -#line 159 "/home/jens/Source/shotwell/src/events/Branch.vala" - ret = _tmp18_; -#line 162 "/home/jens/Source/shotwell/src/events/Branch.vala" - _tmp19_ = ret; -#line 162 "/home/jens/Source/shotwell/src/events/Branch.vala" - if (_tmp19_ == 0) { -#line 1733 "Branch.c" - SidebarEntry* _tmp20_; - Event* _tmp21_; - Event* _tmp22_; - gint64 _tmp23_; - SidebarEntry* _tmp24_; - Event* _tmp25_; - Event* _tmp26_; - gint64 _tmp27_; -#line 163 "/home/jens/Source/shotwell/src/events/Branch.vala" - _tmp20_ = b; -#line 163 "/home/jens/Source/shotwell/src/events/Branch.vala" - _tmp21_ = events_event_entry_get_event (G_TYPE_CHECK_INSTANCE_CAST (_tmp20_, EVENTS_TYPE_EVENT_ENTRY, EventsEventEntry)); -#line 163 "/home/jens/Source/shotwell/src/events/Branch.vala" - _tmp22_ = _tmp21_; -#line 163 "/home/jens/Source/shotwell/src/events/Branch.vala" - _tmp23_ = data_source_get_instance_id (G_TYPE_CHECK_INSTANCE_CAST (_tmp22_, TYPE_DATA_SOURCE, DataSource)); -#line 163 "/home/jens/Source/shotwell/src/events/Branch.vala" - _tmp24_ = a; -#line 163 "/home/jens/Source/shotwell/src/events/Branch.vala" - _tmp25_ = events_event_entry_get_event (G_TYPE_CHECK_INSTANCE_CAST (_tmp24_, EVENTS_TYPE_EVENT_ENTRY, EventsEventEntry)); -#line 163 "/home/jens/Source/shotwell/src/events/Branch.vala" - _tmp26_ = _tmp25_; -#line 163 "/home/jens/Source/shotwell/src/events/Branch.vala" - _tmp27_ = data_source_get_instance_id (G_TYPE_CHECK_INSTANCE_CAST (_tmp26_, TYPE_DATA_SOURCE, DataSource)); -#line 163 "/home/jens/Source/shotwell/src/events/Branch.vala" - ret = (gint) (_tmp23_ - _tmp27_); -#line 163 "/home/jens/Source/shotwell/src/events/Branch.vala" - _g_object_unref0 (_tmp26_); -#line 163 "/home/jens/Source/shotwell/src/events/Branch.vala" - _g_object_unref0 (_tmp22_); -#line 1764 "Branch.c" - } -#line 166 "/home/jens/Source/shotwell/src/events/Branch.vala" - result = ret; -#line 166 "/home/jens/Source/shotwell/src/events/Branch.vala" - return result; -#line 1770 "Branch.c" -} - - -EventsEventEntry* events_branch_get_entry_for_event (EventsBranch* self, Event* event) { - EventsEventEntry* result = NULL; - GeeHashMap* _tmp0_; - Event* _tmp1_; - gpointer _tmp2_; -#line 169 "/home/jens/Source/shotwell/src/events/Branch.vala" - g_return_val_if_fail (EVENTS_IS_BRANCH (self), NULL); -#line 169 "/home/jens/Source/shotwell/src/events/Branch.vala" - g_return_val_if_fail (IS_EVENT (event), NULL); -#line 170 "/home/jens/Source/shotwell/src/events/Branch.vala" - _tmp0_ = self->priv->entry_map; -#line 170 "/home/jens/Source/shotwell/src/events/Branch.vala" - _tmp1_ = event; -#line 170 "/home/jens/Source/shotwell/src/events/Branch.vala" - _tmp2_ = gee_abstract_map_get (G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, GEE_TYPE_ABSTRACT_MAP, GeeAbstractMap), _tmp1_); -#line 170 "/home/jens/Source/shotwell/src/events/Branch.vala" - result = (EventsEventEntry*) _tmp2_; -#line 170 "/home/jens/Source/shotwell/src/events/Branch.vala" - return result; -#line 1793 "Branch.c" -} - - -static void events_branch_on_config_changed (EventsBranch* self) { - gboolean value = FALSE; - ConfigFacade* _tmp0_; - ConfigFacade* _tmp1_; - gboolean _tmp2_; - gboolean _tmp3_; -#line 173 "/home/jens/Source/shotwell/src/events/Branch.vala" - g_return_if_fail (EVENTS_IS_BRANCH (self)); -#line 174 "/home/jens/Source/shotwell/src/events/Branch.vala" - _tmp0_ = config_facade_get_instance (); -#line 174 "/home/jens/Source/shotwell/src/events/Branch.vala" - _tmp1_ = _tmp0_; -#line 174 "/home/jens/Source/shotwell/src/events/Branch.vala" - _tmp2_ = configuration_facade_get_events_sort_ascending (G_TYPE_CHECK_INSTANCE_CAST (_tmp1_, TYPE_CONFIGURATION_FACADE, ConfigurationFacade)); -#line 174 "/home/jens/Source/shotwell/src/events/Branch.vala" - _tmp3_ = _tmp2_; -#line 174 "/home/jens/Source/shotwell/src/events/Branch.vala" - _g_object_unref0 (_tmp1_); -#line 174 "/home/jens/Source/shotwell/src/events/Branch.vala" - value = _tmp3_; -#line 176 "/home/jens/Source/shotwell/src/events/Branch.vala" - events_branch_sort_ascending = value; -#line 177 "/home/jens/Source/shotwell/src/events/Branch.vala" - sidebar_branch_reorder_all (G_TYPE_CHECK_INSTANCE_CAST (self, SIDEBAR_TYPE_BRANCH, SidebarBranch)); -#line 1821 "Branch.c" -} - - -static void events_branch_on_events_added_removed (EventsBranch* self, GeeIterable* added, GeeIterable* removed) { - GeeIterable* _tmp0_; - GeeIterable* _tmp8_; -#line 180 "/home/jens/Source/shotwell/src/events/Branch.vala" - g_return_if_fail (EVENTS_IS_BRANCH (self)); -#line 180 "/home/jens/Source/shotwell/src/events/Branch.vala" - g_return_if_fail ((added == NULL) || GEE_IS_ITERABLE (added)); -#line 180 "/home/jens/Source/shotwell/src/events/Branch.vala" - g_return_if_fail ((removed == NULL) || GEE_IS_ITERABLE (removed)); -#line 182 "/home/jens/Source/shotwell/src/events/Branch.vala" - _tmp0_ = added; -#line 182 "/home/jens/Source/shotwell/src/events/Branch.vala" - if (_tmp0_ != NULL) { -#line 1838 "Branch.c" - { - GeeIterator* _object_it = NULL; - GeeIterable* _tmp1_; - GeeIterator* _tmp2_; -#line 183 "/home/jens/Source/shotwell/src/events/Branch.vala" - _tmp1_ = added; -#line 183 "/home/jens/Source/shotwell/src/events/Branch.vala" - _tmp2_ = gee_iterable_iterator (_tmp1_); -#line 183 "/home/jens/Source/shotwell/src/events/Branch.vala" - _object_it = _tmp2_; -#line 183 "/home/jens/Source/shotwell/src/events/Branch.vala" - while (TRUE) { -#line 1851 "Branch.c" - GeeIterator* _tmp3_; - gboolean _tmp4_; - DataObject* object = NULL; - GeeIterator* _tmp5_; - gpointer _tmp6_; - DataObject* _tmp7_; -#line 183 "/home/jens/Source/shotwell/src/events/Branch.vala" - _tmp3_ = _object_it; -#line 183 "/home/jens/Source/shotwell/src/events/Branch.vala" - _tmp4_ = gee_iterator_next (_tmp3_); -#line 183 "/home/jens/Source/shotwell/src/events/Branch.vala" - if (!_tmp4_) { -#line 183 "/home/jens/Source/shotwell/src/events/Branch.vala" - break; -#line 1866 "Branch.c" - } -#line 183 "/home/jens/Source/shotwell/src/events/Branch.vala" - _tmp5_ = _object_it; -#line 183 "/home/jens/Source/shotwell/src/events/Branch.vala" - _tmp6_ = gee_iterator_get (_tmp5_); -#line 183 "/home/jens/Source/shotwell/src/events/Branch.vala" - object = (DataObject*) _tmp6_; -#line 184 "/home/jens/Source/shotwell/src/events/Branch.vala" - _tmp7_ = object; -#line 184 "/home/jens/Source/shotwell/src/events/Branch.vala" - events_branch_add_event (self, G_TYPE_CHECK_INSTANCE_CAST (_tmp7_, TYPE_EVENT, Event)); -#line 183 "/home/jens/Source/shotwell/src/events/Branch.vala" - _g_object_unref0 (object); -#line 1880 "Branch.c" - } -#line 183 "/home/jens/Source/shotwell/src/events/Branch.vala" - _g_object_unref0 (_object_it); -#line 1884 "Branch.c" - } - } -#line 187 "/home/jens/Source/shotwell/src/events/Branch.vala" - _tmp8_ = removed; -#line 187 "/home/jens/Source/shotwell/src/events/Branch.vala" - if (_tmp8_ != NULL) { -#line 1891 "Branch.c" - { - GeeIterator* _object_it = NULL; - GeeIterable* _tmp9_; - GeeIterator* _tmp10_; -#line 188 "/home/jens/Source/shotwell/src/events/Branch.vala" - _tmp9_ = removed; -#line 188 "/home/jens/Source/shotwell/src/events/Branch.vala" - _tmp10_ = gee_iterable_iterator (_tmp9_); -#line 188 "/home/jens/Source/shotwell/src/events/Branch.vala" - _object_it = _tmp10_; -#line 188 "/home/jens/Source/shotwell/src/events/Branch.vala" - while (TRUE) { -#line 1904 "Branch.c" - GeeIterator* _tmp11_; - gboolean _tmp12_; - DataObject* object = NULL; - GeeIterator* _tmp13_; - gpointer _tmp14_; - DataObject* _tmp15_; -#line 188 "/home/jens/Source/shotwell/src/events/Branch.vala" - _tmp11_ = _object_it; -#line 188 "/home/jens/Source/shotwell/src/events/Branch.vala" - _tmp12_ = gee_iterator_next (_tmp11_); -#line 188 "/home/jens/Source/shotwell/src/events/Branch.vala" - if (!_tmp12_) { -#line 188 "/home/jens/Source/shotwell/src/events/Branch.vala" - break; -#line 1919 "Branch.c" - } -#line 188 "/home/jens/Source/shotwell/src/events/Branch.vala" - _tmp13_ = _object_it; -#line 188 "/home/jens/Source/shotwell/src/events/Branch.vala" - _tmp14_ = gee_iterator_get (_tmp13_); -#line 188 "/home/jens/Source/shotwell/src/events/Branch.vala" - object = (DataObject*) _tmp14_; -#line 189 "/home/jens/Source/shotwell/src/events/Branch.vala" - _tmp15_ = object; -#line 189 "/home/jens/Source/shotwell/src/events/Branch.vala" - events_branch_remove_event (self, G_TYPE_CHECK_INSTANCE_CAST (_tmp15_, TYPE_EVENT, Event)); -#line 188 "/home/jens/Source/shotwell/src/events/Branch.vala" - _g_object_unref0 (object); -#line 1933 "Branch.c" - } -#line 188 "/home/jens/Source/shotwell/src/events/Branch.vala" - _g_object_unref0 (_object_it); -#line 1937 "Branch.c" - } - } -} - - -static void events_branch_on_events_altered (EventsBranch* self, GeeMap* altered) { -#line 193 "/home/jens/Source/shotwell/src/events/Branch.vala" - g_return_if_fail (EVENTS_IS_BRANCH (self)); -#line 193 "/home/jens/Source/shotwell/src/events/Branch.vala" - g_return_if_fail (GEE_IS_MAP (altered)); -#line 1948 "Branch.c" - { - GeeIterator* _object_it = NULL; - GeeMap* _tmp0_; - GeeSet* _tmp1_; - GeeSet* _tmp2_; - GeeSet* _tmp3_; - GeeIterator* _tmp4_; - GeeIterator* _tmp5_; -#line 194 "/home/jens/Source/shotwell/src/events/Branch.vala" - _tmp0_ = altered; -#line 194 "/home/jens/Source/shotwell/src/events/Branch.vala" - _tmp1_ = gee_map_get_keys (_tmp0_); -#line 194 "/home/jens/Source/shotwell/src/events/Branch.vala" - _tmp2_ = _tmp1_; -#line 194 "/home/jens/Source/shotwell/src/events/Branch.vala" - _tmp3_ = _tmp2_; -#line 194 "/home/jens/Source/shotwell/src/events/Branch.vala" - _tmp4_ = gee_iterable_iterator (G_TYPE_CHECK_INSTANCE_CAST (_tmp3_, GEE_TYPE_ITERABLE, GeeIterable)); -#line 194 "/home/jens/Source/shotwell/src/events/Branch.vala" - _tmp5_ = _tmp4_; -#line 194 "/home/jens/Source/shotwell/src/events/Branch.vala" - _g_object_unref0 (_tmp3_); -#line 194 "/home/jens/Source/shotwell/src/events/Branch.vala" - _object_it = _tmp5_; -#line 194 "/home/jens/Source/shotwell/src/events/Branch.vala" - while (TRUE) { -#line 1975 "Branch.c" - GeeIterator* _tmp6_; - gboolean _tmp7_; - DataObject* object = NULL; - GeeIterator* _tmp8_; - gpointer _tmp9_; - Event* event = NULL; - DataObject* _tmp10_; - Event* _tmp11_; - Alteration* alteration = NULL; - GeeMap* _tmp12_; - DataObject* _tmp13_; - gpointer _tmp14_; - Alteration* _tmp15_; - gboolean _tmp16_; -#line 194 "/home/jens/Source/shotwell/src/events/Branch.vala" - _tmp6_ = _object_it; -#line 194 "/home/jens/Source/shotwell/src/events/Branch.vala" - _tmp7_ = gee_iterator_next (_tmp6_); -#line 194 "/home/jens/Source/shotwell/src/events/Branch.vala" - if (!_tmp7_) { -#line 194 "/home/jens/Source/shotwell/src/events/Branch.vala" - break; -#line 1998 "Branch.c" - } -#line 194 "/home/jens/Source/shotwell/src/events/Branch.vala" - _tmp8_ = _object_it; -#line 194 "/home/jens/Source/shotwell/src/events/Branch.vala" - _tmp9_ = gee_iterator_get (_tmp8_); -#line 194 "/home/jens/Source/shotwell/src/events/Branch.vala" - object = (DataObject*) _tmp9_; -#line 195 "/home/jens/Source/shotwell/src/events/Branch.vala" - _tmp10_ = object; -#line 195 "/home/jens/Source/shotwell/src/events/Branch.vala" - _tmp11_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_CAST (_tmp10_, TYPE_EVENT, Event)); -#line 195 "/home/jens/Source/shotwell/src/events/Branch.vala" - event = _tmp11_; -#line 196 "/home/jens/Source/shotwell/src/events/Branch.vala" - _tmp12_ = altered; -#line 196 "/home/jens/Source/shotwell/src/events/Branch.vala" - _tmp13_ = object; -#line 196 "/home/jens/Source/shotwell/src/events/Branch.vala" - _tmp14_ = gee_map_get (_tmp12_, _tmp13_); -#line 196 "/home/jens/Source/shotwell/src/events/Branch.vala" - alteration = (Alteration*) _tmp14_; -#line 198 "/home/jens/Source/shotwell/src/events/Branch.vala" - _tmp15_ = alteration; -#line 198 "/home/jens/Source/shotwell/src/events/Branch.vala" - _tmp16_ = alteration_has_detail (_tmp15_, "metadata", "time"); -#line 198 "/home/jens/Source/shotwell/src/events/Branch.vala" - if (_tmp16_) { -#line 2026 "Branch.c" - Event* _tmp17_; -#line 201 "/home/jens/Source/shotwell/src/events/Branch.vala" - _tmp17_ = event; -#line 201 "/home/jens/Source/shotwell/src/events/Branch.vala" - events_branch_move_event (self, _tmp17_); -#line 2032 "Branch.c" - } else { - Alteration* _tmp18_; - gboolean _tmp19_; -#line 202 "/home/jens/Source/shotwell/src/events/Branch.vala" - _tmp18_ = alteration; -#line 202 "/home/jens/Source/shotwell/src/events/Branch.vala" - _tmp19_ = alteration_has_detail (_tmp18_, "metadata", "name"); -#line 202 "/home/jens/Source/shotwell/src/events/Branch.vala" - if (_tmp19_) { -#line 2042 "Branch.c" - EventsEventEntry* entry = NULL; - GeeHashMap* _tmp20_; - Event* _tmp21_; - gpointer _tmp22_; - EventsEventEntry* _tmp23_; - EventsEventEntry* _tmp24_; - Event* _tmp25_; - gchar* _tmp26_; - gchar* _tmp27_; - EventsEventEntry* _tmp28_; - Event* _tmp29_; - gchar* _tmp30_; - gchar* _tmp31_; -#line 203 "/home/jens/Source/shotwell/src/events/Branch.vala" - _tmp20_ = self->priv->entry_map; -#line 203 "/home/jens/Source/shotwell/src/events/Branch.vala" - _tmp21_ = event; -#line 203 "/home/jens/Source/shotwell/src/events/Branch.vala" - _tmp22_ = gee_abstract_map_get (G_TYPE_CHECK_INSTANCE_CAST (_tmp20_, GEE_TYPE_ABSTRACT_MAP, GeeAbstractMap), _tmp21_); -#line 203 "/home/jens/Source/shotwell/src/events/Branch.vala" - entry = (EventsEventEntry*) _tmp22_; -#line 204 "/home/jens/Source/shotwell/src/events/Branch.vala" - _tmp23_ = entry; -#line 204 "/home/jens/Source/shotwell/src/events/Branch.vala" - _vala_assert (_tmp23_ != NULL, "entry != null"); -#line 206 "/home/jens/Source/shotwell/src/events/Branch.vala" - _tmp24_ = entry; -#line 206 "/home/jens/Source/shotwell/src/events/Branch.vala" - _tmp25_ = event; -#line 206 "/home/jens/Source/shotwell/src/events/Branch.vala" - _tmp26_ = data_object_get_name (G_TYPE_CHECK_INSTANCE_CAST (_tmp25_, TYPE_DATA_OBJECT, DataObject)); -#line 206 "/home/jens/Source/shotwell/src/events/Branch.vala" - _tmp27_ = _tmp26_; -#line 206 "/home/jens/Source/shotwell/src/events/Branch.vala" - g_signal_emit_by_name (G_TYPE_CHECK_INSTANCE_CAST (_tmp24_, SIDEBAR_TYPE_RENAMEABLE_ENTRY, SidebarRenameableEntry), "sidebar-name-changed", _tmp27_); -#line 206 "/home/jens/Source/shotwell/src/events/Branch.vala" - _g_free0 (_tmp27_); -#line 207 "/home/jens/Source/shotwell/src/events/Branch.vala" - _tmp28_ = entry; -#line 207 "/home/jens/Source/shotwell/src/events/Branch.vala" - _tmp29_ = event; -#line 207 "/home/jens/Source/shotwell/src/events/Branch.vala" - _tmp30_ = data_object_get_name (G_TYPE_CHECK_INSTANCE_CAST (_tmp29_, TYPE_DATA_OBJECT, DataObject)); -#line 207 "/home/jens/Source/shotwell/src/events/Branch.vala" - _tmp31_ = _tmp30_; -#line 207 "/home/jens/Source/shotwell/src/events/Branch.vala" - g_signal_emit_by_name (G_TYPE_CHECK_INSTANCE_CAST (_tmp28_, SIDEBAR_TYPE_ENTRY, SidebarEntry), "sidebar-tooltip-changed", _tmp31_); -#line 207 "/home/jens/Source/shotwell/src/events/Branch.vala" - _g_free0 (_tmp31_); -#line 202 "/home/jens/Source/shotwell/src/events/Branch.vala" - _g_object_unref0 (entry); -#line 2094 "Branch.c" - } - } -#line 194 "/home/jens/Source/shotwell/src/events/Branch.vala" - _alteration_unref0 (alteration); -#line 194 "/home/jens/Source/shotwell/src/events/Branch.vala" - _g_object_unref0 (event); -#line 194 "/home/jens/Source/shotwell/src/events/Branch.vala" - _g_object_unref0 (object); -#line 2103 "Branch.c" - } -#line 194 "/home/jens/Source/shotwell/src/events/Branch.vala" - _g_object_unref0 (_object_it); -#line 2107 "Branch.c" - } -} - - -static void events_branch_on_no_event_collection_altered (EventsBranch* self) { - EventSourceCollection* _tmp0_; - GeeCollection* _tmp1_; - GeeCollection* _tmp2_; - gint _tmp3_; - gint _tmp4_; -#line 212 "/home/jens/Source/shotwell/src/events/Branch.vala" - g_return_if_fail (EVENTS_IS_BRANCH (self)); -#line 213 "/home/jens/Source/shotwell/src/events/Branch.vala" - _tmp0_ = event_global; -#line 213 "/home/jens/Source/shotwell/src/events/Branch.vala" - _tmp1_ = event_source_collection_get_no_event_objects (_tmp0_); -#line 213 "/home/jens/Source/shotwell/src/events/Branch.vala" - _tmp2_ = _tmp1_; -#line 213 "/home/jens/Source/shotwell/src/events/Branch.vala" - _tmp3_ = gee_collection_get_size (_tmp2_); -#line 213 "/home/jens/Source/shotwell/src/events/Branch.vala" - _tmp4_ = _tmp3_; -#line 213 "/home/jens/Source/shotwell/src/events/Branch.vala" - events_branch_show_no_events (self, _tmp4_ > 0); -#line 213 "/home/jens/Source/shotwell/src/events/Branch.vala" - _g_object_unref0 (_tmp2_); -#line 2134 "Branch.c" -} - - -static void g_time_local (time_t time, struct tm* result) { - struct tm _result_ = {0}; - struct tm _tmp0_ = {0}; -#line 2846 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - localtime_r (&time, &_tmp0_); -#line 2846 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - _result_ = _tmp0_; -#line 2847 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - *result = _result_; -#line 2847 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - return; -#line 2149 "Branch.c" -} - - -static gint _events_branch_event_comparator_gcompare_func (gconstpointer a, gconstpointer b) { - gint result; - result = events_branch_event_comparator ((SidebarEntry*) a, (SidebarEntry*) b); -#line 229 "/home/jens/Source/shotwell/src/events/Branch.vala" - return result; -#line 2158 "Branch.c" -} - - -static gchar* g_time_format (struct tm *self, const gchar* format) { - gchar* result = NULL; - gchar* buffer = NULL; - gchar* _tmp0_; - gint buffer_length1; - gint _buffer_size_; - gchar* _tmp1_; - gint _tmp1__length1; - const gchar* _tmp2_; - gchar* _tmp3_; - gint _tmp3__length1; - gchar* _tmp4_; -#line 2854 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - g_return_val_if_fail (format != NULL, NULL); -#line 2855 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - _tmp0_ = g_new0 (gchar, 64); -#line 2855 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - buffer = _tmp0_; -#line 2855 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - buffer_length1 = 64; -#line 2855 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - _buffer_size_ = buffer_length1; -#line 2856 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - _tmp1_ = buffer; -#line 2856 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - _tmp1__length1 = buffer_length1; -#line 2856 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - _tmp2_ = format; -#line 2856 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - strftime (_tmp1_, _tmp1__length1, _tmp2_, &(*self)); -#line 2857 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - _tmp3_ = buffer; -#line 2857 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - _tmp3__length1 = buffer_length1; -#line 2857 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - _tmp4_ = g_strdup ((const gchar*) _tmp3_); -#line 2857 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - result = _tmp4_; -#line 2857 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - buffer = (g_free (buffer), NULL); -#line 2857 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - return result; -#line 2204 "Branch.c" -} - - -static gint _events_branch_event_month_comparator_gcompare_func (gconstpointer a, gconstpointer b) { - gint result; - result = events_branch_event_month_comparator ((SidebarEntry*) a, (SidebarEntry*) b); -#line 237 "/home/jens/Source/shotwell/src/events/Branch.vala" - return result; -#line 2213 "Branch.c" -} - - -static void events_branch_add_event (EventsBranch* self, Event* event) { - time_t event_time = 0; - Event* _tmp0_; - time_t _tmp1_; - time_t _tmp2_; - struct tm event_tm = {0}; - time_t _tmp4_; - struct tm _tmp5_ = {0}; - SidebarEntry* year = NULL; - SidebarEntry* month = NULL; - Event* _tmp6_; - struct tm _tmp7_; - SidebarEntry* _tmp8_ = NULL; - SidebarEntry* _tmp9_; - SidebarEntry* _tmp10_; - SidebarEntry* _tmp13_; - gchar* _tmp21_; - gchar* _tmp22_; - struct tm _tmp23_; - EventsMonthDirectoryEntry* _tmp24_; - SidebarEntry* _tmp25_; - SidebarEntry* _tmp26_; - SidebarEntry* _tmp27_; - Event* _tmp28_; -#line 216 "/home/jens/Source/shotwell/src/events/Branch.vala" - g_return_if_fail (EVENTS_IS_BRANCH (self)); -#line 216 "/home/jens/Source/shotwell/src/events/Branch.vala" - g_return_if_fail (IS_EVENT (event)); -#line 217 "/home/jens/Source/shotwell/src/events/Branch.vala" - _tmp0_ = event; -#line 217 "/home/jens/Source/shotwell/src/events/Branch.vala" - _tmp1_ = event_source_get_start_time (G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, TYPE_EVENT_SOURCE, EventSource)); -#line 217 "/home/jens/Source/shotwell/src/events/Branch.vala" - event_time = _tmp1_; -#line 218 "/home/jens/Source/shotwell/src/events/Branch.vala" - _tmp2_ = event_time; -#line 218 "/home/jens/Source/shotwell/src/events/Branch.vala" - if (_tmp2_ == ((time_t) 0)) { -#line 2255 "Branch.c" - Event* _tmp3_; -#line 219 "/home/jens/Source/shotwell/src/events/Branch.vala" - _tmp3_ = event; -#line 219 "/home/jens/Source/shotwell/src/events/Branch.vala" - events_branch_add_undated_event (self, _tmp3_); -#line 221 "/home/jens/Source/shotwell/src/events/Branch.vala" - return; -#line 2263 "Branch.c" - } -#line 224 "/home/jens/Source/shotwell/src/events/Branch.vala" - _tmp4_ = event_time; -#line 224 "/home/jens/Source/shotwell/src/events/Branch.vala" - g_time_local (_tmp4_, &_tmp5_); -#line 224 "/home/jens/Source/shotwell/src/events/Branch.vala" - event_tm = _tmp5_; -#line 227 "/home/jens/Source/shotwell/src/events/Branch.vala" - _tmp6_ = event; -#line 227 "/home/jens/Source/shotwell/src/events/Branch.vala" - _tmp7_ = event_tm; -#line 227 "/home/jens/Source/shotwell/src/events/Branch.vala" - _tmp9_ = events_branch_find_event_month (self, _tmp6_, &_tmp7_, &_tmp8_); -#line 227 "/home/jens/Source/shotwell/src/events/Branch.vala" - _g_object_unref0 (year); -#line 227 "/home/jens/Source/shotwell/src/events/Branch.vala" - year = _tmp8_; -#line 227 "/home/jens/Source/shotwell/src/events/Branch.vala" - month = _tmp9_; -#line 228 "/home/jens/Source/shotwell/src/events/Branch.vala" - _tmp10_ = month; -#line 228 "/home/jens/Source/shotwell/src/events/Branch.vala" - if (_tmp10_ != NULL) { -#line 2287 "Branch.c" - SidebarEntry* _tmp11_; - Event* _tmp12_; -#line 229 "/home/jens/Source/shotwell/src/events/Branch.vala" - _tmp11_ = month; -#line 229 "/home/jens/Source/shotwell/src/events/Branch.vala" - _tmp12_ = event; -#line 229 "/home/jens/Source/shotwell/src/events/Branch.vala" - events_branch_graft_event (self, _tmp11_, _tmp12_, _events_branch_event_comparator_gcompare_func); -#line 231 "/home/jens/Source/shotwell/src/events/Branch.vala" - _g_object_unref0 (month); -#line 231 "/home/jens/Source/shotwell/src/events/Branch.vala" - _g_object_unref0 (year); -#line 231 "/home/jens/Source/shotwell/src/events/Branch.vala" - return; -#line 2302 "Branch.c" - } -#line 234 "/home/jens/Source/shotwell/src/events/Branch.vala" - _tmp13_ = year; -#line 234 "/home/jens/Source/shotwell/src/events/Branch.vala" - if (_tmp13_ == NULL) { -#line 2308 "Branch.c" - gchar* _tmp14_; - gchar* _tmp15_; - struct tm _tmp16_; - EventsYearDirectoryEntry* _tmp17_; - SidebarEntry* _tmp18_; - SidebarEntry* _tmp19_; - SidebarEntry* _tmp20_; -#line 235 "/home/jens/Source/shotwell/src/events/Branch.vala" - _tmp14_ = g_time_format (&event_tm, SUB_EVENTS_DIRECTORY_PAGE_YEAR_FORMAT); -#line 235 "/home/jens/Source/shotwell/src/events/Branch.vala" - _tmp15_ = _tmp14_; -#line 235 "/home/jens/Source/shotwell/src/events/Branch.vala" - _tmp16_ = event_tm; -#line 235 "/home/jens/Source/shotwell/src/events/Branch.vala" - _tmp17_ = events_year_directory_entry_new (_tmp15_, &_tmp16_); -#line 235 "/home/jens/Source/shotwell/src/events/Branch.vala" - _g_object_unref0 (year); -#line 235 "/home/jens/Source/shotwell/src/events/Branch.vala" - year = G_TYPE_CHECK_INSTANCE_CAST (_tmp17_, SIDEBAR_TYPE_ENTRY, SidebarEntry); -#line 235 "/home/jens/Source/shotwell/src/events/Branch.vala" - _g_free0 (_tmp15_); -#line 237 "/home/jens/Source/shotwell/src/events/Branch.vala" - _tmp18_ = sidebar_branch_get_root (G_TYPE_CHECK_INSTANCE_CAST (self, SIDEBAR_TYPE_BRANCH, SidebarBranch)); -#line 237 "/home/jens/Source/shotwell/src/events/Branch.vala" - _tmp19_ = _tmp18_; -#line 237 "/home/jens/Source/shotwell/src/events/Branch.vala" - _tmp20_ = year; -#line 237 "/home/jens/Source/shotwell/src/events/Branch.vala" - sidebar_branch_graft (G_TYPE_CHECK_INSTANCE_CAST (self, SIDEBAR_TYPE_BRANCH, SidebarBranch), _tmp19_, _tmp20_, _events_branch_event_month_comparator_gcompare_func); -#line 237 "/home/jens/Source/shotwell/src/events/Branch.vala" - _g_object_unref0 (_tmp19_); -#line 2340 "Branch.c" - } -#line 240 "/home/jens/Source/shotwell/src/events/Branch.vala" - _tmp21_ = g_time_format (&event_tm, SUB_EVENTS_DIRECTORY_PAGE_MONTH_FORMAT); -#line 240 "/home/jens/Source/shotwell/src/events/Branch.vala" - _tmp22_ = _tmp21_; -#line 240 "/home/jens/Source/shotwell/src/events/Branch.vala" - _tmp23_ = event_tm; -#line 240 "/home/jens/Source/shotwell/src/events/Branch.vala" - _tmp24_ = events_month_directory_entry_new (_tmp22_, &_tmp23_); -#line 240 "/home/jens/Source/shotwell/src/events/Branch.vala" - _g_object_unref0 (month); -#line 240 "/home/jens/Source/shotwell/src/events/Branch.vala" - month = G_TYPE_CHECK_INSTANCE_CAST (_tmp24_, SIDEBAR_TYPE_ENTRY, SidebarEntry); -#line 240 "/home/jens/Source/shotwell/src/events/Branch.vala" - _g_free0 (_tmp22_); -#line 242 "/home/jens/Source/shotwell/src/events/Branch.vala" - _tmp25_ = year; -#line 242 "/home/jens/Source/shotwell/src/events/Branch.vala" - _tmp26_ = month; -#line 242 "/home/jens/Source/shotwell/src/events/Branch.vala" - sidebar_branch_graft (G_TYPE_CHECK_INSTANCE_CAST (self, SIDEBAR_TYPE_BRANCH, SidebarBranch), _tmp25_, _tmp26_, _events_branch_event_comparator_gcompare_func); -#line 244 "/home/jens/Source/shotwell/src/events/Branch.vala" - _tmp27_ = month; -#line 244 "/home/jens/Source/shotwell/src/events/Branch.vala" - _tmp28_ = event; -#line 244 "/home/jens/Source/shotwell/src/events/Branch.vala" - events_branch_graft_event (self, _tmp27_, _tmp28_, _events_branch_event_comparator_gcompare_func); -#line 216 "/home/jens/Source/shotwell/src/events/Branch.vala" - _g_object_unref0 (month); -#line 216 "/home/jens/Source/shotwell/src/events/Branch.vala" - _g_object_unref0 (year); -#line 2372 "Branch.c" -} - - -static void events_branch_move_event (EventsBranch* self, Event* event) { - time_t event_time = 0; - Event* _tmp0_; - time_t _tmp1_; - time_t _tmp2_; - struct tm event_tm = {0}; - time_t _tmp4_; - struct tm _tmp5_ = {0}; - SidebarEntry* year = NULL; - SidebarEntry* month = NULL; - Event* _tmp6_; - struct tm _tmp7_; - SidebarEntry* _tmp8_ = NULL; - SidebarEntry* _tmp9_; - SidebarEntry* _tmp10_; - SidebarEntry* _tmp18_; - Event* _tmp25_; - SidebarEntry* _tmp26_; -#line 247 "/home/jens/Source/shotwell/src/events/Branch.vala" - g_return_if_fail (EVENTS_IS_BRANCH (self)); -#line 247 "/home/jens/Source/shotwell/src/events/Branch.vala" - g_return_if_fail (IS_EVENT (event)); -#line 248 "/home/jens/Source/shotwell/src/events/Branch.vala" - _tmp0_ = event; -#line 248 "/home/jens/Source/shotwell/src/events/Branch.vala" - _tmp1_ = event_source_get_start_time (G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, TYPE_EVENT_SOURCE, EventSource)); -#line 248 "/home/jens/Source/shotwell/src/events/Branch.vala" - event_time = _tmp1_; -#line 249 "/home/jens/Source/shotwell/src/events/Branch.vala" - _tmp2_ = event_time; -#line 249 "/home/jens/Source/shotwell/src/events/Branch.vala" - if (_tmp2_ == ((time_t) 0)) { -#line 2408 "Branch.c" - Event* _tmp3_; -#line 250 "/home/jens/Source/shotwell/src/events/Branch.vala" - _tmp3_ = event; -#line 250 "/home/jens/Source/shotwell/src/events/Branch.vala" - events_branch_move_to_undated_event (self, _tmp3_); -#line 252 "/home/jens/Source/shotwell/src/events/Branch.vala" - return; -#line 2416 "Branch.c" - } -#line 255 "/home/jens/Source/shotwell/src/events/Branch.vala" - _tmp4_ = event_time; -#line 255 "/home/jens/Source/shotwell/src/events/Branch.vala" - g_time_local (_tmp4_, &_tmp5_); -#line 255 "/home/jens/Source/shotwell/src/events/Branch.vala" - event_tm = _tmp5_; -#line 258 "/home/jens/Source/shotwell/src/events/Branch.vala" - _tmp6_ = event; -#line 258 "/home/jens/Source/shotwell/src/events/Branch.vala" - _tmp7_ = event_tm; -#line 258 "/home/jens/Source/shotwell/src/events/Branch.vala" - _tmp9_ = events_branch_find_event_month (self, _tmp6_, &_tmp7_, &_tmp8_); -#line 258 "/home/jens/Source/shotwell/src/events/Branch.vala" - _g_object_unref0 (year); -#line 258 "/home/jens/Source/shotwell/src/events/Branch.vala" - year = _tmp8_; -#line 258 "/home/jens/Source/shotwell/src/events/Branch.vala" - month = _tmp9_; -#line 260 "/home/jens/Source/shotwell/src/events/Branch.vala" - _tmp10_ = year; -#line 260 "/home/jens/Source/shotwell/src/events/Branch.vala" - if (_tmp10_ == NULL) { -#line 2440 "Branch.c" - gchar* _tmp11_; - gchar* _tmp12_; - struct tm _tmp13_; - EventsYearDirectoryEntry* _tmp14_; - SidebarEntry* _tmp15_; - SidebarEntry* _tmp16_; - SidebarEntry* _tmp17_; -#line 261 "/home/jens/Source/shotwell/src/events/Branch.vala" - _tmp11_ = g_time_format (&event_tm, SUB_EVENTS_DIRECTORY_PAGE_YEAR_FORMAT); -#line 261 "/home/jens/Source/shotwell/src/events/Branch.vala" - _tmp12_ = _tmp11_; -#line 261 "/home/jens/Source/shotwell/src/events/Branch.vala" - _tmp13_ = event_tm; -#line 261 "/home/jens/Source/shotwell/src/events/Branch.vala" - _tmp14_ = events_year_directory_entry_new (_tmp12_, &_tmp13_); -#line 261 "/home/jens/Source/shotwell/src/events/Branch.vala" - _g_object_unref0 (year); -#line 261 "/home/jens/Source/shotwell/src/events/Branch.vala" - year = G_TYPE_CHECK_INSTANCE_CAST (_tmp14_, SIDEBAR_TYPE_ENTRY, SidebarEntry); -#line 261 "/home/jens/Source/shotwell/src/events/Branch.vala" - _g_free0 (_tmp12_); -#line 263 "/home/jens/Source/shotwell/src/events/Branch.vala" - _tmp15_ = sidebar_branch_get_root (G_TYPE_CHECK_INSTANCE_CAST (self, SIDEBAR_TYPE_BRANCH, SidebarBranch)); -#line 263 "/home/jens/Source/shotwell/src/events/Branch.vala" - _tmp16_ = _tmp15_; -#line 263 "/home/jens/Source/shotwell/src/events/Branch.vala" - _tmp17_ = year; -#line 263 "/home/jens/Source/shotwell/src/events/Branch.vala" - sidebar_branch_graft (G_TYPE_CHECK_INSTANCE_CAST (self, SIDEBAR_TYPE_BRANCH, SidebarBranch), _tmp16_, _tmp17_, _events_branch_event_month_comparator_gcompare_func); -#line 263 "/home/jens/Source/shotwell/src/events/Branch.vala" - _g_object_unref0 (_tmp16_); -#line 2472 "Branch.c" - } -#line 266 "/home/jens/Source/shotwell/src/events/Branch.vala" - _tmp18_ = month; -#line 266 "/home/jens/Source/shotwell/src/events/Branch.vala" - if (_tmp18_ == NULL) { -#line 2478 "Branch.c" - gchar* _tmp19_; - gchar* _tmp20_; - struct tm _tmp21_; - EventsMonthDirectoryEntry* _tmp22_; - SidebarEntry* _tmp23_; - SidebarEntry* _tmp24_; -#line 267 "/home/jens/Source/shotwell/src/events/Branch.vala" - _tmp19_ = g_time_format (&event_tm, SUB_EVENTS_DIRECTORY_PAGE_MONTH_FORMAT); -#line 267 "/home/jens/Source/shotwell/src/events/Branch.vala" - _tmp20_ = _tmp19_; -#line 267 "/home/jens/Source/shotwell/src/events/Branch.vala" - _tmp21_ = event_tm; -#line 267 "/home/jens/Source/shotwell/src/events/Branch.vala" - _tmp22_ = events_month_directory_entry_new (_tmp20_, &_tmp21_); -#line 267 "/home/jens/Source/shotwell/src/events/Branch.vala" - _g_object_unref0 (month); -#line 267 "/home/jens/Source/shotwell/src/events/Branch.vala" - month = G_TYPE_CHECK_INSTANCE_CAST (_tmp22_, SIDEBAR_TYPE_ENTRY, SidebarEntry); -#line 267 "/home/jens/Source/shotwell/src/events/Branch.vala" - _g_free0 (_tmp20_); -#line 269 "/home/jens/Source/shotwell/src/events/Branch.vala" - _tmp23_ = year; -#line 269 "/home/jens/Source/shotwell/src/events/Branch.vala" - _tmp24_ = month; -#line 269 "/home/jens/Source/shotwell/src/events/Branch.vala" - sidebar_branch_graft (G_TYPE_CHECK_INSTANCE_CAST (self, SIDEBAR_TYPE_BRANCH, SidebarBranch), _tmp23_, _tmp24_, _events_branch_event_comparator_gcompare_func); -#line 2505 "Branch.c" - } -#line 272 "/home/jens/Source/shotwell/src/events/Branch.vala" - _tmp25_ = event; -#line 272 "/home/jens/Source/shotwell/src/events/Branch.vala" - _tmp26_ = month; -#line 272 "/home/jens/Source/shotwell/src/events/Branch.vala" - events_branch_reparent_event (self, _tmp25_, _tmp26_); -#line 247 "/home/jens/Source/shotwell/src/events/Branch.vala" - _g_object_unref0 (month); -#line 247 "/home/jens/Source/shotwell/src/events/Branch.vala" - _g_object_unref0 (year); -#line 2517 "Branch.c" -} - - -static void events_branch_remove_event (EventsBranch* self, Event* event) { - SidebarEntry* entry = NULL; - gboolean removed = FALSE; - GeeHashMap* _tmp0_; - Event* _tmp1_; - gpointer _tmp2_ = NULL; - gboolean _tmp3_; - gboolean _tmp4_; - SidebarEntry* parent = NULL; - SidebarEntry* _tmp5_; - SidebarEntry* _tmp6_; - SidebarEntry* _tmp7_; - SidebarEntry* _tmp8_; -#line 275 "/home/jens/Source/shotwell/src/events/Branch.vala" - g_return_if_fail (EVENTS_IS_BRANCH (self)); -#line 275 "/home/jens/Source/shotwell/src/events/Branch.vala" - g_return_if_fail (IS_EVENT (event)); -#line 279 "/home/jens/Source/shotwell/src/events/Branch.vala" - _tmp0_ = self->priv->entry_map; -#line 279 "/home/jens/Source/shotwell/src/events/Branch.vala" - _tmp1_ = event; -#line 279 "/home/jens/Source/shotwell/src/events/Branch.vala" - _tmp3_ = gee_abstract_map_unset (G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, GEE_TYPE_ABSTRACT_MAP, GeeAbstractMap), _tmp1_, &_tmp2_); -#line 279 "/home/jens/Source/shotwell/src/events/Branch.vala" - _g_object_unref0 (entry); -#line 279 "/home/jens/Source/shotwell/src/events/Branch.vala" - entry = G_TYPE_CHECK_INSTANCE_CAST (_tmp2_, SIDEBAR_TYPE_ENTRY, SidebarEntry); -#line 279 "/home/jens/Source/shotwell/src/events/Branch.vala" - removed = _tmp3_; -#line 280 "/home/jens/Source/shotwell/src/events/Branch.vala" - _tmp4_ = removed; -#line 280 "/home/jens/Source/shotwell/src/events/Branch.vala" - _vala_assert (_tmp4_, "removed"); -#line 282 "/home/jens/Source/shotwell/src/events/Branch.vala" - _tmp5_ = entry; -#line 282 "/home/jens/Source/shotwell/src/events/Branch.vala" - _tmp6_ = sidebar_branch_get_parent (G_TYPE_CHECK_INSTANCE_CAST (self, SIDEBAR_TYPE_BRANCH, SidebarBranch), _tmp5_); -#line 282 "/home/jens/Source/shotwell/src/events/Branch.vala" - parent = _tmp6_; -#line 283 "/home/jens/Source/shotwell/src/events/Branch.vala" - _tmp7_ = parent; -#line 283 "/home/jens/Source/shotwell/src/events/Branch.vala" - _vala_assert (_tmp7_ != NULL, "parent != null"); -#line 285 "/home/jens/Source/shotwell/src/events/Branch.vala" - _tmp8_ = entry; -#line 285 "/home/jens/Source/shotwell/src/events/Branch.vala" - sidebar_branch_prune (G_TYPE_CHECK_INSTANCE_CAST (self, SIDEBAR_TYPE_BRANCH, SidebarBranch), _tmp8_); -#line 288 "/home/jens/Source/shotwell/src/events/Branch.vala" - while (TRUE) { -#line 2570 "Branch.c" - gboolean _tmp9_ = FALSE; - SidebarEntry* _tmp10_; - gint _tmp11_; - SidebarEntry* grandparent = NULL; - SidebarEntry* _tmp15_; - SidebarEntry* _tmp16_; - SidebarEntry* _tmp17_; - SidebarEntry* _tmp18_; - SidebarEntry* _tmp19_; - SidebarEntry* _tmp20_; -#line 288 "/home/jens/Source/shotwell/src/events/Branch.vala" - _tmp10_ = parent; -#line 288 "/home/jens/Source/shotwell/src/events/Branch.vala" - _tmp11_ = sidebar_branch_get_child_count (G_TYPE_CHECK_INSTANCE_CAST (self, SIDEBAR_TYPE_BRANCH, SidebarBranch), _tmp10_); -#line 288 "/home/jens/Source/shotwell/src/events/Branch.vala" - if (_tmp11_ == 0) { -#line 2587 "Branch.c" - SidebarEntry* _tmp12_; - SidebarEntry* _tmp13_; - SidebarEntry* _tmp14_; -#line 288 "/home/jens/Source/shotwell/src/events/Branch.vala" - _tmp12_ = parent; -#line 288 "/home/jens/Source/shotwell/src/events/Branch.vala" - _tmp13_ = sidebar_branch_get_root (G_TYPE_CHECK_INSTANCE_CAST (self, SIDEBAR_TYPE_BRANCH, SidebarBranch)); -#line 288 "/home/jens/Source/shotwell/src/events/Branch.vala" - _tmp14_ = _tmp13_; -#line 288 "/home/jens/Source/shotwell/src/events/Branch.vala" - _tmp9_ = _tmp12_ != _tmp14_; -#line 288 "/home/jens/Source/shotwell/src/events/Branch.vala" - _g_object_unref0 (_tmp14_); -#line 2601 "Branch.c" - } else { -#line 288 "/home/jens/Source/shotwell/src/events/Branch.vala" - _tmp9_ = FALSE; -#line 2605 "Branch.c" - } -#line 288 "/home/jens/Source/shotwell/src/events/Branch.vala" - if (!_tmp9_) { -#line 288 "/home/jens/Source/shotwell/src/events/Branch.vala" - break; -#line 2611 "Branch.c" - } -#line 289 "/home/jens/Source/shotwell/src/events/Branch.vala" - _tmp15_ = parent; -#line 289 "/home/jens/Source/shotwell/src/events/Branch.vala" - _tmp16_ = sidebar_branch_get_parent (G_TYPE_CHECK_INSTANCE_CAST (self, SIDEBAR_TYPE_BRANCH, SidebarBranch), _tmp15_); -#line 289 "/home/jens/Source/shotwell/src/events/Branch.vala" - grandparent = _tmp16_; -#line 290 "/home/jens/Source/shotwell/src/events/Branch.vala" - _tmp17_ = grandparent; -#line 290 "/home/jens/Source/shotwell/src/events/Branch.vala" - _vala_assert (_tmp17_ != NULL, "grandparent != null"); -#line 292 "/home/jens/Source/shotwell/src/events/Branch.vala" - _tmp18_ = parent; -#line 292 "/home/jens/Source/shotwell/src/events/Branch.vala" - sidebar_branch_prune (G_TYPE_CHECK_INSTANCE_CAST (self, SIDEBAR_TYPE_BRANCH, SidebarBranch), _tmp18_); -#line 294 "/home/jens/Source/shotwell/src/events/Branch.vala" - _tmp19_ = grandparent; -#line 294 "/home/jens/Source/shotwell/src/events/Branch.vala" - _tmp20_ = _g_object_ref0 (_tmp19_); -#line 294 "/home/jens/Source/shotwell/src/events/Branch.vala" - _g_object_unref0 (parent); -#line 294 "/home/jens/Source/shotwell/src/events/Branch.vala" - parent = _tmp20_; -#line 288 "/home/jens/Source/shotwell/src/events/Branch.vala" - _g_object_unref0 (grandparent); -#line 2637 "Branch.c" - } -#line 275 "/home/jens/Source/shotwell/src/events/Branch.vala" - _g_object_unref0 (parent); -#line 275 "/home/jens/Source/shotwell/src/events/Branch.vala" - _g_object_unref0 (entry); -#line 2643 "Branch.c" -} - - -static Block8Data* block8_data_ref (Block8Data* _data8_) { -#line 298 "/home/jens/Source/shotwell/src/events/Branch.vala" - g_atomic_int_inc (&_data8_->_ref_count_); -#line 298 "/home/jens/Source/shotwell/src/events/Branch.vala" - return _data8_; -#line 2652 "Branch.c" -} - - -static void block8_data_unref (void * _userdata_) { - Block8Data* _data8_; - _data8_ = (Block8Data*) _userdata_; -#line 298 "/home/jens/Source/shotwell/src/events/Branch.vala" - if (g_atomic_int_dec_and_test (&_data8_->_ref_count_)) { -#line 2661 "Branch.c" - EventsBranch* self; -#line 298 "/home/jens/Source/shotwell/src/events/Branch.vala" - self = _data8_->self; -#line 298 "/home/jens/Source/shotwell/src/events/Branch.vala" - _g_object_unref0 (self); -#line 298 "/home/jens/Source/shotwell/src/events/Branch.vala" - g_slice_free (Block8Data, _data8_); -#line 2669 "Branch.c" - } -} - - -static gboolean __lambda19_ (Block8Data* _data8_, SidebarEntry* entry) { - EventsBranch* self; - gboolean result = FALSE; - SidebarEntry* _tmp0_; - gint _tmp1_; - gint _tmp2_; -#line 307 "/home/jens/Source/shotwell/src/events/Branch.vala" - self = _data8_->self; -#line 307 "/home/jens/Source/shotwell/src/events/Branch.vala" - g_return_val_if_fail (SIDEBAR_IS_ENTRY (entry), FALSE); -#line 308 "/home/jens/Source/shotwell/src/events/Branch.vala" - _tmp0_ = entry; -#line 308 "/home/jens/Source/shotwell/src/events/Branch.vala" - _tmp1_ = events_month_directory_entry_get_month (G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, EVENTS_TYPE_MONTH_DIRECTORY_ENTRY, EventsMonthDirectoryEntry)); -#line 308 "/home/jens/Source/shotwell/src/events/Branch.vala" - _tmp2_ = _data8_->event_month; -#line 308 "/home/jens/Source/shotwell/src/events/Branch.vala" - result = _tmp1_ == _tmp2_; -#line 308 "/home/jens/Source/shotwell/src/events/Branch.vala" - return result; -#line 2694 "Branch.c" -} - - -static gboolean ___lambda19__locator (gconstpointer item, gpointer self) { - gboolean result; - result = __lambda19_ (self, (SidebarEntry*) item); -#line 307 "/home/jens/Source/shotwell/src/events/Branch.vala" - return result; -#line 2703 "Branch.c" -} - - -static SidebarEntry* events_branch_find_event_month (EventsBranch* self, Event* event, struct tm* event_tm, SidebarEntry* * found_year) { - SidebarEntry* _vala_found_year = NULL; - SidebarEntry* result = NULL; - Block8Data* _data8_; - Event* _tmp0_; - struct tm _tmp1_; - SidebarEntry* _tmp2_; - SidebarEntry* _tmp3_; - struct tm _tmp4_; - gint _tmp5_; - SidebarEntry* _tmp6_; - SidebarEntry* _tmp7_; -#line 298 "/home/jens/Source/shotwell/src/events/Branch.vala" - g_return_val_if_fail (EVENTS_IS_BRANCH (self), NULL); -#line 298 "/home/jens/Source/shotwell/src/events/Branch.vala" - g_return_val_if_fail (IS_EVENT (event), NULL); -#line 298 "/home/jens/Source/shotwell/src/events/Branch.vala" - g_return_val_if_fail (event_tm != NULL, NULL); -#line 298 "/home/jens/Source/shotwell/src/events/Branch.vala" - _data8_ = g_slice_new0 (Block8Data); -#line 298 "/home/jens/Source/shotwell/src/events/Branch.vala" - _data8_->_ref_count_ = 1; -#line 298 "/home/jens/Source/shotwell/src/events/Branch.vala" - _data8_->self = g_object_ref (self); -#line 300 "/home/jens/Source/shotwell/src/events/Branch.vala" - _tmp0_ = event; -#line 300 "/home/jens/Source/shotwell/src/events/Branch.vala" - _tmp1_ = *event_tm; -#line 300 "/home/jens/Source/shotwell/src/events/Branch.vala" - _tmp2_ = events_branch_find_event_year (self, _tmp0_, &_tmp1_); -#line 300 "/home/jens/Source/shotwell/src/events/Branch.vala" - _g_object_unref0 (_vala_found_year); -#line 300 "/home/jens/Source/shotwell/src/events/Branch.vala" - _vala_found_year = _tmp2_; -#line 301 "/home/jens/Source/shotwell/src/events/Branch.vala" - _tmp3_ = _vala_found_year; -#line 301 "/home/jens/Source/shotwell/src/events/Branch.vala" - if (_tmp3_ == NULL) { -#line 302 "/home/jens/Source/shotwell/src/events/Branch.vala" - result = NULL; -#line 302 "/home/jens/Source/shotwell/src/events/Branch.vala" - block8_data_unref (_data8_); -#line 302 "/home/jens/Source/shotwell/src/events/Branch.vala" - _data8_ = NULL; -#line 302 "/home/jens/Source/shotwell/src/events/Branch.vala" - if (found_year) { -#line 302 "/home/jens/Source/shotwell/src/events/Branch.vala" - *found_year = _vala_found_year; -#line 2755 "Branch.c" - } else { -#line 302 "/home/jens/Source/shotwell/src/events/Branch.vala" - _g_object_unref0 (_vala_found_year); -#line 2759 "Branch.c" - } -#line 302 "/home/jens/Source/shotwell/src/events/Branch.vala" - return result; -#line 2763 "Branch.c" - } -#line 304 "/home/jens/Source/shotwell/src/events/Branch.vala" - _tmp4_ = *event_tm; -#line 304 "/home/jens/Source/shotwell/src/events/Branch.vala" - _tmp5_ = _tmp4_.tm_mon; -#line 304 "/home/jens/Source/shotwell/src/events/Branch.vala" - _data8_->event_month = _tmp5_ + 1; -#line 307 "/home/jens/Source/shotwell/src/events/Branch.vala" - _tmp6_ = _vala_found_year; -#line 307 "/home/jens/Source/shotwell/src/events/Branch.vala" - _tmp7_ = sidebar_branch_find_first_child (G_TYPE_CHECK_INSTANCE_CAST (self, SIDEBAR_TYPE_BRANCH, SidebarBranch), _tmp6_, ___lambda19__locator, _data8_); -#line 307 "/home/jens/Source/shotwell/src/events/Branch.vala" - result = _tmp7_; -#line 307 "/home/jens/Source/shotwell/src/events/Branch.vala" - block8_data_unref (_data8_); -#line 307 "/home/jens/Source/shotwell/src/events/Branch.vala" - _data8_ = NULL; -#line 307 "/home/jens/Source/shotwell/src/events/Branch.vala" - if (found_year) { -#line 307 "/home/jens/Source/shotwell/src/events/Branch.vala" - *found_year = _vala_found_year; -#line 2785 "Branch.c" - } else { -#line 307 "/home/jens/Source/shotwell/src/events/Branch.vala" - _g_object_unref0 (_vala_found_year); -#line 2789 "Branch.c" - } -#line 307 "/home/jens/Source/shotwell/src/events/Branch.vala" - return result; -#line 2793 "Branch.c" -} - - -static Block9Data* block9_data_ref (Block9Data* _data9_) { -#line 312 "/home/jens/Source/shotwell/src/events/Branch.vala" - g_atomic_int_inc (&_data9_->_ref_count_); -#line 312 "/home/jens/Source/shotwell/src/events/Branch.vala" - return _data9_; -#line 2802 "Branch.c" -} - - -static void block9_data_unref (void * _userdata_) { - Block9Data* _data9_; - _data9_ = (Block9Data*) _userdata_; -#line 312 "/home/jens/Source/shotwell/src/events/Branch.vala" - if (g_atomic_int_dec_and_test (&_data9_->_ref_count_)) { -#line 2811 "Branch.c" - EventsBranch* self; -#line 312 "/home/jens/Source/shotwell/src/events/Branch.vala" - self = _data9_->self; -#line 312 "/home/jens/Source/shotwell/src/events/Branch.vala" - _g_object_unref0 (self); -#line 312 "/home/jens/Source/shotwell/src/events/Branch.vala" - g_slice_free (Block9Data, _data9_); -#line 2819 "Branch.c" - } -} - - -static gboolean __lambda18_ (Block9Data* _data9_, SidebarEntry* entry) { - EventsBranch* self; - gboolean result = FALSE; - gboolean _tmp0_ = FALSE; - gboolean _tmp1_ = FALSE; - SidebarEntry* _tmp2_; -#line 315 "/home/jens/Source/shotwell/src/events/Branch.vala" - self = _data9_->self; -#line 315 "/home/jens/Source/shotwell/src/events/Branch.vala" - g_return_val_if_fail (SIDEBAR_IS_ENTRY (entry), FALSE); -#line 316 "/home/jens/Source/shotwell/src/events/Branch.vala" - _tmp2_ = entry; -#line 316 "/home/jens/Source/shotwell/src/events/Branch.vala" - if (G_TYPE_CHECK_INSTANCE_TYPE (_tmp2_, EVENTS_TYPE_UNDATED_DIRECTORY_ENTRY)) { -#line 316 "/home/jens/Source/shotwell/src/events/Branch.vala" - _tmp1_ = TRUE; -#line 2840 "Branch.c" - } else { - SidebarEntry* _tmp3_; -#line 316 "/home/jens/Source/shotwell/src/events/Branch.vala" - _tmp3_ = entry; -#line 316 "/home/jens/Source/shotwell/src/events/Branch.vala" - _tmp1_ = G_TYPE_CHECK_INSTANCE_TYPE (_tmp3_, EVENTS_TYPE_NO_EVENT_ENTRY); -#line 2847 "Branch.c" - } -#line 316 "/home/jens/Source/shotwell/src/events/Branch.vala" - if (_tmp1_) { -#line 316 "/home/jens/Source/shotwell/src/events/Branch.vala" - _tmp0_ = TRUE; -#line 2853 "Branch.c" - } else { - SidebarEntry* _tmp4_; -#line 317 "/home/jens/Source/shotwell/src/events/Branch.vala" - _tmp4_ = entry; -#line 317 "/home/jens/Source/shotwell/src/events/Branch.vala" - _tmp0_ = G_TYPE_CHECK_INSTANCE_TYPE (_tmp4_, EVENTS_TYPE_MASTER_DIRECTORY_ENTRY); -#line 2860 "Branch.c" - } -#line 316 "/home/jens/Source/shotwell/src/events/Branch.vala" - if (_tmp0_) { -#line 318 "/home/jens/Source/shotwell/src/events/Branch.vala" - result = FALSE; -#line 318 "/home/jens/Source/shotwell/src/events/Branch.vala" - return result; -#line 2868 "Branch.c" - } else { - SidebarEntry* _tmp5_; - gint _tmp6_; -#line 320 "/home/jens/Source/shotwell/src/events/Branch.vala" - _tmp5_ = entry; -#line 320 "/home/jens/Source/shotwell/src/events/Branch.vala" - _tmp6_ = events_year_directory_entry_get_year (G_TYPE_CHECK_INSTANCE_CAST (_tmp5_, EVENTS_TYPE_YEAR_DIRECTORY_ENTRY, EventsYearDirectoryEntry)); -#line 320 "/home/jens/Source/shotwell/src/events/Branch.vala" - result = _tmp6_ == _data9_->event_year; -#line 320 "/home/jens/Source/shotwell/src/events/Branch.vala" - return result; -#line 2880 "Branch.c" - } -} - - -static gboolean ___lambda18__locator (gconstpointer item, gpointer self) { - gboolean result; - result = __lambda18_ (self, (SidebarEntry*) item); -#line 315 "/home/jens/Source/shotwell/src/events/Branch.vala" - return result; -#line 2890 "Branch.c" -} - - -static SidebarEntry* events_branch_find_event_year (EventsBranch* self, Event* event, struct tm* event_tm) { - SidebarEntry* result = NULL; - Block9Data* _data9_; - struct tm _tmp0_; - gint _tmp1_; - SidebarEntry* _tmp2_; - SidebarEntry* _tmp3_; - SidebarEntry* _tmp4_; - SidebarEntry* _tmp5_; -#line 312 "/home/jens/Source/shotwell/src/events/Branch.vala" - g_return_val_if_fail (EVENTS_IS_BRANCH (self), NULL); -#line 312 "/home/jens/Source/shotwell/src/events/Branch.vala" - g_return_val_if_fail (IS_EVENT (event), NULL); -#line 312 "/home/jens/Source/shotwell/src/events/Branch.vala" - g_return_val_if_fail (event_tm != NULL, NULL); -#line 312 "/home/jens/Source/shotwell/src/events/Branch.vala" - _data9_ = g_slice_new0 (Block9Data); -#line 312 "/home/jens/Source/shotwell/src/events/Branch.vala" - _data9_->_ref_count_ = 1; -#line 312 "/home/jens/Source/shotwell/src/events/Branch.vala" - _data9_->self = g_object_ref (self); -#line 313 "/home/jens/Source/shotwell/src/events/Branch.vala" - _tmp0_ = *event_tm; -#line 313 "/home/jens/Source/shotwell/src/events/Branch.vala" - _tmp1_ = _tmp0_.tm_year; -#line 313 "/home/jens/Source/shotwell/src/events/Branch.vala" - _data9_->event_year = _tmp1_ + 1900; -#line 315 "/home/jens/Source/shotwell/src/events/Branch.vala" - _tmp2_ = sidebar_branch_get_root (G_TYPE_CHECK_INSTANCE_CAST (self, SIDEBAR_TYPE_BRANCH, SidebarBranch)); -#line 315 "/home/jens/Source/shotwell/src/events/Branch.vala" - _tmp3_ = _tmp2_; -#line 315 "/home/jens/Source/shotwell/src/events/Branch.vala" - _tmp4_ = sidebar_branch_find_first_child (G_TYPE_CHECK_INSTANCE_CAST (self, SIDEBAR_TYPE_BRANCH, SidebarBranch), _tmp3_, ___lambda18__locator, _data9_); -#line 315 "/home/jens/Source/shotwell/src/events/Branch.vala" - _tmp5_ = _tmp4_; -#line 315 "/home/jens/Source/shotwell/src/events/Branch.vala" - _g_object_unref0 (_tmp3_); -#line 315 "/home/jens/Source/shotwell/src/events/Branch.vala" - result = _tmp5_; -#line 315 "/home/jens/Source/shotwell/src/events/Branch.vala" - block9_data_unref (_data9_); -#line 315 "/home/jens/Source/shotwell/src/events/Branch.vala" - _data9_ = NULL; -#line 315 "/home/jens/Source/shotwell/src/events/Branch.vala" - return result; -#line 2939 "Branch.c" -} - - -static gint _events_branch_undated_event_comparator_gcompare_func (gconstpointer a, gconstpointer b) { - gint result; - result = events_branch_undated_event_comparator ((SidebarEntry*) a, (SidebarEntry*) b); -#line 326 "/home/jens/Source/shotwell/src/events/Branch.vala" - return result; -#line 2948 "Branch.c" -} - - -static void events_branch_add_undated_event (EventsBranch* self, Event* event) { - EventsUndatedDirectoryEntry* _tmp0_; - gboolean _tmp1_; - EventsUndatedDirectoryEntry* _tmp5_; - Event* _tmp6_; -#line 324 "/home/jens/Source/shotwell/src/events/Branch.vala" - g_return_if_fail (EVENTS_IS_BRANCH (self)); -#line 324 "/home/jens/Source/shotwell/src/events/Branch.vala" - g_return_if_fail (IS_EVENT (event)); -#line 325 "/home/jens/Source/shotwell/src/events/Branch.vala" - _tmp0_ = self->priv->undated_entry; -#line 325 "/home/jens/Source/shotwell/src/events/Branch.vala" - _tmp1_ = sidebar_branch_has_entry (G_TYPE_CHECK_INSTANCE_CAST (self, SIDEBAR_TYPE_BRANCH, SidebarBranch), G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, SIDEBAR_TYPE_ENTRY, SidebarEntry)); -#line 325 "/home/jens/Source/shotwell/src/events/Branch.vala" - if (!_tmp1_) { -#line 2967 "Branch.c" - SidebarEntry* _tmp2_; - SidebarEntry* _tmp3_; - EventsUndatedDirectoryEntry* _tmp4_; -#line 326 "/home/jens/Source/shotwell/src/events/Branch.vala" - _tmp2_ = sidebar_branch_get_root (G_TYPE_CHECK_INSTANCE_CAST (self, SIDEBAR_TYPE_BRANCH, SidebarBranch)); -#line 326 "/home/jens/Source/shotwell/src/events/Branch.vala" - _tmp3_ = _tmp2_; -#line 326 "/home/jens/Source/shotwell/src/events/Branch.vala" - _tmp4_ = self->priv->undated_entry; -#line 326 "/home/jens/Source/shotwell/src/events/Branch.vala" - sidebar_branch_graft (G_TYPE_CHECK_INSTANCE_CAST (self, SIDEBAR_TYPE_BRANCH, SidebarBranch), _tmp3_, G_TYPE_CHECK_INSTANCE_CAST (_tmp4_, SIDEBAR_TYPE_ENTRY, SidebarEntry), _events_branch_undated_event_comparator_gcompare_func); -#line 326 "/home/jens/Source/shotwell/src/events/Branch.vala" - _g_object_unref0 (_tmp3_); -#line 2981 "Branch.c" - } -#line 328 "/home/jens/Source/shotwell/src/events/Branch.vala" - _tmp5_ = self->priv->undated_entry; -#line 328 "/home/jens/Source/shotwell/src/events/Branch.vala" - _tmp6_ = event; -#line 328 "/home/jens/Source/shotwell/src/events/Branch.vala" - events_branch_graft_event (self, G_TYPE_CHECK_INSTANCE_CAST (_tmp5_, SIDEBAR_TYPE_ENTRY, SidebarEntry), _tmp6_, NULL); -#line 2989 "Branch.c" -} - - -static void events_branch_move_to_undated_event (EventsBranch* self, Event* event) { - EventsUndatedDirectoryEntry* _tmp0_; - gboolean _tmp1_; - Event* _tmp5_; - EventsUndatedDirectoryEntry* _tmp6_; -#line 331 "/home/jens/Source/shotwell/src/events/Branch.vala" - g_return_if_fail (EVENTS_IS_BRANCH (self)); -#line 331 "/home/jens/Source/shotwell/src/events/Branch.vala" - g_return_if_fail (IS_EVENT (event)); -#line 332 "/home/jens/Source/shotwell/src/events/Branch.vala" - _tmp0_ = self->priv->undated_entry; -#line 332 "/home/jens/Source/shotwell/src/events/Branch.vala" - _tmp1_ = sidebar_branch_has_entry (G_TYPE_CHECK_INSTANCE_CAST (self, SIDEBAR_TYPE_BRANCH, SidebarBranch), G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, SIDEBAR_TYPE_ENTRY, SidebarEntry)); -#line 332 "/home/jens/Source/shotwell/src/events/Branch.vala" - if (!_tmp1_) { -#line 3008 "Branch.c" - SidebarEntry* _tmp2_; - SidebarEntry* _tmp3_; - EventsUndatedDirectoryEntry* _tmp4_; -#line 333 "/home/jens/Source/shotwell/src/events/Branch.vala" - _tmp2_ = sidebar_branch_get_root (G_TYPE_CHECK_INSTANCE_CAST (self, SIDEBAR_TYPE_BRANCH, SidebarBranch)); -#line 333 "/home/jens/Source/shotwell/src/events/Branch.vala" - _tmp3_ = _tmp2_; -#line 333 "/home/jens/Source/shotwell/src/events/Branch.vala" - _tmp4_ = self->priv->undated_entry; -#line 333 "/home/jens/Source/shotwell/src/events/Branch.vala" - sidebar_branch_graft (G_TYPE_CHECK_INSTANCE_CAST (self, SIDEBAR_TYPE_BRANCH, SidebarBranch), _tmp3_, G_TYPE_CHECK_INSTANCE_CAST (_tmp4_, SIDEBAR_TYPE_ENTRY, SidebarEntry), NULL); -#line 333 "/home/jens/Source/shotwell/src/events/Branch.vala" - _g_object_unref0 (_tmp3_); -#line 3022 "Branch.c" - } -#line 335 "/home/jens/Source/shotwell/src/events/Branch.vala" - _tmp5_ = event; -#line 335 "/home/jens/Source/shotwell/src/events/Branch.vala" - _tmp6_ = self->priv->undated_entry; -#line 335 "/home/jens/Source/shotwell/src/events/Branch.vala" - events_branch_reparent_event (self, _tmp5_, G_TYPE_CHECK_INSTANCE_CAST (_tmp6_, SIDEBAR_TYPE_ENTRY, SidebarEntry)); -#line 3030 "Branch.c" -} - - -static void events_branch_graft_event (EventsBranch* self, SidebarEntry* parent, Event* event, GCompareFunc comparator) { - EventsEventEntry* entry = NULL; - Event* _tmp0_; - EventsEventEntry* _tmp1_; - GeeHashMap* _tmp2_; - Event* _tmp3_; - SidebarEntry* _tmp4_; - GCompareFunc _tmp5_; -#line 338 "/home/jens/Source/shotwell/src/events/Branch.vala" - g_return_if_fail (EVENTS_IS_BRANCH (self)); -#line 338 "/home/jens/Source/shotwell/src/events/Branch.vala" - g_return_if_fail (SIDEBAR_IS_ENTRY (parent)); -#line 338 "/home/jens/Source/shotwell/src/events/Branch.vala" - g_return_if_fail (IS_EVENT (event)); -#line 340 "/home/jens/Source/shotwell/src/events/Branch.vala" - _tmp0_ = event; -#line 340 "/home/jens/Source/shotwell/src/events/Branch.vala" - _tmp1_ = events_event_entry_new (_tmp0_); -#line 340 "/home/jens/Source/shotwell/src/events/Branch.vala" - entry = _tmp1_; -#line 341 "/home/jens/Source/shotwell/src/events/Branch.vala" - _tmp2_ = self->priv->entry_map; -#line 341 "/home/jens/Source/shotwell/src/events/Branch.vala" - _tmp3_ = event; -#line 341 "/home/jens/Source/shotwell/src/events/Branch.vala" - gee_abstract_map_set (G_TYPE_CHECK_INSTANCE_CAST (_tmp2_, GEE_TYPE_ABSTRACT_MAP, GeeAbstractMap), _tmp3_, entry); -#line 343 "/home/jens/Source/shotwell/src/events/Branch.vala" - _tmp4_ = parent; -#line 343 "/home/jens/Source/shotwell/src/events/Branch.vala" - _tmp5_ = comparator; -#line 343 "/home/jens/Source/shotwell/src/events/Branch.vala" - sidebar_branch_graft (G_TYPE_CHECK_INSTANCE_CAST (self, SIDEBAR_TYPE_BRANCH, SidebarBranch), _tmp4_, G_TYPE_CHECK_INSTANCE_CAST (entry, SIDEBAR_TYPE_ENTRY, SidebarEntry), _tmp5_); -#line 338 "/home/jens/Source/shotwell/src/events/Branch.vala" - _g_object_unref0 (entry); -#line 3068 "Branch.c" -} - - -static void events_branch_reparent_event (EventsBranch* self, Event* event, SidebarEntry* new_parent) { - EventsEventEntry* entry = NULL; - GeeHashMap* _tmp0_; - Event* _tmp1_; - gpointer _tmp2_; - EventsEventEntry* _tmp3_; - SidebarEntry* old_parent = NULL; - EventsEventEntry* _tmp4_; - SidebarEntry* _tmp5_; - SidebarEntry* _tmp6_; - SidebarEntry* _tmp7_; - EventsEventEntry* _tmp8_; -#line 346 "/home/jens/Source/shotwell/src/events/Branch.vala" - g_return_if_fail (EVENTS_IS_BRANCH (self)); -#line 346 "/home/jens/Source/shotwell/src/events/Branch.vala" - g_return_if_fail (IS_EVENT (event)); -#line 346 "/home/jens/Source/shotwell/src/events/Branch.vala" - g_return_if_fail (SIDEBAR_IS_ENTRY (new_parent)); -#line 347 "/home/jens/Source/shotwell/src/events/Branch.vala" - _tmp0_ = self->priv->entry_map; -#line 347 "/home/jens/Source/shotwell/src/events/Branch.vala" - _tmp1_ = event; -#line 347 "/home/jens/Source/shotwell/src/events/Branch.vala" - _tmp2_ = gee_abstract_map_get (G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, GEE_TYPE_ABSTRACT_MAP, GeeAbstractMap), _tmp1_); -#line 347 "/home/jens/Source/shotwell/src/events/Branch.vala" - entry = (EventsEventEntry*) _tmp2_; -#line 348 "/home/jens/Source/shotwell/src/events/Branch.vala" - _tmp3_ = entry; -#line 348 "/home/jens/Source/shotwell/src/events/Branch.vala" - _vala_assert (_tmp3_ != NULL, "entry != null"); -#line 350 "/home/jens/Source/shotwell/src/events/Branch.vala" - _tmp4_ = entry; -#line 350 "/home/jens/Source/shotwell/src/events/Branch.vala" - _tmp5_ = sidebar_branch_get_parent (G_TYPE_CHECK_INSTANCE_CAST (self, SIDEBAR_TYPE_BRANCH, SidebarBranch), G_TYPE_CHECK_INSTANCE_CAST (_tmp4_, SIDEBAR_TYPE_ENTRY, SidebarEntry)); -#line 350 "/home/jens/Source/shotwell/src/events/Branch.vala" - old_parent = _tmp5_; -#line 351 "/home/jens/Source/shotwell/src/events/Branch.vala" - _tmp6_ = old_parent; -#line 351 "/home/jens/Source/shotwell/src/events/Branch.vala" - _vala_assert (_tmp6_ != NULL, "old_parent != null"); -#line 353 "/home/jens/Source/shotwell/src/events/Branch.vala" - _tmp7_ = new_parent; -#line 353 "/home/jens/Source/shotwell/src/events/Branch.vala" - _tmp8_ = entry; -#line 353 "/home/jens/Source/shotwell/src/events/Branch.vala" - sidebar_branch_reparent (G_TYPE_CHECK_INSTANCE_CAST (self, SIDEBAR_TYPE_BRANCH, SidebarBranch), _tmp7_, G_TYPE_CHECK_INSTANCE_CAST (_tmp8_, SIDEBAR_TYPE_ENTRY, SidebarEntry)); -#line 355 "/home/jens/Source/shotwell/src/events/Branch.vala" - while (TRUE) { -#line 3120 "Branch.c" - gboolean _tmp9_ = FALSE; - SidebarEntry* _tmp10_; - gint _tmp11_; - SidebarEntry* grandparent = NULL; - SidebarEntry* _tmp15_; - SidebarEntry* _tmp16_; - SidebarEntry* _tmp17_; - SidebarEntry* _tmp18_; - SidebarEntry* _tmp19_; - SidebarEntry* _tmp20_; -#line 355 "/home/jens/Source/shotwell/src/events/Branch.vala" - _tmp10_ = old_parent; -#line 355 "/home/jens/Source/shotwell/src/events/Branch.vala" - _tmp11_ = sidebar_branch_get_child_count (G_TYPE_CHECK_INSTANCE_CAST (self, SIDEBAR_TYPE_BRANCH, SidebarBranch), _tmp10_); -#line 355 "/home/jens/Source/shotwell/src/events/Branch.vala" - if (_tmp11_ == 0) { -#line 3137 "Branch.c" - SidebarEntry* _tmp12_; - SidebarEntry* _tmp13_; - SidebarEntry* _tmp14_; -#line 355 "/home/jens/Source/shotwell/src/events/Branch.vala" - _tmp12_ = old_parent; -#line 355 "/home/jens/Source/shotwell/src/events/Branch.vala" - _tmp13_ = sidebar_branch_get_root (G_TYPE_CHECK_INSTANCE_CAST (self, SIDEBAR_TYPE_BRANCH, SidebarBranch)); -#line 355 "/home/jens/Source/shotwell/src/events/Branch.vala" - _tmp14_ = _tmp13_; -#line 355 "/home/jens/Source/shotwell/src/events/Branch.vala" - _tmp9_ = _tmp12_ != _tmp14_; -#line 355 "/home/jens/Source/shotwell/src/events/Branch.vala" - _g_object_unref0 (_tmp14_); -#line 3151 "Branch.c" - } else { -#line 355 "/home/jens/Source/shotwell/src/events/Branch.vala" - _tmp9_ = FALSE; -#line 3155 "Branch.c" - } -#line 355 "/home/jens/Source/shotwell/src/events/Branch.vala" - if (!_tmp9_) { -#line 355 "/home/jens/Source/shotwell/src/events/Branch.vala" - break; -#line 3161 "Branch.c" - } -#line 356 "/home/jens/Source/shotwell/src/events/Branch.vala" - _tmp15_ = old_parent; -#line 356 "/home/jens/Source/shotwell/src/events/Branch.vala" - _tmp16_ = sidebar_branch_get_parent (G_TYPE_CHECK_INSTANCE_CAST (self, SIDEBAR_TYPE_BRANCH, SidebarBranch), _tmp15_); -#line 356 "/home/jens/Source/shotwell/src/events/Branch.vala" - grandparent = _tmp16_; -#line 357 "/home/jens/Source/shotwell/src/events/Branch.vala" - _tmp17_ = grandparent; -#line 357 "/home/jens/Source/shotwell/src/events/Branch.vala" - _vala_assert (_tmp17_ != NULL, "grandparent != null"); -#line 359 "/home/jens/Source/shotwell/src/events/Branch.vala" - _tmp18_ = old_parent; -#line 359 "/home/jens/Source/shotwell/src/events/Branch.vala" - sidebar_branch_prune (G_TYPE_CHECK_INSTANCE_CAST (self, SIDEBAR_TYPE_BRANCH, SidebarBranch), _tmp18_); -#line 361 "/home/jens/Source/shotwell/src/events/Branch.vala" - _tmp19_ = grandparent; -#line 361 "/home/jens/Source/shotwell/src/events/Branch.vala" - _tmp20_ = _g_object_ref0 (_tmp19_); -#line 361 "/home/jens/Source/shotwell/src/events/Branch.vala" - _g_object_unref0 (old_parent); -#line 361 "/home/jens/Source/shotwell/src/events/Branch.vala" - old_parent = _tmp20_; -#line 355 "/home/jens/Source/shotwell/src/events/Branch.vala" - _g_object_unref0 (grandparent); -#line 3187 "Branch.c" - } -#line 346 "/home/jens/Source/shotwell/src/events/Branch.vala" - _g_object_unref0 (old_parent); -#line 346 "/home/jens/Source/shotwell/src/events/Branch.vala" - _g_object_unref0 (entry); -#line 3193 "Branch.c" -} - - -static void events_branch_show_no_events (EventsBranch* self, gboolean show) { - gboolean _tmp0_ = FALSE; - gboolean _tmp1_; -#line 365 "/home/jens/Source/shotwell/src/events/Branch.vala" - g_return_if_fail (EVENTS_IS_BRANCH (self)); -#line 366 "/home/jens/Source/shotwell/src/events/Branch.vala" - _tmp1_ = show; -#line 366 "/home/jens/Source/shotwell/src/events/Branch.vala" - if (_tmp1_) { -#line 3206 "Branch.c" - EventsNoEventEntry* _tmp2_; - gboolean _tmp3_; -#line 366 "/home/jens/Source/shotwell/src/events/Branch.vala" - _tmp2_ = self->priv->no_event_entry; -#line 366 "/home/jens/Source/shotwell/src/events/Branch.vala" - _tmp3_ = sidebar_branch_has_entry (G_TYPE_CHECK_INSTANCE_CAST (self, SIDEBAR_TYPE_BRANCH, SidebarBranch), G_TYPE_CHECK_INSTANCE_CAST (_tmp2_, SIDEBAR_TYPE_ENTRY, SidebarEntry)); -#line 366 "/home/jens/Source/shotwell/src/events/Branch.vala" - _tmp0_ = !_tmp3_; -#line 3215 "Branch.c" - } else { -#line 366 "/home/jens/Source/shotwell/src/events/Branch.vala" - _tmp0_ = FALSE; -#line 3219 "Branch.c" - } -#line 366 "/home/jens/Source/shotwell/src/events/Branch.vala" - if (_tmp0_) { -#line 3223 "Branch.c" - SidebarEntry* _tmp4_; - SidebarEntry* _tmp5_; - EventsNoEventEntry* _tmp6_; -#line 367 "/home/jens/Source/shotwell/src/events/Branch.vala" - _tmp4_ = sidebar_branch_get_root (G_TYPE_CHECK_INSTANCE_CAST (self, SIDEBAR_TYPE_BRANCH, SidebarBranch)); -#line 367 "/home/jens/Source/shotwell/src/events/Branch.vala" - _tmp5_ = _tmp4_; -#line 367 "/home/jens/Source/shotwell/src/events/Branch.vala" - _tmp6_ = self->priv->no_event_entry; -#line 367 "/home/jens/Source/shotwell/src/events/Branch.vala" - sidebar_branch_graft (G_TYPE_CHECK_INSTANCE_CAST (self, SIDEBAR_TYPE_BRANCH, SidebarBranch), _tmp5_, G_TYPE_CHECK_INSTANCE_CAST (_tmp6_, SIDEBAR_TYPE_ENTRY, SidebarEntry), NULL); -#line 367 "/home/jens/Source/shotwell/src/events/Branch.vala" - _g_object_unref0 (_tmp5_); -#line 3237 "Branch.c" - } else { - gboolean _tmp7_ = FALSE; - gboolean _tmp8_; -#line 368 "/home/jens/Source/shotwell/src/events/Branch.vala" - _tmp8_ = show; -#line 368 "/home/jens/Source/shotwell/src/events/Branch.vala" - if (!_tmp8_) { -#line 3245 "Branch.c" - EventsNoEventEntry* _tmp9_; - gboolean _tmp10_; -#line 368 "/home/jens/Source/shotwell/src/events/Branch.vala" - _tmp9_ = self->priv->no_event_entry; -#line 368 "/home/jens/Source/shotwell/src/events/Branch.vala" - _tmp10_ = sidebar_branch_has_entry (G_TYPE_CHECK_INSTANCE_CAST (self, SIDEBAR_TYPE_BRANCH, SidebarBranch), G_TYPE_CHECK_INSTANCE_CAST (_tmp9_, SIDEBAR_TYPE_ENTRY, SidebarEntry)); -#line 368 "/home/jens/Source/shotwell/src/events/Branch.vala" - _tmp7_ = _tmp10_; -#line 3254 "Branch.c" - } else { -#line 368 "/home/jens/Source/shotwell/src/events/Branch.vala" - _tmp7_ = FALSE; -#line 3258 "Branch.c" - } -#line 368 "/home/jens/Source/shotwell/src/events/Branch.vala" - if (_tmp7_) { -#line 3262 "Branch.c" - EventsNoEventEntry* _tmp11_; -#line 369 "/home/jens/Source/shotwell/src/events/Branch.vala" - _tmp11_ = self->priv->no_event_entry; -#line 369 "/home/jens/Source/shotwell/src/events/Branch.vala" - sidebar_branch_prune (G_TYPE_CHECK_INSTANCE_CAST (self, SIDEBAR_TYPE_BRANCH, SidebarBranch), G_TYPE_CHECK_INSTANCE_CAST (_tmp11_, SIDEBAR_TYPE_ENTRY, SidebarEntry)); -#line 3268 "Branch.c" - } - } -} - - -static void events_branch_class_init (EventsBranchClass * klass) { - gchar* _tmp0_; - gchar* _tmp1_; - gchar* _tmp2_; - gchar* _tmp3_; -#line 7 "/home/jens/Source/shotwell/src/events/Branch.vala" - events_branch_parent_class = g_type_class_peek_parent (klass); -#line 7 "/home/jens/Source/shotwell/src/events/Branch.vala" - g_type_class_add_private (klass, sizeof (EventsBranchPrivate)); -#line 7 "/home/jens/Source/shotwell/src/events/Branch.vala" - G_OBJECT_CLASS (klass)->finalize = events_branch_finalize; -#line 8 "/home/jens/Source/shotwell/src/events/Branch.vala" - _tmp0_ = g_strdup (RESOURCES_ICON_FOLDER); -#line 8 "/home/jens/Source/shotwell/src/events/Branch.vala" - events_branch_icon = _tmp0_; -#line 9 "/home/jens/Source/shotwell/src/events/Branch.vala" - _tmp1_ = g_strdup (RESOURCES_ICON_EVENTS); -#line 9 "/home/jens/Source/shotwell/src/events/Branch.vala" - events_branch_events_icon = _tmp1_; -#line 10 "/home/jens/Source/shotwell/src/events/Branch.vala" - _tmp2_ = g_strdup (RESOURCES_ICON_ONE_EVENT); -#line 10 "/home/jens/Source/shotwell/src/events/Branch.vala" - events_branch_single_event_icon = _tmp2_; -#line 11 "/home/jens/Source/shotwell/src/events/Branch.vala" - _tmp3_ = g_strdup (RESOURCES_ICON_NO_EVENT); -#line 11 "/home/jens/Source/shotwell/src/events/Branch.vala" - events_branch_no_event_icon = _tmp3_; -#line 3301 "Branch.c" -} - - -static void events_branch_instance_init (EventsBranch * self) { - GeeHashMap* _tmp0_; - EventsUndatedDirectoryEntry* _tmp1_; - EventsNoEventEntry* _tmp2_; - EventsMasterDirectoryEntry* _tmp3_; -#line 7 "/home/jens/Source/shotwell/src/events/Branch.vala" - self->priv = EVENTS_BRANCH_GET_PRIVATE (self); -#line 18 "/home/jens/Source/shotwell/src/events/Branch.vala" - _tmp0_ = gee_hash_map_new (TYPE_EVENT, (GBoxedCopyFunc) g_object_ref, (GDestroyNotify) g_object_unref, EVENTS_TYPE_EVENT_ENTRY, (GBoxedCopyFunc) g_object_ref, (GDestroyNotify) g_object_unref, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL); -#line 18 "/home/jens/Source/shotwell/src/events/Branch.vala" - self->priv->entry_map = _tmp0_; -#line 20 "/home/jens/Source/shotwell/src/events/Branch.vala" - _tmp1_ = events_undated_directory_entry_new (); -#line 20 "/home/jens/Source/shotwell/src/events/Branch.vala" - self->priv->undated_entry = _tmp1_; -#line 21 "/home/jens/Source/shotwell/src/events/Branch.vala" - _tmp2_ = events_no_event_entry_new (); -#line 21 "/home/jens/Source/shotwell/src/events/Branch.vala" - self->priv->no_event_entry = _tmp2_; -#line 22 "/home/jens/Source/shotwell/src/events/Branch.vala" - _tmp3_ = events_master_directory_entry_new (); -#line 22 "/home/jens/Source/shotwell/src/events/Branch.vala" - self->priv->all_events_entry = _tmp3_; -#line 3328 "Branch.c" -} - - -static void events_branch_finalize (GObject * obj) { - EventsBranch * self; - EventSourceCollection* _tmp0_; - guint _tmp1_; - EventSourceCollection* _tmp2_; - guint _tmp3_; - EventSourceCollection* _tmp4_; - guint _tmp5_; - ConfigFacade* _tmp6_; - ConfigFacade* _tmp7_; - guint _tmp8_; -#line 7 "/home/jens/Source/shotwell/src/events/Branch.vala" - self = G_TYPE_CHECK_INSTANCE_CAST (obj, EVENTS_TYPE_BRANCH, EventsBranch); -#line 46 "/home/jens/Source/shotwell/src/events/Branch.vala" - _tmp0_ = event_global; -#line 46 "/home/jens/Source/shotwell/src/events/Branch.vala" - g_signal_parse_name ("contents-altered", TYPE_DATA_COLLECTION, &_tmp1_, NULL, FALSE); -#line 46 "/home/jens/Source/shotwell/src/events/Branch.vala" - g_signal_handlers_disconnect_matched (G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, TYPE_DATA_COLLECTION, DataCollection), G_SIGNAL_MATCH_ID | G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA, _tmp1_, 0, NULL, (GCallback) _events_branch_on_events_added_removed_data_collection_contents_altered, self); -#line 47 "/home/jens/Source/shotwell/src/events/Branch.vala" - _tmp2_ = event_global; -#line 47 "/home/jens/Source/shotwell/src/events/Branch.vala" - g_signal_parse_name ("items-altered", TYPE_DATA_COLLECTION, &_tmp3_, NULL, FALSE); -#line 47 "/home/jens/Source/shotwell/src/events/Branch.vala" - g_signal_handlers_disconnect_matched (G_TYPE_CHECK_INSTANCE_CAST (_tmp2_, TYPE_DATA_COLLECTION, DataCollection), G_SIGNAL_MATCH_ID | G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA, _tmp3_, 0, NULL, (GCallback) _events_branch_on_events_altered_data_collection_items_altered, self); -#line 48 "/home/jens/Source/shotwell/src/events/Branch.vala" - _tmp4_ = event_global; -#line 48 "/home/jens/Source/shotwell/src/events/Branch.vala" - g_signal_parse_name ("no-event-collection-altered", TYPE_EVENT_SOURCE_COLLECTION, &_tmp5_, NULL, FALSE); -#line 48 "/home/jens/Source/shotwell/src/events/Branch.vala" - g_signal_handlers_disconnect_matched (_tmp4_, G_SIGNAL_MATCH_ID | G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA, _tmp5_, 0, NULL, (GCallback) _events_branch_on_no_event_collection_altered_event_source_collection_no_event_collection_altered, self); -#line 50 "/home/jens/Source/shotwell/src/events/Branch.vala" - _tmp6_ = config_facade_get_instance (); -#line 50 "/home/jens/Source/shotwell/src/events/Branch.vala" - _tmp7_ = _tmp6_; -#line 50 "/home/jens/Source/shotwell/src/events/Branch.vala" - g_signal_parse_name ("events-sort-ascending-changed", TYPE_CONFIGURATION_FACADE, &_tmp8_, NULL, FALSE); -#line 50 "/home/jens/Source/shotwell/src/events/Branch.vala" - g_signal_handlers_disconnect_matched (G_TYPE_CHECK_INSTANCE_CAST (_tmp7_, TYPE_CONFIGURATION_FACADE, ConfigurationFacade), G_SIGNAL_MATCH_ID | G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA, _tmp8_, 0, NULL, (GCallback) _events_branch_on_config_changed_configuration_facade_events_sort_ascending_changed, self); -#line 50 "/home/jens/Source/shotwell/src/events/Branch.vala" - _g_object_unref0 (_tmp7_); -#line 18 "/home/jens/Source/shotwell/src/events/Branch.vala" - _g_object_unref0 (self->priv->entry_map); -#line 20 "/home/jens/Source/shotwell/src/events/Branch.vala" - _g_object_unref0 (self->priv->undated_entry); -#line 21 "/home/jens/Source/shotwell/src/events/Branch.vala" - _g_object_unref0 (self->priv->no_event_entry); -#line 22 "/home/jens/Source/shotwell/src/events/Branch.vala" - _g_object_unref0 (self->priv->all_events_entry); -#line 7 "/home/jens/Source/shotwell/src/events/Branch.vala" - G_OBJECT_CLASS (events_branch_parent_class)->finalize (obj); -#line 3383 "Branch.c" -} - - -GType events_branch_get_type (void) { - static volatile gsize events_branch_type_id__volatile = 0; - if (g_once_init_enter (&events_branch_type_id__volatile)) { - static const GTypeInfo g_define_type_info = { sizeof (EventsBranchClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) events_branch_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (EventsBranch), 0, (GInstanceInitFunc) events_branch_instance_init, NULL }; - GType events_branch_type_id; - events_branch_type_id = g_type_register_static (SIDEBAR_TYPE_BRANCH, "EventsBranch", &g_define_type_info, 0); - g_once_init_leave (&events_branch_type_id__volatile, events_branch_type_id); - } - return events_branch_type_id__volatile; -} - - -EventsDirectoryEntry* events_directory_entry_construct (GType object_type) { - EventsDirectoryEntry * self = NULL; -#line 374 "/home/jens/Source/shotwell/src/events/Branch.vala" - self = (EventsDirectoryEntry*) sidebar_simple_page_entry_construct (object_type); -#line 374 "/home/jens/Source/shotwell/src/events/Branch.vala" - return self; -#line 3405 "Branch.c" -} - - -static gchar* events_directory_entry_real_get_sidebar_icon (SidebarSimplePageEntry* base) { - EventsDirectoryEntry * self; - gchar* result = NULL; - const gchar* _tmp0_; - gchar* _tmp1_; -#line 377 "/home/jens/Source/shotwell/src/events/Branch.vala" - self = G_TYPE_CHECK_INSTANCE_CAST (base, EVENTS_TYPE_DIRECTORY_ENTRY, EventsDirectoryEntry); -#line 378 "/home/jens/Source/shotwell/src/events/Branch.vala" - _tmp0_ = events_branch_icon; -#line 378 "/home/jens/Source/shotwell/src/events/Branch.vala" - _tmp1_ = g_strdup (_tmp0_); -#line 378 "/home/jens/Source/shotwell/src/events/Branch.vala" - result = _tmp1_; -#line 378 "/home/jens/Source/shotwell/src/events/Branch.vala" - return result; -#line 3424 "Branch.c" -} - - -static gboolean events_directory_entry_real_expand_on_select (SidebarExpandableEntry* base) { - EventsDirectoryEntry * self; - gboolean result = FALSE; -#line 381 "/home/jens/Source/shotwell/src/events/Branch.vala" - self = G_TYPE_CHECK_INSTANCE_CAST (base, EVENTS_TYPE_DIRECTORY_ENTRY, EventsDirectoryEntry); -#line 382 "/home/jens/Source/shotwell/src/events/Branch.vala" - result = TRUE; -#line 382 "/home/jens/Source/shotwell/src/events/Branch.vala" - return result; -#line 3437 "Branch.c" -} - - -static void events_directory_entry_class_init (EventsDirectoryEntryClass * klass) { -#line 373 "/home/jens/Source/shotwell/src/events/Branch.vala" - events_directory_entry_parent_class = g_type_class_peek_parent (klass); -#line 373 "/home/jens/Source/shotwell/src/events/Branch.vala" - ((SidebarSimplePageEntryClass *) klass)->get_sidebar_icon = (gchar* (*) (SidebarSimplePageEntry *)) events_directory_entry_real_get_sidebar_icon; -#line 3446 "Branch.c" -} - - -static void events_directory_entry_sidebar_expandable_entry_interface_init (SidebarExpandableEntryIface * iface) { -#line 373 "/home/jens/Source/shotwell/src/events/Branch.vala" - events_directory_entry_sidebar_expandable_entry_parent_iface = g_type_interface_peek_parent (iface); -#line 373 "/home/jens/Source/shotwell/src/events/Branch.vala" - iface->expand_on_select = (gboolean (*) (SidebarExpandableEntry *)) events_directory_entry_real_expand_on_select; -#line 3455 "Branch.c" -} - - -static void events_directory_entry_instance_init (EventsDirectoryEntry * self) { -} - - -GType events_directory_entry_get_type (void) { - static volatile gsize events_directory_entry_type_id__volatile = 0; - if (g_once_init_enter (&events_directory_entry_type_id__volatile)) { - static const GTypeInfo g_define_type_info = { sizeof (EventsDirectoryEntryClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) events_directory_entry_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (EventsDirectoryEntry), 0, (GInstanceInitFunc) events_directory_entry_instance_init, NULL }; - static const GInterfaceInfo sidebar_expandable_entry_info = { (GInterfaceInitFunc) events_directory_entry_sidebar_expandable_entry_interface_init, (GInterfaceFinalizeFunc) NULL, NULL}; - GType events_directory_entry_type_id; - events_directory_entry_type_id = g_type_register_static (SIDEBAR_TYPE_SIMPLE_PAGE_ENTRY, "EventsDirectoryEntry", &g_define_type_info, G_TYPE_FLAG_ABSTRACT); - g_type_add_interface_static (events_directory_entry_type_id, SIDEBAR_TYPE_EXPANDABLE_ENTRY, &sidebar_expandable_entry_info); - g_once_init_leave (&events_directory_entry_type_id__volatile, events_directory_entry_type_id); - } - return events_directory_entry_type_id__volatile; -} - - -EventsMasterDirectoryEntry* events_master_directory_entry_construct (GType object_type) { - EventsMasterDirectoryEntry * self = NULL; -#line 387 "/home/jens/Source/shotwell/src/events/Branch.vala" - self = (EventsMasterDirectoryEntry*) events_directory_entry_construct (object_type); -#line 387 "/home/jens/Source/shotwell/src/events/Branch.vala" - return self; -#line 3483 "Branch.c" -} - - -EventsMasterDirectoryEntry* events_master_directory_entry_new (void) { -#line 387 "/home/jens/Source/shotwell/src/events/Branch.vala" - return events_master_directory_entry_construct (EVENTS_TYPE_MASTER_DIRECTORY_ENTRY); -#line 3490 "Branch.c" -} - - -static gchar* events_master_directory_entry_real_get_sidebar_name (SidebarSimplePageEntry* base) { - EventsMasterDirectoryEntry * self; - gchar* result = NULL; - gchar* _tmp0_; -#line 390 "/home/jens/Source/shotwell/src/events/Branch.vala" - self = G_TYPE_CHECK_INSTANCE_CAST (base, EVENTS_TYPE_MASTER_DIRECTORY_ENTRY, EventsMasterDirectoryEntry); -#line 391 "/home/jens/Source/shotwell/src/events/Branch.vala" - _tmp0_ = g_strdup (MASTER_EVENTS_DIRECTORY_PAGE_NAME); -#line 391 "/home/jens/Source/shotwell/src/events/Branch.vala" - result = _tmp0_; -#line 391 "/home/jens/Source/shotwell/src/events/Branch.vala" - return result; -#line 3506 "Branch.c" -} - - -static gchar* events_master_directory_entry_real_get_sidebar_icon (SidebarSimplePageEntry* base) { - EventsMasterDirectoryEntry * self; - gchar* result = NULL; - const gchar* _tmp0_; - gchar* _tmp1_; -#line 394 "/home/jens/Source/shotwell/src/events/Branch.vala" - self = G_TYPE_CHECK_INSTANCE_CAST (base, EVENTS_TYPE_MASTER_DIRECTORY_ENTRY, EventsMasterDirectoryEntry); -#line 395 "/home/jens/Source/shotwell/src/events/Branch.vala" - _tmp0_ = events_branch_events_icon; -#line 395 "/home/jens/Source/shotwell/src/events/Branch.vala" - _tmp1_ = g_strdup (_tmp0_); -#line 395 "/home/jens/Source/shotwell/src/events/Branch.vala" - result = _tmp1_; -#line 395 "/home/jens/Source/shotwell/src/events/Branch.vala" - return result; -#line 3525 "Branch.c" -} - - -static Page* events_master_directory_entry_real_create_page (SidebarSimplePageEntry* base) { - EventsMasterDirectoryEntry * self; - Page* result = NULL; - MasterEventsDirectoryPage* _tmp0_; -#line 398 "/home/jens/Source/shotwell/src/events/Branch.vala" - self = G_TYPE_CHECK_INSTANCE_CAST (base, EVENTS_TYPE_MASTER_DIRECTORY_ENTRY, EventsMasterDirectoryEntry); -#line 399 "/home/jens/Source/shotwell/src/events/Branch.vala" - _tmp0_ = master_events_directory_page_new (); -#line 399 "/home/jens/Source/shotwell/src/events/Branch.vala" - g_object_ref_sink (_tmp0_); -#line 399 "/home/jens/Source/shotwell/src/events/Branch.vala" - result = G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, TYPE_PAGE, Page); -#line 399 "/home/jens/Source/shotwell/src/events/Branch.vala" - return result; -#line 3543 "Branch.c" -} - - -static void events_master_directory_entry_class_init (EventsMasterDirectoryEntryClass * klass) { -#line 386 "/home/jens/Source/shotwell/src/events/Branch.vala" - events_master_directory_entry_parent_class = g_type_class_peek_parent (klass); -#line 386 "/home/jens/Source/shotwell/src/events/Branch.vala" - ((SidebarSimplePageEntryClass *) klass)->get_sidebar_name = (gchar* (*) (SidebarSimplePageEntry *)) events_master_directory_entry_real_get_sidebar_name; -#line 386 "/home/jens/Source/shotwell/src/events/Branch.vala" - ((SidebarSimplePageEntryClass *) klass)->get_sidebar_icon = (gchar* (*) (SidebarSimplePageEntry *)) events_master_directory_entry_real_get_sidebar_icon; -#line 386 "/home/jens/Source/shotwell/src/events/Branch.vala" - ((SidebarSimplePageEntryClass *) klass)->create_page = (Page* (*) (SidebarSimplePageEntry *)) events_master_directory_entry_real_create_page; -#line 3556 "Branch.c" -} - - -static void events_master_directory_entry_instance_init (EventsMasterDirectoryEntry * self) { -} - - -GType events_master_directory_entry_get_type (void) { - static volatile gsize events_master_directory_entry_type_id__volatile = 0; - if (g_once_init_enter (&events_master_directory_entry_type_id__volatile)) { - static const GTypeInfo g_define_type_info = { sizeof (EventsMasterDirectoryEntryClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) events_master_directory_entry_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (EventsMasterDirectoryEntry), 0, (GInstanceInitFunc) events_master_directory_entry_instance_init, NULL }; - GType events_master_directory_entry_type_id; - events_master_directory_entry_type_id = g_type_register_static (EVENTS_TYPE_DIRECTORY_ENTRY, "EventsMasterDirectoryEntry", &g_define_type_info, 0); - g_once_init_leave (&events_master_directory_entry_type_id__volatile, events_master_directory_entry_type_id); - } - return events_master_directory_entry_type_id__volatile; -} - - -EventsYearDirectoryEntry* events_year_directory_entry_construct (GType object_type, const gchar* name, struct tm* tm) { - EventsYearDirectoryEntry * self = NULL; - const gchar* _tmp0_; - gchar* _tmp1_; - struct tm _tmp2_; -#line 407 "/home/jens/Source/shotwell/src/events/Branch.vala" - g_return_val_if_fail (name != NULL, NULL); -#line 407 "/home/jens/Source/shotwell/src/events/Branch.vala" - g_return_val_if_fail (tm != NULL, NULL); -#line 407 "/home/jens/Source/shotwell/src/events/Branch.vala" - self = (EventsYearDirectoryEntry*) events_directory_entry_construct (object_type); -#line 408 "/home/jens/Source/shotwell/src/events/Branch.vala" - _tmp0_ = name; -#line 408 "/home/jens/Source/shotwell/src/events/Branch.vala" - _tmp1_ = g_strdup (_tmp0_); -#line 408 "/home/jens/Source/shotwell/src/events/Branch.vala" - _g_free0 (self->priv->name); -#line 408 "/home/jens/Source/shotwell/src/events/Branch.vala" - self->priv->name = _tmp1_; -#line 409 "/home/jens/Source/shotwell/src/events/Branch.vala" - _tmp2_ = *tm; -#line 409 "/home/jens/Source/shotwell/src/events/Branch.vala" - self->priv->tm = _tmp2_; -#line 407 "/home/jens/Source/shotwell/src/events/Branch.vala" - return self; -#line 3601 "Branch.c" -} - - -EventsYearDirectoryEntry* events_year_directory_entry_new (const gchar* name, struct tm* tm) { -#line 407 "/home/jens/Source/shotwell/src/events/Branch.vala" - return events_year_directory_entry_construct (EVENTS_TYPE_YEAR_DIRECTORY_ENTRY, name, tm); -#line 3608 "Branch.c" -} - - -static gchar* events_year_directory_entry_real_get_sidebar_name (SidebarSimplePageEntry* base) { - EventsYearDirectoryEntry * self; - gchar* result = NULL; - const gchar* _tmp0_; - gchar* _tmp1_; -#line 412 "/home/jens/Source/shotwell/src/events/Branch.vala" - self = G_TYPE_CHECK_INSTANCE_CAST (base, EVENTS_TYPE_YEAR_DIRECTORY_ENTRY, EventsYearDirectoryEntry); -#line 413 "/home/jens/Source/shotwell/src/events/Branch.vala" - _tmp0_ = self->priv->name; -#line 413 "/home/jens/Source/shotwell/src/events/Branch.vala" - _tmp1_ = g_strdup (_tmp0_); -#line 413 "/home/jens/Source/shotwell/src/events/Branch.vala" - result = _tmp1_; -#line 413 "/home/jens/Source/shotwell/src/events/Branch.vala" - return result; -#line 3627 "Branch.c" -} - - -gint events_year_directory_entry_get_year (EventsYearDirectoryEntry* self) { - gint result = 0; - struct tm _tmp0_; - gint _tmp1_; -#line 416 "/home/jens/Source/shotwell/src/events/Branch.vala" - g_return_val_if_fail (EVENTS_IS_YEAR_DIRECTORY_ENTRY (self), 0); -#line 417 "/home/jens/Source/shotwell/src/events/Branch.vala" - _tmp0_ = self->priv->tm; -#line 417 "/home/jens/Source/shotwell/src/events/Branch.vala" - _tmp1_ = _tmp0_.tm_year; -#line 417 "/home/jens/Source/shotwell/src/events/Branch.vala" - result = _tmp1_ + 1900; -#line 417 "/home/jens/Source/shotwell/src/events/Branch.vala" - return result; -#line 3645 "Branch.c" -} - - -static Page* events_year_directory_entry_real_create_page (SidebarSimplePageEntry* base) { - EventsYearDirectoryEntry * self; - Page* result = NULL; - struct tm _tmp0_; - SubEventsDirectoryPage* _tmp1_; -#line 420 "/home/jens/Source/shotwell/src/events/Branch.vala" - self = G_TYPE_CHECK_INSTANCE_CAST (base, EVENTS_TYPE_YEAR_DIRECTORY_ENTRY, EventsYearDirectoryEntry); -#line 421 "/home/jens/Source/shotwell/src/events/Branch.vala" - _tmp0_ = self->priv->tm; -#line 421 "/home/jens/Source/shotwell/src/events/Branch.vala" - _tmp1_ = sub_events_directory_page_new (SUB_EVENTS_DIRECTORY_PAGE_DIRECTORY_TYPE_YEAR, &_tmp0_); -#line 421 "/home/jens/Source/shotwell/src/events/Branch.vala" - g_object_ref_sink (_tmp1_); -#line 421 "/home/jens/Source/shotwell/src/events/Branch.vala" - result = G_TYPE_CHECK_INSTANCE_CAST (_tmp1_, TYPE_PAGE, Page); -#line 421 "/home/jens/Source/shotwell/src/events/Branch.vala" - return result; -#line 3666 "Branch.c" -} - - -static void events_year_directory_entry_class_init (EventsYearDirectoryEntryClass * klass) { -#line 403 "/home/jens/Source/shotwell/src/events/Branch.vala" - events_year_directory_entry_parent_class = g_type_class_peek_parent (klass); -#line 403 "/home/jens/Source/shotwell/src/events/Branch.vala" - g_type_class_add_private (klass, sizeof (EventsYearDirectoryEntryPrivate)); -#line 403 "/home/jens/Source/shotwell/src/events/Branch.vala" - ((SidebarSimplePageEntryClass *) klass)->get_sidebar_name = (gchar* (*) (SidebarSimplePageEntry *)) events_year_directory_entry_real_get_sidebar_name; -#line 403 "/home/jens/Source/shotwell/src/events/Branch.vala" - ((SidebarSimplePageEntryClass *) klass)->create_page = (Page* (*) (SidebarSimplePageEntry *)) events_year_directory_entry_real_create_page; -#line 403 "/home/jens/Source/shotwell/src/events/Branch.vala" - G_OBJECT_CLASS (klass)->finalize = events_year_directory_entry_finalize; -#line 3681 "Branch.c" -} - - -static void events_year_directory_entry_instance_init (EventsYearDirectoryEntry * self) { -#line 403 "/home/jens/Source/shotwell/src/events/Branch.vala" - self->priv = EVENTS_YEAR_DIRECTORY_ENTRY_GET_PRIVATE (self); -#line 3688 "Branch.c" -} - - -static void events_year_directory_entry_finalize (GObject * obj) { - EventsYearDirectoryEntry * self; -#line 403 "/home/jens/Source/shotwell/src/events/Branch.vala" - self = G_TYPE_CHECK_INSTANCE_CAST (obj, EVENTS_TYPE_YEAR_DIRECTORY_ENTRY, EventsYearDirectoryEntry); -#line 404 "/home/jens/Source/shotwell/src/events/Branch.vala" - _g_free0 (self->priv->name); -#line 403 "/home/jens/Source/shotwell/src/events/Branch.vala" - G_OBJECT_CLASS (events_year_directory_entry_parent_class)->finalize (obj); -#line 3700 "Branch.c" -} - - -GType events_year_directory_entry_get_type (void) { - static volatile gsize events_year_directory_entry_type_id__volatile = 0; - if (g_once_init_enter (&events_year_directory_entry_type_id__volatile)) { - static const GTypeInfo g_define_type_info = { sizeof (EventsYearDirectoryEntryClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) events_year_directory_entry_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (EventsYearDirectoryEntry), 0, (GInstanceInitFunc) events_year_directory_entry_instance_init, NULL }; - GType events_year_directory_entry_type_id; - events_year_directory_entry_type_id = g_type_register_static (EVENTS_TYPE_DIRECTORY_ENTRY, "EventsYearDirectoryEntry", &g_define_type_info, 0); - g_once_init_leave (&events_year_directory_entry_type_id__volatile, events_year_directory_entry_type_id); - } - return events_year_directory_entry_type_id__volatile; -} - - -EventsMonthDirectoryEntry* events_month_directory_entry_construct (GType object_type, const gchar* name, struct tm* tm) { - EventsMonthDirectoryEntry * self = NULL; - const gchar* _tmp0_; - gchar* _tmp1_; - struct tm _tmp2_; -#line 429 "/home/jens/Source/shotwell/src/events/Branch.vala" - g_return_val_if_fail (name != NULL, NULL); -#line 429 "/home/jens/Source/shotwell/src/events/Branch.vala" - g_return_val_if_fail (tm != NULL, NULL); -#line 429 "/home/jens/Source/shotwell/src/events/Branch.vala" - self = (EventsMonthDirectoryEntry*) events_directory_entry_construct (object_type); -#line 430 "/home/jens/Source/shotwell/src/events/Branch.vala" - _tmp0_ = name; -#line 430 "/home/jens/Source/shotwell/src/events/Branch.vala" - _tmp1_ = g_strdup (_tmp0_); -#line 430 "/home/jens/Source/shotwell/src/events/Branch.vala" - _g_free0 (self->priv->name); -#line 430 "/home/jens/Source/shotwell/src/events/Branch.vala" - self->priv->name = _tmp1_; -#line 431 "/home/jens/Source/shotwell/src/events/Branch.vala" - _tmp2_ = *tm; -#line 431 "/home/jens/Source/shotwell/src/events/Branch.vala" - self->priv->tm = _tmp2_; -#line 429 "/home/jens/Source/shotwell/src/events/Branch.vala" - return self; -#line 3741 "Branch.c" -} - - -EventsMonthDirectoryEntry* events_month_directory_entry_new (const gchar* name, struct tm* tm) { -#line 429 "/home/jens/Source/shotwell/src/events/Branch.vala" - return events_month_directory_entry_construct (EVENTS_TYPE_MONTH_DIRECTORY_ENTRY, name, tm); -#line 3748 "Branch.c" -} - - -static gchar* events_month_directory_entry_real_get_sidebar_name (SidebarSimplePageEntry* base) { - EventsMonthDirectoryEntry * self; - gchar* result = NULL; - const gchar* _tmp0_; - gchar* _tmp1_; -#line 434 "/home/jens/Source/shotwell/src/events/Branch.vala" - self = G_TYPE_CHECK_INSTANCE_CAST (base, EVENTS_TYPE_MONTH_DIRECTORY_ENTRY, EventsMonthDirectoryEntry); -#line 435 "/home/jens/Source/shotwell/src/events/Branch.vala" - _tmp0_ = self->priv->name; -#line 435 "/home/jens/Source/shotwell/src/events/Branch.vala" - _tmp1_ = g_strdup (_tmp0_); -#line 435 "/home/jens/Source/shotwell/src/events/Branch.vala" - result = _tmp1_; -#line 435 "/home/jens/Source/shotwell/src/events/Branch.vala" - return result; -#line 3767 "Branch.c" -} - - -gint events_month_directory_entry_get_year (EventsMonthDirectoryEntry* self) { - gint result = 0; - struct tm _tmp0_; - gint _tmp1_; -#line 438 "/home/jens/Source/shotwell/src/events/Branch.vala" - g_return_val_if_fail (EVENTS_IS_MONTH_DIRECTORY_ENTRY (self), 0); -#line 439 "/home/jens/Source/shotwell/src/events/Branch.vala" - _tmp0_ = self->priv->tm; -#line 439 "/home/jens/Source/shotwell/src/events/Branch.vala" - _tmp1_ = _tmp0_.tm_year; -#line 439 "/home/jens/Source/shotwell/src/events/Branch.vala" - result = _tmp1_ + 1900; -#line 439 "/home/jens/Source/shotwell/src/events/Branch.vala" - return result; -#line 3785 "Branch.c" -} - - -gint events_month_directory_entry_get_month (EventsMonthDirectoryEntry* self) { - gint result = 0; - struct tm _tmp0_; - gint _tmp1_; -#line 442 "/home/jens/Source/shotwell/src/events/Branch.vala" - g_return_val_if_fail (EVENTS_IS_MONTH_DIRECTORY_ENTRY (self), 0); -#line 443 "/home/jens/Source/shotwell/src/events/Branch.vala" - _tmp0_ = self->priv->tm; -#line 443 "/home/jens/Source/shotwell/src/events/Branch.vala" - _tmp1_ = _tmp0_.tm_mon; -#line 443 "/home/jens/Source/shotwell/src/events/Branch.vala" - result = _tmp1_ + 1; -#line 443 "/home/jens/Source/shotwell/src/events/Branch.vala" - return result; -#line 3803 "Branch.c" -} - - -static Page* events_month_directory_entry_real_create_page (SidebarSimplePageEntry* base) { - EventsMonthDirectoryEntry * self; - Page* result = NULL; - struct tm _tmp0_; - SubEventsDirectoryPage* _tmp1_; -#line 446 "/home/jens/Source/shotwell/src/events/Branch.vala" - self = G_TYPE_CHECK_INSTANCE_CAST (base, EVENTS_TYPE_MONTH_DIRECTORY_ENTRY, EventsMonthDirectoryEntry); -#line 447 "/home/jens/Source/shotwell/src/events/Branch.vala" - _tmp0_ = self->priv->tm; -#line 447 "/home/jens/Source/shotwell/src/events/Branch.vala" - _tmp1_ = sub_events_directory_page_new (SUB_EVENTS_DIRECTORY_PAGE_DIRECTORY_TYPE_MONTH, &_tmp0_); -#line 447 "/home/jens/Source/shotwell/src/events/Branch.vala" - g_object_ref_sink (_tmp1_); -#line 447 "/home/jens/Source/shotwell/src/events/Branch.vala" - result = G_TYPE_CHECK_INSTANCE_CAST (_tmp1_, TYPE_PAGE, Page); -#line 447 "/home/jens/Source/shotwell/src/events/Branch.vala" - return result; -#line 3824 "Branch.c" -} - - -static void events_month_directory_entry_class_init (EventsMonthDirectoryEntryClass * klass) { -#line 425 "/home/jens/Source/shotwell/src/events/Branch.vala" - events_month_directory_entry_parent_class = g_type_class_peek_parent (klass); -#line 425 "/home/jens/Source/shotwell/src/events/Branch.vala" - g_type_class_add_private (klass, sizeof (EventsMonthDirectoryEntryPrivate)); -#line 425 "/home/jens/Source/shotwell/src/events/Branch.vala" - ((SidebarSimplePageEntryClass *) klass)->get_sidebar_name = (gchar* (*) (SidebarSimplePageEntry *)) events_month_directory_entry_real_get_sidebar_name; -#line 425 "/home/jens/Source/shotwell/src/events/Branch.vala" - ((SidebarSimplePageEntryClass *) klass)->create_page = (Page* (*) (SidebarSimplePageEntry *)) events_month_directory_entry_real_create_page; -#line 425 "/home/jens/Source/shotwell/src/events/Branch.vala" - G_OBJECT_CLASS (klass)->finalize = events_month_directory_entry_finalize; -#line 3839 "Branch.c" -} - - -static void events_month_directory_entry_instance_init (EventsMonthDirectoryEntry * self) { -#line 425 "/home/jens/Source/shotwell/src/events/Branch.vala" - self->priv = EVENTS_MONTH_DIRECTORY_ENTRY_GET_PRIVATE (self); -#line 3846 "Branch.c" -} - - -static void events_month_directory_entry_finalize (GObject * obj) { - EventsMonthDirectoryEntry * self; -#line 425 "/home/jens/Source/shotwell/src/events/Branch.vala" - self = G_TYPE_CHECK_INSTANCE_CAST (obj, EVENTS_TYPE_MONTH_DIRECTORY_ENTRY, EventsMonthDirectoryEntry); -#line 426 "/home/jens/Source/shotwell/src/events/Branch.vala" - _g_free0 (self->priv->name); -#line 425 "/home/jens/Source/shotwell/src/events/Branch.vala" - G_OBJECT_CLASS (events_month_directory_entry_parent_class)->finalize (obj); -#line 3858 "Branch.c" -} - - -GType events_month_directory_entry_get_type (void) { - static volatile gsize events_month_directory_entry_type_id__volatile = 0; - if (g_once_init_enter (&events_month_directory_entry_type_id__volatile)) { - static const GTypeInfo g_define_type_info = { sizeof (EventsMonthDirectoryEntryClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) events_month_directory_entry_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (EventsMonthDirectoryEntry), 0, (GInstanceInitFunc) events_month_directory_entry_instance_init, NULL }; - GType events_month_directory_entry_type_id; - events_month_directory_entry_type_id = g_type_register_static (EVENTS_TYPE_DIRECTORY_ENTRY, "EventsMonthDirectoryEntry", &g_define_type_info, 0); - g_once_init_leave (&events_month_directory_entry_type_id__volatile, events_month_directory_entry_type_id); - } - return events_month_directory_entry_type_id__volatile; -} - - -EventsUndatedDirectoryEntry* events_undated_directory_entry_construct (GType object_type) { - EventsUndatedDirectoryEntry * self = NULL; -#line 452 "/home/jens/Source/shotwell/src/events/Branch.vala" - self = (EventsUndatedDirectoryEntry*) events_directory_entry_construct (object_type); -#line 452 "/home/jens/Source/shotwell/src/events/Branch.vala" - return self; -#line 3880 "Branch.c" -} - - -EventsUndatedDirectoryEntry* events_undated_directory_entry_new (void) { -#line 452 "/home/jens/Source/shotwell/src/events/Branch.vala" - return events_undated_directory_entry_construct (EVENTS_TYPE_UNDATED_DIRECTORY_ENTRY); -#line 3887 "Branch.c" -} - - -static gchar* events_undated_directory_entry_real_get_sidebar_name (SidebarSimplePageEntry* base) { - EventsUndatedDirectoryEntry * self; - gchar* result = NULL; - gchar* _tmp0_; -#line 455 "/home/jens/Source/shotwell/src/events/Branch.vala" - self = G_TYPE_CHECK_INSTANCE_CAST (base, EVENTS_TYPE_UNDATED_DIRECTORY_ENTRY, EventsUndatedDirectoryEntry); -#line 456 "/home/jens/Source/shotwell/src/events/Branch.vala" - _tmp0_ = g_strdup (SUB_EVENTS_DIRECTORY_PAGE_UNDATED_PAGE_NAME); -#line 456 "/home/jens/Source/shotwell/src/events/Branch.vala" - result = _tmp0_; -#line 456 "/home/jens/Source/shotwell/src/events/Branch.vala" - return result; -#line 3903 "Branch.c" -} - - -static Page* events_undated_directory_entry_real_create_page (SidebarSimplePageEntry* base) { - EventsUndatedDirectoryEntry * self; - Page* result = NULL; - struct tm _tmp0_ = {0}; - SubEventsDirectoryPage* _tmp1_; -#line 459 "/home/jens/Source/shotwell/src/events/Branch.vala" - self = G_TYPE_CHECK_INSTANCE_CAST (base, EVENTS_TYPE_UNDATED_DIRECTORY_ENTRY, EventsUndatedDirectoryEntry); -#line 460 "/home/jens/Source/shotwell/src/events/Branch.vala" - g_time_local ((time_t) 0, &_tmp0_); -#line 460 "/home/jens/Source/shotwell/src/events/Branch.vala" - _tmp1_ = sub_events_directory_page_new (SUB_EVENTS_DIRECTORY_PAGE_DIRECTORY_TYPE_UNDATED, &_tmp0_); -#line 460 "/home/jens/Source/shotwell/src/events/Branch.vala" - g_object_ref_sink (_tmp1_); -#line 460 "/home/jens/Source/shotwell/src/events/Branch.vala" - result = G_TYPE_CHECK_INSTANCE_CAST (_tmp1_, TYPE_PAGE, Page); -#line 460 "/home/jens/Source/shotwell/src/events/Branch.vala" - return result; -#line 3924 "Branch.c" -} - - -static void events_undated_directory_entry_class_init (EventsUndatedDirectoryEntryClass * klass) { -#line 451 "/home/jens/Source/shotwell/src/events/Branch.vala" - events_undated_directory_entry_parent_class = g_type_class_peek_parent (klass); -#line 451 "/home/jens/Source/shotwell/src/events/Branch.vala" - ((SidebarSimplePageEntryClass *) klass)->get_sidebar_name = (gchar* (*) (SidebarSimplePageEntry *)) events_undated_directory_entry_real_get_sidebar_name; -#line 451 "/home/jens/Source/shotwell/src/events/Branch.vala" - ((SidebarSimplePageEntryClass *) klass)->create_page = (Page* (*) (SidebarSimplePageEntry *)) events_undated_directory_entry_real_create_page; -#line 3935 "Branch.c" -} - - -static void events_undated_directory_entry_instance_init (EventsUndatedDirectoryEntry * self) { -} - - -GType events_undated_directory_entry_get_type (void) { - static volatile gsize events_undated_directory_entry_type_id__volatile = 0; - if (g_once_init_enter (&events_undated_directory_entry_type_id__volatile)) { - static const GTypeInfo g_define_type_info = { sizeof (EventsUndatedDirectoryEntryClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) events_undated_directory_entry_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (EventsUndatedDirectoryEntry), 0, (GInstanceInitFunc) events_undated_directory_entry_instance_init, NULL }; - GType events_undated_directory_entry_type_id; - events_undated_directory_entry_type_id = g_type_register_static (EVENTS_TYPE_DIRECTORY_ENTRY, "EventsUndatedDirectoryEntry", &g_define_type_info, 0); - g_once_init_leave (&events_undated_directory_entry_type_id__volatile, events_undated_directory_entry_type_id); - } - return events_undated_directory_entry_type_id__volatile; -} - - -EventsEventEntry* events_event_entry_construct (GType object_type, Event* event) { - EventsEventEntry * self = NULL; - Event* _tmp0_; - Event* _tmp1_; -#line 469 "/home/jens/Source/shotwell/src/events/Branch.vala" - g_return_val_if_fail (IS_EVENT (event), NULL); -#line 469 "/home/jens/Source/shotwell/src/events/Branch.vala" - self = (EventsEventEntry*) sidebar_simple_page_entry_construct (object_type); -#line 470 "/home/jens/Source/shotwell/src/events/Branch.vala" - _tmp0_ = event; -#line 470 "/home/jens/Source/shotwell/src/events/Branch.vala" - _tmp1_ = _g_object_ref0 (_tmp0_); -#line 470 "/home/jens/Source/shotwell/src/events/Branch.vala" - _g_object_unref0 (self->priv->event); -#line 470 "/home/jens/Source/shotwell/src/events/Branch.vala" - self->priv->event = _tmp1_; -#line 469 "/home/jens/Source/shotwell/src/events/Branch.vala" - return self; -#line 3973 "Branch.c" -} - - -EventsEventEntry* events_event_entry_new (Event* event) { -#line 469 "/home/jens/Source/shotwell/src/events/Branch.vala" - return events_event_entry_construct (EVENTS_TYPE_EVENT_ENTRY, event); -#line 3980 "Branch.c" -} - - -Event* events_event_entry_get_event (EventsEventEntry* self) { - Event* result = NULL; - Event* _tmp0_; - Event* _tmp1_; -#line 473 "/home/jens/Source/shotwell/src/events/Branch.vala" - g_return_val_if_fail (EVENTS_IS_EVENT_ENTRY (self), NULL); -#line 474 "/home/jens/Source/shotwell/src/events/Branch.vala" - _tmp0_ = self->priv->event; -#line 474 "/home/jens/Source/shotwell/src/events/Branch.vala" - _tmp1_ = _g_object_ref0 (_tmp0_); -#line 474 "/home/jens/Source/shotwell/src/events/Branch.vala" - result = _tmp1_; -#line 474 "/home/jens/Source/shotwell/src/events/Branch.vala" - return result; -#line 3998 "Branch.c" -} - - -static gchar* events_event_entry_real_get_sidebar_name (SidebarSimplePageEntry* base) { - EventsEventEntry * self; - gchar* result = NULL; - Event* _tmp0_; - gchar* _tmp1_; -#line 477 "/home/jens/Source/shotwell/src/events/Branch.vala" - self = G_TYPE_CHECK_INSTANCE_CAST (base, EVENTS_TYPE_EVENT_ENTRY, EventsEventEntry); -#line 478 "/home/jens/Source/shotwell/src/events/Branch.vala" - _tmp0_ = self->priv->event; -#line 478 "/home/jens/Source/shotwell/src/events/Branch.vala" - _tmp1_ = data_object_get_name (G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, TYPE_DATA_OBJECT, DataObject)); -#line 478 "/home/jens/Source/shotwell/src/events/Branch.vala" - result = _tmp1_; -#line 478 "/home/jens/Source/shotwell/src/events/Branch.vala" - return result; -#line 4017 "Branch.c" -} - - -static gchar* events_event_entry_real_get_sidebar_icon (SidebarSimplePageEntry* base) { - EventsEventEntry * self; - gchar* result = NULL; - const gchar* _tmp0_; - gchar* _tmp1_; -#line 481 "/home/jens/Source/shotwell/src/events/Branch.vala" - self = G_TYPE_CHECK_INSTANCE_CAST (base, EVENTS_TYPE_EVENT_ENTRY, EventsEventEntry); -#line 482 "/home/jens/Source/shotwell/src/events/Branch.vala" - _tmp0_ = events_branch_single_event_icon; -#line 482 "/home/jens/Source/shotwell/src/events/Branch.vala" - _tmp1_ = g_strdup (_tmp0_); -#line 482 "/home/jens/Source/shotwell/src/events/Branch.vala" - result = _tmp1_; -#line 482 "/home/jens/Source/shotwell/src/events/Branch.vala" - return result; -#line 4036 "Branch.c" -} - - -static Page* events_event_entry_real_create_page (SidebarSimplePageEntry* base) { - EventsEventEntry * self; - Page* result = NULL; - Event* _tmp0_; - EventPage* _tmp1_; -#line 485 "/home/jens/Source/shotwell/src/events/Branch.vala" - self = G_TYPE_CHECK_INSTANCE_CAST (base, EVENTS_TYPE_EVENT_ENTRY, EventsEventEntry); -#line 486 "/home/jens/Source/shotwell/src/events/Branch.vala" - _tmp0_ = self->priv->event; -#line 486 "/home/jens/Source/shotwell/src/events/Branch.vala" - _tmp1_ = event_page_new (_tmp0_); -#line 486 "/home/jens/Source/shotwell/src/events/Branch.vala" - g_object_ref_sink (_tmp1_); -#line 486 "/home/jens/Source/shotwell/src/events/Branch.vala" - result = G_TYPE_CHECK_INSTANCE_CAST (_tmp1_, TYPE_PAGE, Page); -#line 486 "/home/jens/Source/shotwell/src/events/Branch.vala" - return result; -#line 4057 "Branch.c" -} - - -static gboolean events_event_entry_real_is_user_renameable (SidebarRenameableEntry* base) { - EventsEventEntry * self; - gboolean result = FALSE; -#line 489 "/home/jens/Source/shotwell/src/events/Branch.vala" - self = G_TYPE_CHECK_INSTANCE_CAST (base, EVENTS_TYPE_EVENT_ENTRY, EventsEventEntry); -#line 490 "/home/jens/Source/shotwell/src/events/Branch.vala" - result = TRUE; -#line 490 "/home/jens/Source/shotwell/src/events/Branch.vala" - return result; -#line 4070 "Branch.c" -} - - -static void events_event_entry_real_rename (SidebarRenameableEntry* base, const gchar* new_name) { - EventsEventEntry * self; - gchar* prepped = NULL; - const gchar* _tmp0_; - gchar* _tmp1_; - const gchar* _tmp2_; -#line 493 "/home/jens/Source/shotwell/src/events/Branch.vala" - self = G_TYPE_CHECK_INSTANCE_CAST (base, EVENTS_TYPE_EVENT_ENTRY, EventsEventEntry); -#line 493 "/home/jens/Source/shotwell/src/events/Branch.vala" - g_return_if_fail (new_name != NULL); -#line 494 "/home/jens/Source/shotwell/src/events/Branch.vala" - _tmp0_ = new_name; -#line 494 "/home/jens/Source/shotwell/src/events/Branch.vala" - _tmp1_ = event_prep_event_name (_tmp0_); -#line 494 "/home/jens/Source/shotwell/src/events/Branch.vala" - prepped = _tmp1_; -#line 495 "/home/jens/Source/shotwell/src/events/Branch.vala" - _tmp2_ = prepped; -#line 495 "/home/jens/Source/shotwell/src/events/Branch.vala" - if (_tmp2_ != NULL) { -#line 4094 "Branch.c" - CommandManager* _tmp3_; - CommandManager* _tmp4_; - Event* _tmp5_; - const gchar* _tmp6_; - RenameEventCommand* _tmp7_; - RenameEventCommand* _tmp8_; -#line 496 "/home/jens/Source/shotwell/src/events/Branch.vala" - _tmp3_ = app_window_get_command_manager (); -#line 496 "/home/jens/Source/shotwell/src/events/Branch.vala" - _tmp4_ = _tmp3_; -#line 496 "/home/jens/Source/shotwell/src/events/Branch.vala" - _tmp5_ = self->priv->event; -#line 496 "/home/jens/Source/shotwell/src/events/Branch.vala" - _tmp6_ = prepped; -#line 496 "/home/jens/Source/shotwell/src/events/Branch.vala" - _tmp7_ = rename_event_command_new (_tmp5_, _tmp6_); -#line 496 "/home/jens/Source/shotwell/src/events/Branch.vala" - _tmp8_ = _tmp7_; -#line 496 "/home/jens/Source/shotwell/src/events/Branch.vala" - command_manager_execute (_tmp4_, G_TYPE_CHECK_INSTANCE_CAST (_tmp8_, TYPE_COMMAND, Command)); -#line 496 "/home/jens/Source/shotwell/src/events/Branch.vala" - _g_object_unref0 (_tmp8_); -#line 496 "/home/jens/Source/shotwell/src/events/Branch.vala" - _command_manager_unref0 (_tmp4_); -#line 4119 "Branch.c" - } -#line 493 "/home/jens/Source/shotwell/src/events/Branch.vala" - _g_free0 (prepped); -#line 4123 "Branch.c" -} - - -static gboolean events_event_entry_real_internal_drop_received (SidebarInternalDropTargetEntry* base, GeeList* media) { - EventsEventEntry * self; - gboolean result = FALSE; - GeeArrayList* views = NULL; - GeeArrayList* _tmp0_; - CommandManager* _tmp16_; - CommandManager* _tmp17_; - GeeArrayList* _tmp18_; - Event* _tmp19_; - SetEventCommand* _tmp20_; - SetEventCommand* _tmp21_; -#line 499 "/home/jens/Source/shotwell/src/events/Branch.vala" - self = G_TYPE_CHECK_INSTANCE_CAST (base, EVENTS_TYPE_EVENT_ENTRY, EventsEventEntry); -#line 499 "/home/jens/Source/shotwell/src/events/Branch.vala" - g_return_val_if_fail (GEE_IS_LIST (media), FALSE); -#line 502 "/home/jens/Source/shotwell/src/events/Branch.vala" - _tmp0_ = gee_array_list_new (TYPE_DATA_VIEW, (GBoxedCopyFunc) g_object_ref, (GDestroyNotify) g_object_unref, NULL, NULL, NULL); -#line 502 "/home/jens/Source/shotwell/src/events/Branch.vala" - views = _tmp0_; -#line 4146 "Branch.c" - { - GeeList* _media_source_list = NULL; - GeeList* _tmp1_; - GeeList* _tmp2_; - gint _media_source_size = 0; - GeeList* _tmp3_; - gint _tmp4_; - gint _tmp5_; - gint _media_source_index = 0; -#line 503 "/home/jens/Source/shotwell/src/events/Branch.vala" - _tmp1_ = media; -#line 503 "/home/jens/Source/shotwell/src/events/Branch.vala" - _tmp2_ = _g_object_ref0 (_tmp1_); -#line 503 "/home/jens/Source/shotwell/src/events/Branch.vala" - _media_source_list = _tmp2_; -#line 503 "/home/jens/Source/shotwell/src/events/Branch.vala" - _tmp3_ = _media_source_list; -#line 503 "/home/jens/Source/shotwell/src/events/Branch.vala" - _tmp4_ = gee_collection_get_size (G_TYPE_CHECK_INSTANCE_CAST (_tmp3_, GEE_TYPE_COLLECTION, GeeCollection)); -#line 503 "/home/jens/Source/shotwell/src/events/Branch.vala" - _tmp5_ = _tmp4_; -#line 503 "/home/jens/Source/shotwell/src/events/Branch.vala" - _media_source_size = _tmp5_; -#line 503 "/home/jens/Source/shotwell/src/events/Branch.vala" - _media_source_index = -1; -#line 503 "/home/jens/Source/shotwell/src/events/Branch.vala" - while (TRUE) { -#line 4174 "Branch.c" - gint _tmp6_; - gint _tmp7_; - gint _tmp8_; - MediaSource* media_source = NULL; - GeeList* _tmp9_; - gint _tmp10_; - gpointer _tmp11_; - GeeArrayList* _tmp12_; - MediaSource* _tmp13_; - DataView* _tmp14_; - DataView* _tmp15_; -#line 503 "/home/jens/Source/shotwell/src/events/Branch.vala" - _tmp6_ = _media_source_index; -#line 503 "/home/jens/Source/shotwell/src/events/Branch.vala" - _media_source_index = _tmp6_ + 1; -#line 503 "/home/jens/Source/shotwell/src/events/Branch.vala" - _tmp7_ = _media_source_index; -#line 503 "/home/jens/Source/shotwell/src/events/Branch.vala" - _tmp8_ = _media_source_size; -#line 503 "/home/jens/Source/shotwell/src/events/Branch.vala" - if (!(_tmp7_ < _tmp8_)) { -#line 503 "/home/jens/Source/shotwell/src/events/Branch.vala" - break; -#line 4198 "Branch.c" - } -#line 503 "/home/jens/Source/shotwell/src/events/Branch.vala" - _tmp9_ = _media_source_list; -#line 503 "/home/jens/Source/shotwell/src/events/Branch.vala" - _tmp10_ = _media_source_index; -#line 503 "/home/jens/Source/shotwell/src/events/Branch.vala" - _tmp11_ = gee_list_get (_tmp9_, _tmp10_); -#line 503 "/home/jens/Source/shotwell/src/events/Branch.vala" - media_source = (MediaSource*) _tmp11_; -#line 504 "/home/jens/Source/shotwell/src/events/Branch.vala" - _tmp12_ = views; -#line 504 "/home/jens/Source/shotwell/src/events/Branch.vala" - _tmp13_ = media_source; -#line 504 "/home/jens/Source/shotwell/src/events/Branch.vala" - _tmp14_ = data_view_new (G_TYPE_CHECK_INSTANCE_CAST (_tmp13_, TYPE_DATA_SOURCE, DataSource)); -#line 504 "/home/jens/Source/shotwell/src/events/Branch.vala" - _tmp15_ = _tmp14_; -#line 504 "/home/jens/Source/shotwell/src/events/Branch.vala" - gee_abstract_collection_add (G_TYPE_CHECK_INSTANCE_CAST (_tmp12_, GEE_TYPE_ABSTRACT_COLLECTION, GeeAbstractCollection), _tmp15_); -#line 504 "/home/jens/Source/shotwell/src/events/Branch.vala" - _g_object_unref0 (_tmp15_); -#line 503 "/home/jens/Source/shotwell/src/events/Branch.vala" - _g_object_unref0 (media_source); -#line 4222 "Branch.c" - } -#line 503 "/home/jens/Source/shotwell/src/events/Branch.vala" - _g_object_unref0 (_media_source_list); -#line 4226 "Branch.c" - } -#line 506 "/home/jens/Source/shotwell/src/events/Branch.vala" - _tmp16_ = app_window_get_command_manager (); -#line 506 "/home/jens/Source/shotwell/src/events/Branch.vala" - _tmp17_ = _tmp16_; -#line 506 "/home/jens/Source/shotwell/src/events/Branch.vala" - _tmp18_ = views; -#line 506 "/home/jens/Source/shotwell/src/events/Branch.vala" - _tmp19_ = self->priv->event; -#line 506 "/home/jens/Source/shotwell/src/events/Branch.vala" - _tmp20_ = set_event_command_new (G_TYPE_CHECK_INSTANCE_CAST (_tmp18_, GEE_TYPE_ITERABLE, GeeIterable), _tmp19_); -#line 506 "/home/jens/Source/shotwell/src/events/Branch.vala" - _tmp21_ = _tmp20_; -#line 506 "/home/jens/Source/shotwell/src/events/Branch.vala" - command_manager_execute (_tmp17_, G_TYPE_CHECK_INSTANCE_CAST (_tmp21_, TYPE_COMMAND, Command)); -#line 506 "/home/jens/Source/shotwell/src/events/Branch.vala" - _g_object_unref0 (_tmp21_); -#line 506 "/home/jens/Source/shotwell/src/events/Branch.vala" - _command_manager_unref0 (_tmp17_); -#line 508 "/home/jens/Source/shotwell/src/events/Branch.vala" - result = TRUE; -#line 508 "/home/jens/Source/shotwell/src/events/Branch.vala" - _g_object_unref0 (views); -#line 508 "/home/jens/Source/shotwell/src/events/Branch.vala" - return result; -#line 4252 "Branch.c" -} - - -static gboolean events_event_entry_real_internal_drop_received_arbitrary (SidebarInternalDropTargetEntry* base, GtkSelectionData* data) { - EventsEventEntry * self; - gboolean result = FALSE; -#line 511 "/home/jens/Source/shotwell/src/events/Branch.vala" - self = G_TYPE_CHECK_INSTANCE_CAST (base, EVENTS_TYPE_EVENT_ENTRY, EventsEventEntry); -#line 511 "/home/jens/Source/shotwell/src/events/Branch.vala" - g_return_val_if_fail (data != NULL, FALSE); -#line 512 "/home/jens/Source/shotwell/src/events/Branch.vala" - result = FALSE; -#line 512 "/home/jens/Source/shotwell/src/events/Branch.vala" - return result; -#line 4267 "Branch.c" -} - - -static void events_event_entry_class_init (EventsEventEntryClass * klass) { -#line 465 "/home/jens/Source/shotwell/src/events/Branch.vala" - events_event_entry_parent_class = g_type_class_peek_parent (klass); -#line 465 "/home/jens/Source/shotwell/src/events/Branch.vala" - g_type_class_add_private (klass, sizeof (EventsEventEntryPrivate)); -#line 465 "/home/jens/Source/shotwell/src/events/Branch.vala" - ((SidebarSimplePageEntryClass *) klass)->get_sidebar_name = (gchar* (*) (SidebarSimplePageEntry *)) events_event_entry_real_get_sidebar_name; -#line 465 "/home/jens/Source/shotwell/src/events/Branch.vala" - ((SidebarSimplePageEntryClass *) klass)->get_sidebar_icon = (gchar* (*) (SidebarSimplePageEntry *)) events_event_entry_real_get_sidebar_icon; -#line 465 "/home/jens/Source/shotwell/src/events/Branch.vala" - ((SidebarSimplePageEntryClass *) klass)->create_page = (Page* (*) (SidebarSimplePageEntry *)) events_event_entry_real_create_page; -#line 465 "/home/jens/Source/shotwell/src/events/Branch.vala" - G_OBJECT_CLASS (klass)->finalize = events_event_entry_finalize; -#line 4284 "Branch.c" -} - - -static void events_event_entry_sidebar_renameable_entry_interface_init (SidebarRenameableEntryIface * iface) { -#line 465 "/home/jens/Source/shotwell/src/events/Branch.vala" - events_event_entry_sidebar_renameable_entry_parent_iface = g_type_interface_peek_parent (iface); -#line 465 "/home/jens/Source/shotwell/src/events/Branch.vala" - iface->is_user_renameable = (gboolean (*) (SidebarRenameableEntry *)) events_event_entry_real_is_user_renameable; -#line 465 "/home/jens/Source/shotwell/src/events/Branch.vala" - iface->rename = (void (*) (SidebarRenameableEntry *, const gchar*)) events_event_entry_real_rename; -#line 4295 "Branch.c" -} - - -static void events_event_entry_sidebar_internal_drop_target_entry_interface_init (SidebarInternalDropTargetEntryIface * iface) { -#line 465 "/home/jens/Source/shotwell/src/events/Branch.vala" - events_event_entry_sidebar_internal_drop_target_entry_parent_iface = g_type_interface_peek_parent (iface); -#line 465 "/home/jens/Source/shotwell/src/events/Branch.vala" - iface->internal_drop_received = (gboolean (*) (SidebarInternalDropTargetEntry *, GeeList*)) events_event_entry_real_internal_drop_received; -#line 465 "/home/jens/Source/shotwell/src/events/Branch.vala" - iface->internal_drop_received_arbitrary = (gboolean (*) (SidebarInternalDropTargetEntry *, GtkSelectionData*)) events_event_entry_real_internal_drop_received_arbitrary; -#line 4306 "Branch.c" -} - - -static void events_event_entry_instance_init (EventsEventEntry * self) { -#line 465 "/home/jens/Source/shotwell/src/events/Branch.vala" - self->priv = EVENTS_EVENT_ENTRY_GET_PRIVATE (self); -#line 4313 "Branch.c" -} - - -static void events_event_entry_finalize (GObject * obj) { - EventsEventEntry * self; -#line 465 "/home/jens/Source/shotwell/src/events/Branch.vala" - self = G_TYPE_CHECK_INSTANCE_CAST (obj, EVENTS_TYPE_EVENT_ENTRY, EventsEventEntry); -#line 467 "/home/jens/Source/shotwell/src/events/Branch.vala" - _g_object_unref0 (self->priv->event); -#line 465 "/home/jens/Source/shotwell/src/events/Branch.vala" - G_OBJECT_CLASS (events_event_entry_parent_class)->finalize (obj); -#line 4325 "Branch.c" -} - - -GType events_event_entry_get_type (void) { - static volatile gsize events_event_entry_type_id__volatile = 0; - if (g_once_init_enter (&events_event_entry_type_id__volatile)) { - static const GTypeInfo g_define_type_info = { sizeof (EventsEventEntryClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) events_event_entry_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (EventsEventEntry), 0, (GInstanceInitFunc) events_event_entry_instance_init, NULL }; - static const GInterfaceInfo sidebar_renameable_entry_info = { (GInterfaceInitFunc) events_event_entry_sidebar_renameable_entry_interface_init, (GInterfaceFinalizeFunc) NULL, NULL}; - static const GInterfaceInfo sidebar_internal_drop_target_entry_info = { (GInterfaceInitFunc) events_event_entry_sidebar_internal_drop_target_entry_interface_init, (GInterfaceFinalizeFunc) NULL, NULL}; - GType events_event_entry_type_id; - events_event_entry_type_id = g_type_register_static (SIDEBAR_TYPE_SIMPLE_PAGE_ENTRY, "EventsEventEntry", &g_define_type_info, 0); - g_type_add_interface_static (events_event_entry_type_id, SIDEBAR_TYPE_RENAMEABLE_ENTRY, &sidebar_renameable_entry_info); - g_type_add_interface_static (events_event_entry_type_id, SIDEBAR_TYPE_INTERNAL_DROP_TARGET_ENTRY, &sidebar_internal_drop_target_entry_info); - g_once_init_leave (&events_event_entry_type_id__volatile, events_event_entry_type_id); - } - return events_event_entry_type_id__volatile; -} - - -EventsNoEventEntry* events_no_event_entry_construct (GType object_type) { - EventsNoEventEntry * self = NULL; -#line 518 "/home/jens/Source/shotwell/src/events/Branch.vala" - self = (EventsNoEventEntry*) sidebar_simple_page_entry_construct (object_type); -#line 518 "/home/jens/Source/shotwell/src/events/Branch.vala" - return self; -#line 4351 "Branch.c" -} - - -EventsNoEventEntry* events_no_event_entry_new (void) { -#line 518 "/home/jens/Source/shotwell/src/events/Branch.vala" - return events_no_event_entry_construct (EVENTS_TYPE_NO_EVENT_ENTRY); -#line 4358 "Branch.c" -} - - -static gchar* events_no_event_entry_real_get_sidebar_name (SidebarSimplePageEntry* base) { - EventsNoEventEntry * self; - gchar* result = NULL; - gchar* _tmp0_; -#line 521 "/home/jens/Source/shotwell/src/events/Branch.vala" - self = G_TYPE_CHECK_INSTANCE_CAST (base, EVENTS_TYPE_NO_EVENT_ENTRY, EventsNoEventEntry); -#line 522 "/home/jens/Source/shotwell/src/events/Branch.vala" - _tmp0_ = g_strdup (NO_EVENT_PAGE_NAME); -#line 522 "/home/jens/Source/shotwell/src/events/Branch.vala" - result = _tmp0_; -#line 522 "/home/jens/Source/shotwell/src/events/Branch.vala" - return result; -#line 4374 "Branch.c" -} - - -static gchar* events_no_event_entry_real_get_sidebar_icon (SidebarSimplePageEntry* base) { - EventsNoEventEntry * self; - gchar* result = NULL; - const gchar* _tmp0_; - gchar* _tmp1_; -#line 525 "/home/jens/Source/shotwell/src/events/Branch.vala" - self = G_TYPE_CHECK_INSTANCE_CAST (base, EVENTS_TYPE_NO_EVENT_ENTRY, EventsNoEventEntry); -#line 526 "/home/jens/Source/shotwell/src/events/Branch.vala" - _tmp0_ = events_branch_no_event_icon; -#line 526 "/home/jens/Source/shotwell/src/events/Branch.vala" - _tmp1_ = g_strdup (_tmp0_); -#line 526 "/home/jens/Source/shotwell/src/events/Branch.vala" - result = _tmp1_; -#line 526 "/home/jens/Source/shotwell/src/events/Branch.vala" - return result; -#line 4393 "Branch.c" -} - - -static Page* events_no_event_entry_real_create_page (SidebarSimplePageEntry* base) { - EventsNoEventEntry * self; - Page* result = NULL; - NoEventPage* _tmp0_; -#line 529 "/home/jens/Source/shotwell/src/events/Branch.vala" - self = G_TYPE_CHECK_INSTANCE_CAST (base, EVENTS_TYPE_NO_EVENT_ENTRY, EventsNoEventEntry); -#line 530 "/home/jens/Source/shotwell/src/events/Branch.vala" - _tmp0_ = no_event_page_new (); -#line 530 "/home/jens/Source/shotwell/src/events/Branch.vala" - g_object_ref_sink (_tmp0_); -#line 530 "/home/jens/Source/shotwell/src/events/Branch.vala" - result = G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, TYPE_PAGE, Page); -#line 530 "/home/jens/Source/shotwell/src/events/Branch.vala" - return result; -#line 4411 "Branch.c" -} - - -static void events_no_event_entry_class_init (EventsNoEventEntryClass * klass) { -#line 517 "/home/jens/Source/shotwell/src/events/Branch.vala" - events_no_event_entry_parent_class = g_type_class_peek_parent (klass); -#line 517 "/home/jens/Source/shotwell/src/events/Branch.vala" - ((SidebarSimplePageEntryClass *) klass)->get_sidebar_name = (gchar* (*) (SidebarSimplePageEntry *)) events_no_event_entry_real_get_sidebar_name; -#line 517 "/home/jens/Source/shotwell/src/events/Branch.vala" - ((SidebarSimplePageEntryClass *) klass)->get_sidebar_icon = (gchar* (*) (SidebarSimplePageEntry *)) events_no_event_entry_real_get_sidebar_icon; -#line 517 "/home/jens/Source/shotwell/src/events/Branch.vala" - ((SidebarSimplePageEntryClass *) klass)->create_page = (Page* (*) (SidebarSimplePageEntry *)) events_no_event_entry_real_create_page; -#line 4424 "Branch.c" -} - - -static void events_no_event_entry_instance_init (EventsNoEventEntry * self) { -} - - -GType events_no_event_entry_get_type (void) { - static volatile gsize events_no_event_entry_type_id__volatile = 0; - if (g_once_init_enter (&events_no_event_entry_type_id__volatile)) { - static const GTypeInfo g_define_type_info = { sizeof (EventsNoEventEntryClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) events_no_event_entry_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (EventsNoEventEntry), 0, (GInstanceInitFunc) events_no_event_entry_instance_init, NULL }; - GType events_no_event_entry_type_id; - events_no_event_entry_type_id = g_type_register_static (SIDEBAR_TYPE_SIMPLE_PAGE_ENTRY, "EventsNoEventEntry", &g_define_type_info, 0); - g_once_init_leave (&events_no_event_entry_type_id__volatile, events_no_event_entry_type_id); - } - return events_no_event_entry_type_id__volatile; -} - - - diff --git a/src/events/Branch.vala b/src/events/Branch.vala deleted file mode 100644 index 15144f2..0000000 --- a/src/events/Branch.vala +++ /dev/null @@ -1,533 +0,0 @@ -/* Copyright 2016 Software Freedom Conservancy Inc. - * - * This software is licensed under the GNU Lesser General Public License - * (version 2.1 or later). See the COPYING file in this distribution. - */ - -public class Events.Branch : Sidebar.Branch { - internal static string icon = Resources.ICON_FOLDER; - internal static string events_icon = Resources.ICON_EVENTS; - internal static string single_event_icon = Resources.ICON_ONE_EVENT; - internal static string no_event_icon = Resources.ICON_NO_EVENT; - - // NOTE: Because the comparators must be static methods (due to CompareFunc's stupid impl.) - // and there's an assumption that only one Events.Branch is ever created, this is a static - // member but it's modified by instance methods. - private static bool sort_ascending = false; - - private Gee.HashMap entry_map = new Gee.HashMap< - Event, Events.EventEntry>(); - private Events.UndatedDirectoryEntry undated_entry = new Events.UndatedDirectoryEntry(); - private Events.NoEventEntry no_event_entry = new Events.NoEventEntry(); - private Events.MasterDirectoryEntry all_events_entry = new Events.MasterDirectoryEntry(); - - public Branch() { - base (new Sidebar.Header(_("Events")), Sidebar.Branch.Options.STARTUP_EXPAND_TO_FIRST_CHILD, - event_year_comparator); - - graft(get_root(), all_events_entry); - - // seed the branch - foreach (DataObject object in Event.global.get_all()) - add_event((Event) object); - - show_no_events(Event.global.get_no_event_objects().size > 0); - - // monitor Events for future changes - Event.global.contents_altered.connect(on_events_added_removed); - Event.global.items_altered.connect(on_events_altered); - Event.global.no_event_collection_altered.connect(on_no_event_collection_altered); - - // monitor sorting criteria (see note at sort_ascending about this) - Config.Facade.get_instance().events_sort_ascending_changed.connect(on_config_changed); - } - - ~Branch() { - Event.global.contents_altered.disconnect(on_events_added_removed); - Event.global.items_altered.disconnect(on_events_altered); - Event.global.no_event_collection_altered.disconnect(on_no_event_collection_altered); - - Config.Facade.get_instance().events_sort_ascending_changed.disconnect(on_config_changed); - } - - internal static void init() { - sort_ascending = Config.Facade.get_instance().get_events_sort_ascending(); - } - - internal static void terminate() { - } - - public bool is_user_renameable() { - return true; - } - - public Events.MasterDirectoryEntry get_master_entry() { - return all_events_entry; - } - - private static int event_year_comparator(Sidebar.Entry a, Sidebar.Entry b) { - if (a == b) - return 0; - - // The Undated and No Event entries should always appear last in the - // list, respectively. - if (a is Events.UndatedDirectoryEntry) { - if (b is Events.NoEventEntry) - return -1; - return 1; - } else if (b is Events.UndatedDirectoryEntry) { - if (a is Events.NoEventEntry) - return 1; - return -1; - } - - if (a is Events.NoEventEntry) - return 1; - else if (b is Events.NoEventEntry) - return -1; - - // The All events entry should always appear on top - if (a is Events.MasterDirectoryEntry) - return -1; - else if (b is Events.MasterDirectoryEntry) - return 1; - - if (!sort_ascending) { - Sidebar.Entry swap = a; - a = b; - b = swap; - } - - int result = - ((Events.YearDirectoryEntry) a).get_year() - ((Events.YearDirectoryEntry) b).get_year(); - assert(result != 0); - - return result; - } - - private static int event_month_comparator(Sidebar.Entry a, Sidebar.Entry b) { - if (a == b) - return 0; - - if (!sort_ascending) { - Sidebar.Entry swap = a; - a = b; - b = swap; - } - - int result = - ((Events.MonthDirectoryEntry) a).get_month() - ((Events.MonthDirectoryEntry) b).get_month(); - assert(result != 0); - - return result; - } - - private static int event_comparator(Sidebar.Entry a, Sidebar.Entry b) { - if (a == b) - return 0; - - if (!sort_ascending) { - Sidebar.Entry swap = a; - a = b; - b = swap; - } - - int64 result = ((Events.EventEntry) a).get_event().get_start_time() - - ((Events.EventEntry) b).get_event().get_start_time(); - - // to stabilize sort (events with the same start time are allowed) - if (result == 0) { - result = ((Events.EventEntry) a).get_event().get_event_id().id - - ((Events.EventEntry) b).get_event().get_event_id().id; - } - - assert(result != 0); - - return (result < 0) ? -1 : 1; - } - - private static int undated_event_comparator(Sidebar.Entry a, Sidebar.Entry b) { - if (a == b) - return 0; - - if (!sort_ascending) { - Sidebar.Entry swap = a; - a = b; - b = swap; - } - - int ret = ((Events.EventEntry) a).get_event().get_name().collate( - ((Events.EventEntry) b).get_event().get_name()); - - if (ret == 0) - ret = (int) (((Events.EventEntry) b).get_event().get_instance_id() - - ((Events.EventEntry) a).get_event().get_instance_id()); - - return ret; - } - - public Events.EventEntry? get_entry_for_event(Event event) { - return entry_map.get(event); - } - - private void on_config_changed() { - bool value = Config.Facade.get_instance().get_events_sort_ascending(); - - sort_ascending = value; - reorder_all(); - } - - private void on_events_added_removed(Gee.Iterable? added, - Gee.Iterable? removed) { - if (added != null) { - foreach (DataObject object in added) - add_event((Event) object); - } - - if (removed != null) { - foreach (DataObject object in removed) - remove_event((Event) object); - } - } - - private void on_events_altered(Gee.Map altered) { - foreach (DataObject object in altered.keys) { - Event event = (Event) object; - Alteration alteration = altered.get(object); - - if (alteration.has_detail("metadata", "time")) { - // can't merely re-sort the event because it might have moved to a new month or - // even a new year - move_event(event); - } else if (alteration.has_detail("metadata", "name")) { - Events.EventEntry? entry = entry_map.get(event); - assert(entry != null); - - entry.sidebar_name_changed(event.get_name()); - entry.sidebar_tooltip_changed(event.get_name()); - } - } - } - - private void on_no_event_collection_altered() { - show_no_events(Event.global.get_no_event_objects().size > 0); - } - - private void add_event(Event event) { - time_t event_time = event.get_start_time(); - if (event_time == 0) { - add_undated_event(event); - - return; - } - - Time event_tm = Time.local(event_time); - - Sidebar.Entry? year; - Sidebar.Entry? month = find_event_month(event, event_tm, out year); - if (month != null) { - graft_event(month, event, event_comparator); - - return; - } - - if (year == null) { - year = new Events.YearDirectoryEntry(event_tm.format(SubEventsDirectoryPage.YEAR_FORMAT), - event_tm); - graft(get_root(), year, event_month_comparator); - } - - month = new Events.MonthDirectoryEntry(event_tm.format(SubEventsDirectoryPage.MONTH_FORMAT), - event_tm); - graft(year, month, event_comparator); - - graft_event(month, event, event_comparator); - } - - private void move_event(Event event) { - time_t event_time = event.get_start_time(); - if (event_time == 0) { - move_to_undated_event(event); - - return; - } - - Time event_tm = Time.local(event_time); - - Sidebar.Entry? year; - Sidebar.Entry? month = find_event_month(event, event_tm, out year); - - if (year == null) { - year = new Events.YearDirectoryEntry(event_tm.format(SubEventsDirectoryPage.YEAR_FORMAT), - event_tm); - graft(get_root(), year, event_month_comparator); - } - - if (month == null) { - month = new Events.MonthDirectoryEntry(event_tm.format(SubEventsDirectoryPage.MONTH_FORMAT), - event_tm); - graft(year, month, event_comparator); - } - - reparent_event(event, month); - } - - private void remove_event(Event event) { - // the following code works for undated events as well as dated (no need for special - // case, as in add_event()) - Sidebar.Entry? entry; - bool removed = entry_map.unset(event, out entry); - assert(removed); - - Sidebar.Entry? parent = get_parent(entry); - assert(parent != null); - - prune(entry); - - // prune up the tree to the root - while (get_child_count(parent) == 0 && parent != get_root()) { - Sidebar.Entry? grandparent = get_parent(parent); - assert(grandparent != null); - - prune(parent); - - parent = grandparent; - } - } - - private Sidebar.Entry? find_event_month(Event event, Time event_tm, out Sidebar.Entry found_year) { - // find the year first - found_year = find_event_year(event, event_tm); - if (found_year == null) - return null; - - int event_month = event_tm.month + 1; - - // found the year, traverse the months - return find_first_child(found_year, (entry) => { - return ((Events.MonthDirectoryEntry) entry).get_month() == event_month; - }); - } - - private Sidebar.Entry? find_event_year(Event event, Time event_tm) { - int event_year = event_tm.year + 1900; - - return find_first_child(get_root(), (entry) => { - if ((entry is Events.UndatedDirectoryEntry) || (entry is Events.NoEventEntry) || - entry is Events.MasterDirectoryEntry) - return false; - else - return ((Events.YearDirectoryEntry) entry).get_year() == event_year; - }); - } - - private void add_undated_event(Event event) { - if (!has_entry(undated_entry)) - graft(get_root(), undated_entry, undated_event_comparator); - - graft_event(undated_entry, event); - } - - private void move_to_undated_event(Event event) { - if (!has_entry(undated_entry)) - graft(get_root(), undated_entry); - - reparent_event(event, undated_entry); - } - - private void graft_event(Sidebar.Entry parent, Event event, - owned CompareFunc? comparator = null) { - Events.EventEntry entry = new Events.EventEntry(event); - entry_map.set(event, entry); - - graft(parent, entry, comparator); - } - - private void reparent_event(Event event, Sidebar.Entry new_parent) { - Events.EventEntry? entry = entry_map.get(event); - assert(entry != null); - - Sidebar.Entry? old_parent = get_parent(entry); - assert(old_parent != null); - - reparent(new_parent, entry); - - while (get_child_count(old_parent) == 0 && old_parent != get_root()) { - Sidebar.Entry? grandparent = get_parent(old_parent); - assert(grandparent != null); - - prune(old_parent); - - old_parent = grandparent; - } - } - - private void show_no_events(bool show) { - if (show && !has_entry(no_event_entry)) - graft(get_root(), no_event_entry); - else if (!show && has_entry(no_event_entry)) - prune(no_event_entry); - } -} - -public abstract class Events.DirectoryEntry : Sidebar.SimplePageEntry, Sidebar.ExpandableEntry { - public DirectoryEntry() { - } - - public override string? get_sidebar_icon() { - return Events.Branch.icon; - } - - public bool expand_on_select() { - return true; - } -} - -public class Events.MasterDirectoryEntry : Events.DirectoryEntry { - public MasterDirectoryEntry() { - } - - public override string get_sidebar_name() { - return MasterEventsDirectoryPage.NAME; - } - - public override string? get_sidebar_icon() { - return Events.Branch.events_icon; - } - - protected override Page create_page() { - return new MasterEventsDirectoryPage(); - } -} - -public class Events.YearDirectoryEntry : Events.DirectoryEntry { - private string name; - private Time tm; - - public YearDirectoryEntry(string name, Time tm) { - this.name = name; - this.tm = tm; - } - - public override string get_sidebar_name() { - return name; - } - - public int get_year() { - return tm.year + 1900; - } - - protected override Page create_page() { - return new SubEventsDirectoryPage(SubEventsDirectoryPage.DirectoryType.YEAR, tm); - } -} - -public class Events.MonthDirectoryEntry : Events.DirectoryEntry { - private string name; - private Time tm; - - public MonthDirectoryEntry(string name, Time tm) { - this.name = name; - this.tm = tm; - } - - public override string get_sidebar_name() { - return name; - } - - public int get_year() { - return tm.year + 1900; - } - - public int get_month() { - return tm.month + 1; - } - - protected override Page create_page() { - return new SubEventsDirectoryPage(SubEventsDirectoryPage.DirectoryType.MONTH, tm); - } -} - -public class Events.UndatedDirectoryEntry : Events.DirectoryEntry { - public UndatedDirectoryEntry() { - } - - public override string get_sidebar_name() { - return SubEventsDirectoryPage.UNDATED_PAGE_NAME; - } - - protected override Page create_page() { - return new SubEventsDirectoryPage(SubEventsDirectoryPage.DirectoryType.UNDATED, - Time.local(0)); - } -} - -public class Events.EventEntry : Sidebar.SimplePageEntry, Sidebar.RenameableEntry, - Sidebar.InternalDropTargetEntry { - private Event event; - - public EventEntry(Event event) { - this.event = event; - } - - public Event get_event() { - return event; - } - - public override string get_sidebar_name() { - return event.get_name(); - } - - public override string? get_sidebar_icon() { - return Events.Branch.single_event_icon; - } - - protected override Page create_page() { - return new EventPage(event); - } - - public bool is_user_renameable() { - return true; - } - - public void rename(string new_name) { - string? prepped = Event.prep_event_name(new_name); - if (prepped != null) - AppWindow.get_command_manager().execute(new RenameEventCommand(event, prepped)); - } - - public bool internal_drop_received(Gee.List media) { - // ugh ... some early Commands expected DataViews instead of DataSources (to make life - // easier for Pages) and this is one of the prices paid for that - Gee.ArrayList views = new Gee.ArrayList(); - foreach (MediaSource media_source in media) - views.add(new DataView(media_source)); - - AppWindow.get_command_manager().execute(new SetEventCommand(views, event)); - - return true; - } - - public bool internal_drop_received_arbitrary(Gtk.SelectionData data) { - return false; - } -} - - -public class Events.NoEventEntry : Sidebar.SimplePageEntry { - public NoEventEntry() { - } - - public override string get_sidebar_name() { - return NoEventPage.NAME; - } - - public override string? get_sidebar_icon() { - return Events.Branch.no_event_icon; - } - - protected override Page create_page() { - return new NoEventPage(); - } -} - diff --git a/src/events/EventDirectoryItem.c b/src/events/EventDirectoryItem.c index fd09328..5141809 100644 --- a/src/events/EventDirectoryItem.c +++ b/src/events/EventDirectoryItem.c @@ -415,8 +415,8 @@ GdkPixbuf* media_source_get_preview_pixbuf (MediaSource* self, Scaling* scaling, void thumbnail_cache_fetch_async_scaled (ThumbnailSource* source, gint scale, Dimensions* dim, GdkInterpType interp, ThumbnailCacheAsyncFetchCallback callback, void* callback_target, GCancellable* cancellable); GType thumbnail_cache_size_get_type (void) G_GNUC_CONST; #define THUMBNAIL_CACHE_DEFAULT_INTERP GDK_INTERP_HYPER -static void ___lambda17_ (void); -static void ____lambda17__thumbnail_cache_async_fetch_callback (GdkPixbuf* pixbuf, GdkPixbuf* unscaled, Dimensions* dim, GdkInterpType interp, GError* err, gpointer self); +static void ___lambda19_ (void); +static void ____lambda19__thumbnail_cache_async_fetch_callback (GdkPixbuf* pixbuf, GdkPixbuf* unscaled, Dimensions* dim, GdkInterpType interp, GError* err, gpointer self); 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; @@ -656,13 +656,13 @@ static void event_directory_item_get_paul_lynde_rect (MediaSource* source, GdkRe } -static void ___lambda17_ (void) { +static void ___lambda19_ (void) { } -static void ____lambda17__thumbnail_cache_async_fetch_callback (GdkPixbuf* pixbuf, GdkPixbuf* unscaled, Dimensions* dim, GdkInterpType interp, GError* err, gpointer self) { +static void ____lambda19__thumbnail_cache_async_fetch_callback (GdkPixbuf* pixbuf, GdkPixbuf* unscaled, Dimensions* dim, GdkInterpType interp, GError* err, gpointer self) { #line 62 "/home/jens/Source/shotwell/src/events/EventDirectoryItem.vala" - ___lambda17_ (); + ___lambda19_ (); #line 667 "EventDirectoryItem.c" } @@ -721,7 +721,7 @@ static GdkPixbuf* event_directory_item_get_paul_lynde (MediaSource* media, GdkRe #line 60 "/home/jens/Source/shotwell/src/events/EventDirectoryItem.vala" if (G_UNLIKELY (_inner_error_ != NULL)) { #line 724 "EventDirectoryItem.c" - goto __catch52_g_error; + goto __catch58_g_error; } #line 60 "/home/jens/Source/shotwell/src/events/EventDirectoryItem.vala" _tmp4_ = _tmp0_; @@ -735,8 +735,8 @@ static GdkPixbuf* event_directory_item_get_paul_lynde (MediaSource* media, GdkRe _g_object_unref0 (_tmp0_); #line 737 "EventDirectoryItem.c" } - goto __finally52; - __catch52_g_error: + goto __finally58; + __catch58_g_error: { GError* _error_ = NULL; MediaSource* _tmp5_; @@ -751,7 +751,7 @@ static GdkPixbuf* event_directory_item_get_paul_lynde (MediaSource* media, GdkRe #line 62 "/home/jens/Source/shotwell/src/events/EventDirectoryItem.vala" dimensions_init (&_tmp6_, (gint) THUMBNAIL_CACHE_SIZE_BIG, (gint) THUMBNAIL_CACHE_SIZE_BIG); #line 62 "/home/jens/Source/shotwell/src/events/EventDirectoryItem.vala" - thumbnail_cache_fetch_async_scaled (G_TYPE_CHECK_INSTANCE_CAST (_tmp5_, TYPE_THUMBNAIL_SOURCE, ThumbnailSource), (gint) THUMBNAIL_CACHE_SIZE_BIG, &_tmp6_, THUMBNAIL_CACHE_DEFAULT_INTERP, ____lambda17__thumbnail_cache_async_fetch_callback, NULL, NULL); + thumbnail_cache_fetch_async_scaled (G_TYPE_CHECK_INSTANCE_CAST (_tmp5_, TYPE_THUMBNAIL_SOURCE, ThumbnailSource), (gint) THUMBNAIL_CACHE_SIZE_BIG, &_tmp6_, THUMBNAIL_CACHE_DEFAULT_INTERP, ____lambda19__thumbnail_cache_async_fetch_callback, NULL, NULL); #line 65 "/home/jens/Source/shotwell/src/events/EventDirectoryItem.vala" _tmp7_ = media; #line 65 "/home/jens/Source/shotwell/src/events/EventDirectoryItem.vala" @@ -786,7 +786,7 @@ static GdkPixbuf* event_directory_item_get_paul_lynde (MediaSource* media, GdkRe #line 67 "/home/jens/Source/shotwell/src/events/EventDirectoryItem.vala" _g_error_free0 (_error_); #line 789 "EventDirectoryItem.c" - goto __finally52; + goto __finally58; } #line 67 "/home/jens/Source/shotwell/src/events/EventDirectoryItem.vala" _tmp14_ = _tmp10_; @@ -813,13 +813,13 @@ static GdkPixbuf* event_directory_item_get_paul_lynde (MediaSource* media, GdkRe #line 69 "/home/jens/Source/shotwell/src/events/EventDirectoryItem.vala" _g_error_free0 (_error_); #line 816 "EventDirectoryItem.c" - goto __finally52; + goto __finally58; } #line 59 "/home/jens/Source/shotwell/src/events/EventDirectoryItem.vala" _g_error_free0 (_error_); #line 821 "EventDirectoryItem.c" } - __finally52: + __finally58: #line 59 "/home/jens/Source/shotwell/src/events/EventDirectoryItem.vala" if (G_UNLIKELY (_inner_error_ != NULL)) { #line 59 "/home/jens/Source/shotwell/src/events/EventDirectoryItem.vala" @@ -1278,7 +1278,7 @@ static void event_directory_item_real_exposed (CheckerboardItem* base) { #line 121 "/home/jens/Source/shotwell/src/events/EventDirectoryItem.vala" if (G_UNLIKELY (_inner_error_ != NULL)) { #line 1281 "EventDirectoryItem.c" - goto __catch53_g_error; + goto __catch59_g_error; } #line 121 "/home/jens/Source/shotwell/src/events/EventDirectoryItem.vala" checkerboard_item_set_image (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_CHECKERBOARD_ITEM, CheckerboardItem), _tmp1_); @@ -1286,8 +1286,8 @@ static void event_directory_item_real_exposed (CheckerboardItem* base) { _g_object_unref0 (_tmp1_); #line 1288 "EventDirectoryItem.c" } - goto __finally53; - __catch53_g_error: + goto __finally59; + __catch59_g_error: { GError* err = NULL; Event* _tmp8_; @@ -1317,7 +1317,7 @@ static void event_directory_item_real_exposed (CheckerboardItem* base) { _g_error_free0 (err); #line 1319 "EventDirectoryItem.c" } - __finally53: + __finally59: #line 120 "/home/jens/Source/shotwell/src/events/EventDirectoryItem.vala" if (G_UNLIKELY (_inner_error_ != NULL)) { #line 120 "/home/jens/Source/shotwell/src/events/EventDirectoryItem.vala" @@ -1444,7 +1444,7 @@ static void event_directory_item_real_thumbnail_altered (ThumbnailView* base) { #line 154 "/home/jens/Source/shotwell/src/events/EventDirectoryItem.vala" if (G_UNLIKELY (_inner_error_ != NULL)) { #line 1447 "EventDirectoryItem.c" - goto __catch54_g_error; + goto __catch60_g_error; } #line 154 "/home/jens/Source/shotwell/src/events/EventDirectoryItem.vala" checkerboard_item_set_image (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_CHECKERBOARD_ITEM, CheckerboardItem), _tmp5_); @@ -1452,8 +1452,8 @@ static void event_directory_item_real_thumbnail_altered (ThumbnailView* base) { _g_object_unref0 (_tmp5_); #line 1454 "EventDirectoryItem.c" } - goto __finally54; - __catch54_g_error: + goto __finally60; + __catch60_g_error: { GError* err = NULL; Event* _tmp9_; @@ -1483,7 +1483,7 @@ static void event_directory_item_real_thumbnail_altered (ThumbnailView* base) { _g_error_free0 (err); #line 1485 "EventDirectoryItem.c" } - __finally54: + __finally60: #line 153 "/home/jens/Source/shotwell/src/events/EventDirectoryItem.vala" if (G_UNLIKELY (_inner_error_ != NULL)) { #line 153 "/home/jens/Source/shotwell/src/events/EventDirectoryItem.vala" diff --git a/src/events/EventPage.c b/src/events/EventPage.c index 7b747fc..d701b8e 100644 --- a/src/events/EventPage.c +++ b/src/events/EventPage.c @@ -838,7 +838,6 @@ static void event_page_real_init_actions (Page* base, gint selected_count, gint void page_init_actions (Page* self, gint selected_count, gint count); static void event_page_real_update_actions (Page* base, gint selected_count, gint count); void page_set_action_sensitive (Page* self, const gchar* name, gboolean sensitive); -void page_set_action_visible (Page* self, const gchar* name, gboolean visible); void page_update_actions (Page* self, gint selected_count, gint count); static void event_page_real_get_config_photos_sort (MediaPage* base, gboolean* sort_order, gint* sort_by); GType configuration_facade_get_type (void) G_GNUC_CONST; @@ -937,35 +936,35 @@ static const GActionEntry EVENT_PAGE_entries[3] = {{"MakePrimary", _event_page_o static void _event_page_on_events_altered_data_collection_items_altered (DataCollection* _sender, GeeMap* items, gpointer self) { #line 40 "/home/jens/Source/shotwell/src/events/EventPage.vala" event_page_on_events_altered ((EventPage*) self, items); -#line 941 "EventPage.c" +#line 940 "EventPage.c" } static void _event_page_on_make_primary_gsimple_action_activate_callback (GSimpleAction* action, GVariant* parameter, gpointer self) { #line 50 "/home/jens/Source/shotwell/src/events/EventPage.vala" event_page_on_make_primary ((EventPage*) self); -#line 948 "EventPage.c" +#line 947 "EventPage.c" } static void _event_page_on_rename_gsimple_action_activate_callback (GSimpleAction* action, GVariant* parameter, gpointer self) { #line 50 "/home/jens/Source/shotwell/src/events/EventPage.vala" event_page_on_rename ((EventPage*) self); -#line 955 "EventPage.c" +#line 954 "EventPage.c" } static void _media_page_on_edit_comment_gsimple_action_activate_callback (GSimpleAction* action, GVariant* parameter, gpointer self) { #line 50 "/home/jens/Source/shotwell/src/events/EventPage.vala" media_page_on_edit_comment ((MediaPage*) self); -#line 962 "EventPage.c" +#line 961 "EventPage.c" } static gpointer _g_object_ref0 (gpointer self) { #line 13 "/home/jens/Source/shotwell/src/events/EventPage.vala" return self ? g_object_ref (self) : NULL; -#line 969 "EventPage.c" +#line 968 "EventPage.c" } @@ -974,7 +973,7 @@ static DataView* _media_page_create_thumbnail_create_view (DataSource* source, g result = media_page_create_thumbnail ((MediaPage*) self, source); #line 14 "/home/jens/Source/shotwell/src/events/EventPage.vala" return result; -#line 978 "EventPage.c" +#line 977 "EventPage.c" } @@ -1027,14 +1026,14 @@ EventPage* event_page_construct (GType object_type, Event* page_event) { g_signal_connect_object (G_TYPE_CHECK_INSTANCE_CAST (_tmp8_, TYPE_DATA_COLLECTION, DataCollection), "items-altered", (GCallback) _event_page_on_events_altered_data_collection_items_altered, self, 0); #line 10 "/home/jens/Source/shotwell/src/events/EventPage.vala" return self; -#line 1031 "EventPage.c" +#line 1030 "EventPage.c" } EventPage* event_page_new (Event* page_event) { #line 10 "/home/jens/Source/shotwell/src/events/EventPage.vala" return event_page_construct (TYPE_EVENT_PAGE, page_event); -#line 1038 "EventPage.c" +#line 1037 "EventPage.c" } @@ -1052,7 +1051,7 @@ Event* event_page_get_event (EventPage* self) { result = _tmp1_; #line 22 "/home/jens/Source/shotwell/src/events/EventPage.vala" return result; -#line 1056 "EventPage.c" +#line 1055 "EventPage.c" } @@ -1076,7 +1075,7 @@ static gboolean event_page_real_on_app_key_pressed (Page* base, GdkEventKey* eve _tmp2_ = gdk_keyval_name (_tmp1_); #line 30 "/home/jens/Source/shotwell/src/events/EventPage.vala" if (g_strcmp0 (_tmp2_, "F2") == 0) { -#line 1080 "EventPage.c" +#line 1079 "EventPage.c" ViewCollection* _tmp3_; ViewCollection* _tmp4_; gint _tmp5_; @@ -1097,7 +1096,7 @@ static gboolean event_page_real_on_app_key_pressed (Page* base, GdkEventKey* eve result = TRUE; #line 32 "/home/jens/Source/shotwell/src/events/EventPage.vala" return result; -#line 1101 "EventPage.c" +#line 1100 "EventPage.c" } } #line 36 "/home/jens/Source/shotwell/src/events/EventPage.vala" @@ -1108,7 +1107,7 @@ static gboolean event_page_real_on_app_key_pressed (Page* base, GdkEventKey* eve result = _tmp8_; #line 36 "/home/jens/Source/shotwell/src/events/EventPage.vala" return result; -#line 1112 "EventPage.c" +#line 1111 "EventPage.c" } @@ -1128,7 +1127,7 @@ static void event_page_real_init_collect_ui_filenames (Page* base, GeeList* ui_f _tmp1_ = ui_filenames; #line 47 "/home/jens/Source/shotwell/src/events/EventPage.vala" gee_collection_add (G_TYPE_CHECK_INSTANCE_CAST (_tmp1_, GEE_TYPE_COLLECTION, GeeCollection), "event.ui"); -#line 1132 "EventPage.c" +#line 1131 "EventPage.c" } @@ -1148,7 +1147,7 @@ static void event_page_real_add_actions (Page* base, GActionMap* map) { _tmp1_ = map; #line 59 "/home/jens/Source/shotwell/src/events/EventPage.vala" g_action_map_add_action_entries (_tmp1_, EVENT_PAGE_entries, G_N_ELEMENTS (EVENT_PAGE_entries), self); -#line 1152 "EventPage.c" +#line 1151 "EventPage.c" } @@ -1163,7 +1162,7 @@ static void event_page_real_remove_actions (Page* base, GActionMap* map) { _tmp0_ = map; #line 63 "/home/jens/Source/shotwell/src/events/EventPage.vala" PAGE_CLASS (event_page_parent_class)->remove_actions (G_TYPE_CHECK_INSTANCE_CAST (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_COLLECTION_PAGE, CollectionPage), TYPE_PAGE, Page), _tmp0_); -#line 1167 "EventPage.c" +#line 1166 "EventPage.c" { GActionEntry* entry_collection = NULL; gint entry_collection_length1 = 0; @@ -1175,11 +1174,11 @@ static void event_page_real_remove_actions (Page* base, GActionMap* map) { entry_collection_length1 = G_N_ELEMENTS (EVENT_PAGE_entries); #line 64 "/home/jens/Source/shotwell/src/events/EventPage.vala" for (entry_it = 0; entry_it < G_N_ELEMENTS (EVENT_PAGE_entries); entry_it = entry_it + 1) { -#line 1179 "EventPage.c" +#line 1178 "EventPage.c" GActionEntry entry = {0}; #line 64 "/home/jens/Source/shotwell/src/events/EventPage.vala" entry = entry_collection[entry_it]; -#line 1183 "EventPage.c" +#line 1182 "EventPage.c" { GActionMap* _tmp1_; GActionEntry _tmp2_; @@ -1192,7 +1191,7 @@ static void event_page_real_remove_actions (Page* base, GActionMap* map) { _tmp3_ = _tmp2_.name; #line 65 "/home/jens/Source/shotwell/src/events/EventPage.vala" g_action_map_remove_action (_tmp1_, _tmp3_); -#line 1196 "EventPage.c" +#line 1195 "EventPage.c" } } } @@ -1211,7 +1210,7 @@ static void event_page_real_init_actions (Page* base, gint selected_count, gint _tmp1_ = count; #line 70 "/home/jens/Source/shotwell/src/events/EventPage.vala" PAGE_CLASS (event_page_parent_class)->init_actions (G_TYPE_CHECK_INSTANCE_CAST (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_COLLECTION_PAGE, CollectionPage), TYPE_PAGE, Page), _tmp0_, _tmp1_); -#line 1215 "EventPage.c" +#line 1214 "EventPage.c" } @@ -1227,7 +1226,7 @@ static void event_page_real_update_actions (Page* base, gint selected_count, gin #line 74 "/home/jens/Source/shotwell/src/events/EventPage.vala" page_set_action_sensitive (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_PAGE, Page), "MakePrimary", _tmp0_ == 1); #line 77 "/home/jens/Source/shotwell/src/events/EventPage.vala" - page_set_action_visible (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_PAGE, Page), "CommonJumpToEvent", FALSE); + page_set_action_sensitive (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_PAGE, Page), "CommonJumpToEvent", FALSE); #line 79 "/home/jens/Source/shotwell/src/events/EventPage.vala" _tmp1_ = selected_count; #line 79 "/home/jens/Source/shotwell/src/events/EventPage.vala" @@ -1236,7 +1235,7 @@ static void event_page_real_update_actions (Page* base, gint selected_count, gin PAGE_CLASS (event_page_parent_class)->update_actions (G_TYPE_CHECK_INSTANCE_CAST (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_COLLECTION_PAGE, CollectionPage), TYPE_PAGE, Page), _tmp1_, _tmp2_); #line 83 "/home/jens/Source/shotwell/src/events/EventPage.vala" page_set_action_sensitive (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_PAGE, Page), "EditEventComment", TRUE); -#line 1240 "EventPage.c" +#line 1239 "EventPage.c" } @@ -1266,13 +1265,13 @@ static void event_page_real_get_config_photos_sort (MediaPage* base, gboolean* s if (sort_order) { #line 86 "/home/jens/Source/shotwell/src/events/EventPage.vala" *sort_order = _vala_sort_order; -#line 1270 "EventPage.c" +#line 1269 "EventPage.c" } #line 86 "/home/jens/Source/shotwell/src/events/EventPage.vala" if (sort_by) { #line 86 "/home/jens/Source/shotwell/src/events/EventPage.vala" *sort_by = _vala_sort_by; -#line 1276 "EventPage.c" +#line 1275 "EventPage.c" } } @@ -1297,7 +1296,7 @@ static void event_page_real_set_config_photos_sort (MediaPage* base, gboolean so configuration_facade_set_event_photos_sort (G_TYPE_CHECK_INSTANCE_CAST (_tmp1_, TYPE_CONFIGURATION_FACADE, ConfigurationFacade), _tmp2_, _tmp3_); #line 91 "/home/jens/Source/shotwell/src/events/EventPage.vala" _g_object_unref0 (_tmp1_); -#line 1301 "EventPage.c" +#line 1300 "EventPage.c" } @@ -1317,7 +1316,7 @@ static void event_page_on_events_altered (EventPage* self, GeeMap* map) { _tmp2_ = gee_map_has_key (_tmp0_, G_TYPE_CHECK_INSTANCE_CAST (_tmp1_, TYPE_DATA_OBJECT, DataObject)); #line 95 "/home/jens/Source/shotwell/src/events/EventPage.vala" if (_tmp2_) { -#line 1321 "EventPage.c" +#line 1320 "EventPage.c" Event* _tmp3_; gchar* _tmp4_; gchar* _tmp5_; @@ -1331,7 +1330,7 @@ static void event_page_on_events_altered (EventPage* self, GeeMap* map) { page_set_page_name (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_PAGE, Page), _tmp5_); #line 96 "/home/jens/Source/shotwell/src/events/EventPage.vala" _g_free0 (_tmp5_); -#line 1335 "EventPage.c" +#line 1334 "EventPage.c" } } @@ -1356,7 +1355,7 @@ static void event_page_real_on_edit_comment (MediaPage* base) { _data_collection_unref0 (_tmp1_); #line 100 "/home/jens/Source/shotwell/src/events/EventPage.vala" if (_tmp3_) { -#line 1360 "EventPage.c" +#line 1359 "EventPage.c" EditCommentDialog* edit_comment_dialog = NULL; Event* _tmp4_; gchar* _tmp5_; @@ -1404,7 +1403,7 @@ static void event_page_real_on_edit_comment (MediaPage* base) { _multi_text_entry_dialog_mediator_unref0 (edit_comment_dialog); #line 105 "/home/jens/Source/shotwell/src/events/EventPage.vala" return; -#line 1408 "EventPage.c" +#line 1407 "EventPage.c" } #line 107 "/home/jens/Source/shotwell/src/events/EventPage.vala" _tmp12_ = self->priv->page_event; @@ -1432,11 +1431,11 @@ static void event_page_real_on_edit_comment (MediaPage* base) { _multi_text_entry_dialog_mediator_unref0 (edit_comment_dialog); #line 109 "/home/jens/Source/shotwell/src/events/EventPage.vala" return; -#line 1436 "EventPage.c" +#line 1435 "EventPage.c" } #line 112 "/home/jens/Source/shotwell/src/events/EventPage.vala" MEDIA_PAGE_CLASS (event_page_parent_class)->on_edit_comment (G_TYPE_CHECK_INSTANCE_CAST (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_COLLECTION_PAGE, CollectionPage), TYPE_MEDIA_PAGE, MediaPage)); -#line 1440 "EventPage.c" +#line 1439 "EventPage.c" } @@ -1468,7 +1467,7 @@ static void event_page_on_make_primary (EventPage* self) { if (_tmp3_) { #line 117 "/home/jens/Source/shotwell/src/events/EventPage.vala" return; -#line 1472 "EventPage.c" +#line 1471 "EventPage.c" } #line 119 "/home/jens/Source/shotwell/src/events/EventPage.vala" _tmp4_ = self->priv->page_event; @@ -1492,7 +1491,7 @@ static void event_page_on_make_primary (EventPage* self) { _g_object_unref0 (_tmp8_); #line 119 "/home/jens/Source/shotwell/src/events/EventPage.vala" _data_collection_unref0 (_tmp6_); -#line 1496 "EventPage.c" +#line 1495 "EventPage.c" } @@ -1512,7 +1511,7 @@ static void event_page_on_rename (EventPage* self) { library_window_rename_event_in_sidebar (_tmp1_, _tmp2_); #line 123 "/home/jens/Source/shotwell/src/events/EventPage.vala" _g_object_unref0 (_tmp1_); -#line 1516 "EventPage.c" +#line 1515 "EventPage.c" } @@ -1541,14 +1540,14 @@ static void event_page_class_init (EventPageClass * klass) { ((MediaPageClass *) klass)->on_edit_comment = (void (*) (MediaPage *)) event_page_real_on_edit_comment; #line 7 "/home/jens/Source/shotwell/src/events/EventPage.vala" G_OBJECT_CLASS (klass)->finalize = event_page_finalize; -#line 1545 "EventPage.c" +#line 1544 "EventPage.c" } static void event_page_instance_init (EventPage * self) { #line 7 "/home/jens/Source/shotwell/src/events/EventPage.vala" self->priv = EVENT_PAGE_GET_PRIVATE (self); -#line 1552 "EventPage.c" +#line 1551 "EventPage.c" } @@ -1578,7 +1577,7 @@ static void event_page_finalize (GObject * obj) { _g_object_unref0 (self->priv->page_event); #line 7 "/home/jens/Source/shotwell/src/events/EventPage.vala" G_OBJECT_CLASS (event_page_parent_class)->finalize (obj); -#line 1582 "EventPage.c" +#line 1581 "EventPage.c" } @@ -1652,14 +1651,14 @@ NoEventPage* no_event_page_construct (GType object_type) { _view_manager_unref0 (filter); #line 145 "/home/jens/Source/shotwell/src/events/EventPage.vala" return self; -#line 1656 "EventPage.c" +#line 1655 "EventPage.c" } NoEventPage* no_event_page_new (void) { #line 145 "/home/jens/Source/shotwell/src/events/EventPage.vala" return no_event_page_construct (TYPE_NO_EVENT_PAGE); -#line 1663 "EventPage.c" +#line 1662 "EventPage.c" } @@ -1689,13 +1688,13 @@ static void no_event_page_real_get_config_photos_sort (MediaPage* base, gboolean if (sort_order) { #line 153 "/home/jens/Source/shotwell/src/events/EventPage.vala" *sort_order = _vala_sort_order; -#line 1693 "EventPage.c" +#line 1692 "EventPage.c" } #line 153 "/home/jens/Source/shotwell/src/events/EventPage.vala" if (sort_by) { #line 153 "/home/jens/Source/shotwell/src/events/EventPage.vala" *sort_by = _vala_sort_by; -#line 1699 "EventPage.c" +#line 1698 "EventPage.c" } } @@ -1720,7 +1719,7 @@ static void no_event_page_real_set_config_photos_sort (MediaPage* base, gboolean configuration_facade_set_event_photos_sort (G_TYPE_CHECK_INSTANCE_CAST (_tmp1_, TYPE_CONFIGURATION_FACADE, ConfigurationFacade), _tmp2_, _tmp3_); #line 158 "/home/jens/Source/shotwell/src/events/EventPage.vala" _g_object_unref0 (_tmp1_); -#line 1724 "EventPage.c" +#line 1723 "EventPage.c" } @@ -1735,14 +1734,14 @@ static NoEventPageNoEventViewManager* no_event_page_no_event_view_manager_constr self = (NoEventPageNoEventViewManager*) collection_view_manager_construct (object_type, G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, TYPE_COLLECTION_PAGE, CollectionPage)); #line 132 "/home/jens/Source/shotwell/src/events/EventPage.vala" return self; -#line 1739 "EventPage.c" +#line 1738 "EventPage.c" } static NoEventPageNoEventViewManager* no_event_page_no_event_view_manager_new (NoEventPage* page) { #line 132 "/home/jens/Source/shotwell/src/events/EventPage.vala" return no_event_page_no_event_view_manager_construct (NO_EVENT_PAGE_TYPE_NO_EVENT_VIEW_MANAGER, page); -#line 1746 "EventPage.c" +#line 1745 "EventPage.c" } @@ -1767,7 +1766,7 @@ static gboolean no_event_page_no_event_view_manager_real_include_in_view (ViewMa if (_tmp3_ != EVENT_ID_INVALID) { #line 138 "/home/jens/Source/shotwell/src/events/EventPage.vala" _tmp0_ = FALSE; -#line 1771 "EventPage.c" +#line 1770 "EventPage.c" } else { DataSource* _tmp4_; gboolean _tmp5_; @@ -1777,13 +1776,13 @@ static gboolean no_event_page_no_event_view_manager_real_include_in_view (ViewMa _tmp5_ = VIEW_MANAGER_CLASS (no_event_page_no_event_view_manager_parent_class)->include_in_view (G_TYPE_CHECK_INSTANCE_CAST (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_COLLECTION_VIEW_MANAGER, CollectionViewManager), TYPE_VIEW_MANAGER, ViewManager), _tmp4_); #line 139 "/home/jens/Source/shotwell/src/events/EventPage.vala" _tmp0_ = _tmp5_; -#line 1781 "EventPage.c" +#line 1780 "EventPage.c" } #line 138 "/home/jens/Source/shotwell/src/events/EventPage.vala" result = _tmp0_; #line 138 "/home/jens/Source/shotwell/src/events/EventPage.vala" return result; -#line 1787 "EventPage.c" +#line 1786 "EventPage.c" } @@ -1792,7 +1791,7 @@ static void no_event_page_no_event_view_manager_class_init (NoEventPageNoEventVi no_event_page_no_event_view_manager_parent_class = g_type_class_peek_parent (klass); #line 131 "/home/jens/Source/shotwell/src/events/EventPage.vala" ((ViewManagerClass *) klass)->include_in_view = (gboolean (*) (ViewManager *, DataSource*)) no_event_page_no_event_view_manager_real_include_in_view; -#line 1796 "EventPage.c" +#line 1795 "EventPage.c" } @@ -1826,7 +1825,7 @@ static void no_event_page_class_init (NoEventPageClass * klass) { _tmp0_ = alteration_new ("metadata", "event"); #line 143 "/home/jens/Source/shotwell/src/events/EventPage.vala" no_event_page_no_event_page_alteration = _tmp0_; -#line 1830 "EventPage.c" +#line 1829 "EventPage.c" } @@ -1840,7 +1839,7 @@ static void no_event_page_finalize (GObject * obj) { self = G_TYPE_CHECK_INSTANCE_CAST (obj, TYPE_NO_EVENT_PAGE, NoEventPage); #line 127 "/home/jens/Source/shotwell/src/events/EventPage.vala" G_OBJECT_CLASS (no_event_page_parent_class)->finalize (obj); -#line 1844 "EventPage.c" +#line 1843 "EventPage.c" } diff --git a/src/events/EventPage.vala b/src/events/EventPage.vala index 960eee8..a482ab8 100644 --- a/src/events/EventPage.vala +++ b/src/events/EventPage.vala @@ -74,7 +74,7 @@ public class EventPage : CollectionPage { set_action_sensitive("MakePrimary", selected_count == 1); // hide this command in CollectionPage, as it does not apply here - set_action_visible("CommonJumpToEvent", false); + set_action_sensitive("CommonJumpToEvent", false); base.update_actions(selected_count, count); diff --git a/src/events/EventsBranch.c b/src/events/EventsBranch.c new file mode 100644 index 0000000..17ff6eb --- /dev/null +++ b/src/events/EventsBranch.c @@ -0,0 +1,4443 @@ +/* EventsBranch.c generated by valac 0.36.6, the Vala compiler + * generated from EventsBranch.vala, do not modify */ + +/* Copyright 2016 Software Freedom Conservancy Inc. + * + * This software is licensed under the GNU Lesser General Public License + * (version 2.1 or later). See the COPYING file in this distribution. + */ + +#include +#include +#include +#include +#include +#include +#include +#include +#include + + +#define SIDEBAR_TYPE_BRANCH (sidebar_branch_get_type ()) +#define SIDEBAR_BRANCH(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), SIDEBAR_TYPE_BRANCH, SidebarBranch)) +#define SIDEBAR_BRANCH_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), SIDEBAR_TYPE_BRANCH, SidebarBranchClass)) +#define SIDEBAR_IS_BRANCH(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), SIDEBAR_TYPE_BRANCH)) +#define SIDEBAR_IS_BRANCH_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), SIDEBAR_TYPE_BRANCH)) +#define SIDEBAR_BRANCH_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), SIDEBAR_TYPE_BRANCH, SidebarBranchClass)) + +typedef struct _SidebarBranch SidebarBranch; +typedef struct _SidebarBranchClass SidebarBranchClass; +typedef struct _SidebarBranchPrivate SidebarBranchPrivate; + +#define EVENTS_TYPE_BRANCH (events_branch_get_type ()) +#define EVENTS_BRANCH(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), EVENTS_TYPE_BRANCH, EventsBranch)) +#define EVENTS_BRANCH_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), EVENTS_TYPE_BRANCH, EventsBranchClass)) +#define EVENTS_IS_BRANCH(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), EVENTS_TYPE_BRANCH)) +#define EVENTS_IS_BRANCH_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), EVENTS_TYPE_BRANCH)) +#define EVENTS_BRANCH_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), EVENTS_TYPE_BRANCH, EventsBranchClass)) + +typedef struct _EventsBranch EventsBranch; +typedef struct _EventsBranchClass EventsBranchClass; +typedef struct _EventsBranchPrivate EventsBranchPrivate; + +#define TYPE_DATA_OBJECT (data_object_get_type ()) +#define DATA_OBJECT(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_DATA_OBJECT, DataObject)) +#define DATA_OBJECT_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_DATA_OBJECT, DataObjectClass)) +#define IS_DATA_OBJECT(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_DATA_OBJECT)) +#define IS_DATA_OBJECT_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_DATA_OBJECT)) +#define DATA_OBJECT_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_DATA_OBJECT, DataObjectClass)) + +typedef struct _DataObject DataObject; +typedef struct _DataObjectClass DataObjectClass; + +#define TYPE_DATA_SOURCE (data_source_get_type ()) +#define DATA_SOURCE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_DATA_SOURCE, DataSource)) +#define DATA_SOURCE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_DATA_SOURCE, DataSourceClass)) +#define IS_DATA_SOURCE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_DATA_SOURCE)) +#define IS_DATA_SOURCE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_DATA_SOURCE)) +#define DATA_SOURCE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_DATA_SOURCE, DataSourceClass)) + +typedef struct _DataSource DataSource; +typedef struct _DataSourceClass DataSourceClass; + +#define TYPE_THUMBNAIL_SOURCE (thumbnail_source_get_type ()) +#define THUMBNAIL_SOURCE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_THUMBNAIL_SOURCE, ThumbnailSource)) +#define THUMBNAIL_SOURCE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_THUMBNAIL_SOURCE, ThumbnailSourceClass)) +#define IS_THUMBNAIL_SOURCE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_THUMBNAIL_SOURCE)) +#define IS_THUMBNAIL_SOURCE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_THUMBNAIL_SOURCE)) +#define THUMBNAIL_SOURCE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_THUMBNAIL_SOURCE, ThumbnailSourceClass)) + +typedef struct _ThumbnailSource ThumbnailSource; +typedef struct _ThumbnailSourceClass ThumbnailSourceClass; + +#define TYPE_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 SIDEBAR_TYPE_SIMPLE_PAGE_ENTRY (sidebar_simple_page_entry_get_type ()) +#define SIDEBAR_SIMPLE_PAGE_ENTRY(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), SIDEBAR_TYPE_SIMPLE_PAGE_ENTRY, SidebarSimplePageEntry)) +#define SIDEBAR_SIMPLE_PAGE_ENTRY_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), SIDEBAR_TYPE_SIMPLE_PAGE_ENTRY, SidebarSimplePageEntryClass)) +#define SIDEBAR_IS_SIMPLE_PAGE_ENTRY(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), SIDEBAR_TYPE_SIMPLE_PAGE_ENTRY)) +#define SIDEBAR_IS_SIMPLE_PAGE_ENTRY_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), SIDEBAR_TYPE_SIMPLE_PAGE_ENTRY)) +#define SIDEBAR_SIMPLE_PAGE_ENTRY_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), SIDEBAR_TYPE_SIMPLE_PAGE_ENTRY, SidebarSimplePageEntryClass)) + +typedef struct _SidebarSimplePageEntry SidebarSimplePageEntry; +typedef struct _SidebarSimplePageEntryClass SidebarSimplePageEntryClass; + +#define EVENTS_TYPE_EVENT_ENTRY (events_event_entry_get_type ()) +#define EVENTS_EVENT_ENTRY(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), EVENTS_TYPE_EVENT_ENTRY, EventsEventEntry)) +#define EVENTS_EVENT_ENTRY_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), EVENTS_TYPE_EVENT_ENTRY, EventsEventEntryClass)) +#define EVENTS_IS_EVENT_ENTRY(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), EVENTS_TYPE_EVENT_ENTRY)) +#define EVENTS_IS_EVENT_ENTRY_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), EVENTS_TYPE_EVENT_ENTRY)) +#define EVENTS_EVENT_ENTRY_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), EVENTS_TYPE_EVENT_ENTRY, EventsEventEntryClass)) + +typedef struct _EventsEventEntry EventsEventEntry; +typedef struct _EventsEventEntryClass EventsEventEntryClass; + +#define EVENTS_TYPE_DIRECTORY_ENTRY (events_directory_entry_get_type ()) +#define EVENTS_DIRECTORY_ENTRY(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), EVENTS_TYPE_DIRECTORY_ENTRY, EventsDirectoryEntry)) +#define EVENTS_DIRECTORY_ENTRY_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), EVENTS_TYPE_DIRECTORY_ENTRY, EventsDirectoryEntryClass)) +#define EVENTS_IS_DIRECTORY_ENTRY(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), EVENTS_TYPE_DIRECTORY_ENTRY)) +#define EVENTS_IS_DIRECTORY_ENTRY_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), EVENTS_TYPE_DIRECTORY_ENTRY)) +#define EVENTS_DIRECTORY_ENTRY_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), EVENTS_TYPE_DIRECTORY_ENTRY, EventsDirectoryEntryClass)) + +typedef struct _EventsDirectoryEntry EventsDirectoryEntry; +typedef struct _EventsDirectoryEntryClass EventsDirectoryEntryClass; + +#define EVENTS_TYPE_UNDATED_DIRECTORY_ENTRY (events_undated_directory_entry_get_type ()) +#define EVENTS_UNDATED_DIRECTORY_ENTRY(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), EVENTS_TYPE_UNDATED_DIRECTORY_ENTRY, EventsUndatedDirectoryEntry)) +#define EVENTS_UNDATED_DIRECTORY_ENTRY_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), EVENTS_TYPE_UNDATED_DIRECTORY_ENTRY, EventsUndatedDirectoryEntryClass)) +#define EVENTS_IS_UNDATED_DIRECTORY_ENTRY(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), EVENTS_TYPE_UNDATED_DIRECTORY_ENTRY)) +#define EVENTS_IS_UNDATED_DIRECTORY_ENTRY_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), EVENTS_TYPE_UNDATED_DIRECTORY_ENTRY)) +#define EVENTS_UNDATED_DIRECTORY_ENTRY_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), EVENTS_TYPE_UNDATED_DIRECTORY_ENTRY, EventsUndatedDirectoryEntryClass)) + +typedef struct _EventsUndatedDirectoryEntry EventsUndatedDirectoryEntry; +typedef struct _EventsUndatedDirectoryEntryClass EventsUndatedDirectoryEntryClass; + +#define EVENTS_TYPE_NO_EVENT_ENTRY (events_no_event_entry_get_type ()) +#define EVENTS_NO_EVENT_ENTRY(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), EVENTS_TYPE_NO_EVENT_ENTRY, EventsNoEventEntry)) +#define EVENTS_NO_EVENT_ENTRY_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), EVENTS_TYPE_NO_EVENT_ENTRY, EventsNoEventEntryClass)) +#define EVENTS_IS_NO_EVENT_ENTRY(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), EVENTS_TYPE_NO_EVENT_ENTRY)) +#define EVENTS_IS_NO_EVENT_ENTRY_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), EVENTS_TYPE_NO_EVENT_ENTRY)) +#define EVENTS_NO_EVENT_ENTRY_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), EVENTS_TYPE_NO_EVENT_ENTRY, EventsNoEventEntryClass)) + +typedef struct _EventsNoEventEntry EventsNoEventEntry; +typedef struct _EventsNoEventEntryClass EventsNoEventEntryClass; + +#define EVENTS_TYPE_MASTER_DIRECTORY_ENTRY (events_master_directory_entry_get_type ()) +#define EVENTS_MASTER_DIRECTORY_ENTRY(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), EVENTS_TYPE_MASTER_DIRECTORY_ENTRY, EventsMasterDirectoryEntry)) +#define EVENTS_MASTER_DIRECTORY_ENTRY_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), EVENTS_TYPE_MASTER_DIRECTORY_ENTRY, EventsMasterDirectoryEntryClass)) +#define EVENTS_IS_MASTER_DIRECTORY_ENTRY(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), EVENTS_TYPE_MASTER_DIRECTORY_ENTRY)) +#define EVENTS_IS_MASTER_DIRECTORY_ENTRY_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), EVENTS_TYPE_MASTER_DIRECTORY_ENTRY)) +#define EVENTS_MASTER_DIRECTORY_ENTRY_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), EVENTS_TYPE_MASTER_DIRECTORY_ENTRY, EventsMasterDirectoryEntryClass)) + +typedef struct _EventsMasterDirectoryEntry EventsMasterDirectoryEntry; +typedef struct _EventsMasterDirectoryEntryClass EventsMasterDirectoryEntryClass; + +#define TYPE_DATA_COLLECTION (data_collection_get_type ()) +#define DATA_COLLECTION(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_DATA_COLLECTION, DataCollection)) +#define DATA_COLLECTION_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_DATA_COLLECTION, DataCollectionClass)) +#define IS_DATA_COLLECTION(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_DATA_COLLECTION)) +#define IS_DATA_COLLECTION_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_DATA_COLLECTION)) +#define DATA_COLLECTION_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_DATA_COLLECTION, DataCollectionClass)) + +typedef struct _DataCollection DataCollection; +typedef struct _DataCollectionClass DataCollectionClass; + +#define TYPE_SOURCE_COLLECTION (source_collection_get_type ()) +#define SOURCE_COLLECTION(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_SOURCE_COLLECTION, SourceCollection)) +#define SOURCE_COLLECTION_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_SOURCE_COLLECTION, SourceCollectionClass)) +#define IS_SOURCE_COLLECTION(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_SOURCE_COLLECTION)) +#define IS_SOURCE_COLLECTION_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_SOURCE_COLLECTION)) +#define SOURCE_COLLECTION_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_SOURCE_COLLECTION, SourceCollectionClass)) + +typedef struct _SourceCollection SourceCollection; +typedef struct _SourceCollectionClass SourceCollectionClass; + +#define TYPE_DATABASE_SOURCE_COLLECTION (database_source_collection_get_type ()) +#define DATABASE_SOURCE_COLLECTION(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_DATABASE_SOURCE_COLLECTION, DatabaseSourceCollection)) +#define DATABASE_SOURCE_COLLECTION_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_DATABASE_SOURCE_COLLECTION, DatabaseSourceCollectionClass)) +#define IS_DATABASE_SOURCE_COLLECTION(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_DATABASE_SOURCE_COLLECTION)) +#define IS_DATABASE_SOURCE_COLLECTION_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_DATABASE_SOURCE_COLLECTION)) +#define DATABASE_SOURCE_COLLECTION_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_DATABASE_SOURCE_COLLECTION, DatabaseSourceCollectionClass)) + +typedef struct _DatabaseSourceCollection DatabaseSourceCollection; +typedef struct _DatabaseSourceCollectionClass DatabaseSourceCollectionClass; + +#define TYPE_CONTAINER_SOURCE_COLLECTION (container_source_collection_get_type ()) +#define CONTAINER_SOURCE_COLLECTION(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_CONTAINER_SOURCE_COLLECTION, ContainerSourceCollection)) +#define CONTAINER_SOURCE_COLLECTION_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_CONTAINER_SOURCE_COLLECTION, ContainerSourceCollectionClass)) +#define IS_CONTAINER_SOURCE_COLLECTION(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_CONTAINER_SOURCE_COLLECTION)) +#define IS_CONTAINER_SOURCE_COLLECTION_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_CONTAINER_SOURCE_COLLECTION)) +#define CONTAINER_SOURCE_COLLECTION_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_CONTAINER_SOURCE_COLLECTION, ContainerSourceCollectionClass)) + +typedef struct _ContainerSourceCollection ContainerSourceCollection; +typedef struct _ContainerSourceCollectionClass ContainerSourceCollectionClass; + +#define TYPE_EVENT_SOURCE_COLLECTION (event_source_collection_get_type ()) +#define EVENT_SOURCE_COLLECTION(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_EVENT_SOURCE_COLLECTION, EventSourceCollection)) +#define EVENT_SOURCE_COLLECTION_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_EVENT_SOURCE_COLLECTION, EventSourceCollectionClass)) +#define IS_EVENT_SOURCE_COLLECTION(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_EVENT_SOURCE_COLLECTION)) +#define IS_EVENT_SOURCE_COLLECTION_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_EVENT_SOURCE_COLLECTION)) +#define EVENT_SOURCE_COLLECTION_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_EVENT_SOURCE_COLLECTION, EventSourceCollectionClass)) + +typedef struct _EventSourceCollection EventSourceCollection; +typedef struct _EventSourceCollectionClass EventSourceCollectionClass; + +#define TYPE_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_CONFIGURATION_FACADE (configuration_facade_get_type ()) +#define CONFIGURATION_FACADE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_CONFIGURATION_FACADE, ConfigurationFacade)) +#define CONFIGURATION_FACADE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_CONFIGURATION_FACADE, ConfigurationFacadeClass)) +#define IS_CONFIGURATION_FACADE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_CONFIGURATION_FACADE)) +#define IS_CONFIGURATION_FACADE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_CONFIGURATION_FACADE)) +#define CONFIGURATION_FACADE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_CONFIGURATION_FACADE, ConfigurationFacadeClass)) + +typedef struct _ConfigurationFacade ConfigurationFacade; +typedef struct _ConfigurationFacadeClass ConfigurationFacadeClass; + +#define CONFIG_TYPE_FACADE (config_facade_get_type ()) +#define CONFIG_FACADE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), CONFIG_TYPE_FACADE, ConfigFacade)) +#define CONFIG_FACADE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), CONFIG_TYPE_FACADE, ConfigFacadeClass)) +#define CONFIG_IS_FACADE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), CONFIG_TYPE_FACADE)) +#define CONFIG_IS_FACADE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), CONFIG_TYPE_FACADE)) +#define CONFIG_FACADE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), CONFIG_TYPE_FACADE, ConfigFacadeClass)) + +typedef struct _ConfigFacade ConfigFacade; +typedef struct _ConfigFacadeClass ConfigFacadeClass; +#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL))) + +#define SIDEBAR_TYPE_GROUPING (sidebar_grouping_get_type ()) +#define SIDEBAR_GROUPING(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), SIDEBAR_TYPE_GROUPING, SidebarGrouping)) +#define SIDEBAR_GROUPING_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), SIDEBAR_TYPE_GROUPING, SidebarGroupingClass)) +#define SIDEBAR_IS_GROUPING(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), SIDEBAR_TYPE_GROUPING)) +#define SIDEBAR_IS_GROUPING_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), SIDEBAR_TYPE_GROUPING)) +#define SIDEBAR_GROUPING_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), SIDEBAR_TYPE_GROUPING, SidebarGroupingClass)) + +typedef struct _SidebarGrouping SidebarGrouping; +typedef struct _SidebarGroupingClass SidebarGroupingClass; + +#define SIDEBAR_TYPE_HEADER (sidebar_header_get_type ()) +#define SIDEBAR_HEADER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), SIDEBAR_TYPE_HEADER, SidebarHeader)) +#define SIDEBAR_HEADER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), SIDEBAR_TYPE_HEADER, SidebarHeaderClass)) +#define SIDEBAR_IS_HEADER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), SIDEBAR_TYPE_HEADER)) +#define SIDEBAR_IS_HEADER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), SIDEBAR_TYPE_HEADER)) +#define SIDEBAR_HEADER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), SIDEBAR_TYPE_HEADER, SidebarHeaderClass)) + +typedef struct _SidebarHeader SidebarHeader; +typedef struct _SidebarHeaderClass SidebarHeaderClass; + +#define SIDEBAR_TYPE_ENTRY (sidebar_entry_get_type ()) +#define SIDEBAR_ENTRY(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), SIDEBAR_TYPE_ENTRY, SidebarEntry)) +#define SIDEBAR_IS_ENTRY(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), SIDEBAR_TYPE_ENTRY)) +#define SIDEBAR_ENTRY_GET_INTERFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE ((obj), SIDEBAR_TYPE_ENTRY, SidebarEntryIface)) + +typedef struct _SidebarEntry SidebarEntry; +typedef struct _SidebarEntryIface SidebarEntryIface; + +#define SIDEBAR_TYPE_TREE (sidebar_tree_get_type ()) +#define SIDEBAR_TREE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), SIDEBAR_TYPE_TREE, SidebarTree)) +#define SIDEBAR_TREE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), SIDEBAR_TYPE_TREE, SidebarTreeClass)) +#define SIDEBAR_IS_TREE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), SIDEBAR_TYPE_TREE)) +#define SIDEBAR_IS_TREE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), SIDEBAR_TYPE_TREE)) +#define SIDEBAR_TREE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), SIDEBAR_TYPE_TREE, SidebarTreeClass)) + +typedef struct _SidebarTree SidebarTree; +typedef struct _SidebarTreeClass SidebarTreeClass; + +#define SIDEBAR_BRANCH_TYPE_OPTIONS (sidebar_branch_options_get_type ()) + +#define EVENTS_TYPE_YEAR_DIRECTORY_ENTRY (events_year_directory_entry_get_type ()) +#define EVENTS_YEAR_DIRECTORY_ENTRY(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), EVENTS_TYPE_YEAR_DIRECTORY_ENTRY, EventsYearDirectoryEntry)) +#define EVENTS_YEAR_DIRECTORY_ENTRY_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), EVENTS_TYPE_YEAR_DIRECTORY_ENTRY, EventsYearDirectoryEntryClass)) +#define EVENTS_IS_YEAR_DIRECTORY_ENTRY(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), EVENTS_TYPE_YEAR_DIRECTORY_ENTRY)) +#define EVENTS_IS_YEAR_DIRECTORY_ENTRY_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), EVENTS_TYPE_YEAR_DIRECTORY_ENTRY)) +#define EVENTS_YEAR_DIRECTORY_ENTRY_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), EVENTS_TYPE_YEAR_DIRECTORY_ENTRY, EventsYearDirectoryEntryClass)) + +typedef struct _EventsYearDirectoryEntry EventsYearDirectoryEntry; +typedef struct _EventsYearDirectoryEntryClass EventsYearDirectoryEntryClass; + +#define EVENTS_TYPE_MONTH_DIRECTORY_ENTRY (events_month_directory_entry_get_type ()) +#define EVENTS_MONTH_DIRECTORY_ENTRY(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), EVENTS_TYPE_MONTH_DIRECTORY_ENTRY, EventsMonthDirectoryEntry)) +#define EVENTS_MONTH_DIRECTORY_ENTRY_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), EVENTS_TYPE_MONTH_DIRECTORY_ENTRY, EventsMonthDirectoryEntryClass)) +#define EVENTS_IS_MONTH_DIRECTORY_ENTRY(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), EVENTS_TYPE_MONTH_DIRECTORY_ENTRY)) +#define EVENTS_IS_MONTH_DIRECTORY_ENTRY_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), EVENTS_TYPE_MONTH_DIRECTORY_ENTRY)) +#define EVENTS_MONTH_DIRECTORY_ENTRY_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), EVENTS_TYPE_MONTH_DIRECTORY_ENTRY, EventsMonthDirectoryEntryClass)) + +typedef struct _EventsMonthDirectoryEntry EventsMonthDirectoryEntry; +typedef struct _EventsMonthDirectoryEntryClass EventsMonthDirectoryEntryClass; + +#define TYPE_EVENT_ID (event_id_get_type ()) +typedef struct _EventID EventID; +#define _g_free0(var) (var = (g_free (var), NULL)) + +#define SIDEBAR_TYPE_RENAMEABLE_ENTRY (sidebar_renameable_entry_get_type ()) +#define SIDEBAR_RENAMEABLE_ENTRY(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), SIDEBAR_TYPE_RENAMEABLE_ENTRY, SidebarRenameableEntry)) +#define SIDEBAR_IS_RENAMEABLE_ENTRY(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), SIDEBAR_TYPE_RENAMEABLE_ENTRY)) +#define SIDEBAR_RENAMEABLE_ENTRY_GET_INTERFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE ((obj), SIDEBAR_TYPE_RENAMEABLE_ENTRY, SidebarRenameableEntryIface)) + +typedef struct _SidebarRenameableEntry SidebarRenameableEntry; +typedef struct _SidebarRenameableEntryIface SidebarRenameableEntryIface; +#define _alteration_unref0(var) ((var == NULL) ? NULL : (var = (alteration_unref (var), NULL))) +typedef struct _Block8Data Block8Data; +typedef struct _Block9Data Block9Data; + +#define SIDEBAR_TYPE_SELECTABLE_ENTRY (sidebar_selectable_entry_get_type ()) +#define SIDEBAR_SELECTABLE_ENTRY(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), SIDEBAR_TYPE_SELECTABLE_ENTRY, SidebarSelectableEntry)) +#define SIDEBAR_IS_SELECTABLE_ENTRY(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), SIDEBAR_TYPE_SELECTABLE_ENTRY)) +#define SIDEBAR_SELECTABLE_ENTRY_GET_INTERFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE ((obj), SIDEBAR_TYPE_SELECTABLE_ENTRY, SidebarSelectableEntryIface)) + +typedef struct _SidebarSelectableEntry SidebarSelectableEntry; +typedef struct _SidebarSelectableEntryIface SidebarSelectableEntryIface; + +#define SIDEBAR_TYPE_PAGE_REPRESENTATIVE (sidebar_page_representative_get_type ()) +#define SIDEBAR_PAGE_REPRESENTATIVE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), SIDEBAR_TYPE_PAGE_REPRESENTATIVE, SidebarPageRepresentative)) +#define SIDEBAR_IS_PAGE_REPRESENTATIVE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), SIDEBAR_TYPE_PAGE_REPRESENTATIVE)) +#define SIDEBAR_PAGE_REPRESENTATIVE_GET_INTERFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE ((obj), SIDEBAR_TYPE_PAGE_REPRESENTATIVE, SidebarPageRepresentativeIface)) + +typedef struct _SidebarPageRepresentative SidebarPageRepresentative; +typedef struct _SidebarPageRepresentativeIface SidebarPageRepresentativeIface; + +#define TYPE_PAGE (page_get_type ()) +#define PAGE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_PAGE, Page)) +#define PAGE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_PAGE, PageClass)) +#define IS_PAGE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_PAGE)) +#define IS_PAGE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_PAGE)) +#define PAGE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_PAGE, PageClass)) + +typedef struct _Page Page; +typedef struct _PageClass PageClass; + +#define SIDEBAR_TYPE_CONTEXTABLE (sidebar_contextable_get_type ()) +#define SIDEBAR_CONTEXTABLE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), SIDEBAR_TYPE_CONTEXTABLE, SidebarContextable)) +#define SIDEBAR_IS_CONTEXTABLE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), SIDEBAR_TYPE_CONTEXTABLE)) +#define SIDEBAR_CONTEXTABLE_GET_INTERFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE ((obj), SIDEBAR_TYPE_CONTEXTABLE, SidebarContextableIface)) + +typedef struct _SidebarContextable SidebarContextable; +typedef struct _SidebarContextableIface SidebarContextableIface; +typedef struct _SidebarSimplePageEntryPrivate SidebarSimplePageEntryPrivate; + +#define SIDEBAR_TYPE_EXPANDABLE_ENTRY (sidebar_expandable_entry_get_type ()) +#define SIDEBAR_EXPANDABLE_ENTRY(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), SIDEBAR_TYPE_EXPANDABLE_ENTRY, SidebarExpandableEntry)) +#define SIDEBAR_IS_EXPANDABLE_ENTRY(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), SIDEBAR_TYPE_EXPANDABLE_ENTRY)) +#define SIDEBAR_EXPANDABLE_ENTRY_GET_INTERFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE ((obj), SIDEBAR_TYPE_EXPANDABLE_ENTRY, SidebarExpandableEntryIface)) + +typedef struct _SidebarExpandableEntry SidebarExpandableEntry; +typedef struct _SidebarExpandableEntryIface SidebarExpandableEntryIface; +typedef struct _EventsDirectoryEntryPrivate EventsDirectoryEntryPrivate; +typedef struct _EventsMasterDirectoryEntryPrivate EventsMasterDirectoryEntryPrivate; + +#define TYPE_CHECKERBOARD_PAGE (checkerboard_page_get_type ()) +#define CHECKERBOARD_PAGE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_CHECKERBOARD_PAGE, CheckerboardPage)) +#define CHECKERBOARD_PAGE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_CHECKERBOARD_PAGE, CheckerboardPageClass)) +#define IS_CHECKERBOARD_PAGE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_CHECKERBOARD_PAGE)) +#define IS_CHECKERBOARD_PAGE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_CHECKERBOARD_PAGE)) +#define CHECKERBOARD_PAGE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_CHECKERBOARD_PAGE, CheckerboardPageClass)) + +typedef struct _CheckerboardPage CheckerboardPage; +typedef struct _CheckerboardPageClass CheckerboardPageClass; + +#define TYPE_EVENTS_DIRECTORY_PAGE (events_directory_page_get_type ()) +#define EVENTS_DIRECTORY_PAGE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_EVENTS_DIRECTORY_PAGE, EventsDirectoryPage)) +#define EVENTS_DIRECTORY_PAGE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_EVENTS_DIRECTORY_PAGE, EventsDirectoryPageClass)) +#define IS_EVENTS_DIRECTORY_PAGE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_EVENTS_DIRECTORY_PAGE)) +#define IS_EVENTS_DIRECTORY_PAGE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_EVENTS_DIRECTORY_PAGE)) +#define EVENTS_DIRECTORY_PAGE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_EVENTS_DIRECTORY_PAGE, EventsDirectoryPageClass)) + +typedef struct _EventsDirectoryPage EventsDirectoryPage; +typedef struct _EventsDirectoryPageClass EventsDirectoryPageClass; + +#define TYPE_MASTER_EVENTS_DIRECTORY_PAGE (master_events_directory_page_get_type ()) +#define MASTER_EVENTS_DIRECTORY_PAGE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_MASTER_EVENTS_DIRECTORY_PAGE, MasterEventsDirectoryPage)) +#define MASTER_EVENTS_DIRECTORY_PAGE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_MASTER_EVENTS_DIRECTORY_PAGE, MasterEventsDirectoryPageClass)) +#define IS_MASTER_EVENTS_DIRECTORY_PAGE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_MASTER_EVENTS_DIRECTORY_PAGE)) +#define IS_MASTER_EVENTS_DIRECTORY_PAGE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_MASTER_EVENTS_DIRECTORY_PAGE)) +#define MASTER_EVENTS_DIRECTORY_PAGE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_MASTER_EVENTS_DIRECTORY_PAGE, MasterEventsDirectoryPageClass)) + +typedef struct _MasterEventsDirectoryPage MasterEventsDirectoryPage; +typedef struct _MasterEventsDirectoryPageClass MasterEventsDirectoryPageClass; +typedef struct _EventsYearDirectoryEntryPrivate EventsYearDirectoryEntryPrivate; + +#define SUB_EVENTS_DIRECTORY_PAGE_TYPE_DIRECTORY_TYPE (sub_events_directory_page_directory_type_get_type ()) + +#define TYPE_SUB_EVENTS_DIRECTORY_PAGE (sub_events_directory_page_get_type ()) +#define SUB_EVENTS_DIRECTORY_PAGE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_SUB_EVENTS_DIRECTORY_PAGE, SubEventsDirectoryPage)) +#define SUB_EVENTS_DIRECTORY_PAGE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_SUB_EVENTS_DIRECTORY_PAGE, SubEventsDirectoryPageClass)) +#define IS_SUB_EVENTS_DIRECTORY_PAGE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_SUB_EVENTS_DIRECTORY_PAGE)) +#define IS_SUB_EVENTS_DIRECTORY_PAGE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_SUB_EVENTS_DIRECTORY_PAGE)) +#define SUB_EVENTS_DIRECTORY_PAGE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_SUB_EVENTS_DIRECTORY_PAGE, SubEventsDirectoryPageClass)) + +typedef struct _SubEventsDirectoryPage SubEventsDirectoryPage; +typedef struct _SubEventsDirectoryPageClass SubEventsDirectoryPageClass; +typedef struct _EventsMonthDirectoryEntryPrivate EventsMonthDirectoryEntryPrivate; +typedef struct _EventsUndatedDirectoryEntryPrivate EventsUndatedDirectoryEntryPrivate; + +#define SIDEBAR_TYPE_INTERNAL_DROP_TARGET_ENTRY (sidebar_internal_drop_target_entry_get_type ()) +#define SIDEBAR_INTERNAL_DROP_TARGET_ENTRY(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), SIDEBAR_TYPE_INTERNAL_DROP_TARGET_ENTRY, SidebarInternalDropTargetEntry)) +#define SIDEBAR_IS_INTERNAL_DROP_TARGET_ENTRY(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), SIDEBAR_TYPE_INTERNAL_DROP_TARGET_ENTRY)) +#define SIDEBAR_INTERNAL_DROP_TARGET_ENTRY_GET_INTERFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE ((obj), SIDEBAR_TYPE_INTERNAL_DROP_TARGET_ENTRY, SidebarInternalDropTargetEntryIface)) + +typedef struct _SidebarInternalDropTargetEntry SidebarInternalDropTargetEntry; +typedef struct _SidebarInternalDropTargetEntryIface SidebarInternalDropTargetEntryIface; + +#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 _EventsEventEntryPrivate EventsEventEntryPrivate; + +#define TYPE_MEDIA_PAGE (media_page_get_type ()) +#define MEDIA_PAGE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_MEDIA_PAGE, MediaPage)) +#define MEDIA_PAGE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_MEDIA_PAGE, MediaPageClass)) +#define IS_MEDIA_PAGE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_MEDIA_PAGE)) +#define IS_MEDIA_PAGE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_MEDIA_PAGE)) +#define MEDIA_PAGE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_MEDIA_PAGE, MediaPageClass)) + +typedef struct _MediaPage MediaPage; +typedef struct _MediaPageClass MediaPageClass; + +#define TYPE_COLLECTION_PAGE (collection_page_get_type ()) +#define COLLECTION_PAGE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_COLLECTION_PAGE, CollectionPage)) +#define COLLECTION_PAGE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_COLLECTION_PAGE, CollectionPageClass)) +#define IS_COLLECTION_PAGE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_COLLECTION_PAGE)) +#define IS_COLLECTION_PAGE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_COLLECTION_PAGE)) +#define COLLECTION_PAGE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_COLLECTION_PAGE, CollectionPageClass)) + +typedef struct _CollectionPage CollectionPage; +typedef struct _CollectionPageClass CollectionPageClass; + +#define TYPE_EVENT_PAGE (event_page_get_type ()) +#define EVENT_PAGE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_EVENT_PAGE, EventPage)) +#define EVENT_PAGE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_EVENT_PAGE, EventPageClass)) +#define IS_EVENT_PAGE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_EVENT_PAGE)) +#define IS_EVENT_PAGE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_EVENT_PAGE)) +#define EVENT_PAGE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_EVENT_PAGE, EventPageClass)) + +typedef struct _EventPage EventPage; +typedef struct _EventPageClass EventPageClass; + +#define TYPE_COMMAND_MANAGER (command_manager_get_type ()) +#define COMMAND_MANAGER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_COMMAND_MANAGER, CommandManager)) +#define COMMAND_MANAGER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_COMMAND_MANAGER, CommandManagerClass)) +#define IS_COMMAND_MANAGER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_COMMAND_MANAGER)) +#define IS_COMMAND_MANAGER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_COMMAND_MANAGER)) +#define COMMAND_MANAGER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_COMMAND_MANAGER, CommandManagerClass)) + +typedef struct _CommandManager CommandManager; +typedef struct _CommandManagerClass CommandManagerClass; + +#define TYPE_COMMAND (command_get_type ()) +#define COMMAND(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_COMMAND, Command)) +#define COMMAND_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_COMMAND, CommandClass)) +#define IS_COMMAND(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_COMMAND)) +#define IS_COMMAND_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_COMMAND)) +#define COMMAND_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_COMMAND, CommandClass)) + +typedef struct _Command Command; +typedef struct _CommandClass CommandClass; + +#define TYPE_PAGE_COMMAND (page_command_get_type ()) +#define PAGE_COMMAND(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_PAGE_COMMAND, PageCommand)) +#define PAGE_COMMAND_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_PAGE_COMMAND, PageCommandClass)) +#define IS_PAGE_COMMAND(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_PAGE_COMMAND)) +#define IS_PAGE_COMMAND_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_PAGE_COMMAND)) +#define PAGE_COMMAND_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_PAGE_COMMAND, PageCommandClass)) + +typedef struct _PageCommand PageCommand; +typedef struct _PageCommandClass PageCommandClass; + +#define TYPE_SIMPLE_PROXYABLE_COMMAND (simple_proxyable_command_get_type ()) +#define SIMPLE_PROXYABLE_COMMAND(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_SIMPLE_PROXYABLE_COMMAND, SimpleProxyableCommand)) +#define SIMPLE_PROXYABLE_COMMAND_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_SIMPLE_PROXYABLE_COMMAND, SimpleProxyableCommandClass)) +#define IS_SIMPLE_PROXYABLE_COMMAND(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_SIMPLE_PROXYABLE_COMMAND)) +#define IS_SIMPLE_PROXYABLE_COMMAND_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_SIMPLE_PROXYABLE_COMMAND)) +#define SIMPLE_PROXYABLE_COMMAND_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_SIMPLE_PROXYABLE_COMMAND, SimpleProxyableCommandClass)) + +typedef struct _SimpleProxyableCommand SimpleProxyableCommand; +typedef struct _SimpleProxyableCommandClass SimpleProxyableCommandClass; + +#define TYPE_RENAME_EVENT_COMMAND (rename_event_command_get_type ()) +#define RENAME_EVENT_COMMAND(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_RENAME_EVENT_COMMAND, RenameEventCommand)) +#define RENAME_EVENT_COMMAND_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_RENAME_EVENT_COMMAND, RenameEventCommandClass)) +#define IS_RENAME_EVENT_COMMAND(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_RENAME_EVENT_COMMAND)) +#define IS_RENAME_EVENT_COMMAND_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_RENAME_EVENT_COMMAND)) +#define RENAME_EVENT_COMMAND_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_RENAME_EVENT_COMMAND, RenameEventCommandClass)) + +typedef struct _RenameEventCommand RenameEventCommand; +typedef struct _RenameEventCommandClass RenameEventCommandClass; +#define _command_manager_unref0(var) ((var == NULL) ? NULL : (var = (command_manager_unref (var), NULL))) + +#define TYPE_DATA_VIEW (data_view_get_type ()) +#define DATA_VIEW(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_DATA_VIEW, DataView)) +#define DATA_VIEW_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_DATA_VIEW, DataViewClass)) +#define IS_DATA_VIEW(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_DATA_VIEW)) +#define IS_DATA_VIEW_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_DATA_VIEW)) +#define DATA_VIEW_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_DATA_VIEW, DataViewClass)) + +typedef struct _DataView DataView; +typedef struct _DataViewClass DataViewClass; + +#define TYPE_MOVE_PHOTOS_COMMAND (move_photos_command_get_type ()) +#define MOVE_PHOTOS_COMMAND(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_MOVE_PHOTOS_COMMAND, MovePhotosCommand)) +#define MOVE_PHOTOS_COMMAND_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_MOVE_PHOTOS_COMMAND, MovePhotosCommandClass)) +#define IS_MOVE_PHOTOS_COMMAND(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_MOVE_PHOTOS_COMMAND)) +#define IS_MOVE_PHOTOS_COMMAND_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_MOVE_PHOTOS_COMMAND)) +#define MOVE_PHOTOS_COMMAND_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_MOVE_PHOTOS_COMMAND, MovePhotosCommandClass)) + +typedef struct _MovePhotosCommand MovePhotosCommand; +typedef struct _MovePhotosCommandClass MovePhotosCommandClass; + +#define TYPE_SET_EVENT_COMMAND (set_event_command_get_type ()) +#define SET_EVENT_COMMAND(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_SET_EVENT_COMMAND, SetEventCommand)) +#define SET_EVENT_COMMAND_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_SET_EVENT_COMMAND, SetEventCommandClass)) +#define IS_SET_EVENT_COMMAND(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_SET_EVENT_COMMAND)) +#define IS_SET_EVENT_COMMAND_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_SET_EVENT_COMMAND)) +#define SET_EVENT_COMMAND_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_SET_EVENT_COMMAND, SetEventCommandClass)) + +typedef struct _SetEventCommand SetEventCommand; +typedef struct _SetEventCommandClass SetEventCommandClass; +typedef struct _EventsNoEventEntryPrivate EventsNoEventEntryPrivate; + +#define TYPE_NO_EVENT_PAGE (no_event_page_get_type ()) +#define NO_EVENT_PAGE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_NO_EVENT_PAGE, NoEventPage)) +#define NO_EVENT_PAGE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_NO_EVENT_PAGE, NoEventPageClass)) +#define IS_NO_EVENT_PAGE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_NO_EVENT_PAGE)) +#define IS_NO_EVENT_PAGE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_NO_EVENT_PAGE)) +#define NO_EVENT_PAGE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_NO_EVENT_PAGE, NoEventPageClass)) + +typedef struct _NoEventPage NoEventPage; +typedef struct _NoEventPageClass NoEventPageClass; +#define _vala_assert(expr, msg) if G_LIKELY (expr) ; else g_assertion_message_expr (G_LOG_DOMAIN, __FILE__, __LINE__, G_STRFUNC, msg); +#define _vala_return_if_fail(expr, msg) if G_LIKELY (expr) ; else { g_return_if_fail_warning (G_LOG_DOMAIN, G_STRFUNC, msg); return; } +#define _vala_return_val_if_fail(expr, msg, val) if G_LIKELY (expr) ; else { g_return_if_fail_warning (G_LOG_DOMAIN, G_STRFUNC, msg); return val; } +#define _vala_warn_if_fail(expr, msg) if G_LIKELY (expr) ; else g_warn_message (G_LOG_DOMAIN, __FILE__, __LINE__, G_STRFUNC, msg); + +struct _SidebarBranch { + GObject parent_instance; + SidebarBranchPrivate * priv; +}; + +struct _SidebarBranchClass { + GObjectClass parent_class; +}; + +struct _EventsBranch { + SidebarBranch parent_instance; + EventsBranchPrivate * priv; +}; + +struct _EventsBranchClass { + SidebarBranchClass parent_class; +}; + +struct _EventsBranchPrivate { + GeeHashMap* entry_map; + EventsUndatedDirectoryEntry* undated_entry; + EventsNoEventEntry* no_event_entry; + EventsMasterDirectoryEntry* all_events_entry; +}; + +struct _SidebarEntryIface { + GTypeInterface parent_iface; + gchar* (*get_sidebar_name) (SidebarEntry* self); + gchar* (*get_sidebar_tooltip) (SidebarEntry* self); + gchar* (*get_sidebar_icon) (SidebarEntry* self); + gchar* (*to_string) (SidebarEntry* self); + void (*grafted) (SidebarEntry* self, SidebarTree* tree); + void (*pruned) (SidebarEntry* self, SidebarTree* tree); +}; + +typedef enum { + SIDEBAR_BRANCH_OPTIONS_NONE = 0, + SIDEBAR_BRANCH_OPTIONS_HIDE_IF_EMPTY = 1 << 0, + SIDEBAR_BRANCH_OPTIONS_AUTO_OPEN_ON_NEW_CHILD = 1 << 1, + SIDEBAR_BRANCH_OPTIONS_STARTUP_EXPAND_TO_FIRST_CHILD = 1 << 2, + SIDEBAR_BRANCH_OPTIONS_STARTUP_OPEN_GROUPING = 1 << 3 +} SidebarBranchOptions; + +struct _EventID { + gint64 id; +}; + +struct _SidebarRenameableEntryIface { + GTypeInterface parent_iface; + void (*rename) (SidebarRenameableEntry* self, const gchar* new_name); + gboolean (*is_user_renameable) (SidebarRenameableEntry* self); +}; + +struct _Block8Data { + int _ref_count_; + EventsBranch* self; + gint event_month; +}; + +typedef gboolean (*Locator) (gconstpointer item, void* user_data); +struct _Block9Data { + int _ref_count_; + EventsBranch* self; + gint event_year; +}; + +struct _SidebarSelectableEntryIface { + GTypeInterface parent_iface; +}; + +struct _SidebarPageRepresentativeIface { + GTypeInterface parent_iface; + gboolean (*has_page) (SidebarPageRepresentative* self); + Page* (*get_page) (SidebarPageRepresentative* self); +}; + +struct _SidebarContextableIface { + GTypeInterface parent_iface; + GtkMenu* (*get_sidebar_context_menu) (SidebarContextable* self, GdkEventButton* event); +}; + +struct _SidebarSimplePageEntry { + GObject parent_instance; + SidebarSimplePageEntryPrivate * priv; +}; + +struct _SidebarSimplePageEntryClass { + GObjectClass parent_class; + gchar* (*get_sidebar_name) (SidebarSimplePageEntry* self); + gchar* (*get_sidebar_tooltip) (SidebarSimplePageEntry* self); + gchar* (*get_sidebar_icon) (SidebarSimplePageEntry* self); + gchar* (*to_string) (SidebarSimplePageEntry* self); + Page* (*create_page) (SidebarSimplePageEntry* self); +}; + +struct _SidebarExpandableEntryIface { + GTypeInterface parent_iface; + gboolean (*expand_on_select) (SidebarExpandableEntry* self); +}; + +struct _EventsDirectoryEntry { + SidebarSimplePageEntry parent_instance; + EventsDirectoryEntryPrivate * priv; +}; + +struct _EventsDirectoryEntryClass { + SidebarSimplePageEntryClass parent_class; +}; + +struct _EventsMasterDirectoryEntry { + EventsDirectoryEntry parent_instance; + EventsMasterDirectoryEntryPrivate * priv; +}; + +struct _EventsMasterDirectoryEntryClass { + EventsDirectoryEntryClass parent_class; +}; + +struct _EventsYearDirectoryEntry { + EventsDirectoryEntry parent_instance; + EventsYearDirectoryEntryPrivate * priv; +}; + +struct _EventsYearDirectoryEntryClass { + EventsDirectoryEntryClass parent_class; +}; + +struct _EventsYearDirectoryEntryPrivate { + gchar* name; + struct tm tm; +}; + +typedef enum { + SUB_EVENTS_DIRECTORY_PAGE_DIRECTORY_TYPE_YEAR, + SUB_EVENTS_DIRECTORY_PAGE_DIRECTORY_TYPE_MONTH, + SUB_EVENTS_DIRECTORY_PAGE_DIRECTORY_TYPE_UNDATED +} SubEventsDirectoryPageDirectoryType; + +struct _EventsMonthDirectoryEntry { + EventsDirectoryEntry parent_instance; + EventsMonthDirectoryEntryPrivate * priv; +}; + +struct _EventsMonthDirectoryEntryClass { + EventsDirectoryEntryClass parent_class; +}; + +struct _EventsMonthDirectoryEntryPrivate { + gchar* name; + struct tm tm; +}; + +struct _EventsUndatedDirectoryEntry { + EventsDirectoryEntry parent_instance; + EventsUndatedDirectoryEntryPrivate * priv; +}; + +struct _EventsUndatedDirectoryEntryClass { + EventsDirectoryEntryClass parent_class; +}; + +struct _SidebarInternalDropTargetEntryIface { + GTypeInterface parent_iface; + gboolean (*internal_drop_received) (SidebarInternalDropTargetEntry* self, GeeList* sources); + gboolean (*internal_drop_received_arbitrary) (SidebarInternalDropTargetEntry* self, GtkSelectionData* data); +}; + +struct _EventsEventEntry { + SidebarSimplePageEntry parent_instance; + EventsEventEntryPrivate * priv; +}; + +struct _EventsEventEntryClass { + SidebarSimplePageEntryClass parent_class; +}; + +struct _EventsEventEntryPrivate { + Event* event; +}; + +struct _EventsNoEventEntry { + SidebarSimplePageEntry parent_instance; + EventsNoEventEntryPrivate * priv; +}; + +struct _EventsNoEventEntryClass { + SidebarSimplePageEntryClass parent_class; +}; + + +static gpointer events_branch_parent_class = NULL; +extern EventSourceCollection* event_global; +extern gchar* events_branch_icon; +gchar* events_branch_icon = NULL; +extern gchar* events_branch_events_icon; +gchar* events_branch_events_icon = NULL; +extern gchar* events_branch_single_event_icon; +gchar* events_branch_single_event_icon = NULL; +extern gchar* events_branch_no_event_icon; +gchar* events_branch_no_event_icon = NULL; +static gboolean events_branch_sort_ascending; +static gboolean events_branch_sort_ascending = FALSE; +static gpointer events_directory_entry_parent_class = NULL; +static SidebarExpandableEntryIface * events_directory_entry_sidebar_expandable_entry_parent_iface = NULL; +static gpointer events_master_directory_entry_parent_class = NULL; +static gpointer events_year_directory_entry_parent_class = NULL; +static gpointer events_month_directory_entry_parent_class = NULL; +static gpointer events_undated_directory_entry_parent_class = NULL; +static gpointer events_event_entry_parent_class = NULL; +static SidebarRenameableEntryIface * events_event_entry_sidebar_renameable_entry_parent_iface = NULL; +static SidebarInternalDropTargetEntryIface * events_event_entry_sidebar_internal_drop_target_entry_parent_iface = NULL; +static gpointer events_no_event_entry_parent_class = NULL; + +GType sidebar_branch_get_type (void) G_GNUC_CONST; +GType events_branch_get_type (void) G_GNUC_CONST; +GType data_object_get_type (void) G_GNUC_CONST; +GType data_source_get_type (void) G_GNUC_CONST; +GType thumbnail_source_get_type (void) G_GNUC_CONST; +GType event_source_get_type (void) G_GNUC_CONST; +GType event_get_type (void) G_GNUC_CONST; +GType sidebar_simple_page_entry_get_type (void) G_GNUC_CONST; +GType events_event_entry_get_type (void) G_GNUC_CONST; +GType events_directory_entry_get_type (void) G_GNUC_CONST; +GType events_undated_directory_entry_get_type (void) G_GNUC_CONST; +GType events_no_event_entry_get_type (void) G_GNUC_CONST; +GType events_master_directory_entry_get_type (void) G_GNUC_CONST; +#define EVENTS_BRANCH_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), EVENTS_TYPE_BRANCH, EventsBranchPrivate)) +enum { + EVENTS_BRANCH_DUMMY_PROPERTY +}; +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 source_collection_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 event_source_collection_get_type (void) G_GNUC_CONST; +static void events_branch_on_events_added_removed (EventsBranch* self, GeeIterable* added, GeeIterable* removed); +static void _events_branch_on_events_added_removed_data_collection_contents_altered (DataCollection* _sender, GeeIterable* added, GeeIterable* removed, gpointer self); +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; +static void events_branch_on_events_altered (EventsBranch* self, GeeMap* altered); +static void _events_branch_on_events_altered_data_collection_items_altered (DataCollection* _sender, GeeMap* items, gpointer self); +static void events_branch_on_no_event_collection_altered (EventsBranch* self); +static void _events_branch_on_no_event_collection_altered_event_source_collection_no_event_collection_altered (EventSourceCollection* _sender, gpointer self); +GType configuration_facade_get_type (void) G_GNUC_CONST; +GType config_facade_get_type (void) G_GNUC_CONST; +ConfigFacade* config_facade_get_instance (void); +static void events_branch_on_config_changed (EventsBranch* self); +static void _events_branch_on_config_changed_configuration_facade_events_sort_ascending_changed (ConfigurationFacade* _sender, gpointer self); +#define RESOURCES_ICON_FOLDER "folder" +#define RESOURCES_ICON_EVENTS "multiple-events" +#define RESOURCES_ICON_ONE_EVENT "one-event" +#define RESOURCES_ICON_NO_EVENT "no-event" +EventsUndatedDirectoryEntry* events_undated_directory_entry_new (void); +EventsUndatedDirectoryEntry* events_undated_directory_entry_construct (GType object_type); +EventsNoEventEntry* events_no_event_entry_new (void); +EventsNoEventEntry* events_no_event_entry_construct (GType object_type); +EventsMasterDirectoryEntry* events_master_directory_entry_new (void); +EventsMasterDirectoryEntry* events_master_directory_entry_construct (GType object_type); +EventsBranch* events_branch_new (void); +EventsBranch* events_branch_construct (GType object_type); +SidebarHeader* sidebar_header_new (const gchar* name, const gchar* tooltip, gboolean emphasized); +SidebarHeader* sidebar_header_construct (GType object_type, const gchar* name, const gchar* tooltip, gboolean emphasized); +GType sidebar_grouping_get_type (void) G_GNUC_CONST; +GType sidebar_header_get_type (void) G_GNUC_CONST; +GType sidebar_tree_get_type (void) G_GNUC_CONST; +GType sidebar_entry_get_type (void) G_GNUC_CONST; +GType sidebar_branch_options_get_type (void) G_GNUC_CONST; +static gint events_branch_event_year_comparator (SidebarEntry* a, SidebarEntry* b); +static gint _events_branch_event_year_comparator_gcompare_func (gconstpointer a, gconstpointer b); +SidebarBranch* sidebar_branch_new (SidebarEntry* root, SidebarBranchOptions options, GCompareFunc default_comparator, GCompareFunc root_comparator); +SidebarBranch* sidebar_branch_construct (GType object_type, SidebarEntry* root, SidebarBranchOptions options, GCompareFunc default_comparator, GCompareFunc root_comparator); +void sidebar_branch_graft (SidebarBranch* self, SidebarEntry* parent, SidebarEntry* entry, GCompareFunc comparator); +SidebarEntry* sidebar_branch_get_root (SidebarBranch* self); +GeeCollection* data_collection_get_all (DataCollection* self); +static void events_branch_add_event (EventsBranch* self, Event* event); +static void events_branch_show_no_events (EventsBranch* self, gboolean show); +GeeCollection* event_source_collection_get_no_event_objects (EventSourceCollection* self); +void events_branch_init (void); +gboolean configuration_facade_get_events_sort_ascending (ConfigurationFacade* self); +void events_branch_terminate (void); +gboolean events_branch_is_user_renameable (EventsBranch* self); +EventsMasterDirectoryEntry* events_branch_get_master_entry (EventsBranch* self); +GType events_year_directory_entry_get_type (void) G_GNUC_CONST; +gint events_year_directory_entry_get_year (EventsYearDirectoryEntry* self); +static gint events_branch_event_month_comparator (SidebarEntry* a, SidebarEntry* b); +GType events_month_directory_entry_get_type (void) G_GNUC_CONST; +gint events_month_directory_entry_get_month (EventsMonthDirectoryEntry* self); +static gint events_branch_event_comparator (SidebarEntry* a, SidebarEntry* b); +Event* events_event_entry_get_event (EventsEventEntry* self); +time_t event_source_get_start_time (EventSource* self); +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); +static gint events_branch_undated_event_comparator (SidebarEntry* a, SidebarEntry* b); +gchar* data_object_get_name (DataObject* self); +gint64 data_source_get_instance_id (DataSource* self); +EventsEventEntry* events_branch_get_entry_for_event (EventsBranch* self, Event* event); +void sidebar_branch_reorder_all (SidebarBranch* self); +static void events_branch_remove_event (EventsBranch* self, Event* event); +gboolean alteration_has_detail (Alteration* self, const gchar* subject, const gchar* detail); +static void events_branch_move_event (EventsBranch* self, Event* event); +GType sidebar_renameable_entry_get_type (void) G_GNUC_CONST; +static void events_branch_add_undated_event (EventsBranch* self, Event* event); +static SidebarEntry* events_branch_find_event_month (EventsBranch* self, Event* event, struct tm* event_tm, SidebarEntry* * found_year); +static void events_branch_graft_event (EventsBranch* self, SidebarEntry* parent, Event* event, GCompareFunc comparator); +static gint _events_branch_event_comparator_gcompare_func (gconstpointer a, gconstpointer b); +#define SUB_EVENTS_DIRECTORY_PAGE_YEAR_FORMAT _ ("%Y") +EventsYearDirectoryEntry* events_year_directory_entry_new (const gchar* name, struct tm* tm); +EventsYearDirectoryEntry* events_year_directory_entry_construct (GType object_type, const gchar* name, struct tm* tm); +static gint _events_branch_event_month_comparator_gcompare_func (gconstpointer a, gconstpointer b); +#define SUB_EVENTS_DIRECTORY_PAGE_MONTH_FORMAT _ ("%B") +EventsMonthDirectoryEntry* events_month_directory_entry_new (const gchar* name, struct tm* tm); +EventsMonthDirectoryEntry* events_month_directory_entry_construct (GType object_type, const gchar* name, struct tm* tm); +static void events_branch_move_to_undated_event (EventsBranch* self, Event* event); +static void events_branch_reparent_event (EventsBranch* self, Event* event, SidebarEntry* new_parent); +SidebarEntry* sidebar_branch_get_parent (SidebarBranch* self, SidebarEntry* entry); +void sidebar_branch_prune (SidebarBranch* self, SidebarEntry* entry); +gint sidebar_branch_get_child_count (SidebarBranch* self, SidebarEntry* parent); +static Block8Data* block8_data_ref (Block8Data* _data8_); +static void block8_data_unref (void * _userdata_); +static SidebarEntry* events_branch_find_event_year (EventsBranch* self, Event* event, struct tm* event_tm); +SidebarEntry* sidebar_branch_find_first_child (SidebarBranch* self, SidebarEntry* parent, Locator locator, void* locator_target); +static gboolean __lambda21_ (Block8Data* _data8_, SidebarEntry* entry); +static gboolean ___lambda21__locator (gconstpointer item, gpointer self); +static Block9Data* block9_data_ref (Block9Data* _data9_); +static void block9_data_unref (void * _userdata_); +static gboolean __lambda20_ (Block9Data* _data9_, SidebarEntry* entry); +static gboolean ___lambda20__locator (gconstpointer item, gpointer self); +gboolean sidebar_branch_has_entry (SidebarBranch* self, SidebarEntry* entry); +static gint _events_branch_undated_event_comparator_gcompare_func (gconstpointer a, gconstpointer b); +EventsEventEntry* events_event_entry_new (Event* event); +EventsEventEntry* events_event_entry_construct (GType object_type, Event* event); +void sidebar_branch_reparent (SidebarBranch* self, SidebarEntry* new_parent, SidebarEntry* entry); +static void events_branch_finalize (GObject * obj); +GType sidebar_selectable_entry_get_type (void) G_GNUC_CONST; +GType page_get_type (void) G_GNUC_CONST; +GType sidebar_page_representative_get_type (void) G_GNUC_CONST; +GType sidebar_contextable_get_type (void) G_GNUC_CONST; +GType sidebar_expandable_entry_get_type (void) G_GNUC_CONST; +enum { + EVENTS_DIRECTORY_ENTRY_DUMMY_PROPERTY +}; +EventsDirectoryEntry* events_directory_entry_construct (GType object_type); +SidebarSimplePageEntry* sidebar_simple_page_entry_construct (GType object_type); +static gchar* events_directory_entry_real_get_sidebar_icon (SidebarSimplePageEntry* base); +static gboolean events_directory_entry_real_expand_on_select (SidebarExpandableEntry* base); +enum { + EVENTS_MASTER_DIRECTORY_ENTRY_DUMMY_PROPERTY +}; +static gchar* events_master_directory_entry_real_get_sidebar_name (SidebarSimplePageEntry* base); +#define MASTER_EVENTS_DIRECTORY_PAGE_NAME _ ("All Events") +static gchar* events_master_directory_entry_real_get_sidebar_icon (SidebarSimplePageEntry* base); +static Page* events_master_directory_entry_real_create_page (SidebarSimplePageEntry* base); +MasterEventsDirectoryPage* master_events_directory_page_new (void); +MasterEventsDirectoryPage* master_events_directory_page_construct (GType object_type); +GType checkerboard_page_get_type (void) G_GNUC_CONST; +GType events_directory_page_get_type (void) G_GNUC_CONST; +GType master_events_directory_page_get_type (void) G_GNUC_CONST; +#define EVENTS_YEAR_DIRECTORY_ENTRY_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), EVENTS_TYPE_YEAR_DIRECTORY_ENTRY, EventsYearDirectoryEntryPrivate)) +enum { + EVENTS_YEAR_DIRECTORY_ENTRY_DUMMY_PROPERTY +}; +static gchar* events_year_directory_entry_real_get_sidebar_name (SidebarSimplePageEntry* base); +static Page* events_year_directory_entry_real_create_page (SidebarSimplePageEntry* base); +GType sub_events_directory_page_directory_type_get_type (void) G_GNUC_CONST; +SubEventsDirectoryPage* sub_events_directory_page_new (SubEventsDirectoryPageDirectoryType type, struct tm* time); +SubEventsDirectoryPage* sub_events_directory_page_construct (GType object_type, SubEventsDirectoryPageDirectoryType type, struct tm* time); +GType sub_events_directory_page_get_type (void) G_GNUC_CONST; +static void events_year_directory_entry_finalize (GObject * obj); +#define EVENTS_MONTH_DIRECTORY_ENTRY_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), EVENTS_TYPE_MONTH_DIRECTORY_ENTRY, EventsMonthDirectoryEntryPrivate)) +enum { + EVENTS_MONTH_DIRECTORY_ENTRY_DUMMY_PROPERTY +}; +static gchar* events_month_directory_entry_real_get_sidebar_name (SidebarSimplePageEntry* base); +gint events_month_directory_entry_get_year (EventsMonthDirectoryEntry* self); +static Page* events_month_directory_entry_real_create_page (SidebarSimplePageEntry* base); +static void events_month_directory_entry_finalize (GObject * obj); +enum { + EVENTS_UNDATED_DIRECTORY_ENTRY_DUMMY_PROPERTY +}; +static gchar* events_undated_directory_entry_real_get_sidebar_name (SidebarSimplePageEntry* base); +#define SUB_EVENTS_DIRECTORY_PAGE_UNDATED_PAGE_NAME _ ("Undated") +static Page* events_undated_directory_entry_real_create_page (SidebarSimplePageEntry* base); +GType media_source_get_type (void) G_GNUC_CONST; +GType sidebar_internal_drop_target_entry_get_type (void) G_GNUC_CONST; +#define EVENTS_EVENT_ENTRY_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), EVENTS_TYPE_EVENT_ENTRY, EventsEventEntryPrivate)) +enum { + EVENTS_EVENT_ENTRY_DUMMY_PROPERTY +}; +static gchar* events_event_entry_real_get_sidebar_name (SidebarSimplePageEntry* base); +static gchar* events_event_entry_real_get_sidebar_icon (SidebarSimplePageEntry* base); +static Page* events_event_entry_real_create_page (SidebarSimplePageEntry* base); +EventPage* event_page_new (Event* page_event); +EventPage* event_page_construct (GType object_type, Event* page_event); +GType media_page_get_type (void) G_GNUC_CONST; +GType collection_page_get_type (void) G_GNUC_CONST; +GType event_page_get_type (void) G_GNUC_CONST; +static gboolean events_event_entry_real_is_user_renameable (SidebarRenameableEntry* base); +static void events_event_entry_real_rename (SidebarRenameableEntry* base, const gchar* new_name); +gchar* event_prep_event_name (const gchar* name); +gpointer command_manager_ref (gpointer instance); +void command_manager_unref (gpointer instance); +GParamSpec* param_spec_command_manager (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags); +void value_set_command_manager (GValue* value, gpointer v_object); +void value_take_command_manager (GValue* value, gpointer v_object); +gpointer value_get_command_manager (const GValue* value); +GType command_manager_get_type (void) G_GNUC_CONST; +CommandManager* app_window_get_command_manager (void); +GType command_get_type (void) G_GNUC_CONST; +void command_manager_execute (CommandManager* self, Command* command); +RenameEventCommand* rename_event_command_new (Event* event, const gchar* new_name); +RenameEventCommand* rename_event_command_construct (GType object_type, Event* event, const gchar* new_name); +GType page_command_get_type (void) G_GNUC_CONST; +GType simple_proxyable_command_get_type (void) G_GNUC_CONST; +GType rename_event_command_get_type (void) G_GNUC_CONST; +static gboolean events_event_entry_real_internal_drop_received (SidebarInternalDropTargetEntry* base, GeeList* media); +GType data_view_get_type (void) G_GNUC_CONST; +DataView* data_view_new (DataSource* source); +DataView* data_view_construct (GType object_type, DataSource* source); +SetEventCommand* set_event_command_new (GeeIterable* iter, Event* new_event); +SetEventCommand* set_event_command_construct (GType object_type, GeeIterable* iter, Event* new_event); +GType move_photos_command_get_type (void) G_GNUC_CONST; +GType set_event_command_get_type (void) G_GNUC_CONST; +static gboolean events_event_entry_real_internal_drop_received_arbitrary (SidebarInternalDropTargetEntry* base, GtkSelectionData* data); +static void events_event_entry_finalize (GObject * obj); +enum { + EVENTS_NO_EVENT_ENTRY_DUMMY_PROPERTY +}; +static gchar* events_no_event_entry_real_get_sidebar_name (SidebarSimplePageEntry* base); +#define NO_EVENT_PAGE_NAME _ ("No Event") +static gchar* events_no_event_entry_real_get_sidebar_icon (SidebarSimplePageEntry* base); +static Page* events_no_event_entry_real_create_page (SidebarSimplePageEntry* base); +NoEventPage* no_event_page_new (void); +NoEventPage* no_event_page_construct (GType object_type); +GType no_event_page_get_type (void) G_GNUC_CONST; + + +static void _events_branch_on_events_added_removed_data_collection_contents_altered (DataCollection* _sender, GeeIterable* added, GeeIterable* removed, gpointer self) { +#line 47 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + events_branch_on_events_added_removed ((EventsBranch*) self, added, removed); +#line 997 "EventsBranch.c" +} + + +static void _events_branch_on_events_altered_data_collection_items_altered (DataCollection* _sender, GeeMap* items, gpointer self) { +#line 48 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + events_branch_on_events_altered ((EventsBranch*) self, items); +#line 1004 "EventsBranch.c" +} + + +static void _events_branch_on_no_event_collection_altered_event_source_collection_no_event_collection_altered (EventSourceCollection* _sender, gpointer self) { +#line 49 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + events_branch_on_no_event_collection_altered ((EventsBranch*) self); +#line 1011 "EventsBranch.c" +} + + +static void _events_branch_on_config_changed_configuration_facade_events_sort_ascending_changed (ConfigurationFacade* _sender, gpointer self) { +#line 51 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + events_branch_on_config_changed ((EventsBranch*) self); +#line 1018 "EventsBranch.c" +} + + +static gint _events_branch_event_year_comparator_gcompare_func (gconstpointer a, gconstpointer b) { + gint result; + result = events_branch_event_year_comparator ((SidebarEntry*) a, (SidebarEntry*) b); +#line 25 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + return result; +#line 1027 "EventsBranch.c" +} + + +EventsBranch* events_branch_construct (GType object_type) { + EventsBranch * self = NULL; + SidebarHeader* _tmp0_; + SidebarHeader* _tmp1_; + SidebarEntry* _tmp2_; + SidebarEntry* _tmp3_; + EventsMasterDirectoryEntry* _tmp4_; + EventSourceCollection* _tmp15_; + GeeCollection* _tmp16_; + GeeCollection* _tmp17_; + gint _tmp18_; + gint _tmp19_; + EventSourceCollection* _tmp20_; + EventSourceCollection* _tmp21_; + EventSourceCollection* _tmp22_; + ConfigFacade* _tmp23_; + ConfigFacade* _tmp24_; +#line 25 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + _tmp0_ = sidebar_header_new (_ ("Events"), _ ("Browse through your events"), TRUE); +#line 25 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + _tmp1_ = _tmp0_; +#line 25 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + self = (EventsBranch*) sidebar_branch_construct (object_type, G_TYPE_CHECK_INSTANCE_CAST (_tmp1_, SIDEBAR_TYPE_ENTRY, SidebarEntry), SIDEBAR_BRANCH_OPTIONS_STARTUP_EXPAND_TO_FIRST_CHILD, _events_branch_event_year_comparator_gcompare_func, NULL); +#line 25 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + _g_object_unref0 (_tmp1_); +#line 29 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + _tmp2_ = sidebar_branch_get_root (G_TYPE_CHECK_INSTANCE_CAST (self, SIDEBAR_TYPE_BRANCH, SidebarBranch)); +#line 29 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + _tmp3_ = _tmp2_; +#line 29 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + _tmp4_ = self->priv->all_events_entry; +#line 29 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + sidebar_branch_graft (G_TYPE_CHECK_INSTANCE_CAST (self, SIDEBAR_TYPE_BRANCH, SidebarBranch), _tmp3_, G_TYPE_CHECK_INSTANCE_CAST (_tmp4_, SIDEBAR_TYPE_ENTRY, SidebarEntry), NULL); +#line 29 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + _g_object_unref0 (_tmp3_); +#line 1066 "EventsBranch.c" + { + GeeIterator* _object_it = NULL; + EventSourceCollection* _tmp5_; + GeeCollection* _tmp6_; + GeeCollection* _tmp7_; + GeeIterator* _tmp8_; + GeeIterator* _tmp9_; +#line 32 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + _tmp5_ = event_global; +#line 32 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + _tmp6_ = data_collection_get_all (G_TYPE_CHECK_INSTANCE_CAST (_tmp5_, TYPE_DATA_COLLECTION, DataCollection)); +#line 32 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + _tmp7_ = _tmp6_; +#line 32 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + _tmp8_ = gee_iterable_iterator (G_TYPE_CHECK_INSTANCE_CAST (_tmp7_, GEE_TYPE_ITERABLE, GeeIterable)); +#line 32 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + _tmp9_ = _tmp8_; +#line 32 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + _g_object_unref0 (_tmp7_); +#line 32 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + _object_it = _tmp9_; +#line 32 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + while (TRUE) { +#line 1090 "EventsBranch.c" + GeeIterator* _tmp10_; + gboolean _tmp11_; + DataObject* object = NULL; + GeeIterator* _tmp12_; + gpointer _tmp13_; + DataObject* _tmp14_; +#line 32 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + _tmp10_ = _object_it; +#line 32 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + _tmp11_ = gee_iterator_next (_tmp10_); +#line 32 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + if (!_tmp11_) { +#line 32 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + break; +#line 1105 "EventsBranch.c" + } +#line 32 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + _tmp12_ = _object_it; +#line 32 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + _tmp13_ = gee_iterator_get (_tmp12_); +#line 32 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + object = (DataObject*) _tmp13_; +#line 33 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + _tmp14_ = object; +#line 33 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + events_branch_add_event (self, G_TYPE_CHECK_INSTANCE_CAST (_tmp14_, TYPE_EVENT, Event)); +#line 32 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + _g_object_unref0 (object); +#line 1119 "EventsBranch.c" + } +#line 32 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + _g_object_unref0 (_object_it); +#line 1123 "EventsBranch.c" + } +#line 35 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + _tmp15_ = event_global; +#line 35 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + _tmp16_ = event_source_collection_get_no_event_objects (_tmp15_); +#line 35 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + _tmp17_ = _tmp16_; +#line 35 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + _tmp18_ = gee_collection_get_size (_tmp17_); +#line 35 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + _tmp19_ = _tmp18_; +#line 35 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + events_branch_show_no_events (self, _tmp19_ > 0); +#line 35 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + _g_object_unref0 (_tmp17_); +#line 38 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + _tmp20_ = event_global; +#line 38 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + g_signal_connect_object (G_TYPE_CHECK_INSTANCE_CAST (_tmp20_, TYPE_DATA_COLLECTION, DataCollection), "contents-altered", (GCallback) _events_branch_on_events_added_removed_data_collection_contents_altered, self, 0); +#line 39 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + _tmp21_ = event_global; +#line 39 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + g_signal_connect_object (G_TYPE_CHECK_INSTANCE_CAST (_tmp21_, TYPE_DATA_COLLECTION, DataCollection), "items-altered", (GCallback) _events_branch_on_events_altered_data_collection_items_altered, self, 0); +#line 40 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + _tmp22_ = event_global; +#line 40 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + g_signal_connect_object (_tmp22_, "no-event-collection-altered", (GCallback) _events_branch_on_no_event_collection_altered_event_source_collection_no_event_collection_altered, self, 0); +#line 43 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + _tmp23_ = config_facade_get_instance (); +#line 43 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + _tmp24_ = _tmp23_; +#line 43 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + g_signal_connect_object (G_TYPE_CHECK_INSTANCE_CAST (_tmp24_, TYPE_CONFIGURATION_FACADE, ConfigurationFacade), "events-sort-ascending-changed", (GCallback) _events_branch_on_config_changed_configuration_facade_events_sort_ascending_changed, self, 0); +#line 43 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + _g_object_unref0 (_tmp24_); +#line 24 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + return self; +#line 1161 "EventsBranch.c" +} + + +EventsBranch* events_branch_new (void) { +#line 24 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + return events_branch_construct (EVENTS_TYPE_BRANCH); +#line 1168 "EventsBranch.c" +} + + +void events_branch_init (void) { + ConfigFacade* _tmp0_; + ConfigFacade* _tmp1_; + gboolean _tmp2_; +#line 55 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + _tmp0_ = config_facade_get_instance (); +#line 55 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + _tmp1_ = _tmp0_; +#line 55 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + _tmp2_ = configuration_facade_get_events_sort_ascending (G_TYPE_CHECK_INSTANCE_CAST (_tmp1_, TYPE_CONFIGURATION_FACADE, ConfigurationFacade)); +#line 55 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + events_branch_sort_ascending = _tmp2_; +#line 55 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + _g_object_unref0 (_tmp1_); +#line 1186 "EventsBranch.c" +} + + +void events_branch_terminate (void) { +} + + +gboolean events_branch_is_user_renameable (EventsBranch* self) { + gboolean result = FALSE; +#line 61 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + g_return_val_if_fail (EVENTS_IS_BRANCH (self), FALSE); +#line 62 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + result = TRUE; +#line 62 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + return result; +#line 1202 "EventsBranch.c" +} + + +static gpointer _g_object_ref0 (gpointer self) { +#line 66 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + return self ? g_object_ref (self) : NULL; +#line 1209 "EventsBranch.c" +} + + +EventsMasterDirectoryEntry* events_branch_get_master_entry (EventsBranch* self) { + EventsMasterDirectoryEntry* result = NULL; + EventsMasterDirectoryEntry* _tmp0_; + EventsMasterDirectoryEntry* _tmp1_; +#line 65 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + g_return_val_if_fail (EVENTS_IS_BRANCH (self), NULL); +#line 66 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + _tmp0_ = self->priv->all_events_entry; +#line 66 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + _tmp1_ = _g_object_ref0 (_tmp0_); +#line 66 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + result = _tmp1_; +#line 66 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + return result; +#line 1227 "EventsBranch.c" +} + + +static gint events_branch_event_year_comparator (SidebarEntry* a, SidebarEntry* b) { + gint result = 0; + SidebarEntry* _tmp0_; + SidebarEntry* _tmp1_; + SidebarEntry* _tmp2_; + SidebarEntry* _tmp6_; + SidebarEntry* _tmp8_; + gboolean _tmp10_; + gint _result_ = 0; + SidebarEntry* _tmp15_; + gint _tmp16_; + SidebarEntry* _tmp17_; + gint _tmp18_; + gint _tmp19_; +#line 69 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + g_return_val_if_fail (SIDEBAR_IS_ENTRY (a), 0); +#line 69 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + g_return_val_if_fail (SIDEBAR_IS_ENTRY (b), 0); +#line 70 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + _tmp0_ = a; +#line 70 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + _tmp1_ = b; +#line 70 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + if (_tmp0_ == _tmp1_) { +#line 71 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + result = 0; +#line 71 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + return result; +#line 1259 "EventsBranch.c" + } +#line 75 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + _tmp2_ = a; +#line 75 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + if (G_TYPE_CHECK_INSTANCE_TYPE (_tmp2_, EVENTS_TYPE_UNDATED_DIRECTORY_ENTRY)) { +#line 1265 "EventsBranch.c" + SidebarEntry* _tmp3_; +#line 76 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + _tmp3_ = b; +#line 76 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + if (G_TYPE_CHECK_INSTANCE_TYPE (_tmp3_, EVENTS_TYPE_NO_EVENT_ENTRY)) { +#line 77 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + result = -1; +#line 77 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + return result; +#line 1275 "EventsBranch.c" + } +#line 78 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + result = 1; +#line 78 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + return result; +#line 1281 "EventsBranch.c" + } else { + SidebarEntry* _tmp4_; +#line 79 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + _tmp4_ = b; +#line 79 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + if (G_TYPE_CHECK_INSTANCE_TYPE (_tmp4_, EVENTS_TYPE_UNDATED_DIRECTORY_ENTRY)) { +#line 1288 "EventsBranch.c" + SidebarEntry* _tmp5_; +#line 80 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + _tmp5_ = a; +#line 80 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + if (G_TYPE_CHECK_INSTANCE_TYPE (_tmp5_, EVENTS_TYPE_NO_EVENT_ENTRY)) { +#line 81 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + result = 1; +#line 81 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + return result; +#line 1298 "EventsBranch.c" + } +#line 82 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + result = -1; +#line 82 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + return result; +#line 1304 "EventsBranch.c" + } + } +#line 85 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + _tmp6_ = a; +#line 85 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + if (G_TYPE_CHECK_INSTANCE_TYPE (_tmp6_, EVENTS_TYPE_NO_EVENT_ENTRY)) { +#line 86 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + result = 1; +#line 86 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + return result; +#line 1315 "EventsBranch.c" + } else { + SidebarEntry* _tmp7_; +#line 87 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + _tmp7_ = b; +#line 87 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + if (G_TYPE_CHECK_INSTANCE_TYPE (_tmp7_, EVENTS_TYPE_NO_EVENT_ENTRY)) { +#line 88 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + result = -1; +#line 88 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + return result; +#line 1326 "EventsBranch.c" + } + } +#line 91 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + _tmp8_ = a; +#line 91 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + if (G_TYPE_CHECK_INSTANCE_TYPE (_tmp8_, EVENTS_TYPE_MASTER_DIRECTORY_ENTRY)) { +#line 92 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + result = -1; +#line 92 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + return result; +#line 1337 "EventsBranch.c" + } else { + SidebarEntry* _tmp9_; +#line 93 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + _tmp9_ = b; +#line 93 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + if (G_TYPE_CHECK_INSTANCE_TYPE (_tmp9_, EVENTS_TYPE_MASTER_DIRECTORY_ENTRY)) { +#line 94 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + result = 1; +#line 94 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + return result; +#line 1348 "EventsBranch.c" + } + } +#line 96 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + _tmp10_ = events_branch_sort_ascending; +#line 96 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + if (!_tmp10_) { +#line 1355 "EventsBranch.c" + SidebarEntry* swap = NULL; + SidebarEntry* _tmp11_; + SidebarEntry* _tmp12_; + SidebarEntry* _tmp13_; + SidebarEntry* _tmp14_; +#line 97 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + _tmp11_ = a; +#line 97 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + _tmp12_ = _g_object_ref0 (_tmp11_); +#line 97 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + swap = _tmp12_; +#line 98 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + _tmp13_ = b; +#line 98 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + a = _tmp13_; +#line 99 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + _tmp14_ = swap; +#line 99 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + b = _tmp14_; +#line 96 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + _g_object_unref0 (swap); +#line 1377 "EventsBranch.c" + } +#line 102 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + _tmp15_ = a; +#line 102 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + _tmp16_ = events_year_directory_entry_get_year (G_TYPE_CHECK_INSTANCE_CAST (_tmp15_, EVENTS_TYPE_YEAR_DIRECTORY_ENTRY, EventsYearDirectoryEntry)); +#line 102 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + _tmp17_ = b; +#line 102 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + _tmp18_ = events_year_directory_entry_get_year (G_TYPE_CHECK_INSTANCE_CAST (_tmp17_, EVENTS_TYPE_YEAR_DIRECTORY_ENTRY, EventsYearDirectoryEntry)); +#line 102 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + _result_ = _tmp16_ - _tmp18_; +#line 104 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + _tmp19_ = _result_; +#line 104 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + _vala_assert (_tmp19_ != 0, "result != 0"); +#line 106 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + result = _result_; +#line 106 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + return result; +#line 1397 "EventsBranch.c" +} + + +static gint events_branch_event_month_comparator (SidebarEntry* a, SidebarEntry* b) { + gint result = 0; + SidebarEntry* _tmp0_; + SidebarEntry* _tmp1_; + gboolean _tmp2_; + gint _result_ = 0; + SidebarEntry* _tmp7_; + gint _tmp8_; + SidebarEntry* _tmp9_; + gint _tmp10_; + gint _tmp11_; +#line 109 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + g_return_val_if_fail (SIDEBAR_IS_ENTRY (a), 0); +#line 109 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + g_return_val_if_fail (SIDEBAR_IS_ENTRY (b), 0); +#line 110 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + _tmp0_ = a; +#line 110 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + _tmp1_ = b; +#line 110 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + if (_tmp0_ == _tmp1_) { +#line 111 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + result = 0; +#line 111 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + return result; +#line 1426 "EventsBranch.c" + } +#line 113 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + _tmp2_ = events_branch_sort_ascending; +#line 113 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + if (!_tmp2_) { +#line 1432 "EventsBranch.c" + SidebarEntry* swap = NULL; + SidebarEntry* _tmp3_; + SidebarEntry* _tmp4_; + SidebarEntry* _tmp5_; + SidebarEntry* _tmp6_; +#line 114 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + _tmp3_ = a; +#line 114 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + _tmp4_ = _g_object_ref0 (_tmp3_); +#line 114 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + swap = _tmp4_; +#line 115 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + _tmp5_ = b; +#line 115 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + a = _tmp5_; +#line 116 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + _tmp6_ = swap; +#line 116 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + b = _tmp6_; +#line 113 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + _g_object_unref0 (swap); +#line 1454 "EventsBranch.c" + } +#line 119 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + _tmp7_ = a; +#line 119 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + _tmp8_ = events_month_directory_entry_get_month (G_TYPE_CHECK_INSTANCE_CAST (_tmp7_, EVENTS_TYPE_MONTH_DIRECTORY_ENTRY, EventsMonthDirectoryEntry)); +#line 119 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + _tmp9_ = b; +#line 119 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + _tmp10_ = events_month_directory_entry_get_month (G_TYPE_CHECK_INSTANCE_CAST (_tmp9_, EVENTS_TYPE_MONTH_DIRECTORY_ENTRY, EventsMonthDirectoryEntry)); +#line 119 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + _result_ = _tmp8_ - _tmp10_; +#line 121 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + _tmp11_ = _result_; +#line 121 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + _vala_assert (_tmp11_ != 0, "result != 0"); +#line 123 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + result = _result_; +#line 123 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + return result; +#line 1474 "EventsBranch.c" +} + + +static gint events_branch_event_comparator (SidebarEntry* a, SidebarEntry* b) { + gint result = 0; + SidebarEntry* _tmp0_; + SidebarEntry* _tmp1_; + gboolean _tmp2_; + gint64 _result_ = 0LL; + SidebarEntry* _tmp7_; + Event* _tmp8_; + Event* _tmp9_; + time_t _tmp10_; + SidebarEntry* _tmp11_; + Event* _tmp12_; + Event* _tmp13_; + time_t _tmp14_; + gint64 _tmp15_; + gint64 _tmp16_; + gint64 _tmp27_; + gint _tmp28_ = 0; + gint64 _tmp29_; +#line 126 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + g_return_val_if_fail (SIDEBAR_IS_ENTRY (a), 0); +#line 126 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + g_return_val_if_fail (SIDEBAR_IS_ENTRY (b), 0); +#line 127 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + _tmp0_ = a; +#line 127 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + _tmp1_ = b; +#line 127 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + if (_tmp0_ == _tmp1_) { +#line 128 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + result = 0; +#line 128 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + return result; +#line 1511 "EventsBranch.c" + } +#line 130 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + _tmp2_ = events_branch_sort_ascending; +#line 130 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + if (!_tmp2_) { +#line 1517 "EventsBranch.c" + SidebarEntry* swap = NULL; + SidebarEntry* _tmp3_; + SidebarEntry* _tmp4_; + SidebarEntry* _tmp5_; + SidebarEntry* _tmp6_; +#line 131 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + _tmp3_ = a; +#line 131 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + _tmp4_ = _g_object_ref0 (_tmp3_); +#line 131 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + swap = _tmp4_; +#line 132 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + _tmp5_ = b; +#line 132 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + a = _tmp5_; +#line 133 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + _tmp6_ = swap; +#line 133 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + b = _tmp6_; +#line 130 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + _g_object_unref0 (swap); +#line 1539 "EventsBranch.c" + } +#line 136 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + _tmp7_ = a; +#line 136 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + _tmp8_ = events_event_entry_get_event (G_TYPE_CHECK_INSTANCE_CAST (_tmp7_, EVENTS_TYPE_EVENT_ENTRY, EventsEventEntry)); +#line 136 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + _tmp9_ = _tmp8_; +#line 136 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + _tmp10_ = event_source_get_start_time (G_TYPE_CHECK_INSTANCE_CAST (_tmp9_, TYPE_EVENT_SOURCE, EventSource)); +#line 136 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + _tmp11_ = b; +#line 136 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + _tmp12_ = events_event_entry_get_event (G_TYPE_CHECK_INSTANCE_CAST (_tmp11_, EVENTS_TYPE_EVENT_ENTRY, EventsEventEntry)); +#line 136 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + _tmp13_ = _tmp12_; +#line 136 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + _tmp14_ = event_source_get_start_time (G_TYPE_CHECK_INSTANCE_CAST (_tmp13_, TYPE_EVENT_SOURCE, EventSource)); +#line 136 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + _tmp15_ = (gint64) (_tmp10_ - _tmp14_); +#line 136 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + _g_object_unref0 (_tmp13_); +#line 136 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + _g_object_unref0 (_tmp9_); +#line 136 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + _result_ = _tmp15_; +#line 140 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + _tmp16_ = _result_; +#line 140 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + if (_tmp16_ == ((gint64) 0)) { +#line 1569 "EventsBranch.c" + SidebarEntry* _tmp17_; + Event* _tmp18_; + Event* _tmp19_; + EventID _tmp20_ = {0}; + gint64 _tmp21_; + SidebarEntry* _tmp22_; + Event* _tmp23_; + Event* _tmp24_; + EventID _tmp25_ = {0}; + gint64 _tmp26_; +#line 141 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + _tmp17_ = a; +#line 141 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + _tmp18_ = events_event_entry_get_event (G_TYPE_CHECK_INSTANCE_CAST (_tmp17_, EVENTS_TYPE_EVENT_ENTRY, EventsEventEntry)); +#line 141 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + _tmp19_ = _tmp18_; +#line 141 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + event_get_event_id (_tmp19_, &_tmp20_); +#line 141 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + _tmp21_ = _tmp20_.id; +#line 141 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + _tmp22_ = b; +#line 141 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + _tmp23_ = events_event_entry_get_event (G_TYPE_CHECK_INSTANCE_CAST (_tmp22_, EVENTS_TYPE_EVENT_ENTRY, EventsEventEntry)); +#line 141 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + _tmp24_ = _tmp23_; +#line 141 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + event_get_event_id (_tmp24_, &_tmp25_); +#line 141 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + _tmp26_ = _tmp25_.id; +#line 141 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + _result_ = _tmp21_ - _tmp26_; +#line 141 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + _g_object_unref0 (_tmp24_); +#line 141 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + _g_object_unref0 (_tmp19_); +#line 1606 "EventsBranch.c" + } +#line 145 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + _tmp27_ = _result_; +#line 145 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + _vala_assert (_tmp27_ != ((gint64) 0), "result != 0"); +#line 147 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + _tmp29_ = _result_; +#line 147 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + if (_tmp29_ < ((gint64) 0)) { +#line 147 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + _tmp28_ = -1; +#line 1618 "EventsBranch.c" + } else { +#line 147 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + _tmp28_ = 1; +#line 1622 "EventsBranch.c" + } +#line 147 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + result = _tmp28_; +#line 147 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + return result; +#line 1628 "EventsBranch.c" +} + + +static gint events_branch_undated_event_comparator (SidebarEntry* a, SidebarEntry* b) { + gint result = 0; + SidebarEntry* _tmp0_; + SidebarEntry* _tmp1_; + gboolean _tmp2_; + gint ret = 0; + SidebarEntry* _tmp7_; + Event* _tmp8_; + Event* _tmp9_; + gchar* _tmp10_; + gchar* _tmp11_; + SidebarEntry* _tmp12_; + Event* _tmp13_; + Event* _tmp14_; + gchar* _tmp15_; + gchar* _tmp16_; + gint _tmp17_; + gint _tmp18_; + gint _tmp19_; +#line 150 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + g_return_val_if_fail (SIDEBAR_IS_ENTRY (a), 0); +#line 150 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + g_return_val_if_fail (SIDEBAR_IS_ENTRY (b), 0); +#line 151 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + _tmp0_ = a; +#line 151 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + _tmp1_ = b; +#line 151 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + if (_tmp0_ == _tmp1_) { +#line 152 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + result = 0; +#line 152 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + return result; +#line 1665 "EventsBranch.c" + } +#line 154 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + _tmp2_ = events_branch_sort_ascending; +#line 154 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + if (!_tmp2_) { +#line 1671 "EventsBranch.c" + SidebarEntry* swap = NULL; + SidebarEntry* _tmp3_; + SidebarEntry* _tmp4_; + SidebarEntry* _tmp5_; + SidebarEntry* _tmp6_; +#line 155 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + _tmp3_ = a; +#line 155 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + _tmp4_ = _g_object_ref0 (_tmp3_); +#line 155 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + swap = _tmp4_; +#line 156 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + _tmp5_ = b; +#line 156 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + a = _tmp5_; +#line 157 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + _tmp6_ = swap; +#line 157 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + b = _tmp6_; +#line 154 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + _g_object_unref0 (swap); +#line 1693 "EventsBranch.c" + } +#line 160 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + _tmp7_ = a; +#line 160 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + _tmp8_ = events_event_entry_get_event (G_TYPE_CHECK_INSTANCE_CAST (_tmp7_, EVENTS_TYPE_EVENT_ENTRY, EventsEventEntry)); +#line 160 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + _tmp9_ = _tmp8_; +#line 160 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + _tmp10_ = data_object_get_name (G_TYPE_CHECK_INSTANCE_CAST (_tmp9_, TYPE_DATA_OBJECT, DataObject)); +#line 160 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + _tmp11_ = _tmp10_; +#line 160 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + _tmp12_ = b; +#line 160 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + _tmp13_ = events_event_entry_get_event (G_TYPE_CHECK_INSTANCE_CAST (_tmp12_, EVENTS_TYPE_EVENT_ENTRY, EventsEventEntry)); +#line 160 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + _tmp14_ = _tmp13_; +#line 160 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + _tmp15_ = data_object_get_name (G_TYPE_CHECK_INSTANCE_CAST (_tmp14_, TYPE_DATA_OBJECT, DataObject)); +#line 160 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + _tmp16_ = _tmp15_; +#line 160 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + _tmp17_ = g_utf8_collate (_tmp11_, _tmp16_); +#line 160 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + _tmp18_ = _tmp17_; +#line 160 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + _g_free0 (_tmp16_); +#line 160 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + _g_object_unref0 (_tmp14_); +#line 160 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + _g_free0 (_tmp11_); +#line 160 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + _g_object_unref0 (_tmp9_); +#line 160 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + ret = _tmp18_; +#line 163 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + _tmp19_ = ret; +#line 163 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + if (_tmp19_ == 0) { +#line 1733 "EventsBranch.c" + SidebarEntry* _tmp20_; + Event* _tmp21_; + Event* _tmp22_; + gint64 _tmp23_; + SidebarEntry* _tmp24_; + Event* _tmp25_; + Event* _tmp26_; + gint64 _tmp27_; +#line 164 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + _tmp20_ = b; +#line 164 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + _tmp21_ = events_event_entry_get_event (G_TYPE_CHECK_INSTANCE_CAST (_tmp20_, EVENTS_TYPE_EVENT_ENTRY, EventsEventEntry)); +#line 164 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + _tmp22_ = _tmp21_; +#line 164 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + _tmp23_ = data_source_get_instance_id (G_TYPE_CHECK_INSTANCE_CAST (_tmp22_, TYPE_DATA_SOURCE, DataSource)); +#line 164 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + _tmp24_ = a; +#line 164 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + _tmp25_ = events_event_entry_get_event (G_TYPE_CHECK_INSTANCE_CAST (_tmp24_, EVENTS_TYPE_EVENT_ENTRY, EventsEventEntry)); +#line 164 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + _tmp26_ = _tmp25_; +#line 164 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + _tmp27_ = data_source_get_instance_id (G_TYPE_CHECK_INSTANCE_CAST (_tmp26_, TYPE_DATA_SOURCE, DataSource)); +#line 164 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + ret = (gint) (_tmp23_ - _tmp27_); +#line 164 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + _g_object_unref0 (_tmp26_); +#line 164 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + _g_object_unref0 (_tmp22_); +#line 1764 "EventsBranch.c" + } +#line 167 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + result = ret; +#line 167 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + return result; +#line 1770 "EventsBranch.c" +} + + +EventsEventEntry* events_branch_get_entry_for_event (EventsBranch* self, Event* event) { + EventsEventEntry* result = NULL; + GeeHashMap* _tmp0_; + Event* _tmp1_; + gpointer _tmp2_; +#line 170 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + g_return_val_if_fail (EVENTS_IS_BRANCH (self), NULL); +#line 170 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + g_return_val_if_fail (IS_EVENT (event), NULL); +#line 171 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + _tmp0_ = self->priv->entry_map; +#line 171 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + _tmp1_ = event; +#line 171 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + _tmp2_ = gee_abstract_map_get (G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, GEE_TYPE_ABSTRACT_MAP, GeeAbstractMap), _tmp1_); +#line 171 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + result = (EventsEventEntry*) _tmp2_; +#line 171 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + return result; +#line 1793 "EventsBranch.c" +} + + +static void events_branch_on_config_changed (EventsBranch* self) { + gboolean value = FALSE; + ConfigFacade* _tmp0_; + ConfigFacade* _tmp1_; + gboolean _tmp2_; + gboolean _tmp3_; +#line 174 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + g_return_if_fail (EVENTS_IS_BRANCH (self)); +#line 175 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + _tmp0_ = config_facade_get_instance (); +#line 175 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + _tmp1_ = _tmp0_; +#line 175 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + _tmp2_ = configuration_facade_get_events_sort_ascending (G_TYPE_CHECK_INSTANCE_CAST (_tmp1_, TYPE_CONFIGURATION_FACADE, ConfigurationFacade)); +#line 175 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + _tmp3_ = _tmp2_; +#line 175 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + _g_object_unref0 (_tmp1_); +#line 175 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + value = _tmp3_; +#line 177 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + events_branch_sort_ascending = value; +#line 178 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + sidebar_branch_reorder_all (G_TYPE_CHECK_INSTANCE_CAST (self, SIDEBAR_TYPE_BRANCH, SidebarBranch)); +#line 1821 "EventsBranch.c" +} + + +static void events_branch_on_events_added_removed (EventsBranch* self, GeeIterable* added, GeeIterable* removed) { + GeeIterable* _tmp0_; + GeeIterable* _tmp8_; +#line 181 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + g_return_if_fail (EVENTS_IS_BRANCH (self)); +#line 181 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + g_return_if_fail ((added == NULL) || GEE_IS_ITERABLE (added)); +#line 181 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + g_return_if_fail ((removed == NULL) || GEE_IS_ITERABLE (removed)); +#line 183 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + _tmp0_ = added; +#line 183 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + if (_tmp0_ != NULL) { +#line 1838 "EventsBranch.c" + { + GeeIterator* _object_it = NULL; + GeeIterable* _tmp1_; + GeeIterator* _tmp2_; +#line 184 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + _tmp1_ = added; +#line 184 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + _tmp2_ = gee_iterable_iterator (_tmp1_); +#line 184 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + _object_it = _tmp2_; +#line 184 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + while (TRUE) { +#line 1851 "EventsBranch.c" + GeeIterator* _tmp3_; + gboolean _tmp4_; + DataObject* object = NULL; + GeeIterator* _tmp5_; + gpointer _tmp6_; + DataObject* _tmp7_; +#line 184 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + _tmp3_ = _object_it; +#line 184 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + _tmp4_ = gee_iterator_next (_tmp3_); +#line 184 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + if (!_tmp4_) { +#line 184 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + break; +#line 1866 "EventsBranch.c" + } +#line 184 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + _tmp5_ = _object_it; +#line 184 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + _tmp6_ = gee_iterator_get (_tmp5_); +#line 184 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + object = (DataObject*) _tmp6_; +#line 185 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + _tmp7_ = object; +#line 185 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + events_branch_add_event (self, G_TYPE_CHECK_INSTANCE_CAST (_tmp7_, TYPE_EVENT, Event)); +#line 184 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + _g_object_unref0 (object); +#line 1880 "EventsBranch.c" + } +#line 184 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + _g_object_unref0 (_object_it); +#line 1884 "EventsBranch.c" + } + } +#line 188 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + _tmp8_ = removed; +#line 188 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + if (_tmp8_ != NULL) { +#line 1891 "EventsBranch.c" + { + GeeIterator* _object_it = NULL; + GeeIterable* _tmp9_; + GeeIterator* _tmp10_; +#line 189 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + _tmp9_ = removed; +#line 189 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + _tmp10_ = gee_iterable_iterator (_tmp9_); +#line 189 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + _object_it = _tmp10_; +#line 189 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + while (TRUE) { +#line 1904 "EventsBranch.c" + GeeIterator* _tmp11_; + gboolean _tmp12_; + DataObject* object = NULL; + GeeIterator* _tmp13_; + gpointer _tmp14_; + DataObject* _tmp15_; +#line 189 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + _tmp11_ = _object_it; +#line 189 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + _tmp12_ = gee_iterator_next (_tmp11_); +#line 189 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + if (!_tmp12_) { +#line 189 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + break; +#line 1919 "EventsBranch.c" + } +#line 189 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + _tmp13_ = _object_it; +#line 189 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + _tmp14_ = gee_iterator_get (_tmp13_); +#line 189 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + object = (DataObject*) _tmp14_; +#line 190 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + _tmp15_ = object; +#line 190 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + events_branch_remove_event (self, G_TYPE_CHECK_INSTANCE_CAST (_tmp15_, TYPE_EVENT, Event)); +#line 189 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + _g_object_unref0 (object); +#line 1933 "EventsBranch.c" + } +#line 189 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + _g_object_unref0 (_object_it); +#line 1937 "EventsBranch.c" + } + } +} + + +static void events_branch_on_events_altered (EventsBranch* self, GeeMap* altered) { +#line 194 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + g_return_if_fail (EVENTS_IS_BRANCH (self)); +#line 194 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + g_return_if_fail (GEE_IS_MAP (altered)); +#line 1948 "EventsBranch.c" + { + GeeIterator* _object_it = NULL; + GeeMap* _tmp0_; + GeeSet* _tmp1_; + GeeSet* _tmp2_; + GeeSet* _tmp3_; + GeeIterator* _tmp4_; + GeeIterator* _tmp5_; +#line 195 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + _tmp0_ = altered; +#line 195 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + _tmp1_ = gee_map_get_keys (_tmp0_); +#line 195 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + _tmp2_ = _tmp1_; +#line 195 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + _tmp3_ = _tmp2_; +#line 195 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + _tmp4_ = gee_iterable_iterator (G_TYPE_CHECK_INSTANCE_CAST (_tmp3_, GEE_TYPE_ITERABLE, GeeIterable)); +#line 195 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + _tmp5_ = _tmp4_; +#line 195 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + _g_object_unref0 (_tmp3_); +#line 195 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + _object_it = _tmp5_; +#line 195 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + while (TRUE) { +#line 1975 "EventsBranch.c" + GeeIterator* _tmp6_; + gboolean _tmp7_; + DataObject* object = NULL; + GeeIterator* _tmp8_; + gpointer _tmp9_; + Event* event = NULL; + DataObject* _tmp10_; + Event* _tmp11_; + Alteration* alteration = NULL; + GeeMap* _tmp12_; + DataObject* _tmp13_; + gpointer _tmp14_; + Alteration* _tmp15_; + gboolean _tmp16_; +#line 195 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + _tmp6_ = _object_it; +#line 195 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + _tmp7_ = gee_iterator_next (_tmp6_); +#line 195 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + if (!_tmp7_) { +#line 195 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + break; +#line 1998 "EventsBranch.c" + } +#line 195 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + _tmp8_ = _object_it; +#line 195 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + _tmp9_ = gee_iterator_get (_tmp8_); +#line 195 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + object = (DataObject*) _tmp9_; +#line 196 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + _tmp10_ = object; +#line 196 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + _tmp11_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_CAST (_tmp10_, TYPE_EVENT, Event)); +#line 196 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + event = _tmp11_; +#line 197 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + _tmp12_ = altered; +#line 197 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + _tmp13_ = object; +#line 197 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + _tmp14_ = gee_map_get (_tmp12_, _tmp13_); +#line 197 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + alteration = (Alteration*) _tmp14_; +#line 199 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + _tmp15_ = alteration; +#line 199 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + _tmp16_ = alteration_has_detail (_tmp15_, "metadata", "time"); +#line 199 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + if (_tmp16_) { +#line 2026 "EventsBranch.c" + Event* _tmp17_; +#line 202 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + _tmp17_ = event; +#line 202 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + events_branch_move_event (self, _tmp17_); +#line 2032 "EventsBranch.c" + } else { + Alteration* _tmp18_; + gboolean _tmp19_; +#line 203 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + _tmp18_ = alteration; +#line 203 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + _tmp19_ = alteration_has_detail (_tmp18_, "metadata", "name"); +#line 203 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + if (_tmp19_) { +#line 2042 "EventsBranch.c" + EventsEventEntry* entry = NULL; + GeeHashMap* _tmp20_; + Event* _tmp21_; + gpointer _tmp22_; + EventsEventEntry* _tmp23_; + EventsEventEntry* _tmp24_; + Event* _tmp25_; + gchar* _tmp26_; + gchar* _tmp27_; + EventsEventEntry* _tmp28_; + Event* _tmp29_; + gchar* _tmp30_; + gchar* _tmp31_; +#line 204 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + _tmp20_ = self->priv->entry_map; +#line 204 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + _tmp21_ = event; +#line 204 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + _tmp22_ = gee_abstract_map_get (G_TYPE_CHECK_INSTANCE_CAST (_tmp20_, GEE_TYPE_ABSTRACT_MAP, GeeAbstractMap), _tmp21_); +#line 204 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + entry = (EventsEventEntry*) _tmp22_; +#line 205 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + _tmp23_ = entry; +#line 205 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + _vala_assert (_tmp23_ != NULL, "entry != null"); +#line 207 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + _tmp24_ = entry; +#line 207 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + _tmp25_ = event; +#line 207 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + _tmp26_ = data_object_get_name (G_TYPE_CHECK_INSTANCE_CAST (_tmp25_, TYPE_DATA_OBJECT, DataObject)); +#line 207 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + _tmp27_ = _tmp26_; +#line 207 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + g_signal_emit_by_name (G_TYPE_CHECK_INSTANCE_CAST (_tmp24_, SIDEBAR_TYPE_RENAMEABLE_ENTRY, SidebarRenameableEntry), "sidebar-name-changed", _tmp27_); +#line 207 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + _g_free0 (_tmp27_); +#line 208 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + _tmp28_ = entry; +#line 208 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + _tmp29_ = event; +#line 208 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + _tmp30_ = data_object_get_name (G_TYPE_CHECK_INSTANCE_CAST (_tmp29_, TYPE_DATA_OBJECT, DataObject)); +#line 208 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + _tmp31_ = _tmp30_; +#line 208 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + g_signal_emit_by_name (G_TYPE_CHECK_INSTANCE_CAST (_tmp28_, SIDEBAR_TYPE_ENTRY, SidebarEntry), "sidebar-tooltip-changed", _tmp31_); +#line 208 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + _g_free0 (_tmp31_); +#line 203 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + _g_object_unref0 (entry); +#line 2094 "EventsBranch.c" + } + } +#line 195 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + _alteration_unref0 (alteration); +#line 195 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + _g_object_unref0 (event); +#line 195 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + _g_object_unref0 (object); +#line 2103 "EventsBranch.c" + } +#line 195 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + _g_object_unref0 (_object_it); +#line 2107 "EventsBranch.c" + } +} + + +static void events_branch_on_no_event_collection_altered (EventsBranch* self) { + EventSourceCollection* _tmp0_; + GeeCollection* _tmp1_; + GeeCollection* _tmp2_; + gint _tmp3_; + gint _tmp4_; +#line 213 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + g_return_if_fail (EVENTS_IS_BRANCH (self)); +#line 214 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + _tmp0_ = event_global; +#line 214 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + _tmp1_ = event_source_collection_get_no_event_objects (_tmp0_); +#line 214 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + _tmp2_ = _tmp1_; +#line 214 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + _tmp3_ = gee_collection_get_size (_tmp2_); +#line 214 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + _tmp4_ = _tmp3_; +#line 214 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + events_branch_show_no_events (self, _tmp4_ > 0); +#line 214 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + _g_object_unref0 (_tmp2_); +#line 2134 "EventsBranch.c" +} + + +static void g_time_local (time_t time, struct tm* result) { + struct tm _result_ = {0}; + struct tm _tmp0_ = {0}; +#line 2846 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" + localtime_r (&time, &_tmp0_); +#line 2846 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" + _result_ = _tmp0_; +#line 2847 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" + *result = _result_; +#line 2847 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" + return; +#line 2149 "EventsBranch.c" +} + + +static gint _events_branch_event_comparator_gcompare_func (gconstpointer a, gconstpointer b) { + gint result; + result = events_branch_event_comparator ((SidebarEntry*) a, (SidebarEntry*) b); +#line 230 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + return result; +#line 2158 "EventsBranch.c" +} + + +static gchar* g_time_format (struct tm *self, const gchar* format) { + gchar* result = NULL; + gchar* buffer = NULL; + gchar* _tmp0_; + gint buffer_length1; + gint _buffer_size_; + gchar* _tmp1_; + gint _tmp1__length1; + const gchar* _tmp2_; + gchar* _tmp3_; + gint _tmp3__length1; + gchar* _tmp4_; +#line 2854 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" + g_return_val_if_fail (format != NULL, NULL); +#line 2855 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" + _tmp0_ = g_new0 (gchar, 64); +#line 2855 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" + buffer = _tmp0_; +#line 2855 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" + buffer_length1 = 64; +#line 2855 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" + _buffer_size_ = buffer_length1; +#line 2856 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" + _tmp1_ = buffer; +#line 2856 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" + _tmp1__length1 = buffer_length1; +#line 2856 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" + _tmp2_ = format; +#line 2856 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" + strftime (_tmp1_, _tmp1__length1, _tmp2_, &(*self)); +#line 2857 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" + _tmp3_ = buffer; +#line 2857 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" + _tmp3__length1 = buffer_length1; +#line 2857 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" + _tmp4_ = g_strdup ((const gchar*) _tmp3_); +#line 2857 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" + result = _tmp4_; +#line 2857 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" + buffer = (g_free (buffer), NULL); +#line 2857 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" + return result; +#line 2204 "EventsBranch.c" +} + + +static gint _events_branch_event_month_comparator_gcompare_func (gconstpointer a, gconstpointer b) { + gint result; + result = events_branch_event_month_comparator ((SidebarEntry*) a, (SidebarEntry*) b); +#line 238 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + return result; +#line 2213 "EventsBranch.c" +} + + +static void events_branch_add_event (EventsBranch* self, Event* event) { + time_t event_time = 0; + Event* _tmp0_; + time_t _tmp1_; + time_t _tmp2_; + struct tm event_tm = {0}; + time_t _tmp4_; + struct tm _tmp5_ = {0}; + SidebarEntry* year = NULL; + SidebarEntry* month = NULL; + Event* _tmp6_; + struct tm _tmp7_; + SidebarEntry* _tmp8_ = NULL; + SidebarEntry* _tmp9_; + SidebarEntry* _tmp10_; + SidebarEntry* _tmp13_; + gchar* _tmp21_; + gchar* _tmp22_; + struct tm _tmp23_; + EventsMonthDirectoryEntry* _tmp24_; + SidebarEntry* _tmp25_; + SidebarEntry* _tmp26_; + SidebarEntry* _tmp27_; + Event* _tmp28_; +#line 217 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + g_return_if_fail (EVENTS_IS_BRANCH (self)); +#line 217 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + g_return_if_fail (IS_EVENT (event)); +#line 218 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + _tmp0_ = event; +#line 218 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + _tmp1_ = event_source_get_start_time (G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, TYPE_EVENT_SOURCE, EventSource)); +#line 218 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + event_time = _tmp1_; +#line 219 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + _tmp2_ = event_time; +#line 219 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + if (_tmp2_ == ((time_t) 0)) { +#line 2255 "EventsBranch.c" + Event* _tmp3_; +#line 220 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + _tmp3_ = event; +#line 220 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + events_branch_add_undated_event (self, _tmp3_); +#line 222 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + return; +#line 2263 "EventsBranch.c" + } +#line 225 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + _tmp4_ = event_time; +#line 225 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + g_time_local (_tmp4_, &_tmp5_); +#line 225 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + event_tm = _tmp5_; +#line 228 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + _tmp6_ = event; +#line 228 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + _tmp7_ = event_tm; +#line 228 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + _tmp9_ = events_branch_find_event_month (self, _tmp6_, &_tmp7_, &_tmp8_); +#line 228 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + _g_object_unref0 (year); +#line 228 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + year = _tmp8_; +#line 228 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + month = _tmp9_; +#line 229 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + _tmp10_ = month; +#line 229 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + if (_tmp10_ != NULL) { +#line 2287 "EventsBranch.c" + SidebarEntry* _tmp11_; + Event* _tmp12_; +#line 230 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + _tmp11_ = month; +#line 230 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + _tmp12_ = event; +#line 230 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + events_branch_graft_event (self, _tmp11_, _tmp12_, _events_branch_event_comparator_gcompare_func); +#line 232 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + _g_object_unref0 (month); +#line 232 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + _g_object_unref0 (year); +#line 232 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + return; +#line 2302 "EventsBranch.c" + } +#line 235 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + _tmp13_ = year; +#line 235 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + if (_tmp13_ == NULL) { +#line 2308 "EventsBranch.c" + gchar* _tmp14_; + gchar* _tmp15_; + struct tm _tmp16_; + EventsYearDirectoryEntry* _tmp17_; + SidebarEntry* _tmp18_; + SidebarEntry* _tmp19_; + SidebarEntry* _tmp20_; +#line 236 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + _tmp14_ = g_time_format (&event_tm, SUB_EVENTS_DIRECTORY_PAGE_YEAR_FORMAT); +#line 236 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + _tmp15_ = _tmp14_; +#line 236 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + _tmp16_ = event_tm; +#line 236 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + _tmp17_ = events_year_directory_entry_new (_tmp15_, &_tmp16_); +#line 236 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + _g_object_unref0 (year); +#line 236 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + year = G_TYPE_CHECK_INSTANCE_CAST (_tmp17_, SIDEBAR_TYPE_ENTRY, SidebarEntry); +#line 236 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + _g_free0 (_tmp15_); +#line 238 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + _tmp18_ = sidebar_branch_get_root (G_TYPE_CHECK_INSTANCE_CAST (self, SIDEBAR_TYPE_BRANCH, SidebarBranch)); +#line 238 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + _tmp19_ = _tmp18_; +#line 238 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + _tmp20_ = year; +#line 238 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + sidebar_branch_graft (G_TYPE_CHECK_INSTANCE_CAST (self, SIDEBAR_TYPE_BRANCH, SidebarBranch), _tmp19_, _tmp20_, _events_branch_event_month_comparator_gcompare_func); +#line 238 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + _g_object_unref0 (_tmp19_); +#line 2340 "EventsBranch.c" + } +#line 241 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + _tmp21_ = g_time_format (&event_tm, SUB_EVENTS_DIRECTORY_PAGE_MONTH_FORMAT); +#line 241 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + _tmp22_ = _tmp21_; +#line 241 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + _tmp23_ = event_tm; +#line 241 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + _tmp24_ = events_month_directory_entry_new (_tmp22_, &_tmp23_); +#line 241 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + _g_object_unref0 (month); +#line 241 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + month = G_TYPE_CHECK_INSTANCE_CAST (_tmp24_, SIDEBAR_TYPE_ENTRY, SidebarEntry); +#line 241 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + _g_free0 (_tmp22_); +#line 243 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + _tmp25_ = year; +#line 243 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + _tmp26_ = month; +#line 243 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + sidebar_branch_graft (G_TYPE_CHECK_INSTANCE_CAST (self, SIDEBAR_TYPE_BRANCH, SidebarBranch), _tmp25_, _tmp26_, _events_branch_event_comparator_gcompare_func); +#line 245 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + _tmp27_ = month; +#line 245 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + _tmp28_ = event; +#line 245 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + events_branch_graft_event (self, _tmp27_, _tmp28_, _events_branch_event_comparator_gcompare_func); +#line 217 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + _g_object_unref0 (month); +#line 217 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + _g_object_unref0 (year); +#line 2372 "EventsBranch.c" +} + + +static void events_branch_move_event (EventsBranch* self, Event* event) { + time_t event_time = 0; + Event* _tmp0_; + time_t _tmp1_; + time_t _tmp2_; + struct tm event_tm = {0}; + time_t _tmp4_; + struct tm _tmp5_ = {0}; + SidebarEntry* year = NULL; + SidebarEntry* month = NULL; + Event* _tmp6_; + struct tm _tmp7_; + SidebarEntry* _tmp8_ = NULL; + SidebarEntry* _tmp9_; + SidebarEntry* _tmp10_; + SidebarEntry* _tmp18_; + Event* _tmp25_; + SidebarEntry* _tmp26_; +#line 248 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + g_return_if_fail (EVENTS_IS_BRANCH (self)); +#line 248 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + g_return_if_fail (IS_EVENT (event)); +#line 249 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + _tmp0_ = event; +#line 249 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + _tmp1_ = event_source_get_start_time (G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, TYPE_EVENT_SOURCE, EventSource)); +#line 249 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + event_time = _tmp1_; +#line 250 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + _tmp2_ = event_time; +#line 250 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + if (_tmp2_ == ((time_t) 0)) { +#line 2408 "EventsBranch.c" + Event* _tmp3_; +#line 251 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + _tmp3_ = event; +#line 251 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + events_branch_move_to_undated_event (self, _tmp3_); +#line 253 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + return; +#line 2416 "EventsBranch.c" + } +#line 256 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + _tmp4_ = event_time; +#line 256 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + g_time_local (_tmp4_, &_tmp5_); +#line 256 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + event_tm = _tmp5_; +#line 259 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + _tmp6_ = event; +#line 259 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + _tmp7_ = event_tm; +#line 259 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + _tmp9_ = events_branch_find_event_month (self, _tmp6_, &_tmp7_, &_tmp8_); +#line 259 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + _g_object_unref0 (year); +#line 259 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + year = _tmp8_; +#line 259 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + month = _tmp9_; +#line 261 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + _tmp10_ = year; +#line 261 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + if (_tmp10_ == NULL) { +#line 2440 "EventsBranch.c" + gchar* _tmp11_; + gchar* _tmp12_; + struct tm _tmp13_; + EventsYearDirectoryEntry* _tmp14_; + SidebarEntry* _tmp15_; + SidebarEntry* _tmp16_; + SidebarEntry* _tmp17_; +#line 262 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + _tmp11_ = g_time_format (&event_tm, SUB_EVENTS_DIRECTORY_PAGE_YEAR_FORMAT); +#line 262 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + _tmp12_ = _tmp11_; +#line 262 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + _tmp13_ = event_tm; +#line 262 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + _tmp14_ = events_year_directory_entry_new (_tmp12_, &_tmp13_); +#line 262 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + _g_object_unref0 (year); +#line 262 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + year = G_TYPE_CHECK_INSTANCE_CAST (_tmp14_, SIDEBAR_TYPE_ENTRY, SidebarEntry); +#line 262 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + _g_free0 (_tmp12_); +#line 264 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + _tmp15_ = sidebar_branch_get_root (G_TYPE_CHECK_INSTANCE_CAST (self, SIDEBAR_TYPE_BRANCH, SidebarBranch)); +#line 264 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + _tmp16_ = _tmp15_; +#line 264 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + _tmp17_ = year; +#line 264 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + sidebar_branch_graft (G_TYPE_CHECK_INSTANCE_CAST (self, SIDEBAR_TYPE_BRANCH, SidebarBranch), _tmp16_, _tmp17_, _events_branch_event_month_comparator_gcompare_func); +#line 264 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + _g_object_unref0 (_tmp16_); +#line 2472 "EventsBranch.c" + } +#line 267 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + _tmp18_ = month; +#line 267 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + if (_tmp18_ == NULL) { +#line 2478 "EventsBranch.c" + gchar* _tmp19_; + gchar* _tmp20_; + struct tm _tmp21_; + EventsMonthDirectoryEntry* _tmp22_; + SidebarEntry* _tmp23_; + SidebarEntry* _tmp24_; +#line 268 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + _tmp19_ = g_time_format (&event_tm, SUB_EVENTS_DIRECTORY_PAGE_MONTH_FORMAT); +#line 268 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + _tmp20_ = _tmp19_; +#line 268 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + _tmp21_ = event_tm; +#line 268 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + _tmp22_ = events_month_directory_entry_new (_tmp20_, &_tmp21_); +#line 268 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + _g_object_unref0 (month); +#line 268 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + month = G_TYPE_CHECK_INSTANCE_CAST (_tmp22_, SIDEBAR_TYPE_ENTRY, SidebarEntry); +#line 268 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + _g_free0 (_tmp20_); +#line 270 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + _tmp23_ = year; +#line 270 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + _tmp24_ = month; +#line 270 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + sidebar_branch_graft (G_TYPE_CHECK_INSTANCE_CAST (self, SIDEBAR_TYPE_BRANCH, SidebarBranch), _tmp23_, _tmp24_, _events_branch_event_comparator_gcompare_func); +#line 2505 "EventsBranch.c" + } +#line 273 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + _tmp25_ = event; +#line 273 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + _tmp26_ = month; +#line 273 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + events_branch_reparent_event (self, _tmp25_, _tmp26_); +#line 248 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + _g_object_unref0 (month); +#line 248 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + _g_object_unref0 (year); +#line 2517 "EventsBranch.c" +} + + +static void events_branch_remove_event (EventsBranch* self, Event* event) { + SidebarEntry* entry = NULL; + gboolean removed = FALSE; + GeeHashMap* _tmp0_; + Event* _tmp1_; + gpointer _tmp2_ = NULL; + gboolean _tmp3_; + gboolean _tmp4_; + SidebarEntry* parent = NULL; + SidebarEntry* _tmp5_; + SidebarEntry* _tmp6_; + SidebarEntry* _tmp7_; + SidebarEntry* _tmp8_; +#line 276 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + g_return_if_fail (EVENTS_IS_BRANCH (self)); +#line 276 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + g_return_if_fail (IS_EVENT (event)); +#line 280 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + _tmp0_ = self->priv->entry_map; +#line 280 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + _tmp1_ = event; +#line 280 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + _tmp3_ = gee_abstract_map_unset (G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, GEE_TYPE_ABSTRACT_MAP, GeeAbstractMap), _tmp1_, &_tmp2_); +#line 280 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + _g_object_unref0 (entry); +#line 280 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + entry = G_TYPE_CHECK_INSTANCE_CAST (_tmp2_, SIDEBAR_TYPE_ENTRY, SidebarEntry); +#line 280 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + removed = _tmp3_; +#line 281 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + _tmp4_ = removed; +#line 281 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + _vala_assert (_tmp4_, "removed"); +#line 283 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + _tmp5_ = entry; +#line 283 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + _tmp6_ = sidebar_branch_get_parent (G_TYPE_CHECK_INSTANCE_CAST (self, SIDEBAR_TYPE_BRANCH, SidebarBranch), _tmp5_); +#line 283 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + parent = _tmp6_; +#line 284 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + _tmp7_ = parent; +#line 284 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + _vala_assert (_tmp7_ != NULL, "parent != null"); +#line 286 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + _tmp8_ = entry; +#line 286 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + sidebar_branch_prune (G_TYPE_CHECK_INSTANCE_CAST (self, SIDEBAR_TYPE_BRANCH, SidebarBranch), _tmp8_); +#line 289 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + while (TRUE) { +#line 2570 "EventsBranch.c" + gboolean _tmp9_ = FALSE; + SidebarEntry* _tmp10_; + gint _tmp11_; + SidebarEntry* grandparent = NULL; + SidebarEntry* _tmp15_; + SidebarEntry* _tmp16_; + SidebarEntry* _tmp17_; + SidebarEntry* _tmp18_; + SidebarEntry* _tmp19_; + SidebarEntry* _tmp20_; +#line 289 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + _tmp10_ = parent; +#line 289 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + _tmp11_ = sidebar_branch_get_child_count (G_TYPE_CHECK_INSTANCE_CAST (self, SIDEBAR_TYPE_BRANCH, SidebarBranch), _tmp10_); +#line 289 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + if (_tmp11_ == 0) { +#line 2587 "EventsBranch.c" + SidebarEntry* _tmp12_; + SidebarEntry* _tmp13_; + SidebarEntry* _tmp14_; +#line 289 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + _tmp12_ = parent; +#line 289 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + _tmp13_ = sidebar_branch_get_root (G_TYPE_CHECK_INSTANCE_CAST (self, SIDEBAR_TYPE_BRANCH, SidebarBranch)); +#line 289 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + _tmp14_ = _tmp13_; +#line 289 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + _tmp9_ = _tmp12_ != _tmp14_; +#line 289 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + _g_object_unref0 (_tmp14_); +#line 2601 "EventsBranch.c" + } else { +#line 289 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + _tmp9_ = FALSE; +#line 2605 "EventsBranch.c" + } +#line 289 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + if (!_tmp9_) { +#line 289 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + break; +#line 2611 "EventsBranch.c" + } +#line 290 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + _tmp15_ = parent; +#line 290 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + _tmp16_ = sidebar_branch_get_parent (G_TYPE_CHECK_INSTANCE_CAST (self, SIDEBAR_TYPE_BRANCH, SidebarBranch), _tmp15_); +#line 290 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + grandparent = _tmp16_; +#line 291 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + _tmp17_ = grandparent; +#line 291 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + _vala_assert (_tmp17_ != NULL, "grandparent != null"); +#line 293 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + _tmp18_ = parent; +#line 293 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + sidebar_branch_prune (G_TYPE_CHECK_INSTANCE_CAST (self, SIDEBAR_TYPE_BRANCH, SidebarBranch), _tmp18_); +#line 295 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + _tmp19_ = grandparent; +#line 295 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + _tmp20_ = _g_object_ref0 (_tmp19_); +#line 295 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + _g_object_unref0 (parent); +#line 295 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + parent = _tmp20_; +#line 289 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + _g_object_unref0 (grandparent); +#line 2637 "EventsBranch.c" + } +#line 276 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + _g_object_unref0 (parent); +#line 276 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + _g_object_unref0 (entry); +#line 2643 "EventsBranch.c" +} + + +static Block8Data* block8_data_ref (Block8Data* _data8_) { +#line 299 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + g_atomic_int_inc (&_data8_->_ref_count_); +#line 299 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + return _data8_; +#line 2652 "EventsBranch.c" +} + + +static void block8_data_unref (void * _userdata_) { + Block8Data* _data8_; + _data8_ = (Block8Data*) _userdata_; +#line 299 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + if (g_atomic_int_dec_and_test (&_data8_->_ref_count_)) { +#line 2661 "EventsBranch.c" + EventsBranch* self; +#line 299 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + self = _data8_->self; +#line 299 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + _g_object_unref0 (self); +#line 299 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + g_slice_free (Block8Data, _data8_); +#line 2669 "EventsBranch.c" + } +} + + +static gboolean __lambda21_ (Block8Data* _data8_, SidebarEntry* entry) { + EventsBranch* self; + gboolean result = FALSE; + SidebarEntry* _tmp0_; + gint _tmp1_; + gint _tmp2_; +#line 308 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + self = _data8_->self; +#line 308 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + g_return_val_if_fail (SIDEBAR_IS_ENTRY (entry), FALSE); +#line 309 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + _tmp0_ = entry; +#line 309 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + _tmp1_ = events_month_directory_entry_get_month (G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, EVENTS_TYPE_MONTH_DIRECTORY_ENTRY, EventsMonthDirectoryEntry)); +#line 309 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + _tmp2_ = _data8_->event_month; +#line 309 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + result = _tmp1_ == _tmp2_; +#line 309 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + return result; +#line 2694 "EventsBranch.c" +} + + +static gboolean ___lambda21__locator (gconstpointer item, gpointer self) { + gboolean result; + result = __lambda21_ (self, (SidebarEntry*) item); +#line 308 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + return result; +#line 2703 "EventsBranch.c" +} + + +static SidebarEntry* events_branch_find_event_month (EventsBranch* self, Event* event, struct tm* event_tm, SidebarEntry* * found_year) { + SidebarEntry* _vala_found_year = NULL; + SidebarEntry* result = NULL; + Block8Data* _data8_; + Event* _tmp0_; + struct tm _tmp1_; + SidebarEntry* _tmp2_; + SidebarEntry* _tmp3_; + struct tm _tmp4_; + gint _tmp5_; + SidebarEntry* _tmp6_; + SidebarEntry* _tmp7_; +#line 299 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + g_return_val_if_fail (EVENTS_IS_BRANCH (self), NULL); +#line 299 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + g_return_val_if_fail (IS_EVENT (event), NULL); +#line 299 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + g_return_val_if_fail (event_tm != NULL, NULL); +#line 299 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + _data8_ = g_slice_new0 (Block8Data); +#line 299 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + _data8_->_ref_count_ = 1; +#line 299 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + _data8_->self = g_object_ref (self); +#line 301 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + _tmp0_ = event; +#line 301 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + _tmp1_ = *event_tm; +#line 301 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + _tmp2_ = events_branch_find_event_year (self, _tmp0_, &_tmp1_); +#line 301 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + _g_object_unref0 (_vala_found_year); +#line 301 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + _vala_found_year = _tmp2_; +#line 302 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + _tmp3_ = _vala_found_year; +#line 302 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + if (_tmp3_ == NULL) { +#line 303 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + result = NULL; +#line 303 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + block8_data_unref (_data8_); +#line 303 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + _data8_ = NULL; +#line 303 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + if (found_year) { +#line 303 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + *found_year = _vala_found_year; +#line 2755 "EventsBranch.c" + } else { +#line 303 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + _g_object_unref0 (_vala_found_year); +#line 2759 "EventsBranch.c" + } +#line 303 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + return result; +#line 2763 "EventsBranch.c" + } +#line 305 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + _tmp4_ = *event_tm; +#line 305 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + _tmp5_ = _tmp4_.tm_mon; +#line 305 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + _data8_->event_month = _tmp5_ + 1; +#line 308 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + _tmp6_ = _vala_found_year; +#line 308 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + _tmp7_ = sidebar_branch_find_first_child (G_TYPE_CHECK_INSTANCE_CAST (self, SIDEBAR_TYPE_BRANCH, SidebarBranch), _tmp6_, ___lambda21__locator, _data8_); +#line 308 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + result = _tmp7_; +#line 308 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + block8_data_unref (_data8_); +#line 308 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + _data8_ = NULL; +#line 308 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + if (found_year) { +#line 308 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + *found_year = _vala_found_year; +#line 2785 "EventsBranch.c" + } else { +#line 308 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + _g_object_unref0 (_vala_found_year); +#line 2789 "EventsBranch.c" + } +#line 308 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + return result; +#line 2793 "EventsBranch.c" +} + + +static Block9Data* block9_data_ref (Block9Data* _data9_) { +#line 313 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + g_atomic_int_inc (&_data9_->_ref_count_); +#line 313 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + return _data9_; +#line 2802 "EventsBranch.c" +} + + +static void block9_data_unref (void * _userdata_) { + Block9Data* _data9_; + _data9_ = (Block9Data*) _userdata_; +#line 313 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + if (g_atomic_int_dec_and_test (&_data9_->_ref_count_)) { +#line 2811 "EventsBranch.c" + EventsBranch* self; +#line 313 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + self = _data9_->self; +#line 313 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + _g_object_unref0 (self); +#line 313 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + g_slice_free (Block9Data, _data9_); +#line 2819 "EventsBranch.c" + } +} + + +static gboolean __lambda20_ (Block9Data* _data9_, SidebarEntry* entry) { + EventsBranch* self; + gboolean result = FALSE; + gboolean _tmp0_ = FALSE; + gboolean _tmp1_ = FALSE; + SidebarEntry* _tmp2_; +#line 316 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + self = _data9_->self; +#line 316 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + g_return_val_if_fail (SIDEBAR_IS_ENTRY (entry), FALSE); +#line 317 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + _tmp2_ = entry; +#line 317 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + if (G_TYPE_CHECK_INSTANCE_TYPE (_tmp2_, EVENTS_TYPE_UNDATED_DIRECTORY_ENTRY)) { +#line 317 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + _tmp1_ = TRUE; +#line 2840 "EventsBranch.c" + } else { + SidebarEntry* _tmp3_; +#line 317 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + _tmp3_ = entry; +#line 317 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + _tmp1_ = G_TYPE_CHECK_INSTANCE_TYPE (_tmp3_, EVENTS_TYPE_NO_EVENT_ENTRY); +#line 2847 "EventsBranch.c" + } +#line 317 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + if (_tmp1_) { +#line 317 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + _tmp0_ = TRUE; +#line 2853 "EventsBranch.c" + } else { + SidebarEntry* _tmp4_; +#line 318 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + _tmp4_ = entry; +#line 318 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + _tmp0_ = G_TYPE_CHECK_INSTANCE_TYPE (_tmp4_, EVENTS_TYPE_MASTER_DIRECTORY_ENTRY); +#line 2860 "EventsBranch.c" + } +#line 317 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + if (_tmp0_) { +#line 319 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + result = FALSE; +#line 319 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + return result; +#line 2868 "EventsBranch.c" + } else { + SidebarEntry* _tmp5_; + gint _tmp6_; +#line 321 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + _tmp5_ = entry; +#line 321 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + _tmp6_ = events_year_directory_entry_get_year (G_TYPE_CHECK_INSTANCE_CAST (_tmp5_, EVENTS_TYPE_YEAR_DIRECTORY_ENTRY, EventsYearDirectoryEntry)); +#line 321 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + result = _tmp6_ == _data9_->event_year; +#line 321 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + return result; +#line 2880 "EventsBranch.c" + } +} + + +static gboolean ___lambda20__locator (gconstpointer item, gpointer self) { + gboolean result; + result = __lambda20_ (self, (SidebarEntry*) item); +#line 316 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + return result; +#line 2890 "EventsBranch.c" +} + + +static SidebarEntry* events_branch_find_event_year (EventsBranch* self, Event* event, struct tm* event_tm) { + SidebarEntry* result = NULL; + Block9Data* _data9_; + struct tm _tmp0_; + gint _tmp1_; + SidebarEntry* _tmp2_; + SidebarEntry* _tmp3_; + SidebarEntry* _tmp4_; + SidebarEntry* _tmp5_; +#line 313 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + g_return_val_if_fail (EVENTS_IS_BRANCH (self), NULL); +#line 313 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + g_return_val_if_fail (IS_EVENT (event), NULL); +#line 313 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + g_return_val_if_fail (event_tm != NULL, NULL); +#line 313 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + _data9_ = g_slice_new0 (Block9Data); +#line 313 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + _data9_->_ref_count_ = 1; +#line 313 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + _data9_->self = g_object_ref (self); +#line 314 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + _tmp0_ = *event_tm; +#line 314 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + _tmp1_ = _tmp0_.tm_year; +#line 314 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + _data9_->event_year = _tmp1_ + 1900; +#line 316 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + _tmp2_ = sidebar_branch_get_root (G_TYPE_CHECK_INSTANCE_CAST (self, SIDEBAR_TYPE_BRANCH, SidebarBranch)); +#line 316 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + _tmp3_ = _tmp2_; +#line 316 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + _tmp4_ = sidebar_branch_find_first_child (G_TYPE_CHECK_INSTANCE_CAST (self, SIDEBAR_TYPE_BRANCH, SidebarBranch), _tmp3_, ___lambda20__locator, _data9_); +#line 316 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + _tmp5_ = _tmp4_; +#line 316 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + _g_object_unref0 (_tmp3_); +#line 316 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + result = _tmp5_; +#line 316 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + block9_data_unref (_data9_); +#line 316 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + _data9_ = NULL; +#line 316 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + return result; +#line 2939 "EventsBranch.c" +} + + +static gint _events_branch_undated_event_comparator_gcompare_func (gconstpointer a, gconstpointer b) { + gint result; + result = events_branch_undated_event_comparator ((SidebarEntry*) a, (SidebarEntry*) b); +#line 327 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + return result; +#line 2948 "EventsBranch.c" +} + + +static void events_branch_add_undated_event (EventsBranch* self, Event* event) { + EventsUndatedDirectoryEntry* _tmp0_; + gboolean _tmp1_; + EventsUndatedDirectoryEntry* _tmp5_; + Event* _tmp6_; +#line 325 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + g_return_if_fail (EVENTS_IS_BRANCH (self)); +#line 325 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + g_return_if_fail (IS_EVENT (event)); +#line 326 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + _tmp0_ = self->priv->undated_entry; +#line 326 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + _tmp1_ = sidebar_branch_has_entry (G_TYPE_CHECK_INSTANCE_CAST (self, SIDEBAR_TYPE_BRANCH, SidebarBranch), G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, SIDEBAR_TYPE_ENTRY, SidebarEntry)); +#line 326 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + if (!_tmp1_) { +#line 2967 "EventsBranch.c" + SidebarEntry* _tmp2_; + SidebarEntry* _tmp3_; + EventsUndatedDirectoryEntry* _tmp4_; +#line 327 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + _tmp2_ = sidebar_branch_get_root (G_TYPE_CHECK_INSTANCE_CAST (self, SIDEBAR_TYPE_BRANCH, SidebarBranch)); +#line 327 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + _tmp3_ = _tmp2_; +#line 327 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + _tmp4_ = self->priv->undated_entry; +#line 327 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + sidebar_branch_graft (G_TYPE_CHECK_INSTANCE_CAST (self, SIDEBAR_TYPE_BRANCH, SidebarBranch), _tmp3_, G_TYPE_CHECK_INSTANCE_CAST (_tmp4_, SIDEBAR_TYPE_ENTRY, SidebarEntry), _events_branch_undated_event_comparator_gcompare_func); +#line 327 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + _g_object_unref0 (_tmp3_); +#line 2981 "EventsBranch.c" + } +#line 329 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + _tmp5_ = self->priv->undated_entry; +#line 329 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + _tmp6_ = event; +#line 329 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + events_branch_graft_event (self, G_TYPE_CHECK_INSTANCE_CAST (_tmp5_, SIDEBAR_TYPE_ENTRY, SidebarEntry), _tmp6_, NULL); +#line 2989 "EventsBranch.c" +} + + +static void events_branch_move_to_undated_event (EventsBranch* self, Event* event) { + EventsUndatedDirectoryEntry* _tmp0_; + gboolean _tmp1_; + Event* _tmp5_; + EventsUndatedDirectoryEntry* _tmp6_; +#line 332 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + g_return_if_fail (EVENTS_IS_BRANCH (self)); +#line 332 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + g_return_if_fail (IS_EVENT (event)); +#line 333 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + _tmp0_ = self->priv->undated_entry; +#line 333 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + _tmp1_ = sidebar_branch_has_entry (G_TYPE_CHECK_INSTANCE_CAST (self, SIDEBAR_TYPE_BRANCH, SidebarBranch), G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, SIDEBAR_TYPE_ENTRY, SidebarEntry)); +#line 333 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + if (!_tmp1_) { +#line 3008 "EventsBranch.c" + SidebarEntry* _tmp2_; + SidebarEntry* _tmp3_; + EventsUndatedDirectoryEntry* _tmp4_; +#line 334 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + _tmp2_ = sidebar_branch_get_root (G_TYPE_CHECK_INSTANCE_CAST (self, SIDEBAR_TYPE_BRANCH, SidebarBranch)); +#line 334 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + _tmp3_ = _tmp2_; +#line 334 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + _tmp4_ = self->priv->undated_entry; +#line 334 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + sidebar_branch_graft (G_TYPE_CHECK_INSTANCE_CAST (self, SIDEBAR_TYPE_BRANCH, SidebarBranch), _tmp3_, G_TYPE_CHECK_INSTANCE_CAST (_tmp4_, SIDEBAR_TYPE_ENTRY, SidebarEntry), NULL); +#line 334 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + _g_object_unref0 (_tmp3_); +#line 3022 "EventsBranch.c" + } +#line 336 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + _tmp5_ = event; +#line 336 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + _tmp6_ = self->priv->undated_entry; +#line 336 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + events_branch_reparent_event (self, _tmp5_, G_TYPE_CHECK_INSTANCE_CAST (_tmp6_, SIDEBAR_TYPE_ENTRY, SidebarEntry)); +#line 3030 "EventsBranch.c" +} + + +static void events_branch_graft_event (EventsBranch* self, SidebarEntry* parent, Event* event, GCompareFunc comparator) { + EventsEventEntry* entry = NULL; + Event* _tmp0_; + EventsEventEntry* _tmp1_; + GeeHashMap* _tmp2_; + Event* _tmp3_; + SidebarEntry* _tmp4_; + GCompareFunc _tmp5_; +#line 339 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + g_return_if_fail (EVENTS_IS_BRANCH (self)); +#line 339 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + g_return_if_fail (SIDEBAR_IS_ENTRY (parent)); +#line 339 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + g_return_if_fail (IS_EVENT (event)); +#line 341 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + _tmp0_ = event; +#line 341 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + _tmp1_ = events_event_entry_new (_tmp0_); +#line 341 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + entry = _tmp1_; +#line 342 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + _tmp2_ = self->priv->entry_map; +#line 342 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + _tmp3_ = event; +#line 342 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + gee_abstract_map_set (G_TYPE_CHECK_INSTANCE_CAST (_tmp2_, GEE_TYPE_ABSTRACT_MAP, GeeAbstractMap), _tmp3_, entry); +#line 344 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + _tmp4_ = parent; +#line 344 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + _tmp5_ = comparator; +#line 344 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + sidebar_branch_graft (G_TYPE_CHECK_INSTANCE_CAST (self, SIDEBAR_TYPE_BRANCH, SidebarBranch), _tmp4_, G_TYPE_CHECK_INSTANCE_CAST (entry, SIDEBAR_TYPE_ENTRY, SidebarEntry), _tmp5_); +#line 339 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + _g_object_unref0 (entry); +#line 3068 "EventsBranch.c" +} + + +static void events_branch_reparent_event (EventsBranch* self, Event* event, SidebarEntry* new_parent) { + EventsEventEntry* entry = NULL; + GeeHashMap* _tmp0_; + Event* _tmp1_; + gpointer _tmp2_; + EventsEventEntry* _tmp3_; + SidebarEntry* old_parent = NULL; + EventsEventEntry* _tmp4_; + SidebarEntry* _tmp5_; + SidebarEntry* _tmp6_; + SidebarEntry* _tmp7_; + EventsEventEntry* _tmp8_; +#line 347 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + g_return_if_fail (EVENTS_IS_BRANCH (self)); +#line 347 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + g_return_if_fail (IS_EVENT (event)); +#line 347 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + g_return_if_fail (SIDEBAR_IS_ENTRY (new_parent)); +#line 348 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + _tmp0_ = self->priv->entry_map; +#line 348 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + _tmp1_ = event; +#line 348 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + _tmp2_ = gee_abstract_map_get (G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, GEE_TYPE_ABSTRACT_MAP, GeeAbstractMap), _tmp1_); +#line 348 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + entry = (EventsEventEntry*) _tmp2_; +#line 349 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + _tmp3_ = entry; +#line 349 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + _vala_assert (_tmp3_ != NULL, "entry != null"); +#line 351 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + _tmp4_ = entry; +#line 351 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + _tmp5_ = sidebar_branch_get_parent (G_TYPE_CHECK_INSTANCE_CAST (self, SIDEBAR_TYPE_BRANCH, SidebarBranch), G_TYPE_CHECK_INSTANCE_CAST (_tmp4_, SIDEBAR_TYPE_ENTRY, SidebarEntry)); +#line 351 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + old_parent = _tmp5_; +#line 352 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + _tmp6_ = old_parent; +#line 352 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + _vala_assert (_tmp6_ != NULL, "old_parent != null"); +#line 354 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + _tmp7_ = new_parent; +#line 354 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + _tmp8_ = entry; +#line 354 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + sidebar_branch_reparent (G_TYPE_CHECK_INSTANCE_CAST (self, SIDEBAR_TYPE_BRANCH, SidebarBranch), _tmp7_, G_TYPE_CHECK_INSTANCE_CAST (_tmp8_, SIDEBAR_TYPE_ENTRY, SidebarEntry)); +#line 356 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + while (TRUE) { +#line 3120 "EventsBranch.c" + gboolean _tmp9_ = FALSE; + SidebarEntry* _tmp10_; + gint _tmp11_; + SidebarEntry* grandparent = NULL; + SidebarEntry* _tmp15_; + SidebarEntry* _tmp16_; + SidebarEntry* _tmp17_; + SidebarEntry* _tmp18_; + SidebarEntry* _tmp19_; + SidebarEntry* _tmp20_; +#line 356 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + _tmp10_ = old_parent; +#line 356 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + _tmp11_ = sidebar_branch_get_child_count (G_TYPE_CHECK_INSTANCE_CAST (self, SIDEBAR_TYPE_BRANCH, SidebarBranch), _tmp10_); +#line 356 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + if (_tmp11_ == 0) { +#line 3137 "EventsBranch.c" + SidebarEntry* _tmp12_; + SidebarEntry* _tmp13_; + SidebarEntry* _tmp14_; +#line 356 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + _tmp12_ = old_parent; +#line 356 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + _tmp13_ = sidebar_branch_get_root (G_TYPE_CHECK_INSTANCE_CAST (self, SIDEBAR_TYPE_BRANCH, SidebarBranch)); +#line 356 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + _tmp14_ = _tmp13_; +#line 356 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + _tmp9_ = _tmp12_ != _tmp14_; +#line 356 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + _g_object_unref0 (_tmp14_); +#line 3151 "EventsBranch.c" + } else { +#line 356 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + _tmp9_ = FALSE; +#line 3155 "EventsBranch.c" + } +#line 356 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + if (!_tmp9_) { +#line 356 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + break; +#line 3161 "EventsBranch.c" + } +#line 357 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + _tmp15_ = old_parent; +#line 357 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + _tmp16_ = sidebar_branch_get_parent (G_TYPE_CHECK_INSTANCE_CAST (self, SIDEBAR_TYPE_BRANCH, SidebarBranch), _tmp15_); +#line 357 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + grandparent = _tmp16_; +#line 358 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + _tmp17_ = grandparent; +#line 358 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + _vala_assert (_tmp17_ != NULL, "grandparent != null"); +#line 360 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + _tmp18_ = old_parent; +#line 360 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + sidebar_branch_prune (G_TYPE_CHECK_INSTANCE_CAST (self, SIDEBAR_TYPE_BRANCH, SidebarBranch), _tmp18_); +#line 362 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + _tmp19_ = grandparent; +#line 362 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + _tmp20_ = _g_object_ref0 (_tmp19_); +#line 362 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + _g_object_unref0 (old_parent); +#line 362 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + old_parent = _tmp20_; +#line 356 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + _g_object_unref0 (grandparent); +#line 3187 "EventsBranch.c" + } +#line 347 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + _g_object_unref0 (old_parent); +#line 347 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + _g_object_unref0 (entry); +#line 3193 "EventsBranch.c" +} + + +static void events_branch_show_no_events (EventsBranch* self, gboolean show) { + gboolean _tmp0_ = FALSE; + gboolean _tmp1_; +#line 366 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + g_return_if_fail (EVENTS_IS_BRANCH (self)); +#line 367 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + _tmp1_ = show; +#line 367 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + if (_tmp1_) { +#line 3206 "EventsBranch.c" + EventsNoEventEntry* _tmp2_; + gboolean _tmp3_; +#line 367 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + _tmp2_ = self->priv->no_event_entry; +#line 367 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + _tmp3_ = sidebar_branch_has_entry (G_TYPE_CHECK_INSTANCE_CAST (self, SIDEBAR_TYPE_BRANCH, SidebarBranch), G_TYPE_CHECK_INSTANCE_CAST (_tmp2_, SIDEBAR_TYPE_ENTRY, SidebarEntry)); +#line 367 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + _tmp0_ = !_tmp3_; +#line 3215 "EventsBranch.c" + } else { +#line 367 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + _tmp0_ = FALSE; +#line 3219 "EventsBranch.c" + } +#line 367 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + if (_tmp0_) { +#line 3223 "EventsBranch.c" + SidebarEntry* _tmp4_; + SidebarEntry* _tmp5_; + EventsNoEventEntry* _tmp6_; +#line 368 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + _tmp4_ = sidebar_branch_get_root (G_TYPE_CHECK_INSTANCE_CAST (self, SIDEBAR_TYPE_BRANCH, SidebarBranch)); +#line 368 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + _tmp5_ = _tmp4_; +#line 368 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + _tmp6_ = self->priv->no_event_entry; +#line 368 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + sidebar_branch_graft (G_TYPE_CHECK_INSTANCE_CAST (self, SIDEBAR_TYPE_BRANCH, SidebarBranch), _tmp5_, G_TYPE_CHECK_INSTANCE_CAST (_tmp6_, SIDEBAR_TYPE_ENTRY, SidebarEntry), NULL); +#line 368 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + _g_object_unref0 (_tmp5_); +#line 3237 "EventsBranch.c" + } else { + gboolean _tmp7_ = FALSE; + gboolean _tmp8_; +#line 369 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + _tmp8_ = show; +#line 369 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + if (!_tmp8_) { +#line 3245 "EventsBranch.c" + EventsNoEventEntry* _tmp9_; + gboolean _tmp10_; +#line 369 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + _tmp9_ = self->priv->no_event_entry; +#line 369 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + _tmp10_ = sidebar_branch_has_entry (G_TYPE_CHECK_INSTANCE_CAST (self, SIDEBAR_TYPE_BRANCH, SidebarBranch), G_TYPE_CHECK_INSTANCE_CAST (_tmp9_, SIDEBAR_TYPE_ENTRY, SidebarEntry)); +#line 369 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + _tmp7_ = _tmp10_; +#line 3254 "EventsBranch.c" + } else { +#line 369 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + _tmp7_ = FALSE; +#line 3258 "EventsBranch.c" + } +#line 369 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + if (_tmp7_) { +#line 3262 "EventsBranch.c" + EventsNoEventEntry* _tmp11_; +#line 370 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + _tmp11_ = self->priv->no_event_entry; +#line 370 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + sidebar_branch_prune (G_TYPE_CHECK_INSTANCE_CAST (self, SIDEBAR_TYPE_BRANCH, SidebarBranch), G_TYPE_CHECK_INSTANCE_CAST (_tmp11_, SIDEBAR_TYPE_ENTRY, SidebarEntry)); +#line 3268 "EventsBranch.c" + } + } +} + + +static void events_branch_class_init (EventsBranchClass * klass) { + gchar* _tmp0_; + gchar* _tmp1_; + gchar* _tmp2_; + gchar* _tmp3_; +#line 7 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + events_branch_parent_class = g_type_class_peek_parent (klass); +#line 7 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + g_type_class_add_private (klass, sizeof (EventsBranchPrivate)); +#line 7 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + G_OBJECT_CLASS (klass)->finalize = events_branch_finalize; +#line 8 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + _tmp0_ = g_strdup (RESOURCES_ICON_FOLDER); +#line 8 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + events_branch_icon = _tmp0_; +#line 9 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + _tmp1_ = g_strdup (RESOURCES_ICON_EVENTS); +#line 9 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + events_branch_events_icon = _tmp1_; +#line 10 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + _tmp2_ = g_strdup (RESOURCES_ICON_ONE_EVENT); +#line 10 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + events_branch_single_event_icon = _tmp2_; +#line 11 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + _tmp3_ = g_strdup (RESOURCES_ICON_NO_EVENT); +#line 11 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + events_branch_no_event_icon = _tmp3_; +#line 3301 "EventsBranch.c" +} + + +static void events_branch_instance_init (EventsBranch * self) { + GeeHashMap* _tmp0_; + EventsUndatedDirectoryEntry* _tmp1_; + EventsNoEventEntry* _tmp2_; + EventsMasterDirectoryEntry* _tmp3_; +#line 7 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + self->priv = EVENTS_BRANCH_GET_PRIVATE (self); +#line 18 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + _tmp0_ = gee_hash_map_new (TYPE_EVENT, (GBoxedCopyFunc) g_object_ref, (GDestroyNotify) g_object_unref, EVENTS_TYPE_EVENT_ENTRY, (GBoxedCopyFunc) g_object_ref, (GDestroyNotify) g_object_unref, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL); +#line 18 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + self->priv->entry_map = _tmp0_; +#line 20 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + _tmp1_ = events_undated_directory_entry_new (); +#line 20 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + self->priv->undated_entry = _tmp1_; +#line 21 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + _tmp2_ = events_no_event_entry_new (); +#line 21 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + self->priv->no_event_entry = _tmp2_; +#line 22 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + _tmp3_ = events_master_directory_entry_new (); +#line 22 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + self->priv->all_events_entry = _tmp3_; +#line 3328 "EventsBranch.c" +} + + +static void events_branch_finalize (GObject * obj) { + EventsBranch * self; + EventSourceCollection* _tmp0_; + guint _tmp1_; + EventSourceCollection* _tmp2_; + guint _tmp3_; + EventSourceCollection* _tmp4_; + guint _tmp5_; + ConfigFacade* _tmp6_; + ConfigFacade* _tmp7_; + guint _tmp8_; +#line 7 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + self = G_TYPE_CHECK_INSTANCE_CAST (obj, EVENTS_TYPE_BRANCH, EventsBranch); +#line 47 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + _tmp0_ = event_global; +#line 47 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + g_signal_parse_name ("contents-altered", TYPE_DATA_COLLECTION, &_tmp1_, NULL, FALSE); +#line 47 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + g_signal_handlers_disconnect_matched (G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, TYPE_DATA_COLLECTION, DataCollection), G_SIGNAL_MATCH_ID | G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA, _tmp1_, 0, NULL, (GCallback) _events_branch_on_events_added_removed_data_collection_contents_altered, self); +#line 48 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + _tmp2_ = event_global; +#line 48 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + g_signal_parse_name ("items-altered", TYPE_DATA_COLLECTION, &_tmp3_, NULL, FALSE); +#line 48 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + g_signal_handlers_disconnect_matched (G_TYPE_CHECK_INSTANCE_CAST (_tmp2_, TYPE_DATA_COLLECTION, DataCollection), G_SIGNAL_MATCH_ID | G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA, _tmp3_, 0, NULL, (GCallback) _events_branch_on_events_altered_data_collection_items_altered, self); +#line 49 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + _tmp4_ = event_global; +#line 49 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + g_signal_parse_name ("no-event-collection-altered", TYPE_EVENT_SOURCE_COLLECTION, &_tmp5_, NULL, FALSE); +#line 49 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + g_signal_handlers_disconnect_matched (_tmp4_, G_SIGNAL_MATCH_ID | G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA, _tmp5_, 0, NULL, (GCallback) _events_branch_on_no_event_collection_altered_event_source_collection_no_event_collection_altered, self); +#line 51 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + _tmp6_ = config_facade_get_instance (); +#line 51 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + _tmp7_ = _tmp6_; +#line 51 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + g_signal_parse_name ("events-sort-ascending-changed", TYPE_CONFIGURATION_FACADE, &_tmp8_, NULL, FALSE); +#line 51 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + g_signal_handlers_disconnect_matched (G_TYPE_CHECK_INSTANCE_CAST (_tmp7_, TYPE_CONFIGURATION_FACADE, ConfigurationFacade), G_SIGNAL_MATCH_ID | G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA, _tmp8_, 0, NULL, (GCallback) _events_branch_on_config_changed_configuration_facade_events_sort_ascending_changed, self); +#line 51 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + _g_object_unref0 (_tmp7_); +#line 18 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + _g_object_unref0 (self->priv->entry_map); +#line 20 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + _g_object_unref0 (self->priv->undated_entry); +#line 21 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + _g_object_unref0 (self->priv->no_event_entry); +#line 22 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + _g_object_unref0 (self->priv->all_events_entry); +#line 7 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + G_OBJECT_CLASS (events_branch_parent_class)->finalize (obj); +#line 3383 "EventsBranch.c" +} + + +GType events_branch_get_type (void) { + static volatile gsize events_branch_type_id__volatile = 0; + if (g_once_init_enter (&events_branch_type_id__volatile)) { + static const GTypeInfo g_define_type_info = { sizeof (EventsBranchClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) events_branch_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (EventsBranch), 0, (GInstanceInitFunc) events_branch_instance_init, NULL }; + GType events_branch_type_id; + events_branch_type_id = g_type_register_static (SIDEBAR_TYPE_BRANCH, "EventsBranch", &g_define_type_info, 0); + g_once_init_leave (&events_branch_type_id__volatile, events_branch_type_id); + } + return events_branch_type_id__volatile; +} + + +EventsDirectoryEntry* events_directory_entry_construct (GType object_type) { + EventsDirectoryEntry * self = NULL; +#line 375 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + self = (EventsDirectoryEntry*) sidebar_simple_page_entry_construct (object_type); +#line 375 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + return self; +#line 3405 "EventsBranch.c" +} + + +static gchar* events_directory_entry_real_get_sidebar_icon (SidebarSimplePageEntry* base) { + EventsDirectoryEntry * self; + gchar* result = NULL; + const gchar* _tmp0_; + gchar* _tmp1_; +#line 378 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + self = G_TYPE_CHECK_INSTANCE_CAST (base, EVENTS_TYPE_DIRECTORY_ENTRY, EventsDirectoryEntry); +#line 379 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + _tmp0_ = events_branch_icon; +#line 379 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + _tmp1_ = g_strdup (_tmp0_); +#line 379 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + result = _tmp1_; +#line 379 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + return result; +#line 3424 "EventsBranch.c" +} + + +static gboolean events_directory_entry_real_expand_on_select (SidebarExpandableEntry* base) { + EventsDirectoryEntry * self; + gboolean result = FALSE; +#line 382 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + self = G_TYPE_CHECK_INSTANCE_CAST (base, EVENTS_TYPE_DIRECTORY_ENTRY, EventsDirectoryEntry); +#line 383 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + result = TRUE; +#line 383 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + return result; +#line 3437 "EventsBranch.c" +} + + +static void events_directory_entry_class_init (EventsDirectoryEntryClass * klass) { +#line 374 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + events_directory_entry_parent_class = g_type_class_peek_parent (klass); +#line 374 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + ((SidebarSimplePageEntryClass *) klass)->get_sidebar_icon = (gchar* (*) (SidebarSimplePageEntry *)) events_directory_entry_real_get_sidebar_icon; +#line 3446 "EventsBranch.c" +} + + +static void events_directory_entry_sidebar_expandable_entry_interface_init (SidebarExpandableEntryIface * iface) { +#line 374 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + events_directory_entry_sidebar_expandable_entry_parent_iface = g_type_interface_peek_parent (iface); +#line 374 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + iface->expand_on_select = (gboolean (*) (SidebarExpandableEntry *)) events_directory_entry_real_expand_on_select; +#line 3455 "EventsBranch.c" +} + + +static void events_directory_entry_instance_init (EventsDirectoryEntry * self) { +} + + +GType events_directory_entry_get_type (void) { + static volatile gsize events_directory_entry_type_id__volatile = 0; + if (g_once_init_enter (&events_directory_entry_type_id__volatile)) { + static const GTypeInfo g_define_type_info = { sizeof (EventsDirectoryEntryClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) events_directory_entry_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (EventsDirectoryEntry), 0, (GInstanceInitFunc) events_directory_entry_instance_init, NULL }; + static const GInterfaceInfo sidebar_expandable_entry_info = { (GInterfaceInitFunc) events_directory_entry_sidebar_expandable_entry_interface_init, (GInterfaceFinalizeFunc) NULL, NULL}; + GType events_directory_entry_type_id; + events_directory_entry_type_id = g_type_register_static (SIDEBAR_TYPE_SIMPLE_PAGE_ENTRY, "EventsDirectoryEntry", &g_define_type_info, G_TYPE_FLAG_ABSTRACT); + g_type_add_interface_static (events_directory_entry_type_id, SIDEBAR_TYPE_EXPANDABLE_ENTRY, &sidebar_expandable_entry_info); + g_once_init_leave (&events_directory_entry_type_id__volatile, events_directory_entry_type_id); + } + return events_directory_entry_type_id__volatile; +} + + +EventsMasterDirectoryEntry* events_master_directory_entry_construct (GType object_type) { + EventsMasterDirectoryEntry * self = NULL; +#line 388 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + self = (EventsMasterDirectoryEntry*) events_directory_entry_construct (object_type); +#line 388 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + return self; +#line 3483 "EventsBranch.c" +} + + +EventsMasterDirectoryEntry* events_master_directory_entry_new (void) { +#line 388 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + return events_master_directory_entry_construct (EVENTS_TYPE_MASTER_DIRECTORY_ENTRY); +#line 3490 "EventsBranch.c" +} + + +static gchar* events_master_directory_entry_real_get_sidebar_name (SidebarSimplePageEntry* base) { + EventsMasterDirectoryEntry * self; + gchar* result = NULL; + gchar* _tmp0_; +#line 391 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + self = G_TYPE_CHECK_INSTANCE_CAST (base, EVENTS_TYPE_MASTER_DIRECTORY_ENTRY, EventsMasterDirectoryEntry); +#line 392 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + _tmp0_ = g_strdup (MASTER_EVENTS_DIRECTORY_PAGE_NAME); +#line 392 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + result = _tmp0_; +#line 392 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + return result; +#line 3506 "EventsBranch.c" +} + + +static gchar* events_master_directory_entry_real_get_sidebar_icon (SidebarSimplePageEntry* base) { + EventsMasterDirectoryEntry * self; + gchar* result = NULL; + const gchar* _tmp0_; + gchar* _tmp1_; +#line 395 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + self = G_TYPE_CHECK_INSTANCE_CAST (base, EVENTS_TYPE_MASTER_DIRECTORY_ENTRY, EventsMasterDirectoryEntry); +#line 396 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + _tmp0_ = events_branch_events_icon; +#line 396 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + _tmp1_ = g_strdup (_tmp0_); +#line 396 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + result = _tmp1_; +#line 396 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + return result; +#line 3525 "EventsBranch.c" +} + + +static Page* events_master_directory_entry_real_create_page (SidebarSimplePageEntry* base) { + EventsMasterDirectoryEntry * self; + Page* result = NULL; + MasterEventsDirectoryPage* _tmp0_; +#line 399 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + self = G_TYPE_CHECK_INSTANCE_CAST (base, EVENTS_TYPE_MASTER_DIRECTORY_ENTRY, EventsMasterDirectoryEntry); +#line 400 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + _tmp0_ = master_events_directory_page_new (); +#line 400 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + g_object_ref_sink (_tmp0_); +#line 400 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + result = G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, TYPE_PAGE, Page); +#line 400 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + return result; +#line 3543 "EventsBranch.c" +} + + +static void events_master_directory_entry_class_init (EventsMasterDirectoryEntryClass * klass) { +#line 387 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + events_master_directory_entry_parent_class = g_type_class_peek_parent (klass); +#line 387 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + ((SidebarSimplePageEntryClass *) klass)->get_sidebar_name = (gchar* (*) (SidebarSimplePageEntry *)) events_master_directory_entry_real_get_sidebar_name; +#line 387 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + ((SidebarSimplePageEntryClass *) klass)->get_sidebar_icon = (gchar* (*) (SidebarSimplePageEntry *)) events_master_directory_entry_real_get_sidebar_icon; +#line 387 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + ((SidebarSimplePageEntryClass *) klass)->create_page = (Page* (*) (SidebarSimplePageEntry *)) events_master_directory_entry_real_create_page; +#line 3556 "EventsBranch.c" +} + + +static void events_master_directory_entry_instance_init (EventsMasterDirectoryEntry * self) { +} + + +GType events_master_directory_entry_get_type (void) { + static volatile gsize events_master_directory_entry_type_id__volatile = 0; + if (g_once_init_enter (&events_master_directory_entry_type_id__volatile)) { + static const GTypeInfo g_define_type_info = { sizeof (EventsMasterDirectoryEntryClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) events_master_directory_entry_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (EventsMasterDirectoryEntry), 0, (GInstanceInitFunc) events_master_directory_entry_instance_init, NULL }; + GType events_master_directory_entry_type_id; + events_master_directory_entry_type_id = g_type_register_static (EVENTS_TYPE_DIRECTORY_ENTRY, "EventsMasterDirectoryEntry", &g_define_type_info, 0); + g_once_init_leave (&events_master_directory_entry_type_id__volatile, events_master_directory_entry_type_id); + } + return events_master_directory_entry_type_id__volatile; +} + + +EventsYearDirectoryEntry* events_year_directory_entry_construct (GType object_type, const gchar* name, struct tm* tm) { + EventsYearDirectoryEntry * self = NULL; + const gchar* _tmp0_; + gchar* _tmp1_; + struct tm _tmp2_; +#line 408 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + g_return_val_if_fail (name != NULL, NULL); +#line 408 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + g_return_val_if_fail (tm != NULL, NULL); +#line 408 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + self = (EventsYearDirectoryEntry*) events_directory_entry_construct (object_type); +#line 409 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + _tmp0_ = name; +#line 409 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + _tmp1_ = g_strdup (_tmp0_); +#line 409 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + _g_free0 (self->priv->name); +#line 409 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + self->priv->name = _tmp1_; +#line 410 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + _tmp2_ = *tm; +#line 410 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + self->priv->tm = _tmp2_; +#line 408 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + return self; +#line 3601 "EventsBranch.c" +} + + +EventsYearDirectoryEntry* events_year_directory_entry_new (const gchar* name, struct tm* tm) { +#line 408 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + return events_year_directory_entry_construct (EVENTS_TYPE_YEAR_DIRECTORY_ENTRY, name, tm); +#line 3608 "EventsBranch.c" +} + + +static gchar* events_year_directory_entry_real_get_sidebar_name (SidebarSimplePageEntry* base) { + EventsYearDirectoryEntry * self; + gchar* result = NULL; + const gchar* _tmp0_; + gchar* _tmp1_; +#line 413 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + self = G_TYPE_CHECK_INSTANCE_CAST (base, EVENTS_TYPE_YEAR_DIRECTORY_ENTRY, EventsYearDirectoryEntry); +#line 414 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + _tmp0_ = self->priv->name; +#line 414 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + _tmp1_ = g_strdup (_tmp0_); +#line 414 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + result = _tmp1_; +#line 414 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + return result; +#line 3627 "EventsBranch.c" +} + + +gint events_year_directory_entry_get_year (EventsYearDirectoryEntry* self) { + gint result = 0; + struct tm _tmp0_; + gint _tmp1_; +#line 417 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + g_return_val_if_fail (EVENTS_IS_YEAR_DIRECTORY_ENTRY (self), 0); +#line 418 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + _tmp0_ = self->priv->tm; +#line 418 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + _tmp1_ = _tmp0_.tm_year; +#line 418 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + result = _tmp1_ + 1900; +#line 418 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + return result; +#line 3645 "EventsBranch.c" +} + + +static Page* events_year_directory_entry_real_create_page (SidebarSimplePageEntry* base) { + EventsYearDirectoryEntry * self; + Page* result = NULL; + struct tm _tmp0_; + SubEventsDirectoryPage* _tmp1_; +#line 421 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + self = G_TYPE_CHECK_INSTANCE_CAST (base, EVENTS_TYPE_YEAR_DIRECTORY_ENTRY, EventsYearDirectoryEntry); +#line 422 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + _tmp0_ = self->priv->tm; +#line 422 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + _tmp1_ = sub_events_directory_page_new (SUB_EVENTS_DIRECTORY_PAGE_DIRECTORY_TYPE_YEAR, &_tmp0_); +#line 422 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + g_object_ref_sink (_tmp1_); +#line 422 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + result = G_TYPE_CHECK_INSTANCE_CAST (_tmp1_, TYPE_PAGE, Page); +#line 422 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + return result; +#line 3666 "EventsBranch.c" +} + + +static void events_year_directory_entry_class_init (EventsYearDirectoryEntryClass * klass) { +#line 404 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + events_year_directory_entry_parent_class = g_type_class_peek_parent (klass); +#line 404 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + g_type_class_add_private (klass, sizeof (EventsYearDirectoryEntryPrivate)); +#line 404 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + ((SidebarSimplePageEntryClass *) klass)->get_sidebar_name = (gchar* (*) (SidebarSimplePageEntry *)) events_year_directory_entry_real_get_sidebar_name; +#line 404 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + ((SidebarSimplePageEntryClass *) klass)->create_page = (Page* (*) (SidebarSimplePageEntry *)) events_year_directory_entry_real_create_page; +#line 404 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + G_OBJECT_CLASS (klass)->finalize = events_year_directory_entry_finalize; +#line 3681 "EventsBranch.c" +} + + +static void events_year_directory_entry_instance_init (EventsYearDirectoryEntry * self) { +#line 404 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + self->priv = EVENTS_YEAR_DIRECTORY_ENTRY_GET_PRIVATE (self); +#line 3688 "EventsBranch.c" +} + + +static void events_year_directory_entry_finalize (GObject * obj) { + EventsYearDirectoryEntry * self; +#line 404 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + self = G_TYPE_CHECK_INSTANCE_CAST (obj, EVENTS_TYPE_YEAR_DIRECTORY_ENTRY, EventsYearDirectoryEntry); +#line 405 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + _g_free0 (self->priv->name); +#line 404 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + G_OBJECT_CLASS (events_year_directory_entry_parent_class)->finalize (obj); +#line 3700 "EventsBranch.c" +} + + +GType events_year_directory_entry_get_type (void) { + static volatile gsize events_year_directory_entry_type_id__volatile = 0; + if (g_once_init_enter (&events_year_directory_entry_type_id__volatile)) { + static const GTypeInfo g_define_type_info = { sizeof (EventsYearDirectoryEntryClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) events_year_directory_entry_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (EventsYearDirectoryEntry), 0, (GInstanceInitFunc) events_year_directory_entry_instance_init, NULL }; + GType events_year_directory_entry_type_id; + events_year_directory_entry_type_id = g_type_register_static (EVENTS_TYPE_DIRECTORY_ENTRY, "EventsYearDirectoryEntry", &g_define_type_info, 0); + g_once_init_leave (&events_year_directory_entry_type_id__volatile, events_year_directory_entry_type_id); + } + return events_year_directory_entry_type_id__volatile; +} + + +EventsMonthDirectoryEntry* events_month_directory_entry_construct (GType object_type, const gchar* name, struct tm* tm) { + EventsMonthDirectoryEntry * self = NULL; + const gchar* _tmp0_; + gchar* _tmp1_; + struct tm _tmp2_; +#line 430 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + g_return_val_if_fail (name != NULL, NULL); +#line 430 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + g_return_val_if_fail (tm != NULL, NULL); +#line 430 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + self = (EventsMonthDirectoryEntry*) events_directory_entry_construct (object_type); +#line 431 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + _tmp0_ = name; +#line 431 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + _tmp1_ = g_strdup (_tmp0_); +#line 431 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + _g_free0 (self->priv->name); +#line 431 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + self->priv->name = _tmp1_; +#line 432 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + _tmp2_ = *tm; +#line 432 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + self->priv->tm = _tmp2_; +#line 430 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + return self; +#line 3741 "EventsBranch.c" +} + + +EventsMonthDirectoryEntry* events_month_directory_entry_new (const gchar* name, struct tm* tm) { +#line 430 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + return events_month_directory_entry_construct (EVENTS_TYPE_MONTH_DIRECTORY_ENTRY, name, tm); +#line 3748 "EventsBranch.c" +} + + +static gchar* events_month_directory_entry_real_get_sidebar_name (SidebarSimplePageEntry* base) { + EventsMonthDirectoryEntry * self; + gchar* result = NULL; + const gchar* _tmp0_; + gchar* _tmp1_; +#line 435 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + self = G_TYPE_CHECK_INSTANCE_CAST (base, EVENTS_TYPE_MONTH_DIRECTORY_ENTRY, EventsMonthDirectoryEntry); +#line 436 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + _tmp0_ = self->priv->name; +#line 436 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + _tmp1_ = g_strdup (_tmp0_); +#line 436 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + result = _tmp1_; +#line 436 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + return result; +#line 3767 "EventsBranch.c" +} + + +gint events_month_directory_entry_get_year (EventsMonthDirectoryEntry* self) { + gint result = 0; + struct tm _tmp0_; + gint _tmp1_; +#line 439 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + g_return_val_if_fail (EVENTS_IS_MONTH_DIRECTORY_ENTRY (self), 0); +#line 440 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + _tmp0_ = self->priv->tm; +#line 440 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + _tmp1_ = _tmp0_.tm_year; +#line 440 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + result = _tmp1_ + 1900; +#line 440 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + return result; +#line 3785 "EventsBranch.c" +} + + +gint events_month_directory_entry_get_month (EventsMonthDirectoryEntry* self) { + gint result = 0; + struct tm _tmp0_; + gint _tmp1_; +#line 443 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + g_return_val_if_fail (EVENTS_IS_MONTH_DIRECTORY_ENTRY (self), 0); +#line 444 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + _tmp0_ = self->priv->tm; +#line 444 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + _tmp1_ = _tmp0_.tm_mon; +#line 444 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + result = _tmp1_ + 1; +#line 444 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + return result; +#line 3803 "EventsBranch.c" +} + + +static Page* events_month_directory_entry_real_create_page (SidebarSimplePageEntry* base) { + EventsMonthDirectoryEntry * self; + Page* result = NULL; + struct tm _tmp0_; + SubEventsDirectoryPage* _tmp1_; +#line 447 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + self = G_TYPE_CHECK_INSTANCE_CAST (base, EVENTS_TYPE_MONTH_DIRECTORY_ENTRY, EventsMonthDirectoryEntry); +#line 448 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + _tmp0_ = self->priv->tm; +#line 448 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + _tmp1_ = sub_events_directory_page_new (SUB_EVENTS_DIRECTORY_PAGE_DIRECTORY_TYPE_MONTH, &_tmp0_); +#line 448 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + g_object_ref_sink (_tmp1_); +#line 448 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + result = G_TYPE_CHECK_INSTANCE_CAST (_tmp1_, TYPE_PAGE, Page); +#line 448 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + return result; +#line 3824 "EventsBranch.c" +} + + +static void events_month_directory_entry_class_init (EventsMonthDirectoryEntryClass * klass) { +#line 426 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + events_month_directory_entry_parent_class = g_type_class_peek_parent (klass); +#line 426 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + g_type_class_add_private (klass, sizeof (EventsMonthDirectoryEntryPrivate)); +#line 426 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + ((SidebarSimplePageEntryClass *) klass)->get_sidebar_name = (gchar* (*) (SidebarSimplePageEntry *)) events_month_directory_entry_real_get_sidebar_name; +#line 426 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + ((SidebarSimplePageEntryClass *) klass)->create_page = (Page* (*) (SidebarSimplePageEntry *)) events_month_directory_entry_real_create_page; +#line 426 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + G_OBJECT_CLASS (klass)->finalize = events_month_directory_entry_finalize; +#line 3839 "EventsBranch.c" +} + + +static void events_month_directory_entry_instance_init (EventsMonthDirectoryEntry * self) { +#line 426 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + self->priv = EVENTS_MONTH_DIRECTORY_ENTRY_GET_PRIVATE (self); +#line 3846 "EventsBranch.c" +} + + +static void events_month_directory_entry_finalize (GObject * obj) { + EventsMonthDirectoryEntry * self; +#line 426 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + self = G_TYPE_CHECK_INSTANCE_CAST (obj, EVENTS_TYPE_MONTH_DIRECTORY_ENTRY, EventsMonthDirectoryEntry); +#line 427 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + _g_free0 (self->priv->name); +#line 426 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + G_OBJECT_CLASS (events_month_directory_entry_parent_class)->finalize (obj); +#line 3858 "EventsBranch.c" +} + + +GType events_month_directory_entry_get_type (void) { + static volatile gsize events_month_directory_entry_type_id__volatile = 0; + if (g_once_init_enter (&events_month_directory_entry_type_id__volatile)) { + static const GTypeInfo g_define_type_info = { sizeof (EventsMonthDirectoryEntryClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) events_month_directory_entry_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (EventsMonthDirectoryEntry), 0, (GInstanceInitFunc) events_month_directory_entry_instance_init, NULL }; + GType events_month_directory_entry_type_id; + events_month_directory_entry_type_id = g_type_register_static (EVENTS_TYPE_DIRECTORY_ENTRY, "EventsMonthDirectoryEntry", &g_define_type_info, 0); + g_once_init_leave (&events_month_directory_entry_type_id__volatile, events_month_directory_entry_type_id); + } + return events_month_directory_entry_type_id__volatile; +} + + +EventsUndatedDirectoryEntry* events_undated_directory_entry_construct (GType object_type) { + EventsUndatedDirectoryEntry * self = NULL; +#line 453 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + self = (EventsUndatedDirectoryEntry*) events_directory_entry_construct (object_type); +#line 453 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + return self; +#line 3880 "EventsBranch.c" +} + + +EventsUndatedDirectoryEntry* events_undated_directory_entry_new (void) { +#line 453 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + return events_undated_directory_entry_construct (EVENTS_TYPE_UNDATED_DIRECTORY_ENTRY); +#line 3887 "EventsBranch.c" +} + + +static gchar* events_undated_directory_entry_real_get_sidebar_name (SidebarSimplePageEntry* base) { + EventsUndatedDirectoryEntry * self; + gchar* result = NULL; + gchar* _tmp0_; +#line 456 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + self = G_TYPE_CHECK_INSTANCE_CAST (base, EVENTS_TYPE_UNDATED_DIRECTORY_ENTRY, EventsUndatedDirectoryEntry); +#line 457 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + _tmp0_ = g_strdup (SUB_EVENTS_DIRECTORY_PAGE_UNDATED_PAGE_NAME); +#line 457 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + result = _tmp0_; +#line 457 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + return result; +#line 3903 "EventsBranch.c" +} + + +static Page* events_undated_directory_entry_real_create_page (SidebarSimplePageEntry* base) { + EventsUndatedDirectoryEntry * self; + Page* result = NULL; + struct tm _tmp0_ = {0}; + SubEventsDirectoryPage* _tmp1_; +#line 460 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + self = G_TYPE_CHECK_INSTANCE_CAST (base, EVENTS_TYPE_UNDATED_DIRECTORY_ENTRY, EventsUndatedDirectoryEntry); +#line 461 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + g_time_local ((time_t) 0, &_tmp0_); +#line 461 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + _tmp1_ = sub_events_directory_page_new (SUB_EVENTS_DIRECTORY_PAGE_DIRECTORY_TYPE_UNDATED, &_tmp0_); +#line 461 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + g_object_ref_sink (_tmp1_); +#line 461 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + result = G_TYPE_CHECK_INSTANCE_CAST (_tmp1_, TYPE_PAGE, Page); +#line 461 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + return result; +#line 3924 "EventsBranch.c" +} + + +static void events_undated_directory_entry_class_init (EventsUndatedDirectoryEntryClass * klass) { +#line 452 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + events_undated_directory_entry_parent_class = g_type_class_peek_parent (klass); +#line 452 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + ((SidebarSimplePageEntryClass *) klass)->get_sidebar_name = (gchar* (*) (SidebarSimplePageEntry *)) events_undated_directory_entry_real_get_sidebar_name; +#line 452 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + ((SidebarSimplePageEntryClass *) klass)->create_page = (Page* (*) (SidebarSimplePageEntry *)) events_undated_directory_entry_real_create_page; +#line 3935 "EventsBranch.c" +} + + +static void events_undated_directory_entry_instance_init (EventsUndatedDirectoryEntry * self) { +} + + +GType events_undated_directory_entry_get_type (void) { + static volatile gsize events_undated_directory_entry_type_id__volatile = 0; + if (g_once_init_enter (&events_undated_directory_entry_type_id__volatile)) { + static const GTypeInfo g_define_type_info = { sizeof (EventsUndatedDirectoryEntryClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) events_undated_directory_entry_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (EventsUndatedDirectoryEntry), 0, (GInstanceInitFunc) events_undated_directory_entry_instance_init, NULL }; + GType events_undated_directory_entry_type_id; + events_undated_directory_entry_type_id = g_type_register_static (EVENTS_TYPE_DIRECTORY_ENTRY, "EventsUndatedDirectoryEntry", &g_define_type_info, 0); + g_once_init_leave (&events_undated_directory_entry_type_id__volatile, events_undated_directory_entry_type_id); + } + return events_undated_directory_entry_type_id__volatile; +} + + +EventsEventEntry* events_event_entry_construct (GType object_type, Event* event) { + EventsEventEntry * self = NULL; + Event* _tmp0_; + Event* _tmp1_; +#line 470 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + g_return_val_if_fail (IS_EVENT (event), NULL); +#line 470 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + self = (EventsEventEntry*) sidebar_simple_page_entry_construct (object_type); +#line 471 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + _tmp0_ = event; +#line 471 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + _tmp1_ = _g_object_ref0 (_tmp0_); +#line 471 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + _g_object_unref0 (self->priv->event); +#line 471 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + self->priv->event = _tmp1_; +#line 470 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + return self; +#line 3973 "EventsBranch.c" +} + + +EventsEventEntry* events_event_entry_new (Event* event) { +#line 470 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + return events_event_entry_construct (EVENTS_TYPE_EVENT_ENTRY, event); +#line 3980 "EventsBranch.c" +} + + +Event* events_event_entry_get_event (EventsEventEntry* self) { + Event* result = NULL; + Event* _tmp0_; + Event* _tmp1_; +#line 474 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + g_return_val_if_fail (EVENTS_IS_EVENT_ENTRY (self), NULL); +#line 475 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + _tmp0_ = self->priv->event; +#line 475 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + _tmp1_ = _g_object_ref0 (_tmp0_); +#line 475 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + result = _tmp1_; +#line 475 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + return result; +#line 3998 "EventsBranch.c" +} + + +static gchar* events_event_entry_real_get_sidebar_name (SidebarSimplePageEntry* base) { + EventsEventEntry * self; + gchar* result = NULL; + Event* _tmp0_; + gchar* _tmp1_; +#line 478 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + self = G_TYPE_CHECK_INSTANCE_CAST (base, EVENTS_TYPE_EVENT_ENTRY, EventsEventEntry); +#line 479 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + _tmp0_ = self->priv->event; +#line 479 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + _tmp1_ = data_object_get_name (G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, TYPE_DATA_OBJECT, DataObject)); +#line 479 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + result = _tmp1_; +#line 479 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + return result; +#line 4017 "EventsBranch.c" +} + + +static gchar* events_event_entry_real_get_sidebar_icon (SidebarSimplePageEntry* base) { + EventsEventEntry * self; + gchar* result = NULL; + const gchar* _tmp0_; + gchar* _tmp1_; +#line 482 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + self = G_TYPE_CHECK_INSTANCE_CAST (base, EVENTS_TYPE_EVENT_ENTRY, EventsEventEntry); +#line 483 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + _tmp0_ = events_branch_single_event_icon; +#line 483 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + _tmp1_ = g_strdup (_tmp0_); +#line 483 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + result = _tmp1_; +#line 483 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + return result; +#line 4036 "EventsBranch.c" +} + + +static Page* events_event_entry_real_create_page (SidebarSimplePageEntry* base) { + EventsEventEntry * self; + Page* result = NULL; + Event* _tmp0_; + EventPage* _tmp1_; +#line 486 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + self = G_TYPE_CHECK_INSTANCE_CAST (base, EVENTS_TYPE_EVENT_ENTRY, EventsEventEntry); +#line 487 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + _tmp0_ = self->priv->event; +#line 487 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + _tmp1_ = event_page_new (_tmp0_); +#line 487 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + g_object_ref_sink (_tmp1_); +#line 487 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + result = G_TYPE_CHECK_INSTANCE_CAST (_tmp1_, TYPE_PAGE, Page); +#line 487 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + return result; +#line 4057 "EventsBranch.c" +} + + +static gboolean events_event_entry_real_is_user_renameable (SidebarRenameableEntry* base) { + EventsEventEntry * self; + gboolean result = FALSE; +#line 490 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + self = G_TYPE_CHECK_INSTANCE_CAST (base, EVENTS_TYPE_EVENT_ENTRY, EventsEventEntry); +#line 491 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + result = TRUE; +#line 491 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + return result; +#line 4070 "EventsBranch.c" +} + + +static void events_event_entry_real_rename (SidebarRenameableEntry* base, const gchar* new_name) { + EventsEventEntry * self; + gchar* prepped = NULL; + const gchar* _tmp0_; + gchar* _tmp1_; + const gchar* _tmp2_; +#line 494 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + self = G_TYPE_CHECK_INSTANCE_CAST (base, EVENTS_TYPE_EVENT_ENTRY, EventsEventEntry); +#line 494 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + g_return_if_fail (new_name != NULL); +#line 495 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + _tmp0_ = new_name; +#line 495 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + _tmp1_ = event_prep_event_name (_tmp0_); +#line 495 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + prepped = _tmp1_; +#line 496 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + _tmp2_ = prepped; +#line 496 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + if (_tmp2_ != NULL) { +#line 4094 "EventsBranch.c" + CommandManager* _tmp3_; + CommandManager* _tmp4_; + Event* _tmp5_; + const gchar* _tmp6_; + RenameEventCommand* _tmp7_; + RenameEventCommand* _tmp8_; +#line 497 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + _tmp3_ = app_window_get_command_manager (); +#line 497 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + _tmp4_ = _tmp3_; +#line 497 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + _tmp5_ = self->priv->event; +#line 497 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + _tmp6_ = prepped; +#line 497 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + _tmp7_ = rename_event_command_new (_tmp5_, _tmp6_); +#line 497 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + _tmp8_ = _tmp7_; +#line 497 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + command_manager_execute (_tmp4_, G_TYPE_CHECK_INSTANCE_CAST (_tmp8_, TYPE_COMMAND, Command)); +#line 497 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + _g_object_unref0 (_tmp8_); +#line 497 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + _command_manager_unref0 (_tmp4_); +#line 4119 "EventsBranch.c" + } +#line 494 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + _g_free0 (prepped); +#line 4123 "EventsBranch.c" +} + + +static gboolean events_event_entry_real_internal_drop_received (SidebarInternalDropTargetEntry* base, GeeList* media) { + EventsEventEntry * self; + gboolean result = FALSE; + GeeArrayList* views = NULL; + GeeArrayList* _tmp0_; + CommandManager* _tmp16_; + CommandManager* _tmp17_; + GeeArrayList* _tmp18_; + Event* _tmp19_; + SetEventCommand* _tmp20_; + SetEventCommand* _tmp21_; +#line 500 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + self = G_TYPE_CHECK_INSTANCE_CAST (base, EVENTS_TYPE_EVENT_ENTRY, EventsEventEntry); +#line 500 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + g_return_val_if_fail (GEE_IS_LIST (media), FALSE); +#line 503 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + _tmp0_ = gee_array_list_new (TYPE_DATA_VIEW, (GBoxedCopyFunc) g_object_ref, (GDestroyNotify) g_object_unref, NULL, NULL, NULL); +#line 503 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + views = _tmp0_; +#line 4146 "EventsBranch.c" + { + GeeList* _media_source_list = NULL; + GeeList* _tmp1_; + GeeList* _tmp2_; + gint _media_source_size = 0; + GeeList* _tmp3_; + gint _tmp4_; + gint _tmp5_; + gint _media_source_index = 0; +#line 504 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + _tmp1_ = media; +#line 504 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + _tmp2_ = _g_object_ref0 (_tmp1_); +#line 504 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + _media_source_list = _tmp2_; +#line 504 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + _tmp3_ = _media_source_list; +#line 504 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + _tmp4_ = gee_collection_get_size (G_TYPE_CHECK_INSTANCE_CAST (_tmp3_, GEE_TYPE_COLLECTION, GeeCollection)); +#line 504 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + _tmp5_ = _tmp4_; +#line 504 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + _media_source_size = _tmp5_; +#line 504 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + _media_source_index = -1; +#line 504 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + while (TRUE) { +#line 4174 "EventsBranch.c" + gint _tmp6_; + gint _tmp7_; + gint _tmp8_; + MediaSource* media_source = NULL; + GeeList* _tmp9_; + gint _tmp10_; + gpointer _tmp11_; + GeeArrayList* _tmp12_; + MediaSource* _tmp13_; + DataView* _tmp14_; + DataView* _tmp15_; +#line 504 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + _tmp6_ = _media_source_index; +#line 504 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + _media_source_index = _tmp6_ + 1; +#line 504 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + _tmp7_ = _media_source_index; +#line 504 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + _tmp8_ = _media_source_size; +#line 504 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + if (!(_tmp7_ < _tmp8_)) { +#line 504 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + break; +#line 4198 "EventsBranch.c" + } +#line 504 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + _tmp9_ = _media_source_list; +#line 504 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + _tmp10_ = _media_source_index; +#line 504 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + _tmp11_ = gee_list_get (_tmp9_, _tmp10_); +#line 504 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + media_source = (MediaSource*) _tmp11_; +#line 505 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + _tmp12_ = views; +#line 505 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + _tmp13_ = media_source; +#line 505 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + _tmp14_ = data_view_new (G_TYPE_CHECK_INSTANCE_CAST (_tmp13_, TYPE_DATA_SOURCE, DataSource)); +#line 505 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + _tmp15_ = _tmp14_; +#line 505 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + gee_abstract_collection_add (G_TYPE_CHECK_INSTANCE_CAST (_tmp12_, GEE_TYPE_ABSTRACT_COLLECTION, GeeAbstractCollection), _tmp15_); +#line 505 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + _g_object_unref0 (_tmp15_); +#line 504 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + _g_object_unref0 (media_source); +#line 4222 "EventsBranch.c" + } +#line 504 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + _g_object_unref0 (_media_source_list); +#line 4226 "EventsBranch.c" + } +#line 507 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + _tmp16_ = app_window_get_command_manager (); +#line 507 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + _tmp17_ = _tmp16_; +#line 507 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + _tmp18_ = views; +#line 507 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + _tmp19_ = self->priv->event; +#line 507 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + _tmp20_ = set_event_command_new (G_TYPE_CHECK_INSTANCE_CAST (_tmp18_, GEE_TYPE_ITERABLE, GeeIterable), _tmp19_); +#line 507 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + _tmp21_ = _tmp20_; +#line 507 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + command_manager_execute (_tmp17_, G_TYPE_CHECK_INSTANCE_CAST (_tmp21_, TYPE_COMMAND, Command)); +#line 507 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + _g_object_unref0 (_tmp21_); +#line 507 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + _command_manager_unref0 (_tmp17_); +#line 509 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + result = TRUE; +#line 509 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + _g_object_unref0 (views); +#line 509 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + return result; +#line 4252 "EventsBranch.c" +} + + +static gboolean events_event_entry_real_internal_drop_received_arbitrary (SidebarInternalDropTargetEntry* base, GtkSelectionData* data) { + EventsEventEntry * self; + gboolean result = FALSE; +#line 512 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + self = G_TYPE_CHECK_INSTANCE_CAST (base, EVENTS_TYPE_EVENT_ENTRY, EventsEventEntry); +#line 512 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + g_return_val_if_fail (data != NULL, FALSE); +#line 513 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + result = FALSE; +#line 513 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + return result; +#line 4267 "EventsBranch.c" +} + + +static void events_event_entry_class_init (EventsEventEntryClass * klass) { +#line 466 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + events_event_entry_parent_class = g_type_class_peek_parent (klass); +#line 466 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + g_type_class_add_private (klass, sizeof (EventsEventEntryPrivate)); +#line 466 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + ((SidebarSimplePageEntryClass *) klass)->get_sidebar_name = (gchar* (*) (SidebarSimplePageEntry *)) events_event_entry_real_get_sidebar_name; +#line 466 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + ((SidebarSimplePageEntryClass *) klass)->get_sidebar_icon = (gchar* (*) (SidebarSimplePageEntry *)) events_event_entry_real_get_sidebar_icon; +#line 466 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + ((SidebarSimplePageEntryClass *) klass)->create_page = (Page* (*) (SidebarSimplePageEntry *)) events_event_entry_real_create_page; +#line 466 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + G_OBJECT_CLASS (klass)->finalize = events_event_entry_finalize; +#line 4284 "EventsBranch.c" +} + + +static void events_event_entry_sidebar_renameable_entry_interface_init (SidebarRenameableEntryIface * iface) { +#line 466 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + events_event_entry_sidebar_renameable_entry_parent_iface = g_type_interface_peek_parent (iface); +#line 466 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + iface->is_user_renameable = (gboolean (*) (SidebarRenameableEntry *)) events_event_entry_real_is_user_renameable; +#line 466 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + iface->rename = (void (*) (SidebarRenameableEntry *, const gchar*)) events_event_entry_real_rename; +#line 4295 "EventsBranch.c" +} + + +static void events_event_entry_sidebar_internal_drop_target_entry_interface_init (SidebarInternalDropTargetEntryIface * iface) { +#line 466 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + events_event_entry_sidebar_internal_drop_target_entry_parent_iface = g_type_interface_peek_parent (iface); +#line 466 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + iface->internal_drop_received = (gboolean (*) (SidebarInternalDropTargetEntry *, GeeList*)) events_event_entry_real_internal_drop_received; +#line 466 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + iface->internal_drop_received_arbitrary = (gboolean (*) (SidebarInternalDropTargetEntry *, GtkSelectionData*)) events_event_entry_real_internal_drop_received_arbitrary; +#line 4306 "EventsBranch.c" +} + + +static void events_event_entry_instance_init (EventsEventEntry * self) { +#line 466 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + self->priv = EVENTS_EVENT_ENTRY_GET_PRIVATE (self); +#line 4313 "EventsBranch.c" +} + + +static void events_event_entry_finalize (GObject * obj) { + EventsEventEntry * self; +#line 466 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + self = G_TYPE_CHECK_INSTANCE_CAST (obj, EVENTS_TYPE_EVENT_ENTRY, EventsEventEntry); +#line 468 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + _g_object_unref0 (self->priv->event); +#line 466 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + G_OBJECT_CLASS (events_event_entry_parent_class)->finalize (obj); +#line 4325 "EventsBranch.c" +} + + +GType events_event_entry_get_type (void) { + static volatile gsize events_event_entry_type_id__volatile = 0; + if (g_once_init_enter (&events_event_entry_type_id__volatile)) { + static const GTypeInfo g_define_type_info = { sizeof (EventsEventEntryClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) events_event_entry_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (EventsEventEntry), 0, (GInstanceInitFunc) events_event_entry_instance_init, NULL }; + static const GInterfaceInfo sidebar_renameable_entry_info = { (GInterfaceInitFunc) events_event_entry_sidebar_renameable_entry_interface_init, (GInterfaceFinalizeFunc) NULL, NULL}; + static const GInterfaceInfo sidebar_internal_drop_target_entry_info = { (GInterfaceInitFunc) events_event_entry_sidebar_internal_drop_target_entry_interface_init, (GInterfaceFinalizeFunc) NULL, NULL}; + GType events_event_entry_type_id; + events_event_entry_type_id = g_type_register_static (SIDEBAR_TYPE_SIMPLE_PAGE_ENTRY, "EventsEventEntry", &g_define_type_info, 0); + g_type_add_interface_static (events_event_entry_type_id, SIDEBAR_TYPE_RENAMEABLE_ENTRY, &sidebar_renameable_entry_info); + g_type_add_interface_static (events_event_entry_type_id, SIDEBAR_TYPE_INTERNAL_DROP_TARGET_ENTRY, &sidebar_internal_drop_target_entry_info); + g_once_init_leave (&events_event_entry_type_id__volatile, events_event_entry_type_id); + } + return events_event_entry_type_id__volatile; +} + + +EventsNoEventEntry* events_no_event_entry_construct (GType object_type) { + EventsNoEventEntry * self = NULL; +#line 519 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + self = (EventsNoEventEntry*) sidebar_simple_page_entry_construct (object_type); +#line 519 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + return self; +#line 4351 "EventsBranch.c" +} + + +EventsNoEventEntry* events_no_event_entry_new (void) { +#line 519 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + return events_no_event_entry_construct (EVENTS_TYPE_NO_EVENT_ENTRY); +#line 4358 "EventsBranch.c" +} + + +static gchar* events_no_event_entry_real_get_sidebar_name (SidebarSimplePageEntry* base) { + EventsNoEventEntry * self; + gchar* result = NULL; + gchar* _tmp0_; +#line 522 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + self = G_TYPE_CHECK_INSTANCE_CAST (base, EVENTS_TYPE_NO_EVENT_ENTRY, EventsNoEventEntry); +#line 523 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + _tmp0_ = g_strdup (NO_EVENT_PAGE_NAME); +#line 523 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + result = _tmp0_; +#line 523 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + return result; +#line 4374 "EventsBranch.c" +} + + +static gchar* events_no_event_entry_real_get_sidebar_icon (SidebarSimplePageEntry* base) { + EventsNoEventEntry * self; + gchar* result = NULL; + const gchar* _tmp0_; + gchar* _tmp1_; +#line 526 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + self = G_TYPE_CHECK_INSTANCE_CAST (base, EVENTS_TYPE_NO_EVENT_ENTRY, EventsNoEventEntry); +#line 527 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + _tmp0_ = events_branch_no_event_icon; +#line 527 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + _tmp1_ = g_strdup (_tmp0_); +#line 527 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + result = _tmp1_; +#line 527 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + return result; +#line 4393 "EventsBranch.c" +} + + +static Page* events_no_event_entry_real_create_page (SidebarSimplePageEntry* base) { + EventsNoEventEntry * self; + Page* result = NULL; + NoEventPage* _tmp0_; +#line 530 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + self = G_TYPE_CHECK_INSTANCE_CAST (base, EVENTS_TYPE_NO_EVENT_ENTRY, EventsNoEventEntry); +#line 531 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + _tmp0_ = no_event_page_new (); +#line 531 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + g_object_ref_sink (_tmp0_); +#line 531 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + result = G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, TYPE_PAGE, Page); +#line 531 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + return result; +#line 4411 "EventsBranch.c" +} + + +static void events_no_event_entry_class_init (EventsNoEventEntryClass * klass) { +#line 518 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + events_no_event_entry_parent_class = g_type_class_peek_parent (klass); +#line 518 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + ((SidebarSimplePageEntryClass *) klass)->get_sidebar_name = (gchar* (*) (SidebarSimplePageEntry *)) events_no_event_entry_real_get_sidebar_name; +#line 518 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + ((SidebarSimplePageEntryClass *) klass)->get_sidebar_icon = (gchar* (*) (SidebarSimplePageEntry *)) events_no_event_entry_real_get_sidebar_icon; +#line 518 "/home/jens/Source/shotwell/src/events/EventsBranch.vala" + ((SidebarSimplePageEntryClass *) klass)->create_page = (Page* (*) (SidebarSimplePageEntry *)) events_no_event_entry_real_create_page; +#line 4424 "EventsBranch.c" +} + + +static void events_no_event_entry_instance_init (EventsNoEventEntry * self) { +} + + +GType events_no_event_entry_get_type (void) { + static volatile gsize events_no_event_entry_type_id__volatile = 0; + if (g_once_init_enter (&events_no_event_entry_type_id__volatile)) { + static const GTypeInfo g_define_type_info = { sizeof (EventsNoEventEntryClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) events_no_event_entry_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (EventsNoEventEntry), 0, (GInstanceInitFunc) events_no_event_entry_instance_init, NULL }; + GType events_no_event_entry_type_id; + events_no_event_entry_type_id = g_type_register_static (SIDEBAR_TYPE_SIMPLE_PAGE_ENTRY, "EventsNoEventEntry", &g_define_type_info, 0); + g_once_init_leave (&events_no_event_entry_type_id__volatile, events_no_event_entry_type_id); + } + return events_no_event_entry_type_id__volatile; +} + + + diff --git a/src/events/EventsBranch.vala b/src/events/EventsBranch.vala new file mode 100644 index 0000000..8980d60 --- /dev/null +++ b/src/events/EventsBranch.vala @@ -0,0 +1,534 @@ +/* Copyright 2016 Software Freedom Conservancy Inc. + * + * This software is licensed under the GNU Lesser General Public License + * (version 2.1 or later). See the COPYING file in this distribution. + */ + +public class Events.Branch : Sidebar.Branch { + internal static string icon = Resources.ICON_FOLDER; + internal static string events_icon = Resources.ICON_EVENTS; + internal static string single_event_icon = Resources.ICON_ONE_EVENT; + internal static string no_event_icon = Resources.ICON_NO_EVENT; + + // NOTE: Because the comparators must be static methods (due to CompareFunc's stupid impl.) + // and there's an assumption that only one Events.Branch is ever created, this is a static + // member but it's modified by instance methods. + private static bool sort_ascending = false; + + private Gee.HashMap entry_map = new Gee.HashMap< + Event, Events.EventEntry>(); + private Events.UndatedDirectoryEntry undated_entry = new Events.UndatedDirectoryEntry(); + private Events.NoEventEntry no_event_entry = new Events.NoEventEntry(); + private Events.MasterDirectoryEntry all_events_entry = new Events.MasterDirectoryEntry(); + + public Branch() { + base (new Sidebar.Header(_("Events"), _("Browse through your events")), + Sidebar.Branch.Options.STARTUP_EXPAND_TO_FIRST_CHILD, + event_year_comparator); + + graft(get_root(), all_events_entry); + + // seed the branch + foreach (DataObject object in Event.global.get_all()) + add_event((Event) object); + + show_no_events(Event.global.get_no_event_objects().size > 0); + + // monitor Events for future changes + Event.global.contents_altered.connect(on_events_added_removed); + Event.global.items_altered.connect(on_events_altered); + Event.global.no_event_collection_altered.connect(on_no_event_collection_altered); + + // monitor sorting criteria (see note at sort_ascending about this) + Config.Facade.get_instance().events_sort_ascending_changed.connect(on_config_changed); + } + + ~Branch() { + Event.global.contents_altered.disconnect(on_events_added_removed); + Event.global.items_altered.disconnect(on_events_altered); + Event.global.no_event_collection_altered.disconnect(on_no_event_collection_altered); + + Config.Facade.get_instance().events_sort_ascending_changed.disconnect(on_config_changed); + } + + internal static void init() { + sort_ascending = Config.Facade.get_instance().get_events_sort_ascending(); + } + + internal static void terminate() { + } + + public bool is_user_renameable() { + return true; + } + + public Events.MasterDirectoryEntry get_master_entry() { + return all_events_entry; + } + + private static int event_year_comparator(Sidebar.Entry a, Sidebar.Entry b) { + if (a == b) + return 0; + + // The Undated and No Event entries should always appear last in the + // list, respectively. + if (a is Events.UndatedDirectoryEntry) { + if (b is Events.NoEventEntry) + return -1; + return 1; + } else if (b is Events.UndatedDirectoryEntry) { + if (a is Events.NoEventEntry) + return 1; + return -1; + } + + if (a is Events.NoEventEntry) + return 1; + else if (b is Events.NoEventEntry) + return -1; + + // The All events entry should always appear on top + if (a is Events.MasterDirectoryEntry) + return -1; + else if (b is Events.MasterDirectoryEntry) + return 1; + + if (!sort_ascending) { + Sidebar.Entry swap = a; + a = b; + b = swap; + } + + int result = + ((Events.YearDirectoryEntry) a).get_year() - ((Events.YearDirectoryEntry) b).get_year(); + assert(result != 0); + + return result; + } + + private static int event_month_comparator(Sidebar.Entry a, Sidebar.Entry b) { + if (a == b) + return 0; + + if (!sort_ascending) { + Sidebar.Entry swap = a; + a = b; + b = swap; + } + + int result = + ((Events.MonthDirectoryEntry) a).get_month() - ((Events.MonthDirectoryEntry) b).get_month(); + assert(result != 0); + + return result; + } + + private static int event_comparator(Sidebar.Entry a, Sidebar.Entry b) { + if (a == b) + return 0; + + if (!sort_ascending) { + Sidebar.Entry swap = a; + a = b; + b = swap; + } + + int64 result = ((Events.EventEntry) a).get_event().get_start_time() + - ((Events.EventEntry) b).get_event().get_start_time(); + + // to stabilize sort (events with the same start time are allowed) + if (result == 0) { + result = ((Events.EventEntry) a).get_event().get_event_id().id + - ((Events.EventEntry) b).get_event().get_event_id().id; + } + + assert(result != 0); + + return (result < 0) ? -1 : 1; + } + + private static int undated_event_comparator(Sidebar.Entry a, Sidebar.Entry b) { + if (a == b) + return 0; + + if (!sort_ascending) { + Sidebar.Entry swap = a; + a = b; + b = swap; + } + + int ret = ((Events.EventEntry) a).get_event().get_name().collate( + ((Events.EventEntry) b).get_event().get_name()); + + if (ret == 0) + ret = (int) (((Events.EventEntry) b).get_event().get_instance_id() - + ((Events.EventEntry) a).get_event().get_instance_id()); + + return ret; + } + + public Events.EventEntry? get_entry_for_event(Event event) { + return entry_map.get(event); + } + + private void on_config_changed() { + bool value = Config.Facade.get_instance().get_events_sort_ascending(); + + sort_ascending = value; + reorder_all(); + } + + private void on_events_added_removed(Gee.Iterable? added, + Gee.Iterable? removed) { + if (added != null) { + foreach (DataObject object in added) + add_event((Event) object); + } + + if (removed != null) { + foreach (DataObject object in removed) + remove_event((Event) object); + } + } + + private void on_events_altered(Gee.Map altered) { + foreach (DataObject object in altered.keys) { + Event event = (Event) object; + Alteration alteration = altered.get(object); + + if (alteration.has_detail("metadata", "time")) { + // can't merely re-sort the event because it might have moved to a new month or + // even a new year + move_event(event); + } else if (alteration.has_detail("metadata", "name")) { + Events.EventEntry? entry = entry_map.get(event); + assert(entry != null); + + entry.sidebar_name_changed(event.get_name()); + entry.sidebar_tooltip_changed(event.get_name()); + } + } + } + + private void on_no_event_collection_altered() { + show_no_events(Event.global.get_no_event_objects().size > 0); + } + + private void add_event(Event event) { + time_t event_time = event.get_start_time(); + if (event_time == 0) { + add_undated_event(event); + + return; + } + + Time event_tm = Time.local(event_time); + + Sidebar.Entry? year; + Sidebar.Entry? month = find_event_month(event, event_tm, out year); + if (month != null) { + graft_event(month, event, event_comparator); + + return; + } + + if (year == null) { + year = new Events.YearDirectoryEntry(event_tm.format(SubEventsDirectoryPage.YEAR_FORMAT), + event_tm); + graft(get_root(), year, event_month_comparator); + } + + month = new Events.MonthDirectoryEntry(event_tm.format(SubEventsDirectoryPage.MONTH_FORMAT), + event_tm); + graft(year, month, event_comparator); + + graft_event(month, event, event_comparator); + } + + private void move_event(Event event) { + time_t event_time = event.get_start_time(); + if (event_time == 0) { + move_to_undated_event(event); + + return; + } + + Time event_tm = Time.local(event_time); + + Sidebar.Entry? year; + Sidebar.Entry? month = find_event_month(event, event_tm, out year); + + if (year == null) { + year = new Events.YearDirectoryEntry(event_tm.format(SubEventsDirectoryPage.YEAR_FORMAT), + event_tm); + graft(get_root(), year, event_month_comparator); + } + + if (month == null) { + month = new Events.MonthDirectoryEntry(event_tm.format(SubEventsDirectoryPage.MONTH_FORMAT), + event_tm); + graft(year, month, event_comparator); + } + + reparent_event(event, month); + } + + private void remove_event(Event event) { + // the following code works for undated events as well as dated (no need for special + // case, as in add_event()) + Sidebar.Entry? entry; + bool removed = entry_map.unset(event, out entry); + assert(removed); + + Sidebar.Entry? parent = get_parent(entry); + assert(parent != null); + + prune(entry); + + // prune up the tree to the root + while (get_child_count(parent) == 0 && parent != get_root()) { + Sidebar.Entry? grandparent = get_parent(parent); + assert(grandparent != null); + + prune(parent); + + parent = grandparent; + } + } + + private Sidebar.Entry? find_event_month(Event event, Time event_tm, out Sidebar.Entry found_year) { + // find the year first + found_year = find_event_year(event, event_tm); + if (found_year == null) + return null; + + int event_month = event_tm.month + 1; + + // found the year, traverse the months + return find_first_child(found_year, (entry) => { + return ((Events.MonthDirectoryEntry) entry).get_month() == event_month; + }); + } + + private Sidebar.Entry? find_event_year(Event event, Time event_tm) { + int event_year = event_tm.year + 1900; + + return find_first_child(get_root(), (entry) => { + if ((entry is Events.UndatedDirectoryEntry) || (entry is Events.NoEventEntry) || + entry is Events.MasterDirectoryEntry) + return false; + else + return ((Events.YearDirectoryEntry) entry).get_year() == event_year; + }); + } + + private void add_undated_event(Event event) { + if (!has_entry(undated_entry)) + graft(get_root(), undated_entry, undated_event_comparator); + + graft_event(undated_entry, event); + } + + private void move_to_undated_event(Event event) { + if (!has_entry(undated_entry)) + graft(get_root(), undated_entry); + + reparent_event(event, undated_entry); + } + + private void graft_event(Sidebar.Entry parent, Event event, + owned CompareFunc? comparator = null) { + Events.EventEntry entry = new Events.EventEntry(event); + entry_map.set(event, entry); + + graft(parent, entry, comparator); + } + + private void reparent_event(Event event, Sidebar.Entry new_parent) { + Events.EventEntry? entry = entry_map.get(event); + assert(entry != null); + + Sidebar.Entry? old_parent = get_parent(entry); + assert(old_parent != null); + + reparent(new_parent, entry); + + while (get_child_count(old_parent) == 0 && old_parent != get_root()) { + Sidebar.Entry? grandparent = get_parent(old_parent); + assert(grandparent != null); + + prune(old_parent); + + old_parent = grandparent; + } + } + + private void show_no_events(bool show) { + if (show && !has_entry(no_event_entry)) + graft(get_root(), no_event_entry); + else if (!show && has_entry(no_event_entry)) + prune(no_event_entry); + } +} + +public abstract class Events.DirectoryEntry : Sidebar.SimplePageEntry, Sidebar.ExpandableEntry { + public DirectoryEntry() { + } + + public override string? get_sidebar_icon() { + return Events.Branch.icon; + } + + public bool expand_on_select() { + return true; + } +} + +public class Events.MasterDirectoryEntry : Events.DirectoryEntry { + public MasterDirectoryEntry() { + } + + public override string get_sidebar_name() { + return MasterEventsDirectoryPage.NAME; + } + + public override string? get_sidebar_icon() { + return Events.Branch.events_icon; + } + + protected override Page create_page() { + return new MasterEventsDirectoryPage(); + } +} + +public class Events.YearDirectoryEntry : Events.DirectoryEntry { + private string name; + private Time tm; + + public YearDirectoryEntry(string name, Time tm) { + this.name = name; + this.tm = tm; + } + + public override string get_sidebar_name() { + return name; + } + + public int get_year() { + return tm.year + 1900; + } + + protected override Page create_page() { + return new SubEventsDirectoryPage(SubEventsDirectoryPage.DirectoryType.YEAR, tm); + } +} + +public class Events.MonthDirectoryEntry : Events.DirectoryEntry { + private string name; + private Time tm; + + public MonthDirectoryEntry(string name, Time tm) { + this.name = name; + this.tm = tm; + } + + public override string get_sidebar_name() { + return name; + } + + public int get_year() { + return tm.year + 1900; + } + + public int get_month() { + return tm.month + 1; + } + + protected override Page create_page() { + return new SubEventsDirectoryPage(SubEventsDirectoryPage.DirectoryType.MONTH, tm); + } +} + +public class Events.UndatedDirectoryEntry : Events.DirectoryEntry { + public UndatedDirectoryEntry() { + } + + public override string get_sidebar_name() { + return SubEventsDirectoryPage.UNDATED_PAGE_NAME; + } + + protected override Page create_page() { + return new SubEventsDirectoryPage(SubEventsDirectoryPage.DirectoryType.UNDATED, + Time.local(0)); + } +} + +public class Events.EventEntry : Sidebar.SimplePageEntry, Sidebar.RenameableEntry, + Sidebar.InternalDropTargetEntry { + private Event event; + + public EventEntry(Event event) { + this.event = event; + } + + public Event get_event() { + return event; + } + + public override string get_sidebar_name() { + return event.get_name(); + } + + public override string? get_sidebar_icon() { + return Events.Branch.single_event_icon; + } + + protected override Page create_page() { + return new EventPage(event); + } + + public bool is_user_renameable() { + return true; + } + + public void rename(string new_name) { + string? prepped = Event.prep_event_name(new_name); + if (prepped != null) + AppWindow.get_command_manager().execute(new RenameEventCommand(event, prepped)); + } + + public bool internal_drop_received(Gee.List media) { + // ugh ... some early Commands expected DataViews instead of DataSources (to make life + // easier for Pages) and this is one of the prices paid for that + Gee.ArrayList views = new Gee.ArrayList(); + foreach (MediaSource media_source in media) + views.add(new DataView(media_source)); + + AppWindow.get_command_manager().execute(new SetEventCommand(views, event)); + + return true; + } + + public bool internal_drop_received_arbitrary(Gtk.SelectionData data) { + return false; + } +} + + +public class Events.NoEventEntry : Sidebar.SimplePageEntry { + public NoEventEntry() { + } + + public override string get_sidebar_name() { + return NoEventPage.NAME; + } + + public override string? get_sidebar_icon() { + return Events.Branch.no_event_icon; + } + + protected override Page create_page() { + return new NoEventPage(); + } +} + diff --git a/src/events/EventsDirectoryPage.c b/src/events/EventsDirectoryPage.c index 897a401..44368cb 100644 --- a/src/events/EventsDirectoryPage.c +++ b/src/events/EventsDirectoryPage.c @@ -1006,7 +1006,6 @@ static void events_directory_page_real_init_actions (Page* base, gint selected_c void page_init_actions (Page* self, gint selected_count, gint count); static void events_directory_page_real_update_actions (Page* base, gint selected_count, gint count); void page_set_action_sensitive (Page* self, const gchar* name, gboolean sensitive); -void page_set_action_important (Page* self, const gchar* name, gboolean important); void page_update_actions (Page* self, gint selected_count, gint count); static gchar* events_directory_page_real_get_view_empty_message (CheckerboardPage* base); static gchar* events_directory_page_real_get_filter_no_match_message (CheckerboardPage* base); @@ -1132,42 +1131,42 @@ static const GActionEntry EVENTS_DIRECTORY_PAGE_entries[4] = {{"Rename", _events static void _events_directory_page_on_sort_changed_g_simple_action_change_state (GSimpleAction* _sender, GVariant* value, gpointer self) { #line 77 "/home/jens/Source/shotwell/src/events/EventsDirectoryPage.vala" events_directory_page_on_sort_changed ((EventsDirectoryPage*) self, _sender, value); -#line 1136 "EventsDirectoryPage.c" +#line 1135 "EventsDirectoryPage.c" } static void _events_directory_page_on_rename_gsimple_action_activate_callback (GSimpleAction* action, GVariant* parameter, gpointer self) { #line 108 "/home/jens/Source/shotwell/src/events/EventsDirectoryPage.vala" events_directory_page_on_rename ((EventsDirectoryPage*) self); -#line 1143 "EventsDirectoryPage.c" +#line 1142 "EventsDirectoryPage.c" } static void _events_directory_page_on_merge_gsimple_action_activate_callback (GSimpleAction* action, GVariant* parameter, gpointer self) { #line 108 "/home/jens/Source/shotwell/src/events/EventsDirectoryPage.vala" events_directory_page_on_merge ((EventsDirectoryPage*) self); -#line 1150 "EventsDirectoryPage.c" +#line 1149 "EventsDirectoryPage.c" } static void _events_directory_page_on_edit_comment_gsimple_action_activate_callback (GSimpleAction* action, GVariant* parameter, gpointer self) { #line 108 "/home/jens/Source/shotwell/src/events/EventsDirectoryPage.vala" events_directory_page_on_edit_comment ((EventsDirectoryPage*) self); -#line 1157 "EventsDirectoryPage.c" +#line 1156 "EventsDirectoryPage.c" } static void _page_on_action_toggle_gsimple_action_activate_callback (GSimpleAction* action, GVariant* parameter, gpointer self) { #line 108 "/home/jens/Source/shotwell/src/events/EventsDirectoryPage.vala" page_on_action_toggle ((Page*) self, action, parameter); -#line 1164 "EventsDirectoryPage.c" +#line 1163 "EventsDirectoryPage.c" } static void _events_directory_page_on_display_comments_gsimple_action_change_state_callback (GSimpleAction* action, GVariant* value, gpointer self) { #line 108 "/home/jens/Source/shotwell/src/events/EventsDirectoryPage.vala" events_directory_page_on_display_comments ((EventsDirectoryPage*) self, action, value); -#line 1171 "EventsDirectoryPage.c" +#line 1170 "EventsDirectoryPage.c" } @@ -1176,14 +1175,14 @@ static gboolean _events_directory_page_event_comparator_predicate_comparator_pre result = events_directory_page_event_comparator_predicate (object, alteration); #line 50 "/home/jens/Source/shotwell/src/events/EventsDirectoryPage.vala" return result; -#line 1180 "EventsDirectoryPage.c" +#line 1179 "EventsDirectoryPage.c" } static gpointer _view_manager_ref0 (gpointer self) { #line 59 "/home/jens/Source/shotwell/src/events/EventsDirectoryPage.vala" return self ? view_manager_ref (self) : NULL; -#line 1187 "EventsDirectoryPage.c" +#line 1186 "EventsDirectoryPage.c" } @@ -1338,7 +1337,7 @@ EventsDirectoryPage* events_directory_page_construct (GType object_type, const g _g_object_unref0 (toolbar); #line 45 "/home/jens/Source/shotwell/src/events/EventsDirectoryPage.vala" return self; -#line 1342 "EventsDirectoryPage.c" +#line 1341 "EventsDirectoryPage.c" } @@ -1358,7 +1357,7 @@ static void events_directory_page_real_init_collect_ui_filenames (Page* base, Ge _tmp1_ = ui_filenames; #line 83 "/home/jens/Source/shotwell/src/events/EventsDirectoryPage.vala" PAGE_CLASS (events_directory_page_parent_class)->init_collect_ui_filenames (G_TYPE_CHECK_INSTANCE_CAST (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_CHECKERBOARD_PAGE, CheckerboardPage), TYPE_PAGE, Page), _tmp1_); -#line 1362 "EventsDirectoryPage.c" +#line 1361 "EventsDirectoryPage.c" } @@ -1378,7 +1377,7 @@ gboolean events_directory_page_event_comparator_predicate (DataObject* object, A result = _tmp1_; #line 87 "/home/jens/Source/shotwell/src/events/EventsDirectoryPage.vala" return result; -#line 1382 "EventsDirectoryPage.c" +#line 1381 "EventsDirectoryPage.c" } @@ -1412,7 +1411,7 @@ static gint64 events_directory_page_event_ascending_comparator (void* a, void* b result = (gint64) (start_a - start_b); #line 94 "/home/jens/Source/shotwell/src/events/EventsDirectoryPage.vala" return result; -#line 1416 "EventsDirectoryPage.c" +#line 1415 "EventsDirectoryPage.c" } @@ -1431,7 +1430,7 @@ static gint64 events_directory_page_event_descending_comparator (void* a, void* result = _tmp2_; #line 98 "/home/jens/Source/shotwell/src/events/EventsDirectoryPage.vala" return result; -#line 1435 "EventsDirectoryPage.c" +#line 1434 "EventsDirectoryPage.c" } @@ -1440,7 +1439,7 @@ static gint64 _events_directory_page_event_ascending_comparator_comparator (void result = events_directory_page_event_ascending_comparator (a, b); #line 103 "/home/jens/Source/shotwell/src/events/EventsDirectoryPage.vala" return result; -#line 1444 "EventsDirectoryPage.c" +#line 1443 "EventsDirectoryPage.c" } @@ -1449,7 +1448,7 @@ static gint64 _events_directory_page_event_descending_comparator_comparator (voi result = events_directory_page_event_descending_comparator (a, b); #line 105 "/home/jens/Source/shotwell/src/events/EventsDirectoryPage.vala" return result; -#line 1453 "EventsDirectoryPage.c" +#line 1452 "EventsDirectoryPage.c" } @@ -1460,7 +1459,7 @@ static Comparator events_directory_page_get_event_comparator (gboolean ascending _tmp0_ = ascending; #line 102 "/home/jens/Source/shotwell/src/events/EventsDirectoryPage.vala" if (_tmp0_) { -#line 1464 "EventsDirectoryPage.c" +#line 1463 "EventsDirectoryPage.c" Comparator _tmp1_; void* _tmp1__target; GDestroyNotify _tmp1__target_destroy_notify; @@ -1478,7 +1477,7 @@ static Comparator events_directory_page_get_event_comparator (gboolean ascending result = _tmp1_; #line 103 "/home/jens/Source/shotwell/src/events/EventsDirectoryPage.vala" return result; -#line 1482 "EventsDirectoryPage.c" +#line 1481 "EventsDirectoryPage.c" } else { Comparator _tmp2_; void* _tmp2__target; @@ -1497,7 +1496,7 @@ static Comparator events_directory_page_get_event_comparator (gboolean ascending result = _tmp2_; #line 105 "/home/jens/Source/shotwell/src/events/EventsDirectoryPage.vala" return result; -#line 1501 "EventsDirectoryPage.c" +#line 1500 "EventsDirectoryPage.c" } } @@ -1505,7 +1504,7 @@ static Comparator events_directory_page_get_event_comparator (gboolean ascending static GVariant* _variant_new14 (gboolean value) { #line 122 "/home/jens/Source/shotwell/src/events/EventsDirectoryPage.vala" return g_variant_ref_sink (g_variant_new_boolean (value)); -#line 1509 "EventsDirectoryPage.c" +#line 1508 "EventsDirectoryPage.c" } @@ -1557,7 +1556,7 @@ static void events_directory_page_real_add_actions (Page* base, GActionMap* map) _g_variant_unref0 (_tmp8_); #line 122 "/home/jens/Source/shotwell/src/events/EventsDirectoryPage.vala" _g_object_unref0 (_tmp7_); -#line 1561 "EventsDirectoryPage.c" +#line 1560 "EventsDirectoryPage.c" } @@ -1572,7 +1571,7 @@ static void events_directory_page_real_remove_actions (Page* base, GActionMap* m _tmp0_ = map; #line 126 "/home/jens/Source/shotwell/src/events/EventsDirectoryPage.vala" PAGE_CLASS (events_directory_page_parent_class)->remove_actions (G_TYPE_CHECK_INSTANCE_CAST (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_CHECKERBOARD_PAGE, CheckerboardPage), TYPE_PAGE, Page), _tmp0_); -#line 1576 "EventsDirectoryPage.c" +#line 1575 "EventsDirectoryPage.c" { GActionEntry* entry_collection = NULL; gint entry_collection_length1 = 0; @@ -1584,11 +1583,11 @@ static void events_directory_page_real_remove_actions (Page* base, GActionMap* m entry_collection_length1 = G_N_ELEMENTS (EVENTS_DIRECTORY_PAGE_entries); #line 127 "/home/jens/Source/shotwell/src/events/EventsDirectoryPage.vala" for (entry_it = 0; entry_it < G_N_ELEMENTS (EVENTS_DIRECTORY_PAGE_entries); entry_it = entry_it + 1) { -#line 1588 "EventsDirectoryPage.c" +#line 1587 "EventsDirectoryPage.c" GActionEntry entry = {0}; #line 127 "/home/jens/Source/shotwell/src/events/EventsDirectoryPage.vala" entry = entry_collection[entry_it]; -#line 1592 "EventsDirectoryPage.c" +#line 1591 "EventsDirectoryPage.c" { GActionMap* _tmp1_; GActionEntry _tmp2_; @@ -1601,7 +1600,7 @@ static void events_directory_page_real_remove_actions (Page* base, GActionMap* m _tmp3_ = _tmp2_.name; #line 128 "/home/jens/Source/shotwell/src/events/EventsDirectoryPage.vala" g_action_map_remove_action (_tmp1_, _tmp3_); -#line 1605 "EventsDirectoryPage.c" +#line 1604 "EventsDirectoryPage.c" } } } @@ -1631,7 +1630,7 @@ static void events_directory_page_real_init_actions (Page* base, gint selected_c if (_tmp3_ == NULL) { #line 135 "/home/jens/Source/shotwell/src/events/EventsDirectoryPage.vala" _g_object_unref0 (_tmp2_); -#line 1635 "EventsDirectoryPage.c" +#line 1634 "EventsDirectoryPage.c" } #line 135 "/home/jens/Source/shotwell/src/events/EventsDirectoryPage.vala" action = _tmp3_; @@ -1641,7 +1640,7 @@ static void events_directory_page_real_init_actions (Page* base, gint selected_c g_signal_connect_object (action, "change-state", (GCallback) _events_directory_page_on_sort_changed_g_simple_action_change_state, self, 0); #line 132 "/home/jens/Source/shotwell/src/events/EventsDirectoryPage.vala" _g_object_unref0 (action); -#line 1645 "EventsDirectoryPage.c" +#line 1644 "EventsDirectoryPage.c" } @@ -1659,22 +1658,20 @@ static void events_directory_page_real_update_actions (Page* base, gint selected #line 141 "/home/jens/Source/shotwell/src/events/EventsDirectoryPage.vala" page_set_action_sensitive (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_PAGE, Page), "Merge", _tmp0_ > 1); #line 142 "/home/jens/Source/shotwell/src/events/EventsDirectoryPage.vala" - page_set_action_important (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_PAGE, Page), "Merge", TRUE); -#line 143 "/home/jens/Source/shotwell/src/events/EventsDirectoryPage.vala" _tmp1_ = selected_count; -#line 143 "/home/jens/Source/shotwell/src/events/EventsDirectoryPage.vala" +#line 142 "/home/jens/Source/shotwell/src/events/EventsDirectoryPage.vala" page_set_action_sensitive (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_PAGE, Page), "Rename", _tmp1_ == 1); -#line 144 "/home/jens/Source/shotwell/src/events/EventsDirectoryPage.vala" +#line 143 "/home/jens/Source/shotwell/src/events/EventsDirectoryPage.vala" _tmp2_ = selected_count; -#line 144 "/home/jens/Source/shotwell/src/events/EventsDirectoryPage.vala" +#line 143 "/home/jens/Source/shotwell/src/events/EventsDirectoryPage.vala" page_set_action_sensitive (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_PAGE, Page), "EditComment", _tmp2_ == 1); -#line 146 "/home/jens/Source/shotwell/src/events/EventsDirectoryPage.vala" +#line 145 "/home/jens/Source/shotwell/src/events/EventsDirectoryPage.vala" _tmp3_ = selected_count; -#line 146 "/home/jens/Source/shotwell/src/events/EventsDirectoryPage.vala" +#line 145 "/home/jens/Source/shotwell/src/events/EventsDirectoryPage.vala" _tmp4_ = count; -#line 146 "/home/jens/Source/shotwell/src/events/EventsDirectoryPage.vala" +#line 145 "/home/jens/Source/shotwell/src/events/EventsDirectoryPage.vala" PAGE_CLASS (events_directory_page_parent_class)->update_actions (G_TYPE_CHECK_INSTANCE_CAST (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_CHECKERBOARD_PAGE, CheckerboardPage), TYPE_PAGE, Page), _tmp3_, _tmp4_); -#line 1678 "EventsDirectoryPage.c" +#line 1675 "EventsDirectoryPage.c" } @@ -1682,15 +1679,15 @@ static gchar* events_directory_page_real_get_view_empty_message (CheckerboardPag EventsDirectoryPage * self; gchar* result = NULL; gchar* _tmp0_; -#line 149 "/home/jens/Source/shotwell/src/events/EventsDirectoryPage.vala" +#line 148 "/home/jens/Source/shotwell/src/events/EventsDirectoryPage.vala" self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_EVENTS_DIRECTORY_PAGE, EventsDirectoryPage); -#line 150 "/home/jens/Source/shotwell/src/events/EventsDirectoryPage.vala" +#line 149 "/home/jens/Source/shotwell/src/events/EventsDirectoryPage.vala" _tmp0_ = g_strdup (_ ("No events")); -#line 150 "/home/jens/Source/shotwell/src/events/EventsDirectoryPage.vala" +#line 149 "/home/jens/Source/shotwell/src/events/EventsDirectoryPage.vala" result = _tmp0_; -#line 150 "/home/jens/Source/shotwell/src/events/EventsDirectoryPage.vala" +#line 149 "/home/jens/Source/shotwell/src/events/EventsDirectoryPage.vala" return result; -#line 1694 "EventsDirectoryPage.c" +#line 1691 "EventsDirectoryPage.c" } @@ -1698,22 +1695,22 @@ static gchar* events_directory_page_real_get_filter_no_match_message (Checkerboa EventsDirectoryPage * self; gchar* result = NULL; gchar* _tmp0_; -#line 153 "/home/jens/Source/shotwell/src/events/EventsDirectoryPage.vala" +#line 152 "/home/jens/Source/shotwell/src/events/EventsDirectoryPage.vala" self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_EVENTS_DIRECTORY_PAGE, EventsDirectoryPage); -#line 154 "/home/jens/Source/shotwell/src/events/EventsDirectoryPage.vala" +#line 153 "/home/jens/Source/shotwell/src/events/EventsDirectoryPage.vala" _tmp0_ = g_strdup (_ ("No events found")); -#line 154 "/home/jens/Source/shotwell/src/events/EventsDirectoryPage.vala" +#line 153 "/home/jens/Source/shotwell/src/events/EventsDirectoryPage.vala" result = _tmp0_; -#line 154 "/home/jens/Source/shotwell/src/events/EventsDirectoryPage.vala" +#line 153 "/home/jens/Source/shotwell/src/events/EventsDirectoryPage.vala" return result; -#line 1710 "EventsDirectoryPage.c" +#line 1707 "EventsDirectoryPage.c" } static gpointer _g_object_ref0 (gpointer self) { -#line 159 "/home/jens/Source/shotwell/src/events/EventsDirectoryPage.vala" +#line 158 "/home/jens/Source/shotwell/src/events/EventsDirectoryPage.vala" return self ? g_object_ref (self) : NULL; -#line 1717 "EventsDirectoryPage.c" +#line 1714 "EventsDirectoryPage.c" } @@ -1725,31 +1722,31 @@ static void events_directory_page_real_on_item_activated (CheckerboardPage* base LibraryWindow* _tmp2_; LibraryWindow* _tmp3_; Event* _tmp4_; -#line 157 "/home/jens/Source/shotwell/src/events/EventsDirectoryPage.vala" +#line 156 "/home/jens/Source/shotwell/src/events/EventsDirectoryPage.vala" self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_EVENTS_DIRECTORY_PAGE, EventsDirectoryPage); -#line 157 "/home/jens/Source/shotwell/src/events/EventsDirectoryPage.vala" +#line 156 "/home/jens/Source/shotwell/src/events/EventsDirectoryPage.vala" g_return_if_fail (IS_CHECKERBOARD_ITEM (item)); -#line 157 "/home/jens/Source/shotwell/src/events/EventsDirectoryPage.vala" +#line 156 "/home/jens/Source/shotwell/src/events/EventsDirectoryPage.vala" g_return_if_fail (modifiers != NULL); -#line 159 "/home/jens/Source/shotwell/src/events/EventsDirectoryPage.vala" +#line 158 "/home/jens/Source/shotwell/src/events/EventsDirectoryPage.vala" _tmp0_ = item; -#line 159 "/home/jens/Source/shotwell/src/events/EventsDirectoryPage.vala" +#line 158 "/home/jens/Source/shotwell/src/events/EventsDirectoryPage.vala" _tmp1_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, TYPE_EVENT_DIRECTORY_ITEM, EventDirectoryItem)); -#line 159 "/home/jens/Source/shotwell/src/events/EventsDirectoryPage.vala" +#line 158 "/home/jens/Source/shotwell/src/events/EventsDirectoryPage.vala" event = _tmp1_; -#line 160 "/home/jens/Source/shotwell/src/events/EventsDirectoryPage.vala" +#line 159 "/home/jens/Source/shotwell/src/events/EventsDirectoryPage.vala" _tmp2_ = library_window_get_app (); -#line 160 "/home/jens/Source/shotwell/src/events/EventsDirectoryPage.vala" +#line 159 "/home/jens/Source/shotwell/src/events/EventsDirectoryPage.vala" _tmp3_ = _tmp2_; -#line 160 "/home/jens/Source/shotwell/src/events/EventsDirectoryPage.vala" +#line 159 "/home/jens/Source/shotwell/src/events/EventsDirectoryPage.vala" _tmp4_ = event->event; -#line 160 "/home/jens/Source/shotwell/src/events/EventsDirectoryPage.vala" +#line 159 "/home/jens/Source/shotwell/src/events/EventsDirectoryPage.vala" library_window_switch_to_event (_tmp3_, _tmp4_); -#line 160 "/home/jens/Source/shotwell/src/events/EventsDirectoryPage.vala" +#line 159 "/home/jens/Source/shotwell/src/events/EventsDirectoryPage.vala" _g_object_unref0 (_tmp3_); -#line 157 "/home/jens/Source/shotwell/src/events/EventsDirectoryPage.vala" +#line 156 "/home/jens/Source/shotwell/src/events/EventsDirectoryPage.vala" _g_object_unref0 (event); -#line 1753 "EventsDirectoryPage.c" +#line 1750 "EventsDirectoryPage.c" } @@ -1766,45 +1763,45 @@ static void events_directory_page_on_sort_changed (EventsDirectoryPage* self, GS GDestroyNotify _tmp7__target_destroy_notify; GSimpleAction* _tmp8_; GVariant* _tmp9_; -#line 163 "/home/jens/Source/shotwell/src/events/EventsDirectoryPage.vala" +#line 162 "/home/jens/Source/shotwell/src/events/EventsDirectoryPage.vala" g_return_if_fail (IS_EVENTS_DIRECTORY_PAGE (self)); -#line 163 "/home/jens/Source/shotwell/src/events/EventsDirectoryPage.vala" +#line 162 "/home/jens/Source/shotwell/src/events/EventsDirectoryPage.vala" g_return_if_fail (G_IS_SIMPLE_ACTION (action)); -#line 164 "/home/jens/Source/shotwell/src/events/EventsDirectoryPage.vala" +#line 163 "/home/jens/Source/shotwell/src/events/EventsDirectoryPage.vala" _tmp0_ = page_get_view (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_PAGE, Page)); -#line 164 "/home/jens/Source/shotwell/src/events/EventsDirectoryPage.vala" +#line 163 "/home/jens/Source/shotwell/src/events/EventsDirectoryPage.vala" _tmp1_ = _tmp0_; -#line 164 "/home/jens/Source/shotwell/src/events/EventsDirectoryPage.vala" +#line 163 "/home/jens/Source/shotwell/src/events/EventsDirectoryPage.vala" _tmp2_ = value; -#line 164 "/home/jens/Source/shotwell/src/events/EventsDirectoryPage.vala" +#line 163 "/home/jens/Source/shotwell/src/events/EventsDirectoryPage.vala" _tmp3_ = g_variant_get_string (_tmp2_, NULL); -#line 164 "/home/jens/Source/shotwell/src/events/EventsDirectoryPage.vala" +#line 163 "/home/jens/Source/shotwell/src/events/EventsDirectoryPage.vala" _tmp6_ = events_directory_page_get_event_comparator (g_strcmp0 (_tmp3_, LIBRARY_WINDOW_SORT_EVENTS_ORDER_ASCENDING) == 0, &_tmp4_, &_tmp5_); -#line 164 "/home/jens/Source/shotwell/src/events/EventsDirectoryPage.vala" +#line 163 "/home/jens/Source/shotwell/src/events/EventsDirectoryPage.vala" _tmp7_ = _tmp6_; -#line 164 "/home/jens/Source/shotwell/src/events/EventsDirectoryPage.vala" +#line 163 "/home/jens/Source/shotwell/src/events/EventsDirectoryPage.vala" _tmp7__target = _tmp4_; -#line 164 "/home/jens/Source/shotwell/src/events/EventsDirectoryPage.vala" +#line 163 "/home/jens/Source/shotwell/src/events/EventsDirectoryPage.vala" _tmp7__target_destroy_notify = _tmp5_; -#line 164 "/home/jens/Source/shotwell/src/events/EventsDirectoryPage.vala" +#line 163 "/home/jens/Source/shotwell/src/events/EventsDirectoryPage.vala" data_collection_set_comparator (G_TYPE_CHECK_INSTANCE_CAST (_tmp1_, TYPE_DATA_COLLECTION, DataCollection), _tmp7_, _tmp4_, _events_directory_page_event_comparator_predicate_comparator_predicate, NULL); -#line 164 "/home/jens/Source/shotwell/src/events/EventsDirectoryPage.vala" +#line 163 "/home/jens/Source/shotwell/src/events/EventsDirectoryPage.vala" (_tmp7__target_destroy_notify == NULL) ? NULL : (_tmp7__target_destroy_notify (_tmp7__target), NULL); -#line 164 "/home/jens/Source/shotwell/src/events/EventsDirectoryPage.vala" +#line 163 "/home/jens/Source/shotwell/src/events/EventsDirectoryPage.vala" _tmp7_ = NULL; -#line 164 "/home/jens/Source/shotwell/src/events/EventsDirectoryPage.vala" +#line 163 "/home/jens/Source/shotwell/src/events/EventsDirectoryPage.vala" _tmp7__target = NULL; -#line 164 "/home/jens/Source/shotwell/src/events/EventsDirectoryPage.vala" +#line 163 "/home/jens/Source/shotwell/src/events/EventsDirectoryPage.vala" _tmp7__target_destroy_notify = NULL; -#line 164 "/home/jens/Source/shotwell/src/events/EventsDirectoryPage.vala" +#line 163 "/home/jens/Source/shotwell/src/events/EventsDirectoryPage.vala" _data_collection_unref0 (_tmp1_); -#line 168 "/home/jens/Source/shotwell/src/events/EventsDirectoryPage.vala" +#line 167 "/home/jens/Source/shotwell/src/events/EventsDirectoryPage.vala" _tmp8_ = action; -#line 168 "/home/jens/Source/shotwell/src/events/EventsDirectoryPage.vala" +#line 167 "/home/jens/Source/shotwell/src/events/EventsDirectoryPage.vala" _tmp9_ = value; -#line 168 "/home/jens/Source/shotwell/src/events/EventsDirectoryPage.vala" +#line 167 "/home/jens/Source/shotwell/src/events/EventsDirectoryPage.vala" g_simple_action_set_state (_tmp8_, _tmp9_); -#line 1808 "EventsDirectoryPage.c" +#line 1805 "EventsDirectoryPage.c" } @@ -1837,101 +1834,101 @@ static void events_directory_page_on_rename (EventsDirectoryPage* self) { CommandManager* _tmp21_; CommandManager* _tmp22_; RenameEventCommand* _tmp23_; -#line 171 "/home/jens/Source/shotwell/src/events/EventsDirectoryPage.vala" +#line 170 "/home/jens/Source/shotwell/src/events/EventsDirectoryPage.vala" g_return_if_fail (IS_EVENTS_DIRECTORY_PAGE (self)); -#line 173 "/home/jens/Source/shotwell/src/events/EventsDirectoryPage.vala" +#line 172 "/home/jens/Source/shotwell/src/events/EventsDirectoryPage.vala" _tmp0_ = page_get_view (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_PAGE, Page)); -#line 173 "/home/jens/Source/shotwell/src/events/EventsDirectoryPage.vala" +#line 172 "/home/jens/Source/shotwell/src/events/EventsDirectoryPage.vala" _tmp1_ = _tmp0_; -#line 173 "/home/jens/Source/shotwell/src/events/EventsDirectoryPage.vala" +#line 172 "/home/jens/Source/shotwell/src/events/EventsDirectoryPage.vala" _tmp2_ = view_collection_get_selected_count (_tmp1_); -#line 173 "/home/jens/Source/shotwell/src/events/EventsDirectoryPage.vala" +#line 172 "/home/jens/Source/shotwell/src/events/EventsDirectoryPage.vala" _tmp3_ = _tmp2_ != 1; -#line 173 "/home/jens/Source/shotwell/src/events/EventsDirectoryPage.vala" +#line 172 "/home/jens/Source/shotwell/src/events/EventsDirectoryPage.vala" _data_collection_unref0 (_tmp1_); -#line 173 "/home/jens/Source/shotwell/src/events/EventsDirectoryPage.vala" +#line 172 "/home/jens/Source/shotwell/src/events/EventsDirectoryPage.vala" if (_tmp3_) { -#line 174 "/home/jens/Source/shotwell/src/events/EventsDirectoryPage.vala" +#line 173 "/home/jens/Source/shotwell/src/events/EventsDirectoryPage.vala" return; -#line 1857 "EventsDirectoryPage.c" +#line 1854 "EventsDirectoryPage.c" } -#line 176 "/home/jens/Source/shotwell/src/events/EventsDirectoryPage.vala" +#line 175 "/home/jens/Source/shotwell/src/events/EventsDirectoryPage.vala" _tmp4_ = page_get_view (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_PAGE, Page)); -#line 176 "/home/jens/Source/shotwell/src/events/EventsDirectoryPage.vala" +#line 175 "/home/jens/Source/shotwell/src/events/EventsDirectoryPage.vala" _tmp5_ = _tmp4_; -#line 176 "/home/jens/Source/shotwell/src/events/EventsDirectoryPage.vala" +#line 175 "/home/jens/Source/shotwell/src/events/EventsDirectoryPage.vala" _tmp6_ = view_collection_get_selected_at (_tmp5_, 0); -#line 176 "/home/jens/Source/shotwell/src/events/EventsDirectoryPage.vala" +#line 175 "/home/jens/Source/shotwell/src/events/EventsDirectoryPage.vala" _tmp7_ = G_TYPE_CHECK_INSTANCE_CAST (_tmp6_, TYPE_EVENT_DIRECTORY_ITEM, EventDirectoryItem); -#line 176 "/home/jens/Source/shotwell/src/events/EventsDirectoryPage.vala" +#line 175 "/home/jens/Source/shotwell/src/events/EventsDirectoryPage.vala" _data_collection_unref0 (_tmp5_); -#line 176 "/home/jens/Source/shotwell/src/events/EventsDirectoryPage.vala" +#line 175 "/home/jens/Source/shotwell/src/events/EventsDirectoryPage.vala" item = _tmp7_; -#line 178 "/home/jens/Source/shotwell/src/events/EventsDirectoryPage.vala" +#line 177 "/home/jens/Source/shotwell/src/events/EventsDirectoryPage.vala" _tmp8_ = item; -#line 178 "/home/jens/Source/shotwell/src/events/EventsDirectoryPage.vala" +#line 177 "/home/jens/Source/shotwell/src/events/EventsDirectoryPage.vala" _tmp9_ = _tmp8_->event; -#line 178 "/home/jens/Source/shotwell/src/events/EventsDirectoryPage.vala" +#line 177 "/home/jens/Source/shotwell/src/events/EventsDirectoryPage.vala" _tmp10_ = event_get_raw_name (_tmp9_); -#line 178 "/home/jens/Source/shotwell/src/events/EventsDirectoryPage.vala" +#line 177 "/home/jens/Source/shotwell/src/events/EventsDirectoryPage.vala" _tmp11_ = _tmp10_; -#line 178 "/home/jens/Source/shotwell/src/events/EventsDirectoryPage.vala" +#line 177 "/home/jens/Source/shotwell/src/events/EventsDirectoryPage.vala" _tmp12_ = event_rename_dialog_new (_tmp11_); -#line 178 "/home/jens/Source/shotwell/src/events/EventsDirectoryPage.vala" +#line 177 "/home/jens/Source/shotwell/src/events/EventsDirectoryPage.vala" _tmp13_ = _tmp12_; -#line 178 "/home/jens/Source/shotwell/src/events/EventsDirectoryPage.vala" +#line 177 "/home/jens/Source/shotwell/src/events/EventsDirectoryPage.vala" _g_free0 (_tmp11_); -#line 178 "/home/jens/Source/shotwell/src/events/EventsDirectoryPage.vala" +#line 177 "/home/jens/Source/shotwell/src/events/EventsDirectoryPage.vala" rename_dialog = _tmp13_; -#line 179 "/home/jens/Source/shotwell/src/events/EventsDirectoryPage.vala" +#line 178 "/home/jens/Source/shotwell/src/events/EventsDirectoryPage.vala" _tmp14_ = rename_dialog; -#line 179 "/home/jens/Source/shotwell/src/events/EventsDirectoryPage.vala" +#line 178 "/home/jens/Source/shotwell/src/events/EventsDirectoryPage.vala" _tmp15_ = event_rename_dialog_execute (_tmp14_); -#line 179 "/home/jens/Source/shotwell/src/events/EventsDirectoryPage.vala" +#line 178 "/home/jens/Source/shotwell/src/events/EventsDirectoryPage.vala" new_name = _tmp15_; -#line 180 "/home/jens/Source/shotwell/src/events/EventsDirectoryPage.vala" +#line 179 "/home/jens/Source/shotwell/src/events/EventsDirectoryPage.vala" _tmp16_ = new_name; -#line 180 "/home/jens/Source/shotwell/src/events/EventsDirectoryPage.vala" +#line 179 "/home/jens/Source/shotwell/src/events/EventsDirectoryPage.vala" if (_tmp16_ == NULL) { -#line 181 "/home/jens/Source/shotwell/src/events/EventsDirectoryPage.vala" +#line 180 "/home/jens/Source/shotwell/src/events/EventsDirectoryPage.vala" _g_free0 (new_name); -#line 181 "/home/jens/Source/shotwell/src/events/EventsDirectoryPage.vala" +#line 180 "/home/jens/Source/shotwell/src/events/EventsDirectoryPage.vala" _text_entry_dialog_mediator_unref0 (rename_dialog); -#line 181 "/home/jens/Source/shotwell/src/events/EventsDirectoryPage.vala" +#line 180 "/home/jens/Source/shotwell/src/events/EventsDirectoryPage.vala" _g_object_unref0 (item); -#line 181 "/home/jens/Source/shotwell/src/events/EventsDirectoryPage.vala" +#line 180 "/home/jens/Source/shotwell/src/events/EventsDirectoryPage.vala" return; -#line 1905 "EventsDirectoryPage.c" +#line 1902 "EventsDirectoryPage.c" } -#line 183 "/home/jens/Source/shotwell/src/events/EventsDirectoryPage.vala" +#line 182 "/home/jens/Source/shotwell/src/events/EventsDirectoryPage.vala" _tmp17_ = item; -#line 183 "/home/jens/Source/shotwell/src/events/EventsDirectoryPage.vala" +#line 182 "/home/jens/Source/shotwell/src/events/EventsDirectoryPage.vala" _tmp18_ = _tmp17_->event; -#line 183 "/home/jens/Source/shotwell/src/events/EventsDirectoryPage.vala" +#line 182 "/home/jens/Source/shotwell/src/events/EventsDirectoryPage.vala" _tmp19_ = new_name; -#line 183 "/home/jens/Source/shotwell/src/events/EventsDirectoryPage.vala" +#line 182 "/home/jens/Source/shotwell/src/events/EventsDirectoryPage.vala" _tmp20_ = rename_event_command_new (_tmp18_, _tmp19_); -#line 183 "/home/jens/Source/shotwell/src/events/EventsDirectoryPage.vala" +#line 182 "/home/jens/Source/shotwell/src/events/EventsDirectoryPage.vala" command = _tmp20_; -#line 184 "/home/jens/Source/shotwell/src/events/EventsDirectoryPage.vala" +#line 183 "/home/jens/Source/shotwell/src/events/EventsDirectoryPage.vala" _tmp21_ = page_get_command_manager (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_PAGE, Page)); -#line 184 "/home/jens/Source/shotwell/src/events/EventsDirectoryPage.vala" +#line 183 "/home/jens/Source/shotwell/src/events/EventsDirectoryPage.vala" _tmp22_ = _tmp21_; -#line 184 "/home/jens/Source/shotwell/src/events/EventsDirectoryPage.vala" +#line 183 "/home/jens/Source/shotwell/src/events/EventsDirectoryPage.vala" _tmp23_ = command; -#line 184 "/home/jens/Source/shotwell/src/events/EventsDirectoryPage.vala" +#line 183 "/home/jens/Source/shotwell/src/events/EventsDirectoryPage.vala" command_manager_execute (_tmp22_, G_TYPE_CHECK_INSTANCE_CAST (_tmp23_, TYPE_COMMAND, Command)); -#line 184 "/home/jens/Source/shotwell/src/events/EventsDirectoryPage.vala" +#line 183 "/home/jens/Source/shotwell/src/events/EventsDirectoryPage.vala" _command_manager_unref0 (_tmp22_); -#line 171 "/home/jens/Source/shotwell/src/events/EventsDirectoryPage.vala" +#line 170 "/home/jens/Source/shotwell/src/events/EventsDirectoryPage.vala" _g_object_unref0 (command); -#line 171 "/home/jens/Source/shotwell/src/events/EventsDirectoryPage.vala" +#line 170 "/home/jens/Source/shotwell/src/events/EventsDirectoryPage.vala" _g_free0 (new_name); -#line 171 "/home/jens/Source/shotwell/src/events/EventsDirectoryPage.vala" +#line 170 "/home/jens/Source/shotwell/src/events/EventsDirectoryPage.vala" _text_entry_dialog_mediator_unref0 (rename_dialog); -#line 171 "/home/jens/Source/shotwell/src/events/EventsDirectoryPage.vala" +#line 170 "/home/jens/Source/shotwell/src/events/EventsDirectoryPage.vala" _g_object_unref0 (item); -#line 1935 "EventsDirectoryPage.c" +#line 1932 "EventsDirectoryPage.c" } @@ -1964,101 +1961,101 @@ void events_directory_page_on_edit_comment (EventsDirectoryPage* self) { CommandManager* _tmp21_; CommandManager* _tmp22_; EditEventCommentCommand* _tmp23_; -#line 187 "/home/jens/Source/shotwell/src/events/EventsDirectoryPage.vala" +#line 186 "/home/jens/Source/shotwell/src/events/EventsDirectoryPage.vala" g_return_if_fail (IS_EVENTS_DIRECTORY_PAGE (self)); -#line 189 "/home/jens/Source/shotwell/src/events/EventsDirectoryPage.vala" +#line 188 "/home/jens/Source/shotwell/src/events/EventsDirectoryPage.vala" _tmp0_ = page_get_view (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_PAGE, Page)); -#line 189 "/home/jens/Source/shotwell/src/events/EventsDirectoryPage.vala" +#line 188 "/home/jens/Source/shotwell/src/events/EventsDirectoryPage.vala" _tmp1_ = _tmp0_; -#line 189 "/home/jens/Source/shotwell/src/events/EventsDirectoryPage.vala" +#line 188 "/home/jens/Source/shotwell/src/events/EventsDirectoryPage.vala" _tmp2_ = view_collection_get_selected_count (_tmp1_); -#line 189 "/home/jens/Source/shotwell/src/events/EventsDirectoryPage.vala" +#line 188 "/home/jens/Source/shotwell/src/events/EventsDirectoryPage.vala" _tmp3_ = _tmp2_ != 1; -#line 189 "/home/jens/Source/shotwell/src/events/EventsDirectoryPage.vala" +#line 188 "/home/jens/Source/shotwell/src/events/EventsDirectoryPage.vala" _data_collection_unref0 (_tmp1_); -#line 189 "/home/jens/Source/shotwell/src/events/EventsDirectoryPage.vala" +#line 188 "/home/jens/Source/shotwell/src/events/EventsDirectoryPage.vala" if (_tmp3_) { -#line 190 "/home/jens/Source/shotwell/src/events/EventsDirectoryPage.vala" +#line 189 "/home/jens/Source/shotwell/src/events/EventsDirectoryPage.vala" return; -#line 1984 "EventsDirectoryPage.c" +#line 1981 "EventsDirectoryPage.c" } -#line 192 "/home/jens/Source/shotwell/src/events/EventsDirectoryPage.vala" +#line 191 "/home/jens/Source/shotwell/src/events/EventsDirectoryPage.vala" _tmp4_ = page_get_view (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_PAGE, Page)); -#line 192 "/home/jens/Source/shotwell/src/events/EventsDirectoryPage.vala" +#line 191 "/home/jens/Source/shotwell/src/events/EventsDirectoryPage.vala" _tmp5_ = _tmp4_; -#line 192 "/home/jens/Source/shotwell/src/events/EventsDirectoryPage.vala" +#line 191 "/home/jens/Source/shotwell/src/events/EventsDirectoryPage.vala" _tmp6_ = view_collection_get_selected_at (_tmp5_, 0); -#line 192 "/home/jens/Source/shotwell/src/events/EventsDirectoryPage.vala" +#line 191 "/home/jens/Source/shotwell/src/events/EventsDirectoryPage.vala" _tmp7_ = G_TYPE_CHECK_INSTANCE_CAST (_tmp6_, TYPE_EVENT_DIRECTORY_ITEM, EventDirectoryItem); -#line 192 "/home/jens/Source/shotwell/src/events/EventsDirectoryPage.vala" +#line 191 "/home/jens/Source/shotwell/src/events/EventsDirectoryPage.vala" _data_collection_unref0 (_tmp5_); -#line 192 "/home/jens/Source/shotwell/src/events/EventsDirectoryPage.vala" +#line 191 "/home/jens/Source/shotwell/src/events/EventsDirectoryPage.vala" item = _tmp7_; -#line 194 "/home/jens/Source/shotwell/src/events/EventsDirectoryPage.vala" +#line 193 "/home/jens/Source/shotwell/src/events/EventsDirectoryPage.vala" _tmp8_ = item; -#line 194 "/home/jens/Source/shotwell/src/events/EventsDirectoryPage.vala" +#line 193 "/home/jens/Source/shotwell/src/events/EventsDirectoryPage.vala" _tmp9_ = _tmp8_->event; -#line 194 "/home/jens/Source/shotwell/src/events/EventsDirectoryPage.vala" +#line 193 "/home/jens/Source/shotwell/src/events/EventsDirectoryPage.vala" _tmp10_ = event_source_get_comment (G_TYPE_CHECK_INSTANCE_CAST (_tmp9_, TYPE_EVENT_SOURCE, EventSource)); -#line 194 "/home/jens/Source/shotwell/src/events/EventsDirectoryPage.vala" +#line 193 "/home/jens/Source/shotwell/src/events/EventsDirectoryPage.vala" _tmp11_ = _tmp10_; -#line 194 "/home/jens/Source/shotwell/src/events/EventsDirectoryPage.vala" +#line 193 "/home/jens/Source/shotwell/src/events/EventsDirectoryPage.vala" _tmp12_ = edit_comment_dialog_new (_tmp11_, FALSE); -#line 194 "/home/jens/Source/shotwell/src/events/EventsDirectoryPage.vala" +#line 193 "/home/jens/Source/shotwell/src/events/EventsDirectoryPage.vala" _tmp13_ = _tmp12_; -#line 194 "/home/jens/Source/shotwell/src/events/EventsDirectoryPage.vala" +#line 193 "/home/jens/Source/shotwell/src/events/EventsDirectoryPage.vala" _g_free0 (_tmp11_); -#line 194 "/home/jens/Source/shotwell/src/events/EventsDirectoryPage.vala" +#line 193 "/home/jens/Source/shotwell/src/events/EventsDirectoryPage.vala" edit_comment_dialog = _tmp13_; -#line 195 "/home/jens/Source/shotwell/src/events/EventsDirectoryPage.vala" +#line 194 "/home/jens/Source/shotwell/src/events/EventsDirectoryPage.vala" _tmp14_ = edit_comment_dialog; -#line 195 "/home/jens/Source/shotwell/src/events/EventsDirectoryPage.vala" +#line 194 "/home/jens/Source/shotwell/src/events/EventsDirectoryPage.vala" _tmp15_ = edit_comment_dialog_execute (_tmp14_); -#line 195 "/home/jens/Source/shotwell/src/events/EventsDirectoryPage.vala" +#line 194 "/home/jens/Source/shotwell/src/events/EventsDirectoryPage.vala" new_comment = _tmp15_; -#line 196 "/home/jens/Source/shotwell/src/events/EventsDirectoryPage.vala" +#line 195 "/home/jens/Source/shotwell/src/events/EventsDirectoryPage.vala" _tmp16_ = new_comment; -#line 196 "/home/jens/Source/shotwell/src/events/EventsDirectoryPage.vala" +#line 195 "/home/jens/Source/shotwell/src/events/EventsDirectoryPage.vala" if (_tmp16_ == NULL) { -#line 197 "/home/jens/Source/shotwell/src/events/EventsDirectoryPage.vala" +#line 196 "/home/jens/Source/shotwell/src/events/EventsDirectoryPage.vala" _g_free0 (new_comment); -#line 197 "/home/jens/Source/shotwell/src/events/EventsDirectoryPage.vala" +#line 196 "/home/jens/Source/shotwell/src/events/EventsDirectoryPage.vala" _multi_text_entry_dialog_mediator_unref0 (edit_comment_dialog); -#line 197 "/home/jens/Source/shotwell/src/events/EventsDirectoryPage.vala" +#line 196 "/home/jens/Source/shotwell/src/events/EventsDirectoryPage.vala" _g_object_unref0 (item); -#line 197 "/home/jens/Source/shotwell/src/events/EventsDirectoryPage.vala" +#line 196 "/home/jens/Source/shotwell/src/events/EventsDirectoryPage.vala" return; -#line 2032 "EventsDirectoryPage.c" +#line 2029 "EventsDirectoryPage.c" } -#line 199 "/home/jens/Source/shotwell/src/events/EventsDirectoryPage.vala" +#line 198 "/home/jens/Source/shotwell/src/events/EventsDirectoryPage.vala" _tmp17_ = item; -#line 199 "/home/jens/Source/shotwell/src/events/EventsDirectoryPage.vala" +#line 198 "/home/jens/Source/shotwell/src/events/EventsDirectoryPage.vala" _tmp18_ = _tmp17_->event; -#line 199 "/home/jens/Source/shotwell/src/events/EventsDirectoryPage.vala" +#line 198 "/home/jens/Source/shotwell/src/events/EventsDirectoryPage.vala" _tmp19_ = new_comment; -#line 199 "/home/jens/Source/shotwell/src/events/EventsDirectoryPage.vala" +#line 198 "/home/jens/Source/shotwell/src/events/EventsDirectoryPage.vala" _tmp20_ = edit_event_comment_command_new (_tmp18_, _tmp19_); -#line 199 "/home/jens/Source/shotwell/src/events/EventsDirectoryPage.vala" +#line 198 "/home/jens/Source/shotwell/src/events/EventsDirectoryPage.vala" command = _tmp20_; -#line 200 "/home/jens/Source/shotwell/src/events/EventsDirectoryPage.vala" +#line 199 "/home/jens/Source/shotwell/src/events/EventsDirectoryPage.vala" _tmp21_ = page_get_command_manager (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_PAGE, Page)); -#line 200 "/home/jens/Source/shotwell/src/events/EventsDirectoryPage.vala" +#line 199 "/home/jens/Source/shotwell/src/events/EventsDirectoryPage.vala" _tmp22_ = _tmp21_; -#line 200 "/home/jens/Source/shotwell/src/events/EventsDirectoryPage.vala" +#line 199 "/home/jens/Source/shotwell/src/events/EventsDirectoryPage.vala" _tmp23_ = command; -#line 200 "/home/jens/Source/shotwell/src/events/EventsDirectoryPage.vala" +#line 199 "/home/jens/Source/shotwell/src/events/EventsDirectoryPage.vala" command_manager_execute (_tmp22_, G_TYPE_CHECK_INSTANCE_CAST (_tmp23_, TYPE_COMMAND, Command)); -#line 200 "/home/jens/Source/shotwell/src/events/EventsDirectoryPage.vala" +#line 199 "/home/jens/Source/shotwell/src/events/EventsDirectoryPage.vala" _command_manager_unref0 (_tmp22_); -#line 187 "/home/jens/Source/shotwell/src/events/EventsDirectoryPage.vala" +#line 186 "/home/jens/Source/shotwell/src/events/EventsDirectoryPage.vala" _g_object_unref0 (command); -#line 187 "/home/jens/Source/shotwell/src/events/EventsDirectoryPage.vala" +#line 186 "/home/jens/Source/shotwell/src/events/EventsDirectoryPage.vala" _g_free0 (new_comment); -#line 187 "/home/jens/Source/shotwell/src/events/EventsDirectoryPage.vala" +#line 186 "/home/jens/Source/shotwell/src/events/EventsDirectoryPage.vala" _multi_text_entry_dialog_mediator_unref0 (edit_comment_dialog); -#line 187 "/home/jens/Source/shotwell/src/events/EventsDirectoryPage.vala" +#line 186 "/home/jens/Source/shotwell/src/events/EventsDirectoryPage.vala" _g_object_unref0 (item); -#line 2062 "EventsDirectoryPage.c" +#line 2059 "EventsDirectoryPage.c" } @@ -2077,55 +2074,55 @@ static void events_directory_page_on_merge (EventsDirectoryPage* self) { CommandManager* _tmp10_; CommandManager* _tmp11_; MergeEventsCommand* _tmp12_; -#line 203 "/home/jens/Source/shotwell/src/events/EventsDirectoryPage.vala" +#line 202 "/home/jens/Source/shotwell/src/events/EventsDirectoryPage.vala" g_return_if_fail (IS_EVENTS_DIRECTORY_PAGE (self)); -#line 204 "/home/jens/Source/shotwell/src/events/EventsDirectoryPage.vala" +#line 203 "/home/jens/Source/shotwell/src/events/EventsDirectoryPage.vala" _tmp0_ = page_get_view (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_PAGE, Page)); -#line 204 "/home/jens/Source/shotwell/src/events/EventsDirectoryPage.vala" +#line 203 "/home/jens/Source/shotwell/src/events/EventsDirectoryPage.vala" _tmp1_ = _tmp0_; -#line 204 "/home/jens/Source/shotwell/src/events/EventsDirectoryPage.vala" +#line 203 "/home/jens/Source/shotwell/src/events/EventsDirectoryPage.vala" _tmp2_ = view_collection_get_selected_count (_tmp1_); -#line 204 "/home/jens/Source/shotwell/src/events/EventsDirectoryPage.vala" +#line 203 "/home/jens/Source/shotwell/src/events/EventsDirectoryPage.vala" _tmp3_ = _tmp2_ <= 1; -#line 204 "/home/jens/Source/shotwell/src/events/EventsDirectoryPage.vala" +#line 203 "/home/jens/Source/shotwell/src/events/EventsDirectoryPage.vala" _data_collection_unref0 (_tmp1_); -#line 204 "/home/jens/Source/shotwell/src/events/EventsDirectoryPage.vala" +#line 203 "/home/jens/Source/shotwell/src/events/EventsDirectoryPage.vala" if (_tmp3_) { -#line 205 "/home/jens/Source/shotwell/src/events/EventsDirectoryPage.vala" +#line 204 "/home/jens/Source/shotwell/src/events/EventsDirectoryPage.vala" return; -#line 2097 "EventsDirectoryPage.c" +#line 2094 "EventsDirectoryPage.c" } -#line 207 "/home/jens/Source/shotwell/src/events/EventsDirectoryPage.vala" +#line 206 "/home/jens/Source/shotwell/src/events/EventsDirectoryPage.vala" _tmp4_ = page_get_view (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_PAGE, Page)); -#line 207 "/home/jens/Source/shotwell/src/events/EventsDirectoryPage.vala" +#line 206 "/home/jens/Source/shotwell/src/events/EventsDirectoryPage.vala" _tmp5_ = _tmp4_; -#line 207 "/home/jens/Source/shotwell/src/events/EventsDirectoryPage.vala" +#line 206 "/home/jens/Source/shotwell/src/events/EventsDirectoryPage.vala" _tmp6_ = view_collection_get_selected (_tmp5_); -#line 207 "/home/jens/Source/shotwell/src/events/EventsDirectoryPage.vala" +#line 206 "/home/jens/Source/shotwell/src/events/EventsDirectoryPage.vala" _tmp7_ = _tmp6_; -#line 207 "/home/jens/Source/shotwell/src/events/EventsDirectoryPage.vala" +#line 206 "/home/jens/Source/shotwell/src/events/EventsDirectoryPage.vala" _tmp8_ = merge_events_command_new (G_TYPE_CHECK_INSTANCE_CAST (_tmp7_, GEE_TYPE_ITERABLE, GeeIterable)); -#line 207 "/home/jens/Source/shotwell/src/events/EventsDirectoryPage.vala" +#line 206 "/home/jens/Source/shotwell/src/events/EventsDirectoryPage.vala" _tmp9_ = _tmp8_; -#line 207 "/home/jens/Source/shotwell/src/events/EventsDirectoryPage.vala" +#line 206 "/home/jens/Source/shotwell/src/events/EventsDirectoryPage.vala" _g_object_unref0 (_tmp7_); -#line 207 "/home/jens/Source/shotwell/src/events/EventsDirectoryPage.vala" +#line 206 "/home/jens/Source/shotwell/src/events/EventsDirectoryPage.vala" _data_collection_unref0 (_tmp5_); -#line 207 "/home/jens/Source/shotwell/src/events/EventsDirectoryPage.vala" +#line 206 "/home/jens/Source/shotwell/src/events/EventsDirectoryPage.vala" command = _tmp9_; -#line 208 "/home/jens/Source/shotwell/src/events/EventsDirectoryPage.vala" +#line 207 "/home/jens/Source/shotwell/src/events/EventsDirectoryPage.vala" _tmp10_ = page_get_command_manager (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_PAGE, Page)); -#line 208 "/home/jens/Source/shotwell/src/events/EventsDirectoryPage.vala" +#line 207 "/home/jens/Source/shotwell/src/events/EventsDirectoryPage.vala" _tmp11_ = _tmp10_; -#line 208 "/home/jens/Source/shotwell/src/events/EventsDirectoryPage.vala" +#line 207 "/home/jens/Source/shotwell/src/events/EventsDirectoryPage.vala" _tmp12_ = command; -#line 208 "/home/jens/Source/shotwell/src/events/EventsDirectoryPage.vala" +#line 207 "/home/jens/Source/shotwell/src/events/EventsDirectoryPage.vala" command_manager_execute (_tmp11_, G_TYPE_CHECK_INSTANCE_CAST (_tmp12_, TYPE_COMMAND, Command)); -#line 208 "/home/jens/Source/shotwell/src/events/EventsDirectoryPage.vala" +#line 207 "/home/jens/Source/shotwell/src/events/EventsDirectoryPage.vala" _command_manager_unref0 (_tmp11_); -#line 203 "/home/jens/Source/shotwell/src/events/EventsDirectoryPage.vala" +#line 202 "/home/jens/Source/shotwell/src/events/EventsDirectoryPage.vala" _g_object_unref0 (command); -#line 2129 "EventsDirectoryPage.c" +#line 2126 "EventsDirectoryPage.c" } @@ -2137,40 +2134,40 @@ static void events_directory_page_on_display_comments (EventsDirectoryPage* self ConfigFacade* _tmp3_; GSimpleAction* _tmp4_; GVariant* _tmp5_; -#line 211 "/home/jens/Source/shotwell/src/events/EventsDirectoryPage.vala" +#line 210 "/home/jens/Source/shotwell/src/events/EventsDirectoryPage.vala" g_return_if_fail (IS_EVENTS_DIRECTORY_PAGE (self)); -#line 211 "/home/jens/Source/shotwell/src/events/EventsDirectoryPage.vala" +#line 210 "/home/jens/Source/shotwell/src/events/EventsDirectoryPage.vala" g_return_if_fail (G_IS_SIMPLE_ACTION (action)); -#line 212 "/home/jens/Source/shotwell/src/events/EventsDirectoryPage.vala" +#line 211 "/home/jens/Source/shotwell/src/events/EventsDirectoryPage.vala" _tmp0_ = value; -#line 212 "/home/jens/Source/shotwell/src/events/EventsDirectoryPage.vala" +#line 211 "/home/jens/Source/shotwell/src/events/EventsDirectoryPage.vala" _tmp1_ = g_variant_get_boolean (_tmp0_); -#line 212 "/home/jens/Source/shotwell/src/events/EventsDirectoryPage.vala" +#line 211 "/home/jens/Source/shotwell/src/events/EventsDirectoryPage.vala" display = _tmp1_; -#line 214 "/home/jens/Source/shotwell/src/events/EventsDirectoryPage.vala" +#line 213 "/home/jens/Source/shotwell/src/events/EventsDirectoryPage.vala" checkerboard_page_set_display_comments (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_CHECKERBOARD_PAGE, CheckerboardPage), display); -#line 216 "/home/jens/Source/shotwell/src/events/EventsDirectoryPage.vala" +#line 215 "/home/jens/Source/shotwell/src/events/EventsDirectoryPage.vala" _tmp2_ = config_facade_get_instance (); -#line 216 "/home/jens/Source/shotwell/src/events/EventsDirectoryPage.vala" +#line 215 "/home/jens/Source/shotwell/src/events/EventsDirectoryPage.vala" _tmp3_ = _tmp2_; -#line 216 "/home/jens/Source/shotwell/src/events/EventsDirectoryPage.vala" +#line 215 "/home/jens/Source/shotwell/src/events/EventsDirectoryPage.vala" configuration_facade_set_display_event_comments (G_TYPE_CHECK_INSTANCE_CAST (_tmp3_, TYPE_CONFIGURATION_FACADE, ConfigurationFacade), display); -#line 216 "/home/jens/Source/shotwell/src/events/EventsDirectoryPage.vala" +#line 215 "/home/jens/Source/shotwell/src/events/EventsDirectoryPage.vala" _g_object_unref0 (_tmp3_); -#line 218 "/home/jens/Source/shotwell/src/events/EventsDirectoryPage.vala" +#line 217 "/home/jens/Source/shotwell/src/events/EventsDirectoryPage.vala" _tmp4_ = action; -#line 218 "/home/jens/Source/shotwell/src/events/EventsDirectoryPage.vala" +#line 217 "/home/jens/Source/shotwell/src/events/EventsDirectoryPage.vala" _tmp5_ = value; -#line 218 "/home/jens/Source/shotwell/src/events/EventsDirectoryPage.vala" +#line 217 "/home/jens/Source/shotwell/src/events/EventsDirectoryPage.vala" g_simple_action_set_state (_tmp4_, _tmp5_); -#line 2167 "EventsDirectoryPage.c" +#line 2164 "EventsDirectoryPage.c" } static gpointer _view_filter_ref0 (gpointer self) { -#line 222 "/home/jens/Source/shotwell/src/events/EventsDirectoryPage.vala" +#line 221 "/home/jens/Source/shotwell/src/events/EventsDirectoryPage.vala" return self ? view_filter_ref (self) : NULL; -#line 2174 "EventsDirectoryPage.c" +#line 2171 "EventsDirectoryPage.c" } @@ -2179,17 +2176,17 @@ static SearchViewFilter* events_directory_page_real_get_search_view_filter (Chec SearchViewFilter* result = NULL; EventsDirectoryPageEventsDirectorySearchViewFilter* _tmp0_; SearchViewFilter* _tmp1_; -#line 221 "/home/jens/Source/shotwell/src/events/EventsDirectoryPage.vala" +#line 220 "/home/jens/Source/shotwell/src/events/EventsDirectoryPage.vala" self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_EVENTS_DIRECTORY_PAGE, EventsDirectoryPage); -#line 222 "/home/jens/Source/shotwell/src/events/EventsDirectoryPage.vala" +#line 221 "/home/jens/Source/shotwell/src/events/EventsDirectoryPage.vala" _tmp0_ = self->priv->search_filter; -#line 222 "/home/jens/Source/shotwell/src/events/EventsDirectoryPage.vala" +#line 221 "/home/jens/Source/shotwell/src/events/EventsDirectoryPage.vala" _tmp1_ = _view_filter_ref0 (G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, TYPE_SEARCH_VIEW_FILTER, SearchViewFilter)); -#line 222 "/home/jens/Source/shotwell/src/events/EventsDirectoryPage.vala" +#line 221 "/home/jens/Source/shotwell/src/events/EventsDirectoryPage.vala" result = _tmp1_; -#line 222 "/home/jens/Source/shotwell/src/events/EventsDirectoryPage.vala" +#line 221 "/home/jens/Source/shotwell/src/events/EventsDirectoryPage.vala" return result; -#line 2193 "EventsDirectoryPage.c" +#line 2190 "EventsDirectoryPage.c" } @@ -2210,7 +2207,7 @@ static DataView* events_directory_page_event_directory_manager_real_create_view result = G_TYPE_CHECK_INSTANCE_CAST (_tmp1_, TYPE_DATA_VIEW, DataView); #line 10 "/home/jens/Source/shotwell/src/events/EventsDirectoryPage.vala" return result; -#line 2214 "EventsDirectoryPage.c" +#line 2211 "EventsDirectoryPage.c" } @@ -2220,14 +2217,14 @@ EventsDirectoryPageEventDirectoryManager* events_directory_page_event_directory_ self = (EventsDirectoryPageEventDirectoryManager*) view_manager_construct (object_type); #line 8 "/home/jens/Source/shotwell/src/events/EventsDirectoryPage.vala" return self; -#line 2224 "EventsDirectoryPage.c" +#line 2221 "EventsDirectoryPage.c" } EventsDirectoryPageEventDirectoryManager* events_directory_page_event_directory_manager_new (void) { #line 8 "/home/jens/Source/shotwell/src/events/EventsDirectoryPage.vala" return events_directory_page_event_directory_manager_construct (EVENTS_DIRECTORY_PAGE_TYPE_EVENT_DIRECTORY_MANAGER); -#line 2231 "EventsDirectoryPage.c" +#line 2228 "EventsDirectoryPage.c" } @@ -2236,7 +2233,7 @@ static void events_directory_page_event_directory_manager_class_init (EventsDire events_directory_page_event_directory_manager_parent_class = g_type_class_peek_parent (klass); #line 8 "/home/jens/Source/shotwell/src/events/EventsDirectoryPage.vala" ((ViewManagerClass *) klass)->create_view = (DataView* (*) (ViewManager *, DataSource*)) events_directory_page_event_directory_manager_real_create_view; -#line 2240 "EventsDirectoryPage.c" +#line 2237 "EventsDirectoryPage.c" } @@ -2265,7 +2262,7 @@ static guint events_directory_page_events_directory_search_view_filter_real_get_ result = (guint) SEARCH_FILTER_CRITERIA_TEXT; #line 16 "/home/jens/Source/shotwell/src/events/EventsDirectoryPage.vala" return result; -#line 2269 "EventsDirectoryPage.c" +#line 2266 "EventsDirectoryPage.c" } @@ -2285,7 +2282,7 @@ static gboolean string_contains (const gchar* self, const gchar* needle) { result = _tmp1_ != NULL; #line 1404 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" return result; -#line 2289 "EventsDirectoryPage.c" +#line 2286 "EventsDirectoryPage.c" } @@ -2331,7 +2328,7 @@ static gboolean events_directory_page_events_directory_search_view_filter_real_p result = TRUE; #line 22 "/home/jens/Source/shotwell/src/events/EventsDirectoryPage.vala" return result; -#line 2335 "EventsDirectoryPage.c" +#line 2332 "EventsDirectoryPage.c" } #line 24 "/home/jens/Source/shotwell/src/events/EventsDirectoryPage.vala" _tmp5_ = view; @@ -2357,11 +2354,11 @@ static gboolean events_directory_page_events_directory_search_view_filter_real_p _g_object_unref0 (source); #line 27 "/home/jens/Source/shotwell/src/events/EventsDirectoryPage.vala" return result; -#line 2361 "EventsDirectoryPage.c" +#line 2358 "EventsDirectoryPage.c" } #line 30 "/home/jens/Source/shotwell/src/events/EventsDirectoryPage.vala" _tmp12_ = search_view_filter_get_search_filter_words (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_SEARCH_VIEW_FILTER, SearchViewFilter), &_tmp11_); -#line 2365 "EventsDirectoryPage.c" +#line 2362 "EventsDirectoryPage.c" { gchar** word_collection = NULL; gint word_collection_length1 = 0; @@ -2373,11 +2370,11 @@ static gboolean events_directory_page_events_directory_search_view_filter_real_p word_collection_length1 = _tmp11_; #line 30 "/home/jens/Source/shotwell/src/events/EventsDirectoryPage.vala" for (word_it = 0; word_it < _tmp11_; word_it = word_it + 1) { -#line 2377 "EventsDirectoryPage.c" +#line 2374 "EventsDirectoryPage.c" const gchar* word = NULL; #line 30 "/home/jens/Source/shotwell/src/events/EventsDirectoryPage.vala" word = word_collection[word_it]; -#line 2381 "EventsDirectoryPage.c" +#line 2378 "EventsDirectoryPage.c" { const gchar* _tmp13_; const gchar* _tmp14_; @@ -2396,7 +2393,7 @@ static gboolean events_directory_page_events_directory_search_view_filter_real_p _g_object_unref0 (source); #line 32 "/home/jens/Source/shotwell/src/events/EventsDirectoryPage.vala" return result; -#line 2400 "EventsDirectoryPage.c" +#line 2397 "EventsDirectoryPage.c" } } } @@ -2407,7 +2404,7 @@ static gboolean events_directory_page_events_directory_search_view_filter_real_p _g_object_unref0 (source); #line 35 "/home/jens/Source/shotwell/src/events/EventsDirectoryPage.vala" return result; -#line 2411 "EventsDirectoryPage.c" +#line 2408 "EventsDirectoryPage.c" } @@ -2417,14 +2414,14 @@ static EventsDirectoryPageEventsDirectorySearchViewFilter* events_directory_page self = (EventsDirectoryPageEventsDirectorySearchViewFilter*) search_view_filter_construct (object_type); #line 14 "/home/jens/Source/shotwell/src/events/EventsDirectoryPage.vala" return self; -#line 2421 "EventsDirectoryPage.c" +#line 2418 "EventsDirectoryPage.c" } static EventsDirectoryPageEventsDirectorySearchViewFilter* events_directory_page_events_directory_search_view_filter_new (void) { #line 14 "/home/jens/Source/shotwell/src/events/EventsDirectoryPage.vala" return events_directory_page_events_directory_search_view_filter_construct (EVENTS_DIRECTORY_PAGE_TYPE_EVENTS_DIRECTORY_SEARCH_VIEW_FILTER); -#line 2428 "EventsDirectoryPage.c" +#line 2425 "EventsDirectoryPage.c" } @@ -2435,7 +2432,7 @@ static void events_directory_page_events_directory_search_view_filter_class_init ((SearchViewFilterClass *) klass)->get_criteria = (guint (*) (SearchViewFilter *)) events_directory_page_events_directory_search_view_filter_real_get_criteria; #line 14 "/home/jens/Source/shotwell/src/events/EventsDirectoryPage.vala" ((ViewFilterClass *) klass)->predicate = (gboolean (*) (ViewFilter *, DataView*)) events_directory_page_events_directory_search_view_filter_real_predicate; -#line 2439 "EventsDirectoryPage.c" +#line 2436 "EventsDirectoryPage.c" } @@ -2480,7 +2477,7 @@ static void events_directory_page_class_init (EventsDirectoryPageClass * klass) ((CheckerboardPageClass *) klass)->get_search_view_filter = (SearchViewFilter* (*) (CheckerboardPage *)) events_directory_page_real_get_search_view_filter; #line 7 "/home/jens/Source/shotwell/src/events/EventsDirectoryPage.vala" G_OBJECT_CLASS (klass)->finalize = events_directory_page_finalize; -#line 2484 "EventsDirectoryPage.c" +#line 2481 "EventsDirectoryPage.c" } @@ -2492,7 +2489,7 @@ static void events_directory_page_instance_init (EventsDirectoryPage * self) { _tmp0_ = events_directory_page_events_directory_search_view_filter_new (); #line 43 "/home/jens/Source/shotwell/src/events/EventsDirectoryPage.vala" self->priv->search_filter = _tmp0_; -#line 2496 "EventsDirectoryPage.c" +#line 2493 "EventsDirectoryPage.c" } @@ -2514,7 +2511,7 @@ static void events_directory_page_finalize (GObject * obj) { if (_tmp1_ == NULL) { #line 75 "/home/jens/Source/shotwell/src/events/EventsDirectoryPage.vala" _g_object_unref0 (_tmp0_); -#line 2518 "EventsDirectoryPage.c" +#line 2515 "EventsDirectoryPage.c" } #line 75 "/home/jens/Source/shotwell/src/events/EventsDirectoryPage.vala" action = _tmp1_; @@ -2536,7 +2533,7 @@ static void events_directory_page_finalize (GObject * obj) { _view_filter_unref0 (self->priv->search_filter); #line 7 "/home/jens/Source/shotwell/src/events/EventsDirectoryPage.vala" G_OBJECT_CLASS (events_directory_page_parent_class)->finalize (obj); -#line 2540 "EventsDirectoryPage.c" +#line 2537 "EventsDirectoryPage.c" } @@ -2559,39 +2556,39 @@ MasterEventsDirectoryPage* master_events_directory_page_construct (GType object_ EventSourceCollection* _tmp2_; GeeCollection* _tmp3_; GeeCollection* _tmp4_; -#line 230 "/home/jens/Source/shotwell/src/events/EventsDirectoryPage.vala" +#line 229 "/home/jens/Source/shotwell/src/events/EventsDirectoryPage.vala" _tmp0_ = events_directory_page_event_directory_manager_new (); -#line 230 "/home/jens/Source/shotwell/src/events/EventsDirectoryPage.vala" +#line 229 "/home/jens/Source/shotwell/src/events/EventsDirectoryPage.vala" _tmp1_ = _tmp0_; -#line 230 "/home/jens/Source/shotwell/src/events/EventsDirectoryPage.vala" +#line 229 "/home/jens/Source/shotwell/src/events/EventsDirectoryPage.vala" _tmp2_ = event_global; -#line 230 "/home/jens/Source/shotwell/src/events/EventsDirectoryPage.vala" +#line 229 "/home/jens/Source/shotwell/src/events/EventsDirectoryPage.vala" _tmp3_ = data_collection_get_all (G_TYPE_CHECK_INSTANCE_CAST (_tmp2_, TYPE_DATA_COLLECTION, DataCollection)); -#line 230 "/home/jens/Source/shotwell/src/events/EventsDirectoryPage.vala" +#line 229 "/home/jens/Source/shotwell/src/events/EventsDirectoryPage.vala" _tmp4_ = G_TYPE_CHECK_INSTANCE_CAST (_tmp3_, GEE_TYPE_COLLECTION, GeeCollection); -#line 230 "/home/jens/Source/shotwell/src/events/EventsDirectoryPage.vala" +#line 229 "/home/jens/Source/shotwell/src/events/EventsDirectoryPage.vala" self = (MasterEventsDirectoryPage*) events_directory_page_construct (object_type, MASTER_EVENTS_DIRECTORY_PAGE_NAME, G_TYPE_CHECK_INSTANCE_CAST (_tmp1_, TYPE_VIEW_MANAGER, ViewManager), _tmp4_); -#line 230 "/home/jens/Source/shotwell/src/events/EventsDirectoryPage.vala" +#line 229 "/home/jens/Source/shotwell/src/events/EventsDirectoryPage.vala" _g_object_unref0 (_tmp4_); -#line 230 "/home/jens/Source/shotwell/src/events/EventsDirectoryPage.vala" - _view_manager_unref0 (_tmp1_); #line 229 "/home/jens/Source/shotwell/src/events/EventsDirectoryPage.vala" + _view_manager_unref0 (_tmp1_); +#line 228 "/home/jens/Source/shotwell/src/events/EventsDirectoryPage.vala" return self; -#line 2581 "EventsDirectoryPage.c" +#line 2578 "EventsDirectoryPage.c" } MasterEventsDirectoryPage* master_events_directory_page_new (void) { -#line 229 "/home/jens/Source/shotwell/src/events/EventsDirectoryPage.vala" +#line 228 "/home/jens/Source/shotwell/src/events/EventsDirectoryPage.vala" return master_events_directory_page_construct (TYPE_MASTER_EVENTS_DIRECTORY_PAGE); -#line 2588 "EventsDirectoryPage.c" +#line 2585 "EventsDirectoryPage.c" } static void master_events_directory_page_class_init (MasterEventsDirectoryPageClass * klass) { -#line 226 "/home/jens/Source/shotwell/src/events/EventsDirectoryPage.vala" +#line 225 "/home/jens/Source/shotwell/src/events/EventsDirectoryPage.vala" master_events_directory_page_parent_class = g_type_class_peek_parent (klass); -#line 2595 "EventsDirectoryPage.c" +#line 2592 "EventsDirectoryPage.c" } @@ -2665,7 +2662,7 @@ static gchar* g_time_format (struct tm *self, const gchar* format) { buffer = (g_free (buffer), NULL); #line 2857 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" return result; -#line 2669 "EventsDirectoryPage.c" +#line 2666 "EventsDirectoryPage.c" } @@ -2678,71 +2675,71 @@ SubEventsDirectoryPage* sub_events_directory_page_construct (GType object_type, struct tm _tmp7_; SubEventsDirectoryPageSubEventDirectoryManager* _tmp8_; SubEventsDirectoryPageSubEventDirectoryManager* _tmp9_; -#line 287 "/home/jens/Source/shotwell/src/events/EventsDirectoryPage.vala" +#line 286 "/home/jens/Source/shotwell/src/events/EventsDirectoryPage.vala" g_return_val_if_fail (time != NULL, NULL); -#line 289 "/home/jens/Source/shotwell/src/events/EventsDirectoryPage.vala" +#line 288 "/home/jens/Source/shotwell/src/events/EventsDirectoryPage.vala" _tmp0_ = type; -#line 289 "/home/jens/Source/shotwell/src/events/EventsDirectoryPage.vala" +#line 288 "/home/jens/Source/shotwell/src/events/EventsDirectoryPage.vala" if (_tmp0_ == SUB_EVENTS_DIRECTORY_PAGE_DIRECTORY_TYPE_UNDATED) { -#line 2688 "EventsDirectoryPage.c" +#line 2685 "EventsDirectoryPage.c" gchar* _tmp1_; -#line 290 "/home/jens/Source/shotwell/src/events/EventsDirectoryPage.vala" +#line 289 "/home/jens/Source/shotwell/src/events/EventsDirectoryPage.vala" _tmp1_ = g_strdup (SUB_EVENTS_DIRECTORY_PAGE_UNDATED_PAGE_NAME); -#line 290 "/home/jens/Source/shotwell/src/events/EventsDirectoryPage.vala" +#line 289 "/home/jens/Source/shotwell/src/events/EventsDirectoryPage.vala" _g_free0 (page_name); -#line 290 "/home/jens/Source/shotwell/src/events/EventsDirectoryPage.vala" +#line 289 "/home/jens/Source/shotwell/src/events/EventsDirectoryPage.vala" page_name = _tmp1_; -#line 2696 "EventsDirectoryPage.c" +#line 2693 "EventsDirectoryPage.c" } else { const gchar* _tmp2_ = NULL; SubEventsDirectoryPageDirectoryType _tmp3_; gchar* _tmp4_; -#line 292 "/home/jens/Source/shotwell/src/events/EventsDirectoryPage.vala" +#line 291 "/home/jens/Source/shotwell/src/events/EventsDirectoryPage.vala" _tmp3_ = type; -#line 292 "/home/jens/Source/shotwell/src/events/EventsDirectoryPage.vala" +#line 291 "/home/jens/Source/shotwell/src/events/EventsDirectoryPage.vala" if (_tmp3_ == SUB_EVENTS_DIRECTORY_PAGE_DIRECTORY_TYPE_YEAR) { -#line 292 "/home/jens/Source/shotwell/src/events/EventsDirectoryPage.vala" +#line 291 "/home/jens/Source/shotwell/src/events/EventsDirectoryPage.vala" _tmp2_ = SUB_EVENTS_DIRECTORY_PAGE_YEAR_FORMAT; -#line 2707 "EventsDirectoryPage.c" +#line 2704 "EventsDirectoryPage.c" } else { -#line 292 "/home/jens/Source/shotwell/src/events/EventsDirectoryPage.vala" +#line 291 "/home/jens/Source/shotwell/src/events/EventsDirectoryPage.vala" _tmp2_ = SUB_EVENTS_DIRECTORY_PAGE_MONTH_FORMAT; -#line 2711 "EventsDirectoryPage.c" +#line 2708 "EventsDirectoryPage.c" } -#line 292 "/home/jens/Source/shotwell/src/events/EventsDirectoryPage.vala" +#line 291 "/home/jens/Source/shotwell/src/events/EventsDirectoryPage.vala" _tmp4_ = g_time_format (time, _tmp2_); -#line 292 "/home/jens/Source/shotwell/src/events/EventsDirectoryPage.vala" +#line 291 "/home/jens/Source/shotwell/src/events/EventsDirectoryPage.vala" _g_free0 (page_name); -#line 292 "/home/jens/Source/shotwell/src/events/EventsDirectoryPage.vala" +#line 291 "/home/jens/Source/shotwell/src/events/EventsDirectoryPage.vala" page_name = _tmp4_; -#line 2719 "EventsDirectoryPage.c" +#line 2716 "EventsDirectoryPage.c" } -#line 295 "/home/jens/Source/shotwell/src/events/EventsDirectoryPage.vala" +#line 294 "/home/jens/Source/shotwell/src/events/EventsDirectoryPage.vala" _tmp5_ = page_name; -#line 295 "/home/jens/Source/shotwell/src/events/EventsDirectoryPage.vala" +#line 294 "/home/jens/Source/shotwell/src/events/EventsDirectoryPage.vala" _tmp6_ = type; -#line 295 "/home/jens/Source/shotwell/src/events/EventsDirectoryPage.vala" +#line 294 "/home/jens/Source/shotwell/src/events/EventsDirectoryPage.vala" _tmp7_ = *time; -#line 295 "/home/jens/Source/shotwell/src/events/EventsDirectoryPage.vala" +#line 294 "/home/jens/Source/shotwell/src/events/EventsDirectoryPage.vala" _tmp8_ = sub_events_directory_page_sub_event_directory_manager_new (_tmp6_, &_tmp7_); -#line 295 "/home/jens/Source/shotwell/src/events/EventsDirectoryPage.vala" +#line 294 "/home/jens/Source/shotwell/src/events/EventsDirectoryPage.vala" _tmp9_ = _tmp8_; -#line 295 "/home/jens/Source/shotwell/src/events/EventsDirectoryPage.vala" +#line 294 "/home/jens/Source/shotwell/src/events/EventsDirectoryPage.vala" self = (SubEventsDirectoryPage*) events_directory_page_construct (object_type, _tmp5_, G_TYPE_CHECK_INSTANCE_CAST (_tmp9_, TYPE_VIEW_MANAGER, ViewManager), NULL); -#line 295 "/home/jens/Source/shotwell/src/events/EventsDirectoryPage.vala" +#line 294 "/home/jens/Source/shotwell/src/events/EventsDirectoryPage.vala" _view_manager_unref0 (_tmp9_); -#line 287 "/home/jens/Source/shotwell/src/events/EventsDirectoryPage.vala" +#line 286 "/home/jens/Source/shotwell/src/events/EventsDirectoryPage.vala" _g_free0 (page_name); -#line 287 "/home/jens/Source/shotwell/src/events/EventsDirectoryPage.vala" +#line 286 "/home/jens/Source/shotwell/src/events/EventsDirectoryPage.vala" return self; -#line 2739 "EventsDirectoryPage.c" +#line 2736 "EventsDirectoryPage.c" } SubEventsDirectoryPage* sub_events_directory_page_new (SubEventsDirectoryPageDirectoryType type, struct tm* time) { -#line 287 "/home/jens/Source/shotwell/src/events/EventsDirectoryPage.vala" +#line 286 "/home/jens/Source/shotwell/src/events/EventsDirectoryPage.vala" return sub_events_directory_page_construct (TYPE_SUB_EVENTS_DIRECTORY_PAGE, type, time); -#line 2746 "EventsDirectoryPage.c" +#line 2743 "EventsDirectoryPage.c" } @@ -2750,17 +2747,17 @@ gint sub_events_directory_page_get_month (SubEventsDirectoryPage* self) { gint result = 0; ViewManager* _tmp0_; gint _tmp1_; -#line 298 "/home/jens/Source/shotwell/src/events/EventsDirectoryPage.vala" +#line 297 "/home/jens/Source/shotwell/src/events/EventsDirectoryPage.vala" g_return_val_if_fail (IS_SUB_EVENTS_DIRECTORY_PAGE (self), 0); -#line 299 "/home/jens/Source/shotwell/src/events/EventsDirectoryPage.vala" +#line 298 "/home/jens/Source/shotwell/src/events/EventsDirectoryPage.vala" _tmp0_ = G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_EVENTS_DIRECTORY_PAGE, EventsDirectoryPage)->view_manager; -#line 299 "/home/jens/Source/shotwell/src/events/EventsDirectoryPage.vala" +#line 298 "/home/jens/Source/shotwell/src/events/EventsDirectoryPage.vala" _tmp1_ = sub_events_directory_page_sub_event_directory_manager_get_month (G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, SUB_EVENTS_DIRECTORY_PAGE_TYPE_SUB_EVENT_DIRECTORY_MANAGER, SubEventsDirectoryPageSubEventDirectoryManager)); -#line 299 "/home/jens/Source/shotwell/src/events/EventsDirectoryPage.vala" +#line 298 "/home/jens/Source/shotwell/src/events/EventsDirectoryPage.vala" result = _tmp1_; -#line 299 "/home/jens/Source/shotwell/src/events/EventsDirectoryPage.vala" +#line 298 "/home/jens/Source/shotwell/src/events/EventsDirectoryPage.vala" return result; -#line 2764 "EventsDirectoryPage.c" +#line 2761 "EventsDirectoryPage.c" } @@ -2768,17 +2765,17 @@ gint sub_events_directory_page_get_year (SubEventsDirectoryPage* self) { gint result = 0; ViewManager* _tmp0_; gint _tmp1_; -#line 302 "/home/jens/Source/shotwell/src/events/EventsDirectoryPage.vala" +#line 301 "/home/jens/Source/shotwell/src/events/EventsDirectoryPage.vala" g_return_val_if_fail (IS_SUB_EVENTS_DIRECTORY_PAGE (self), 0); -#line 303 "/home/jens/Source/shotwell/src/events/EventsDirectoryPage.vala" +#line 302 "/home/jens/Source/shotwell/src/events/EventsDirectoryPage.vala" _tmp0_ = G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_EVENTS_DIRECTORY_PAGE, EventsDirectoryPage)->view_manager; -#line 303 "/home/jens/Source/shotwell/src/events/EventsDirectoryPage.vala" +#line 302 "/home/jens/Source/shotwell/src/events/EventsDirectoryPage.vala" _tmp1_ = sub_events_directory_page_sub_event_directory_manager_get_year (G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, SUB_EVENTS_DIRECTORY_PAGE_TYPE_SUB_EVENT_DIRECTORY_MANAGER, SubEventsDirectoryPageSubEventDirectoryManager)); -#line 303 "/home/jens/Source/shotwell/src/events/EventsDirectoryPage.vala" +#line 302 "/home/jens/Source/shotwell/src/events/EventsDirectoryPage.vala" result = _tmp1_; -#line 303 "/home/jens/Source/shotwell/src/events/EventsDirectoryPage.vala" +#line 302 "/home/jens/Source/shotwell/src/events/EventsDirectoryPage.vala" return result; -#line 2782 "EventsDirectoryPage.c" +#line 2779 "EventsDirectoryPage.c" } @@ -2786,17 +2783,17 @@ SubEventsDirectoryPageDirectoryType sub_events_directory_page_get_event_director SubEventsDirectoryPageDirectoryType result = 0; ViewManager* _tmp0_; SubEventsDirectoryPageDirectoryType _tmp1_; -#line 306 "/home/jens/Source/shotwell/src/events/EventsDirectoryPage.vala" +#line 305 "/home/jens/Source/shotwell/src/events/EventsDirectoryPage.vala" g_return_val_if_fail (IS_SUB_EVENTS_DIRECTORY_PAGE (self), 0); -#line 307 "/home/jens/Source/shotwell/src/events/EventsDirectoryPage.vala" +#line 306 "/home/jens/Source/shotwell/src/events/EventsDirectoryPage.vala" _tmp0_ = G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_EVENTS_DIRECTORY_PAGE, EventsDirectoryPage)->view_manager; -#line 307 "/home/jens/Source/shotwell/src/events/EventsDirectoryPage.vala" +#line 306 "/home/jens/Source/shotwell/src/events/EventsDirectoryPage.vala" _tmp1_ = sub_events_directory_page_sub_event_directory_manager_get_event_directory_type (G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, SUB_EVENTS_DIRECTORY_PAGE_TYPE_SUB_EVENT_DIRECTORY_MANAGER, SubEventsDirectoryPageSubEventDirectoryManager)); -#line 307 "/home/jens/Source/shotwell/src/events/EventsDirectoryPage.vala" +#line 306 "/home/jens/Source/shotwell/src/events/EventsDirectoryPage.vala" result = _tmp1_; -#line 307 "/home/jens/Source/shotwell/src/events/EventsDirectoryPage.vala" +#line 306 "/home/jens/Source/shotwell/src/events/EventsDirectoryPage.vala" return result; -#line 2800 "EventsDirectoryPage.c" +#line 2797 "EventsDirectoryPage.c" } @@ -2806,45 +2803,45 @@ static SubEventsDirectoryPageSubEventDirectoryManager* sub_events_directory_page SubEventsDirectoryPageDirectoryType _tmp3_; struct tm _tmp4_; gint _tmp5_; -#line 250 "/home/jens/Source/shotwell/src/events/EventsDirectoryPage.vala" +#line 249 "/home/jens/Source/shotwell/src/events/EventsDirectoryPage.vala" g_return_val_if_fail (time != NULL, NULL); -#line 251 "/home/jens/Source/shotwell/src/events/EventsDirectoryPage.vala" +#line 250 "/home/jens/Source/shotwell/src/events/EventsDirectoryPage.vala" self = (SubEventsDirectoryPageSubEventDirectoryManager*) events_directory_page_event_directory_manager_construct (object_type); -#line 253 "/home/jens/Source/shotwell/src/events/EventsDirectoryPage.vala" +#line 252 "/home/jens/Source/shotwell/src/events/EventsDirectoryPage.vala" _tmp0_ = type; -#line 253 "/home/jens/Source/shotwell/src/events/EventsDirectoryPage.vala" +#line 252 "/home/jens/Source/shotwell/src/events/EventsDirectoryPage.vala" if (_tmp0_ == SUB_EVENTS_DIRECTORY_PAGE_DIRECTORY_TYPE_MONTH) { -#line 2818 "EventsDirectoryPage.c" +#line 2815 "EventsDirectoryPage.c" struct tm _tmp1_; gint _tmp2_; -#line 254 "/home/jens/Source/shotwell/src/events/EventsDirectoryPage.vala" +#line 253 "/home/jens/Source/shotwell/src/events/EventsDirectoryPage.vala" _tmp1_ = *time; -#line 254 "/home/jens/Source/shotwell/src/events/EventsDirectoryPage.vala" +#line 253 "/home/jens/Source/shotwell/src/events/EventsDirectoryPage.vala" _tmp2_ = _tmp1_.tm_mon; -#line 254 "/home/jens/Source/shotwell/src/events/EventsDirectoryPage.vala" +#line 253 "/home/jens/Source/shotwell/src/events/EventsDirectoryPage.vala" self->priv->month = _tmp2_; -#line 2827 "EventsDirectoryPage.c" +#line 2824 "EventsDirectoryPage.c" } -#line 255 "/home/jens/Source/shotwell/src/events/EventsDirectoryPage.vala" +#line 254 "/home/jens/Source/shotwell/src/events/EventsDirectoryPage.vala" _tmp3_ = type; -#line 255 "/home/jens/Source/shotwell/src/events/EventsDirectoryPage.vala" +#line 254 "/home/jens/Source/shotwell/src/events/EventsDirectoryPage.vala" self->priv->type = _tmp3_; -#line 256 "/home/jens/Source/shotwell/src/events/EventsDirectoryPage.vala" +#line 255 "/home/jens/Source/shotwell/src/events/EventsDirectoryPage.vala" _tmp4_ = *time; -#line 256 "/home/jens/Source/shotwell/src/events/EventsDirectoryPage.vala" +#line 255 "/home/jens/Source/shotwell/src/events/EventsDirectoryPage.vala" _tmp5_ = _tmp4_.tm_year; -#line 256 "/home/jens/Source/shotwell/src/events/EventsDirectoryPage.vala" +#line 255 "/home/jens/Source/shotwell/src/events/EventsDirectoryPage.vala" self->priv->year = _tmp5_; -#line 250 "/home/jens/Source/shotwell/src/events/EventsDirectoryPage.vala" +#line 249 "/home/jens/Source/shotwell/src/events/EventsDirectoryPage.vala" return self; -#line 2841 "EventsDirectoryPage.c" +#line 2838 "EventsDirectoryPage.c" } static SubEventsDirectoryPageSubEventDirectoryManager* sub_events_directory_page_sub_event_directory_manager_new (SubEventsDirectoryPageDirectoryType type, struct tm* time) { -#line 250 "/home/jens/Source/shotwell/src/events/EventsDirectoryPage.vala" +#line 249 "/home/jens/Source/shotwell/src/events/EventsDirectoryPage.vala" return sub_events_directory_page_sub_event_directory_manager_construct (SUB_EVENTS_DIRECTORY_PAGE_TYPE_SUB_EVENT_DIRECTORY_MANAGER, type, time); -#line 2848 "EventsDirectoryPage.c" +#line 2845 "EventsDirectoryPage.c" } @@ -2859,7 +2856,7 @@ static void g_time_local (time_t time, struct tm* result) { *result = _result_; #line 2847 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" return; -#line 2863 "EventsDirectoryPage.c" +#line 2860 "EventsDirectoryPage.c" } @@ -2878,162 +2875,162 @@ static gboolean sub_events_directory_page_sub_event_directory_manager_real_inclu struct tm _tmp7_; gint _tmp8_; gint _tmp9_; -#line 259 "/home/jens/Source/shotwell/src/events/EventsDirectoryPage.vala" +#line 258 "/home/jens/Source/shotwell/src/events/EventsDirectoryPage.vala" self = G_TYPE_CHECK_INSTANCE_CAST (base, SUB_EVENTS_DIRECTORY_PAGE_TYPE_SUB_EVENT_DIRECTORY_MANAGER, SubEventsDirectoryPageSubEventDirectoryManager); -#line 259 "/home/jens/Source/shotwell/src/events/EventsDirectoryPage.vala" +#line 258 "/home/jens/Source/shotwell/src/events/EventsDirectoryPage.vala" g_return_val_if_fail (IS_DATA_SOURCE (source), FALSE); -#line 260 "/home/jens/Source/shotwell/src/events/EventsDirectoryPage.vala" +#line 259 "/home/jens/Source/shotwell/src/events/EventsDirectoryPage.vala" _tmp0_ = source; -#line 260 "/home/jens/Source/shotwell/src/events/EventsDirectoryPage.vala" +#line 259 "/home/jens/Source/shotwell/src/events/EventsDirectoryPage.vala" _tmp1_ = VIEW_MANAGER_CLASS (sub_events_directory_page_sub_event_directory_manager_parent_class)->include_in_view (G_TYPE_CHECK_INSTANCE_CAST (G_TYPE_CHECK_INSTANCE_CAST (self, EVENTS_DIRECTORY_PAGE_TYPE_EVENT_DIRECTORY_MANAGER, EventsDirectoryPageEventDirectoryManager), TYPE_VIEW_MANAGER, ViewManager), _tmp0_); -#line 260 "/home/jens/Source/shotwell/src/events/EventsDirectoryPage.vala" +#line 259 "/home/jens/Source/shotwell/src/events/EventsDirectoryPage.vala" if (!_tmp1_) { -#line 261 "/home/jens/Source/shotwell/src/events/EventsDirectoryPage.vala" +#line 260 "/home/jens/Source/shotwell/src/events/EventsDirectoryPage.vala" result = FALSE; -#line 261 "/home/jens/Source/shotwell/src/events/EventsDirectoryPage.vala" +#line 260 "/home/jens/Source/shotwell/src/events/EventsDirectoryPage.vala" return result; -#line 2896 "EventsDirectoryPage.c" +#line 2893 "EventsDirectoryPage.c" } -#line 263 "/home/jens/Source/shotwell/src/events/EventsDirectoryPage.vala" +#line 262 "/home/jens/Source/shotwell/src/events/EventsDirectoryPage.vala" _tmp2_ = source; -#line 263 "/home/jens/Source/shotwell/src/events/EventsDirectoryPage.vala" +#line 262 "/home/jens/Source/shotwell/src/events/EventsDirectoryPage.vala" _tmp3_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_CAST (_tmp2_, TYPE_EVENT_SOURCE, EventSource)); -#line 263 "/home/jens/Source/shotwell/src/events/EventsDirectoryPage.vala" +#line 262 "/home/jens/Source/shotwell/src/events/EventsDirectoryPage.vala" event = _tmp3_; -#line 264 "/home/jens/Source/shotwell/src/events/EventsDirectoryPage.vala" +#line 263 "/home/jens/Source/shotwell/src/events/EventsDirectoryPage.vala" _tmp4_ = event; -#line 264 "/home/jens/Source/shotwell/src/events/EventsDirectoryPage.vala" +#line 263 "/home/jens/Source/shotwell/src/events/EventsDirectoryPage.vala" _tmp5_ = event_source_get_start_time (_tmp4_); -#line 264 "/home/jens/Source/shotwell/src/events/EventsDirectoryPage.vala" +#line 263 "/home/jens/Source/shotwell/src/events/EventsDirectoryPage.vala" g_time_local (_tmp5_, &_tmp6_); -#line 264 "/home/jens/Source/shotwell/src/events/EventsDirectoryPage.vala" +#line 263 "/home/jens/Source/shotwell/src/events/EventsDirectoryPage.vala" event_time = _tmp6_; -#line 265 "/home/jens/Source/shotwell/src/events/EventsDirectoryPage.vala" +#line 264 "/home/jens/Source/shotwell/src/events/EventsDirectoryPage.vala" _tmp7_ = event_time; -#line 265 "/home/jens/Source/shotwell/src/events/EventsDirectoryPage.vala" +#line 264 "/home/jens/Source/shotwell/src/events/EventsDirectoryPage.vala" _tmp8_ = _tmp7_.tm_year; -#line 265 "/home/jens/Source/shotwell/src/events/EventsDirectoryPage.vala" +#line 264 "/home/jens/Source/shotwell/src/events/EventsDirectoryPage.vala" _tmp9_ = self->priv->year; -#line 265 "/home/jens/Source/shotwell/src/events/EventsDirectoryPage.vala" +#line 264 "/home/jens/Source/shotwell/src/events/EventsDirectoryPage.vala" if (_tmp8_ == _tmp9_) { -#line 2920 "EventsDirectoryPage.c" +#line 2917 "EventsDirectoryPage.c" SubEventsDirectoryPageDirectoryType _tmp10_; -#line 266 "/home/jens/Source/shotwell/src/events/EventsDirectoryPage.vala" +#line 265 "/home/jens/Source/shotwell/src/events/EventsDirectoryPage.vala" _tmp10_ = self->priv->type; -#line 266 "/home/jens/Source/shotwell/src/events/EventsDirectoryPage.vala" +#line 265 "/home/jens/Source/shotwell/src/events/EventsDirectoryPage.vala" if (_tmp10_ == SUB_EVENTS_DIRECTORY_PAGE_DIRECTORY_TYPE_MONTH) { -#line 2926 "EventsDirectoryPage.c" +#line 2923 "EventsDirectoryPage.c" struct tm _tmp11_; gint _tmp12_; gint _tmp13_; -#line 267 "/home/jens/Source/shotwell/src/events/EventsDirectoryPage.vala" +#line 266 "/home/jens/Source/shotwell/src/events/EventsDirectoryPage.vala" _tmp11_ = event_time; -#line 267 "/home/jens/Source/shotwell/src/events/EventsDirectoryPage.vala" +#line 266 "/home/jens/Source/shotwell/src/events/EventsDirectoryPage.vala" _tmp12_ = _tmp11_.tm_mon; -#line 267 "/home/jens/Source/shotwell/src/events/EventsDirectoryPage.vala" +#line 266 "/home/jens/Source/shotwell/src/events/EventsDirectoryPage.vala" _tmp13_ = self->priv->month; -#line 267 "/home/jens/Source/shotwell/src/events/EventsDirectoryPage.vala" +#line 266 "/home/jens/Source/shotwell/src/events/EventsDirectoryPage.vala" result = _tmp12_ == _tmp13_; -#line 267 "/home/jens/Source/shotwell/src/events/EventsDirectoryPage.vala" +#line 266 "/home/jens/Source/shotwell/src/events/EventsDirectoryPage.vala" _g_object_unref0 (event); -#line 267 "/home/jens/Source/shotwell/src/events/EventsDirectoryPage.vala" +#line 266 "/home/jens/Source/shotwell/src/events/EventsDirectoryPage.vala" return result; -#line 2942 "EventsDirectoryPage.c" +#line 2939 "EventsDirectoryPage.c" } -#line 269 "/home/jens/Source/shotwell/src/events/EventsDirectoryPage.vala" +#line 268 "/home/jens/Source/shotwell/src/events/EventsDirectoryPage.vala" result = TRUE; -#line 269 "/home/jens/Source/shotwell/src/events/EventsDirectoryPage.vala" +#line 268 "/home/jens/Source/shotwell/src/events/EventsDirectoryPage.vala" _g_object_unref0 (event); -#line 269 "/home/jens/Source/shotwell/src/events/EventsDirectoryPage.vala" +#line 268 "/home/jens/Source/shotwell/src/events/EventsDirectoryPage.vala" return result; -#line 2950 "EventsDirectoryPage.c" +#line 2947 "EventsDirectoryPage.c" } -#line 271 "/home/jens/Source/shotwell/src/events/EventsDirectoryPage.vala" +#line 270 "/home/jens/Source/shotwell/src/events/EventsDirectoryPage.vala" result = FALSE; -#line 271 "/home/jens/Source/shotwell/src/events/EventsDirectoryPage.vala" +#line 270 "/home/jens/Source/shotwell/src/events/EventsDirectoryPage.vala" _g_object_unref0 (event); -#line 271 "/home/jens/Source/shotwell/src/events/EventsDirectoryPage.vala" +#line 270 "/home/jens/Source/shotwell/src/events/EventsDirectoryPage.vala" return result; -#line 2958 "EventsDirectoryPage.c" +#line 2955 "EventsDirectoryPage.c" } static gint sub_events_directory_page_sub_event_directory_manager_get_month (SubEventsDirectoryPageSubEventDirectoryManager* self) { gint result = 0; gint _tmp0_; -#line 274 "/home/jens/Source/shotwell/src/events/EventsDirectoryPage.vala" +#line 273 "/home/jens/Source/shotwell/src/events/EventsDirectoryPage.vala" g_return_val_if_fail (SUB_EVENTS_DIRECTORY_PAGE_IS_SUB_EVENT_DIRECTORY_MANAGER (self), 0); -#line 275 "/home/jens/Source/shotwell/src/events/EventsDirectoryPage.vala" +#line 274 "/home/jens/Source/shotwell/src/events/EventsDirectoryPage.vala" _tmp0_ = self->priv->month; -#line 275 "/home/jens/Source/shotwell/src/events/EventsDirectoryPage.vala" +#line 274 "/home/jens/Source/shotwell/src/events/EventsDirectoryPage.vala" result = _tmp0_; -#line 275 "/home/jens/Source/shotwell/src/events/EventsDirectoryPage.vala" +#line 274 "/home/jens/Source/shotwell/src/events/EventsDirectoryPage.vala" return result; -#line 2973 "EventsDirectoryPage.c" +#line 2970 "EventsDirectoryPage.c" } static gint sub_events_directory_page_sub_event_directory_manager_get_year (SubEventsDirectoryPageSubEventDirectoryManager* self) { gint result = 0; gint _tmp0_; -#line 278 "/home/jens/Source/shotwell/src/events/EventsDirectoryPage.vala" +#line 277 "/home/jens/Source/shotwell/src/events/EventsDirectoryPage.vala" g_return_val_if_fail (SUB_EVENTS_DIRECTORY_PAGE_IS_SUB_EVENT_DIRECTORY_MANAGER (self), 0); -#line 279 "/home/jens/Source/shotwell/src/events/EventsDirectoryPage.vala" +#line 278 "/home/jens/Source/shotwell/src/events/EventsDirectoryPage.vala" _tmp0_ = self->priv->year; -#line 279 "/home/jens/Source/shotwell/src/events/EventsDirectoryPage.vala" +#line 278 "/home/jens/Source/shotwell/src/events/EventsDirectoryPage.vala" result = _tmp0_; -#line 279 "/home/jens/Source/shotwell/src/events/EventsDirectoryPage.vala" +#line 278 "/home/jens/Source/shotwell/src/events/EventsDirectoryPage.vala" return result; -#line 2988 "EventsDirectoryPage.c" +#line 2985 "EventsDirectoryPage.c" } static SubEventsDirectoryPageDirectoryType sub_events_directory_page_sub_event_directory_manager_get_event_directory_type (SubEventsDirectoryPageSubEventDirectoryManager* self) { SubEventsDirectoryPageDirectoryType result = 0; SubEventsDirectoryPageDirectoryType _tmp0_; -#line 282 "/home/jens/Source/shotwell/src/events/EventsDirectoryPage.vala" +#line 281 "/home/jens/Source/shotwell/src/events/EventsDirectoryPage.vala" g_return_val_if_fail (SUB_EVENTS_DIRECTORY_PAGE_IS_SUB_EVENT_DIRECTORY_MANAGER (self), 0); -#line 283 "/home/jens/Source/shotwell/src/events/EventsDirectoryPage.vala" +#line 282 "/home/jens/Source/shotwell/src/events/EventsDirectoryPage.vala" _tmp0_ = self->priv->type; -#line 283 "/home/jens/Source/shotwell/src/events/EventsDirectoryPage.vala" +#line 282 "/home/jens/Source/shotwell/src/events/EventsDirectoryPage.vala" result = _tmp0_; -#line 283 "/home/jens/Source/shotwell/src/events/EventsDirectoryPage.vala" +#line 282 "/home/jens/Source/shotwell/src/events/EventsDirectoryPage.vala" return result; -#line 3003 "EventsDirectoryPage.c" +#line 3000 "EventsDirectoryPage.c" } static void sub_events_directory_page_sub_event_directory_manager_class_init (SubEventsDirectoryPageSubEventDirectoryManagerClass * klass) { -#line 245 "/home/jens/Source/shotwell/src/events/EventsDirectoryPage.vala" +#line 244 "/home/jens/Source/shotwell/src/events/EventsDirectoryPage.vala" sub_events_directory_page_sub_event_directory_manager_parent_class = g_type_class_peek_parent (klass); -#line 245 "/home/jens/Source/shotwell/src/events/EventsDirectoryPage.vala" +#line 244 "/home/jens/Source/shotwell/src/events/EventsDirectoryPage.vala" ((ViewManagerClass *) klass)->finalize = sub_events_directory_page_sub_event_directory_manager_finalize; -#line 245 "/home/jens/Source/shotwell/src/events/EventsDirectoryPage.vala" +#line 244 "/home/jens/Source/shotwell/src/events/EventsDirectoryPage.vala" g_type_class_add_private (klass, sizeof (SubEventsDirectoryPageSubEventDirectoryManagerPrivate)); -#line 245 "/home/jens/Source/shotwell/src/events/EventsDirectoryPage.vala" +#line 244 "/home/jens/Source/shotwell/src/events/EventsDirectoryPage.vala" ((ViewManagerClass *) klass)->include_in_view = (gboolean (*) (ViewManager *, DataSource*)) sub_events_directory_page_sub_event_directory_manager_real_include_in_view; -#line 3016 "EventsDirectoryPage.c" +#line 3013 "EventsDirectoryPage.c" } static void sub_events_directory_page_sub_event_directory_manager_instance_init (SubEventsDirectoryPageSubEventDirectoryManager * self) { -#line 245 "/home/jens/Source/shotwell/src/events/EventsDirectoryPage.vala" +#line 244 "/home/jens/Source/shotwell/src/events/EventsDirectoryPage.vala" self->priv = SUB_EVENTS_DIRECTORY_PAGE_SUB_EVENT_DIRECTORY_MANAGER_GET_PRIVATE (self); -#line 246 "/home/jens/Source/shotwell/src/events/EventsDirectoryPage.vala" +#line 245 "/home/jens/Source/shotwell/src/events/EventsDirectoryPage.vala" self->priv->month = 0; -#line 247 "/home/jens/Source/shotwell/src/events/EventsDirectoryPage.vala" +#line 246 "/home/jens/Source/shotwell/src/events/EventsDirectoryPage.vala" self->priv->year = 0; -#line 3027 "EventsDirectoryPage.c" +#line 3024 "EventsDirectoryPage.c" } static void sub_events_directory_page_sub_event_directory_manager_finalize (ViewManager * obj) { SubEventsDirectoryPageSubEventDirectoryManager * self; -#line 245 "/home/jens/Source/shotwell/src/events/EventsDirectoryPage.vala" +#line 244 "/home/jens/Source/shotwell/src/events/EventsDirectoryPage.vala" self = G_TYPE_CHECK_INSTANCE_CAST (obj, SUB_EVENTS_DIRECTORY_PAGE_TYPE_SUB_EVENT_DIRECTORY_MANAGER, SubEventsDirectoryPageSubEventDirectoryManager); -#line 245 "/home/jens/Source/shotwell/src/events/EventsDirectoryPage.vala" +#line 244 "/home/jens/Source/shotwell/src/events/EventsDirectoryPage.vala" VIEW_MANAGER_CLASS (sub_events_directory_page_sub_event_directory_manager_parent_class)->finalize (obj); -#line 3037 "EventsDirectoryPage.c" +#line 3034 "EventsDirectoryPage.c" } @@ -3050,9 +3047,9 @@ static GType sub_events_directory_page_sub_event_directory_manager_get_type (voi static void sub_events_directory_page_class_init (SubEventsDirectoryPageClass * klass) { -#line 234 "/home/jens/Source/shotwell/src/events/EventsDirectoryPage.vala" +#line 233 "/home/jens/Source/shotwell/src/events/EventsDirectoryPage.vala" sub_events_directory_page_parent_class = g_type_class_peek_parent (klass); -#line 3056 "EventsDirectoryPage.c" +#line 3053 "EventsDirectoryPage.c" } diff --git a/src/events/EventsDirectoryPage.vala b/src/events/EventsDirectoryPage.vala index 4650fd2..241abfe 100644 --- a/src/events/EventsDirectoryPage.vala +++ b/src/events/EventsDirectoryPage.vala @@ -139,7 +139,6 @@ public abstract class EventsDirectoryPage : CheckerboardPage { protected override void update_actions(int selected_count, int count) { set_action_sensitive("Merge", selected_count > 1); - set_action_important("Merge", true); set_action_sensitive("Rename", selected_count == 1); set_action_sensitive("EditComment", selected_count == 1); -- cgit v1.2.3