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/folders/Branch.c | 2113 --------------------------------------- src/folders/Branch.vala | 193 ---- src/folders/FoldersBranch.c | 2135 ++++++++++++++++++++++++++++++++++++++++ src/folders/FoldersBranch.vala | 193 ++++ src/folders/FoldersPage.c | 1025 +++++++++++++++++++ src/folders/FoldersPage.vala | 41 + src/folders/Page.c | 1025 ------------------- src/folders/Page.vala | 41 - 8 files changed, 3394 insertions(+), 3372 deletions(-) delete mode 100644 src/folders/Branch.c delete mode 100644 src/folders/Branch.vala create mode 100644 src/folders/FoldersBranch.c create mode 100644 src/folders/FoldersBranch.vala create mode 100644 src/folders/FoldersPage.c create mode 100644 src/folders/FoldersPage.vala delete mode 100644 src/folders/Page.c delete mode 100644 src/folders/Page.vala (limited to 'src/folders') diff --git a/src/folders/Branch.c b/src/folders/Branch.c deleted file mode 100644 index 95fb127..0000000 --- a/src/folders/Branch.c +++ /dev/null @@ -1,2113 +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 FOLDERS_TYPE_BRANCH (folders_branch_get_type ()) -#define FOLDERS_BRANCH(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), FOLDERS_TYPE_BRANCH, FoldersBranch)) -#define FOLDERS_BRANCH_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), FOLDERS_TYPE_BRANCH, FoldersBranchClass)) -#define FOLDERS_IS_BRANCH(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), FOLDERS_TYPE_BRANCH)) -#define FOLDERS_IS_BRANCH_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), FOLDERS_TYPE_BRANCH)) -#define FOLDERS_BRANCH_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), FOLDERS_TYPE_BRANCH, FoldersBranchClass)) - -typedef struct _FoldersBranch FoldersBranch; -typedef struct _FoldersBranchClass FoldersBranchClass; -typedef struct _FoldersBranchPrivate FoldersBranchPrivate; - -#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 FOLDERS_TYPE_SIDEBAR_ENTRY (folders_sidebar_entry_get_type ()) -#define FOLDERS_SIDEBAR_ENTRY(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), FOLDERS_TYPE_SIDEBAR_ENTRY, FoldersSidebarEntry)) -#define FOLDERS_SIDEBAR_ENTRY_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), FOLDERS_TYPE_SIDEBAR_ENTRY, FoldersSidebarEntryClass)) -#define FOLDERS_IS_SIDEBAR_ENTRY(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), FOLDERS_TYPE_SIDEBAR_ENTRY)) -#define FOLDERS_IS_SIDEBAR_ENTRY_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), FOLDERS_TYPE_SIDEBAR_ENTRY)) -#define FOLDERS_SIDEBAR_ENTRY_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), FOLDERS_TYPE_SIDEBAR_ENTRY, FoldersSidebarEntryClass)) - -typedef struct _FoldersSidebarEntry FoldersSidebarEntry; -typedef struct _FoldersSidebarEntryClass FoldersSidebarEntryClass; - -#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_MEDIA_SOURCE_COLLECTION (media_source_collection_get_type ()) -#define MEDIA_SOURCE_COLLECTION(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_MEDIA_SOURCE_COLLECTION, MediaSourceCollection)) -#define MEDIA_SOURCE_COLLECTION_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_MEDIA_SOURCE_COLLECTION, MediaSourceCollectionClass)) -#define IS_MEDIA_SOURCE_COLLECTION(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_MEDIA_SOURCE_COLLECTION)) -#define IS_MEDIA_SOURCE_COLLECTION_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_MEDIA_SOURCE_COLLECTION)) -#define MEDIA_SOURCE_COLLECTION_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_MEDIA_SOURCE_COLLECTION, MediaSourceCollectionClass)) - -typedef struct _MediaSourceCollection MediaSourceCollection; -typedef struct _MediaSourceCollectionClass MediaSourceCollectionClass; - -#define TYPE_MEDIA_COLLECTION_REGISTRY (media_collection_registry_get_type ()) -#define MEDIA_COLLECTION_REGISTRY(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_MEDIA_COLLECTION_REGISTRY, MediaCollectionRegistry)) -#define MEDIA_COLLECTION_REGISTRY_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_MEDIA_COLLECTION_REGISTRY, MediaCollectionRegistryClass)) -#define IS_MEDIA_COLLECTION_REGISTRY(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_MEDIA_COLLECTION_REGISTRY)) -#define IS_MEDIA_COLLECTION_REGISTRY_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_MEDIA_COLLECTION_REGISTRY)) -#define MEDIA_COLLECTION_REGISTRY_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_MEDIA_COLLECTION_REGISTRY, MediaCollectionRegistryClass)) - -typedef struct _MediaCollectionRegistry MediaCollectionRegistry; -typedef struct _MediaCollectionRegistryClass MediaCollectionRegistryClass; -#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL))) -#define _media_collection_registry_unref0(var) ((var == NULL) ? NULL : (var = (media_collection_registry_unref (var), NULL))) - -#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 _data_collection_unref0(var) ((var == NULL) ? NULL : (var = (data_collection_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 FOLDERS_TYPE_ROOT (folders_root_get_type ()) -#define FOLDERS_ROOT(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), FOLDERS_TYPE_ROOT, FoldersRoot)) -#define FOLDERS_ROOT_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), FOLDERS_TYPE_ROOT, FoldersRootClass)) -#define FOLDERS_IS_ROOT(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), FOLDERS_TYPE_ROOT)) -#define FOLDERS_IS_ROOT_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), FOLDERS_TYPE_ROOT)) -#define FOLDERS_ROOT_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), FOLDERS_TYPE_ROOT, FoldersRootClass)) - -typedef struct _FoldersRoot FoldersRoot; -typedef struct _FoldersRootClass FoldersRootClass; - -#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 _g_free0(var) (var = (g_free (var), NULL)) - -#define TYPE_DATA_SOURCE (data_source_get_type ()) -#define DATA_SOURCE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_DATA_SOURCE, DataSource)) -#define DATA_SOURCE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_DATA_SOURCE, DataSourceClass)) -#define IS_DATA_SOURCE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_DATA_SOURCE)) -#define IS_DATA_SOURCE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_DATA_SOURCE)) -#define DATA_SOURCE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_DATA_SOURCE, DataSourceClass)) - -typedef struct _DataSource DataSource; -typedef struct _DataSourceClass DataSourceClass; - -#define TYPE_THUMBNAIL_SOURCE (thumbnail_source_get_type ()) -#define THUMBNAIL_SOURCE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_THUMBNAIL_SOURCE, ThumbnailSource)) -#define THUMBNAIL_SOURCE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_THUMBNAIL_SOURCE, ThumbnailSourceClass)) -#define IS_THUMBNAIL_SOURCE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_THUMBNAIL_SOURCE)) -#define IS_THUMBNAIL_SOURCE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_THUMBNAIL_SOURCE)) -#define THUMBNAIL_SOURCE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_THUMBNAIL_SOURCE, ThumbnailSourceClass)) - -typedef struct _ThumbnailSource ThumbnailSource; -typedef struct _ThumbnailSourceClass ThumbnailSourceClass; - -#define TYPE_MEDIA_SOURCE (media_source_get_type ()) -#define MEDIA_SOURCE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_MEDIA_SOURCE, MediaSource)) -#define MEDIA_SOURCE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_MEDIA_SOURCE, MediaSourceClass)) -#define IS_MEDIA_SOURCE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_MEDIA_SOURCE)) -#define IS_MEDIA_SOURCE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_MEDIA_SOURCE)) -#define MEDIA_SOURCE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_MEDIA_SOURCE, MediaSourceClass)) - -typedef struct _MediaSource MediaSource; -typedef struct _MediaSourceClass MediaSourceClass; - -#define 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; - -#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; -typedef struct _SidebarGroupingPrivate SidebarGroupingPrivate; - -#define SIDEBAR_TYPE_EMPHASIZABLE_ENTRY (sidebar_emphasizable_entry_get_type ()) -#define SIDEBAR_EMPHASIZABLE_ENTRY(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), SIDEBAR_TYPE_EMPHASIZABLE_ENTRY, SidebarEmphasizableEntry)) -#define SIDEBAR_IS_EMPHASIZABLE_ENTRY(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), SIDEBAR_TYPE_EMPHASIZABLE_ENTRY)) -#define SIDEBAR_EMPHASIZABLE_ENTRY_GET_INTERFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE ((obj), SIDEBAR_TYPE_EMPHASIZABLE_ENTRY, SidebarEmphasizableEntryIface)) - -typedef struct _SidebarEmphasizableEntry SidebarEmphasizableEntry; -typedef struct _SidebarEmphasizableEntryIface SidebarEmphasizableEntryIface; -typedef struct _SidebarHeaderPrivate SidebarHeaderPrivate; -typedef struct _FoldersRootPrivate FoldersRootPrivate; - -#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; -typedef struct _FoldersSidebarEntryPrivate FoldersSidebarEntryPrivate; - -#define TYPE_CHECKERBOARD_PAGE (checkerboard_page_get_type ()) -#define CHECKERBOARD_PAGE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_CHECKERBOARD_PAGE, CheckerboardPage)) -#define CHECKERBOARD_PAGE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_CHECKERBOARD_PAGE, CheckerboardPageClass)) -#define IS_CHECKERBOARD_PAGE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_CHECKERBOARD_PAGE)) -#define IS_CHECKERBOARD_PAGE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_CHECKERBOARD_PAGE)) -#define CHECKERBOARD_PAGE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_CHECKERBOARD_PAGE, CheckerboardPageClass)) - -typedef struct _CheckerboardPage CheckerboardPage; -typedef struct _CheckerboardPageClass CheckerboardPageClass; - -#define TYPE_MEDIA_PAGE (media_page_get_type ()) -#define MEDIA_PAGE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_MEDIA_PAGE, MediaPage)) -#define MEDIA_PAGE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_MEDIA_PAGE, MediaPageClass)) -#define IS_MEDIA_PAGE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_MEDIA_PAGE)) -#define IS_MEDIA_PAGE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_MEDIA_PAGE)) -#define MEDIA_PAGE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_MEDIA_PAGE, MediaPageClass)) - -typedef struct _MediaPage MediaPage; -typedef struct _MediaPageClass MediaPageClass; - -#define TYPE_COLLECTION_PAGE (collection_page_get_type ()) -#define COLLECTION_PAGE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_COLLECTION_PAGE, CollectionPage)) -#define COLLECTION_PAGE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_COLLECTION_PAGE, CollectionPageClass)) -#define IS_COLLECTION_PAGE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_COLLECTION_PAGE)) -#define IS_COLLECTION_PAGE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_COLLECTION_PAGE)) -#define COLLECTION_PAGE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_COLLECTION_PAGE, CollectionPageClass)) - -typedef struct _CollectionPage CollectionPage; -typedef struct _CollectionPageClass CollectionPageClass; - -#define FOLDERS_TYPE_PAGE (folders_page_get_type ()) -#define FOLDERS_PAGE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), FOLDERS_TYPE_PAGE, FoldersPage)) -#define FOLDERS_PAGE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), FOLDERS_TYPE_PAGE, FoldersPageClass)) -#define FOLDERS_IS_PAGE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), FOLDERS_TYPE_PAGE)) -#define FOLDERS_IS_PAGE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), FOLDERS_TYPE_PAGE)) -#define FOLDERS_PAGE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), FOLDERS_TYPE_PAGE, FoldersPageClass)) - -typedef struct _FoldersPage FoldersPage; -typedef struct _FoldersPageClass FoldersPageClass; -#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 _FoldersBranch { - SidebarBranch parent_instance; - FoldersBranchPrivate * priv; -}; - -struct _FoldersBranchClass { - SidebarBranchClass parent_class; -}; - -struct _FoldersBranchPrivate { - GeeHashMap* entries; - GFile* home_dir; -}; - -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 _SidebarExpandableEntryIface { - GTypeInterface parent_iface; - gboolean (*expand_on_select) (SidebarExpandableEntry* self); -}; - -struct _SidebarRenameableEntryIface { - GTypeInterface parent_iface; - void (*rename) (SidebarRenameableEntry* self, const gchar* new_name); - gboolean (*is_user_renameable) (SidebarRenameableEntry* self); -}; - -struct _SidebarGrouping { - GObject parent_instance; - SidebarGroupingPrivate * priv; -}; - -struct _SidebarGroupingClass { - GObjectClass parent_class; -}; - -struct _SidebarEmphasizableEntryIface { - GTypeInterface parent_iface; - gboolean (*is_emphasized) (SidebarEmphasizableEntry* self); -}; - -struct _SidebarHeader { - SidebarGrouping parent_instance; - SidebarHeaderPrivate * priv; -}; - -struct _SidebarHeaderClass { - SidebarGroupingClass parent_class; -}; - -struct _FoldersRoot { - SidebarHeader parent_instance; - FoldersRootPrivate * priv; -}; - -struct _FoldersRootClass { - SidebarHeaderClass parent_class; -}; - -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 _FoldersSidebarEntry { - SidebarSimplePageEntry parent_instance; - FoldersSidebarEntryPrivate * priv; -}; - -struct _FoldersSidebarEntryClass { - SidebarSimplePageEntryClass parent_class; -}; - -struct _FoldersSidebarEntryPrivate { - GFile* _dir; - gchar* _collation; - gint _count; -}; - - -static gpointer folders_branch_parent_class = NULL; -static gpointer folders_root_parent_class = NULL; -static gpointer folders_sidebar_entry_parent_class = NULL; -extern gchar* folders_icon; -extern gchar* folders_have_photos_icon; -static SidebarExpandableEntryIface * folders_sidebar_entry_sidebar_expandable_entry_parent_iface = NULL; - -GType sidebar_branch_get_type (void) G_GNUC_CONST; -GType folders_branch_get_type (void) G_GNUC_CONST; -GType sidebar_simple_page_entry_get_type (void) G_GNUC_CONST; -GType folders_sidebar_entry_get_type (void) G_GNUC_CONST; -#define FOLDERS_BRANCH_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), FOLDERS_TYPE_BRANCH, FoldersBranchPrivate)) -enum { - FOLDERS_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 media_source_collection_get_type (void) G_GNUC_CONST; -gpointer media_collection_registry_ref (gpointer instance); -void media_collection_registry_unref (gpointer instance); -GParamSpec* param_spec_media_collection_registry (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags); -void value_set_media_collection_registry (GValue* value, gpointer v_object); -void value_take_media_collection_registry (GValue* value, gpointer v_object); -gpointer value_get_media_collection_registry (const GValue* value); -GType media_collection_registry_get_type (void) G_GNUC_CONST; -MediaCollectionRegistry* media_collection_registry_get_instance (void); -GeeCollection* media_collection_registry_get_all (MediaCollectionRegistry* self); -GType data_object_get_type (void) G_GNUC_CONST; -static void folders_branch_on_media_contents_altered (FoldersBranch* self, GeeIterable* added, GeeIterable* removed); -static void _folders_branch_on_media_contents_altered_data_collection_contents_altered (DataCollection* _sender, GeeIterable* added, GeeIterable* removed, gpointer self); -guint file_hash (GFile* file); -static guint _file_hash_gee_hash_data_func (gconstpointer v, gpointer self); -gboolean file_equal (GFile* a, GFile* b); -static gboolean _file_equal_gee_equal_data_func (gconstpointer a, gconstpointer b, gpointer self); -FoldersBranch* folders_branch_new (void); -FoldersBranch* folders_branch_construct (GType object_type); -FoldersRoot* folders_root_new (void); -FoldersRoot* folders_root_construct (GType object_type); -GType sidebar_grouping_get_type (void) G_GNUC_CONST; -GType sidebar_header_get_type (void) G_GNUC_CONST; -GType folders_root_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 folders_branch_comparator (SidebarEntry* a, SidebarEntry* b); -static gint _folders_branch_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); -GeeCollection* data_collection_get_all (DataCollection* self); -const gchar* folders_sidebar_entry_get_collation (FoldersSidebarEntry* self); -gchar* sidebar_simple_page_entry_get_sidebar_name (SidebarSimplePageEntry* self); -GType data_source_get_type (void) G_GNUC_CONST; -GType thumbnail_source_get_type (void) G_GNUC_CONST; -GType media_source_get_type (void) G_GNUC_CONST; -static void folders_branch_on_master_source_replaced (FoldersBranch* self, MediaSource* media_source, GFile* old_file, GFile* new_file); -static void folders_branch_remove_entry (FoldersBranch* self, GFile* file); -static void folders_branch_add_entry (FoldersBranch* self, MediaSource* media); -static void _folders_branch_on_master_source_replaced_media_source_master_replaced (MediaSource* _sender, GFile* old_file, GFile* new_file, gpointer self); -GFile* media_source_get_file (MediaSource* self); -FoldersSidebarEntry* folders_sidebar_entry_new (GFile* dir); -FoldersSidebarEntry* folders_sidebar_entry_construct (GType object_type, GFile* dir); -SidebarEntry* sidebar_branch_get_root (SidebarBranch* self); -void sidebar_branch_graft (SidebarBranch* self, SidebarEntry* parent, SidebarEntry* entry, GCompareFunc comparator); -gint folders_sidebar_entry_get_count (FoldersSidebarEntry* self); -void folders_sidebar_entry_set_count (FoldersSidebarEntry* self, gint value); -gint sidebar_branch_get_child_count (SidebarBranch* self, SidebarEntry* parent); -GFile* folders_sidebar_entry_get_dir (FoldersSidebarEntry* self); -SidebarEntry* sidebar_branch_get_parent (SidebarBranch* self, SidebarEntry* entry); -void sidebar_branch_prune (SidebarBranch* self, SidebarEntry* entry); -static void folders_branch_finalize (GObject * obj); -GType sidebar_expandable_entry_get_type (void) G_GNUC_CONST; -GType sidebar_renameable_entry_get_type (void) G_GNUC_CONST; -GType sidebar_emphasizable_entry_get_type (void) G_GNUC_CONST; -enum { - FOLDERS_ROOT_DUMMY_PROPERTY -}; -SidebarHeader* sidebar_header_new (const gchar* name, gboolean emphasized); -SidebarHeader* sidebar_header_construct (GType object_type, const gchar* name, gboolean emphasized); -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; -#define FOLDERS_SIDEBAR_ENTRY_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), FOLDERS_TYPE_SIDEBAR_ENTRY, FoldersSidebarEntryPrivate)) -enum { - FOLDERS_SIDEBAR_ENTRY_DUMMY_PROPERTY, - FOLDERS_SIDEBAR_ENTRY_DIR_PROPERTY, - FOLDERS_SIDEBAR_ENTRY_COLLATION_PROPERTY, - FOLDERS_SIDEBAR_ENTRY_COUNT_PROPERTY -}; -SidebarSimplePageEntry* sidebar_simple_page_entry_construct (GType object_type); -static void folders_sidebar_entry_set_dir (FoldersSidebarEntry* self, GFile* value); -gchar* g_utf8_collate_key_for_filename (const gchar* str, gssize len); -static void folders_sidebar_entry_set_collation (FoldersSidebarEntry* self, const gchar* value); -static gchar* folders_sidebar_entry_real_get_sidebar_name (SidebarSimplePageEntry* base); -static gchar* folders_sidebar_entry_real_get_sidebar_icon (SidebarSimplePageEntry* base); -static gchar* folders_sidebar_entry_real_to_string (SidebarSimplePageEntry* base); -static gboolean folders_sidebar_entry_real_expand_on_select (SidebarExpandableEntry* base); -static Page* folders_sidebar_entry_real_create_page (SidebarSimplePageEntry* base); -FoldersPage* folders_page_new (GFile* dir); -FoldersPage* folders_page_construct (GType object_type, GFile* dir); -GType checkerboard_page_get_type (void) G_GNUC_CONST; -GType media_page_get_type (void) G_GNUC_CONST; -GType collection_page_get_type (void) G_GNUC_CONST; -GType folders_page_get_type (void) G_GNUC_CONST; -gchar* sidebar_simple_page_entry_get_sidebar_icon (SidebarSimplePageEntry* self); -static void folders_sidebar_entry_finalize (GObject * obj); -static void _vala_folders_sidebar_entry_get_property (GObject * object, guint property_id, GValue * value, GParamSpec * pspec); -static void _vala_folders_sidebar_entry_set_property (GObject * object, guint property_id, const GValue * value, GParamSpec * pspec); - - -static void _folders_branch_on_media_contents_altered_data_collection_contents_altered (DataCollection* _sender, GeeIterable* added, GeeIterable* removed, gpointer self) { -#line 31 "/home/jens/Source/shotwell/src/folders/Branch.vala" - folders_branch_on_media_contents_altered ((FoldersBranch*) self, added, removed); -#line 564 "Branch.c" -} - - -static guint _file_hash_gee_hash_data_func (gconstpointer v, gpointer self) { - guint result; - result = file_hash ((GFile*) v); -#line 8 "/home/jens/Source/shotwell/src/folders/Branch.vala" - return result; -#line 573 "Branch.c" -} - - -static gboolean _file_equal_gee_equal_data_func (gconstpointer a, gconstpointer b, gpointer self) { - gboolean result; - result = file_equal ((GFile*) a, (GFile*) b); -#line 8 "/home/jens/Source/shotwell/src/folders/Branch.vala" - return result; -#line 582 "Branch.c" -} - - -static gint _folders_branch_comparator_gcompare_func (gconstpointer a, gconstpointer b) { - gint result; - result = folders_branch_comparator ((SidebarEntry*) a, (SidebarEntry*) b); -#line 13 "/home/jens/Source/shotwell/src/folders/Branch.vala" - return result; -#line 591 "Branch.c" -} - - -FoldersBranch* folders_branch_construct (GType object_type) { - FoldersBranch * self = NULL; - FoldersRoot* _tmp0_; - FoldersRoot* _tmp1_; - const gchar* _tmp2_; - GFile* _tmp3_; -#line 13 "/home/jens/Source/shotwell/src/folders/Branch.vala" - _tmp0_ = folders_root_new (); -#line 13 "/home/jens/Source/shotwell/src/folders/Branch.vala" - _tmp1_ = _tmp0_; -#line 13 "/home/jens/Source/shotwell/src/folders/Branch.vala" - self = (FoldersBranch*) sidebar_branch_construct (object_type, G_TYPE_CHECK_INSTANCE_CAST (_tmp1_, SIDEBAR_TYPE_ENTRY, SidebarEntry), SIDEBAR_BRANCH_OPTIONS_STARTUP_OPEN_GROUPING | SIDEBAR_BRANCH_OPTIONS_HIDE_IF_EMPTY, _folders_branch_comparator_gcompare_func, NULL); -#line 13 "/home/jens/Source/shotwell/src/folders/Branch.vala" - _g_object_unref0 (_tmp1_); -#line 18 "/home/jens/Source/shotwell/src/folders/Branch.vala" - _tmp2_ = g_get_home_dir (); -#line 18 "/home/jens/Source/shotwell/src/folders/Branch.vala" - _tmp3_ = g_file_new_for_path (_tmp2_); -#line 18 "/home/jens/Source/shotwell/src/folders/Branch.vala" - _g_object_unref0 (self->priv->home_dir); -#line 18 "/home/jens/Source/shotwell/src/folders/Branch.vala" - self->priv->home_dir = _tmp3_; -#line 617 "Branch.c" - { - GeeIterator* _sources_it = NULL; - MediaCollectionRegistry* _tmp4_; - MediaCollectionRegistry* _tmp5_; - GeeCollection* _tmp6_; - GeeCollection* _tmp7_; - GeeIterator* _tmp8_; - GeeIterator* _tmp9_; -#line 20 "/home/jens/Source/shotwell/src/folders/Branch.vala" - _tmp4_ = media_collection_registry_get_instance (); -#line 20 "/home/jens/Source/shotwell/src/folders/Branch.vala" - _tmp5_ = _tmp4_; -#line 20 "/home/jens/Source/shotwell/src/folders/Branch.vala" - _tmp6_ = media_collection_registry_get_all (_tmp5_); -#line 20 "/home/jens/Source/shotwell/src/folders/Branch.vala" - _tmp7_ = _tmp6_; -#line 20 "/home/jens/Source/shotwell/src/folders/Branch.vala" - _tmp8_ = gee_iterable_iterator (G_TYPE_CHECK_INSTANCE_CAST (_tmp7_, GEE_TYPE_ITERABLE, GeeIterable)); -#line 20 "/home/jens/Source/shotwell/src/folders/Branch.vala" - _tmp9_ = _tmp8_; -#line 20 "/home/jens/Source/shotwell/src/folders/Branch.vala" - _g_object_unref0 (_tmp7_); -#line 20 "/home/jens/Source/shotwell/src/folders/Branch.vala" - _media_collection_registry_unref0 (_tmp5_); -#line 20 "/home/jens/Source/shotwell/src/folders/Branch.vala" - _sources_it = _tmp9_; -#line 20 "/home/jens/Source/shotwell/src/folders/Branch.vala" - while (TRUE) { -#line 646 "Branch.c" - GeeIterator* _tmp10_; - gboolean _tmp11_; - MediaSourceCollection* sources = NULL; - GeeIterator* _tmp12_; - gpointer _tmp13_; - MediaSourceCollection* _tmp14_; - GeeCollection* _tmp15_; - GeeCollection* _tmp16_; - MediaSourceCollection* _tmp17_; -#line 20 "/home/jens/Source/shotwell/src/folders/Branch.vala" - _tmp10_ = _sources_it; -#line 20 "/home/jens/Source/shotwell/src/folders/Branch.vala" - _tmp11_ = gee_iterator_next (_tmp10_); -#line 20 "/home/jens/Source/shotwell/src/folders/Branch.vala" - if (!_tmp11_) { -#line 20 "/home/jens/Source/shotwell/src/folders/Branch.vala" - break; -#line 664 "Branch.c" - } -#line 20 "/home/jens/Source/shotwell/src/folders/Branch.vala" - _tmp12_ = _sources_it; -#line 20 "/home/jens/Source/shotwell/src/folders/Branch.vala" - _tmp13_ = gee_iterator_get (_tmp12_); -#line 20 "/home/jens/Source/shotwell/src/folders/Branch.vala" - sources = (MediaSourceCollection*) _tmp13_; -#line 22 "/home/jens/Source/shotwell/src/folders/Branch.vala" - _tmp14_ = sources; -#line 22 "/home/jens/Source/shotwell/src/folders/Branch.vala" - _tmp15_ = data_collection_get_all (G_TYPE_CHECK_INSTANCE_CAST (_tmp14_, TYPE_DATA_COLLECTION, DataCollection)); -#line 22 "/home/jens/Source/shotwell/src/folders/Branch.vala" - _tmp16_ = _tmp15_; -#line 22 "/home/jens/Source/shotwell/src/folders/Branch.vala" - folders_branch_on_media_contents_altered (self, G_TYPE_CHECK_INSTANCE_CAST (_tmp16_, GEE_TYPE_ITERABLE, GeeIterable), NULL); -#line 22 "/home/jens/Source/shotwell/src/folders/Branch.vala" - _g_object_unref0 (_tmp16_); -#line 25 "/home/jens/Source/shotwell/src/folders/Branch.vala" - _tmp17_ = sources; -#line 25 "/home/jens/Source/shotwell/src/folders/Branch.vala" - g_signal_connect_object (G_TYPE_CHECK_INSTANCE_CAST (_tmp17_, TYPE_DATA_COLLECTION, DataCollection), "contents-altered", (GCallback) _folders_branch_on_media_contents_altered_data_collection_contents_altered, self, 0); -#line 20 "/home/jens/Source/shotwell/src/folders/Branch.vala" - _data_collection_unref0 (sources); -#line 688 "Branch.c" - } -#line 20 "/home/jens/Source/shotwell/src/folders/Branch.vala" - _g_object_unref0 (_sources_it); -#line 692 "Branch.c" - } -#line 12 "/home/jens/Source/shotwell/src/folders/Branch.vala" - return self; -#line 696 "Branch.c" -} - - -FoldersBranch* folders_branch_new (void) { -#line 12 "/home/jens/Source/shotwell/src/folders/Branch.vala" - return folders_branch_construct (FOLDERS_TYPE_BRANCH); -#line 703 "Branch.c" -} - - -static gint folders_branch_comparator (SidebarEntry* a, SidebarEntry* b) { - gint result = 0; - SidebarEntry* _tmp0_; - SidebarEntry* _tmp1_; - gint coll_key_equality = 0; - GCompareFunc _tmp2_; - SidebarEntry* _tmp3_; - const gchar* _tmp4_; - const gchar* _tmp5_; - SidebarEntry* _tmp6_; - const gchar* _tmp7_; - const gchar* _tmp8_; - gint _tmp9_; - gint _tmp10_; -#line 34 "/home/jens/Source/shotwell/src/folders/Branch.vala" - g_return_val_if_fail (SIDEBAR_IS_ENTRY (a), 0); -#line 34 "/home/jens/Source/shotwell/src/folders/Branch.vala" - g_return_val_if_fail (SIDEBAR_IS_ENTRY (b), 0); -#line 35 "/home/jens/Source/shotwell/src/folders/Branch.vala" - _tmp0_ = a; -#line 35 "/home/jens/Source/shotwell/src/folders/Branch.vala" - _tmp1_ = b; -#line 35 "/home/jens/Source/shotwell/src/folders/Branch.vala" - if (_tmp0_ == _tmp1_) { -#line 36 "/home/jens/Source/shotwell/src/folders/Branch.vala" - result = 0; -#line 36 "/home/jens/Source/shotwell/src/folders/Branch.vala" - return result; -#line 735 "Branch.c" - } -#line 38 "/home/jens/Source/shotwell/src/folders/Branch.vala" - _tmp2_ = g_strcmp0; -#line 38 "/home/jens/Source/shotwell/src/folders/Branch.vala" - _tmp3_ = a; -#line 38 "/home/jens/Source/shotwell/src/folders/Branch.vala" - _tmp4_ = folders_sidebar_entry_get_collation (G_TYPE_CHECK_INSTANCE_CAST (_tmp3_, FOLDERS_TYPE_SIDEBAR_ENTRY, FoldersSidebarEntry)); -#line 38 "/home/jens/Source/shotwell/src/folders/Branch.vala" - _tmp5_ = _tmp4_; -#line 38 "/home/jens/Source/shotwell/src/folders/Branch.vala" - _tmp6_ = b; -#line 38 "/home/jens/Source/shotwell/src/folders/Branch.vala" - _tmp7_ = folders_sidebar_entry_get_collation (G_TYPE_CHECK_INSTANCE_CAST (_tmp6_, FOLDERS_TYPE_SIDEBAR_ENTRY, FoldersSidebarEntry)); -#line 38 "/home/jens/Source/shotwell/src/folders/Branch.vala" - _tmp8_ = _tmp7_; -#line 38 "/home/jens/Source/shotwell/src/folders/Branch.vala" - _tmp9_ = _tmp2_ (_tmp5_, _tmp8_); -#line 38 "/home/jens/Source/shotwell/src/folders/Branch.vala" - coll_key_equality = _tmp9_; -#line 41 "/home/jens/Source/shotwell/src/folders/Branch.vala" - _tmp10_ = coll_key_equality; -#line 41 "/home/jens/Source/shotwell/src/folders/Branch.vala" - if (_tmp10_ == 0) { -#line 759 "Branch.c" - GCompareFunc _tmp11_; - SidebarEntry* _tmp12_; - gchar* _tmp13_; - gchar* _tmp14_; - SidebarEntry* _tmp15_; - gchar* _tmp16_; - gchar* _tmp17_; - gint _tmp18_; - gint _tmp19_; -#line 44 "/home/jens/Source/shotwell/src/folders/Branch.vala" - _tmp11_ = g_strcmp0; -#line 44 "/home/jens/Source/shotwell/src/folders/Branch.vala" - _tmp12_ = a; -#line 44 "/home/jens/Source/shotwell/src/folders/Branch.vala" - _tmp13_ = sidebar_simple_page_entry_get_sidebar_name (G_TYPE_CHECK_INSTANCE_CAST (G_TYPE_CHECK_INSTANCE_CAST (_tmp12_, FOLDERS_TYPE_SIDEBAR_ENTRY, FoldersSidebarEntry), SIDEBAR_TYPE_SIMPLE_PAGE_ENTRY, SidebarSimplePageEntry)); -#line 44 "/home/jens/Source/shotwell/src/folders/Branch.vala" - _tmp14_ = _tmp13_; -#line 44 "/home/jens/Source/shotwell/src/folders/Branch.vala" - _tmp15_ = b; -#line 44 "/home/jens/Source/shotwell/src/folders/Branch.vala" - _tmp16_ = sidebar_simple_page_entry_get_sidebar_name (G_TYPE_CHECK_INSTANCE_CAST (G_TYPE_CHECK_INSTANCE_CAST (_tmp15_, FOLDERS_TYPE_SIDEBAR_ENTRY, FoldersSidebarEntry), SIDEBAR_TYPE_SIMPLE_PAGE_ENTRY, SidebarSimplePageEntry)); -#line 44 "/home/jens/Source/shotwell/src/folders/Branch.vala" - _tmp17_ = _tmp16_; -#line 44 "/home/jens/Source/shotwell/src/folders/Branch.vala" - _tmp18_ = _tmp11_ (_tmp14_, _tmp17_); -#line 44 "/home/jens/Source/shotwell/src/folders/Branch.vala" - _tmp19_ = _tmp18_; -#line 44 "/home/jens/Source/shotwell/src/folders/Branch.vala" - _g_free0 (_tmp17_); -#line 44 "/home/jens/Source/shotwell/src/folders/Branch.vala" - _g_free0 (_tmp14_); -#line 44 "/home/jens/Source/shotwell/src/folders/Branch.vala" - result = _tmp19_; -#line 44 "/home/jens/Source/shotwell/src/folders/Branch.vala" - return result; -#line 795 "Branch.c" - } -#line 48 "/home/jens/Source/shotwell/src/folders/Branch.vala" - result = coll_key_equality; -#line 48 "/home/jens/Source/shotwell/src/folders/Branch.vala" - return result; -#line 801 "Branch.c" -} - - -static void folders_branch_on_master_source_replaced (FoldersBranch* self, MediaSource* media_source, GFile* old_file, GFile* new_file) { - GFile* _tmp0_; - MediaSource* _tmp1_; -#line 51 "/home/jens/Source/shotwell/src/folders/Branch.vala" - g_return_if_fail (FOLDERS_IS_BRANCH (self)); -#line 51 "/home/jens/Source/shotwell/src/folders/Branch.vala" - g_return_if_fail (IS_MEDIA_SOURCE (media_source)); -#line 51 "/home/jens/Source/shotwell/src/folders/Branch.vala" - g_return_if_fail (G_IS_FILE (old_file)); -#line 51 "/home/jens/Source/shotwell/src/folders/Branch.vala" - g_return_if_fail (G_IS_FILE (new_file)); -#line 52 "/home/jens/Source/shotwell/src/folders/Branch.vala" - _tmp0_ = old_file; -#line 52 "/home/jens/Source/shotwell/src/folders/Branch.vala" - folders_branch_remove_entry (self, _tmp0_); -#line 53 "/home/jens/Source/shotwell/src/folders/Branch.vala" - _tmp1_ = media_source; -#line 53 "/home/jens/Source/shotwell/src/folders/Branch.vala" - folders_branch_add_entry (self, _tmp1_); -#line 824 "Branch.c" -} - - -static void _folders_branch_on_master_source_replaced_media_source_master_replaced (MediaSource* _sender, GFile* old_file, GFile* new_file, gpointer self) { -#line 60 "/home/jens/Source/shotwell/src/folders/Branch.vala" - folders_branch_on_master_source_replaced ((FoldersBranch*) self, _sender, old_file, new_file); -#line 831 "Branch.c" -} - - -static void folders_branch_on_media_contents_altered (FoldersBranch* self, GeeIterable* added, GeeIterable* removed) { - GeeIterable* _tmp0_; - GeeIterable* _tmp9_; -#line 56 "/home/jens/Source/shotwell/src/folders/Branch.vala" - g_return_if_fail (FOLDERS_IS_BRANCH (self)); -#line 56 "/home/jens/Source/shotwell/src/folders/Branch.vala" - g_return_if_fail ((added == NULL) || GEE_IS_ITERABLE (added)); -#line 56 "/home/jens/Source/shotwell/src/folders/Branch.vala" - g_return_if_fail ((removed == NULL) || GEE_IS_ITERABLE (removed)); -#line 57 "/home/jens/Source/shotwell/src/folders/Branch.vala" - _tmp0_ = added; -#line 57 "/home/jens/Source/shotwell/src/folders/Branch.vala" - if (_tmp0_ != NULL) { -#line 848 "Branch.c" - { - GeeIterator* _object_it = NULL; - GeeIterable* _tmp1_; - GeeIterator* _tmp2_; -#line 58 "/home/jens/Source/shotwell/src/folders/Branch.vala" - _tmp1_ = added; -#line 58 "/home/jens/Source/shotwell/src/folders/Branch.vala" - _tmp2_ = gee_iterable_iterator (_tmp1_); -#line 58 "/home/jens/Source/shotwell/src/folders/Branch.vala" - _object_it = _tmp2_; -#line 58 "/home/jens/Source/shotwell/src/folders/Branch.vala" - while (TRUE) { -#line 861 "Branch.c" - GeeIterator* _tmp3_; - gboolean _tmp4_; - DataObject* object = NULL; - GeeIterator* _tmp5_; - gpointer _tmp6_; - DataObject* _tmp7_; - DataObject* _tmp8_; -#line 58 "/home/jens/Source/shotwell/src/folders/Branch.vala" - _tmp3_ = _object_it; -#line 58 "/home/jens/Source/shotwell/src/folders/Branch.vala" - _tmp4_ = gee_iterator_next (_tmp3_); -#line 58 "/home/jens/Source/shotwell/src/folders/Branch.vala" - if (!_tmp4_) { -#line 58 "/home/jens/Source/shotwell/src/folders/Branch.vala" - break; -#line 877 "Branch.c" - } -#line 58 "/home/jens/Source/shotwell/src/folders/Branch.vala" - _tmp5_ = _object_it; -#line 58 "/home/jens/Source/shotwell/src/folders/Branch.vala" - _tmp6_ = gee_iterator_get (_tmp5_); -#line 58 "/home/jens/Source/shotwell/src/folders/Branch.vala" - object = (DataObject*) _tmp6_; -#line 59 "/home/jens/Source/shotwell/src/folders/Branch.vala" - _tmp7_ = object; -#line 59 "/home/jens/Source/shotwell/src/folders/Branch.vala" - folders_branch_add_entry (self, G_TYPE_CHECK_INSTANCE_CAST (_tmp7_, TYPE_MEDIA_SOURCE, MediaSource)); -#line 60 "/home/jens/Source/shotwell/src/folders/Branch.vala" - _tmp8_ = object; -#line 60 "/home/jens/Source/shotwell/src/folders/Branch.vala" - g_signal_connect_object (G_TYPE_CHECK_INSTANCE_CAST (_tmp8_, TYPE_MEDIA_SOURCE, MediaSource), "master-replaced", (GCallback) _folders_branch_on_master_source_replaced_media_source_master_replaced, self, 0); -#line 58 "/home/jens/Source/shotwell/src/folders/Branch.vala" - _g_object_unref0 (object); -#line 895 "Branch.c" - } -#line 58 "/home/jens/Source/shotwell/src/folders/Branch.vala" - _g_object_unref0 (_object_it); -#line 899 "Branch.c" - } - } -#line 64 "/home/jens/Source/shotwell/src/folders/Branch.vala" - _tmp9_ = removed; -#line 64 "/home/jens/Source/shotwell/src/folders/Branch.vala" - if (_tmp9_ != NULL) { -#line 906 "Branch.c" - { - GeeIterator* _object_it = NULL; - GeeIterable* _tmp10_; - GeeIterator* _tmp11_; -#line 65 "/home/jens/Source/shotwell/src/folders/Branch.vala" - _tmp10_ = removed; -#line 65 "/home/jens/Source/shotwell/src/folders/Branch.vala" - _tmp11_ = gee_iterable_iterator (_tmp10_); -#line 65 "/home/jens/Source/shotwell/src/folders/Branch.vala" - _object_it = _tmp11_; -#line 65 "/home/jens/Source/shotwell/src/folders/Branch.vala" - while (TRUE) { -#line 919 "Branch.c" - GeeIterator* _tmp12_; - gboolean _tmp13_; - DataObject* object = NULL; - GeeIterator* _tmp14_; - gpointer _tmp15_; - DataObject* _tmp16_; - GFile* _tmp17_; - GFile* _tmp18_; - DataObject* _tmp19_; - guint _tmp20_; -#line 65 "/home/jens/Source/shotwell/src/folders/Branch.vala" - _tmp12_ = _object_it; -#line 65 "/home/jens/Source/shotwell/src/folders/Branch.vala" - _tmp13_ = gee_iterator_next (_tmp12_); -#line 65 "/home/jens/Source/shotwell/src/folders/Branch.vala" - if (!_tmp13_) { -#line 65 "/home/jens/Source/shotwell/src/folders/Branch.vala" - break; -#line 938 "Branch.c" - } -#line 65 "/home/jens/Source/shotwell/src/folders/Branch.vala" - _tmp14_ = _object_it; -#line 65 "/home/jens/Source/shotwell/src/folders/Branch.vala" - _tmp15_ = gee_iterator_get (_tmp14_); -#line 65 "/home/jens/Source/shotwell/src/folders/Branch.vala" - object = (DataObject*) _tmp15_; -#line 66 "/home/jens/Source/shotwell/src/folders/Branch.vala" - _tmp16_ = object; -#line 66 "/home/jens/Source/shotwell/src/folders/Branch.vala" - _tmp17_ = media_source_get_file (G_TYPE_CHECK_INSTANCE_CAST (_tmp16_, TYPE_MEDIA_SOURCE, MediaSource)); -#line 66 "/home/jens/Source/shotwell/src/folders/Branch.vala" - _tmp18_ = _tmp17_; -#line 66 "/home/jens/Source/shotwell/src/folders/Branch.vala" - folders_branch_remove_entry (self, _tmp18_); -#line 66 "/home/jens/Source/shotwell/src/folders/Branch.vala" - _g_object_unref0 (_tmp18_); -#line 67 "/home/jens/Source/shotwell/src/folders/Branch.vala" - _tmp19_ = object; -#line 67 "/home/jens/Source/shotwell/src/folders/Branch.vala" - g_signal_parse_name ("master-replaced", TYPE_MEDIA_SOURCE, &_tmp20_, NULL, FALSE); -#line 67 "/home/jens/Source/shotwell/src/folders/Branch.vala" - g_signal_handlers_disconnect_matched (G_TYPE_CHECK_INSTANCE_CAST (_tmp19_, TYPE_MEDIA_SOURCE, MediaSource), G_SIGNAL_MATCH_ID | G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA, _tmp20_, 0, NULL, (GCallback) _folders_branch_on_master_source_replaced_media_source_master_replaced, self); -#line 65 "/home/jens/Source/shotwell/src/folders/Branch.vala" - _g_object_unref0 (object); -#line 964 "Branch.c" - } -#line 65 "/home/jens/Source/shotwell/src/folders/Branch.vala" - _g_object_unref0 (_object_it); -#line 968 "Branch.c" - } - } -} - - -static gpointer _g_object_ref0 (gpointer self) { -#line 96 "/home/jens/Source/shotwell/src/folders/Branch.vala" - return self ? g_object_ref (self) : NULL; -#line 977 "Branch.c" -} - - -static void folders_branch_add_entry (FoldersBranch* self, MediaSource* media) { - GFile* file = NULL; - MediaSource* _tmp0_; - GFile* _tmp1_; - GeeArrayList* elements = NULL; - GeeArrayList* _tmp2_; - GFile* parent = NULL; - GFile* _tmp3_; - GFile* _tmp4_; - FoldersSidebarEntry* parent_entry = NULL; -#line 72 "/home/jens/Source/shotwell/src/folders/Branch.vala" - g_return_if_fail (FOLDERS_IS_BRANCH (self)); -#line 72 "/home/jens/Source/shotwell/src/folders/Branch.vala" - g_return_if_fail (IS_MEDIA_SOURCE (media)); -#line 73 "/home/jens/Source/shotwell/src/folders/Branch.vala" - _tmp0_ = media; -#line 73 "/home/jens/Source/shotwell/src/folders/Branch.vala" - _tmp1_ = media_source_get_file (_tmp0_); -#line 73 "/home/jens/Source/shotwell/src/folders/Branch.vala" - file = _tmp1_; -#line 75 "/home/jens/Source/shotwell/src/folders/Branch.vala" - _tmp2_ = gee_array_list_new (g_file_get_type (), (GBoxedCopyFunc) g_object_ref, (GDestroyNotify) g_object_unref, NULL, NULL, NULL); -#line 75 "/home/jens/Source/shotwell/src/folders/Branch.vala" - elements = _tmp2_; -#line 78 "/home/jens/Source/shotwell/src/folders/Branch.vala" - _tmp3_ = file; -#line 78 "/home/jens/Source/shotwell/src/folders/Branch.vala" - _tmp4_ = g_file_get_parent (_tmp3_); -#line 78 "/home/jens/Source/shotwell/src/folders/Branch.vala" - parent = _tmp4_; -#line 79 "/home/jens/Source/shotwell/src/folders/Branch.vala" - while (TRUE) { -#line 1013 "Branch.c" - GFile* _tmp5_; - GFile* _tmp6_; - GFile* _tmp7_; - GFile* _tmp8_; - GFile* _tmp9_; - gboolean _tmp10_; - gboolean _tmp11_; - GeeArrayList* _tmp12_; - GFile* _tmp13_; - GFile* _tmp14_; - GFile* _tmp15_; -#line 79 "/home/jens/Source/shotwell/src/folders/Branch.vala" - _tmp5_ = parent; -#line 79 "/home/jens/Source/shotwell/src/folders/Branch.vala" - if (!(_tmp5_ != NULL)) { -#line 79 "/home/jens/Source/shotwell/src/folders/Branch.vala" - break; -#line 1031 "Branch.c" - } -#line 81 "/home/jens/Source/shotwell/src/folders/Branch.vala" - _tmp6_ = parent; -#line 81 "/home/jens/Source/shotwell/src/folders/Branch.vala" - _tmp7_ = self->priv->home_dir; -#line 81 "/home/jens/Source/shotwell/src/folders/Branch.vala" - _tmp8_ = g_file_get_parent (_tmp7_); -#line 81 "/home/jens/Source/shotwell/src/folders/Branch.vala" - _tmp9_ = _tmp8_; -#line 81 "/home/jens/Source/shotwell/src/folders/Branch.vala" - _tmp10_ = g_file_equal (_tmp6_, _tmp9_); -#line 81 "/home/jens/Source/shotwell/src/folders/Branch.vala" - _tmp11_ = _tmp10_; -#line 81 "/home/jens/Source/shotwell/src/folders/Branch.vala" - _g_object_unref0 (_tmp9_); -#line 81 "/home/jens/Source/shotwell/src/folders/Branch.vala" - if (_tmp11_) { -#line 82 "/home/jens/Source/shotwell/src/folders/Branch.vala" - break; -#line 1051 "Branch.c" - } -#line 84 "/home/jens/Source/shotwell/src/folders/Branch.vala" - _tmp12_ = elements; -#line 84 "/home/jens/Source/shotwell/src/folders/Branch.vala" - _tmp13_ = parent; -#line 84 "/home/jens/Source/shotwell/src/folders/Branch.vala" - gee_abstract_collection_add (G_TYPE_CHECK_INSTANCE_CAST (_tmp12_, GEE_TYPE_ABSTRACT_COLLECTION, GeeAbstractCollection), _tmp13_); -#line 86 "/home/jens/Source/shotwell/src/folders/Branch.vala" - _tmp14_ = parent; -#line 86 "/home/jens/Source/shotwell/src/folders/Branch.vala" - _tmp15_ = g_file_get_parent (_tmp14_); -#line 86 "/home/jens/Source/shotwell/src/folders/Branch.vala" - _g_object_unref0 (parent); -#line 86 "/home/jens/Source/shotwell/src/folders/Branch.vala" - parent = _tmp15_; -#line 1067 "Branch.c" - } -#line 91 "/home/jens/Source/shotwell/src/folders/Branch.vala" - parent_entry = NULL; -#line 1071 "Branch.c" - { - gint ctr = 0; - GeeArrayList* _tmp16_; - gint _tmp17_; - gint _tmp18_; -#line 92 "/home/jens/Source/shotwell/src/folders/Branch.vala" - _tmp16_ = elements; -#line 92 "/home/jens/Source/shotwell/src/folders/Branch.vala" - _tmp17_ = gee_abstract_collection_get_size (G_TYPE_CHECK_INSTANCE_CAST (_tmp16_, GEE_TYPE_ABSTRACT_COLLECTION, GeeAbstractCollection)); -#line 92 "/home/jens/Source/shotwell/src/folders/Branch.vala" - _tmp18_ = _tmp17_; -#line 92 "/home/jens/Source/shotwell/src/folders/Branch.vala" - ctr = _tmp18_ - 1; -#line 1085 "Branch.c" - { - gboolean _tmp19_ = FALSE; -#line 92 "/home/jens/Source/shotwell/src/folders/Branch.vala" - _tmp19_ = TRUE; -#line 92 "/home/jens/Source/shotwell/src/folders/Branch.vala" - while (TRUE) { -#line 1092 "Branch.c" - gint _tmp21_; - GFile* parent_dir = NULL; - GeeArrayList* _tmp22_; - gint _tmp23_; - gpointer _tmp24_; - FoldersSidebarEntry* old_parent_entry = NULL; - FoldersSidebarEntry* _tmp25_; - FoldersSidebarEntry* _tmp26_; - GeeHashMap* _tmp27_; - GFile* _tmp28_; - gpointer _tmp29_; - FoldersSidebarEntry* _tmp30_; - gint _tmp42_; -#line 92 "/home/jens/Source/shotwell/src/folders/Branch.vala" - if (!_tmp19_) { -#line 1108 "Branch.c" - gint _tmp20_; -#line 92 "/home/jens/Source/shotwell/src/folders/Branch.vala" - _tmp20_ = ctr; -#line 92 "/home/jens/Source/shotwell/src/folders/Branch.vala" - ctr = _tmp20_ - 1; -#line 1114 "Branch.c" - } -#line 92 "/home/jens/Source/shotwell/src/folders/Branch.vala" - _tmp19_ = FALSE; -#line 92 "/home/jens/Source/shotwell/src/folders/Branch.vala" - _tmp21_ = ctr; -#line 92 "/home/jens/Source/shotwell/src/folders/Branch.vala" - if (!(_tmp21_ >= 0)) { -#line 92 "/home/jens/Source/shotwell/src/folders/Branch.vala" - break; -#line 1124 "Branch.c" - } -#line 93 "/home/jens/Source/shotwell/src/folders/Branch.vala" - _tmp22_ = elements; -#line 93 "/home/jens/Source/shotwell/src/folders/Branch.vala" - _tmp23_ = ctr; -#line 93 "/home/jens/Source/shotwell/src/folders/Branch.vala" - _tmp24_ = gee_abstract_list_get (G_TYPE_CHECK_INSTANCE_CAST (_tmp22_, GEE_TYPE_ABSTRACT_LIST, GeeAbstractList), _tmp23_); -#line 93 "/home/jens/Source/shotwell/src/folders/Branch.vala" - parent_dir = (GFile*) _tmp24_; -#line 96 "/home/jens/Source/shotwell/src/folders/Branch.vala" - _tmp25_ = parent_entry; -#line 96 "/home/jens/Source/shotwell/src/folders/Branch.vala" - _tmp26_ = _g_object_ref0 (_tmp25_); -#line 96 "/home/jens/Source/shotwell/src/folders/Branch.vala" - old_parent_entry = _tmp26_; -#line 98 "/home/jens/Source/shotwell/src/folders/Branch.vala" - _tmp27_ = self->priv->entries; -#line 98 "/home/jens/Source/shotwell/src/folders/Branch.vala" - _tmp28_ = parent_dir; -#line 98 "/home/jens/Source/shotwell/src/folders/Branch.vala" - _tmp29_ = gee_abstract_map_get (G_TYPE_CHECK_INSTANCE_CAST (_tmp27_, GEE_TYPE_ABSTRACT_MAP, GeeAbstractMap), _tmp28_); -#line 98 "/home/jens/Source/shotwell/src/folders/Branch.vala" - _g_object_unref0 (parent_entry); -#line 98 "/home/jens/Source/shotwell/src/folders/Branch.vala" - parent_entry = (FoldersSidebarEntry*) _tmp29_; -#line 99 "/home/jens/Source/shotwell/src/folders/Branch.vala" - _tmp30_ = parent_entry; -#line 99 "/home/jens/Source/shotwell/src/folders/Branch.vala" - if (_tmp30_ == NULL) { -#line 1154 "Branch.c" - GFile* _tmp31_; - FoldersSidebarEntry* _tmp32_; - GeeHashMap* _tmp33_; - GFile* _tmp34_; - FoldersSidebarEntry* _tmp35_; - SidebarEntry* _tmp36_ = NULL; - FoldersSidebarEntry* _tmp37_; - FoldersSidebarEntry* _tmp41_; -#line 100 "/home/jens/Source/shotwell/src/folders/Branch.vala" - _tmp31_ = parent_dir; -#line 100 "/home/jens/Source/shotwell/src/folders/Branch.vala" - _tmp32_ = folders_sidebar_entry_new (_tmp31_); -#line 100 "/home/jens/Source/shotwell/src/folders/Branch.vala" - _g_object_unref0 (parent_entry); -#line 100 "/home/jens/Source/shotwell/src/folders/Branch.vala" - parent_entry = _tmp32_; -#line 101 "/home/jens/Source/shotwell/src/folders/Branch.vala" - _tmp33_ = self->priv->entries; -#line 101 "/home/jens/Source/shotwell/src/folders/Branch.vala" - _tmp34_ = parent_dir; -#line 101 "/home/jens/Source/shotwell/src/folders/Branch.vala" - _tmp35_ = parent_entry; -#line 101 "/home/jens/Source/shotwell/src/folders/Branch.vala" - gee_abstract_map_set (G_TYPE_CHECK_INSTANCE_CAST (_tmp33_, GEE_TYPE_ABSTRACT_MAP, GeeAbstractMap), _tmp34_, _tmp35_); -#line 103 "/home/jens/Source/shotwell/src/folders/Branch.vala" - _tmp37_ = old_parent_entry; -#line 103 "/home/jens/Source/shotwell/src/folders/Branch.vala" - if (_tmp37_ == NULL) { -#line 1183 "Branch.c" - SidebarEntry* _tmp38_; -#line 103 "/home/jens/Source/shotwell/src/folders/Branch.vala" - _tmp38_ = sidebar_branch_get_root (G_TYPE_CHECK_INSTANCE_CAST (self, SIDEBAR_TYPE_BRANCH, SidebarBranch)); -#line 103 "/home/jens/Source/shotwell/src/folders/Branch.vala" - _g_object_unref0 (_tmp36_); -#line 103 "/home/jens/Source/shotwell/src/folders/Branch.vala" - _tmp36_ = _tmp38_; -#line 1191 "Branch.c" - } else { - FoldersSidebarEntry* _tmp39_; - SidebarEntry* _tmp40_; -#line 103 "/home/jens/Source/shotwell/src/folders/Branch.vala" - _tmp39_ = old_parent_entry; -#line 103 "/home/jens/Source/shotwell/src/folders/Branch.vala" - _tmp40_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_CAST (_tmp39_, SIDEBAR_TYPE_ENTRY, SidebarEntry)); -#line 103 "/home/jens/Source/shotwell/src/folders/Branch.vala" - _g_object_unref0 (_tmp36_); -#line 103 "/home/jens/Source/shotwell/src/folders/Branch.vala" - _tmp36_ = _tmp40_; -#line 1203 "Branch.c" - } -#line 103 "/home/jens/Source/shotwell/src/folders/Branch.vala" - _tmp41_ = parent_entry; -#line 103 "/home/jens/Source/shotwell/src/folders/Branch.vala" - sidebar_branch_graft (G_TYPE_CHECK_INSTANCE_CAST (self, SIDEBAR_TYPE_BRANCH, SidebarBranch), _tmp36_, G_TYPE_CHECK_INSTANCE_CAST (_tmp41_, SIDEBAR_TYPE_ENTRY, SidebarEntry), NULL); -#line 99 "/home/jens/Source/shotwell/src/folders/Branch.vala" - _g_object_unref0 (_tmp36_); -#line 1211 "Branch.c" - } -#line 107 "/home/jens/Source/shotwell/src/folders/Branch.vala" - _tmp42_ = ctr; -#line 107 "/home/jens/Source/shotwell/src/folders/Branch.vala" - if (_tmp42_ == 0) { -#line 1217 "Branch.c" - FoldersSidebarEntry* _tmp43_; - gint _tmp44_; - gint _tmp45_; -#line 108 "/home/jens/Source/shotwell/src/folders/Branch.vala" - _tmp43_ = parent_entry; -#line 108 "/home/jens/Source/shotwell/src/folders/Branch.vala" - _tmp44_ = folders_sidebar_entry_get_count (_tmp43_); -#line 108 "/home/jens/Source/shotwell/src/folders/Branch.vala" - _tmp45_ = _tmp44_; -#line 108 "/home/jens/Source/shotwell/src/folders/Branch.vala" - folders_sidebar_entry_set_count (_tmp43_, _tmp45_ + 1); -#line 1229 "Branch.c" - } -#line 92 "/home/jens/Source/shotwell/src/folders/Branch.vala" - _g_object_unref0 (old_parent_entry); -#line 92 "/home/jens/Source/shotwell/src/folders/Branch.vala" - _g_object_unref0 (parent_dir); -#line 1235 "Branch.c" - } - } - } -#line 72 "/home/jens/Source/shotwell/src/folders/Branch.vala" - _g_object_unref0 (parent_entry); -#line 72 "/home/jens/Source/shotwell/src/folders/Branch.vala" - _g_object_unref0 (parent); -#line 72 "/home/jens/Source/shotwell/src/folders/Branch.vala" - _g_object_unref0 (elements); -#line 72 "/home/jens/Source/shotwell/src/folders/Branch.vala" - _g_object_unref0 (file); -#line 1247 "Branch.c" -} - - -static void folders_branch_remove_entry (FoldersBranch* self, GFile* file) { - FoldersSidebarEntry* folder_entry = NULL; - GeeHashMap* _tmp0_; - GFile* _tmp1_; - GFile* _tmp2_; - GFile* _tmp3_; - gpointer _tmp4_; - FoldersSidebarEntry* _tmp5_; - FoldersSidebarEntry* _tmp6_; - FoldersSidebarEntry* _tmp7_; - gint _tmp8_; - gint _tmp9_; - gboolean _tmp10_ = FALSE; - FoldersSidebarEntry* _tmp11_; - FoldersSidebarEntry* _tmp12_; - gint _tmp13_; - gint _tmp14_; - FoldersSidebarEntry* prune_point = NULL; - FoldersSidebarEntry* _tmp17_; - FoldersSidebarEntry* _tmp18_; - FoldersSidebarEntry* _tmp19_; - FoldersSidebarEntry* _tmp40_; -#line 112 "/home/jens/Source/shotwell/src/folders/Branch.vala" - g_return_if_fail (FOLDERS_IS_BRANCH (self)); -#line 112 "/home/jens/Source/shotwell/src/folders/Branch.vala" - g_return_if_fail (G_IS_FILE (file)); -#line 113 "/home/jens/Source/shotwell/src/folders/Branch.vala" - _tmp0_ = self->priv->entries; -#line 113 "/home/jens/Source/shotwell/src/folders/Branch.vala" - _tmp1_ = file; -#line 113 "/home/jens/Source/shotwell/src/folders/Branch.vala" - _tmp2_ = g_file_get_parent (_tmp1_); -#line 113 "/home/jens/Source/shotwell/src/folders/Branch.vala" - _tmp3_ = _tmp2_; -#line 113 "/home/jens/Source/shotwell/src/folders/Branch.vala" - _tmp4_ = gee_abstract_map_get (G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, GEE_TYPE_ABSTRACT_MAP, GeeAbstractMap), _tmp3_); -#line 113 "/home/jens/Source/shotwell/src/folders/Branch.vala" - _tmp5_ = (FoldersSidebarEntry*) _tmp4_; -#line 113 "/home/jens/Source/shotwell/src/folders/Branch.vala" - _g_object_unref0 (_tmp3_); -#line 113 "/home/jens/Source/shotwell/src/folders/Branch.vala" - folder_entry = _tmp5_; -#line 114 "/home/jens/Source/shotwell/src/folders/Branch.vala" - _tmp6_ = folder_entry; -#line 114 "/home/jens/Source/shotwell/src/folders/Branch.vala" - if (_tmp6_ == NULL) { -#line 115 "/home/jens/Source/shotwell/src/folders/Branch.vala" - _g_object_unref0 (folder_entry); -#line 115 "/home/jens/Source/shotwell/src/folders/Branch.vala" - return; -#line 1301 "Branch.c" - } -#line 117 "/home/jens/Source/shotwell/src/folders/Branch.vala" - _tmp7_ = folder_entry; -#line 117 "/home/jens/Source/shotwell/src/folders/Branch.vala" - _tmp8_ = folders_sidebar_entry_get_count (_tmp7_); -#line 117 "/home/jens/Source/shotwell/src/folders/Branch.vala" - _tmp9_ = _tmp8_; -#line 117 "/home/jens/Source/shotwell/src/folders/Branch.vala" - _vala_assert (_tmp9_ > 0, "folder_entry.count > 0"); -#line 120 "/home/jens/Source/shotwell/src/folders/Branch.vala" - _tmp11_ = folder_entry; -#line 120 "/home/jens/Source/shotwell/src/folders/Branch.vala" - _tmp12_ = folder_entry; -#line 120 "/home/jens/Source/shotwell/src/folders/Branch.vala" - _tmp13_ = folders_sidebar_entry_get_count (_tmp12_); -#line 120 "/home/jens/Source/shotwell/src/folders/Branch.vala" - _tmp14_ = _tmp13_; -#line 120 "/home/jens/Source/shotwell/src/folders/Branch.vala" - folders_sidebar_entry_set_count (_tmp12_, _tmp14_ - 1); -#line 120 "/home/jens/Source/shotwell/src/folders/Branch.vala" - if ((_tmp14_ - 1) > 0) { -#line 120 "/home/jens/Source/shotwell/src/folders/Branch.vala" - _tmp10_ = TRUE; -#line 1325 "Branch.c" - } else { - FoldersSidebarEntry* _tmp15_; - gint _tmp16_; -#line 120 "/home/jens/Source/shotwell/src/folders/Branch.vala" - _tmp15_ = folder_entry; -#line 120 "/home/jens/Source/shotwell/src/folders/Branch.vala" - _tmp16_ = sidebar_branch_get_child_count (G_TYPE_CHECK_INSTANCE_CAST (self, SIDEBAR_TYPE_BRANCH, SidebarBranch), G_TYPE_CHECK_INSTANCE_CAST (_tmp15_, SIDEBAR_TYPE_ENTRY, SidebarEntry)); -#line 120 "/home/jens/Source/shotwell/src/folders/Branch.vala" - _tmp10_ = _tmp16_ > 0; -#line 1335 "Branch.c" - } -#line 120 "/home/jens/Source/shotwell/src/folders/Branch.vala" - if (_tmp10_) { -#line 121 "/home/jens/Source/shotwell/src/folders/Branch.vala" - _g_object_unref0 (folder_entry); -#line 121 "/home/jens/Source/shotwell/src/folders/Branch.vala" - return; -#line 1343 "Branch.c" - } -#line 124 "/home/jens/Source/shotwell/src/folders/Branch.vala" - _tmp17_ = folder_entry; -#line 124 "/home/jens/Source/shotwell/src/folders/Branch.vala" - _tmp18_ = _g_object_ref0 (_tmp17_); -#line 124 "/home/jens/Source/shotwell/src/folders/Branch.vala" - prune_point = _tmp18_; -#line 125 "/home/jens/Source/shotwell/src/folders/Branch.vala" - _tmp19_ = prune_point; -#line 125 "/home/jens/Source/shotwell/src/folders/Branch.vala" - _vala_assert (_tmp19_ != NULL, "prune_point != null"); -#line 1355 "Branch.c" - { - gboolean _tmp20_ = FALSE; -#line 127 "/home/jens/Source/shotwell/src/folders/Branch.vala" - _tmp20_ = TRUE; -#line 127 "/home/jens/Source/shotwell/src/folders/Branch.vala" - while (TRUE) { -#line 1362 "Branch.c" - gboolean removed = FALSE; - GeeHashMap* _tmp21_; - FoldersSidebarEntry* _tmp22_; - GFile* _tmp23_; - GFile* _tmp24_; - gboolean _tmp25_; - gboolean _tmp26_; - FoldersSidebarEntry* parent = NULL; - FoldersSidebarEntry* _tmp27_; - SidebarEntry* _tmp28_; - FoldersSidebarEntry* _tmp29_; - gboolean _tmp30_ = FALSE; - gboolean _tmp31_ = FALSE; - FoldersSidebarEntry* _tmp32_; - FoldersSidebarEntry* _tmp38_; - FoldersSidebarEntry* _tmp39_; -#line 127 "/home/jens/Source/shotwell/src/folders/Branch.vala" - if (!_tmp20_) { -#line 1381 "Branch.c" - } -#line 127 "/home/jens/Source/shotwell/src/folders/Branch.vala" - _tmp20_ = FALSE; -#line 128 "/home/jens/Source/shotwell/src/folders/Branch.vala" - _tmp21_ = self->priv->entries; -#line 128 "/home/jens/Source/shotwell/src/folders/Branch.vala" - _tmp22_ = prune_point; -#line 128 "/home/jens/Source/shotwell/src/folders/Branch.vala" - _tmp23_ = folders_sidebar_entry_get_dir (_tmp22_); -#line 128 "/home/jens/Source/shotwell/src/folders/Branch.vala" - _tmp24_ = _tmp23_; -#line 128 "/home/jens/Source/shotwell/src/folders/Branch.vala" - _tmp25_ = gee_abstract_map_unset (G_TYPE_CHECK_INSTANCE_CAST (_tmp21_, GEE_TYPE_ABSTRACT_MAP, GeeAbstractMap), _tmp24_, NULL); -#line 128 "/home/jens/Source/shotwell/src/folders/Branch.vala" - removed = _tmp25_; -#line 129 "/home/jens/Source/shotwell/src/folders/Branch.vala" - _tmp26_ = removed; -#line 129 "/home/jens/Source/shotwell/src/folders/Branch.vala" - _vala_assert (_tmp26_, "removed"); -#line 131 "/home/jens/Source/shotwell/src/folders/Branch.vala" - _tmp27_ = prune_point; -#line 131 "/home/jens/Source/shotwell/src/folders/Branch.vala" - _tmp28_ = sidebar_branch_get_parent (G_TYPE_CHECK_INSTANCE_CAST (self, SIDEBAR_TYPE_BRANCH, SidebarBranch), G_TYPE_CHECK_INSTANCE_CAST (_tmp27_, SIDEBAR_TYPE_ENTRY, SidebarEntry)); -#line 131 "/home/jens/Source/shotwell/src/folders/Branch.vala" - _tmp29_ = G_TYPE_CHECK_INSTANCE_TYPE (_tmp28_, FOLDERS_TYPE_SIDEBAR_ENTRY) ? ((FoldersSidebarEntry*) _tmp28_) : NULL; -#line 131 "/home/jens/Source/shotwell/src/folders/Branch.vala" - if (_tmp29_ == NULL) { -#line 131 "/home/jens/Source/shotwell/src/folders/Branch.vala" - _g_object_unref0 (_tmp28_); -#line 1411 "Branch.c" - } -#line 131 "/home/jens/Source/shotwell/src/folders/Branch.vala" - parent = _tmp29_; -#line 132 "/home/jens/Source/shotwell/src/folders/Branch.vala" - _tmp32_ = parent; -#line 132 "/home/jens/Source/shotwell/src/folders/Branch.vala" - if (_tmp32_ == NULL) { -#line 132 "/home/jens/Source/shotwell/src/folders/Branch.vala" - _tmp31_ = TRUE; -#line 1421 "Branch.c" - } else { - FoldersSidebarEntry* _tmp33_; - gint _tmp34_; - gint _tmp35_; -#line 132 "/home/jens/Source/shotwell/src/folders/Branch.vala" - _tmp33_ = parent; -#line 132 "/home/jens/Source/shotwell/src/folders/Branch.vala" - _tmp34_ = folders_sidebar_entry_get_count (_tmp33_); -#line 132 "/home/jens/Source/shotwell/src/folders/Branch.vala" - _tmp35_ = _tmp34_; -#line 132 "/home/jens/Source/shotwell/src/folders/Branch.vala" - _tmp31_ = _tmp35_ != 0; -#line 1434 "Branch.c" - } -#line 132 "/home/jens/Source/shotwell/src/folders/Branch.vala" - if (_tmp31_) { -#line 132 "/home/jens/Source/shotwell/src/folders/Branch.vala" - _tmp30_ = TRUE; -#line 1440 "Branch.c" - } else { - FoldersSidebarEntry* _tmp36_; - gint _tmp37_; -#line 132 "/home/jens/Source/shotwell/src/folders/Branch.vala" - _tmp36_ = parent; -#line 132 "/home/jens/Source/shotwell/src/folders/Branch.vala" - _tmp37_ = sidebar_branch_get_child_count (G_TYPE_CHECK_INSTANCE_CAST (self, SIDEBAR_TYPE_BRANCH, SidebarBranch), G_TYPE_CHECK_INSTANCE_CAST (_tmp36_, SIDEBAR_TYPE_ENTRY, SidebarEntry)); -#line 132 "/home/jens/Source/shotwell/src/folders/Branch.vala" - _tmp30_ = _tmp37_ > 1; -#line 1450 "Branch.c" - } -#line 132 "/home/jens/Source/shotwell/src/folders/Branch.vala" - if (_tmp30_) { -#line 133 "/home/jens/Source/shotwell/src/folders/Branch.vala" - _g_object_unref0 (parent); -#line 133 "/home/jens/Source/shotwell/src/folders/Branch.vala" - break; -#line 1458 "Branch.c" - } -#line 135 "/home/jens/Source/shotwell/src/folders/Branch.vala" - _tmp38_ = parent; -#line 135 "/home/jens/Source/shotwell/src/folders/Branch.vala" - _tmp39_ = _g_object_ref0 (_tmp38_); -#line 135 "/home/jens/Source/shotwell/src/folders/Branch.vala" - _g_object_unref0 (prune_point); -#line 135 "/home/jens/Source/shotwell/src/folders/Branch.vala" - prune_point = _tmp39_; -#line 127 "/home/jens/Source/shotwell/src/folders/Branch.vala" - _g_object_unref0 (parent); -#line 1470 "Branch.c" - } - } -#line 138 "/home/jens/Source/shotwell/src/folders/Branch.vala" - _tmp40_ = prune_point; -#line 138 "/home/jens/Source/shotwell/src/folders/Branch.vala" - sidebar_branch_prune (G_TYPE_CHECK_INSTANCE_CAST (self, SIDEBAR_TYPE_BRANCH, SidebarBranch), G_TYPE_CHECK_INSTANCE_CAST (_tmp40_, SIDEBAR_TYPE_ENTRY, SidebarEntry)); -#line 112 "/home/jens/Source/shotwell/src/folders/Branch.vala" - _g_object_unref0 (prune_point); -#line 112 "/home/jens/Source/shotwell/src/folders/Branch.vala" - _g_object_unref0 (folder_entry); -#line 1481 "Branch.c" -} - - -static void folders_branch_class_init (FoldersBranchClass * klass) { -#line 7 "/home/jens/Source/shotwell/src/folders/Branch.vala" - folders_branch_parent_class = g_type_class_peek_parent (klass); -#line 7 "/home/jens/Source/shotwell/src/folders/Branch.vala" - g_type_class_add_private (klass, sizeof (FoldersBranchPrivate)); -#line 7 "/home/jens/Source/shotwell/src/folders/Branch.vala" - G_OBJECT_CLASS (klass)->finalize = folders_branch_finalize; -#line 1492 "Branch.c" -} - - -static void folders_branch_instance_init (FoldersBranch * self) { - GeeHashMap* _tmp0_; -#line 7 "/home/jens/Source/shotwell/src/folders/Branch.vala" - self->priv = FOLDERS_BRANCH_GET_PRIVATE (self); -#line 8 "/home/jens/Source/shotwell/src/folders/Branch.vala" - _tmp0_ = gee_hash_map_new (g_file_get_type (), (GBoxedCopyFunc) g_object_ref, (GDestroyNotify) g_object_unref, FOLDERS_TYPE_SIDEBAR_ENTRY, (GBoxedCopyFunc) g_object_ref, (GDestroyNotify) g_object_unref, _file_hash_gee_hash_data_func, NULL, NULL, _file_equal_gee_equal_data_func, NULL, NULL, NULL, NULL, NULL); -#line 8 "/home/jens/Source/shotwell/src/folders/Branch.vala" - self->priv->entries = _tmp0_; -#line 1504 "Branch.c" -} - - -static void folders_branch_finalize (GObject * obj) { - FoldersBranch * self; -#line 7 "/home/jens/Source/shotwell/src/folders/Branch.vala" - self = G_TYPE_CHECK_INSTANCE_CAST (obj, FOLDERS_TYPE_BRANCH, FoldersBranch); -#line 1512 "Branch.c" - { - GeeIterator* _sources_it = NULL; - MediaCollectionRegistry* _tmp0_; - MediaCollectionRegistry* _tmp1_; - GeeCollection* _tmp2_; - GeeCollection* _tmp3_; - GeeIterator* _tmp4_; - GeeIterator* _tmp5_; -#line 30 "/home/jens/Source/shotwell/src/folders/Branch.vala" - _tmp0_ = media_collection_registry_get_instance (); -#line 30 "/home/jens/Source/shotwell/src/folders/Branch.vala" - _tmp1_ = _tmp0_; -#line 30 "/home/jens/Source/shotwell/src/folders/Branch.vala" - _tmp2_ = media_collection_registry_get_all (_tmp1_); -#line 30 "/home/jens/Source/shotwell/src/folders/Branch.vala" - _tmp3_ = _tmp2_; -#line 30 "/home/jens/Source/shotwell/src/folders/Branch.vala" - _tmp4_ = gee_iterable_iterator (G_TYPE_CHECK_INSTANCE_CAST (_tmp3_, GEE_TYPE_ITERABLE, GeeIterable)); -#line 30 "/home/jens/Source/shotwell/src/folders/Branch.vala" - _tmp5_ = _tmp4_; -#line 30 "/home/jens/Source/shotwell/src/folders/Branch.vala" - _g_object_unref0 (_tmp3_); -#line 30 "/home/jens/Source/shotwell/src/folders/Branch.vala" - _media_collection_registry_unref0 (_tmp1_); -#line 30 "/home/jens/Source/shotwell/src/folders/Branch.vala" - _sources_it = _tmp5_; -#line 30 "/home/jens/Source/shotwell/src/folders/Branch.vala" - while (TRUE) { -#line 1541 "Branch.c" - GeeIterator* _tmp6_; - gboolean _tmp7_; - MediaSourceCollection* sources = NULL; - GeeIterator* _tmp8_; - gpointer _tmp9_; - MediaSourceCollection* _tmp10_; - guint _tmp11_; -#line 30 "/home/jens/Source/shotwell/src/folders/Branch.vala" - _tmp6_ = _sources_it; -#line 30 "/home/jens/Source/shotwell/src/folders/Branch.vala" - _tmp7_ = gee_iterator_next (_tmp6_); -#line 30 "/home/jens/Source/shotwell/src/folders/Branch.vala" - if (!_tmp7_) { -#line 30 "/home/jens/Source/shotwell/src/folders/Branch.vala" - break; -#line 1557 "Branch.c" - } -#line 30 "/home/jens/Source/shotwell/src/folders/Branch.vala" - _tmp8_ = _sources_it; -#line 30 "/home/jens/Source/shotwell/src/folders/Branch.vala" - _tmp9_ = gee_iterator_get (_tmp8_); -#line 30 "/home/jens/Source/shotwell/src/folders/Branch.vala" - sources = (MediaSourceCollection*) _tmp9_; -#line 31 "/home/jens/Source/shotwell/src/folders/Branch.vala" - _tmp10_ = sources; -#line 31 "/home/jens/Source/shotwell/src/folders/Branch.vala" - g_signal_parse_name ("contents-altered", TYPE_DATA_COLLECTION, &_tmp11_, NULL, FALSE); -#line 31 "/home/jens/Source/shotwell/src/folders/Branch.vala" - g_signal_handlers_disconnect_matched (G_TYPE_CHECK_INSTANCE_CAST (_tmp10_, TYPE_DATA_COLLECTION, DataCollection), G_SIGNAL_MATCH_ID | G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA, _tmp11_, 0, NULL, (GCallback) _folders_branch_on_media_contents_altered_data_collection_contents_altered, self); -#line 30 "/home/jens/Source/shotwell/src/folders/Branch.vala" - _data_collection_unref0 (sources); -#line 1573 "Branch.c" - } -#line 30 "/home/jens/Source/shotwell/src/folders/Branch.vala" - _g_object_unref0 (_sources_it); -#line 1577 "Branch.c" - } -#line 8 "/home/jens/Source/shotwell/src/folders/Branch.vala" - _g_object_unref0 (self->priv->entries); -#line 10 "/home/jens/Source/shotwell/src/folders/Branch.vala" - _g_object_unref0 (self->priv->home_dir); -#line 7 "/home/jens/Source/shotwell/src/folders/Branch.vala" - G_OBJECT_CLASS (folders_branch_parent_class)->finalize (obj); -#line 1585 "Branch.c" -} - - -GType folders_branch_get_type (void) { - static volatile gsize folders_branch_type_id__volatile = 0; - if (g_once_init_enter (&folders_branch_type_id__volatile)) { - static const GTypeInfo g_define_type_info = { sizeof (FoldersBranchClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) folders_branch_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (FoldersBranch), 0, (GInstanceInitFunc) folders_branch_instance_init, NULL }; - GType folders_branch_type_id; - folders_branch_type_id = g_type_register_static (SIDEBAR_TYPE_BRANCH, "FoldersBranch", &g_define_type_info, 0); - g_once_init_leave (&folders_branch_type_id__volatile, folders_branch_type_id); - } - return folders_branch_type_id__volatile; -} - - -FoldersRoot* folders_root_construct (GType object_type) { - FoldersRoot * self = NULL; -#line 144 "/home/jens/Source/shotwell/src/folders/Branch.vala" - self = (FoldersRoot*) sidebar_header_construct (object_type, _ ("Folders"), TRUE); -#line 143 "/home/jens/Source/shotwell/src/folders/Branch.vala" - return self; -#line 1607 "Branch.c" -} - - -FoldersRoot* folders_root_new (void) { -#line 143 "/home/jens/Source/shotwell/src/folders/Branch.vala" - return folders_root_construct (FOLDERS_TYPE_ROOT); -#line 1614 "Branch.c" -} - - -static void folders_root_class_init (FoldersRootClass * klass) { -#line 142 "/home/jens/Source/shotwell/src/folders/Branch.vala" - folders_root_parent_class = g_type_class_peek_parent (klass); -#line 1621 "Branch.c" -} - - -static void folders_root_instance_init (FoldersRoot * self) { -} - - -GType folders_root_get_type (void) { - static volatile gsize folders_root_type_id__volatile = 0; - if (g_once_init_enter (&folders_root_type_id__volatile)) { - static const GTypeInfo g_define_type_info = { sizeof (FoldersRootClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) folders_root_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (FoldersRoot), 0, (GInstanceInitFunc) folders_root_instance_init, NULL }; - GType folders_root_type_id; - folders_root_type_id = g_type_register_static (SIDEBAR_TYPE_HEADER, "FoldersRoot", &g_define_type_info, 0); - g_once_init_leave (&folders_root_type_id__volatile, folders_root_type_id); - } - return folders_root_type_id__volatile; -} - - -FoldersSidebarEntry* folders_sidebar_entry_construct (GType object_type, GFile* dir) { - FoldersSidebarEntry * self = NULL; - GFile* _tmp0_; - GFile* _tmp1_; - gchar* _tmp2_; - gchar* _tmp3_; - gchar* _tmp4_; - gchar* _tmp5_; -#line 169 "/home/jens/Source/shotwell/src/folders/Branch.vala" - g_return_val_if_fail (G_IS_FILE (dir), NULL); -#line 169 "/home/jens/Source/shotwell/src/folders/Branch.vala" - self = (FoldersSidebarEntry*) sidebar_simple_page_entry_construct (object_type); -#line 170 "/home/jens/Source/shotwell/src/folders/Branch.vala" - _tmp0_ = dir; -#line 170 "/home/jens/Source/shotwell/src/folders/Branch.vala" - folders_sidebar_entry_set_dir (self, _tmp0_); -#line 171 "/home/jens/Source/shotwell/src/folders/Branch.vala" - _tmp1_ = dir; -#line 171 "/home/jens/Source/shotwell/src/folders/Branch.vala" - _tmp2_ = g_file_get_path (_tmp1_); -#line 171 "/home/jens/Source/shotwell/src/folders/Branch.vala" - _tmp3_ = _tmp2_; -#line 171 "/home/jens/Source/shotwell/src/folders/Branch.vala" - _tmp4_ = g_utf8_collate_key_for_filename (_tmp3_, (gssize) -1); -#line 171 "/home/jens/Source/shotwell/src/folders/Branch.vala" - _tmp5_ = _tmp4_; -#line 171 "/home/jens/Source/shotwell/src/folders/Branch.vala" - folders_sidebar_entry_set_collation (self, _tmp5_); -#line 171 "/home/jens/Source/shotwell/src/folders/Branch.vala" - _g_free0 (_tmp5_); -#line 171 "/home/jens/Source/shotwell/src/folders/Branch.vala" - _g_free0 (_tmp3_); -#line 169 "/home/jens/Source/shotwell/src/folders/Branch.vala" - return self; -#line 1675 "Branch.c" -} - - -FoldersSidebarEntry* folders_sidebar_entry_new (GFile* dir) { -#line 169 "/home/jens/Source/shotwell/src/folders/Branch.vala" - return folders_sidebar_entry_construct (FOLDERS_TYPE_SIDEBAR_ENTRY, dir); -#line 1682 "Branch.c" -} - - -static gchar* folders_sidebar_entry_real_get_sidebar_name (SidebarSimplePageEntry* base) { - FoldersSidebarEntry * self; - gchar* result = NULL; - GFile* _tmp0_; - gchar* _tmp1_; -#line 174 "/home/jens/Source/shotwell/src/folders/Branch.vala" - self = G_TYPE_CHECK_INSTANCE_CAST (base, FOLDERS_TYPE_SIDEBAR_ENTRY, FoldersSidebarEntry); -#line 175 "/home/jens/Source/shotwell/src/folders/Branch.vala" - _tmp0_ = self->priv->_dir; -#line 175 "/home/jens/Source/shotwell/src/folders/Branch.vala" - _tmp1_ = g_file_get_basename (_tmp0_); -#line 175 "/home/jens/Source/shotwell/src/folders/Branch.vala" - result = _tmp1_; -#line 175 "/home/jens/Source/shotwell/src/folders/Branch.vala" - return result; -#line 1701 "Branch.c" -} - - -static gchar* folders_sidebar_entry_real_get_sidebar_icon (SidebarSimplePageEntry* base) { - FoldersSidebarEntry * self; - gchar* result = NULL; - const gchar* _tmp0_ = NULL; - gint _tmp1_; - gint _tmp2_; - gchar* _tmp5_; -#line 178 "/home/jens/Source/shotwell/src/folders/Branch.vala" - self = G_TYPE_CHECK_INSTANCE_CAST (base, FOLDERS_TYPE_SIDEBAR_ENTRY, FoldersSidebarEntry); -#line 179 "/home/jens/Source/shotwell/src/folders/Branch.vala" - _tmp1_ = folders_sidebar_entry_get_count (self); -#line 179 "/home/jens/Source/shotwell/src/folders/Branch.vala" - _tmp2_ = _tmp1_; -#line 179 "/home/jens/Source/shotwell/src/folders/Branch.vala" - if (_tmp2_ == 0) { -#line 1720 "Branch.c" - const gchar* _tmp3_; -#line 179 "/home/jens/Source/shotwell/src/folders/Branch.vala" - _tmp3_ = folders_icon; -#line 179 "/home/jens/Source/shotwell/src/folders/Branch.vala" - _tmp0_ = _tmp3_; -#line 1726 "Branch.c" - } else { - const gchar* _tmp4_; -#line 179 "/home/jens/Source/shotwell/src/folders/Branch.vala" - _tmp4_ = folders_have_photos_icon; -#line 179 "/home/jens/Source/shotwell/src/folders/Branch.vala" - _tmp0_ = _tmp4_; -#line 1733 "Branch.c" - } -#line 179 "/home/jens/Source/shotwell/src/folders/Branch.vala" - _tmp5_ = g_strdup (_tmp0_); -#line 179 "/home/jens/Source/shotwell/src/folders/Branch.vala" - result = _tmp5_; -#line 179 "/home/jens/Source/shotwell/src/folders/Branch.vala" - return result; -#line 1741 "Branch.c" -} - - -static gchar* folders_sidebar_entry_real_to_string (SidebarSimplePageEntry* base) { - FoldersSidebarEntry * self; - gchar* result = NULL; - GFile* _tmp0_; - gchar* _tmp1_; -#line 182 "/home/jens/Source/shotwell/src/folders/Branch.vala" - self = G_TYPE_CHECK_INSTANCE_CAST (base, FOLDERS_TYPE_SIDEBAR_ENTRY, FoldersSidebarEntry); -#line 183 "/home/jens/Source/shotwell/src/folders/Branch.vala" - _tmp0_ = self->priv->_dir; -#line 183 "/home/jens/Source/shotwell/src/folders/Branch.vala" - _tmp1_ = g_file_get_path (_tmp0_); -#line 183 "/home/jens/Source/shotwell/src/folders/Branch.vala" - result = _tmp1_; -#line 183 "/home/jens/Source/shotwell/src/folders/Branch.vala" - return result; -#line 1760 "Branch.c" -} - - -static gboolean folders_sidebar_entry_real_expand_on_select (SidebarExpandableEntry* base) { - FoldersSidebarEntry * self; - gboolean result = FALSE; -#line 186 "/home/jens/Source/shotwell/src/folders/Branch.vala" - self = G_TYPE_CHECK_INSTANCE_CAST (base, FOLDERS_TYPE_SIDEBAR_ENTRY, FoldersSidebarEntry); -#line 187 "/home/jens/Source/shotwell/src/folders/Branch.vala" - result = TRUE; -#line 187 "/home/jens/Source/shotwell/src/folders/Branch.vala" - return result; -#line 1773 "Branch.c" -} - - -static Page* folders_sidebar_entry_real_create_page (SidebarSimplePageEntry* base) { - FoldersSidebarEntry * self; - Page* result = NULL; - GFile* _tmp0_; - FoldersPage* _tmp1_; -#line 190 "/home/jens/Source/shotwell/src/folders/Branch.vala" - self = G_TYPE_CHECK_INSTANCE_CAST (base, FOLDERS_TYPE_SIDEBAR_ENTRY, FoldersSidebarEntry); -#line 191 "/home/jens/Source/shotwell/src/folders/Branch.vala" - _tmp0_ = self->priv->_dir; -#line 191 "/home/jens/Source/shotwell/src/folders/Branch.vala" - _tmp1_ = folders_page_new (_tmp0_); -#line 191 "/home/jens/Source/shotwell/src/folders/Branch.vala" - g_object_ref_sink (_tmp1_); -#line 191 "/home/jens/Source/shotwell/src/folders/Branch.vala" - result = G_TYPE_CHECK_INSTANCE_CAST (_tmp1_, TYPE_PAGE, Page); -#line 191 "/home/jens/Source/shotwell/src/folders/Branch.vala" - return result; -#line 1794 "Branch.c" -} - - -GFile* folders_sidebar_entry_get_dir (FoldersSidebarEntry* self) { - GFile* result; - GFile* _tmp0_; -#line 149 "/home/jens/Source/shotwell/src/folders/Branch.vala" - g_return_val_if_fail (FOLDERS_IS_SIDEBAR_ENTRY (self), NULL); -#line 149 "/home/jens/Source/shotwell/src/folders/Branch.vala" - _tmp0_ = self->priv->_dir; -#line 149 "/home/jens/Source/shotwell/src/folders/Branch.vala" - result = _tmp0_; -#line 149 "/home/jens/Source/shotwell/src/folders/Branch.vala" - return result; -#line 1809 "Branch.c" -} - - -static void folders_sidebar_entry_set_dir (FoldersSidebarEntry* self, GFile* value) { -#line 149 "/home/jens/Source/shotwell/src/folders/Branch.vala" - g_return_if_fail (FOLDERS_IS_SIDEBAR_ENTRY (self)); -#line 149 "/home/jens/Source/shotwell/src/folders/Branch.vala" - if (folders_sidebar_entry_get_dir (self) != value) { -#line 1818 "Branch.c" - GFile* _tmp0_; - GFile* _tmp1_; -#line 149 "/home/jens/Source/shotwell/src/folders/Branch.vala" - _tmp0_ = value; -#line 149 "/home/jens/Source/shotwell/src/folders/Branch.vala" - _tmp1_ = _g_object_ref0 (_tmp0_); -#line 149 "/home/jens/Source/shotwell/src/folders/Branch.vala" - _g_object_unref0 (self->priv->_dir); -#line 149 "/home/jens/Source/shotwell/src/folders/Branch.vala" - self->priv->_dir = _tmp1_; -#line 149 "/home/jens/Source/shotwell/src/folders/Branch.vala" - g_object_notify ((GObject *) self, "dir"); -#line 1831 "Branch.c" - } -} - - -const gchar* folders_sidebar_entry_get_collation (FoldersSidebarEntry* self) { - const gchar* result; - const gchar* _tmp0_; -#line 150 "/home/jens/Source/shotwell/src/folders/Branch.vala" - g_return_val_if_fail (FOLDERS_IS_SIDEBAR_ENTRY (self), NULL); -#line 150 "/home/jens/Source/shotwell/src/folders/Branch.vala" - _tmp0_ = self->priv->_collation; -#line 150 "/home/jens/Source/shotwell/src/folders/Branch.vala" - result = _tmp0_; -#line 150 "/home/jens/Source/shotwell/src/folders/Branch.vala" - return result; -#line 1847 "Branch.c" -} - - -static void folders_sidebar_entry_set_collation (FoldersSidebarEntry* self, const gchar* value) { -#line 150 "/home/jens/Source/shotwell/src/folders/Branch.vala" - g_return_if_fail (FOLDERS_IS_SIDEBAR_ENTRY (self)); -#line 150 "/home/jens/Source/shotwell/src/folders/Branch.vala" - if (g_strcmp0 (value, folders_sidebar_entry_get_collation (self)) != 0) { -#line 1856 "Branch.c" - const gchar* _tmp0_; - gchar* _tmp1_; -#line 150 "/home/jens/Source/shotwell/src/folders/Branch.vala" - _tmp0_ = value; -#line 150 "/home/jens/Source/shotwell/src/folders/Branch.vala" - _tmp1_ = g_strdup (_tmp0_); -#line 150 "/home/jens/Source/shotwell/src/folders/Branch.vala" - _g_free0 (self->priv->_collation); -#line 150 "/home/jens/Source/shotwell/src/folders/Branch.vala" - self->priv->_collation = _tmp1_; -#line 150 "/home/jens/Source/shotwell/src/folders/Branch.vala" - g_object_notify ((GObject *) self, "collation"); -#line 1869 "Branch.c" - } -} - - -gint folders_sidebar_entry_get_count (FoldersSidebarEntry* self) { - gint result; - gint _tmp0_; -#line 154 "/home/jens/Source/shotwell/src/folders/Branch.vala" - g_return_val_if_fail (FOLDERS_IS_SIDEBAR_ENTRY (self), 0); -#line 155 "/home/jens/Source/shotwell/src/folders/Branch.vala" - _tmp0_ = self->priv->_count; -#line 155 "/home/jens/Source/shotwell/src/folders/Branch.vala" - result = _tmp0_; -#line 155 "/home/jens/Source/shotwell/src/folders/Branch.vala" - return result; -#line 1885 "Branch.c" -} - - -void folders_sidebar_entry_set_count (FoldersSidebarEntry* self, gint value) { - gint prev_count = 0; - gint _tmp0_; - gint _tmp1_; - gboolean _tmp2_ = FALSE; - gboolean _tmp3_ = FALSE; - gint _tmp4_; -#line 158 "/home/jens/Source/shotwell/src/folders/Branch.vala" - g_return_if_fail (FOLDERS_IS_SIDEBAR_ENTRY (self)); -#line 159 "/home/jens/Source/shotwell/src/folders/Branch.vala" - _tmp0_ = self->priv->_count; -#line 159 "/home/jens/Source/shotwell/src/folders/Branch.vala" - prev_count = _tmp0_; -#line 160 "/home/jens/Source/shotwell/src/folders/Branch.vala" - _tmp1_ = value; -#line 160 "/home/jens/Source/shotwell/src/folders/Branch.vala" - self->priv->_count = _tmp1_; -#line 163 "/home/jens/Source/shotwell/src/folders/Branch.vala" - _tmp4_ = prev_count; -#line 163 "/home/jens/Source/shotwell/src/folders/Branch.vala" - if (_tmp4_ == 0) { -#line 1910 "Branch.c" - gint _tmp5_; -#line 163 "/home/jens/Source/shotwell/src/folders/Branch.vala" - _tmp5_ = self->priv->_count; -#line 163 "/home/jens/Source/shotwell/src/folders/Branch.vala" - _tmp3_ = _tmp5_ == 1; -#line 1916 "Branch.c" - } else { -#line 163 "/home/jens/Source/shotwell/src/folders/Branch.vala" - _tmp3_ = FALSE; -#line 1920 "Branch.c" - } -#line 163 "/home/jens/Source/shotwell/src/folders/Branch.vala" - if (_tmp3_) { -#line 163 "/home/jens/Source/shotwell/src/folders/Branch.vala" - _tmp2_ = TRUE; -#line 1926 "Branch.c" - } else { - gboolean _tmp6_ = FALSE; - gint _tmp7_; -#line 163 "/home/jens/Source/shotwell/src/folders/Branch.vala" - _tmp7_ = prev_count; -#line 163 "/home/jens/Source/shotwell/src/folders/Branch.vala" - if (_tmp7_ == 1) { -#line 1934 "Branch.c" - gint _tmp8_; -#line 163 "/home/jens/Source/shotwell/src/folders/Branch.vala" - _tmp8_ = self->priv->_count; -#line 163 "/home/jens/Source/shotwell/src/folders/Branch.vala" - _tmp6_ = _tmp8_ == 0; -#line 1940 "Branch.c" - } else { -#line 163 "/home/jens/Source/shotwell/src/folders/Branch.vala" - _tmp6_ = FALSE; -#line 1944 "Branch.c" - } -#line 163 "/home/jens/Source/shotwell/src/folders/Branch.vala" - _tmp2_ = _tmp6_; -#line 1948 "Branch.c" - } -#line 163 "/home/jens/Source/shotwell/src/folders/Branch.vala" - if (_tmp2_) { -#line 1952 "Branch.c" - gchar* _tmp9_; - gchar* _tmp10_; -#line 164 "/home/jens/Source/shotwell/src/folders/Branch.vala" - _tmp9_ = sidebar_simple_page_entry_get_sidebar_icon (G_TYPE_CHECK_INSTANCE_CAST (self, SIDEBAR_TYPE_SIMPLE_PAGE_ENTRY, SidebarSimplePageEntry)); -#line 164 "/home/jens/Source/shotwell/src/folders/Branch.vala" - _tmp10_ = _tmp9_; -#line 164 "/home/jens/Source/shotwell/src/folders/Branch.vala" - g_signal_emit_by_name (G_TYPE_CHECK_INSTANCE_CAST (self, SIDEBAR_TYPE_ENTRY, SidebarEntry), "sidebar-icon-changed", _tmp10_); -#line 164 "/home/jens/Source/shotwell/src/folders/Branch.vala" - _g_free0 (_tmp10_); -#line 1963 "Branch.c" - } -#line 158 "/home/jens/Source/shotwell/src/folders/Branch.vala" - g_object_notify ((GObject *) self, "count"); -#line 1967 "Branch.c" -} - - -static void folders_sidebar_entry_class_init (FoldersSidebarEntryClass * klass) { -#line 148 "/home/jens/Source/shotwell/src/folders/Branch.vala" - folders_sidebar_entry_parent_class = g_type_class_peek_parent (klass); -#line 148 "/home/jens/Source/shotwell/src/folders/Branch.vala" - g_type_class_add_private (klass, sizeof (FoldersSidebarEntryPrivate)); -#line 148 "/home/jens/Source/shotwell/src/folders/Branch.vala" - ((SidebarSimplePageEntryClass *) klass)->get_sidebar_name = (gchar* (*) (SidebarSimplePageEntry *)) folders_sidebar_entry_real_get_sidebar_name; -#line 148 "/home/jens/Source/shotwell/src/folders/Branch.vala" - ((SidebarSimplePageEntryClass *) klass)->get_sidebar_icon = (gchar* (*) (SidebarSimplePageEntry *)) folders_sidebar_entry_real_get_sidebar_icon; -#line 148 "/home/jens/Source/shotwell/src/folders/Branch.vala" - ((SidebarSimplePageEntryClass *) klass)->to_string = (gchar* (*) (SidebarSimplePageEntry *)) folders_sidebar_entry_real_to_string; -#line 148 "/home/jens/Source/shotwell/src/folders/Branch.vala" - ((SidebarSimplePageEntryClass *) klass)->create_page = (Page* (*) (SidebarSimplePageEntry *)) folders_sidebar_entry_real_create_page; -#line 148 "/home/jens/Source/shotwell/src/folders/Branch.vala" - G_OBJECT_CLASS (klass)->get_property = _vala_folders_sidebar_entry_get_property; -#line 148 "/home/jens/Source/shotwell/src/folders/Branch.vala" - G_OBJECT_CLASS (klass)->set_property = _vala_folders_sidebar_entry_set_property; -#line 148 "/home/jens/Source/shotwell/src/folders/Branch.vala" - G_OBJECT_CLASS (klass)->finalize = folders_sidebar_entry_finalize; -#line 148 "/home/jens/Source/shotwell/src/folders/Branch.vala" - g_object_class_install_property (G_OBJECT_CLASS (klass), FOLDERS_SIDEBAR_ENTRY_DIR_PROPERTY, g_param_spec_object ("dir", "dir", "dir", g_file_get_type (), G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE)); -#line 148 "/home/jens/Source/shotwell/src/folders/Branch.vala" - g_object_class_install_property (G_OBJECT_CLASS (klass), FOLDERS_SIDEBAR_ENTRY_COLLATION_PROPERTY, g_param_spec_string ("collation", "collation", "collation", NULL, G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE)); -#line 148 "/home/jens/Source/shotwell/src/folders/Branch.vala" - g_object_class_install_property (G_OBJECT_CLASS (klass), FOLDERS_SIDEBAR_ENTRY_COUNT_PROPERTY, g_param_spec_int ("count", "count", "count", G_MININT, G_MAXINT, 0, G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE | G_PARAM_WRITABLE)); -#line 1996 "Branch.c" -} - - -static void folders_sidebar_entry_sidebar_expandable_entry_interface_init (SidebarExpandableEntryIface * iface) { -#line 148 "/home/jens/Source/shotwell/src/folders/Branch.vala" - folders_sidebar_entry_sidebar_expandable_entry_parent_iface = g_type_interface_peek_parent (iface); -#line 148 "/home/jens/Source/shotwell/src/folders/Branch.vala" - iface->expand_on_select = (gboolean (*) (SidebarExpandableEntry *)) folders_sidebar_entry_real_expand_on_select; -#line 2005 "Branch.c" -} - - -static void folders_sidebar_entry_instance_init (FoldersSidebarEntry * self) { -#line 148 "/home/jens/Source/shotwell/src/folders/Branch.vala" - self->priv = FOLDERS_SIDEBAR_ENTRY_GET_PRIVATE (self); -#line 152 "/home/jens/Source/shotwell/src/folders/Branch.vala" - self->priv->_count = 0; -#line 2014 "Branch.c" -} - - -static void folders_sidebar_entry_finalize (GObject * obj) { - FoldersSidebarEntry * self; -#line 148 "/home/jens/Source/shotwell/src/folders/Branch.vala" - self = G_TYPE_CHECK_INSTANCE_CAST (obj, FOLDERS_TYPE_SIDEBAR_ENTRY, FoldersSidebarEntry); -#line 149 "/home/jens/Source/shotwell/src/folders/Branch.vala" - _g_object_unref0 (self->priv->_dir); -#line 150 "/home/jens/Source/shotwell/src/folders/Branch.vala" - _g_free0 (self->priv->_collation); -#line 148 "/home/jens/Source/shotwell/src/folders/Branch.vala" - G_OBJECT_CLASS (folders_sidebar_entry_parent_class)->finalize (obj); -#line 2028 "Branch.c" -} - - -GType folders_sidebar_entry_get_type (void) { - static volatile gsize folders_sidebar_entry_type_id__volatile = 0; - if (g_once_init_enter (&folders_sidebar_entry_type_id__volatile)) { - static const GTypeInfo g_define_type_info = { sizeof (FoldersSidebarEntryClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) folders_sidebar_entry_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (FoldersSidebarEntry), 0, (GInstanceInitFunc) folders_sidebar_entry_instance_init, NULL }; - static const GInterfaceInfo sidebar_expandable_entry_info = { (GInterfaceInitFunc) folders_sidebar_entry_sidebar_expandable_entry_interface_init, (GInterfaceFinalizeFunc) NULL, NULL}; - GType folders_sidebar_entry_type_id; - folders_sidebar_entry_type_id = g_type_register_static (SIDEBAR_TYPE_SIMPLE_PAGE_ENTRY, "FoldersSidebarEntry", &g_define_type_info, 0); - g_type_add_interface_static (folders_sidebar_entry_type_id, SIDEBAR_TYPE_EXPANDABLE_ENTRY, &sidebar_expandable_entry_info); - g_once_init_leave (&folders_sidebar_entry_type_id__volatile, folders_sidebar_entry_type_id); - } - return folders_sidebar_entry_type_id__volatile; -} - - -static void _vala_folders_sidebar_entry_get_property (GObject * object, guint property_id, GValue * value, GParamSpec * pspec) { - FoldersSidebarEntry * self; - self = G_TYPE_CHECK_INSTANCE_CAST (object, FOLDERS_TYPE_SIDEBAR_ENTRY, FoldersSidebarEntry); -#line 148 "/home/jens/Source/shotwell/src/folders/Branch.vala" - switch (property_id) { -#line 148 "/home/jens/Source/shotwell/src/folders/Branch.vala" - case FOLDERS_SIDEBAR_ENTRY_DIR_PROPERTY: -#line 148 "/home/jens/Source/shotwell/src/folders/Branch.vala" - g_value_set_object (value, folders_sidebar_entry_get_dir (self)); -#line 148 "/home/jens/Source/shotwell/src/folders/Branch.vala" - break; -#line 148 "/home/jens/Source/shotwell/src/folders/Branch.vala" - case FOLDERS_SIDEBAR_ENTRY_COLLATION_PROPERTY: -#line 148 "/home/jens/Source/shotwell/src/folders/Branch.vala" - g_value_set_string (value, folders_sidebar_entry_get_collation (self)); -#line 148 "/home/jens/Source/shotwell/src/folders/Branch.vala" - break; -#line 148 "/home/jens/Source/shotwell/src/folders/Branch.vala" - case FOLDERS_SIDEBAR_ENTRY_COUNT_PROPERTY: -#line 148 "/home/jens/Source/shotwell/src/folders/Branch.vala" - g_value_set_int (value, folders_sidebar_entry_get_count (self)); -#line 148 "/home/jens/Source/shotwell/src/folders/Branch.vala" - break; -#line 2069 "Branch.c" - default: -#line 148 "/home/jens/Source/shotwell/src/folders/Branch.vala" - G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec); -#line 148 "/home/jens/Source/shotwell/src/folders/Branch.vala" - break; -#line 2075 "Branch.c" - } -} - - -static void _vala_folders_sidebar_entry_set_property (GObject * object, guint property_id, const GValue * value, GParamSpec * pspec) { - FoldersSidebarEntry * self; - self = G_TYPE_CHECK_INSTANCE_CAST (object, FOLDERS_TYPE_SIDEBAR_ENTRY, FoldersSidebarEntry); -#line 148 "/home/jens/Source/shotwell/src/folders/Branch.vala" - switch (property_id) { -#line 148 "/home/jens/Source/shotwell/src/folders/Branch.vala" - case FOLDERS_SIDEBAR_ENTRY_DIR_PROPERTY: -#line 148 "/home/jens/Source/shotwell/src/folders/Branch.vala" - folders_sidebar_entry_set_dir (self, g_value_get_object (value)); -#line 148 "/home/jens/Source/shotwell/src/folders/Branch.vala" - break; -#line 148 "/home/jens/Source/shotwell/src/folders/Branch.vala" - case FOLDERS_SIDEBAR_ENTRY_COLLATION_PROPERTY: -#line 148 "/home/jens/Source/shotwell/src/folders/Branch.vala" - folders_sidebar_entry_set_collation (self, g_value_get_string (value)); -#line 148 "/home/jens/Source/shotwell/src/folders/Branch.vala" - break; -#line 148 "/home/jens/Source/shotwell/src/folders/Branch.vala" - case FOLDERS_SIDEBAR_ENTRY_COUNT_PROPERTY: -#line 148 "/home/jens/Source/shotwell/src/folders/Branch.vala" - folders_sidebar_entry_set_count (self, g_value_get_int (value)); -#line 148 "/home/jens/Source/shotwell/src/folders/Branch.vala" - break; -#line 2103 "Branch.c" - default: -#line 148 "/home/jens/Source/shotwell/src/folders/Branch.vala" - G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec); -#line 148 "/home/jens/Source/shotwell/src/folders/Branch.vala" - break; -#line 2109 "Branch.c" - } -} - - - diff --git a/src/folders/Branch.vala b/src/folders/Branch.vala deleted file mode 100644 index d14a148..0000000 --- a/src/folders/Branch.vala +++ /dev/null @@ -1,193 +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 Folders.Branch : Sidebar.Branch { - private Gee.HashMap entries = - new Gee.HashMap(file_hash, file_equal); - private File home_dir; - - public class Branch() { - base (new Folders.Root(), - Sidebar.Branch.Options.STARTUP_OPEN_GROUPING - | Sidebar.Branch.Options.HIDE_IF_EMPTY, - comparator); - - home_dir = File.new_for_path(Environment.get_home_dir()); - - foreach (MediaSourceCollection sources in MediaCollectionRegistry.get_instance().get_all()) { - // seed - on_media_contents_altered(sources.get_all(), null); - - // monitor - sources.contents_altered.connect(on_media_contents_altered); - } - } - - ~Branch() { - foreach (MediaSourceCollection sources in MediaCollectionRegistry.get_instance().get_all()) - sources.contents_altered.disconnect(on_media_contents_altered); - } - - private static int comparator(Sidebar.Entry a, Sidebar.Entry b) { - if (a == b) - return 0; - - int coll_key_equality = strcmp(((Folders.SidebarEntry) a).collation, - ((Folders.SidebarEntry) b).collation); - - if (coll_key_equality == 0) { - // Collation keys were the same, double-check that - // these really are the same string... - return strcmp(((Folders.SidebarEntry) a).get_sidebar_name(), - ((Folders.SidebarEntry) b).get_sidebar_name()); - } - - return coll_key_equality; - } - - private void on_master_source_replaced(MediaSource media_source, File old_file, File new_file) { - remove_entry(old_file); - add_entry(media_source); - } - - private void on_media_contents_altered(Gee.Iterable? added, Gee.Iterable? removed) { - if (added != null) { - foreach (DataObject object in added) { - add_entry((MediaSource) object); - ((MediaSource) object).master_replaced.connect(on_master_source_replaced); - } - } - - if (removed != null) { - foreach (DataObject object in removed) { - remove_entry(((MediaSource) object).get_file()); - ((MediaSource) object).master_replaced.disconnect(on_master_source_replaced); - } - } - } - - void add_entry(MediaSource media) { - File file = media.get_file(); - - Gee.ArrayList elements = new Gee.ArrayList(); - - // add the path elements in reverse order up to home directory - File? parent = file.get_parent(); - while (parent != null) { - // don't process paths above the user's home directory - if (parent.equal(home_dir.get_parent())) - break; - - elements.add(parent); - - parent = parent.get_parent(); - } - - // walk path elements in order from home directory down, building needed sidebar entries - // along the way - Folders.SidebarEntry? parent_entry = null; - for (int ctr = elements.size - 1; ctr >= 0; ctr--) { - File parent_dir = elements[ctr]; - - // save current parent, needed if this entry needs to be grafted - Folders.SidebarEntry? old_parent_entry = parent_entry; - - parent_entry = entries.get(parent_dir); - if (parent_entry == null) { - parent_entry = new Folders.SidebarEntry(parent_dir); - entries.set(parent_dir, parent_entry); - - graft((old_parent_entry == null) ? get_root() : old_parent_entry, parent_entry); - } - - // only increment entry's file count if File is going in this folder - if (ctr == 0) - parent_entry.count++; - } - } - - private void remove_entry(File file) { - Folders.SidebarEntry? folder_entry = entries.get(file.get_parent()); - if (folder_entry == null) - return; - - assert(folder_entry.count > 0); - - // decrement file count for folder of photo - if (--folder_entry.count > 0 || get_child_count(folder_entry) > 0) - return; - - // empty folder so prune tree - Folders.SidebarEntry? prune_point = folder_entry; - assert(prune_point != null); - - for (;;) { - bool removed = entries.unset(prune_point.dir); - assert(removed); - - Folders.SidebarEntry? parent = get_parent(prune_point) as Folders.SidebarEntry; - if (parent == null || parent.count != 0 || get_child_count(parent) > 1) - break; - - prune_point = parent; - } - - prune(prune_point); - } -} - -private class Folders.Root : Sidebar.Header { - public Root() { - base (_("Folders")); - } -} - -public class Folders.SidebarEntry : Sidebar.SimplePageEntry, Sidebar.ExpandableEntry { - public File dir { get; private set; } - public string collation { get; private set; } - - private int _count = 0; - public int count { - get { - return _count; - } - - set { - int prev_count = _count; - _count = value; - - // when count change 0->1 and 1->0 may need refresh icon - if ((prev_count == 0 && _count == 1) || (prev_count == 1 && _count == 0)) - sidebar_icon_changed(get_sidebar_icon()); - - } - } - - public SidebarEntry(File dir) { - this.dir = dir; - collation = g_utf8_collate_key_for_filename(dir.get_path()); - } - - public override string get_sidebar_name() { - return dir.get_basename(); - } - - public override string? get_sidebar_icon() { - return count == 0 ? icon : have_photos_icon; - } - - public override string to_string() { - return dir.get_path(); - } - - public bool expand_on_select() { - return true; - } - - protected override global::Page create_page() { - return new Folders.Page(dir); - } -} diff --git a/src/folders/FoldersBranch.c b/src/folders/FoldersBranch.c new file mode 100644 index 0000000..ff8f49a --- /dev/null +++ b/src/folders/FoldersBranch.c @@ -0,0 +1,2135 @@ +/* FoldersBranch.c generated by valac 0.36.6, the Vala compiler + * generated from FoldersBranch.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 FOLDERS_TYPE_BRANCH (folders_branch_get_type ()) +#define FOLDERS_BRANCH(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), FOLDERS_TYPE_BRANCH, FoldersBranch)) +#define FOLDERS_BRANCH_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), FOLDERS_TYPE_BRANCH, FoldersBranchClass)) +#define FOLDERS_IS_BRANCH(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), FOLDERS_TYPE_BRANCH)) +#define FOLDERS_IS_BRANCH_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), FOLDERS_TYPE_BRANCH)) +#define FOLDERS_BRANCH_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), FOLDERS_TYPE_BRANCH, FoldersBranchClass)) + +typedef struct _FoldersBranch FoldersBranch; +typedef struct _FoldersBranchClass FoldersBranchClass; +typedef struct _FoldersBranchPrivate FoldersBranchPrivate; + +#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 FOLDERS_TYPE_SIDEBAR_ENTRY (folders_sidebar_entry_get_type ()) +#define FOLDERS_SIDEBAR_ENTRY(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), FOLDERS_TYPE_SIDEBAR_ENTRY, FoldersSidebarEntry)) +#define FOLDERS_SIDEBAR_ENTRY_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), FOLDERS_TYPE_SIDEBAR_ENTRY, FoldersSidebarEntryClass)) +#define FOLDERS_IS_SIDEBAR_ENTRY(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), FOLDERS_TYPE_SIDEBAR_ENTRY)) +#define FOLDERS_IS_SIDEBAR_ENTRY_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), FOLDERS_TYPE_SIDEBAR_ENTRY)) +#define FOLDERS_SIDEBAR_ENTRY_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), FOLDERS_TYPE_SIDEBAR_ENTRY, FoldersSidebarEntryClass)) + +typedef struct _FoldersSidebarEntry FoldersSidebarEntry; +typedef struct _FoldersSidebarEntryClass FoldersSidebarEntryClass; + +#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_MEDIA_SOURCE_COLLECTION (media_source_collection_get_type ()) +#define MEDIA_SOURCE_COLLECTION(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_MEDIA_SOURCE_COLLECTION, MediaSourceCollection)) +#define MEDIA_SOURCE_COLLECTION_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_MEDIA_SOURCE_COLLECTION, MediaSourceCollectionClass)) +#define IS_MEDIA_SOURCE_COLLECTION(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_MEDIA_SOURCE_COLLECTION)) +#define IS_MEDIA_SOURCE_COLLECTION_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_MEDIA_SOURCE_COLLECTION)) +#define MEDIA_SOURCE_COLLECTION_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_MEDIA_SOURCE_COLLECTION, MediaSourceCollectionClass)) + +typedef struct _MediaSourceCollection MediaSourceCollection; +typedef struct _MediaSourceCollectionClass MediaSourceCollectionClass; + +#define TYPE_MEDIA_COLLECTION_REGISTRY (media_collection_registry_get_type ()) +#define MEDIA_COLLECTION_REGISTRY(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_MEDIA_COLLECTION_REGISTRY, MediaCollectionRegistry)) +#define MEDIA_COLLECTION_REGISTRY_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_MEDIA_COLLECTION_REGISTRY, MediaCollectionRegistryClass)) +#define IS_MEDIA_COLLECTION_REGISTRY(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_MEDIA_COLLECTION_REGISTRY)) +#define IS_MEDIA_COLLECTION_REGISTRY_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_MEDIA_COLLECTION_REGISTRY)) +#define MEDIA_COLLECTION_REGISTRY_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_MEDIA_COLLECTION_REGISTRY, MediaCollectionRegistryClass)) + +typedef struct _MediaCollectionRegistry MediaCollectionRegistry; +typedef struct _MediaCollectionRegistryClass MediaCollectionRegistryClass; +#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL))) +#define _media_collection_registry_unref0(var) ((var == NULL) ? NULL : (var = (media_collection_registry_unref (var), NULL))) + +#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 _data_collection_unref0(var) ((var == NULL) ? NULL : (var = (data_collection_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 FOLDERS_TYPE_ROOT (folders_root_get_type ()) +#define FOLDERS_ROOT(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), FOLDERS_TYPE_ROOT, FoldersRoot)) +#define FOLDERS_ROOT_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), FOLDERS_TYPE_ROOT, FoldersRootClass)) +#define FOLDERS_IS_ROOT(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), FOLDERS_TYPE_ROOT)) +#define FOLDERS_IS_ROOT_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), FOLDERS_TYPE_ROOT)) +#define FOLDERS_ROOT_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), FOLDERS_TYPE_ROOT, FoldersRootClass)) + +typedef struct _FoldersRoot FoldersRoot; +typedef struct _FoldersRootClass FoldersRootClass; + +#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 _g_free0(var) (var = (g_free (var), NULL)) + +#define TYPE_DATA_SOURCE (data_source_get_type ()) +#define DATA_SOURCE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_DATA_SOURCE, DataSource)) +#define DATA_SOURCE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_DATA_SOURCE, DataSourceClass)) +#define IS_DATA_SOURCE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_DATA_SOURCE)) +#define IS_DATA_SOURCE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_DATA_SOURCE)) +#define DATA_SOURCE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_DATA_SOURCE, DataSourceClass)) + +typedef struct _DataSource DataSource; +typedef struct _DataSourceClass DataSourceClass; + +#define TYPE_THUMBNAIL_SOURCE (thumbnail_source_get_type ()) +#define THUMBNAIL_SOURCE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_THUMBNAIL_SOURCE, ThumbnailSource)) +#define THUMBNAIL_SOURCE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_THUMBNAIL_SOURCE, ThumbnailSourceClass)) +#define IS_THUMBNAIL_SOURCE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_THUMBNAIL_SOURCE)) +#define IS_THUMBNAIL_SOURCE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_THUMBNAIL_SOURCE)) +#define THUMBNAIL_SOURCE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_THUMBNAIL_SOURCE, ThumbnailSourceClass)) + +typedef struct _ThumbnailSource ThumbnailSource; +typedef struct _ThumbnailSourceClass ThumbnailSourceClass; + +#define TYPE_MEDIA_SOURCE (media_source_get_type ()) +#define MEDIA_SOURCE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_MEDIA_SOURCE, MediaSource)) +#define MEDIA_SOURCE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_MEDIA_SOURCE, MediaSourceClass)) +#define IS_MEDIA_SOURCE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_MEDIA_SOURCE)) +#define IS_MEDIA_SOURCE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_MEDIA_SOURCE)) +#define MEDIA_SOURCE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_MEDIA_SOURCE, MediaSourceClass)) + +typedef struct _MediaSource MediaSource; +typedef struct _MediaSourceClass MediaSourceClass; + +#define 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; + +#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; +typedef struct _SidebarGroupingPrivate SidebarGroupingPrivate; + +#define SIDEBAR_TYPE_EMPHASIZABLE_ENTRY (sidebar_emphasizable_entry_get_type ()) +#define SIDEBAR_EMPHASIZABLE_ENTRY(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), SIDEBAR_TYPE_EMPHASIZABLE_ENTRY, SidebarEmphasizableEntry)) +#define SIDEBAR_IS_EMPHASIZABLE_ENTRY(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), SIDEBAR_TYPE_EMPHASIZABLE_ENTRY)) +#define SIDEBAR_EMPHASIZABLE_ENTRY_GET_INTERFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE ((obj), SIDEBAR_TYPE_EMPHASIZABLE_ENTRY, SidebarEmphasizableEntryIface)) + +typedef struct _SidebarEmphasizableEntry SidebarEmphasizableEntry; +typedef struct _SidebarEmphasizableEntryIface SidebarEmphasizableEntryIface; +typedef struct _SidebarHeaderPrivate SidebarHeaderPrivate; +typedef struct _FoldersRootPrivate FoldersRootPrivate; + +#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; +typedef struct _FoldersSidebarEntryPrivate FoldersSidebarEntryPrivate; + +#define TYPE_CHECKERBOARD_PAGE (checkerboard_page_get_type ()) +#define CHECKERBOARD_PAGE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_CHECKERBOARD_PAGE, CheckerboardPage)) +#define CHECKERBOARD_PAGE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_CHECKERBOARD_PAGE, CheckerboardPageClass)) +#define IS_CHECKERBOARD_PAGE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_CHECKERBOARD_PAGE)) +#define IS_CHECKERBOARD_PAGE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_CHECKERBOARD_PAGE)) +#define CHECKERBOARD_PAGE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_CHECKERBOARD_PAGE, CheckerboardPageClass)) + +typedef struct _CheckerboardPage CheckerboardPage; +typedef struct _CheckerboardPageClass CheckerboardPageClass; + +#define TYPE_MEDIA_PAGE (media_page_get_type ()) +#define MEDIA_PAGE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_MEDIA_PAGE, MediaPage)) +#define MEDIA_PAGE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_MEDIA_PAGE, MediaPageClass)) +#define IS_MEDIA_PAGE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_MEDIA_PAGE)) +#define IS_MEDIA_PAGE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_MEDIA_PAGE)) +#define MEDIA_PAGE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_MEDIA_PAGE, MediaPageClass)) + +typedef struct _MediaPage MediaPage; +typedef struct _MediaPageClass MediaPageClass; + +#define TYPE_COLLECTION_PAGE (collection_page_get_type ()) +#define COLLECTION_PAGE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_COLLECTION_PAGE, CollectionPage)) +#define COLLECTION_PAGE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_COLLECTION_PAGE, CollectionPageClass)) +#define IS_COLLECTION_PAGE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_COLLECTION_PAGE)) +#define IS_COLLECTION_PAGE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_COLLECTION_PAGE)) +#define COLLECTION_PAGE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_COLLECTION_PAGE, CollectionPageClass)) + +typedef struct _CollectionPage CollectionPage; +typedef struct _CollectionPageClass CollectionPageClass; + +#define FOLDERS_TYPE_PAGE (folders_page_get_type ()) +#define FOLDERS_PAGE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), FOLDERS_TYPE_PAGE, FoldersPage)) +#define FOLDERS_PAGE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), FOLDERS_TYPE_PAGE, FoldersPageClass)) +#define FOLDERS_IS_PAGE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), FOLDERS_TYPE_PAGE)) +#define FOLDERS_IS_PAGE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), FOLDERS_TYPE_PAGE)) +#define FOLDERS_PAGE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), FOLDERS_TYPE_PAGE, FoldersPageClass)) + +typedef struct _FoldersPage FoldersPage; +typedef struct _FoldersPageClass FoldersPageClass; +#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 _FoldersBranch { + SidebarBranch parent_instance; + FoldersBranchPrivate * priv; +}; + +struct _FoldersBranchClass { + SidebarBranchClass parent_class; +}; + +struct _FoldersBranchPrivate { + GeeHashMap* entries; + GFile* home_dir; +}; + +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 _SidebarExpandableEntryIface { + GTypeInterface parent_iface; + gboolean (*expand_on_select) (SidebarExpandableEntry* self); +}; + +struct _SidebarRenameableEntryIface { + GTypeInterface parent_iface; + void (*rename) (SidebarRenameableEntry* self, const gchar* new_name); + gboolean (*is_user_renameable) (SidebarRenameableEntry* self); +}; + +struct _SidebarGrouping { + GObject parent_instance; + SidebarGroupingPrivate * priv; +}; + +struct _SidebarGroupingClass { + GObjectClass parent_class; +}; + +struct _SidebarEmphasizableEntryIface { + GTypeInterface parent_iface; + gboolean (*is_emphasized) (SidebarEmphasizableEntry* self); +}; + +struct _SidebarHeader { + SidebarGrouping parent_instance; + SidebarHeaderPrivate * priv; +}; + +struct _SidebarHeaderClass { + SidebarGroupingClass parent_class; +}; + +struct _FoldersRoot { + SidebarHeader parent_instance; + FoldersRootPrivate * priv; +}; + +struct _FoldersRootClass { + SidebarHeaderClass parent_class; +}; + +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 _FoldersSidebarEntry { + SidebarSimplePageEntry parent_instance; + FoldersSidebarEntryPrivate * priv; +}; + +struct _FoldersSidebarEntryClass { + SidebarSimplePageEntryClass parent_class; +}; + +struct _FoldersSidebarEntryPrivate { + GFile* _dir; + gchar* _collation; + gint _count; +}; + + +static gpointer folders_branch_parent_class = NULL; +static gpointer folders_root_parent_class = NULL; +static gpointer folders_sidebar_entry_parent_class = NULL; +extern gchar* folders_icon; +extern gchar* folders_have_photos_icon; +static SidebarExpandableEntryIface * folders_sidebar_entry_sidebar_expandable_entry_parent_iface = NULL; + +GType sidebar_branch_get_type (void) G_GNUC_CONST; +GType folders_branch_get_type (void) G_GNUC_CONST; +GType sidebar_simple_page_entry_get_type (void) G_GNUC_CONST; +GType folders_sidebar_entry_get_type (void) G_GNUC_CONST; +#define FOLDERS_BRANCH_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), FOLDERS_TYPE_BRANCH, FoldersBranchPrivate)) +enum { + FOLDERS_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 media_source_collection_get_type (void) G_GNUC_CONST; +gpointer media_collection_registry_ref (gpointer instance); +void media_collection_registry_unref (gpointer instance); +GParamSpec* param_spec_media_collection_registry (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags); +void value_set_media_collection_registry (GValue* value, gpointer v_object); +void value_take_media_collection_registry (GValue* value, gpointer v_object); +gpointer value_get_media_collection_registry (const GValue* value); +GType media_collection_registry_get_type (void) G_GNUC_CONST; +MediaCollectionRegistry* media_collection_registry_get_instance (void); +GeeCollection* media_collection_registry_get_all (MediaCollectionRegistry* self); +GType data_object_get_type (void) G_GNUC_CONST; +static void folders_branch_on_media_contents_altered (FoldersBranch* self, GeeIterable* added, GeeIterable* removed); +static void _folders_branch_on_media_contents_altered_data_collection_contents_altered (DataCollection* _sender, GeeIterable* added, GeeIterable* removed, gpointer self); +guint file_hash (GFile* file); +static guint _file_hash_gee_hash_data_func (gconstpointer v, gpointer self); +gboolean file_equal (GFile* a, GFile* b); +static gboolean _file_equal_gee_equal_data_func (gconstpointer a, gconstpointer b, gpointer self); +FoldersBranch* folders_branch_new (void); +FoldersBranch* folders_branch_construct (GType object_type); +FoldersRoot* folders_root_new (void); +FoldersRoot* folders_root_construct (GType object_type); +GType sidebar_grouping_get_type (void) G_GNUC_CONST; +GType sidebar_header_get_type (void) G_GNUC_CONST; +GType folders_root_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 folders_branch_comparator (SidebarEntry* a, SidebarEntry* b); +static gint _folders_branch_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); +GeeCollection* data_collection_get_all (DataCollection* self); +const gchar* folders_sidebar_entry_get_collation (FoldersSidebarEntry* self); +gchar* sidebar_simple_page_entry_get_sidebar_name (SidebarSimplePageEntry* self); +GType data_source_get_type (void) G_GNUC_CONST; +GType thumbnail_source_get_type (void) G_GNUC_CONST; +GType media_source_get_type (void) G_GNUC_CONST; +static void folders_branch_on_master_source_replaced (FoldersBranch* self, MediaSource* media_source, GFile* old_file, GFile* new_file); +static void folders_branch_remove_entry (FoldersBranch* self, GFile* file); +static void folders_branch_add_entry (FoldersBranch* self, MediaSource* media); +static void _folders_branch_on_master_source_replaced_media_source_master_replaced (MediaSource* _sender, GFile* old_file, GFile* new_file, gpointer self); +GFile* media_source_get_file (MediaSource* self); +FoldersSidebarEntry* folders_sidebar_entry_new (GFile* dir); +FoldersSidebarEntry* folders_sidebar_entry_construct (GType object_type, GFile* dir); +SidebarEntry* sidebar_branch_get_root (SidebarBranch* self); +void sidebar_branch_graft (SidebarBranch* self, SidebarEntry* parent, SidebarEntry* entry, GCompareFunc comparator); +gint folders_sidebar_entry_get_count (FoldersSidebarEntry* self); +void folders_sidebar_entry_set_count (FoldersSidebarEntry* self, gint value); +gint sidebar_branch_get_child_count (SidebarBranch* self, SidebarEntry* parent); +GFile* folders_sidebar_entry_get_dir (FoldersSidebarEntry* self); +SidebarEntry* sidebar_branch_get_parent (SidebarBranch* self, SidebarEntry* entry); +void sidebar_branch_prune (SidebarBranch* self, SidebarEntry* entry); +static void folders_branch_finalize (GObject * obj); +GType sidebar_expandable_entry_get_type (void) G_GNUC_CONST; +GType sidebar_renameable_entry_get_type (void) G_GNUC_CONST; +GType sidebar_emphasizable_entry_get_type (void) G_GNUC_CONST; +enum { + FOLDERS_ROOT_DUMMY_PROPERTY +}; +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_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; +#define FOLDERS_SIDEBAR_ENTRY_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), FOLDERS_TYPE_SIDEBAR_ENTRY, FoldersSidebarEntryPrivate)) +enum { + FOLDERS_SIDEBAR_ENTRY_DUMMY_PROPERTY, + FOLDERS_SIDEBAR_ENTRY_DIR_PROPERTY, + FOLDERS_SIDEBAR_ENTRY_COLLATION_PROPERTY, + FOLDERS_SIDEBAR_ENTRY_COUNT_PROPERTY +}; +SidebarSimplePageEntry* sidebar_simple_page_entry_construct (GType object_type); +static void folders_sidebar_entry_set_dir (FoldersSidebarEntry* self, GFile* value); +static void folders_sidebar_entry_set_collation (FoldersSidebarEntry* self, const gchar* value); +static gchar* folders_sidebar_entry_real_get_sidebar_name (SidebarSimplePageEntry* base); +static gchar* folders_sidebar_entry_real_get_sidebar_icon (SidebarSimplePageEntry* base); +static gchar* folders_sidebar_entry_real_to_string (SidebarSimplePageEntry* base); +static gboolean folders_sidebar_entry_real_expand_on_select (SidebarExpandableEntry* base); +static Page* folders_sidebar_entry_real_create_page (SidebarSimplePageEntry* base); +FoldersPage* folders_page_new (GFile* dir); +FoldersPage* folders_page_construct (GType object_type, GFile* dir); +GType checkerboard_page_get_type (void) G_GNUC_CONST; +GType media_page_get_type (void) G_GNUC_CONST; +GType collection_page_get_type (void) G_GNUC_CONST; +GType folders_page_get_type (void) G_GNUC_CONST; +gchar* sidebar_simple_page_entry_get_sidebar_icon (SidebarSimplePageEntry* self); +static void folders_sidebar_entry_finalize (GObject * obj); +static void _vala_folders_sidebar_entry_get_property (GObject * object, guint property_id, GValue * value, GParamSpec * pspec); +static void _vala_folders_sidebar_entry_set_property (GObject * object, guint property_id, const GValue * value, GParamSpec * pspec); + + +static void _folders_branch_on_media_contents_altered_data_collection_contents_altered (DataCollection* _sender, GeeIterable* added, GeeIterable* removed, gpointer self) { +#line 31 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" + folders_branch_on_media_contents_altered ((FoldersBranch*) self, added, removed); +#line 563 "FoldersBranch.c" +} + + +static guint _file_hash_gee_hash_data_func (gconstpointer v, gpointer self) { + guint result; + result = file_hash ((GFile*) v); +#line 8 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" + return result; +#line 572 "FoldersBranch.c" +} + + +static gboolean _file_equal_gee_equal_data_func (gconstpointer a, gconstpointer b, gpointer self) { + gboolean result; + result = file_equal ((GFile*) a, (GFile*) b); +#line 8 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" + return result; +#line 581 "FoldersBranch.c" +} + + +static gint _folders_branch_comparator_gcompare_func (gconstpointer a, gconstpointer b) { + gint result; + result = folders_branch_comparator ((SidebarEntry*) a, (SidebarEntry*) b); +#line 13 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" + return result; +#line 590 "FoldersBranch.c" +} + + +FoldersBranch* folders_branch_construct (GType object_type) { + FoldersBranch * self = NULL; + FoldersRoot* _tmp0_; + FoldersRoot* _tmp1_; + const gchar* _tmp2_; + GFile* _tmp3_; +#line 13 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" + _tmp0_ = folders_root_new (); +#line 13 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" + _tmp1_ = _tmp0_; +#line 13 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" + self = (FoldersBranch*) sidebar_branch_construct (object_type, G_TYPE_CHECK_INSTANCE_CAST (_tmp1_, SIDEBAR_TYPE_ENTRY, SidebarEntry), SIDEBAR_BRANCH_OPTIONS_STARTUP_OPEN_GROUPING | SIDEBAR_BRANCH_OPTIONS_HIDE_IF_EMPTY, _folders_branch_comparator_gcompare_func, NULL); +#line 13 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" + _g_object_unref0 (_tmp1_); +#line 18 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" + _tmp2_ = g_get_home_dir (); +#line 18 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" + _tmp3_ = g_file_new_for_path (_tmp2_); +#line 18 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" + _g_object_unref0 (self->priv->home_dir); +#line 18 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" + self->priv->home_dir = _tmp3_; +#line 616 "FoldersBranch.c" + { + GeeIterator* _sources_it = NULL; + MediaCollectionRegistry* _tmp4_; + MediaCollectionRegistry* _tmp5_; + GeeCollection* _tmp6_; + GeeCollection* _tmp7_; + GeeIterator* _tmp8_; + GeeIterator* _tmp9_; +#line 20 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" + _tmp4_ = media_collection_registry_get_instance (); +#line 20 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" + _tmp5_ = _tmp4_; +#line 20 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" + _tmp6_ = media_collection_registry_get_all (_tmp5_); +#line 20 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" + _tmp7_ = _tmp6_; +#line 20 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" + _tmp8_ = gee_iterable_iterator (G_TYPE_CHECK_INSTANCE_CAST (_tmp7_, GEE_TYPE_ITERABLE, GeeIterable)); +#line 20 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" + _tmp9_ = _tmp8_; +#line 20 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" + _g_object_unref0 (_tmp7_); +#line 20 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" + _media_collection_registry_unref0 (_tmp5_); +#line 20 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" + _sources_it = _tmp9_; +#line 20 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" + while (TRUE) { +#line 645 "FoldersBranch.c" + GeeIterator* _tmp10_; + gboolean _tmp11_; + MediaSourceCollection* sources = NULL; + GeeIterator* _tmp12_; + gpointer _tmp13_; + MediaSourceCollection* _tmp14_; + GeeCollection* _tmp15_; + GeeCollection* _tmp16_; + MediaSourceCollection* _tmp17_; +#line 20 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" + _tmp10_ = _sources_it; +#line 20 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" + _tmp11_ = gee_iterator_next (_tmp10_); +#line 20 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" + if (!_tmp11_) { +#line 20 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" + break; +#line 663 "FoldersBranch.c" + } +#line 20 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" + _tmp12_ = _sources_it; +#line 20 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" + _tmp13_ = gee_iterator_get (_tmp12_); +#line 20 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" + sources = (MediaSourceCollection*) _tmp13_; +#line 22 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" + _tmp14_ = sources; +#line 22 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" + _tmp15_ = data_collection_get_all (G_TYPE_CHECK_INSTANCE_CAST (_tmp14_, TYPE_DATA_COLLECTION, DataCollection)); +#line 22 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" + _tmp16_ = _tmp15_; +#line 22 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" + folders_branch_on_media_contents_altered (self, G_TYPE_CHECK_INSTANCE_CAST (_tmp16_, GEE_TYPE_ITERABLE, GeeIterable), NULL); +#line 22 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" + _g_object_unref0 (_tmp16_); +#line 25 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" + _tmp17_ = sources; +#line 25 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" + g_signal_connect_object (G_TYPE_CHECK_INSTANCE_CAST (_tmp17_, TYPE_DATA_COLLECTION, DataCollection), "contents-altered", (GCallback) _folders_branch_on_media_contents_altered_data_collection_contents_altered, self, 0); +#line 20 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" + _data_collection_unref0 (sources); +#line 687 "FoldersBranch.c" + } +#line 20 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" + _g_object_unref0 (_sources_it); +#line 691 "FoldersBranch.c" + } +#line 12 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" + return self; +#line 695 "FoldersBranch.c" +} + + +FoldersBranch* folders_branch_new (void) { +#line 12 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" + return folders_branch_construct (FOLDERS_TYPE_BRANCH); +#line 702 "FoldersBranch.c" +} + + +static gint folders_branch_comparator (SidebarEntry* a, SidebarEntry* b) { + gint result = 0; + SidebarEntry* _tmp0_; + SidebarEntry* _tmp1_; + gint coll_key_equality = 0; + GCompareFunc _tmp2_; + SidebarEntry* _tmp3_; + const gchar* _tmp4_; + const gchar* _tmp5_; + SidebarEntry* _tmp6_; + const gchar* _tmp7_; + const gchar* _tmp8_; + gint _tmp9_; + gint _tmp10_; +#line 34 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" + g_return_val_if_fail (SIDEBAR_IS_ENTRY (a), 0); +#line 34 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" + g_return_val_if_fail (SIDEBAR_IS_ENTRY (b), 0); +#line 35 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" + _tmp0_ = a; +#line 35 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" + _tmp1_ = b; +#line 35 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" + if (_tmp0_ == _tmp1_) { +#line 36 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" + result = 0; +#line 36 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" + return result; +#line 734 "FoldersBranch.c" + } +#line 38 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" + _tmp2_ = g_strcmp0; +#line 38 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" + _tmp3_ = a; +#line 38 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" + _tmp4_ = folders_sidebar_entry_get_collation (G_TYPE_CHECK_INSTANCE_CAST (_tmp3_, FOLDERS_TYPE_SIDEBAR_ENTRY, FoldersSidebarEntry)); +#line 38 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" + _tmp5_ = _tmp4_; +#line 38 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" + _tmp6_ = b; +#line 38 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" + _tmp7_ = folders_sidebar_entry_get_collation (G_TYPE_CHECK_INSTANCE_CAST (_tmp6_, FOLDERS_TYPE_SIDEBAR_ENTRY, FoldersSidebarEntry)); +#line 38 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" + _tmp8_ = _tmp7_; +#line 38 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" + _tmp9_ = _tmp2_ (_tmp5_, _tmp8_); +#line 38 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" + coll_key_equality = _tmp9_; +#line 41 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" + _tmp10_ = coll_key_equality; +#line 41 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" + if (_tmp10_ == 0) { +#line 758 "FoldersBranch.c" + GCompareFunc _tmp11_; + SidebarEntry* _tmp12_; + gchar* _tmp13_; + gchar* _tmp14_; + SidebarEntry* _tmp15_; + gchar* _tmp16_; + gchar* _tmp17_; + gint _tmp18_; + gint _tmp19_; +#line 44 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" + _tmp11_ = g_strcmp0; +#line 44 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" + _tmp12_ = a; +#line 44 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" + _tmp13_ = sidebar_simple_page_entry_get_sidebar_name (G_TYPE_CHECK_INSTANCE_CAST (G_TYPE_CHECK_INSTANCE_CAST (_tmp12_, FOLDERS_TYPE_SIDEBAR_ENTRY, FoldersSidebarEntry), SIDEBAR_TYPE_SIMPLE_PAGE_ENTRY, SidebarSimplePageEntry)); +#line 44 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" + _tmp14_ = _tmp13_; +#line 44 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" + _tmp15_ = b; +#line 44 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" + _tmp16_ = sidebar_simple_page_entry_get_sidebar_name (G_TYPE_CHECK_INSTANCE_CAST (G_TYPE_CHECK_INSTANCE_CAST (_tmp15_, FOLDERS_TYPE_SIDEBAR_ENTRY, FoldersSidebarEntry), SIDEBAR_TYPE_SIMPLE_PAGE_ENTRY, SidebarSimplePageEntry)); +#line 44 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" + _tmp17_ = _tmp16_; +#line 44 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" + _tmp18_ = _tmp11_ (_tmp14_, _tmp17_); +#line 44 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" + _tmp19_ = _tmp18_; +#line 44 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" + _g_free0 (_tmp17_); +#line 44 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" + _g_free0 (_tmp14_); +#line 44 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" + result = _tmp19_; +#line 44 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" + return result; +#line 794 "FoldersBranch.c" + } +#line 48 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" + result = coll_key_equality; +#line 48 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" + return result; +#line 800 "FoldersBranch.c" +} + + +static void folders_branch_on_master_source_replaced (FoldersBranch* self, MediaSource* media_source, GFile* old_file, GFile* new_file) { + GFile* _tmp0_; + MediaSource* _tmp1_; +#line 51 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" + g_return_if_fail (FOLDERS_IS_BRANCH (self)); +#line 51 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" + g_return_if_fail (IS_MEDIA_SOURCE (media_source)); +#line 51 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" + g_return_if_fail (G_IS_FILE (old_file)); +#line 51 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" + g_return_if_fail (G_IS_FILE (new_file)); +#line 52 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" + _tmp0_ = old_file; +#line 52 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" + folders_branch_remove_entry (self, _tmp0_); +#line 53 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" + _tmp1_ = media_source; +#line 53 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" + folders_branch_add_entry (self, _tmp1_); +#line 823 "FoldersBranch.c" +} + + +static void _folders_branch_on_master_source_replaced_media_source_master_replaced (MediaSource* _sender, GFile* old_file, GFile* new_file, gpointer self) { +#line 60 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" + folders_branch_on_master_source_replaced ((FoldersBranch*) self, _sender, old_file, new_file); +#line 830 "FoldersBranch.c" +} + + +static void folders_branch_on_media_contents_altered (FoldersBranch* self, GeeIterable* added, GeeIterable* removed) { + GeeIterable* _tmp0_; + GeeIterable* _tmp9_; +#line 56 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" + g_return_if_fail (FOLDERS_IS_BRANCH (self)); +#line 56 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" + g_return_if_fail ((added == NULL) || GEE_IS_ITERABLE (added)); +#line 56 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" + g_return_if_fail ((removed == NULL) || GEE_IS_ITERABLE (removed)); +#line 57 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" + _tmp0_ = added; +#line 57 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" + if (_tmp0_ != NULL) { +#line 847 "FoldersBranch.c" + { + GeeIterator* _object_it = NULL; + GeeIterable* _tmp1_; + GeeIterator* _tmp2_; +#line 58 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" + _tmp1_ = added; +#line 58 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" + _tmp2_ = gee_iterable_iterator (_tmp1_); +#line 58 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" + _object_it = _tmp2_; +#line 58 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" + while (TRUE) { +#line 860 "FoldersBranch.c" + GeeIterator* _tmp3_; + gboolean _tmp4_; + DataObject* object = NULL; + GeeIterator* _tmp5_; + gpointer _tmp6_; + DataObject* _tmp7_; + DataObject* _tmp8_; +#line 58 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" + _tmp3_ = _object_it; +#line 58 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" + _tmp4_ = gee_iterator_next (_tmp3_); +#line 58 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" + if (!_tmp4_) { +#line 58 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" + break; +#line 876 "FoldersBranch.c" + } +#line 58 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" + _tmp5_ = _object_it; +#line 58 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" + _tmp6_ = gee_iterator_get (_tmp5_); +#line 58 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" + object = (DataObject*) _tmp6_; +#line 59 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" + _tmp7_ = object; +#line 59 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" + folders_branch_add_entry (self, G_TYPE_CHECK_INSTANCE_CAST (_tmp7_, TYPE_MEDIA_SOURCE, MediaSource)); +#line 60 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" + _tmp8_ = object; +#line 60 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" + g_signal_connect_object (G_TYPE_CHECK_INSTANCE_CAST (_tmp8_, TYPE_MEDIA_SOURCE, MediaSource), "master-replaced", (GCallback) _folders_branch_on_master_source_replaced_media_source_master_replaced, self, 0); +#line 58 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" + _g_object_unref0 (object); +#line 894 "FoldersBranch.c" + } +#line 58 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" + _g_object_unref0 (_object_it); +#line 898 "FoldersBranch.c" + } + } +#line 64 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" + _tmp9_ = removed; +#line 64 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" + if (_tmp9_ != NULL) { +#line 905 "FoldersBranch.c" + { + GeeIterator* _object_it = NULL; + GeeIterable* _tmp10_; + GeeIterator* _tmp11_; +#line 65 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" + _tmp10_ = removed; +#line 65 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" + _tmp11_ = gee_iterable_iterator (_tmp10_); +#line 65 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" + _object_it = _tmp11_; +#line 65 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" + while (TRUE) { +#line 918 "FoldersBranch.c" + GeeIterator* _tmp12_; + gboolean _tmp13_; + DataObject* object = NULL; + GeeIterator* _tmp14_; + gpointer _tmp15_; + DataObject* _tmp16_; + GFile* _tmp17_; + GFile* _tmp18_; + DataObject* _tmp19_; + guint _tmp20_; +#line 65 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" + _tmp12_ = _object_it; +#line 65 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" + _tmp13_ = gee_iterator_next (_tmp12_); +#line 65 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" + if (!_tmp13_) { +#line 65 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" + break; +#line 937 "FoldersBranch.c" + } +#line 65 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" + _tmp14_ = _object_it; +#line 65 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" + _tmp15_ = gee_iterator_get (_tmp14_); +#line 65 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" + object = (DataObject*) _tmp15_; +#line 66 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" + _tmp16_ = object; +#line 66 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" + _tmp17_ = media_source_get_file (G_TYPE_CHECK_INSTANCE_CAST (_tmp16_, TYPE_MEDIA_SOURCE, MediaSource)); +#line 66 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" + _tmp18_ = _tmp17_; +#line 66 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" + folders_branch_remove_entry (self, _tmp18_); +#line 66 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" + _g_object_unref0 (_tmp18_); +#line 67 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" + _tmp19_ = object; +#line 67 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" + g_signal_parse_name ("master-replaced", TYPE_MEDIA_SOURCE, &_tmp20_, NULL, FALSE); +#line 67 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" + g_signal_handlers_disconnect_matched (G_TYPE_CHECK_INSTANCE_CAST (_tmp19_, TYPE_MEDIA_SOURCE, MediaSource), G_SIGNAL_MATCH_ID | G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA, _tmp20_, 0, NULL, (GCallback) _folders_branch_on_master_source_replaced_media_source_master_replaced, self); +#line 65 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" + _g_object_unref0 (object); +#line 963 "FoldersBranch.c" + } +#line 65 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" + _g_object_unref0 (_object_it); +#line 967 "FoldersBranch.c" + } + } +} + + +static gpointer _g_object_ref0 (gpointer self) { +#line 96 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" + return self ? g_object_ref (self) : NULL; +#line 976 "FoldersBranch.c" +} + + +static void folders_branch_add_entry (FoldersBranch* self, MediaSource* media) { + GFile* file = NULL; + MediaSource* _tmp0_; + GFile* _tmp1_; + GeeArrayList* elements = NULL; + GeeArrayList* _tmp2_; + GFile* parent = NULL; + GFile* _tmp3_; + GFile* _tmp4_; + FoldersSidebarEntry* parent_entry = NULL; +#line 72 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" + g_return_if_fail (FOLDERS_IS_BRANCH (self)); +#line 72 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" + g_return_if_fail (IS_MEDIA_SOURCE (media)); +#line 73 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" + _tmp0_ = media; +#line 73 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" + _tmp1_ = media_source_get_file (_tmp0_); +#line 73 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" + file = _tmp1_; +#line 75 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" + _tmp2_ = gee_array_list_new (g_file_get_type (), (GBoxedCopyFunc) g_object_ref, (GDestroyNotify) g_object_unref, NULL, NULL, NULL); +#line 75 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" + elements = _tmp2_; +#line 78 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" + _tmp3_ = file; +#line 78 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" + _tmp4_ = g_file_get_parent (_tmp3_); +#line 78 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" + parent = _tmp4_; +#line 79 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" + while (TRUE) { +#line 1012 "FoldersBranch.c" + gboolean _tmp5_ = FALSE; + GFile* _tmp6_; + GFile* _tmp10_; + GFile* _tmp11_; + GFile* _tmp12_; + GFile* _tmp13_; + gboolean _tmp14_; + gboolean _tmp15_; + GeeArrayList* _tmp16_; + GFile* _tmp17_; + GFile* _tmp18_; + GFile* _tmp19_; +#line 79 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" + _tmp6_ = parent; +#line 79 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" + if (_tmp6_ != NULL) { +#line 1029 "FoldersBranch.c" + GFile* _tmp7_; + gchar* _tmp8_; + gchar* _tmp9_; +#line 79 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" + _tmp7_ = parent; +#line 79 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" + _tmp8_ = g_file_get_path (_tmp7_); +#line 79 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" + _tmp9_ = _tmp8_; +#line 79 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" + _tmp5_ = _tmp9_ != NULL; +#line 79 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" + _g_free0 (_tmp9_); +#line 1043 "FoldersBranch.c" + } else { +#line 79 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" + _tmp5_ = FALSE; +#line 1047 "FoldersBranch.c" + } +#line 79 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" + if (!_tmp5_) { +#line 79 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" + break; +#line 1053 "FoldersBranch.c" + } +#line 81 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" + _tmp10_ = parent; +#line 81 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" + _tmp11_ = self->priv->home_dir; +#line 81 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" + _tmp12_ = g_file_get_parent (_tmp11_); +#line 81 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" + _tmp13_ = _tmp12_; +#line 81 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" + _tmp14_ = g_file_equal (_tmp10_, _tmp13_); +#line 81 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" + _tmp15_ = _tmp14_; +#line 81 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" + _g_object_unref0 (_tmp13_); +#line 81 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" + if (_tmp15_) { +#line 82 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" + break; +#line 1073 "FoldersBranch.c" + } +#line 84 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" + _tmp16_ = elements; +#line 84 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" + _tmp17_ = parent; +#line 84 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" + gee_abstract_collection_add (G_TYPE_CHECK_INSTANCE_CAST (_tmp16_, GEE_TYPE_ABSTRACT_COLLECTION, GeeAbstractCollection), _tmp17_); +#line 86 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" + _tmp18_ = parent; +#line 86 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" + _tmp19_ = g_file_get_parent (_tmp18_); +#line 86 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" + _g_object_unref0 (parent); +#line 86 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" + parent = _tmp19_; +#line 1089 "FoldersBranch.c" + } +#line 91 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" + parent_entry = NULL; +#line 1093 "FoldersBranch.c" + { + gint ctr = 0; + GeeArrayList* _tmp20_; + gint _tmp21_; + gint _tmp22_; +#line 92 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" + _tmp20_ = elements; +#line 92 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" + _tmp21_ = gee_abstract_collection_get_size (G_TYPE_CHECK_INSTANCE_CAST (_tmp20_, GEE_TYPE_ABSTRACT_COLLECTION, GeeAbstractCollection)); +#line 92 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" + _tmp22_ = _tmp21_; +#line 92 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" + ctr = _tmp22_ - 1; +#line 1107 "FoldersBranch.c" + { + gboolean _tmp23_ = FALSE; +#line 92 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" + _tmp23_ = TRUE; +#line 92 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" + while (TRUE) { +#line 1114 "FoldersBranch.c" + gint _tmp25_; + GFile* parent_dir = NULL; + GeeArrayList* _tmp26_; + gint _tmp27_; + gpointer _tmp28_; + FoldersSidebarEntry* old_parent_entry = NULL; + FoldersSidebarEntry* _tmp29_; + FoldersSidebarEntry* _tmp30_; + GeeHashMap* _tmp31_; + GFile* _tmp32_; + gpointer _tmp33_; + FoldersSidebarEntry* _tmp34_; + gint _tmp46_; +#line 92 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" + if (!_tmp23_) { +#line 1130 "FoldersBranch.c" + gint _tmp24_; +#line 92 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" + _tmp24_ = ctr; +#line 92 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" + ctr = _tmp24_ - 1; +#line 1136 "FoldersBranch.c" + } +#line 92 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" + _tmp23_ = FALSE; +#line 92 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" + _tmp25_ = ctr; +#line 92 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" + if (!(_tmp25_ >= 0)) { +#line 92 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" + break; +#line 1146 "FoldersBranch.c" + } +#line 93 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" + _tmp26_ = elements; +#line 93 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" + _tmp27_ = ctr; +#line 93 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" + _tmp28_ = gee_abstract_list_get (G_TYPE_CHECK_INSTANCE_CAST (_tmp26_, GEE_TYPE_ABSTRACT_LIST, GeeAbstractList), _tmp27_); +#line 93 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" + parent_dir = (GFile*) _tmp28_; +#line 96 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" + _tmp29_ = parent_entry; +#line 96 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" + _tmp30_ = _g_object_ref0 (_tmp29_); +#line 96 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" + old_parent_entry = _tmp30_; +#line 98 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" + _tmp31_ = self->priv->entries; +#line 98 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" + _tmp32_ = parent_dir; +#line 98 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" + _tmp33_ = gee_abstract_map_get (G_TYPE_CHECK_INSTANCE_CAST (_tmp31_, GEE_TYPE_ABSTRACT_MAP, GeeAbstractMap), _tmp32_); +#line 98 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" + _g_object_unref0 (parent_entry); +#line 98 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" + parent_entry = (FoldersSidebarEntry*) _tmp33_; +#line 99 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" + _tmp34_ = parent_entry; +#line 99 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" + if (_tmp34_ == NULL) { +#line 1176 "FoldersBranch.c" + GFile* _tmp35_; + FoldersSidebarEntry* _tmp36_; + GeeHashMap* _tmp37_; + GFile* _tmp38_; + FoldersSidebarEntry* _tmp39_; + SidebarEntry* _tmp40_ = NULL; + FoldersSidebarEntry* _tmp41_; + FoldersSidebarEntry* _tmp45_; +#line 100 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" + _tmp35_ = parent_dir; +#line 100 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" + _tmp36_ = folders_sidebar_entry_new (_tmp35_); +#line 100 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" + _g_object_unref0 (parent_entry); +#line 100 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" + parent_entry = _tmp36_; +#line 101 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" + _tmp37_ = self->priv->entries; +#line 101 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" + _tmp38_ = parent_dir; +#line 101 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" + _tmp39_ = parent_entry; +#line 101 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" + gee_abstract_map_set (G_TYPE_CHECK_INSTANCE_CAST (_tmp37_, GEE_TYPE_ABSTRACT_MAP, GeeAbstractMap), _tmp38_, _tmp39_); +#line 103 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" + _tmp41_ = old_parent_entry; +#line 103 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" + if (_tmp41_ == NULL) { +#line 1205 "FoldersBranch.c" + SidebarEntry* _tmp42_; +#line 103 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" + _tmp42_ = sidebar_branch_get_root (G_TYPE_CHECK_INSTANCE_CAST (self, SIDEBAR_TYPE_BRANCH, SidebarBranch)); +#line 103 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" + _g_object_unref0 (_tmp40_); +#line 103 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" + _tmp40_ = _tmp42_; +#line 1213 "FoldersBranch.c" + } else { + FoldersSidebarEntry* _tmp43_; + SidebarEntry* _tmp44_; +#line 103 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" + _tmp43_ = old_parent_entry; +#line 103 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" + _tmp44_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_CAST (_tmp43_, SIDEBAR_TYPE_ENTRY, SidebarEntry)); +#line 103 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" + _g_object_unref0 (_tmp40_); +#line 103 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" + _tmp40_ = _tmp44_; +#line 1225 "FoldersBranch.c" + } +#line 103 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" + _tmp45_ = parent_entry; +#line 103 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" + sidebar_branch_graft (G_TYPE_CHECK_INSTANCE_CAST (self, SIDEBAR_TYPE_BRANCH, SidebarBranch), _tmp40_, G_TYPE_CHECK_INSTANCE_CAST (_tmp45_, SIDEBAR_TYPE_ENTRY, SidebarEntry), NULL); +#line 99 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" + _g_object_unref0 (_tmp40_); +#line 1233 "FoldersBranch.c" + } +#line 107 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" + _tmp46_ = ctr; +#line 107 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" + if (_tmp46_ == 0) { +#line 1239 "FoldersBranch.c" + FoldersSidebarEntry* _tmp47_; + gint _tmp48_; + gint _tmp49_; +#line 108 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" + _tmp47_ = parent_entry; +#line 108 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" + _tmp48_ = folders_sidebar_entry_get_count (_tmp47_); +#line 108 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" + _tmp49_ = _tmp48_; +#line 108 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" + folders_sidebar_entry_set_count (_tmp47_, _tmp49_ + 1); +#line 1251 "FoldersBranch.c" + } +#line 92 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" + _g_object_unref0 (old_parent_entry); +#line 92 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" + _g_object_unref0 (parent_dir); +#line 1257 "FoldersBranch.c" + } + } + } +#line 72 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" + _g_object_unref0 (parent_entry); +#line 72 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" + _g_object_unref0 (parent); +#line 72 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" + _g_object_unref0 (elements); +#line 72 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" + _g_object_unref0 (file); +#line 1269 "FoldersBranch.c" +} + + +static void folders_branch_remove_entry (FoldersBranch* self, GFile* file) { + FoldersSidebarEntry* folder_entry = NULL; + GeeHashMap* _tmp0_; + GFile* _tmp1_; + GFile* _tmp2_; + GFile* _tmp3_; + gpointer _tmp4_; + FoldersSidebarEntry* _tmp5_; + FoldersSidebarEntry* _tmp6_; + FoldersSidebarEntry* _tmp7_; + gint _tmp8_; + gint _tmp9_; + gboolean _tmp10_ = FALSE; + FoldersSidebarEntry* _tmp11_; + FoldersSidebarEntry* _tmp12_; + gint _tmp13_; + gint _tmp14_; + FoldersSidebarEntry* prune_point = NULL; + FoldersSidebarEntry* _tmp17_; + FoldersSidebarEntry* _tmp18_; + FoldersSidebarEntry* _tmp19_; + FoldersSidebarEntry* _tmp40_; +#line 112 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" + g_return_if_fail (FOLDERS_IS_BRANCH (self)); +#line 112 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" + g_return_if_fail (G_IS_FILE (file)); +#line 113 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" + _tmp0_ = self->priv->entries; +#line 113 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" + _tmp1_ = file; +#line 113 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" + _tmp2_ = g_file_get_parent (_tmp1_); +#line 113 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" + _tmp3_ = _tmp2_; +#line 113 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" + _tmp4_ = gee_abstract_map_get (G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, GEE_TYPE_ABSTRACT_MAP, GeeAbstractMap), _tmp3_); +#line 113 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" + _tmp5_ = (FoldersSidebarEntry*) _tmp4_; +#line 113 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" + _g_object_unref0 (_tmp3_); +#line 113 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" + folder_entry = _tmp5_; +#line 114 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" + _tmp6_ = folder_entry; +#line 114 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" + if (_tmp6_ == NULL) { +#line 115 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" + _g_object_unref0 (folder_entry); +#line 115 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" + return; +#line 1323 "FoldersBranch.c" + } +#line 117 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" + _tmp7_ = folder_entry; +#line 117 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" + _tmp8_ = folders_sidebar_entry_get_count (_tmp7_); +#line 117 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" + _tmp9_ = _tmp8_; +#line 117 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" + _vala_assert (_tmp9_ > 0, "folder_entry.count > 0"); +#line 120 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" + _tmp11_ = folder_entry; +#line 120 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" + _tmp12_ = folder_entry; +#line 120 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" + _tmp13_ = folders_sidebar_entry_get_count (_tmp12_); +#line 120 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" + _tmp14_ = _tmp13_; +#line 120 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" + folders_sidebar_entry_set_count (_tmp12_, _tmp14_ - 1); +#line 120 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" + if ((_tmp14_ - 1) > 0) { +#line 120 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" + _tmp10_ = TRUE; +#line 1347 "FoldersBranch.c" + } else { + FoldersSidebarEntry* _tmp15_; + gint _tmp16_; +#line 120 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" + _tmp15_ = folder_entry; +#line 120 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" + _tmp16_ = sidebar_branch_get_child_count (G_TYPE_CHECK_INSTANCE_CAST (self, SIDEBAR_TYPE_BRANCH, SidebarBranch), G_TYPE_CHECK_INSTANCE_CAST (_tmp15_, SIDEBAR_TYPE_ENTRY, SidebarEntry)); +#line 120 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" + _tmp10_ = _tmp16_ > 0; +#line 1357 "FoldersBranch.c" + } +#line 120 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" + if (_tmp10_) { +#line 121 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" + _g_object_unref0 (folder_entry); +#line 121 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" + return; +#line 1365 "FoldersBranch.c" + } +#line 124 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" + _tmp17_ = folder_entry; +#line 124 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" + _tmp18_ = _g_object_ref0 (_tmp17_); +#line 124 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" + prune_point = _tmp18_; +#line 125 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" + _tmp19_ = prune_point; +#line 125 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" + _vala_assert (_tmp19_ != NULL, "prune_point != null"); +#line 1377 "FoldersBranch.c" + { + gboolean _tmp20_ = FALSE; +#line 127 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" + _tmp20_ = TRUE; +#line 127 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" + while (TRUE) { +#line 1384 "FoldersBranch.c" + gboolean removed = FALSE; + GeeHashMap* _tmp21_; + FoldersSidebarEntry* _tmp22_; + GFile* _tmp23_; + GFile* _tmp24_; + gboolean _tmp25_; + gboolean _tmp26_; + FoldersSidebarEntry* parent = NULL; + FoldersSidebarEntry* _tmp27_; + SidebarEntry* _tmp28_; + FoldersSidebarEntry* _tmp29_; + gboolean _tmp30_ = FALSE; + gboolean _tmp31_ = FALSE; + FoldersSidebarEntry* _tmp32_; + FoldersSidebarEntry* _tmp38_; + FoldersSidebarEntry* _tmp39_; +#line 127 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" + if (!_tmp20_) { +#line 1403 "FoldersBranch.c" + } +#line 127 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" + _tmp20_ = FALSE; +#line 128 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" + _tmp21_ = self->priv->entries; +#line 128 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" + _tmp22_ = prune_point; +#line 128 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" + _tmp23_ = folders_sidebar_entry_get_dir (_tmp22_); +#line 128 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" + _tmp24_ = _tmp23_; +#line 128 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" + _tmp25_ = gee_abstract_map_unset (G_TYPE_CHECK_INSTANCE_CAST (_tmp21_, GEE_TYPE_ABSTRACT_MAP, GeeAbstractMap), _tmp24_, NULL); +#line 128 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" + removed = _tmp25_; +#line 129 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" + _tmp26_ = removed; +#line 129 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" + _vala_assert (_tmp26_, "removed"); +#line 131 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" + _tmp27_ = prune_point; +#line 131 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" + _tmp28_ = sidebar_branch_get_parent (G_TYPE_CHECK_INSTANCE_CAST (self, SIDEBAR_TYPE_BRANCH, SidebarBranch), G_TYPE_CHECK_INSTANCE_CAST (_tmp27_, SIDEBAR_TYPE_ENTRY, SidebarEntry)); +#line 131 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" + _tmp29_ = G_TYPE_CHECK_INSTANCE_TYPE (_tmp28_, FOLDERS_TYPE_SIDEBAR_ENTRY) ? ((FoldersSidebarEntry*) _tmp28_) : NULL; +#line 131 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" + if (_tmp29_ == NULL) { +#line 131 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" + _g_object_unref0 (_tmp28_); +#line 1433 "FoldersBranch.c" + } +#line 131 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" + parent = _tmp29_; +#line 132 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" + _tmp32_ = parent; +#line 132 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" + if (_tmp32_ == NULL) { +#line 132 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" + _tmp31_ = TRUE; +#line 1443 "FoldersBranch.c" + } else { + FoldersSidebarEntry* _tmp33_; + gint _tmp34_; + gint _tmp35_; +#line 132 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" + _tmp33_ = parent; +#line 132 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" + _tmp34_ = folders_sidebar_entry_get_count (_tmp33_); +#line 132 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" + _tmp35_ = _tmp34_; +#line 132 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" + _tmp31_ = _tmp35_ != 0; +#line 1456 "FoldersBranch.c" + } +#line 132 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" + if (_tmp31_) { +#line 132 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" + _tmp30_ = TRUE; +#line 1462 "FoldersBranch.c" + } else { + FoldersSidebarEntry* _tmp36_; + gint _tmp37_; +#line 132 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" + _tmp36_ = parent; +#line 132 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" + _tmp37_ = sidebar_branch_get_child_count (G_TYPE_CHECK_INSTANCE_CAST (self, SIDEBAR_TYPE_BRANCH, SidebarBranch), G_TYPE_CHECK_INSTANCE_CAST (_tmp36_, SIDEBAR_TYPE_ENTRY, SidebarEntry)); +#line 132 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" + _tmp30_ = _tmp37_ > 1; +#line 1472 "FoldersBranch.c" + } +#line 132 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" + if (_tmp30_) { +#line 133 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" + _g_object_unref0 (parent); +#line 133 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" + break; +#line 1480 "FoldersBranch.c" + } +#line 135 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" + _tmp38_ = parent; +#line 135 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" + _tmp39_ = _g_object_ref0 (_tmp38_); +#line 135 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" + _g_object_unref0 (prune_point); +#line 135 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" + prune_point = _tmp39_; +#line 127 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" + _g_object_unref0 (parent); +#line 1492 "FoldersBranch.c" + } + } +#line 138 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" + _tmp40_ = prune_point; +#line 138 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" + sidebar_branch_prune (G_TYPE_CHECK_INSTANCE_CAST (self, SIDEBAR_TYPE_BRANCH, SidebarBranch), G_TYPE_CHECK_INSTANCE_CAST (_tmp40_, SIDEBAR_TYPE_ENTRY, SidebarEntry)); +#line 112 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" + _g_object_unref0 (prune_point); +#line 112 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" + _g_object_unref0 (folder_entry); +#line 1503 "FoldersBranch.c" +} + + +static void folders_branch_class_init (FoldersBranchClass * klass) { +#line 7 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" + folders_branch_parent_class = g_type_class_peek_parent (klass); +#line 7 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" + g_type_class_add_private (klass, sizeof (FoldersBranchPrivate)); +#line 7 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" + G_OBJECT_CLASS (klass)->finalize = folders_branch_finalize; +#line 1514 "FoldersBranch.c" +} + + +static void folders_branch_instance_init (FoldersBranch * self) { + GeeHashMap* _tmp0_; +#line 7 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" + self->priv = FOLDERS_BRANCH_GET_PRIVATE (self); +#line 8 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" + _tmp0_ = gee_hash_map_new (g_file_get_type (), (GBoxedCopyFunc) g_object_ref, (GDestroyNotify) g_object_unref, FOLDERS_TYPE_SIDEBAR_ENTRY, (GBoxedCopyFunc) g_object_ref, (GDestroyNotify) g_object_unref, _file_hash_gee_hash_data_func, NULL, NULL, _file_equal_gee_equal_data_func, NULL, NULL, NULL, NULL, NULL); +#line 8 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" + self->priv->entries = _tmp0_; +#line 1526 "FoldersBranch.c" +} + + +static void folders_branch_finalize (GObject * obj) { + FoldersBranch * self; +#line 7 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" + self = G_TYPE_CHECK_INSTANCE_CAST (obj, FOLDERS_TYPE_BRANCH, FoldersBranch); +#line 1534 "FoldersBranch.c" + { + GeeIterator* _sources_it = NULL; + MediaCollectionRegistry* _tmp0_; + MediaCollectionRegistry* _tmp1_; + GeeCollection* _tmp2_; + GeeCollection* _tmp3_; + GeeIterator* _tmp4_; + GeeIterator* _tmp5_; +#line 30 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" + _tmp0_ = media_collection_registry_get_instance (); +#line 30 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" + _tmp1_ = _tmp0_; +#line 30 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" + _tmp2_ = media_collection_registry_get_all (_tmp1_); +#line 30 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" + _tmp3_ = _tmp2_; +#line 30 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" + _tmp4_ = gee_iterable_iterator (G_TYPE_CHECK_INSTANCE_CAST (_tmp3_, GEE_TYPE_ITERABLE, GeeIterable)); +#line 30 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" + _tmp5_ = _tmp4_; +#line 30 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" + _g_object_unref0 (_tmp3_); +#line 30 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" + _media_collection_registry_unref0 (_tmp1_); +#line 30 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" + _sources_it = _tmp5_; +#line 30 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" + while (TRUE) { +#line 1563 "FoldersBranch.c" + GeeIterator* _tmp6_; + gboolean _tmp7_; + MediaSourceCollection* sources = NULL; + GeeIterator* _tmp8_; + gpointer _tmp9_; + MediaSourceCollection* _tmp10_; + guint _tmp11_; +#line 30 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" + _tmp6_ = _sources_it; +#line 30 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" + _tmp7_ = gee_iterator_next (_tmp6_); +#line 30 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" + if (!_tmp7_) { +#line 30 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" + break; +#line 1579 "FoldersBranch.c" + } +#line 30 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" + _tmp8_ = _sources_it; +#line 30 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" + _tmp9_ = gee_iterator_get (_tmp8_); +#line 30 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" + sources = (MediaSourceCollection*) _tmp9_; +#line 31 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" + _tmp10_ = sources; +#line 31 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" + g_signal_parse_name ("contents-altered", TYPE_DATA_COLLECTION, &_tmp11_, NULL, FALSE); +#line 31 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" + g_signal_handlers_disconnect_matched (G_TYPE_CHECK_INSTANCE_CAST (_tmp10_, TYPE_DATA_COLLECTION, DataCollection), G_SIGNAL_MATCH_ID | G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA, _tmp11_, 0, NULL, (GCallback) _folders_branch_on_media_contents_altered_data_collection_contents_altered, self); +#line 30 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" + _data_collection_unref0 (sources); +#line 1595 "FoldersBranch.c" + } +#line 30 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" + _g_object_unref0 (_sources_it); +#line 1599 "FoldersBranch.c" + } +#line 8 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" + _g_object_unref0 (self->priv->entries); +#line 10 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" + _g_object_unref0 (self->priv->home_dir); +#line 7 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" + G_OBJECT_CLASS (folders_branch_parent_class)->finalize (obj); +#line 1607 "FoldersBranch.c" +} + + +GType folders_branch_get_type (void) { + static volatile gsize folders_branch_type_id__volatile = 0; + if (g_once_init_enter (&folders_branch_type_id__volatile)) { + static const GTypeInfo g_define_type_info = { sizeof (FoldersBranchClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) folders_branch_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (FoldersBranch), 0, (GInstanceInitFunc) folders_branch_instance_init, NULL }; + GType folders_branch_type_id; + folders_branch_type_id = g_type_register_static (SIDEBAR_TYPE_BRANCH, "FoldersBranch", &g_define_type_info, 0); + g_once_init_leave (&folders_branch_type_id__volatile, folders_branch_type_id); + } + return folders_branch_type_id__volatile; +} + + +FoldersRoot* folders_root_construct (GType object_type) { + FoldersRoot * self = NULL; +#line 144 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" + self = (FoldersRoot*) sidebar_header_construct (object_type, _ ("Folders"), _ ("Browse the library’s folder structure"), TRUE); +#line 143 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" + return self; +#line 1629 "FoldersBranch.c" +} + + +FoldersRoot* folders_root_new (void) { +#line 143 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" + return folders_root_construct (FOLDERS_TYPE_ROOT); +#line 1636 "FoldersBranch.c" +} + + +static void folders_root_class_init (FoldersRootClass * klass) { +#line 142 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" + folders_root_parent_class = g_type_class_peek_parent (klass); +#line 1643 "FoldersBranch.c" +} + + +static void folders_root_instance_init (FoldersRoot * self) { +} + + +GType folders_root_get_type (void) { + static volatile gsize folders_root_type_id__volatile = 0; + if (g_once_init_enter (&folders_root_type_id__volatile)) { + static const GTypeInfo g_define_type_info = { sizeof (FoldersRootClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) folders_root_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (FoldersRoot), 0, (GInstanceInitFunc) folders_root_instance_init, NULL }; + GType folders_root_type_id; + folders_root_type_id = g_type_register_static (SIDEBAR_TYPE_HEADER, "FoldersRoot", &g_define_type_info, 0); + g_once_init_leave (&folders_root_type_id__volatile, folders_root_type_id); + } + return folders_root_type_id__volatile; +} + + +FoldersSidebarEntry* folders_sidebar_entry_construct (GType object_type, GFile* dir) { + FoldersSidebarEntry * self = NULL; + GFile* _tmp0_; + GFile* _tmp1_; + gchar* _tmp2_; + gchar* _tmp3_; + gchar* _tmp4_; + gchar* _tmp5_; +#line 169 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" + g_return_val_if_fail (G_IS_FILE (dir), NULL); +#line 169 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" + self = (FoldersSidebarEntry*) sidebar_simple_page_entry_construct (object_type); +#line 170 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" + _tmp0_ = dir; +#line 170 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" + folders_sidebar_entry_set_dir (self, _tmp0_); +#line 171 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" + _tmp1_ = dir; +#line 171 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" + _tmp2_ = g_file_get_path (_tmp1_); +#line 171 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" + _tmp3_ = _tmp2_; +#line 171 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" + _tmp4_ = g_utf8_collate_key_for_filename (_tmp3_, (gssize) -1); +#line 171 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" + _tmp5_ = _tmp4_; +#line 171 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" + folders_sidebar_entry_set_collation (self, _tmp5_); +#line 171 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" + _g_free0 (_tmp5_); +#line 171 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" + _g_free0 (_tmp3_); +#line 169 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" + return self; +#line 1697 "FoldersBranch.c" +} + + +FoldersSidebarEntry* folders_sidebar_entry_new (GFile* dir) { +#line 169 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" + return folders_sidebar_entry_construct (FOLDERS_TYPE_SIDEBAR_ENTRY, dir); +#line 1704 "FoldersBranch.c" +} + + +static gchar* folders_sidebar_entry_real_get_sidebar_name (SidebarSimplePageEntry* base) { + FoldersSidebarEntry * self; + gchar* result = NULL; + GFile* _tmp0_; + gchar* _tmp1_; +#line 174 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" + self = G_TYPE_CHECK_INSTANCE_CAST (base, FOLDERS_TYPE_SIDEBAR_ENTRY, FoldersSidebarEntry); +#line 175 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" + _tmp0_ = self->priv->_dir; +#line 175 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" + _tmp1_ = g_file_get_basename (_tmp0_); +#line 175 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" + result = _tmp1_; +#line 175 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" + return result; +#line 1723 "FoldersBranch.c" +} + + +static gchar* folders_sidebar_entry_real_get_sidebar_icon (SidebarSimplePageEntry* base) { + FoldersSidebarEntry * self; + gchar* result = NULL; + const gchar* _tmp0_ = NULL; + gint _tmp1_; + gint _tmp2_; + gchar* _tmp5_; +#line 178 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" + self = G_TYPE_CHECK_INSTANCE_CAST (base, FOLDERS_TYPE_SIDEBAR_ENTRY, FoldersSidebarEntry); +#line 179 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" + _tmp1_ = folders_sidebar_entry_get_count (self); +#line 179 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" + _tmp2_ = _tmp1_; +#line 179 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" + if (_tmp2_ == 0) { +#line 1742 "FoldersBranch.c" + const gchar* _tmp3_; +#line 179 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" + _tmp3_ = folders_icon; +#line 179 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" + _tmp0_ = _tmp3_; +#line 1748 "FoldersBranch.c" + } else { + const gchar* _tmp4_; +#line 179 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" + _tmp4_ = folders_have_photos_icon; +#line 179 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" + _tmp0_ = _tmp4_; +#line 1755 "FoldersBranch.c" + } +#line 179 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" + _tmp5_ = g_strdup (_tmp0_); +#line 179 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" + result = _tmp5_; +#line 179 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" + return result; +#line 1763 "FoldersBranch.c" +} + + +static gchar* folders_sidebar_entry_real_to_string (SidebarSimplePageEntry* base) { + FoldersSidebarEntry * self; + gchar* result = NULL; + GFile* _tmp0_; + gchar* _tmp1_; +#line 182 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" + self = G_TYPE_CHECK_INSTANCE_CAST (base, FOLDERS_TYPE_SIDEBAR_ENTRY, FoldersSidebarEntry); +#line 183 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" + _tmp0_ = self->priv->_dir; +#line 183 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" + _tmp1_ = g_file_get_path (_tmp0_); +#line 183 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" + result = _tmp1_; +#line 183 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" + return result; +#line 1782 "FoldersBranch.c" +} + + +static gboolean folders_sidebar_entry_real_expand_on_select (SidebarExpandableEntry* base) { + FoldersSidebarEntry * self; + gboolean result = FALSE; +#line 186 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" + self = G_TYPE_CHECK_INSTANCE_CAST (base, FOLDERS_TYPE_SIDEBAR_ENTRY, FoldersSidebarEntry); +#line 187 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" + result = TRUE; +#line 187 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" + return result; +#line 1795 "FoldersBranch.c" +} + + +static Page* folders_sidebar_entry_real_create_page (SidebarSimplePageEntry* base) { + FoldersSidebarEntry * self; + Page* result = NULL; + GFile* _tmp0_; + FoldersPage* _tmp1_; +#line 190 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" + self = G_TYPE_CHECK_INSTANCE_CAST (base, FOLDERS_TYPE_SIDEBAR_ENTRY, FoldersSidebarEntry); +#line 191 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" + _tmp0_ = self->priv->_dir; +#line 191 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" + _tmp1_ = folders_page_new (_tmp0_); +#line 191 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" + g_object_ref_sink (_tmp1_); +#line 191 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" + result = G_TYPE_CHECK_INSTANCE_CAST (_tmp1_, TYPE_PAGE, Page); +#line 191 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" + return result; +#line 1816 "FoldersBranch.c" +} + + +GFile* folders_sidebar_entry_get_dir (FoldersSidebarEntry* self) { + GFile* result; + GFile* _tmp0_; +#line 149 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" + g_return_val_if_fail (FOLDERS_IS_SIDEBAR_ENTRY (self), NULL); +#line 149 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" + _tmp0_ = self->priv->_dir; +#line 149 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" + result = _tmp0_; +#line 149 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" + return result; +#line 1831 "FoldersBranch.c" +} + + +static void folders_sidebar_entry_set_dir (FoldersSidebarEntry* self, GFile* value) { +#line 149 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" + g_return_if_fail (FOLDERS_IS_SIDEBAR_ENTRY (self)); +#line 149 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" + if (folders_sidebar_entry_get_dir (self) != value) { +#line 1840 "FoldersBranch.c" + GFile* _tmp0_; + GFile* _tmp1_; +#line 149 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" + _tmp0_ = value; +#line 149 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" + _tmp1_ = _g_object_ref0 (_tmp0_); +#line 149 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" + _g_object_unref0 (self->priv->_dir); +#line 149 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" + self->priv->_dir = _tmp1_; +#line 149 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" + g_object_notify ((GObject *) self, "dir"); +#line 1853 "FoldersBranch.c" + } +} + + +const gchar* folders_sidebar_entry_get_collation (FoldersSidebarEntry* self) { + const gchar* result; + const gchar* _tmp0_; +#line 150 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" + g_return_val_if_fail (FOLDERS_IS_SIDEBAR_ENTRY (self), NULL); +#line 150 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" + _tmp0_ = self->priv->_collation; +#line 150 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" + result = _tmp0_; +#line 150 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" + return result; +#line 1869 "FoldersBranch.c" +} + + +static void folders_sidebar_entry_set_collation (FoldersSidebarEntry* self, const gchar* value) { +#line 150 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" + g_return_if_fail (FOLDERS_IS_SIDEBAR_ENTRY (self)); +#line 150 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" + if (g_strcmp0 (value, folders_sidebar_entry_get_collation (self)) != 0) { +#line 1878 "FoldersBranch.c" + const gchar* _tmp0_; + gchar* _tmp1_; +#line 150 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" + _tmp0_ = value; +#line 150 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" + _tmp1_ = g_strdup (_tmp0_); +#line 150 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" + _g_free0 (self->priv->_collation); +#line 150 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" + self->priv->_collation = _tmp1_; +#line 150 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" + g_object_notify ((GObject *) self, "collation"); +#line 1891 "FoldersBranch.c" + } +} + + +gint folders_sidebar_entry_get_count (FoldersSidebarEntry* self) { + gint result; + gint _tmp0_; +#line 154 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" + g_return_val_if_fail (FOLDERS_IS_SIDEBAR_ENTRY (self), 0); +#line 155 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" + _tmp0_ = self->priv->_count; +#line 155 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" + result = _tmp0_; +#line 155 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" + return result; +#line 1907 "FoldersBranch.c" +} + + +void folders_sidebar_entry_set_count (FoldersSidebarEntry* self, gint value) { + gint prev_count = 0; + gint _tmp0_; + gint _tmp1_; + gboolean _tmp2_ = FALSE; + gboolean _tmp3_ = FALSE; + gint _tmp4_; +#line 158 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" + g_return_if_fail (FOLDERS_IS_SIDEBAR_ENTRY (self)); +#line 159 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" + _tmp0_ = self->priv->_count; +#line 159 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" + prev_count = _tmp0_; +#line 160 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" + _tmp1_ = value; +#line 160 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" + self->priv->_count = _tmp1_; +#line 163 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" + _tmp4_ = prev_count; +#line 163 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" + if (_tmp4_ == 0) { +#line 1932 "FoldersBranch.c" + gint _tmp5_; +#line 163 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" + _tmp5_ = self->priv->_count; +#line 163 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" + _tmp3_ = _tmp5_ == 1; +#line 1938 "FoldersBranch.c" + } else { +#line 163 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" + _tmp3_ = FALSE; +#line 1942 "FoldersBranch.c" + } +#line 163 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" + if (_tmp3_) { +#line 163 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" + _tmp2_ = TRUE; +#line 1948 "FoldersBranch.c" + } else { + gboolean _tmp6_ = FALSE; + gint _tmp7_; +#line 163 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" + _tmp7_ = prev_count; +#line 163 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" + if (_tmp7_ == 1) { +#line 1956 "FoldersBranch.c" + gint _tmp8_; +#line 163 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" + _tmp8_ = self->priv->_count; +#line 163 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" + _tmp6_ = _tmp8_ == 0; +#line 1962 "FoldersBranch.c" + } else { +#line 163 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" + _tmp6_ = FALSE; +#line 1966 "FoldersBranch.c" + } +#line 163 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" + _tmp2_ = _tmp6_; +#line 1970 "FoldersBranch.c" + } +#line 163 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" + if (_tmp2_) { +#line 1974 "FoldersBranch.c" + gchar* _tmp9_; + gchar* _tmp10_; +#line 164 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" + _tmp9_ = sidebar_simple_page_entry_get_sidebar_icon (G_TYPE_CHECK_INSTANCE_CAST (self, SIDEBAR_TYPE_SIMPLE_PAGE_ENTRY, SidebarSimplePageEntry)); +#line 164 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" + _tmp10_ = _tmp9_; +#line 164 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" + g_signal_emit_by_name (G_TYPE_CHECK_INSTANCE_CAST (self, SIDEBAR_TYPE_ENTRY, SidebarEntry), "sidebar-icon-changed", _tmp10_); +#line 164 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" + _g_free0 (_tmp10_); +#line 1985 "FoldersBranch.c" + } +#line 158 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" + g_object_notify ((GObject *) self, "count"); +#line 1989 "FoldersBranch.c" +} + + +static void folders_sidebar_entry_class_init (FoldersSidebarEntryClass * klass) { +#line 148 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" + folders_sidebar_entry_parent_class = g_type_class_peek_parent (klass); +#line 148 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" + g_type_class_add_private (klass, sizeof (FoldersSidebarEntryPrivate)); +#line 148 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" + ((SidebarSimplePageEntryClass *) klass)->get_sidebar_name = (gchar* (*) (SidebarSimplePageEntry *)) folders_sidebar_entry_real_get_sidebar_name; +#line 148 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" + ((SidebarSimplePageEntryClass *) klass)->get_sidebar_icon = (gchar* (*) (SidebarSimplePageEntry *)) folders_sidebar_entry_real_get_sidebar_icon; +#line 148 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" + ((SidebarSimplePageEntryClass *) klass)->to_string = (gchar* (*) (SidebarSimplePageEntry *)) folders_sidebar_entry_real_to_string; +#line 148 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" + ((SidebarSimplePageEntryClass *) klass)->create_page = (Page* (*) (SidebarSimplePageEntry *)) folders_sidebar_entry_real_create_page; +#line 148 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" + G_OBJECT_CLASS (klass)->get_property = _vala_folders_sidebar_entry_get_property; +#line 148 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" + G_OBJECT_CLASS (klass)->set_property = _vala_folders_sidebar_entry_set_property; +#line 148 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" + G_OBJECT_CLASS (klass)->finalize = folders_sidebar_entry_finalize; +#line 148 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" + g_object_class_install_property (G_OBJECT_CLASS (klass), FOLDERS_SIDEBAR_ENTRY_DIR_PROPERTY, g_param_spec_object ("dir", "dir", "dir", g_file_get_type (), G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE)); +#line 148 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" + g_object_class_install_property (G_OBJECT_CLASS (klass), FOLDERS_SIDEBAR_ENTRY_COLLATION_PROPERTY, g_param_spec_string ("collation", "collation", "collation", NULL, G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE)); +#line 148 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" + g_object_class_install_property (G_OBJECT_CLASS (klass), FOLDERS_SIDEBAR_ENTRY_COUNT_PROPERTY, g_param_spec_int ("count", "count", "count", G_MININT, G_MAXINT, 0, G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE | G_PARAM_WRITABLE)); +#line 2018 "FoldersBranch.c" +} + + +static void folders_sidebar_entry_sidebar_expandable_entry_interface_init (SidebarExpandableEntryIface * iface) { +#line 148 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" + folders_sidebar_entry_sidebar_expandable_entry_parent_iface = g_type_interface_peek_parent (iface); +#line 148 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" + iface->expand_on_select = (gboolean (*) (SidebarExpandableEntry *)) folders_sidebar_entry_real_expand_on_select; +#line 2027 "FoldersBranch.c" +} + + +static void folders_sidebar_entry_instance_init (FoldersSidebarEntry * self) { +#line 148 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" + self->priv = FOLDERS_SIDEBAR_ENTRY_GET_PRIVATE (self); +#line 152 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" + self->priv->_count = 0; +#line 2036 "FoldersBranch.c" +} + + +static void folders_sidebar_entry_finalize (GObject * obj) { + FoldersSidebarEntry * self; +#line 148 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" + self = G_TYPE_CHECK_INSTANCE_CAST (obj, FOLDERS_TYPE_SIDEBAR_ENTRY, FoldersSidebarEntry); +#line 149 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" + _g_object_unref0 (self->priv->_dir); +#line 150 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" + _g_free0 (self->priv->_collation); +#line 148 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" + G_OBJECT_CLASS (folders_sidebar_entry_parent_class)->finalize (obj); +#line 2050 "FoldersBranch.c" +} + + +GType folders_sidebar_entry_get_type (void) { + static volatile gsize folders_sidebar_entry_type_id__volatile = 0; + if (g_once_init_enter (&folders_sidebar_entry_type_id__volatile)) { + static const GTypeInfo g_define_type_info = { sizeof (FoldersSidebarEntryClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) folders_sidebar_entry_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (FoldersSidebarEntry), 0, (GInstanceInitFunc) folders_sidebar_entry_instance_init, NULL }; + static const GInterfaceInfo sidebar_expandable_entry_info = { (GInterfaceInitFunc) folders_sidebar_entry_sidebar_expandable_entry_interface_init, (GInterfaceFinalizeFunc) NULL, NULL}; + GType folders_sidebar_entry_type_id; + folders_sidebar_entry_type_id = g_type_register_static (SIDEBAR_TYPE_SIMPLE_PAGE_ENTRY, "FoldersSidebarEntry", &g_define_type_info, 0); + g_type_add_interface_static (folders_sidebar_entry_type_id, SIDEBAR_TYPE_EXPANDABLE_ENTRY, &sidebar_expandable_entry_info); + g_once_init_leave (&folders_sidebar_entry_type_id__volatile, folders_sidebar_entry_type_id); + } + return folders_sidebar_entry_type_id__volatile; +} + + +static void _vala_folders_sidebar_entry_get_property (GObject * object, guint property_id, GValue * value, GParamSpec * pspec) { + FoldersSidebarEntry * self; + self = G_TYPE_CHECK_INSTANCE_CAST (object, FOLDERS_TYPE_SIDEBAR_ENTRY, FoldersSidebarEntry); +#line 148 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" + switch (property_id) { +#line 148 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" + case FOLDERS_SIDEBAR_ENTRY_DIR_PROPERTY: +#line 148 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" + g_value_set_object (value, folders_sidebar_entry_get_dir (self)); +#line 148 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" + break; +#line 148 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" + case FOLDERS_SIDEBAR_ENTRY_COLLATION_PROPERTY: +#line 148 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" + g_value_set_string (value, folders_sidebar_entry_get_collation (self)); +#line 148 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" + break; +#line 148 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" + case FOLDERS_SIDEBAR_ENTRY_COUNT_PROPERTY: +#line 148 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" + g_value_set_int (value, folders_sidebar_entry_get_count (self)); +#line 148 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" + break; +#line 2091 "FoldersBranch.c" + default: +#line 148 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" + G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec); +#line 148 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" + break; +#line 2097 "FoldersBranch.c" + } +} + + +static void _vala_folders_sidebar_entry_set_property (GObject * object, guint property_id, const GValue * value, GParamSpec * pspec) { + FoldersSidebarEntry * self; + self = G_TYPE_CHECK_INSTANCE_CAST (object, FOLDERS_TYPE_SIDEBAR_ENTRY, FoldersSidebarEntry); +#line 148 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" + switch (property_id) { +#line 148 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" + case FOLDERS_SIDEBAR_ENTRY_DIR_PROPERTY: +#line 148 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" + folders_sidebar_entry_set_dir (self, g_value_get_object (value)); +#line 148 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" + break; +#line 148 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" + case FOLDERS_SIDEBAR_ENTRY_COLLATION_PROPERTY: +#line 148 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" + folders_sidebar_entry_set_collation (self, g_value_get_string (value)); +#line 148 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" + break; +#line 148 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" + case FOLDERS_SIDEBAR_ENTRY_COUNT_PROPERTY: +#line 148 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" + folders_sidebar_entry_set_count (self, g_value_get_int (value)); +#line 148 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" + break; +#line 2125 "FoldersBranch.c" + default: +#line 148 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" + G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec); +#line 148 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" + break; +#line 2131 "FoldersBranch.c" + } +} + + + diff --git a/src/folders/FoldersBranch.vala b/src/folders/FoldersBranch.vala new file mode 100644 index 0000000..5de7082 --- /dev/null +++ b/src/folders/FoldersBranch.vala @@ -0,0 +1,193 @@ +/* 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 Folders.Branch : Sidebar.Branch { + private Gee.HashMap entries = + new Gee.HashMap(file_hash, file_equal); + private File home_dir; + + public class Branch() { + base (new Folders.Root(), + Sidebar.Branch.Options.STARTUP_OPEN_GROUPING + | Sidebar.Branch.Options.HIDE_IF_EMPTY, + comparator); + + home_dir = File.new_for_path(Environment.get_home_dir()); + + foreach (MediaSourceCollection sources in MediaCollectionRegistry.get_instance().get_all()) { + // seed + on_media_contents_altered(sources.get_all(), null); + + // monitor + sources.contents_altered.connect(on_media_contents_altered); + } + } + + ~Branch() { + foreach (MediaSourceCollection sources in MediaCollectionRegistry.get_instance().get_all()) + sources.contents_altered.disconnect(on_media_contents_altered); + } + + private static int comparator(Sidebar.Entry a, Sidebar.Entry b) { + if (a == b) + return 0; + + int coll_key_equality = strcmp(((Folders.SidebarEntry) a).collation, + ((Folders.SidebarEntry) b).collation); + + if (coll_key_equality == 0) { + // Collation keys were the same, double-check that + // these really are the same string... + return strcmp(((Folders.SidebarEntry) a).get_sidebar_name(), + ((Folders.SidebarEntry) b).get_sidebar_name()); + } + + return coll_key_equality; + } + + private void on_master_source_replaced(MediaSource media_source, File old_file, File new_file) { + remove_entry(old_file); + add_entry(media_source); + } + + private void on_media_contents_altered(Gee.Iterable? added, Gee.Iterable? removed) { + if (added != null) { + foreach (DataObject object in added) { + add_entry((MediaSource) object); + ((MediaSource) object).master_replaced.connect(on_master_source_replaced); + } + } + + if (removed != null) { + foreach (DataObject object in removed) { + remove_entry(((MediaSource) object).get_file()); + ((MediaSource) object).master_replaced.disconnect(on_master_source_replaced); + } + } + } + + void add_entry(MediaSource media) { + File file = media.get_file(); + + Gee.ArrayList elements = new Gee.ArrayList(); + + // add the path elements in reverse order up to home directory + File? parent = file.get_parent(); + while (parent != null && parent.get_path() != null) { + // don't process paths above the user's home directory + if (parent.equal(home_dir.get_parent())) + break; + + elements.add(parent); + + parent = parent.get_parent(); + } + + // walk path elements in order from home directory down, building needed sidebar entries + // along the way + Folders.SidebarEntry? parent_entry = null; + for (int ctr = elements.size - 1; ctr >= 0; ctr--) { + File parent_dir = elements[ctr]; + + // save current parent, needed if this entry needs to be grafted + Folders.SidebarEntry? old_parent_entry = parent_entry; + + parent_entry = entries.get(parent_dir); + if (parent_entry == null) { + parent_entry = new Folders.SidebarEntry(parent_dir); + entries.set(parent_dir, parent_entry); + + graft((old_parent_entry == null) ? get_root() : old_parent_entry, parent_entry); + } + + // only increment entry's file count if File is going in this folder + if (ctr == 0) + parent_entry.count++; + } + } + + private void remove_entry(File file) { + Folders.SidebarEntry? folder_entry = entries.get(file.get_parent()); + if (folder_entry == null) + return; + + assert(folder_entry.count > 0); + + // decrement file count for folder of photo + if (--folder_entry.count > 0 || get_child_count(folder_entry) > 0) + return; + + // empty folder so prune tree + Folders.SidebarEntry? prune_point = folder_entry; + assert(prune_point != null); + + for (;;) { + bool removed = entries.unset(prune_point.dir); + assert(removed); + + Folders.SidebarEntry? parent = get_parent(prune_point) as Folders.SidebarEntry; + if (parent == null || parent.count != 0 || get_child_count(parent) > 1) + break; + + prune_point = parent; + } + + prune(prune_point); + } +} + +private class Folders.Root : Sidebar.Header { + public Root() { + base (_("Folders"), _("Browse the library’s folder structure")); + } +} + +public class Folders.SidebarEntry : Sidebar.SimplePageEntry, Sidebar.ExpandableEntry { + public File dir { get; private set; } + public string collation { get; private set; } + + private int _count = 0; + public int count { + get { + return _count; + } + + set { + int prev_count = _count; + _count = value; + + // when count change 0->1 and 1->0 may need refresh icon + if ((prev_count == 0 && _count == 1) || (prev_count == 1 && _count == 0)) + sidebar_icon_changed(get_sidebar_icon()); + + } + } + + public SidebarEntry(File dir) { + this.dir = dir; + collation = dir.get_path().collate_key_for_filename(); + } + + public override string get_sidebar_name() { + return dir.get_basename(); + } + + public override string? get_sidebar_icon() { + return count == 0 ? icon : have_photos_icon; + } + + public override string to_string() { + return dir.get_path(); + } + + public bool expand_on_select() { + return true; + } + + protected override global::Page create_page() { + return new Folders.Page(dir); + } +} diff --git a/src/folders/FoldersPage.c b/src/folders/FoldersPage.c new file mode 100644 index 0000000..abc3f83 --- /dev/null +++ b/src/folders/FoldersPage.c @@ -0,0 +1,1025 @@ +/* FoldersPage.c generated by valac 0.36.6, the Vala compiler + * generated from FoldersPage.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 + + +#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; +typedef struct _PagePrivate PagePrivate; + +#define TYPE_PAGE_WINDOW (page_window_get_type ()) +#define PAGE_WINDOW(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_PAGE_WINDOW, PageWindow)) +#define PAGE_WINDOW_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_PAGE_WINDOW, PageWindowClass)) +#define IS_PAGE_WINDOW(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_PAGE_WINDOW)) +#define IS_PAGE_WINDOW_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_PAGE_WINDOW)) +#define PAGE_WINDOW_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_PAGE_WINDOW, PageWindowClass)) + +typedef struct _PageWindow PageWindow; +typedef struct _PageWindowClass PageWindowClass; + +#define TYPE_FULLSCREEN_WINDOW (fullscreen_window_get_type ()) +#define FULLSCREEN_WINDOW(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_FULLSCREEN_WINDOW, FullscreenWindow)) +#define FULLSCREEN_WINDOW_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_FULLSCREEN_WINDOW, FullscreenWindowClass)) +#define IS_FULLSCREEN_WINDOW(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_FULLSCREEN_WINDOW)) +#define IS_FULLSCREEN_WINDOW_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_FULLSCREEN_WINDOW)) +#define FULLSCREEN_WINDOW_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_FULLSCREEN_WINDOW, FullscreenWindowClass)) + +typedef struct _FullscreenWindow FullscreenWindow; +typedef struct _FullscreenWindowClass FullscreenWindowClass; + +#define TYPE_INJECTION_GROUP (injection_group_get_type ()) +#define INJECTION_GROUP(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_INJECTION_GROUP, InjectionGroup)) +#define INJECTION_GROUP_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_INJECTION_GROUP, InjectionGroupClass)) +#define IS_INJECTION_GROUP(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_INJECTION_GROUP)) +#define IS_INJECTION_GROUP_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_INJECTION_GROUP)) +#define INJECTION_GROUP_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_INJECTION_GROUP, InjectionGroupClass)) + +typedef struct _InjectionGroup InjectionGroup; +typedef struct _InjectionGroupClass InjectionGroupClass; + +#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; +typedef struct _CheckerboardPagePrivate CheckerboardPagePrivate; + +#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_VIEW (data_view_get_type ()) +#define DATA_VIEW(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_DATA_VIEW, DataView)) +#define DATA_VIEW_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_DATA_VIEW, DataViewClass)) +#define IS_DATA_VIEW(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_DATA_VIEW)) +#define IS_DATA_VIEW_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_DATA_VIEW)) +#define DATA_VIEW_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_DATA_VIEW, DataViewClass)) + +typedef struct _DataView DataView; +typedef struct _DataViewClass DataViewClass; + +#define TYPE_THUMBNAIL_VIEW (thumbnail_view_get_type ()) +#define THUMBNAIL_VIEW(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_THUMBNAIL_VIEW, ThumbnailView)) +#define THUMBNAIL_VIEW_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_THUMBNAIL_VIEW, ThumbnailViewClass)) +#define IS_THUMBNAIL_VIEW(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_THUMBNAIL_VIEW)) +#define IS_THUMBNAIL_VIEW_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_THUMBNAIL_VIEW)) +#define THUMBNAIL_VIEW_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_THUMBNAIL_VIEW, ThumbnailViewClass)) + +typedef struct _ThumbnailView ThumbnailView; +typedef struct _ThumbnailViewClass ThumbnailViewClass; + +#define TYPE_CHECKERBOARD_ITEM (checkerboard_item_get_type ()) +#define CHECKERBOARD_ITEM(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_CHECKERBOARD_ITEM, CheckerboardItem)) +#define CHECKERBOARD_ITEM_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_CHECKERBOARD_ITEM, CheckerboardItemClass)) +#define IS_CHECKERBOARD_ITEM(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_CHECKERBOARD_ITEM)) +#define IS_CHECKERBOARD_ITEM_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_CHECKERBOARD_ITEM)) +#define CHECKERBOARD_ITEM_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_CHECKERBOARD_ITEM, CheckerboardItemClass)) + +typedef struct _CheckerboardItem CheckerboardItem; +typedef struct _CheckerboardItemClass CheckerboardItemClass; + +#define CHECKERBOARD_PAGE_TYPE_ACTIVATOR (checkerboard_page_activator_get_type ()) + +#define CHECKERBOARD_PAGE_TYPE_KEYBOARD_MODIFIERS (checkerboard_page_keyboard_modifiers_get_type ()) +typedef struct _CheckerboardPageKeyboardModifiers CheckerboardPageKeyboardModifiers; + +#define TYPE_VIEW_FILTER (view_filter_get_type ()) +#define VIEW_FILTER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_VIEW_FILTER, ViewFilter)) +#define VIEW_FILTER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_VIEW_FILTER, ViewFilterClass)) +#define IS_VIEW_FILTER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_VIEW_FILTER)) +#define IS_VIEW_FILTER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_VIEW_FILTER)) +#define VIEW_FILTER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_VIEW_FILTER, ViewFilterClass)) + +typedef struct _ViewFilter ViewFilter; +typedef struct _ViewFilterClass ViewFilterClass; + +#define TYPE_SEARCH_VIEW_FILTER (search_view_filter_get_type ()) +#define SEARCH_VIEW_FILTER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_SEARCH_VIEW_FILTER, SearchViewFilter)) +#define SEARCH_VIEW_FILTER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_SEARCH_VIEW_FILTER, SearchViewFilterClass)) +#define IS_SEARCH_VIEW_FILTER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_SEARCH_VIEW_FILTER)) +#define IS_SEARCH_VIEW_FILTER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_SEARCH_VIEW_FILTER)) +#define SEARCH_VIEW_FILTER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_SEARCH_VIEW_FILTER, SearchViewFilterClass)) + +typedef struct _SearchViewFilter SearchViewFilter; +typedef struct _SearchViewFilterClass SearchViewFilterClass; + +#define CORE_TYPE_TRACKER (core_tracker_get_type ()) +#define CORE_TRACKER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), CORE_TYPE_TRACKER, CoreTracker)) +#define CORE_TRACKER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), CORE_TYPE_TRACKER, CoreTrackerClass)) +#define CORE_IS_TRACKER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), CORE_TYPE_TRACKER)) +#define CORE_IS_TRACKER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), CORE_TYPE_TRACKER)) +#define CORE_TRACKER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), CORE_TYPE_TRACKER, CoreTrackerClass)) + +typedef struct _CoreTracker CoreTracker; +typedef struct _CoreTrackerClass CoreTrackerClass; + +#define CORE_TYPE_VIEW_TRACKER (core_view_tracker_get_type ()) +#define CORE_VIEW_TRACKER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), CORE_TYPE_VIEW_TRACKER, CoreViewTracker)) +#define CORE_VIEW_TRACKER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), CORE_TYPE_VIEW_TRACKER, CoreViewTrackerClass)) +#define CORE_IS_VIEW_TRACKER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), CORE_TYPE_VIEW_TRACKER)) +#define CORE_IS_VIEW_TRACKER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), CORE_TYPE_VIEW_TRACKER)) +#define CORE_VIEW_TRACKER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), CORE_TYPE_VIEW_TRACKER, CoreViewTrackerClass)) + +typedef struct _CoreViewTracker CoreViewTracker; +typedef struct _CoreViewTrackerClass CoreViewTrackerClass; + +#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; +typedef struct _MediaPagePrivate MediaPagePrivate; + +#define TYPE_RATING (rating_get_type ()) + +#define TYPE_RAW_DEVELOPER (raw_developer_get_type ()) + +#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_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; +typedef struct _CollectionPagePrivate CollectionPagePrivate; + +#define FOLDERS_TYPE_PAGE (folders_page_get_type ()) +#define FOLDERS_PAGE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), FOLDERS_TYPE_PAGE, FoldersPage)) +#define FOLDERS_PAGE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), FOLDERS_TYPE_PAGE, FoldersPageClass)) +#define FOLDERS_IS_PAGE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), FOLDERS_TYPE_PAGE)) +#define FOLDERS_IS_PAGE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), FOLDERS_TYPE_PAGE)) +#define FOLDERS_PAGE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), FOLDERS_TYPE_PAGE, FoldersPageClass)) + +typedef struct _FoldersPage FoldersPage; +typedef struct _FoldersPageClass FoldersPageClass; +typedef struct _FoldersPagePrivate FoldersPagePrivate; + +#define TYPE_VIEW_MANAGER (view_manager_get_type ()) +#define VIEW_MANAGER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_VIEW_MANAGER, ViewManager)) +#define VIEW_MANAGER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_VIEW_MANAGER, ViewManagerClass)) +#define IS_VIEW_MANAGER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_VIEW_MANAGER)) +#define IS_VIEW_MANAGER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_VIEW_MANAGER)) +#define VIEW_MANAGER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_VIEW_MANAGER, ViewManagerClass)) + +typedef struct _ViewManager ViewManager; +typedef struct _ViewManagerClass ViewManagerClass; + +#define TYPE_COLLECTION_VIEW_MANAGER (collection_view_manager_get_type ()) +#define COLLECTION_VIEW_MANAGER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_COLLECTION_VIEW_MANAGER, CollectionViewManager)) +#define COLLECTION_VIEW_MANAGER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_COLLECTION_VIEW_MANAGER, CollectionViewManagerClass)) +#define IS_COLLECTION_VIEW_MANAGER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_COLLECTION_VIEW_MANAGER)) +#define IS_COLLECTION_VIEW_MANAGER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_COLLECTION_VIEW_MANAGER)) +#define COLLECTION_VIEW_MANAGER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_COLLECTION_VIEW_MANAGER, CollectionViewManagerClass)) + +typedef struct _CollectionViewManager CollectionViewManager; +typedef struct _CollectionViewManagerClass CollectionViewManagerClass; + +#define FOLDERS_PAGE_TYPE_FOLDER_VIEW_MANAGER (folders_page_folder_view_manager_get_type ()) +#define FOLDERS_PAGE_FOLDER_VIEW_MANAGER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), FOLDERS_PAGE_TYPE_FOLDER_VIEW_MANAGER, FoldersPageFolderViewManager)) +#define FOLDERS_PAGE_FOLDER_VIEW_MANAGER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), FOLDERS_PAGE_TYPE_FOLDER_VIEW_MANAGER, FoldersPageFolderViewManagerClass)) +#define FOLDERS_PAGE_IS_FOLDER_VIEW_MANAGER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), FOLDERS_PAGE_TYPE_FOLDER_VIEW_MANAGER)) +#define FOLDERS_PAGE_IS_FOLDER_VIEW_MANAGER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), FOLDERS_PAGE_TYPE_FOLDER_VIEW_MANAGER)) +#define FOLDERS_PAGE_FOLDER_VIEW_MANAGER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), FOLDERS_PAGE_TYPE_FOLDER_VIEW_MANAGER, FoldersPageFolderViewManagerClass)) + +typedef struct _FoldersPageFolderViewManager FoldersPageFolderViewManager; +typedef struct _FoldersPageFolderViewManagerClass FoldersPageFolderViewManagerClass; +#define _view_manager_unref0(var) ((var == NULL) ? NULL : (var = (view_manager_unref (var), NULL))) +#define _g_free0(var) (var = (g_free (var), NULL)) + +#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_MEDIA_SOURCE_COLLECTION (media_source_collection_get_type ()) +#define MEDIA_SOURCE_COLLECTION(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_MEDIA_SOURCE_COLLECTION, MediaSourceCollection)) +#define MEDIA_SOURCE_COLLECTION_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_MEDIA_SOURCE_COLLECTION, MediaSourceCollectionClass)) +#define IS_MEDIA_SOURCE_COLLECTION(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_MEDIA_SOURCE_COLLECTION)) +#define IS_MEDIA_SOURCE_COLLECTION_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_MEDIA_SOURCE_COLLECTION)) +#define MEDIA_SOURCE_COLLECTION_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_MEDIA_SOURCE_COLLECTION, MediaSourceCollectionClass)) + +typedef struct _MediaSourceCollection MediaSourceCollection; +typedef struct _MediaSourceCollectionClass MediaSourceCollectionClass; + +#define TYPE_MEDIA_COLLECTION_REGISTRY (media_collection_registry_get_type ()) +#define MEDIA_COLLECTION_REGISTRY(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_MEDIA_COLLECTION_REGISTRY, MediaCollectionRegistry)) +#define MEDIA_COLLECTION_REGISTRY_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_MEDIA_COLLECTION_REGISTRY, MediaCollectionRegistryClass)) +#define IS_MEDIA_COLLECTION_REGISTRY(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_MEDIA_COLLECTION_REGISTRY)) +#define IS_MEDIA_COLLECTION_REGISTRY_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_MEDIA_COLLECTION_REGISTRY)) +#define MEDIA_COLLECTION_REGISTRY_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_MEDIA_COLLECTION_REGISTRY, MediaCollectionRegistryClass)) + +typedef struct _MediaCollectionRegistry MediaCollectionRegistry; +typedef struct _MediaCollectionRegistryClass MediaCollectionRegistryClass; +#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL))) +#define _media_collection_registry_unref0(var) ((var == NULL) ? NULL : (var = (media_collection_registry_unref (var), NULL))) + +#define TYPE_VIEW_COLLECTION (view_collection_get_type ()) +#define VIEW_COLLECTION(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_VIEW_COLLECTION, ViewCollection)) +#define VIEW_COLLECTION_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_VIEW_COLLECTION, ViewCollectionClass)) +#define IS_VIEW_COLLECTION(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_VIEW_COLLECTION)) +#define IS_VIEW_COLLECTION_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_VIEW_COLLECTION)) +#define VIEW_COLLECTION_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_VIEW_COLLECTION, ViewCollectionClass)) + +typedef struct _ViewCollection ViewCollection; +typedef struct _ViewCollectionClass ViewCollectionClass; + +#define 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 VIEW_COLLECTION_TYPE_MONITOR (view_collection_monitor_get_type ()) +#define VIEW_COLLECTION_MONITOR(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), VIEW_COLLECTION_TYPE_MONITOR, ViewCollectionMonitor)) +#define VIEW_COLLECTION_MONITOR_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), VIEW_COLLECTION_TYPE_MONITOR, ViewCollectionMonitorClass)) +#define VIEW_COLLECTION_IS_MONITOR(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), VIEW_COLLECTION_TYPE_MONITOR)) +#define VIEW_COLLECTION_IS_MONITOR_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), VIEW_COLLECTION_TYPE_MONITOR)) +#define VIEW_COLLECTION_MONITOR_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), VIEW_COLLECTION_TYPE_MONITOR, ViewCollectionMonitorClass)) + +typedef struct _ViewCollectionMonitor ViewCollectionMonitor; +typedef struct _ViewCollectionMonitorClass ViewCollectionMonitorClass; +#define _view_collection_monitor_unref0(var) ((var == NULL) ? NULL : (var = (view_collection_monitor_unref (var), NULL))) +#define _data_collection_unref0(var) ((var == NULL) ? NULL : (var = (data_collection_unref (var), NULL))) + +#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; +typedef struct _ViewManagerPrivate ViewManagerPrivate; +typedef struct _CollectionViewManagerPrivate CollectionViewManagerPrivate; +typedef struct _FoldersPageFolderViewManagerPrivate FoldersPageFolderViewManagerPrivate; + +#define TYPE_THUMBNAIL_SOURCE (thumbnail_source_get_type ()) +#define THUMBNAIL_SOURCE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_THUMBNAIL_SOURCE, ThumbnailSource)) +#define THUMBNAIL_SOURCE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_THUMBNAIL_SOURCE, ThumbnailSourceClass)) +#define IS_THUMBNAIL_SOURCE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_THUMBNAIL_SOURCE)) +#define IS_THUMBNAIL_SOURCE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_THUMBNAIL_SOURCE)) +#define THUMBNAIL_SOURCE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_THUMBNAIL_SOURCE, ThumbnailSourceClass)) + +typedef struct _ThumbnailSource ThumbnailSource; +typedef struct _ThumbnailSourceClass ThumbnailSourceClass; + +#define TYPE_MEDIA_SOURCE (media_source_get_type ()) +#define MEDIA_SOURCE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_MEDIA_SOURCE, MediaSource)) +#define MEDIA_SOURCE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_MEDIA_SOURCE, MediaSourceClass)) +#define IS_MEDIA_SOURCE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_MEDIA_SOURCE)) +#define IS_MEDIA_SOURCE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_MEDIA_SOURCE)) +#define MEDIA_SOURCE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_MEDIA_SOURCE, MediaSourceClass)) + +typedef struct _MediaSource MediaSource; +typedef struct _MediaSourceClass MediaSourceClass; + +struct _Page { + GtkScrolledWindow parent_instance; + PagePrivate * priv; + GtkBuilder* builder; + GtkToolbar* toolbar; + gboolean in_view; +}; + +struct _PageClass { + GtkScrolledWindowClass parent_class; + void (*set_page_name) (Page* self, const gchar* page_name); + void (*set_container) (Page* self, GtkWindow* container); + void (*clear_container) (Page* self); + GtkToolbar* (*get_toolbar) (Page* self); + GtkMenu* (*get_page_context_menu) (Page* self); + void (*switching_from) (Page* self); + void (*switched_to) (Page* self); + void (*ready) (Page* self); + void (*switching_to_fullscreen) (Page* self, FullscreenWindow* fsw); + void (*returning_from_fullscreen) (Page* self, FullscreenWindow* fsw); + void (*add_actions) (Page* self, GActionMap* map); + void (*remove_actions) (Page* self, GActionMap* map); + void (*init_collect_ui_filenames) (Page* self, GeeList* ui_filenames); + InjectionGroup** (*init_collect_injection_groups) (Page* self, int* result_length1); + void (*init_actions) (Page* self, gint selected_count, gint count); + void (*update_actions) (Page* self, gint selected_count, gint count); + gboolean (*source_drag_failed) (Page* self, GdkDragContext* context, GtkDragResult drag_result); + gboolean (*on_left_click) (Page* self, GdkEventButton* event); + gboolean (*on_middle_click) (Page* self, GdkEventButton* event); + gboolean (*on_right_click) (Page* self, GdkEventButton* event); + gboolean (*on_left_released) (Page* self, GdkEventButton* event); + gboolean (*on_middle_released) (Page* self, GdkEventButton* event); + gboolean (*on_right_released) (Page* self, GdkEventButton* event); + gboolean (*on_ctrl_pressed) (Page* self, GdkEventKey* event); + gboolean (*on_ctrl_released) (Page* self, GdkEventKey* event); + gboolean (*on_alt_pressed) (Page* self, GdkEventKey* event); + gboolean (*on_alt_released) (Page* self, GdkEventKey* event); + gboolean (*on_shift_pressed) (Page* self, GdkEventKey* event); + gboolean (*on_shift_released) (Page* self, GdkEventKey* event); + gboolean (*on_super_pressed) (Page* self, GdkEventKey* event); + gboolean (*on_super_released) (Page* self, GdkEventKey* event); + gboolean (*on_app_key_pressed) (Page* self, GdkEventKey* event); + gboolean (*on_app_key_released) (Page* self, GdkEventKey* event); + void (*on_move) (Page* self, GdkRectangle* rect); + void (*on_move_start) (Page* self, GdkRectangle* rect); + void (*on_move_finished) (Page* self, GdkRectangle* rect); + void (*on_resize) (Page* self, GdkRectangle* rect); + void (*on_resize_start) (Page* self, GdkRectangle* rect); + void (*on_resize_finished) (Page* self, GdkRectangle* rect); + gboolean (*on_configure) (Page* self, GdkEventConfigure* event, GdkRectangle* rect); + gboolean (*on_motion) (Page* self, GdkEventMotion* event, gint x, gint y, GdkModifierType mask); + gboolean (*on_leave_notify_event) (Page* self); + gboolean (*on_mousewheel_up) (Page* self, GdkEventScroll* event); + gboolean (*on_mousewheel_down) (Page* self, GdkEventScroll* event); + gboolean (*on_mousewheel_left) (Page* self, GdkEventScroll* event); + gboolean (*on_mousewheel_right) (Page* self, GdkEventScroll* event); + gboolean (*on_context_keypress) (Page* self); + gboolean (*on_context_buttonpress) (Page* self, GdkEventButton* event); + gboolean (*on_context_invoked) (Page* self); + void (*set_page_cursor) (Page* self, GdkCursorType cursor_type); +}; + +typedef enum { + CHECKERBOARD_PAGE_ACTIVATOR_KEYBOARD, + CHECKERBOARD_PAGE_ACTIVATOR_MOUSE +} CheckerboardPageActivator; + +struct _CheckerboardPageKeyboardModifiers { + gboolean ctrl_pressed; + gboolean alt_pressed; + gboolean shift_pressed; + gboolean super_pressed; +}; + +struct _CheckerboardPage { + Page parent_instance; + CheckerboardPagePrivate * priv; + CheckerboardItem* anchor; + CheckerboardItem* cursor; +}; + +struct _CheckerboardPageClass { + PageClass parent_class; + GtkMenu* (*get_item_context_menu) (CheckerboardPage* self); + gchar* (*get_view_empty_message) (CheckerboardPage* self); + gchar* (*get_filter_no_match_message) (CheckerboardPage* self); + void (*on_item_activated) (CheckerboardPage* self, CheckerboardItem* item, CheckerboardPageActivator activator, CheckerboardPageKeyboardModifiers* modifiers); + SearchViewFilter* (*get_search_view_filter) (CheckerboardPage* self); + CoreViewTracker* (*get_view_tracker) (CheckerboardPage* self); + gboolean (*on_mouse_over) (CheckerboardPage* self, CheckerboardItem* item, gint x, gint y, GdkModifierType mask); + void (*set_display_titles) (CheckerboardPage* self, gboolean display); + void (*set_display_comments) (CheckerboardPage* self, gboolean display); +}; + +typedef enum { + RATING_REJECTED = -1, + RATING_UNRATED = 0, + RATING_ONE = 1, + RATING_TWO = 2, + RATING_THREE = 3, + RATING_FOUR = 4, + RATING_FIVE = 5 +} Rating; + +typedef enum { + RAW_DEVELOPER_SHOTWELL = 0, + RAW_DEVELOPER_CAMERA, + RAW_DEVELOPER_EMBEDDED +} RawDeveloper; + +struct _MediaPage { + CheckerboardPage parent_instance; + MediaPagePrivate * priv; +}; + +struct _MediaPageClass { + CheckerboardPageClass parent_class; + void (*on_zoom_changed) (MediaPage* self); + void (*on_export) (MediaPage* self); + void (*on_increase_size) (MediaPage* self); + void (*on_decrease_size) (MediaPage* self); + void (*on_increase_rating) (MediaPage* self); + void (*on_decrease_rating) (MediaPage* self); + void (*on_set_rating) (MediaPage* self, Rating rating); + void (*on_rate_rejected) (MediaPage* self); + void (*on_rate_unrated) (MediaPage* self); + void (*on_rate_one) (MediaPage* self); + void (*on_rate_two) (MediaPage* self); + void (*on_rate_three) (MediaPage* self); + void (*on_rate_four) (MediaPage* self); + void (*on_rate_five) (MediaPage* self); + void (*on_move_to_trash) (MediaPage* self); + void (*on_edit_title) (MediaPage* self); + void (*on_edit_comment) (MediaPage* self); + void (*on_display_titles) (MediaPage* self, GSimpleAction* action, GVariant* value); + void (*on_display_comments) (MediaPage* self, GSimpleAction* action, GVariant* value); + void (*on_display_ratings) (MediaPage* self, GSimpleAction* action, GVariant* value); + void (*on_display_tags) (MediaPage* self, GSimpleAction* action, GVariant* value); + void (*get_config_photos_sort) (MediaPage* self, gboolean* sort_order, gint* sort_by); + void (*set_config_photos_sort) (MediaPage* self, gboolean sort_order, gint sort_by); + void (*on_sort_changed) (MediaPage* self, GSimpleAction* action, GVariant* value); + void (*developer_changed) (MediaPage* self, RawDeveloper rd); + DataView* (*create_thumbnail) (MediaPage* self, DataSource* source); +}; + +struct _CollectionPage { + MediaPage parent_instance; + CollectionPagePrivate * priv; +}; + +struct _CollectionPageClass { + MediaPageClass parent_class; +}; + +struct _FoldersPage { + CollectionPage parent_instance; + FoldersPagePrivate * priv; +}; + +struct _FoldersPageClass { + CollectionPageClass parent_class; +}; + +struct _FoldersPagePrivate { + FoldersPageFolderViewManager* view_manager; +}; + +typedef gboolean (*ProgressMonitor) (guint64 current, guint64 total, gboolean do_event_loop, void* user_data); +struct _ViewManager { + GTypeInstance parent_instance; + volatile int ref_count; + ViewManagerPrivate * priv; +}; + +struct _ViewManagerClass { + GTypeClass parent_class; + void (*finalize) (ViewManager *self); + gboolean (*include_in_view) (ViewManager* self, DataSource* source); + DataView* (*create_view) (ViewManager* self, DataSource* source); +}; + +struct _CollectionViewManager { + ViewManager parent_instance; + CollectionViewManagerPrivate * priv; +}; + +struct _CollectionViewManagerClass { + ViewManagerClass parent_class; +}; + +struct _FoldersPageFolderViewManager { + CollectionViewManager parent_instance; + FoldersPageFolderViewManagerPrivate * priv; + GFile* dir; +}; + +struct _FoldersPageFolderViewManagerClass { + CollectionViewManagerClass parent_class; +}; + + +static gpointer folders_page_parent_class = NULL; +static gpointer folders_page_folder_view_manager_parent_class = NULL; + +GType page_get_type (void) G_GNUC_CONST; +GType page_window_get_type (void) G_GNUC_CONST; +GType fullscreen_window_get_type (void) G_GNUC_CONST; +gpointer injection_group_ref (gpointer instance); +void injection_group_unref (gpointer instance); +GParamSpec* param_spec_injection_group (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags); +void value_set_injection_group (GValue* value, gpointer v_object); +void value_take_injection_group (GValue* value, gpointer v_object); +gpointer value_get_injection_group (const GValue* value); +GType injection_group_get_type (void) G_GNUC_CONST; +GType checkerboard_page_get_type (void) G_GNUC_CONST; +GType data_object_get_type (void) G_GNUC_CONST; +GType data_view_get_type (void) G_GNUC_CONST; +GType thumbnail_view_get_type (void) G_GNUC_CONST; +GType checkerboard_item_get_type (void) G_GNUC_CONST; +GType checkerboard_page_activator_get_type (void) G_GNUC_CONST; +GType checkerboard_page_keyboard_modifiers_get_type (void) G_GNUC_CONST; +CheckerboardPageKeyboardModifiers* checkerboard_page_keyboard_modifiers_dup (const CheckerboardPageKeyboardModifiers* self); +void checkerboard_page_keyboard_modifiers_free (CheckerboardPageKeyboardModifiers* self); +gpointer view_filter_ref (gpointer instance); +void view_filter_unref (gpointer instance); +GParamSpec* param_spec_view_filter (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags); +void value_set_view_filter (GValue* value, gpointer v_object); +void value_take_view_filter (GValue* value, gpointer v_object); +gpointer value_get_view_filter (const GValue* value); +GType view_filter_get_type (void) G_GNUC_CONST; +GType search_view_filter_get_type (void) G_GNUC_CONST; +gpointer core_tracker_ref (gpointer instance); +void core_tracker_unref (gpointer instance); +GParamSpec* core_param_spec_tracker (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags); +void core_value_set_tracker (GValue* value, gpointer v_object); +void core_value_take_tracker (GValue* value, gpointer v_object); +gpointer core_value_get_tracker (const GValue* value); +GType core_tracker_get_type (void) G_GNUC_CONST; +GType core_view_tracker_get_type (void) G_GNUC_CONST; +GType media_page_get_type (void) G_GNUC_CONST; +GType rating_get_type (void) G_GNUC_CONST; +GType raw_developer_get_type (void) G_GNUC_CONST; +GType data_source_get_type (void) G_GNUC_CONST; +GType collection_page_get_type (void) G_GNUC_CONST; +GType folders_page_get_type (void) G_GNUC_CONST; +gpointer view_manager_ref (gpointer instance); +void view_manager_unref (gpointer instance); +GParamSpec* param_spec_view_manager (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags); +void value_set_view_manager (GValue* value, gpointer v_object); +void value_take_view_manager (GValue* value, gpointer v_object); +gpointer value_get_view_manager (const GValue* value); +GType view_manager_get_type (void) G_GNUC_CONST; +GType collection_view_manager_get_type (void) G_GNUC_CONST; +static GType folders_page_folder_view_manager_get_type (void) G_GNUC_CONST G_GNUC_UNUSED; +#define FOLDERS_PAGE_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), FOLDERS_TYPE_PAGE, FoldersPagePrivate)) +enum { + FOLDERS_PAGE_DUMMY_PROPERTY +}; +FoldersPage* folders_page_new (GFile* dir); +FoldersPage* folders_page_construct (GType object_type, GFile* dir); +CollectionPage* collection_page_construct (GType object_type, const gchar* page_name); +static FoldersPageFolderViewManager* folders_page_folder_view_manager_new (FoldersPage* owner, GFile* dir); +static FoldersPageFolderViewManager* folders_page_folder_view_manager_construct (GType object_type, FoldersPage* owner, GFile* dir); +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 media_source_collection_get_type (void) G_GNUC_CONST; +gpointer media_collection_registry_ref (gpointer instance); +void media_collection_registry_unref (gpointer instance); +GParamSpec* param_spec_media_collection_registry (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags); +void value_set_media_collection_registry (GValue* value, gpointer v_object); +void value_take_media_collection_registry (GValue* value, gpointer v_object); +gpointer value_get_media_collection_registry (const GValue* value); +GType media_collection_registry_get_type (void) G_GNUC_CONST; +MediaCollectionRegistry* media_collection_registry_get_instance (void); +GeeCollection* media_collection_registry_get_all (MediaCollectionRegistry* self); +GType view_collection_get_type (void) G_GNUC_CONST; +ViewCollection* page_get_view (Page* 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; +gpointer view_collection_monitor_ref (gpointer instance); +void view_collection_monitor_unref (gpointer instance); +GParamSpec* view_collection_param_spec_monitor (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags); +void view_collection_value_set_monitor (GValue* value, gpointer v_object); +void view_collection_value_take_monitor (GValue* value, gpointer v_object); +gpointer view_collection_value_get_monitor (const GValue* value); +GType view_collection_monitor_get_type (void) G_GNUC_CONST; +ViewCollectionMonitor* view_collection_monitor_source_collection (ViewCollection* self, SourceCollection* sources, ViewManager* manager, Alteration* prereq, GeeCollection* initial, ProgressMonitor progress_monitor, void* progress_monitor_target); +static void folders_page_real_get_config_photos_sort (MediaPage* base, gboolean* sort_order, gint* sort_by); +GType configuration_facade_get_type (void) G_GNUC_CONST; +GType config_facade_get_type (void) G_GNUC_CONST; +ConfigFacade* config_facade_get_instance (void); +void configuration_facade_get_library_photos_sort (ConfigurationFacade* self, gboolean* sort_order, gint* sort_by); +static void folders_page_real_set_config_photos_sort (MediaPage* base, gboolean sort_order, gint sort_by); +void configuration_facade_set_library_photos_sort (ConfigurationFacade* self, gboolean sort_order, gint sort_by); +enum { + FOLDERS_PAGE_FOLDER_VIEW_MANAGER_DUMMY_PROPERTY +}; +CollectionViewManager* collection_view_manager_new (CollectionPage* page); +CollectionViewManager* collection_view_manager_construct (GType object_type, CollectionPage* page); +static gboolean folders_page_folder_view_manager_real_include_in_view (ViewManager* base, DataSource* source); +GType thumbnail_source_get_type (void) G_GNUC_CONST; +GType media_source_get_type (void) G_GNUC_CONST; +GFile* media_source_get_file (MediaSource* self); +static void folders_page_folder_view_manager_finalize (ViewManager * obj); +static void folders_page_finalize (GObject * obj); + + +FoldersPage* folders_page_construct (GType object_type, GFile* dir) { + FoldersPage * self = NULL; + GFile* _tmp0_; + gchar* _tmp1_; + gchar* _tmp2_; + GFile* _tmp3_; + FoldersPageFolderViewManager* _tmp4_; +#line 24 "/home/jens/Source/shotwell/src/folders/FoldersPage.vala" + g_return_val_if_fail (G_IS_FILE (dir), NULL); +#line 25 "/home/jens/Source/shotwell/src/folders/FoldersPage.vala" + _tmp0_ = dir; +#line 25 "/home/jens/Source/shotwell/src/folders/FoldersPage.vala" + _tmp1_ = g_file_get_path (_tmp0_); +#line 25 "/home/jens/Source/shotwell/src/folders/FoldersPage.vala" + _tmp2_ = _tmp1_; +#line 25 "/home/jens/Source/shotwell/src/folders/FoldersPage.vala" + self = (FoldersPage*) collection_page_construct (object_type, _tmp2_); +#line 25 "/home/jens/Source/shotwell/src/folders/FoldersPage.vala" + _g_free0 (_tmp2_); +#line 27 "/home/jens/Source/shotwell/src/folders/FoldersPage.vala" + _tmp3_ = dir; +#line 27 "/home/jens/Source/shotwell/src/folders/FoldersPage.vala" + _tmp4_ = folders_page_folder_view_manager_new (self, _tmp3_); +#line 27 "/home/jens/Source/shotwell/src/folders/FoldersPage.vala" + _view_manager_unref0 (self->priv->view_manager); +#line 27 "/home/jens/Source/shotwell/src/folders/FoldersPage.vala" + self->priv->view_manager = _tmp4_; +#line 710 "FoldersPage.c" + { + GeeIterator* _sources_it = NULL; + MediaCollectionRegistry* _tmp5_; + MediaCollectionRegistry* _tmp6_; + GeeCollection* _tmp7_; + GeeCollection* _tmp8_; + GeeIterator* _tmp9_; + GeeIterator* _tmp10_; +#line 29 "/home/jens/Source/shotwell/src/folders/FoldersPage.vala" + _tmp5_ = media_collection_registry_get_instance (); +#line 29 "/home/jens/Source/shotwell/src/folders/FoldersPage.vala" + _tmp6_ = _tmp5_; +#line 29 "/home/jens/Source/shotwell/src/folders/FoldersPage.vala" + _tmp7_ = media_collection_registry_get_all (_tmp6_); +#line 29 "/home/jens/Source/shotwell/src/folders/FoldersPage.vala" + _tmp8_ = _tmp7_; +#line 29 "/home/jens/Source/shotwell/src/folders/FoldersPage.vala" + _tmp9_ = gee_iterable_iterator (G_TYPE_CHECK_INSTANCE_CAST (_tmp8_, GEE_TYPE_ITERABLE, GeeIterable)); +#line 29 "/home/jens/Source/shotwell/src/folders/FoldersPage.vala" + _tmp10_ = _tmp9_; +#line 29 "/home/jens/Source/shotwell/src/folders/FoldersPage.vala" + _g_object_unref0 (_tmp8_); +#line 29 "/home/jens/Source/shotwell/src/folders/FoldersPage.vala" + _media_collection_registry_unref0 (_tmp6_); +#line 29 "/home/jens/Source/shotwell/src/folders/FoldersPage.vala" + _sources_it = _tmp10_; +#line 29 "/home/jens/Source/shotwell/src/folders/FoldersPage.vala" + while (TRUE) { +#line 739 "FoldersPage.c" + GeeIterator* _tmp11_; + gboolean _tmp12_; + MediaSourceCollection* sources = NULL; + GeeIterator* _tmp13_; + gpointer _tmp14_; + ViewCollection* _tmp15_; + ViewCollection* _tmp16_; + MediaSourceCollection* _tmp17_; + FoldersPageFolderViewManager* _tmp18_; + ViewCollectionMonitor* _tmp19_; + ViewCollectionMonitor* _tmp20_; +#line 29 "/home/jens/Source/shotwell/src/folders/FoldersPage.vala" + _tmp11_ = _sources_it; +#line 29 "/home/jens/Source/shotwell/src/folders/FoldersPage.vala" + _tmp12_ = gee_iterator_next (_tmp11_); +#line 29 "/home/jens/Source/shotwell/src/folders/FoldersPage.vala" + if (!_tmp12_) { +#line 29 "/home/jens/Source/shotwell/src/folders/FoldersPage.vala" + break; +#line 759 "FoldersPage.c" + } +#line 29 "/home/jens/Source/shotwell/src/folders/FoldersPage.vala" + _tmp13_ = _sources_it; +#line 29 "/home/jens/Source/shotwell/src/folders/FoldersPage.vala" + _tmp14_ = gee_iterator_get (_tmp13_); +#line 29 "/home/jens/Source/shotwell/src/folders/FoldersPage.vala" + sources = (MediaSourceCollection*) _tmp14_; +#line 30 "/home/jens/Source/shotwell/src/folders/FoldersPage.vala" + _tmp15_ = page_get_view (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_PAGE, Page)); +#line 30 "/home/jens/Source/shotwell/src/folders/FoldersPage.vala" + _tmp16_ = _tmp15_; +#line 30 "/home/jens/Source/shotwell/src/folders/FoldersPage.vala" + _tmp17_ = sources; +#line 30 "/home/jens/Source/shotwell/src/folders/FoldersPage.vala" + _tmp18_ = self->priv->view_manager; +#line 30 "/home/jens/Source/shotwell/src/folders/FoldersPage.vala" + _tmp19_ = view_collection_monitor_source_collection (_tmp16_, G_TYPE_CHECK_INSTANCE_CAST (_tmp17_, TYPE_SOURCE_COLLECTION, SourceCollection), G_TYPE_CHECK_INSTANCE_CAST (_tmp18_, TYPE_VIEW_MANAGER, ViewManager), NULL, NULL, NULL, NULL); +#line 30 "/home/jens/Source/shotwell/src/folders/FoldersPage.vala" + _tmp20_ = _tmp19_; +#line 30 "/home/jens/Source/shotwell/src/folders/FoldersPage.vala" + _view_collection_monitor_unref0 (_tmp20_); +#line 30 "/home/jens/Source/shotwell/src/folders/FoldersPage.vala" + _data_collection_unref0 (_tmp16_); +#line 29 "/home/jens/Source/shotwell/src/folders/FoldersPage.vala" + _data_collection_unref0 (sources); +#line 785 "FoldersPage.c" + } +#line 29 "/home/jens/Source/shotwell/src/folders/FoldersPage.vala" + _g_object_unref0 (_sources_it); +#line 789 "FoldersPage.c" + } +#line 24 "/home/jens/Source/shotwell/src/folders/FoldersPage.vala" + return self; +#line 793 "FoldersPage.c" +} + + +FoldersPage* folders_page_new (GFile* dir) { +#line 24 "/home/jens/Source/shotwell/src/folders/FoldersPage.vala" + return folders_page_construct (FOLDERS_TYPE_PAGE, dir); +#line 800 "FoldersPage.c" +} + + +static void folders_page_real_get_config_photos_sort (MediaPage* base, gboolean* sort_order, gint* sort_by) { + FoldersPage * self; + gboolean _vala_sort_order = FALSE; + gint _vala_sort_by = 0; + ConfigFacade* _tmp0_; + ConfigFacade* _tmp1_; + gboolean _tmp2_ = FALSE; + gint _tmp3_ = 0; +#line 33 "/home/jens/Source/shotwell/src/folders/FoldersPage.vala" + self = G_TYPE_CHECK_INSTANCE_CAST (base, FOLDERS_TYPE_PAGE, FoldersPage); +#line 34 "/home/jens/Source/shotwell/src/folders/FoldersPage.vala" + _tmp0_ = config_facade_get_instance (); +#line 34 "/home/jens/Source/shotwell/src/folders/FoldersPage.vala" + _tmp1_ = _tmp0_; +#line 34 "/home/jens/Source/shotwell/src/folders/FoldersPage.vala" + configuration_facade_get_library_photos_sort (G_TYPE_CHECK_INSTANCE_CAST (_tmp1_, TYPE_CONFIGURATION_FACADE, ConfigurationFacade), &_tmp2_, &_tmp3_); +#line 34 "/home/jens/Source/shotwell/src/folders/FoldersPage.vala" + _vala_sort_order = _tmp2_; +#line 34 "/home/jens/Source/shotwell/src/folders/FoldersPage.vala" + _vala_sort_by = _tmp3_; +#line 34 "/home/jens/Source/shotwell/src/folders/FoldersPage.vala" + _g_object_unref0 (_tmp1_); +#line 33 "/home/jens/Source/shotwell/src/folders/FoldersPage.vala" + if (sort_order) { +#line 33 "/home/jens/Source/shotwell/src/folders/FoldersPage.vala" + *sort_order = _vala_sort_order; +#line 830 "FoldersPage.c" + } +#line 33 "/home/jens/Source/shotwell/src/folders/FoldersPage.vala" + if (sort_by) { +#line 33 "/home/jens/Source/shotwell/src/folders/FoldersPage.vala" + *sort_by = _vala_sort_by; +#line 836 "FoldersPage.c" + } +} + + +static void folders_page_real_set_config_photos_sort (MediaPage* base, gboolean sort_order, gint sort_by) { + FoldersPage * self; + ConfigFacade* _tmp0_; + ConfigFacade* _tmp1_; + gboolean _tmp2_; + gint _tmp3_; +#line 37 "/home/jens/Source/shotwell/src/folders/FoldersPage.vala" + self = G_TYPE_CHECK_INSTANCE_CAST (base, FOLDERS_TYPE_PAGE, FoldersPage); +#line 38 "/home/jens/Source/shotwell/src/folders/FoldersPage.vala" + _tmp0_ = config_facade_get_instance (); +#line 38 "/home/jens/Source/shotwell/src/folders/FoldersPage.vala" + _tmp1_ = _tmp0_; +#line 38 "/home/jens/Source/shotwell/src/folders/FoldersPage.vala" + _tmp2_ = sort_order; +#line 38 "/home/jens/Source/shotwell/src/folders/FoldersPage.vala" + _tmp3_ = sort_by; +#line 38 "/home/jens/Source/shotwell/src/folders/FoldersPage.vala" + configuration_facade_set_library_photos_sort (G_TYPE_CHECK_INSTANCE_CAST (_tmp1_, TYPE_CONFIGURATION_FACADE, ConfigurationFacade), _tmp2_, _tmp3_); +#line 38 "/home/jens/Source/shotwell/src/folders/FoldersPage.vala" + _g_object_unref0 (_tmp1_); +#line 861 "FoldersPage.c" +} + + +static gpointer _g_object_ref0 (gpointer self) { +#line 14 "/home/jens/Source/shotwell/src/folders/FoldersPage.vala" + return self ? g_object_ref (self) : NULL; +#line 868 "FoldersPage.c" +} + + +static FoldersPageFolderViewManager* folders_page_folder_view_manager_construct (GType object_type, FoldersPage* owner, GFile* dir) { + FoldersPageFolderViewManager* self = NULL; + FoldersPage* _tmp0_; + GFile* _tmp1_; + GFile* _tmp2_; +#line 11 "/home/jens/Source/shotwell/src/folders/FoldersPage.vala" + g_return_val_if_fail (FOLDERS_IS_PAGE (owner), NULL); +#line 11 "/home/jens/Source/shotwell/src/folders/FoldersPage.vala" + g_return_val_if_fail (G_IS_FILE (dir), NULL); +#line 12 "/home/jens/Source/shotwell/src/folders/FoldersPage.vala" + _tmp0_ = owner; +#line 12 "/home/jens/Source/shotwell/src/folders/FoldersPage.vala" + self = (FoldersPageFolderViewManager*) collection_view_manager_construct (object_type, G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, TYPE_COLLECTION_PAGE, CollectionPage)); +#line 14 "/home/jens/Source/shotwell/src/folders/FoldersPage.vala" + _tmp1_ = dir; +#line 14 "/home/jens/Source/shotwell/src/folders/FoldersPage.vala" + _tmp2_ = _g_object_ref0 (_tmp1_); +#line 14 "/home/jens/Source/shotwell/src/folders/FoldersPage.vala" + _g_object_unref0 (self->dir); +#line 14 "/home/jens/Source/shotwell/src/folders/FoldersPage.vala" + self->dir = _tmp2_; +#line 11 "/home/jens/Source/shotwell/src/folders/FoldersPage.vala" + return self; +#line 895 "FoldersPage.c" +} + + +static FoldersPageFolderViewManager* folders_page_folder_view_manager_new (FoldersPage* owner, GFile* dir) { +#line 11 "/home/jens/Source/shotwell/src/folders/FoldersPage.vala" + return folders_page_folder_view_manager_construct (FOLDERS_PAGE_TYPE_FOLDER_VIEW_MANAGER, owner, dir); +#line 902 "FoldersPage.c" +} + + +static gboolean folders_page_folder_view_manager_real_include_in_view (ViewManager* base, DataSource* source) { + FoldersPageFolderViewManager * self; + gboolean result = FALSE; + DataSource* _tmp0_; + GFile* _tmp1_; + GFile* _tmp2_; + GFile* _tmp3_; + gboolean _tmp4_; + gboolean _tmp5_; +#line 17 "/home/jens/Source/shotwell/src/folders/FoldersPage.vala" + self = G_TYPE_CHECK_INSTANCE_CAST (base, FOLDERS_PAGE_TYPE_FOLDER_VIEW_MANAGER, FoldersPageFolderViewManager); +#line 17 "/home/jens/Source/shotwell/src/folders/FoldersPage.vala" + g_return_val_if_fail (IS_DATA_SOURCE (source), FALSE); +#line 18 "/home/jens/Source/shotwell/src/folders/FoldersPage.vala" + _tmp0_ = source; +#line 18 "/home/jens/Source/shotwell/src/folders/FoldersPage.vala" + _tmp1_ = media_source_get_file (G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, TYPE_MEDIA_SOURCE, MediaSource)); +#line 18 "/home/jens/Source/shotwell/src/folders/FoldersPage.vala" + _tmp2_ = _tmp1_; +#line 18 "/home/jens/Source/shotwell/src/folders/FoldersPage.vala" + _tmp3_ = self->dir; +#line 18 "/home/jens/Source/shotwell/src/folders/FoldersPage.vala" + _tmp4_ = g_file_has_prefix (_tmp2_, _tmp3_); +#line 18 "/home/jens/Source/shotwell/src/folders/FoldersPage.vala" + _tmp5_ = _tmp4_; +#line 18 "/home/jens/Source/shotwell/src/folders/FoldersPage.vala" + _g_object_unref0 (_tmp2_); +#line 18 "/home/jens/Source/shotwell/src/folders/FoldersPage.vala" + result = _tmp5_; +#line 18 "/home/jens/Source/shotwell/src/folders/FoldersPage.vala" + return result; +#line 937 "FoldersPage.c" +} + + +static void folders_page_folder_view_manager_class_init (FoldersPageFolderViewManagerClass * klass) { +#line 8 "/home/jens/Source/shotwell/src/folders/FoldersPage.vala" + folders_page_folder_view_manager_parent_class = g_type_class_peek_parent (klass); +#line 8 "/home/jens/Source/shotwell/src/folders/FoldersPage.vala" + ((ViewManagerClass *) klass)->finalize = folders_page_folder_view_manager_finalize; +#line 8 "/home/jens/Source/shotwell/src/folders/FoldersPage.vala" + ((ViewManagerClass *) klass)->include_in_view = (gboolean (*) (ViewManager *, DataSource*)) folders_page_folder_view_manager_real_include_in_view; +#line 948 "FoldersPage.c" +} + + +static void folders_page_folder_view_manager_instance_init (FoldersPageFolderViewManager * self) { +} + + +static void folders_page_folder_view_manager_finalize (ViewManager * obj) { + FoldersPageFolderViewManager * self; +#line 8 "/home/jens/Source/shotwell/src/folders/FoldersPage.vala" + self = G_TYPE_CHECK_INSTANCE_CAST (obj, FOLDERS_PAGE_TYPE_FOLDER_VIEW_MANAGER, FoldersPageFolderViewManager); +#line 9 "/home/jens/Source/shotwell/src/folders/FoldersPage.vala" + _g_object_unref0 (self->dir); +#line 8 "/home/jens/Source/shotwell/src/folders/FoldersPage.vala" + VIEW_MANAGER_CLASS (folders_page_folder_view_manager_parent_class)->finalize (obj); +#line 964 "FoldersPage.c" +} + + +static GType folders_page_folder_view_manager_get_type (void) { + static volatile gsize folders_page_folder_view_manager_type_id__volatile = 0; + if (g_once_init_enter (&folders_page_folder_view_manager_type_id__volatile)) { + static const GTypeInfo g_define_type_info = { sizeof (FoldersPageFolderViewManagerClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) folders_page_folder_view_manager_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (FoldersPageFolderViewManager), 0, (GInstanceInitFunc) folders_page_folder_view_manager_instance_init, NULL }; + GType folders_page_folder_view_manager_type_id; + folders_page_folder_view_manager_type_id = g_type_register_static (TYPE_COLLECTION_VIEW_MANAGER, "FoldersPageFolderViewManager", &g_define_type_info, 0); + g_once_init_leave (&folders_page_folder_view_manager_type_id__volatile, folders_page_folder_view_manager_type_id); + } + return folders_page_folder_view_manager_type_id__volatile; +} + + +static void folders_page_class_init (FoldersPageClass * klass) { +#line 7 "/home/jens/Source/shotwell/src/folders/FoldersPage.vala" + folders_page_parent_class = g_type_class_peek_parent (klass); +#line 7 "/home/jens/Source/shotwell/src/folders/FoldersPage.vala" + g_type_class_add_private (klass, sizeof (FoldersPagePrivate)); +#line 7 "/home/jens/Source/shotwell/src/folders/FoldersPage.vala" + ((MediaPageClass *) klass)->get_config_photos_sort = (void (*) (MediaPage *, gboolean*, gint*)) folders_page_real_get_config_photos_sort; +#line 7 "/home/jens/Source/shotwell/src/folders/FoldersPage.vala" + ((MediaPageClass *) klass)->set_config_photos_sort = (void (*) (MediaPage *, gboolean, gint)) folders_page_real_set_config_photos_sort; +#line 7 "/home/jens/Source/shotwell/src/folders/FoldersPage.vala" + G_OBJECT_CLASS (klass)->finalize = folders_page_finalize; +#line 991 "FoldersPage.c" +} + + +static void folders_page_instance_init (FoldersPage * self) { +#line 7 "/home/jens/Source/shotwell/src/folders/FoldersPage.vala" + self->priv = FOLDERS_PAGE_GET_PRIVATE (self); +#line 998 "FoldersPage.c" +} + + +static void folders_page_finalize (GObject * obj) { + FoldersPage * self; +#line 7 "/home/jens/Source/shotwell/src/folders/FoldersPage.vala" + self = G_TYPE_CHECK_INSTANCE_CAST (obj, FOLDERS_TYPE_PAGE, FoldersPage); +#line 22 "/home/jens/Source/shotwell/src/folders/FoldersPage.vala" + _view_manager_unref0 (self->priv->view_manager); +#line 7 "/home/jens/Source/shotwell/src/folders/FoldersPage.vala" + G_OBJECT_CLASS (folders_page_parent_class)->finalize (obj); +#line 1010 "FoldersPage.c" +} + + +GType folders_page_get_type (void) { + static volatile gsize folders_page_type_id__volatile = 0; + if (g_once_init_enter (&folders_page_type_id__volatile)) { + static const GTypeInfo g_define_type_info = { sizeof (FoldersPageClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) folders_page_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (FoldersPage), 0, (GInstanceInitFunc) folders_page_instance_init, NULL }; + GType folders_page_type_id; + folders_page_type_id = g_type_register_static (TYPE_COLLECTION_PAGE, "FoldersPage", &g_define_type_info, 0); + g_once_init_leave (&folders_page_type_id__volatile, folders_page_type_id); + } + return folders_page_type_id__volatile; +} + + + diff --git a/src/folders/FoldersPage.vala b/src/folders/FoldersPage.vala new file mode 100644 index 0000000..6145c95 --- /dev/null +++ b/src/folders/FoldersPage.vala @@ -0,0 +1,41 @@ +/* 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 Folders.Page : CollectionPage { + private class FolderViewManager : CollectionViewManager { + public File dir; + + public FolderViewManager(Folders.Page owner, File dir) { + base (owner); + + this.dir = dir; + } + + public override bool include_in_view(DataSource source) { + return ((MediaSource) source).get_file().has_prefix(dir); + } + } + + private FolderViewManager view_manager; + + public Page(File dir) { + base (dir.get_path()); + + view_manager = new FolderViewManager(this, dir); + + foreach (MediaSourceCollection sources in MediaCollectionRegistry.get_instance().get_all()) + get_view().monitor_source_collection(sources, view_manager, null); + } + + protected override void get_config_photos_sort(out bool sort_order, out int sort_by) { + Config.Facade.get_instance().get_library_photos_sort(out sort_order, out sort_by); + } + + protected override void set_config_photos_sort(bool sort_order, int sort_by) { + Config.Facade.get_instance().set_library_photos_sort(sort_order, sort_by); + } +} + diff --git a/src/folders/Page.c b/src/folders/Page.c deleted file mode 100644 index 49bb21a..0000000 --- a/src/folders/Page.c +++ /dev/null @@ -1,1025 +0,0 @@ -/* Page.c generated by valac 0.36.6, the Vala compiler - * generated from Page.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 - - -#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; -typedef struct _PagePrivate PagePrivate; - -#define TYPE_PAGE_WINDOW (page_window_get_type ()) -#define PAGE_WINDOW(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_PAGE_WINDOW, PageWindow)) -#define PAGE_WINDOW_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_PAGE_WINDOW, PageWindowClass)) -#define IS_PAGE_WINDOW(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_PAGE_WINDOW)) -#define IS_PAGE_WINDOW_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_PAGE_WINDOW)) -#define PAGE_WINDOW_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_PAGE_WINDOW, PageWindowClass)) - -typedef struct _PageWindow PageWindow; -typedef struct _PageWindowClass PageWindowClass; - -#define TYPE_FULLSCREEN_WINDOW (fullscreen_window_get_type ()) -#define FULLSCREEN_WINDOW(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_FULLSCREEN_WINDOW, FullscreenWindow)) -#define FULLSCREEN_WINDOW_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_FULLSCREEN_WINDOW, FullscreenWindowClass)) -#define IS_FULLSCREEN_WINDOW(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_FULLSCREEN_WINDOW)) -#define IS_FULLSCREEN_WINDOW_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_FULLSCREEN_WINDOW)) -#define FULLSCREEN_WINDOW_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_FULLSCREEN_WINDOW, FullscreenWindowClass)) - -typedef struct _FullscreenWindow FullscreenWindow; -typedef struct _FullscreenWindowClass FullscreenWindowClass; - -#define TYPE_INJECTION_GROUP (injection_group_get_type ()) -#define INJECTION_GROUP(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_INJECTION_GROUP, InjectionGroup)) -#define INJECTION_GROUP_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_INJECTION_GROUP, InjectionGroupClass)) -#define IS_INJECTION_GROUP(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_INJECTION_GROUP)) -#define IS_INJECTION_GROUP_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_INJECTION_GROUP)) -#define INJECTION_GROUP_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_INJECTION_GROUP, InjectionGroupClass)) - -typedef struct _InjectionGroup InjectionGroup; -typedef struct _InjectionGroupClass InjectionGroupClass; - -#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; -typedef struct _CheckerboardPagePrivate CheckerboardPagePrivate; - -#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_VIEW (data_view_get_type ()) -#define DATA_VIEW(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_DATA_VIEW, DataView)) -#define DATA_VIEW_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_DATA_VIEW, DataViewClass)) -#define IS_DATA_VIEW(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_DATA_VIEW)) -#define IS_DATA_VIEW_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_DATA_VIEW)) -#define DATA_VIEW_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_DATA_VIEW, DataViewClass)) - -typedef struct _DataView DataView; -typedef struct _DataViewClass DataViewClass; - -#define TYPE_THUMBNAIL_VIEW (thumbnail_view_get_type ()) -#define THUMBNAIL_VIEW(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_THUMBNAIL_VIEW, ThumbnailView)) -#define THUMBNAIL_VIEW_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_THUMBNAIL_VIEW, ThumbnailViewClass)) -#define IS_THUMBNAIL_VIEW(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_THUMBNAIL_VIEW)) -#define IS_THUMBNAIL_VIEW_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_THUMBNAIL_VIEW)) -#define THUMBNAIL_VIEW_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_THUMBNAIL_VIEW, ThumbnailViewClass)) - -typedef struct _ThumbnailView ThumbnailView; -typedef struct _ThumbnailViewClass ThumbnailViewClass; - -#define TYPE_CHECKERBOARD_ITEM (checkerboard_item_get_type ()) -#define CHECKERBOARD_ITEM(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_CHECKERBOARD_ITEM, CheckerboardItem)) -#define CHECKERBOARD_ITEM_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_CHECKERBOARD_ITEM, CheckerboardItemClass)) -#define IS_CHECKERBOARD_ITEM(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_CHECKERBOARD_ITEM)) -#define IS_CHECKERBOARD_ITEM_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_CHECKERBOARD_ITEM)) -#define CHECKERBOARD_ITEM_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_CHECKERBOARD_ITEM, CheckerboardItemClass)) - -typedef struct _CheckerboardItem CheckerboardItem; -typedef struct _CheckerboardItemClass CheckerboardItemClass; - -#define CHECKERBOARD_PAGE_TYPE_ACTIVATOR (checkerboard_page_activator_get_type ()) - -#define CHECKERBOARD_PAGE_TYPE_KEYBOARD_MODIFIERS (checkerboard_page_keyboard_modifiers_get_type ()) -typedef struct _CheckerboardPageKeyboardModifiers CheckerboardPageKeyboardModifiers; - -#define TYPE_VIEW_FILTER (view_filter_get_type ()) -#define VIEW_FILTER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_VIEW_FILTER, ViewFilter)) -#define VIEW_FILTER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_VIEW_FILTER, ViewFilterClass)) -#define IS_VIEW_FILTER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_VIEW_FILTER)) -#define IS_VIEW_FILTER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_VIEW_FILTER)) -#define VIEW_FILTER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_VIEW_FILTER, ViewFilterClass)) - -typedef struct _ViewFilter ViewFilter; -typedef struct _ViewFilterClass ViewFilterClass; - -#define TYPE_SEARCH_VIEW_FILTER (search_view_filter_get_type ()) -#define SEARCH_VIEW_FILTER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_SEARCH_VIEW_FILTER, SearchViewFilter)) -#define SEARCH_VIEW_FILTER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_SEARCH_VIEW_FILTER, SearchViewFilterClass)) -#define IS_SEARCH_VIEW_FILTER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_SEARCH_VIEW_FILTER)) -#define IS_SEARCH_VIEW_FILTER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_SEARCH_VIEW_FILTER)) -#define SEARCH_VIEW_FILTER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_SEARCH_VIEW_FILTER, SearchViewFilterClass)) - -typedef struct _SearchViewFilter SearchViewFilter; -typedef struct _SearchViewFilterClass SearchViewFilterClass; - -#define CORE_TYPE_TRACKER (core_tracker_get_type ()) -#define CORE_TRACKER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), CORE_TYPE_TRACKER, CoreTracker)) -#define CORE_TRACKER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), CORE_TYPE_TRACKER, CoreTrackerClass)) -#define CORE_IS_TRACKER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), CORE_TYPE_TRACKER)) -#define CORE_IS_TRACKER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), CORE_TYPE_TRACKER)) -#define CORE_TRACKER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), CORE_TYPE_TRACKER, CoreTrackerClass)) - -typedef struct _CoreTracker CoreTracker; -typedef struct _CoreTrackerClass CoreTrackerClass; - -#define CORE_TYPE_VIEW_TRACKER (core_view_tracker_get_type ()) -#define CORE_VIEW_TRACKER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), CORE_TYPE_VIEW_TRACKER, CoreViewTracker)) -#define CORE_VIEW_TRACKER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), CORE_TYPE_VIEW_TRACKER, CoreViewTrackerClass)) -#define CORE_IS_VIEW_TRACKER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), CORE_TYPE_VIEW_TRACKER)) -#define CORE_IS_VIEW_TRACKER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), CORE_TYPE_VIEW_TRACKER)) -#define CORE_VIEW_TRACKER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), CORE_TYPE_VIEW_TRACKER, CoreViewTrackerClass)) - -typedef struct _CoreViewTracker CoreViewTracker; -typedef struct _CoreViewTrackerClass CoreViewTrackerClass; - -#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; -typedef struct _MediaPagePrivate MediaPagePrivate; - -#define TYPE_RATING (rating_get_type ()) - -#define TYPE_RAW_DEVELOPER (raw_developer_get_type ()) - -#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_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; -typedef struct _CollectionPagePrivate CollectionPagePrivate; - -#define FOLDERS_TYPE_PAGE (folders_page_get_type ()) -#define FOLDERS_PAGE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), FOLDERS_TYPE_PAGE, FoldersPage)) -#define FOLDERS_PAGE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), FOLDERS_TYPE_PAGE, FoldersPageClass)) -#define FOLDERS_IS_PAGE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), FOLDERS_TYPE_PAGE)) -#define FOLDERS_IS_PAGE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), FOLDERS_TYPE_PAGE)) -#define FOLDERS_PAGE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), FOLDERS_TYPE_PAGE, FoldersPageClass)) - -typedef struct _FoldersPage FoldersPage; -typedef struct _FoldersPageClass FoldersPageClass; -typedef struct _FoldersPagePrivate FoldersPagePrivate; - -#define TYPE_VIEW_MANAGER (view_manager_get_type ()) -#define VIEW_MANAGER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_VIEW_MANAGER, ViewManager)) -#define VIEW_MANAGER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_VIEW_MANAGER, ViewManagerClass)) -#define IS_VIEW_MANAGER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_VIEW_MANAGER)) -#define IS_VIEW_MANAGER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_VIEW_MANAGER)) -#define VIEW_MANAGER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_VIEW_MANAGER, ViewManagerClass)) - -typedef struct _ViewManager ViewManager; -typedef struct _ViewManagerClass ViewManagerClass; - -#define TYPE_COLLECTION_VIEW_MANAGER (collection_view_manager_get_type ()) -#define COLLECTION_VIEW_MANAGER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_COLLECTION_VIEW_MANAGER, CollectionViewManager)) -#define COLLECTION_VIEW_MANAGER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_COLLECTION_VIEW_MANAGER, CollectionViewManagerClass)) -#define IS_COLLECTION_VIEW_MANAGER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_COLLECTION_VIEW_MANAGER)) -#define IS_COLLECTION_VIEW_MANAGER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_COLLECTION_VIEW_MANAGER)) -#define COLLECTION_VIEW_MANAGER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_COLLECTION_VIEW_MANAGER, CollectionViewManagerClass)) - -typedef struct _CollectionViewManager CollectionViewManager; -typedef struct _CollectionViewManagerClass CollectionViewManagerClass; - -#define FOLDERS_PAGE_TYPE_FOLDER_VIEW_MANAGER (folders_page_folder_view_manager_get_type ()) -#define FOLDERS_PAGE_FOLDER_VIEW_MANAGER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), FOLDERS_PAGE_TYPE_FOLDER_VIEW_MANAGER, FoldersPageFolderViewManager)) -#define FOLDERS_PAGE_FOLDER_VIEW_MANAGER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), FOLDERS_PAGE_TYPE_FOLDER_VIEW_MANAGER, FoldersPageFolderViewManagerClass)) -#define FOLDERS_PAGE_IS_FOLDER_VIEW_MANAGER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), FOLDERS_PAGE_TYPE_FOLDER_VIEW_MANAGER)) -#define FOLDERS_PAGE_IS_FOLDER_VIEW_MANAGER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), FOLDERS_PAGE_TYPE_FOLDER_VIEW_MANAGER)) -#define FOLDERS_PAGE_FOLDER_VIEW_MANAGER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), FOLDERS_PAGE_TYPE_FOLDER_VIEW_MANAGER, FoldersPageFolderViewManagerClass)) - -typedef struct _FoldersPageFolderViewManager FoldersPageFolderViewManager; -typedef struct _FoldersPageFolderViewManagerClass FoldersPageFolderViewManagerClass; -#define _view_manager_unref0(var) ((var == NULL) ? NULL : (var = (view_manager_unref (var), NULL))) -#define _g_free0(var) (var = (g_free (var), NULL)) - -#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_MEDIA_SOURCE_COLLECTION (media_source_collection_get_type ()) -#define MEDIA_SOURCE_COLLECTION(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_MEDIA_SOURCE_COLLECTION, MediaSourceCollection)) -#define MEDIA_SOURCE_COLLECTION_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_MEDIA_SOURCE_COLLECTION, MediaSourceCollectionClass)) -#define IS_MEDIA_SOURCE_COLLECTION(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_MEDIA_SOURCE_COLLECTION)) -#define IS_MEDIA_SOURCE_COLLECTION_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_MEDIA_SOURCE_COLLECTION)) -#define MEDIA_SOURCE_COLLECTION_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_MEDIA_SOURCE_COLLECTION, MediaSourceCollectionClass)) - -typedef struct _MediaSourceCollection MediaSourceCollection; -typedef struct _MediaSourceCollectionClass MediaSourceCollectionClass; - -#define TYPE_MEDIA_COLLECTION_REGISTRY (media_collection_registry_get_type ()) -#define MEDIA_COLLECTION_REGISTRY(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_MEDIA_COLLECTION_REGISTRY, MediaCollectionRegistry)) -#define MEDIA_COLLECTION_REGISTRY_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_MEDIA_COLLECTION_REGISTRY, MediaCollectionRegistryClass)) -#define IS_MEDIA_COLLECTION_REGISTRY(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_MEDIA_COLLECTION_REGISTRY)) -#define IS_MEDIA_COLLECTION_REGISTRY_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_MEDIA_COLLECTION_REGISTRY)) -#define MEDIA_COLLECTION_REGISTRY_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_MEDIA_COLLECTION_REGISTRY, MediaCollectionRegistryClass)) - -typedef struct _MediaCollectionRegistry MediaCollectionRegistry; -typedef struct _MediaCollectionRegistryClass MediaCollectionRegistryClass; -#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL))) -#define _media_collection_registry_unref0(var) ((var == NULL) ? NULL : (var = (media_collection_registry_unref (var), NULL))) - -#define TYPE_VIEW_COLLECTION (view_collection_get_type ()) -#define VIEW_COLLECTION(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_VIEW_COLLECTION, ViewCollection)) -#define VIEW_COLLECTION_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_VIEW_COLLECTION, ViewCollectionClass)) -#define IS_VIEW_COLLECTION(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_VIEW_COLLECTION)) -#define IS_VIEW_COLLECTION_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_VIEW_COLLECTION)) -#define VIEW_COLLECTION_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_VIEW_COLLECTION, ViewCollectionClass)) - -typedef struct _ViewCollection ViewCollection; -typedef struct _ViewCollectionClass ViewCollectionClass; - -#define 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 VIEW_COLLECTION_TYPE_MONITOR (view_collection_monitor_get_type ()) -#define VIEW_COLLECTION_MONITOR(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), VIEW_COLLECTION_TYPE_MONITOR, ViewCollectionMonitor)) -#define VIEW_COLLECTION_MONITOR_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), VIEW_COLLECTION_TYPE_MONITOR, ViewCollectionMonitorClass)) -#define VIEW_COLLECTION_IS_MONITOR(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), VIEW_COLLECTION_TYPE_MONITOR)) -#define VIEW_COLLECTION_IS_MONITOR_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), VIEW_COLLECTION_TYPE_MONITOR)) -#define VIEW_COLLECTION_MONITOR_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), VIEW_COLLECTION_TYPE_MONITOR, ViewCollectionMonitorClass)) - -typedef struct _ViewCollectionMonitor ViewCollectionMonitor; -typedef struct _ViewCollectionMonitorClass ViewCollectionMonitorClass; -#define _view_collection_monitor_unref0(var) ((var == NULL) ? NULL : (var = (view_collection_monitor_unref (var), NULL))) -#define _data_collection_unref0(var) ((var == NULL) ? NULL : (var = (data_collection_unref (var), NULL))) - -#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; -typedef struct _ViewManagerPrivate ViewManagerPrivate; -typedef struct _CollectionViewManagerPrivate CollectionViewManagerPrivate; -typedef struct _FoldersPageFolderViewManagerPrivate FoldersPageFolderViewManagerPrivate; - -#define TYPE_THUMBNAIL_SOURCE (thumbnail_source_get_type ()) -#define THUMBNAIL_SOURCE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_THUMBNAIL_SOURCE, ThumbnailSource)) -#define THUMBNAIL_SOURCE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_THUMBNAIL_SOURCE, ThumbnailSourceClass)) -#define IS_THUMBNAIL_SOURCE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_THUMBNAIL_SOURCE)) -#define IS_THUMBNAIL_SOURCE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_THUMBNAIL_SOURCE)) -#define THUMBNAIL_SOURCE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_THUMBNAIL_SOURCE, ThumbnailSourceClass)) - -typedef struct _ThumbnailSource ThumbnailSource; -typedef struct _ThumbnailSourceClass ThumbnailSourceClass; - -#define TYPE_MEDIA_SOURCE (media_source_get_type ()) -#define MEDIA_SOURCE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_MEDIA_SOURCE, MediaSource)) -#define MEDIA_SOURCE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_MEDIA_SOURCE, MediaSourceClass)) -#define IS_MEDIA_SOURCE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_MEDIA_SOURCE)) -#define IS_MEDIA_SOURCE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_MEDIA_SOURCE)) -#define MEDIA_SOURCE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_MEDIA_SOURCE, MediaSourceClass)) - -typedef struct _MediaSource MediaSource; -typedef struct _MediaSourceClass MediaSourceClass; - -struct _Page { - GtkScrolledWindow parent_instance; - PagePrivate * priv; - GtkBuilder* builder; - GtkToolbar* toolbar; - gboolean in_view; -}; - -struct _PageClass { - GtkScrolledWindowClass parent_class; - void (*set_page_name) (Page* self, const gchar* page_name); - void (*set_container) (Page* self, GtkWindow* container); - void (*clear_container) (Page* self); - GtkToolbar* (*get_toolbar) (Page* self); - GtkMenu* (*get_page_context_menu) (Page* self); - void (*switching_from) (Page* self); - void (*switched_to) (Page* self); - void (*ready) (Page* self); - void (*switching_to_fullscreen) (Page* self, FullscreenWindow* fsw); - void (*returning_from_fullscreen) (Page* self, FullscreenWindow* fsw); - void (*add_actions) (Page* self, GActionMap* map); - void (*remove_actions) (Page* self, GActionMap* map); - void (*init_collect_ui_filenames) (Page* self, GeeList* ui_filenames); - InjectionGroup** (*init_collect_injection_groups) (Page* self, int* result_length1); - void (*init_actions) (Page* self, gint selected_count, gint count); - void (*update_actions) (Page* self, gint selected_count, gint count); - gboolean (*source_drag_failed) (Page* self, GdkDragContext* context, GtkDragResult drag_result); - gboolean (*on_left_click) (Page* self, GdkEventButton* event); - gboolean (*on_middle_click) (Page* self, GdkEventButton* event); - gboolean (*on_right_click) (Page* self, GdkEventButton* event); - gboolean (*on_left_released) (Page* self, GdkEventButton* event); - gboolean (*on_middle_released) (Page* self, GdkEventButton* event); - gboolean (*on_right_released) (Page* self, GdkEventButton* event); - gboolean (*on_ctrl_pressed) (Page* self, GdkEventKey* event); - gboolean (*on_ctrl_released) (Page* self, GdkEventKey* event); - gboolean (*on_alt_pressed) (Page* self, GdkEventKey* event); - gboolean (*on_alt_released) (Page* self, GdkEventKey* event); - gboolean (*on_shift_pressed) (Page* self, GdkEventKey* event); - gboolean (*on_shift_released) (Page* self, GdkEventKey* event); - gboolean (*on_super_pressed) (Page* self, GdkEventKey* event); - gboolean (*on_super_released) (Page* self, GdkEventKey* event); - gboolean (*on_app_key_pressed) (Page* self, GdkEventKey* event); - gboolean (*on_app_key_released) (Page* self, GdkEventKey* event); - void (*on_move) (Page* self, GdkRectangle* rect); - void (*on_move_start) (Page* self, GdkRectangle* rect); - void (*on_move_finished) (Page* self, GdkRectangle* rect); - void (*on_resize) (Page* self, GdkRectangle* rect); - void (*on_resize_start) (Page* self, GdkRectangle* rect); - void (*on_resize_finished) (Page* self, GdkRectangle* rect); - gboolean (*on_configure) (Page* self, GdkEventConfigure* event, GdkRectangle* rect); - gboolean (*on_motion) (Page* self, GdkEventMotion* event, gint x, gint y, GdkModifierType mask); - gboolean (*on_leave_notify_event) (Page* self); - gboolean (*on_mousewheel_up) (Page* self, GdkEventScroll* event); - gboolean (*on_mousewheel_down) (Page* self, GdkEventScroll* event); - gboolean (*on_mousewheel_left) (Page* self, GdkEventScroll* event); - gboolean (*on_mousewheel_right) (Page* self, GdkEventScroll* event); - gboolean (*on_context_keypress) (Page* self); - gboolean (*on_context_buttonpress) (Page* self, GdkEventButton* event); - gboolean (*on_context_invoked) (Page* self); - void (*set_page_cursor) (Page* self, GdkCursorType cursor_type); -}; - -typedef enum { - CHECKERBOARD_PAGE_ACTIVATOR_KEYBOARD, - CHECKERBOARD_PAGE_ACTIVATOR_MOUSE -} CheckerboardPageActivator; - -struct _CheckerboardPageKeyboardModifiers { - gboolean ctrl_pressed; - gboolean alt_pressed; - gboolean shift_pressed; - gboolean super_pressed; -}; - -struct _CheckerboardPage { - Page parent_instance; - CheckerboardPagePrivate * priv; - CheckerboardItem* anchor; - CheckerboardItem* cursor; -}; - -struct _CheckerboardPageClass { - PageClass parent_class; - GtkMenu* (*get_item_context_menu) (CheckerboardPage* self); - gchar* (*get_view_empty_message) (CheckerboardPage* self); - gchar* (*get_filter_no_match_message) (CheckerboardPage* self); - void (*on_item_activated) (CheckerboardPage* self, CheckerboardItem* item, CheckerboardPageActivator activator, CheckerboardPageKeyboardModifiers* modifiers); - SearchViewFilter* (*get_search_view_filter) (CheckerboardPage* self); - CoreViewTracker* (*get_view_tracker) (CheckerboardPage* self); - gboolean (*on_mouse_over) (CheckerboardPage* self, CheckerboardItem* item, gint x, gint y, GdkModifierType mask); - void (*set_display_titles) (CheckerboardPage* self, gboolean display); - void (*set_display_comments) (CheckerboardPage* self, gboolean display); -}; - -typedef enum { - RATING_REJECTED = -1, - RATING_UNRATED = 0, - RATING_ONE = 1, - RATING_TWO = 2, - RATING_THREE = 3, - RATING_FOUR = 4, - RATING_FIVE = 5 -} Rating; - -typedef enum { - RAW_DEVELOPER_SHOTWELL = 0, - RAW_DEVELOPER_CAMERA, - RAW_DEVELOPER_EMBEDDED -} RawDeveloper; - -struct _MediaPage { - CheckerboardPage parent_instance; - MediaPagePrivate * priv; -}; - -struct _MediaPageClass { - CheckerboardPageClass parent_class; - void (*on_zoom_changed) (MediaPage* self); - void (*on_export) (MediaPage* self); - void (*on_increase_size) (MediaPage* self); - void (*on_decrease_size) (MediaPage* self); - void (*on_increase_rating) (MediaPage* self); - void (*on_decrease_rating) (MediaPage* self); - void (*on_set_rating) (MediaPage* self, Rating rating); - void (*on_rate_rejected) (MediaPage* self); - void (*on_rate_unrated) (MediaPage* self); - void (*on_rate_one) (MediaPage* self); - void (*on_rate_two) (MediaPage* self); - void (*on_rate_three) (MediaPage* self); - void (*on_rate_four) (MediaPage* self); - void (*on_rate_five) (MediaPage* self); - void (*on_move_to_trash) (MediaPage* self); - void (*on_edit_title) (MediaPage* self); - void (*on_edit_comment) (MediaPage* self); - void (*on_display_titles) (MediaPage* self, GSimpleAction* action, GVariant* value); - void (*on_display_comments) (MediaPage* self, GSimpleAction* action, GVariant* value); - void (*on_display_ratings) (MediaPage* self, GSimpleAction* action, GVariant* value); - void (*on_display_tags) (MediaPage* self, GSimpleAction* action, GVariant* value); - void (*get_config_photos_sort) (MediaPage* self, gboolean* sort_order, gint* sort_by); - void (*set_config_photos_sort) (MediaPage* self, gboolean sort_order, gint sort_by); - void (*on_sort_changed) (MediaPage* self, GSimpleAction* action, GVariant* value); - void (*developer_changed) (MediaPage* self, RawDeveloper rd); - DataView* (*create_thumbnail) (MediaPage* self, DataSource* source); -}; - -struct _CollectionPage { - MediaPage parent_instance; - CollectionPagePrivate * priv; -}; - -struct _CollectionPageClass { - MediaPageClass parent_class; -}; - -struct _FoldersPage { - CollectionPage parent_instance; - FoldersPagePrivate * priv; -}; - -struct _FoldersPageClass { - CollectionPageClass parent_class; -}; - -struct _FoldersPagePrivate { - FoldersPageFolderViewManager* view_manager; -}; - -typedef gboolean (*ProgressMonitor) (guint64 current, guint64 total, gboolean do_event_loop, void* user_data); -struct _ViewManager { - GTypeInstance parent_instance; - volatile int ref_count; - ViewManagerPrivate * priv; -}; - -struct _ViewManagerClass { - GTypeClass parent_class; - void (*finalize) (ViewManager *self); - gboolean (*include_in_view) (ViewManager* self, DataSource* source); - DataView* (*create_view) (ViewManager* self, DataSource* source); -}; - -struct _CollectionViewManager { - ViewManager parent_instance; - CollectionViewManagerPrivate * priv; -}; - -struct _CollectionViewManagerClass { - ViewManagerClass parent_class; -}; - -struct _FoldersPageFolderViewManager { - CollectionViewManager parent_instance; - FoldersPageFolderViewManagerPrivate * priv; - GFile* dir; -}; - -struct _FoldersPageFolderViewManagerClass { - CollectionViewManagerClass parent_class; -}; - - -static gpointer folders_page_parent_class = NULL; -static gpointer folders_page_folder_view_manager_parent_class = NULL; - -GType page_get_type (void) G_GNUC_CONST; -GType page_window_get_type (void) G_GNUC_CONST; -GType fullscreen_window_get_type (void) G_GNUC_CONST; -gpointer injection_group_ref (gpointer instance); -void injection_group_unref (gpointer instance); -GParamSpec* param_spec_injection_group (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags); -void value_set_injection_group (GValue* value, gpointer v_object); -void value_take_injection_group (GValue* value, gpointer v_object); -gpointer value_get_injection_group (const GValue* value); -GType injection_group_get_type (void) G_GNUC_CONST; -GType checkerboard_page_get_type (void) G_GNUC_CONST; -GType data_object_get_type (void) G_GNUC_CONST; -GType data_view_get_type (void) G_GNUC_CONST; -GType thumbnail_view_get_type (void) G_GNUC_CONST; -GType checkerboard_item_get_type (void) G_GNUC_CONST; -GType checkerboard_page_activator_get_type (void) G_GNUC_CONST; -GType checkerboard_page_keyboard_modifiers_get_type (void) G_GNUC_CONST; -CheckerboardPageKeyboardModifiers* checkerboard_page_keyboard_modifiers_dup (const CheckerboardPageKeyboardModifiers* self); -void checkerboard_page_keyboard_modifiers_free (CheckerboardPageKeyboardModifiers* self); -gpointer view_filter_ref (gpointer instance); -void view_filter_unref (gpointer instance); -GParamSpec* param_spec_view_filter (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags); -void value_set_view_filter (GValue* value, gpointer v_object); -void value_take_view_filter (GValue* value, gpointer v_object); -gpointer value_get_view_filter (const GValue* value); -GType view_filter_get_type (void) G_GNUC_CONST; -GType search_view_filter_get_type (void) G_GNUC_CONST; -gpointer core_tracker_ref (gpointer instance); -void core_tracker_unref (gpointer instance); -GParamSpec* core_param_spec_tracker (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags); -void core_value_set_tracker (GValue* value, gpointer v_object); -void core_value_take_tracker (GValue* value, gpointer v_object); -gpointer core_value_get_tracker (const GValue* value); -GType core_tracker_get_type (void) G_GNUC_CONST; -GType core_view_tracker_get_type (void) G_GNUC_CONST; -GType media_page_get_type (void) G_GNUC_CONST; -GType rating_get_type (void) G_GNUC_CONST; -GType raw_developer_get_type (void) G_GNUC_CONST; -GType data_source_get_type (void) G_GNUC_CONST; -GType collection_page_get_type (void) G_GNUC_CONST; -GType folders_page_get_type (void) G_GNUC_CONST; -gpointer view_manager_ref (gpointer instance); -void view_manager_unref (gpointer instance); -GParamSpec* param_spec_view_manager (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags); -void value_set_view_manager (GValue* value, gpointer v_object); -void value_take_view_manager (GValue* value, gpointer v_object); -gpointer value_get_view_manager (const GValue* value); -GType view_manager_get_type (void) G_GNUC_CONST; -GType collection_view_manager_get_type (void) G_GNUC_CONST; -static GType folders_page_folder_view_manager_get_type (void) G_GNUC_CONST G_GNUC_UNUSED; -#define FOLDERS_PAGE_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), FOLDERS_TYPE_PAGE, FoldersPagePrivate)) -enum { - FOLDERS_PAGE_DUMMY_PROPERTY -}; -FoldersPage* folders_page_new (GFile* dir); -FoldersPage* folders_page_construct (GType object_type, GFile* dir); -CollectionPage* collection_page_construct (GType object_type, const gchar* page_name); -static FoldersPageFolderViewManager* folders_page_folder_view_manager_new (FoldersPage* owner, GFile* dir); -static FoldersPageFolderViewManager* folders_page_folder_view_manager_construct (GType object_type, FoldersPage* owner, GFile* dir); -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 media_source_collection_get_type (void) G_GNUC_CONST; -gpointer media_collection_registry_ref (gpointer instance); -void media_collection_registry_unref (gpointer instance); -GParamSpec* param_spec_media_collection_registry (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags); -void value_set_media_collection_registry (GValue* value, gpointer v_object); -void value_take_media_collection_registry (GValue* value, gpointer v_object); -gpointer value_get_media_collection_registry (const GValue* value); -GType media_collection_registry_get_type (void) G_GNUC_CONST; -MediaCollectionRegistry* media_collection_registry_get_instance (void); -GeeCollection* media_collection_registry_get_all (MediaCollectionRegistry* self); -GType view_collection_get_type (void) G_GNUC_CONST; -ViewCollection* page_get_view (Page* 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; -gpointer view_collection_monitor_ref (gpointer instance); -void view_collection_monitor_unref (gpointer instance); -GParamSpec* view_collection_param_spec_monitor (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags); -void view_collection_value_set_monitor (GValue* value, gpointer v_object); -void view_collection_value_take_monitor (GValue* value, gpointer v_object); -gpointer view_collection_value_get_monitor (const GValue* value); -GType view_collection_monitor_get_type (void) G_GNUC_CONST; -ViewCollectionMonitor* view_collection_monitor_source_collection (ViewCollection* self, SourceCollection* sources, ViewManager* manager, Alteration* prereq, GeeCollection* initial, ProgressMonitor progress_monitor, void* progress_monitor_target); -static void folders_page_real_get_config_photos_sort (MediaPage* base, gboolean* sort_order, gint* sort_by); -GType configuration_facade_get_type (void) G_GNUC_CONST; -GType config_facade_get_type (void) G_GNUC_CONST; -ConfigFacade* config_facade_get_instance (void); -void configuration_facade_get_library_photos_sort (ConfigurationFacade* self, gboolean* sort_order, gint* sort_by); -static void folders_page_real_set_config_photos_sort (MediaPage* base, gboolean sort_order, gint sort_by); -void configuration_facade_set_library_photos_sort (ConfigurationFacade* self, gboolean sort_order, gint sort_by); -enum { - FOLDERS_PAGE_FOLDER_VIEW_MANAGER_DUMMY_PROPERTY -}; -CollectionViewManager* collection_view_manager_new (CollectionPage* page); -CollectionViewManager* collection_view_manager_construct (GType object_type, CollectionPage* page); -static gboolean folders_page_folder_view_manager_real_include_in_view (ViewManager* base, DataSource* source); -GType thumbnail_source_get_type (void) G_GNUC_CONST; -GType media_source_get_type (void) G_GNUC_CONST; -GFile* media_source_get_file (MediaSource* self); -static void folders_page_folder_view_manager_finalize (ViewManager * obj); -static void folders_page_finalize (GObject * obj); - - -FoldersPage* folders_page_construct (GType object_type, GFile* dir) { - FoldersPage * self = NULL; - GFile* _tmp0_; - gchar* _tmp1_; - gchar* _tmp2_; - GFile* _tmp3_; - FoldersPageFolderViewManager* _tmp4_; -#line 24 "/home/jens/Source/shotwell/src/folders/Page.vala" - g_return_val_if_fail (G_IS_FILE (dir), NULL); -#line 25 "/home/jens/Source/shotwell/src/folders/Page.vala" - _tmp0_ = dir; -#line 25 "/home/jens/Source/shotwell/src/folders/Page.vala" - _tmp1_ = g_file_get_path (_tmp0_); -#line 25 "/home/jens/Source/shotwell/src/folders/Page.vala" - _tmp2_ = _tmp1_; -#line 25 "/home/jens/Source/shotwell/src/folders/Page.vala" - self = (FoldersPage*) collection_page_construct (object_type, _tmp2_); -#line 25 "/home/jens/Source/shotwell/src/folders/Page.vala" - _g_free0 (_tmp2_); -#line 27 "/home/jens/Source/shotwell/src/folders/Page.vala" - _tmp3_ = dir; -#line 27 "/home/jens/Source/shotwell/src/folders/Page.vala" - _tmp4_ = folders_page_folder_view_manager_new (self, _tmp3_); -#line 27 "/home/jens/Source/shotwell/src/folders/Page.vala" - _view_manager_unref0 (self->priv->view_manager); -#line 27 "/home/jens/Source/shotwell/src/folders/Page.vala" - self->priv->view_manager = _tmp4_; -#line 710 "Page.c" - { - GeeIterator* _sources_it = NULL; - MediaCollectionRegistry* _tmp5_; - MediaCollectionRegistry* _tmp6_; - GeeCollection* _tmp7_; - GeeCollection* _tmp8_; - GeeIterator* _tmp9_; - GeeIterator* _tmp10_; -#line 29 "/home/jens/Source/shotwell/src/folders/Page.vala" - _tmp5_ = media_collection_registry_get_instance (); -#line 29 "/home/jens/Source/shotwell/src/folders/Page.vala" - _tmp6_ = _tmp5_; -#line 29 "/home/jens/Source/shotwell/src/folders/Page.vala" - _tmp7_ = media_collection_registry_get_all (_tmp6_); -#line 29 "/home/jens/Source/shotwell/src/folders/Page.vala" - _tmp8_ = _tmp7_; -#line 29 "/home/jens/Source/shotwell/src/folders/Page.vala" - _tmp9_ = gee_iterable_iterator (G_TYPE_CHECK_INSTANCE_CAST (_tmp8_, GEE_TYPE_ITERABLE, GeeIterable)); -#line 29 "/home/jens/Source/shotwell/src/folders/Page.vala" - _tmp10_ = _tmp9_; -#line 29 "/home/jens/Source/shotwell/src/folders/Page.vala" - _g_object_unref0 (_tmp8_); -#line 29 "/home/jens/Source/shotwell/src/folders/Page.vala" - _media_collection_registry_unref0 (_tmp6_); -#line 29 "/home/jens/Source/shotwell/src/folders/Page.vala" - _sources_it = _tmp10_; -#line 29 "/home/jens/Source/shotwell/src/folders/Page.vala" - while (TRUE) { -#line 739 "Page.c" - GeeIterator* _tmp11_; - gboolean _tmp12_; - MediaSourceCollection* sources = NULL; - GeeIterator* _tmp13_; - gpointer _tmp14_; - ViewCollection* _tmp15_; - ViewCollection* _tmp16_; - MediaSourceCollection* _tmp17_; - FoldersPageFolderViewManager* _tmp18_; - ViewCollectionMonitor* _tmp19_; - ViewCollectionMonitor* _tmp20_; -#line 29 "/home/jens/Source/shotwell/src/folders/Page.vala" - _tmp11_ = _sources_it; -#line 29 "/home/jens/Source/shotwell/src/folders/Page.vala" - _tmp12_ = gee_iterator_next (_tmp11_); -#line 29 "/home/jens/Source/shotwell/src/folders/Page.vala" - if (!_tmp12_) { -#line 29 "/home/jens/Source/shotwell/src/folders/Page.vala" - break; -#line 759 "Page.c" - } -#line 29 "/home/jens/Source/shotwell/src/folders/Page.vala" - _tmp13_ = _sources_it; -#line 29 "/home/jens/Source/shotwell/src/folders/Page.vala" - _tmp14_ = gee_iterator_get (_tmp13_); -#line 29 "/home/jens/Source/shotwell/src/folders/Page.vala" - sources = (MediaSourceCollection*) _tmp14_; -#line 30 "/home/jens/Source/shotwell/src/folders/Page.vala" - _tmp15_ = page_get_view (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_PAGE, Page)); -#line 30 "/home/jens/Source/shotwell/src/folders/Page.vala" - _tmp16_ = _tmp15_; -#line 30 "/home/jens/Source/shotwell/src/folders/Page.vala" - _tmp17_ = sources; -#line 30 "/home/jens/Source/shotwell/src/folders/Page.vala" - _tmp18_ = self->priv->view_manager; -#line 30 "/home/jens/Source/shotwell/src/folders/Page.vala" - _tmp19_ = view_collection_monitor_source_collection (_tmp16_, G_TYPE_CHECK_INSTANCE_CAST (_tmp17_, TYPE_SOURCE_COLLECTION, SourceCollection), G_TYPE_CHECK_INSTANCE_CAST (_tmp18_, TYPE_VIEW_MANAGER, ViewManager), NULL, NULL, NULL, NULL); -#line 30 "/home/jens/Source/shotwell/src/folders/Page.vala" - _tmp20_ = _tmp19_; -#line 30 "/home/jens/Source/shotwell/src/folders/Page.vala" - _view_collection_monitor_unref0 (_tmp20_); -#line 30 "/home/jens/Source/shotwell/src/folders/Page.vala" - _data_collection_unref0 (_tmp16_); -#line 29 "/home/jens/Source/shotwell/src/folders/Page.vala" - _data_collection_unref0 (sources); -#line 785 "Page.c" - } -#line 29 "/home/jens/Source/shotwell/src/folders/Page.vala" - _g_object_unref0 (_sources_it); -#line 789 "Page.c" - } -#line 24 "/home/jens/Source/shotwell/src/folders/Page.vala" - return self; -#line 793 "Page.c" -} - - -FoldersPage* folders_page_new (GFile* dir) { -#line 24 "/home/jens/Source/shotwell/src/folders/Page.vala" - return folders_page_construct (FOLDERS_TYPE_PAGE, dir); -#line 800 "Page.c" -} - - -static void folders_page_real_get_config_photos_sort (MediaPage* base, gboolean* sort_order, gint* sort_by) { - FoldersPage * self; - gboolean _vala_sort_order = FALSE; - gint _vala_sort_by = 0; - ConfigFacade* _tmp0_; - ConfigFacade* _tmp1_; - gboolean _tmp2_ = FALSE; - gint _tmp3_ = 0; -#line 33 "/home/jens/Source/shotwell/src/folders/Page.vala" - self = G_TYPE_CHECK_INSTANCE_CAST (base, FOLDERS_TYPE_PAGE, FoldersPage); -#line 34 "/home/jens/Source/shotwell/src/folders/Page.vala" - _tmp0_ = config_facade_get_instance (); -#line 34 "/home/jens/Source/shotwell/src/folders/Page.vala" - _tmp1_ = _tmp0_; -#line 34 "/home/jens/Source/shotwell/src/folders/Page.vala" - configuration_facade_get_library_photos_sort (G_TYPE_CHECK_INSTANCE_CAST (_tmp1_, TYPE_CONFIGURATION_FACADE, ConfigurationFacade), &_tmp2_, &_tmp3_); -#line 34 "/home/jens/Source/shotwell/src/folders/Page.vala" - _vala_sort_order = _tmp2_; -#line 34 "/home/jens/Source/shotwell/src/folders/Page.vala" - _vala_sort_by = _tmp3_; -#line 34 "/home/jens/Source/shotwell/src/folders/Page.vala" - _g_object_unref0 (_tmp1_); -#line 33 "/home/jens/Source/shotwell/src/folders/Page.vala" - if (sort_order) { -#line 33 "/home/jens/Source/shotwell/src/folders/Page.vala" - *sort_order = _vala_sort_order; -#line 830 "Page.c" - } -#line 33 "/home/jens/Source/shotwell/src/folders/Page.vala" - if (sort_by) { -#line 33 "/home/jens/Source/shotwell/src/folders/Page.vala" - *sort_by = _vala_sort_by; -#line 836 "Page.c" - } -} - - -static void folders_page_real_set_config_photos_sort (MediaPage* base, gboolean sort_order, gint sort_by) { - FoldersPage * self; - ConfigFacade* _tmp0_; - ConfigFacade* _tmp1_; - gboolean _tmp2_; - gint _tmp3_; -#line 37 "/home/jens/Source/shotwell/src/folders/Page.vala" - self = G_TYPE_CHECK_INSTANCE_CAST (base, FOLDERS_TYPE_PAGE, FoldersPage); -#line 38 "/home/jens/Source/shotwell/src/folders/Page.vala" - _tmp0_ = config_facade_get_instance (); -#line 38 "/home/jens/Source/shotwell/src/folders/Page.vala" - _tmp1_ = _tmp0_; -#line 38 "/home/jens/Source/shotwell/src/folders/Page.vala" - _tmp2_ = sort_order; -#line 38 "/home/jens/Source/shotwell/src/folders/Page.vala" - _tmp3_ = sort_by; -#line 38 "/home/jens/Source/shotwell/src/folders/Page.vala" - configuration_facade_set_library_photos_sort (G_TYPE_CHECK_INSTANCE_CAST (_tmp1_, TYPE_CONFIGURATION_FACADE, ConfigurationFacade), _tmp2_, _tmp3_); -#line 38 "/home/jens/Source/shotwell/src/folders/Page.vala" - _g_object_unref0 (_tmp1_); -#line 861 "Page.c" -} - - -static gpointer _g_object_ref0 (gpointer self) { -#line 14 "/home/jens/Source/shotwell/src/folders/Page.vala" - return self ? g_object_ref (self) : NULL; -#line 868 "Page.c" -} - - -static FoldersPageFolderViewManager* folders_page_folder_view_manager_construct (GType object_type, FoldersPage* owner, GFile* dir) { - FoldersPageFolderViewManager* self = NULL; - FoldersPage* _tmp0_; - GFile* _tmp1_; - GFile* _tmp2_; -#line 11 "/home/jens/Source/shotwell/src/folders/Page.vala" - g_return_val_if_fail (FOLDERS_IS_PAGE (owner), NULL); -#line 11 "/home/jens/Source/shotwell/src/folders/Page.vala" - g_return_val_if_fail (G_IS_FILE (dir), NULL); -#line 12 "/home/jens/Source/shotwell/src/folders/Page.vala" - _tmp0_ = owner; -#line 12 "/home/jens/Source/shotwell/src/folders/Page.vala" - self = (FoldersPageFolderViewManager*) collection_view_manager_construct (object_type, G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, TYPE_COLLECTION_PAGE, CollectionPage)); -#line 14 "/home/jens/Source/shotwell/src/folders/Page.vala" - _tmp1_ = dir; -#line 14 "/home/jens/Source/shotwell/src/folders/Page.vala" - _tmp2_ = _g_object_ref0 (_tmp1_); -#line 14 "/home/jens/Source/shotwell/src/folders/Page.vala" - _g_object_unref0 (self->dir); -#line 14 "/home/jens/Source/shotwell/src/folders/Page.vala" - self->dir = _tmp2_; -#line 11 "/home/jens/Source/shotwell/src/folders/Page.vala" - return self; -#line 895 "Page.c" -} - - -static FoldersPageFolderViewManager* folders_page_folder_view_manager_new (FoldersPage* owner, GFile* dir) { -#line 11 "/home/jens/Source/shotwell/src/folders/Page.vala" - return folders_page_folder_view_manager_construct (FOLDERS_PAGE_TYPE_FOLDER_VIEW_MANAGER, owner, dir); -#line 902 "Page.c" -} - - -static gboolean folders_page_folder_view_manager_real_include_in_view (ViewManager* base, DataSource* source) { - FoldersPageFolderViewManager * self; - gboolean result = FALSE; - DataSource* _tmp0_; - GFile* _tmp1_; - GFile* _tmp2_; - GFile* _tmp3_; - gboolean _tmp4_; - gboolean _tmp5_; -#line 17 "/home/jens/Source/shotwell/src/folders/Page.vala" - self = G_TYPE_CHECK_INSTANCE_CAST (base, FOLDERS_PAGE_TYPE_FOLDER_VIEW_MANAGER, FoldersPageFolderViewManager); -#line 17 "/home/jens/Source/shotwell/src/folders/Page.vala" - g_return_val_if_fail (IS_DATA_SOURCE (source), FALSE); -#line 18 "/home/jens/Source/shotwell/src/folders/Page.vala" - _tmp0_ = source; -#line 18 "/home/jens/Source/shotwell/src/folders/Page.vala" - _tmp1_ = media_source_get_file (G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, TYPE_MEDIA_SOURCE, MediaSource)); -#line 18 "/home/jens/Source/shotwell/src/folders/Page.vala" - _tmp2_ = _tmp1_; -#line 18 "/home/jens/Source/shotwell/src/folders/Page.vala" - _tmp3_ = self->dir; -#line 18 "/home/jens/Source/shotwell/src/folders/Page.vala" - _tmp4_ = g_file_has_prefix (_tmp2_, _tmp3_); -#line 18 "/home/jens/Source/shotwell/src/folders/Page.vala" - _tmp5_ = _tmp4_; -#line 18 "/home/jens/Source/shotwell/src/folders/Page.vala" - _g_object_unref0 (_tmp2_); -#line 18 "/home/jens/Source/shotwell/src/folders/Page.vala" - result = _tmp5_; -#line 18 "/home/jens/Source/shotwell/src/folders/Page.vala" - return result; -#line 937 "Page.c" -} - - -static void folders_page_folder_view_manager_class_init (FoldersPageFolderViewManagerClass * klass) { -#line 8 "/home/jens/Source/shotwell/src/folders/Page.vala" - folders_page_folder_view_manager_parent_class = g_type_class_peek_parent (klass); -#line 8 "/home/jens/Source/shotwell/src/folders/Page.vala" - ((ViewManagerClass *) klass)->finalize = folders_page_folder_view_manager_finalize; -#line 8 "/home/jens/Source/shotwell/src/folders/Page.vala" - ((ViewManagerClass *) klass)->include_in_view = (gboolean (*) (ViewManager *, DataSource*)) folders_page_folder_view_manager_real_include_in_view; -#line 948 "Page.c" -} - - -static void folders_page_folder_view_manager_instance_init (FoldersPageFolderViewManager * self) { -} - - -static void folders_page_folder_view_manager_finalize (ViewManager * obj) { - FoldersPageFolderViewManager * self; -#line 8 "/home/jens/Source/shotwell/src/folders/Page.vala" - self = G_TYPE_CHECK_INSTANCE_CAST (obj, FOLDERS_PAGE_TYPE_FOLDER_VIEW_MANAGER, FoldersPageFolderViewManager); -#line 9 "/home/jens/Source/shotwell/src/folders/Page.vala" - _g_object_unref0 (self->dir); -#line 8 "/home/jens/Source/shotwell/src/folders/Page.vala" - VIEW_MANAGER_CLASS (folders_page_folder_view_manager_parent_class)->finalize (obj); -#line 964 "Page.c" -} - - -static GType folders_page_folder_view_manager_get_type (void) { - static volatile gsize folders_page_folder_view_manager_type_id__volatile = 0; - if (g_once_init_enter (&folders_page_folder_view_manager_type_id__volatile)) { - static const GTypeInfo g_define_type_info = { sizeof (FoldersPageFolderViewManagerClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) folders_page_folder_view_manager_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (FoldersPageFolderViewManager), 0, (GInstanceInitFunc) folders_page_folder_view_manager_instance_init, NULL }; - GType folders_page_folder_view_manager_type_id; - folders_page_folder_view_manager_type_id = g_type_register_static (TYPE_COLLECTION_VIEW_MANAGER, "FoldersPageFolderViewManager", &g_define_type_info, 0); - g_once_init_leave (&folders_page_folder_view_manager_type_id__volatile, folders_page_folder_view_manager_type_id); - } - return folders_page_folder_view_manager_type_id__volatile; -} - - -static void folders_page_class_init (FoldersPageClass * klass) { -#line 7 "/home/jens/Source/shotwell/src/folders/Page.vala" - folders_page_parent_class = g_type_class_peek_parent (klass); -#line 7 "/home/jens/Source/shotwell/src/folders/Page.vala" - g_type_class_add_private (klass, sizeof (FoldersPagePrivate)); -#line 7 "/home/jens/Source/shotwell/src/folders/Page.vala" - ((MediaPageClass *) klass)->get_config_photos_sort = (void (*) (MediaPage *, gboolean*, gint*)) folders_page_real_get_config_photos_sort; -#line 7 "/home/jens/Source/shotwell/src/folders/Page.vala" - ((MediaPageClass *) klass)->set_config_photos_sort = (void (*) (MediaPage *, gboolean, gint)) folders_page_real_set_config_photos_sort; -#line 7 "/home/jens/Source/shotwell/src/folders/Page.vala" - G_OBJECT_CLASS (klass)->finalize = folders_page_finalize; -#line 991 "Page.c" -} - - -static void folders_page_instance_init (FoldersPage * self) { -#line 7 "/home/jens/Source/shotwell/src/folders/Page.vala" - self->priv = FOLDERS_PAGE_GET_PRIVATE (self); -#line 998 "Page.c" -} - - -static void folders_page_finalize (GObject * obj) { - FoldersPage * self; -#line 7 "/home/jens/Source/shotwell/src/folders/Page.vala" - self = G_TYPE_CHECK_INSTANCE_CAST (obj, FOLDERS_TYPE_PAGE, FoldersPage); -#line 22 "/home/jens/Source/shotwell/src/folders/Page.vala" - _view_manager_unref0 (self->priv->view_manager); -#line 7 "/home/jens/Source/shotwell/src/folders/Page.vala" - G_OBJECT_CLASS (folders_page_parent_class)->finalize (obj); -#line 1010 "Page.c" -} - - -GType folders_page_get_type (void) { - static volatile gsize folders_page_type_id__volatile = 0; - if (g_once_init_enter (&folders_page_type_id__volatile)) { - static const GTypeInfo g_define_type_info = { sizeof (FoldersPageClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) folders_page_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (FoldersPage), 0, (GInstanceInitFunc) folders_page_instance_init, NULL }; - GType folders_page_type_id; - folders_page_type_id = g_type_register_static (TYPE_COLLECTION_PAGE, "FoldersPage", &g_define_type_info, 0); - g_once_init_leave (&folders_page_type_id__volatile, folders_page_type_id); - } - return folders_page_type_id__volatile; -} - - - diff --git a/src/folders/Page.vala b/src/folders/Page.vala deleted file mode 100644 index 6145c95..0000000 --- a/src/folders/Page.vala +++ /dev/null @@ -1,41 +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 Folders.Page : CollectionPage { - private class FolderViewManager : CollectionViewManager { - public File dir; - - public FolderViewManager(Folders.Page owner, File dir) { - base (owner); - - this.dir = dir; - } - - public override bool include_in_view(DataSource source) { - return ((MediaSource) source).get_file().has_prefix(dir); - } - } - - private FolderViewManager view_manager; - - public Page(File dir) { - base (dir.get_path()); - - view_manager = new FolderViewManager(this, dir); - - foreach (MediaSourceCollection sources in MediaCollectionRegistry.get_instance().get_all()) - get_view().monitor_source_collection(sources, view_manager, null); - } - - protected override void get_config_photos_sort(out bool sort_order, out int sort_by) { - Config.Facade.get_instance().get_library_photos_sort(out sort_order, out sort_by); - } - - protected override void set_config_photos_sort(bool sort_order, int sort_by) { - Config.Facade.get_instance().set_library_photos_sort(sort_order, sort_by); - } -} - -- cgit v1.2.3 From ab841afa5cb39058d9ab2cebb67cfe6369443f6e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Frings-F=C3=BCrst?= Date: Mon, 25 Jun 2018 20:55:59 +0200 Subject: New upstream version 0.28.3 --- src/folders/Folders.c | 15 +- src/folders/FoldersBranch.c | 1377 +++++++++++++++++++++++-------------------- src/folders/FoldersPage.c | 407 ++++++++----- 3 files changed, 991 insertions(+), 808 deletions(-) (limited to 'src/folders') diff --git a/src/folders/Folders.c b/src/folders/Folders.c index eede6db..3ff8458 100644 --- a/src/folders/Folders.c +++ b/src/folders/Folders.c @@ -1,4 +1,4 @@ -/* Folders.c generated by valac 0.36.6, the Vala compiler +/* Folders.c generated by valac 0.40.4, the Vala compiler * generated from Folders.vala, do not modify */ /* Copyright 2016 Software Freedom Conservancy Inc. @@ -15,6 +15,7 @@ * the preconfigure() method, implement it, and ensure in init() that it's been called. */ + #include #include #include @@ -34,7 +35,9 @@ void folders_init (GError** error); void folders_terminate (void); -void folders_init (GError** error) { +void +folders_init (GError** error) +{ gchar* _tmp0_; gchar* _tmp1_; #line 22 "/home/jens/Source/shotwell/src/folders/Folders.vala" @@ -49,11 +52,13 @@ void folders_init (GError** error) { _g_free0 (folders_have_photos_icon); #line 23 "/home/jens/Source/shotwell/src/folders/Folders.vala" folders_have_photos_icon = _tmp1_; -#line 53 "Folders.c" +#line 56 "Folders.c" } -void folders_terminate (void) { +void +folders_terminate (void) +{ #line 27 "/home/jens/Source/shotwell/src/folders/Folders.vala" _g_free0 (folders_icon); #line 27 "/home/jens/Source/shotwell/src/folders/Folders.vala" @@ -62,7 +67,7 @@ void folders_terminate (void) { _g_free0 (folders_have_photos_icon); #line 28 "/home/jens/Source/shotwell/src/folders/Folders.vala" folders_have_photos_icon = NULL; -#line 66 "Folders.c" +#line 71 "Folders.c" } diff --git a/src/folders/FoldersBranch.c b/src/folders/FoldersBranch.c index ff8f49a..9b2f84f 100644 --- a/src/folders/FoldersBranch.c +++ b/src/folders/FoldersBranch.c @@ -1,4 +1,4 @@ -/* FoldersBranch.c generated by valac 0.36.6, the Vala compiler +/* FoldersBranch.c generated by valac 0.40.4, the Vala compiler * generated from FoldersBranch.vala, do not modify */ /* Copyright 2016 Software Freedom Conservancy Inc. @@ -7,6 +7,7 @@ * (version 2.1 or later). See the COPYING file in this distribution. */ + #include #include #include @@ -59,6 +60,11 @@ typedef struct _SidebarSimplePageEntryClass SidebarSimplePageEntryClass; typedef struct _FoldersSidebarEntry FoldersSidebarEntry; typedef struct _FoldersSidebarEntryClass FoldersSidebarEntryClass; +enum { + FOLDERS_BRANCH_0_PROPERTY, + FOLDERS_BRANCH_NUM_PROPERTIES +}; +static GParamSpec* folders_branch_properties[FOLDERS_BRANCH_NUM_PROPERTIES]; #define TYPE_DATA_COLLECTION (data_collection_get_type ()) #define DATA_COLLECTION(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_DATA_COLLECTION, DataCollection)) @@ -230,6 +236,11 @@ typedef struct _SidebarEmphasizableEntry SidebarEmphasizableEntry; typedef struct _SidebarEmphasizableEntryIface SidebarEmphasizableEntryIface; typedef struct _SidebarHeaderPrivate SidebarHeaderPrivate; typedef struct _FoldersRootPrivate FoldersRootPrivate; +enum { + FOLDERS_ROOT_0_PROPERTY, + FOLDERS_ROOT_NUM_PROPERTIES +}; +static GParamSpec* folders_root_properties[FOLDERS_ROOT_NUM_PROPERTIES]; #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)) @@ -266,6 +277,14 @@ typedef struct _SidebarContextable SidebarContextable; typedef struct _SidebarContextableIface SidebarContextableIface; typedef struct _SidebarSimplePageEntryPrivate SidebarSimplePageEntryPrivate; typedef struct _FoldersSidebarEntryPrivate FoldersSidebarEntryPrivate; +enum { + FOLDERS_SIDEBAR_ENTRY_0_PROPERTY, + FOLDERS_SIDEBAR_ENTRY_DIR_PROPERTY, + FOLDERS_SIDEBAR_ENTRY_COLLATION_PROPERTY, + FOLDERS_SIDEBAR_ENTRY_COUNT_PROPERTY, + FOLDERS_SIDEBAR_ENTRY_NUM_PROPERTIES +}; +static GParamSpec* folders_sidebar_entry_properties[FOLDERS_SIDEBAR_ENTRY_NUM_PROPERTIES]; #define TYPE_CHECKERBOARD_PAGE (checkerboard_page_get_type ()) #define CHECKERBOARD_PAGE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_CHECKERBOARD_PAGE, CheckerboardPage)) @@ -452,14 +471,17 @@ GType folders_branch_get_type (void) G_GNUC_CONST; GType sidebar_simple_page_entry_get_type (void) G_GNUC_CONST; GType folders_sidebar_entry_get_type (void) G_GNUC_CONST; #define FOLDERS_BRANCH_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), FOLDERS_TYPE_BRANCH, FoldersBranchPrivate)) -enum { - FOLDERS_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); +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; @@ -467,20 +489,35 @@ GType database_source_collection_get_type (void) G_GNUC_CONST; GType media_source_collection_get_type (void) G_GNUC_CONST; gpointer media_collection_registry_ref (gpointer instance); void media_collection_registry_unref (gpointer instance); -GParamSpec* param_spec_media_collection_registry (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags); -void value_set_media_collection_registry (GValue* value, gpointer v_object); -void value_take_media_collection_registry (GValue* value, gpointer v_object); +GParamSpec* param_spec_media_collection_registry (const gchar* name, + const gchar* nick, + const gchar* blurb, + GType object_type, + GParamFlags flags); +void value_set_media_collection_registry (GValue* value, + gpointer v_object); +void value_take_media_collection_registry (GValue* value, + gpointer v_object); gpointer value_get_media_collection_registry (const GValue* value); GType media_collection_registry_get_type (void) G_GNUC_CONST; MediaCollectionRegistry* media_collection_registry_get_instance (void); GeeCollection* media_collection_registry_get_all (MediaCollectionRegistry* self); GType data_object_get_type (void) G_GNUC_CONST; -static void folders_branch_on_media_contents_altered (FoldersBranch* self, GeeIterable* added, GeeIterable* removed); -static void _folders_branch_on_media_contents_altered_data_collection_contents_altered (DataCollection* _sender, GeeIterable* added, GeeIterable* removed, gpointer self); +static void folders_branch_on_media_contents_altered (FoldersBranch* self, + GeeIterable* added, + GeeIterable* removed); +static void _folders_branch_on_media_contents_altered_data_collection_contents_altered (DataCollection* _sender, + GeeIterable* added, + GeeIterable* removed, + gpointer self); guint file_hash (GFile* file); -static guint _file_hash_gee_hash_data_func (gconstpointer v, gpointer self); -gboolean file_equal (GFile* a, GFile* b); -static gboolean _file_equal_gee_equal_data_func (gconstpointer a, gconstpointer b, gpointer self); +static guint _file_hash_gee_hash_data_func (gconstpointer v, + gpointer self); +gboolean file_equal (GFile* a, + GFile* b); +static gboolean _file_equal_gee_equal_data_func (gconstpointer a, + gconstpointer b, + gpointer self); FoldersBranch* folders_branch_new (void); FoldersBranch* folders_branch_construct (GType object_type); FoldersRoot* folders_root_new (void); @@ -491,106 +528,153 @@ GType folders_root_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 folders_branch_comparator (SidebarEntry* a, SidebarEntry* b); -static gint _folders_branch_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); +static gint folders_branch_comparator (SidebarEntry* a, + SidebarEntry* b); +static gint _folders_branch_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); GeeCollection* data_collection_get_all (DataCollection* self); const gchar* folders_sidebar_entry_get_collation (FoldersSidebarEntry* self); gchar* sidebar_simple_page_entry_get_sidebar_name (SidebarSimplePageEntry* self); GType data_source_get_type (void) G_GNUC_CONST; GType thumbnail_source_get_type (void) G_GNUC_CONST; GType media_source_get_type (void) G_GNUC_CONST; -static void folders_branch_on_master_source_replaced (FoldersBranch* self, MediaSource* media_source, GFile* old_file, GFile* new_file); -static void folders_branch_remove_entry (FoldersBranch* self, GFile* file); -static void folders_branch_add_entry (FoldersBranch* self, MediaSource* media); -static void _folders_branch_on_master_source_replaced_media_source_master_replaced (MediaSource* _sender, GFile* old_file, GFile* new_file, gpointer self); +static void folders_branch_on_master_source_replaced (FoldersBranch* self, + MediaSource* media_source, + GFile* old_file, + GFile* new_file); +static void folders_branch_remove_entry (FoldersBranch* self, + GFile* file); +static void folders_branch_add_entry (FoldersBranch* self, + MediaSource* media); +static void _folders_branch_on_master_source_replaced_media_source_master_replaced (MediaSource* _sender, + GFile* old_file, + GFile* new_file, + gpointer self); GFile* media_source_get_file (MediaSource* self); FoldersSidebarEntry* folders_sidebar_entry_new (GFile* dir); -FoldersSidebarEntry* folders_sidebar_entry_construct (GType object_type, GFile* dir); +FoldersSidebarEntry* folders_sidebar_entry_construct (GType object_type, + GFile* dir); SidebarEntry* sidebar_branch_get_root (SidebarBranch* self); -void sidebar_branch_graft (SidebarBranch* self, SidebarEntry* parent, SidebarEntry* entry, GCompareFunc comparator); +void sidebar_branch_graft (SidebarBranch* self, + SidebarEntry* parent, + SidebarEntry* entry, + GCompareFunc comparator); gint folders_sidebar_entry_get_count (FoldersSidebarEntry* self); -void folders_sidebar_entry_set_count (FoldersSidebarEntry* self, gint value); -gint sidebar_branch_get_child_count (SidebarBranch* self, SidebarEntry* parent); +void folders_sidebar_entry_set_count (FoldersSidebarEntry* self, + gint value); +gint sidebar_branch_get_child_count (SidebarBranch* self, + SidebarEntry* parent); GFile* folders_sidebar_entry_get_dir (FoldersSidebarEntry* self); -SidebarEntry* sidebar_branch_get_parent (SidebarBranch* self, SidebarEntry* entry); -void sidebar_branch_prune (SidebarBranch* self, SidebarEntry* entry); +SidebarEntry* sidebar_branch_get_parent (SidebarBranch* self, + SidebarEntry* entry); +void sidebar_branch_prune (SidebarBranch* self, + SidebarEntry* entry); static void folders_branch_finalize (GObject * obj); GType sidebar_expandable_entry_get_type (void) G_GNUC_CONST; GType sidebar_renameable_entry_get_type (void) G_GNUC_CONST; GType sidebar_emphasizable_entry_get_type (void) G_GNUC_CONST; -enum { - FOLDERS_ROOT_DUMMY_PROPERTY -}; -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); +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_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; #define FOLDERS_SIDEBAR_ENTRY_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), FOLDERS_TYPE_SIDEBAR_ENTRY, FoldersSidebarEntryPrivate)) -enum { - FOLDERS_SIDEBAR_ENTRY_DUMMY_PROPERTY, - FOLDERS_SIDEBAR_ENTRY_DIR_PROPERTY, - FOLDERS_SIDEBAR_ENTRY_COLLATION_PROPERTY, - FOLDERS_SIDEBAR_ENTRY_COUNT_PROPERTY -}; SidebarSimplePageEntry* sidebar_simple_page_entry_construct (GType object_type); -static void folders_sidebar_entry_set_dir (FoldersSidebarEntry* self, GFile* value); -static void folders_sidebar_entry_set_collation (FoldersSidebarEntry* self, const gchar* value); +static void folders_sidebar_entry_set_dir (FoldersSidebarEntry* self, + GFile* value); +static void folders_sidebar_entry_set_collation (FoldersSidebarEntry* self, + const gchar* value); static gchar* folders_sidebar_entry_real_get_sidebar_name (SidebarSimplePageEntry* base); static gchar* folders_sidebar_entry_real_get_sidebar_icon (SidebarSimplePageEntry* base); static gchar* folders_sidebar_entry_real_to_string (SidebarSimplePageEntry* base); static gboolean folders_sidebar_entry_real_expand_on_select (SidebarExpandableEntry* base); static Page* folders_sidebar_entry_real_create_page (SidebarSimplePageEntry* base); FoldersPage* folders_page_new (GFile* dir); -FoldersPage* folders_page_construct (GType object_type, GFile* dir); +FoldersPage* folders_page_construct (GType object_type, + GFile* dir); GType checkerboard_page_get_type (void) G_GNUC_CONST; GType media_page_get_type (void) G_GNUC_CONST; GType collection_page_get_type (void) G_GNUC_CONST; GType folders_page_get_type (void) G_GNUC_CONST; gchar* sidebar_simple_page_entry_get_sidebar_icon (SidebarSimplePageEntry* self); static void folders_sidebar_entry_finalize (GObject * obj); -static void _vala_folders_sidebar_entry_get_property (GObject * object, guint property_id, GValue * value, GParamSpec * pspec); -static void _vala_folders_sidebar_entry_set_property (GObject * object, guint property_id, const GValue * value, GParamSpec * pspec); - - -static void _folders_branch_on_media_contents_altered_data_collection_contents_altered (DataCollection* _sender, GeeIterable* added, GeeIterable* removed, gpointer self) { +static void _vala_folders_sidebar_entry_get_property (GObject * object, + guint property_id, + GValue * value, + GParamSpec * pspec); +static void _vala_folders_sidebar_entry_set_property (GObject * object, + guint property_id, + const GValue * value, + GParamSpec * pspec); + + +static void +_folders_branch_on_media_contents_altered_data_collection_contents_altered (DataCollection* _sender, + GeeIterable* added, + GeeIterable* removed, + gpointer self) +{ #line 31 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" folders_branch_on_media_contents_altered ((FoldersBranch*) self, added, removed); -#line 563 "FoldersBranch.c" +#line 635 "FoldersBranch.c" } -static guint _file_hash_gee_hash_data_func (gconstpointer v, gpointer self) { +static guint +_file_hash_gee_hash_data_func (gconstpointer v, + gpointer self) +{ guint result; result = file_hash ((GFile*) v); #line 8 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" return result; -#line 572 "FoldersBranch.c" +#line 647 "FoldersBranch.c" } -static gboolean _file_equal_gee_equal_data_func (gconstpointer a, gconstpointer b, gpointer self) { +static gboolean +_file_equal_gee_equal_data_func (gconstpointer a, + gconstpointer b, + gpointer self) +{ gboolean result; result = file_equal ((GFile*) a, (GFile*) b); #line 8 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" return result; -#line 581 "FoldersBranch.c" +#line 660 "FoldersBranch.c" } -static gint _folders_branch_comparator_gcompare_func (gconstpointer a, gconstpointer b) { +static gint +_folders_branch_comparator_gcompare_func (gconstpointer a, + gconstpointer b) +{ gint result; result = folders_branch_comparator ((SidebarEntry*) a, (SidebarEntry*) b); #line 13 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" return result; -#line 590 "FoldersBranch.c" +#line 672 "FoldersBranch.c" } -FoldersBranch* folders_branch_construct (GType object_type) { +FoldersBranch* +folders_branch_construct (GType object_type) +{ FoldersBranch * self = NULL; FoldersRoot* _tmp0_; FoldersRoot* _tmp1_; @@ -612,7 +696,7 @@ FoldersBranch* folders_branch_construct (GType object_type) { _g_object_unref0 (self->priv->home_dir); #line 18 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" self->priv->home_dir = _tmp3_; -#line 616 "FoldersBranch.c" +#line 700 "FoldersBranch.c" { GeeIterator* _sources_it = NULL; MediaCollectionRegistry* _tmp4_; @@ -641,168 +725,149 @@ FoldersBranch* folders_branch_construct (GType object_type) { _sources_it = _tmp9_; #line 20 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" while (TRUE) { -#line 645 "FoldersBranch.c" +#line 729 "FoldersBranch.c" GeeIterator* _tmp10_; - gboolean _tmp11_; MediaSourceCollection* sources = NULL; - GeeIterator* _tmp12_; - gpointer _tmp13_; - MediaSourceCollection* _tmp14_; + GeeIterator* _tmp11_; + gpointer _tmp12_; + MediaSourceCollection* _tmp13_; + GeeCollection* _tmp14_; GeeCollection* _tmp15_; - GeeCollection* _tmp16_; - MediaSourceCollection* _tmp17_; + MediaSourceCollection* _tmp16_; #line 20 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" _tmp10_ = _sources_it; #line 20 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" - _tmp11_ = gee_iterator_next (_tmp10_); -#line 20 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" - if (!_tmp11_) { + if (!gee_iterator_next (_tmp10_)) { #line 20 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" break; -#line 663 "FoldersBranch.c" +#line 744 "FoldersBranch.c" } #line 20 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" - _tmp12_ = _sources_it; + _tmp11_ = _sources_it; #line 20 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" - _tmp13_ = gee_iterator_get (_tmp12_); + _tmp12_ = gee_iterator_get (_tmp11_); #line 20 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" - sources = (MediaSourceCollection*) _tmp13_; + sources = (MediaSourceCollection*) _tmp12_; #line 22 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" - _tmp14_ = sources; + _tmp13_ = sources; #line 22 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" - _tmp15_ = data_collection_get_all (G_TYPE_CHECK_INSTANCE_CAST (_tmp14_, TYPE_DATA_COLLECTION, DataCollection)); + _tmp14_ = data_collection_get_all (G_TYPE_CHECK_INSTANCE_CAST (_tmp13_, TYPE_DATA_COLLECTION, DataCollection)); #line 22 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" - _tmp16_ = _tmp15_; + _tmp15_ = _tmp14_; #line 22 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" - folders_branch_on_media_contents_altered (self, G_TYPE_CHECK_INSTANCE_CAST (_tmp16_, GEE_TYPE_ITERABLE, GeeIterable), NULL); + folders_branch_on_media_contents_altered (self, G_TYPE_CHECK_INSTANCE_CAST (_tmp15_, GEE_TYPE_ITERABLE, GeeIterable), NULL); #line 22 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" - _g_object_unref0 (_tmp16_); + _g_object_unref0 (_tmp15_); #line 25 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" - _tmp17_ = sources; + _tmp16_ = sources; #line 25 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" - g_signal_connect_object (G_TYPE_CHECK_INSTANCE_CAST (_tmp17_, TYPE_DATA_COLLECTION, DataCollection), "contents-altered", (GCallback) _folders_branch_on_media_contents_altered_data_collection_contents_altered, self, 0); + g_signal_connect_object (G_TYPE_CHECK_INSTANCE_CAST (_tmp16_, TYPE_DATA_COLLECTION, DataCollection), "contents-altered", (GCallback) _folders_branch_on_media_contents_altered_data_collection_contents_altered, self, 0); #line 20 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" _data_collection_unref0 (sources); -#line 687 "FoldersBranch.c" +#line 768 "FoldersBranch.c" } #line 20 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" _g_object_unref0 (_sources_it); -#line 691 "FoldersBranch.c" +#line 772 "FoldersBranch.c" } #line 12 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" return self; -#line 695 "FoldersBranch.c" +#line 776 "FoldersBranch.c" } -FoldersBranch* folders_branch_new (void) { +FoldersBranch* +folders_branch_new (void) +{ #line 12 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" return folders_branch_construct (FOLDERS_TYPE_BRANCH); -#line 702 "FoldersBranch.c" +#line 785 "FoldersBranch.c" } -static gint folders_branch_comparator (SidebarEntry* a, SidebarEntry* b) { +static gint +folders_branch_comparator (SidebarEntry* a, + SidebarEntry* b) +{ gint result = 0; - SidebarEntry* _tmp0_; - SidebarEntry* _tmp1_; gint coll_key_equality = 0; - GCompareFunc _tmp2_; - SidebarEntry* _tmp3_; + GCompareFunc _tmp0_; + const gchar* _tmp1_; + const gchar* _tmp2_; + const gchar* _tmp3_; const gchar* _tmp4_; - const gchar* _tmp5_; - SidebarEntry* _tmp6_; - const gchar* _tmp7_; - const gchar* _tmp8_; - gint _tmp9_; - gint _tmp10_; + gint _tmp5_; #line 34 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" g_return_val_if_fail (SIDEBAR_IS_ENTRY (a), 0); #line 34 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" g_return_val_if_fail (SIDEBAR_IS_ENTRY (b), 0); #line 35 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" - _tmp0_ = a; -#line 35 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" - _tmp1_ = b; -#line 35 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" - if (_tmp0_ == _tmp1_) { + if (a == b) { #line 36 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" result = 0; #line 36 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" return result; -#line 734 "FoldersBranch.c" +#line 811 "FoldersBranch.c" } #line 38 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" - _tmp2_ = g_strcmp0; -#line 38 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" - _tmp3_ = a; + _tmp0_ = g_strcmp0; #line 38 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" - _tmp4_ = folders_sidebar_entry_get_collation (G_TYPE_CHECK_INSTANCE_CAST (_tmp3_, FOLDERS_TYPE_SIDEBAR_ENTRY, FoldersSidebarEntry)); + _tmp1_ = folders_sidebar_entry_get_collation (G_TYPE_CHECK_INSTANCE_CAST (a, FOLDERS_TYPE_SIDEBAR_ENTRY, FoldersSidebarEntry)); #line 38 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" - _tmp5_ = _tmp4_; -#line 38 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" - _tmp6_ = b; -#line 38 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" - _tmp7_ = folders_sidebar_entry_get_collation (G_TYPE_CHECK_INSTANCE_CAST (_tmp6_, FOLDERS_TYPE_SIDEBAR_ENTRY, FoldersSidebarEntry)); + _tmp2_ = _tmp1_; #line 38 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" - _tmp8_ = _tmp7_; + _tmp3_ = folders_sidebar_entry_get_collation (G_TYPE_CHECK_INSTANCE_CAST (b, FOLDERS_TYPE_SIDEBAR_ENTRY, FoldersSidebarEntry)); #line 38 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" - _tmp9_ = _tmp2_ (_tmp5_, _tmp8_); + _tmp4_ = _tmp3_; #line 38 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" - coll_key_equality = _tmp9_; + coll_key_equality = _tmp0_ (_tmp2_, _tmp4_); #line 41 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" - _tmp10_ = coll_key_equality; + _tmp5_ = coll_key_equality; #line 41 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" - if (_tmp10_ == 0) { -#line 758 "FoldersBranch.c" - GCompareFunc _tmp11_; - SidebarEntry* _tmp12_; - gchar* _tmp13_; - gchar* _tmp14_; - SidebarEntry* _tmp15_; - gchar* _tmp16_; - gchar* _tmp17_; - gint _tmp18_; - gint _tmp19_; -#line 44 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" - _tmp11_ = g_strcmp0; -#line 44 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" - _tmp12_ = a; -#line 44 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" - _tmp13_ = sidebar_simple_page_entry_get_sidebar_name (G_TYPE_CHECK_INSTANCE_CAST (G_TYPE_CHECK_INSTANCE_CAST (_tmp12_, FOLDERS_TYPE_SIDEBAR_ENTRY, FoldersSidebarEntry), SIDEBAR_TYPE_SIMPLE_PAGE_ENTRY, SidebarSimplePageEntry)); + if (_tmp5_ == 0) { +#line 829 "FoldersBranch.c" + GCompareFunc _tmp6_; + gchar* _tmp7_; + gchar* _tmp8_; + gchar* _tmp9_; + gchar* _tmp10_; + gint _tmp11_; #line 44 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" - _tmp14_ = _tmp13_; + _tmp6_ = g_strcmp0; #line 44 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" - _tmp15_ = b; + _tmp7_ = sidebar_simple_page_entry_get_sidebar_name (G_TYPE_CHECK_INSTANCE_CAST (G_TYPE_CHECK_INSTANCE_CAST (a, FOLDERS_TYPE_SIDEBAR_ENTRY, FoldersSidebarEntry), SIDEBAR_TYPE_SIMPLE_PAGE_ENTRY, SidebarSimplePageEntry)); #line 44 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" - _tmp16_ = sidebar_simple_page_entry_get_sidebar_name (G_TYPE_CHECK_INSTANCE_CAST (G_TYPE_CHECK_INSTANCE_CAST (_tmp15_, FOLDERS_TYPE_SIDEBAR_ENTRY, FoldersSidebarEntry), SIDEBAR_TYPE_SIMPLE_PAGE_ENTRY, SidebarSimplePageEntry)); + _tmp8_ = _tmp7_; #line 44 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" - _tmp17_ = _tmp16_; + _tmp9_ = sidebar_simple_page_entry_get_sidebar_name (G_TYPE_CHECK_INSTANCE_CAST (G_TYPE_CHECK_INSTANCE_CAST (b, FOLDERS_TYPE_SIDEBAR_ENTRY, FoldersSidebarEntry), SIDEBAR_TYPE_SIMPLE_PAGE_ENTRY, SidebarSimplePageEntry)); #line 44 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" - _tmp18_ = _tmp11_ (_tmp14_, _tmp17_); + _tmp10_ = _tmp9_; #line 44 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" - _tmp19_ = _tmp18_; + _tmp11_ = _tmp6_ (_tmp8_, _tmp10_); #line 44 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" - _g_free0 (_tmp17_); + _g_free0 (_tmp10_); #line 44 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" - _g_free0 (_tmp14_); + _g_free0 (_tmp8_); #line 44 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" - result = _tmp19_; + result = _tmp11_; #line 44 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" return result; -#line 794 "FoldersBranch.c" +#line 856 "FoldersBranch.c" } #line 48 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" result = coll_key_equality; #line 48 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" return result; -#line 800 "FoldersBranch.c" +#line 862 "FoldersBranch.c" } -static void folders_branch_on_master_source_replaced (FoldersBranch* self, MediaSource* media_source, GFile* old_file, GFile* new_file) { - GFile* _tmp0_; - MediaSource* _tmp1_; +static void +folders_branch_on_master_source_replaced (FoldersBranch* self, + MediaSource* media_source, + GFile* old_file, + GFile* new_file) +{ #line 51 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" g_return_if_fail (FOLDERS_IS_BRANCH (self)); #line 51 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" @@ -812,27 +877,30 @@ static void folders_branch_on_master_source_replaced (FoldersBranch* self, Media #line 51 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" g_return_if_fail (G_IS_FILE (new_file)); #line 52 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" - _tmp0_ = old_file; -#line 52 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" - folders_branch_remove_entry (self, _tmp0_); + folders_branch_remove_entry (self, old_file); #line 53 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" - _tmp1_ = media_source; -#line 53 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" - folders_branch_add_entry (self, _tmp1_); -#line 823 "FoldersBranch.c" + folders_branch_add_entry (self, media_source); +#line 884 "FoldersBranch.c" } -static void _folders_branch_on_master_source_replaced_media_source_master_replaced (MediaSource* _sender, GFile* old_file, GFile* new_file, gpointer self) { +static void +_folders_branch_on_master_source_replaced_media_source_master_replaced (MediaSource* _sender, + GFile* old_file, + GFile* new_file, + gpointer self) +{ #line 60 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" folders_branch_on_master_source_replaced ((FoldersBranch*) self, _sender, old_file, new_file); -#line 830 "FoldersBranch.c" +#line 896 "FoldersBranch.c" } -static void folders_branch_on_media_contents_altered (FoldersBranch* self, GeeIterable* added, GeeIterable* removed) { - GeeIterable* _tmp0_; - GeeIterable* _tmp9_; +static void +folders_branch_on_media_contents_altered (FoldersBranch* self, + GeeIterable* added, + GeeIterable* removed) +{ #line 56 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" g_return_if_fail (FOLDERS_IS_BRANCH (self)); #line 56 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" @@ -840,420 +908,403 @@ static void folders_branch_on_media_contents_altered (FoldersBranch* self, GeeIt #line 56 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" g_return_if_fail ((removed == NULL) || GEE_IS_ITERABLE (removed)); #line 57 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" - _tmp0_ = added; -#line 57 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" - if (_tmp0_ != NULL) { -#line 847 "FoldersBranch.c" + if (added != NULL) { +#line 913 "FoldersBranch.c" { GeeIterator* _object_it = NULL; - GeeIterable* _tmp1_; - GeeIterator* _tmp2_; -#line 58 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" - _tmp1_ = added; + GeeIterator* _tmp0_; #line 58 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" - _tmp2_ = gee_iterable_iterator (_tmp1_); + _tmp0_ = gee_iterable_iterator (added); #line 58 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" - _object_it = _tmp2_; + _object_it = _tmp0_; #line 58 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" while (TRUE) { -#line 860 "FoldersBranch.c" - GeeIterator* _tmp3_; - gboolean _tmp4_; +#line 923 "FoldersBranch.c" + GeeIterator* _tmp1_; DataObject* object = NULL; - GeeIterator* _tmp5_; - gpointer _tmp6_; - DataObject* _tmp7_; - DataObject* _tmp8_; + GeeIterator* _tmp2_; + gpointer _tmp3_; + DataObject* _tmp4_; + DataObject* _tmp5_; #line 58 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" - _tmp3_ = _object_it; + _tmp1_ = _object_it; #line 58 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" - _tmp4_ = gee_iterator_next (_tmp3_); -#line 58 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" - if (!_tmp4_) { + if (!gee_iterator_next (_tmp1_)) { #line 58 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" break; -#line 876 "FoldersBranch.c" +#line 936 "FoldersBranch.c" } #line 58 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" - _tmp5_ = _object_it; + _tmp2_ = _object_it; #line 58 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" - _tmp6_ = gee_iterator_get (_tmp5_); + _tmp3_ = gee_iterator_get (_tmp2_); #line 58 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" - object = (DataObject*) _tmp6_; + object = (DataObject*) _tmp3_; #line 59 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" - _tmp7_ = object; + _tmp4_ = object; #line 59 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" - folders_branch_add_entry (self, G_TYPE_CHECK_INSTANCE_CAST (_tmp7_, TYPE_MEDIA_SOURCE, MediaSource)); + folders_branch_add_entry (self, G_TYPE_CHECK_INSTANCE_CAST (_tmp4_, TYPE_MEDIA_SOURCE, MediaSource)); #line 60 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" - _tmp8_ = object; + _tmp5_ = object; #line 60 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" - g_signal_connect_object (G_TYPE_CHECK_INSTANCE_CAST (_tmp8_, TYPE_MEDIA_SOURCE, MediaSource), "master-replaced", (GCallback) _folders_branch_on_master_source_replaced_media_source_master_replaced, self, 0); + g_signal_connect_object (G_TYPE_CHECK_INSTANCE_CAST (_tmp5_, TYPE_MEDIA_SOURCE, MediaSource), "master-replaced", (GCallback) _folders_branch_on_master_source_replaced_media_source_master_replaced, self, 0); #line 58 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" _g_object_unref0 (object); -#line 894 "FoldersBranch.c" +#line 954 "FoldersBranch.c" } #line 58 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" _g_object_unref0 (_object_it); -#line 898 "FoldersBranch.c" +#line 958 "FoldersBranch.c" } } #line 64 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" - _tmp9_ = removed; -#line 64 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" - if (_tmp9_ != NULL) { -#line 905 "FoldersBranch.c" + if (removed != NULL) { +#line 963 "FoldersBranch.c" { GeeIterator* _object_it = NULL; - GeeIterable* _tmp10_; - GeeIterator* _tmp11_; -#line 65 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" - _tmp10_ = removed; + GeeIterator* _tmp6_; #line 65 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" - _tmp11_ = gee_iterable_iterator (_tmp10_); + _tmp6_ = gee_iterable_iterator (removed); #line 65 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" - _object_it = _tmp11_; + _object_it = _tmp6_; #line 65 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" while (TRUE) { -#line 918 "FoldersBranch.c" - GeeIterator* _tmp12_; - gboolean _tmp13_; +#line 973 "FoldersBranch.c" + GeeIterator* _tmp7_; DataObject* object = NULL; - GeeIterator* _tmp14_; - gpointer _tmp15_; - DataObject* _tmp16_; - GFile* _tmp17_; - GFile* _tmp18_; - DataObject* _tmp19_; - guint _tmp20_; -#line 65 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" - _tmp12_ = _object_it; + GeeIterator* _tmp8_; + gpointer _tmp9_; + DataObject* _tmp10_; + GFile* _tmp11_; + GFile* _tmp12_; + DataObject* _tmp13_; + guint _tmp14_; #line 65 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" - _tmp13_ = gee_iterator_next (_tmp12_); + _tmp7_ = _object_it; #line 65 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" - if (!_tmp13_) { + if (!gee_iterator_next (_tmp7_)) { #line 65 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" break; -#line 937 "FoldersBranch.c" +#line 989 "FoldersBranch.c" } #line 65 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" - _tmp14_ = _object_it; + _tmp8_ = _object_it; #line 65 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" - _tmp15_ = gee_iterator_get (_tmp14_); + _tmp9_ = gee_iterator_get (_tmp8_); #line 65 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" - object = (DataObject*) _tmp15_; + object = (DataObject*) _tmp9_; #line 66 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" - _tmp16_ = object; + _tmp10_ = object; #line 66 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" - _tmp17_ = media_source_get_file (G_TYPE_CHECK_INSTANCE_CAST (_tmp16_, TYPE_MEDIA_SOURCE, MediaSource)); + _tmp11_ = media_source_get_file (G_TYPE_CHECK_INSTANCE_CAST (_tmp10_, TYPE_MEDIA_SOURCE, MediaSource)); #line 66 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" - _tmp18_ = _tmp17_; + _tmp12_ = _tmp11_; #line 66 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" - folders_branch_remove_entry (self, _tmp18_); + folders_branch_remove_entry (self, _tmp12_); #line 66 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" - _g_object_unref0 (_tmp18_); + _g_object_unref0 (_tmp12_); #line 67 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" - _tmp19_ = object; + _tmp13_ = object; #line 67 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" - g_signal_parse_name ("master-replaced", TYPE_MEDIA_SOURCE, &_tmp20_, NULL, FALSE); + g_signal_parse_name ("master-replaced", TYPE_MEDIA_SOURCE, &_tmp14_, NULL, FALSE); #line 67 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" - g_signal_handlers_disconnect_matched (G_TYPE_CHECK_INSTANCE_CAST (_tmp19_, TYPE_MEDIA_SOURCE, MediaSource), G_SIGNAL_MATCH_ID | G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA, _tmp20_, 0, NULL, (GCallback) _folders_branch_on_master_source_replaced_media_source_master_replaced, self); + g_signal_handlers_disconnect_matched (G_TYPE_CHECK_INSTANCE_CAST (_tmp13_, TYPE_MEDIA_SOURCE, MediaSource), G_SIGNAL_MATCH_ID | G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA, _tmp14_, 0, NULL, (GCallback) _folders_branch_on_master_source_replaced_media_source_master_replaced, self); #line 65 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" _g_object_unref0 (object); -#line 963 "FoldersBranch.c" +#line 1015 "FoldersBranch.c" } #line 65 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" _g_object_unref0 (_object_it); -#line 967 "FoldersBranch.c" +#line 1019 "FoldersBranch.c" } } } -static gpointer _g_object_ref0 (gpointer self) { +static gpointer +_g_object_ref0 (gpointer self) +{ #line 96 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" return self ? g_object_ref (self) : NULL; -#line 976 "FoldersBranch.c" +#line 1030 "FoldersBranch.c" } -static void folders_branch_add_entry (FoldersBranch* self, MediaSource* media) { +static void +folders_branch_add_entry (FoldersBranch* self, + MediaSource* media) +{ GFile* file = NULL; - MediaSource* _tmp0_; - GFile* _tmp1_; + GFile* _tmp0_; GeeArrayList* elements = NULL; - GeeArrayList* _tmp2_; + GeeArrayList* _tmp1_; GFile* parent = NULL; + GFile* _tmp2_; GFile* _tmp3_; - GFile* _tmp4_; FoldersSidebarEntry* parent_entry = NULL; #line 72 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" g_return_if_fail (FOLDERS_IS_BRANCH (self)); #line 72 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" g_return_if_fail (IS_MEDIA_SOURCE (media)); #line 73 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" - _tmp0_ = media; + _tmp0_ = media_source_get_file (media); #line 73 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" - _tmp1_ = media_source_get_file (_tmp0_); -#line 73 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" - file = _tmp1_; + file = _tmp0_; #line 75 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" - _tmp2_ = gee_array_list_new (g_file_get_type (), (GBoxedCopyFunc) g_object_ref, (GDestroyNotify) g_object_unref, NULL, NULL, NULL); + _tmp1_ = gee_array_list_new (g_file_get_type (), (GBoxedCopyFunc) g_object_ref, (GDestroyNotify) g_object_unref, NULL, NULL, NULL); #line 75 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" - elements = _tmp2_; + elements = _tmp1_; #line 78 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" - _tmp3_ = file; + _tmp2_ = file; #line 78 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" - _tmp4_ = g_file_get_parent (_tmp3_); + _tmp3_ = g_file_get_parent (_tmp2_); #line 78 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" - parent = _tmp4_; + parent = _tmp3_; #line 79 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" while (TRUE) { -#line 1012 "FoldersBranch.c" - gboolean _tmp5_ = FALSE; - GFile* _tmp6_; +#line 1066 "FoldersBranch.c" + gboolean _tmp4_ = FALSE; + GFile* _tmp5_; + GFile* _tmp9_; GFile* _tmp10_; GFile* _tmp11_; GFile* _tmp12_; - GFile* _tmp13_; - gboolean _tmp14_; - gboolean _tmp15_; - GeeArrayList* _tmp16_; + gboolean _tmp13_; + GeeArrayList* _tmp14_; + GFile* _tmp15_; + GFile* _tmp16_; GFile* _tmp17_; - GFile* _tmp18_; - GFile* _tmp19_; #line 79 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" - _tmp6_ = parent; + _tmp5_ = parent; #line 79 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" - if (_tmp6_ != NULL) { -#line 1029 "FoldersBranch.c" - GFile* _tmp7_; + if (_tmp5_ != NULL) { +#line 1082 "FoldersBranch.c" + GFile* _tmp6_; + gchar* _tmp7_; gchar* _tmp8_; - gchar* _tmp9_; #line 79 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" - _tmp7_ = parent; + _tmp6_ = parent; #line 79 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" - _tmp8_ = g_file_get_path (_tmp7_); + _tmp7_ = g_file_get_path (_tmp6_); #line 79 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" - _tmp9_ = _tmp8_; + _tmp8_ = _tmp7_; #line 79 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" - _tmp5_ = _tmp9_ != NULL; + _tmp4_ = _tmp8_ != NULL; #line 79 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" - _g_free0 (_tmp9_); -#line 1043 "FoldersBranch.c" + _g_free0 (_tmp8_); +#line 1096 "FoldersBranch.c" } else { #line 79 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" - _tmp5_ = FALSE; -#line 1047 "FoldersBranch.c" + _tmp4_ = FALSE; +#line 1100 "FoldersBranch.c" } #line 79 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" - if (!_tmp5_) { + if (!_tmp4_) { #line 79 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" break; -#line 1053 "FoldersBranch.c" +#line 1106 "FoldersBranch.c" } #line 81 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" - _tmp10_ = parent; + _tmp9_ = parent; #line 81 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" - _tmp11_ = self->priv->home_dir; + _tmp10_ = self->priv->home_dir; #line 81 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" - _tmp12_ = g_file_get_parent (_tmp11_); + _tmp11_ = g_file_get_parent (_tmp10_); #line 81 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" - _tmp13_ = _tmp12_; + _tmp12_ = _tmp11_; #line 81 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" - _tmp14_ = g_file_equal (_tmp10_, _tmp13_); + _tmp13_ = g_file_equal (_tmp9_, _tmp12_); #line 81 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" - _tmp15_ = _tmp14_; + _g_object_unref0 (_tmp12_); #line 81 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" - _g_object_unref0 (_tmp13_); -#line 81 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" - if (_tmp15_) { + if (_tmp13_) { #line 82 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" break; -#line 1073 "FoldersBranch.c" +#line 1124 "FoldersBranch.c" } #line 84 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" - _tmp16_ = elements; + _tmp14_ = elements; #line 84 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" - _tmp17_ = parent; + _tmp15_ = parent; #line 84 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" - gee_abstract_collection_add (G_TYPE_CHECK_INSTANCE_CAST (_tmp16_, GEE_TYPE_ABSTRACT_COLLECTION, GeeAbstractCollection), _tmp17_); + gee_abstract_collection_add (G_TYPE_CHECK_INSTANCE_CAST (_tmp14_, GEE_TYPE_ABSTRACT_COLLECTION, GeeAbstractCollection), _tmp15_); #line 86 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" - _tmp18_ = parent; + _tmp16_ = parent; #line 86 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" - _tmp19_ = g_file_get_parent (_tmp18_); + _tmp17_ = g_file_get_parent (_tmp16_); #line 86 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" _g_object_unref0 (parent); #line 86 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" - parent = _tmp19_; -#line 1089 "FoldersBranch.c" + parent = _tmp17_; +#line 1140 "FoldersBranch.c" } #line 91 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" parent_entry = NULL; -#line 1093 "FoldersBranch.c" +#line 1144 "FoldersBranch.c" { gint ctr = 0; - GeeArrayList* _tmp20_; - gint _tmp21_; - gint _tmp22_; + GeeArrayList* _tmp18_; + gint _tmp19_; + gint _tmp20_; #line 92 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" - _tmp20_ = elements; + _tmp18_ = elements; #line 92 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" - _tmp21_ = gee_abstract_collection_get_size (G_TYPE_CHECK_INSTANCE_CAST (_tmp20_, GEE_TYPE_ABSTRACT_COLLECTION, GeeAbstractCollection)); + _tmp19_ = gee_abstract_collection_get_size (G_TYPE_CHECK_INSTANCE_CAST (_tmp18_, GEE_TYPE_ABSTRACT_COLLECTION, GeeAbstractCollection)); #line 92 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" - _tmp22_ = _tmp21_; + _tmp20_ = _tmp19_; #line 92 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" - ctr = _tmp22_ - 1; -#line 1107 "FoldersBranch.c" + ctr = _tmp20_ - 1; +#line 1158 "FoldersBranch.c" { - gboolean _tmp23_ = FALSE; + gboolean _tmp21_ = FALSE; #line 92 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" - _tmp23_ = TRUE; + _tmp21_ = TRUE; #line 92 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" while (TRUE) { -#line 1114 "FoldersBranch.c" - gint _tmp25_; +#line 1165 "FoldersBranch.c" + gint _tmp23_; GFile* parent_dir = NULL; - GeeArrayList* _tmp26_; - gint _tmp27_; - gpointer _tmp28_; + GeeArrayList* _tmp24_; + gint _tmp25_; + gpointer _tmp26_; FoldersSidebarEntry* old_parent_entry = NULL; - FoldersSidebarEntry* _tmp29_; - FoldersSidebarEntry* _tmp30_; - GeeHashMap* _tmp31_; - GFile* _tmp32_; - gpointer _tmp33_; - FoldersSidebarEntry* _tmp34_; - gint _tmp46_; + FoldersSidebarEntry* _tmp27_; + FoldersSidebarEntry* _tmp28_; + GeeHashMap* _tmp29_; + GFile* _tmp30_; + gpointer _tmp31_; + FoldersSidebarEntry* _tmp32_; + gint _tmp44_; #line 92 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" - if (!_tmp23_) { -#line 1130 "FoldersBranch.c" - gint _tmp24_; + if (!_tmp21_) { +#line 1181 "FoldersBranch.c" + gint _tmp22_; #line 92 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" - _tmp24_ = ctr; + _tmp22_ = ctr; #line 92 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" - ctr = _tmp24_ - 1; -#line 1136 "FoldersBranch.c" + ctr = _tmp22_ - 1; +#line 1187 "FoldersBranch.c" } #line 92 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" - _tmp23_ = FALSE; + _tmp21_ = FALSE; #line 92 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" - _tmp25_ = ctr; + _tmp23_ = ctr; #line 92 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" - if (!(_tmp25_ >= 0)) { + if (!(_tmp23_ >= 0)) { #line 92 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" break; -#line 1146 "FoldersBranch.c" +#line 1197 "FoldersBranch.c" } #line 93 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" - _tmp26_ = elements; + _tmp24_ = elements; #line 93 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" - _tmp27_ = ctr; + _tmp25_ = ctr; #line 93 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" - _tmp28_ = gee_abstract_list_get (G_TYPE_CHECK_INSTANCE_CAST (_tmp26_, GEE_TYPE_ABSTRACT_LIST, GeeAbstractList), _tmp27_); + _tmp26_ = gee_abstract_list_get (G_TYPE_CHECK_INSTANCE_CAST (_tmp24_, GEE_TYPE_ABSTRACT_LIST, GeeAbstractList), _tmp25_); #line 93 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" - parent_dir = (GFile*) _tmp28_; + parent_dir = (GFile*) _tmp26_; #line 96 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" - _tmp29_ = parent_entry; + _tmp27_ = parent_entry; #line 96 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" - _tmp30_ = _g_object_ref0 (_tmp29_); + _tmp28_ = _g_object_ref0 (_tmp27_); #line 96 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" - old_parent_entry = _tmp30_; + old_parent_entry = _tmp28_; #line 98 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" - _tmp31_ = self->priv->entries; + _tmp29_ = self->priv->entries; #line 98 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" - _tmp32_ = parent_dir; + _tmp30_ = parent_dir; #line 98 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" - _tmp33_ = gee_abstract_map_get (G_TYPE_CHECK_INSTANCE_CAST (_tmp31_, GEE_TYPE_ABSTRACT_MAP, GeeAbstractMap), _tmp32_); + _tmp31_ = gee_abstract_map_get (G_TYPE_CHECK_INSTANCE_CAST (_tmp29_, GEE_TYPE_ABSTRACT_MAP, GeeAbstractMap), _tmp30_); #line 98 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" _g_object_unref0 (parent_entry); #line 98 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" - parent_entry = (FoldersSidebarEntry*) _tmp33_; + parent_entry = (FoldersSidebarEntry*) _tmp31_; #line 99 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" - _tmp34_ = parent_entry; + _tmp32_ = parent_entry; #line 99 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" - if (_tmp34_ == NULL) { -#line 1176 "FoldersBranch.c" - GFile* _tmp35_; - FoldersSidebarEntry* _tmp36_; - GeeHashMap* _tmp37_; - GFile* _tmp38_; + if (_tmp32_ == NULL) { +#line 1227 "FoldersBranch.c" + GFile* _tmp33_; + FoldersSidebarEntry* _tmp34_; + GeeHashMap* _tmp35_; + GFile* _tmp36_; + FoldersSidebarEntry* _tmp37_; + SidebarEntry* _tmp38_ = NULL; FoldersSidebarEntry* _tmp39_; - SidebarEntry* _tmp40_ = NULL; - FoldersSidebarEntry* _tmp41_; - FoldersSidebarEntry* _tmp45_; + FoldersSidebarEntry* _tmp43_; #line 100 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" - _tmp35_ = parent_dir; + _tmp33_ = parent_dir; #line 100 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" - _tmp36_ = folders_sidebar_entry_new (_tmp35_); + _tmp34_ = folders_sidebar_entry_new (_tmp33_); #line 100 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" _g_object_unref0 (parent_entry); #line 100 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" - parent_entry = _tmp36_; + parent_entry = _tmp34_; #line 101 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" - _tmp37_ = self->priv->entries; + _tmp35_ = self->priv->entries; #line 101 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" - _tmp38_ = parent_dir; + _tmp36_ = parent_dir; #line 101 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" - _tmp39_ = parent_entry; + _tmp37_ = parent_entry; #line 101 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" - gee_abstract_map_set (G_TYPE_CHECK_INSTANCE_CAST (_tmp37_, GEE_TYPE_ABSTRACT_MAP, GeeAbstractMap), _tmp38_, _tmp39_); + gee_abstract_map_set (G_TYPE_CHECK_INSTANCE_CAST (_tmp35_, GEE_TYPE_ABSTRACT_MAP, GeeAbstractMap), _tmp36_, _tmp37_); #line 103 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" - _tmp41_ = old_parent_entry; + _tmp39_ = old_parent_entry; #line 103 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" - if (_tmp41_ == NULL) { -#line 1205 "FoldersBranch.c" - SidebarEntry* _tmp42_; + if (_tmp39_ == NULL) { +#line 1256 "FoldersBranch.c" + SidebarEntry* _tmp40_; #line 103 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" - _tmp42_ = sidebar_branch_get_root (G_TYPE_CHECK_INSTANCE_CAST (self, SIDEBAR_TYPE_BRANCH, SidebarBranch)); + _tmp40_ = sidebar_branch_get_root (G_TYPE_CHECK_INSTANCE_CAST (self, SIDEBAR_TYPE_BRANCH, SidebarBranch)); #line 103 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" - _g_object_unref0 (_tmp40_); + _g_object_unref0 (_tmp38_); #line 103 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" - _tmp40_ = _tmp42_; -#line 1213 "FoldersBranch.c" + _tmp38_ = _tmp40_; +#line 1264 "FoldersBranch.c" } else { - FoldersSidebarEntry* _tmp43_; - SidebarEntry* _tmp44_; + FoldersSidebarEntry* _tmp41_; + SidebarEntry* _tmp42_; #line 103 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" - _tmp43_ = old_parent_entry; + _tmp41_ = old_parent_entry; #line 103 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" - _tmp44_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_CAST (_tmp43_, SIDEBAR_TYPE_ENTRY, SidebarEntry)); + _tmp42_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_CAST (_tmp41_, SIDEBAR_TYPE_ENTRY, SidebarEntry)); #line 103 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" - _g_object_unref0 (_tmp40_); + _g_object_unref0 (_tmp38_); #line 103 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" - _tmp40_ = _tmp44_; -#line 1225 "FoldersBranch.c" + _tmp38_ = _tmp42_; +#line 1276 "FoldersBranch.c" } #line 103 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" - _tmp45_ = parent_entry; + _tmp43_ = parent_entry; #line 103 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" - sidebar_branch_graft (G_TYPE_CHECK_INSTANCE_CAST (self, SIDEBAR_TYPE_BRANCH, SidebarBranch), _tmp40_, G_TYPE_CHECK_INSTANCE_CAST (_tmp45_, SIDEBAR_TYPE_ENTRY, SidebarEntry), NULL); + sidebar_branch_graft (G_TYPE_CHECK_INSTANCE_CAST (self, SIDEBAR_TYPE_BRANCH, SidebarBranch), _tmp38_, G_TYPE_CHECK_INSTANCE_CAST (_tmp43_, SIDEBAR_TYPE_ENTRY, SidebarEntry), NULL); #line 99 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" - _g_object_unref0 (_tmp40_); -#line 1233 "FoldersBranch.c" + _g_object_unref0 (_tmp38_); +#line 1284 "FoldersBranch.c" } #line 107 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" - _tmp46_ = ctr; + _tmp44_ = ctr; #line 107 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" - if (_tmp46_ == 0) { -#line 1239 "FoldersBranch.c" - FoldersSidebarEntry* _tmp47_; - gint _tmp48_; - gint _tmp49_; + if (_tmp44_ == 0) { +#line 1290 "FoldersBranch.c" + FoldersSidebarEntry* _tmp45_; + gint _tmp46_; + gint _tmp47_; #line 108 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" - _tmp47_ = parent_entry; + _tmp45_ = parent_entry; #line 108 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" - _tmp48_ = folders_sidebar_entry_get_count (_tmp47_); + _tmp46_ = folders_sidebar_entry_get_count (_tmp45_); #line 108 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" - _tmp49_ = _tmp48_; + _tmp47_ = _tmp46_; #line 108 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" - folders_sidebar_entry_set_count (_tmp47_, _tmp49_ + 1); -#line 1251 "FoldersBranch.c" + folders_sidebar_entry_set_count (_tmp45_, _tmp47_ + 1); +#line 1302 "FoldersBranch.c" } #line 92 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" _g_object_unref0 (old_parent_entry); #line 92 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" _g_object_unref0 (parent_dir); -#line 1257 "FoldersBranch.c" +#line 1308 "FoldersBranch.c" } } } @@ -1265,32 +1316,34 @@ static void folders_branch_add_entry (FoldersBranch* self, MediaSource* media) { _g_object_unref0 (elements); #line 72 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" _g_object_unref0 (file); -#line 1269 "FoldersBranch.c" +#line 1320 "FoldersBranch.c" } -static void folders_branch_remove_entry (FoldersBranch* self, GFile* file) { +static void +folders_branch_remove_entry (FoldersBranch* self, + GFile* file) +{ FoldersSidebarEntry* folder_entry = NULL; GeeHashMap* _tmp0_; GFile* _tmp1_; GFile* _tmp2_; - GFile* _tmp3_; - gpointer _tmp4_; + gpointer _tmp3_; + FoldersSidebarEntry* _tmp4_; FoldersSidebarEntry* _tmp5_; FoldersSidebarEntry* _tmp6_; - FoldersSidebarEntry* _tmp7_; + gint _tmp7_; gint _tmp8_; - gint _tmp9_; - gboolean _tmp10_ = FALSE; + gboolean _tmp9_ = FALSE; + FoldersSidebarEntry* _tmp10_; FoldersSidebarEntry* _tmp11_; - FoldersSidebarEntry* _tmp12_; + gint _tmp12_; gint _tmp13_; - gint _tmp14_; FoldersSidebarEntry* prune_point = NULL; + FoldersSidebarEntry* _tmp15_; + FoldersSidebarEntry* _tmp16_; FoldersSidebarEntry* _tmp17_; - FoldersSidebarEntry* _tmp18_; - FoldersSidebarEntry* _tmp19_; - FoldersSidebarEntry* _tmp40_; + FoldersSidebarEntry* _tmp37_; #line 112 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" g_return_if_fail (FOLDERS_IS_BRANCH (self)); #line 112 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" @@ -1298,223 +1351,219 @@ static void folders_branch_remove_entry (FoldersBranch* self, GFile* file) { #line 113 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" _tmp0_ = self->priv->entries; #line 113 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" - _tmp1_ = file; + _tmp1_ = g_file_get_parent (file); #line 113 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" - _tmp2_ = g_file_get_parent (_tmp1_); -#line 113 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" - _tmp3_ = _tmp2_; + _tmp2_ = _tmp1_; #line 113 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" - _tmp4_ = gee_abstract_map_get (G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, GEE_TYPE_ABSTRACT_MAP, GeeAbstractMap), _tmp3_); + _tmp3_ = gee_abstract_map_get (G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, GEE_TYPE_ABSTRACT_MAP, GeeAbstractMap), _tmp2_); #line 113 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" - _tmp5_ = (FoldersSidebarEntry*) _tmp4_; + _tmp4_ = (FoldersSidebarEntry*) _tmp3_; #line 113 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" - _g_object_unref0 (_tmp3_); + _g_object_unref0 (_tmp2_); #line 113 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" - folder_entry = _tmp5_; + folder_entry = _tmp4_; #line 114 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" - _tmp6_ = folder_entry; + _tmp5_ = folder_entry; #line 114 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" - if (_tmp6_ == NULL) { + if (_tmp5_ == NULL) { #line 115 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" _g_object_unref0 (folder_entry); #line 115 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" return; -#line 1323 "FoldersBranch.c" +#line 1374 "FoldersBranch.c" } #line 117 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" - _tmp7_ = folder_entry; + _tmp6_ = folder_entry; #line 117 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" - _tmp8_ = folders_sidebar_entry_get_count (_tmp7_); + _tmp7_ = folders_sidebar_entry_get_count (_tmp6_); #line 117 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" - _tmp9_ = _tmp8_; + _tmp8_ = _tmp7_; #line 117 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" - _vala_assert (_tmp9_ > 0, "folder_entry.count > 0"); + _vala_assert (_tmp8_ > 0, "folder_entry.count > 0"); #line 120 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" - _tmp11_ = folder_entry; + _tmp10_ = folder_entry; #line 120 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" - _tmp12_ = folder_entry; + _tmp11_ = folder_entry; #line 120 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" - _tmp13_ = folders_sidebar_entry_get_count (_tmp12_); + _tmp12_ = folders_sidebar_entry_get_count (_tmp11_); #line 120 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" - _tmp14_ = _tmp13_; + _tmp13_ = _tmp12_; #line 120 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" - folders_sidebar_entry_set_count (_tmp12_, _tmp14_ - 1); + folders_sidebar_entry_set_count (_tmp11_, _tmp13_ - 1); #line 120 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" - if ((_tmp14_ - 1) > 0) { + if ((_tmp13_ - 1) > 0) { #line 120 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" - _tmp10_ = TRUE; -#line 1347 "FoldersBranch.c" + _tmp9_ = TRUE; +#line 1398 "FoldersBranch.c" } else { - FoldersSidebarEntry* _tmp15_; - gint _tmp16_; -#line 120 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" - _tmp15_ = folder_entry; + FoldersSidebarEntry* _tmp14_; #line 120 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" - _tmp16_ = sidebar_branch_get_child_count (G_TYPE_CHECK_INSTANCE_CAST (self, SIDEBAR_TYPE_BRANCH, SidebarBranch), G_TYPE_CHECK_INSTANCE_CAST (_tmp15_, SIDEBAR_TYPE_ENTRY, SidebarEntry)); + _tmp14_ = folder_entry; #line 120 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" - _tmp10_ = _tmp16_ > 0; -#line 1357 "FoldersBranch.c" + _tmp9_ = sidebar_branch_get_child_count (G_TYPE_CHECK_INSTANCE_CAST (self, SIDEBAR_TYPE_BRANCH, SidebarBranch), G_TYPE_CHECK_INSTANCE_CAST (_tmp14_, SIDEBAR_TYPE_ENTRY, SidebarEntry)) > 0; +#line 1405 "FoldersBranch.c" } #line 120 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" - if (_tmp10_) { + if (_tmp9_) { #line 121 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" _g_object_unref0 (folder_entry); #line 121 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" return; -#line 1365 "FoldersBranch.c" +#line 1413 "FoldersBranch.c" } #line 124 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" - _tmp17_ = folder_entry; + _tmp15_ = folder_entry; #line 124 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" - _tmp18_ = _g_object_ref0 (_tmp17_); + _tmp16_ = _g_object_ref0 (_tmp15_); #line 124 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" - prune_point = _tmp18_; + prune_point = _tmp16_; #line 125 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" - _tmp19_ = prune_point; + _tmp17_ = prune_point; #line 125 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" - _vala_assert (_tmp19_ != NULL, "prune_point != null"); -#line 1377 "FoldersBranch.c" + _vala_assert (_tmp17_ != NULL, "prune_point != null"); +#line 1425 "FoldersBranch.c" { - gboolean _tmp20_ = FALSE; + gboolean _tmp18_ = FALSE; #line 127 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" - _tmp20_ = TRUE; + _tmp18_ = TRUE; #line 127 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" while (TRUE) { -#line 1384 "FoldersBranch.c" +#line 1432 "FoldersBranch.c" gboolean removed = FALSE; - GeeHashMap* _tmp21_; - FoldersSidebarEntry* _tmp22_; - GFile* _tmp23_; - GFile* _tmp24_; - gboolean _tmp25_; - gboolean _tmp26_; + GeeHashMap* _tmp19_; + FoldersSidebarEntry* _tmp20_; + GFile* _tmp21_; + GFile* _tmp22_; + gboolean _tmp23_; + gboolean _tmp24_; FoldersSidebarEntry* parent = NULL; + FoldersSidebarEntry* _tmp25_; + SidebarEntry* _tmp26_; FoldersSidebarEntry* _tmp27_; - SidebarEntry* _tmp28_; - FoldersSidebarEntry* _tmp29_; - gboolean _tmp30_ = FALSE; - gboolean _tmp31_ = FALSE; - FoldersSidebarEntry* _tmp32_; - FoldersSidebarEntry* _tmp38_; - FoldersSidebarEntry* _tmp39_; + gboolean _tmp28_ = FALSE; + gboolean _tmp29_ = FALSE; + FoldersSidebarEntry* _tmp30_; + FoldersSidebarEntry* _tmp35_; + FoldersSidebarEntry* _tmp36_; #line 127 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" - if (!_tmp20_) { -#line 1403 "FoldersBranch.c" + if (!_tmp18_) { +#line 1451 "FoldersBranch.c" } #line 127 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" - _tmp20_ = FALSE; + _tmp18_ = FALSE; #line 128 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" - _tmp21_ = self->priv->entries; + _tmp19_ = self->priv->entries; #line 128 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" - _tmp22_ = prune_point; + _tmp20_ = prune_point; #line 128 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" - _tmp23_ = folders_sidebar_entry_get_dir (_tmp22_); + _tmp21_ = folders_sidebar_entry_get_dir (_tmp20_); #line 128 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" - _tmp24_ = _tmp23_; + _tmp22_ = _tmp21_; #line 128 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" - _tmp25_ = gee_abstract_map_unset (G_TYPE_CHECK_INSTANCE_CAST (_tmp21_, GEE_TYPE_ABSTRACT_MAP, GeeAbstractMap), _tmp24_, NULL); + _tmp23_ = gee_abstract_map_unset (G_TYPE_CHECK_INSTANCE_CAST (_tmp19_, GEE_TYPE_ABSTRACT_MAP, GeeAbstractMap), _tmp22_, NULL); #line 128 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" - removed = _tmp25_; + removed = _tmp23_; #line 129 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" - _tmp26_ = removed; + _tmp24_ = removed; #line 129 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" - _vala_assert (_tmp26_, "removed"); + _vala_assert (_tmp24_, "removed"); #line 131 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" - _tmp27_ = prune_point; + _tmp25_ = prune_point; #line 131 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" - _tmp28_ = sidebar_branch_get_parent (G_TYPE_CHECK_INSTANCE_CAST (self, SIDEBAR_TYPE_BRANCH, SidebarBranch), G_TYPE_CHECK_INSTANCE_CAST (_tmp27_, SIDEBAR_TYPE_ENTRY, SidebarEntry)); + _tmp26_ = sidebar_branch_get_parent (G_TYPE_CHECK_INSTANCE_CAST (self, SIDEBAR_TYPE_BRANCH, SidebarBranch), G_TYPE_CHECK_INSTANCE_CAST (_tmp25_, SIDEBAR_TYPE_ENTRY, SidebarEntry)); #line 131 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" - _tmp29_ = G_TYPE_CHECK_INSTANCE_TYPE (_tmp28_, FOLDERS_TYPE_SIDEBAR_ENTRY) ? ((FoldersSidebarEntry*) _tmp28_) : NULL; + _tmp27_ = G_TYPE_CHECK_INSTANCE_TYPE (_tmp26_, FOLDERS_TYPE_SIDEBAR_ENTRY) ? ((FoldersSidebarEntry*) _tmp26_) : NULL; #line 131 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" - if (_tmp29_ == NULL) { + if (_tmp27_ == NULL) { #line 131 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" - _g_object_unref0 (_tmp28_); -#line 1433 "FoldersBranch.c" + _g_object_unref0 (_tmp26_); +#line 1481 "FoldersBranch.c" } #line 131 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" - parent = _tmp29_; + parent = _tmp27_; #line 132 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" - _tmp32_ = parent; + _tmp30_ = parent; #line 132 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" - if (_tmp32_ == NULL) { + if (_tmp30_ == NULL) { #line 132 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" - _tmp31_ = TRUE; -#line 1443 "FoldersBranch.c" + _tmp29_ = TRUE; +#line 1491 "FoldersBranch.c" } else { - FoldersSidebarEntry* _tmp33_; - gint _tmp34_; - gint _tmp35_; + FoldersSidebarEntry* _tmp31_; + gint _tmp32_; + gint _tmp33_; #line 132 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" - _tmp33_ = parent; + _tmp31_ = parent; #line 132 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" - _tmp34_ = folders_sidebar_entry_get_count (_tmp33_); + _tmp32_ = folders_sidebar_entry_get_count (_tmp31_); #line 132 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" - _tmp35_ = _tmp34_; + _tmp33_ = _tmp32_; #line 132 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" - _tmp31_ = _tmp35_ != 0; -#line 1456 "FoldersBranch.c" + _tmp29_ = _tmp33_ != 0; +#line 1504 "FoldersBranch.c" } #line 132 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" - if (_tmp31_) { + if (_tmp29_) { #line 132 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" - _tmp30_ = TRUE; -#line 1462 "FoldersBranch.c" + _tmp28_ = TRUE; +#line 1510 "FoldersBranch.c" } else { - FoldersSidebarEntry* _tmp36_; - gint _tmp37_; -#line 132 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" - _tmp36_ = parent; + FoldersSidebarEntry* _tmp34_; #line 132 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" - _tmp37_ = sidebar_branch_get_child_count (G_TYPE_CHECK_INSTANCE_CAST (self, SIDEBAR_TYPE_BRANCH, SidebarBranch), G_TYPE_CHECK_INSTANCE_CAST (_tmp36_, SIDEBAR_TYPE_ENTRY, SidebarEntry)); + _tmp34_ = parent; #line 132 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" - _tmp30_ = _tmp37_ > 1; -#line 1472 "FoldersBranch.c" + _tmp28_ = sidebar_branch_get_child_count (G_TYPE_CHECK_INSTANCE_CAST (self, SIDEBAR_TYPE_BRANCH, SidebarBranch), G_TYPE_CHECK_INSTANCE_CAST (_tmp34_, SIDEBAR_TYPE_ENTRY, SidebarEntry)) > 1; +#line 1517 "FoldersBranch.c" } #line 132 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" - if (_tmp30_) { + if (_tmp28_) { #line 133 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" _g_object_unref0 (parent); #line 133 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" break; -#line 1480 "FoldersBranch.c" +#line 1525 "FoldersBranch.c" } #line 135 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" - _tmp38_ = parent; + _tmp35_ = parent; #line 135 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" - _tmp39_ = _g_object_ref0 (_tmp38_); + _tmp36_ = _g_object_ref0 (_tmp35_); #line 135 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" _g_object_unref0 (prune_point); #line 135 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" - prune_point = _tmp39_; + prune_point = _tmp36_; #line 127 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" _g_object_unref0 (parent); -#line 1492 "FoldersBranch.c" +#line 1537 "FoldersBranch.c" } } #line 138 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" - _tmp40_ = prune_point; + _tmp37_ = prune_point; #line 138 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" - sidebar_branch_prune (G_TYPE_CHECK_INSTANCE_CAST (self, SIDEBAR_TYPE_BRANCH, SidebarBranch), G_TYPE_CHECK_INSTANCE_CAST (_tmp40_, SIDEBAR_TYPE_ENTRY, SidebarEntry)); + sidebar_branch_prune (G_TYPE_CHECK_INSTANCE_CAST (self, SIDEBAR_TYPE_BRANCH, SidebarBranch), G_TYPE_CHECK_INSTANCE_CAST (_tmp37_, SIDEBAR_TYPE_ENTRY, SidebarEntry)); #line 112 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" _g_object_unref0 (prune_point); #line 112 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" _g_object_unref0 (folder_entry); -#line 1503 "FoldersBranch.c" +#line 1548 "FoldersBranch.c" } -static void folders_branch_class_init (FoldersBranchClass * klass) { +static void +folders_branch_class_init (FoldersBranchClass * klass) +{ #line 7 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" folders_branch_parent_class = g_type_class_peek_parent (klass); #line 7 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" g_type_class_add_private (klass, sizeof (FoldersBranchPrivate)); #line 7 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" G_OBJECT_CLASS (klass)->finalize = folders_branch_finalize; -#line 1514 "FoldersBranch.c" +#line 1561 "FoldersBranch.c" } -static void folders_branch_instance_init (FoldersBranch * self) { +static void +folders_branch_instance_init (FoldersBranch * self) +{ GeeHashMap* _tmp0_; #line 7 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" self->priv = FOLDERS_BRANCH_GET_PRIVATE (self); @@ -1522,15 +1571,17 @@ static void folders_branch_instance_init (FoldersBranch * self) { _tmp0_ = gee_hash_map_new (g_file_get_type (), (GBoxedCopyFunc) g_object_ref, (GDestroyNotify) g_object_unref, FOLDERS_TYPE_SIDEBAR_ENTRY, (GBoxedCopyFunc) g_object_ref, (GDestroyNotify) g_object_unref, _file_hash_gee_hash_data_func, NULL, NULL, _file_equal_gee_equal_data_func, NULL, NULL, NULL, NULL, NULL); #line 8 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" self->priv->entries = _tmp0_; -#line 1526 "FoldersBranch.c" +#line 1575 "FoldersBranch.c" } -static void folders_branch_finalize (GObject * obj) { +static void +folders_branch_finalize (GObject * obj) +{ FoldersBranch * self; #line 7 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" self = G_TYPE_CHECK_INSTANCE_CAST (obj, FOLDERS_TYPE_BRANCH, FoldersBranch); -#line 1534 "FoldersBranch.c" +#line 1585 "FoldersBranch.c" { GeeIterator* _sources_it = NULL; MediaCollectionRegistry* _tmp0_; @@ -1559,43 +1610,40 @@ static void folders_branch_finalize (GObject * obj) { _sources_it = _tmp5_; #line 30 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" while (TRUE) { -#line 1563 "FoldersBranch.c" +#line 1614 "FoldersBranch.c" GeeIterator* _tmp6_; - gboolean _tmp7_; MediaSourceCollection* sources = NULL; - GeeIterator* _tmp8_; - gpointer _tmp9_; - MediaSourceCollection* _tmp10_; - guint _tmp11_; + GeeIterator* _tmp7_; + gpointer _tmp8_; + MediaSourceCollection* _tmp9_; + guint _tmp10_; #line 30 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" _tmp6_ = _sources_it; #line 30 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" - _tmp7_ = gee_iterator_next (_tmp6_); -#line 30 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" - if (!_tmp7_) { + if (!gee_iterator_next (_tmp6_)) { #line 30 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" break; -#line 1579 "FoldersBranch.c" +#line 1627 "FoldersBranch.c" } #line 30 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" - _tmp8_ = _sources_it; + _tmp7_ = _sources_it; #line 30 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" - _tmp9_ = gee_iterator_get (_tmp8_); + _tmp8_ = gee_iterator_get (_tmp7_); #line 30 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" - sources = (MediaSourceCollection*) _tmp9_; + sources = (MediaSourceCollection*) _tmp8_; #line 31 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" - _tmp10_ = sources; + _tmp9_ = sources; #line 31 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" - g_signal_parse_name ("contents-altered", TYPE_DATA_COLLECTION, &_tmp11_, NULL, FALSE); + g_signal_parse_name ("contents-altered", TYPE_DATA_COLLECTION, &_tmp10_, NULL, FALSE); #line 31 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" - g_signal_handlers_disconnect_matched (G_TYPE_CHECK_INSTANCE_CAST (_tmp10_, TYPE_DATA_COLLECTION, DataCollection), G_SIGNAL_MATCH_ID | G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA, _tmp11_, 0, NULL, (GCallback) _folders_branch_on_media_contents_altered_data_collection_contents_altered, self); + g_signal_handlers_disconnect_matched (G_TYPE_CHECK_INSTANCE_CAST (_tmp9_, TYPE_DATA_COLLECTION, DataCollection), G_SIGNAL_MATCH_ID | G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA, _tmp10_, 0, NULL, (GCallback) _folders_branch_on_media_contents_altered_data_collection_contents_altered, self); #line 30 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" _data_collection_unref0 (sources); -#line 1595 "FoldersBranch.c" +#line 1643 "FoldersBranch.c" } #line 30 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" _g_object_unref0 (_sources_it); -#line 1599 "FoldersBranch.c" +#line 1647 "FoldersBranch.c" } #line 8 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" _g_object_unref0 (self->priv->entries); @@ -1603,11 +1651,13 @@ static void folders_branch_finalize (GObject * obj) { _g_object_unref0 (self->priv->home_dir); #line 7 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" G_OBJECT_CLASS (folders_branch_parent_class)->finalize (obj); -#line 1607 "FoldersBranch.c" +#line 1655 "FoldersBranch.c" } -GType folders_branch_get_type (void) { +GType +folders_branch_get_type (void) +{ static volatile gsize folders_branch_type_id__volatile = 0; if (g_once_init_enter (&folders_branch_type_id__volatile)) { static const GTypeInfo g_define_type_info = { sizeof (FoldersBranchClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) folders_branch_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (FoldersBranch), 0, (GInstanceInitFunc) folders_branch_instance_init, NULL }; @@ -1619,35 +1669,45 @@ GType folders_branch_get_type (void) { } -FoldersRoot* folders_root_construct (GType object_type) { +FoldersRoot* +folders_root_construct (GType object_type) +{ FoldersRoot * self = NULL; #line 144 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" self = (FoldersRoot*) sidebar_header_construct (object_type, _ ("Folders"), _ ("Browse the library’s folder structure"), TRUE); #line 143 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" return self; -#line 1629 "FoldersBranch.c" +#line 1681 "FoldersBranch.c" } -FoldersRoot* folders_root_new (void) { +FoldersRoot* +folders_root_new (void) +{ #line 143 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" return folders_root_construct (FOLDERS_TYPE_ROOT); -#line 1636 "FoldersBranch.c" +#line 1690 "FoldersBranch.c" } -static void folders_root_class_init (FoldersRootClass * klass) { +static void +folders_root_class_init (FoldersRootClass * klass) +{ #line 142 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" folders_root_parent_class = g_type_class_peek_parent (klass); -#line 1643 "FoldersBranch.c" +#line 1699 "FoldersBranch.c" } -static void folders_root_instance_init (FoldersRoot * self) { +static void +folders_root_instance_init (FoldersRoot * self) +{ } -GType folders_root_get_type (void) { +GType +folders_root_get_type (void) +{ static volatile gsize folders_root_type_id__volatile = 0; if (g_once_init_enter (&folders_root_type_id__volatile)) { static const GTypeInfo g_define_type_info = { sizeof (FoldersRootClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) folders_root_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (FoldersRoot), 0, (GInstanceInitFunc) folders_root_instance_init, NULL }; @@ -1659,52 +1719,53 @@ GType folders_root_get_type (void) { } -FoldersSidebarEntry* folders_sidebar_entry_construct (GType object_type, GFile* dir) { +FoldersSidebarEntry* +folders_sidebar_entry_construct (GType object_type, + GFile* dir) +{ FoldersSidebarEntry * self = NULL; - GFile* _tmp0_; - GFile* _tmp1_; + gchar* _tmp0_; + gchar* _tmp1_; gchar* _tmp2_; gchar* _tmp3_; - gchar* _tmp4_; - gchar* _tmp5_; #line 169 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" g_return_val_if_fail (G_IS_FILE (dir), NULL); #line 169 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" self = (FoldersSidebarEntry*) sidebar_simple_page_entry_construct (object_type); #line 170 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" - _tmp0_ = dir; -#line 170 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" - folders_sidebar_entry_set_dir (self, _tmp0_); -#line 171 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" - _tmp1_ = dir; -#line 171 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" - _tmp2_ = g_file_get_path (_tmp1_); + folders_sidebar_entry_set_dir (self, dir); #line 171 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" - _tmp3_ = _tmp2_; + _tmp0_ = g_file_get_path (dir); #line 171 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" - _tmp4_ = g_utf8_collate_key_for_filename (_tmp3_, (gssize) -1); + _tmp1_ = _tmp0_; #line 171 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" - _tmp5_ = _tmp4_; + _tmp2_ = g_utf8_collate_key_for_filename (_tmp1_, (gssize) -1); #line 171 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" - folders_sidebar_entry_set_collation (self, _tmp5_); + _tmp3_ = _tmp2_; #line 171 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" - _g_free0 (_tmp5_); + folders_sidebar_entry_set_collation (self, _tmp3_); #line 171 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" _g_free0 (_tmp3_); +#line 171 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" + _g_free0 (_tmp1_); #line 169 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" return self; -#line 1697 "FoldersBranch.c" +#line 1754 "FoldersBranch.c" } -FoldersSidebarEntry* folders_sidebar_entry_new (GFile* dir) { +FoldersSidebarEntry* +folders_sidebar_entry_new (GFile* dir) +{ #line 169 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" return folders_sidebar_entry_construct (FOLDERS_TYPE_SIDEBAR_ENTRY, dir); -#line 1704 "FoldersBranch.c" +#line 1763 "FoldersBranch.c" } -static gchar* folders_sidebar_entry_real_get_sidebar_name (SidebarSimplePageEntry* base) { +static gchar* +folders_sidebar_entry_real_get_sidebar_name (SidebarSimplePageEntry* base) +{ FoldersSidebarEntry * self; gchar* result = NULL; GFile* _tmp0_; @@ -1719,11 +1780,13 @@ static gchar* folders_sidebar_entry_real_get_sidebar_name (SidebarSimplePageEntr result = _tmp1_; #line 175 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" return result; -#line 1723 "FoldersBranch.c" +#line 1784 "FoldersBranch.c" } -static gchar* folders_sidebar_entry_real_get_sidebar_icon (SidebarSimplePageEntry* base) { +static gchar* +folders_sidebar_entry_real_get_sidebar_icon (SidebarSimplePageEntry* base) +{ FoldersSidebarEntry * self; gchar* result = NULL; const gchar* _tmp0_ = NULL; @@ -1738,20 +1801,20 @@ static gchar* folders_sidebar_entry_real_get_sidebar_icon (SidebarSimplePageEntr _tmp2_ = _tmp1_; #line 179 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" if (_tmp2_ == 0) { -#line 1742 "FoldersBranch.c" +#line 1805 "FoldersBranch.c" const gchar* _tmp3_; #line 179 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" _tmp3_ = folders_icon; #line 179 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" _tmp0_ = _tmp3_; -#line 1748 "FoldersBranch.c" +#line 1811 "FoldersBranch.c" } else { const gchar* _tmp4_; #line 179 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" _tmp4_ = folders_have_photos_icon; #line 179 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" _tmp0_ = _tmp4_; -#line 1755 "FoldersBranch.c" +#line 1818 "FoldersBranch.c" } #line 179 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" _tmp5_ = g_strdup (_tmp0_); @@ -1759,11 +1822,13 @@ static gchar* folders_sidebar_entry_real_get_sidebar_icon (SidebarSimplePageEntr result = _tmp5_; #line 179 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" return result; -#line 1763 "FoldersBranch.c" +#line 1826 "FoldersBranch.c" } -static gchar* folders_sidebar_entry_real_to_string (SidebarSimplePageEntry* base) { +static gchar* +folders_sidebar_entry_real_to_string (SidebarSimplePageEntry* base) +{ FoldersSidebarEntry * self; gchar* result = NULL; GFile* _tmp0_; @@ -1778,11 +1843,13 @@ static gchar* folders_sidebar_entry_real_to_string (SidebarSimplePageEntry* base result = _tmp1_; #line 183 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" return result; -#line 1782 "FoldersBranch.c" +#line 1847 "FoldersBranch.c" } -static gboolean folders_sidebar_entry_real_expand_on_select (SidebarExpandableEntry* base) { +static gboolean +folders_sidebar_entry_real_expand_on_select (SidebarExpandableEntry* base) +{ FoldersSidebarEntry * self; gboolean result = FALSE; #line 186 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" @@ -1791,11 +1858,13 @@ static gboolean folders_sidebar_entry_real_expand_on_select (SidebarExpandableEn result = TRUE; #line 187 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" return result; -#line 1795 "FoldersBranch.c" +#line 1862 "FoldersBranch.c" } -static Page* folders_sidebar_entry_real_create_page (SidebarSimplePageEntry* base) { +static Page* +folders_sidebar_entry_real_create_page (SidebarSimplePageEntry* base) +{ FoldersSidebarEntry * self; Page* result = NULL; GFile* _tmp0_; @@ -1812,11 +1881,13 @@ static Page* folders_sidebar_entry_real_create_page (SidebarSimplePageEntry* bas result = G_TYPE_CHECK_INSTANCE_CAST (_tmp1_, TYPE_PAGE, Page); #line 191 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" return result; -#line 1816 "FoldersBranch.c" +#line 1885 "FoldersBranch.c" } -GFile* folders_sidebar_entry_get_dir (FoldersSidebarEntry* self) { +GFile* +folders_sidebar_entry_get_dir (FoldersSidebarEntry* self) +{ GFile* result; GFile* _tmp0_; #line 149 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" @@ -1827,34 +1898,36 @@ GFile* folders_sidebar_entry_get_dir (FoldersSidebarEntry* self) { result = _tmp0_; #line 149 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" return result; -#line 1831 "FoldersBranch.c" +#line 1902 "FoldersBranch.c" } -static void folders_sidebar_entry_set_dir (FoldersSidebarEntry* self, GFile* value) { +static void +folders_sidebar_entry_set_dir (FoldersSidebarEntry* self, + GFile* value) +{ #line 149 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" g_return_if_fail (FOLDERS_IS_SIDEBAR_ENTRY (self)); #line 149 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" if (folders_sidebar_entry_get_dir (self) != value) { -#line 1840 "FoldersBranch.c" +#line 1914 "FoldersBranch.c" GFile* _tmp0_; - GFile* _tmp1_; -#line 149 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" - _tmp0_ = value; #line 149 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" - _tmp1_ = _g_object_ref0 (_tmp0_); + _tmp0_ = _g_object_ref0 (value); #line 149 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" _g_object_unref0 (self->priv->_dir); #line 149 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" - self->priv->_dir = _tmp1_; + self->priv->_dir = _tmp0_; #line 149 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" - g_object_notify ((GObject *) self, "dir"); -#line 1853 "FoldersBranch.c" + g_object_notify_by_pspec ((GObject *) self, folders_sidebar_entry_properties[FOLDERS_SIDEBAR_ENTRY_DIR_PROPERTY]); +#line 1924 "FoldersBranch.c" } } -const gchar* folders_sidebar_entry_get_collation (FoldersSidebarEntry* self) { +const gchar* +folders_sidebar_entry_get_collation (FoldersSidebarEntry* self) +{ const gchar* result; const gchar* _tmp0_; #line 150 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" @@ -1865,34 +1938,36 @@ const gchar* folders_sidebar_entry_get_collation (FoldersSidebarEntry* self) { result = _tmp0_; #line 150 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" return result; -#line 1869 "FoldersBranch.c" +#line 1942 "FoldersBranch.c" } -static void folders_sidebar_entry_set_collation (FoldersSidebarEntry* self, const gchar* value) { +static void +folders_sidebar_entry_set_collation (FoldersSidebarEntry* self, + const gchar* value) +{ #line 150 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" g_return_if_fail (FOLDERS_IS_SIDEBAR_ENTRY (self)); #line 150 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" if (g_strcmp0 (value, folders_sidebar_entry_get_collation (self)) != 0) { -#line 1878 "FoldersBranch.c" - const gchar* _tmp0_; - gchar* _tmp1_; -#line 150 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" - _tmp0_ = value; +#line 1954 "FoldersBranch.c" + gchar* _tmp0_; #line 150 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" - _tmp1_ = g_strdup (_tmp0_); + _tmp0_ = g_strdup (value); #line 150 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" _g_free0 (self->priv->_collation); #line 150 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" - self->priv->_collation = _tmp1_; + self->priv->_collation = _tmp0_; #line 150 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" - g_object_notify ((GObject *) self, "collation"); -#line 1891 "FoldersBranch.c" + g_object_notify_by_pspec ((GObject *) self, folders_sidebar_entry_properties[FOLDERS_SIDEBAR_ENTRY_COLLATION_PROPERTY]); +#line 1964 "FoldersBranch.c" } } -gint folders_sidebar_entry_get_count (FoldersSidebarEntry* self) { +gint +folders_sidebar_entry_get_count (FoldersSidebarEntry* self) +{ gint result; gint _tmp0_; #line 154 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" @@ -1903,17 +1978,19 @@ gint folders_sidebar_entry_get_count (FoldersSidebarEntry* self) { result = _tmp0_; #line 155 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" return result; -#line 1907 "FoldersBranch.c" +#line 1982 "FoldersBranch.c" } -void folders_sidebar_entry_set_count (FoldersSidebarEntry* self, gint value) { +void +folders_sidebar_entry_set_count (FoldersSidebarEntry* self, + gint value) +{ gint prev_count = 0; gint _tmp0_; - gint _tmp1_; + gboolean _tmp1_ = FALSE; gboolean _tmp2_ = FALSE; - gboolean _tmp3_ = FALSE; - gint _tmp4_; + gint _tmp3_; #line 158 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" g_return_if_fail (FOLDERS_IS_SIDEBAR_ENTRY (self)); #line 159 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" @@ -1921,75 +1998,75 @@ void folders_sidebar_entry_set_count (FoldersSidebarEntry* self, gint value) { #line 159 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" prev_count = _tmp0_; #line 160 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" - _tmp1_ = value; -#line 160 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" - self->priv->_count = _tmp1_; + self->priv->_count = value; #line 163 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" - _tmp4_ = prev_count; + _tmp3_ = prev_count; #line 163 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" - if (_tmp4_ == 0) { -#line 1932 "FoldersBranch.c" - gint _tmp5_; + if (_tmp3_ == 0) { +#line 2007 "FoldersBranch.c" + gint _tmp4_; #line 163 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" - _tmp5_ = self->priv->_count; + _tmp4_ = self->priv->_count; #line 163 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" - _tmp3_ = _tmp5_ == 1; -#line 1938 "FoldersBranch.c" + _tmp2_ = _tmp4_ == 1; +#line 2013 "FoldersBranch.c" } else { #line 163 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" - _tmp3_ = FALSE; -#line 1942 "FoldersBranch.c" + _tmp2_ = FALSE; +#line 2017 "FoldersBranch.c" } #line 163 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" - if (_tmp3_) { + if (_tmp2_) { #line 163 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" - _tmp2_ = TRUE; -#line 1948 "FoldersBranch.c" + _tmp1_ = TRUE; +#line 2023 "FoldersBranch.c" } else { - gboolean _tmp6_ = FALSE; - gint _tmp7_; + gboolean _tmp5_ = FALSE; + gint _tmp6_; #line 163 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" - _tmp7_ = prev_count; + _tmp6_ = prev_count; #line 163 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" - if (_tmp7_ == 1) { -#line 1956 "FoldersBranch.c" - gint _tmp8_; + if (_tmp6_ == 1) { +#line 2031 "FoldersBranch.c" + gint _tmp7_; #line 163 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" - _tmp8_ = self->priv->_count; + _tmp7_ = self->priv->_count; #line 163 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" - _tmp6_ = _tmp8_ == 0; -#line 1962 "FoldersBranch.c" + _tmp5_ = _tmp7_ == 0; +#line 2037 "FoldersBranch.c" } else { #line 163 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" - _tmp6_ = FALSE; -#line 1966 "FoldersBranch.c" + _tmp5_ = FALSE; +#line 2041 "FoldersBranch.c" } #line 163 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" - _tmp2_ = _tmp6_; -#line 1970 "FoldersBranch.c" + _tmp1_ = _tmp5_; +#line 2045 "FoldersBranch.c" } #line 163 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" - if (_tmp2_) { -#line 1974 "FoldersBranch.c" + if (_tmp1_) { +#line 2049 "FoldersBranch.c" + gchar* _tmp8_; gchar* _tmp9_; - gchar* _tmp10_; #line 164 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" - _tmp9_ = sidebar_simple_page_entry_get_sidebar_icon (G_TYPE_CHECK_INSTANCE_CAST (self, SIDEBAR_TYPE_SIMPLE_PAGE_ENTRY, SidebarSimplePageEntry)); + _tmp8_ = sidebar_simple_page_entry_get_sidebar_icon (G_TYPE_CHECK_INSTANCE_CAST (self, SIDEBAR_TYPE_SIMPLE_PAGE_ENTRY, SidebarSimplePageEntry)); #line 164 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" - _tmp10_ = _tmp9_; + _tmp9_ = _tmp8_; #line 164 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" - g_signal_emit_by_name (G_TYPE_CHECK_INSTANCE_CAST (self, SIDEBAR_TYPE_ENTRY, SidebarEntry), "sidebar-icon-changed", _tmp10_); + g_signal_emit_by_name (G_TYPE_CHECK_INSTANCE_CAST (self, SIDEBAR_TYPE_ENTRY, SidebarEntry), "sidebar-icon-changed", _tmp9_); #line 164 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" - _g_free0 (_tmp10_); -#line 1985 "FoldersBranch.c" + _g_free0 (_tmp9_); +#line 2060 "FoldersBranch.c" } #line 158 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" - g_object_notify ((GObject *) self, "count"); -#line 1989 "FoldersBranch.c" + g_object_notify_by_pspec ((GObject *) self, folders_sidebar_entry_properties[FOLDERS_SIDEBAR_ENTRY_COUNT_PROPERTY]); +#line 2064 "FoldersBranch.c" } -static void folders_sidebar_entry_class_init (FoldersSidebarEntryClass * klass) { +static void +folders_sidebar_entry_class_init (FoldersSidebarEntryClass * klass) +{ #line 148 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" folders_sidebar_entry_parent_class = g_type_class_peek_parent (klass); #line 148 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" @@ -2009,34 +2086,40 @@ static void folders_sidebar_entry_class_init (FoldersSidebarEntryClass * klass) #line 148 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" G_OBJECT_CLASS (klass)->finalize = folders_sidebar_entry_finalize; #line 148 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" - g_object_class_install_property (G_OBJECT_CLASS (klass), FOLDERS_SIDEBAR_ENTRY_DIR_PROPERTY, g_param_spec_object ("dir", "dir", "dir", g_file_get_type (), G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE)); + g_object_class_install_property (G_OBJECT_CLASS (klass), FOLDERS_SIDEBAR_ENTRY_DIR_PROPERTY, folders_sidebar_entry_properties[FOLDERS_SIDEBAR_ENTRY_DIR_PROPERTY] = g_param_spec_object ("dir", "dir", "dir", g_file_get_type (), G_PARAM_STATIC_STRINGS | G_PARAM_READABLE)); #line 148 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" - g_object_class_install_property (G_OBJECT_CLASS (klass), FOLDERS_SIDEBAR_ENTRY_COLLATION_PROPERTY, g_param_spec_string ("collation", "collation", "collation", NULL, G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE)); + g_object_class_install_property (G_OBJECT_CLASS (klass), FOLDERS_SIDEBAR_ENTRY_COLLATION_PROPERTY, folders_sidebar_entry_properties[FOLDERS_SIDEBAR_ENTRY_COLLATION_PROPERTY] = g_param_spec_string ("collation", "collation", "collation", NULL, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE)); #line 148 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" - g_object_class_install_property (G_OBJECT_CLASS (klass), FOLDERS_SIDEBAR_ENTRY_COUNT_PROPERTY, g_param_spec_int ("count", "count", "count", G_MININT, G_MAXINT, 0, G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE | G_PARAM_WRITABLE)); -#line 2018 "FoldersBranch.c" + g_object_class_install_property (G_OBJECT_CLASS (klass), FOLDERS_SIDEBAR_ENTRY_COUNT_PROPERTY, folders_sidebar_entry_properties[FOLDERS_SIDEBAR_ENTRY_COUNT_PROPERTY] = g_param_spec_int ("count", "count", "count", G_MININT, G_MAXINT, 0, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE)); +#line 2095 "FoldersBranch.c" } -static void folders_sidebar_entry_sidebar_expandable_entry_interface_init (SidebarExpandableEntryIface * iface) { +static void +folders_sidebar_entry_sidebar_expandable_entry_interface_init (SidebarExpandableEntryIface * iface) +{ #line 148 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" folders_sidebar_entry_sidebar_expandable_entry_parent_iface = g_type_interface_peek_parent (iface); #line 148 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" iface->expand_on_select = (gboolean (*) (SidebarExpandableEntry *)) folders_sidebar_entry_real_expand_on_select; -#line 2027 "FoldersBranch.c" +#line 2106 "FoldersBranch.c" } -static void folders_sidebar_entry_instance_init (FoldersSidebarEntry * self) { +static void +folders_sidebar_entry_instance_init (FoldersSidebarEntry * self) +{ #line 148 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" self->priv = FOLDERS_SIDEBAR_ENTRY_GET_PRIVATE (self); #line 152 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" self->priv->_count = 0; -#line 2036 "FoldersBranch.c" +#line 2117 "FoldersBranch.c" } -static void folders_sidebar_entry_finalize (GObject * obj) { +static void +folders_sidebar_entry_finalize (GObject * obj) +{ FoldersSidebarEntry * self; #line 148 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" self = G_TYPE_CHECK_INSTANCE_CAST (obj, FOLDERS_TYPE_SIDEBAR_ENTRY, FoldersSidebarEntry); @@ -2046,11 +2129,13 @@ static void folders_sidebar_entry_finalize (GObject * obj) { _g_free0 (self->priv->_collation); #line 148 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" G_OBJECT_CLASS (folders_sidebar_entry_parent_class)->finalize (obj); -#line 2050 "FoldersBranch.c" +#line 2133 "FoldersBranch.c" } -GType folders_sidebar_entry_get_type (void) { +GType +folders_sidebar_entry_get_type (void) +{ static volatile gsize folders_sidebar_entry_type_id__volatile = 0; if (g_once_init_enter (&folders_sidebar_entry_type_id__volatile)) { static const GTypeInfo g_define_type_info = { sizeof (FoldersSidebarEntryClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) folders_sidebar_entry_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (FoldersSidebarEntry), 0, (GInstanceInitFunc) folders_sidebar_entry_instance_init, NULL }; @@ -2064,7 +2149,12 @@ GType folders_sidebar_entry_get_type (void) { } -static void _vala_folders_sidebar_entry_get_property (GObject * object, guint property_id, GValue * value, GParamSpec * pspec) { +static void +_vala_folders_sidebar_entry_get_property (GObject * object, + guint property_id, + GValue * value, + GParamSpec * pspec) +{ FoldersSidebarEntry * self; self = G_TYPE_CHECK_INSTANCE_CAST (object, FOLDERS_TYPE_SIDEBAR_ENTRY, FoldersSidebarEntry); #line 148 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" @@ -2087,18 +2177,23 @@ static void _vala_folders_sidebar_entry_get_property (GObject * object, guint pr g_value_set_int (value, folders_sidebar_entry_get_count (self)); #line 148 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" break; -#line 2091 "FoldersBranch.c" +#line 2181 "FoldersBranch.c" default: #line 148 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec); #line 148 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" break; -#line 2097 "FoldersBranch.c" +#line 2187 "FoldersBranch.c" } } -static void _vala_folders_sidebar_entry_set_property (GObject * object, guint property_id, const GValue * value, GParamSpec * pspec) { +static void +_vala_folders_sidebar_entry_set_property (GObject * object, + guint property_id, + const GValue * value, + GParamSpec * pspec) +{ FoldersSidebarEntry * self; self = G_TYPE_CHECK_INSTANCE_CAST (object, FOLDERS_TYPE_SIDEBAR_ENTRY, FoldersSidebarEntry); #line 148 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" @@ -2121,13 +2216,13 @@ static void _vala_folders_sidebar_entry_set_property (GObject * object, guint pr folders_sidebar_entry_set_count (self, g_value_get_int (value)); #line 148 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" break; -#line 2125 "FoldersBranch.c" +#line 2220 "FoldersBranch.c" default: #line 148 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec); #line 148 "/home/jens/Source/shotwell/src/folders/FoldersBranch.vala" break; -#line 2131 "FoldersBranch.c" +#line 2226 "FoldersBranch.c" } } diff --git a/src/folders/FoldersPage.c b/src/folders/FoldersPage.c index abc3f83..095b114 100644 --- a/src/folders/FoldersPage.c +++ b/src/folders/FoldersPage.c @@ -1,4 +1,4 @@ -/* FoldersPage.c generated by valac 0.36.6, the Vala compiler +/* FoldersPage.c generated by valac 0.40.4, the Vala compiler * generated from FoldersPage.vala, do not modify */ /* Copyright 2016 Software Freedom Conservancy Inc. @@ -7,6 +7,7 @@ * (version 2.1 or later). See the COPYING file in this distribution. */ + #include #include #include @@ -230,6 +231,11 @@ typedef struct _CollectionViewManagerClass CollectionViewManagerClass; typedef struct _FoldersPageFolderViewManager FoldersPageFolderViewManager; typedef struct _FoldersPageFolderViewManagerClass FoldersPageFolderViewManagerClass; +enum { + FOLDERS_PAGE_0_PROPERTY, + FOLDERS_PAGE_NUM_PROPERTIES +}; +static GParamSpec* folders_page_properties[FOLDERS_PAGE_NUM_PROPERTIES]; #define _view_manager_unref0(var) ((var == NULL) ? NULL : (var = (view_manager_unref (var), NULL))) #define _g_free0(var) (var = (g_free (var), NULL)) @@ -569,9 +575,15 @@ GType page_window_get_type (void) G_GNUC_CONST; GType fullscreen_window_get_type (void) G_GNUC_CONST; gpointer injection_group_ref (gpointer instance); void injection_group_unref (gpointer instance); -GParamSpec* param_spec_injection_group (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags); -void value_set_injection_group (GValue* value, gpointer v_object); -void value_take_injection_group (GValue* value, gpointer v_object); +GParamSpec* param_spec_injection_group (const gchar* name, + const gchar* nick, + const gchar* blurb, + GType object_type, + GParamFlags flags); +void value_set_injection_group (GValue* value, + gpointer v_object); +void value_take_injection_group (GValue* value, + gpointer v_object); gpointer value_get_injection_group (const GValue* value); GType injection_group_get_type (void) G_GNUC_CONST; GType checkerboard_page_get_type (void) G_GNUC_CONST; @@ -585,17 +597,29 @@ CheckerboardPageKeyboardModifiers* checkerboard_page_keyboard_modifiers_dup (con void checkerboard_page_keyboard_modifiers_free (CheckerboardPageKeyboardModifiers* self); gpointer view_filter_ref (gpointer instance); void view_filter_unref (gpointer instance); -GParamSpec* param_spec_view_filter (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags); -void value_set_view_filter (GValue* value, gpointer v_object); -void value_take_view_filter (GValue* value, gpointer v_object); +GParamSpec* param_spec_view_filter (const gchar* name, + const gchar* nick, + const gchar* blurb, + GType object_type, + GParamFlags flags); +void value_set_view_filter (GValue* value, + gpointer v_object); +void value_take_view_filter (GValue* value, + gpointer v_object); gpointer value_get_view_filter (const GValue* value); GType view_filter_get_type (void) G_GNUC_CONST; GType search_view_filter_get_type (void) G_GNUC_CONST; gpointer core_tracker_ref (gpointer instance); void core_tracker_unref (gpointer instance); -GParamSpec* core_param_spec_tracker (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags); -void core_value_set_tracker (GValue* value, gpointer v_object); -void core_value_take_tracker (GValue* value, gpointer v_object); +GParamSpec* core_param_spec_tracker (const gchar* name, + const gchar* nick, + const gchar* blurb, + GType object_type, + GParamFlags flags); +void core_value_set_tracker (GValue* value, + gpointer v_object); +void core_value_take_tracker (GValue* value, + gpointer v_object); gpointer core_value_get_tracker (const GValue* value); GType core_tracker_get_type (void) G_GNUC_CONST; GType core_view_tracker_get_type (void) G_GNUC_CONST; @@ -607,27 +631,41 @@ GType collection_page_get_type (void) G_GNUC_CONST; GType folders_page_get_type (void) G_GNUC_CONST; gpointer view_manager_ref (gpointer instance); void view_manager_unref (gpointer instance); -GParamSpec* param_spec_view_manager (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags); -void value_set_view_manager (GValue* value, gpointer v_object); -void value_take_view_manager (GValue* value, gpointer v_object); +GParamSpec* param_spec_view_manager (const gchar* name, + const gchar* nick, + const gchar* blurb, + GType object_type, + GParamFlags flags); +void value_set_view_manager (GValue* value, + gpointer v_object); +void value_take_view_manager (GValue* value, + gpointer v_object); gpointer value_get_view_manager (const GValue* value); GType view_manager_get_type (void) G_GNUC_CONST; GType collection_view_manager_get_type (void) G_GNUC_CONST; static GType folders_page_folder_view_manager_get_type (void) G_GNUC_CONST G_GNUC_UNUSED; #define FOLDERS_PAGE_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), FOLDERS_TYPE_PAGE, FoldersPagePrivate)) -enum { - FOLDERS_PAGE_DUMMY_PROPERTY -}; FoldersPage* folders_page_new (GFile* dir); -FoldersPage* folders_page_construct (GType object_type, GFile* dir); -CollectionPage* collection_page_construct (GType object_type, const gchar* page_name); -static FoldersPageFolderViewManager* folders_page_folder_view_manager_new (FoldersPage* owner, GFile* dir); -static FoldersPageFolderViewManager* folders_page_folder_view_manager_construct (GType object_type, FoldersPage* owner, GFile* dir); +FoldersPage* folders_page_construct (GType object_type, + GFile* dir); +CollectionPage* collection_page_construct (GType object_type, + const gchar* page_name); +static FoldersPageFolderViewManager* folders_page_folder_view_manager_new (FoldersPage* owner, + GFile* dir); +static FoldersPageFolderViewManager* folders_page_folder_view_manager_construct (GType object_type, + FoldersPage* owner, + GFile* dir); 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); +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; @@ -635,9 +673,15 @@ GType database_source_collection_get_type (void) G_GNUC_CONST; GType media_source_collection_get_type (void) G_GNUC_CONST; gpointer media_collection_registry_ref (gpointer instance); void media_collection_registry_unref (gpointer instance); -GParamSpec* param_spec_media_collection_registry (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags); -void value_set_media_collection_registry (GValue* value, gpointer v_object); -void value_take_media_collection_registry (GValue* value, gpointer v_object); +GParamSpec* param_spec_media_collection_registry (const gchar* name, + const gchar* nick, + const gchar* blurb, + GType object_type, + GParamFlags flags); +void value_set_media_collection_registry (GValue* value, + gpointer v_object); +void value_take_media_collection_registry (GValue* value, + gpointer v_object); gpointer value_get_media_collection_registry (const GValue* value); GType media_collection_registry_get_type (void) G_GNUC_CONST; MediaCollectionRegistry* media_collection_registry_get_instance (void); @@ -646,32 +690,57 @@ GType view_collection_get_type (void) G_GNUC_CONST; ViewCollection* page_get_view (Page* 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); +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; gpointer view_collection_monitor_ref (gpointer instance); void view_collection_monitor_unref (gpointer instance); -GParamSpec* view_collection_param_spec_monitor (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags); -void view_collection_value_set_monitor (GValue* value, gpointer v_object); -void view_collection_value_take_monitor (GValue* value, gpointer v_object); +GParamSpec* view_collection_param_spec_monitor (const gchar* name, + const gchar* nick, + const gchar* blurb, + GType object_type, + GParamFlags flags); +void view_collection_value_set_monitor (GValue* value, + gpointer v_object); +void view_collection_value_take_monitor (GValue* value, + gpointer v_object); gpointer view_collection_value_get_monitor (const GValue* value); GType view_collection_monitor_get_type (void) G_GNUC_CONST; -ViewCollectionMonitor* view_collection_monitor_source_collection (ViewCollection* self, SourceCollection* sources, ViewManager* manager, Alteration* prereq, GeeCollection* initial, ProgressMonitor progress_monitor, void* progress_monitor_target); -static void folders_page_real_get_config_photos_sort (MediaPage* base, gboolean* sort_order, gint* sort_by); +ViewCollectionMonitor* view_collection_monitor_source_collection (ViewCollection* self, + SourceCollection* sources, + ViewManager* manager, + Alteration* prereq, + GeeCollection* initial, + ProgressMonitor progress_monitor, + void* progress_monitor_target); +static void folders_page_real_get_config_photos_sort (MediaPage* base, + gboolean* sort_order, + gint* sort_by); GType configuration_facade_get_type (void) G_GNUC_CONST; GType config_facade_get_type (void) G_GNUC_CONST; ConfigFacade* config_facade_get_instance (void); -void configuration_facade_get_library_photos_sort (ConfigurationFacade* self, gboolean* sort_order, gint* sort_by); -static void folders_page_real_set_config_photos_sort (MediaPage* base, gboolean sort_order, gint sort_by); -void configuration_facade_set_library_photos_sort (ConfigurationFacade* self, gboolean sort_order, gint sort_by); -enum { - FOLDERS_PAGE_FOLDER_VIEW_MANAGER_DUMMY_PROPERTY -}; +void configuration_facade_get_library_photos_sort (ConfigurationFacade* self, + gboolean* sort_order, + gint* sort_by); +static void folders_page_real_set_config_photos_sort (MediaPage* base, + gboolean sort_order, + gint sort_by); +void configuration_facade_set_library_photos_sort (ConfigurationFacade* self, + gboolean sort_order, + gint sort_by); CollectionViewManager* collection_view_manager_new (CollectionPage* page); -CollectionViewManager* collection_view_manager_construct (GType object_type, CollectionPage* page); -static gboolean folders_page_folder_view_manager_real_include_in_view (ViewManager* base, DataSource* source); +CollectionViewManager* collection_view_manager_construct (GType object_type, + CollectionPage* page); +static gboolean folders_page_folder_view_manager_real_include_in_view (ViewManager* base, + DataSource* source); GType thumbnail_source_get_type (void) G_GNUC_CONST; GType media_source_get_type (void) G_GNUC_CONST; GFile* media_source_get_file (MediaSource* self); @@ -679,128 +748,128 @@ static void folders_page_folder_view_manager_finalize (ViewManager * obj); static void folders_page_finalize (GObject * obj); -FoldersPage* folders_page_construct (GType object_type, GFile* dir) { +FoldersPage* +folders_page_construct (GType object_type, + GFile* dir) +{ FoldersPage * self = NULL; - GFile* _tmp0_; + gchar* _tmp0_; gchar* _tmp1_; - gchar* _tmp2_; - GFile* _tmp3_; - FoldersPageFolderViewManager* _tmp4_; + FoldersPageFolderViewManager* _tmp2_; #line 24 "/home/jens/Source/shotwell/src/folders/FoldersPage.vala" g_return_val_if_fail (G_IS_FILE (dir), NULL); #line 25 "/home/jens/Source/shotwell/src/folders/FoldersPage.vala" - _tmp0_ = dir; + _tmp0_ = g_file_get_path (dir); #line 25 "/home/jens/Source/shotwell/src/folders/FoldersPage.vala" - _tmp1_ = g_file_get_path (_tmp0_); -#line 25 "/home/jens/Source/shotwell/src/folders/FoldersPage.vala" - _tmp2_ = _tmp1_; + _tmp1_ = _tmp0_; #line 25 "/home/jens/Source/shotwell/src/folders/FoldersPage.vala" - self = (FoldersPage*) collection_page_construct (object_type, _tmp2_); + self = (FoldersPage*) collection_page_construct (object_type, _tmp1_); #line 25 "/home/jens/Source/shotwell/src/folders/FoldersPage.vala" - _g_free0 (_tmp2_); + _g_free0 (_tmp1_); #line 27 "/home/jens/Source/shotwell/src/folders/FoldersPage.vala" - _tmp3_ = dir; -#line 27 "/home/jens/Source/shotwell/src/folders/FoldersPage.vala" - _tmp4_ = folders_page_folder_view_manager_new (self, _tmp3_); + _tmp2_ = folders_page_folder_view_manager_new (self, dir); #line 27 "/home/jens/Source/shotwell/src/folders/FoldersPage.vala" _view_manager_unref0 (self->priv->view_manager); #line 27 "/home/jens/Source/shotwell/src/folders/FoldersPage.vala" - self->priv->view_manager = _tmp4_; -#line 710 "FoldersPage.c" + self->priv->view_manager = _tmp2_; +#line 776 "FoldersPage.c" { GeeIterator* _sources_it = NULL; - MediaCollectionRegistry* _tmp5_; - MediaCollectionRegistry* _tmp6_; - GeeCollection* _tmp7_; - GeeCollection* _tmp8_; - GeeIterator* _tmp9_; - GeeIterator* _tmp10_; + MediaCollectionRegistry* _tmp3_; + MediaCollectionRegistry* _tmp4_; + GeeCollection* _tmp5_; + GeeCollection* _tmp6_; + GeeIterator* _tmp7_; + GeeIterator* _tmp8_; #line 29 "/home/jens/Source/shotwell/src/folders/FoldersPage.vala" - _tmp5_ = media_collection_registry_get_instance (); + _tmp3_ = media_collection_registry_get_instance (); #line 29 "/home/jens/Source/shotwell/src/folders/FoldersPage.vala" - _tmp6_ = _tmp5_; + _tmp4_ = _tmp3_; #line 29 "/home/jens/Source/shotwell/src/folders/FoldersPage.vala" - _tmp7_ = media_collection_registry_get_all (_tmp6_); + _tmp5_ = media_collection_registry_get_all (_tmp4_); #line 29 "/home/jens/Source/shotwell/src/folders/FoldersPage.vala" - _tmp8_ = _tmp7_; + _tmp6_ = _tmp5_; #line 29 "/home/jens/Source/shotwell/src/folders/FoldersPage.vala" - _tmp9_ = gee_iterable_iterator (G_TYPE_CHECK_INSTANCE_CAST (_tmp8_, GEE_TYPE_ITERABLE, GeeIterable)); + _tmp7_ = gee_iterable_iterator (G_TYPE_CHECK_INSTANCE_CAST (_tmp6_, GEE_TYPE_ITERABLE, GeeIterable)); #line 29 "/home/jens/Source/shotwell/src/folders/FoldersPage.vala" - _tmp10_ = _tmp9_; + _tmp8_ = _tmp7_; #line 29 "/home/jens/Source/shotwell/src/folders/FoldersPage.vala" - _g_object_unref0 (_tmp8_); + _g_object_unref0 (_tmp6_); #line 29 "/home/jens/Source/shotwell/src/folders/FoldersPage.vala" - _media_collection_registry_unref0 (_tmp6_); + _media_collection_registry_unref0 (_tmp4_); #line 29 "/home/jens/Source/shotwell/src/folders/FoldersPage.vala" - _sources_it = _tmp10_; + _sources_it = _tmp8_; #line 29 "/home/jens/Source/shotwell/src/folders/FoldersPage.vala" while (TRUE) { -#line 739 "FoldersPage.c" - GeeIterator* _tmp11_; - gboolean _tmp12_; +#line 805 "FoldersPage.c" + GeeIterator* _tmp9_; MediaSourceCollection* sources = NULL; - GeeIterator* _tmp13_; - gpointer _tmp14_; - ViewCollection* _tmp15_; - ViewCollection* _tmp16_; - MediaSourceCollection* _tmp17_; - FoldersPageFolderViewManager* _tmp18_; - ViewCollectionMonitor* _tmp19_; - ViewCollectionMonitor* _tmp20_; + GeeIterator* _tmp10_; + gpointer _tmp11_; + ViewCollection* _tmp12_; + ViewCollection* _tmp13_; + MediaSourceCollection* _tmp14_; + FoldersPageFolderViewManager* _tmp15_; + ViewCollectionMonitor* _tmp16_; + ViewCollectionMonitor* _tmp17_; #line 29 "/home/jens/Source/shotwell/src/folders/FoldersPage.vala" - _tmp11_ = _sources_it; + _tmp9_ = _sources_it; #line 29 "/home/jens/Source/shotwell/src/folders/FoldersPage.vala" - _tmp12_ = gee_iterator_next (_tmp11_); -#line 29 "/home/jens/Source/shotwell/src/folders/FoldersPage.vala" - if (!_tmp12_) { + if (!gee_iterator_next (_tmp9_)) { #line 29 "/home/jens/Source/shotwell/src/folders/FoldersPage.vala" break; -#line 759 "FoldersPage.c" +#line 822 "FoldersPage.c" } #line 29 "/home/jens/Source/shotwell/src/folders/FoldersPage.vala" - _tmp13_ = _sources_it; + _tmp10_ = _sources_it; #line 29 "/home/jens/Source/shotwell/src/folders/FoldersPage.vala" - _tmp14_ = gee_iterator_get (_tmp13_); + _tmp11_ = gee_iterator_get (_tmp10_); #line 29 "/home/jens/Source/shotwell/src/folders/FoldersPage.vala" - sources = (MediaSourceCollection*) _tmp14_; + sources = (MediaSourceCollection*) _tmp11_; #line 30 "/home/jens/Source/shotwell/src/folders/FoldersPage.vala" - _tmp15_ = page_get_view (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_PAGE, Page)); + _tmp12_ = page_get_view (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_PAGE, Page)); #line 30 "/home/jens/Source/shotwell/src/folders/FoldersPage.vala" - _tmp16_ = _tmp15_; + _tmp13_ = _tmp12_; #line 30 "/home/jens/Source/shotwell/src/folders/FoldersPage.vala" - _tmp17_ = sources; + _tmp14_ = sources; #line 30 "/home/jens/Source/shotwell/src/folders/FoldersPage.vala" - _tmp18_ = self->priv->view_manager; + _tmp15_ = self->priv->view_manager; #line 30 "/home/jens/Source/shotwell/src/folders/FoldersPage.vala" - _tmp19_ = view_collection_monitor_source_collection (_tmp16_, G_TYPE_CHECK_INSTANCE_CAST (_tmp17_, TYPE_SOURCE_COLLECTION, SourceCollection), G_TYPE_CHECK_INSTANCE_CAST (_tmp18_, TYPE_VIEW_MANAGER, ViewManager), NULL, NULL, NULL, NULL); + _tmp16_ = view_collection_monitor_source_collection (_tmp13_, G_TYPE_CHECK_INSTANCE_CAST (_tmp14_, TYPE_SOURCE_COLLECTION, SourceCollection), G_TYPE_CHECK_INSTANCE_CAST (_tmp15_, TYPE_VIEW_MANAGER, ViewManager), NULL, NULL, NULL, NULL); #line 30 "/home/jens/Source/shotwell/src/folders/FoldersPage.vala" - _tmp20_ = _tmp19_; + _tmp17_ = _tmp16_; #line 30 "/home/jens/Source/shotwell/src/folders/FoldersPage.vala" - _view_collection_monitor_unref0 (_tmp20_); + _view_collection_monitor_unref0 (_tmp17_); #line 30 "/home/jens/Source/shotwell/src/folders/FoldersPage.vala" - _data_collection_unref0 (_tmp16_); + _data_collection_unref0 (_tmp13_); #line 29 "/home/jens/Source/shotwell/src/folders/FoldersPage.vala" _data_collection_unref0 (sources); -#line 785 "FoldersPage.c" +#line 848 "FoldersPage.c" } #line 29 "/home/jens/Source/shotwell/src/folders/FoldersPage.vala" _g_object_unref0 (_sources_it); -#line 789 "FoldersPage.c" +#line 852 "FoldersPage.c" } #line 24 "/home/jens/Source/shotwell/src/folders/FoldersPage.vala" return self; -#line 793 "FoldersPage.c" +#line 856 "FoldersPage.c" } -FoldersPage* folders_page_new (GFile* dir) { +FoldersPage* +folders_page_new (GFile* dir) +{ #line 24 "/home/jens/Source/shotwell/src/folders/FoldersPage.vala" return folders_page_construct (FOLDERS_TYPE_PAGE, dir); -#line 800 "FoldersPage.c" +#line 865 "FoldersPage.c" } -static void folders_page_real_get_config_photos_sort (MediaPage* base, gboolean* sort_order, gint* sort_by) { +static void +folders_page_real_get_config_photos_sort (MediaPage* base, + gboolean* sort_order, + gint* sort_by) +{ FoldersPage * self; gboolean _vala_sort_order = FALSE; gint _vala_sort_by = 0; @@ -826,23 +895,25 @@ static void folders_page_real_get_config_photos_sort (MediaPage* base, gboolean* if (sort_order) { #line 33 "/home/jens/Source/shotwell/src/folders/FoldersPage.vala" *sort_order = _vala_sort_order; -#line 830 "FoldersPage.c" +#line 899 "FoldersPage.c" } #line 33 "/home/jens/Source/shotwell/src/folders/FoldersPage.vala" if (sort_by) { #line 33 "/home/jens/Source/shotwell/src/folders/FoldersPage.vala" *sort_by = _vala_sort_by; -#line 836 "FoldersPage.c" +#line 905 "FoldersPage.c" } } -static void folders_page_real_set_config_photos_sort (MediaPage* base, gboolean sort_order, gint sort_by) { +static void +folders_page_real_set_config_photos_sort (MediaPage* base, + gboolean sort_order, + gint sort_by) +{ FoldersPage * self; ConfigFacade* _tmp0_; ConfigFacade* _tmp1_; - gboolean _tmp2_; - gint _tmp3_; #line 37 "/home/jens/Source/shotwell/src/folders/FoldersPage.vala" self = G_TYPE_CHECK_INSTANCE_CAST (base, FOLDERS_TYPE_PAGE, FoldersPage); #line 38 "/home/jens/Source/shotwell/src/folders/FoldersPage.vala" @@ -850,109 +921,111 @@ static void folders_page_real_set_config_photos_sort (MediaPage* base, gboolean #line 38 "/home/jens/Source/shotwell/src/folders/FoldersPage.vala" _tmp1_ = _tmp0_; #line 38 "/home/jens/Source/shotwell/src/folders/FoldersPage.vala" - _tmp2_ = sort_order; -#line 38 "/home/jens/Source/shotwell/src/folders/FoldersPage.vala" - _tmp3_ = sort_by; -#line 38 "/home/jens/Source/shotwell/src/folders/FoldersPage.vala" - configuration_facade_set_library_photos_sort (G_TYPE_CHECK_INSTANCE_CAST (_tmp1_, TYPE_CONFIGURATION_FACADE, ConfigurationFacade), _tmp2_, _tmp3_); + configuration_facade_set_library_photos_sort (G_TYPE_CHECK_INSTANCE_CAST (_tmp1_, TYPE_CONFIGURATION_FACADE, ConfigurationFacade), sort_order, sort_by); #line 38 "/home/jens/Source/shotwell/src/folders/FoldersPage.vala" _g_object_unref0 (_tmp1_); -#line 861 "FoldersPage.c" +#line 928 "FoldersPage.c" } -static gpointer _g_object_ref0 (gpointer self) { +static gpointer +_g_object_ref0 (gpointer self) +{ #line 14 "/home/jens/Source/shotwell/src/folders/FoldersPage.vala" return self ? g_object_ref (self) : NULL; -#line 868 "FoldersPage.c" +#line 937 "FoldersPage.c" } -static FoldersPageFolderViewManager* folders_page_folder_view_manager_construct (GType object_type, FoldersPage* owner, GFile* dir) { +static FoldersPageFolderViewManager* +folders_page_folder_view_manager_construct (GType object_type, + FoldersPage* owner, + GFile* dir) +{ FoldersPageFolderViewManager* self = NULL; - FoldersPage* _tmp0_; - GFile* _tmp1_; - GFile* _tmp2_; + GFile* _tmp0_; #line 11 "/home/jens/Source/shotwell/src/folders/FoldersPage.vala" g_return_val_if_fail (FOLDERS_IS_PAGE (owner), NULL); #line 11 "/home/jens/Source/shotwell/src/folders/FoldersPage.vala" g_return_val_if_fail (G_IS_FILE (dir), NULL); #line 12 "/home/jens/Source/shotwell/src/folders/FoldersPage.vala" - _tmp0_ = owner; -#line 12 "/home/jens/Source/shotwell/src/folders/FoldersPage.vala" - self = (FoldersPageFolderViewManager*) collection_view_manager_construct (object_type, G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, TYPE_COLLECTION_PAGE, CollectionPage)); + self = (FoldersPageFolderViewManager*) collection_view_manager_construct (object_type, G_TYPE_CHECK_INSTANCE_CAST (owner, TYPE_COLLECTION_PAGE, CollectionPage)); #line 14 "/home/jens/Source/shotwell/src/folders/FoldersPage.vala" - _tmp1_ = dir; -#line 14 "/home/jens/Source/shotwell/src/folders/FoldersPage.vala" - _tmp2_ = _g_object_ref0 (_tmp1_); + _tmp0_ = _g_object_ref0 (dir); #line 14 "/home/jens/Source/shotwell/src/folders/FoldersPage.vala" _g_object_unref0 (self->dir); #line 14 "/home/jens/Source/shotwell/src/folders/FoldersPage.vala" - self->dir = _tmp2_; + self->dir = _tmp0_; #line 11 "/home/jens/Source/shotwell/src/folders/FoldersPage.vala" return self; -#line 895 "FoldersPage.c" +#line 962 "FoldersPage.c" } -static FoldersPageFolderViewManager* folders_page_folder_view_manager_new (FoldersPage* owner, GFile* dir) { +static FoldersPageFolderViewManager* +folders_page_folder_view_manager_new (FoldersPage* owner, + GFile* dir) +{ #line 11 "/home/jens/Source/shotwell/src/folders/FoldersPage.vala" return folders_page_folder_view_manager_construct (FOLDERS_PAGE_TYPE_FOLDER_VIEW_MANAGER, owner, dir); -#line 902 "FoldersPage.c" +#line 972 "FoldersPage.c" } -static gboolean folders_page_folder_view_manager_real_include_in_view (ViewManager* base, DataSource* source) { +static gboolean +folders_page_folder_view_manager_real_include_in_view (ViewManager* base, + DataSource* source) +{ FoldersPageFolderViewManager * self; gboolean result = FALSE; - DataSource* _tmp0_; + GFile* _tmp0_; GFile* _tmp1_; GFile* _tmp2_; - GFile* _tmp3_; - gboolean _tmp4_; - gboolean _tmp5_; + gboolean _tmp3_; #line 17 "/home/jens/Source/shotwell/src/folders/FoldersPage.vala" self = G_TYPE_CHECK_INSTANCE_CAST (base, FOLDERS_PAGE_TYPE_FOLDER_VIEW_MANAGER, FoldersPageFolderViewManager); #line 17 "/home/jens/Source/shotwell/src/folders/FoldersPage.vala" g_return_val_if_fail (IS_DATA_SOURCE (source), FALSE); #line 18 "/home/jens/Source/shotwell/src/folders/FoldersPage.vala" - _tmp0_ = source; -#line 18 "/home/jens/Source/shotwell/src/folders/FoldersPage.vala" - _tmp1_ = media_source_get_file (G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, TYPE_MEDIA_SOURCE, MediaSource)); -#line 18 "/home/jens/Source/shotwell/src/folders/FoldersPage.vala" - _tmp2_ = _tmp1_; + _tmp0_ = media_source_get_file (G_TYPE_CHECK_INSTANCE_CAST (source, TYPE_MEDIA_SOURCE, MediaSource)); #line 18 "/home/jens/Source/shotwell/src/folders/FoldersPage.vala" - _tmp3_ = self->dir; + _tmp1_ = _tmp0_; #line 18 "/home/jens/Source/shotwell/src/folders/FoldersPage.vala" - _tmp4_ = g_file_has_prefix (_tmp2_, _tmp3_); + _tmp2_ = self->dir; #line 18 "/home/jens/Source/shotwell/src/folders/FoldersPage.vala" - _tmp5_ = _tmp4_; + _tmp3_ = g_file_has_prefix (_tmp1_, _tmp2_); #line 18 "/home/jens/Source/shotwell/src/folders/FoldersPage.vala" - _g_object_unref0 (_tmp2_); + _g_object_unref0 (_tmp1_); #line 18 "/home/jens/Source/shotwell/src/folders/FoldersPage.vala" - result = _tmp5_; + result = _tmp3_; #line 18 "/home/jens/Source/shotwell/src/folders/FoldersPage.vala" return result; -#line 937 "FoldersPage.c" +#line 1004 "FoldersPage.c" } -static void folders_page_folder_view_manager_class_init (FoldersPageFolderViewManagerClass * klass) { +static void +folders_page_folder_view_manager_class_init (FoldersPageFolderViewManagerClass * klass) +{ #line 8 "/home/jens/Source/shotwell/src/folders/FoldersPage.vala" folders_page_folder_view_manager_parent_class = g_type_class_peek_parent (klass); #line 8 "/home/jens/Source/shotwell/src/folders/FoldersPage.vala" ((ViewManagerClass *) klass)->finalize = folders_page_folder_view_manager_finalize; #line 8 "/home/jens/Source/shotwell/src/folders/FoldersPage.vala" ((ViewManagerClass *) klass)->include_in_view = (gboolean (*) (ViewManager *, DataSource*)) folders_page_folder_view_manager_real_include_in_view; -#line 948 "FoldersPage.c" +#line 1017 "FoldersPage.c" } -static void folders_page_folder_view_manager_instance_init (FoldersPageFolderViewManager * self) { +static void +folders_page_folder_view_manager_instance_init (FoldersPageFolderViewManager * self) +{ } -static void folders_page_folder_view_manager_finalize (ViewManager * obj) { +static void +folders_page_folder_view_manager_finalize (ViewManager * obj) +{ FoldersPageFolderViewManager * self; #line 8 "/home/jens/Source/shotwell/src/folders/FoldersPage.vala" self = G_TYPE_CHECK_INSTANCE_CAST (obj, FOLDERS_PAGE_TYPE_FOLDER_VIEW_MANAGER, FoldersPageFolderViewManager); @@ -960,11 +1033,13 @@ static void folders_page_folder_view_manager_finalize (ViewManager * obj) { _g_object_unref0 (self->dir); #line 8 "/home/jens/Source/shotwell/src/folders/FoldersPage.vala" VIEW_MANAGER_CLASS (folders_page_folder_view_manager_parent_class)->finalize (obj); -#line 964 "FoldersPage.c" +#line 1037 "FoldersPage.c" } -static GType folders_page_folder_view_manager_get_type (void) { +static GType +folders_page_folder_view_manager_get_type (void) +{ static volatile gsize folders_page_folder_view_manager_type_id__volatile = 0; if (g_once_init_enter (&folders_page_folder_view_manager_type_id__volatile)) { static const GTypeInfo g_define_type_info = { sizeof (FoldersPageFolderViewManagerClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) folders_page_folder_view_manager_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (FoldersPageFolderViewManager), 0, (GInstanceInitFunc) folders_page_folder_view_manager_instance_init, NULL }; @@ -976,7 +1051,9 @@ static GType folders_page_folder_view_manager_get_type (void) { } -static void folders_page_class_init (FoldersPageClass * klass) { +static void +folders_page_class_init (FoldersPageClass * klass) +{ #line 7 "/home/jens/Source/shotwell/src/folders/FoldersPage.vala" folders_page_parent_class = g_type_class_peek_parent (klass); #line 7 "/home/jens/Source/shotwell/src/folders/FoldersPage.vala" @@ -987,18 +1064,22 @@ static void folders_page_class_init (FoldersPageClass * klass) { ((MediaPageClass *) klass)->set_config_photos_sort = (void (*) (MediaPage *, gboolean, gint)) folders_page_real_set_config_photos_sort; #line 7 "/home/jens/Source/shotwell/src/folders/FoldersPage.vala" G_OBJECT_CLASS (klass)->finalize = folders_page_finalize; -#line 991 "FoldersPage.c" +#line 1068 "FoldersPage.c" } -static void folders_page_instance_init (FoldersPage * self) { +static void +folders_page_instance_init (FoldersPage * self) +{ #line 7 "/home/jens/Source/shotwell/src/folders/FoldersPage.vala" self->priv = FOLDERS_PAGE_GET_PRIVATE (self); -#line 998 "FoldersPage.c" +#line 1077 "FoldersPage.c" } -static void folders_page_finalize (GObject * obj) { +static void +folders_page_finalize (GObject * obj) +{ FoldersPage * self; #line 7 "/home/jens/Source/shotwell/src/folders/FoldersPage.vala" self = G_TYPE_CHECK_INSTANCE_CAST (obj, FOLDERS_TYPE_PAGE, FoldersPage); @@ -1006,11 +1087,13 @@ static void folders_page_finalize (GObject * obj) { _view_manager_unref0 (self->priv->view_manager); #line 7 "/home/jens/Source/shotwell/src/folders/FoldersPage.vala" G_OBJECT_CLASS (folders_page_parent_class)->finalize (obj); -#line 1010 "FoldersPage.c" +#line 1091 "FoldersPage.c" } -GType folders_page_get_type (void) { +GType +folders_page_get_type (void) +{ static volatile gsize folders_page_type_id__volatile = 0; if (g_once_init_enter (&folders_page_type_id__volatile)) { static const GTypeInfo g_define_type_info = { sizeof (FoldersPageClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) folders_page_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (FoldersPage), 0, (GInstanceInitFunc) folders_page_instance_init, NULL }; -- cgit v1.2.3