diff options
Diffstat (limited to 'src/library/LastImportSidebarEntry.c')
-rw-r--r-- | src/library/LastImportSidebarEntry.c | 610 |
1 files changed, 610 insertions, 0 deletions
diff --git a/src/library/LastImportSidebarEntry.c b/src/library/LastImportSidebarEntry.c new file mode 100644 index 0000000..bdf6b91 --- /dev/null +++ b/src/library/LastImportSidebarEntry.c @@ -0,0 +1,610 @@ +/* LastImportSidebarEntry.c generated by valac 0.32.1, the Vala compiler + * generated from LastImportSidebarEntry.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 <glib.h> +#include <glib-object.h> +#include <stdlib.h> +#include <string.h> +#include <gtk/gtk.h> +#include <gdk/gdk.h> +#include <gee.h> +#include <glib/gi18n-lib.h> + + +#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_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; + +#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; +typedef struct _SidebarSimplePageEntryPrivate SidebarSimplePageEntryPrivate; + +#define LIBRARY_TYPE_HIDEABLE_PAGE_ENTRY (library_hideable_page_entry_get_type ()) +#define LIBRARY_HIDEABLE_PAGE_ENTRY(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), LIBRARY_TYPE_HIDEABLE_PAGE_ENTRY, LibraryHideablePageEntry)) +#define LIBRARY_HIDEABLE_PAGE_ENTRY_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), LIBRARY_TYPE_HIDEABLE_PAGE_ENTRY, LibraryHideablePageEntryClass)) +#define LIBRARY_IS_HIDEABLE_PAGE_ENTRY(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), LIBRARY_TYPE_HIDEABLE_PAGE_ENTRY)) +#define LIBRARY_IS_HIDEABLE_PAGE_ENTRY_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), LIBRARY_TYPE_HIDEABLE_PAGE_ENTRY)) +#define LIBRARY_HIDEABLE_PAGE_ENTRY_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), LIBRARY_TYPE_HIDEABLE_PAGE_ENTRY, LibraryHideablePageEntryClass)) + +typedef struct _LibraryHideablePageEntry LibraryHideablePageEntry; +typedef struct _LibraryHideablePageEntryClass LibraryHideablePageEntryClass; +typedef struct _LibraryHideablePageEntryPrivate LibraryHideablePageEntryPrivate; + +#define LIBRARY_TYPE_LAST_IMPORT_SIDEBAR_ENTRY (library_last_import_sidebar_entry_get_type ()) +#define LIBRARY_LAST_IMPORT_SIDEBAR_ENTRY(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), LIBRARY_TYPE_LAST_IMPORT_SIDEBAR_ENTRY, LibraryLastImportSidebarEntry)) +#define LIBRARY_LAST_IMPORT_SIDEBAR_ENTRY_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), LIBRARY_TYPE_LAST_IMPORT_SIDEBAR_ENTRY, LibraryLastImportSidebarEntryClass)) +#define LIBRARY_IS_LAST_IMPORT_SIDEBAR_ENTRY(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), LIBRARY_TYPE_LAST_IMPORT_SIDEBAR_ENTRY)) +#define LIBRARY_IS_LAST_IMPORT_SIDEBAR_ENTRY_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), LIBRARY_TYPE_LAST_IMPORT_SIDEBAR_ENTRY)) +#define LIBRARY_LAST_IMPORT_SIDEBAR_ENTRY_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), LIBRARY_TYPE_LAST_IMPORT_SIDEBAR_ENTRY, LibraryLastImportSidebarEntryClass)) + +typedef struct _LibraryLastImportSidebarEntry LibraryLastImportSidebarEntry; +typedef struct _LibraryLastImportSidebarEntryClass LibraryLastImportSidebarEntryClass; +typedef struct _LibraryLastImportSidebarEntryPrivate LibraryLastImportSidebarEntryPrivate; + +#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 _data_collection_unref0(var) ((var == NULL) ? NULL : (var = (data_collection_unref (var), NULL))) + +#define TYPE_IMPORT_ID (import_id_get_type ()) +typedef struct _ImportID ImportID; +#define _import_id_free0(var) ((var == NULL) ? NULL : (var = (import_id_free (var), NULL))) + +#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 TYPE_LAST_IMPORT_PAGE (last_import_page_get_type ()) +#define LAST_IMPORT_PAGE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_LAST_IMPORT_PAGE, LastImportPage)) +#define LAST_IMPORT_PAGE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_LAST_IMPORT_PAGE, LastImportPageClass)) +#define IS_LAST_IMPORT_PAGE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_LAST_IMPORT_PAGE)) +#define IS_LAST_IMPORT_PAGE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_LAST_IMPORT_PAGE)) +#define LAST_IMPORT_PAGE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_LAST_IMPORT_PAGE, LastImportPageClass)) + +typedef struct _LastImportPage LastImportPage; +typedef struct _LastImportPageClass LastImportPageClass; + +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); +}; + +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 _LibraryHideablePageEntry { + SidebarSimplePageEntry parent_instance; + LibraryHideablePageEntryPrivate * priv; +}; + +struct _LibraryHideablePageEntryClass { + SidebarSimplePageEntryClass parent_class; +}; + +struct _LibraryLastImportSidebarEntry { + LibraryHideablePageEntry parent_instance; + LibraryLastImportSidebarEntryPrivate * priv; +}; + +struct _LibraryLastImportSidebarEntryClass { + LibraryHideablePageEntryClass parent_class; +}; + +struct _ImportID { + gint64 id; +}; + + +static gpointer library_last_import_sidebar_entry_parent_class = NULL; + +GType sidebar_tree_get_type (void) G_GNUC_CONST; +GType sidebar_entry_get_type (void) G_GNUC_CONST; +GType sidebar_selectable_entry_get_type (void) G_GNUC_CONST; +GType page_get_type (void) G_GNUC_CONST; +GType sidebar_page_representative_get_type (void) G_GNUC_CONST; +GType sidebar_contextable_get_type (void) G_GNUC_CONST; +GType sidebar_simple_page_entry_get_type (void) G_GNUC_CONST; +GType library_hideable_page_entry_get_type (void) G_GNUC_CONST; +GType library_last_import_sidebar_entry_get_type (void) G_GNUC_CONST; +enum { + LIBRARY_LAST_IMPORT_SIDEBAR_ENTRY_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); +static void library_last_import_sidebar_entry_on_import_rolls_altered (LibraryLastImportSidebarEntry* self); +static void _library_last_import_sidebar_entry_on_import_rolls_altered_media_source_collection_import_roll_altered (MediaSourceCollection* _sender, gpointer self); +LibraryLastImportSidebarEntry* library_last_import_sidebar_entry_new (void); +LibraryLastImportSidebarEntry* library_last_import_sidebar_entry_construct (GType object_type); +LibraryHideablePageEntry* library_hideable_page_entry_construct (GType object_type); +GType import_id_get_type (void) G_GNUC_CONST; +ImportID* import_id_dup (const ImportID* self); +void import_id_free (ImportID* self); +ImportID* media_collection_registry_get_last_import_id (MediaCollectionRegistry* self); +void library_hideable_page_entry_set_visible (LibraryHideablePageEntry* self, gboolean value); +static gchar* library_last_import_sidebar_entry_real_get_sidebar_name (SidebarSimplePageEntry* base); +#define LAST_IMPORT_PAGE_NAME _ ("Last Import") +static gchar* library_last_import_sidebar_entry_real_get_sidebar_icon (SidebarSimplePageEntry* base); +#define RESOURCES_ICON_LAST_IMPORT "document-open-recent" +static Page* library_last_import_sidebar_entry_real_create_page (SidebarSimplePageEntry* base); +LastImportPage* last_import_page_new (void); +LastImportPage* last_import_page_construct (GType object_type); +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 last_import_page_get_type (void) G_GNUC_CONST; +static void library_last_import_sidebar_entry_finalize (GObject* obj); + + +static void _library_last_import_sidebar_entry_on_import_rolls_altered_media_source_collection_import_roll_altered (MediaSourceCollection* _sender, gpointer self) { +#line 17 "/home/jens/Source/shotwell/src/library/LastImportSidebarEntry.vala" + library_last_import_sidebar_entry_on_import_rolls_altered ((LibraryLastImportSidebarEntry*) self); +#line 325 "LastImportSidebarEntry.c" +} + + +LibraryLastImportSidebarEntry* library_last_import_sidebar_entry_construct (GType object_type) { + LibraryLastImportSidebarEntry * self = NULL; + MediaCollectionRegistry* _tmp11_ = NULL; + MediaCollectionRegistry* _tmp12_ = NULL; + ImportID* _tmp13_ = NULL; + ImportID* _tmp14_ = NULL; +#line 8 "/home/jens/Source/shotwell/src/library/LastImportSidebarEntry.vala" + self = (LibraryLastImportSidebarEntry*) library_hideable_page_entry_construct (object_type); +#line 337 "LastImportSidebarEntry.c" + { + GeeIterator* _media_sources_it = NULL; + MediaCollectionRegistry* _tmp0_ = NULL; + MediaCollectionRegistry* _tmp1_ = NULL; + GeeCollection* _tmp2_ = NULL; + GeeCollection* _tmp3_ = NULL; + GeeIterator* _tmp4_ = NULL; + GeeIterator* _tmp5_ = NULL; +#line 9 "/home/jens/Source/shotwell/src/library/LastImportSidebarEntry.vala" + _tmp0_ = media_collection_registry_get_instance (); +#line 9 "/home/jens/Source/shotwell/src/library/LastImportSidebarEntry.vala" + _tmp1_ = _tmp0_; +#line 9 "/home/jens/Source/shotwell/src/library/LastImportSidebarEntry.vala" + _tmp2_ = media_collection_registry_get_all (_tmp1_); +#line 9 "/home/jens/Source/shotwell/src/library/LastImportSidebarEntry.vala" + _tmp3_ = _tmp2_; +#line 9 "/home/jens/Source/shotwell/src/library/LastImportSidebarEntry.vala" + _tmp4_ = gee_iterable_iterator (G_TYPE_CHECK_INSTANCE_CAST (_tmp3_, GEE_TYPE_ITERABLE, GeeIterable)); +#line 9 "/home/jens/Source/shotwell/src/library/LastImportSidebarEntry.vala" + _tmp5_ = _tmp4_; +#line 9 "/home/jens/Source/shotwell/src/library/LastImportSidebarEntry.vala" + _g_object_unref0 (_tmp3_); +#line 9 "/home/jens/Source/shotwell/src/library/LastImportSidebarEntry.vala" + _media_collection_registry_unref0 (_tmp1_); +#line 9 "/home/jens/Source/shotwell/src/library/LastImportSidebarEntry.vala" + _media_sources_it = _tmp5_; +#line 9 "/home/jens/Source/shotwell/src/library/LastImportSidebarEntry.vala" + while (TRUE) { +#line 366 "LastImportSidebarEntry.c" + GeeIterator* _tmp6_ = NULL; + gboolean _tmp7_ = FALSE; + MediaSourceCollection* media_sources = NULL; + GeeIterator* _tmp8_ = NULL; + gpointer _tmp9_ = NULL; + MediaSourceCollection* _tmp10_ = NULL; +#line 9 "/home/jens/Source/shotwell/src/library/LastImportSidebarEntry.vala" + _tmp6_ = _media_sources_it; +#line 9 "/home/jens/Source/shotwell/src/library/LastImportSidebarEntry.vala" + _tmp7_ = gee_iterator_next (_tmp6_); +#line 9 "/home/jens/Source/shotwell/src/library/LastImportSidebarEntry.vala" + if (!_tmp7_) { +#line 9 "/home/jens/Source/shotwell/src/library/LastImportSidebarEntry.vala" + break; +#line 381 "LastImportSidebarEntry.c" + } +#line 9 "/home/jens/Source/shotwell/src/library/LastImportSidebarEntry.vala" + _tmp8_ = _media_sources_it; +#line 9 "/home/jens/Source/shotwell/src/library/LastImportSidebarEntry.vala" + _tmp9_ = gee_iterator_get (_tmp8_); +#line 9 "/home/jens/Source/shotwell/src/library/LastImportSidebarEntry.vala" + media_sources = (MediaSourceCollection*) _tmp9_; +#line 10 "/home/jens/Source/shotwell/src/library/LastImportSidebarEntry.vala" + _tmp10_ = media_sources; +#line 10 "/home/jens/Source/shotwell/src/library/LastImportSidebarEntry.vala" + g_signal_connect_object (_tmp10_, "import-roll-altered", (GCallback) _library_last_import_sidebar_entry_on_import_rolls_altered_media_source_collection_import_roll_altered, self, 0); +#line 9 "/home/jens/Source/shotwell/src/library/LastImportSidebarEntry.vala" + _data_collection_unref0 (media_sources); +#line 395 "LastImportSidebarEntry.c" + } +#line 9 "/home/jens/Source/shotwell/src/library/LastImportSidebarEntry.vala" + _g_object_unref0 (_media_sources_it); +#line 399 "LastImportSidebarEntry.c" + } +#line 12 "/home/jens/Source/shotwell/src/library/LastImportSidebarEntry.vala" + _tmp11_ = media_collection_registry_get_instance (); +#line 12 "/home/jens/Source/shotwell/src/library/LastImportSidebarEntry.vala" + _tmp12_ = _tmp11_; +#line 12 "/home/jens/Source/shotwell/src/library/LastImportSidebarEntry.vala" + _tmp13_ = media_collection_registry_get_last_import_id (_tmp12_); +#line 12 "/home/jens/Source/shotwell/src/library/LastImportSidebarEntry.vala" + _tmp14_ = _tmp13_; +#line 12 "/home/jens/Source/shotwell/src/library/LastImportSidebarEntry.vala" + library_hideable_page_entry_set_visible (G_TYPE_CHECK_INSTANCE_CAST (self, LIBRARY_TYPE_HIDEABLE_PAGE_ENTRY, LibraryHideablePageEntry), _tmp14_ != NULL); +#line 12 "/home/jens/Source/shotwell/src/library/LastImportSidebarEntry.vala" + _import_id_free0 (_tmp14_); +#line 12 "/home/jens/Source/shotwell/src/library/LastImportSidebarEntry.vala" + _media_collection_registry_unref0 (_tmp12_); +#line 8 "/home/jens/Source/shotwell/src/library/LastImportSidebarEntry.vala" + return self; +#line 417 "LastImportSidebarEntry.c" +} + + +LibraryLastImportSidebarEntry* library_last_import_sidebar_entry_new (void) { +#line 8 "/home/jens/Source/shotwell/src/library/LastImportSidebarEntry.vala" + return library_last_import_sidebar_entry_construct (LIBRARY_TYPE_LAST_IMPORT_SIDEBAR_ENTRY); +#line 424 "LastImportSidebarEntry.c" +} + + +static gchar* library_last_import_sidebar_entry_real_get_sidebar_name (SidebarSimplePageEntry* base) { + LibraryLastImportSidebarEntry * self; + gchar* result = NULL; + gchar* _tmp0_ = NULL; +#line 20 "/home/jens/Source/shotwell/src/library/LastImportSidebarEntry.vala" + self = G_TYPE_CHECK_INSTANCE_CAST (base, LIBRARY_TYPE_LAST_IMPORT_SIDEBAR_ENTRY, LibraryLastImportSidebarEntry); +#line 21 "/home/jens/Source/shotwell/src/library/LastImportSidebarEntry.vala" + _tmp0_ = g_strdup (LAST_IMPORT_PAGE_NAME); +#line 21 "/home/jens/Source/shotwell/src/library/LastImportSidebarEntry.vala" + result = _tmp0_; +#line 21 "/home/jens/Source/shotwell/src/library/LastImportSidebarEntry.vala" + return result; +#line 440 "LastImportSidebarEntry.c" +} + + +static gchar* library_last_import_sidebar_entry_real_get_sidebar_icon (SidebarSimplePageEntry* base) { + LibraryLastImportSidebarEntry * self; + gchar* result = NULL; + gchar* _tmp0_ = NULL; +#line 24 "/home/jens/Source/shotwell/src/library/LastImportSidebarEntry.vala" + self = G_TYPE_CHECK_INSTANCE_CAST (base, LIBRARY_TYPE_LAST_IMPORT_SIDEBAR_ENTRY, LibraryLastImportSidebarEntry); +#line 25 "/home/jens/Source/shotwell/src/library/LastImportSidebarEntry.vala" + _tmp0_ = g_strdup (RESOURCES_ICON_LAST_IMPORT); +#line 25 "/home/jens/Source/shotwell/src/library/LastImportSidebarEntry.vala" + result = _tmp0_; +#line 25 "/home/jens/Source/shotwell/src/library/LastImportSidebarEntry.vala" + return result; +#line 456 "LastImportSidebarEntry.c" +} + + +static Page* library_last_import_sidebar_entry_real_create_page (SidebarSimplePageEntry* base) { + LibraryLastImportSidebarEntry * self; + Page* result = NULL; + LastImportPage* _tmp0_ = NULL; +#line 28 "/home/jens/Source/shotwell/src/library/LastImportSidebarEntry.vala" + self = G_TYPE_CHECK_INSTANCE_CAST (base, LIBRARY_TYPE_LAST_IMPORT_SIDEBAR_ENTRY, LibraryLastImportSidebarEntry); +#line 29 "/home/jens/Source/shotwell/src/library/LastImportSidebarEntry.vala" + _tmp0_ = last_import_page_new (); +#line 29 "/home/jens/Source/shotwell/src/library/LastImportSidebarEntry.vala" + g_object_ref_sink (_tmp0_); +#line 29 "/home/jens/Source/shotwell/src/library/LastImportSidebarEntry.vala" + result = G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, TYPE_PAGE, Page); +#line 29 "/home/jens/Source/shotwell/src/library/LastImportSidebarEntry.vala" + return result; +#line 474 "LastImportSidebarEntry.c" +} + + +static void library_last_import_sidebar_entry_on_import_rolls_altered (LibraryLastImportSidebarEntry* self) { + MediaCollectionRegistry* _tmp0_ = NULL; + MediaCollectionRegistry* _tmp1_ = NULL; + ImportID* _tmp2_ = NULL; + ImportID* _tmp3_ = NULL; +#line 32 "/home/jens/Source/shotwell/src/library/LastImportSidebarEntry.vala" + g_return_if_fail (LIBRARY_IS_LAST_IMPORT_SIDEBAR_ENTRY (self)); +#line 33 "/home/jens/Source/shotwell/src/library/LastImportSidebarEntry.vala" + _tmp0_ = media_collection_registry_get_instance (); +#line 33 "/home/jens/Source/shotwell/src/library/LastImportSidebarEntry.vala" + _tmp1_ = _tmp0_; +#line 33 "/home/jens/Source/shotwell/src/library/LastImportSidebarEntry.vala" + _tmp2_ = media_collection_registry_get_last_import_id (_tmp1_); +#line 33 "/home/jens/Source/shotwell/src/library/LastImportSidebarEntry.vala" + _tmp3_ = _tmp2_; +#line 33 "/home/jens/Source/shotwell/src/library/LastImportSidebarEntry.vala" + library_hideable_page_entry_set_visible (G_TYPE_CHECK_INSTANCE_CAST (self, LIBRARY_TYPE_HIDEABLE_PAGE_ENTRY, LibraryHideablePageEntry), _tmp3_ != NULL); +#line 33 "/home/jens/Source/shotwell/src/library/LastImportSidebarEntry.vala" + _import_id_free0 (_tmp3_); +#line 33 "/home/jens/Source/shotwell/src/library/LastImportSidebarEntry.vala" + _media_collection_registry_unref0 (_tmp1_); +#line 499 "LastImportSidebarEntry.c" +} + + +static void library_last_import_sidebar_entry_class_init (LibraryLastImportSidebarEntryClass * klass) { +#line 7 "/home/jens/Source/shotwell/src/library/LastImportSidebarEntry.vala" + library_last_import_sidebar_entry_parent_class = g_type_class_peek_parent (klass); +#line 7 "/home/jens/Source/shotwell/src/library/LastImportSidebarEntry.vala" + ((SidebarSimplePageEntryClass *) klass)->get_sidebar_name = library_last_import_sidebar_entry_real_get_sidebar_name; +#line 7 "/home/jens/Source/shotwell/src/library/LastImportSidebarEntry.vala" + ((SidebarSimplePageEntryClass *) klass)->get_sidebar_icon = library_last_import_sidebar_entry_real_get_sidebar_icon; +#line 7 "/home/jens/Source/shotwell/src/library/LastImportSidebarEntry.vala" + ((SidebarSimplePageEntryClass *) klass)->create_page = library_last_import_sidebar_entry_real_create_page; +#line 7 "/home/jens/Source/shotwell/src/library/LastImportSidebarEntry.vala" + G_OBJECT_CLASS (klass)->finalize = library_last_import_sidebar_entry_finalize; +#line 514 "LastImportSidebarEntry.c" +} + + +static void library_last_import_sidebar_entry_instance_init (LibraryLastImportSidebarEntry * self) { +} + + +static void library_last_import_sidebar_entry_finalize (GObject* obj) { + LibraryLastImportSidebarEntry * self; +#line 7 "/home/jens/Source/shotwell/src/library/LastImportSidebarEntry.vala" + self = G_TYPE_CHECK_INSTANCE_CAST (obj, LIBRARY_TYPE_LAST_IMPORT_SIDEBAR_ENTRY, LibraryLastImportSidebarEntry); +#line 526 "LastImportSidebarEntry.c" + { + GeeIterator* _media_sources_it = NULL; + MediaCollectionRegistry* _tmp0_ = NULL; + MediaCollectionRegistry* _tmp1_ = NULL; + GeeCollection* _tmp2_ = NULL; + GeeCollection* _tmp3_ = NULL; + GeeIterator* _tmp4_ = NULL; + GeeIterator* _tmp5_ = NULL; +#line 16 "/home/jens/Source/shotwell/src/library/LastImportSidebarEntry.vala" + _tmp0_ = media_collection_registry_get_instance (); +#line 16 "/home/jens/Source/shotwell/src/library/LastImportSidebarEntry.vala" + _tmp1_ = _tmp0_; +#line 16 "/home/jens/Source/shotwell/src/library/LastImportSidebarEntry.vala" + _tmp2_ = media_collection_registry_get_all (_tmp1_); +#line 16 "/home/jens/Source/shotwell/src/library/LastImportSidebarEntry.vala" + _tmp3_ = _tmp2_; +#line 16 "/home/jens/Source/shotwell/src/library/LastImportSidebarEntry.vala" + _tmp4_ = gee_iterable_iterator (G_TYPE_CHECK_INSTANCE_CAST (_tmp3_, GEE_TYPE_ITERABLE, GeeIterable)); +#line 16 "/home/jens/Source/shotwell/src/library/LastImportSidebarEntry.vala" + _tmp5_ = _tmp4_; +#line 16 "/home/jens/Source/shotwell/src/library/LastImportSidebarEntry.vala" + _g_object_unref0 (_tmp3_); +#line 16 "/home/jens/Source/shotwell/src/library/LastImportSidebarEntry.vala" + _media_collection_registry_unref0 (_tmp1_); +#line 16 "/home/jens/Source/shotwell/src/library/LastImportSidebarEntry.vala" + _media_sources_it = _tmp5_; +#line 16 "/home/jens/Source/shotwell/src/library/LastImportSidebarEntry.vala" + while (TRUE) { +#line 555 "LastImportSidebarEntry.c" + GeeIterator* _tmp6_ = NULL; + gboolean _tmp7_ = FALSE; + MediaSourceCollection* media_sources = NULL; + GeeIterator* _tmp8_ = NULL; + gpointer _tmp9_ = NULL; + MediaSourceCollection* _tmp10_ = NULL; + guint _tmp11_ = 0U; +#line 16 "/home/jens/Source/shotwell/src/library/LastImportSidebarEntry.vala" + _tmp6_ = _media_sources_it; +#line 16 "/home/jens/Source/shotwell/src/library/LastImportSidebarEntry.vala" + _tmp7_ = gee_iterator_next (_tmp6_); +#line 16 "/home/jens/Source/shotwell/src/library/LastImportSidebarEntry.vala" + if (!_tmp7_) { +#line 16 "/home/jens/Source/shotwell/src/library/LastImportSidebarEntry.vala" + break; +#line 571 "LastImportSidebarEntry.c" + } +#line 16 "/home/jens/Source/shotwell/src/library/LastImportSidebarEntry.vala" + _tmp8_ = _media_sources_it; +#line 16 "/home/jens/Source/shotwell/src/library/LastImportSidebarEntry.vala" + _tmp9_ = gee_iterator_get (_tmp8_); +#line 16 "/home/jens/Source/shotwell/src/library/LastImportSidebarEntry.vala" + media_sources = (MediaSourceCollection*) _tmp9_; +#line 17 "/home/jens/Source/shotwell/src/library/LastImportSidebarEntry.vala" + _tmp10_ = media_sources; +#line 17 "/home/jens/Source/shotwell/src/library/LastImportSidebarEntry.vala" + g_signal_parse_name ("import-roll-altered", TYPE_MEDIA_SOURCE_COLLECTION, &_tmp11_, NULL, FALSE); +#line 17 "/home/jens/Source/shotwell/src/library/LastImportSidebarEntry.vala" + g_signal_handlers_disconnect_matched (_tmp10_, G_SIGNAL_MATCH_ID | G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA, _tmp11_, 0, NULL, (GCallback) _library_last_import_sidebar_entry_on_import_rolls_altered_media_source_collection_import_roll_altered, self); +#line 16 "/home/jens/Source/shotwell/src/library/LastImportSidebarEntry.vala" + _data_collection_unref0 (media_sources); +#line 587 "LastImportSidebarEntry.c" + } +#line 16 "/home/jens/Source/shotwell/src/library/LastImportSidebarEntry.vala" + _g_object_unref0 (_media_sources_it); +#line 591 "LastImportSidebarEntry.c" + } +#line 7 "/home/jens/Source/shotwell/src/library/LastImportSidebarEntry.vala" + G_OBJECT_CLASS (library_last_import_sidebar_entry_parent_class)->finalize (obj); +#line 595 "LastImportSidebarEntry.c" +} + + +GType library_last_import_sidebar_entry_get_type (void) { + static volatile gsize library_last_import_sidebar_entry_type_id__volatile = 0; + if (g_once_init_enter (&library_last_import_sidebar_entry_type_id__volatile)) { + static const GTypeInfo g_define_type_info = { sizeof (LibraryLastImportSidebarEntryClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) library_last_import_sidebar_entry_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (LibraryLastImportSidebarEntry), 0, (GInstanceInitFunc) library_last_import_sidebar_entry_instance_init, NULL }; + GType library_last_import_sidebar_entry_type_id; + library_last_import_sidebar_entry_type_id = g_type_register_static (LIBRARY_TYPE_HIDEABLE_PAGE_ENTRY, "LibraryLastImportSidebarEntry", &g_define_type_info, 0); + g_once_init_leave (&library_last_import_sidebar_entry_type_id__volatile, library_last_import_sidebar_entry_type_id); + } + return library_last_import_sidebar_entry_type_id__volatile; +} + + + |