diff options
author | Jörg Frings-Fürst <debian@jff.email> | 2018-09-30 14:11:00 +0200 |
---|---|---|
committer | Jörg Frings-Fürst <debian@jff.email> | 2018-09-30 14:11:00 +0200 |
commit | 0ac947a9070322180e94d1b71e30836cce4d74bc (patch) | |
tree | 4a6f3923c250377536a5004ed203768111a1d27f /src/core | |
parent | eca5837e235a356c8db9416bbbc13577db3e6f76 (diff) | |
parent | 01b2b5ec9177046f64c6d0a6e73a6ac8a42089a1 (diff) |
Merge branch 'feature/upstream' into develop
Diffstat (limited to 'src/core')
-rw-r--r-- | src/core/Alteration.c | 2817 | ||||
-rw-r--r-- | src/core/ContainerSourceCollection.c | 2236 | ||||
-rw-r--r-- | src/core/Core.c | 48 | ||||
-rw-r--r-- | src/core/DataCollection.c | 4077 | ||||
-rw-r--r-- | src/core/DataObject.c | 733 | ||||
-rw-r--r-- | src/core/DataSet.c | 1195 | ||||
-rw-r--r-- | src/core/DataSource.c | 5127 | ||||
-rw-r--r-- | src/core/DataSourceTypes.c | 1336 | ||||
-rw-r--r-- | src/core/DataView.c | 745 | ||||
-rw-r--r-- | src/core/DataViewTypes.c | 621 | ||||
-rw-r--r-- | src/core/DatabaseSourceCollection.c | 945 | ||||
-rw-r--r-- | src/core/SourceCollection.c | 1807 | ||||
-rw-r--r-- | src/core/SourceHoldingTank.c | 1736 | ||||
-rw-r--r-- | src/core/SourceInterfaces.c | 290 | ||||
-rw-r--r-- | src/core/Tracker.c | 2135 | ||||
-rw-r--r-- | src/core/ViewCollection.c | 9130 | ||||
-rw-r--r-- | src/core/util.c | 2043 |
17 files changed, 0 insertions, 37021 deletions
diff --git a/src/core/Alteration.c b/src/core/Alteration.c deleted file mode 100644 index a6d9ad0..0000000 --- a/src/core/Alteration.c +++ /dev/null @@ -1,2817 +0,0 @@ -/* Alteration.c generated by valac 0.40.4, the Vala compiler - * generated from Alteration.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. - */ -/**/ -/* Alteration represents a description of what has changed in the DataObject (reported via the*/ -/* "altered" signal). Since the descriptions can vary wildly depending on the semantics of each*/ -/* DataObject, no assumptions or requirements are placed on Alteration other than it must have*/ -/* one or more "subjects", each with a "detail". Subscribers to the "altered" signal can query*/ -/* the Alteration object to determine if the change is important to them.*/ -/**/ -/* Alteration is an immutable type. This means it's possible to store const Alterations of oft-used*/ -/* values for reuse.*/ -/**/ -/* Alterations may be compressed, merging their subjects and details into a new aggregated*/ -/* Alteration. Generally this is handled automatically by DataObject and DataCollection, when*/ -/* necessary.*/ -/**/ -/* NOTE: subjects and details should be ASCII labels (as in, plain-old ASCII, no code pages).*/ -/* They are treated as case-sensitive strings.*/ -/**/ -/* Recommended subjects include: image, thumbnail, metadata.*/ -/**/ - - -#include <glib.h> -#include <glib-object.h> -#include <stdlib.h> -#include <string.h> -#include <gee.h> -#include <gobject/gvaluecollector.h> - - -#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; -typedef struct _AlterationPrivate AlterationPrivate; -#define _g_free0(var) (var = (g_free (var), NULL)) -#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL))) -typedef struct _ParamSpecAlteration ParamSpecAlteration; -#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 _Alteration { - GTypeInstance parent_instance; - volatile int ref_count; - AlterationPrivate * priv; -}; - -struct _AlterationClass { - GTypeClass parent_class; - void (*finalize) (Alteration *self); -}; - -struct _AlterationPrivate { - gchar* subject; - gchar* detail; - GeeMultiMap* map; -}; - -struct _ParamSpecAlteration { - GParamSpec parent_instance; -}; - - -static gpointer alteration_parent_class = NULL; - -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; -#define ALTERATION_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), TYPE_ALTERATION, AlterationPrivate)) -Alteration* alteration_new (const gchar* subject, - const gchar* detail); -Alteration* alteration_construct (GType object_type, - const gchar* subject, - const gchar* detail); -static void alteration_add_detail (Alteration* self, - const gchar* sub, - const gchar* det); -Alteration* alteration_new_from_list (const gchar* list); -Alteration* alteration_construct_from_list (GType object_type, - const gchar* list); -Alteration* alteration_new_from_array (gchar** array, - int array_length1); -Alteration* alteration_construct_from_array (GType object_type, - gchar** array, - int array_length1); -static Alteration* alteration_new_from_map (GeeMultiMap* map); -static Alteration* alteration_construct_from_map (GType object_type, - GeeMultiMap* map); -static GeeMultiMap* alteration_create_map (Alteration* self); -static guint alteration_case_hash (const gchar* a); -static guint _alteration_case_hash_gee_hash_data_func (gconstpointer v, - gpointer self); -static gboolean alteration_case_equal (const gchar* a, - const gchar* b); -static gboolean _alteration_case_equal_gee_equal_data_func (gconstpointer a, - gconstpointer b, - gpointer self); -static inline gboolean alteration_equal_values (const gchar* str1, - const gchar* str2); -static inline guint alteration_hash_value (const gchar* str); -gboolean alteration_has_subject (Alteration* self, - const gchar* subject); -gboolean alteration_has_detail (Alteration* self, - const gchar* subject, - const gchar* detail); -GeeCollection* alteration_get_details (Alteration* self, - const gchar* subject); -gchar* alteration_to_string (Alteration* self); -gboolean alteration_contains_any (Alteration* self, - Alteration* other); -gboolean alteration_equals (Alteration* self, - Alteration* other); -static void alteration_multimap_add_all (GeeMultiMap* dest, - GeeMultiMap* src); -Alteration* alteration_compress (Alteration* self, - Alteration* other); -static void alteration_finalize (Alteration * obj); -static void _vala_array_destroy (gpointer array, - gint array_length, - GDestroyNotify destroy_func); -static void _vala_array_free (gpointer array, - gint array_length, - GDestroyNotify destroy_func); -static gint _vala_array_length (gpointer array); - - -Alteration* -alteration_construct (GType object_type, - const gchar* subject, - const gchar* detail) -{ - Alteration* self = NULL; -#line 32 "/home/jens/Source/shotwell/src/core/Alteration.vala" - g_return_val_if_fail (subject != NULL, NULL); -#line 32 "/home/jens/Source/shotwell/src/core/Alteration.vala" - g_return_val_if_fail (detail != NULL, NULL); -#line 32 "/home/jens/Source/shotwell/src/core/Alteration.vala" - self = (Alteration*) g_type_create_instance (object_type); -#line 33 "/home/jens/Source/shotwell/src/core/Alteration.vala" - alteration_add_detail (self, subject, detail); -#line 32 "/home/jens/Source/shotwell/src/core/Alteration.vala" - return self; -#line 168 "Alteration.c" -} - - -Alteration* -alteration_new (const gchar* subject, - const gchar* detail) -{ -#line 32 "/home/jens/Source/shotwell/src/core/Alteration.vala" - return alteration_construct (TYPE_ALTERATION, subject, detail); -#line 178 "Alteration.c" -} - - -Alteration* -alteration_construct_from_list (GType object_type, - const gchar* list) -{ - Alteration* self = NULL; - gint _tmp0_; - gint _tmp1_; - gchar** pairs = NULL; - gchar** _tmp2_; - gchar** _tmp3_; - gint pairs_length1; - gint _pairs_size_; - gchar** _tmp4_; - gint _tmp4__length1; - gchar** _tmp5_; - gint _tmp5__length1; -#line 38 "/home/jens/Source/shotwell/src/core/Alteration.vala" - g_return_val_if_fail (list != NULL, NULL); -#line 38 "/home/jens/Source/shotwell/src/core/Alteration.vala" - self = (Alteration*) g_type_create_instance (object_type); -#line 38 "/home/jens/Source/shotwell/src/core/Alteration.vala" - _tmp0_ = strlen (list); -#line 38 "/home/jens/Source/shotwell/src/core/Alteration.vala" - _tmp1_ = _tmp0_; -#line 38 "/home/jens/Source/shotwell/src/core/Alteration.vala" - _vala_return_val_if_fail (_tmp1_ > 0, "list.length > 0", NULL); -#line 39 "/home/jens/Source/shotwell/src/core/Alteration.vala" - _tmp3_ = _tmp2_ = g_strsplit (list, ",", 0); -#line 39 "/home/jens/Source/shotwell/src/core/Alteration.vala" - pairs = _tmp3_; -#line 39 "/home/jens/Source/shotwell/src/core/Alteration.vala" - pairs_length1 = _vala_array_length (_tmp2_); -#line 39 "/home/jens/Source/shotwell/src/core/Alteration.vala" - _pairs_size_ = pairs_length1; -#line 40 "/home/jens/Source/shotwell/src/core/Alteration.vala" - _tmp4_ = pairs; -#line 40 "/home/jens/Source/shotwell/src/core/Alteration.vala" - _tmp4__length1 = pairs_length1; -#line 40 "/home/jens/Source/shotwell/src/core/Alteration.vala" - _vala_assert (_tmp4__length1 >= 1, "pairs.length >= 1"); -#line 42 "/home/jens/Source/shotwell/src/core/Alteration.vala" - _tmp5_ = pairs; -#line 42 "/home/jens/Source/shotwell/src/core/Alteration.vala" - _tmp5__length1 = pairs_length1; -#line 226 "Alteration.c" - { - gchar** pair_collection = NULL; - gint pair_collection_length1 = 0; - gint _pair_collection_size_ = 0; - gint pair_it = 0; -#line 42 "/home/jens/Source/shotwell/src/core/Alteration.vala" - pair_collection = _tmp5_; -#line 42 "/home/jens/Source/shotwell/src/core/Alteration.vala" - pair_collection_length1 = _tmp5__length1; -#line 42 "/home/jens/Source/shotwell/src/core/Alteration.vala" - for (pair_it = 0; pair_it < _tmp5__length1; pair_it = pair_it + 1) { -#line 238 "Alteration.c" - gchar* _tmp6_; - gchar* pair = NULL; -#line 42 "/home/jens/Source/shotwell/src/core/Alteration.vala" - _tmp6_ = g_strdup (pair_collection[pair_it]); -#line 42 "/home/jens/Source/shotwell/src/core/Alteration.vala" - pair = _tmp6_; -#line 245 "Alteration.c" - { - gchar** subject_detail = NULL; - const gchar* _tmp7_; - gchar** _tmp8_; - gchar** _tmp9_; - gint subject_detail_length1; - gint _subject_detail_size_; - gchar** _tmp10_; - gint _tmp10__length1; - gchar** _tmp11_; - gint _tmp11__length1; - const gchar* _tmp12_; - gchar** _tmp13_; - gint _tmp13__length1; - const gchar* _tmp14_; -#line 43 "/home/jens/Source/shotwell/src/core/Alteration.vala" - _tmp7_ = pair; -#line 43 "/home/jens/Source/shotwell/src/core/Alteration.vala" - _tmp9_ = _tmp8_ = g_strsplit (_tmp7_, ":", 2); -#line 43 "/home/jens/Source/shotwell/src/core/Alteration.vala" - subject_detail = _tmp9_; -#line 43 "/home/jens/Source/shotwell/src/core/Alteration.vala" - subject_detail_length1 = _vala_array_length (_tmp8_); -#line 43 "/home/jens/Source/shotwell/src/core/Alteration.vala" - _subject_detail_size_ = subject_detail_length1; -#line 44 "/home/jens/Source/shotwell/src/core/Alteration.vala" - _tmp10_ = subject_detail; -#line 44 "/home/jens/Source/shotwell/src/core/Alteration.vala" - _tmp10__length1 = subject_detail_length1; -#line 44 "/home/jens/Source/shotwell/src/core/Alteration.vala" - _vala_assert (_tmp10__length1 == 2, "subject_detail.length == 2"); -#line 46 "/home/jens/Source/shotwell/src/core/Alteration.vala" - _tmp11_ = subject_detail; -#line 46 "/home/jens/Source/shotwell/src/core/Alteration.vala" - _tmp11__length1 = subject_detail_length1; -#line 46 "/home/jens/Source/shotwell/src/core/Alteration.vala" - _tmp12_ = _tmp11_[0]; -#line 46 "/home/jens/Source/shotwell/src/core/Alteration.vala" - _tmp13_ = subject_detail; -#line 46 "/home/jens/Source/shotwell/src/core/Alteration.vala" - _tmp13__length1 = subject_detail_length1; -#line 46 "/home/jens/Source/shotwell/src/core/Alteration.vala" - _tmp14_ = _tmp13_[1]; -#line 46 "/home/jens/Source/shotwell/src/core/Alteration.vala" - alteration_add_detail (self, _tmp12_, _tmp14_); -#line 42 "/home/jens/Source/shotwell/src/core/Alteration.vala" - subject_detail = (_vala_array_free (subject_detail, subject_detail_length1, (GDestroyNotify) g_free), NULL); -#line 42 "/home/jens/Source/shotwell/src/core/Alteration.vala" - _g_free0 (pair); -#line 295 "Alteration.c" - } - } - } -#line 38 "/home/jens/Source/shotwell/src/core/Alteration.vala" - pairs = (_vala_array_free (pairs, pairs_length1, (GDestroyNotify) g_free), NULL); -#line 38 "/home/jens/Source/shotwell/src/core/Alteration.vala" - return self; -#line 303 "Alteration.c" -} - - -Alteration* -alteration_new_from_list (const gchar* list) -{ -#line 38 "/home/jens/Source/shotwell/src/core/Alteration.vala" - return alteration_construct_from_list (TYPE_ALTERATION, list); -#line 312 "Alteration.c" -} - - -Alteration* -alteration_construct_from_array (GType object_type, - gchar** array, - int array_length1) -{ - Alteration* self = NULL; -#line 52 "/home/jens/Source/shotwell/src/core/Alteration.vala" - self = (Alteration*) g_type_create_instance (object_type); -#line 52 "/home/jens/Source/shotwell/src/core/Alteration.vala" - _vala_return_val_if_fail (array_length1 > 0, "array.length > 0", NULL); -#line 326 "Alteration.c" - { - gchar** pair_collection = NULL; - gint pair_collection_length1 = 0; - gint _pair_collection_size_ = 0; - gint pair_it = 0; -#line 53 "/home/jens/Source/shotwell/src/core/Alteration.vala" - pair_collection = array; -#line 53 "/home/jens/Source/shotwell/src/core/Alteration.vala" - pair_collection_length1 = array_length1; -#line 53 "/home/jens/Source/shotwell/src/core/Alteration.vala" - for (pair_it = 0; pair_it < array_length1; pair_it = pair_it + 1) { -#line 338 "Alteration.c" - gchar* _tmp0_; - gchar* pair = NULL; -#line 53 "/home/jens/Source/shotwell/src/core/Alteration.vala" - _tmp0_ = g_strdup (pair_collection[pair_it]); -#line 53 "/home/jens/Source/shotwell/src/core/Alteration.vala" - pair = _tmp0_; -#line 345 "Alteration.c" - { - gchar** subject_detail = NULL; - const gchar* _tmp1_; - gchar** _tmp2_; - gchar** _tmp3_; - gint subject_detail_length1; - gint _subject_detail_size_; - gchar** _tmp4_; - gint _tmp4__length1; - gchar** _tmp5_; - gint _tmp5__length1; - const gchar* _tmp6_; - gchar** _tmp7_; - gint _tmp7__length1; - const gchar* _tmp8_; -#line 54 "/home/jens/Source/shotwell/src/core/Alteration.vala" - _tmp1_ = pair; -#line 54 "/home/jens/Source/shotwell/src/core/Alteration.vala" - _tmp3_ = _tmp2_ = g_strsplit (_tmp1_, ":", 2); -#line 54 "/home/jens/Source/shotwell/src/core/Alteration.vala" - subject_detail = _tmp3_; -#line 54 "/home/jens/Source/shotwell/src/core/Alteration.vala" - subject_detail_length1 = _vala_array_length (_tmp2_); -#line 54 "/home/jens/Source/shotwell/src/core/Alteration.vala" - _subject_detail_size_ = subject_detail_length1; -#line 55 "/home/jens/Source/shotwell/src/core/Alteration.vala" - _tmp4_ = subject_detail; -#line 55 "/home/jens/Source/shotwell/src/core/Alteration.vala" - _tmp4__length1 = subject_detail_length1; -#line 55 "/home/jens/Source/shotwell/src/core/Alteration.vala" - _vala_assert (_tmp4__length1 == 2, "subject_detail.length == 2"); -#line 57 "/home/jens/Source/shotwell/src/core/Alteration.vala" - _tmp5_ = subject_detail; -#line 57 "/home/jens/Source/shotwell/src/core/Alteration.vala" - _tmp5__length1 = subject_detail_length1; -#line 57 "/home/jens/Source/shotwell/src/core/Alteration.vala" - _tmp6_ = _tmp5_[0]; -#line 57 "/home/jens/Source/shotwell/src/core/Alteration.vala" - _tmp7_ = subject_detail; -#line 57 "/home/jens/Source/shotwell/src/core/Alteration.vala" - _tmp7__length1 = subject_detail_length1; -#line 57 "/home/jens/Source/shotwell/src/core/Alteration.vala" - _tmp8_ = _tmp7_[1]; -#line 57 "/home/jens/Source/shotwell/src/core/Alteration.vala" - alteration_add_detail (self, _tmp6_, _tmp8_); -#line 53 "/home/jens/Source/shotwell/src/core/Alteration.vala" - subject_detail = (_vala_array_free (subject_detail, subject_detail_length1, (GDestroyNotify) g_free), NULL); -#line 53 "/home/jens/Source/shotwell/src/core/Alteration.vala" - _g_free0 (pair); -#line 395 "Alteration.c" - } - } - } -#line 52 "/home/jens/Source/shotwell/src/core/Alteration.vala" - return self; -#line 401 "Alteration.c" -} - - -Alteration* -alteration_new_from_array (gchar** array, - int array_length1) -{ -#line 52 "/home/jens/Source/shotwell/src/core/Alteration.vala" - return alteration_construct_from_array (TYPE_ALTERATION, array, array_length1); -#line 411 "Alteration.c" -} - - -static gpointer -_g_object_ref0 (gpointer self) -{ -#line 63 "/home/jens/Source/shotwell/src/core/Alteration.vala" - return self ? g_object_ref (self) : NULL; -#line 420 "Alteration.c" -} - - -static Alteration* -alteration_construct_from_map (GType object_type, - GeeMultiMap* map) -{ - Alteration* self = NULL; - GeeMultiMap* _tmp0_; -#line 62 "/home/jens/Source/shotwell/src/core/Alteration.vala" - g_return_val_if_fail (GEE_IS_MULTI_MAP (map), NULL); -#line 62 "/home/jens/Source/shotwell/src/core/Alteration.vala" - self = (Alteration*) g_type_create_instance (object_type); -#line 63 "/home/jens/Source/shotwell/src/core/Alteration.vala" - _tmp0_ = _g_object_ref0 (map); -#line 63 "/home/jens/Source/shotwell/src/core/Alteration.vala" - _g_object_unref0 (self->priv->map); -#line 63 "/home/jens/Source/shotwell/src/core/Alteration.vala" - self->priv->map = _tmp0_; -#line 62 "/home/jens/Source/shotwell/src/core/Alteration.vala" - return self; -#line 442 "Alteration.c" -} - - -static Alteration* -alteration_new_from_map (GeeMultiMap* map) -{ -#line 62 "/home/jens/Source/shotwell/src/core/Alteration.vala" - return alteration_construct_from_map (TYPE_ALTERATION, map); -#line 451 "Alteration.c" -} - - -static gchar* -string_strip (const gchar* self) -{ - gchar* result = NULL; - gchar* _result_ = NULL; - gchar* _tmp0_; - const gchar* _tmp1_; -#line 1248 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" - g_return_val_if_fail (self != NULL, NULL); -#line 1249 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" - _tmp0_ = g_strdup (self); -#line 1249 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" - _result_ = _tmp0_; -#line 1250 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" - _tmp1_ = _result_; -#line 1250 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" - g_strstrip (_tmp1_); -#line 1251 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" - result = _result_; -#line 1251 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" - return result; -#line 476 "Alteration.c" -} - - -static void -alteration_add_detail (Alteration* self, - const gchar* sub, - const gchar* det) -{ - gchar* subject = NULL; - gchar* _tmp0_; - const gchar* _tmp1_; - gint _tmp2_; - gint _tmp3_; - gchar* detail = NULL; - gchar* _tmp4_; - const gchar* _tmp5_; - gint _tmp6_; - gint _tmp7_; - gboolean _tmp8_ = FALSE; - const gchar* _tmp9_; - GeeMultiMap* _tmp16_; - const gchar* _tmp18_; - GeeMultiMap* _tmp23_; - const gchar* _tmp24_; - const gchar* _tmp25_; -#line 66 "/home/jens/Source/shotwell/src/core/Alteration.vala" - g_return_if_fail (IS_ALTERATION (self)); -#line 66 "/home/jens/Source/shotwell/src/core/Alteration.vala" - g_return_if_fail (sub != NULL); -#line 66 "/home/jens/Source/shotwell/src/core/Alteration.vala" - g_return_if_fail (det != NULL); -#line 68 "/home/jens/Source/shotwell/src/core/Alteration.vala" - _tmp0_ = string_strip (sub); -#line 68 "/home/jens/Source/shotwell/src/core/Alteration.vala" - subject = _tmp0_; -#line 69 "/home/jens/Source/shotwell/src/core/Alteration.vala" - _tmp1_ = subject; -#line 69 "/home/jens/Source/shotwell/src/core/Alteration.vala" - _tmp2_ = strlen (_tmp1_); -#line 69 "/home/jens/Source/shotwell/src/core/Alteration.vala" - _tmp3_ = _tmp2_; -#line 69 "/home/jens/Source/shotwell/src/core/Alteration.vala" - _vala_assert (_tmp3_ > 0, "subject.length > 0"); -#line 71 "/home/jens/Source/shotwell/src/core/Alteration.vala" - _tmp4_ = string_strip (det); -#line 71 "/home/jens/Source/shotwell/src/core/Alteration.vala" - detail = _tmp4_; -#line 72 "/home/jens/Source/shotwell/src/core/Alteration.vala" - _tmp5_ = detail; -#line 72 "/home/jens/Source/shotwell/src/core/Alteration.vala" - _tmp6_ = strlen (_tmp5_); -#line 72 "/home/jens/Source/shotwell/src/core/Alteration.vala" - _tmp7_ = _tmp6_; -#line 72 "/home/jens/Source/shotwell/src/core/Alteration.vala" - _vala_assert (_tmp7_ > 0, "detail.length > 0"); -#line 75 "/home/jens/Source/shotwell/src/core/Alteration.vala" - _tmp9_ = self->priv->subject; -#line 75 "/home/jens/Source/shotwell/src/core/Alteration.vala" - if (_tmp9_ == NULL) { -#line 536 "Alteration.c" - GeeMultiMap* _tmp10_; -#line 75 "/home/jens/Source/shotwell/src/core/Alteration.vala" - _tmp10_ = self->priv->map; -#line 75 "/home/jens/Source/shotwell/src/core/Alteration.vala" - _tmp8_ = _tmp10_ == NULL; -#line 542 "Alteration.c" - } else { -#line 75 "/home/jens/Source/shotwell/src/core/Alteration.vala" - _tmp8_ = FALSE; -#line 546 "Alteration.c" - } -#line 75 "/home/jens/Source/shotwell/src/core/Alteration.vala" - if (_tmp8_) { -#line 550 "Alteration.c" - const gchar* _tmp11_; - const gchar* _tmp12_; - gchar* _tmp13_; - const gchar* _tmp14_; - gchar* _tmp15_; -#line 76 "/home/jens/Source/shotwell/src/core/Alteration.vala" - _tmp11_ = self->priv->detail; -#line 76 "/home/jens/Source/shotwell/src/core/Alteration.vala" - _vala_assert (_tmp11_ == NULL, "this.detail == null"); -#line 78 "/home/jens/Source/shotwell/src/core/Alteration.vala" - _tmp12_ = subject; -#line 78 "/home/jens/Source/shotwell/src/core/Alteration.vala" - _tmp13_ = g_strdup (_tmp12_); -#line 78 "/home/jens/Source/shotwell/src/core/Alteration.vala" - _g_free0 (self->priv->subject); -#line 78 "/home/jens/Source/shotwell/src/core/Alteration.vala" - self->priv->subject = _tmp13_; -#line 79 "/home/jens/Source/shotwell/src/core/Alteration.vala" - _tmp14_ = detail; -#line 79 "/home/jens/Source/shotwell/src/core/Alteration.vala" - _tmp15_ = g_strdup (_tmp14_); -#line 79 "/home/jens/Source/shotwell/src/core/Alteration.vala" - _g_free0 (self->priv->detail); -#line 79 "/home/jens/Source/shotwell/src/core/Alteration.vala" - self->priv->detail = _tmp15_; -#line 81 "/home/jens/Source/shotwell/src/core/Alteration.vala" - _g_free0 (detail); -#line 81 "/home/jens/Source/shotwell/src/core/Alteration.vala" - _g_free0 (subject); -#line 81 "/home/jens/Source/shotwell/src/core/Alteration.vala" - return; -#line 582 "Alteration.c" - } -#line 85 "/home/jens/Source/shotwell/src/core/Alteration.vala" - _tmp16_ = self->priv->map; -#line 85 "/home/jens/Source/shotwell/src/core/Alteration.vala" - if (_tmp16_ == NULL) { -#line 588 "Alteration.c" - GeeMultiMap* _tmp17_; -#line 86 "/home/jens/Source/shotwell/src/core/Alteration.vala" - _tmp17_ = alteration_create_map (self); -#line 86 "/home/jens/Source/shotwell/src/core/Alteration.vala" - _g_object_unref0 (self->priv->map); -#line 86 "/home/jens/Source/shotwell/src/core/Alteration.vala" - self->priv->map = _tmp17_; -#line 596 "Alteration.c" - } -#line 89 "/home/jens/Source/shotwell/src/core/Alteration.vala" - _tmp18_ = self->priv->subject; -#line 89 "/home/jens/Source/shotwell/src/core/Alteration.vala" - if (_tmp18_ != NULL) { -#line 602 "Alteration.c" - const gchar* _tmp19_; - GeeMultiMap* _tmp20_; - const gchar* _tmp21_; - const gchar* _tmp22_; -#line 90 "/home/jens/Source/shotwell/src/core/Alteration.vala" - _tmp19_ = self->priv->detail; -#line 90 "/home/jens/Source/shotwell/src/core/Alteration.vala" - _vala_assert (_tmp19_ != NULL, "this.detail != null"); -#line 92 "/home/jens/Source/shotwell/src/core/Alteration.vala" - _tmp20_ = self->priv->map; -#line 92 "/home/jens/Source/shotwell/src/core/Alteration.vala" - _tmp21_ = self->priv->subject; -#line 92 "/home/jens/Source/shotwell/src/core/Alteration.vala" - _tmp22_ = self->priv->detail; -#line 92 "/home/jens/Source/shotwell/src/core/Alteration.vala" - gee_multi_map_set (_tmp20_, _tmp21_, _tmp22_); -#line 93 "/home/jens/Source/shotwell/src/core/Alteration.vala" - _g_free0 (self->priv->subject); -#line 93 "/home/jens/Source/shotwell/src/core/Alteration.vala" - self->priv->subject = NULL; -#line 94 "/home/jens/Source/shotwell/src/core/Alteration.vala" - _g_free0 (self->priv->detail); -#line 94 "/home/jens/Source/shotwell/src/core/Alteration.vala" - self->priv->detail = NULL; -#line 627 "Alteration.c" - } -#line 98 "/home/jens/Source/shotwell/src/core/Alteration.vala" - _tmp23_ = self->priv->map; -#line 98 "/home/jens/Source/shotwell/src/core/Alteration.vala" - _tmp24_ = subject; -#line 98 "/home/jens/Source/shotwell/src/core/Alteration.vala" - _tmp25_ = detail; -#line 98 "/home/jens/Source/shotwell/src/core/Alteration.vala" - gee_multi_map_set (_tmp23_, _tmp24_, _tmp25_); -#line 66 "/home/jens/Source/shotwell/src/core/Alteration.vala" - _g_free0 (detail); -#line 66 "/home/jens/Source/shotwell/src/core/Alteration.vala" - _g_free0 (subject); -#line 641 "Alteration.c" -} - - -static guint -_alteration_case_hash_gee_hash_data_func (gconstpointer v, - gpointer self) -{ - guint result; - result = alteration_case_hash ((const gchar*) v); -#line 102 "/home/jens/Source/shotwell/src/core/Alteration.vala" - return result; -#line 653 "Alteration.c" -} - - -static gboolean -_alteration_case_equal_gee_equal_data_func (gconstpointer a, - gconstpointer b, - gpointer self) -{ - gboolean result; - result = alteration_case_equal ((const gchar*) a, (const gchar*) b); -#line 102 "/home/jens/Source/shotwell/src/core/Alteration.vala" - return result; -#line 666 "Alteration.c" -} - - -static GeeMultiMap* -alteration_create_map (Alteration* self) -{ - GeeMultiMap* result = NULL; - GeeHashMultiMap* _tmp0_; -#line 101 "/home/jens/Source/shotwell/src/core/Alteration.vala" - g_return_val_if_fail (IS_ALTERATION (self), NULL); -#line 102 "/home/jens/Source/shotwell/src/core/Alteration.vala" - _tmp0_ = gee_hash_multi_map_new (G_TYPE_STRING, (GBoxedCopyFunc) g_strdup, (GDestroyNotify) g_free, G_TYPE_STRING, (GBoxedCopyFunc) g_strdup, (GDestroyNotify) g_free, _alteration_case_hash_gee_hash_data_func, NULL, NULL, _alteration_case_equal_gee_equal_data_func, NULL, NULL, _alteration_case_hash_gee_hash_data_func, NULL, NULL, _alteration_case_equal_gee_equal_data_func, NULL, NULL); -#line 102 "/home/jens/Source/shotwell/src/core/Alteration.vala" - result = G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, GEE_TYPE_MULTI_MAP, GeeMultiMap); -#line 102 "/home/jens/Source/shotwell/src/core/Alteration.vala" - return result; -#line 683 "Alteration.c" -} - - -static gboolean -alteration_case_equal (const gchar* a, - const gchar* b) -{ - gboolean result = FALSE; -#line 106 "/home/jens/Source/shotwell/src/core/Alteration.vala" - result = alteration_equal_values (a, b); -#line 106 "/home/jens/Source/shotwell/src/core/Alteration.vala" - return result; -#line 696 "Alteration.c" -} - - -static guint -alteration_case_hash (const gchar* a) -{ - guint result = 0U; -#line 110 "/home/jens/Source/shotwell/src/core/Alteration.vala" - result = alteration_hash_value (a); -#line 110 "/home/jens/Source/shotwell/src/core/Alteration.vala" - return result; -#line 708 "Alteration.c" -} - - -static inline gboolean -alteration_equal_values (const gchar* str1, - const gchar* str2) -{ - gboolean result = FALSE; -#line 113 "/home/jens/Source/shotwell/src/core/Alteration.vala" - g_return_val_if_fail (str1 != NULL, FALSE); -#line 113 "/home/jens/Source/shotwell/src/core/Alteration.vala" - g_return_val_if_fail (str2 != NULL, FALSE); -#line 114 "/home/jens/Source/shotwell/src/core/Alteration.vala" - result = g_ascii_strcasecmp (str1, str2) == 0; -#line 114 "/home/jens/Source/shotwell/src/core/Alteration.vala" - return result; -#line 725 "Alteration.c" -} - - -static inline guint -alteration_hash_value (const gchar* str) -{ - guint result = 0U; - GHashFunc _tmp0_; -#line 117 "/home/jens/Source/shotwell/src/core/Alteration.vala" - g_return_val_if_fail (str != NULL, 0U); -#line 118 "/home/jens/Source/shotwell/src/core/Alteration.vala" - _tmp0_ = g_str_hash; -#line 118 "/home/jens/Source/shotwell/src/core/Alteration.vala" - result = _tmp0_ (str); -#line 118 "/home/jens/Source/shotwell/src/core/Alteration.vala" - return result; -#line 742 "Alteration.c" -} - - -gboolean -alteration_has_subject (Alteration* self, - const gchar* subject) -{ - gboolean result = FALSE; - const gchar* _tmp0_; - GeeMultiMap* _tmp2_; - GeeSet* keys = NULL; - GeeMultiMap* _tmp3_; - GeeSet* _tmp4_; - GeeSet* _tmp5_; -#line 121 "/home/jens/Source/shotwell/src/core/Alteration.vala" - g_return_val_if_fail (IS_ALTERATION (self), FALSE); -#line 121 "/home/jens/Source/shotwell/src/core/Alteration.vala" - g_return_val_if_fail (subject != NULL, FALSE); -#line 122 "/home/jens/Source/shotwell/src/core/Alteration.vala" - _tmp0_ = self->priv->subject; -#line 122 "/home/jens/Source/shotwell/src/core/Alteration.vala" - if (_tmp0_ != NULL) { -#line 765 "Alteration.c" - const gchar* _tmp1_; -#line 123 "/home/jens/Source/shotwell/src/core/Alteration.vala" - _tmp1_ = self->priv->subject; -#line 123 "/home/jens/Source/shotwell/src/core/Alteration.vala" - result = alteration_equal_values (_tmp1_, subject); -#line 123 "/home/jens/Source/shotwell/src/core/Alteration.vala" - return result; -#line 773 "Alteration.c" - } -#line 125 "/home/jens/Source/shotwell/src/core/Alteration.vala" - _tmp2_ = self->priv->map; -#line 125 "/home/jens/Source/shotwell/src/core/Alteration.vala" - _vala_assert (_tmp2_ != NULL, "map != null"); -#line 126 "/home/jens/Source/shotwell/src/core/Alteration.vala" - _tmp3_ = self->priv->map; -#line 126 "/home/jens/Source/shotwell/src/core/Alteration.vala" - _tmp4_ = gee_multi_map_get_keys (_tmp3_); -#line 126 "/home/jens/Source/shotwell/src/core/Alteration.vala" - keys = _tmp4_; -#line 127 "/home/jens/Source/shotwell/src/core/Alteration.vala" - _tmp5_ = keys; -#line 127 "/home/jens/Source/shotwell/src/core/Alteration.vala" - if (_tmp5_ != NULL) { -#line 789 "Alteration.c" - { - GeeIterator* _key_it = NULL; - GeeSet* _tmp6_; - GeeIterator* _tmp7_; -#line 128 "/home/jens/Source/shotwell/src/core/Alteration.vala" - _tmp6_ = keys; -#line 128 "/home/jens/Source/shotwell/src/core/Alteration.vala" - _tmp7_ = gee_iterable_iterator (G_TYPE_CHECK_INSTANCE_CAST (_tmp6_, GEE_TYPE_ITERABLE, GeeIterable)); -#line 128 "/home/jens/Source/shotwell/src/core/Alteration.vala" - _key_it = _tmp7_; -#line 128 "/home/jens/Source/shotwell/src/core/Alteration.vala" - while (TRUE) { -#line 802 "Alteration.c" - GeeIterator* _tmp8_; - gchar* key = NULL; - GeeIterator* _tmp9_; - gpointer _tmp10_; - const gchar* _tmp11_; -#line 128 "/home/jens/Source/shotwell/src/core/Alteration.vala" - _tmp8_ = _key_it; -#line 128 "/home/jens/Source/shotwell/src/core/Alteration.vala" - if (!gee_iterator_next (_tmp8_)) { -#line 128 "/home/jens/Source/shotwell/src/core/Alteration.vala" - break; -#line 814 "Alteration.c" - } -#line 128 "/home/jens/Source/shotwell/src/core/Alteration.vala" - _tmp9_ = _key_it; -#line 128 "/home/jens/Source/shotwell/src/core/Alteration.vala" - _tmp10_ = gee_iterator_get (_tmp9_); -#line 128 "/home/jens/Source/shotwell/src/core/Alteration.vala" - key = (gchar*) _tmp10_; -#line 129 "/home/jens/Source/shotwell/src/core/Alteration.vala" - _tmp11_ = key; -#line 129 "/home/jens/Source/shotwell/src/core/Alteration.vala" - if (alteration_equal_values (_tmp11_, subject)) { -#line 130 "/home/jens/Source/shotwell/src/core/Alteration.vala" - result = TRUE; -#line 130 "/home/jens/Source/shotwell/src/core/Alteration.vala" - _g_free0 (key); -#line 130 "/home/jens/Source/shotwell/src/core/Alteration.vala" - _g_object_unref0 (_key_it); -#line 130 "/home/jens/Source/shotwell/src/core/Alteration.vala" - _g_object_unref0 (keys); -#line 130 "/home/jens/Source/shotwell/src/core/Alteration.vala" - return result; -#line 836 "Alteration.c" - } -#line 128 "/home/jens/Source/shotwell/src/core/Alteration.vala" - _g_free0 (key); -#line 840 "Alteration.c" - } -#line 128 "/home/jens/Source/shotwell/src/core/Alteration.vala" - _g_object_unref0 (_key_it); -#line 844 "Alteration.c" - } - } -#line 134 "/home/jens/Source/shotwell/src/core/Alteration.vala" - result = FALSE; -#line 134 "/home/jens/Source/shotwell/src/core/Alteration.vala" - _g_object_unref0 (keys); -#line 134 "/home/jens/Source/shotwell/src/core/Alteration.vala" - return result; -#line 853 "Alteration.c" -} - - -gboolean -alteration_has_detail (Alteration* self, - const gchar* subject, - const gchar* detail) -{ - gboolean result = FALSE; - gboolean _tmp0_ = FALSE; - const gchar* _tmp1_; - GeeMultiMap* _tmp6_; - GeeCollection* values = NULL; - GeeMultiMap* _tmp7_; - GeeCollection* _tmp8_; - GeeCollection* _tmp9_; -#line 137 "/home/jens/Source/shotwell/src/core/Alteration.vala" - g_return_val_if_fail (IS_ALTERATION (self), FALSE); -#line 137 "/home/jens/Source/shotwell/src/core/Alteration.vala" - g_return_val_if_fail (subject != NULL, FALSE); -#line 137 "/home/jens/Source/shotwell/src/core/Alteration.vala" - g_return_val_if_fail (detail != NULL, FALSE); -#line 138 "/home/jens/Source/shotwell/src/core/Alteration.vala" - _tmp1_ = self->priv->subject; -#line 138 "/home/jens/Source/shotwell/src/core/Alteration.vala" - if (_tmp1_ != NULL) { -#line 880 "Alteration.c" - const gchar* _tmp2_; -#line 138 "/home/jens/Source/shotwell/src/core/Alteration.vala" - _tmp2_ = self->priv->detail; -#line 138 "/home/jens/Source/shotwell/src/core/Alteration.vala" - _tmp0_ = _tmp2_ != NULL; -#line 886 "Alteration.c" - } else { -#line 138 "/home/jens/Source/shotwell/src/core/Alteration.vala" - _tmp0_ = FALSE; -#line 890 "Alteration.c" - } -#line 138 "/home/jens/Source/shotwell/src/core/Alteration.vala" - if (_tmp0_) { -#line 894 "Alteration.c" - gboolean _tmp3_ = FALSE; - const gchar* _tmp4_; -#line 139 "/home/jens/Source/shotwell/src/core/Alteration.vala" - _tmp4_ = self->priv->subject; -#line 139 "/home/jens/Source/shotwell/src/core/Alteration.vala" - if (alteration_equal_values (_tmp4_, subject)) { -#line 901 "Alteration.c" - const gchar* _tmp5_; -#line 139 "/home/jens/Source/shotwell/src/core/Alteration.vala" - _tmp5_ = self->priv->detail; -#line 139 "/home/jens/Source/shotwell/src/core/Alteration.vala" - _tmp3_ = alteration_equal_values (_tmp5_, detail); -#line 907 "Alteration.c" - } else { -#line 139 "/home/jens/Source/shotwell/src/core/Alteration.vala" - _tmp3_ = FALSE; -#line 911 "Alteration.c" - } -#line 139 "/home/jens/Source/shotwell/src/core/Alteration.vala" - result = _tmp3_; -#line 139 "/home/jens/Source/shotwell/src/core/Alteration.vala" - return result; -#line 917 "Alteration.c" - } -#line 141 "/home/jens/Source/shotwell/src/core/Alteration.vala" - _tmp6_ = self->priv->map; -#line 141 "/home/jens/Source/shotwell/src/core/Alteration.vala" - _vala_assert (_tmp6_ != NULL, "map != null"); -#line 142 "/home/jens/Source/shotwell/src/core/Alteration.vala" - _tmp7_ = self->priv->map; -#line 142 "/home/jens/Source/shotwell/src/core/Alteration.vala" - _tmp8_ = gee_multi_map_get (_tmp7_, subject); -#line 142 "/home/jens/Source/shotwell/src/core/Alteration.vala" - values = _tmp8_; -#line 143 "/home/jens/Source/shotwell/src/core/Alteration.vala" - _tmp9_ = values; -#line 143 "/home/jens/Source/shotwell/src/core/Alteration.vala" - if (_tmp9_ != NULL) { -#line 933 "Alteration.c" - { - GeeIterator* _value_it = NULL; - GeeCollection* _tmp10_; - GeeIterator* _tmp11_; -#line 144 "/home/jens/Source/shotwell/src/core/Alteration.vala" - _tmp10_ = values; -#line 144 "/home/jens/Source/shotwell/src/core/Alteration.vala" - _tmp11_ = gee_iterable_iterator (G_TYPE_CHECK_INSTANCE_CAST (_tmp10_, GEE_TYPE_ITERABLE, GeeIterable)); -#line 144 "/home/jens/Source/shotwell/src/core/Alteration.vala" - _value_it = _tmp11_; -#line 144 "/home/jens/Source/shotwell/src/core/Alteration.vala" - while (TRUE) { -#line 946 "Alteration.c" - GeeIterator* _tmp12_; - gchar* value = NULL; - GeeIterator* _tmp13_; - gpointer _tmp14_; - const gchar* _tmp15_; -#line 144 "/home/jens/Source/shotwell/src/core/Alteration.vala" - _tmp12_ = _value_it; -#line 144 "/home/jens/Source/shotwell/src/core/Alteration.vala" - if (!gee_iterator_next (_tmp12_)) { -#line 144 "/home/jens/Source/shotwell/src/core/Alteration.vala" - break; -#line 958 "Alteration.c" - } -#line 144 "/home/jens/Source/shotwell/src/core/Alteration.vala" - _tmp13_ = _value_it; -#line 144 "/home/jens/Source/shotwell/src/core/Alteration.vala" - _tmp14_ = gee_iterator_get (_tmp13_); -#line 144 "/home/jens/Source/shotwell/src/core/Alteration.vala" - value = (gchar*) _tmp14_; -#line 145 "/home/jens/Source/shotwell/src/core/Alteration.vala" - _tmp15_ = value; -#line 145 "/home/jens/Source/shotwell/src/core/Alteration.vala" - if (alteration_equal_values (_tmp15_, detail)) { -#line 146 "/home/jens/Source/shotwell/src/core/Alteration.vala" - result = TRUE; -#line 146 "/home/jens/Source/shotwell/src/core/Alteration.vala" - _g_free0 (value); -#line 146 "/home/jens/Source/shotwell/src/core/Alteration.vala" - _g_object_unref0 (_value_it); -#line 146 "/home/jens/Source/shotwell/src/core/Alteration.vala" - _g_object_unref0 (values); -#line 146 "/home/jens/Source/shotwell/src/core/Alteration.vala" - return result; -#line 980 "Alteration.c" - } -#line 144 "/home/jens/Source/shotwell/src/core/Alteration.vala" - _g_free0 (value); -#line 984 "Alteration.c" - } -#line 144 "/home/jens/Source/shotwell/src/core/Alteration.vala" - _g_object_unref0 (_value_it); -#line 988 "Alteration.c" - } - } -#line 150 "/home/jens/Source/shotwell/src/core/Alteration.vala" - result = FALSE; -#line 150 "/home/jens/Source/shotwell/src/core/Alteration.vala" - _g_object_unref0 (values); -#line 150 "/home/jens/Source/shotwell/src/core/Alteration.vala" - return result; -#line 997 "Alteration.c" -} - - -GeeCollection* -alteration_get_details (Alteration* self, - const gchar* subject) -{ - GeeCollection* result = NULL; - gboolean _tmp0_ = FALSE; - gboolean _tmp1_ = FALSE; - const gchar* _tmp2_; - GeeCollection* _tmp8_ = NULL; - GeeMultiMap* _tmp9_; -#line 153 "/home/jens/Source/shotwell/src/core/Alteration.vala" - g_return_val_if_fail (IS_ALTERATION (self), NULL); -#line 153 "/home/jens/Source/shotwell/src/core/Alteration.vala" - g_return_val_if_fail (subject != NULL, NULL); -#line 154 "/home/jens/Source/shotwell/src/core/Alteration.vala" - _tmp2_ = self->priv->subject; -#line 154 "/home/jens/Source/shotwell/src/core/Alteration.vala" - if (_tmp2_ != NULL) { -#line 1019 "Alteration.c" - const gchar* _tmp3_; -#line 154 "/home/jens/Source/shotwell/src/core/Alteration.vala" - _tmp3_ = self->priv->detail; -#line 154 "/home/jens/Source/shotwell/src/core/Alteration.vala" - _tmp1_ = _tmp3_ != NULL; -#line 1025 "Alteration.c" - } else { -#line 154 "/home/jens/Source/shotwell/src/core/Alteration.vala" - _tmp1_ = FALSE; -#line 1029 "Alteration.c" - } -#line 154 "/home/jens/Source/shotwell/src/core/Alteration.vala" - if (_tmp1_) { -#line 1033 "Alteration.c" - const gchar* _tmp4_; -#line 154 "/home/jens/Source/shotwell/src/core/Alteration.vala" - _tmp4_ = self->priv->subject; -#line 154 "/home/jens/Source/shotwell/src/core/Alteration.vala" - _tmp0_ = alteration_equal_values (_tmp4_, subject); -#line 1039 "Alteration.c" - } else { -#line 154 "/home/jens/Source/shotwell/src/core/Alteration.vala" - _tmp0_ = FALSE; -#line 1043 "Alteration.c" - } -#line 154 "/home/jens/Source/shotwell/src/core/Alteration.vala" - if (_tmp0_) { -#line 1047 "Alteration.c" - GeeArrayList* details = NULL; - GeeArrayList* _tmp5_; - GeeArrayList* _tmp6_; - const gchar* _tmp7_; -#line 155 "/home/jens/Source/shotwell/src/core/Alteration.vala" - _tmp5_ = gee_array_list_new (G_TYPE_STRING, (GBoxedCopyFunc) g_strdup, (GDestroyNotify) g_free, NULL, NULL, NULL); -#line 155 "/home/jens/Source/shotwell/src/core/Alteration.vala" - details = _tmp5_; -#line 156 "/home/jens/Source/shotwell/src/core/Alteration.vala" - _tmp6_ = details; -#line 156 "/home/jens/Source/shotwell/src/core/Alteration.vala" - _tmp7_ = self->priv->detail; -#line 156 "/home/jens/Source/shotwell/src/core/Alteration.vala" - gee_abstract_collection_add (G_TYPE_CHECK_INSTANCE_CAST (_tmp6_, GEE_TYPE_ABSTRACT_COLLECTION, GeeAbstractCollection), _tmp7_); -#line 158 "/home/jens/Source/shotwell/src/core/Alteration.vala" - result = G_TYPE_CHECK_INSTANCE_CAST (details, GEE_TYPE_COLLECTION, GeeCollection); -#line 158 "/home/jens/Source/shotwell/src/core/Alteration.vala" - return result; -#line 1066 "Alteration.c" - } -#line 161 "/home/jens/Source/shotwell/src/core/Alteration.vala" - _tmp9_ = self->priv->map; -#line 161 "/home/jens/Source/shotwell/src/core/Alteration.vala" - if (_tmp9_ != NULL) { -#line 1072 "Alteration.c" - GeeMultiMap* _tmp10_; - GeeCollection* _tmp11_; -#line 161 "/home/jens/Source/shotwell/src/core/Alteration.vala" - _tmp10_ = self->priv->map; -#line 161 "/home/jens/Source/shotwell/src/core/Alteration.vala" - _tmp11_ = gee_multi_map_get (_tmp10_, subject); -#line 161 "/home/jens/Source/shotwell/src/core/Alteration.vala" - _g_object_unref0 (_tmp8_); -#line 161 "/home/jens/Source/shotwell/src/core/Alteration.vala" - _tmp8_ = _tmp11_; -#line 1083 "Alteration.c" - } else { -#line 161 "/home/jens/Source/shotwell/src/core/Alteration.vala" - _g_object_unref0 (_tmp8_); -#line 161 "/home/jens/Source/shotwell/src/core/Alteration.vala" - _tmp8_ = NULL; -#line 1089 "Alteration.c" - } -#line 161 "/home/jens/Source/shotwell/src/core/Alteration.vala" - result = _tmp8_; -#line 161 "/home/jens/Source/shotwell/src/core/Alteration.vala" - return result; -#line 1095 "Alteration.c" -} - - -gchar* -alteration_to_string (Alteration* self) -{ - gchar* result = NULL; - const gchar* _tmp0_; - GeeMultiMap* _tmp5_; - gchar* str = NULL; - gchar* _tmp6_; -#line 164 "/home/jens/Source/shotwell/src/core/Alteration.vala" - g_return_val_if_fail (IS_ALTERATION (self), NULL); -#line 165 "/home/jens/Source/shotwell/src/core/Alteration.vala" - _tmp0_ = self->priv->subject; -#line 165 "/home/jens/Source/shotwell/src/core/Alteration.vala" - if (_tmp0_ != NULL) { -#line 1113 "Alteration.c" - const gchar* _tmp1_; - const gchar* _tmp2_; - const gchar* _tmp3_; - gchar* _tmp4_; -#line 166 "/home/jens/Source/shotwell/src/core/Alteration.vala" - _tmp1_ = self->priv->detail; -#line 166 "/home/jens/Source/shotwell/src/core/Alteration.vala" - _vala_assert (_tmp1_ != NULL, "detail != null"); -#line 168 "/home/jens/Source/shotwell/src/core/Alteration.vala" - _tmp2_ = self->priv->subject; -#line 168 "/home/jens/Source/shotwell/src/core/Alteration.vala" - _tmp3_ = self->priv->detail; -#line 168 "/home/jens/Source/shotwell/src/core/Alteration.vala" - _tmp4_ = g_strdup_printf ("%s:%s", _tmp2_, _tmp3_); -#line 168 "/home/jens/Source/shotwell/src/core/Alteration.vala" - result = _tmp4_; -#line 168 "/home/jens/Source/shotwell/src/core/Alteration.vala" - return result; -#line 1132 "Alteration.c" - } -#line 171 "/home/jens/Source/shotwell/src/core/Alteration.vala" - _tmp5_ = self->priv->map; -#line 171 "/home/jens/Source/shotwell/src/core/Alteration.vala" - _vala_assert (_tmp5_ != NULL, "map != null"); -#line 173 "/home/jens/Source/shotwell/src/core/Alteration.vala" - _tmp6_ = g_strdup (""); -#line 173 "/home/jens/Source/shotwell/src/core/Alteration.vala" - str = _tmp6_; -#line 1142 "Alteration.c" - { - GeeIterator* _key_it = NULL; - GeeMultiMap* _tmp7_; - GeeSet* _tmp8_; - GeeSet* _tmp9_; - GeeIterator* _tmp10_; - GeeIterator* _tmp11_; -#line 174 "/home/jens/Source/shotwell/src/core/Alteration.vala" - _tmp7_ = self->priv->map; -#line 174 "/home/jens/Source/shotwell/src/core/Alteration.vala" - _tmp8_ = gee_multi_map_get_keys (_tmp7_); -#line 174 "/home/jens/Source/shotwell/src/core/Alteration.vala" - _tmp9_ = _tmp8_; -#line 174 "/home/jens/Source/shotwell/src/core/Alteration.vala" - _tmp10_ = gee_iterable_iterator (G_TYPE_CHECK_INSTANCE_CAST (_tmp9_, GEE_TYPE_ITERABLE, GeeIterable)); -#line 174 "/home/jens/Source/shotwell/src/core/Alteration.vala" - _tmp11_ = _tmp10_; -#line 174 "/home/jens/Source/shotwell/src/core/Alteration.vala" - _g_object_unref0 (_tmp9_); -#line 174 "/home/jens/Source/shotwell/src/core/Alteration.vala" - _key_it = _tmp11_; -#line 174 "/home/jens/Source/shotwell/src/core/Alteration.vala" - while (TRUE) { -#line 1166 "Alteration.c" - GeeIterator* _tmp12_; - gchar* key = NULL; - GeeIterator* _tmp13_; - gpointer _tmp14_; -#line 174 "/home/jens/Source/shotwell/src/core/Alteration.vala" - _tmp12_ = _key_it; -#line 174 "/home/jens/Source/shotwell/src/core/Alteration.vala" - if (!gee_iterator_next (_tmp12_)) { -#line 174 "/home/jens/Source/shotwell/src/core/Alteration.vala" - break; -#line 1177 "Alteration.c" - } -#line 174 "/home/jens/Source/shotwell/src/core/Alteration.vala" - _tmp13_ = _key_it; -#line 174 "/home/jens/Source/shotwell/src/core/Alteration.vala" - _tmp14_ = gee_iterator_get (_tmp13_); -#line 174 "/home/jens/Source/shotwell/src/core/Alteration.vala" - key = (gchar*) _tmp14_; -#line 1185 "Alteration.c" - { - GeeIterator* _value_it = NULL; - GeeMultiMap* _tmp15_; - const gchar* _tmp16_; - GeeCollection* _tmp17_; - GeeCollection* _tmp18_; - GeeIterator* _tmp19_; - GeeIterator* _tmp20_; -#line 175 "/home/jens/Source/shotwell/src/core/Alteration.vala" - _tmp15_ = self->priv->map; -#line 175 "/home/jens/Source/shotwell/src/core/Alteration.vala" - _tmp16_ = key; -#line 175 "/home/jens/Source/shotwell/src/core/Alteration.vala" - _tmp17_ = gee_multi_map_get (_tmp15_, _tmp16_); -#line 175 "/home/jens/Source/shotwell/src/core/Alteration.vala" - _tmp18_ = _tmp17_; -#line 175 "/home/jens/Source/shotwell/src/core/Alteration.vala" - _tmp19_ = gee_iterable_iterator (G_TYPE_CHECK_INSTANCE_CAST (_tmp18_, GEE_TYPE_ITERABLE, GeeIterable)); -#line 175 "/home/jens/Source/shotwell/src/core/Alteration.vala" - _tmp20_ = _tmp19_; -#line 175 "/home/jens/Source/shotwell/src/core/Alteration.vala" - _g_object_unref0 (_tmp18_); -#line 175 "/home/jens/Source/shotwell/src/core/Alteration.vala" - _value_it = _tmp20_; -#line 175 "/home/jens/Source/shotwell/src/core/Alteration.vala" - while (TRUE) { -#line 1212 "Alteration.c" - GeeIterator* _tmp21_; - gchar* value = NULL; - GeeIterator* _tmp22_; - gpointer _tmp23_; - const gchar* _tmp24_; - gint _tmp25_; - gint _tmp26_; - const gchar* _tmp29_; - const gchar* _tmp30_; - const gchar* _tmp31_; - gchar* _tmp32_; - gchar* _tmp33_; - gchar* _tmp34_; -#line 175 "/home/jens/Source/shotwell/src/core/Alteration.vala" - _tmp21_ = _value_it; -#line 175 "/home/jens/Source/shotwell/src/core/Alteration.vala" - if (!gee_iterator_next (_tmp21_)) { -#line 175 "/home/jens/Source/shotwell/src/core/Alteration.vala" - break; -#line 1232 "Alteration.c" - } -#line 175 "/home/jens/Source/shotwell/src/core/Alteration.vala" - _tmp22_ = _value_it; -#line 175 "/home/jens/Source/shotwell/src/core/Alteration.vala" - _tmp23_ = gee_iterator_get (_tmp22_); -#line 175 "/home/jens/Source/shotwell/src/core/Alteration.vala" - value = (gchar*) _tmp23_; -#line 176 "/home/jens/Source/shotwell/src/core/Alteration.vala" - _tmp24_ = str; -#line 176 "/home/jens/Source/shotwell/src/core/Alteration.vala" - _tmp25_ = strlen (_tmp24_); -#line 176 "/home/jens/Source/shotwell/src/core/Alteration.vala" - _tmp26_ = _tmp25_; -#line 176 "/home/jens/Source/shotwell/src/core/Alteration.vala" - if (_tmp26_ != 0) { -#line 1248 "Alteration.c" - const gchar* _tmp27_; - gchar* _tmp28_; -#line 177 "/home/jens/Source/shotwell/src/core/Alteration.vala" - _tmp27_ = str; -#line 177 "/home/jens/Source/shotwell/src/core/Alteration.vala" - _tmp28_ = g_strconcat (_tmp27_, ", ", NULL); -#line 177 "/home/jens/Source/shotwell/src/core/Alteration.vala" - _g_free0 (str); -#line 177 "/home/jens/Source/shotwell/src/core/Alteration.vala" - str = _tmp28_; -#line 1259 "Alteration.c" - } -#line 179 "/home/jens/Source/shotwell/src/core/Alteration.vala" - _tmp29_ = str; -#line 179 "/home/jens/Source/shotwell/src/core/Alteration.vala" - _tmp30_ = key; -#line 179 "/home/jens/Source/shotwell/src/core/Alteration.vala" - _tmp31_ = value; -#line 179 "/home/jens/Source/shotwell/src/core/Alteration.vala" - _tmp32_ = g_strdup_printf ("%s:%s", _tmp30_, _tmp31_); -#line 179 "/home/jens/Source/shotwell/src/core/Alteration.vala" - _tmp33_ = _tmp32_; -#line 179 "/home/jens/Source/shotwell/src/core/Alteration.vala" - _tmp34_ = g_strconcat (_tmp29_, _tmp33_, NULL); -#line 179 "/home/jens/Source/shotwell/src/core/Alteration.vala" - _g_free0 (str); -#line 179 "/home/jens/Source/shotwell/src/core/Alteration.vala" - str = _tmp34_; -#line 179 "/home/jens/Source/shotwell/src/core/Alteration.vala" - _g_free0 (_tmp33_); -#line 175 "/home/jens/Source/shotwell/src/core/Alteration.vala" - _g_free0 (value); -#line 1281 "Alteration.c" - } -#line 175 "/home/jens/Source/shotwell/src/core/Alteration.vala" - _g_object_unref0 (_value_it); -#line 1285 "Alteration.c" - } -#line 174 "/home/jens/Source/shotwell/src/core/Alteration.vala" - _g_free0 (key); -#line 1289 "Alteration.c" - } -#line 174 "/home/jens/Source/shotwell/src/core/Alteration.vala" - _g_object_unref0 (_key_it); -#line 1293 "Alteration.c" - } -#line 183 "/home/jens/Source/shotwell/src/core/Alteration.vala" - result = str; -#line 183 "/home/jens/Source/shotwell/src/core/Alteration.vala" - return result; -#line 1299 "Alteration.c" -} - - -gboolean -alteration_contains_any (Alteration* self, - Alteration* other) -{ - gboolean result = FALSE; - gboolean _tmp0_ = FALSE; - gboolean _tmp1_ = FALSE; - gboolean _tmp2_ = FALSE; - const gchar* _tmp3_; - gboolean _tmp12_ = FALSE; - gboolean _tmp13_ = FALSE; - GeeMultiMap* _tmp14_; - gboolean _tmp42_ = FALSE; - GeeMultiMap* _tmp43_; -#line 187 "/home/jens/Source/shotwell/src/core/Alteration.vala" - g_return_val_if_fail (IS_ALTERATION (self), FALSE); -#line 187 "/home/jens/Source/shotwell/src/core/Alteration.vala" - g_return_val_if_fail (IS_ALTERATION (other), FALSE); -#line 189 "/home/jens/Source/shotwell/src/core/Alteration.vala" - if (self == other) { -#line 190 "/home/jens/Source/shotwell/src/core/Alteration.vala" - result = TRUE; -#line 190 "/home/jens/Source/shotwell/src/core/Alteration.vala" - return result; -#line 1327 "Alteration.c" - } -#line 193 "/home/jens/Source/shotwell/src/core/Alteration.vala" - _tmp3_ = self->priv->subject; -#line 193 "/home/jens/Source/shotwell/src/core/Alteration.vala" - if (_tmp3_ != NULL) { -#line 1333 "Alteration.c" - const gchar* _tmp4_; -#line 193 "/home/jens/Source/shotwell/src/core/Alteration.vala" - _tmp4_ = other->priv->subject; -#line 193 "/home/jens/Source/shotwell/src/core/Alteration.vala" - _tmp2_ = _tmp4_ != NULL; -#line 1339 "Alteration.c" - } else { -#line 193 "/home/jens/Source/shotwell/src/core/Alteration.vala" - _tmp2_ = FALSE; -#line 1343 "Alteration.c" - } -#line 193 "/home/jens/Source/shotwell/src/core/Alteration.vala" - if (_tmp2_) { -#line 1347 "Alteration.c" - const gchar* _tmp5_; -#line 193 "/home/jens/Source/shotwell/src/core/Alteration.vala" - _tmp5_ = self->priv->detail; -#line 193 "/home/jens/Source/shotwell/src/core/Alteration.vala" - _tmp1_ = _tmp5_ != NULL; -#line 1353 "Alteration.c" - } else { -#line 193 "/home/jens/Source/shotwell/src/core/Alteration.vala" - _tmp1_ = FALSE; -#line 1357 "Alteration.c" - } -#line 193 "/home/jens/Source/shotwell/src/core/Alteration.vala" - if (_tmp1_) { -#line 1361 "Alteration.c" - const gchar* _tmp6_; -#line 193 "/home/jens/Source/shotwell/src/core/Alteration.vala" - _tmp6_ = other->priv->detail; -#line 193 "/home/jens/Source/shotwell/src/core/Alteration.vala" - _tmp0_ = _tmp6_ != NULL; -#line 1367 "Alteration.c" - } else { -#line 193 "/home/jens/Source/shotwell/src/core/Alteration.vala" - _tmp0_ = FALSE; -#line 1371 "Alteration.c" - } -#line 193 "/home/jens/Source/shotwell/src/core/Alteration.vala" - if (_tmp0_) { -#line 1375 "Alteration.c" - gboolean _tmp7_ = FALSE; - const gchar* _tmp8_; - const gchar* _tmp9_; -#line 194 "/home/jens/Source/shotwell/src/core/Alteration.vala" - _tmp8_ = self->priv->subject; -#line 194 "/home/jens/Source/shotwell/src/core/Alteration.vala" - _tmp9_ = other->priv->subject; -#line 194 "/home/jens/Source/shotwell/src/core/Alteration.vala" - if (alteration_equal_values (_tmp8_, _tmp9_)) { -#line 1385 "Alteration.c" - const gchar* _tmp10_; - const gchar* _tmp11_; -#line 194 "/home/jens/Source/shotwell/src/core/Alteration.vala" - _tmp10_ = self->priv->detail; -#line 194 "/home/jens/Source/shotwell/src/core/Alteration.vala" - _tmp11_ = other->priv->detail; -#line 194 "/home/jens/Source/shotwell/src/core/Alteration.vala" - _tmp7_ = alteration_equal_values (_tmp10_, _tmp11_); -#line 1394 "Alteration.c" - } else { -#line 194 "/home/jens/Source/shotwell/src/core/Alteration.vala" - _tmp7_ = FALSE; -#line 1398 "Alteration.c" - } -#line 194 "/home/jens/Source/shotwell/src/core/Alteration.vala" - result = _tmp7_; -#line 194 "/home/jens/Source/shotwell/src/core/Alteration.vala" - return result; -#line 1404 "Alteration.c" - } -#line 197 "/home/jens/Source/shotwell/src/core/Alteration.vala" - _tmp14_ = self->priv->map; -#line 197 "/home/jens/Source/shotwell/src/core/Alteration.vala" - if (_tmp14_ != NULL) { -#line 1410 "Alteration.c" - GeeMultiMap* _tmp15_; -#line 197 "/home/jens/Source/shotwell/src/core/Alteration.vala" - _tmp15_ = other->priv->map; -#line 197 "/home/jens/Source/shotwell/src/core/Alteration.vala" - _tmp13_ = _tmp15_ == NULL; -#line 1416 "Alteration.c" - } else { -#line 197 "/home/jens/Source/shotwell/src/core/Alteration.vala" - _tmp13_ = FALSE; -#line 1420 "Alteration.c" - } -#line 197 "/home/jens/Source/shotwell/src/core/Alteration.vala" - if (_tmp13_) { -#line 197 "/home/jens/Source/shotwell/src/core/Alteration.vala" - _tmp12_ = TRUE; -#line 1426 "Alteration.c" - } else { - gboolean _tmp16_ = FALSE; - GeeMultiMap* _tmp17_; -#line 197 "/home/jens/Source/shotwell/src/core/Alteration.vala" - _tmp17_ = self->priv->map; -#line 197 "/home/jens/Source/shotwell/src/core/Alteration.vala" - if (_tmp17_ == NULL) { -#line 1434 "Alteration.c" - GeeMultiMap* _tmp18_; -#line 197 "/home/jens/Source/shotwell/src/core/Alteration.vala" - _tmp18_ = other->priv->map; -#line 197 "/home/jens/Source/shotwell/src/core/Alteration.vala" - _tmp16_ = _tmp18_ != NULL; -#line 1440 "Alteration.c" - } else { -#line 197 "/home/jens/Source/shotwell/src/core/Alteration.vala" - _tmp16_ = FALSE; -#line 1444 "Alteration.c" - } -#line 197 "/home/jens/Source/shotwell/src/core/Alteration.vala" - _tmp12_ = _tmp16_; -#line 1448 "Alteration.c" - } -#line 197 "/home/jens/Source/shotwell/src/core/Alteration.vala" - if (_tmp12_) { -#line 1452 "Alteration.c" - const gchar* _tmp19_ = NULL; - const gchar* _tmp20_; - gchar* single_subject = NULL; - gchar* _tmp23_; - const gchar* _tmp24_ = NULL; - const gchar* _tmp25_; - gchar* single_detail = NULL; - gchar* _tmp28_; - GeeMultiMap* _tmp29_ = NULL; - GeeMultiMap* _tmp30_; - GeeMultiMap* multimap = NULL; - GeeMultiMap* _tmp33_; - gboolean _tmp34_ = FALSE; - GeeMultiMap* _tmp35_; - const gchar* _tmp36_; -#line 198 "/home/jens/Source/shotwell/src/core/Alteration.vala" - _tmp20_ = self->priv->subject; -#line 198 "/home/jens/Source/shotwell/src/core/Alteration.vala" - if (_tmp20_ != NULL) { -#line 1472 "Alteration.c" - const gchar* _tmp21_; -#line 198 "/home/jens/Source/shotwell/src/core/Alteration.vala" - _tmp21_ = self->priv->subject; -#line 198 "/home/jens/Source/shotwell/src/core/Alteration.vala" - _tmp19_ = _tmp21_; -#line 1478 "Alteration.c" - } else { - const gchar* _tmp22_; -#line 198 "/home/jens/Source/shotwell/src/core/Alteration.vala" - _tmp22_ = other->priv->subject; -#line 198 "/home/jens/Source/shotwell/src/core/Alteration.vala" - _tmp19_ = _tmp22_; -#line 1485 "Alteration.c" - } -#line 198 "/home/jens/Source/shotwell/src/core/Alteration.vala" - _tmp23_ = g_strdup (_tmp19_); -#line 198 "/home/jens/Source/shotwell/src/core/Alteration.vala" - single_subject = _tmp23_; -#line 199 "/home/jens/Source/shotwell/src/core/Alteration.vala" - _tmp25_ = self->priv->detail; -#line 199 "/home/jens/Source/shotwell/src/core/Alteration.vala" - if (_tmp25_ != NULL) { -#line 1495 "Alteration.c" - const gchar* _tmp26_; -#line 199 "/home/jens/Source/shotwell/src/core/Alteration.vala" - _tmp26_ = self->priv->detail; -#line 199 "/home/jens/Source/shotwell/src/core/Alteration.vala" - _tmp24_ = _tmp26_; -#line 1501 "Alteration.c" - } else { - const gchar* _tmp27_; -#line 199 "/home/jens/Source/shotwell/src/core/Alteration.vala" - _tmp27_ = other->priv->detail; -#line 199 "/home/jens/Source/shotwell/src/core/Alteration.vala" - _tmp24_ = _tmp27_; -#line 1508 "Alteration.c" - } -#line 199 "/home/jens/Source/shotwell/src/core/Alteration.vala" - _tmp28_ = g_strdup (_tmp24_); -#line 199 "/home/jens/Source/shotwell/src/core/Alteration.vala" - single_detail = _tmp28_; -#line 200 "/home/jens/Source/shotwell/src/core/Alteration.vala" - _tmp30_ = self->priv->map; -#line 200 "/home/jens/Source/shotwell/src/core/Alteration.vala" - if (_tmp30_ != NULL) { -#line 1518 "Alteration.c" - GeeMultiMap* _tmp31_; -#line 200 "/home/jens/Source/shotwell/src/core/Alteration.vala" - _tmp31_ = self->priv->map; -#line 200 "/home/jens/Source/shotwell/src/core/Alteration.vala" - _tmp29_ = _tmp31_; -#line 1524 "Alteration.c" - } else { - GeeMultiMap* _tmp32_; -#line 200 "/home/jens/Source/shotwell/src/core/Alteration.vala" - _tmp32_ = other->priv->map; -#line 200 "/home/jens/Source/shotwell/src/core/Alteration.vala" - _tmp29_ = _tmp32_; -#line 1531 "Alteration.c" - } -#line 200 "/home/jens/Source/shotwell/src/core/Alteration.vala" - _tmp33_ = _g_object_ref0 (_tmp29_); -#line 200 "/home/jens/Source/shotwell/src/core/Alteration.vala" - multimap = _tmp33_; -#line 202 "/home/jens/Source/shotwell/src/core/Alteration.vala" - _tmp35_ = multimap; -#line 202 "/home/jens/Source/shotwell/src/core/Alteration.vala" - _tmp36_ = single_subject; -#line 202 "/home/jens/Source/shotwell/src/core/Alteration.vala" - if (gee_multi_map_contains (_tmp35_, _tmp36_)) { -#line 1543 "Alteration.c" - GeeMultiMap* _tmp37_; - const gchar* _tmp38_; - GeeCollection* _tmp39_; - GeeCollection* _tmp40_; - const gchar* _tmp41_; -#line 202 "/home/jens/Source/shotwell/src/core/Alteration.vala" - _tmp37_ = self->priv->map; -#line 202 "/home/jens/Source/shotwell/src/core/Alteration.vala" - _tmp38_ = single_subject; -#line 202 "/home/jens/Source/shotwell/src/core/Alteration.vala" - _tmp39_ = gee_multi_map_get (_tmp37_, _tmp38_); -#line 202 "/home/jens/Source/shotwell/src/core/Alteration.vala" - _tmp40_ = _tmp39_; -#line 202 "/home/jens/Source/shotwell/src/core/Alteration.vala" - _tmp41_ = single_detail; -#line 202 "/home/jens/Source/shotwell/src/core/Alteration.vala" - _tmp34_ = gee_collection_contains (_tmp40_, _tmp41_); -#line 202 "/home/jens/Source/shotwell/src/core/Alteration.vala" - _g_object_unref0 (_tmp40_); -#line 1563 "Alteration.c" - } else { -#line 202 "/home/jens/Source/shotwell/src/core/Alteration.vala" - _tmp34_ = FALSE; -#line 1567 "Alteration.c" - } -#line 202 "/home/jens/Source/shotwell/src/core/Alteration.vala" - result = _tmp34_; -#line 202 "/home/jens/Source/shotwell/src/core/Alteration.vala" - _g_object_unref0 (multimap); -#line 202 "/home/jens/Source/shotwell/src/core/Alteration.vala" - _g_free0 (single_detail); -#line 202 "/home/jens/Source/shotwell/src/core/Alteration.vala" - _g_free0 (single_subject); -#line 202 "/home/jens/Source/shotwell/src/core/Alteration.vala" - return result; -#line 1579 "Alteration.c" - } -#line 206 "/home/jens/Source/shotwell/src/core/Alteration.vala" - _tmp43_ = self->priv->map; -#line 206 "/home/jens/Source/shotwell/src/core/Alteration.vala" - if (_tmp43_ != NULL) { -#line 1585 "Alteration.c" - GeeMultiMap* _tmp44_; -#line 206 "/home/jens/Source/shotwell/src/core/Alteration.vala" - _tmp44_ = other->priv->map; -#line 206 "/home/jens/Source/shotwell/src/core/Alteration.vala" - _tmp42_ = _tmp44_ != NULL; -#line 1591 "Alteration.c" - } else { -#line 206 "/home/jens/Source/shotwell/src/core/Alteration.vala" - _tmp42_ = FALSE; -#line 1595 "Alteration.c" - } -#line 206 "/home/jens/Source/shotwell/src/core/Alteration.vala" - if (_tmp42_) { -#line 1599 "Alteration.c" - GeeSet* keys = NULL; - GeeMultiMap* _tmp45_; - GeeSet* _tmp46_; - GeeSet* _tmp47_; - GeeSet* other_keys = NULL; - GeeMultiMap* _tmp48_; - GeeSet* _tmp49_; - GeeSet* _tmp50_; -#line 207 "/home/jens/Source/shotwell/src/core/Alteration.vala" - _tmp45_ = self->priv->map; -#line 207 "/home/jens/Source/shotwell/src/core/Alteration.vala" - _tmp46_ = gee_multi_map_get_keys (_tmp45_); -#line 207 "/home/jens/Source/shotwell/src/core/Alteration.vala" - keys = _tmp46_; -#line 208 "/home/jens/Source/shotwell/src/core/Alteration.vala" - _tmp47_ = keys; -#line 208 "/home/jens/Source/shotwell/src/core/Alteration.vala" - _vala_assert (_tmp47_ != NULL, "keys != null"); -#line 209 "/home/jens/Source/shotwell/src/core/Alteration.vala" - _tmp48_ = other->priv->map; -#line 209 "/home/jens/Source/shotwell/src/core/Alteration.vala" - _tmp49_ = gee_multi_map_get_keys (_tmp48_); -#line 209 "/home/jens/Source/shotwell/src/core/Alteration.vala" - other_keys = _tmp49_; -#line 210 "/home/jens/Source/shotwell/src/core/Alteration.vala" - _tmp50_ = other_keys; -#line 210 "/home/jens/Source/shotwell/src/core/Alteration.vala" - _vala_assert (_tmp50_ != NULL, "other_keys != null"); -#line 1628 "Alteration.c" - { - GeeIterator* _subject_it = NULL; - GeeSet* _tmp51_; - GeeIterator* _tmp52_; -#line 212 "/home/jens/Source/shotwell/src/core/Alteration.vala" - _tmp51_ = other_keys; -#line 212 "/home/jens/Source/shotwell/src/core/Alteration.vala" - _tmp52_ = gee_iterable_iterator (G_TYPE_CHECK_INSTANCE_CAST (_tmp51_, GEE_TYPE_ITERABLE, GeeIterable)); -#line 212 "/home/jens/Source/shotwell/src/core/Alteration.vala" - _subject_it = _tmp52_; -#line 212 "/home/jens/Source/shotwell/src/core/Alteration.vala" - while (TRUE) { -#line 1641 "Alteration.c" - GeeIterator* _tmp53_; - gchar* subject = NULL; - GeeIterator* _tmp54_; - gpointer _tmp55_; - GeeSet* _tmp56_; - const gchar* _tmp57_; - GeeCollection* details = NULL; - GeeMultiMap* _tmp58_; - const gchar* _tmp59_; - GeeCollection* _tmp60_; - GeeCollection* other_details = NULL; - GeeMultiMap* _tmp61_; - const gchar* _tmp62_; - GeeCollection* _tmp63_; - gboolean _tmp64_ = FALSE; - GeeCollection* _tmp65_; -#line 212 "/home/jens/Source/shotwell/src/core/Alteration.vala" - _tmp53_ = _subject_it; -#line 212 "/home/jens/Source/shotwell/src/core/Alteration.vala" - if (!gee_iterator_next (_tmp53_)) { -#line 212 "/home/jens/Source/shotwell/src/core/Alteration.vala" - break; -#line 1664 "Alteration.c" - } -#line 212 "/home/jens/Source/shotwell/src/core/Alteration.vala" - _tmp54_ = _subject_it; -#line 212 "/home/jens/Source/shotwell/src/core/Alteration.vala" - _tmp55_ = gee_iterator_get (_tmp54_); -#line 212 "/home/jens/Source/shotwell/src/core/Alteration.vala" - subject = (gchar*) _tmp55_; -#line 213 "/home/jens/Source/shotwell/src/core/Alteration.vala" - _tmp56_ = keys; -#line 213 "/home/jens/Source/shotwell/src/core/Alteration.vala" - _tmp57_ = subject; -#line 213 "/home/jens/Source/shotwell/src/core/Alteration.vala" - if (!gee_collection_contains (G_TYPE_CHECK_INSTANCE_CAST (_tmp56_, GEE_TYPE_COLLECTION, GeeCollection), _tmp57_)) { -#line 214 "/home/jens/Source/shotwell/src/core/Alteration.vala" - _g_free0 (subject); -#line 214 "/home/jens/Source/shotwell/src/core/Alteration.vala" - continue; -#line 1682 "Alteration.c" - } -#line 216 "/home/jens/Source/shotwell/src/core/Alteration.vala" - _tmp58_ = self->priv->map; -#line 216 "/home/jens/Source/shotwell/src/core/Alteration.vala" - _tmp59_ = subject; -#line 216 "/home/jens/Source/shotwell/src/core/Alteration.vala" - _tmp60_ = gee_multi_map_get (_tmp58_, _tmp59_); -#line 216 "/home/jens/Source/shotwell/src/core/Alteration.vala" - details = _tmp60_; -#line 217 "/home/jens/Source/shotwell/src/core/Alteration.vala" - _tmp61_ = other->priv->map; -#line 217 "/home/jens/Source/shotwell/src/core/Alteration.vala" - _tmp62_ = subject; -#line 217 "/home/jens/Source/shotwell/src/core/Alteration.vala" - _tmp63_ = gee_multi_map_get (_tmp61_, _tmp62_); -#line 217 "/home/jens/Source/shotwell/src/core/Alteration.vala" - other_details = _tmp63_; -#line 219 "/home/jens/Source/shotwell/src/core/Alteration.vala" - _tmp65_ = details; -#line 219 "/home/jens/Source/shotwell/src/core/Alteration.vala" - if (_tmp65_ != NULL) { -#line 1704 "Alteration.c" - GeeCollection* _tmp66_; -#line 219 "/home/jens/Source/shotwell/src/core/Alteration.vala" - _tmp66_ = other_details; -#line 219 "/home/jens/Source/shotwell/src/core/Alteration.vala" - _tmp64_ = _tmp66_ != NULL; -#line 1710 "Alteration.c" - } else { -#line 219 "/home/jens/Source/shotwell/src/core/Alteration.vala" - _tmp64_ = FALSE; -#line 1714 "Alteration.c" - } -#line 219 "/home/jens/Source/shotwell/src/core/Alteration.vala" - if (_tmp64_) { -#line 1718 "Alteration.c" - { - GeeIterator* _detail_it = NULL; - GeeCollection* _tmp67_; - GeeIterator* _tmp68_; -#line 220 "/home/jens/Source/shotwell/src/core/Alteration.vala" - _tmp67_ = other_details; -#line 220 "/home/jens/Source/shotwell/src/core/Alteration.vala" - _tmp68_ = gee_iterable_iterator (G_TYPE_CHECK_INSTANCE_CAST (_tmp67_, GEE_TYPE_ITERABLE, GeeIterable)); -#line 220 "/home/jens/Source/shotwell/src/core/Alteration.vala" - _detail_it = _tmp68_; -#line 220 "/home/jens/Source/shotwell/src/core/Alteration.vala" - while (TRUE) { -#line 1731 "Alteration.c" - GeeIterator* _tmp69_; - gchar* detail = NULL; - GeeIterator* _tmp70_; - gpointer _tmp71_; - GeeCollection* _tmp72_; - const gchar* _tmp73_; -#line 220 "/home/jens/Source/shotwell/src/core/Alteration.vala" - _tmp69_ = _detail_it; -#line 220 "/home/jens/Source/shotwell/src/core/Alteration.vala" - if (!gee_iterator_next (_tmp69_)) { -#line 220 "/home/jens/Source/shotwell/src/core/Alteration.vala" - break; -#line 1744 "Alteration.c" - } -#line 220 "/home/jens/Source/shotwell/src/core/Alteration.vala" - _tmp70_ = _detail_it; -#line 220 "/home/jens/Source/shotwell/src/core/Alteration.vala" - _tmp71_ = gee_iterator_get (_tmp70_); -#line 220 "/home/jens/Source/shotwell/src/core/Alteration.vala" - detail = (gchar*) _tmp71_; -#line 221 "/home/jens/Source/shotwell/src/core/Alteration.vala" - _tmp72_ = details; -#line 221 "/home/jens/Source/shotwell/src/core/Alteration.vala" - _tmp73_ = detail; -#line 221 "/home/jens/Source/shotwell/src/core/Alteration.vala" - if (gee_collection_contains (_tmp72_, _tmp73_)) { -#line 222 "/home/jens/Source/shotwell/src/core/Alteration.vala" - result = TRUE; -#line 222 "/home/jens/Source/shotwell/src/core/Alteration.vala" - _g_free0 (detail); -#line 222 "/home/jens/Source/shotwell/src/core/Alteration.vala" - _g_object_unref0 (_detail_it); -#line 222 "/home/jens/Source/shotwell/src/core/Alteration.vala" - _g_object_unref0 (other_details); -#line 222 "/home/jens/Source/shotwell/src/core/Alteration.vala" - _g_object_unref0 (details); -#line 222 "/home/jens/Source/shotwell/src/core/Alteration.vala" - _g_free0 (subject); -#line 222 "/home/jens/Source/shotwell/src/core/Alteration.vala" - _g_object_unref0 (_subject_it); -#line 222 "/home/jens/Source/shotwell/src/core/Alteration.vala" - _g_object_unref0 (other_keys); -#line 222 "/home/jens/Source/shotwell/src/core/Alteration.vala" - _g_object_unref0 (keys); -#line 222 "/home/jens/Source/shotwell/src/core/Alteration.vala" - return result; -#line 1778 "Alteration.c" - } -#line 220 "/home/jens/Source/shotwell/src/core/Alteration.vala" - _g_free0 (detail); -#line 1782 "Alteration.c" - } -#line 220 "/home/jens/Source/shotwell/src/core/Alteration.vala" - _g_object_unref0 (_detail_it); -#line 1786 "Alteration.c" - } - } -#line 212 "/home/jens/Source/shotwell/src/core/Alteration.vala" - _g_object_unref0 (other_details); -#line 212 "/home/jens/Source/shotwell/src/core/Alteration.vala" - _g_object_unref0 (details); -#line 212 "/home/jens/Source/shotwell/src/core/Alteration.vala" - _g_free0 (subject); -#line 1795 "Alteration.c" - } -#line 212 "/home/jens/Source/shotwell/src/core/Alteration.vala" - _g_object_unref0 (_subject_it); -#line 1799 "Alteration.c" - } -#line 206 "/home/jens/Source/shotwell/src/core/Alteration.vala" - _g_object_unref0 (other_keys); -#line 206 "/home/jens/Source/shotwell/src/core/Alteration.vala" - _g_object_unref0 (keys); -#line 1805 "Alteration.c" - } -#line 228 "/home/jens/Source/shotwell/src/core/Alteration.vala" - result = FALSE; -#line 228 "/home/jens/Source/shotwell/src/core/Alteration.vala" - return result; -#line 1811 "Alteration.c" -} - - -gboolean -alteration_equals (Alteration* self, - Alteration* other) -{ - gboolean result = FALSE; - gboolean _tmp0_ = FALSE; - gboolean _tmp1_ = FALSE; - gboolean _tmp2_ = FALSE; - const gchar* _tmp3_; - gboolean _tmp12_ = FALSE; - GeeMultiMap* _tmp13_; -#line 231 "/home/jens/Source/shotwell/src/core/Alteration.vala" - g_return_val_if_fail (IS_ALTERATION (self), FALSE); -#line 231 "/home/jens/Source/shotwell/src/core/Alteration.vala" - g_return_val_if_fail (IS_ALTERATION (other), FALSE); -#line 233 "/home/jens/Source/shotwell/src/core/Alteration.vala" - if (self == other) { -#line 234 "/home/jens/Source/shotwell/src/core/Alteration.vala" - result = TRUE; -#line 234 "/home/jens/Source/shotwell/src/core/Alteration.vala" - return result; -#line 1836 "Alteration.c" - } -#line 237 "/home/jens/Source/shotwell/src/core/Alteration.vala" - _tmp3_ = self->priv->subject; -#line 237 "/home/jens/Source/shotwell/src/core/Alteration.vala" - if (_tmp3_ != NULL) { -#line 1842 "Alteration.c" - const gchar* _tmp4_; -#line 237 "/home/jens/Source/shotwell/src/core/Alteration.vala" - _tmp4_ = other->priv->subject; -#line 237 "/home/jens/Source/shotwell/src/core/Alteration.vala" - _tmp2_ = _tmp4_ != NULL; -#line 1848 "Alteration.c" - } else { -#line 237 "/home/jens/Source/shotwell/src/core/Alteration.vala" - _tmp2_ = FALSE; -#line 1852 "Alteration.c" - } -#line 237 "/home/jens/Source/shotwell/src/core/Alteration.vala" - if (_tmp2_) { -#line 1856 "Alteration.c" - const gchar* _tmp5_; -#line 237 "/home/jens/Source/shotwell/src/core/Alteration.vala" - _tmp5_ = self->priv->detail; -#line 237 "/home/jens/Source/shotwell/src/core/Alteration.vala" - _tmp1_ = _tmp5_ != NULL; -#line 1862 "Alteration.c" - } else { -#line 237 "/home/jens/Source/shotwell/src/core/Alteration.vala" - _tmp1_ = FALSE; -#line 1866 "Alteration.c" - } -#line 237 "/home/jens/Source/shotwell/src/core/Alteration.vala" - if (_tmp1_) { -#line 1870 "Alteration.c" - const gchar* _tmp6_; -#line 237 "/home/jens/Source/shotwell/src/core/Alteration.vala" - _tmp6_ = other->priv->detail; -#line 237 "/home/jens/Source/shotwell/src/core/Alteration.vala" - _tmp0_ = _tmp6_ != NULL; -#line 1876 "Alteration.c" - } else { -#line 237 "/home/jens/Source/shotwell/src/core/Alteration.vala" - _tmp0_ = FALSE; -#line 1880 "Alteration.c" - } -#line 237 "/home/jens/Source/shotwell/src/core/Alteration.vala" - if (_tmp0_) { -#line 1884 "Alteration.c" - gboolean _tmp7_ = FALSE; - const gchar* _tmp8_; - const gchar* _tmp9_; -#line 238 "/home/jens/Source/shotwell/src/core/Alteration.vala" - _tmp8_ = self->priv->subject; -#line 238 "/home/jens/Source/shotwell/src/core/Alteration.vala" - _tmp9_ = other->priv->subject; -#line 238 "/home/jens/Source/shotwell/src/core/Alteration.vala" - if (alteration_equal_values (_tmp8_, _tmp9_)) { -#line 1894 "Alteration.c" - const gchar* _tmp10_; - const gchar* _tmp11_; -#line 238 "/home/jens/Source/shotwell/src/core/Alteration.vala" - _tmp10_ = self->priv->detail; -#line 238 "/home/jens/Source/shotwell/src/core/Alteration.vala" - _tmp11_ = other->priv->detail; -#line 238 "/home/jens/Source/shotwell/src/core/Alteration.vala" - _tmp7_ = alteration_equal_values (_tmp10_, _tmp11_); -#line 1903 "Alteration.c" - } else { -#line 238 "/home/jens/Source/shotwell/src/core/Alteration.vala" - _tmp7_ = FALSE; -#line 1907 "Alteration.c" - } -#line 238 "/home/jens/Source/shotwell/src/core/Alteration.vala" - result = _tmp7_; -#line 238 "/home/jens/Source/shotwell/src/core/Alteration.vala" - return result; -#line 1913 "Alteration.c" - } -#line 241 "/home/jens/Source/shotwell/src/core/Alteration.vala" - _tmp13_ = self->priv->map; -#line 241 "/home/jens/Source/shotwell/src/core/Alteration.vala" - if (_tmp13_ != NULL) { -#line 1919 "Alteration.c" - GeeMultiMap* _tmp14_; -#line 241 "/home/jens/Source/shotwell/src/core/Alteration.vala" - _tmp14_ = other->priv->map; -#line 241 "/home/jens/Source/shotwell/src/core/Alteration.vala" - _tmp12_ = _tmp14_ != NULL; -#line 1925 "Alteration.c" - } else { -#line 241 "/home/jens/Source/shotwell/src/core/Alteration.vala" - _tmp12_ = FALSE; -#line 1929 "Alteration.c" - } -#line 241 "/home/jens/Source/shotwell/src/core/Alteration.vala" - if (_tmp12_) { -#line 1933 "Alteration.c" - GeeSet* keys = NULL; - GeeMultiMap* _tmp15_; - GeeSet* _tmp16_; - GeeSet* _tmp17_; - GeeSet* other_keys = NULL; - GeeMultiMap* _tmp18_; - GeeSet* _tmp19_; - GeeSet* _tmp20_; - GeeSet* _tmp21_; - gint _tmp22_; - gint _tmp23_; - GeeSet* _tmp24_; - gint _tmp25_; - gint _tmp26_; - GeeSet* _tmp27_; - GeeSet* _tmp28_; - GeeSet* _tmp29_; - GeeSet* _tmp30_; -#line 243 "/home/jens/Source/shotwell/src/core/Alteration.vala" - _tmp15_ = self->priv->map; -#line 243 "/home/jens/Source/shotwell/src/core/Alteration.vala" - _tmp16_ = gee_multi_map_get_keys (_tmp15_); -#line 243 "/home/jens/Source/shotwell/src/core/Alteration.vala" - keys = _tmp16_; -#line 244 "/home/jens/Source/shotwell/src/core/Alteration.vala" - _tmp17_ = keys; -#line 244 "/home/jens/Source/shotwell/src/core/Alteration.vala" - _vala_assert (_tmp17_ != NULL, "keys != null"); -#line 245 "/home/jens/Source/shotwell/src/core/Alteration.vala" - _tmp18_ = other->priv->map; -#line 245 "/home/jens/Source/shotwell/src/core/Alteration.vala" - _tmp19_ = gee_multi_map_get_keys (_tmp18_); -#line 245 "/home/jens/Source/shotwell/src/core/Alteration.vala" - other_keys = _tmp19_; -#line 246 "/home/jens/Source/shotwell/src/core/Alteration.vala" - _tmp20_ = other_keys; -#line 246 "/home/jens/Source/shotwell/src/core/Alteration.vala" - _vala_assert (_tmp20_ != NULL, "other_keys != null"); -#line 248 "/home/jens/Source/shotwell/src/core/Alteration.vala" - _tmp21_ = keys; -#line 248 "/home/jens/Source/shotwell/src/core/Alteration.vala" - _tmp22_ = gee_collection_get_size (G_TYPE_CHECK_INSTANCE_CAST (_tmp21_, GEE_TYPE_COLLECTION, GeeCollection)); -#line 248 "/home/jens/Source/shotwell/src/core/Alteration.vala" - _tmp23_ = _tmp22_; -#line 248 "/home/jens/Source/shotwell/src/core/Alteration.vala" - _tmp24_ = other_keys; -#line 248 "/home/jens/Source/shotwell/src/core/Alteration.vala" - _tmp25_ = gee_collection_get_size (G_TYPE_CHECK_INSTANCE_CAST (_tmp24_, GEE_TYPE_COLLECTION, GeeCollection)); -#line 248 "/home/jens/Source/shotwell/src/core/Alteration.vala" - _tmp26_ = _tmp25_; -#line 248 "/home/jens/Source/shotwell/src/core/Alteration.vala" - if (_tmp23_ != _tmp26_) { -#line 249 "/home/jens/Source/shotwell/src/core/Alteration.vala" - result = FALSE; -#line 249 "/home/jens/Source/shotwell/src/core/Alteration.vala" - _g_object_unref0 (other_keys); -#line 249 "/home/jens/Source/shotwell/src/core/Alteration.vala" - _g_object_unref0 (keys); -#line 249 "/home/jens/Source/shotwell/src/core/Alteration.vala" - return result; -#line 1994 "Alteration.c" - } -#line 251 "/home/jens/Source/shotwell/src/core/Alteration.vala" - _tmp27_ = keys; -#line 251 "/home/jens/Source/shotwell/src/core/Alteration.vala" - _tmp28_ = other_keys; -#line 251 "/home/jens/Source/shotwell/src/core/Alteration.vala" - if (!gee_collection_contains_all (G_TYPE_CHECK_INSTANCE_CAST (_tmp27_, GEE_TYPE_COLLECTION, GeeCollection), G_TYPE_CHECK_INSTANCE_CAST (_tmp28_, GEE_TYPE_COLLECTION, GeeCollection))) { -#line 252 "/home/jens/Source/shotwell/src/core/Alteration.vala" - result = FALSE; -#line 252 "/home/jens/Source/shotwell/src/core/Alteration.vala" - _g_object_unref0 (other_keys); -#line 252 "/home/jens/Source/shotwell/src/core/Alteration.vala" - _g_object_unref0 (keys); -#line 252 "/home/jens/Source/shotwell/src/core/Alteration.vala" - return result; -#line 2010 "Alteration.c" - } -#line 254 "/home/jens/Source/shotwell/src/core/Alteration.vala" - _tmp29_ = other_keys; -#line 254 "/home/jens/Source/shotwell/src/core/Alteration.vala" - _tmp30_ = keys; -#line 254 "/home/jens/Source/shotwell/src/core/Alteration.vala" - if (!gee_collection_contains_all (G_TYPE_CHECK_INSTANCE_CAST (_tmp29_, GEE_TYPE_COLLECTION, GeeCollection), G_TYPE_CHECK_INSTANCE_CAST (_tmp30_, GEE_TYPE_COLLECTION, GeeCollection))) { -#line 255 "/home/jens/Source/shotwell/src/core/Alteration.vala" - result = FALSE; -#line 255 "/home/jens/Source/shotwell/src/core/Alteration.vala" - _g_object_unref0 (other_keys); -#line 255 "/home/jens/Source/shotwell/src/core/Alteration.vala" - _g_object_unref0 (keys); -#line 255 "/home/jens/Source/shotwell/src/core/Alteration.vala" - return result; -#line 2026 "Alteration.c" - } - { - GeeIterator* _key_it = NULL; - GeeSet* _tmp31_; - GeeIterator* _tmp32_; -#line 257 "/home/jens/Source/shotwell/src/core/Alteration.vala" - _tmp31_ = keys; -#line 257 "/home/jens/Source/shotwell/src/core/Alteration.vala" - _tmp32_ = gee_iterable_iterator (G_TYPE_CHECK_INSTANCE_CAST (_tmp31_, GEE_TYPE_ITERABLE, GeeIterable)); -#line 257 "/home/jens/Source/shotwell/src/core/Alteration.vala" - _key_it = _tmp32_; -#line 257 "/home/jens/Source/shotwell/src/core/Alteration.vala" - while (TRUE) { -#line 2040 "Alteration.c" - GeeIterator* _tmp33_; - gchar* key = NULL; - GeeIterator* _tmp34_; - gpointer _tmp35_; - GeeCollection* values = NULL; - GeeMultiMap* _tmp36_; - const gchar* _tmp37_; - GeeCollection* _tmp38_; - GeeCollection* other_values = NULL; - GeeMultiMap* _tmp39_; - const gchar* _tmp40_; - GeeCollection* _tmp41_; - GeeCollection* _tmp42_; - gint _tmp43_; - gint _tmp44_; - GeeCollection* _tmp45_; - gint _tmp46_; - gint _tmp47_; - GeeCollection* _tmp48_; - GeeCollection* _tmp49_; - GeeCollection* _tmp50_; - GeeCollection* _tmp51_; -#line 257 "/home/jens/Source/shotwell/src/core/Alteration.vala" - _tmp33_ = _key_it; -#line 257 "/home/jens/Source/shotwell/src/core/Alteration.vala" - if (!gee_iterator_next (_tmp33_)) { -#line 257 "/home/jens/Source/shotwell/src/core/Alteration.vala" - break; -#line 2069 "Alteration.c" - } -#line 257 "/home/jens/Source/shotwell/src/core/Alteration.vala" - _tmp34_ = _key_it; -#line 257 "/home/jens/Source/shotwell/src/core/Alteration.vala" - _tmp35_ = gee_iterator_get (_tmp34_); -#line 257 "/home/jens/Source/shotwell/src/core/Alteration.vala" - key = (gchar*) _tmp35_; -#line 258 "/home/jens/Source/shotwell/src/core/Alteration.vala" - _tmp36_ = self->priv->map; -#line 258 "/home/jens/Source/shotwell/src/core/Alteration.vala" - _tmp37_ = key; -#line 258 "/home/jens/Source/shotwell/src/core/Alteration.vala" - _tmp38_ = gee_multi_map_get (_tmp36_, _tmp37_); -#line 258 "/home/jens/Source/shotwell/src/core/Alteration.vala" - values = _tmp38_; -#line 259 "/home/jens/Source/shotwell/src/core/Alteration.vala" - _tmp39_ = other->priv->map; -#line 259 "/home/jens/Source/shotwell/src/core/Alteration.vala" - _tmp40_ = key; -#line 259 "/home/jens/Source/shotwell/src/core/Alteration.vala" - _tmp41_ = gee_multi_map_get (_tmp39_, _tmp40_); -#line 259 "/home/jens/Source/shotwell/src/core/Alteration.vala" - other_values = _tmp41_; -#line 261 "/home/jens/Source/shotwell/src/core/Alteration.vala" - _tmp42_ = values; -#line 261 "/home/jens/Source/shotwell/src/core/Alteration.vala" - _tmp43_ = gee_collection_get_size (_tmp42_); -#line 261 "/home/jens/Source/shotwell/src/core/Alteration.vala" - _tmp44_ = _tmp43_; -#line 261 "/home/jens/Source/shotwell/src/core/Alteration.vala" - _tmp45_ = other_values; -#line 261 "/home/jens/Source/shotwell/src/core/Alteration.vala" - _tmp46_ = gee_collection_get_size (_tmp45_); -#line 261 "/home/jens/Source/shotwell/src/core/Alteration.vala" - _tmp47_ = _tmp46_; -#line 261 "/home/jens/Source/shotwell/src/core/Alteration.vala" - if (_tmp44_ != _tmp47_) { -#line 262 "/home/jens/Source/shotwell/src/core/Alteration.vala" - result = FALSE; -#line 262 "/home/jens/Source/shotwell/src/core/Alteration.vala" - _g_object_unref0 (other_values); -#line 262 "/home/jens/Source/shotwell/src/core/Alteration.vala" - _g_object_unref0 (values); -#line 262 "/home/jens/Source/shotwell/src/core/Alteration.vala" - _g_free0 (key); -#line 262 "/home/jens/Source/shotwell/src/core/Alteration.vala" - _g_object_unref0 (_key_it); -#line 262 "/home/jens/Source/shotwell/src/core/Alteration.vala" - _g_object_unref0 (other_keys); -#line 262 "/home/jens/Source/shotwell/src/core/Alteration.vala" - _g_object_unref0 (keys); -#line 262 "/home/jens/Source/shotwell/src/core/Alteration.vala" - return result; -#line 2123 "Alteration.c" - } -#line 264 "/home/jens/Source/shotwell/src/core/Alteration.vala" - _tmp48_ = values; -#line 264 "/home/jens/Source/shotwell/src/core/Alteration.vala" - _tmp49_ = other_values; -#line 264 "/home/jens/Source/shotwell/src/core/Alteration.vala" - if (!gee_collection_contains_all (_tmp48_, _tmp49_)) { -#line 265 "/home/jens/Source/shotwell/src/core/Alteration.vala" - result = FALSE; -#line 265 "/home/jens/Source/shotwell/src/core/Alteration.vala" - _g_object_unref0 (other_values); -#line 265 "/home/jens/Source/shotwell/src/core/Alteration.vala" - _g_object_unref0 (values); -#line 265 "/home/jens/Source/shotwell/src/core/Alteration.vala" - _g_free0 (key); -#line 265 "/home/jens/Source/shotwell/src/core/Alteration.vala" - _g_object_unref0 (_key_it); -#line 265 "/home/jens/Source/shotwell/src/core/Alteration.vala" - _g_object_unref0 (other_keys); -#line 265 "/home/jens/Source/shotwell/src/core/Alteration.vala" - _g_object_unref0 (keys); -#line 265 "/home/jens/Source/shotwell/src/core/Alteration.vala" - return result; -#line 2147 "Alteration.c" - } -#line 267 "/home/jens/Source/shotwell/src/core/Alteration.vala" - _tmp50_ = other_values; -#line 267 "/home/jens/Source/shotwell/src/core/Alteration.vala" - _tmp51_ = values; -#line 267 "/home/jens/Source/shotwell/src/core/Alteration.vala" - if (!gee_collection_contains_all (_tmp50_, _tmp51_)) { -#line 268 "/home/jens/Source/shotwell/src/core/Alteration.vala" - result = FALSE; -#line 268 "/home/jens/Source/shotwell/src/core/Alteration.vala" - _g_object_unref0 (other_values); -#line 268 "/home/jens/Source/shotwell/src/core/Alteration.vala" - _g_object_unref0 (values); -#line 268 "/home/jens/Source/shotwell/src/core/Alteration.vala" - _g_free0 (key); -#line 268 "/home/jens/Source/shotwell/src/core/Alteration.vala" - _g_object_unref0 (_key_it); -#line 268 "/home/jens/Source/shotwell/src/core/Alteration.vala" - _g_object_unref0 (other_keys); -#line 268 "/home/jens/Source/shotwell/src/core/Alteration.vala" - _g_object_unref0 (keys); -#line 268 "/home/jens/Source/shotwell/src/core/Alteration.vala" - return result; -#line 2171 "Alteration.c" - } -#line 257 "/home/jens/Source/shotwell/src/core/Alteration.vala" - _g_object_unref0 (other_values); -#line 257 "/home/jens/Source/shotwell/src/core/Alteration.vala" - _g_object_unref0 (values); -#line 257 "/home/jens/Source/shotwell/src/core/Alteration.vala" - _g_free0 (key); -#line 2179 "Alteration.c" - } -#line 257 "/home/jens/Source/shotwell/src/core/Alteration.vala" - _g_object_unref0 (_key_it); -#line 2183 "Alteration.c" - } -#line 272 "/home/jens/Source/shotwell/src/core/Alteration.vala" - result = TRUE; -#line 272 "/home/jens/Source/shotwell/src/core/Alteration.vala" - _g_object_unref0 (other_keys); -#line 272 "/home/jens/Source/shotwell/src/core/Alteration.vala" - _g_object_unref0 (keys); -#line 272 "/home/jens/Source/shotwell/src/core/Alteration.vala" - return result; -#line 2193 "Alteration.c" - } -#line 276 "/home/jens/Source/shotwell/src/core/Alteration.vala" - result = FALSE; -#line 276 "/home/jens/Source/shotwell/src/core/Alteration.vala" - return result; -#line 2199 "Alteration.c" -} - - -static void -alteration_multimap_add_all (GeeMultiMap* dest, - GeeMultiMap* src) -{ - GeeSet* keys = NULL; - GeeSet* _tmp0_; -#line 279 "/home/jens/Source/shotwell/src/core/Alteration.vala" - g_return_if_fail (GEE_IS_MULTI_MAP (dest)); -#line 279 "/home/jens/Source/shotwell/src/core/Alteration.vala" - g_return_if_fail (GEE_IS_MULTI_MAP (src)); -#line 281 "/home/jens/Source/shotwell/src/core/Alteration.vala" - _tmp0_ = gee_multi_map_get_keys (src); -#line 281 "/home/jens/Source/shotwell/src/core/Alteration.vala" - keys = _tmp0_; -#line 2217 "Alteration.c" - { - GeeIterator* _key_it = NULL; - GeeSet* _tmp1_; - GeeIterator* _tmp2_; -#line 282 "/home/jens/Source/shotwell/src/core/Alteration.vala" - _tmp1_ = keys; -#line 282 "/home/jens/Source/shotwell/src/core/Alteration.vala" - _tmp2_ = gee_iterable_iterator (G_TYPE_CHECK_INSTANCE_CAST (_tmp1_, GEE_TYPE_ITERABLE, GeeIterable)); -#line 282 "/home/jens/Source/shotwell/src/core/Alteration.vala" - _key_it = _tmp2_; -#line 282 "/home/jens/Source/shotwell/src/core/Alteration.vala" - while (TRUE) { -#line 2230 "Alteration.c" - GeeIterator* _tmp3_; - gchar* key = NULL; - GeeIterator* _tmp4_; - gpointer _tmp5_; - GeeCollection* values = NULL; - const gchar* _tmp6_; - GeeCollection* _tmp7_; -#line 282 "/home/jens/Source/shotwell/src/core/Alteration.vala" - _tmp3_ = _key_it; -#line 282 "/home/jens/Source/shotwell/src/core/Alteration.vala" - if (!gee_iterator_next (_tmp3_)) { -#line 282 "/home/jens/Source/shotwell/src/core/Alteration.vala" - break; -#line 2244 "Alteration.c" - } -#line 282 "/home/jens/Source/shotwell/src/core/Alteration.vala" - _tmp4_ = _key_it; -#line 282 "/home/jens/Source/shotwell/src/core/Alteration.vala" - _tmp5_ = gee_iterator_get (_tmp4_); -#line 282 "/home/jens/Source/shotwell/src/core/Alteration.vala" - key = (gchar*) _tmp5_; -#line 283 "/home/jens/Source/shotwell/src/core/Alteration.vala" - _tmp6_ = key; -#line 283 "/home/jens/Source/shotwell/src/core/Alteration.vala" - _tmp7_ = gee_multi_map_get (src, _tmp6_); -#line 283 "/home/jens/Source/shotwell/src/core/Alteration.vala" - values = _tmp7_; -#line 2258 "Alteration.c" - { - GeeIterator* _value_it = NULL; - GeeCollection* _tmp8_; - GeeIterator* _tmp9_; -#line 284 "/home/jens/Source/shotwell/src/core/Alteration.vala" - _tmp8_ = values; -#line 284 "/home/jens/Source/shotwell/src/core/Alteration.vala" - _tmp9_ = gee_iterable_iterator (G_TYPE_CHECK_INSTANCE_CAST (_tmp8_, GEE_TYPE_ITERABLE, GeeIterable)); -#line 284 "/home/jens/Source/shotwell/src/core/Alteration.vala" - _value_it = _tmp9_; -#line 284 "/home/jens/Source/shotwell/src/core/Alteration.vala" - while (TRUE) { -#line 2271 "Alteration.c" - GeeIterator* _tmp10_; - gchar* value = NULL; - GeeIterator* _tmp11_; - gpointer _tmp12_; - const gchar* _tmp13_; - const gchar* _tmp14_; -#line 284 "/home/jens/Source/shotwell/src/core/Alteration.vala" - _tmp10_ = _value_it; -#line 284 "/home/jens/Source/shotwell/src/core/Alteration.vala" - if (!gee_iterator_next (_tmp10_)) { -#line 284 "/home/jens/Source/shotwell/src/core/Alteration.vala" - break; -#line 2284 "Alteration.c" - } -#line 284 "/home/jens/Source/shotwell/src/core/Alteration.vala" - _tmp11_ = _value_it; -#line 284 "/home/jens/Source/shotwell/src/core/Alteration.vala" - _tmp12_ = gee_iterator_get (_tmp11_); -#line 284 "/home/jens/Source/shotwell/src/core/Alteration.vala" - value = (gchar*) _tmp12_; -#line 285 "/home/jens/Source/shotwell/src/core/Alteration.vala" - _tmp13_ = key; -#line 285 "/home/jens/Source/shotwell/src/core/Alteration.vala" - _tmp14_ = value; -#line 285 "/home/jens/Source/shotwell/src/core/Alteration.vala" - gee_multi_map_set (dest, _tmp13_, _tmp14_); -#line 284 "/home/jens/Source/shotwell/src/core/Alteration.vala" - _g_free0 (value); -#line 2300 "Alteration.c" - } -#line 284 "/home/jens/Source/shotwell/src/core/Alteration.vala" - _g_object_unref0 (_value_it); -#line 2304 "Alteration.c" - } -#line 282 "/home/jens/Source/shotwell/src/core/Alteration.vala" - _g_object_unref0 (values); -#line 282 "/home/jens/Source/shotwell/src/core/Alteration.vala" - _g_free0 (key); -#line 2310 "Alteration.c" - } -#line 282 "/home/jens/Source/shotwell/src/core/Alteration.vala" - _g_object_unref0 (_key_it); -#line 2314 "Alteration.c" - } -#line 279 "/home/jens/Source/shotwell/src/core/Alteration.vala" - _g_object_unref0 (keys); -#line 2318 "Alteration.c" -} - - -static gpointer -_alteration_ref0 (gpointer self) -{ -#line 293 "/home/jens/Source/shotwell/src/core/Alteration.vala" - return self ? alteration_ref (self) : NULL; -#line 2327 "Alteration.c" -} - - -Alteration* -alteration_compress (Alteration* self, - Alteration* other) -{ - Alteration* result = NULL; - GeeMultiMap* compressed = NULL; - GeeMultiMap* _tmp1_; - gboolean _tmp2_ = FALSE; - const gchar* _tmp3_; - gboolean _tmp11_ = FALSE; - const gchar* _tmp12_; - GeeMultiMap* _tmp20_; - Alteration* _tmp21_; -#line 291 "/home/jens/Source/shotwell/src/core/Alteration.vala" - g_return_val_if_fail (IS_ALTERATION (self), NULL); -#line 291 "/home/jens/Source/shotwell/src/core/Alteration.vala" - g_return_val_if_fail (IS_ALTERATION (other), NULL); -#line 292 "/home/jens/Source/shotwell/src/core/Alteration.vala" - if (alteration_equals (self, other)) { -#line 2350 "Alteration.c" - Alteration* _tmp0_; -#line 293 "/home/jens/Source/shotwell/src/core/Alteration.vala" - _tmp0_ = _alteration_ref0 (self); -#line 293 "/home/jens/Source/shotwell/src/core/Alteration.vala" - result = _tmp0_; -#line 293 "/home/jens/Source/shotwell/src/core/Alteration.vala" - return result; -#line 2358 "Alteration.c" - } -#line 297 "/home/jens/Source/shotwell/src/core/Alteration.vala" - _tmp1_ = alteration_create_map (self); -#line 297 "/home/jens/Source/shotwell/src/core/Alteration.vala" - compressed = _tmp1_; -#line 299 "/home/jens/Source/shotwell/src/core/Alteration.vala" - _tmp3_ = self->priv->subject; -#line 299 "/home/jens/Source/shotwell/src/core/Alteration.vala" - if (_tmp3_ != NULL) { -#line 2368 "Alteration.c" - const gchar* _tmp4_; -#line 299 "/home/jens/Source/shotwell/src/core/Alteration.vala" - _tmp4_ = self->priv->detail; -#line 299 "/home/jens/Source/shotwell/src/core/Alteration.vala" - _tmp2_ = _tmp4_ != NULL; -#line 2374 "Alteration.c" - } else { -#line 299 "/home/jens/Source/shotwell/src/core/Alteration.vala" - _tmp2_ = FALSE; -#line 2378 "Alteration.c" - } -#line 299 "/home/jens/Source/shotwell/src/core/Alteration.vala" - if (_tmp2_) { -#line 2382 "Alteration.c" - GeeMultiMap* _tmp5_; - const gchar* _tmp6_; - const gchar* _tmp7_; -#line 300 "/home/jens/Source/shotwell/src/core/Alteration.vala" - _tmp5_ = compressed; -#line 300 "/home/jens/Source/shotwell/src/core/Alteration.vala" - _tmp6_ = self->priv->subject; -#line 300 "/home/jens/Source/shotwell/src/core/Alteration.vala" - _tmp7_ = self->priv->detail; -#line 300 "/home/jens/Source/shotwell/src/core/Alteration.vala" - gee_multi_map_set (_tmp5_, _tmp6_, _tmp7_); -#line 2394 "Alteration.c" - } else { - GeeMultiMap* _tmp8_; - GeeMultiMap* _tmp9_; - GeeMultiMap* _tmp10_; -#line 302 "/home/jens/Source/shotwell/src/core/Alteration.vala" - _tmp8_ = self->priv->map; -#line 302 "/home/jens/Source/shotwell/src/core/Alteration.vala" - _vala_assert (_tmp8_ != NULL, "map != null"); -#line 303 "/home/jens/Source/shotwell/src/core/Alteration.vala" - _tmp9_ = compressed; -#line 303 "/home/jens/Source/shotwell/src/core/Alteration.vala" - _tmp10_ = self->priv->map; -#line 303 "/home/jens/Source/shotwell/src/core/Alteration.vala" - alteration_multimap_add_all (_tmp9_, _tmp10_); -#line 2409 "Alteration.c" - } -#line 306 "/home/jens/Source/shotwell/src/core/Alteration.vala" - _tmp12_ = other->priv->subject; -#line 306 "/home/jens/Source/shotwell/src/core/Alteration.vala" - if (_tmp12_ != NULL) { -#line 2415 "Alteration.c" - const gchar* _tmp13_; -#line 306 "/home/jens/Source/shotwell/src/core/Alteration.vala" - _tmp13_ = other->priv->detail; -#line 306 "/home/jens/Source/shotwell/src/core/Alteration.vala" - _tmp11_ = _tmp13_ != NULL; -#line 2421 "Alteration.c" - } else { -#line 306 "/home/jens/Source/shotwell/src/core/Alteration.vala" - _tmp11_ = FALSE; -#line 2425 "Alteration.c" - } -#line 306 "/home/jens/Source/shotwell/src/core/Alteration.vala" - if (_tmp11_) { -#line 2429 "Alteration.c" - GeeMultiMap* _tmp14_; - const gchar* _tmp15_; - const gchar* _tmp16_; -#line 307 "/home/jens/Source/shotwell/src/core/Alteration.vala" - _tmp14_ = compressed; -#line 307 "/home/jens/Source/shotwell/src/core/Alteration.vala" - _tmp15_ = other->priv->subject; -#line 307 "/home/jens/Source/shotwell/src/core/Alteration.vala" - _tmp16_ = other->priv->detail; -#line 307 "/home/jens/Source/shotwell/src/core/Alteration.vala" - gee_multi_map_set (_tmp14_, _tmp15_, _tmp16_); -#line 2441 "Alteration.c" - } else { - GeeMultiMap* _tmp17_; - GeeMultiMap* _tmp18_; - GeeMultiMap* _tmp19_; -#line 309 "/home/jens/Source/shotwell/src/core/Alteration.vala" - _tmp17_ = other->priv->map; -#line 309 "/home/jens/Source/shotwell/src/core/Alteration.vala" - _vala_assert (_tmp17_ != NULL, "other.map != null"); -#line 310 "/home/jens/Source/shotwell/src/core/Alteration.vala" - _tmp18_ = compressed; -#line 310 "/home/jens/Source/shotwell/src/core/Alteration.vala" - _tmp19_ = other->priv->map; -#line 310 "/home/jens/Source/shotwell/src/core/Alteration.vala" - alteration_multimap_add_all (_tmp18_, _tmp19_); -#line 2456 "Alteration.c" - } -#line 313 "/home/jens/Source/shotwell/src/core/Alteration.vala" - _tmp20_ = compressed; -#line 313 "/home/jens/Source/shotwell/src/core/Alteration.vala" - _tmp21_ = alteration_new_from_map (_tmp20_); -#line 313 "/home/jens/Source/shotwell/src/core/Alteration.vala" - result = _tmp21_; -#line 313 "/home/jens/Source/shotwell/src/core/Alteration.vala" - _g_object_unref0 (compressed); -#line 313 "/home/jens/Source/shotwell/src/core/Alteration.vala" - return result; -#line 2468 "Alteration.c" -} - - -static void -value_alteration_init (GValue* value) -{ -#line 27 "/home/jens/Source/shotwell/src/core/Alteration.vala" - value->data[0].v_pointer = NULL; -#line 2477 "Alteration.c" -} - - -static void -value_alteration_free_value (GValue* value) -{ -#line 27 "/home/jens/Source/shotwell/src/core/Alteration.vala" - if (value->data[0].v_pointer) { -#line 27 "/home/jens/Source/shotwell/src/core/Alteration.vala" - alteration_unref (value->data[0].v_pointer); -#line 2488 "Alteration.c" - } -} - - -static void -value_alteration_copy_value (const GValue* src_value, - GValue* dest_value) -{ -#line 27 "/home/jens/Source/shotwell/src/core/Alteration.vala" - if (src_value->data[0].v_pointer) { -#line 27 "/home/jens/Source/shotwell/src/core/Alteration.vala" - dest_value->data[0].v_pointer = alteration_ref (src_value->data[0].v_pointer); -#line 2501 "Alteration.c" - } else { -#line 27 "/home/jens/Source/shotwell/src/core/Alteration.vala" - dest_value->data[0].v_pointer = NULL; -#line 2505 "Alteration.c" - } -} - - -static gpointer -value_alteration_peek_pointer (const GValue* value) -{ -#line 27 "/home/jens/Source/shotwell/src/core/Alteration.vala" - return value->data[0].v_pointer; -#line 2515 "Alteration.c" -} - - -static gchar* -value_alteration_collect_value (GValue* value, - guint n_collect_values, - GTypeCValue* collect_values, - guint collect_flags) -{ -#line 27 "/home/jens/Source/shotwell/src/core/Alteration.vala" - if (collect_values[0].v_pointer) { -#line 2527 "Alteration.c" - Alteration * object; - object = collect_values[0].v_pointer; -#line 27 "/home/jens/Source/shotwell/src/core/Alteration.vala" - if (object->parent_instance.g_class == NULL) { -#line 27 "/home/jens/Source/shotwell/src/core/Alteration.vala" - return g_strconcat ("invalid unclassed object pointer for value type `", G_VALUE_TYPE_NAME (value), "'", NULL); -#line 2534 "Alteration.c" - } else if (!g_value_type_compatible (G_TYPE_FROM_INSTANCE (object), G_VALUE_TYPE (value))) { -#line 27 "/home/jens/Source/shotwell/src/core/Alteration.vala" - return g_strconcat ("invalid object type `", g_type_name (G_TYPE_FROM_INSTANCE (object)), "' for value type `", G_VALUE_TYPE_NAME (value), "'", NULL); -#line 2538 "Alteration.c" - } -#line 27 "/home/jens/Source/shotwell/src/core/Alteration.vala" - value->data[0].v_pointer = alteration_ref (object); -#line 2542 "Alteration.c" - } else { -#line 27 "/home/jens/Source/shotwell/src/core/Alteration.vala" - value->data[0].v_pointer = NULL; -#line 2546 "Alteration.c" - } -#line 27 "/home/jens/Source/shotwell/src/core/Alteration.vala" - return NULL; -#line 2550 "Alteration.c" -} - - -static gchar* -value_alteration_lcopy_value (const GValue* value, - guint n_collect_values, - GTypeCValue* collect_values, - guint collect_flags) -{ - Alteration ** object_p; - object_p = collect_values[0].v_pointer; -#line 27 "/home/jens/Source/shotwell/src/core/Alteration.vala" - if (!object_p) { -#line 27 "/home/jens/Source/shotwell/src/core/Alteration.vala" - return g_strdup_printf ("value location for `%s' passed as NULL", G_VALUE_TYPE_NAME (value)); -#line 2566 "Alteration.c" - } -#line 27 "/home/jens/Source/shotwell/src/core/Alteration.vala" - if (!value->data[0].v_pointer) { -#line 27 "/home/jens/Source/shotwell/src/core/Alteration.vala" - *object_p = NULL; -#line 2572 "Alteration.c" - } else if (collect_flags & G_VALUE_NOCOPY_CONTENTS) { -#line 27 "/home/jens/Source/shotwell/src/core/Alteration.vala" - *object_p = value->data[0].v_pointer; -#line 2576 "Alteration.c" - } else { -#line 27 "/home/jens/Source/shotwell/src/core/Alteration.vala" - *object_p = alteration_ref (value->data[0].v_pointer); -#line 2580 "Alteration.c" - } -#line 27 "/home/jens/Source/shotwell/src/core/Alteration.vala" - return NULL; -#line 2584 "Alteration.c" -} - - -GParamSpec* -param_spec_alteration (const gchar* name, - const gchar* nick, - const gchar* blurb, - GType object_type, - GParamFlags flags) -{ - ParamSpecAlteration* spec; -#line 27 "/home/jens/Source/shotwell/src/core/Alteration.vala" - g_return_val_if_fail (g_type_is_a (object_type, TYPE_ALTERATION), NULL); -#line 27 "/home/jens/Source/shotwell/src/core/Alteration.vala" - spec = g_param_spec_internal (G_TYPE_PARAM_OBJECT, name, nick, blurb, flags); -#line 27 "/home/jens/Source/shotwell/src/core/Alteration.vala" - G_PARAM_SPEC (spec)->value_type = object_type; -#line 27 "/home/jens/Source/shotwell/src/core/Alteration.vala" - return G_PARAM_SPEC (spec); -#line 2604 "Alteration.c" -} - - -gpointer -value_get_alteration (const GValue* value) -{ -#line 27 "/home/jens/Source/shotwell/src/core/Alteration.vala" - g_return_val_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, TYPE_ALTERATION), NULL); -#line 27 "/home/jens/Source/shotwell/src/core/Alteration.vala" - return value->data[0].v_pointer; -#line 2615 "Alteration.c" -} - - -void -value_set_alteration (GValue* value, - gpointer v_object) -{ - Alteration * old; -#line 27 "/home/jens/Source/shotwell/src/core/Alteration.vala" - g_return_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, TYPE_ALTERATION)); -#line 27 "/home/jens/Source/shotwell/src/core/Alteration.vala" - old = value->data[0].v_pointer; -#line 27 "/home/jens/Source/shotwell/src/core/Alteration.vala" - if (v_object) { -#line 27 "/home/jens/Source/shotwell/src/core/Alteration.vala" - g_return_if_fail (G_TYPE_CHECK_INSTANCE_TYPE (v_object, TYPE_ALTERATION)); -#line 27 "/home/jens/Source/shotwell/src/core/Alteration.vala" - g_return_if_fail (g_value_type_compatible (G_TYPE_FROM_INSTANCE (v_object), G_VALUE_TYPE (value))); -#line 27 "/home/jens/Source/shotwell/src/core/Alteration.vala" - value->data[0].v_pointer = v_object; -#line 27 "/home/jens/Source/shotwell/src/core/Alteration.vala" - alteration_ref (value->data[0].v_pointer); -#line 2638 "Alteration.c" - } else { -#line 27 "/home/jens/Source/shotwell/src/core/Alteration.vala" - value->data[0].v_pointer = NULL; -#line 2642 "Alteration.c" - } -#line 27 "/home/jens/Source/shotwell/src/core/Alteration.vala" - if (old) { -#line 27 "/home/jens/Source/shotwell/src/core/Alteration.vala" - alteration_unref (old); -#line 2648 "Alteration.c" - } -} - - -void -value_take_alteration (GValue* value, - gpointer v_object) -{ - Alteration * old; -#line 27 "/home/jens/Source/shotwell/src/core/Alteration.vala" - g_return_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, TYPE_ALTERATION)); -#line 27 "/home/jens/Source/shotwell/src/core/Alteration.vala" - old = value->data[0].v_pointer; -#line 27 "/home/jens/Source/shotwell/src/core/Alteration.vala" - if (v_object) { -#line 27 "/home/jens/Source/shotwell/src/core/Alteration.vala" - g_return_if_fail (G_TYPE_CHECK_INSTANCE_TYPE (v_object, TYPE_ALTERATION)); -#line 27 "/home/jens/Source/shotwell/src/core/Alteration.vala" - g_return_if_fail (g_value_type_compatible (G_TYPE_FROM_INSTANCE (v_object), G_VALUE_TYPE (value))); -#line 27 "/home/jens/Source/shotwell/src/core/Alteration.vala" - value->data[0].v_pointer = v_object; -#line 2670 "Alteration.c" - } else { -#line 27 "/home/jens/Source/shotwell/src/core/Alteration.vala" - value->data[0].v_pointer = NULL; -#line 2674 "Alteration.c" - } -#line 27 "/home/jens/Source/shotwell/src/core/Alteration.vala" - if (old) { -#line 27 "/home/jens/Source/shotwell/src/core/Alteration.vala" - alteration_unref (old); -#line 2680 "Alteration.c" - } -} - - -static void -alteration_class_init (AlterationClass * klass) -{ -#line 27 "/home/jens/Source/shotwell/src/core/Alteration.vala" - alteration_parent_class = g_type_class_peek_parent (klass); -#line 27 "/home/jens/Source/shotwell/src/core/Alteration.vala" - ((AlterationClass *) klass)->finalize = alteration_finalize; -#line 27 "/home/jens/Source/shotwell/src/core/Alteration.vala" - g_type_class_add_private (klass, sizeof (AlterationPrivate)); -#line 2694 "Alteration.c" -} - - -static void -alteration_instance_init (Alteration * self) -{ -#line 27 "/home/jens/Source/shotwell/src/core/Alteration.vala" - self->priv = ALTERATION_GET_PRIVATE (self); -#line 28 "/home/jens/Source/shotwell/src/core/Alteration.vala" - self->priv->subject = NULL; -#line 29 "/home/jens/Source/shotwell/src/core/Alteration.vala" - self->priv->detail = NULL; -#line 30 "/home/jens/Source/shotwell/src/core/Alteration.vala" - self->priv->map = NULL; -#line 27 "/home/jens/Source/shotwell/src/core/Alteration.vala" - self->ref_count = 1; -#line 2711 "Alteration.c" -} - - -static void -alteration_finalize (Alteration * obj) -{ - Alteration * self; -#line 27 "/home/jens/Source/shotwell/src/core/Alteration.vala" - self = G_TYPE_CHECK_INSTANCE_CAST (obj, TYPE_ALTERATION, Alteration); -#line 27 "/home/jens/Source/shotwell/src/core/Alteration.vala" - g_signal_handlers_destroy (self); -#line 28 "/home/jens/Source/shotwell/src/core/Alteration.vala" - _g_free0 (self->priv->subject); -#line 29 "/home/jens/Source/shotwell/src/core/Alteration.vala" - _g_free0 (self->priv->detail); -#line 30 "/home/jens/Source/shotwell/src/core/Alteration.vala" - _g_object_unref0 (self->priv->map); -#line 2729 "Alteration.c" -} - - -GType -alteration_get_type (void) -{ - static volatile gsize alteration_type_id__volatile = 0; - if (g_once_init_enter (&alteration_type_id__volatile)) { - static const GTypeValueTable g_define_type_value_table = { value_alteration_init, value_alteration_free_value, value_alteration_copy_value, value_alteration_peek_pointer, "p", value_alteration_collect_value, "p", value_alteration_lcopy_value }; - static const GTypeInfo g_define_type_info = { sizeof (AlterationClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) alteration_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (Alteration), 0, (GInstanceInitFunc) alteration_instance_init, &g_define_type_value_table }; - static const GTypeFundamentalInfo g_define_type_fundamental_info = { (G_TYPE_FLAG_CLASSED | G_TYPE_FLAG_INSTANTIATABLE | G_TYPE_FLAG_DERIVABLE | G_TYPE_FLAG_DEEP_DERIVABLE) }; - GType alteration_type_id; - alteration_type_id = g_type_register_fundamental (g_type_fundamental_next (), "Alteration", &g_define_type_info, &g_define_type_fundamental_info, 0); - g_once_init_leave (&alteration_type_id__volatile, alteration_type_id); - } - return alteration_type_id__volatile; -} - - -gpointer -alteration_ref (gpointer instance) -{ - Alteration * self; - self = instance; -#line 27 "/home/jens/Source/shotwell/src/core/Alteration.vala" - g_atomic_int_inc (&self->ref_count); -#line 27 "/home/jens/Source/shotwell/src/core/Alteration.vala" - return instance; -#line 2758 "Alteration.c" -} - - -void -alteration_unref (gpointer instance) -{ - Alteration * self; - self = instance; -#line 27 "/home/jens/Source/shotwell/src/core/Alteration.vala" - if (g_atomic_int_dec_and_test (&self->ref_count)) { -#line 27 "/home/jens/Source/shotwell/src/core/Alteration.vala" - ALTERATION_GET_CLASS (self)->finalize (self); -#line 27 "/home/jens/Source/shotwell/src/core/Alteration.vala" - g_type_free_instance ((GTypeInstance *) self); -#line 2773 "Alteration.c" - } -} - - -static void -_vala_array_destroy (gpointer array, - gint array_length, - GDestroyNotify destroy_func) -{ - if ((array != NULL) && (destroy_func != NULL)) { - int i; - for (i = 0; i < array_length; i = i + 1) { - if (((gpointer*) array)[i] != NULL) { - destroy_func (((gpointer*) array)[i]); - } - } - } -} - - -static void -_vala_array_free (gpointer array, - gint array_length, - GDestroyNotify destroy_func) -{ - _vala_array_destroy (array, array_length, destroy_func); - g_free (array); -} - - -static gint -_vala_array_length (gpointer array) -{ - int length; - length = 0; - if (array) { - while (((gpointer*) array)[length]) { - length++; - } - } - return length; -} - - - diff --git a/src/core/ContainerSourceCollection.c b/src/core/ContainerSourceCollection.c deleted file mode 100644 index f9f30cb..0000000 --- a/src/core/ContainerSourceCollection.c +++ /dev/null @@ -1,2236 +0,0 @@ -/* ContainerSourceCollection.c generated by valac 0.40.4, the Vala compiler - * generated from ContainerSourceCollection.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. - */ -/* A ContainerSourceCollection is for DataSources which maintain links to one or more other*/ -/* DataSources, assumed to be of a different type. ContainerSourceCollection automates the task*/ -/* of handling unlinking and relinking and maintaining backlinks. Unlinked DataSources are*/ -/* held in a holding tank, until they are either relinked or destroyed.*/ -/**/ -/* If the ContainerSourceCollection's DataSources are types that "evaporate" (i.e. they disappear*/ -/* when they hold no items), they should use the evaporate() method, which will either destroy*/ -/* the DataSource or hold it in the tank (if backlinks are outstanding).*/ - - -#include <glib.h> -#include <glib-object.h> -#include <stdlib.h> -#include <string.h> -#include <gee.h> - - -#define TYPE_DATA_COLLECTION (data_collection_get_type ()) -#define DATA_COLLECTION(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_DATA_COLLECTION, DataCollection)) -#define DATA_COLLECTION_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_DATA_COLLECTION, DataCollectionClass)) -#define IS_DATA_COLLECTION(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_DATA_COLLECTION)) -#define IS_DATA_COLLECTION_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_DATA_COLLECTION)) -#define DATA_COLLECTION_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_DATA_COLLECTION, DataCollectionClass)) - -typedef struct _DataCollection DataCollection; -typedef struct _DataCollectionClass DataCollectionClass; -typedef struct _DataCollectionPrivate DataCollectionPrivate; - -#define TYPE_DATA_OBJECT (data_object_get_type ()) -#define DATA_OBJECT(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_DATA_OBJECT, DataObject)) -#define DATA_OBJECT_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_DATA_OBJECT, DataObjectClass)) -#define IS_DATA_OBJECT(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_DATA_OBJECT)) -#define IS_DATA_OBJECT_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_DATA_OBJECT)) -#define DATA_OBJECT_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_DATA_OBJECT, DataObjectClass)) - -typedef struct _DataObject DataObject; -typedef struct _DataObjectClass DataObjectClass; - -#define TYPE_ALTERATION (alteration_get_type ()) -#define ALTERATION(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_ALTERATION, Alteration)) -#define ALTERATION_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_ALTERATION, AlterationClass)) -#define IS_ALTERATION(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_ALTERATION)) -#define IS_ALTERATION_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_ALTERATION)) -#define ALTERATION_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_ALTERATION, AlterationClass)) - -typedef struct _Alteration Alteration; -typedef struct _AlterationClass AlterationClass; - -#define TYPE_MARKER (marker_get_type ()) -#define MARKER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_MARKER, Marker)) -#define IS_MARKER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_MARKER)) -#define MARKER_GET_INTERFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE ((obj), TYPE_MARKER, MarkerIface)) - -typedef struct _Marker Marker; -typedef struct _MarkerIface MarkerIface; - -#define TYPE_SOURCE_COLLECTION (source_collection_get_type ()) -#define SOURCE_COLLECTION(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_SOURCE_COLLECTION, SourceCollection)) -#define SOURCE_COLLECTION_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_SOURCE_COLLECTION, SourceCollectionClass)) -#define IS_SOURCE_COLLECTION(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_SOURCE_COLLECTION)) -#define IS_SOURCE_COLLECTION_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_SOURCE_COLLECTION)) -#define SOURCE_COLLECTION_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_SOURCE_COLLECTION, SourceCollectionClass)) - -typedef struct _SourceCollection SourceCollection; -typedef struct _SourceCollectionClass SourceCollectionClass; -typedef struct _SourceCollectionPrivate SourceCollectionPrivate; - -#define TYPE_DATA_SOURCE (data_source_get_type ()) -#define DATA_SOURCE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_DATA_SOURCE, DataSource)) -#define DATA_SOURCE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_DATA_SOURCE, DataSourceClass)) -#define IS_DATA_SOURCE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_DATA_SOURCE)) -#define IS_DATA_SOURCE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_DATA_SOURCE)) -#define DATA_SOURCE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_DATA_SOURCE, DataSourceClass)) - -typedef struct _DataSource DataSource; -typedef struct _DataSourceClass DataSourceClass; - -#define TYPE_SOURCE_BACKLINK (source_backlink_get_type ()) -#define SOURCE_BACKLINK(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_SOURCE_BACKLINK, SourceBacklink)) -#define SOURCE_BACKLINK_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_SOURCE_BACKLINK, SourceBacklinkClass)) -#define IS_SOURCE_BACKLINK(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_SOURCE_BACKLINK)) -#define IS_SOURCE_BACKLINK_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_SOURCE_BACKLINK)) -#define SOURCE_BACKLINK_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_SOURCE_BACKLINK, SourceBacklinkClass)) - -typedef struct _SourceBacklink SourceBacklink; -typedef struct _SourceBacklinkClass SourceBacklinkClass; - -#define TYPE_DATABASE_SOURCE_COLLECTION (database_source_collection_get_type ()) -#define DATABASE_SOURCE_COLLECTION(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_DATABASE_SOURCE_COLLECTION, DatabaseSourceCollection)) -#define DATABASE_SOURCE_COLLECTION_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_DATABASE_SOURCE_COLLECTION, DatabaseSourceCollectionClass)) -#define IS_DATABASE_SOURCE_COLLECTION(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_DATABASE_SOURCE_COLLECTION)) -#define IS_DATABASE_SOURCE_COLLECTION_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_DATABASE_SOURCE_COLLECTION)) -#define DATABASE_SOURCE_COLLECTION_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_DATABASE_SOURCE_COLLECTION, DatabaseSourceCollectionClass)) - -typedef struct _DatabaseSourceCollection DatabaseSourceCollection; -typedef struct _DatabaseSourceCollectionClass DatabaseSourceCollectionClass; -typedef struct _DatabaseSourceCollectionPrivate DatabaseSourceCollectionPrivate; - -#define TYPE_CONTAINER_SOURCE_COLLECTION (container_source_collection_get_type ()) -#define CONTAINER_SOURCE_COLLECTION(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_CONTAINER_SOURCE_COLLECTION, ContainerSourceCollection)) -#define CONTAINER_SOURCE_COLLECTION_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_CONTAINER_SOURCE_COLLECTION, ContainerSourceCollectionClass)) -#define IS_CONTAINER_SOURCE_COLLECTION(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_CONTAINER_SOURCE_COLLECTION)) -#define IS_CONTAINER_SOURCE_COLLECTION_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_CONTAINER_SOURCE_COLLECTION)) -#define CONTAINER_SOURCE_COLLECTION_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_CONTAINER_SOURCE_COLLECTION, ContainerSourceCollectionClass)) - -typedef struct _ContainerSourceCollection ContainerSourceCollection; -typedef struct _ContainerSourceCollectionClass ContainerSourceCollectionClass; -typedef struct _ContainerSourceCollectionPrivate ContainerSourceCollectionPrivate; - -#define TYPE_CONTAINER_SOURCE (container_source_get_type ()) -#define CONTAINER_SOURCE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_CONTAINER_SOURCE, ContainerSource)) -#define IS_CONTAINER_SOURCE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_CONTAINER_SOURCE)) -#define CONTAINER_SOURCE_GET_INTERFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE ((obj), TYPE_CONTAINER_SOURCE, ContainerSourceIface)) - -typedef struct _ContainerSource ContainerSource; -typedef struct _ContainerSourceIface ContainerSourceIface; -#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL))) -#define _g_free0(var) (var = (g_free (var), NULL)) -#define _data_collection_unref0(var) ((var == NULL) ? NULL : (var = (data_collection_unref (var), NULL))) -#define _source_backlink_unref0(var) ((var == NULL) ? NULL : (var = (source_backlink_unref (var), NULL))) - -#define TYPE_TAG (tag_get_type ()) -#define TAG(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_TAG, Tag)) -#define TAG_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_TAG, TagClass)) -#define IS_TAG(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_TAG)) -#define IS_TAG_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_TAG)) -#define TAG_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_TAG, TagClass)) - -typedef struct _Tag Tag; -typedef struct _TagClass TagClass; - -#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; -enum { - CONTAINER_SOURCE_COLLECTION_CONTAINER_CONTENTS_ADDED_SIGNAL, - CONTAINER_SOURCE_COLLECTION_CONTAINER_CONTENTS_REMOVED_SIGNAL, - CONTAINER_SOURCE_COLLECTION_CONTAINER_CONTENTS_ALTERED_SIGNAL, - CONTAINER_SOURCE_COLLECTION_BACKLINK_TO_CONTAINER_REMOVED_SIGNAL, - CONTAINER_SOURCE_COLLECTION_NUM_SIGNALS -}; -static guint container_source_collection_signals[CONTAINER_SOURCE_COLLECTION_NUM_SIGNALS] = {0}; -#define _vala_assert(expr, msg) if G_LIKELY (expr) ; else g_assertion_message_expr (G_LOG_DOMAIN, __FILE__, __LINE__, G_STRFUNC, msg); -#define _vala_return_if_fail(expr, msg) if G_LIKELY (expr) ; else { g_return_if_fail_warning (G_LOG_DOMAIN, G_STRFUNC, msg); return; } -#define _vala_return_val_if_fail(expr, msg, val) if G_LIKELY (expr) ; else { g_return_if_fail_warning (G_LOG_DOMAIN, G_STRFUNC, msg); return val; } -#define _vala_warn_if_fail(expr, msg) if G_LIKELY (expr) ; else g_warn_message (G_LOG_DOMAIN, __FILE__, __LINE__, G_STRFUNC, msg); - -typedef gint64 (*Comparator) (void* a, void* b, void* user_data); -typedef gboolean (*ComparatorPredicate) (DataObject* object, Alteration* alteration, void* user_data); -typedef gboolean (*ProgressMonitor) (guint64 current, guint64 total, gboolean do_event_loop, void* user_data); -struct _MarkerIface { - GTypeInterface parent_iface; - void (*mark) (Marker* self, DataObject* object); - void (*unmark) (Marker* self, DataObject* object); - gboolean (*toggle) (Marker* self, DataObject* object); - void (*mark_many) (Marker* self, GeeCollection* list); - void (*unmark_many) (Marker* self, GeeCollection* list); - void (*mark_all) (Marker* self); - gint (*get_count) (Marker* self); - GeeCollection* (*get_all) (Marker* self); -}; - -struct _DataCollection { - GTypeInstance parent_instance; - volatile int ref_count; - DataCollectionPrivate * priv; -}; - -struct _DataCollectionClass { - GTypeClass parent_class; - void (*finalize) (DataCollection *self); - gchar* (*to_string) (DataCollection* self); - void (*notify_items_added) (DataCollection* self, GeeIterable* added); - void (*notify_items_removed) (DataCollection* self, GeeIterable* removed); - void (*notify_contents_altered) (DataCollection* self, GeeIterable* added, GeeIterable* removed); - void (*notify_items_altered) (DataCollection* self, GeeMap* items); - void (*notify_ordering_changed) (DataCollection* self); - void (*notify_property_set) (DataCollection* self, const gchar* name, GValue* old, GValue* val); - void (*notify_property_cleared) (DataCollection* self, const gchar* name); - gboolean (*valid_type) (DataCollection* self, DataObject* object); - void (*set_comparator) (DataCollection* self, Comparator comparator, void* comparator_target, ComparatorPredicate predicate, void* predicate_target); - void (*reset_comparator) (DataCollection* self); - GeeCollection* (*get_all) (DataCollection* self); - gint (*get_count) (DataCollection* self); - DataObject* (*get_at) (DataCollection* self, gint index); - gint (*index_of) (DataCollection* self, DataObject* object); - gboolean (*contains) (DataCollection* self, DataObject* object); - gboolean (*add) (DataCollection* self, DataObject* object); - GeeCollection* (*add_many) (DataCollection* self, GeeCollection* objects, ProgressMonitor monitor, void* monitor_target); - void (*remove_marked) (DataCollection* self, Marker* m); - void (*clear) (DataCollection* self); - void (*close) (DataCollection* self); - void (*notify_frozen) (DataCollection* self); - void (*notify_thawed) (DataCollection* self); - void (*items_added) (DataCollection* self, GeeIterable* added); - void (*items_removed) (DataCollection* self, GeeIterable* removed); - void (*contents_altered) (DataCollection* self, GeeIterable* added, GeeIterable* removed); - void (*items_altered) (DataCollection* self, GeeMap* items); - void (*ordering_changed) (DataCollection* self); - void (*property_set) (DataCollection* self, const gchar* name, GValue* old, GValue* val); - void (*property_cleared) (DataCollection* self, const gchar* name); - void (*frozen) (DataCollection* self); - void (*thawed) (DataCollection* self); -}; - -struct _SourceCollection { - DataCollection parent_instance; - SourceCollectionPrivate * priv; -}; - -struct _SourceCollectionClass { - DataCollectionClass parent_class; - gboolean (*holds_type_of_source) (SourceCollection* self, DataSource* source); - void (*notify_items_unlinking) (SourceCollection* self, GeeCollection* unlinking); - void (*notify_items_relinked) (SourceCollection* self, GeeCollection* relinked); - void (*notify_item_destroyed) (SourceCollection* self, DataSource* source); - void (*notify_items_destroyed) (SourceCollection* self, GeeCollection* destroyed); - void (*notify_unlinked_destroyed) (SourceCollection* self, DataSource* unlinked); - void (*notify_backlink_removed) (SourceCollection* self, SourceBacklink* backlink, GeeCollection* sources); - gboolean (*has_backlink) (SourceCollection* self, SourceBacklink* backlink); - void (*remove_backlink) (SourceCollection* self, SourceBacklink* backlink); - void (*items_unlinking) (SourceCollection* self, GeeCollection* unlinking); - void (*items_relinked) (SourceCollection* self, GeeCollection* relinked); - void (*item_destroyed) (SourceCollection* self, DataSource* source); - void (*items_destroyed) (SourceCollection* self, GeeCollection* destroyed); - void (*unlinked_destroyed) (SourceCollection* self, DataSource* source); - void (*backlink_removed) (SourceCollection* self, SourceBacklink* backlink, GeeCollection* sources); -}; - -struct _DatabaseSourceCollection { - SourceCollection parent_instance; - DatabaseSourceCollectionPrivate * priv; -}; - -struct _DatabaseSourceCollectionClass { - SourceCollectionClass parent_class; -}; - -struct _ContainerSourceIface { - GTypeInterface parent_iface; - gboolean (*has_links) (ContainerSource* self); - SourceBacklink* (*get_backlink) (ContainerSource* self); - void (*break_link) (ContainerSource* self, DataSource* source); - void (*break_link_many) (ContainerSource* self, GeeCollection* sources); - void (*establish_link) (ContainerSource* self, DataSource* source); - void (*establish_link_many) (ContainerSource* self, GeeCollection* sources); -}; - -struct _ContainerSourceCollection { - DatabaseSourceCollection parent_instance; - ContainerSourceCollectionPrivate * priv; -}; - -struct _ContainerSourceCollectionClass { - DatabaseSourceCollectionClass parent_class; - void (*notify_container_contents_added) (ContainerSourceCollection* self, ContainerSource* container, GeeCollection* added, gboolean relinked); - void (*notify_container_contents_removed) (ContainerSourceCollection* self, ContainerSource* container, GeeCollection* removed, gboolean unlinked); - void (*notify_container_contents_altered) (ContainerSourceCollection* self, ContainerSource* container, GeeCollection* added, gboolean relinked, GeeCollection* removed, gboolean unlinked); - void (*notify_backlink_to_container_removed) (ContainerSourceCollection* self, ContainerSource* container, GeeCollection* sources); - GeeCollection* (*get_containers_holding_source) (ContainerSourceCollection* self, DataSource* source); - ContainerSource* (*convert_backlink_to_container) (ContainerSourceCollection* self, SourceBacklink* backlink); - void (*container_contents_added) (ContainerSourceCollection* self, ContainerSource* container, GeeCollection* added, gboolean relinked); - void (*container_contents_removed) (ContainerSourceCollection* self, ContainerSource* container, GeeCollection* removed, gboolean unlinked); - void (*container_contents_altered) (ContainerSourceCollection* self, ContainerSource* container, GeeCollection* added, gboolean relinked, GeeCollection* removed, gboolean unlinked); - void (*backlink_to_container_removed) (ContainerSourceCollection* self, ContainerSource* container, GeeCollection* sources); -}; - -struct _ContainerSourceCollectionPrivate { - GeeHashSet* attached_collections; - gchar* backlink_name; - GeeHashSet* holding_tank; -}; - -typedef gint64 (*GetSourceDatabaseKey) (DataSource* source, void* user_data); - -static gpointer container_source_collection_parent_class = NULL; - -gpointer data_collection_ref (gpointer instance); -void data_collection_unref (gpointer instance); -GParamSpec* param_spec_data_collection (const gchar* name, - const gchar* nick, - const gchar* blurb, - GType object_type, - GParamFlags flags); -void value_set_data_collection (GValue* value, - gpointer v_object); -void value_take_data_collection (GValue* value, - gpointer v_object); -gpointer value_get_data_collection (const GValue* value); -GType data_collection_get_type (void) G_GNUC_CONST; -GType data_object_get_type (void) G_GNUC_CONST; -gpointer alteration_ref (gpointer instance); -void alteration_unref (gpointer instance); -GParamSpec* param_spec_alteration (const gchar* name, - const gchar* nick, - const gchar* blurb, - GType object_type, - GParamFlags flags); -void value_set_alteration (GValue* value, - gpointer v_object); -void value_take_alteration (GValue* value, - gpointer v_object); -gpointer value_get_alteration (const GValue* value); -GType alteration_get_type (void) G_GNUC_CONST; -GType marker_get_type (void) G_GNUC_CONST; -GType source_collection_get_type (void) G_GNUC_CONST; -GType data_source_get_type (void) G_GNUC_CONST; -gpointer source_backlink_ref (gpointer instance); -void source_backlink_unref (gpointer instance); -GParamSpec* param_spec_source_backlink (const gchar* name, - const gchar* nick, - const gchar* blurb, - GType object_type, - GParamFlags flags); -void value_set_source_backlink (GValue* value, - gpointer v_object); -void value_take_source_backlink (GValue* value, - gpointer v_object); -gpointer value_get_source_backlink (const GValue* value); -GType source_backlink_get_type (void) G_GNUC_CONST; -GType database_source_collection_get_type (void) G_GNUC_CONST; -GType container_source_collection_get_type (void) G_GNUC_CONST; -GType container_source_get_type (void) G_GNUC_CONST; -#define CONTAINER_SOURCE_COLLECTION_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), TYPE_CONTAINER_SOURCE_COLLECTION, ContainerSourceCollectionPrivate)) -void container_source_collection_detach_all_collections (ContainerSourceCollection* self); -ContainerSourceCollection* container_source_collection_construct (GType object_type, - const gchar* backlink_name, - const gchar* name, - GetSourceDatabaseKey source_key_func, - void* source_key_func_target); -DatabaseSourceCollection* database_source_collection_construct (GType object_type, - const gchar* name, - GetSourceDatabaseKey source_key_func, - void* source_key_func_target); -static void container_source_collection_real_notify_backlink_removed (SourceCollection* base, - SourceBacklink* backlink, - GeeCollection* sources); -void source_collection_notify_backlink_removed (SourceCollection* self, - SourceBacklink* backlink, - GeeCollection* sources); -ContainerSource* container_source_collection_convert_backlink_to_container (ContainerSourceCollection* self, - SourceBacklink* backlink); -void container_source_collection_notify_backlink_to_container_removed (ContainerSourceCollection* self, - ContainerSource* container, - GeeCollection* sources); -void container_source_collection_notify_container_contents_added (ContainerSourceCollection* self, - ContainerSource* container, - GeeCollection* added, - gboolean relinked); -static void container_source_collection_real_notify_container_contents_added (ContainerSourceCollection* self, - ContainerSource* container, - GeeCollection* added, - gboolean relinked); -void source_collection_relink (SourceCollection* self, - DataSource* source); -void container_source_collection_notify_container_contents_removed (ContainerSourceCollection* self, - ContainerSource* container, - GeeCollection* removed, - gboolean unlinked); -static void container_source_collection_real_notify_container_contents_removed (ContainerSourceCollection* self, - ContainerSource* container, - GeeCollection* removed, - gboolean unlinked); -void container_source_collection_notify_container_contents_altered (ContainerSourceCollection* self, - ContainerSource* container, - GeeCollection* added, - gboolean relinked, - GeeCollection* removed, - gboolean unlinked); -static void container_source_collection_real_notify_container_contents_altered (ContainerSourceCollection* self, - ContainerSource* container, - GeeCollection* added, - gboolean relinked, - GeeCollection* removed, - gboolean unlinked); -static void container_source_collection_real_notify_backlink_to_container_removed (ContainerSourceCollection* self, - ContainerSource* container, - GeeCollection* sources); -GeeCollection* container_source_collection_get_containers_holding_source (ContainerSourceCollection* self, - DataSource* source); -static GeeCollection* container_source_collection_real_get_containers_holding_source (ContainerSourceCollection* self, - DataSource* source); -static ContainerSource* container_source_collection_real_convert_backlink_to_container (ContainerSourceCollection* self, - SourceBacklink* backlink); -void container_source_collection_freeze_attached_notifications (ContainerSourceCollection* self); -void data_collection_freeze_notifications (DataCollection* self); -void container_source_collection_thaw_attached_notifications (ContainerSourceCollection* self); -void data_collection_thaw_notifications (DataCollection* self); -GeeCollection* container_source_collection_get_holding_tank (ContainerSourceCollection* self); -void container_source_collection_init_add_unlinked (ContainerSourceCollection* self, - ContainerSource* unlinked); -void container_source_collection_init_add_many_unlinked (ContainerSourceCollection* self, - GeeCollection* unlinked); -gboolean container_source_collection_relink_from_holding_tank (ContainerSourceCollection* self, - ContainerSource* source); -static void container_source_collection_on_contained_sources_unlinking (ContainerSourceCollection* self, - GeeCollection* unlinking); -void data_source_set_backlink (DataSource* self, - SourceBacklink* backlink); -SourceBacklink* container_source_get_backlink (ContainerSource* self); -void container_source_break_link_many (ContainerSource* self, - GeeCollection* sources); -static void container_source_collection_on_contained_sources_relinked (ContainerSourceCollection* self, - GeeCollection* relinked); -GeeList* data_source_get_backlinks (DataSource* self, - const gchar* name); -gchar* data_object_to_string (DataObject* self); -gchar* source_backlink_to_string (SourceBacklink* self); -void container_source_establish_link_many (ContainerSource* self, - GeeCollection* sources); -static void container_source_collection_on_contained_source_destroyed (ContainerSourceCollection* self, - DataSource* source); -gboolean container_source_has_links (ContainerSource* self); -GType tag_get_type (void) G_GNUC_CONST; -gboolean data_source_destroy_orphan (DataSource* self, - gboolean delete_backing); -static void container_source_collection_real_notify_item_destroyed (SourceCollection* base, - DataSource* source); -void source_collection_remove_backlink (SourceCollection* self, - SourceBacklink* backlink); -void source_collection_notify_item_destroyed (SourceCollection* self, - DataSource* source); -void container_source_collection_evaporate (ContainerSourceCollection* self, - ContainerSource* container); -gboolean source_collection_has_backlink (SourceCollection* self, - SourceBacklink* backlink); -GeeCollection* source_collection_unlink_marked (SourceCollection* self, - Marker* marker, - ProgressMonitor monitor, - void* monitor_target); -Marker* data_collection_mark (DataCollection* self, - DataObject* object); -GType thumbnail_source_get_type (void) G_GNUC_CONST; -GType media_source_get_type (void) G_GNUC_CONST; -gint source_collection_destroy_marked (SourceCollection* self, - Marker* marker, - gboolean delete_backing, - ProgressMonitor monitor, - void* monitor_target, - GeeList* not_removed); -void container_source_collection_attach_collection (ContainerSourceCollection* self, - SourceCollection* collection); -gchar* data_collection_to_string (DataCollection* self); -static void _container_source_collection_on_contained_sources_unlinking_source_collection_items_unlinking (SourceCollection* _sender, - GeeCollection* unlinking, - gpointer self); -static void _container_source_collection_on_contained_sources_relinked_source_collection_items_relinked (SourceCollection* _sender, - GeeCollection* relinked, - gpointer self); -static void _container_source_collection_on_contained_source_destroyed_source_collection_item_destroyed (SourceCollection* _sender, - DataSource* source, - gpointer self); -static void _container_source_collection_on_contained_source_destroyed_source_collection_unlinked_destroyed (SourceCollection* _sender, - DataSource* source, - gpointer self); -static void container_source_collection_real_container_contents_added (ContainerSourceCollection* self, - ContainerSource* container, - GeeCollection* added, - gboolean relinked); -static void g_cclosure_user_marshal_VOID__OBJECT_OBJECT_BOOLEAN (GClosure * closure, - GValue * return_value, - guint n_param_values, - const GValue * param_values, - gpointer invocation_hint, - gpointer marshal_data); -static void container_source_collection_real_container_contents_removed (ContainerSourceCollection* self, - ContainerSource* container, - GeeCollection* removed, - gboolean unlinked); -static void container_source_collection_real_container_contents_altered (ContainerSourceCollection* self, - ContainerSource* container, - GeeCollection* added, - gboolean relinked, - GeeCollection* removed, - gboolean unlinked); -static void g_cclosure_user_marshal_VOID__OBJECT_OBJECT_BOOLEAN_OBJECT_BOOLEAN (GClosure * closure, - GValue * return_value, - guint n_param_values, - const GValue * param_values, - gpointer invocation_hint, - gpointer marshal_data); -static void container_source_collection_real_backlink_to_container_removed (ContainerSourceCollection* self, - ContainerSource* container, - GeeCollection* sources); -static void g_cclosure_user_marshal_VOID__OBJECT_OBJECT (GClosure * closure, - GValue * return_value, - guint n_param_values, - const GValue * param_values, - gpointer invocation_hint, - gpointer marshal_data); -static void container_source_collection_finalize (DataCollection * obj); - - -ContainerSourceCollection* -container_source_collection_construct (GType object_type, - const gchar* backlink_name, - const gchar* name, - GetSourceDatabaseKey source_key_func, - void* source_key_func_target) -{ - ContainerSourceCollection* self = NULL; - gchar* _tmp0_; -#line 38 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala" - g_return_val_if_fail (backlink_name != NULL, NULL); -#line 38 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala" - g_return_val_if_fail (name != NULL, NULL); -#line 40 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala" - self = (ContainerSourceCollection*) database_source_collection_construct (object_type, name, source_key_func, source_key_func_target); -#line 42 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala" - _tmp0_ = g_strdup (backlink_name); -#line 42 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala" - _g_free0 (self->priv->backlink_name); -#line 42 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala" - self->priv->backlink_name = _tmp0_; -#line 38 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala" - return self; -#line 542 "ContainerSourceCollection.c" -} - - -static void -container_source_collection_real_notify_backlink_removed (SourceCollection* base, - SourceBacklink* backlink, - GeeCollection* sources) -{ - ContainerSourceCollection * self; - ContainerSource* container = NULL; - ContainerSource* _tmp0_; - ContainerSource* _tmp1_; -#line 49 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala" - self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_CONTAINER_SOURCE_COLLECTION, ContainerSourceCollection); -#line 49 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala" - g_return_if_fail (IS_SOURCE_BACKLINK (backlink)); -#line 49 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala" - g_return_if_fail (GEE_IS_COLLECTION (sources)); -#line 51 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala" - SOURCE_COLLECTION_CLASS (container_source_collection_parent_class)->notify_backlink_removed (G_TYPE_CHECK_INSTANCE_CAST (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_DATABASE_SOURCE_COLLECTION, DatabaseSourceCollection), TYPE_SOURCE_COLLECTION, SourceCollection), backlink, sources); -#line 53 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala" - _tmp0_ = container_source_collection_convert_backlink_to_container (self, backlink); -#line 53 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala" - container = _tmp0_; -#line 54 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala" - _tmp1_ = container; -#line 54 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala" - if (_tmp1_ != NULL) { -#line 571 "ContainerSourceCollection.c" - ContainerSource* _tmp2_; -#line 55 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala" - _tmp2_ = container; -#line 55 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala" - container_source_collection_notify_backlink_to_container_removed (self, _tmp2_, sources); -#line 577 "ContainerSourceCollection.c" - } -#line 49 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala" - _g_object_unref0 (container); -#line 581 "ContainerSourceCollection.c" -} - - -static void -container_source_collection_real_notify_container_contents_added (ContainerSourceCollection* self, - ContainerSource* container, - GeeCollection* added, - gboolean relinked) -{ - GeeHashSet* _tmp0_; -#line 58 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala" - g_return_if_fail (IS_CONTAINER_SOURCE (container)); -#line 58 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala" - g_return_if_fail (GEE_IS_COLLECTION (added)); -#line 61 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala" - _tmp0_ = self->priv->holding_tank; -#line 61 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala" - if (gee_abstract_collection_contains (G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, GEE_TYPE_ABSTRACT_COLLECTION, GeeAbstractCollection), container)) { -#line 600 "ContainerSourceCollection.c" - gboolean removed = FALSE; - GeeHashSet* _tmp1_; - gboolean _tmp2_; -#line 62 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala" - _tmp1_ = self->priv->holding_tank; -#line 62 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala" - removed = gee_abstract_collection_remove (G_TYPE_CHECK_INSTANCE_CAST (_tmp1_, GEE_TYPE_ABSTRACT_COLLECTION, GeeAbstractCollection), container); -#line 63 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala" - _tmp2_ = removed; -#line 63 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala" - _vala_assert (_tmp2_, "removed"); -#line 65 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala" - source_collection_relink (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_SOURCE_COLLECTION, SourceCollection), G_TYPE_CHECK_INSTANCE_CAST (container, TYPE_DATA_SOURCE, DataSource)); -#line 614 "ContainerSourceCollection.c" - } -#line 68 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala" - g_signal_emit (self, container_source_collection_signals[CONTAINER_SOURCE_COLLECTION_CONTAINER_CONTENTS_ADDED_SIGNAL], 0, container, added, relinked); -#line 618 "ContainerSourceCollection.c" -} - - -void -container_source_collection_notify_container_contents_added (ContainerSourceCollection* self, - ContainerSource* container, - GeeCollection* added, - gboolean relinked) -{ -#line 58 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala" - g_return_if_fail (IS_CONTAINER_SOURCE_COLLECTION (self)); -#line 58 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala" - CONTAINER_SOURCE_COLLECTION_GET_CLASS (self)->notify_container_contents_added (self, container, added, relinked); -#line 632 "ContainerSourceCollection.c" -} - - -static void -container_source_collection_real_notify_container_contents_removed (ContainerSourceCollection* self, - ContainerSource* container, - GeeCollection* removed, - gboolean unlinked) -{ -#line 71 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala" - g_return_if_fail (IS_CONTAINER_SOURCE (container)); -#line 71 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala" - g_return_if_fail (GEE_IS_COLLECTION (removed)); -#line 73 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala" - g_signal_emit (self, container_source_collection_signals[CONTAINER_SOURCE_COLLECTION_CONTAINER_CONTENTS_REMOVED_SIGNAL], 0, container, removed, unlinked); -#line 648 "ContainerSourceCollection.c" -} - - -void -container_source_collection_notify_container_contents_removed (ContainerSourceCollection* self, - ContainerSource* container, - GeeCollection* removed, - gboolean unlinked) -{ -#line 71 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala" - g_return_if_fail (IS_CONTAINER_SOURCE_COLLECTION (self)); -#line 71 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala" - CONTAINER_SOURCE_COLLECTION_GET_CLASS (self)->notify_container_contents_removed (self, container, removed, unlinked); -#line 662 "ContainerSourceCollection.c" -} - - -static void -container_source_collection_real_notify_container_contents_altered (ContainerSourceCollection* self, - ContainerSource* container, - GeeCollection* added, - gboolean relinked, - GeeCollection* removed, - gboolean unlinked) -{ -#line 76 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala" - g_return_if_fail (IS_CONTAINER_SOURCE (container)); -#line 76 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala" - g_return_if_fail ((added == NULL) || GEE_IS_COLLECTION (added)); -#line 76 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala" - g_return_if_fail ((removed == NULL) || GEE_IS_COLLECTION (removed)); -#line 79 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala" - g_signal_emit (self, container_source_collection_signals[CONTAINER_SOURCE_COLLECTION_CONTAINER_CONTENTS_ALTERED_SIGNAL], 0, container, added, relinked, removed, unlinked); -#line 682 "ContainerSourceCollection.c" -} - - -void -container_source_collection_notify_container_contents_altered (ContainerSourceCollection* self, - ContainerSource* container, - GeeCollection* added, - gboolean relinked, - GeeCollection* removed, - gboolean unlinked) -{ -#line 76 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala" - g_return_if_fail (IS_CONTAINER_SOURCE_COLLECTION (self)); -#line 76 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala" - CONTAINER_SOURCE_COLLECTION_GET_CLASS (self)->notify_container_contents_altered (self, container, added, relinked, removed, unlinked); -#line 698 "ContainerSourceCollection.c" -} - - -static void -container_source_collection_real_notify_backlink_to_container_removed (ContainerSourceCollection* self, - ContainerSource* container, - GeeCollection* sources) -{ -#line 82 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala" - g_return_if_fail (IS_CONTAINER_SOURCE (container)); -#line 82 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala" - g_return_if_fail (GEE_IS_COLLECTION (sources)); -#line 84 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala" - g_signal_emit (self, container_source_collection_signals[CONTAINER_SOURCE_COLLECTION_BACKLINK_TO_CONTAINER_REMOVED_SIGNAL], 0, container, sources); -#line 713 "ContainerSourceCollection.c" -} - - -void -container_source_collection_notify_backlink_to_container_removed (ContainerSourceCollection* self, - ContainerSource* container, - GeeCollection* sources) -{ -#line 82 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala" - g_return_if_fail (IS_CONTAINER_SOURCE_COLLECTION (self)); -#line 82 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala" - CONTAINER_SOURCE_COLLECTION_GET_CLASS (self)->notify_backlink_to_container_removed (self, container, sources); -#line 726 "ContainerSourceCollection.c" -} - - -static GeeCollection* -container_source_collection_real_get_containers_holding_source (ContainerSourceCollection* self, - DataSource* source) -{ -#line 87 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala" - g_critical ("Type `%s' does not implement abstract method `container_source_collection_get_containers_holding_source'", g_type_name (G_TYPE_FROM_INSTANCE (self))); -#line 87 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala" - return NULL; -#line 738 "ContainerSourceCollection.c" -} - - -GeeCollection* -container_source_collection_get_containers_holding_source (ContainerSourceCollection* self, - DataSource* source) -{ -#line 87 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala" - g_return_val_if_fail (IS_CONTAINER_SOURCE_COLLECTION (self), NULL); -#line 87 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala" - return CONTAINER_SOURCE_COLLECTION_GET_CLASS (self)->get_containers_holding_source (self, source); -#line 750 "ContainerSourceCollection.c" -} - - -static ContainerSource* -container_source_collection_real_convert_backlink_to_container (ContainerSourceCollection* self, - SourceBacklink* backlink) -{ -#line 90 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala" - g_critical ("Type `%s' does not implement abstract method `container_source_collection_convert_backlink_to_container'", g_type_name (G_TYPE_FROM_INSTANCE (self))); -#line 90 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala" - return NULL; -#line 762 "ContainerSourceCollection.c" -} - - -ContainerSource* -container_source_collection_convert_backlink_to_container (ContainerSourceCollection* self, - SourceBacklink* backlink) -{ -#line 90 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala" - g_return_val_if_fail (IS_CONTAINER_SOURCE_COLLECTION (self), NULL); -#line 90 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala" - return CONTAINER_SOURCE_COLLECTION_GET_CLASS (self)->convert_backlink_to_container (self, backlink); -#line 774 "ContainerSourceCollection.c" -} - - -void -container_source_collection_freeze_attached_notifications (ContainerSourceCollection* self) -{ -#line 92 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala" - g_return_if_fail (IS_CONTAINER_SOURCE_COLLECTION (self)); -#line 783 "ContainerSourceCollection.c" - { - GeeIterator* _collection_it = NULL; - GeeHashSet* _tmp0_; - GeeIterator* _tmp1_; -#line 93 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala" - _tmp0_ = self->priv->attached_collections; -#line 93 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala" - _tmp1_ = gee_abstract_collection_iterator (G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, GEE_TYPE_ABSTRACT_COLLECTION, GeeAbstractCollection)); -#line 93 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala" - _collection_it = _tmp1_; -#line 93 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala" - while (TRUE) { -#line 796 "ContainerSourceCollection.c" - GeeIterator* _tmp2_; - SourceCollection* collection = NULL; - GeeIterator* _tmp3_; - gpointer _tmp4_; - SourceCollection* _tmp5_; -#line 93 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala" - _tmp2_ = _collection_it; -#line 93 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala" - if (!gee_iterator_next (_tmp2_)) { -#line 93 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala" - break; -#line 808 "ContainerSourceCollection.c" - } -#line 93 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala" - _tmp3_ = _collection_it; -#line 93 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala" - _tmp4_ = gee_iterator_get (_tmp3_); -#line 93 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala" - collection = (SourceCollection*) _tmp4_; -#line 94 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala" - _tmp5_ = collection; -#line 94 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala" - data_collection_freeze_notifications (G_TYPE_CHECK_INSTANCE_CAST (_tmp5_, TYPE_DATA_COLLECTION, DataCollection)); -#line 93 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala" - _data_collection_unref0 (collection); -#line 822 "ContainerSourceCollection.c" - } -#line 93 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala" - _g_object_unref0 (_collection_it); -#line 826 "ContainerSourceCollection.c" - } -} - - -void -container_source_collection_thaw_attached_notifications (ContainerSourceCollection* self) -{ -#line 97 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala" - g_return_if_fail (IS_CONTAINER_SOURCE_COLLECTION (self)); -#line 836 "ContainerSourceCollection.c" - { - GeeIterator* _collection_it = NULL; - GeeHashSet* _tmp0_; - GeeIterator* _tmp1_; -#line 98 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala" - _tmp0_ = self->priv->attached_collections; -#line 98 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala" - _tmp1_ = gee_abstract_collection_iterator (G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, GEE_TYPE_ABSTRACT_COLLECTION, GeeAbstractCollection)); -#line 98 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala" - _collection_it = _tmp1_; -#line 98 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala" - while (TRUE) { -#line 849 "ContainerSourceCollection.c" - GeeIterator* _tmp2_; - SourceCollection* collection = NULL; - GeeIterator* _tmp3_; - gpointer _tmp4_; - SourceCollection* _tmp5_; -#line 98 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala" - _tmp2_ = _collection_it; -#line 98 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala" - if (!gee_iterator_next (_tmp2_)) { -#line 98 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala" - break; -#line 861 "ContainerSourceCollection.c" - } -#line 98 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala" - _tmp3_ = _collection_it; -#line 98 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala" - _tmp4_ = gee_iterator_get (_tmp3_); -#line 98 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala" - collection = (SourceCollection*) _tmp4_; -#line 99 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala" - _tmp5_ = collection; -#line 99 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala" - data_collection_thaw_notifications (G_TYPE_CHECK_INSTANCE_CAST (_tmp5_, TYPE_DATA_COLLECTION, DataCollection)); -#line 98 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala" - _data_collection_unref0 (collection); -#line 875 "ContainerSourceCollection.c" - } -#line 98 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala" - _g_object_unref0 (_collection_it); -#line 879 "ContainerSourceCollection.c" - } -} - - -GeeCollection* -container_source_collection_get_holding_tank (ContainerSourceCollection* self) -{ - GeeCollection* result = NULL; - GeeHashSet* _tmp0_; - GeeSet* _tmp1_; - GeeSet* _tmp2_; -#line 102 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala" - g_return_val_if_fail (IS_CONTAINER_SOURCE_COLLECTION (self), NULL); -#line 103 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala" - _tmp0_ = self->priv->holding_tank; -#line 103 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala" - _tmp1_ = gee_abstract_set_get_read_only_view (G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, GEE_TYPE_ABSTRACT_SET, GeeAbstractSet)); -#line 103 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala" - _tmp2_ = _tmp1_; -#line 103 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala" - result = G_TYPE_CHECK_INSTANCE_CAST (_tmp2_, GEE_TYPE_COLLECTION, GeeCollection); -#line 103 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala" - return result; -#line 903 "ContainerSourceCollection.c" -} - - -void -container_source_collection_init_add_unlinked (ContainerSourceCollection* self, - ContainerSource* unlinked) -{ - GeeHashSet* _tmp0_; -#line 106 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala" - g_return_if_fail (IS_CONTAINER_SOURCE_COLLECTION (self)); -#line 106 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala" - g_return_if_fail (IS_CONTAINER_SOURCE (unlinked)); -#line 107 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala" - _tmp0_ = self->priv->holding_tank; -#line 107 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala" - gee_abstract_collection_add (G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, GEE_TYPE_ABSTRACT_COLLECTION, GeeAbstractCollection), unlinked); -#line 920 "ContainerSourceCollection.c" -} - - -void -container_source_collection_init_add_many_unlinked (ContainerSourceCollection* self, - GeeCollection* unlinked) -{ - GeeHashSet* _tmp0_; -#line 110 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala" - g_return_if_fail (IS_CONTAINER_SOURCE_COLLECTION (self)); -#line 110 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala" - g_return_if_fail (GEE_IS_COLLECTION (unlinked)); -#line 111 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala" - _tmp0_ = self->priv->holding_tank; -#line 111 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala" - gee_collection_add_all (G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, GEE_TYPE_COLLECTION, GeeCollection), unlinked); -#line 937 "ContainerSourceCollection.c" -} - - -gboolean -container_source_collection_relink_from_holding_tank (ContainerSourceCollection* self, - ContainerSource* source) -{ - gboolean result = FALSE; - GeeHashSet* _tmp0_; -#line 114 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala" - g_return_val_if_fail (IS_CONTAINER_SOURCE_COLLECTION (self), FALSE); -#line 114 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala" - g_return_val_if_fail (IS_CONTAINER_SOURCE (source), FALSE); -#line 115 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala" - _tmp0_ = self->priv->holding_tank; -#line 115 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala" - if (!gee_abstract_collection_remove (G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, GEE_TYPE_ABSTRACT_COLLECTION, GeeAbstractCollection), source)) { -#line 116 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala" - result = FALSE; -#line 116 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala" - return result; -#line 959 "ContainerSourceCollection.c" - } -#line 118 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala" - source_collection_relink (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_SOURCE_COLLECTION, SourceCollection), G_TYPE_CHECK_INSTANCE_CAST (source, TYPE_DATA_SOURCE, DataSource)); -#line 120 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala" - result = TRUE; -#line 120 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala" - return result; -#line 967 "ContainerSourceCollection.c" -} - - -static void -container_source_collection_on_contained_sources_unlinking (ContainerSourceCollection* self, - GeeCollection* unlinking) -{ - GeeHashMultiMap* map = NULL; - GeeHashMultiMap* _tmp0_; -#line 123 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala" - g_return_if_fail (IS_CONTAINER_SOURCE_COLLECTION (self)); -#line 123 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala" - g_return_if_fail (GEE_IS_COLLECTION (unlinking)); -#line 124 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala" - container_source_collection_freeze_attached_notifications (self); -#line 126 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala" - _tmp0_ = gee_hash_multi_map_new (TYPE_CONTAINER_SOURCE, (GBoxedCopyFunc) g_object_ref, (GDestroyNotify) g_object_unref, TYPE_DATA_SOURCE, (GBoxedCopyFunc) g_object_ref, (GDestroyNotify) g_object_unref, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL); -#line 126 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala" - map = _tmp0_; -#line 987 "ContainerSourceCollection.c" - { - GeeIterator* _source_it = NULL; - GeeIterator* _tmp1_; -#line 129 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala" - _tmp1_ = gee_iterable_iterator (G_TYPE_CHECK_INSTANCE_CAST (unlinking, GEE_TYPE_ITERABLE, GeeIterable)); -#line 129 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala" - _source_it = _tmp1_; -#line 129 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala" - while (TRUE) { -#line 997 "ContainerSourceCollection.c" - GeeIterator* _tmp2_; - DataSource* source = NULL; - GeeIterator* _tmp3_; - gpointer _tmp4_; - GeeCollection* containers = NULL; - DataSource* _tmp5_; - GeeCollection* _tmp6_; - gboolean _tmp7_ = FALSE; - GeeCollection* _tmp8_; -#line 129 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala" - _tmp2_ = _source_it; -#line 129 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala" - if (!gee_iterator_next (_tmp2_)) { -#line 129 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala" - break; -#line 1013 "ContainerSourceCollection.c" - } -#line 129 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala" - _tmp3_ = _source_it; -#line 129 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala" - _tmp4_ = gee_iterator_get (_tmp3_); -#line 129 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala" - source = (DataSource*) _tmp4_; -#line 130 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala" - _tmp5_ = source; -#line 130 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala" - _tmp6_ = container_source_collection_get_containers_holding_source (self, _tmp5_); -#line 130 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala" - containers = _tmp6_; -#line 131 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala" - _tmp8_ = containers; -#line 131 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala" - if (_tmp8_ == NULL) { -#line 131 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala" - _tmp7_ = TRUE; -#line 1033 "ContainerSourceCollection.c" - } else { - GeeCollection* _tmp9_; - gint _tmp10_; - gint _tmp11_; -#line 131 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala" - _tmp9_ = containers; -#line 131 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala" - _tmp10_ = gee_collection_get_size (_tmp9_); -#line 131 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala" - _tmp11_ = _tmp10_; -#line 131 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala" - _tmp7_ = _tmp11_ == 0; -#line 1046 "ContainerSourceCollection.c" - } -#line 131 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala" - if (_tmp7_) { -#line 132 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala" - _g_object_unref0 (containers); -#line 132 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala" - _g_object_unref0 (source); -#line 132 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala" - continue; -#line 1056 "ContainerSourceCollection.c" - } - { - GeeIterator* _container_it = NULL; - GeeCollection* _tmp12_; - GeeIterator* _tmp13_; -#line 134 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala" - _tmp12_ = containers; -#line 134 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala" - _tmp13_ = gee_iterable_iterator (G_TYPE_CHECK_INSTANCE_CAST (_tmp12_, GEE_TYPE_ITERABLE, GeeIterable)); -#line 134 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala" - _container_it = _tmp13_; -#line 134 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala" - while (TRUE) { -#line 1070 "ContainerSourceCollection.c" - GeeIterator* _tmp14_; - ContainerSource* container = NULL; - GeeIterator* _tmp15_; - gpointer _tmp16_; - GeeHashMultiMap* _tmp17_; - ContainerSource* _tmp18_; - DataSource* _tmp19_; - DataSource* _tmp20_; - ContainerSource* _tmp21_; - SourceBacklink* _tmp22_; - SourceBacklink* _tmp23_; -#line 134 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala" - _tmp14_ = _container_it; -#line 134 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala" - if (!gee_iterator_next (_tmp14_)) { -#line 134 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala" - break; -#line 1088 "ContainerSourceCollection.c" - } -#line 134 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala" - _tmp15_ = _container_it; -#line 134 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala" - _tmp16_ = gee_iterator_get (_tmp15_); -#line 134 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala" - container = (ContainerSource*) _tmp16_; -#line 135 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala" - _tmp17_ = map; -#line 135 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala" - _tmp18_ = container; -#line 135 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala" - _tmp19_ = source; -#line 135 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala" - gee_multi_map_set (G_TYPE_CHECK_INSTANCE_CAST (_tmp17_, GEE_TYPE_MULTI_MAP, GeeMultiMap), _tmp18_, _tmp19_); -#line 136 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala" - _tmp20_ = source; -#line 136 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala" - _tmp21_ = container; -#line 136 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala" - _tmp22_ = container_source_get_backlink (_tmp21_); -#line 136 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala" - _tmp23_ = _tmp22_; -#line 136 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala" - data_source_set_backlink (_tmp20_, _tmp23_); -#line 136 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala" - _source_backlink_unref0 (_tmp23_); -#line 134 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala" - _g_object_unref0 (container); -#line 1118 "ContainerSourceCollection.c" - } -#line 134 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala" - _g_object_unref0 (_container_it); -#line 1122 "ContainerSourceCollection.c" - } -#line 129 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala" - _g_object_unref0 (containers); -#line 129 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala" - _g_object_unref0 (source); -#line 1128 "ContainerSourceCollection.c" - } -#line 129 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala" - _g_object_unref0 (_source_it); -#line 1132 "ContainerSourceCollection.c" - } - { - GeeIterator* _container_it = NULL; - GeeHashMultiMap* _tmp24_; - GeeSet* _tmp25_; - GeeSet* _tmp26_; - GeeIterator* _tmp27_; - GeeIterator* _tmp28_; -#line 140 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala" - _tmp24_ = map; -#line 140 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala" - _tmp25_ = gee_multi_map_get_keys (G_TYPE_CHECK_INSTANCE_CAST (_tmp24_, GEE_TYPE_MULTI_MAP, GeeMultiMap)); -#line 140 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala" - _tmp26_ = _tmp25_; -#line 140 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala" - _tmp27_ = gee_iterable_iterator (G_TYPE_CHECK_INSTANCE_CAST (_tmp26_, GEE_TYPE_ITERABLE, GeeIterable)); -#line 140 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala" - _tmp28_ = _tmp27_; -#line 140 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala" - _g_object_unref0 (_tmp26_); -#line 140 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala" - _container_it = _tmp28_; -#line 140 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala" - while (TRUE) { -#line 1157 "ContainerSourceCollection.c" - GeeIterator* _tmp29_; - ContainerSource* container = NULL; - GeeIterator* _tmp30_; - gpointer _tmp31_; - ContainerSource* _tmp32_; - GeeHashMultiMap* _tmp33_; - ContainerSource* _tmp34_; - GeeCollection* _tmp35_; - GeeCollection* _tmp36_; -#line 140 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala" - _tmp29_ = _container_it; -#line 140 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala" - if (!gee_iterator_next (_tmp29_)) { -#line 140 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala" - break; -#line 1173 "ContainerSourceCollection.c" - } -#line 140 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala" - _tmp30_ = _container_it; -#line 140 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala" - _tmp31_ = gee_iterator_get (_tmp30_); -#line 140 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala" - container = (ContainerSource*) _tmp31_; -#line 141 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala" - _tmp32_ = container; -#line 141 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala" - _tmp33_ = map; -#line 141 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala" - _tmp34_ = container; -#line 141 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala" - _tmp35_ = gee_multi_map_get (G_TYPE_CHECK_INSTANCE_CAST (_tmp33_, GEE_TYPE_MULTI_MAP, GeeMultiMap), _tmp34_); -#line 141 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala" - _tmp36_ = _tmp35_; -#line 141 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala" - container_source_break_link_many (_tmp32_, _tmp36_); -#line 141 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala" - _g_object_unref0 (_tmp36_); -#line 140 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala" - _g_object_unref0 (container); -#line 1197 "ContainerSourceCollection.c" - } -#line 140 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala" - _g_object_unref0 (_container_it); -#line 1201 "ContainerSourceCollection.c" - } -#line 143 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala" - container_source_collection_thaw_attached_notifications (self); -#line 123 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala" - _g_object_unref0 (map); -#line 1207 "ContainerSourceCollection.c" -} - - -static gpointer -_g_object_ref0 (gpointer self) -{ -#line 157 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala" - return self ? g_object_ref (self) : NULL; -#line 1216 "ContainerSourceCollection.c" -} - - -static void -container_source_collection_on_contained_sources_relinked (ContainerSourceCollection* self, - GeeCollection* relinked) -{ - GeeHashMultiMap* map = NULL; - GeeHashMultiMap* _tmp0_; -#line 146 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala" - g_return_if_fail (IS_CONTAINER_SOURCE_COLLECTION (self)); -#line 146 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala" - g_return_if_fail (GEE_IS_COLLECTION (relinked)); -#line 147 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala" - container_source_collection_freeze_attached_notifications (self); -#line 149 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala" - _tmp0_ = gee_hash_multi_map_new (TYPE_CONTAINER_SOURCE, (GBoxedCopyFunc) g_object_ref, (GDestroyNotify) g_object_unref, TYPE_DATA_SOURCE, (GBoxedCopyFunc) g_object_ref, (GDestroyNotify) g_object_unref, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL); -#line 149 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala" - map = _tmp0_; -#line 1236 "ContainerSourceCollection.c" - { - GeeIterator* _source_it = NULL; - GeeIterator* _tmp1_; -#line 152 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala" - _tmp1_ = gee_iterable_iterator (G_TYPE_CHECK_INSTANCE_CAST (relinked, GEE_TYPE_ITERABLE, GeeIterable)); -#line 152 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala" - _source_it = _tmp1_; -#line 152 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala" - while (TRUE) { -#line 1246 "ContainerSourceCollection.c" - GeeIterator* _tmp2_; - DataSource* source = NULL; - GeeIterator* _tmp3_; - gpointer _tmp4_; - GeeList* backlinks = NULL; - DataSource* _tmp5_; - const gchar* _tmp6_; - GeeList* _tmp7_; - gboolean _tmp8_ = FALSE; - GeeList* _tmp9_; -#line 152 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala" - _tmp2_ = _source_it; -#line 152 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala" - if (!gee_iterator_next (_tmp2_)) { -#line 152 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala" - break; -#line 1263 "ContainerSourceCollection.c" - } -#line 152 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala" - _tmp3_ = _source_it; -#line 152 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala" - _tmp4_ = gee_iterator_get (_tmp3_); -#line 152 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala" - source = (DataSource*) _tmp4_; -#line 153 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala" - _tmp5_ = source; -#line 153 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala" - _tmp6_ = self->priv->backlink_name; -#line 153 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala" - _tmp7_ = data_source_get_backlinks (_tmp5_, _tmp6_); -#line 153 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala" - backlinks = _tmp7_; -#line 154 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala" - _tmp9_ = backlinks; -#line 154 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala" - if (_tmp9_ == NULL) { -#line 154 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala" - _tmp8_ = TRUE; -#line 1285 "ContainerSourceCollection.c" - } else { - GeeList* _tmp10_; - gint _tmp11_; - gint _tmp12_; -#line 154 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala" - _tmp10_ = backlinks; -#line 154 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala" - _tmp11_ = gee_collection_get_size (G_TYPE_CHECK_INSTANCE_CAST (_tmp10_, GEE_TYPE_COLLECTION, GeeCollection)); -#line 154 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala" - _tmp12_ = _tmp11_; -#line 154 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala" - _tmp8_ = _tmp12_ == 0; -#line 1298 "ContainerSourceCollection.c" - } -#line 154 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala" - if (_tmp8_) { -#line 155 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala" - _g_object_unref0 (backlinks); -#line 155 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala" - _g_object_unref0 (source); -#line 155 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala" - continue; -#line 1308 "ContainerSourceCollection.c" - } - { - GeeList* _backlink_list = NULL; - GeeList* _tmp13_; - GeeList* _tmp14_; - gint _backlink_size = 0; - GeeList* _tmp15_; - gint _tmp16_; - gint _tmp17_; - gint _backlink_index = 0; -#line 157 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala" - _tmp13_ = backlinks; -#line 157 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala" - _tmp14_ = _g_object_ref0 (_tmp13_); -#line 157 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala" - _backlink_list = _tmp14_; -#line 157 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala" - _tmp15_ = _backlink_list; -#line 157 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala" - _tmp16_ = gee_collection_get_size (G_TYPE_CHECK_INSTANCE_CAST (_tmp15_, GEE_TYPE_COLLECTION, GeeCollection)); -#line 157 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala" - _tmp17_ = _tmp16_; -#line 157 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala" - _backlink_size = _tmp17_; -#line 157 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala" - _backlink_index = -1; -#line 157 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala" - while (TRUE) { -#line 1337 "ContainerSourceCollection.c" - gint _tmp18_; - gint _tmp19_; - gint _tmp20_; - SourceBacklink* backlink = NULL; - GeeList* _tmp21_; - gint _tmp22_; - gpointer _tmp23_; - ContainerSource* container = NULL; - SourceBacklink* _tmp24_; - ContainerSource* _tmp25_; - ContainerSource* _tmp26_; -#line 157 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala" - _tmp18_ = _backlink_index; -#line 157 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala" - _backlink_index = _tmp18_ + 1; -#line 157 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala" - _tmp19_ = _backlink_index; -#line 157 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala" - _tmp20_ = _backlink_size; -#line 157 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala" - if (!(_tmp19_ < _tmp20_)) { -#line 157 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala" - break; -#line 1361 "ContainerSourceCollection.c" - } -#line 157 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala" - _tmp21_ = _backlink_list; -#line 157 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala" - _tmp22_ = _backlink_index; -#line 157 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala" - _tmp23_ = gee_list_get (_tmp21_, _tmp22_); -#line 157 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala" - backlink = (SourceBacklink*) _tmp23_; -#line 158 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala" - _tmp24_ = backlink; -#line 158 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala" - _tmp25_ = container_source_collection_convert_backlink_to_container (self, _tmp24_); -#line 158 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala" - container = _tmp25_; -#line 159 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala" - _tmp26_ = container; -#line 159 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala" - if (_tmp26_ != NULL) { -#line 1381 "ContainerSourceCollection.c" - GeeHashMultiMap* _tmp27_; - ContainerSource* _tmp28_; - DataSource* _tmp29_; -#line 160 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala" - _tmp27_ = map; -#line 160 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala" - _tmp28_ = container; -#line 160 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala" - _tmp29_ = source; -#line 160 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala" - gee_multi_map_set (G_TYPE_CHECK_INSTANCE_CAST (_tmp27_, GEE_TYPE_MULTI_MAP, GeeMultiMap), _tmp28_, _tmp29_); -#line 1393 "ContainerSourceCollection.c" - } else { - DataSource* _tmp30_; - gchar* _tmp31_; - gchar* _tmp32_; - SourceBacklink* _tmp33_; - gchar* _tmp34_; - gchar* _tmp35_; -#line 162 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala" - _tmp30_ = source; -#line 162 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala" - _tmp31_ = data_object_to_string (G_TYPE_CHECK_INSTANCE_CAST (_tmp30_, TYPE_DATA_OBJECT, DataObject)); -#line 162 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala" - _tmp32_ = _tmp31_; -#line 162 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala" - _tmp33_ = backlink; -#line 162 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala" - _tmp34_ = source_backlink_to_string (_tmp33_); -#line 162 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala" - _tmp35_ = _tmp34_; -#line 162 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala" - g_warning ("ContainerSourceCollection.vala:162: Unable to relink %s to container b" \ -"acklink %s", _tmp32_, _tmp35_); -#line 162 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala" - _g_free0 (_tmp35_); -#line 162 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala" - _g_free0 (_tmp32_); -#line 1419 "ContainerSourceCollection.c" - } -#line 157 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala" - _g_object_unref0 (container); -#line 157 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala" - _source_backlink_unref0 (backlink); -#line 1425 "ContainerSourceCollection.c" - } -#line 157 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala" - _g_object_unref0 (_backlink_list); -#line 1429 "ContainerSourceCollection.c" - } -#line 152 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala" - _g_object_unref0 (backlinks); -#line 152 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala" - _g_object_unref0 (source); -#line 1435 "ContainerSourceCollection.c" - } -#line 152 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala" - _g_object_unref0 (_source_it); -#line 1439 "ContainerSourceCollection.c" - } - { - GeeIterator* _container_it = NULL; - GeeHashMultiMap* _tmp36_; - GeeSet* _tmp37_; - GeeSet* _tmp38_; - GeeIterator* _tmp39_; - GeeIterator* _tmp40_; -#line 168 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala" - _tmp36_ = map; -#line 168 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala" - _tmp37_ = gee_multi_map_get_keys (G_TYPE_CHECK_INSTANCE_CAST (_tmp36_, GEE_TYPE_MULTI_MAP, GeeMultiMap)); -#line 168 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala" - _tmp38_ = _tmp37_; -#line 168 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala" - _tmp39_ = gee_iterable_iterator (G_TYPE_CHECK_INSTANCE_CAST (_tmp38_, GEE_TYPE_ITERABLE, GeeIterable)); -#line 168 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala" - _tmp40_ = _tmp39_; -#line 168 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala" - _g_object_unref0 (_tmp38_); -#line 168 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala" - _container_it = _tmp40_; -#line 168 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala" - while (TRUE) { -#line 1464 "ContainerSourceCollection.c" - GeeIterator* _tmp41_; - ContainerSource* container = NULL; - GeeIterator* _tmp42_; - gpointer _tmp43_; - ContainerSource* _tmp44_; - GeeHashMultiMap* _tmp45_; - ContainerSource* _tmp46_; - GeeCollection* _tmp47_; - GeeCollection* _tmp48_; -#line 168 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala" - _tmp41_ = _container_it; -#line 168 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala" - if (!gee_iterator_next (_tmp41_)) { -#line 168 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala" - break; -#line 1480 "ContainerSourceCollection.c" - } -#line 168 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala" - _tmp42_ = _container_it; -#line 168 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala" - _tmp43_ = gee_iterator_get (_tmp42_); -#line 168 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala" - container = (ContainerSource*) _tmp43_; -#line 169 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala" - _tmp44_ = container; -#line 169 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala" - _tmp45_ = map; -#line 169 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala" - _tmp46_ = container; -#line 169 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala" - _tmp47_ = gee_multi_map_get (G_TYPE_CHECK_INSTANCE_CAST (_tmp45_, GEE_TYPE_MULTI_MAP, GeeMultiMap), _tmp46_); -#line 169 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala" - _tmp48_ = _tmp47_; -#line 169 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala" - container_source_establish_link_many (_tmp44_, _tmp48_); -#line 169 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala" - _g_object_unref0 (_tmp48_); -#line 168 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala" - _g_object_unref0 (container); -#line 1504 "ContainerSourceCollection.c" - } -#line 168 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala" - _g_object_unref0 (_container_it); -#line 1508 "ContainerSourceCollection.c" - } -#line 171 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala" - container_source_collection_thaw_attached_notifications (self); -#line 146 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala" - _g_object_unref0 (map); -#line 1514 "ContainerSourceCollection.c" -} - - -static void -container_source_collection_on_contained_source_destroyed (ContainerSourceCollection* self, - DataSource* source) -{ - GeeIterator* iter = NULL; - GeeHashSet* _tmp0_; - GeeIterator* _tmp1_; -#line 174 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala" - g_return_if_fail (IS_CONTAINER_SOURCE_COLLECTION (self)); -#line 174 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala" - g_return_if_fail (IS_DATA_SOURCE (source)); -#line 175 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala" - _tmp0_ = self->priv->holding_tank; -#line 175 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala" - _tmp1_ = gee_abstract_collection_iterator (G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, GEE_TYPE_ABSTRACT_COLLECTION, GeeAbstractCollection)); -#line 175 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala" - iter = _tmp1_; -#line 176 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala" - while (TRUE) { -#line 1537 "ContainerSourceCollection.c" - GeeIterator* _tmp2_; - ContainerSource* container = NULL; - GeeIterator* _tmp3_; - gpointer _tmp4_; - gboolean _tmp5_ = FALSE; - ContainerSource* _tmp6_; -#line 176 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala" - _tmp2_ = iter; -#line 176 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala" - if (!gee_iterator_next (_tmp2_)) { -#line 176 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala" - break; -#line 1550 "ContainerSourceCollection.c" - } -#line 177 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala" - _tmp3_ = iter; -#line 177 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala" - _tmp4_ = gee_iterator_get (_tmp3_); -#line 177 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala" - container = (ContainerSource*) _tmp4_; -#line 181 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala" - _tmp6_ = container; -#line 181 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala" - if (!container_source_has_links (_tmp6_)) { -#line 1562 "ContainerSourceCollection.c" - ContainerSource* _tmp7_; -#line 181 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala" - _tmp7_ = container; -#line 181 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala" - _tmp5_ = !G_TYPE_CHECK_INSTANCE_TYPE (_tmp7_, TYPE_TAG); -#line 1568 "ContainerSourceCollection.c" - } else { -#line 181 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala" - _tmp5_ = FALSE; -#line 1572 "ContainerSourceCollection.c" - } -#line 181 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala" - if (_tmp5_) { -#line 1576 "ContainerSourceCollection.c" - GeeIterator* _tmp8_; - ContainerSource* _tmp9_; -#line 182 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala" - _tmp8_ = iter; -#line 182 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala" - gee_iterator_remove (_tmp8_); -#line 183 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala" - _tmp9_ = container; -#line 183 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala" - data_source_destroy_orphan (G_TYPE_CHECK_INSTANCE_CAST (_tmp9_, TYPE_DATA_SOURCE, DataSource), TRUE); -#line 1587 "ContainerSourceCollection.c" - } -#line 176 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala" - _g_object_unref0 (container); -#line 1591 "ContainerSourceCollection.c" - } -#line 174 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala" - _g_object_unref0 (iter); -#line 1595 "ContainerSourceCollection.c" -} - - -static void -container_source_collection_real_notify_item_destroyed (SourceCollection* base, - DataSource* source) -{ - ContainerSourceCollection * self; -#line 188 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala" - self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_CONTAINER_SOURCE_COLLECTION, ContainerSourceCollection); -#line 188 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala" - g_return_if_fail (IS_DATA_SOURCE (source)); -#line 1608 "ContainerSourceCollection.c" - { - GeeIterator* _collection_it = NULL; - GeeHashSet* _tmp0_; - GeeIterator* _tmp1_; -#line 189 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala" - _tmp0_ = self->priv->attached_collections; -#line 189 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala" - _tmp1_ = gee_abstract_collection_iterator (G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, GEE_TYPE_ABSTRACT_COLLECTION, GeeAbstractCollection)); -#line 189 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala" - _collection_it = _tmp1_; -#line 189 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala" - while (TRUE) { -#line 1621 "ContainerSourceCollection.c" - GeeIterator* _tmp2_; - SourceCollection* collection = NULL; - GeeIterator* _tmp3_; - gpointer _tmp4_; - SourceCollection* _tmp5_; - SourceBacklink* _tmp6_; - SourceBacklink* _tmp7_; -#line 189 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala" - _tmp2_ = _collection_it; -#line 189 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala" - if (!gee_iterator_next (_tmp2_)) { -#line 189 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala" - break; -#line 1635 "ContainerSourceCollection.c" - } -#line 189 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala" - _tmp3_ = _collection_it; -#line 189 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala" - _tmp4_ = gee_iterator_get (_tmp3_); -#line 189 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala" - collection = (SourceCollection*) _tmp4_; -#line 190 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala" - _tmp5_ = collection; -#line 190 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala" - _tmp6_ = container_source_get_backlink (G_TYPE_CHECK_INSTANCE_CAST (source, TYPE_CONTAINER_SOURCE, ContainerSource)); -#line 190 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala" - _tmp7_ = _tmp6_; -#line 190 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala" - source_collection_remove_backlink (_tmp5_, _tmp7_); -#line 190 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala" - _source_backlink_unref0 (_tmp7_); -#line 189 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala" - _data_collection_unref0 (collection); -#line 1655 "ContainerSourceCollection.c" - } -#line 189 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala" - _g_object_unref0 (_collection_it); -#line 1659 "ContainerSourceCollection.c" - } -#line 193 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala" - SOURCE_COLLECTION_CLASS (container_source_collection_parent_class)->notify_item_destroyed (G_TYPE_CHECK_INSTANCE_CAST (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_DATABASE_SOURCE_COLLECTION, DatabaseSourceCollection), TYPE_SOURCE_COLLECTION, SourceCollection), source); -#line 1663 "ContainerSourceCollection.c" -} - - -void -container_source_collection_evaporate (ContainerSourceCollection* self, - ContainerSource* container) -{ - Marker* _tmp15_; - Marker* _tmp16_; -#line 200 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala" - g_return_if_fail (IS_CONTAINER_SOURCE_COLLECTION (self)); -#line 200 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala" - g_return_if_fail (IS_CONTAINER_SOURCE (container)); -#line 1677 "ContainerSourceCollection.c" - { - GeeIterator* _collection_it = NULL; - GeeHashSet* _tmp0_; - GeeIterator* _tmp1_; -#line 201 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala" - _tmp0_ = self->priv->attached_collections; -#line 201 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala" - _tmp1_ = gee_abstract_collection_iterator (G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, GEE_TYPE_ABSTRACT_COLLECTION, GeeAbstractCollection)); -#line 201 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala" - _collection_it = _tmp1_; -#line 201 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala" - while (TRUE) { -#line 1690 "ContainerSourceCollection.c" - GeeIterator* _tmp2_; - SourceCollection* collection = NULL; - GeeIterator* _tmp3_; - gpointer _tmp4_; - SourceCollection* _tmp5_; - SourceBacklink* _tmp6_; - SourceBacklink* _tmp7_; - gboolean _tmp8_; -#line 201 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala" - _tmp2_ = _collection_it; -#line 201 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala" - if (!gee_iterator_next (_tmp2_)) { -#line 201 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala" - break; -#line 1705 "ContainerSourceCollection.c" - } -#line 201 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala" - _tmp3_ = _collection_it; -#line 201 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala" - _tmp4_ = gee_iterator_get (_tmp3_); -#line 201 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala" - collection = (SourceCollection*) _tmp4_; -#line 202 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala" - _tmp5_ = collection; -#line 202 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala" - _tmp6_ = container_source_get_backlink (container); -#line 202 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala" - _tmp7_ = _tmp6_; -#line 202 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala" - _tmp8_ = source_collection_has_backlink (_tmp5_, _tmp7_); -#line 202 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala" - _source_backlink_unref0 (_tmp7_); -#line 202 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala" - if (_tmp8_) { -#line 1725 "ContainerSourceCollection.c" - Marker* _tmp9_; - Marker* _tmp10_; - GeeCollection* _tmp11_; - GeeCollection* _tmp12_; - gboolean added = FALSE; - GeeHashSet* _tmp13_; - gboolean _tmp14_; -#line 203 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala" - _tmp9_ = data_collection_mark (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_DATA_COLLECTION, DataCollection), G_TYPE_CHECK_INSTANCE_CAST (container, TYPE_DATA_OBJECT, DataObject)); -#line 203 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala" - _tmp10_ = _tmp9_; -#line 203 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala" - _tmp11_ = source_collection_unlink_marked (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_SOURCE_COLLECTION, SourceCollection), _tmp10_, NULL, NULL); -#line 203 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala" - _tmp12_ = _tmp11_; -#line 203 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala" - _g_object_unref0 (_tmp12_); -#line 203 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala" - _g_object_unref0 (_tmp10_); -#line 204 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala" - _tmp13_ = self->priv->holding_tank; -#line 204 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala" - added = gee_abstract_collection_add (G_TYPE_CHECK_INSTANCE_CAST (_tmp13_, GEE_TYPE_ABSTRACT_COLLECTION, GeeAbstractCollection), container); -#line 205 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala" - _tmp14_ = added; -#line 205 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala" - _vala_assert (_tmp14_, "added"); -#line 206 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala" - _data_collection_unref0 (collection); -#line 206 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala" - _g_object_unref0 (_collection_it); -#line 206 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala" - return; -#line 1759 "ContainerSourceCollection.c" - } -#line 201 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala" - _data_collection_unref0 (collection); -#line 1763 "ContainerSourceCollection.c" - } -#line 201 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala" - _g_object_unref0 (_collection_it); -#line 1767 "ContainerSourceCollection.c" - } -#line 210 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala" - _tmp15_ = data_collection_mark (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_DATA_COLLECTION, DataCollection), G_TYPE_CHECK_INSTANCE_CAST (container, TYPE_DATA_OBJECT, DataObject)); -#line 210 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala" - _tmp16_ = _tmp15_; -#line 210 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala" - source_collection_destroy_marked (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_SOURCE_COLLECTION, SourceCollection), _tmp16_, TRUE, NULL, NULL, NULL); -#line 210 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala" - _g_object_unref0 (_tmp16_); -#line 1777 "ContainerSourceCollection.c" -} - - -static void -_container_source_collection_on_contained_sources_unlinking_source_collection_items_unlinking (SourceCollection* _sender, - GeeCollection* unlinking, - gpointer self) -{ -#line 221 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala" - container_source_collection_on_contained_sources_unlinking ((ContainerSourceCollection*) self, unlinking); -#line 1788 "ContainerSourceCollection.c" -} - - -static void -_container_source_collection_on_contained_sources_relinked_source_collection_items_relinked (SourceCollection* _sender, - GeeCollection* relinked, - gpointer self) -{ -#line 222 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala" - container_source_collection_on_contained_sources_relinked ((ContainerSourceCollection*) self, relinked); -#line 1799 "ContainerSourceCollection.c" -} - - -static void -_container_source_collection_on_contained_source_destroyed_source_collection_item_destroyed (SourceCollection* _sender, - DataSource* source, - gpointer self) -{ -#line 223 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala" - container_source_collection_on_contained_source_destroyed ((ContainerSourceCollection*) self, source); -#line 1810 "ContainerSourceCollection.c" -} - - -static void -_container_source_collection_on_contained_source_destroyed_source_collection_unlinked_destroyed (SourceCollection* _sender, - DataSource* source, - gpointer self) -{ -#line 224 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala" - container_source_collection_on_contained_source_destroyed ((ContainerSourceCollection*) self, source); -#line 1821 "ContainerSourceCollection.c" -} - - -void -container_source_collection_attach_collection (ContainerSourceCollection* self, - SourceCollection* collection) -{ - GeeHashSet* _tmp0_; - GeeHashSet* _tmp5_; -#line 213 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala" - g_return_if_fail (IS_CONTAINER_SOURCE_COLLECTION (self)); -#line 213 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala" - g_return_if_fail (IS_SOURCE_COLLECTION (collection)); -#line 214 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala" - _tmp0_ = self->priv->attached_collections; -#line 214 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala" - if (gee_abstract_collection_contains (G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, GEE_TYPE_ABSTRACT_COLLECTION, GeeAbstractCollection), collection)) { -#line 1839 "ContainerSourceCollection.c" - gchar* _tmp1_; - gchar* _tmp2_; - gchar* _tmp3_; - gchar* _tmp4_; -#line 215 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala" - _tmp1_ = data_collection_to_string (G_TYPE_CHECK_INSTANCE_CAST (collection, TYPE_DATA_COLLECTION, DataCollection)); -#line 215 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala" - _tmp2_ = _tmp1_; -#line 215 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala" - _tmp3_ = data_collection_to_string (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_DATA_COLLECTION, DataCollection)); -#line 215 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala" - _tmp4_ = _tmp3_; -#line 215 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala" - g_warning ("ContainerSourceCollection.vala:215: attempted to multiple-attach '%s' " \ -"to '%s'", _tmp2_, _tmp4_); -#line 215 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala" - _g_free0 (_tmp4_); -#line 215 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala" - _g_free0 (_tmp2_); -#line 216 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala" - return; -#line 1860 "ContainerSourceCollection.c" - } -#line 219 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala" - _tmp5_ = self->priv->attached_collections; -#line 219 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala" - gee_abstract_collection_add (G_TYPE_CHECK_INSTANCE_CAST (_tmp5_, GEE_TYPE_ABSTRACT_COLLECTION, GeeAbstractCollection), collection); -#line 221 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala" - g_signal_connect (collection, "items-unlinking", (GCallback) _container_source_collection_on_contained_sources_unlinking_source_collection_items_unlinking, self); -#line 222 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala" - g_signal_connect (collection, "items-relinked", (GCallback) _container_source_collection_on_contained_sources_relinked_source_collection_items_relinked, self); -#line 223 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala" - g_signal_connect (collection, "item-destroyed", (GCallback) _container_source_collection_on_contained_source_destroyed_source_collection_item_destroyed, self); -#line 224 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala" - g_signal_connect (collection, "unlinked-destroyed", (GCallback) _container_source_collection_on_contained_source_destroyed_source_collection_unlinked_destroyed, self); -#line 1874 "ContainerSourceCollection.c" -} - - -void -container_source_collection_detach_all_collections (ContainerSourceCollection* self) -{ - GeeHashSet* _tmp13_; -#line 227 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala" - g_return_if_fail (IS_CONTAINER_SOURCE_COLLECTION (self)); -#line 1884 "ContainerSourceCollection.c" - { - GeeIterator* _collection_it = NULL; - GeeHashSet* _tmp0_; - GeeIterator* _tmp1_; -#line 228 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala" - _tmp0_ = self->priv->attached_collections; -#line 228 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala" - _tmp1_ = gee_abstract_collection_iterator (G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, GEE_TYPE_ABSTRACT_COLLECTION, GeeAbstractCollection)); -#line 228 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala" - _collection_it = _tmp1_; -#line 228 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala" - while (TRUE) { -#line 1897 "ContainerSourceCollection.c" - GeeIterator* _tmp2_; - SourceCollection* collection = NULL; - GeeIterator* _tmp3_; - gpointer _tmp4_; - SourceCollection* _tmp5_; - guint _tmp6_; - SourceCollection* _tmp7_; - guint _tmp8_; - SourceCollection* _tmp9_; - guint _tmp10_; - SourceCollection* _tmp11_; - guint _tmp12_; -#line 228 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala" - _tmp2_ = _collection_it; -#line 228 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala" - if (!gee_iterator_next (_tmp2_)) { -#line 228 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala" - break; -#line 1916 "ContainerSourceCollection.c" - } -#line 228 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala" - _tmp3_ = _collection_it; -#line 228 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala" - _tmp4_ = gee_iterator_get (_tmp3_); -#line 228 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala" - collection = (SourceCollection*) _tmp4_; -#line 229 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala" - _tmp5_ = collection; -#line 229 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala" - g_signal_parse_name ("items-unlinking", TYPE_SOURCE_COLLECTION, &_tmp6_, NULL, FALSE); -#line 229 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala" - g_signal_handlers_disconnect_matched (_tmp5_, G_SIGNAL_MATCH_ID | G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA, _tmp6_, 0, NULL, (GCallback) _container_source_collection_on_contained_sources_unlinking_source_collection_items_unlinking, self); -#line 230 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala" - _tmp7_ = collection; -#line 230 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala" - g_signal_parse_name ("items-relinked", TYPE_SOURCE_COLLECTION, &_tmp8_, NULL, FALSE); -#line 230 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala" - g_signal_handlers_disconnect_matched (_tmp7_, G_SIGNAL_MATCH_ID | G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA, _tmp8_, 0, NULL, (GCallback) _container_source_collection_on_contained_sources_relinked_source_collection_items_relinked, self); -#line 231 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala" - _tmp9_ = collection; -#line 231 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala" - g_signal_parse_name ("item-destroyed", TYPE_SOURCE_COLLECTION, &_tmp10_, NULL, FALSE); -#line 231 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala" - g_signal_handlers_disconnect_matched (_tmp9_, G_SIGNAL_MATCH_ID | G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA, _tmp10_, 0, NULL, (GCallback) _container_source_collection_on_contained_source_destroyed_source_collection_item_destroyed, self); -#line 232 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala" - _tmp11_ = collection; -#line 232 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala" - g_signal_parse_name ("unlinked-destroyed", TYPE_SOURCE_COLLECTION, &_tmp12_, NULL, FALSE); -#line 232 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala" - g_signal_handlers_disconnect_matched (_tmp11_, G_SIGNAL_MATCH_ID | G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA, _tmp12_, 0, NULL, (GCallback) _container_source_collection_on_contained_source_destroyed_source_collection_unlinked_destroyed, self); -#line 228 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala" - _data_collection_unref0 (collection); -#line 1950 "ContainerSourceCollection.c" - } -#line 228 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala" - _g_object_unref0 (_collection_it); -#line 1954 "ContainerSourceCollection.c" - } -#line 235 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala" - _tmp13_ = self->priv->attached_collections; -#line 235 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala" - gee_abstract_collection_clear (G_TYPE_CHECK_INSTANCE_CAST (_tmp13_, GEE_TYPE_ABSTRACT_COLLECTION, GeeAbstractCollection)); -#line 1960 "ContainerSourceCollection.c" -} - - -static void -container_source_collection_real_container_contents_added (ContainerSourceCollection* self, - ContainerSource* container, - GeeCollection* added, - gboolean relinked) -{ -#line 20 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala" - g_return_if_fail (IS_CONTAINER_SOURCE (container)); -#line 20 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala" - g_return_if_fail (GEE_IS_COLLECTION (added)); -#line 1974 "ContainerSourceCollection.c" -} - - -static void -g_cclosure_user_marshal_VOID__OBJECT_OBJECT_BOOLEAN (GClosure * closure, - GValue * return_value, - guint n_param_values, - const GValue * param_values, - gpointer invocation_hint, - gpointer marshal_data) -{ - typedef void (*GMarshalFunc_VOID__OBJECT_OBJECT_BOOLEAN) (gpointer data1, gpointer arg_1, gpointer arg_2, gboolean arg_3, gpointer data2); - register GMarshalFunc_VOID__OBJECT_OBJECT_BOOLEAN callback; - register GCClosure * cc; - register gpointer data1; - register gpointer data2; - cc = (GCClosure *) closure; -#line 15 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala" - g_return_if_fail (n_param_values == 4); -#line 15 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala" - if (G_CCLOSURE_SWAP_DATA (closure)) { -#line 15 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala" - data1 = closure->data; -#line 15 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala" - data2 = param_values->data[0].v_pointer; -#line 2000 "ContainerSourceCollection.c" - } else { -#line 15 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala" - data1 = param_values->data[0].v_pointer; -#line 15 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala" - data2 = closure->data; -#line 2006 "ContainerSourceCollection.c" - } -#line 15 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala" - callback = (GMarshalFunc_VOID__OBJECT_OBJECT_BOOLEAN) (marshal_data ? marshal_data : cc->callback); -#line 15 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala" - callback (data1, g_value_get_object (param_values + 1), g_value_get_object (param_values + 2), g_value_get_boolean (param_values + 3), data2); -#line 2012 "ContainerSourceCollection.c" -} - - -static void -container_source_collection_real_container_contents_removed (ContainerSourceCollection* self, - ContainerSource* container, - GeeCollection* removed, - gboolean unlinked) -{ -#line 24 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala" - g_return_if_fail (IS_CONTAINER_SOURCE (container)); -#line 24 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala" - g_return_if_fail (GEE_IS_COLLECTION (removed)); -#line 2026 "ContainerSourceCollection.c" -} - - -static void -container_source_collection_real_container_contents_altered (ContainerSourceCollection* self, - ContainerSource* container, - GeeCollection* added, - gboolean relinked, - GeeCollection* removed, - gboolean unlinked) -{ -#line 28 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala" - g_return_if_fail (IS_CONTAINER_SOURCE (container)); -#line 28 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala" - g_return_if_fail ((added == NULL) || GEE_IS_COLLECTION (added)); -#line 28 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala" - g_return_if_fail ((removed == NULL) || GEE_IS_COLLECTION (removed)); -#line 2044 "ContainerSourceCollection.c" -} - - -static void -g_cclosure_user_marshal_VOID__OBJECT_OBJECT_BOOLEAN_OBJECT_BOOLEAN (GClosure * closure, - GValue * return_value, - guint n_param_values, - const GValue * param_values, - gpointer invocation_hint, - gpointer marshal_data) -{ - typedef void (*GMarshalFunc_VOID__OBJECT_OBJECT_BOOLEAN_OBJECT_BOOLEAN) (gpointer data1, gpointer arg_1, gpointer arg_2, gboolean arg_3, gpointer arg_4, gboolean arg_5, gpointer data2); - register GMarshalFunc_VOID__OBJECT_OBJECT_BOOLEAN_OBJECT_BOOLEAN callback; - register GCClosure * cc; - register gpointer data1; - register gpointer data2; - cc = (GCClosure *) closure; -#line 15 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala" - g_return_if_fail (n_param_values == 6); -#line 15 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala" - if (G_CCLOSURE_SWAP_DATA (closure)) { -#line 15 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala" - data1 = closure->data; -#line 15 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala" - data2 = param_values->data[0].v_pointer; -#line 2070 "ContainerSourceCollection.c" - } else { -#line 15 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala" - data1 = param_values->data[0].v_pointer; -#line 15 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala" - data2 = closure->data; -#line 2076 "ContainerSourceCollection.c" - } -#line 15 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala" - callback = (GMarshalFunc_VOID__OBJECT_OBJECT_BOOLEAN_OBJECT_BOOLEAN) (marshal_data ? marshal_data : cc->callback); -#line 15 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala" - callback (data1, g_value_get_object (param_values + 1), g_value_get_object (param_values + 2), g_value_get_boolean (param_values + 3), g_value_get_object (param_values + 4), g_value_get_boolean (param_values + 5), data2); -#line 2082 "ContainerSourceCollection.c" -} - - -static void -container_source_collection_real_backlink_to_container_removed (ContainerSourceCollection* self, - ContainerSource* container, - GeeCollection* sources) -{ -#line 34 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala" - g_return_if_fail (IS_CONTAINER_SOURCE (container)); -#line 34 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala" - g_return_if_fail (GEE_IS_COLLECTION (sources)); -#line 2095 "ContainerSourceCollection.c" -} - - -static void -g_cclosure_user_marshal_VOID__OBJECT_OBJECT (GClosure * closure, - GValue * return_value, - guint n_param_values, - const GValue * param_values, - gpointer invocation_hint, - gpointer marshal_data) -{ - typedef void (*GMarshalFunc_VOID__OBJECT_OBJECT) (gpointer data1, gpointer arg_1, gpointer arg_2, gpointer data2); - register GMarshalFunc_VOID__OBJECT_OBJECT callback; - register GCClosure * cc; - register gpointer data1; - register gpointer data2; - cc = (GCClosure *) closure; -#line 15 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala" - g_return_if_fail (n_param_values == 3); -#line 15 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala" - if (G_CCLOSURE_SWAP_DATA (closure)) { -#line 15 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala" - data1 = closure->data; -#line 15 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala" - data2 = param_values->data[0].v_pointer; -#line 2121 "ContainerSourceCollection.c" - } else { -#line 15 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala" - data1 = param_values->data[0].v_pointer; -#line 15 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala" - data2 = closure->data; -#line 2127 "ContainerSourceCollection.c" - } -#line 15 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala" - callback = (GMarshalFunc_VOID__OBJECT_OBJECT) (marshal_data ? marshal_data : cc->callback); -#line 15 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala" - callback (data1, g_value_get_object (param_values + 1), g_value_get_object (param_values + 2), data2); -#line 2133 "ContainerSourceCollection.c" -} - - -static void -container_source_collection_class_init (ContainerSourceCollectionClass * klass) -{ -#line 15 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala" - container_source_collection_parent_class = g_type_class_peek_parent (klass); -#line 15 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala" - ((DataCollectionClass *) klass)->finalize = container_source_collection_finalize; -#line 15 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala" - g_type_class_add_private (klass, sizeof (ContainerSourceCollectionPrivate)); -#line 15 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala" - ((SourceCollectionClass *) klass)->notify_backlink_removed = (void (*) (SourceCollection *, SourceBacklink*, GeeCollection*)) container_source_collection_real_notify_backlink_removed; -#line 15 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala" - ((ContainerSourceCollectionClass *) klass)->notify_container_contents_added = (void (*) (ContainerSourceCollection *, ContainerSource*, GeeCollection*, gboolean)) container_source_collection_real_notify_container_contents_added; -#line 15 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala" - ((ContainerSourceCollectionClass *) klass)->notify_container_contents_removed = (void (*) (ContainerSourceCollection *, ContainerSource*, GeeCollection*, gboolean)) container_source_collection_real_notify_container_contents_removed; -#line 15 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala" - ((ContainerSourceCollectionClass *) klass)->notify_container_contents_altered = (void (*) (ContainerSourceCollection *, ContainerSource*, GeeCollection*, gboolean, GeeCollection*, gboolean)) container_source_collection_real_notify_container_contents_altered; -#line 15 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala" - ((ContainerSourceCollectionClass *) klass)->notify_backlink_to_container_removed = (void (*) (ContainerSourceCollection *, ContainerSource*, GeeCollection*)) container_source_collection_real_notify_backlink_to_container_removed; -#line 15 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala" - ((ContainerSourceCollectionClass *) klass)->get_containers_holding_source = (GeeCollection* (*) (ContainerSourceCollection *, DataSource*)) container_source_collection_real_get_containers_holding_source; -#line 15 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala" - ((ContainerSourceCollectionClass *) klass)->convert_backlink_to_container = (ContainerSource* (*) (ContainerSourceCollection *, SourceBacklink*)) container_source_collection_real_convert_backlink_to_container; -#line 15 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala" - ((SourceCollectionClass *) klass)->notify_item_destroyed = (void (*) (SourceCollection *, DataSource*)) container_source_collection_real_notify_item_destroyed; -#line 15 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala" - ((ContainerSourceCollectionClass *) klass)->container_contents_added = container_source_collection_real_container_contents_added; -#line 15 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala" - ((ContainerSourceCollectionClass *) klass)->container_contents_removed = container_source_collection_real_container_contents_removed; -#line 15 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala" - ((ContainerSourceCollectionClass *) klass)->container_contents_altered = container_source_collection_real_container_contents_altered; -#line 15 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala" - ((ContainerSourceCollectionClass *) klass)->backlink_to_container_removed = container_source_collection_real_backlink_to_container_removed; -#line 15 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala" - container_source_collection_signals[CONTAINER_SOURCE_COLLECTION_CONTAINER_CONTENTS_ADDED_SIGNAL] = g_signal_new ("container-contents-added", TYPE_CONTAINER_SOURCE_COLLECTION, G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET (ContainerSourceCollectionClass, container_contents_added), NULL, NULL, g_cclosure_user_marshal_VOID__OBJECT_OBJECT_BOOLEAN, G_TYPE_NONE, 3, TYPE_CONTAINER_SOURCE, GEE_TYPE_COLLECTION, G_TYPE_BOOLEAN); -#line 15 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala" - container_source_collection_signals[CONTAINER_SOURCE_COLLECTION_CONTAINER_CONTENTS_REMOVED_SIGNAL] = g_signal_new ("container-contents-removed", TYPE_CONTAINER_SOURCE_COLLECTION, G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET (ContainerSourceCollectionClass, container_contents_removed), NULL, NULL, g_cclosure_user_marshal_VOID__OBJECT_OBJECT_BOOLEAN, G_TYPE_NONE, 3, TYPE_CONTAINER_SOURCE, GEE_TYPE_COLLECTION, G_TYPE_BOOLEAN); -#line 15 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala" - container_source_collection_signals[CONTAINER_SOURCE_COLLECTION_CONTAINER_CONTENTS_ALTERED_SIGNAL] = g_signal_new ("container-contents-altered", TYPE_CONTAINER_SOURCE_COLLECTION, G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET (ContainerSourceCollectionClass, container_contents_altered), NULL, NULL, g_cclosure_user_marshal_VOID__OBJECT_OBJECT_BOOLEAN_OBJECT_BOOLEAN, G_TYPE_NONE, 5, TYPE_CONTAINER_SOURCE, GEE_TYPE_COLLECTION, G_TYPE_BOOLEAN, GEE_TYPE_COLLECTION, G_TYPE_BOOLEAN); -#line 15 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala" - container_source_collection_signals[CONTAINER_SOURCE_COLLECTION_BACKLINK_TO_CONTAINER_REMOVED_SIGNAL] = g_signal_new ("backlink-to-container-removed", TYPE_CONTAINER_SOURCE_COLLECTION, G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET (ContainerSourceCollectionClass, backlink_to_container_removed), NULL, NULL, g_cclosure_user_marshal_VOID__OBJECT_OBJECT, G_TYPE_NONE, 2, TYPE_CONTAINER_SOURCE, GEE_TYPE_COLLECTION); -#line 2178 "ContainerSourceCollection.c" -} - - -static void -container_source_collection_instance_init (ContainerSourceCollection * self) -{ - GeeHashSet* _tmp0_; - GeeHashSet* _tmp1_; -#line 15 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala" - self->priv = CONTAINER_SOURCE_COLLECTION_GET_PRIVATE (self); -#line 16 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala" - _tmp0_ = gee_hash_set_new (TYPE_SOURCE_COLLECTION, (GBoxedCopyFunc) data_collection_ref, (GDestroyNotify) data_collection_unref, NULL, NULL, NULL, NULL, NULL, NULL); -#line 16 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala" - self->priv->attached_collections = _tmp0_; -#line 18 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala" - _tmp1_ = gee_hash_set_new (TYPE_CONTAINER_SOURCE, (GBoxedCopyFunc) g_object_ref, (GDestroyNotify) g_object_unref, NULL, NULL, NULL, NULL, NULL, NULL); -#line 18 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala" - self->priv->holding_tank = _tmp1_; -#line 2197 "ContainerSourceCollection.c" -} - - -static void -container_source_collection_finalize (DataCollection * obj) -{ - ContainerSourceCollection * self; -#line 15 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala" - self = G_TYPE_CHECK_INSTANCE_CAST (obj, TYPE_CONTAINER_SOURCE_COLLECTION, ContainerSourceCollection); -#line 46 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala" - container_source_collection_detach_all_collections (self); -#line 16 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala" - _g_object_unref0 (self->priv->attached_collections); -#line 17 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala" - _g_free0 (self->priv->backlink_name); -#line 18 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala" - _g_object_unref0 (self->priv->holding_tank); -#line 15 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala" - DATA_COLLECTION_CLASS (container_source_collection_parent_class)->finalize (obj); -#line 2217 "ContainerSourceCollection.c" -} - - -GType -container_source_collection_get_type (void) -{ - static volatile gsize container_source_collection_type_id__volatile = 0; - if (g_once_init_enter (&container_source_collection_type_id__volatile)) { - static const GTypeInfo g_define_type_info = { sizeof (ContainerSourceCollectionClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) container_source_collection_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (ContainerSourceCollection), 0, (GInstanceInitFunc) container_source_collection_instance_init, NULL }; - GType container_source_collection_type_id; - container_source_collection_type_id = g_type_register_static (TYPE_DATABASE_SOURCE_COLLECTION, "ContainerSourceCollection", &g_define_type_info, G_TYPE_FLAG_ABSTRACT); - g_once_init_leave (&container_source_collection_type_id__volatile, container_source_collection_type_id); - } - return container_source_collection_type_id__volatile; -} - - - diff --git a/src/core/Core.c b/src/core/Core.c deleted file mode 100644 index df6c104..0000000 --- a/src/core/Core.c +++ /dev/null @@ -1,48 +0,0 @@ -/* Core.c generated by valac 0.40.4, the Vala compiler - * generated from Core.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. - */ -/* This file is the master unit file for the Core unit. It should be edited to include - * whatever code is deemed necessary. - * - * The init() and terminate() methods are mandatory. - * - * If the unit needs to be configured prior to initialization, add the proper parameters to - * the preconfigure() method, implement it, and ensure in init() that it's been called. - */ - - -#include <glib.h> -#include <glib-object.h> - - - - -void core_preconfigure (void); -void core_init (GError** error); -void core_terminate (void); - - -void -core_preconfigure (void) -{ -} - - -void -core_init (GError** error) -{ -} - - -void -core_terminate (void) -{ -} - - - diff --git a/src/core/DataCollection.c b/src/core/DataCollection.c deleted file mode 100644 index f71e80c..0000000 --- a/src/core/DataCollection.c +++ /dev/null @@ -1,4077 +0,0 @@ -/* DataCollection.c generated by valac 0.40.4, the Vala compiler - * generated from DataCollection.vala, do not modify */ - -/* Copyright 2016 Software Freedom Conservancy Inc. - * - * This software is licensed under the GNU LGPL (version 2.1 or later). - * See the COPYING file in this distribution. - */ - - -#include <glib.h> -#include <glib-object.h> -#include <stdlib.h> -#include <string.h> -#include <gee.h> -#include <gobject/gvaluecollector.h> - - -#define TYPE_DATA_COLLECTION (data_collection_get_type ()) -#define DATA_COLLECTION(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_DATA_COLLECTION, DataCollection)) -#define DATA_COLLECTION_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_DATA_COLLECTION, DataCollectionClass)) -#define IS_DATA_COLLECTION(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_DATA_COLLECTION)) -#define IS_DATA_COLLECTION_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_DATA_COLLECTION)) -#define DATA_COLLECTION_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_DATA_COLLECTION, DataCollectionClass)) - -typedef struct _DataCollection DataCollection; -typedef struct _DataCollectionClass DataCollectionClass; -typedef struct _DataCollectionPrivate DataCollectionPrivate; - -#define TYPE_DATA_OBJECT (data_object_get_type ()) -#define DATA_OBJECT(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_DATA_OBJECT, DataObject)) -#define DATA_OBJECT_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_DATA_OBJECT, DataObjectClass)) -#define IS_DATA_OBJECT(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_DATA_OBJECT)) -#define IS_DATA_OBJECT_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_DATA_OBJECT)) -#define DATA_OBJECT_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_DATA_OBJECT, DataObjectClass)) - -typedef struct _DataObject DataObject; -typedef struct _DataObjectClass DataObjectClass; - -#define TYPE_ALTERATION (alteration_get_type ()) -#define ALTERATION(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_ALTERATION, Alteration)) -#define ALTERATION_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_ALTERATION, AlterationClass)) -#define IS_ALTERATION(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_ALTERATION)) -#define IS_ALTERATION_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_ALTERATION)) -#define ALTERATION_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_ALTERATION, AlterationClass)) - -typedef struct _Alteration Alteration; -typedef struct _AlterationClass AlterationClass; - -#define TYPE_MARKER (marker_get_type ()) -#define MARKER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_MARKER, Marker)) -#define IS_MARKER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_MARKER)) -#define MARKER_GET_INTERFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE ((obj), TYPE_MARKER, MarkerIface)) - -typedef struct _Marker Marker; -typedef struct _MarkerIface MarkerIface; - -#define TYPE_DATA_SET (data_set_get_type ()) -#define DATA_SET(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_DATA_SET, DataSet)) -#define DATA_SET_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_DATA_SET, DataSetClass)) -#define IS_DATA_SET(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_DATA_SET)) -#define IS_DATA_SET_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_DATA_SET)) -#define DATA_SET_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_DATA_SET, DataSetClass)) - -typedef struct _DataSet DataSet; -typedef struct _DataSetClass DataSetClass; -#define _g_free0(var) (var = (g_free (var), NULL)) -#define _data_set_unref0(var) ((var == NULL) ? NULL : (var = (data_set_unref (var), NULL))) -#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL))) - -#define TYPE_SINGLETON_COLLECTION (singleton_collection_get_type ()) -#define SINGLETON_COLLECTION(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_SINGLETON_COLLECTION, SingletonCollection)) -#define SINGLETON_COLLECTION_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_SINGLETON_COLLECTION, SingletonCollectionClass)) -#define IS_SINGLETON_COLLECTION(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_SINGLETON_COLLECTION)) -#define IS_SINGLETON_COLLECTION_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_SINGLETON_COLLECTION)) -#define SINGLETON_COLLECTION_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_SINGLETON_COLLECTION, SingletonCollectionClass)) - -typedef struct _SingletonCollection SingletonCollection; -typedef struct _SingletonCollectionClass SingletonCollectionClass; -#define _data_collection_unref0(var) ((var == NULL) ? NULL : (var = (data_collection_unref (var), NULL))) - -#define DATA_COLLECTION_TYPE_MARKER_IMPL (data_collection_marker_impl_get_type ()) -#define DATA_COLLECTION_MARKER_IMPL(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), DATA_COLLECTION_TYPE_MARKER_IMPL, DataCollectionMarkerImpl)) -#define DATA_COLLECTION_MARKER_IMPL_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), DATA_COLLECTION_TYPE_MARKER_IMPL, DataCollectionMarkerImplClass)) -#define DATA_COLLECTION_IS_MARKER_IMPL(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), DATA_COLLECTION_TYPE_MARKER_IMPL)) -#define DATA_COLLECTION_IS_MARKER_IMPL_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), DATA_COLLECTION_TYPE_MARKER_IMPL)) -#define DATA_COLLECTION_MARKER_IMPL_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), DATA_COLLECTION_TYPE_MARKER_IMPL, DataCollectionMarkerImplClass)) - -typedef struct _DataCollectionMarkerImpl DataCollectionMarkerImpl; -typedef struct _DataCollectionMarkerImplClass DataCollectionMarkerImplClass; -typedef struct _DataCollectionMarkerImplPrivate DataCollectionMarkerImplPrivate; -#define _alteration_unref0(var) ((var == NULL) ? NULL : (var = (alteration_unref (var), NULL))) -#define __vala_GValue_free0(var) ((var == NULL) ? NULL : (var = (_vala_GValue_free (var), NULL))) -enum { - DATA_COLLECTION_MARKER_IMPL_0_PROPERTY, - DATA_COLLECTION_MARKER_IMPL_NUM_PROPERTIES -}; -static GParamSpec* data_collection_marker_impl_properties[DATA_COLLECTION_MARKER_IMPL_NUM_PROPERTIES]; -typedef struct _ParamSpecDataCollection ParamSpecDataCollection; -enum { - DATA_COLLECTION_ITEMS_ADDED_SIGNAL, - DATA_COLLECTION_ITEMS_REMOVED_SIGNAL, - DATA_COLLECTION_CONTENTS_ALTERED_SIGNAL, - DATA_COLLECTION_ITEMS_ALTERED_SIGNAL, - DATA_COLLECTION_ORDERING_CHANGED_SIGNAL, - DATA_COLLECTION_PROPERTY_SET_SIGNAL, - DATA_COLLECTION_PROPERTY_CLEARED_SIGNAL, - DATA_COLLECTION_FROZEN_SIGNAL, - DATA_COLLECTION_THAWED_SIGNAL, - DATA_COLLECTION_NUM_SIGNALS -}; -static guint data_collection_signals[DATA_COLLECTION_NUM_SIGNALS] = {0}; -#define _vala_assert(expr, msg) if G_LIKELY (expr) ; else g_assertion_message_expr (G_LOG_DOMAIN, __FILE__, __LINE__, G_STRFUNC, msg); -#define _vala_return_if_fail(expr, msg) if G_LIKELY (expr) ; else { g_return_if_fail_warning (G_LOG_DOMAIN, G_STRFUNC, msg); return; } -#define _vala_return_val_if_fail(expr, msg, val) if G_LIKELY (expr) ; else { g_return_if_fail_warning (G_LOG_DOMAIN, G_STRFUNC, msg); return val; } -#define _vala_warn_if_fail(expr, msg) if G_LIKELY (expr) ; else g_warn_message (G_LOG_DOMAIN, __FILE__, __LINE__, G_STRFUNC, msg); - -typedef gint64 (*Comparator) (void* a, void* b, void* user_data); -typedef gboolean (*ComparatorPredicate) (DataObject* object, Alteration* alteration, void* user_data); -typedef gboolean (*ProgressMonitor) (guint64 current, guint64 total, gboolean do_event_loop, void* user_data); -struct _MarkerIface { - GTypeInterface parent_iface; - void (*mark) (Marker* self, DataObject* object); - void (*unmark) (Marker* self, DataObject* object); - gboolean (*toggle) (Marker* self, DataObject* object); - void (*mark_many) (Marker* self, GeeCollection* list); - void (*unmark_many) (Marker* self, GeeCollection* list); - void (*mark_all) (Marker* self); - gint (*get_count) (Marker* self); - GeeCollection* (*get_all) (Marker* self); -}; - -struct _DataCollection { - GTypeInstance parent_instance; - volatile int ref_count; - DataCollectionPrivate * priv; -}; - -struct _DataCollectionClass { - GTypeClass parent_class; - void (*finalize) (DataCollection *self); - gchar* (*to_string) (DataCollection* self); - void (*notify_items_added) (DataCollection* self, GeeIterable* added); - void (*notify_items_removed) (DataCollection* self, GeeIterable* removed); - void (*notify_contents_altered) (DataCollection* self, GeeIterable* added, GeeIterable* removed); - void (*notify_items_altered) (DataCollection* self, GeeMap* items); - void (*notify_ordering_changed) (DataCollection* self); - void (*notify_property_set) (DataCollection* self, const gchar* name, GValue* old, GValue* val); - void (*notify_property_cleared) (DataCollection* self, const gchar* name); - gboolean (*valid_type) (DataCollection* self, DataObject* object); - void (*set_comparator) (DataCollection* self, Comparator comparator, void* comparator_target, ComparatorPredicate predicate, void* predicate_target); - void (*reset_comparator) (DataCollection* self); - GeeCollection* (*get_all) (DataCollection* self); - gint (*get_count) (DataCollection* self); - DataObject* (*get_at) (DataCollection* self, gint index); - gint (*index_of) (DataCollection* self, DataObject* object); - gboolean (*contains) (DataCollection* self, DataObject* object); - gboolean (*add) (DataCollection* self, DataObject* object); - GeeCollection* (*add_many) (DataCollection* self, GeeCollection* objects, ProgressMonitor monitor, void* monitor_target); - void (*remove_marked) (DataCollection* self, Marker* m); - void (*clear) (DataCollection* self); - void (*close) (DataCollection* self); - void (*notify_frozen) (DataCollection* self); - void (*notify_thawed) (DataCollection* self); - void (*items_added) (DataCollection* self, GeeIterable* added); - void (*items_removed) (DataCollection* self, GeeIterable* removed); - void (*contents_altered) (DataCollection* self, GeeIterable* added, GeeIterable* removed); - void (*items_altered) (DataCollection* self, GeeMap* items); - void (*ordering_changed) (DataCollection* self); - void (*property_set) (DataCollection* self, const gchar* name, GValue* old, GValue* val); - void (*property_cleared) (DataCollection* self, const gchar* name); - void (*frozen) (DataCollection* self); - void (*thawed) (DataCollection* self); -}; - -struct _DataCollectionPrivate { - gchar* name; - DataSet* dataset; - GeeHashMap* properties; - gint64 object_ordinal_generator; - gint notifies_frozen; - GeeHashMap* frozen_items_altered; - gboolean fire_ordering_changed; -}; - -typedef gboolean (*MarkedAction) (DataObject* object, GObject* user, void* user_data); -struct _DataCollectionMarkerImpl { - GObject parent_instance; - DataCollectionMarkerImplPrivate * priv; - DataCollection* owner; - GeeHashSet* marked; - gint freeze_count; -}; - -struct _DataCollectionMarkerImplClass { - GObjectClass parent_class; -}; - -typedef gboolean (*ValueEqualFunc) (GValue* a, GValue* b, void* user_data); -struct _ParamSpecDataCollection { - GParamSpec parent_instance; -}; - - -static gpointer data_collection_parent_class = NULL; -static gpointer data_collection_marker_impl_parent_class = NULL; -static MarkerIface * data_collection_marker_impl_marker_parent_iface = NULL; - -gpointer data_collection_ref (gpointer instance); -void data_collection_unref (gpointer instance); -GParamSpec* param_spec_data_collection (const gchar* name, - const gchar* nick, - const gchar* blurb, - GType object_type, - GParamFlags flags); -void value_set_data_collection (GValue* value, - gpointer v_object); -void value_take_data_collection (GValue* value, - gpointer v_object); -gpointer value_get_data_collection (const GValue* value); -GType data_collection_get_type (void) G_GNUC_CONST; -GType data_object_get_type (void) G_GNUC_CONST; -gpointer alteration_ref (gpointer instance); -void alteration_unref (gpointer instance); -GParamSpec* param_spec_alteration (const gchar* name, - const gchar* nick, - const gchar* blurb, - GType object_type, - GParamFlags flags); -void value_set_alteration (GValue* value, - gpointer v_object); -void value_take_alteration (GValue* value, - gpointer v_object); -gpointer value_get_alteration (const GValue* value); -GType alteration_get_type (void) G_GNUC_CONST; -GType marker_get_type (void) G_GNUC_CONST; -gpointer data_set_ref (gpointer instance); -void data_set_unref (gpointer instance); -GParamSpec* param_spec_data_set (const gchar* name, - const gchar* nick, - const gchar* blurb, - GType object_type, - GParamFlags flags); -void value_set_data_set (GValue* value, - gpointer v_object); -void value_take_data_set (GValue* value, - gpointer v_object); -gpointer value_get_data_set (const GValue* value); -GType data_set_get_type (void) G_GNUC_CONST; -#define DATA_COLLECTION_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), TYPE_DATA_COLLECTION, DataCollectionPrivate)) -DataSet* data_set_new (void); -DataSet* data_set_construct (GType object_type); -static GValue* _g_value_dup (GValue* self); -static void _vala_GValue_free (GValue* self); -#define DATA_COLLECTION_INVALID_OBJECT_ORDINAL ((gint64) -1) -DataCollection* data_collection_new (const gchar* name); -DataCollection* data_collection_construct (GType object_type, - const gchar* name); -gchar* data_collection_to_string (DataCollection* self); -static gchar* data_collection_real_to_string (DataCollection* self); -gint data_collection_get_count (DataCollection* self); -void data_collection_notify_items_added (DataCollection* self, - GeeIterable* added); -static void data_collection_real_notify_items_added (DataCollection* self, - GeeIterable* added); -void data_collection_notify_items_removed (DataCollection* self, - GeeIterable* removed); -static void data_collection_real_notify_items_removed (DataCollection* self, - GeeIterable* removed); -void data_collection_notify_contents_altered (DataCollection* self, - GeeIterable* added, - GeeIterable* removed); -static void data_collection_real_notify_contents_altered (DataCollection* self, - GeeIterable* added, - GeeIterable* removed); -void data_collection_notify_items_altered (DataCollection* self, - GeeMap* items); -static void data_collection_real_notify_items_altered (DataCollection* self, - GeeMap* items); -void data_collection_notify_ordering_changed (DataCollection* self); -static void data_collection_real_notify_ordering_changed (DataCollection* self); -void data_collection_notify_property_set (DataCollection* self, - const gchar* name, - GValue* old, - GValue* val); -static void data_collection_real_notify_property_set (DataCollection* self, - const gchar* name, - GValue* old, - GValue* val); -void data_collection_notify_property_cleared (DataCollection* self, - const gchar* name); -static void data_collection_real_notify_property_cleared (DataCollection* self, - const gchar* name); -GeeCollection* data_collection_get_singleton (DataObject* object); -SingletonCollection* singleton_collection_new (GType g_type, - GBoxedCopyFunc g_dup_func, - GDestroyNotify g_destroy_func, - gconstpointer object); -SingletonCollection* singleton_collection_construct (GType object_type, - GType g_type, - GBoxedCopyFunc g_dup_func, - GDestroyNotify g_destroy_func, - gconstpointer object); -GType singleton_collection_get_type (void) G_GNUC_CONST; -GeeMap* data_collection_get_alteration_singleton (DataObject* object, - Alteration* alteration); -gboolean data_collection_valid_type (DataCollection* self, - DataObject* object); -static gboolean data_collection_real_valid_type (DataCollection* self, - DataObject* object); -Comparator data_collection_get_comparator (DataCollection* self, - void** result_target); -Comparator data_set_get_comparator (DataSet* self, - void** result_target); -ComparatorPredicate data_collection_get_comparator_predicate (DataCollection* self, - void** result_target); -ComparatorPredicate data_set_get_comparator_predicate (DataSet* self, - void** result_target); -void data_collection_set_comparator (DataCollection* self, - Comparator comparator, - void* comparator_target, - ComparatorPredicate predicate, - void* predicate_target); -static void data_collection_real_set_comparator (DataCollection* self, - Comparator comparator, - void* comparator_target, - ComparatorPredicate predicate, - void* predicate_target); -void data_set_set_comparator (DataSet* self, - Comparator user_comparator, - void* user_comparator_target, - ComparatorPredicate comparator_predicate, - void* comparator_predicate_target); -void data_collection_reset_comparator (DataCollection* self); -static void data_collection_real_reset_comparator (DataCollection* self); -void data_set_reset_comparator (DataSet* self); -GeeCollection* data_collection_get_all (DataCollection* self); -static GeeCollection* data_collection_real_get_all (DataCollection* self); -GeeList* data_set_get_all (DataSet* self); -DataSet* data_collection_get_dataset_copy (DataCollection* self); -DataSet* data_set_copy (DataSet* self); -static gint data_collection_real_get_count (DataCollection* self); -gint data_set_get_count (DataSet* self); -DataObject* data_collection_get_at (DataCollection* self, - gint index); -static DataObject* data_collection_real_get_at (DataCollection* self, - gint index); -DataObject* data_set_get_at (DataSet* self, - gint index); -gint data_collection_index_of (DataCollection* self, - DataObject* object); -static gint data_collection_real_index_of (DataCollection* self, - DataObject* object); -gint data_set_index_of (DataSet* self, - DataObject* object); -gboolean data_collection_contains (DataCollection* self, - DataObject* object); -static gboolean data_collection_real_contains (DataCollection* self, - DataObject* object); -static gboolean data_collection_internal_contains (DataCollection* self, - DataObject* object); -gboolean data_set_contains (DataSet* self, - DataObject* object); -DataCollection* data_object_get_membership (DataObject* self); -static void data_collection_internal_add (DataCollection* self, - DataObject* object); -void data_object_internal_set_membership (DataObject* self, - DataCollection* collection, - gint64 ordinal); -gboolean data_set_add (DataSet* self, - DataObject* object); -static void data_collection_internal_add_many (DataCollection* self, - GeeList* objects, - ProgressMonitor monitor, - void* monitor_target); -gboolean data_set_add_many (DataSet* self, - GeeCollection* objects); -static void data_collection_internal_remove (DataCollection* self, - DataObject* object); -gboolean data_set_remove (DataSet* self, - DataObject* object); -void data_object_internal_clear_membership (DataObject* self); -gboolean data_collection_add (DataCollection* self, - DataObject* object); -static gboolean data_collection_real_add (DataCollection* self, - DataObject* object); -gchar* data_object_to_string (DataObject* self); -void data_object_notify_membership_changed (DataObject* self, - DataCollection* collection); -GeeCollection* data_collection_add_many (DataCollection* self, - GeeCollection* objects, - ProgressMonitor monitor, - void* monitor_target); -static GeeCollection* data_collection_real_add_many (DataCollection* self, - GeeCollection* objects, - ProgressMonitor monitor, - void* monitor_target); -Marker* data_collection_start_marking (DataCollection* self); -static DataCollectionMarkerImpl* data_collection_marker_impl_new (DataCollection* owner); -static DataCollectionMarkerImpl* data_collection_marker_impl_construct (GType object_type, - DataCollection* owner); -static GType data_collection_marker_impl_get_type (void) G_GNUC_CONST G_GNUC_UNUSED; -Marker* data_collection_mark (DataCollection* self, - DataObject* object); -void marker_mark (Marker* self, - DataObject* object); -Marker* data_collection_mark_many (DataCollection* self, - GeeCollection* objects); -void marker_mark_many (Marker* self, - GeeCollection* list); -void data_collection_act_on_marked (DataCollection* self, - Marker* m, - MarkedAction action, - void* action_target, - ProgressMonitor monitor, - void* monitor_target, - GObject* user); -static gboolean data_collection_marker_impl_is_valid (DataCollectionMarkerImpl* self, - DataCollection* collection); -static void data_collection_marker_impl_freeze (DataCollectionMarkerImpl* self); -static void data_collection_marker_impl_finished (DataCollectionMarkerImpl* self); -void data_collection_remove_marked (DataCollection* self, - Marker* m); -static void data_collection_real_remove_marked (DataCollection* self, - Marker* m); -void data_collection_clear (DataCollection* self); -static void data_collection_real_clear (DataCollection* self); -void data_collection_close (DataCollection* self); -static void data_collection_real_close (DataCollection* self); -void data_collection_internal_notify_altered (DataCollection* self, - DataObject* object, - Alteration* alteration); -gboolean data_set_resort_object (DataSet* self, - DataObject* object, - Alteration* alteration); -gboolean data_collection_are_notifications_frozen (DataCollection* self); -Alteration* alteration_compress (Alteration* self, - Alteration* other); -GValue* data_collection_get_property (DataCollection* self, - const gchar* name); -void data_collection_set_property (DataCollection* self, - const gchar* name, - GValue* val, - ValueEqualFunc value_equals, - void* value_equals_target); -gboolean bool_value_equals (GValue* a, - GValue* b); -static gboolean _bool_value_equals_value_equal_func (GValue* a, - GValue* b, - gpointer self); -gboolean int_value_equals (GValue* a, - GValue* b); -static gboolean _int_value_equals_value_equal_func (GValue* a, - GValue* b, - gpointer self); -void data_object_notify_collection_property_set (DataObject* self, - const gchar* name, - GValue* old, - GValue* val); -void data_collection_clear_property (DataCollection* self, - const gchar* name); -void data_object_notify_collection_property_cleared (DataObject* self, - const gchar* name); -void data_collection_freeze_notifications (DataCollection* self); -void data_collection_notify_frozen (DataCollection* self); -void data_collection_thaw_notifications (DataCollection* self); -void data_collection_notify_thawed (DataCollection* self); -static void data_collection_real_notify_frozen (DataCollection* self); -static void data_collection_real_notify_thawed (DataCollection* self); -static void data_collection_real_items_added (DataCollection* self, - GeeIterable* added); -static void data_collection_real_items_removed (DataCollection* self, - GeeIterable* removed); -static void data_collection_real_contents_altered (DataCollection* self, - GeeIterable* added, - GeeIterable* removed); -static void g_cclosure_user_marshal_VOID__OBJECT_OBJECT (GClosure * closure, - GValue * return_value, - guint n_param_values, - const GValue * param_values, - gpointer invocation_hint, - gpointer marshal_data); -static void data_collection_real_items_altered (DataCollection* self, - GeeMap* items); -static void data_collection_real_ordering_changed (DataCollection* self); -static void data_collection_real_property_set (DataCollection* self, - const gchar* name, - GValue* old, - GValue* val); -static void g_cclosure_user_marshal_VOID__STRING_POINTER_BOXED (GClosure * closure, - GValue * return_value, - guint n_param_values, - const GValue * param_values, - gpointer invocation_hint, - gpointer marshal_data); -static void data_collection_real_property_cleared (DataCollection* self, - const gchar* name); -static void data_collection_real_frozen (DataCollection* self); -static void data_collection_real_thawed (DataCollection* self); -static void data_collection_marker_impl_on_items_removed (DataCollectionMarkerImpl* self, - GeeIterable* removed); -static void _data_collection_marker_impl_on_items_removed_data_collection_items_removed (DataCollection* _sender, - GeeIterable* removed, - gpointer self); -static void data_collection_marker_impl_real_mark (Marker* base, - DataObject* object); -static void data_collection_marker_impl_real_unmark (Marker* base, - DataObject* object); -static gboolean data_collection_marker_impl_real_toggle (Marker* base, - DataObject* object); -static void data_collection_marker_impl_real_mark_many (Marker* base, - GeeCollection* list); -static void data_collection_marker_impl_real_unmark_many (Marker* base, - GeeCollection* list); -static void data_collection_marker_impl_real_mark_all (Marker* base); -static gint data_collection_marker_impl_real_get_count (Marker* base); -static GeeCollection* data_collection_marker_impl_real_get_all (Marker* base); -static void data_collection_marker_impl_finalize (GObject * obj); -static void data_collection_finalize (DataCollection * obj); - - -static GValue* -_g_value_dup (GValue* self) -{ -#line 109 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - return g_boxed_copy (G_TYPE_VALUE, self); -#line 528 "DataCollection.c" -} - - -static void -_vala_GValue_free (GValue* self) -{ -#line 109 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - g_value_unset (self); -#line 109 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - g_free (self); -#line 539 "DataCollection.c" -} - - -DataCollection* -data_collection_construct (GType object_type, - const gchar* name) -{ - DataCollection* self = NULL; - gchar* _tmp0_; -#line 157 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - g_return_val_if_fail (name != NULL, NULL); -#line 157 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - self = (DataCollection*) g_type_create_instance (object_type); -#line 158 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - _tmp0_ = g_strdup (name); -#line 158 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - _g_free0 (self->priv->name); -#line 158 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - self->priv->name = _tmp0_; -#line 157 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - return self; -#line 561 "DataCollection.c" -} - - -DataCollection* -data_collection_new (const gchar* name) -{ -#line 157 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - return data_collection_construct (TYPE_DATA_COLLECTION, name); -#line 570 "DataCollection.c" -} - - -static gchar* -data_collection_real_to_string (DataCollection* self) -{ - gchar* result = NULL; - const gchar* _tmp0_; - gchar* _tmp1_; -#line 168 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - _tmp0_ = self->priv->name; -#line 168 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - _tmp1_ = g_strdup_printf ("%s (%d)", _tmp0_, data_collection_get_count (self)); -#line 168 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - result = _tmp1_; -#line 168 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - return result; -#line 588 "DataCollection.c" -} - - -gchar* -data_collection_to_string (DataCollection* self) -{ -#line 167 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - g_return_val_if_fail (IS_DATA_COLLECTION (self), NULL); -#line 167 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - return DATA_COLLECTION_GET_CLASS (self)->to_string (self); -#line 599 "DataCollection.c" -} - - -static void -data_collection_real_notify_items_added (DataCollection* self, - GeeIterable* added) -{ -#line 172 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - g_return_if_fail (GEE_IS_ITERABLE (added)); -#line 173 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - g_signal_emit (self, data_collection_signals[DATA_COLLECTION_ITEMS_ADDED_SIGNAL], 0, added); -#line 611 "DataCollection.c" -} - - -void -data_collection_notify_items_added (DataCollection* self, - GeeIterable* added) -{ -#line 172 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - g_return_if_fail (IS_DATA_COLLECTION (self)); -#line 172 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - DATA_COLLECTION_GET_CLASS (self)->notify_items_added (self, added); -#line 623 "DataCollection.c" -} - - -static void -data_collection_real_notify_items_removed (DataCollection* self, - GeeIterable* removed) -{ -#line 176 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - g_return_if_fail (GEE_IS_ITERABLE (removed)); -#line 177 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - g_signal_emit (self, data_collection_signals[DATA_COLLECTION_ITEMS_REMOVED_SIGNAL], 0, removed); -#line 635 "DataCollection.c" -} - - -void -data_collection_notify_items_removed (DataCollection* self, - GeeIterable* removed) -{ -#line 176 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - g_return_if_fail (IS_DATA_COLLECTION (self)); -#line 176 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - DATA_COLLECTION_GET_CLASS (self)->notify_items_removed (self, removed); -#line 647 "DataCollection.c" -} - - -static void -data_collection_real_notify_contents_altered (DataCollection* self, - GeeIterable* added, - GeeIterable* removed) -{ -#line 180 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - g_return_if_fail ((added == NULL) || GEE_IS_ITERABLE (added)); -#line 180 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - g_return_if_fail ((removed == NULL) || GEE_IS_ITERABLE (removed)); -#line 182 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - g_signal_emit (self, data_collection_signals[DATA_COLLECTION_CONTENTS_ALTERED_SIGNAL], 0, added, removed); -#line 662 "DataCollection.c" -} - - -void -data_collection_notify_contents_altered (DataCollection* self, - GeeIterable* added, - GeeIterable* removed) -{ -#line 180 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - g_return_if_fail (IS_DATA_COLLECTION (self)); -#line 180 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - DATA_COLLECTION_GET_CLASS (self)->notify_contents_altered (self, added, removed); -#line 675 "DataCollection.c" -} - - -static void -data_collection_real_notify_items_altered (DataCollection* self, - GeeMap* items) -{ -#line 185 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - g_return_if_fail (GEE_IS_MAP (items)); -#line 186 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - g_signal_emit (self, data_collection_signals[DATA_COLLECTION_ITEMS_ALTERED_SIGNAL], 0, items); -#line 687 "DataCollection.c" -} - - -void -data_collection_notify_items_altered (DataCollection* self, - GeeMap* items) -{ -#line 185 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - g_return_if_fail (IS_DATA_COLLECTION (self)); -#line 185 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - DATA_COLLECTION_GET_CLASS (self)->notify_items_altered (self, items); -#line 699 "DataCollection.c" -} - - -static void -data_collection_real_notify_ordering_changed (DataCollection* self) -{ -#line 190 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - g_signal_emit (self, data_collection_signals[DATA_COLLECTION_ORDERING_CHANGED_SIGNAL], 0); -#line 708 "DataCollection.c" -} - - -void -data_collection_notify_ordering_changed (DataCollection* self) -{ -#line 189 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - g_return_if_fail (IS_DATA_COLLECTION (self)); -#line 189 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - DATA_COLLECTION_GET_CLASS (self)->notify_ordering_changed (self); -#line 719 "DataCollection.c" -} - - -static void -data_collection_real_notify_property_set (DataCollection* self, - const gchar* name, - GValue* old, - GValue* val) -{ - GValue _tmp0_; -#line 193 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - g_return_if_fail (name != NULL); -#line 193 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - g_return_if_fail (val != NULL); -#line 194 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - _tmp0_ = *val; -#line 194 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - g_signal_emit (self, data_collection_signals[DATA_COLLECTION_PROPERTY_SET_SIGNAL], 0, name, old, &_tmp0_); -#line 738 "DataCollection.c" -} - - -void -data_collection_notify_property_set (DataCollection* self, - const gchar* name, - GValue* old, - GValue* val) -{ -#line 193 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - g_return_if_fail (IS_DATA_COLLECTION (self)); -#line 193 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - DATA_COLLECTION_GET_CLASS (self)->notify_property_set (self, name, old, val); -#line 752 "DataCollection.c" -} - - -static void -data_collection_real_notify_property_cleared (DataCollection* self, - const gchar* name) -{ -#line 197 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - g_return_if_fail (name != NULL); -#line 198 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - g_signal_emit (self, data_collection_signals[DATA_COLLECTION_PROPERTY_CLEARED_SIGNAL], 0, name); -#line 764 "DataCollection.c" -} - - -void -data_collection_notify_property_cleared (DataCollection* self, - const gchar* name) -{ -#line 197 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - g_return_if_fail (IS_DATA_COLLECTION (self)); -#line 197 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - DATA_COLLECTION_GET_CLASS (self)->notify_property_cleared (self, name); -#line 776 "DataCollection.c" -} - - -GeeCollection* -data_collection_get_singleton (DataObject* object) -{ - GeeCollection* result = NULL; - SingletonCollection* _tmp0_; -#line 206 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - g_return_val_if_fail (IS_DATA_OBJECT (object), NULL); -#line 207 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - _tmp0_ = singleton_collection_new (TYPE_DATA_OBJECT, (GBoxedCopyFunc) g_object_ref, (GDestroyNotify) g_object_unref, object); -#line 207 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - result = G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, GEE_TYPE_COLLECTION, GeeCollection); -#line 207 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - return result; -#line 793 "DataCollection.c" -} - - -GeeMap* -data_collection_get_alteration_singleton (DataObject* object, - Alteration* alteration) -{ - GeeMap* result = NULL; - GeeMap* map = NULL; - GeeHashMap* _tmp0_; -#line 210 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - g_return_val_if_fail (IS_DATA_OBJECT (object), NULL); -#line 210 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - g_return_val_if_fail (IS_ALTERATION (alteration), NULL); -#line 212 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - _tmp0_ = gee_hash_map_new (TYPE_DATA_OBJECT, (GBoxedCopyFunc) g_object_ref, (GDestroyNotify) g_object_unref, TYPE_ALTERATION, (GBoxedCopyFunc) alteration_ref, (GDestroyNotify) alteration_unref, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL); -#line 212 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - map = G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, GEE_TYPE_MAP, GeeMap); -#line 213 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - gee_map_set (map, object, alteration); -#line 215 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - result = map; -#line 215 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - return result; -#line 818 "DataCollection.c" -} - - -static gboolean -data_collection_real_valid_type (DataCollection* self, - DataObject* object) -{ - gboolean result = FALSE; -#line 218 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - g_return_val_if_fail (IS_DATA_OBJECT (object), FALSE); -#line 219 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - result = TRUE; -#line 219 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - return result; -#line 833 "DataCollection.c" -} - - -gboolean -data_collection_valid_type (DataCollection* self, - DataObject* object) -{ -#line 218 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - g_return_val_if_fail (IS_DATA_COLLECTION (self), FALSE); -#line 218 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - return DATA_COLLECTION_GET_CLASS (self)->valid_type (self, object); -#line 845 "DataCollection.c" -} - - -Comparator -data_collection_get_comparator (DataCollection* self, - void** result_target) -{ - Comparator result = NULL; - DataSet* _tmp0_; - void* _tmp1_; - Comparator _tmp2_; - Comparator _tmp3_; - void* _tmp3__target; -#line 222 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - g_return_val_if_fail (IS_DATA_COLLECTION (self), NULL); -#line 223 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - _tmp0_ = self->priv->dataset; -#line 223 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - _tmp2_ = data_set_get_comparator (_tmp0_, &_tmp1_); -#line 223 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - _tmp3_ = _tmp2_; -#line 223 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - _tmp3__target = _tmp1_; -#line 223 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - *result_target = _tmp3__target; -#line 223 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - result = _tmp3_; -#line 223 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - return result; -#line 875 "DataCollection.c" -} - - -ComparatorPredicate -data_collection_get_comparator_predicate (DataCollection* self, - void** result_target) -{ - ComparatorPredicate result = NULL; - DataSet* _tmp0_; - void* _tmp1_; - ComparatorPredicate _tmp2_; - ComparatorPredicate _tmp3_; - void* _tmp3__target; -#line 226 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - g_return_val_if_fail (IS_DATA_COLLECTION (self), NULL); -#line 227 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - _tmp0_ = self->priv->dataset; -#line 227 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - _tmp2_ = data_set_get_comparator_predicate (_tmp0_, &_tmp1_); -#line 227 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - _tmp3_ = _tmp2_; -#line 227 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - _tmp3__target = _tmp1_; -#line 227 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - *result_target = _tmp3__target; -#line 227 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - result = _tmp3_; -#line 227 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - return result; -#line 905 "DataCollection.c" -} - - -static void -data_collection_real_set_comparator (DataCollection* self, - Comparator comparator, - void* comparator_target, - ComparatorPredicate predicate, - void* predicate_target) -{ - DataSet* _tmp0_; -#line 231 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - _tmp0_ = self->priv->dataset; -#line 231 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - data_set_set_comparator (_tmp0_, comparator, comparator_target, predicate, predicate_target); -#line 232 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - data_collection_notify_ordering_changed (self); -#line 923 "DataCollection.c" -} - - -void -data_collection_set_comparator (DataCollection* self, - Comparator comparator, - void* comparator_target, - ComparatorPredicate predicate, - void* predicate_target) -{ -#line 230 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - g_return_if_fail (IS_DATA_COLLECTION (self)); -#line 230 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - DATA_COLLECTION_GET_CLASS (self)->set_comparator (self, comparator, comparator_target, predicate, predicate_target); -#line 938 "DataCollection.c" -} - - -static void -data_collection_real_reset_comparator (DataCollection* self) -{ - DataSet* _tmp0_; -#line 237 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - _tmp0_ = self->priv->dataset; -#line 237 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - data_set_reset_comparator (_tmp0_); -#line 238 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - data_collection_notify_ordering_changed (self); -#line 952 "DataCollection.c" -} - - -void -data_collection_reset_comparator (DataCollection* self) -{ -#line 236 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - g_return_if_fail (IS_DATA_COLLECTION (self)); -#line 236 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - DATA_COLLECTION_GET_CLASS (self)->reset_comparator (self); -#line 963 "DataCollection.c" -} - - -static GeeCollection* -data_collection_real_get_all (DataCollection* self) -{ - GeeCollection* result = NULL; - DataSet* _tmp0_; - GeeList* _tmp1_; -#line 242 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - _tmp0_ = self->priv->dataset; -#line 242 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - _tmp1_ = data_set_get_all (_tmp0_); -#line 242 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - result = G_TYPE_CHECK_INSTANCE_CAST (_tmp1_, GEE_TYPE_COLLECTION, GeeCollection); -#line 242 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - return result; -#line 981 "DataCollection.c" -} - - -GeeCollection* -data_collection_get_all (DataCollection* self) -{ -#line 241 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - g_return_val_if_fail (IS_DATA_COLLECTION (self), NULL); -#line 241 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - return DATA_COLLECTION_GET_CLASS (self)->get_all (self); -#line 992 "DataCollection.c" -} - - -DataSet* -data_collection_get_dataset_copy (DataCollection* self) -{ - DataSet* result = NULL; - DataSet* _tmp0_; - DataSet* _tmp1_; -#line 245 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - g_return_val_if_fail (IS_DATA_COLLECTION (self), NULL); -#line 246 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - _tmp0_ = self->priv->dataset; -#line 246 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - _tmp1_ = data_set_copy (_tmp0_); -#line 246 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - result = _tmp1_; -#line 246 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - return result; -#line 1012 "DataCollection.c" -} - - -static gint -data_collection_real_get_count (DataCollection* self) -{ - gint result = 0; - DataSet* _tmp0_; -#line 250 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - _tmp0_ = self->priv->dataset; -#line 250 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - result = data_set_get_count (_tmp0_); -#line 250 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - return result; -#line 1027 "DataCollection.c" -} - - -gint -data_collection_get_count (DataCollection* self) -{ -#line 249 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - g_return_val_if_fail (IS_DATA_COLLECTION (self), 0); -#line 249 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - return DATA_COLLECTION_GET_CLASS (self)->get_count (self); -#line 1038 "DataCollection.c" -} - - -static DataObject* -data_collection_real_get_at (DataCollection* self, - gint index) -{ - DataObject* result = NULL; - DataSet* _tmp0_; - DataObject* _tmp1_; -#line 254 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - _tmp0_ = self->priv->dataset; -#line 254 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - _tmp1_ = data_set_get_at (_tmp0_, index); -#line 254 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - result = _tmp1_; -#line 254 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - return result; -#line 1057 "DataCollection.c" -} - - -DataObject* -data_collection_get_at (DataCollection* self, - gint index) -{ -#line 253 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - g_return_val_if_fail (IS_DATA_COLLECTION (self), NULL); -#line 253 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - return DATA_COLLECTION_GET_CLASS (self)->get_at (self, index); -#line 1069 "DataCollection.c" -} - - -static gint -data_collection_real_index_of (DataCollection* self, - DataObject* object) -{ - gint result = 0; - DataSet* _tmp0_; -#line 257 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - g_return_val_if_fail (IS_DATA_OBJECT (object), 0); -#line 258 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - _tmp0_ = self->priv->dataset; -#line 258 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - result = data_set_index_of (_tmp0_, object); -#line 258 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - return result; -#line 1087 "DataCollection.c" -} - - -gint -data_collection_index_of (DataCollection* self, - DataObject* object) -{ -#line 257 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - g_return_val_if_fail (IS_DATA_COLLECTION (self), 0); -#line 257 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - return DATA_COLLECTION_GET_CLASS (self)->index_of (self, object); -#line 1099 "DataCollection.c" -} - - -static gboolean -data_collection_real_contains (DataCollection* self, - DataObject* object) -{ - gboolean result = FALSE; -#line 261 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - g_return_val_if_fail (IS_DATA_OBJECT (object), FALSE); -#line 262 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - result = data_collection_internal_contains (self, object); -#line 262 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - return result; -#line 1114 "DataCollection.c" -} - - -gboolean -data_collection_contains (DataCollection* self, - DataObject* object) -{ -#line 261 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - g_return_val_if_fail (IS_DATA_COLLECTION (self), FALSE); -#line 261 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - return DATA_COLLECTION_GET_CLASS (self)->contains (self, object); -#line 1126 "DataCollection.c" -} - - -static gboolean -data_collection_internal_contains (DataCollection* self, - DataObject* object) -{ - gboolean result = FALSE; - DataSet* _tmp0_; - DataCollection* _tmp1_; - DataCollection* _tmp2_; -#line 267 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - g_return_val_if_fail (IS_DATA_COLLECTION (self), FALSE); -#line 267 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - g_return_val_if_fail (IS_DATA_OBJECT (object), FALSE); -#line 268 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - _tmp0_ = self->priv->dataset; -#line 268 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - if (!data_set_contains (_tmp0_, object)) { -#line 269 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - result = FALSE; -#line 269 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - return result; -#line 1150 "DataCollection.c" - } -#line 271 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - _tmp1_ = data_object_get_membership (object); -#line 271 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - _tmp2_ = _tmp1_; -#line 271 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - _vala_assert (_tmp2_ == self, "object.get_membership() == this"); -#line 271 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - _data_collection_unref0 (_tmp2_); -#line 273 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - result = TRUE; -#line 273 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - return result; -#line 1164 "DataCollection.c" -} - - -static void -data_collection_internal_add (DataCollection* self, - DataObject* object) -{ - gint64 _tmp0_; - gboolean added = FALSE; - DataSet* _tmp1_; -#line 276 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - g_return_if_fail (IS_DATA_COLLECTION (self)); -#line 276 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - g_return_if_fail (IS_DATA_OBJECT (object)); -#line 277 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - _vala_assert (data_collection_valid_type (self, object), "valid_type(object)"); -#line 279 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - _tmp0_ = self->priv->object_ordinal_generator; -#line 279 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - self->priv->object_ordinal_generator = _tmp0_ + 1; -#line 279 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - data_object_internal_set_membership (object, self, _tmp0_); -#line 281 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - _tmp1_ = self->priv->dataset; -#line 281 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - added = data_set_add (_tmp1_, object); -#line 282 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - _vala_assert (added, "added"); -#line 1193 "DataCollection.c" -} - - -static void -data_collection_internal_add_many (DataCollection* self, - GeeList* objects, - ProgressMonitor monitor, - void* monitor_target) -{ - gint count = 0; - gint _tmp0_; - gint _tmp1_; - gboolean added = FALSE; - DataSet* _tmp13_; -#line 285 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - g_return_if_fail (IS_DATA_COLLECTION (self)); -#line 285 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - g_return_if_fail (GEE_IS_LIST (objects)); -#line 286 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - _tmp0_ = gee_collection_get_size (G_TYPE_CHECK_INSTANCE_CAST (objects, GEE_TYPE_COLLECTION, GeeCollection)); -#line 286 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - _tmp1_ = _tmp0_; -#line 286 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - count = _tmp1_; -#line 1218 "DataCollection.c" - { - gint ctr = 0; -#line 287 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - ctr = 0; -#line 1223 "DataCollection.c" - { - gboolean _tmp2_ = FALSE; -#line 287 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - _tmp2_ = TRUE; -#line 287 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - while (TRUE) { -#line 1230 "DataCollection.c" - gint _tmp4_; - gint _tmp5_; - DataObject* object = NULL; - gint _tmp6_; - gpointer _tmp7_; - DataObject* _tmp8_; - DataObject* _tmp9_; - gint64 _tmp10_; -#line 287 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - if (!_tmp2_) { -#line 1241 "DataCollection.c" - gint _tmp3_; -#line 287 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - _tmp3_ = ctr; -#line 287 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - ctr = _tmp3_ + 1; -#line 1247 "DataCollection.c" - } -#line 287 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - _tmp2_ = FALSE; -#line 287 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - _tmp4_ = ctr; -#line 287 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - _tmp5_ = count; -#line 287 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - if (!(_tmp4_ < _tmp5_)) { -#line 287 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - break; -#line 1259 "DataCollection.c" - } -#line 288 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - _tmp6_ = ctr; -#line 288 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - _tmp7_ = gee_list_get (objects, _tmp6_); -#line 288 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - object = (DataObject*) _tmp7_; -#line 289 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - _tmp8_ = object; -#line 289 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - _vala_assert (data_collection_valid_type (self, _tmp8_), "valid_type(object)"); -#line 291 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - _tmp9_ = object; -#line 291 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - _tmp10_ = self->priv->object_ordinal_generator; -#line 291 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - self->priv->object_ordinal_generator = _tmp10_ + 1; -#line 291 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - data_object_internal_set_membership (_tmp9_, self, _tmp10_); -#line 293 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - if (monitor != NULL) { -#line 1281 "DataCollection.c" - gint _tmp11_; - gint _tmp12_; -#line 294 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - _tmp11_ = ctr; -#line 294 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - _tmp12_ = count; -#line 294 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - monitor ((guint64) _tmp11_, (guint64) _tmp12_, TRUE, monitor_target); -#line 1290 "DataCollection.c" - } -#line 287 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - _g_object_unref0 (object); -#line 1294 "DataCollection.c" - } - } - } -#line 297 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - _tmp13_ = self->priv->dataset; -#line 297 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - added = data_set_add_many (_tmp13_, G_TYPE_CHECK_INSTANCE_CAST (objects, GEE_TYPE_COLLECTION, GeeCollection)); -#line 298 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - _vala_assert (added, "added"); -#line 1304 "DataCollection.c" -} - - -static void -data_collection_internal_remove (DataCollection* self, - DataObject* object) -{ - gboolean removed = FALSE; - DataSet* _tmp0_; -#line 301 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - g_return_if_fail (IS_DATA_COLLECTION (self)); -#line 301 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - g_return_if_fail (IS_DATA_OBJECT (object)); -#line 302 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - _tmp0_ = self->priv->dataset; -#line 302 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - removed = data_set_remove (_tmp0_, object); -#line 303 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - _vala_assert (removed, "removed"); -#line 305 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - data_object_internal_clear_membership (object); -#line 1326 "DataCollection.c" -} - - -static gboolean -data_collection_real_add (DataCollection* self, - DataObject* object) -{ - gboolean result = FALSE; - GeeCollection* added = NULL; - GeeCollection* _tmp4_; - GeeCollection* _tmp5_; - GeeCollection* _tmp6_; -#line 309 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - g_return_val_if_fail (IS_DATA_OBJECT (object), FALSE); -#line 310 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - if (data_collection_internal_contains (self, object)) { -#line 1343 "DataCollection.c" - gchar* _tmp0_; - gchar* _tmp1_; - gchar* _tmp2_; - gchar* _tmp3_; -#line 311 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - _tmp0_ = data_collection_to_string (self); -#line 311 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - _tmp1_ = _tmp0_; -#line 311 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - _tmp2_ = data_object_to_string (object); -#line 311 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - _tmp3_ = _tmp2_; -#line 311 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - g_debug ("DataCollection.vala:311: %s cannot add %s: already present", _tmp1_, _tmp3_); -#line 311 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - _g_free0 (_tmp3_); -#line 311 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - _g_free0 (_tmp1_); -#line 313 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - result = FALSE; -#line 313 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - return result; -#line 1366 "DataCollection.c" - } -#line 316 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - data_collection_internal_add (self, object); -#line 319 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - _tmp4_ = data_collection_get_singleton (object); -#line 319 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - added = _tmp4_; -#line 320 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - _tmp5_ = added; -#line 320 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - data_collection_notify_items_added (self, G_TYPE_CHECK_INSTANCE_CAST (_tmp5_, GEE_TYPE_ITERABLE, GeeIterable)); -#line 321 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - _tmp6_ = added; -#line 321 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - data_collection_notify_contents_altered (self, G_TYPE_CHECK_INSTANCE_CAST (_tmp6_, GEE_TYPE_ITERABLE, GeeIterable), NULL); -#line 324 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - data_object_notify_membership_changed (object, self); -#line 326 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - result = TRUE; -#line 326 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - _g_object_unref0 (added); -#line 326 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - return result; -#line 1390 "DataCollection.c" -} - - -gboolean -data_collection_add (DataCollection* self, - DataObject* object) -{ -#line 309 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - g_return_val_if_fail (IS_DATA_COLLECTION (self), FALSE); -#line 309 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - return DATA_COLLECTION_GET_CLASS (self)->add (self, object); -#line 1402 "DataCollection.c" -} - - -static GeeCollection* -data_collection_real_add_many (DataCollection* self, - GeeCollection* objects, - ProgressMonitor monitor, - void* monitor_target) -{ - GeeCollection* result = NULL; - GeeArrayList* added = NULL; - GeeArrayList* _tmp0_; - gint count = 0; - GeeArrayList* _tmp13_; - gint _tmp14_; - gint _tmp15_; - gint _tmp16_; - GeeArrayList* _tmp17_; - GeeArrayList* _tmp18_; - GeeArrayList* _tmp19_; -#line 330 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - g_return_val_if_fail (GEE_IS_COLLECTION (objects), NULL); -#line 332 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - _tmp0_ = gee_array_list_new (TYPE_DATA_OBJECT, (GBoxedCopyFunc) g_object_ref, (GDestroyNotify) g_object_unref, NULL, NULL, NULL); -#line 332 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - added = _tmp0_; -#line 1429 "DataCollection.c" - { - GeeIterator* _object_it = NULL; - GeeIterator* _tmp1_; -#line 333 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - _tmp1_ = gee_iterable_iterator (G_TYPE_CHECK_INSTANCE_CAST (objects, GEE_TYPE_ITERABLE, GeeIterable)); -#line 333 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - _object_it = _tmp1_; -#line 333 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - while (TRUE) { -#line 1439 "DataCollection.c" - GeeIterator* _tmp2_; - DataObject* object = NULL; - GeeIterator* _tmp3_; - gpointer _tmp4_; - DataObject* _tmp5_; - GeeArrayList* _tmp11_; - DataObject* _tmp12_; -#line 333 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - _tmp2_ = _object_it; -#line 333 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - if (!gee_iterator_next (_tmp2_)) { -#line 333 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - break; -#line 1453 "DataCollection.c" - } -#line 333 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - _tmp3_ = _object_it; -#line 333 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - _tmp4_ = gee_iterator_get (_tmp3_); -#line 333 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - object = (DataObject*) _tmp4_; -#line 334 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - _tmp5_ = object; -#line 334 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - if (data_collection_internal_contains (self, _tmp5_)) { -#line 1465 "DataCollection.c" - gchar* _tmp6_; - gchar* _tmp7_; - DataObject* _tmp8_; - gchar* _tmp9_; - gchar* _tmp10_; -#line 335 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - _tmp6_ = data_collection_to_string (self); -#line 335 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - _tmp7_ = _tmp6_; -#line 335 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - _tmp8_ = object; -#line 335 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - _tmp9_ = data_object_to_string (_tmp8_); -#line 335 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - _tmp10_ = _tmp9_; -#line 335 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - g_debug ("DataCollection.vala:335: %s cannot add %s: already present", _tmp7_, _tmp10_); -#line 335 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - _g_free0 (_tmp10_); -#line 335 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - _g_free0 (_tmp7_); -#line 337 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - _g_object_unref0 (object); -#line 337 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - continue; -#line 1491 "DataCollection.c" - } -#line 340 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - _tmp11_ = added; -#line 340 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - _tmp12_ = object; -#line 340 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - gee_abstract_collection_add (G_TYPE_CHECK_INSTANCE_CAST (_tmp11_, GEE_TYPE_ABSTRACT_COLLECTION, GeeAbstractCollection), _tmp12_); -#line 333 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - _g_object_unref0 (object); -#line 1501 "DataCollection.c" - } -#line 333 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - _g_object_unref0 (_object_it); -#line 1505 "DataCollection.c" - } -#line 343 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - _tmp13_ = added; -#line 343 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - _tmp14_ = gee_abstract_collection_get_size (G_TYPE_CHECK_INSTANCE_CAST (_tmp13_, GEE_TYPE_ABSTRACT_COLLECTION, GeeAbstractCollection)); -#line 343 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - _tmp15_ = _tmp14_; -#line 343 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - count = _tmp15_; -#line 344 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - _tmp16_ = count; -#line 344 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - if (_tmp16_ == 0) { -#line 345 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - result = G_TYPE_CHECK_INSTANCE_CAST (added, GEE_TYPE_COLLECTION, GeeCollection); -#line 345 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - return result; -#line 1523 "DataCollection.c" - } -#line 347 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - _tmp17_ = added; -#line 347 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - data_collection_internal_add_many (self, G_TYPE_CHECK_INSTANCE_CAST (_tmp17_, GEE_TYPE_LIST, GeeList), monitor, monitor_target); -#line 350 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - _tmp18_ = added; -#line 350 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - data_collection_notify_items_added (self, G_TYPE_CHECK_INSTANCE_CAST (_tmp18_, GEE_TYPE_ITERABLE, GeeIterable)); -#line 351 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - _tmp19_ = added; -#line 351 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - data_collection_notify_contents_altered (self, G_TYPE_CHECK_INSTANCE_CAST (_tmp19_, GEE_TYPE_ITERABLE, GeeIterable), NULL); -#line 1537 "DataCollection.c" - { - gint ctr = 0; -#line 354 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - ctr = 0; -#line 1542 "DataCollection.c" - { - gboolean _tmp20_ = FALSE; -#line 354 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - _tmp20_ = TRUE; -#line 354 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - while (TRUE) { -#line 1549 "DataCollection.c" - gint _tmp22_; - gint _tmp23_; - GeeArrayList* _tmp24_; - gint _tmp25_; - gpointer _tmp26_; - DataObject* _tmp27_; -#line 354 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - if (!_tmp20_) { -#line 1558 "DataCollection.c" - gint _tmp21_; -#line 354 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - _tmp21_ = ctr; -#line 354 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - ctr = _tmp21_ + 1; -#line 1564 "DataCollection.c" - } -#line 354 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - _tmp20_ = FALSE; -#line 354 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - _tmp22_ = ctr; -#line 354 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - _tmp23_ = count; -#line 354 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - if (!(_tmp22_ < _tmp23_)) { -#line 354 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - break; -#line 1576 "DataCollection.c" - } -#line 355 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - _tmp24_ = added; -#line 355 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - _tmp25_ = ctr; -#line 355 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - _tmp26_ = gee_abstract_list_get (G_TYPE_CHECK_INSTANCE_CAST (_tmp24_, GEE_TYPE_ABSTRACT_LIST, GeeAbstractList), _tmp25_); -#line 355 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - _tmp27_ = (DataObject*) _tmp26_; -#line 355 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - data_object_notify_membership_changed (_tmp27_, self); -#line 355 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - _g_object_unref0 (_tmp27_); -#line 1590 "DataCollection.c" - } - } - } -#line 357 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - result = G_TYPE_CHECK_INSTANCE_CAST (added, GEE_TYPE_COLLECTION, GeeCollection); -#line 357 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - return result; -#line 1598 "DataCollection.c" -} - - -GeeCollection* -data_collection_add_many (DataCollection* self, - GeeCollection* objects, - ProgressMonitor monitor, - void* monitor_target) -{ -#line 330 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - g_return_val_if_fail (IS_DATA_COLLECTION (self), NULL); -#line 330 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - return DATA_COLLECTION_GET_CLASS (self)->add_many (self, objects, monitor, monitor_target); -#line 1612 "DataCollection.c" -} - - -Marker* -data_collection_start_marking (DataCollection* self) -{ - Marker* result = NULL; - DataCollectionMarkerImpl* _tmp0_; -#line 361 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - g_return_val_if_fail (IS_DATA_COLLECTION (self), NULL); -#line 362 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - _tmp0_ = data_collection_marker_impl_new (self); -#line 362 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - result = G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, TYPE_MARKER, Marker); -#line 362 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - return result; -#line 1629 "DataCollection.c" -} - - -Marker* -data_collection_mark (DataCollection* self, - DataObject* object) -{ - Marker* result = NULL; - Marker* marker = NULL; - DataCollectionMarkerImpl* _tmp0_; -#line 366 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - g_return_val_if_fail (IS_DATA_COLLECTION (self), NULL); -#line 366 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - g_return_val_if_fail (IS_DATA_OBJECT (object), NULL); -#line 367 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - _tmp0_ = data_collection_marker_impl_new (self); -#line 367 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - marker = G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, TYPE_MARKER, Marker); -#line 368 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - marker_mark (marker, object); -#line 370 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - result = marker; -#line 370 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - return result; -#line 1654 "DataCollection.c" -} - - -Marker* -data_collection_mark_many (DataCollection* self, - GeeCollection* objects) -{ - Marker* result = NULL; - Marker* marker = NULL; - DataCollectionMarkerImpl* _tmp0_; -#line 374 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - g_return_val_if_fail (IS_DATA_COLLECTION (self), NULL); -#line 374 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - g_return_val_if_fail (GEE_IS_COLLECTION (objects), NULL); -#line 375 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - _tmp0_ = data_collection_marker_impl_new (self); -#line 375 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - marker = G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, TYPE_MARKER, Marker); -#line 376 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - marker_mark_many (marker, objects); -#line 378 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - result = marker; -#line 378 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - return result; -#line 1679 "DataCollection.c" -} - - -static gpointer -_g_object_ref0 (gpointer self) -{ -#line 385 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - return self ? g_object_ref (self) : NULL; -#line 1688 "DataCollection.c" -} - - -void -data_collection_act_on_marked (DataCollection* self, - Marker* m, - MarkedAction action, - void* action_target, - ProgressMonitor monitor, - void* monitor_target, - GObject* user) -{ - DataCollectionMarkerImpl* marker = NULL; - DataCollectionMarkerImpl* _tmp0_; - DataCollectionMarkerImpl* _tmp1_; - DataCollectionMarkerImpl* _tmp2_; - guint64 count = 0ULL; - guint64 total = 0ULL; - DataCollectionMarkerImpl* _tmp3_; - GeeHashSet* _tmp4_; - gint _tmp5_; - gint _tmp6_; - DataCollectionMarkerImpl* _tmp21_; -#line 383 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - g_return_if_fail (IS_DATA_COLLECTION (self)); -#line 383 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - g_return_if_fail (IS_MARKER (m)); -#line 383 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - g_return_if_fail ((user == NULL) || G_IS_OBJECT (user)); -#line 385 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - _tmp0_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_CAST (m, DATA_COLLECTION_TYPE_MARKER_IMPL, DataCollectionMarkerImpl)); -#line 385 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - marker = _tmp0_; -#line 387 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - _tmp1_ = marker; -#line 387 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - _vala_assert (data_collection_marker_impl_is_valid (_tmp1_, self), "marker.is_valid(this)"); -#line 390 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - _tmp2_ = marker; -#line 390 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - data_collection_marker_impl_freeze (_tmp2_); -#line 392 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - count = (guint64) 0; -#line 393 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - _tmp3_ = marker; -#line 393 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - _tmp4_ = _tmp3_->marked; -#line 393 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - _tmp5_ = gee_abstract_collection_get_size (G_TYPE_CHECK_INSTANCE_CAST (_tmp4_, GEE_TYPE_ABSTRACT_COLLECTION, GeeAbstractCollection)); -#line 393 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - _tmp6_ = _tmp5_; -#line 393 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - total = (guint64) _tmp6_; -#line 1742 "DataCollection.c" - { - GeeIterator* _object_it = NULL; - DataCollectionMarkerImpl* _tmp7_; - GeeHashSet* _tmp8_; - GeeIterator* _tmp9_; -#line 396 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - _tmp7_ = marker; -#line 396 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - _tmp8_ = _tmp7_->marked; -#line 396 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - _tmp9_ = gee_abstract_collection_iterator (G_TYPE_CHECK_INSTANCE_CAST (_tmp8_, GEE_TYPE_ABSTRACT_COLLECTION, GeeAbstractCollection)); -#line 396 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - _object_it = _tmp9_; -#line 396 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - while (TRUE) { -#line 1758 "DataCollection.c" - GeeIterator* _tmp10_; - DataObject* object = NULL; - GeeIterator* _tmp11_; - gpointer _tmp12_; - DataObject* _tmp13_; - DataObject* _tmp17_; -#line 396 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - _tmp10_ = _object_it; -#line 396 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - if (!gee_iterator_next (_tmp10_)) { -#line 396 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - break; -#line 1771 "DataCollection.c" - } -#line 396 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - _tmp11_ = _object_it; -#line 396 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - _tmp12_ = gee_iterator_get (_tmp11_); -#line 396 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - object = (DataObject*) _tmp12_; -#line 398 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - _tmp13_ = object; -#line 398 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - if (!data_collection_internal_contains (self, _tmp13_)) { -#line 1783 "DataCollection.c" - DataObject* _tmp14_; - gchar* _tmp15_; - gchar* _tmp16_; -#line 399 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - _tmp14_ = object; -#line 399 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - _tmp15_ = data_object_to_string (_tmp14_); -#line 399 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - _tmp16_ = _tmp15_; -#line 399 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - g_warning ("DataCollection.vala:399: act_on_marked: marker holding ref to unknown " \ -"%s", _tmp16_); -#line 399 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - _g_free0 (_tmp16_); -#line 401 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - _g_object_unref0 (object); -#line 401 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - continue; -#line 1801 "DataCollection.c" - } -#line 404 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - _tmp17_ = object; -#line 404 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - if (!action (_tmp17_, user, action_target)) { -#line 405 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - _g_object_unref0 (object); -#line 405 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - break; -#line 1811 "DataCollection.c" - } -#line 407 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - if (monitor != NULL) { -#line 1815 "DataCollection.c" - guint64 _tmp18_; - guint64 _tmp19_; - guint64 _tmp20_; -#line 408 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - _tmp18_ = count; -#line 408 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - count = _tmp18_ + 1; -#line 408 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - _tmp19_ = count; -#line 408 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - _tmp20_ = total; -#line 408 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - if (!monitor (_tmp19_, _tmp20_, TRUE, monitor_target)) { -#line 409 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - _g_object_unref0 (object); -#line 409 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - break; -#line 1833 "DataCollection.c" - } - } -#line 396 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - _g_object_unref0 (object); -#line 1838 "DataCollection.c" - } -#line 396 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - _g_object_unref0 (_object_it); -#line 1842 "DataCollection.c" - } -#line 414 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - _tmp21_ = marker; -#line 414 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - data_collection_marker_impl_finished (_tmp21_); -#line 383 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - _g_object_unref0 (marker); -#line 1850 "DataCollection.c" -} - - -static void -data_collection_real_remove_marked (DataCollection* self, - Marker* m) -{ - DataCollectionMarkerImpl* marker = NULL; - DataCollectionMarkerImpl* _tmp0_; - DataCollectionMarkerImpl* _tmp1_; - DataCollectionMarkerImpl* _tmp2_; - GeeArrayList* skipped = NULL; - GeeArrayList* _tmp18_; - DataCollectionMarkerImpl* _tmp22_; - GeeHashSet* _tmp23_; - gint _tmp24_; - gint _tmp25_; - DataCollectionMarkerImpl* _tmp37_; -#line 419 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - g_return_if_fail (IS_MARKER (m)); -#line 420 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - _tmp0_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_CAST (m, DATA_COLLECTION_TYPE_MARKER_IMPL, DataCollectionMarkerImpl)); -#line 420 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - marker = _tmp0_; -#line 422 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - _tmp1_ = marker; -#line 422 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - _vala_assert (data_collection_marker_impl_is_valid (_tmp1_, self), "marker.is_valid(this)"); -#line 425 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - _tmp2_ = marker; -#line 425 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - data_collection_marker_impl_freeze (_tmp2_); -#line 428 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - skipped = NULL; -#line 1885 "DataCollection.c" - { - GeeIterator* _object_it = NULL; - DataCollectionMarkerImpl* _tmp3_; - GeeHashSet* _tmp4_; - GeeIterator* _tmp5_; -#line 429 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - _tmp3_ = marker; -#line 429 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - _tmp4_ = _tmp3_->marked; -#line 429 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - _tmp5_ = gee_abstract_collection_iterator (G_TYPE_CHECK_INSTANCE_CAST (_tmp4_, GEE_TYPE_ABSTRACT_COLLECTION, GeeAbstractCollection)); -#line 429 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - _object_it = _tmp5_; -#line 429 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - while (TRUE) { -#line 1901 "DataCollection.c" - GeeIterator* _tmp6_; - DataObject* object = NULL; - GeeIterator* _tmp7_; - gpointer _tmp8_; - DataObject* _tmp9_; - DataObject* _tmp17_; -#line 429 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - _tmp6_ = _object_it; -#line 429 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - if (!gee_iterator_next (_tmp6_)) { -#line 429 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - break; -#line 1914 "DataCollection.c" - } -#line 429 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - _tmp7_ = _object_it; -#line 429 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - _tmp8_ = gee_iterator_get (_tmp7_); -#line 429 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - object = (DataObject*) _tmp8_; -#line 431 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - _tmp9_ = object; -#line 431 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - if (!data_collection_internal_contains (self, _tmp9_)) { -#line 1926 "DataCollection.c" - DataObject* _tmp10_; - gchar* _tmp11_; - gchar* _tmp12_; - GeeArrayList* _tmp13_; - GeeArrayList* _tmp15_; - DataObject* _tmp16_; -#line 432 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - _tmp10_ = object; -#line 432 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - _tmp11_ = data_object_to_string (_tmp10_); -#line 432 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - _tmp12_ = _tmp11_; -#line 432 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - g_warning ("DataCollection.vala:432: remove_marked: marker holding ref to unknown " \ -"%s", _tmp12_); -#line 432 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - _g_free0 (_tmp12_); -#line 434 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - _tmp13_ = skipped; -#line 434 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - if (_tmp13_ == NULL) { -#line 1947 "DataCollection.c" - GeeArrayList* _tmp14_; -#line 435 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - _tmp14_ = gee_array_list_new (TYPE_DATA_OBJECT, (GBoxedCopyFunc) g_object_ref, (GDestroyNotify) g_object_unref, NULL, NULL, NULL); -#line 435 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - _g_object_unref0 (skipped); -#line 435 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - skipped = _tmp14_; -#line 1955 "DataCollection.c" - } -#line 437 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - _tmp15_ = skipped; -#line 437 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - _tmp16_ = object; -#line 437 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - gee_abstract_collection_add (G_TYPE_CHECK_INSTANCE_CAST (_tmp15_, GEE_TYPE_ABSTRACT_COLLECTION, GeeAbstractCollection), _tmp16_); -#line 439 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - _g_object_unref0 (object); -#line 439 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - continue; -#line 1967 "DataCollection.c" - } -#line 442 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - _tmp17_ = object; -#line 442 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - data_collection_internal_remove (self, _tmp17_); -#line 429 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - _g_object_unref0 (object); -#line 1975 "DataCollection.c" - } -#line 429 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - _g_object_unref0 (_object_it); -#line 1979 "DataCollection.c" - } -#line 445 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - _tmp18_ = skipped; -#line 445 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - if (_tmp18_ != NULL) { -#line 1985 "DataCollection.c" - DataCollectionMarkerImpl* _tmp19_; - GeeHashSet* _tmp20_; - GeeArrayList* _tmp21_; -#line 446 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - _tmp19_ = marker; -#line 446 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - _tmp20_ = _tmp19_->marked; -#line 446 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - _tmp21_ = skipped; -#line 446 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - gee_collection_remove_all (G_TYPE_CHECK_INSTANCE_CAST (_tmp20_, GEE_TYPE_COLLECTION, GeeCollection), G_TYPE_CHECK_INSTANCE_CAST (_tmp21_, GEE_TYPE_COLLECTION, GeeCollection)); -#line 1997 "DataCollection.c" - } -#line 449 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - _tmp22_ = marker; -#line 449 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - _tmp23_ = _tmp22_->marked; -#line 449 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - _tmp24_ = gee_abstract_collection_get_size (G_TYPE_CHECK_INSTANCE_CAST (_tmp23_, GEE_TYPE_ABSTRACT_COLLECTION, GeeAbstractCollection)); -#line 449 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - _tmp25_ = _tmp24_; -#line 449 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - if (_tmp25_ > 0) { -#line 2009 "DataCollection.c" - DataCollectionMarkerImpl* _tmp26_; - GeeHashSet* _tmp27_; - DataCollectionMarkerImpl* _tmp28_; - GeeHashSet* _tmp29_; -#line 450 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - _tmp26_ = marker; -#line 450 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - _tmp27_ = _tmp26_->marked; -#line 450 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - data_collection_notify_items_removed (self, G_TYPE_CHECK_INSTANCE_CAST (_tmp27_, GEE_TYPE_ITERABLE, GeeIterable)); -#line 451 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - _tmp28_ = marker; -#line 451 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - _tmp29_ = _tmp28_->marked; -#line 451 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - data_collection_notify_contents_altered (self, NULL, G_TYPE_CHECK_INSTANCE_CAST (_tmp29_, GEE_TYPE_ITERABLE, GeeIterable)); -#line 2026 "DataCollection.c" - { - GeeIterator* _object_it = NULL; - DataCollectionMarkerImpl* _tmp30_; - GeeHashSet* _tmp31_; - GeeIterator* _tmp32_; -#line 454 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - _tmp30_ = marker; -#line 454 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - _tmp31_ = _tmp30_->marked; -#line 454 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - _tmp32_ = gee_abstract_collection_iterator (G_TYPE_CHECK_INSTANCE_CAST (_tmp31_, GEE_TYPE_ABSTRACT_COLLECTION, GeeAbstractCollection)); -#line 454 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - _object_it = _tmp32_; -#line 454 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - while (TRUE) { -#line 2042 "DataCollection.c" - GeeIterator* _tmp33_; - DataObject* object = NULL; - GeeIterator* _tmp34_; - gpointer _tmp35_; - DataObject* _tmp36_; -#line 454 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - _tmp33_ = _object_it; -#line 454 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - if (!gee_iterator_next (_tmp33_)) { -#line 454 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - break; -#line 2054 "DataCollection.c" - } -#line 454 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - _tmp34_ = _object_it; -#line 454 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - _tmp35_ = gee_iterator_get (_tmp34_); -#line 454 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - object = (DataObject*) _tmp35_; -#line 455 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - _tmp36_ = object; -#line 455 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - data_object_notify_membership_changed (_tmp36_, NULL); -#line 454 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - _g_object_unref0 (object); -#line 2068 "DataCollection.c" - } -#line 454 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - _g_object_unref0 (_object_it); -#line 2072 "DataCollection.c" - } - } -#line 459 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - _tmp37_ = marker; -#line 459 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - data_collection_marker_impl_finished (_tmp37_); -#line 419 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - _g_object_unref0 (skipped); -#line 419 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - _g_object_unref0 (marker); -#line 2083 "DataCollection.c" -} - - -void -data_collection_remove_marked (DataCollection* self, - Marker* m) -{ -#line 419 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - g_return_if_fail (IS_DATA_COLLECTION (self)); -#line 419 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - DATA_COLLECTION_GET_CLASS (self)->remove_marked (self, m); -#line 2095 "DataCollection.c" -} - - -static void -data_collection_real_clear (DataCollection* self) -{ - DataSet* _tmp0_; - GeeArrayList* removed = NULL; - GeeArrayList* _tmp1_; - GeeArrayList* _tmp10_; - GeeArrayList* _tmp11_; -#line 463 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - _tmp0_ = self->priv->dataset; -#line 463 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - if (data_set_get_count (_tmp0_) == 0) { -#line 464 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - return; -#line 2113 "DataCollection.c" - } -#line 468 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - _tmp1_ = gee_array_list_new (TYPE_DATA_OBJECT, (GBoxedCopyFunc) g_object_ref, (GDestroyNotify) g_object_unref, NULL, NULL, NULL); -#line 468 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - removed = _tmp1_; -#line 2119 "DataCollection.c" - { - gboolean _tmp2_ = FALSE; -#line 469 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - _tmp2_ = TRUE; -#line 469 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - while (TRUE) { -#line 2126 "DataCollection.c" - DataObject* object = NULL; - DataSet* _tmp4_; - DataObject* _tmp5_; - DataObject* _tmp6_; - GeeArrayList* _tmp7_; - DataObject* _tmp8_; - DataObject* _tmp9_; -#line 469 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - if (!_tmp2_) { -#line 2136 "DataCollection.c" - DataSet* _tmp3_; -#line 475 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - _tmp3_ = self->priv->dataset; -#line 475 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - if (!(data_set_get_count (_tmp3_) > 0)) { -#line 475 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - break; -#line 2144 "DataCollection.c" - } - } -#line 469 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - _tmp2_ = FALSE; -#line 470 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - _tmp4_ = self->priv->dataset; -#line 470 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - _tmp5_ = data_set_get_at (_tmp4_, 0); -#line 470 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - object = _tmp5_; -#line 471 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - _tmp6_ = object; -#line 471 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - _vala_assert (_tmp6_ != NULL, "object != null"); -#line 473 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - _tmp7_ = removed; -#line 473 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - _tmp8_ = object; -#line 473 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - gee_abstract_collection_add (G_TYPE_CHECK_INSTANCE_CAST (_tmp7_, GEE_TYPE_ABSTRACT_COLLECTION, GeeAbstractCollection), _tmp8_); -#line 474 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - _tmp9_ = object; -#line 474 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - data_collection_internal_remove (self, _tmp9_); -#line 469 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - _g_object_unref0 (object); -#line 2171 "DataCollection.c" - } - } -#line 478 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - _tmp10_ = removed; -#line 478 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - data_collection_notify_items_removed (self, G_TYPE_CHECK_INSTANCE_CAST (_tmp10_, GEE_TYPE_ITERABLE, GeeIterable)); -#line 479 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - _tmp11_ = removed; -#line 479 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - data_collection_notify_contents_altered (self, NULL, G_TYPE_CHECK_INSTANCE_CAST (_tmp11_, GEE_TYPE_ITERABLE, GeeIterable)); -#line 2182 "DataCollection.c" - { - GeeArrayList* _object_list = NULL; - GeeArrayList* _tmp12_; - GeeArrayList* _tmp13_; - gint _object_size = 0; - GeeArrayList* _tmp14_; - gint _tmp15_; - gint _tmp16_; - gint _object_index = 0; -#line 482 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - _tmp12_ = removed; -#line 482 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - _tmp13_ = _g_object_ref0 (_tmp12_); -#line 482 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - _object_list = _tmp13_; -#line 482 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - _tmp14_ = _object_list; -#line 482 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - _tmp15_ = gee_abstract_collection_get_size (G_TYPE_CHECK_INSTANCE_CAST (_tmp14_, GEE_TYPE_ABSTRACT_COLLECTION, GeeAbstractCollection)); -#line 482 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - _tmp16_ = _tmp15_; -#line 482 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - _object_size = _tmp16_; -#line 482 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - _object_index = -1; -#line 482 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - while (TRUE) { -#line 2210 "DataCollection.c" - gint _tmp17_; - gint _tmp18_; - gint _tmp19_; - DataObject* object = NULL; - GeeArrayList* _tmp20_; - gint _tmp21_; - gpointer _tmp22_; - DataObject* _tmp23_; -#line 482 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - _tmp17_ = _object_index; -#line 482 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - _object_index = _tmp17_ + 1; -#line 482 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - _tmp18_ = _object_index; -#line 482 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - _tmp19_ = _object_size; -#line 482 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - if (!(_tmp18_ < _tmp19_)) { -#line 482 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - break; -#line 2231 "DataCollection.c" - } -#line 482 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - _tmp20_ = _object_list; -#line 482 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - _tmp21_ = _object_index; -#line 482 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - _tmp22_ = gee_abstract_list_get (G_TYPE_CHECK_INSTANCE_CAST (_tmp20_, GEE_TYPE_ABSTRACT_LIST, GeeAbstractList), _tmp21_); -#line 482 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - object = (DataObject*) _tmp22_; -#line 483 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - _tmp23_ = object; -#line 483 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - data_object_notify_membership_changed (_tmp23_, NULL); -#line 482 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - _g_object_unref0 (object); -#line 2247 "DataCollection.c" - } -#line 482 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - _g_object_unref0 (_object_list); -#line 2251 "DataCollection.c" - } -#line 462 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - _g_object_unref0 (removed); -#line 2255 "DataCollection.c" -} - - -void -data_collection_clear (DataCollection* self) -{ -#line 462 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - g_return_if_fail (IS_DATA_COLLECTION (self)); -#line 462 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - DATA_COLLECTION_GET_CLASS (self)->clear (self); -#line 2266 "DataCollection.c" -} - - -static void -data_collection_real_close (DataCollection* self) -{ -#line 493 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - data_collection_clear (self); -#line 2275 "DataCollection.c" -} - - -void -data_collection_close (DataCollection* self) -{ -#line 492 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - g_return_if_fail (IS_DATA_COLLECTION (self)); -#line 492 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - DATA_COLLECTION_GET_CLASS (self)->close (self); -#line 2286 "DataCollection.c" -} - - -static gpointer -_alteration_ref0 (gpointer self) -{ -#line 513 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - return self ? alteration_ref (self) : NULL; -#line 2295 "DataCollection.c" -} - - -void -data_collection_internal_notify_altered (DataCollection* self, - DataObject* object, - Alteration* alteration) -{ - gboolean resort_occurred = FALSE; - DataSet* _tmp0_; - gboolean _tmp14_; - GeeMap* _tmp15_; - GeeMap* _tmp16_; -#line 498 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - g_return_if_fail (IS_DATA_COLLECTION (self)); -#line 498 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - g_return_if_fail (IS_DATA_OBJECT (object)); -#line 498 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - g_return_if_fail (IS_ALTERATION (alteration)); -#line 499 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - _vala_assert (data_collection_internal_contains (self, object), "internal_contains(object)"); -#line 501 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - _tmp0_ = self->priv->dataset; -#line 501 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - resort_occurred = data_set_resort_object (_tmp0_, object, alteration); -#line 503 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - if (data_collection_are_notifications_frozen (self)) { -#line 2323 "DataCollection.c" - GeeHashMap* _tmp1_; - Alteration* current = NULL; - GeeHashMap* _tmp3_; - gpointer _tmp4_; - Alteration* _tmp5_; - GeeHashMap* _tmp9_; - Alteration* _tmp10_; - gboolean _tmp11_ = FALSE; - gboolean _tmp12_; -#line 504 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - _tmp1_ = self->priv->frozen_items_altered; -#line 504 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - if (_tmp1_ == NULL) { -#line 2337 "DataCollection.c" - GeeHashMap* _tmp2_; -#line 505 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - _tmp2_ = gee_hash_map_new (TYPE_DATA_OBJECT, (GBoxedCopyFunc) g_object_ref, (GDestroyNotify) g_object_unref, TYPE_ALTERATION, (GBoxedCopyFunc) alteration_ref, (GDestroyNotify) alteration_unref, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL); -#line 505 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - _g_object_unref0 (self->priv->frozen_items_altered); -#line 505 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - self->priv->frozen_items_altered = _tmp2_; -#line 2345 "DataCollection.c" - } -#line 509 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - _tmp3_ = self->priv->frozen_items_altered; -#line 509 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - _tmp4_ = gee_abstract_map_get (G_TYPE_CHECK_INSTANCE_CAST (_tmp3_, GEE_TYPE_ABSTRACT_MAP, GeeAbstractMap), object); -#line 509 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - current = (Alteration*) _tmp4_; -#line 510 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - _tmp5_ = current; -#line 510 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - if (_tmp5_ != NULL) { -#line 2357 "DataCollection.c" - Alteration* _tmp6_; - Alteration* _tmp7_; -#line 511 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - _tmp6_ = current; -#line 511 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - _tmp7_ = alteration_compress (_tmp6_, alteration); -#line 511 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - _alteration_unref0 (current); -#line 511 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - current = _tmp7_; -#line 2368 "DataCollection.c" - } else { - Alteration* _tmp8_; -#line 513 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - _tmp8_ = _alteration_ref0 (alteration); -#line 513 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - _alteration_unref0 (current); -#line 513 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - current = _tmp8_; -#line 2377 "DataCollection.c" - } -#line 515 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - _tmp9_ = self->priv->frozen_items_altered; -#line 515 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - _tmp10_ = current; -#line 515 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - gee_abstract_map_set (G_TYPE_CHECK_INSTANCE_CAST (_tmp9_, GEE_TYPE_ABSTRACT_MAP, GeeAbstractMap), object, _tmp10_); -#line 517 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - _tmp12_ = self->priv->fire_ordering_changed; -#line 517 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - if (_tmp12_) { -#line 517 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - _tmp11_ = TRUE; -#line 2391 "DataCollection.c" - } else { - gboolean _tmp13_; -#line 517 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - _tmp13_ = resort_occurred; -#line 517 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - _tmp11_ = _tmp13_; -#line 2398 "DataCollection.c" - } -#line 517 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - self->priv->fire_ordering_changed = _tmp11_; -#line 519 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - _alteration_unref0 (current); -#line 519 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - return; -#line 2406 "DataCollection.c" - } -#line 522 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - _tmp14_ = resort_occurred; -#line 522 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - if (_tmp14_) { -#line 523 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - data_collection_notify_ordering_changed (self); -#line 2414 "DataCollection.c" - } -#line 525 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - _tmp15_ = data_collection_get_alteration_singleton (object, alteration); -#line 525 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - _tmp16_ = _tmp15_; -#line 525 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - data_collection_notify_items_altered (self, _tmp16_); -#line 525 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - _g_object_unref0 (_tmp16_); -#line 2424 "DataCollection.c" -} - - -GValue* -data_collection_get_property (DataCollection* self, - const gchar* name) -{ - GValue* result = NULL; - GeeHashMap* _tmp0_; - gpointer _tmp1_; -#line 528 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - g_return_val_if_fail (IS_DATA_COLLECTION (self), NULL); -#line 528 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - g_return_val_if_fail (name != NULL, NULL); -#line 529 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - _tmp0_ = self->priv->properties; -#line 529 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - _tmp1_ = gee_abstract_map_get (G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, GEE_TYPE_ABSTRACT_MAP, GeeAbstractMap), name); -#line 529 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - result = (GValue*) _tmp1_; -#line 529 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - return result; -#line 2447 "DataCollection.c" -} - - -static gboolean -_bool_value_equals_value_equal_func (GValue* a, - GValue* b, - gpointer self) -{ - gboolean result; - result = bool_value_equals (a, b); -#line 535 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - return result; -#line 2460 "DataCollection.c" -} - - -static gboolean -_int_value_equals_value_equal_func (GValue* a, - GValue* b, - gpointer self) -{ - gboolean result; - result = int_value_equals (a, b); -#line 537 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - return result; -#line 2473 "DataCollection.c" -} - - -void -data_collection_set_property (DataCollection* self, - const gchar* name, - GValue* val, - ValueEqualFunc value_equals, - void* value_equals_target) -{ - GValue* old = NULL; - GeeHashMap* _tmp0_; - gpointer _tmp1_; - GValue* _tmp2_; - GeeHashMap* _tmp6_; - GValue _tmp7_; - GValue* _tmp8_; - GValue _tmp9_; - gint count = 0; - DataSet* _tmp10_; -#line 532 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - g_return_if_fail (IS_DATA_COLLECTION (self)); -#line 532 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - g_return_if_fail (name != NULL); -#line 532 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - g_return_if_fail (val != NULL); -#line 533 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - if (value_equals == NULL) { -#line 534 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - if (G_VALUE_HOLDS (val, G_TYPE_BOOLEAN)) { -#line 535 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - value_equals = _bool_value_equals_value_equal_func; -#line 535 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - value_equals_target = NULL; -#line 2508 "DataCollection.c" - } else { -#line 536 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - if (G_VALUE_HOLDS (val, G_TYPE_INT)) { -#line 537 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - value_equals = _int_value_equals_value_equal_func; -#line 537 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - value_equals_target = NULL; -#line 2516 "DataCollection.c" - } else { -#line 539 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - g_error ("DataCollection.vala:539: value_equals must be specified for this type"); -#line 2520 "DataCollection.c" - } - } - } -#line 542 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - _tmp0_ = self->priv->properties; -#line 542 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - _tmp1_ = gee_abstract_map_get (G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, GEE_TYPE_ABSTRACT_MAP, GeeAbstractMap), name); -#line 542 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - old = (GValue*) _tmp1_; -#line 543 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - _tmp2_ = old; -#line 543 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - if (_tmp2_ != NULL) { -#line 2534 "DataCollection.c" - GValue* _tmp3_; - GValue _tmp4_; - GValue _tmp5_; -#line 544 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - _tmp3_ = old; -#line 544 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - _tmp4_ = *val; -#line 544 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - _tmp5_ = *_tmp3_; -#line 544 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - if (value_equals (&_tmp5_, &_tmp4_, value_equals_target)) { -#line 545 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - __vala_GValue_free0 (old); -#line 545 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - return; -#line 2550 "DataCollection.c" - } - } -#line 548 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - _tmp6_ = self->priv->properties; -#line 548 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - _tmp7_ = *val; -#line 548 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - gee_abstract_map_set (G_TYPE_CHECK_INSTANCE_CAST (_tmp6_, GEE_TYPE_ABSTRACT_MAP, GeeAbstractMap), name, &_tmp7_); -#line 550 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - _tmp8_ = old; -#line 550 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - _tmp9_ = *val; -#line 550 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - data_collection_notify_property_set (self, name, _tmp8_, &_tmp9_); -#line 553 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - _tmp10_ = self->priv->dataset; -#line 553 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - count = data_set_get_count (_tmp10_); -#line 2569 "DataCollection.c" - { - gint ctr = 0; -#line 554 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - ctr = 0; -#line 2574 "DataCollection.c" - { - gboolean _tmp11_ = FALSE; -#line 554 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - _tmp11_ = TRUE; -#line 554 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - while (TRUE) { -#line 2581 "DataCollection.c" - gint _tmp13_; - gint _tmp14_; - DataSet* _tmp15_; - gint _tmp16_; - DataObject* _tmp17_; - DataObject* _tmp18_; - GValue* _tmp19_; - GValue _tmp20_; -#line 554 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - if (!_tmp11_) { -#line 2592 "DataCollection.c" - gint _tmp12_; -#line 554 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - _tmp12_ = ctr; -#line 554 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - ctr = _tmp12_ + 1; -#line 2598 "DataCollection.c" - } -#line 554 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - _tmp11_ = FALSE; -#line 554 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - _tmp13_ = ctr; -#line 554 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - _tmp14_ = count; -#line 554 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - if (!(_tmp13_ < _tmp14_)) { -#line 554 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - break; -#line 2610 "DataCollection.c" - } -#line 555 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - _tmp15_ = self->priv->dataset; -#line 555 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - _tmp16_ = ctr; -#line 555 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - _tmp17_ = data_set_get_at (_tmp15_, _tmp16_); -#line 555 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - _tmp18_ = _tmp17_; -#line 555 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - _tmp19_ = old; -#line 555 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - _tmp20_ = *val; -#line 555 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - data_object_notify_collection_property_set (_tmp18_, name, _tmp19_, &_tmp20_); -#line 555 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - _g_object_unref0 (_tmp18_); -#line 2628 "DataCollection.c" - } - } - } -#line 532 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - __vala_GValue_free0 (old); -#line 2634 "DataCollection.c" -} - - -void -data_collection_clear_property (DataCollection* self, - const gchar* name) -{ - GeeHashMap* _tmp0_; - gboolean _tmp1_; - gint count = 0; - DataSet* _tmp2_; -#line 558 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - g_return_if_fail (IS_DATA_COLLECTION (self)); -#line 558 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - g_return_if_fail (name != NULL); -#line 559 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - _tmp0_ = self->priv->properties; -#line 559 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - _tmp1_ = gee_abstract_map_unset (G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, GEE_TYPE_ABSTRACT_MAP, GeeAbstractMap), name, NULL); -#line 559 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - if (!_tmp1_) { -#line 560 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - return; -#line 2658 "DataCollection.c" - } -#line 563 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - data_collection_notify_property_cleared (self, name); -#line 566 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - _tmp2_ = self->priv->dataset; -#line 566 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - count = data_set_get_count (_tmp2_); -#line 2666 "DataCollection.c" - { - gint ctr = 0; -#line 567 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - ctr = 0; -#line 2671 "DataCollection.c" - { - gboolean _tmp3_ = FALSE; -#line 567 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - _tmp3_ = TRUE; -#line 567 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - while (TRUE) { -#line 2678 "DataCollection.c" - gint _tmp5_; - gint _tmp6_; - DataSet* _tmp7_; - gint _tmp8_; - DataObject* _tmp9_; - DataObject* _tmp10_; -#line 567 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - if (!_tmp3_) { -#line 2687 "DataCollection.c" - gint _tmp4_; -#line 567 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - _tmp4_ = ctr; -#line 567 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - ctr = _tmp4_ + 1; -#line 2693 "DataCollection.c" - } -#line 567 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - _tmp3_ = FALSE; -#line 567 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - _tmp5_ = ctr; -#line 567 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - _tmp6_ = count; -#line 567 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - if (!(_tmp5_ < _tmp6_)) { -#line 567 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - break; -#line 2705 "DataCollection.c" - } -#line 568 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - _tmp7_ = self->priv->dataset; -#line 568 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - _tmp8_ = ctr; -#line 568 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - _tmp9_ = data_set_get_at (_tmp7_, _tmp8_); -#line 568 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - _tmp10_ = _tmp9_; -#line 568 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - data_object_notify_collection_property_cleared (_tmp10_, name); -#line 568 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - _g_object_unref0 (_tmp10_); -#line 2719 "DataCollection.c" - } - } - } -} - - -void -data_collection_freeze_notifications (DataCollection* self) -{ - gint _tmp0_; -#line 581 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - g_return_if_fail (IS_DATA_COLLECTION (self)); -#line 582 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - _tmp0_ = self->priv->notifies_frozen; -#line 582 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - self->priv->notifies_frozen = _tmp0_ + 1; -#line 582 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - if (_tmp0_ == 0) { -#line 583 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - data_collection_notify_frozen (self); -#line 2740 "DataCollection.c" - } -} - - -void -data_collection_thaw_notifications (DataCollection* self) -{ - gint _tmp0_; - gint _tmp1_; - gint _tmp2_; -#line 586 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - g_return_if_fail (IS_DATA_COLLECTION (self)); -#line 587 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - _tmp0_ = self->priv->notifies_frozen; -#line 587 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - if (_tmp0_ == 0) { -#line 588 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - return; -#line 2759 "DataCollection.c" - } -#line 590 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - _tmp1_ = self->priv->notifies_frozen; -#line 590 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - self->priv->notifies_frozen = _tmp1_ - 1; -#line 590 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - _tmp2_ = self->priv->notifies_frozen; -#line 590 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - if (_tmp2_ == 0) { -#line 591 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - data_collection_notify_thawed (self); -#line 2771 "DataCollection.c" - } -} - - -gboolean -data_collection_are_notifications_frozen (DataCollection* self) -{ - gboolean result = FALSE; - gint _tmp0_; -#line 594 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - g_return_val_if_fail (IS_DATA_COLLECTION (self), FALSE); -#line 595 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - _tmp0_ = self->priv->notifies_frozen; -#line 595 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - result = _tmp0_ > 0; -#line 595 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - return result; -#line 2789 "DataCollection.c" -} - - -static void -data_collection_real_notify_frozen (DataCollection* self) -{ -#line 601 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - g_signal_emit (self, data_collection_signals[DATA_COLLECTION_FROZEN_SIGNAL], 0); -#line 2798 "DataCollection.c" -} - - -void -data_collection_notify_frozen (DataCollection* self) -{ -#line 600 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - g_return_if_fail (IS_DATA_COLLECTION (self)); -#line 600 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - DATA_COLLECTION_GET_CLASS (self)->notify_frozen (self); -#line 2809 "DataCollection.c" -} - - -static void -data_collection_real_notify_thawed (DataCollection* self) -{ - GeeHashMap* _tmp0_; - gboolean _tmp4_; -#line 607 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - _tmp0_ = self->priv->frozen_items_altered; -#line 607 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - if (_tmp0_ != NULL) { -#line 2822 "DataCollection.c" - GeeMap* copy = NULL; - GeeHashMap* _tmp1_; - GeeMap* _tmp2_; - GeeMap* _tmp3_; -#line 609 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - _tmp1_ = self->priv->frozen_items_altered; -#line 609 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - _tmp2_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_CAST (_tmp1_, GEE_TYPE_MAP, GeeMap)); -#line 609 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - copy = _tmp2_; -#line 610 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - _g_object_unref0 (self->priv->frozen_items_altered); -#line 610 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - self->priv->frozen_items_altered = NULL; -#line 612 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - _tmp3_ = copy; -#line 612 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - data_collection_notify_items_altered (self, _tmp3_); -#line 607 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - _g_object_unref0 (copy); -#line 2843 "DataCollection.c" - } -#line 615 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - _tmp4_ = self->priv->fire_ordering_changed; -#line 615 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - if (_tmp4_) { -#line 616 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - self->priv->fire_ordering_changed = FALSE; -#line 617 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - data_collection_notify_ordering_changed (self); -#line 2853 "DataCollection.c" - } -#line 620 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - g_signal_emit (self, data_collection_signals[DATA_COLLECTION_THAWED_SIGNAL], 0); -#line 2857 "DataCollection.c" -} - - -void -data_collection_notify_thawed (DataCollection* self) -{ -#line 606 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - g_return_if_fail (IS_DATA_COLLECTION (self)); -#line 606 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - DATA_COLLECTION_GET_CLASS (self)->notify_thawed (self); -#line 2868 "DataCollection.c" -} - - -static void -data_collection_real_items_added (DataCollection* self, - GeeIterable* added) -{ -#line 116 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - g_return_if_fail (GEE_IS_ITERABLE (added)); -#line 2878 "DataCollection.c" -} - - -static void -data_collection_real_items_removed (DataCollection* self, - GeeIterable* removed) -{ -#line 120 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - g_return_if_fail (GEE_IS_ITERABLE (removed)); -#line 2888 "DataCollection.c" -} - - -static void -data_collection_real_contents_altered (DataCollection* self, - GeeIterable* added, - GeeIterable* removed) -{ -#line 124 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - g_return_if_fail ((added == NULL) || GEE_IS_ITERABLE (added)); -#line 124 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - g_return_if_fail ((removed == NULL) || GEE_IS_ITERABLE (removed)); -#line 2901 "DataCollection.c" -} - - -static void -g_cclosure_user_marshal_VOID__OBJECT_OBJECT (GClosure * closure, - GValue * return_value, - guint n_param_values, - const GValue * param_values, - gpointer invocation_hint, - gpointer marshal_data) -{ - typedef void (*GMarshalFunc_VOID__OBJECT_OBJECT) (gpointer data1, gpointer arg_1, gpointer arg_2, gpointer data2); - register GMarshalFunc_VOID__OBJECT_OBJECT callback; - register GCClosure * cc; - register gpointer data1; - register gpointer data2; - cc = (GCClosure *) closure; -#line 7 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - g_return_if_fail (n_param_values == 3); -#line 7 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - if (G_CCLOSURE_SWAP_DATA (closure)) { -#line 7 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - data1 = closure->data; -#line 7 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - data2 = param_values->data[0].v_pointer; -#line 2927 "DataCollection.c" - } else { -#line 7 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - data1 = param_values->data[0].v_pointer; -#line 7 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - data2 = closure->data; -#line 2933 "DataCollection.c" - } -#line 7 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - callback = (GMarshalFunc_VOID__OBJECT_OBJECT) (marshal_data ? marshal_data : cc->callback); -#line 7 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - callback (data1, g_value_get_object (param_values + 1), g_value_get_object (param_values + 2), data2); -#line 2939 "DataCollection.c" -} - - -static void -data_collection_real_items_altered (DataCollection* self, - GeeMap* items) -{ -#line 130 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - g_return_if_fail (GEE_IS_MAP (items)); -#line 2949 "DataCollection.c" -} - - -static void -data_collection_real_ordering_changed (DataCollection* self) -{ -} - - -static void -data_collection_real_property_set (DataCollection* self, - const gchar* name, - GValue* old, - GValue* val) -{ -#line 140 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - g_return_if_fail (name != NULL); -#line 140 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - g_return_if_fail (val != NULL); -#line 2969 "DataCollection.c" -} - - -static void -g_cclosure_user_marshal_VOID__STRING_POINTER_BOXED (GClosure * closure, - GValue * return_value, - guint n_param_values, - const GValue * param_values, - gpointer invocation_hint, - gpointer marshal_data) -{ - typedef void (*GMarshalFunc_VOID__STRING_POINTER_BOXED) (gpointer data1, const char* arg_1, gpointer arg_2, gpointer arg_3, gpointer data2); - register GMarshalFunc_VOID__STRING_POINTER_BOXED callback; - register GCClosure * cc; - register gpointer data1; - register gpointer data2; - cc = (GCClosure *) closure; -#line 7 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - g_return_if_fail (n_param_values == 4); -#line 7 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - if (G_CCLOSURE_SWAP_DATA (closure)) { -#line 7 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - data1 = closure->data; -#line 7 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - data2 = param_values->data[0].v_pointer; -#line 2995 "DataCollection.c" - } else { -#line 7 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - data1 = param_values->data[0].v_pointer; -#line 7 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - data2 = closure->data; -#line 3001 "DataCollection.c" - } -#line 7 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - callback = (GMarshalFunc_VOID__STRING_POINTER_BOXED) (marshal_data ? marshal_data : cc->callback); -#line 7 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - callback (data1, g_value_get_string (param_values + 1), g_value_get_pointer (param_values + 2), g_value_get_boxed (param_values + 3), data2); -#line 3007 "DataCollection.c" -} - - -static void -data_collection_real_property_cleared (DataCollection* self, - const gchar* name) -{ -#line 144 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - g_return_if_fail (name != NULL); -#line 3017 "DataCollection.c" -} - - -static void -data_collection_real_frozen (DataCollection* self) -{ -} - - -static void -data_collection_real_thawed (DataCollection* self) -{ -} - - -static void -_data_collection_marker_impl_on_items_removed_data_collection_items_removed (DataCollection* _sender, - GeeIterable* removed, - gpointer self) -{ -#line 24 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - data_collection_marker_impl_on_items_removed ((DataCollectionMarkerImpl*) self, removed); -#line 3040 "DataCollection.c" -} - - -static gpointer -_data_collection_ref0 (gpointer self) -{ -#line 16 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - return self ? data_collection_ref (self) : NULL; -#line 3049 "DataCollection.c" -} - - -static DataCollectionMarkerImpl* -data_collection_marker_impl_construct (GType object_type, - DataCollection* owner) -{ - DataCollectionMarkerImpl * self = NULL; - DataCollection* _tmp0_; -#line 15 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - g_return_val_if_fail (IS_DATA_COLLECTION (owner), NULL); -#line 15 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - self = (DataCollectionMarkerImpl*) g_object_new (object_type, NULL); -#line 16 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - _tmp0_ = _data_collection_ref0 (owner); -#line 16 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - _data_collection_unref0 (self->owner); -#line 16 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - self->owner = _tmp0_; -#line 20 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - g_signal_connect_object (owner, "items-removed", (GCallback) _data_collection_marker_impl_on_items_removed_data_collection_items_removed, self, 0); -#line 15 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - return self; -#line 3073 "DataCollection.c" -} - - -static DataCollectionMarkerImpl* -data_collection_marker_impl_new (DataCollection* owner) -{ -#line 15 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - return data_collection_marker_impl_construct (DATA_COLLECTION_TYPE_MARKER_IMPL, owner); -#line 3082 "DataCollection.c" -} - - -static void -data_collection_marker_impl_real_mark (Marker* base, - DataObject* object) -{ - DataCollectionMarkerImpl * self; - DataCollection* _tmp0_; - GeeHashSet* _tmp1_; -#line 27 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - self = G_TYPE_CHECK_INSTANCE_CAST (base, DATA_COLLECTION_TYPE_MARKER_IMPL, DataCollectionMarkerImpl); -#line 27 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - g_return_if_fail (IS_DATA_OBJECT (object)); -#line 28 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - _tmp0_ = self->owner; -#line 28 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - _vala_assert (data_collection_internal_contains (_tmp0_, object), "owner.internal_contains(object)"); -#line 30 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - _tmp1_ = self->marked; -#line 30 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - gee_abstract_collection_add (G_TYPE_CHECK_INSTANCE_CAST (_tmp1_, GEE_TYPE_ABSTRACT_COLLECTION, GeeAbstractCollection), object); -#line 3105 "DataCollection.c" -} - - -static void -data_collection_marker_impl_real_unmark (Marker* base, - DataObject* object) -{ - DataCollectionMarkerImpl * self; - DataCollection* _tmp0_; - GeeHashSet* _tmp1_; -#line 33 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - self = G_TYPE_CHECK_INSTANCE_CAST (base, DATA_COLLECTION_TYPE_MARKER_IMPL, DataCollectionMarkerImpl); -#line 33 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - g_return_if_fail (IS_DATA_OBJECT (object)); -#line 34 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - _tmp0_ = self->owner; -#line 34 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - _vala_assert (data_collection_internal_contains (_tmp0_, object), "owner.internal_contains(object)"); -#line 36 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - _tmp1_ = self->marked; -#line 36 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - gee_abstract_collection_remove (G_TYPE_CHECK_INSTANCE_CAST (_tmp1_, GEE_TYPE_ABSTRACT_COLLECTION, GeeAbstractCollection), object); -#line 3128 "DataCollection.c" -} - - -static gboolean -data_collection_marker_impl_real_toggle (Marker* base, - DataObject* object) -{ - DataCollectionMarkerImpl * self; - gboolean result = FALSE; - DataCollection* _tmp0_; - GeeHashSet* _tmp1_; - GeeHashSet* _tmp4_; -#line 39 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - self = G_TYPE_CHECK_INSTANCE_CAST (base, DATA_COLLECTION_TYPE_MARKER_IMPL, DataCollectionMarkerImpl); -#line 39 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - g_return_val_if_fail (IS_DATA_OBJECT (object), FALSE); -#line 40 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - _tmp0_ = self->owner; -#line 40 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - _vala_assert (data_collection_internal_contains (_tmp0_, object), "owner.internal_contains(object)"); -#line 42 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - _tmp1_ = self->marked; -#line 42 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - if (gee_abstract_collection_contains (G_TYPE_CHECK_INSTANCE_CAST (_tmp1_, GEE_TYPE_ABSTRACT_COLLECTION, GeeAbstractCollection), object)) { -#line 3153 "DataCollection.c" - GeeHashSet* _tmp2_; -#line 43 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - _tmp2_ = self->marked; -#line 43 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - gee_abstract_collection_remove (G_TYPE_CHECK_INSTANCE_CAST (_tmp2_, GEE_TYPE_ABSTRACT_COLLECTION, GeeAbstractCollection), object); -#line 3159 "DataCollection.c" - } else { - GeeHashSet* _tmp3_; -#line 45 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - _tmp3_ = self->marked; -#line 45 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - gee_abstract_collection_add (G_TYPE_CHECK_INSTANCE_CAST (_tmp3_, GEE_TYPE_ABSTRACT_COLLECTION, GeeAbstractCollection), object); -#line 3166 "DataCollection.c" - } -#line 48 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - _tmp4_ = self->marked; -#line 48 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - result = gee_abstract_collection_contains (G_TYPE_CHECK_INSTANCE_CAST (_tmp4_, GEE_TYPE_ABSTRACT_COLLECTION, GeeAbstractCollection), object); -#line 48 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - return result; -#line 3174 "DataCollection.c" -} - - -static void -data_collection_marker_impl_real_mark_many (Marker* base, - GeeCollection* list) -{ - DataCollectionMarkerImpl * self; -#line 51 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - self = G_TYPE_CHECK_INSTANCE_CAST (base, DATA_COLLECTION_TYPE_MARKER_IMPL, DataCollectionMarkerImpl); -#line 51 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - g_return_if_fail (GEE_IS_COLLECTION (list)); -#line 3187 "DataCollection.c" - { - GeeIterator* _object_it = NULL; - GeeIterator* _tmp0_; -#line 52 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - _tmp0_ = gee_iterable_iterator (G_TYPE_CHECK_INSTANCE_CAST (list, GEE_TYPE_ITERABLE, GeeIterable)); -#line 52 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - _object_it = _tmp0_; -#line 52 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - while (TRUE) { -#line 3197 "DataCollection.c" - GeeIterator* _tmp1_; - DataObject* object = NULL; - GeeIterator* _tmp2_; - gpointer _tmp3_; - DataCollection* _tmp4_; - DataObject* _tmp5_; - GeeHashSet* _tmp6_; - DataObject* _tmp7_; -#line 52 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - _tmp1_ = _object_it; -#line 52 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - if (!gee_iterator_next (_tmp1_)) { -#line 52 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - break; -#line 3212 "DataCollection.c" - } -#line 52 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - _tmp2_ = _object_it; -#line 52 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - _tmp3_ = gee_iterator_get (_tmp2_); -#line 52 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - object = (DataObject*) _tmp3_; -#line 53 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - _tmp4_ = self->owner; -#line 53 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - _tmp5_ = object; -#line 53 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - _vala_assert (data_collection_internal_contains (_tmp4_, _tmp5_), "owner.internal_contains(object)"); -#line 55 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - _tmp6_ = self->marked; -#line 55 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - _tmp7_ = object; -#line 55 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - gee_abstract_collection_add (G_TYPE_CHECK_INSTANCE_CAST (_tmp6_, GEE_TYPE_ABSTRACT_COLLECTION, GeeAbstractCollection), _tmp7_); -#line 52 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - _g_object_unref0 (object); -#line 3234 "DataCollection.c" - } -#line 52 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - _g_object_unref0 (_object_it); -#line 3238 "DataCollection.c" - } -} - - -static void -data_collection_marker_impl_real_unmark_many (Marker* base, - GeeCollection* list) -{ - DataCollectionMarkerImpl * self; -#line 59 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - self = G_TYPE_CHECK_INSTANCE_CAST (base, DATA_COLLECTION_TYPE_MARKER_IMPL, DataCollectionMarkerImpl); -#line 59 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - g_return_if_fail (GEE_IS_COLLECTION (list)); -#line 3252 "DataCollection.c" - { - GeeIterator* _object_it = NULL; - GeeIterator* _tmp0_; -#line 60 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - _tmp0_ = gee_iterable_iterator (G_TYPE_CHECK_INSTANCE_CAST (list, GEE_TYPE_ITERABLE, GeeIterable)); -#line 60 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - _object_it = _tmp0_; -#line 60 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - while (TRUE) { -#line 3262 "DataCollection.c" - GeeIterator* _tmp1_; - DataObject* object = NULL; - GeeIterator* _tmp2_; - gpointer _tmp3_; - DataCollection* _tmp4_; - DataObject* _tmp5_; - GeeHashSet* _tmp6_; - DataObject* _tmp7_; -#line 60 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - _tmp1_ = _object_it; -#line 60 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - if (!gee_iterator_next (_tmp1_)) { -#line 60 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - break; -#line 3277 "DataCollection.c" - } -#line 60 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - _tmp2_ = _object_it; -#line 60 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - _tmp3_ = gee_iterator_get (_tmp2_); -#line 60 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - object = (DataObject*) _tmp3_; -#line 61 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - _tmp4_ = self->owner; -#line 61 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - _tmp5_ = object; -#line 61 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - _vala_assert (data_collection_internal_contains (_tmp4_, _tmp5_), "owner.internal_contains(object)"); -#line 63 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - _tmp6_ = self->marked; -#line 63 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - _tmp7_ = object; -#line 63 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - gee_abstract_collection_remove (G_TYPE_CHECK_INSTANCE_CAST (_tmp6_, GEE_TYPE_ABSTRACT_COLLECTION, GeeAbstractCollection), _tmp7_); -#line 60 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - _g_object_unref0 (object); -#line 3299 "DataCollection.c" - } -#line 60 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - _g_object_unref0 (_object_it); -#line 3303 "DataCollection.c" - } -} - - -static void -data_collection_marker_impl_real_mark_all (Marker* base) -{ - DataCollectionMarkerImpl * self; -#line 67 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - self = G_TYPE_CHECK_INSTANCE_CAST (base, DATA_COLLECTION_TYPE_MARKER_IMPL, DataCollectionMarkerImpl); -#line 3314 "DataCollection.c" - { - GeeIterator* _object_it = NULL; - DataCollection* _tmp0_; - GeeCollection* _tmp1_; - GeeCollection* _tmp2_; - GeeIterator* _tmp3_; - GeeIterator* _tmp4_; -#line 68 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - _tmp0_ = self->owner; -#line 68 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - _tmp1_ = data_collection_get_all (_tmp0_); -#line 68 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - _tmp2_ = _tmp1_; -#line 68 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - _tmp3_ = gee_iterable_iterator (G_TYPE_CHECK_INSTANCE_CAST (_tmp2_, GEE_TYPE_ITERABLE, GeeIterable)); -#line 68 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - _tmp4_ = _tmp3_; -#line 68 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - _g_object_unref0 (_tmp2_); -#line 68 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - _object_it = _tmp4_; -#line 68 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - while (TRUE) { -#line 3338 "DataCollection.c" - GeeIterator* _tmp5_; - DataObject* object = NULL; - GeeIterator* _tmp6_; - gpointer _tmp7_; - GeeHashSet* _tmp8_; - DataObject* _tmp9_; -#line 68 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - _tmp5_ = _object_it; -#line 68 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - if (!gee_iterator_next (_tmp5_)) { -#line 68 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - break; -#line 3351 "DataCollection.c" - } -#line 68 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - _tmp6_ = _object_it; -#line 68 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - _tmp7_ = gee_iterator_get (_tmp6_); -#line 68 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - object = (DataObject*) _tmp7_; -#line 69 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - _tmp8_ = self->marked; -#line 69 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - _tmp9_ = object; -#line 69 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - gee_abstract_collection_add (G_TYPE_CHECK_INSTANCE_CAST (_tmp8_, GEE_TYPE_ABSTRACT_COLLECTION, GeeAbstractCollection), _tmp9_); -#line 68 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - _g_object_unref0 (object); -#line 3367 "DataCollection.c" - } -#line 68 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - _g_object_unref0 (_object_it); -#line 3371 "DataCollection.c" - } -} - - -static gint -data_collection_marker_impl_real_get_count (Marker* base) -{ - DataCollectionMarkerImpl * self; - gint result = 0; - gint _tmp0_ = 0; - GeeHashSet* _tmp1_; -#line 72 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - self = G_TYPE_CHECK_INSTANCE_CAST (base, DATA_COLLECTION_TYPE_MARKER_IMPL, DataCollectionMarkerImpl); -#line 73 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - _tmp1_ = self->marked; -#line 73 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - if (_tmp1_ != NULL) { -#line 3389 "DataCollection.c" - GeeHashSet* _tmp2_; - gint _tmp3_; - gint _tmp4_; -#line 73 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - _tmp2_ = self->marked; -#line 73 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - _tmp3_ = gee_abstract_collection_get_size (G_TYPE_CHECK_INSTANCE_CAST (_tmp2_, GEE_TYPE_ABSTRACT_COLLECTION, GeeAbstractCollection)); -#line 73 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - _tmp4_ = _tmp3_; -#line 73 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - _tmp0_ = _tmp4_; -#line 3401 "DataCollection.c" - } else { - gint _tmp5_; -#line 73 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - _tmp5_ = self->freeze_count; -#line 73 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - _tmp0_ = _tmp5_; -#line 3408 "DataCollection.c" - } -#line 73 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - result = _tmp0_; -#line 73 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - return result; -#line 3414 "DataCollection.c" -} - - -static GeeCollection* -data_collection_marker_impl_real_get_all (Marker* base) -{ - DataCollectionMarkerImpl * self; - GeeCollection* result = NULL; - GeeArrayList* copy = NULL; - GeeArrayList* _tmp0_; - GeeHashSet* _tmp1_; -#line 76 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - self = G_TYPE_CHECK_INSTANCE_CAST (base, DATA_COLLECTION_TYPE_MARKER_IMPL, DataCollectionMarkerImpl); -#line 77 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - _tmp0_ = gee_array_list_new (TYPE_DATA_OBJECT, (GBoxedCopyFunc) g_object_ref, (GDestroyNotify) g_object_unref, NULL, NULL, NULL); -#line 77 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - copy = _tmp0_; -#line 78 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - _tmp1_ = self->marked; -#line 78 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - gee_array_list_add_all (copy, G_TYPE_CHECK_INSTANCE_CAST (_tmp1_, GEE_TYPE_COLLECTION, GeeCollection)); -#line 80 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - result = G_TYPE_CHECK_INSTANCE_CAST (copy, GEE_TYPE_COLLECTION, GeeCollection); -#line 80 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - return result; -#line 3440 "DataCollection.c" -} - - -static void -data_collection_marker_impl_on_items_removed (DataCollectionMarkerImpl* self, - GeeIterable* removed) -{ -#line 83 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - g_return_if_fail (DATA_COLLECTION_IS_MARKER_IMPL (self)); -#line 83 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - g_return_if_fail (GEE_IS_ITERABLE (removed)); -#line 3452 "DataCollection.c" - { - GeeIterator* _object_it = NULL; - GeeIterator* _tmp0_; -#line 84 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - _tmp0_ = gee_iterable_iterator (removed); -#line 84 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - _object_it = _tmp0_; -#line 84 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - while (TRUE) { -#line 3462 "DataCollection.c" - GeeIterator* _tmp1_; - DataObject* object = NULL; - GeeIterator* _tmp2_; - gpointer _tmp3_; - GeeHashSet* _tmp4_; - DataObject* _tmp5_; -#line 84 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - _tmp1_ = _object_it; -#line 84 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - if (!gee_iterator_next (_tmp1_)) { -#line 84 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - break; -#line 3475 "DataCollection.c" - } -#line 84 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - _tmp2_ = _object_it; -#line 84 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - _tmp3_ = gee_iterator_get (_tmp2_); -#line 84 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - object = (DataObject*) _tmp3_; -#line 85 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - _tmp4_ = self->marked; -#line 85 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - _tmp5_ = object; -#line 85 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - gee_abstract_collection_remove (G_TYPE_CHECK_INSTANCE_CAST (_tmp4_, GEE_TYPE_ABSTRACT_COLLECTION, GeeAbstractCollection), _tmp5_); -#line 84 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - _g_object_unref0 (object); -#line 3491 "DataCollection.c" - } -#line 84 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - _g_object_unref0 (_object_it); -#line 3495 "DataCollection.c" - } -} - - -static void -data_collection_marker_impl_freeze (DataCollectionMarkerImpl* self) -{ - DataCollection* _tmp0_; - guint _tmp1_; -#line 91 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - g_return_if_fail (DATA_COLLECTION_IS_MARKER_IMPL (self)); -#line 92 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - _tmp0_ = self->owner; -#line 92 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - g_signal_parse_name ("items-removed", TYPE_DATA_COLLECTION, &_tmp1_, NULL, FALSE); -#line 92 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - g_signal_handlers_disconnect_matched (_tmp0_, G_SIGNAL_MATCH_ID | G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA, _tmp1_, 0, NULL, (GCallback) _data_collection_marker_impl_on_items_removed_data_collection_items_removed, self); -#line 3513 "DataCollection.c" -} - - -static void -data_collection_marker_impl_finished (DataCollectionMarkerImpl* self) -{ - GeeHashSet* _tmp0_; -#line 95 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - g_return_if_fail (DATA_COLLECTION_IS_MARKER_IMPL (self)); -#line 96 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - _tmp0_ = self->marked; -#line 96 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - if (_tmp0_ != NULL) { -#line 3527 "DataCollection.c" - GeeHashSet* _tmp1_; - gint _tmp2_; - gint _tmp3_; -#line 97 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - _tmp1_ = self->marked; -#line 97 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - _tmp2_ = gee_abstract_collection_get_size (G_TYPE_CHECK_INSTANCE_CAST (_tmp1_, GEE_TYPE_ABSTRACT_COLLECTION, GeeAbstractCollection)); -#line 97 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - _tmp3_ = _tmp2_; -#line 97 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - self->freeze_count = _tmp3_; -#line 3539 "DataCollection.c" - } -#line 99 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - _g_object_unref0 (self->marked); -#line 99 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - self->marked = NULL; -#line 3545 "DataCollection.c" -} - - -static gboolean -data_collection_marker_impl_is_valid (DataCollectionMarkerImpl* self, - DataCollection* collection) -{ - gboolean result = FALSE; - gboolean _tmp0_ = FALSE; - DataCollection* _tmp1_; -#line 102 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - g_return_val_if_fail (DATA_COLLECTION_IS_MARKER_IMPL (self), FALSE); -#line 102 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - g_return_val_if_fail (IS_DATA_COLLECTION (collection), FALSE); -#line 103 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - _tmp1_ = self->owner; -#line 103 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - if (collection == _tmp1_) { -#line 3564 "DataCollection.c" - GeeHashSet* _tmp2_; -#line 103 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - _tmp2_ = self->marked; -#line 103 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - _tmp0_ = _tmp2_ != NULL; -#line 3570 "DataCollection.c" - } else { -#line 103 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - _tmp0_ = FALSE; -#line 3574 "DataCollection.c" - } -#line 103 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - result = _tmp0_; -#line 103 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - return result; -#line 3580 "DataCollection.c" -} - - -static void -data_collection_marker_impl_class_init (DataCollectionMarkerImplClass * klass) -{ -#line 10 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - data_collection_marker_impl_parent_class = g_type_class_peek_parent (klass); -#line 10 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - G_OBJECT_CLASS (klass)->finalize = data_collection_marker_impl_finalize; -#line 3591 "DataCollection.c" -} - - -static void -data_collection_marker_impl_marker_interface_init (MarkerIface * iface) -{ -#line 10 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - data_collection_marker_impl_marker_parent_iface = g_type_interface_peek_parent (iface); -#line 10 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - iface->mark = (void (*) (Marker *, DataObject*)) data_collection_marker_impl_real_mark; -#line 10 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - iface->unmark = (void (*) (Marker *, DataObject*)) data_collection_marker_impl_real_unmark; -#line 10 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - iface->toggle = (gboolean (*) (Marker *, DataObject*)) data_collection_marker_impl_real_toggle; -#line 10 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - iface->mark_many = (void (*) (Marker *, GeeCollection*)) data_collection_marker_impl_real_mark_many; -#line 10 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - iface->unmark_many = (void (*) (Marker *, GeeCollection*)) data_collection_marker_impl_real_unmark_many; -#line 10 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - iface->mark_all = (void (*) (Marker *)) data_collection_marker_impl_real_mark_all; -#line 10 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - iface->get_count = (gint (*) (Marker *)) data_collection_marker_impl_real_get_count; -#line 10 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - iface->get_all = (GeeCollection* (*) (Marker *)) data_collection_marker_impl_real_get_all; -#line 3616 "DataCollection.c" -} - - -static void -data_collection_marker_impl_instance_init (DataCollectionMarkerImpl * self) -{ - GeeHashSet* _tmp0_; -#line 12 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - _tmp0_ = gee_hash_set_new (TYPE_DATA_OBJECT, (GBoxedCopyFunc) g_object_ref, (GDestroyNotify) g_object_unref, NULL, NULL, NULL, NULL, NULL, NULL); -#line 12 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - self->marked = _tmp0_; -#line 13 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - self->freeze_count = 0; -#line 3630 "DataCollection.c" -} - - -static void -data_collection_marker_impl_finalize (GObject * obj) -{ - DataCollectionMarkerImpl * self; - DataCollection* _tmp0_; - guint _tmp1_; -#line 10 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - self = G_TYPE_CHECK_INSTANCE_CAST (obj, DATA_COLLECTION_TYPE_MARKER_IMPL, DataCollectionMarkerImpl); -#line 24 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - _tmp0_ = self->owner; -#line 24 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - g_signal_parse_name ("items-removed", TYPE_DATA_COLLECTION, &_tmp1_, NULL, FALSE); -#line 24 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - g_signal_handlers_disconnect_matched (_tmp0_, G_SIGNAL_MATCH_ID | G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA, _tmp1_, 0, NULL, (GCallback) _data_collection_marker_impl_on_items_removed_data_collection_items_removed, self); -#line 11 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - _data_collection_unref0 (self->owner); -#line 12 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - _g_object_unref0 (self->marked); -#line 10 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - G_OBJECT_CLASS (data_collection_marker_impl_parent_class)->finalize (obj); -#line 3654 "DataCollection.c" -} - - -static GType -data_collection_marker_impl_get_type (void) -{ - static volatile gsize data_collection_marker_impl_type_id__volatile = 0; - if (g_once_init_enter (&data_collection_marker_impl_type_id__volatile)) { - static const GTypeInfo g_define_type_info = { sizeof (DataCollectionMarkerImplClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) data_collection_marker_impl_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (DataCollectionMarkerImpl), 0, (GInstanceInitFunc) data_collection_marker_impl_instance_init, NULL }; - static const GInterfaceInfo marker_info = { (GInterfaceInitFunc) data_collection_marker_impl_marker_interface_init, (GInterfaceFinalizeFunc) NULL, NULL}; - GType data_collection_marker_impl_type_id; - data_collection_marker_impl_type_id = g_type_register_static (G_TYPE_OBJECT, "DataCollectionMarkerImpl", &g_define_type_info, 0); - g_type_add_interface_static (data_collection_marker_impl_type_id, TYPE_MARKER, &marker_info); - g_once_init_leave (&data_collection_marker_impl_type_id__volatile, data_collection_marker_impl_type_id); - } - return data_collection_marker_impl_type_id__volatile; -} - - -static void -value_data_collection_init (GValue* value) -{ -#line 7 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - value->data[0].v_pointer = NULL; -#line 3679 "DataCollection.c" -} - - -static void -value_data_collection_free_value (GValue* value) -{ -#line 7 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - if (value->data[0].v_pointer) { -#line 7 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - data_collection_unref (value->data[0].v_pointer); -#line 3690 "DataCollection.c" - } -} - - -static void -value_data_collection_copy_value (const GValue* src_value, - GValue* dest_value) -{ -#line 7 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - if (src_value->data[0].v_pointer) { -#line 7 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - dest_value->data[0].v_pointer = data_collection_ref (src_value->data[0].v_pointer); -#line 3703 "DataCollection.c" - } else { -#line 7 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - dest_value->data[0].v_pointer = NULL; -#line 3707 "DataCollection.c" - } -} - - -static gpointer -value_data_collection_peek_pointer (const GValue* value) -{ -#line 7 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - return value->data[0].v_pointer; -#line 3717 "DataCollection.c" -} - - -static gchar* -value_data_collection_collect_value (GValue* value, - guint n_collect_values, - GTypeCValue* collect_values, - guint collect_flags) -{ -#line 7 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - if (collect_values[0].v_pointer) { -#line 3729 "DataCollection.c" - DataCollection * object; - object = collect_values[0].v_pointer; -#line 7 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - if (object->parent_instance.g_class == NULL) { -#line 7 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - return g_strconcat ("invalid unclassed object pointer for value type `", G_VALUE_TYPE_NAME (value), "'", NULL); -#line 3736 "DataCollection.c" - } else if (!g_value_type_compatible (G_TYPE_FROM_INSTANCE (object), G_VALUE_TYPE (value))) { -#line 7 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - return g_strconcat ("invalid object type `", g_type_name (G_TYPE_FROM_INSTANCE (object)), "' for value type `", G_VALUE_TYPE_NAME (value), "'", NULL); -#line 3740 "DataCollection.c" - } -#line 7 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - value->data[0].v_pointer = data_collection_ref (object); -#line 3744 "DataCollection.c" - } else { -#line 7 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - value->data[0].v_pointer = NULL; -#line 3748 "DataCollection.c" - } -#line 7 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - return NULL; -#line 3752 "DataCollection.c" -} - - -static gchar* -value_data_collection_lcopy_value (const GValue* value, - guint n_collect_values, - GTypeCValue* collect_values, - guint collect_flags) -{ - DataCollection ** object_p; - object_p = collect_values[0].v_pointer; -#line 7 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - if (!object_p) { -#line 7 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - return g_strdup_printf ("value location for `%s' passed as NULL", G_VALUE_TYPE_NAME (value)); -#line 3768 "DataCollection.c" - } -#line 7 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - if (!value->data[0].v_pointer) { -#line 7 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - *object_p = NULL; -#line 3774 "DataCollection.c" - } else if (collect_flags & G_VALUE_NOCOPY_CONTENTS) { -#line 7 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - *object_p = value->data[0].v_pointer; -#line 3778 "DataCollection.c" - } else { -#line 7 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - *object_p = data_collection_ref (value->data[0].v_pointer); -#line 3782 "DataCollection.c" - } -#line 7 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - return NULL; -#line 3786 "DataCollection.c" -} - - -GParamSpec* -param_spec_data_collection (const gchar* name, - const gchar* nick, - const gchar* blurb, - GType object_type, - GParamFlags flags) -{ - ParamSpecDataCollection* spec; -#line 7 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - g_return_val_if_fail (g_type_is_a (object_type, TYPE_DATA_COLLECTION), NULL); -#line 7 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - spec = g_param_spec_internal (G_TYPE_PARAM_OBJECT, name, nick, blurb, flags); -#line 7 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - G_PARAM_SPEC (spec)->value_type = object_type; -#line 7 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - return G_PARAM_SPEC (spec); -#line 3806 "DataCollection.c" -} - - -gpointer -value_get_data_collection (const GValue* value) -{ -#line 7 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - g_return_val_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, TYPE_DATA_COLLECTION), NULL); -#line 7 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - return value->data[0].v_pointer; -#line 3817 "DataCollection.c" -} - - -void -value_set_data_collection (GValue* value, - gpointer v_object) -{ - DataCollection * old; -#line 7 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - g_return_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, TYPE_DATA_COLLECTION)); -#line 7 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - old = value->data[0].v_pointer; -#line 7 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - if (v_object) { -#line 7 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - g_return_if_fail (G_TYPE_CHECK_INSTANCE_TYPE (v_object, TYPE_DATA_COLLECTION)); -#line 7 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - g_return_if_fail (g_value_type_compatible (G_TYPE_FROM_INSTANCE (v_object), G_VALUE_TYPE (value))); -#line 7 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - value->data[0].v_pointer = v_object; -#line 7 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - data_collection_ref (value->data[0].v_pointer); -#line 3840 "DataCollection.c" - } else { -#line 7 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - value->data[0].v_pointer = NULL; -#line 3844 "DataCollection.c" - } -#line 7 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - if (old) { -#line 7 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - data_collection_unref (old); -#line 3850 "DataCollection.c" - } -} - - -void -value_take_data_collection (GValue* value, - gpointer v_object) -{ - DataCollection * old; -#line 7 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - g_return_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, TYPE_DATA_COLLECTION)); -#line 7 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - old = value->data[0].v_pointer; -#line 7 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - if (v_object) { -#line 7 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - g_return_if_fail (G_TYPE_CHECK_INSTANCE_TYPE (v_object, TYPE_DATA_COLLECTION)); -#line 7 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - g_return_if_fail (g_value_type_compatible (G_TYPE_FROM_INSTANCE (v_object), G_VALUE_TYPE (value))); -#line 7 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - value->data[0].v_pointer = v_object; -#line 3872 "DataCollection.c" - } else { -#line 7 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - value->data[0].v_pointer = NULL; -#line 3876 "DataCollection.c" - } -#line 7 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - if (old) { -#line 7 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - data_collection_unref (old); -#line 3882 "DataCollection.c" - } -} - - -static void -data_collection_class_init (DataCollectionClass * klass) -{ -#line 7 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - data_collection_parent_class = g_type_class_peek_parent (klass); -#line 7 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - ((DataCollectionClass *) klass)->finalize = data_collection_finalize; -#line 7 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - g_type_class_add_private (klass, sizeof (DataCollectionPrivate)); -#line 7 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - ((DataCollectionClass *) klass)->to_string = (gchar* (*) (DataCollection *)) data_collection_real_to_string; -#line 7 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - ((DataCollectionClass *) klass)->notify_items_added = (void (*) (DataCollection *, GeeIterable*)) data_collection_real_notify_items_added; -#line 7 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - ((DataCollectionClass *) klass)->notify_items_removed = (void (*) (DataCollection *, GeeIterable*)) data_collection_real_notify_items_removed; -#line 7 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - ((DataCollectionClass *) klass)->notify_contents_altered = (void (*) (DataCollection *, GeeIterable*, GeeIterable*)) data_collection_real_notify_contents_altered; -#line 7 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - ((DataCollectionClass *) klass)->notify_items_altered = (void (*) (DataCollection *, GeeMap*)) data_collection_real_notify_items_altered; -#line 7 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - ((DataCollectionClass *) klass)->notify_ordering_changed = (void (*) (DataCollection *)) data_collection_real_notify_ordering_changed; -#line 7 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - ((DataCollectionClass *) klass)->notify_property_set = (void (*) (DataCollection *, const gchar*, GValue*, GValue*)) data_collection_real_notify_property_set; -#line 7 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - ((DataCollectionClass *) klass)->notify_property_cleared = (void (*) (DataCollection *, const gchar*)) data_collection_real_notify_property_cleared; -#line 7 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - ((DataCollectionClass *) klass)->valid_type = (gboolean (*) (DataCollection *, DataObject*)) data_collection_real_valid_type; -#line 7 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - ((DataCollectionClass *) klass)->set_comparator = (void (*) (DataCollection *, Comparator, void*, ComparatorPredicate, void*)) data_collection_real_set_comparator; -#line 7 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - ((DataCollectionClass *) klass)->reset_comparator = (void (*) (DataCollection *)) data_collection_real_reset_comparator; -#line 7 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - ((DataCollectionClass *) klass)->get_all = (GeeCollection* (*) (DataCollection *)) data_collection_real_get_all; -#line 7 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - ((DataCollectionClass *) klass)->get_count = (gint (*) (DataCollection *)) data_collection_real_get_count; -#line 7 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - ((DataCollectionClass *) klass)->get_at = (DataObject* (*) (DataCollection *, gint)) data_collection_real_get_at; -#line 7 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - ((DataCollectionClass *) klass)->index_of = (gint (*) (DataCollection *, DataObject*)) data_collection_real_index_of; -#line 7 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - ((DataCollectionClass *) klass)->contains = (gboolean (*) (DataCollection *, DataObject*)) data_collection_real_contains; -#line 7 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - ((DataCollectionClass *) klass)->add = (gboolean (*) (DataCollection *, DataObject*)) data_collection_real_add; -#line 7 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - ((DataCollectionClass *) klass)->add_many = (GeeCollection* (*) (DataCollection *, GeeCollection*, ProgressMonitor, void*)) data_collection_real_add_many; -#line 7 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - ((DataCollectionClass *) klass)->remove_marked = (void (*) (DataCollection *, Marker*)) data_collection_real_remove_marked; -#line 7 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - ((DataCollectionClass *) klass)->clear = (void (*) (DataCollection *)) data_collection_real_clear; -#line 7 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - ((DataCollectionClass *) klass)->close = (void (*) (DataCollection *)) data_collection_real_close; -#line 7 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - ((DataCollectionClass *) klass)->notify_frozen = (void (*) (DataCollection *)) data_collection_real_notify_frozen; -#line 7 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - ((DataCollectionClass *) klass)->notify_thawed = (void (*) (DataCollection *)) data_collection_real_notify_thawed; -#line 7 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - ((DataCollectionClass *) klass)->items_added = data_collection_real_items_added; -#line 7 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - ((DataCollectionClass *) klass)->items_removed = data_collection_real_items_removed; -#line 7 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - ((DataCollectionClass *) klass)->contents_altered = data_collection_real_contents_altered; -#line 7 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - ((DataCollectionClass *) klass)->items_altered = data_collection_real_items_altered; -#line 7 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - ((DataCollectionClass *) klass)->ordering_changed = data_collection_real_ordering_changed; -#line 7 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - ((DataCollectionClass *) klass)->property_set = data_collection_real_property_set; -#line 7 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - ((DataCollectionClass *) klass)->property_cleared = data_collection_real_property_cleared; -#line 7 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - ((DataCollectionClass *) klass)->frozen = data_collection_real_frozen; -#line 7 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - ((DataCollectionClass *) klass)->thawed = data_collection_real_thawed; -#line 7 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - data_collection_signals[DATA_COLLECTION_ITEMS_ADDED_SIGNAL] = g_signal_new ("items-added", TYPE_DATA_COLLECTION, G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET (DataCollectionClass, items_added), NULL, NULL, g_cclosure_marshal_VOID__OBJECT, G_TYPE_NONE, 1, GEE_TYPE_ITERABLE); -#line 7 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - data_collection_signals[DATA_COLLECTION_ITEMS_REMOVED_SIGNAL] = g_signal_new ("items-removed", TYPE_DATA_COLLECTION, G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET (DataCollectionClass, items_removed), NULL, NULL, g_cclosure_marshal_VOID__OBJECT, G_TYPE_NONE, 1, GEE_TYPE_ITERABLE); -#line 7 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - data_collection_signals[DATA_COLLECTION_CONTENTS_ALTERED_SIGNAL] = g_signal_new ("contents-altered", TYPE_DATA_COLLECTION, G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET (DataCollectionClass, contents_altered), NULL, NULL, g_cclosure_user_marshal_VOID__OBJECT_OBJECT, G_TYPE_NONE, 2, GEE_TYPE_ITERABLE, GEE_TYPE_ITERABLE); -#line 7 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - data_collection_signals[DATA_COLLECTION_ITEMS_ALTERED_SIGNAL] = g_signal_new ("items-altered", TYPE_DATA_COLLECTION, G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET (DataCollectionClass, items_altered), NULL, NULL, g_cclosure_marshal_VOID__OBJECT, G_TYPE_NONE, 1, GEE_TYPE_MAP); -#line 7 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - data_collection_signals[DATA_COLLECTION_ORDERING_CHANGED_SIGNAL] = g_signal_new ("ordering-changed", TYPE_DATA_COLLECTION, G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET (DataCollectionClass, ordering_changed), NULL, NULL, g_cclosure_marshal_VOID__VOID, G_TYPE_NONE, 0); -#line 7 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - data_collection_signals[DATA_COLLECTION_PROPERTY_SET_SIGNAL] = g_signal_new ("property-set", TYPE_DATA_COLLECTION, G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET (DataCollectionClass, property_set), NULL, NULL, g_cclosure_user_marshal_VOID__STRING_POINTER_BOXED, G_TYPE_NONE, 3, G_TYPE_STRING, G_TYPE_POINTER, G_TYPE_VALUE); -#line 7 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - data_collection_signals[DATA_COLLECTION_PROPERTY_CLEARED_SIGNAL] = g_signal_new ("property-cleared", TYPE_DATA_COLLECTION, G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET (DataCollectionClass, property_cleared), NULL, NULL, g_cclosure_marshal_VOID__STRING, G_TYPE_NONE, 1, G_TYPE_STRING); -#line 7 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - data_collection_signals[DATA_COLLECTION_FROZEN_SIGNAL] = g_signal_new ("frozen", TYPE_DATA_COLLECTION, G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET (DataCollectionClass, frozen), NULL, NULL, g_cclosure_marshal_VOID__VOID, G_TYPE_NONE, 0); -#line 7 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - data_collection_signals[DATA_COLLECTION_THAWED_SIGNAL] = g_signal_new ("thawed", TYPE_DATA_COLLECTION, G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET (DataCollectionClass, thawed), NULL, NULL, g_cclosure_marshal_VOID__VOID, G_TYPE_NONE, 0); -#line 3978 "DataCollection.c" -} - - -static void -data_collection_instance_init (DataCollection * self) -{ - DataSet* _tmp0_; - GeeHashMap* _tmp1_; -#line 7 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - self->priv = DATA_COLLECTION_GET_PRIVATE (self); -#line 108 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - _tmp0_ = data_set_new (); -#line 108 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - self->priv->dataset = _tmp0_; -#line 109 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - _tmp1_ = gee_hash_map_new (G_TYPE_STRING, (GBoxedCopyFunc) g_strdup, (GDestroyNotify) g_free, G_TYPE_VALUE, (GBoxedCopyFunc) _g_value_dup, (GDestroyNotify) _vala_GValue_free, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL); -#line 109 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - self->priv->properties = _tmp1_; -#line 110 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - self->priv->object_ordinal_generator = (gint64) 0; -#line 111 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - self->priv->notifies_frozen = 0; -#line 112 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - self->priv->frozen_items_altered = NULL; -#line 113 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - self->priv->fire_ordering_changed = FALSE; -#line 7 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - self->ref_count = 1; -#line 4007 "DataCollection.c" -} - - -static void -data_collection_finalize (DataCollection * obj) -{ - DataCollection * self; -#line 7 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - self = G_TYPE_CHECK_INSTANCE_CAST (obj, TYPE_DATA_COLLECTION, DataCollection); -#line 7 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - g_signal_handlers_destroy (self); -#line 107 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - _g_free0 (self->priv->name); -#line 108 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - _data_set_unref0 (self->priv->dataset); -#line 109 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - _g_object_unref0 (self->priv->properties); -#line 112 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - _g_object_unref0 (self->priv->frozen_items_altered); -#line 4027 "DataCollection.c" -} - - -GType -data_collection_get_type (void) -{ - static volatile gsize data_collection_type_id__volatile = 0; - if (g_once_init_enter (&data_collection_type_id__volatile)) { - static const GTypeValueTable g_define_type_value_table = { value_data_collection_init, value_data_collection_free_value, value_data_collection_copy_value, value_data_collection_peek_pointer, "p", value_data_collection_collect_value, "p", value_data_collection_lcopy_value }; - static const GTypeInfo g_define_type_info = { sizeof (DataCollectionClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) data_collection_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (DataCollection), 0, (GInstanceInitFunc) data_collection_instance_init, &g_define_type_value_table }; - static const GTypeFundamentalInfo g_define_type_fundamental_info = { (G_TYPE_FLAG_CLASSED | G_TYPE_FLAG_INSTANTIATABLE | G_TYPE_FLAG_DERIVABLE | G_TYPE_FLAG_DEEP_DERIVABLE) }; - GType data_collection_type_id; - data_collection_type_id = g_type_register_fundamental (g_type_fundamental_next (), "DataCollection", &g_define_type_info, &g_define_type_fundamental_info, 0); - g_once_init_leave (&data_collection_type_id__volatile, data_collection_type_id); - } - return data_collection_type_id__volatile; -} - - -gpointer -data_collection_ref (gpointer instance) -{ - DataCollection * self; - self = instance; -#line 7 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - g_atomic_int_inc (&self->ref_count); -#line 7 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - return instance; -#line 4056 "DataCollection.c" -} - - -void -data_collection_unref (gpointer instance) -{ - DataCollection * self; - self = instance; -#line 7 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - if (g_atomic_int_dec_and_test (&self->ref_count)) { -#line 7 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - DATA_COLLECTION_GET_CLASS (self)->finalize (self); -#line 7 "/home/jens/Source/shotwell/src/core/DataCollection.vala" - g_type_free_instance ((GTypeInstance *) self); -#line 4071 "DataCollection.c" - } -} - - - diff --git a/src/core/DataObject.c b/src/core/DataObject.c deleted file mode 100644 index 1f966d2..0000000 --- a/src/core/DataObject.c +++ /dev/null @@ -1,733 +0,0 @@ -/* DataObject.c generated by valac 0.40.4, the Vala compiler - * generated from DataObject.vala, do not modify */ - -/* Copyright 2016 Software Freedom Conservancy Inc. - * - * This software is licensed under the GNU LGPL (version 2.1 or later). - * See the COPYING file in this distribution. - */ -/**/ -/* DataObject*/ -/**/ -/* Object IDs are incremented for each DataObject, and therefore may be used to compare*/ -/* creation order. This behavior may be relied upon elsewhere. Object IDs may be recycled when*/ -/* DataObjects are reconstituted by a proxy.*/ -/**/ -/* Ordinal IDs are supplied by DataCollections to record the ordering of the object being added*/ -/* to the collection. This value is primarily only used by DataCollection, but may be used*/ -/* elsewhere to resolve ordering questions (including stabilizing a sort).*/ -/**/ -/* Have to inherit from Object due to ContainerSource and this bug:*/ -/* https://bugzilla.gnome.org/show_bug.cgi?id=615904*/ - - -#include <glib.h> -#include <glib-object.h> -#include <stdlib.h> -#include <string.h> - - -#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; -typedef struct _DataObjectPrivate DataObjectPrivate; - -#define TYPE_ALTERATION (alteration_get_type ()) -#define ALTERATION(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_ALTERATION, Alteration)) -#define ALTERATION_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_ALTERATION, AlterationClass)) -#define IS_ALTERATION(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_ALTERATION)) -#define IS_ALTERATION_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_ALTERATION)) -#define ALTERATION_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_ALTERATION, AlterationClass)) - -typedef struct _Alteration Alteration; -typedef struct _AlterationClass AlterationClass; - -#define TYPE_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; -enum { - DATA_OBJECT_0_PROPERTY, - DATA_OBJECT_NUM_PROPERTIES -}; -static GParamSpec* data_object_properties[DATA_OBJECT_NUM_PROPERTIES]; -#define _data_collection_unref0(var) ((var == NULL) ? NULL : (var = (data_collection_unref (var), NULL))) -#define __vala_GValue_free0(var) ((var == NULL) ? NULL : (var = (_vala_GValue_free (var), NULL))) -#define _vala_assert(expr, msg) if G_LIKELY (expr) ; else g_assertion_message_expr (G_LOG_DOMAIN, __FILE__, __LINE__, G_STRFUNC, msg); -#define _vala_return_if_fail(expr, msg) if G_LIKELY (expr) ; else { g_return_if_fail_warning (G_LOG_DOMAIN, G_STRFUNC, msg); return; } -#define _vala_return_val_if_fail(expr, msg, val) if G_LIKELY (expr) ; else { g_return_if_fail_warning (G_LOG_DOMAIN, G_STRFUNC, msg); return val; } -#define _vala_warn_if_fail(expr, msg) if G_LIKELY (expr) ; else g_warn_message (G_LOG_DOMAIN, __FILE__, __LINE__, G_STRFUNC, msg); - -struct _DataObject { - GObject parent_instance; - DataObjectPrivate * priv; -}; - -struct _DataObjectClass { - GObjectClass parent_class; - void (*notify_altered) (DataObject* self, Alteration* alteration); - void (*notify_membership_changed) (DataObject* self, DataCollection* collection); - void (*notify_collection_property_set) (DataObject* self, const gchar* name, GValue* old, GValue* val); - void (*notify_collection_property_cleared) (DataObject* self, const gchar* name); - gchar* (*get_name) (DataObject* self); - gchar* (*to_string) (DataObject* self); -}; - -struct _DataObjectPrivate { - gint64 object_id; - DataCollection* member_of; - gint64 ordinal; -}; - -typedef gboolean (*ValueEqualFunc) (GValue* a, GValue* b, void* user_data); - -static gpointer data_object_parent_class = NULL; -static gint64 data_object_object_id_generator; -static gint64 data_object_object_id_generator = (gint64) 0; - -GType data_object_get_type (void) G_GNUC_CONST; -gpointer alteration_ref (gpointer instance); -void alteration_unref (gpointer instance); -GParamSpec* param_spec_alteration (const gchar* name, - const gchar* nick, - const gchar* blurb, - GType object_type, - GParamFlags flags); -void value_set_alteration (GValue* value, - gpointer v_object); -void value_take_alteration (GValue* value, - gpointer v_object); -gpointer value_get_alteration (const GValue* value); -GType alteration_get_type (void) G_GNUC_CONST; -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; -#define DATA_OBJECT_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), TYPE_DATA_OBJECT, DataObjectPrivate)) -#define DATA_OBJECT_INVALID_OBJECT_ID ((gint64) -1) -#define DATA_COLLECTION_INVALID_OBJECT_ORDINAL ((gint64) -1) -DataObject* data_object_construct (GType object_type, - gint64 object_id); -void data_object_notify_altered (DataObject* self, - Alteration* alteration); -static void data_object_real_notify_altered (DataObject* self, - Alteration* alteration); -void data_collection_internal_notify_altered (DataCollection* self, - DataObject* object, - Alteration* alteration); -void data_object_notify_membership_changed (DataObject* self, - DataCollection* collection); -static void data_object_real_notify_membership_changed (DataObject* self, - DataCollection* collection); -void data_object_notify_collection_property_set (DataObject* self, - const gchar* name, - GValue* old, - GValue* val); -static void data_object_real_notify_collection_property_set (DataObject* self, - const gchar* name, - GValue* old, - GValue* val); -void data_object_notify_collection_property_cleared (DataObject* self, - const gchar* name); -static void data_object_real_notify_collection_property_cleared (DataObject* self, - const gchar* name); -gchar* data_object_get_name (DataObject* self); -static gchar* data_object_real_get_name (DataObject* self); -gchar* data_object_to_string (DataObject* self); -static gchar* data_object_real_to_string (DataObject* self); -DataCollection* data_object_get_membership (DataObject* self); -gboolean data_object_has_membership (DataObject* self); -void data_object_internal_set_membership (DataObject* self, - DataCollection* collection, - gint64 ordinal); -void data_object_internal_set_ordinal (DataObject* self, - gint64 ordinal); -void data_object_internal_clear_membership (DataObject* self); -gint64 data_object_internal_get_ordinal (DataObject* self); -gint64 data_object_get_object_id (DataObject* self); -void data_object_get_collection_property (DataObject* self, - const gchar* name, - GValue* def, - GValue* result); -GValue* data_collection_get_property (DataCollection* self, - const gchar* name); -static void _vala_GValue_free (GValue* self); -void data_object_set_collection_property (DataObject* self, - const gchar* name, - GValue* val, - ValueEqualFunc value_equals, - void* value_equals_target); -void data_collection_set_property (DataCollection* self, - const gchar* name, - GValue* val, - ValueEqualFunc value_equals, - void* value_equals_target); -void data_object_clear_collection_property (DataObject* self, - const gchar* name); -void data_collection_clear_property (DataCollection* self, - const gchar* name); -static void data_object_finalize (GObject * obj); - - -DataObject* -data_object_construct (GType object_type, - gint64 object_id) -{ - DataObject * self = NULL; - gint64 _tmp0_ = 0LL; -#line 38 "/home/jens/Source/shotwell/src/core/DataObject.vala" - self = (DataObject*) g_object_new (object_type, NULL); -#line 39 "/home/jens/Source/shotwell/src/core/DataObject.vala" - if (object_id == DATA_OBJECT_INVALID_OBJECT_ID) { -#line 203 "DataObject.c" - gint64 _tmp1_; -#line 39 "/home/jens/Source/shotwell/src/core/DataObject.vala" - _tmp1_ = data_object_object_id_generator; -#line 39 "/home/jens/Source/shotwell/src/core/DataObject.vala" - data_object_object_id_generator = _tmp1_ + 1; -#line 39 "/home/jens/Source/shotwell/src/core/DataObject.vala" - _tmp0_ = _tmp1_; -#line 211 "DataObject.c" - } else { -#line 39 "/home/jens/Source/shotwell/src/core/DataObject.vala" - _tmp0_ = object_id; -#line 215 "DataObject.c" - } -#line 39 "/home/jens/Source/shotwell/src/core/DataObject.vala" - self->priv->object_id = _tmp0_; -#line 38 "/home/jens/Source/shotwell/src/core/DataObject.vala" - return self; -#line 221 "DataObject.c" -} - - -static void -data_object_real_notify_altered (DataObject* self, - Alteration* alteration) -{ - DataCollection* _tmp0_; -#line 42 "/home/jens/Source/shotwell/src/core/DataObject.vala" - g_return_if_fail (IS_ALTERATION (alteration)); -#line 43 "/home/jens/Source/shotwell/src/core/DataObject.vala" - _tmp0_ = self->priv->member_of; -#line 43 "/home/jens/Source/shotwell/src/core/DataObject.vala" - if (_tmp0_ != NULL) { -#line 236 "DataObject.c" - DataCollection* _tmp1_; -#line 44 "/home/jens/Source/shotwell/src/core/DataObject.vala" - _tmp1_ = self->priv->member_of; -#line 44 "/home/jens/Source/shotwell/src/core/DataObject.vala" - data_collection_internal_notify_altered (_tmp1_, self, alteration); -#line 242 "DataObject.c" - } -} - - -void -data_object_notify_altered (DataObject* self, - Alteration* alteration) -{ -#line 42 "/home/jens/Source/shotwell/src/core/DataObject.vala" - g_return_if_fail (IS_DATA_OBJECT (self)); -#line 42 "/home/jens/Source/shotwell/src/core/DataObject.vala" - DATA_OBJECT_GET_CLASS (self)->notify_altered (self, alteration); -#line 255 "DataObject.c" -} - - -static void -data_object_real_notify_membership_changed (DataObject* self, - DataCollection* collection) -{ -#line 56 "/home/jens/Source/shotwell/src/core/DataObject.vala" - g_return_if_fail ((collection == NULL) || IS_DATA_COLLECTION (collection)); -#line 265 "DataObject.c" -} - - -void -data_object_notify_membership_changed (DataObject* self, - DataCollection* collection) -{ -#line 56 "/home/jens/Source/shotwell/src/core/DataObject.vala" - g_return_if_fail (IS_DATA_OBJECT (self)); -#line 56 "/home/jens/Source/shotwell/src/core/DataObject.vala" - DATA_OBJECT_GET_CLASS (self)->notify_membership_changed (self, collection); -#line 277 "DataObject.c" -} - - -static void -data_object_real_notify_collection_property_set (DataObject* self, - const gchar* name, - GValue* old, - GValue* val) -{ -#line 61 "/home/jens/Source/shotwell/src/core/DataObject.vala" - g_return_if_fail (name != NULL); -#line 61 "/home/jens/Source/shotwell/src/core/DataObject.vala" - g_return_if_fail (val != NULL); -#line 291 "DataObject.c" -} - - -void -data_object_notify_collection_property_set (DataObject* self, - const gchar* name, - GValue* old, - GValue* val) -{ -#line 61 "/home/jens/Source/shotwell/src/core/DataObject.vala" - g_return_if_fail (IS_DATA_OBJECT (self)); -#line 61 "/home/jens/Source/shotwell/src/core/DataObject.vala" - DATA_OBJECT_GET_CLASS (self)->notify_collection_property_set (self, name, old, val); -#line 305 "DataObject.c" -} - - -static void -data_object_real_notify_collection_property_cleared (DataObject* self, - const gchar* name) -{ -#line 66 "/home/jens/Source/shotwell/src/core/DataObject.vala" - g_return_if_fail (name != NULL); -#line 315 "DataObject.c" -} - - -void -data_object_notify_collection_property_cleared (DataObject* self, - const gchar* name) -{ -#line 66 "/home/jens/Source/shotwell/src/core/DataObject.vala" - g_return_if_fail (IS_DATA_OBJECT (self)); -#line 66 "/home/jens/Source/shotwell/src/core/DataObject.vala" - DATA_OBJECT_GET_CLASS (self)->notify_collection_property_cleared (self, name); -#line 327 "DataObject.c" -} - - -static gchar* -data_object_real_get_name (DataObject* self) -{ -#line 69 "/home/jens/Source/shotwell/src/core/DataObject.vala" - g_critical ("Type `%s' does not implement abstract method `data_object_get_name'", g_type_name (G_TYPE_FROM_INSTANCE (self))); -#line 69 "/home/jens/Source/shotwell/src/core/DataObject.vala" - return NULL; -#line 338 "DataObject.c" -} - - -gchar* -data_object_get_name (DataObject* self) -{ -#line 69 "/home/jens/Source/shotwell/src/core/DataObject.vala" - g_return_val_if_fail (IS_DATA_OBJECT (self), NULL); -#line 69 "/home/jens/Source/shotwell/src/core/DataObject.vala" - return DATA_OBJECT_GET_CLASS (self)->get_name (self); -#line 349 "DataObject.c" -} - - -static gchar* -data_object_real_to_string (DataObject* self) -{ -#line 71 "/home/jens/Source/shotwell/src/core/DataObject.vala" - g_critical ("Type `%s' does not implement abstract method `data_object_to_string'", g_type_name (G_TYPE_FROM_INSTANCE (self))); -#line 71 "/home/jens/Source/shotwell/src/core/DataObject.vala" - return NULL; -#line 360 "DataObject.c" -} - - -gchar* -data_object_to_string (DataObject* self) -{ -#line 71 "/home/jens/Source/shotwell/src/core/DataObject.vala" - g_return_val_if_fail (IS_DATA_OBJECT (self), NULL); -#line 71 "/home/jens/Source/shotwell/src/core/DataObject.vala" - return DATA_OBJECT_GET_CLASS (self)->to_string (self); -#line 371 "DataObject.c" -} - - -static gpointer -_data_collection_ref0 (gpointer self) -{ -#line 74 "/home/jens/Source/shotwell/src/core/DataObject.vala" - return self ? data_collection_ref (self) : NULL; -#line 380 "DataObject.c" -} - - -DataCollection* -data_object_get_membership (DataObject* self) -{ - DataCollection* result = NULL; - DataCollection* _tmp0_; - DataCollection* _tmp1_; -#line 73 "/home/jens/Source/shotwell/src/core/DataObject.vala" - g_return_val_if_fail (IS_DATA_OBJECT (self), NULL); -#line 74 "/home/jens/Source/shotwell/src/core/DataObject.vala" - _tmp0_ = self->priv->member_of; -#line 74 "/home/jens/Source/shotwell/src/core/DataObject.vala" - _tmp1_ = _data_collection_ref0 (_tmp0_); -#line 74 "/home/jens/Source/shotwell/src/core/DataObject.vala" - result = _tmp1_; -#line 74 "/home/jens/Source/shotwell/src/core/DataObject.vala" - return result; -#line 400 "DataObject.c" -} - - -gboolean -data_object_has_membership (DataObject* self) -{ - gboolean result = FALSE; - DataCollection* _tmp0_; -#line 77 "/home/jens/Source/shotwell/src/core/DataObject.vala" - g_return_val_if_fail (IS_DATA_OBJECT (self), FALSE); -#line 78 "/home/jens/Source/shotwell/src/core/DataObject.vala" - _tmp0_ = self->priv->member_of; -#line 78 "/home/jens/Source/shotwell/src/core/DataObject.vala" - result = _tmp0_ != NULL; -#line 78 "/home/jens/Source/shotwell/src/core/DataObject.vala" - return result; -#line 417 "DataObject.c" -} - - -void -data_object_internal_set_membership (DataObject* self, - DataCollection* collection, - gint64 ordinal) -{ - DataCollection* _tmp0_; - DataCollection* _tmp1_; -#line 83 "/home/jens/Source/shotwell/src/core/DataObject.vala" - g_return_if_fail (IS_DATA_OBJECT (self)); -#line 83 "/home/jens/Source/shotwell/src/core/DataObject.vala" - g_return_if_fail (IS_DATA_COLLECTION (collection)); -#line 84 "/home/jens/Source/shotwell/src/core/DataObject.vala" - _tmp0_ = self->priv->member_of; -#line 84 "/home/jens/Source/shotwell/src/core/DataObject.vala" - _vala_assert (_tmp0_ == NULL, "member_of == null"); -#line 86 "/home/jens/Source/shotwell/src/core/DataObject.vala" - _tmp1_ = _data_collection_ref0 (collection); -#line 86 "/home/jens/Source/shotwell/src/core/DataObject.vala" - _data_collection_unref0 (self->priv->member_of); -#line 86 "/home/jens/Source/shotwell/src/core/DataObject.vala" - self->priv->member_of = _tmp1_; -#line 87 "/home/jens/Source/shotwell/src/core/DataObject.vala" - self->priv->ordinal = ordinal; -#line 444 "DataObject.c" -} - - -void -data_object_internal_set_ordinal (DataObject* self, - gint64 ordinal) -{ - DataCollection* _tmp0_; -#line 96 "/home/jens/Source/shotwell/src/core/DataObject.vala" - g_return_if_fail (IS_DATA_OBJECT (self)); -#line 97 "/home/jens/Source/shotwell/src/core/DataObject.vala" - _tmp0_ = self->priv->member_of; -#line 97 "/home/jens/Source/shotwell/src/core/DataObject.vala" - _vala_assert (_tmp0_ == NULL, "member_of == null"); -#line 99 "/home/jens/Source/shotwell/src/core/DataObject.vala" - self->priv->ordinal = ordinal; -#line 461 "DataObject.c" -} - - -void -data_object_internal_clear_membership (DataObject* self) -{ -#line 104 "/home/jens/Source/shotwell/src/core/DataObject.vala" - g_return_if_fail (IS_DATA_OBJECT (self)); -#line 105 "/home/jens/Source/shotwell/src/core/DataObject.vala" - _data_collection_unref0 (self->priv->member_of); -#line 105 "/home/jens/Source/shotwell/src/core/DataObject.vala" - self->priv->member_of = NULL; -#line 106 "/home/jens/Source/shotwell/src/core/DataObject.vala" - self->priv->ordinal = DATA_COLLECTION_INVALID_OBJECT_ORDINAL; -#line 476 "DataObject.c" -} - - -inline gint64 -data_object_internal_get_ordinal (DataObject* self) -{ - gint64 result = 0LL; - gint64 _tmp0_; -#line 110 "/home/jens/Source/shotwell/src/core/DataObject.vala" - g_return_val_if_fail (IS_DATA_OBJECT (self), 0LL); -#line 111 "/home/jens/Source/shotwell/src/core/DataObject.vala" - _tmp0_ = self->priv->ordinal; -#line 111 "/home/jens/Source/shotwell/src/core/DataObject.vala" - result = _tmp0_; -#line 111 "/home/jens/Source/shotwell/src/core/DataObject.vala" - return result; -#line 493 "DataObject.c" -} - - -inline gint64 -data_object_get_object_id (DataObject* self) -{ - gint64 result = 0LL; - gint64 _tmp0_; -#line 114 "/home/jens/Source/shotwell/src/core/DataObject.vala" - g_return_val_if_fail (IS_DATA_OBJECT (self), 0LL); -#line 115 "/home/jens/Source/shotwell/src/core/DataObject.vala" - _tmp0_ = self->priv->object_id; -#line 115 "/home/jens/Source/shotwell/src/core/DataObject.vala" - result = _tmp0_; -#line 115 "/home/jens/Source/shotwell/src/core/DataObject.vala" - return result; -#line 510 "DataObject.c" -} - - -static void -_vala_GValue_free (GValue* self) -{ -#line 124 "/home/jens/Source/shotwell/src/core/DataObject.vala" - g_value_unset (self); -#line 124 "/home/jens/Source/shotwell/src/core/DataObject.vala" - g_free (self); -#line 521 "DataObject.c" -} - - -void -data_object_get_collection_property (DataObject* self, - const gchar* name, - GValue* def, - GValue* result) -{ - DataCollection* _tmp0_; - GValue* _result_ = NULL; - DataCollection* _tmp2_; - GValue* _tmp3_; - GValue* _tmp4_ = NULL; - GValue* _tmp5_; - GValue _tmp7_ = {0}; -#line 118 "/home/jens/Source/shotwell/src/core/DataObject.vala" - g_return_if_fail (IS_DATA_OBJECT (self)); -#line 118 "/home/jens/Source/shotwell/src/core/DataObject.vala" - g_return_if_fail (name != NULL); -#line 119 "/home/jens/Source/shotwell/src/core/DataObject.vala" - _tmp0_ = self->priv->member_of; -#line 119 "/home/jens/Source/shotwell/src/core/DataObject.vala" - if (_tmp0_ == NULL) { -#line 546 "DataObject.c" - GValue _tmp1_ = {0}; -#line 120 "/home/jens/Source/shotwell/src/core/DataObject.vala" - if (G_IS_VALUE (def)) { -#line 120 "/home/jens/Source/shotwell/src/core/DataObject.vala" - g_value_init (&_tmp1_, G_VALUE_TYPE (def)); -#line 120 "/home/jens/Source/shotwell/src/core/DataObject.vala" - g_value_copy (def, &_tmp1_); -#line 554 "DataObject.c" - } else { -#line 120 "/home/jens/Source/shotwell/src/core/DataObject.vala" - _tmp1_ = *def; -#line 558 "DataObject.c" - } -#line 120 "/home/jens/Source/shotwell/src/core/DataObject.vala" - *result = _tmp1_; -#line 120 "/home/jens/Source/shotwell/src/core/DataObject.vala" - return; -#line 564 "DataObject.c" - } -#line 122 "/home/jens/Source/shotwell/src/core/DataObject.vala" - _tmp2_ = self->priv->member_of; -#line 122 "/home/jens/Source/shotwell/src/core/DataObject.vala" - _tmp3_ = data_collection_get_property (_tmp2_, name); -#line 122 "/home/jens/Source/shotwell/src/core/DataObject.vala" - _result_ = _tmp3_; -#line 124 "/home/jens/Source/shotwell/src/core/DataObject.vala" - _tmp5_ = _result_; -#line 124 "/home/jens/Source/shotwell/src/core/DataObject.vala" - if (_tmp5_ != NULL) { -#line 576 "DataObject.c" - GValue* _tmp6_; -#line 124 "/home/jens/Source/shotwell/src/core/DataObject.vala" - _tmp6_ = _result_; -#line 124 "/home/jens/Source/shotwell/src/core/DataObject.vala" - _tmp4_ = _tmp6_; -#line 582 "DataObject.c" - } else { -#line 124 "/home/jens/Source/shotwell/src/core/DataObject.vala" - _tmp4_ = def; -#line 586 "DataObject.c" - } -#line 124 "/home/jens/Source/shotwell/src/core/DataObject.vala" - if (G_IS_VALUE (_tmp4_)) { -#line 124 "/home/jens/Source/shotwell/src/core/DataObject.vala" - g_value_init (&_tmp7_, G_VALUE_TYPE (_tmp4_)); -#line 124 "/home/jens/Source/shotwell/src/core/DataObject.vala" - g_value_copy (_tmp4_, &_tmp7_); -#line 594 "DataObject.c" - } else { -#line 124 "/home/jens/Source/shotwell/src/core/DataObject.vala" - _tmp7_ = *_tmp4_; -#line 598 "DataObject.c" - } -#line 124 "/home/jens/Source/shotwell/src/core/DataObject.vala" - *result = _tmp7_; -#line 124 "/home/jens/Source/shotwell/src/core/DataObject.vala" - __vala_GValue_free0 (_result_); -#line 124 "/home/jens/Source/shotwell/src/core/DataObject.vala" - return; -#line 606 "DataObject.c" -} - - -void -data_object_set_collection_property (DataObject* self, - const gchar* name, - GValue* val, - ValueEqualFunc value_equals, - void* value_equals_target) -{ - DataCollection* _tmp0_; -#line 127 "/home/jens/Source/shotwell/src/core/DataObject.vala" - g_return_if_fail (IS_DATA_OBJECT (self)); -#line 127 "/home/jens/Source/shotwell/src/core/DataObject.vala" - g_return_if_fail (name != NULL); -#line 127 "/home/jens/Source/shotwell/src/core/DataObject.vala" - g_return_if_fail (val != NULL); -#line 128 "/home/jens/Source/shotwell/src/core/DataObject.vala" - _tmp0_ = self->priv->member_of; -#line 128 "/home/jens/Source/shotwell/src/core/DataObject.vala" - if (_tmp0_ != NULL) { -#line 628 "DataObject.c" - DataCollection* _tmp1_; - GValue _tmp2_; -#line 129 "/home/jens/Source/shotwell/src/core/DataObject.vala" - _tmp1_ = self->priv->member_of; -#line 129 "/home/jens/Source/shotwell/src/core/DataObject.vala" - _tmp2_ = *val; -#line 129 "/home/jens/Source/shotwell/src/core/DataObject.vala" - data_collection_set_property (_tmp1_, name, &_tmp2_, value_equals, value_equals_target); -#line 637 "DataObject.c" - } -} - - -void -data_object_clear_collection_property (DataObject* self, - const gchar* name) -{ - DataCollection* _tmp0_; -#line 132 "/home/jens/Source/shotwell/src/core/DataObject.vala" - g_return_if_fail (IS_DATA_OBJECT (self)); -#line 132 "/home/jens/Source/shotwell/src/core/DataObject.vala" - g_return_if_fail (name != NULL); -#line 133 "/home/jens/Source/shotwell/src/core/DataObject.vala" - _tmp0_ = self->priv->member_of; -#line 133 "/home/jens/Source/shotwell/src/core/DataObject.vala" - if (_tmp0_ != NULL) { -#line 655 "DataObject.c" - DataCollection* _tmp1_; -#line 134 "/home/jens/Source/shotwell/src/core/DataObject.vala" - _tmp1_ = self->priv->member_of; -#line 134 "/home/jens/Source/shotwell/src/core/DataObject.vala" - data_collection_clear_property (_tmp1_, name); -#line 661 "DataObject.c" - } -} - - -static void -data_object_class_init (DataObjectClass * klass) -{ -#line 21 "/home/jens/Source/shotwell/src/core/DataObject.vala" - data_object_parent_class = g_type_class_peek_parent (klass); -#line 21 "/home/jens/Source/shotwell/src/core/DataObject.vala" - g_type_class_add_private (klass, sizeof (DataObjectPrivate)); -#line 21 "/home/jens/Source/shotwell/src/core/DataObject.vala" - ((DataObjectClass *) klass)->notify_altered = (void (*) (DataObject *, Alteration*)) data_object_real_notify_altered; -#line 21 "/home/jens/Source/shotwell/src/core/DataObject.vala" - ((DataObjectClass *) klass)->notify_membership_changed = (void (*) (DataObject *, DataCollection*)) data_object_real_notify_membership_changed; -#line 21 "/home/jens/Source/shotwell/src/core/DataObject.vala" - ((DataObjectClass *) klass)->notify_collection_property_set = (void (*) (DataObject *, const gchar*, GValue*, GValue*)) data_object_real_notify_collection_property_set; -#line 21 "/home/jens/Source/shotwell/src/core/DataObject.vala" - ((DataObjectClass *) klass)->notify_collection_property_cleared = (void (*) (DataObject *, const gchar*)) data_object_real_notify_collection_property_cleared; -#line 21 "/home/jens/Source/shotwell/src/core/DataObject.vala" - ((DataObjectClass *) klass)->get_name = (gchar* (*) (DataObject *)) data_object_real_get_name; -#line 21 "/home/jens/Source/shotwell/src/core/DataObject.vala" - ((DataObjectClass *) klass)->to_string = (gchar* (*) (DataObject *)) data_object_real_to_string; -#line 21 "/home/jens/Source/shotwell/src/core/DataObject.vala" - G_OBJECT_CLASS (klass)->finalize = data_object_finalize; -#line 687 "DataObject.c" -} - - -static void -data_object_instance_init (DataObject * self) -{ -#line 21 "/home/jens/Source/shotwell/src/core/DataObject.vala" - self->priv = DATA_OBJECT_GET_PRIVATE (self); -#line 32 "/home/jens/Source/shotwell/src/core/DataObject.vala" - self->priv->object_id = DATA_OBJECT_INVALID_OBJECT_ID; -#line 33 "/home/jens/Source/shotwell/src/core/DataObject.vala" - self->priv->member_of = NULL; -#line 34 "/home/jens/Source/shotwell/src/core/DataObject.vala" - self->priv->ordinal = DATA_COLLECTION_INVALID_OBJECT_ORDINAL; -#line 702 "DataObject.c" -} - - -static void -data_object_finalize (GObject * obj) -{ - DataObject * self; -#line 21 "/home/jens/Source/shotwell/src/core/DataObject.vala" - self = G_TYPE_CHECK_INSTANCE_CAST (obj, TYPE_DATA_OBJECT, DataObject); -#line 33 "/home/jens/Source/shotwell/src/core/DataObject.vala" - _data_collection_unref0 (self->priv->member_of); -#line 21 "/home/jens/Source/shotwell/src/core/DataObject.vala" - G_OBJECT_CLASS (data_object_parent_class)->finalize (obj); -#line 716 "DataObject.c" -} - - -GType -data_object_get_type (void) -{ - static volatile gsize data_object_type_id__volatile = 0; - if (g_once_init_enter (&data_object_type_id__volatile)) { - static const GTypeInfo g_define_type_info = { sizeof (DataObjectClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) data_object_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (DataObject), 0, (GInstanceInitFunc) data_object_instance_init, NULL }; - GType data_object_type_id; - data_object_type_id = g_type_register_static (G_TYPE_OBJECT, "DataObject", &g_define_type_info, G_TYPE_FLAG_ABSTRACT); - g_once_init_leave (&data_object_type_id__volatile, data_object_type_id); - } - return data_object_type_id__volatile; -} - - - diff --git a/src/core/DataSet.c b/src/core/DataSet.c deleted file mode 100644 index 367fefc..0000000 --- a/src/core/DataSet.c +++ /dev/null @@ -1,1195 +0,0 @@ -/* DataSet.c generated by valac 0.40.4, the Vala compiler - * generated from DataSet.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. - */ -/**/ -/* DataSet*/ -/**/ -/* A DataSet is a collection class used for internal implementations of DataCollection*/ -/* and its children. It may be of use to other classes, however.*/ -/**/ -/* The general purpose of DataSet is to provide low-cost implementations of various collection*/ -/* operations at a cost of internally maintaining its objects in more than one simple collection.*/ -/* contains(), for example, can return a result with hash-table performance while notions of*/ -/* ordering are maintained by a SortedList. The cost is in adding and removing objects (in general,*/ -/* there are others).*/ -/**/ -/* Because this class has no signalling mechanisms and does not manipulate DataObjects in ways*/ -/* they expect to be manipulated (these features are performed by DataCollection), it's probably*/ -/* best not to use this class. Even in cases of building a list of DataObjects for some quick*/ -/* operation is probably best done by a Gee.ArrayList.*/ -/**/ -/* ComparatorPredicate is used to determine if a re-sort operation is necessary; it has no*/ -/* effect on adding a DataObject to a DataSet in sorted order.*/ - - -#include <glib.h> -#include <glib-object.h> -#include <gee.h> -#include <gobject/gvaluecollector.h> - - -#define TYPE_DATA_OBJECT (data_object_get_type ()) -#define DATA_OBJECT(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_DATA_OBJECT, DataObject)) -#define DATA_OBJECT_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_DATA_OBJECT, DataObjectClass)) -#define IS_DATA_OBJECT(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_DATA_OBJECT)) -#define IS_DATA_OBJECT_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_DATA_OBJECT)) -#define DATA_OBJECT_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_DATA_OBJECT, DataObjectClass)) - -typedef struct _DataObject DataObject; -typedef struct _DataObjectClass DataObjectClass; - -#define TYPE_ALTERATION (alteration_get_type ()) -#define ALTERATION(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_ALTERATION, Alteration)) -#define ALTERATION_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_ALTERATION, AlterationClass)) -#define IS_ALTERATION(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_ALTERATION)) -#define IS_ALTERATION_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_ALTERATION)) -#define ALTERATION_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_ALTERATION, AlterationClass)) - -typedef struct _Alteration Alteration; -typedef struct _AlterationClass AlterationClass; - -#define TYPE_DATA_SET (data_set_get_type ()) -#define DATA_SET(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_DATA_SET, DataSet)) -#define DATA_SET_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_DATA_SET, DataSetClass)) -#define IS_DATA_SET(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_DATA_SET)) -#define IS_DATA_SET_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_DATA_SET)) -#define DATA_SET_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_DATA_SET, DataSetClass)) - -typedef struct _DataSet DataSet; -typedef struct _DataSetClass DataSetClass; -typedef struct _DataSetPrivate DataSetPrivate; - -#define TYPE_SORTED_LIST (sorted_list_get_type ()) -#define SORTED_LIST(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_SORTED_LIST, SortedList)) -#define SORTED_LIST_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_SORTED_LIST, SortedListClass)) -#define IS_SORTED_LIST(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_SORTED_LIST)) -#define IS_SORTED_LIST_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_SORTED_LIST)) -#define SORTED_LIST_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_SORTED_LIST, SortedListClass)) - -typedef struct _SortedList SortedList; -typedef struct _SortedListClass SortedListClass; -#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL))) -#define _data_set_unref0(var) ((var == NULL) ? NULL : (var = (data_set_unref (var), NULL))) -typedef struct _ParamSpecDataSet ParamSpecDataSet; -#define _vala_assert(expr, msg) if G_LIKELY (expr) ; else g_assertion_message_expr (G_LOG_DOMAIN, __FILE__, __LINE__, G_STRFUNC, msg); -#define _vala_return_if_fail(expr, msg) if G_LIKELY (expr) ; else { g_return_if_fail_warning (G_LOG_DOMAIN, G_STRFUNC, msg); return; } -#define _vala_return_val_if_fail(expr, msg, val) if G_LIKELY (expr) ; else { g_return_if_fail_warning (G_LOG_DOMAIN, G_STRFUNC, msg); return val; } -#define _vala_warn_if_fail(expr, msg) if G_LIKELY (expr) ; else g_warn_message (G_LOG_DOMAIN, __FILE__, __LINE__, G_STRFUNC, msg); - -typedef gboolean (*ComparatorPredicate) (DataObject* object, Alteration* alteration, void* user_data); -struct _DataSet { - GTypeInstance parent_instance; - volatile int ref_count; - DataSetPrivate * priv; -}; - -struct _DataSetClass { - GTypeClass parent_class; - void (*finalize) (DataSet *self); -}; - -typedef gint64 (*Comparator) (void* a, void* b, void* user_data); -struct _DataSetPrivate { - SortedList* list; - GeeHashSet* hash_set; - Comparator user_comparator; - gpointer user_comparator_target; - ComparatorPredicate comparator_predicate; - gpointer comparator_predicate_target; -}; - -struct _ParamSpecDataSet { - GParamSpec parent_instance; -}; - - -static gpointer data_set_parent_class = NULL; - -GType data_object_get_type (void) G_GNUC_CONST; -gpointer alteration_ref (gpointer instance); -void alteration_unref (gpointer instance); -GParamSpec* param_spec_alteration (const gchar* name, - const gchar* nick, - const gchar* blurb, - GType object_type, - GParamFlags flags); -void value_set_alteration (GValue* value, - gpointer v_object); -void value_take_alteration (GValue* value, - gpointer v_object); -gpointer value_get_alteration (const GValue* value); -GType alteration_get_type (void) G_GNUC_CONST; -gpointer data_set_ref (gpointer instance); -void data_set_unref (gpointer instance); -GParamSpec* param_spec_data_set (const gchar* name, - const gchar* nick, - const gchar* blurb, - GType object_type, - GParamFlags flags); -void value_set_data_set (GValue* value, - gpointer v_object); -void value_take_data_set (GValue* value, - gpointer v_object); -gpointer value_get_data_set (const GValue* value); -GType data_set_get_type (void) G_GNUC_CONST; -GType sorted_list_get_type (void) G_GNUC_CONST; -#define DATA_SET_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), TYPE_DATA_SET, DataSetPrivate)) -SortedList* sorted_list_new (GType g_type, - GBoxedCopyFunc g_dup_func, - GDestroyNotify g_destroy_func, - Comparator cmp, - void* cmp_target); -SortedList* sorted_list_construct (GType object_type, - GType g_type, - GBoxedCopyFunc g_dup_func, - GDestroyNotify g_destroy_func, - Comparator cmp, - void* cmp_target); -DataSet* data_set_new (void); -DataSet* data_set_construct (GType object_type); -void data_set_reset_comparator (DataSet* self); -static gint64 data_set_order_added_comparator (DataSet* self, - void* a, - void* b); -gint64 data_object_internal_get_ordinal (DataObject* self); -static gboolean data_set_order_added_predicate (DataSet* self, - DataObject* object, - Alteration* alteration); -static gint64 data_set_comparator_wrapper (DataSet* self, - void* a, - void* b); -gboolean data_set_contains (DataSet* self, - DataObject* object); -gint data_set_get_count (DataSet* self); -gint sorted_list_get_count (SortedList* self); -static gboolean _data_set_order_added_predicate_comparator_predicate (DataObject* object, - Alteration* alteration, - gpointer self); -void sorted_list_resort (SortedList* self, - Comparator new_cmp, - void* new_cmp_target); -static gint64 _data_set_order_added_comparator_comparator (void* a, - void* b, - gpointer self); -Comparator data_set_get_comparator (DataSet* self, - void** result_target); -ComparatorPredicate data_set_get_comparator_predicate (DataSet* self, - void** result_target); -void data_set_set_comparator (DataSet* self, - Comparator user_comparator, - void* user_comparator_target, - ComparatorPredicate comparator_predicate, - void* comparator_predicate_target); -static gint64 _data_set_comparator_wrapper_comparator (void* a, - void* b, - gpointer self); -GeeList* data_set_get_all (DataSet* self); -GeeList* sorted_list_get_read_only_view_as_list (SortedList* self); -DataSet* data_set_copy (DataSet* self); -SortedList* sorted_list_copy (SortedList* self); -DataObject* data_set_get_at (DataSet* self, - gint index); -gpointer sorted_list_get_at (SortedList* self, - gint index); -gint data_set_index_of (DataSet* self, - DataObject* object); -gint sorted_list_locate (SortedList* self, - gconstpointer search, - gboolean altered, - GEqualFunc equal_func); -gboolean data_set_add (DataSet* self, - DataObject* object); -gboolean data_set_add_many (DataSet* self, - GeeCollection* objects); -gboolean data_set_remove (DataSet* self, - DataObject* object); -gboolean data_set_remove_many (DataSet* self, - GeeCollection* objects); -gboolean data_set_resort_object (DataSet* self, - DataObject* object, - Alteration* alteration); -gboolean sorted_list_resort_item (SortedList* self, - gconstpointer item); -static void data_set_finalize (DataSet * obj); - - -DataSet* -data_set_construct (GType object_type) -{ - DataSet* self = NULL; -#line 35 "/home/jens/Source/shotwell/src/core/DataSet.vala" - self = (DataSet*) g_type_create_instance (object_type); -#line 36 "/home/jens/Source/shotwell/src/core/DataSet.vala" - data_set_reset_comparator (self); -#line 35 "/home/jens/Source/shotwell/src/core/DataSet.vala" - return self; -#line 232 "DataSet.c" -} - - -DataSet* -data_set_new (void) -{ -#line 35 "/home/jens/Source/shotwell/src/core/DataSet.vala" - return data_set_construct (TYPE_DATA_SET); -#line 241 "DataSet.c" -} - - -static gint64 -data_set_order_added_comparator (DataSet* self, - void* a, - void* b) -{ - gint64 result = 0LL; -#line 39 "/home/jens/Source/shotwell/src/core/DataSet.vala" - g_return_val_if_fail (IS_DATA_SET (self), 0LL); -#line 40 "/home/jens/Source/shotwell/src/core/DataSet.vala" - result = data_object_internal_get_ordinal (G_TYPE_CHECK_INSTANCE_CAST ((DataObject*) a, TYPE_DATA_OBJECT, DataObject)) - data_object_internal_get_ordinal (G_TYPE_CHECK_INSTANCE_CAST ((DataObject*) b, TYPE_DATA_OBJECT, DataObject)); -#line 40 "/home/jens/Source/shotwell/src/core/DataSet.vala" - return result; -#line 257 "DataSet.c" -} - - -static gboolean -data_set_order_added_predicate (DataSet* self, - DataObject* object, - Alteration* alteration) -{ - gboolean result = FALSE; -#line 43 "/home/jens/Source/shotwell/src/core/DataSet.vala" - g_return_val_if_fail (IS_DATA_SET (self), FALSE); -#line 43 "/home/jens/Source/shotwell/src/core/DataSet.vala" - g_return_val_if_fail (IS_DATA_OBJECT (object), FALSE); -#line 43 "/home/jens/Source/shotwell/src/core/DataSet.vala" - g_return_val_if_fail (IS_ALTERATION (alteration), FALSE); -#line 45 "/home/jens/Source/shotwell/src/core/DataSet.vala" - result = FALSE; -#line 45 "/home/jens/Source/shotwell/src/core/DataSet.vala" - return result; -#line 277 "DataSet.c" -} - - -static gint64 -data_set_comparator_wrapper (DataSet* self, - void* a, - void* b) -{ - gint64 result = 0LL; - gint64 _result_ = 0LL; - Comparator _tmp0_; - void* _tmp0__target; - gint64 _tmp2_; - gint64 _tmp3_; -#line 48 "/home/jens/Source/shotwell/src/core/DataSet.vala" - g_return_val_if_fail (IS_DATA_SET (self), 0LL); -#line 49 "/home/jens/Source/shotwell/src/core/DataSet.vala" - if (a == b) { -#line 50 "/home/jens/Source/shotwell/src/core/DataSet.vala" - result = (gint64) 0; -#line 50 "/home/jens/Source/shotwell/src/core/DataSet.vala" - return result; -#line 300 "DataSet.c" - } -#line 54 "/home/jens/Source/shotwell/src/core/DataSet.vala" - _result_ = (gint64) 0; -#line 56 "/home/jens/Source/shotwell/src/core/DataSet.vala" - _tmp0_ = self->priv->user_comparator; -#line 56 "/home/jens/Source/shotwell/src/core/DataSet.vala" - _tmp0__target = self->priv->user_comparator_target; -#line 56 "/home/jens/Source/shotwell/src/core/DataSet.vala" - if (_tmp0_ != NULL) { -#line 310 "DataSet.c" - Comparator _tmp1_; - void* _tmp1__target; -#line 57 "/home/jens/Source/shotwell/src/core/DataSet.vala" - _tmp1_ = self->priv->user_comparator; -#line 57 "/home/jens/Source/shotwell/src/core/DataSet.vala" - _tmp1__target = self->priv->user_comparator_target; -#line 57 "/home/jens/Source/shotwell/src/core/DataSet.vala" - _result_ = _tmp1_ (a, b, _tmp1__target); -#line 319 "DataSet.c" - } -#line 59 "/home/jens/Source/shotwell/src/core/DataSet.vala" - _tmp2_ = _result_; -#line 59 "/home/jens/Source/shotwell/src/core/DataSet.vala" - if (_tmp2_ == ((gint64) 0)) { -#line 60 "/home/jens/Source/shotwell/src/core/DataSet.vala" - _result_ = data_set_order_added_comparator (self, a, b); -#line 327 "DataSet.c" - } -#line 62 "/home/jens/Source/shotwell/src/core/DataSet.vala" - _tmp3_ = _result_; -#line 62 "/home/jens/Source/shotwell/src/core/DataSet.vala" - _vala_assert (_tmp3_ != ((gint64) 0), "result != 0"); -#line 64 "/home/jens/Source/shotwell/src/core/DataSet.vala" - result = _result_; -#line 64 "/home/jens/Source/shotwell/src/core/DataSet.vala" - return result; -#line 337 "DataSet.c" -} - - -gboolean -data_set_contains (DataSet* self, - DataObject* object) -{ - gboolean result = FALSE; - GeeHashSet* _tmp0_; -#line 67 "/home/jens/Source/shotwell/src/core/DataSet.vala" - g_return_val_if_fail (IS_DATA_SET (self), FALSE); -#line 67 "/home/jens/Source/shotwell/src/core/DataSet.vala" - g_return_val_if_fail (IS_DATA_OBJECT (object), FALSE); -#line 68 "/home/jens/Source/shotwell/src/core/DataSet.vala" - _tmp0_ = self->priv->hash_set; -#line 68 "/home/jens/Source/shotwell/src/core/DataSet.vala" - result = gee_abstract_collection_contains (G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, GEE_TYPE_ABSTRACT_COLLECTION, GeeAbstractCollection), object); -#line 68 "/home/jens/Source/shotwell/src/core/DataSet.vala" - return result; -#line 357 "DataSet.c" -} - - -inline gint -data_set_get_count (DataSet* self) -{ - gint result = 0; - SortedList* _tmp0_; -#line 71 "/home/jens/Source/shotwell/src/core/DataSet.vala" - g_return_val_if_fail (IS_DATA_SET (self), 0); -#line 72 "/home/jens/Source/shotwell/src/core/DataSet.vala" - _tmp0_ = self->priv->list; -#line 72 "/home/jens/Source/shotwell/src/core/DataSet.vala" - result = sorted_list_get_count (_tmp0_); -#line 72 "/home/jens/Source/shotwell/src/core/DataSet.vala" - return result; -#line 374 "DataSet.c" -} - - -static gboolean -_data_set_order_added_predicate_comparator_predicate (DataObject* object, - Alteration* alteration, - gpointer self) -{ - gboolean result; - result = data_set_order_added_predicate ((DataSet*) self, object, alteration); -#line 77 "/home/jens/Source/shotwell/src/core/DataSet.vala" - return result; -#line 387 "DataSet.c" -} - - -static gint64 -_data_set_order_added_comparator_comparator (void* a, - void* b, - gpointer self) -{ - gint64 result; - result = data_set_order_added_comparator ((DataSet*) self, a, b); -#line 78 "/home/jens/Source/shotwell/src/core/DataSet.vala" - return result; -#line 400 "DataSet.c" -} - - -void -data_set_reset_comparator (DataSet* self) -{ - SortedList* _tmp0_; -#line 75 "/home/jens/Source/shotwell/src/core/DataSet.vala" - g_return_if_fail (IS_DATA_SET (self)); -#line 76 "/home/jens/Source/shotwell/src/core/DataSet.vala" - self->priv->user_comparator = NULL; -#line 76 "/home/jens/Source/shotwell/src/core/DataSet.vala" - self->priv->user_comparator_target = NULL; -#line 77 "/home/jens/Source/shotwell/src/core/DataSet.vala" - self->priv->comparator_predicate = _data_set_order_added_predicate_comparator_predicate; -#line 77 "/home/jens/Source/shotwell/src/core/DataSet.vala" - self->priv->comparator_predicate_target = self; -#line 78 "/home/jens/Source/shotwell/src/core/DataSet.vala" - _tmp0_ = self->priv->list; -#line 78 "/home/jens/Source/shotwell/src/core/DataSet.vala" - sorted_list_resort (_tmp0_, _data_set_order_added_comparator_comparator, self); -#line 422 "DataSet.c" -} - - -Comparator -data_set_get_comparator (DataSet* self, - void** result_target) -{ - Comparator result = NULL; - Comparator _tmp0_; - void* _tmp0__target; - Comparator _tmp1_; - void* _tmp1__target; -#line 81 "/home/jens/Source/shotwell/src/core/DataSet.vala" - g_return_val_if_fail (IS_DATA_SET (self), NULL); -#line 82 "/home/jens/Source/shotwell/src/core/DataSet.vala" - _tmp0_ = self->priv->user_comparator; -#line 82 "/home/jens/Source/shotwell/src/core/DataSet.vala" - _tmp0__target = self->priv->user_comparator_target; -#line 82 "/home/jens/Source/shotwell/src/core/DataSet.vala" - _tmp1_ = _tmp0_; -#line 82 "/home/jens/Source/shotwell/src/core/DataSet.vala" - _tmp1__target = _tmp0__target; -#line 82 "/home/jens/Source/shotwell/src/core/DataSet.vala" - *result_target = _tmp1__target; -#line 82 "/home/jens/Source/shotwell/src/core/DataSet.vala" - result = _tmp1_; -#line 82 "/home/jens/Source/shotwell/src/core/DataSet.vala" - return result; -#line 451 "DataSet.c" -} - - -ComparatorPredicate -data_set_get_comparator_predicate (DataSet* self, - void** result_target) -{ - ComparatorPredicate result = NULL; - ComparatorPredicate _tmp0_; - void* _tmp0__target; - ComparatorPredicate _tmp1_; - void* _tmp1__target; -#line 85 "/home/jens/Source/shotwell/src/core/DataSet.vala" - g_return_val_if_fail (IS_DATA_SET (self), NULL); -#line 86 "/home/jens/Source/shotwell/src/core/DataSet.vala" - _tmp0_ = self->priv->comparator_predicate; -#line 86 "/home/jens/Source/shotwell/src/core/DataSet.vala" - _tmp0__target = self->priv->comparator_predicate_target; -#line 86 "/home/jens/Source/shotwell/src/core/DataSet.vala" - _tmp1_ = _tmp0_; -#line 86 "/home/jens/Source/shotwell/src/core/DataSet.vala" - _tmp1__target = _tmp0__target; -#line 86 "/home/jens/Source/shotwell/src/core/DataSet.vala" - *result_target = _tmp1__target; -#line 86 "/home/jens/Source/shotwell/src/core/DataSet.vala" - result = _tmp1_; -#line 86 "/home/jens/Source/shotwell/src/core/DataSet.vala" - return result; -#line 480 "DataSet.c" -} - - -static gint64 -_data_set_comparator_wrapper_comparator (void* a, - void* b, - gpointer self) -{ - gint64 result; - result = data_set_comparator_wrapper ((DataSet*) self, a, b); -#line 92 "/home/jens/Source/shotwell/src/core/DataSet.vala" - return result; -#line 493 "DataSet.c" -} - - -void -data_set_set_comparator (DataSet* self, - Comparator user_comparator, - void* user_comparator_target, - ComparatorPredicate comparator_predicate, - void* comparator_predicate_target) -{ - SortedList* _tmp0_; -#line 89 "/home/jens/Source/shotwell/src/core/DataSet.vala" - g_return_if_fail (IS_DATA_SET (self)); -#line 90 "/home/jens/Source/shotwell/src/core/DataSet.vala" - self->priv->user_comparator = user_comparator; -#line 90 "/home/jens/Source/shotwell/src/core/DataSet.vala" - self->priv->user_comparator_target = user_comparator_target; -#line 91 "/home/jens/Source/shotwell/src/core/DataSet.vala" - self->priv->comparator_predicate = comparator_predicate; -#line 91 "/home/jens/Source/shotwell/src/core/DataSet.vala" - self->priv->comparator_predicate_target = comparator_predicate_target; -#line 92 "/home/jens/Source/shotwell/src/core/DataSet.vala" - _tmp0_ = self->priv->list; -#line 92 "/home/jens/Source/shotwell/src/core/DataSet.vala" - sorted_list_resort (_tmp0_, _data_set_comparator_wrapper_comparator, self); -#line 519 "DataSet.c" -} - - -GeeList* -data_set_get_all (DataSet* self) -{ - GeeList* result = NULL; - SortedList* _tmp0_; - GeeList* _tmp1_; - GeeList* _tmp2_; -#line 95 "/home/jens/Source/shotwell/src/core/DataSet.vala" - g_return_val_if_fail (IS_DATA_SET (self), NULL); -#line 96 "/home/jens/Source/shotwell/src/core/DataSet.vala" - _tmp0_ = self->priv->list; -#line 96 "/home/jens/Source/shotwell/src/core/DataSet.vala" - _tmp1_ = sorted_list_get_read_only_view_as_list (_tmp0_); -#line 96 "/home/jens/Source/shotwell/src/core/DataSet.vala" - _tmp2_ = _tmp1_; -#line 96 "/home/jens/Source/shotwell/src/core/DataSet.vala" - result = _tmp2_; -#line 96 "/home/jens/Source/shotwell/src/core/DataSet.vala" - return result; -#line 542 "DataSet.c" -} - - -DataSet* -data_set_copy (DataSet* self) -{ - DataSet* result = NULL; - DataSet* clone = NULL; - DataSet* _tmp0_; - SortedList* _tmp1_; - SortedList* _tmp2_; - GeeHashSet* _tmp3_; - GeeHashSet* _tmp4_; -#line 99 "/home/jens/Source/shotwell/src/core/DataSet.vala" - g_return_val_if_fail (IS_DATA_SET (self), NULL); -#line 100 "/home/jens/Source/shotwell/src/core/DataSet.vala" - _tmp0_ = data_set_new (); -#line 100 "/home/jens/Source/shotwell/src/core/DataSet.vala" - clone = _tmp0_; -#line 101 "/home/jens/Source/shotwell/src/core/DataSet.vala" - _tmp1_ = self->priv->list; -#line 101 "/home/jens/Source/shotwell/src/core/DataSet.vala" - _tmp2_ = sorted_list_copy (_tmp1_); -#line 101 "/home/jens/Source/shotwell/src/core/DataSet.vala" - _g_object_unref0 (clone->priv->list); -#line 101 "/home/jens/Source/shotwell/src/core/DataSet.vala" - clone->priv->list = _tmp2_; -#line 102 "/home/jens/Source/shotwell/src/core/DataSet.vala" - _tmp3_ = clone->priv->hash_set; -#line 102 "/home/jens/Source/shotwell/src/core/DataSet.vala" - _tmp4_ = self->priv->hash_set; -#line 102 "/home/jens/Source/shotwell/src/core/DataSet.vala" - gee_collection_add_all (G_TYPE_CHECK_INSTANCE_CAST (_tmp3_, GEE_TYPE_COLLECTION, GeeCollection), G_TYPE_CHECK_INSTANCE_CAST (_tmp4_, GEE_TYPE_COLLECTION, GeeCollection)); -#line 104 "/home/jens/Source/shotwell/src/core/DataSet.vala" - result = clone; -#line 104 "/home/jens/Source/shotwell/src/core/DataSet.vala" - return result; -#line 580 "DataSet.c" -} - - -DataObject* -data_set_get_at (DataSet* self, - gint index) -{ - DataObject* result = NULL; - SortedList* _tmp0_; - gpointer _tmp1_; -#line 107 "/home/jens/Source/shotwell/src/core/DataSet.vala" - g_return_val_if_fail (IS_DATA_SET (self), NULL); -#line 108 "/home/jens/Source/shotwell/src/core/DataSet.vala" - _tmp0_ = self->priv->list; -#line 108 "/home/jens/Source/shotwell/src/core/DataSet.vala" - _tmp1_ = sorted_list_get_at (_tmp0_, index); -#line 108 "/home/jens/Source/shotwell/src/core/DataSet.vala" - result = (DataObject*) _tmp1_; -#line 108 "/home/jens/Source/shotwell/src/core/DataSet.vala" - return result; -#line 601 "DataSet.c" -} - - -gint -data_set_index_of (DataSet* self, - DataObject* object) -{ - gint result = 0; - SortedList* _tmp0_; - GEqualFunc _tmp1_; -#line 111 "/home/jens/Source/shotwell/src/core/DataSet.vala" - g_return_val_if_fail (IS_DATA_SET (self), 0); -#line 111 "/home/jens/Source/shotwell/src/core/DataSet.vala" - g_return_val_if_fail (IS_DATA_OBJECT (object), 0); -#line 112 "/home/jens/Source/shotwell/src/core/DataSet.vala" - _tmp0_ = self->priv->list; -#line 112 "/home/jens/Source/shotwell/src/core/DataSet.vala" - _tmp1_ = g_direct_equal; -#line 112 "/home/jens/Source/shotwell/src/core/DataSet.vala" - result = sorted_list_locate (_tmp0_, object, FALSE, _tmp1_); -#line 112 "/home/jens/Source/shotwell/src/core/DataSet.vala" - return result; -#line 624 "DataSet.c" -} - - -gboolean -data_set_add (DataSet* self, - DataObject* object) -{ - gboolean result = FALSE; - SortedList* _tmp0_; - GeeHashSet* _tmp1_; -#line 116 "/home/jens/Source/shotwell/src/core/DataSet.vala" - g_return_val_if_fail (IS_DATA_SET (self), FALSE); -#line 116 "/home/jens/Source/shotwell/src/core/DataSet.vala" - g_return_val_if_fail (IS_DATA_OBJECT (object), FALSE); -#line 117 "/home/jens/Source/shotwell/src/core/DataSet.vala" - _tmp0_ = self->priv->list; -#line 117 "/home/jens/Source/shotwell/src/core/DataSet.vala" - if (!gee_collection_add (G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, GEE_TYPE_COLLECTION, GeeCollection), object)) { -#line 118 "/home/jens/Source/shotwell/src/core/DataSet.vala" - result = FALSE; -#line 118 "/home/jens/Source/shotwell/src/core/DataSet.vala" - return result; -#line 647 "DataSet.c" - } -#line 120 "/home/jens/Source/shotwell/src/core/DataSet.vala" - _tmp1_ = self->priv->hash_set; -#line 120 "/home/jens/Source/shotwell/src/core/DataSet.vala" - if (!gee_abstract_collection_add (G_TYPE_CHECK_INSTANCE_CAST (_tmp1_, GEE_TYPE_ABSTRACT_COLLECTION, GeeAbstractCollection), object)) { -#line 653 "DataSet.c" - SortedList* _tmp2_; -#line 122 "/home/jens/Source/shotwell/src/core/DataSet.vala" - _tmp2_ = self->priv->list; -#line 122 "/home/jens/Source/shotwell/src/core/DataSet.vala" - gee_collection_remove (G_TYPE_CHECK_INSTANCE_CAST (_tmp2_, GEE_TYPE_COLLECTION, GeeCollection), object); -#line 124 "/home/jens/Source/shotwell/src/core/DataSet.vala" - result = FALSE; -#line 124 "/home/jens/Source/shotwell/src/core/DataSet.vala" - return result; -#line 663 "DataSet.c" - } -#line 127 "/home/jens/Source/shotwell/src/core/DataSet.vala" - result = TRUE; -#line 127 "/home/jens/Source/shotwell/src/core/DataSet.vala" - return result; -#line 669 "DataSet.c" -} - - -gboolean -data_set_add_many (DataSet* self, - GeeCollection* objects) -{ - gboolean result = FALSE; - gint count = 0; - gint _tmp0_; - gint _tmp1_; - gint _tmp2_; - SortedList* _tmp3_; - GeeHashSet* _tmp4_; -#line 131 "/home/jens/Source/shotwell/src/core/DataSet.vala" - g_return_val_if_fail (IS_DATA_SET (self), FALSE); -#line 131 "/home/jens/Source/shotwell/src/core/DataSet.vala" - g_return_val_if_fail (GEE_IS_COLLECTION (objects), FALSE); -#line 132 "/home/jens/Source/shotwell/src/core/DataSet.vala" - _tmp0_ = gee_collection_get_size (objects); -#line 132 "/home/jens/Source/shotwell/src/core/DataSet.vala" - _tmp1_ = _tmp0_; -#line 132 "/home/jens/Source/shotwell/src/core/DataSet.vala" - count = _tmp1_; -#line 133 "/home/jens/Source/shotwell/src/core/DataSet.vala" - _tmp2_ = count; -#line 133 "/home/jens/Source/shotwell/src/core/DataSet.vala" - if (_tmp2_ == 0) { -#line 134 "/home/jens/Source/shotwell/src/core/DataSet.vala" - result = TRUE; -#line 134 "/home/jens/Source/shotwell/src/core/DataSet.vala" - return result; -#line 702 "DataSet.c" - } -#line 136 "/home/jens/Source/shotwell/src/core/DataSet.vala" - _tmp3_ = self->priv->list; -#line 136 "/home/jens/Source/shotwell/src/core/DataSet.vala" - if (!gee_collection_add_all (G_TYPE_CHECK_INSTANCE_CAST (_tmp3_, GEE_TYPE_COLLECTION, GeeCollection), objects)) { -#line 137 "/home/jens/Source/shotwell/src/core/DataSet.vala" - result = FALSE; -#line 137 "/home/jens/Source/shotwell/src/core/DataSet.vala" - return result; -#line 712 "DataSet.c" - } -#line 139 "/home/jens/Source/shotwell/src/core/DataSet.vala" - _tmp4_ = self->priv->hash_set; -#line 139 "/home/jens/Source/shotwell/src/core/DataSet.vala" - if (!gee_collection_add_all (G_TYPE_CHECK_INSTANCE_CAST (_tmp4_, GEE_TYPE_COLLECTION, GeeCollection), objects)) { -#line 718 "DataSet.c" - SortedList* _tmp5_; -#line 141 "/home/jens/Source/shotwell/src/core/DataSet.vala" - _tmp5_ = self->priv->list; -#line 141 "/home/jens/Source/shotwell/src/core/DataSet.vala" - gee_collection_remove_all (G_TYPE_CHECK_INSTANCE_CAST (_tmp5_, GEE_TYPE_COLLECTION, GeeCollection), objects); -#line 143 "/home/jens/Source/shotwell/src/core/DataSet.vala" - result = FALSE; -#line 143 "/home/jens/Source/shotwell/src/core/DataSet.vala" - return result; -#line 728 "DataSet.c" - } -#line 146 "/home/jens/Source/shotwell/src/core/DataSet.vala" - result = TRUE; -#line 146 "/home/jens/Source/shotwell/src/core/DataSet.vala" - return result; -#line 734 "DataSet.c" -} - - -gboolean -data_set_remove (DataSet* self, - DataObject* object) -{ - gboolean result = FALSE; - gboolean success = FALSE; - SortedList* _tmp0_; - GeeHashSet* _tmp1_; -#line 149 "/home/jens/Source/shotwell/src/core/DataSet.vala" - g_return_val_if_fail (IS_DATA_SET (self), FALSE); -#line 149 "/home/jens/Source/shotwell/src/core/DataSet.vala" - g_return_val_if_fail (IS_DATA_OBJECT (object), FALSE); -#line 150 "/home/jens/Source/shotwell/src/core/DataSet.vala" - success = TRUE; -#line 152 "/home/jens/Source/shotwell/src/core/DataSet.vala" - _tmp0_ = self->priv->list; -#line 152 "/home/jens/Source/shotwell/src/core/DataSet.vala" - if (!gee_collection_remove (G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, GEE_TYPE_COLLECTION, GeeCollection), object)) { -#line 153 "/home/jens/Source/shotwell/src/core/DataSet.vala" - success = FALSE; -#line 758 "DataSet.c" - } -#line 155 "/home/jens/Source/shotwell/src/core/DataSet.vala" - _tmp1_ = self->priv->hash_set; -#line 155 "/home/jens/Source/shotwell/src/core/DataSet.vala" - if (!gee_abstract_collection_remove (G_TYPE_CHECK_INSTANCE_CAST (_tmp1_, GEE_TYPE_ABSTRACT_COLLECTION, GeeAbstractCollection), object)) { -#line 156 "/home/jens/Source/shotwell/src/core/DataSet.vala" - success = FALSE; -#line 766 "DataSet.c" - } -#line 158 "/home/jens/Source/shotwell/src/core/DataSet.vala" - result = success; -#line 158 "/home/jens/Source/shotwell/src/core/DataSet.vala" - return result; -#line 772 "DataSet.c" -} - - -gboolean -data_set_remove_many (DataSet* self, - GeeCollection* objects) -{ - gboolean result = FALSE; - gboolean success = FALSE; - SortedList* _tmp0_; - GeeHashSet* _tmp1_; -#line 161 "/home/jens/Source/shotwell/src/core/DataSet.vala" - g_return_val_if_fail (IS_DATA_SET (self), FALSE); -#line 161 "/home/jens/Source/shotwell/src/core/DataSet.vala" - g_return_val_if_fail (GEE_IS_COLLECTION (objects), FALSE); -#line 162 "/home/jens/Source/shotwell/src/core/DataSet.vala" - success = TRUE; -#line 164 "/home/jens/Source/shotwell/src/core/DataSet.vala" - _tmp0_ = self->priv->list; -#line 164 "/home/jens/Source/shotwell/src/core/DataSet.vala" - if (!gee_collection_remove_all (G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, GEE_TYPE_COLLECTION, GeeCollection), objects)) { -#line 165 "/home/jens/Source/shotwell/src/core/DataSet.vala" - success = FALSE; -#line 796 "DataSet.c" - } -#line 167 "/home/jens/Source/shotwell/src/core/DataSet.vala" - _tmp1_ = self->priv->hash_set; -#line 167 "/home/jens/Source/shotwell/src/core/DataSet.vala" - if (!gee_collection_remove_all (G_TYPE_CHECK_INSTANCE_CAST (_tmp1_, GEE_TYPE_COLLECTION, GeeCollection), objects)) { -#line 168 "/home/jens/Source/shotwell/src/core/DataSet.vala" - success = FALSE; -#line 804 "DataSet.c" - } -#line 170 "/home/jens/Source/shotwell/src/core/DataSet.vala" - result = success; -#line 170 "/home/jens/Source/shotwell/src/core/DataSet.vala" - return result; -#line 810 "DataSet.c" -} - - -gboolean -data_set_resort_object (DataSet* self, - DataObject* object, - Alteration* alteration) -{ - gboolean result = FALSE; - gboolean _tmp0_ = FALSE; - gboolean _tmp1_ = FALSE; - ComparatorPredicate _tmp2_; - void* _tmp2__target; - SortedList* _tmp4_; -#line 174 "/home/jens/Source/shotwell/src/core/DataSet.vala" - g_return_val_if_fail (IS_DATA_SET (self), FALSE); -#line 174 "/home/jens/Source/shotwell/src/core/DataSet.vala" - g_return_val_if_fail (IS_DATA_OBJECT (object), FALSE); -#line 174 "/home/jens/Source/shotwell/src/core/DataSet.vala" - g_return_val_if_fail ((alteration == NULL) || IS_ALTERATION (alteration), FALSE); -#line 175 "/home/jens/Source/shotwell/src/core/DataSet.vala" - _tmp2_ = self->priv->comparator_predicate; -#line 175 "/home/jens/Source/shotwell/src/core/DataSet.vala" - _tmp2__target = self->priv->comparator_predicate_target; -#line 175 "/home/jens/Source/shotwell/src/core/DataSet.vala" - if (_tmp2_ != NULL) { -#line 175 "/home/jens/Source/shotwell/src/core/DataSet.vala" - _tmp1_ = alteration != NULL; -#line 839 "DataSet.c" - } else { -#line 175 "/home/jens/Source/shotwell/src/core/DataSet.vala" - _tmp1_ = FALSE; -#line 843 "DataSet.c" - } -#line 175 "/home/jens/Source/shotwell/src/core/DataSet.vala" - if (_tmp1_) { -#line 847 "DataSet.c" - ComparatorPredicate _tmp3_; - void* _tmp3__target; -#line 176 "/home/jens/Source/shotwell/src/core/DataSet.vala" - _tmp3_ = self->priv->comparator_predicate; -#line 176 "/home/jens/Source/shotwell/src/core/DataSet.vala" - _tmp3__target = self->priv->comparator_predicate_target; -#line 176 "/home/jens/Source/shotwell/src/core/DataSet.vala" - _tmp0_ = !_tmp3_ (object, alteration, _tmp3__target); -#line 856 "DataSet.c" - } else { -#line 175 "/home/jens/Source/shotwell/src/core/DataSet.vala" - _tmp0_ = FALSE; -#line 860 "DataSet.c" - } -#line 175 "/home/jens/Source/shotwell/src/core/DataSet.vala" - if (_tmp0_) { -#line 177 "/home/jens/Source/shotwell/src/core/DataSet.vala" - result = FALSE; -#line 177 "/home/jens/Source/shotwell/src/core/DataSet.vala" - return result; -#line 868 "DataSet.c" - } -#line 180 "/home/jens/Source/shotwell/src/core/DataSet.vala" - _tmp4_ = self->priv->list; -#line 180 "/home/jens/Source/shotwell/src/core/DataSet.vala" - result = sorted_list_resort_item (_tmp4_, object); -#line 180 "/home/jens/Source/shotwell/src/core/DataSet.vala" - return result; -#line 876 "DataSet.c" -} - - -static void -value_data_set_init (GValue* value) -{ -#line 29 "/home/jens/Source/shotwell/src/core/DataSet.vala" - value->data[0].v_pointer = NULL; -#line 885 "DataSet.c" -} - - -static void -value_data_set_free_value (GValue* value) -{ -#line 29 "/home/jens/Source/shotwell/src/core/DataSet.vala" - if (value->data[0].v_pointer) { -#line 29 "/home/jens/Source/shotwell/src/core/DataSet.vala" - data_set_unref (value->data[0].v_pointer); -#line 896 "DataSet.c" - } -} - - -static void -value_data_set_copy_value (const GValue* src_value, - GValue* dest_value) -{ -#line 29 "/home/jens/Source/shotwell/src/core/DataSet.vala" - if (src_value->data[0].v_pointer) { -#line 29 "/home/jens/Source/shotwell/src/core/DataSet.vala" - dest_value->data[0].v_pointer = data_set_ref (src_value->data[0].v_pointer); -#line 909 "DataSet.c" - } else { -#line 29 "/home/jens/Source/shotwell/src/core/DataSet.vala" - dest_value->data[0].v_pointer = NULL; -#line 913 "DataSet.c" - } -} - - -static gpointer -value_data_set_peek_pointer (const GValue* value) -{ -#line 29 "/home/jens/Source/shotwell/src/core/DataSet.vala" - return value->data[0].v_pointer; -#line 923 "DataSet.c" -} - - -static gchar* -value_data_set_collect_value (GValue* value, - guint n_collect_values, - GTypeCValue* collect_values, - guint collect_flags) -{ -#line 29 "/home/jens/Source/shotwell/src/core/DataSet.vala" - if (collect_values[0].v_pointer) { -#line 935 "DataSet.c" - DataSet * object; - object = collect_values[0].v_pointer; -#line 29 "/home/jens/Source/shotwell/src/core/DataSet.vala" - if (object->parent_instance.g_class == NULL) { -#line 29 "/home/jens/Source/shotwell/src/core/DataSet.vala" - return g_strconcat ("invalid unclassed object pointer for value type `", G_VALUE_TYPE_NAME (value), "'", NULL); -#line 942 "DataSet.c" - } else if (!g_value_type_compatible (G_TYPE_FROM_INSTANCE (object), G_VALUE_TYPE (value))) { -#line 29 "/home/jens/Source/shotwell/src/core/DataSet.vala" - return g_strconcat ("invalid object type `", g_type_name (G_TYPE_FROM_INSTANCE (object)), "' for value type `", G_VALUE_TYPE_NAME (value), "'", NULL); -#line 946 "DataSet.c" - } -#line 29 "/home/jens/Source/shotwell/src/core/DataSet.vala" - value->data[0].v_pointer = data_set_ref (object); -#line 950 "DataSet.c" - } else { -#line 29 "/home/jens/Source/shotwell/src/core/DataSet.vala" - value->data[0].v_pointer = NULL; -#line 954 "DataSet.c" - } -#line 29 "/home/jens/Source/shotwell/src/core/DataSet.vala" - return NULL; -#line 958 "DataSet.c" -} - - -static gchar* -value_data_set_lcopy_value (const GValue* value, - guint n_collect_values, - GTypeCValue* collect_values, - guint collect_flags) -{ - DataSet ** object_p; - object_p = collect_values[0].v_pointer; -#line 29 "/home/jens/Source/shotwell/src/core/DataSet.vala" - if (!object_p) { -#line 29 "/home/jens/Source/shotwell/src/core/DataSet.vala" - return g_strdup_printf ("value location for `%s' passed as NULL", G_VALUE_TYPE_NAME (value)); -#line 974 "DataSet.c" - } -#line 29 "/home/jens/Source/shotwell/src/core/DataSet.vala" - if (!value->data[0].v_pointer) { -#line 29 "/home/jens/Source/shotwell/src/core/DataSet.vala" - *object_p = NULL; -#line 980 "DataSet.c" - } else if (collect_flags & G_VALUE_NOCOPY_CONTENTS) { -#line 29 "/home/jens/Source/shotwell/src/core/DataSet.vala" - *object_p = value->data[0].v_pointer; -#line 984 "DataSet.c" - } else { -#line 29 "/home/jens/Source/shotwell/src/core/DataSet.vala" - *object_p = data_set_ref (value->data[0].v_pointer); -#line 988 "DataSet.c" - } -#line 29 "/home/jens/Source/shotwell/src/core/DataSet.vala" - return NULL; -#line 992 "DataSet.c" -} - - -GParamSpec* -param_spec_data_set (const gchar* name, - const gchar* nick, - const gchar* blurb, - GType object_type, - GParamFlags flags) -{ - ParamSpecDataSet* spec; -#line 29 "/home/jens/Source/shotwell/src/core/DataSet.vala" - g_return_val_if_fail (g_type_is_a (object_type, TYPE_DATA_SET), NULL); -#line 29 "/home/jens/Source/shotwell/src/core/DataSet.vala" - spec = g_param_spec_internal (G_TYPE_PARAM_OBJECT, name, nick, blurb, flags); -#line 29 "/home/jens/Source/shotwell/src/core/DataSet.vala" - G_PARAM_SPEC (spec)->value_type = object_type; -#line 29 "/home/jens/Source/shotwell/src/core/DataSet.vala" - return G_PARAM_SPEC (spec); -#line 1012 "DataSet.c" -} - - -gpointer -value_get_data_set (const GValue* value) -{ -#line 29 "/home/jens/Source/shotwell/src/core/DataSet.vala" - g_return_val_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, TYPE_DATA_SET), NULL); -#line 29 "/home/jens/Source/shotwell/src/core/DataSet.vala" - return value->data[0].v_pointer; -#line 1023 "DataSet.c" -} - - -void -value_set_data_set (GValue* value, - gpointer v_object) -{ - DataSet * old; -#line 29 "/home/jens/Source/shotwell/src/core/DataSet.vala" - g_return_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, TYPE_DATA_SET)); -#line 29 "/home/jens/Source/shotwell/src/core/DataSet.vala" - old = value->data[0].v_pointer; -#line 29 "/home/jens/Source/shotwell/src/core/DataSet.vala" - if (v_object) { -#line 29 "/home/jens/Source/shotwell/src/core/DataSet.vala" - g_return_if_fail (G_TYPE_CHECK_INSTANCE_TYPE (v_object, TYPE_DATA_SET)); -#line 29 "/home/jens/Source/shotwell/src/core/DataSet.vala" - g_return_if_fail (g_value_type_compatible (G_TYPE_FROM_INSTANCE (v_object), G_VALUE_TYPE (value))); -#line 29 "/home/jens/Source/shotwell/src/core/DataSet.vala" - value->data[0].v_pointer = v_object; -#line 29 "/home/jens/Source/shotwell/src/core/DataSet.vala" - data_set_ref (value->data[0].v_pointer); -#line 1046 "DataSet.c" - } else { -#line 29 "/home/jens/Source/shotwell/src/core/DataSet.vala" - value->data[0].v_pointer = NULL; -#line 1050 "DataSet.c" - } -#line 29 "/home/jens/Source/shotwell/src/core/DataSet.vala" - if (old) { -#line 29 "/home/jens/Source/shotwell/src/core/DataSet.vala" - data_set_unref (old); -#line 1056 "DataSet.c" - } -} - - -void -value_take_data_set (GValue* value, - gpointer v_object) -{ - DataSet * old; -#line 29 "/home/jens/Source/shotwell/src/core/DataSet.vala" - g_return_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, TYPE_DATA_SET)); -#line 29 "/home/jens/Source/shotwell/src/core/DataSet.vala" - old = value->data[0].v_pointer; -#line 29 "/home/jens/Source/shotwell/src/core/DataSet.vala" - if (v_object) { -#line 29 "/home/jens/Source/shotwell/src/core/DataSet.vala" - g_return_if_fail (G_TYPE_CHECK_INSTANCE_TYPE (v_object, TYPE_DATA_SET)); -#line 29 "/home/jens/Source/shotwell/src/core/DataSet.vala" - g_return_if_fail (g_value_type_compatible (G_TYPE_FROM_INSTANCE (v_object), G_VALUE_TYPE (value))); -#line 29 "/home/jens/Source/shotwell/src/core/DataSet.vala" - value->data[0].v_pointer = v_object; -#line 1078 "DataSet.c" - } else { -#line 29 "/home/jens/Source/shotwell/src/core/DataSet.vala" - value->data[0].v_pointer = NULL; -#line 1082 "DataSet.c" - } -#line 29 "/home/jens/Source/shotwell/src/core/DataSet.vala" - if (old) { -#line 29 "/home/jens/Source/shotwell/src/core/DataSet.vala" - data_set_unref (old); -#line 1088 "DataSet.c" - } -} - - -static void -data_set_class_init (DataSetClass * klass) -{ -#line 29 "/home/jens/Source/shotwell/src/core/DataSet.vala" - data_set_parent_class = g_type_class_peek_parent (klass); -#line 29 "/home/jens/Source/shotwell/src/core/DataSet.vala" - ((DataSetClass *) klass)->finalize = data_set_finalize; -#line 29 "/home/jens/Source/shotwell/src/core/DataSet.vala" - g_type_class_add_private (klass, sizeof (DataSetPrivate)); -#line 1102 "DataSet.c" -} - - -static void -data_set_instance_init (DataSet * self) -{ - SortedList* _tmp0_; - GeeHashSet* _tmp1_; -#line 29 "/home/jens/Source/shotwell/src/core/DataSet.vala" - self->priv = DATA_SET_GET_PRIVATE (self); -#line 30 "/home/jens/Source/shotwell/src/core/DataSet.vala" - _tmp0_ = sorted_list_new (TYPE_DATA_OBJECT, (GBoxedCopyFunc) g_object_ref, (GDestroyNotify) g_object_unref, NULL, NULL); -#line 30 "/home/jens/Source/shotwell/src/core/DataSet.vala" - self->priv->list = _tmp0_; -#line 31 "/home/jens/Source/shotwell/src/core/DataSet.vala" - _tmp1_ = gee_hash_set_new (TYPE_DATA_OBJECT, (GBoxedCopyFunc) g_object_ref, (GDestroyNotify) g_object_unref, NULL, NULL, NULL, NULL, NULL, NULL); -#line 31 "/home/jens/Source/shotwell/src/core/DataSet.vala" - self->priv->hash_set = _tmp1_; -#line 32 "/home/jens/Source/shotwell/src/core/DataSet.vala" - self->priv->user_comparator = NULL; -#line 32 "/home/jens/Source/shotwell/src/core/DataSet.vala" - self->priv->user_comparator_target = self; -#line 33 "/home/jens/Source/shotwell/src/core/DataSet.vala" - self->priv->comparator_predicate = NULL; -#line 33 "/home/jens/Source/shotwell/src/core/DataSet.vala" - self->priv->comparator_predicate_target = self; -#line 29 "/home/jens/Source/shotwell/src/core/DataSet.vala" - self->ref_count = 1; -#line 1131 "DataSet.c" -} - - -static void -data_set_finalize (DataSet * obj) -{ - DataSet * self; -#line 29 "/home/jens/Source/shotwell/src/core/DataSet.vala" - self = G_TYPE_CHECK_INSTANCE_CAST (obj, TYPE_DATA_SET, DataSet); -#line 29 "/home/jens/Source/shotwell/src/core/DataSet.vala" - g_signal_handlers_destroy (self); -#line 30 "/home/jens/Source/shotwell/src/core/DataSet.vala" - _g_object_unref0 (self->priv->list); -#line 31 "/home/jens/Source/shotwell/src/core/DataSet.vala" - _g_object_unref0 (self->priv->hash_set); -#line 1147 "DataSet.c" -} - - -GType -data_set_get_type (void) -{ - static volatile gsize data_set_type_id__volatile = 0; - if (g_once_init_enter (&data_set_type_id__volatile)) { - static const GTypeValueTable g_define_type_value_table = { value_data_set_init, value_data_set_free_value, value_data_set_copy_value, value_data_set_peek_pointer, "p", value_data_set_collect_value, "p", value_data_set_lcopy_value }; - static const GTypeInfo g_define_type_info = { sizeof (DataSetClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) data_set_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (DataSet), 0, (GInstanceInitFunc) data_set_instance_init, &g_define_type_value_table }; - static const GTypeFundamentalInfo g_define_type_fundamental_info = { (G_TYPE_FLAG_CLASSED | G_TYPE_FLAG_INSTANTIATABLE | G_TYPE_FLAG_DERIVABLE | G_TYPE_FLAG_DEEP_DERIVABLE) }; - GType data_set_type_id; - data_set_type_id = g_type_register_fundamental (g_type_fundamental_next (), "DataSet", &g_define_type_info, &g_define_type_fundamental_info, 0); - g_once_init_leave (&data_set_type_id__volatile, data_set_type_id); - } - return data_set_type_id__volatile; -} - - -gpointer -data_set_ref (gpointer instance) -{ - DataSet * self; - self = instance; -#line 29 "/home/jens/Source/shotwell/src/core/DataSet.vala" - g_atomic_int_inc (&self->ref_count); -#line 29 "/home/jens/Source/shotwell/src/core/DataSet.vala" - return instance; -#line 1176 "DataSet.c" -} - - -void -data_set_unref (gpointer instance) -{ - DataSet * self; - self = instance; -#line 29 "/home/jens/Source/shotwell/src/core/DataSet.vala" - if (g_atomic_int_dec_and_test (&self->ref_count)) { -#line 29 "/home/jens/Source/shotwell/src/core/DataSet.vala" - DATA_SET_GET_CLASS (self)->finalize (self); -#line 29 "/home/jens/Source/shotwell/src/core/DataSet.vala" - g_type_free_instance ((GTypeInstance *) self); -#line 1191 "DataSet.c" - } -} - - - diff --git a/src/core/DataSource.c b/src/core/DataSource.c deleted file mode 100644 index 3d7ecf5..0000000 --- a/src/core/DataSource.c +++ /dev/null @@ -1,5127 +0,0 @@ -/* DataSource.c generated by valac 0.40.4, the Vala compiler - * generated from DataSource.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. - */ -/**/ -/* DataSource*/ -/* */ -/* A DataSource is an object that is unique throughout the system. DataSources*/ -/* commonly have external and/or persistent representations, hence they have a notion of being*/ -/* destroyed (versus removed or freed). Several DataViews may exist that reference a single*/ -/* DataSource. Note that DataSources MUST be destroyed (rather than simply removed) from their*/ -/* SourceCollection, and that they MUST be destroyed via their SourceCollection (rather than*/ -/* calling DataSource.destroy() directly.)*/ -/**/ -/* Destroying a DataSource indicates it should remove all secondary and tertiary structures (such*/ -/* as thumbnails) and any records pointing to its backing store. SourceCollection.destroy_marked()*/ -/* has a parameter indicating if the backing should be destroyed as well; that is when*/ -/* internal_delete_backing() is called.*/ -/**/ -/* There are no provisions (currently) for a DataSource to be removed from its SourceCollection*/ -/* without destroying its backing and/or secondary and tertiary structures. DataSources are intended*/ -/* to go to the grave with their SourceCollection otherwise. If a need arises for a DataSource to*/ -/* be peaceably removed from its SourceCollection, code will need to be written. SourceSnapshots*/ -/* may be one solution to this problem.*/ -/**/ -/* Some DataSources cannot be reconstituted (for example, if its backing file is deleted). In*/ -/* that case, dehydrate() should return null. When reconstituted, it is the responsibility of the*/ -/* implementation to ensure an exact clone is produced, minus any details that are not relevant or*/ -/* exposed (such as a database ID).*/ -/**/ -/* If other DataSources refer to this DataSource, their state will *not* be */ -/* saved/restored. This must be achieved via other means. However, implementations *should**/ -/* track when changes to external state would break the proxy and call notify_broken();*/ -/**/ - - -#include <glib.h> -#include <glib-object.h> -#include <stdlib.h> -#include <string.h> -#include <gee.h> -#include <gobject/gvaluecollector.h> - - -#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; -typedef struct _DataObjectPrivate DataObjectPrivate; - -#define TYPE_ALTERATION (alteration_get_type ()) -#define ALTERATION(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_ALTERATION, Alteration)) -#define ALTERATION_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_ALTERATION, AlterationClass)) -#define IS_ALTERATION(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_ALTERATION)) -#define IS_ALTERATION_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_ALTERATION)) -#define ALTERATION_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_ALTERATION, AlterationClass)) - -typedef struct _Alteration Alteration; -typedef struct _AlterationClass AlterationClass; - -#define TYPE_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_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; -typedef struct _DataSourcePrivate DataSourcePrivate; - -#define TYPE_SOURCE_HOLDING_TANK (source_holding_tank_get_type ()) -#define SOURCE_HOLDING_TANK(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_SOURCE_HOLDING_TANK, SourceHoldingTank)) -#define SOURCE_HOLDING_TANK_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_SOURCE_HOLDING_TANK, SourceHoldingTankClass)) -#define IS_SOURCE_HOLDING_TANK(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_SOURCE_HOLDING_TANK)) -#define IS_SOURCE_HOLDING_TANK_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_SOURCE_HOLDING_TANK)) -#define SOURCE_HOLDING_TANK_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_SOURCE_HOLDING_TANK, SourceHoldingTankClass)) - -typedef struct _SourceHoldingTank SourceHoldingTank; -typedef struct _SourceHoldingTankClass SourceHoldingTankClass; - -#define TYPE_SOURCE_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_SOURCE_SNAPSHOT (source_snapshot_get_type ()) -#define SOURCE_SNAPSHOT(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_SOURCE_SNAPSHOT, SourceSnapshot)) -#define SOURCE_SNAPSHOT_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_SOURCE_SNAPSHOT, SourceSnapshotClass)) -#define IS_SOURCE_SNAPSHOT(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_SOURCE_SNAPSHOT)) -#define IS_SOURCE_SNAPSHOT_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_SOURCE_SNAPSHOT)) -#define SOURCE_SNAPSHOT_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_SOURCE_SNAPSHOT, SourceSnapshotClass)) - -typedef struct _SourceSnapshot SourceSnapshot; -typedef struct _SourceSnapshotClass SourceSnapshotClass; - -#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; -enum { - DATA_SOURCE_0_PROPERTY, - DATA_SOURCE_NUM_PROPERTIES -}; -static GParamSpec* data_source_properties[DATA_SOURCE_NUM_PROPERTIES]; -#define _source_holding_tank_unref0(var) ((var == NULL) ? NULL : (var = (source_holding_tank_unref (var), NULL))) -#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL))) -#define _data_collection_unref0(var) ((var == NULL) ? NULL : (var = (data_collection_unref (var), NULL))) -#define _g_free0(var) (var = (g_free (var), NULL)) - -#define TYPE_SOURCE_BACKLINK (source_backlink_get_type ()) -#define SOURCE_BACKLINK(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_SOURCE_BACKLINK, SourceBacklink)) -#define SOURCE_BACKLINK_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_SOURCE_BACKLINK, SourceBacklinkClass)) -#define IS_SOURCE_BACKLINK(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_SOURCE_BACKLINK)) -#define IS_SOURCE_BACKLINK_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_SOURCE_BACKLINK)) -#define SOURCE_BACKLINK_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_SOURCE_BACKLINK, SourceBacklinkClass)) - -typedef struct _SourceBacklink SourceBacklink; -typedef struct _SourceBacklinkClass SourceBacklinkClass; -#define _source_backlink_unref0(var) ((var == NULL) ? NULL : (var = (source_backlink_unref (var), NULL))) -#define _g_string_free0(var) ((var == NULL) ? NULL : (var = (g_string_free (var, TRUE), NULL))) -#define _g_error_free0(var) ((var == NULL) ? NULL : (var = (g_error_free (var), NULL))) -enum { - DATA_SOURCE_UNLINKED_SIGNAL, - DATA_SOURCE_RELINKED_SIGNAL, - DATA_SOURCE_DESTROYED_SIGNAL, - DATA_SOURCE_NUM_SIGNALS -}; -static guint data_source_signals[DATA_SOURCE_NUM_SIGNALS] = {0}; -typedef struct _SourceSnapshotPrivate SourceSnapshotPrivate; -typedef struct _ParamSpecSourceSnapshot ParamSpecSourceSnapshot; -enum { - SOURCE_SNAPSHOT_BROKEN_SIGNAL, - SOURCE_SNAPSHOT_NUM_SIGNALS -}; -static guint source_snapshot_signals[SOURCE_SNAPSHOT_NUM_SIGNALS] = {0}; -typedef struct _SourceBacklinkPrivate SourceBacklinkPrivate; -typedef struct _ParamSpecSourceBacklink ParamSpecSourceBacklink; - -#define TYPE_SOURCE_PROXY (source_proxy_get_type ()) -#define SOURCE_PROXY(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_SOURCE_PROXY, SourceProxy)) -#define SOURCE_PROXY_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_SOURCE_PROXY, SourceProxyClass)) -#define IS_SOURCE_PROXY(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_SOURCE_PROXY)) -#define IS_SOURCE_PROXY_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_SOURCE_PROXY)) -#define SOURCE_PROXY_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_SOURCE_PROXY, SourceProxyClass)) - -typedef struct _SourceProxy SourceProxy; -typedef struct _SourceProxyClass SourceProxyClass; -typedef struct _SourceProxyPrivate SourceProxyPrivate; -#define _source_snapshot_unref0(var) ((var == NULL) ? NULL : (var = (source_snapshot_unref (var), NULL))) -typedef struct _ParamSpecSourceProxy ParamSpecSourceProxy; -enum { - SOURCE_PROXY_RECONSTITUTED_SIGNAL, - SOURCE_PROXY_DEHYDRATED_SIGNAL, - SOURCE_PROXY_BROKEN_SIGNAL, - SOURCE_PROXY_NUM_SIGNALS -}; -static guint source_proxy_signals[SOURCE_PROXY_NUM_SIGNALS] = {0}; - -#define TYPE_PROXYABLE (proxyable_get_type ()) -#define PROXYABLE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_PROXYABLE, Proxyable)) -#define IS_PROXYABLE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_PROXYABLE)) -#define PROXYABLE_GET_INTERFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE ((obj), TYPE_PROXYABLE, ProxyableIface)) - -typedef struct _Proxyable Proxyable; -typedef struct _ProxyableIface ProxyableIface; -#define _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 _DataObject { - GObject parent_instance; - DataObjectPrivate * priv; -}; - -struct _DataObjectClass { - GObjectClass parent_class; - void (*notify_altered) (DataObject* self, Alteration* alteration); - void (*notify_membership_changed) (DataObject* self, DataCollection* collection); - void (*notify_collection_property_set) (DataObject* self, const gchar* name, GValue* old, GValue* val); - void (*notify_collection_property_cleared) (DataObject* self, const gchar* name); - gchar* (*get_name) (DataObject* self); - gchar* (*to_string) (DataObject* self); -}; - -struct _DataSource { - DataObject parent_instance; - DataSourcePrivate * priv; -}; - -struct _DataSourceClass { - DataObjectClass parent_class; - void (*notify_held_in_tank) (DataSource* self, SourceHoldingTank* holding_tank); - void (*notify_unlinking) (DataSource* self, SourceCollection* collection); - void (*notify_unlinked) (DataSource* self); - void (*notify_relinking) (DataSource* self, SourceCollection* collection); - void (*notify_relinked) (DataSource* self); - gchar* (*get_typename) (DataSource* self); - gint64 (*get_instance_id) (DataSource* self); - gchar* (*get_source_id) (DataSource* self); - void (*commit_backlinks) (DataSource* self, SourceCollection* sources, const gchar* dehydrated); - SourceSnapshot* (*save_snapshot) (DataSource* self); - gboolean (*internal_delete_backing) (DataSource* self, GError** error); - gboolean (*equals) (DataSource* self, DataSource* source); - void (*destroy) (DataSource* self); - void (*unlinked) (DataSource* self, SourceCollection* sources); - void (*relinked) (DataSource* self, SourceCollection* sources); - void (*destroyed) (DataSource* self); -}; - -struct _DataSourcePrivate { - DataView** subscribers; - gint subscribers_length1; - gint _subscribers_size_; - SourceHoldingTank* holding_tank; - SourceCollection* unlinked_from_collection; - GeeHashMap* backlinks; - gboolean in_contact; - gboolean marked_for_destroy; - gboolean is_destroyed; -}; - -typedef void (*DataSourceContactSubscriber) (DataView* view, void* user_data); -typedef void (*DataSourceContactSubscriberAlteration) (DataView* view, Alteration* alteration, void* user_data); -struct _SourceSnapshot { - GTypeInstance parent_instance; - volatile int ref_count; - SourceSnapshotPrivate * priv; -}; - -struct _SourceSnapshotClass { - GTypeClass parent_class; - void (*finalize) (SourceSnapshot *self); - void (*notify_broken) (SourceSnapshot* self); - void (*broken) (SourceSnapshot* self); -}; - -struct _SourceSnapshotPrivate { - gboolean snapshot_broken; -}; - -struct _ParamSpecSourceSnapshot { - GParamSpec parent_instance; -}; - -struct _SourceBacklink { - GTypeInstance parent_instance; - volatile int ref_count; - SourceBacklinkPrivate * priv; -}; - -struct _SourceBacklinkClass { - GTypeClass parent_class; - void (*finalize) (SourceBacklink *self); -}; - -struct _SourceBacklinkPrivate { - gchar* _name; - gchar* _value; -}; - -struct _ParamSpecSourceBacklink { - GParamSpec parent_instance; -}; - -struct _SourceProxy { - GTypeInstance parent_instance; - volatile int ref_count; - SourceProxyPrivate * priv; -}; - -struct _SourceProxyClass { - GTypeClass parent_class; - void (*finalize) (SourceProxy *self); - DataSource* (*reconstitute) (SourceProxy* self, gint64 object_id, SourceSnapshot* snapshot); - void (*notify_reconstituted) (SourceProxy* self, DataSource* source); - void (*notify_dehydrated) (SourceProxy* self); - void (*notify_broken) (SourceProxy* self); - void (*reconstituted) (SourceProxy* self, DataSource* source); - void (*dehydrated) (SourceProxy* self); - void (*broken) (SourceProxy* self); -}; - -struct _SourceProxyPrivate { - gint64 object_id; - gchar* source_string; - DataSource* source; - SourceSnapshot* snapshot; - SourceCollection* membership; -}; - -struct _ParamSpecSourceProxy { - GParamSpec parent_instance; -}; - -struct _ProxyableIface { - GTypeInterface parent_iface; - SourceProxy* (*get_proxy) (Proxyable* self); -}; - - -static gpointer data_source_parent_class = NULL; -static gpointer source_snapshot_parent_class = NULL; -static gpointer source_backlink_parent_class = NULL; -static gpointer source_proxy_parent_class = NULL; - -GType data_object_get_type (void) G_GNUC_CONST; -gpointer alteration_ref (gpointer instance); -void alteration_unref (gpointer instance); -GParamSpec* param_spec_alteration (const gchar* name, - const gchar* nick, - const gchar* blurb, - GType object_type, - GParamFlags flags); -void value_set_alteration (GValue* value, - gpointer v_object); -void value_take_alteration (GValue* value, - gpointer v_object); -gpointer value_get_alteration (const GValue* value); -GType alteration_get_type (void) G_GNUC_CONST; -gpointer data_collection_ref (gpointer instance); -void data_collection_unref (gpointer instance); -GParamSpec* param_spec_data_collection (const gchar* name, - const gchar* nick, - const gchar* blurb, - GType object_type, - GParamFlags flags); -void value_set_data_collection (GValue* value, - gpointer v_object); -void value_take_data_collection (GValue* value, - gpointer v_object); -gpointer value_get_data_collection (const GValue* value); -GType data_collection_get_type (void) G_GNUC_CONST; -GType data_source_get_type (void) G_GNUC_CONST; -gpointer source_holding_tank_ref (gpointer instance); -void source_holding_tank_unref (gpointer instance); -GParamSpec* param_spec_source_holding_tank (const gchar* name, - const gchar* nick, - const gchar* blurb, - GType object_type, - GParamFlags flags); -void value_set_source_holding_tank (GValue* value, - gpointer v_object); -void value_take_source_holding_tank (GValue* value, - gpointer v_object); -gpointer value_get_source_holding_tank (const GValue* value); -GType source_holding_tank_get_type (void) G_GNUC_CONST; -GType source_collection_get_type (void) G_GNUC_CONST; -gpointer source_snapshot_ref (gpointer instance); -void source_snapshot_unref (gpointer instance); -GParamSpec* param_spec_source_snapshot (const gchar* name, - const gchar* nick, - const gchar* blurb, - GType object_type, - GParamFlags flags); -void value_set_source_snapshot (GValue* value, - gpointer v_object); -void value_take_source_snapshot (GValue* value, - gpointer v_object); -gpointer value_get_source_snapshot (const GValue* value); -GType source_snapshot_get_type (void) G_GNUC_CONST; -GType data_view_get_type (void) G_GNUC_CONST; -#define DATA_SOURCE_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), TYPE_DATA_SOURCE, DataSourcePrivate)) -DataSource* data_source_construct (GType object_type, - gint64 object_id); -DataObject* data_object_construct (GType object_type, - gint64 object_id); -static void data_source_real_notify_membership_changed (DataObject* base, - DataCollection* collection); -void data_source_notify_unlinked (DataSource* self); -void data_object_notify_membership_changed (DataObject* self, - DataCollection* collection); -void data_source_notify_held_in_tank (DataSource* self, - SourceHoldingTank* holding_tank); -static void data_source_real_notify_held_in_tank (DataSource* self, - SourceHoldingTank* holding_tank); -DataCollection* data_object_get_membership (DataObject* self); -static void data_source_real_notify_altered (DataObject* base, - Alteration* alteration); -void source_holding_tank_internal_notify_altered (SourceHoldingTank* self, - DataSource* source, - Alteration* alteration); -void data_source_contact_subscribers_alteration (DataSource* self, - Alteration* alteration); -void data_object_notify_altered (DataObject* self, - Alteration* alteration); -void data_source_notify_unlinking (DataSource* self, - SourceCollection* collection); -static void data_source_real_notify_unlinking (DataSource* self, - SourceCollection* collection); -static void data_source_real_notify_unlinked (DataSource* self); -void data_source_commit_backlinks (DataSource* self, - SourceCollection* sources, - const gchar* dehydrated); -static gchar* data_source_dehydrate_backlinks (DataSource* self); -void data_source_notify_relinking (DataSource* self, - SourceCollection* collection); -static void data_source_real_notify_relinking (DataSource* self, - SourceCollection* collection); -void data_source_notify_relinked (DataSource* self); -static void data_source_real_notify_relinked (DataSource* self); -gchar* data_source_get_typename (DataSource* self); -static gchar* data_source_real_get_typename (DataSource* self); -gint64 data_source_get_instance_id (DataSource* self); -static gint64 data_source_real_get_instance_id (DataSource* self); -gchar* data_source_get_source_id (DataSource* self); -static gchar* data_source_real_get_source_id (DataSource* self); -gpointer source_backlink_ref (gpointer instance); -void source_backlink_unref (gpointer instance); -GParamSpec* param_spec_source_backlink (const gchar* name, - const gchar* nick, - const gchar* blurb, - GType object_type, - GParamFlags flags); -void value_set_source_backlink (GValue* value, - gpointer v_object); -void value_take_source_backlink (GValue* value, - gpointer v_object); -gpointer value_get_source_backlink (const GValue* value); -GType source_backlink_get_type (void) G_GNUC_CONST; -gboolean data_source_has_backlink (DataSource* self, - SourceBacklink* backlink); -const gchar* source_backlink_get_name (SourceBacklink* self); -const gchar* source_backlink_get_value (SourceBacklink* self); -GeeList* data_source_get_backlinks (DataSource* self, - const gchar* name); -SourceBacklink* source_backlink_new (const gchar* name, - const gchar* value); -SourceBacklink* source_backlink_construct (GType object_type, - const gchar* name, - const gchar* value); -void data_source_set_backlink (DataSource* self, - SourceBacklink* backlink); -void source_collection_internal_backlink_set (SourceCollection* self, - DataSource* source, - SourceBacklink* backlink); -gboolean data_source_remove_backlink (DataSource* self, - SourceBacklink* backlink); -void source_collection_internal_backlink_removed (SourceCollection* self, - DataSource* source, - SourceBacklink* backlink); -static void data_source_real_commit_backlinks (DataSource* self, - SourceCollection* sources, - const gchar* dehydrated); -gchar* data_object_to_string (DataObject* self); -gboolean is_string_empty (const gchar* s); -void data_source_rehydrate_backlinks (DataSource* self, - SourceCollection* unlinked_from, - const gchar* dehydrated); -SourceSnapshot* data_source_save_snapshot (DataSource* self); -static SourceSnapshot* data_source_real_save_snapshot (DataSource* self); -void data_source_internal_mark_for_destroy (DataSource* self); -gboolean data_source_internal_delete_backing (DataSource* self, - GError** error); -static gboolean data_source_real_internal_delete_backing (DataSource* self, - GError** error); -gboolean data_source_equals (DataSource* self, - DataSource* source); -static gboolean data_source_real_equals (DataSource* self, - DataSource* source); -void data_source_destroy (DataSource* self); -static void data_source_real_destroy (DataSource* self); -void data_view_notify_unsubscribed (DataView* self, - DataSource* source); -gboolean data_source_destroy_orphan (DataSource* self, - gboolean delete_backing); -void source_collection_notify_unlinked_destroyed (SourceCollection* self, - DataSource* unlinked); -void data_source_internal_subscribe (DataSource* self, - DataView* view); -static void _vala_array_add66 (DataView** * array, - int* length, - int* size, - DataView* value); -void data_source_internal_unsubscribe (DataSource* self, - DataView* view); -void data_source_contact_subscribers (DataSource* self, - DataSourceContactSubscriber contact_subscriber, - void* contact_subscriber_target); -static void data_source_real_unlinked (DataSource* self, - SourceCollection* sources); -static void g_cclosure_user_marshal_VOID__DATA_COLLECTION (GClosure * closure, - GValue * return_value, - guint n_param_values, - const GValue * param_values, - gpointer invocation_hint, - gpointer marshal_data); -static void data_source_real_relinked (DataSource* self, - SourceCollection* sources); -static void data_source_real_destroyed (DataSource* self); -static void data_source_finalize (GObject * obj); -#define SOURCE_SNAPSHOT_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), TYPE_SOURCE_SNAPSHOT, SourceSnapshotPrivate)) -void source_snapshot_notify_broken (SourceSnapshot* self); -static void source_snapshot_real_notify_broken (SourceSnapshot* self); -gboolean source_snapshot_is_broken (SourceSnapshot* self); -SourceSnapshot* source_snapshot_construct (GType object_type); -static void source_snapshot_real_broken (SourceSnapshot* self); -static void source_snapshot_finalize (SourceSnapshot * obj); -#define SOURCE_BACKLINK_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), TYPE_SOURCE_BACKLINK, SourceBacklinkPrivate)) -static gboolean source_backlink_validate_name_value (const gchar* name, - const gchar* value); -SourceBacklink* source_backlink_new_from_source (DataSource* source); -SourceBacklink* source_backlink_construct_from_source (GType object_type, - DataSource* source); -gchar* source_backlink_to_string (SourceBacklink* self); -guint source_backlink_hash_func (SourceBacklink* backlink); -gboolean source_backlink_equal_func (SourceBacklink* alink, - SourceBacklink* blink); -const gchar* source_backlink_get_typename (SourceBacklink* self); -gint64 source_backlink_get_instance_id (SourceBacklink* self); -static void source_backlink_finalize (SourceBacklink * obj); -gpointer source_proxy_ref (gpointer instance); -void source_proxy_unref (gpointer instance); -GParamSpec* param_spec_source_proxy (const gchar* name, - const gchar* nick, - const gchar* blurb, - GType object_type, - GParamFlags flags); -void value_set_source_proxy (GValue* value, - gpointer v_object); -void value_take_source_proxy (GValue* value, - gpointer v_object); -gpointer value_get_source_proxy (const GValue* value); -GType source_proxy_get_type (void) G_GNUC_CONST; -#define SOURCE_PROXY_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), TYPE_SOURCE_PROXY, SourceProxyPrivate)) -static void source_proxy_drop_source (SourceProxy* self); -static void source_proxy_on_source_added (SourceProxy* self, - GeeIterable* added); -static void _source_proxy_on_source_added_data_collection_items_added (DataCollection* _sender, - GeeIterable* added, - gpointer self); -SourceProxy* source_proxy_construct (GType object_type, - DataSource* source); -gint64 data_object_get_object_id (DataObject* self); -static void source_proxy_on_snapshot_broken (SourceProxy* self); -static void _source_proxy_on_snapshot_broken_source_snapshot_broken (SourceSnapshot* _sender, - gpointer self); -static void source_proxy_set_source (SourceProxy* self, - DataSource* source); -DataSource* source_proxy_reconstitute (SourceProxy* self, - gint64 object_id, - SourceSnapshot* snapshot); -static DataSource* source_proxy_real_reconstitute (SourceProxy* self, - gint64 object_id, - SourceSnapshot* snapshot); -void source_proxy_notify_reconstituted (SourceProxy* self, - DataSource* source); -static void source_proxy_real_notify_reconstituted (SourceProxy* self, - DataSource* source); -void source_proxy_notify_dehydrated (SourceProxy* self); -static void source_proxy_real_notify_dehydrated (SourceProxy* self); -void source_proxy_notify_broken (SourceProxy* self); -static void source_proxy_real_notify_broken (SourceProxy* self); -static void source_proxy_on_destroyed (SourceProxy* self); -static void _source_proxy_on_destroyed_data_source_destroyed (DataSource* _sender, - gpointer self); -DataSource* source_proxy_get_source (SourceProxy* self); -gboolean data_collection_contains (DataCollection* self, - DataObject* object); -static void source_proxy_real_reconstituted (SourceProxy* self, - DataSource* source); -static void source_proxy_real_dehydrated (SourceProxy* self); -static void source_proxy_real_broken (SourceProxy* self); -static void source_proxy_finalize (SourceProxy * obj); -GType proxyable_get_type (void) G_GNUC_CONST; -SourceProxy* proxyable_get_proxy (Proxyable* self); -static void _vala_array_destroy (gpointer array, - gint array_length, - GDestroyNotify destroy_func); -static void _vala_array_free (gpointer array, - gint array_length, - GDestroyNotify destroy_func); -static gint _vala_array_length (gpointer array); - - -DataSource* -data_source_construct (GType object_type, - gint64 object_id) -{ - DataSource * self = NULL; -#line 64 "/home/jens/Source/shotwell/src/core/DataSource.vala" - self = (DataSource*) data_object_construct (object_type, object_id); -#line 63 "/home/jens/Source/shotwell/src/core/DataSource.vala" - return self; -#line 616 "DataSource.c" -} - - -static void -data_source_real_notify_membership_changed (DataObject* base, - DataCollection* collection) -{ - DataSource * self; - gboolean _tmp4_ = FALSE; -#line 73 "/home/jens/Source/shotwell/src/core/DataSource.vala" - self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_DATA_SOURCE, DataSource); -#line 73 "/home/jens/Source/shotwell/src/core/DataSource.vala" - g_return_if_fail ((collection == NULL) || IS_DATA_COLLECTION (collection)); -#line 75 "/home/jens/Source/shotwell/src/core/DataSource.vala" - if (collection == NULL) { -#line 632 "DataSource.c" - gboolean _tmp0_ = FALSE; - gboolean _tmp1_; -#line 76 "/home/jens/Source/shotwell/src/core/DataSource.vala" - _tmp1_ = self->priv->is_destroyed; -#line 76 "/home/jens/Source/shotwell/src/core/DataSource.vala" - if (_tmp1_) { -#line 76 "/home/jens/Source/shotwell/src/core/DataSource.vala" - _tmp0_ = TRUE; -#line 641 "DataSource.c" - } else { - GeeHashMap* _tmp2_; -#line 76 "/home/jens/Source/shotwell/src/core/DataSource.vala" - _tmp2_ = self->priv->backlinks; -#line 76 "/home/jens/Source/shotwell/src/core/DataSource.vala" - _tmp0_ = _tmp2_ != NULL; -#line 648 "DataSource.c" - } -#line 76 "/home/jens/Source/shotwell/src/core/DataSource.vala" - _vala_assert (_tmp0_, "is_destroyed || backlinks != null"); -#line 652 "DataSource.c" - } else { - gboolean _tmp3_; -#line 78 "/home/jens/Source/shotwell/src/core/DataSource.vala" - _tmp3_ = self->priv->is_destroyed; -#line 78 "/home/jens/Source/shotwell/src/core/DataSource.vala" - _vala_assert (!_tmp3_, "!is_destroyed"); -#line 659 "DataSource.c" - } -#line 82 "/home/jens/Source/shotwell/src/core/DataSource.vala" - if (collection == NULL) { -#line 663 "DataSource.c" - GeeHashMap* _tmp5_; -#line 82 "/home/jens/Source/shotwell/src/core/DataSource.vala" - _tmp5_ = self->priv->backlinks; -#line 82 "/home/jens/Source/shotwell/src/core/DataSource.vala" - _tmp4_ = _tmp5_ != NULL; -#line 669 "DataSource.c" - } else { -#line 82 "/home/jens/Source/shotwell/src/core/DataSource.vala" - _tmp4_ = FALSE; -#line 673 "DataSource.c" - } -#line 82 "/home/jens/Source/shotwell/src/core/DataSource.vala" - if (_tmp4_) { -#line 83 "/home/jens/Source/shotwell/src/core/DataSource.vala" - data_source_notify_unlinked (self); -#line 679 "DataSource.c" - } -#line 85 "/home/jens/Source/shotwell/src/core/DataSource.vala" - DATA_OBJECT_CLASS (data_source_parent_class)->notify_membership_changed (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_DATA_OBJECT, DataObject), collection); -#line 683 "DataSource.c" -} - - -static gpointer -_source_holding_tank_ref0 (gpointer self) -{ -#line 100 "/home/jens/Source/shotwell/src/core/DataSource.vala" - return self ? source_holding_tank_ref (self) : NULL; -#line 692 "DataSource.c" -} - - -static void -data_source_real_notify_held_in_tank (DataSource* self, - SourceHoldingTank* holding_tank) -{ - DataCollection* _tmp0_; - DataCollection* _tmp1_; - SourceHoldingTank* _tmp4_; -#line 88 "/home/jens/Source/shotwell/src/core/DataSource.vala" - g_return_if_fail ((holding_tank == NULL) || IS_SOURCE_HOLDING_TANK (holding_tank)); -#line 90 "/home/jens/Source/shotwell/src/core/DataSource.vala" - _tmp0_ = data_object_get_membership (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_DATA_OBJECT, DataObject)); -#line 90 "/home/jens/Source/shotwell/src/core/DataSource.vala" - _tmp1_ = _tmp0_; -#line 90 "/home/jens/Source/shotwell/src/core/DataSource.vala" - _vala_assert (_tmp1_ == NULL, "get_membership() == null"); -#line 90 "/home/jens/Source/shotwell/src/core/DataSource.vala" - _data_collection_unref0 (_tmp1_); -#line 94 "/home/jens/Source/shotwell/src/core/DataSource.vala" - if (holding_tank != NULL) { -#line 715 "DataSource.c" - SourceHoldingTank* _tmp2_; -#line 95 "/home/jens/Source/shotwell/src/core/DataSource.vala" - _tmp2_ = self->priv->holding_tank; -#line 95 "/home/jens/Source/shotwell/src/core/DataSource.vala" - _vala_assert (_tmp2_ == NULL, "this.holding_tank == null"); -#line 721 "DataSource.c" - } else { - SourceHoldingTank* _tmp3_; -#line 97 "/home/jens/Source/shotwell/src/core/DataSource.vala" - _tmp3_ = self->priv->holding_tank; -#line 97 "/home/jens/Source/shotwell/src/core/DataSource.vala" - _vala_assert (_tmp3_ != NULL, "this.holding_tank != null"); -#line 728 "DataSource.c" - } -#line 100 "/home/jens/Source/shotwell/src/core/DataSource.vala" - _tmp4_ = _source_holding_tank_ref0 (holding_tank); -#line 100 "/home/jens/Source/shotwell/src/core/DataSource.vala" - _source_holding_tank_unref0 (self->priv->holding_tank); -#line 100 "/home/jens/Source/shotwell/src/core/DataSource.vala" - self->priv->holding_tank = _tmp4_; -#line 736 "DataSource.c" -} - - -void -data_source_notify_held_in_tank (DataSource* self, - SourceHoldingTank* holding_tank) -{ -#line 88 "/home/jens/Source/shotwell/src/core/DataSource.vala" - g_return_if_fail (IS_DATA_SOURCE (self)); -#line 88 "/home/jens/Source/shotwell/src/core/DataSource.vala" - DATA_SOURCE_GET_CLASS (self)->notify_held_in_tank (self, holding_tank); -#line 748 "DataSource.c" -} - - -static void -data_source_real_notify_altered (DataObject* base, - Alteration* alteration) -{ - DataSource * self; - SourceHoldingTank* _tmp0_; -#line 103 "/home/jens/Source/shotwell/src/core/DataSource.vala" - self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_DATA_SOURCE, DataSource); -#line 103 "/home/jens/Source/shotwell/src/core/DataSource.vala" - g_return_if_fail (IS_ALTERATION (alteration)); -#line 105 "/home/jens/Source/shotwell/src/core/DataSource.vala" - _tmp0_ = self->priv->holding_tank; -#line 105 "/home/jens/Source/shotwell/src/core/DataSource.vala" - if (_tmp0_ != NULL) { -#line 766 "DataSource.c" - SourceHoldingTank* _tmp1_; -#line 106 "/home/jens/Source/shotwell/src/core/DataSource.vala" - _tmp1_ = self->priv->holding_tank; -#line 106 "/home/jens/Source/shotwell/src/core/DataSource.vala" - source_holding_tank_internal_notify_altered (_tmp1_, self, alteration); -#line 772 "DataSource.c" - } else { -#line 108 "/home/jens/Source/shotwell/src/core/DataSource.vala" - data_source_contact_subscribers_alteration (self, alteration); -#line 110 "/home/jens/Source/shotwell/src/core/DataSource.vala" - DATA_OBJECT_CLASS (data_source_parent_class)->notify_altered (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_DATA_OBJECT, DataObject), alteration); -#line 778 "DataSource.c" - } -} - - -static void -data_source_real_notify_unlinking (DataSource* self, - SourceCollection* collection) -{ - gboolean _tmp0_ = FALSE; - GeeHashMap* _tmp1_; - GeeHashMap* _tmp3_; -#line 115 "/home/jens/Source/shotwell/src/core/DataSource.vala" - g_return_if_fail (IS_SOURCE_COLLECTION (collection)); -#line 116 "/home/jens/Source/shotwell/src/core/DataSource.vala" - _tmp1_ = self->priv->backlinks; -#line 116 "/home/jens/Source/shotwell/src/core/DataSource.vala" - if (_tmp1_ == NULL) { -#line 796 "DataSource.c" - SourceCollection* _tmp2_; -#line 116 "/home/jens/Source/shotwell/src/core/DataSource.vala" - _tmp2_ = self->priv->unlinked_from_collection; -#line 116 "/home/jens/Source/shotwell/src/core/DataSource.vala" - _tmp0_ = _tmp2_ == NULL; -#line 802 "DataSource.c" - } else { -#line 116 "/home/jens/Source/shotwell/src/core/DataSource.vala" - _tmp0_ = FALSE; -#line 806 "DataSource.c" - } -#line 116 "/home/jens/Source/shotwell/src/core/DataSource.vala" - _vala_assert (_tmp0_, "backlinks == null && unlinked_from_collection == null"); -#line 118 "/home/jens/Source/shotwell/src/core/DataSource.vala" - self->priv->unlinked_from_collection = collection; -#line 119 "/home/jens/Source/shotwell/src/core/DataSource.vala" - _tmp3_ = gee_hash_map_new (G_TYPE_STRING, (GBoxedCopyFunc) g_strdup, (GDestroyNotify) g_free, GEE_TYPE_LIST, (GBoxedCopyFunc) g_object_ref, (GDestroyNotify) g_object_unref, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL); -#line 119 "/home/jens/Source/shotwell/src/core/DataSource.vala" - _g_object_unref0 (self->priv->backlinks); -#line 119 "/home/jens/Source/shotwell/src/core/DataSource.vala" - self->priv->backlinks = _tmp3_; -#line 818 "DataSource.c" -} - - -void -data_source_notify_unlinking (DataSource* self, - SourceCollection* collection) -{ -#line 115 "/home/jens/Source/shotwell/src/core/DataSource.vala" - g_return_if_fail (IS_DATA_SOURCE (self)); -#line 115 "/home/jens/Source/shotwell/src/core/DataSource.vala" - DATA_SOURCE_GET_CLASS (self)->notify_unlinking (self, collection); -#line 830 "DataSource.c" -} - - -static void -data_source_real_notify_unlinked (DataSource* self) -{ - gboolean _tmp0_ = FALSE; - SourceCollection* _tmp1_; - SourceCollection* _tmp3_; - GeeHashMap* _tmp4_; - gint _tmp5_; - gint _tmp6_; -#line 124 "/home/jens/Source/shotwell/src/core/DataSource.vala" - _tmp1_ = self->priv->unlinked_from_collection; -#line 124 "/home/jens/Source/shotwell/src/core/DataSource.vala" - if (_tmp1_ != NULL) { -#line 847 "DataSource.c" - GeeHashMap* _tmp2_; -#line 124 "/home/jens/Source/shotwell/src/core/DataSource.vala" - _tmp2_ = self->priv->backlinks; -#line 124 "/home/jens/Source/shotwell/src/core/DataSource.vala" - _tmp0_ = _tmp2_ != NULL; -#line 853 "DataSource.c" - } else { -#line 124 "/home/jens/Source/shotwell/src/core/DataSource.vala" - _tmp0_ = FALSE; -#line 857 "DataSource.c" - } -#line 124 "/home/jens/Source/shotwell/src/core/DataSource.vala" - _vala_assert (_tmp0_, "unlinked_from_collection != null && backlinks != null"); -#line 126 "/home/jens/Source/shotwell/src/core/DataSource.vala" - _tmp3_ = self->priv->unlinked_from_collection; -#line 126 "/home/jens/Source/shotwell/src/core/DataSource.vala" - g_signal_emit (self, data_source_signals[DATA_SOURCE_UNLINKED_SIGNAL], 0, _tmp3_); -#line 129 "/home/jens/Source/shotwell/src/core/DataSource.vala" - _tmp4_ = self->priv->backlinks; -#line 129 "/home/jens/Source/shotwell/src/core/DataSource.vala" - _tmp5_ = gee_abstract_map_get_size (G_TYPE_CHECK_INSTANCE_CAST (_tmp4_, GEE_TYPE_ABSTRACT_MAP, GeeAbstractMap)); -#line 129 "/home/jens/Source/shotwell/src/core/DataSource.vala" - _tmp6_ = _tmp5_; -#line 129 "/home/jens/Source/shotwell/src/core/DataSource.vala" - if (_tmp6_ > 0) { -#line 873 "DataSource.c" - SourceCollection* _tmp7_; - gchar* _tmp8_; - gchar* _tmp9_; -#line 130 "/home/jens/Source/shotwell/src/core/DataSource.vala" - _tmp7_ = self->priv->unlinked_from_collection; -#line 130 "/home/jens/Source/shotwell/src/core/DataSource.vala" - _tmp8_ = data_source_dehydrate_backlinks (self); -#line 130 "/home/jens/Source/shotwell/src/core/DataSource.vala" - _tmp9_ = _tmp8_; -#line 130 "/home/jens/Source/shotwell/src/core/DataSource.vala" - data_source_commit_backlinks (self, _tmp7_, _tmp9_); -#line 130 "/home/jens/Source/shotwell/src/core/DataSource.vala" - _g_free0 (_tmp9_); -#line 887 "DataSource.c" - } -} - - -void -data_source_notify_unlinked (DataSource* self) -{ -#line 123 "/home/jens/Source/shotwell/src/core/DataSource.vala" - g_return_if_fail (IS_DATA_SOURCE (self)); -#line 123 "/home/jens/Source/shotwell/src/core/DataSource.vala" - DATA_SOURCE_GET_CLASS (self)->notify_unlinked (self); -#line 899 "DataSource.c" -} - - -static void -data_source_real_notify_relinking (DataSource* self, - SourceCollection* collection) -{ - gboolean _tmp0_ = FALSE; - GeeHashMap* _tmp1_; -#line 134 "/home/jens/Source/shotwell/src/core/DataSource.vala" - g_return_if_fail (IS_SOURCE_COLLECTION (collection)); -#line 135 "/home/jens/Source/shotwell/src/core/DataSource.vala" - _tmp1_ = self->priv->backlinks; -#line 135 "/home/jens/Source/shotwell/src/core/DataSource.vala" - if (_tmp1_ != NULL) { -#line 915 "DataSource.c" - SourceCollection* _tmp2_; -#line 135 "/home/jens/Source/shotwell/src/core/DataSource.vala" - _tmp2_ = self->priv->unlinked_from_collection; -#line 135 "/home/jens/Source/shotwell/src/core/DataSource.vala" - _tmp0_ = _tmp2_ == collection; -#line 921 "DataSource.c" - } else { -#line 135 "/home/jens/Source/shotwell/src/core/DataSource.vala" - _tmp0_ = FALSE; -#line 925 "DataSource.c" - } -#line 135 "/home/jens/Source/shotwell/src/core/DataSource.vala" - _vala_assert (_tmp0_, "(backlinks != null) && (unlinked_from_collection == collection)"); -#line 929 "DataSource.c" -} - - -void -data_source_notify_relinking (DataSource* self, - SourceCollection* collection) -{ -#line 134 "/home/jens/Source/shotwell/src/core/DataSource.vala" - g_return_if_fail (IS_DATA_SOURCE (self)); -#line 134 "/home/jens/Source/shotwell/src/core/DataSource.vala" - DATA_SOURCE_GET_CLASS (self)->notify_relinking (self, collection); -#line 941 "DataSource.c" -} - - -static gpointer -_data_collection_ref0 (gpointer self) -{ -#line 142 "/home/jens/Source/shotwell/src/core/DataSource.vala" - return self ? data_collection_ref (self) : NULL; -#line 950 "DataSource.c" -} - - -static void -data_source_real_notify_relinked (DataSource* self) -{ - gboolean _tmp0_ = FALSE; - GeeHashMap* _tmp1_; - SourceCollection* relinked_to = NULL; - SourceCollection* _tmp3_; - SourceCollection* _tmp4_; -#line 140 "/home/jens/Source/shotwell/src/core/DataSource.vala" - _tmp1_ = self->priv->backlinks; -#line 140 "/home/jens/Source/shotwell/src/core/DataSource.vala" - if (_tmp1_ != NULL) { -#line 966 "DataSource.c" - SourceCollection* _tmp2_; -#line 140 "/home/jens/Source/shotwell/src/core/DataSource.vala" - _tmp2_ = self->priv->unlinked_from_collection; -#line 140 "/home/jens/Source/shotwell/src/core/DataSource.vala" - _tmp0_ = _tmp2_ != NULL; -#line 972 "DataSource.c" - } else { -#line 140 "/home/jens/Source/shotwell/src/core/DataSource.vala" - _tmp0_ = FALSE; -#line 976 "DataSource.c" - } -#line 140 "/home/jens/Source/shotwell/src/core/DataSource.vala" - _vala_assert (_tmp0_, "backlinks != null && unlinked_from_collection != null"); -#line 142 "/home/jens/Source/shotwell/src/core/DataSource.vala" - _tmp3_ = self->priv->unlinked_from_collection; -#line 142 "/home/jens/Source/shotwell/src/core/DataSource.vala" - _tmp4_ = _data_collection_ref0 (_tmp3_); -#line 142 "/home/jens/Source/shotwell/src/core/DataSource.vala" - relinked_to = _tmp4_; -#line 143 "/home/jens/Source/shotwell/src/core/DataSource.vala" - _g_object_unref0 (self->priv->backlinks); -#line 143 "/home/jens/Source/shotwell/src/core/DataSource.vala" - self->priv->backlinks = NULL; -#line 144 "/home/jens/Source/shotwell/src/core/DataSource.vala" - self->priv->unlinked_from_collection = NULL; -#line 145 "/home/jens/Source/shotwell/src/core/DataSource.vala" - g_signal_emit (self, data_source_signals[DATA_SOURCE_RELINKED_SIGNAL], 0, relinked_to); -#line 148 "/home/jens/Source/shotwell/src/core/DataSource.vala" - data_source_commit_backlinks (self, NULL, NULL); -#line 139 "/home/jens/Source/shotwell/src/core/DataSource.vala" - _data_collection_unref0 (relinked_to); -#line 998 "DataSource.c" -} - - -void -data_source_notify_relinked (DataSource* self) -{ -#line 139 "/home/jens/Source/shotwell/src/core/DataSource.vala" - g_return_if_fail (IS_DATA_SOURCE (self)); -#line 139 "/home/jens/Source/shotwell/src/core/DataSource.vala" - DATA_SOURCE_GET_CLASS (self)->notify_relinked (self); -#line 1009 "DataSource.c" -} - - -static gchar* -data_source_real_get_typename (DataSource* self) -{ -#line 156 "/home/jens/Source/shotwell/src/core/DataSource.vala" - g_critical ("Type `%s' does not implement abstract method `data_source_get_typename'", g_type_name (G_TYPE_FROM_INSTANCE (self))); -#line 156 "/home/jens/Source/shotwell/src/core/DataSource.vala" - return NULL; -#line 1020 "DataSource.c" -} - - -gchar* -data_source_get_typename (DataSource* self) -{ -#line 156 "/home/jens/Source/shotwell/src/core/DataSource.vala" - g_return_val_if_fail (IS_DATA_SOURCE (self), NULL); -#line 156 "/home/jens/Source/shotwell/src/core/DataSource.vala" - return DATA_SOURCE_GET_CLASS (self)->get_typename (self); -#line 1031 "DataSource.c" -} - - -static gint64 -data_source_real_get_instance_id (DataSource* self) -{ - gint64 _tmp0_ = 0LL; -#line 162 "/home/jens/Source/shotwell/src/core/DataSource.vala" - g_critical ("Type `%s' does not implement abstract method `data_source_get_instance_id'", g_type_name (G_TYPE_FROM_INSTANCE (self))); -#line 162 "/home/jens/Source/shotwell/src/core/DataSource.vala" - return _tmp0_; -#line 1043 "DataSource.c" -} - - -gint64 -data_source_get_instance_id (DataSource* self) -{ -#line 162 "/home/jens/Source/shotwell/src/core/DataSource.vala" - g_return_val_if_fail (IS_DATA_SOURCE (self), 0LL); -#line 162 "/home/jens/Source/shotwell/src/core/DataSource.vala" - return DATA_SOURCE_GET_CLASS (self)->get_instance_id (self); -#line 1054 "DataSource.c" -} - - -static gchar* -data_source_real_get_source_id (DataSource* self) -{ - gchar* result = NULL; - gchar* _tmp0_; - gchar* _tmp1_; - gchar* _tmp2_; - gchar* _tmp3_; -#line 167 "/home/jens/Source/shotwell/src/core/DataSource.vala" - _tmp0_ = data_source_get_typename (self); -#line 167 "/home/jens/Source/shotwell/src/core/DataSource.vala" - _tmp1_ = _tmp0_; -#line 167 "/home/jens/Source/shotwell/src/core/DataSource.vala" - _tmp2_ = g_strdup_printf ("%s-%016" G_GINT64_MODIFIER "x", _tmp1_, data_source_get_instance_id (self)); -#line 167 "/home/jens/Source/shotwell/src/core/DataSource.vala" - _tmp3_ = _tmp2_; -#line 167 "/home/jens/Source/shotwell/src/core/DataSource.vala" - _g_free0 (_tmp1_); -#line 167 "/home/jens/Source/shotwell/src/core/DataSource.vala" - result = _tmp3_; -#line 167 "/home/jens/Source/shotwell/src/core/DataSource.vala" - return result; -#line 1080 "DataSource.c" -} - - -gchar* -data_source_get_source_id (DataSource* self) -{ -#line 166 "/home/jens/Source/shotwell/src/core/DataSource.vala" - g_return_val_if_fail (IS_DATA_SOURCE (self), NULL); -#line 166 "/home/jens/Source/shotwell/src/core/DataSource.vala" - return DATA_SOURCE_GET_CLASS (self)->get_source_id (self); -#line 1091 "DataSource.c" -} - - -gboolean -data_source_has_backlink (DataSource* self, - SourceBacklink* backlink) -{ - gboolean result = FALSE; - GeeHashMap* _tmp0_; - GeeList* values = NULL; - GeeHashMap* _tmp1_; - const gchar* _tmp2_; - const gchar* _tmp3_; - gpointer _tmp4_; - gboolean _tmp5_ = FALSE; - GeeList* _tmp6_; -#line 170 "/home/jens/Source/shotwell/src/core/DataSource.vala" - g_return_val_if_fail (IS_DATA_SOURCE (self), FALSE); -#line 170 "/home/jens/Source/shotwell/src/core/DataSource.vala" - g_return_val_if_fail (IS_SOURCE_BACKLINK (backlink), FALSE); -#line 171 "/home/jens/Source/shotwell/src/core/DataSource.vala" - _tmp0_ = self->priv->backlinks; -#line 171 "/home/jens/Source/shotwell/src/core/DataSource.vala" - if (_tmp0_ == NULL) { -#line 172 "/home/jens/Source/shotwell/src/core/DataSource.vala" - result = FALSE; -#line 172 "/home/jens/Source/shotwell/src/core/DataSource.vala" - return result; -#line 1120 "DataSource.c" - } -#line 174 "/home/jens/Source/shotwell/src/core/DataSource.vala" - _tmp1_ = self->priv->backlinks; -#line 174 "/home/jens/Source/shotwell/src/core/DataSource.vala" - _tmp2_ = source_backlink_get_name (backlink); -#line 174 "/home/jens/Source/shotwell/src/core/DataSource.vala" - _tmp3_ = _tmp2_; -#line 174 "/home/jens/Source/shotwell/src/core/DataSource.vala" - _tmp4_ = gee_abstract_map_get (G_TYPE_CHECK_INSTANCE_CAST (_tmp1_, GEE_TYPE_ABSTRACT_MAP, GeeAbstractMap), _tmp3_); -#line 174 "/home/jens/Source/shotwell/src/core/DataSource.vala" - values = (GeeList*) _tmp4_; -#line 176 "/home/jens/Source/shotwell/src/core/DataSource.vala" - _tmp6_ = values; -#line 176 "/home/jens/Source/shotwell/src/core/DataSource.vala" - if (_tmp6_ != NULL) { -#line 1136 "DataSource.c" - GeeList* _tmp7_; - const gchar* _tmp8_; - const gchar* _tmp9_; -#line 176 "/home/jens/Source/shotwell/src/core/DataSource.vala" - _tmp7_ = values; -#line 176 "/home/jens/Source/shotwell/src/core/DataSource.vala" - _tmp8_ = source_backlink_get_value (backlink); -#line 176 "/home/jens/Source/shotwell/src/core/DataSource.vala" - _tmp9_ = _tmp8_; -#line 176 "/home/jens/Source/shotwell/src/core/DataSource.vala" - _tmp5_ = gee_collection_contains (G_TYPE_CHECK_INSTANCE_CAST (_tmp7_, GEE_TYPE_COLLECTION, GeeCollection), _tmp9_); -#line 1148 "DataSource.c" - } else { -#line 176 "/home/jens/Source/shotwell/src/core/DataSource.vala" - _tmp5_ = FALSE; -#line 1152 "DataSource.c" - } -#line 176 "/home/jens/Source/shotwell/src/core/DataSource.vala" - result = _tmp5_; -#line 176 "/home/jens/Source/shotwell/src/core/DataSource.vala" - _g_object_unref0 (values); -#line 176 "/home/jens/Source/shotwell/src/core/DataSource.vala" - return result; -#line 1160 "DataSource.c" -} - - -static gpointer -_g_object_ref0 (gpointer self) -{ -#line 188 "/home/jens/Source/shotwell/src/core/DataSource.vala" - return self ? g_object_ref (self) : NULL; -#line 1169 "DataSource.c" -} - - -GeeList* -data_source_get_backlinks (DataSource* self, - const gchar* name) -{ - GeeList* result = NULL; - GeeHashMap* _tmp0_; - GeeList* values = NULL; - GeeHashMap* _tmp1_; - gpointer _tmp2_; - gboolean _tmp3_ = FALSE; - GeeList* _tmp4_; - GeeList* backlinks = NULL; - GeeArrayList* _tmp8_; -#line 179 "/home/jens/Source/shotwell/src/core/DataSource.vala" - g_return_val_if_fail (IS_DATA_SOURCE (self), NULL); -#line 179 "/home/jens/Source/shotwell/src/core/DataSource.vala" - g_return_val_if_fail (name != NULL, NULL); -#line 180 "/home/jens/Source/shotwell/src/core/DataSource.vala" - _tmp0_ = self->priv->backlinks; -#line 180 "/home/jens/Source/shotwell/src/core/DataSource.vala" - if (_tmp0_ == NULL) { -#line 181 "/home/jens/Source/shotwell/src/core/DataSource.vala" - result = NULL; -#line 181 "/home/jens/Source/shotwell/src/core/DataSource.vala" - return result; -#line 1198 "DataSource.c" - } -#line 183 "/home/jens/Source/shotwell/src/core/DataSource.vala" - _tmp1_ = self->priv->backlinks; -#line 183 "/home/jens/Source/shotwell/src/core/DataSource.vala" - _tmp2_ = gee_abstract_map_get (G_TYPE_CHECK_INSTANCE_CAST (_tmp1_, GEE_TYPE_ABSTRACT_MAP, GeeAbstractMap), name); -#line 183 "/home/jens/Source/shotwell/src/core/DataSource.vala" - values = (GeeList*) _tmp2_; -#line 184 "/home/jens/Source/shotwell/src/core/DataSource.vala" - _tmp4_ = values; -#line 184 "/home/jens/Source/shotwell/src/core/DataSource.vala" - if (_tmp4_ == NULL) { -#line 184 "/home/jens/Source/shotwell/src/core/DataSource.vala" - _tmp3_ = TRUE; -#line 1212 "DataSource.c" - } else { - GeeList* _tmp5_; - gint _tmp6_; - gint _tmp7_; -#line 184 "/home/jens/Source/shotwell/src/core/DataSource.vala" - _tmp5_ = values; -#line 184 "/home/jens/Source/shotwell/src/core/DataSource.vala" - _tmp6_ = gee_collection_get_size (G_TYPE_CHECK_INSTANCE_CAST (_tmp5_, GEE_TYPE_COLLECTION, GeeCollection)); -#line 184 "/home/jens/Source/shotwell/src/core/DataSource.vala" - _tmp7_ = _tmp6_; -#line 184 "/home/jens/Source/shotwell/src/core/DataSource.vala" - _tmp3_ = _tmp7_ == 0; -#line 1225 "DataSource.c" - } -#line 184 "/home/jens/Source/shotwell/src/core/DataSource.vala" - if (_tmp3_) { -#line 185 "/home/jens/Source/shotwell/src/core/DataSource.vala" - result = NULL; -#line 185 "/home/jens/Source/shotwell/src/core/DataSource.vala" - _g_object_unref0 (values); -#line 185 "/home/jens/Source/shotwell/src/core/DataSource.vala" - return result; -#line 1235 "DataSource.c" - } -#line 187 "/home/jens/Source/shotwell/src/core/DataSource.vala" - _tmp8_ = gee_array_list_new (TYPE_SOURCE_BACKLINK, (GBoxedCopyFunc) source_backlink_ref, (GDestroyNotify) source_backlink_unref, NULL, NULL, NULL); -#line 187 "/home/jens/Source/shotwell/src/core/DataSource.vala" - backlinks = G_TYPE_CHECK_INSTANCE_CAST (_tmp8_, GEE_TYPE_LIST, GeeList); -#line 1241 "DataSource.c" - { - GeeList* _value_list = NULL; - GeeList* _tmp9_; - GeeList* _tmp10_; - gint _value_size = 0; - GeeList* _tmp11_; - gint _tmp12_; - gint _tmp13_; - gint _value_index = 0; -#line 188 "/home/jens/Source/shotwell/src/core/DataSource.vala" - _tmp9_ = values; -#line 188 "/home/jens/Source/shotwell/src/core/DataSource.vala" - _tmp10_ = _g_object_ref0 (_tmp9_); -#line 188 "/home/jens/Source/shotwell/src/core/DataSource.vala" - _value_list = _tmp10_; -#line 188 "/home/jens/Source/shotwell/src/core/DataSource.vala" - _tmp11_ = _value_list; -#line 188 "/home/jens/Source/shotwell/src/core/DataSource.vala" - _tmp12_ = gee_collection_get_size (G_TYPE_CHECK_INSTANCE_CAST (_tmp11_, GEE_TYPE_COLLECTION, GeeCollection)); -#line 188 "/home/jens/Source/shotwell/src/core/DataSource.vala" - _tmp13_ = _tmp12_; -#line 188 "/home/jens/Source/shotwell/src/core/DataSource.vala" - _value_size = _tmp13_; -#line 188 "/home/jens/Source/shotwell/src/core/DataSource.vala" - _value_index = -1; -#line 188 "/home/jens/Source/shotwell/src/core/DataSource.vala" - while (TRUE) { -#line 1269 "DataSource.c" - gint _tmp14_; - gint _tmp15_; - gint _tmp16_; - gchar* value = NULL; - GeeList* _tmp17_; - gint _tmp18_; - gpointer _tmp19_; - GeeList* _tmp20_; - const gchar* _tmp21_; - SourceBacklink* _tmp22_; - SourceBacklink* _tmp23_; -#line 188 "/home/jens/Source/shotwell/src/core/DataSource.vala" - _tmp14_ = _value_index; -#line 188 "/home/jens/Source/shotwell/src/core/DataSource.vala" - _value_index = _tmp14_ + 1; -#line 188 "/home/jens/Source/shotwell/src/core/DataSource.vala" - _tmp15_ = _value_index; -#line 188 "/home/jens/Source/shotwell/src/core/DataSource.vala" - _tmp16_ = _value_size; -#line 188 "/home/jens/Source/shotwell/src/core/DataSource.vala" - if (!(_tmp15_ < _tmp16_)) { -#line 188 "/home/jens/Source/shotwell/src/core/DataSource.vala" - break; -#line 1293 "DataSource.c" - } -#line 188 "/home/jens/Source/shotwell/src/core/DataSource.vala" - _tmp17_ = _value_list; -#line 188 "/home/jens/Source/shotwell/src/core/DataSource.vala" - _tmp18_ = _value_index; -#line 188 "/home/jens/Source/shotwell/src/core/DataSource.vala" - _tmp19_ = gee_list_get (_tmp17_, _tmp18_); -#line 188 "/home/jens/Source/shotwell/src/core/DataSource.vala" - value = (gchar*) _tmp19_; -#line 189 "/home/jens/Source/shotwell/src/core/DataSource.vala" - _tmp20_ = backlinks; -#line 189 "/home/jens/Source/shotwell/src/core/DataSource.vala" - _tmp21_ = value; -#line 189 "/home/jens/Source/shotwell/src/core/DataSource.vala" - _tmp22_ = source_backlink_new (name, _tmp21_); -#line 189 "/home/jens/Source/shotwell/src/core/DataSource.vala" - _tmp23_ = _tmp22_; -#line 189 "/home/jens/Source/shotwell/src/core/DataSource.vala" - gee_collection_add (G_TYPE_CHECK_INSTANCE_CAST (_tmp20_, GEE_TYPE_COLLECTION, GeeCollection), _tmp23_); -#line 189 "/home/jens/Source/shotwell/src/core/DataSource.vala" - _source_backlink_unref0 (_tmp23_); -#line 188 "/home/jens/Source/shotwell/src/core/DataSource.vala" - _g_free0 (value); -#line 1317 "DataSource.c" - } -#line 188 "/home/jens/Source/shotwell/src/core/DataSource.vala" - _g_object_unref0 (_value_list); -#line 1321 "DataSource.c" - } -#line 191 "/home/jens/Source/shotwell/src/core/DataSource.vala" - result = backlinks; -#line 191 "/home/jens/Source/shotwell/src/core/DataSource.vala" - _g_object_unref0 (values); -#line 191 "/home/jens/Source/shotwell/src/core/DataSource.vala" - return result; -#line 1329 "DataSource.c" -} - - -void -data_source_set_backlink (DataSource* self, - SourceBacklink* backlink) -{ - GeeHashMap* _tmp0_; - GeeList* values = NULL; - GeeHashMap* _tmp1_; - const gchar* _tmp2_; - const gchar* _tmp3_; - gpointer _tmp4_; - GeeList* _tmp5_; - GeeList* _tmp11_; - const gchar* _tmp12_; - const gchar* _tmp13_; - SourceCollection* sources = NULL; - DataCollection* _tmp14_; - SourceCollection* _tmp15_; -#line 194 "/home/jens/Source/shotwell/src/core/DataSource.vala" - g_return_if_fail (IS_DATA_SOURCE (self)); -#line 194 "/home/jens/Source/shotwell/src/core/DataSource.vala" - g_return_if_fail (IS_SOURCE_BACKLINK (backlink)); -#line 196 "/home/jens/Source/shotwell/src/core/DataSource.vala" - _tmp0_ = self->priv->backlinks; -#line 196 "/home/jens/Source/shotwell/src/core/DataSource.vala" - _vala_assert (_tmp0_ != NULL, "backlinks != null"); -#line 198 "/home/jens/Source/shotwell/src/core/DataSource.vala" - _tmp1_ = self->priv->backlinks; -#line 198 "/home/jens/Source/shotwell/src/core/DataSource.vala" - _tmp2_ = source_backlink_get_name (backlink); -#line 198 "/home/jens/Source/shotwell/src/core/DataSource.vala" - _tmp3_ = _tmp2_; -#line 198 "/home/jens/Source/shotwell/src/core/DataSource.vala" - _tmp4_ = gee_abstract_map_get (G_TYPE_CHECK_INSTANCE_CAST (_tmp1_, GEE_TYPE_ABSTRACT_MAP, GeeAbstractMap), _tmp3_); -#line 198 "/home/jens/Source/shotwell/src/core/DataSource.vala" - values = (GeeList*) _tmp4_; -#line 199 "/home/jens/Source/shotwell/src/core/DataSource.vala" - _tmp5_ = values; -#line 199 "/home/jens/Source/shotwell/src/core/DataSource.vala" - if (_tmp5_ == NULL) { -#line 1372 "DataSource.c" - GeeArrayList* _tmp6_; - GeeHashMap* _tmp7_; - const gchar* _tmp8_; - const gchar* _tmp9_; - GeeList* _tmp10_; -#line 200 "/home/jens/Source/shotwell/src/core/DataSource.vala" - _tmp6_ = gee_array_list_new (G_TYPE_STRING, (GBoxedCopyFunc) g_strdup, (GDestroyNotify) g_free, NULL, NULL, NULL); -#line 200 "/home/jens/Source/shotwell/src/core/DataSource.vala" - _g_object_unref0 (values); -#line 200 "/home/jens/Source/shotwell/src/core/DataSource.vala" - values = G_TYPE_CHECK_INSTANCE_CAST (_tmp6_, GEE_TYPE_LIST, GeeList); -#line 201 "/home/jens/Source/shotwell/src/core/DataSource.vala" - _tmp7_ = self->priv->backlinks; -#line 201 "/home/jens/Source/shotwell/src/core/DataSource.vala" - _tmp8_ = source_backlink_get_name (backlink); -#line 201 "/home/jens/Source/shotwell/src/core/DataSource.vala" - _tmp9_ = _tmp8_; -#line 201 "/home/jens/Source/shotwell/src/core/DataSource.vala" - _tmp10_ = values; -#line 201 "/home/jens/Source/shotwell/src/core/DataSource.vala" - gee_abstract_map_set (G_TYPE_CHECK_INSTANCE_CAST (_tmp7_, GEE_TYPE_ABSTRACT_MAP, GeeAbstractMap), _tmp9_, _tmp10_); -#line 1394 "DataSource.c" - } -#line 204 "/home/jens/Source/shotwell/src/core/DataSource.vala" - _tmp11_ = values; -#line 204 "/home/jens/Source/shotwell/src/core/DataSource.vala" - _tmp12_ = source_backlink_get_value (backlink); -#line 204 "/home/jens/Source/shotwell/src/core/DataSource.vala" - _tmp13_ = _tmp12_; -#line 204 "/home/jens/Source/shotwell/src/core/DataSource.vala" - gee_collection_add (G_TYPE_CHECK_INSTANCE_CAST (_tmp11_, GEE_TYPE_COLLECTION, GeeCollection), _tmp13_); -#line 206 "/home/jens/Source/shotwell/src/core/DataSource.vala" - _tmp14_ = data_object_get_membership (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_DATA_OBJECT, DataObject)); -#line 206 "/home/jens/Source/shotwell/src/core/DataSource.vala" - sources = G_TYPE_CHECK_INSTANCE_CAST (_tmp14_, TYPE_SOURCE_COLLECTION, SourceCollection); -#line 207 "/home/jens/Source/shotwell/src/core/DataSource.vala" - _tmp15_ = sources; -#line 207 "/home/jens/Source/shotwell/src/core/DataSource.vala" - if (_tmp15_ != NULL) { -#line 1412 "DataSource.c" - SourceCollection* _tmp16_; -#line 208 "/home/jens/Source/shotwell/src/core/DataSource.vala" - _tmp16_ = sources; -#line 208 "/home/jens/Source/shotwell/src/core/DataSource.vala" - source_collection_internal_backlink_set (_tmp16_, self, backlink); -#line 1418 "DataSource.c" - } -#line 194 "/home/jens/Source/shotwell/src/core/DataSource.vala" - _data_collection_unref0 (sources); -#line 194 "/home/jens/Source/shotwell/src/core/DataSource.vala" - _g_object_unref0 (values); -#line 1424 "DataSource.c" -} - - -gboolean -data_source_remove_backlink (DataSource* self, - SourceBacklink* backlink) -{ - gboolean result = FALSE; - GeeHashMap* _tmp0_; - GeeList* values = NULL; - GeeHashMap* _tmp1_; - const gchar* _tmp2_; - const gchar* _tmp3_; - gpointer _tmp4_; - GeeList* _tmp5_; - gint original_size = 0; - GeeList* _tmp6_; - gint _tmp7_; - gint _tmp8_; - gint _tmp9_; - GeeIterator* iter = NULL; - GeeList* _tmp10_; - GeeIterator* _tmp11_; - GeeList* _tmp20_; - gint _tmp21_; - gint _tmp22_; - SourceCollection* _tmp26_; - gchar* _tmp27_; - gchar* _tmp28_; - SourceCollection* sources = NULL; - DataCollection* _tmp29_; - SourceCollection* _tmp30_; - GeeList* _tmp32_; - gint _tmp33_; - gint _tmp34_; - gint _tmp35_; -#line 211 "/home/jens/Source/shotwell/src/core/DataSource.vala" - g_return_val_if_fail (IS_DATA_SOURCE (self), FALSE); -#line 211 "/home/jens/Source/shotwell/src/core/DataSource.vala" - g_return_val_if_fail (IS_SOURCE_BACKLINK (backlink), FALSE); -#line 212 "/home/jens/Source/shotwell/src/core/DataSource.vala" - _tmp0_ = self->priv->backlinks; -#line 212 "/home/jens/Source/shotwell/src/core/DataSource.vala" - if (_tmp0_ == NULL) { -#line 213 "/home/jens/Source/shotwell/src/core/DataSource.vala" - result = FALSE; -#line 213 "/home/jens/Source/shotwell/src/core/DataSource.vala" - return result; -#line 1473 "DataSource.c" - } -#line 215 "/home/jens/Source/shotwell/src/core/DataSource.vala" - _tmp1_ = self->priv->backlinks; -#line 215 "/home/jens/Source/shotwell/src/core/DataSource.vala" - _tmp2_ = source_backlink_get_name (backlink); -#line 215 "/home/jens/Source/shotwell/src/core/DataSource.vala" - _tmp3_ = _tmp2_; -#line 215 "/home/jens/Source/shotwell/src/core/DataSource.vala" - _tmp4_ = gee_abstract_map_get (G_TYPE_CHECK_INSTANCE_CAST (_tmp1_, GEE_TYPE_ABSTRACT_MAP, GeeAbstractMap), _tmp3_); -#line 215 "/home/jens/Source/shotwell/src/core/DataSource.vala" - values = (GeeList*) _tmp4_; -#line 216 "/home/jens/Source/shotwell/src/core/DataSource.vala" - _tmp5_ = values; -#line 216 "/home/jens/Source/shotwell/src/core/DataSource.vala" - if (_tmp5_ == NULL) { -#line 217 "/home/jens/Source/shotwell/src/core/DataSource.vala" - result = FALSE; -#line 217 "/home/jens/Source/shotwell/src/core/DataSource.vala" - _g_object_unref0 (values); -#line 217 "/home/jens/Source/shotwell/src/core/DataSource.vala" - return result; -#line 1495 "DataSource.c" - } -#line 219 "/home/jens/Source/shotwell/src/core/DataSource.vala" - _tmp6_ = values; -#line 219 "/home/jens/Source/shotwell/src/core/DataSource.vala" - _tmp7_ = gee_collection_get_size (G_TYPE_CHECK_INSTANCE_CAST (_tmp6_, GEE_TYPE_COLLECTION, GeeCollection)); -#line 219 "/home/jens/Source/shotwell/src/core/DataSource.vala" - _tmp8_ = _tmp7_; -#line 219 "/home/jens/Source/shotwell/src/core/DataSource.vala" - original_size = _tmp8_; -#line 220 "/home/jens/Source/shotwell/src/core/DataSource.vala" - _tmp9_ = original_size; -#line 220 "/home/jens/Source/shotwell/src/core/DataSource.vala" - _vala_assert (_tmp9_ > 0, "original_size > 0"); -#line 222 "/home/jens/Source/shotwell/src/core/DataSource.vala" - _tmp10_ = values; -#line 222 "/home/jens/Source/shotwell/src/core/DataSource.vala" - _tmp11_ = gee_iterable_iterator (G_TYPE_CHECK_INSTANCE_CAST (_tmp10_, GEE_TYPE_ITERABLE, GeeIterable)); -#line 222 "/home/jens/Source/shotwell/src/core/DataSource.vala" - iter = _tmp11_; -#line 223 "/home/jens/Source/shotwell/src/core/DataSource.vala" - while (TRUE) { -#line 1517 "DataSource.c" - GeeIterator* _tmp12_; - GeeIterator* _tmp13_; - gpointer _tmp14_; - gchar* _tmp15_; - const gchar* _tmp16_; - const gchar* _tmp17_; - gboolean _tmp18_; -#line 223 "/home/jens/Source/shotwell/src/core/DataSource.vala" - _tmp12_ = iter; -#line 223 "/home/jens/Source/shotwell/src/core/DataSource.vala" - if (!gee_iterator_next (_tmp12_)) { -#line 223 "/home/jens/Source/shotwell/src/core/DataSource.vala" - break; -#line 1531 "DataSource.c" - } -#line 224 "/home/jens/Source/shotwell/src/core/DataSource.vala" - _tmp13_ = iter; -#line 224 "/home/jens/Source/shotwell/src/core/DataSource.vala" - _tmp14_ = gee_iterator_get (_tmp13_); -#line 224 "/home/jens/Source/shotwell/src/core/DataSource.vala" - _tmp15_ = (gchar*) _tmp14_; -#line 224 "/home/jens/Source/shotwell/src/core/DataSource.vala" - _tmp16_ = source_backlink_get_value (backlink); -#line 224 "/home/jens/Source/shotwell/src/core/DataSource.vala" - _tmp17_ = _tmp16_; -#line 224 "/home/jens/Source/shotwell/src/core/DataSource.vala" - _tmp18_ = g_strcmp0 (_tmp15_, _tmp17_) == 0; -#line 224 "/home/jens/Source/shotwell/src/core/DataSource.vala" - _g_free0 (_tmp15_); -#line 224 "/home/jens/Source/shotwell/src/core/DataSource.vala" - if (_tmp18_) { -#line 1549 "DataSource.c" - GeeIterator* _tmp19_; -#line 225 "/home/jens/Source/shotwell/src/core/DataSource.vala" - _tmp19_ = iter; -#line 225 "/home/jens/Source/shotwell/src/core/DataSource.vala" - gee_iterator_remove (_tmp19_); -#line 1555 "DataSource.c" - } - } -#line 228 "/home/jens/Source/shotwell/src/core/DataSource.vala" - _tmp20_ = values; -#line 228 "/home/jens/Source/shotwell/src/core/DataSource.vala" - _tmp21_ = gee_collection_get_size (G_TYPE_CHECK_INSTANCE_CAST (_tmp20_, GEE_TYPE_COLLECTION, GeeCollection)); -#line 228 "/home/jens/Source/shotwell/src/core/DataSource.vala" - _tmp22_ = _tmp21_; -#line 228 "/home/jens/Source/shotwell/src/core/DataSource.vala" - if (_tmp22_ == 0) { -#line 1566 "DataSource.c" - GeeHashMap* _tmp23_; - const gchar* _tmp24_; - const gchar* _tmp25_; -#line 229 "/home/jens/Source/shotwell/src/core/DataSource.vala" - _tmp23_ = self->priv->backlinks; -#line 229 "/home/jens/Source/shotwell/src/core/DataSource.vala" - _tmp24_ = source_backlink_get_name (backlink); -#line 229 "/home/jens/Source/shotwell/src/core/DataSource.vala" - _tmp25_ = _tmp24_; -#line 229 "/home/jens/Source/shotwell/src/core/DataSource.vala" - gee_abstract_map_unset (G_TYPE_CHECK_INSTANCE_CAST (_tmp23_, GEE_TYPE_ABSTRACT_MAP, GeeAbstractMap), _tmp25_, NULL); -#line 1578 "DataSource.c" - } -#line 233 "/home/jens/Source/shotwell/src/core/DataSource.vala" - _tmp26_ = self->priv->unlinked_from_collection; -#line 233 "/home/jens/Source/shotwell/src/core/DataSource.vala" - _tmp27_ = data_source_dehydrate_backlinks (self); -#line 233 "/home/jens/Source/shotwell/src/core/DataSource.vala" - _tmp28_ = _tmp27_; -#line 233 "/home/jens/Source/shotwell/src/core/DataSource.vala" - data_source_commit_backlinks (self, _tmp26_, _tmp28_); -#line 233 "/home/jens/Source/shotwell/src/core/DataSource.vala" - _g_free0 (_tmp28_); -#line 235 "/home/jens/Source/shotwell/src/core/DataSource.vala" - _tmp29_ = data_object_get_membership (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_DATA_OBJECT, DataObject)); -#line 235 "/home/jens/Source/shotwell/src/core/DataSource.vala" - sources = G_TYPE_CHECK_INSTANCE_CAST (_tmp29_, TYPE_SOURCE_COLLECTION, SourceCollection); -#line 236 "/home/jens/Source/shotwell/src/core/DataSource.vala" - _tmp30_ = sources; -#line 236 "/home/jens/Source/shotwell/src/core/DataSource.vala" - if (_tmp30_ != NULL) { -#line 1598 "DataSource.c" - SourceCollection* _tmp31_; -#line 237 "/home/jens/Source/shotwell/src/core/DataSource.vala" - _tmp31_ = sources; -#line 237 "/home/jens/Source/shotwell/src/core/DataSource.vala" - source_collection_internal_backlink_removed (_tmp31_, self, backlink); -#line 1604 "DataSource.c" - } -#line 239 "/home/jens/Source/shotwell/src/core/DataSource.vala" - _tmp32_ = values; -#line 239 "/home/jens/Source/shotwell/src/core/DataSource.vala" - _tmp33_ = gee_collection_get_size (G_TYPE_CHECK_INSTANCE_CAST (_tmp32_, GEE_TYPE_COLLECTION, GeeCollection)); -#line 239 "/home/jens/Source/shotwell/src/core/DataSource.vala" - _tmp34_ = _tmp33_; -#line 239 "/home/jens/Source/shotwell/src/core/DataSource.vala" - _tmp35_ = original_size; -#line 239 "/home/jens/Source/shotwell/src/core/DataSource.vala" - result = _tmp34_ != _tmp35_; -#line 239 "/home/jens/Source/shotwell/src/core/DataSource.vala" - _data_collection_unref0 (sources); -#line 239 "/home/jens/Source/shotwell/src/core/DataSource.vala" - _g_object_unref0 (iter); -#line 239 "/home/jens/Source/shotwell/src/core/DataSource.vala" - _g_object_unref0 (values); -#line 239 "/home/jens/Source/shotwell/src/core/DataSource.vala" - return result; -#line 1624 "DataSource.c" -} - - -static void -data_source_real_commit_backlinks (DataSource* self, - SourceCollection* sources, - const gchar* dehydrated) -{ - gboolean _tmp0_ = FALSE; -#line 248 "/home/jens/Source/shotwell/src/core/DataSource.vala" - g_return_if_fail ((sources == NULL) || IS_SOURCE_COLLECTION (sources)); -#line 249 "/home/jens/Source/shotwell/src/core/DataSource.vala" - if (sources != NULL) { -#line 249 "/home/jens/Source/shotwell/src/core/DataSource.vala" - _tmp0_ = TRUE; -#line 1640 "DataSource.c" - } else { -#line 249 "/home/jens/Source/shotwell/src/core/DataSource.vala" - _tmp0_ = dehydrated != NULL; -#line 1644 "DataSource.c" - } -#line 249 "/home/jens/Source/shotwell/src/core/DataSource.vala" - if (_tmp0_) { -#line 1648 "DataSource.c" - gchar* _tmp1_; - gchar* _tmp2_; -#line 250 "/home/jens/Source/shotwell/src/core/DataSource.vala" - _tmp1_ = data_object_to_string (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_DATA_OBJECT, DataObject)); -#line 250 "/home/jens/Source/shotwell/src/core/DataSource.vala" - _tmp2_ = _tmp1_; -#line 250 "/home/jens/Source/shotwell/src/core/DataSource.vala" - g_warning ("DataSource.vala:250: No implementation to commit link state for %s", _tmp2_); -#line 250 "/home/jens/Source/shotwell/src/core/DataSource.vala" - _g_free0 (_tmp2_); -#line 1659 "DataSource.c" - } -} - - -void -data_source_commit_backlinks (DataSource* self, - SourceCollection* sources, - const gchar* dehydrated) -{ -#line 248 "/home/jens/Source/shotwell/src/core/DataSource.vala" - g_return_if_fail (IS_DATA_SOURCE (self)); -#line 248 "/home/jens/Source/shotwell/src/core/DataSource.vala" - DATA_SOURCE_GET_CLASS (self)->commit_backlinks (self, sources, dehydrated); -#line 1673 "DataSource.c" -} - - -static gchar* -data_source_dehydrate_backlinks (DataSource* self) -{ - gchar* result = NULL; - gboolean _tmp0_ = FALSE; - GeeHashMap* _tmp1_; - GString* builder = NULL; - GString* _tmp5_; - const gchar* _tmp49_ = NULL; - GString* _tmp50_; - const gchar* _tmp51_; - gint _tmp52_; - gint _tmp53_; - gchar* _tmp56_; -#line 253 "/home/jens/Source/shotwell/src/core/DataSource.vala" - g_return_val_if_fail (IS_DATA_SOURCE (self), NULL); -#line 254 "/home/jens/Source/shotwell/src/core/DataSource.vala" - _tmp1_ = self->priv->backlinks; -#line 254 "/home/jens/Source/shotwell/src/core/DataSource.vala" - if (_tmp1_ == NULL) { -#line 254 "/home/jens/Source/shotwell/src/core/DataSource.vala" - _tmp0_ = TRUE; -#line 1699 "DataSource.c" - } else { - GeeHashMap* _tmp2_; - gint _tmp3_; - gint _tmp4_; -#line 254 "/home/jens/Source/shotwell/src/core/DataSource.vala" - _tmp2_ = self->priv->backlinks; -#line 254 "/home/jens/Source/shotwell/src/core/DataSource.vala" - _tmp3_ = gee_abstract_map_get_size (G_TYPE_CHECK_INSTANCE_CAST (_tmp2_, GEE_TYPE_ABSTRACT_MAP, GeeAbstractMap)); -#line 254 "/home/jens/Source/shotwell/src/core/DataSource.vala" - _tmp4_ = _tmp3_; -#line 254 "/home/jens/Source/shotwell/src/core/DataSource.vala" - _tmp0_ = _tmp4_ == 0; -#line 1712 "DataSource.c" - } -#line 254 "/home/jens/Source/shotwell/src/core/DataSource.vala" - if (_tmp0_) { -#line 255 "/home/jens/Source/shotwell/src/core/DataSource.vala" - result = NULL; -#line 255 "/home/jens/Source/shotwell/src/core/DataSource.vala" - return result; -#line 1720 "DataSource.c" - } -#line 257 "/home/jens/Source/shotwell/src/core/DataSource.vala" - _tmp5_ = g_string_new (""); -#line 257 "/home/jens/Source/shotwell/src/core/DataSource.vala" - builder = _tmp5_; -#line 1726 "DataSource.c" - { - GeeIterator* _name_it = NULL; - GeeHashMap* _tmp6_; - GeeSet* _tmp7_; - GeeSet* _tmp8_; - GeeSet* _tmp9_; - GeeIterator* _tmp10_; - GeeIterator* _tmp11_; -#line 258 "/home/jens/Source/shotwell/src/core/DataSource.vala" - _tmp6_ = self->priv->backlinks; -#line 258 "/home/jens/Source/shotwell/src/core/DataSource.vala" - _tmp7_ = gee_abstract_map_get_keys (G_TYPE_CHECK_INSTANCE_CAST (_tmp6_, GEE_TYPE_ABSTRACT_MAP, GeeAbstractMap)); -#line 258 "/home/jens/Source/shotwell/src/core/DataSource.vala" - _tmp8_ = _tmp7_; -#line 258 "/home/jens/Source/shotwell/src/core/DataSource.vala" - _tmp9_ = _tmp8_; -#line 258 "/home/jens/Source/shotwell/src/core/DataSource.vala" - _tmp10_ = gee_iterable_iterator (G_TYPE_CHECK_INSTANCE_CAST (_tmp9_, GEE_TYPE_ITERABLE, GeeIterable)); -#line 258 "/home/jens/Source/shotwell/src/core/DataSource.vala" - _tmp11_ = _tmp10_; -#line 258 "/home/jens/Source/shotwell/src/core/DataSource.vala" - _g_object_unref0 (_tmp9_); -#line 258 "/home/jens/Source/shotwell/src/core/DataSource.vala" - _name_it = _tmp11_; -#line 258 "/home/jens/Source/shotwell/src/core/DataSource.vala" - while (TRUE) { -#line 1753 "DataSource.c" - GeeIterator* _tmp12_; - gchar* name = NULL; - GeeIterator* _tmp13_; - gpointer _tmp14_; - GeeList* values = NULL; - GeeHashMap* _tmp15_; - const gchar* _tmp16_; - gpointer _tmp17_; - gboolean _tmp18_ = FALSE; - GeeList* _tmp19_; - gchar* value_field = NULL; - gchar* _tmp23_; - const gchar* _tmp41_; - gint _tmp42_; - gint _tmp43_; -#line 258 "/home/jens/Source/shotwell/src/core/DataSource.vala" - _tmp12_ = _name_it; -#line 258 "/home/jens/Source/shotwell/src/core/DataSource.vala" - if (!gee_iterator_next (_tmp12_)) { -#line 258 "/home/jens/Source/shotwell/src/core/DataSource.vala" - break; -#line 1775 "DataSource.c" - } -#line 258 "/home/jens/Source/shotwell/src/core/DataSource.vala" - _tmp13_ = _name_it; -#line 258 "/home/jens/Source/shotwell/src/core/DataSource.vala" - _tmp14_ = gee_iterator_get (_tmp13_); -#line 258 "/home/jens/Source/shotwell/src/core/DataSource.vala" - name = (gchar*) _tmp14_; -#line 259 "/home/jens/Source/shotwell/src/core/DataSource.vala" - _tmp15_ = self->priv->backlinks; -#line 259 "/home/jens/Source/shotwell/src/core/DataSource.vala" - _tmp16_ = name; -#line 259 "/home/jens/Source/shotwell/src/core/DataSource.vala" - _tmp17_ = gee_abstract_map_get (G_TYPE_CHECK_INSTANCE_CAST (_tmp15_, GEE_TYPE_ABSTRACT_MAP, GeeAbstractMap), _tmp16_); -#line 259 "/home/jens/Source/shotwell/src/core/DataSource.vala" - values = (GeeList*) _tmp17_; -#line 260 "/home/jens/Source/shotwell/src/core/DataSource.vala" - _tmp19_ = values; -#line 260 "/home/jens/Source/shotwell/src/core/DataSource.vala" - if (_tmp19_ == NULL) { -#line 260 "/home/jens/Source/shotwell/src/core/DataSource.vala" - _tmp18_ = TRUE; -#line 1797 "DataSource.c" - } else { - GeeList* _tmp20_; - gint _tmp21_; - gint _tmp22_; -#line 260 "/home/jens/Source/shotwell/src/core/DataSource.vala" - _tmp20_ = values; -#line 260 "/home/jens/Source/shotwell/src/core/DataSource.vala" - _tmp21_ = gee_collection_get_size (G_TYPE_CHECK_INSTANCE_CAST (_tmp20_, GEE_TYPE_COLLECTION, GeeCollection)); -#line 260 "/home/jens/Source/shotwell/src/core/DataSource.vala" - _tmp22_ = _tmp21_; -#line 260 "/home/jens/Source/shotwell/src/core/DataSource.vala" - _tmp18_ = _tmp22_ == 0; -#line 1810 "DataSource.c" - } -#line 260 "/home/jens/Source/shotwell/src/core/DataSource.vala" - if (_tmp18_) { -#line 261 "/home/jens/Source/shotwell/src/core/DataSource.vala" - _g_object_unref0 (values); -#line 261 "/home/jens/Source/shotwell/src/core/DataSource.vala" - _g_free0 (name); -#line 261 "/home/jens/Source/shotwell/src/core/DataSource.vala" - continue; -#line 1820 "DataSource.c" - } -#line 263 "/home/jens/Source/shotwell/src/core/DataSource.vala" - _tmp23_ = g_strdup (""); -#line 263 "/home/jens/Source/shotwell/src/core/DataSource.vala" - value_field = _tmp23_; -#line 1826 "DataSource.c" - { - GeeList* _value_list = NULL; - GeeList* _tmp24_; - GeeList* _tmp25_; - gint _value_size = 0; - GeeList* _tmp26_; - gint _tmp27_; - gint _tmp28_; - gint _value_index = 0; -#line 264 "/home/jens/Source/shotwell/src/core/DataSource.vala" - _tmp24_ = values; -#line 264 "/home/jens/Source/shotwell/src/core/DataSource.vala" - _tmp25_ = _g_object_ref0 (_tmp24_); -#line 264 "/home/jens/Source/shotwell/src/core/DataSource.vala" - _value_list = _tmp25_; -#line 264 "/home/jens/Source/shotwell/src/core/DataSource.vala" - _tmp26_ = _value_list; -#line 264 "/home/jens/Source/shotwell/src/core/DataSource.vala" - _tmp27_ = gee_collection_get_size (G_TYPE_CHECK_INSTANCE_CAST (_tmp26_, GEE_TYPE_COLLECTION, GeeCollection)); -#line 264 "/home/jens/Source/shotwell/src/core/DataSource.vala" - _tmp28_ = _tmp27_; -#line 264 "/home/jens/Source/shotwell/src/core/DataSource.vala" - _value_size = _tmp28_; -#line 264 "/home/jens/Source/shotwell/src/core/DataSource.vala" - _value_index = -1; -#line 264 "/home/jens/Source/shotwell/src/core/DataSource.vala" - while (TRUE) { -#line 1854 "DataSource.c" - gint _tmp29_; - gint _tmp30_; - gint _tmp31_; - gchar* value = NULL; - GeeList* _tmp32_; - gint _tmp33_; - gpointer _tmp34_; - const gchar* _tmp35_; -#line 264 "/home/jens/Source/shotwell/src/core/DataSource.vala" - _tmp29_ = _value_index; -#line 264 "/home/jens/Source/shotwell/src/core/DataSource.vala" - _value_index = _tmp29_ + 1; -#line 264 "/home/jens/Source/shotwell/src/core/DataSource.vala" - _tmp30_ = _value_index; -#line 264 "/home/jens/Source/shotwell/src/core/DataSource.vala" - _tmp31_ = _value_size; -#line 264 "/home/jens/Source/shotwell/src/core/DataSource.vala" - if (!(_tmp30_ < _tmp31_)) { -#line 264 "/home/jens/Source/shotwell/src/core/DataSource.vala" - break; -#line 1875 "DataSource.c" - } -#line 264 "/home/jens/Source/shotwell/src/core/DataSource.vala" - _tmp32_ = _value_list; -#line 264 "/home/jens/Source/shotwell/src/core/DataSource.vala" - _tmp33_ = _value_index; -#line 264 "/home/jens/Source/shotwell/src/core/DataSource.vala" - _tmp34_ = gee_list_get (_tmp32_, _tmp33_); -#line 264 "/home/jens/Source/shotwell/src/core/DataSource.vala" - value = (gchar*) _tmp34_; -#line 265 "/home/jens/Source/shotwell/src/core/DataSource.vala" - _tmp35_ = value; -#line 265 "/home/jens/Source/shotwell/src/core/DataSource.vala" - if (!is_string_empty (_tmp35_)) { -#line 1889 "DataSource.c" - const gchar* _tmp36_; - const gchar* _tmp37_; - gchar* _tmp38_; - gchar* _tmp39_; - gchar* _tmp40_; -#line 266 "/home/jens/Source/shotwell/src/core/DataSource.vala" - _tmp36_ = value_field; -#line 266 "/home/jens/Source/shotwell/src/core/DataSource.vala" - _tmp37_ = value; -#line 266 "/home/jens/Source/shotwell/src/core/DataSource.vala" - _tmp38_ = g_strconcat (_tmp37_, "|", NULL); -#line 266 "/home/jens/Source/shotwell/src/core/DataSource.vala" - _tmp39_ = _tmp38_; -#line 266 "/home/jens/Source/shotwell/src/core/DataSource.vala" - _tmp40_ = g_strconcat (_tmp36_, _tmp39_, NULL); -#line 266 "/home/jens/Source/shotwell/src/core/DataSource.vala" - _g_free0 (value_field); -#line 266 "/home/jens/Source/shotwell/src/core/DataSource.vala" - value_field = _tmp40_; -#line 266 "/home/jens/Source/shotwell/src/core/DataSource.vala" - _g_free0 (_tmp39_); -#line 1911 "DataSource.c" - } -#line 264 "/home/jens/Source/shotwell/src/core/DataSource.vala" - _g_free0 (value); -#line 1915 "DataSource.c" - } -#line 264 "/home/jens/Source/shotwell/src/core/DataSource.vala" - _g_object_unref0 (_value_list); -#line 1919 "DataSource.c" - } -#line 269 "/home/jens/Source/shotwell/src/core/DataSource.vala" - _tmp41_ = value_field; -#line 269 "/home/jens/Source/shotwell/src/core/DataSource.vala" - _tmp42_ = strlen (_tmp41_); -#line 269 "/home/jens/Source/shotwell/src/core/DataSource.vala" - _tmp43_ = _tmp42_; -#line 269 "/home/jens/Source/shotwell/src/core/DataSource.vala" - if (_tmp43_ > 0) { -#line 1929 "DataSource.c" - GString* _tmp44_; - const gchar* _tmp45_; - const gchar* _tmp46_; - gchar* _tmp47_; - gchar* _tmp48_; -#line 270 "/home/jens/Source/shotwell/src/core/DataSource.vala" - _tmp44_ = builder; -#line 270 "/home/jens/Source/shotwell/src/core/DataSource.vala" - _tmp45_ = name; -#line 270 "/home/jens/Source/shotwell/src/core/DataSource.vala" - _tmp46_ = value_field; -#line 270 "/home/jens/Source/shotwell/src/core/DataSource.vala" - _tmp47_ = g_strdup_printf ("%s=%s\n", _tmp45_, _tmp46_); -#line 270 "/home/jens/Source/shotwell/src/core/DataSource.vala" - _tmp48_ = _tmp47_; -#line 270 "/home/jens/Source/shotwell/src/core/DataSource.vala" - g_string_append (_tmp44_, _tmp48_); -#line 270 "/home/jens/Source/shotwell/src/core/DataSource.vala" - _g_free0 (_tmp48_); -#line 1949 "DataSource.c" - } -#line 258 "/home/jens/Source/shotwell/src/core/DataSource.vala" - _g_free0 (value_field); -#line 258 "/home/jens/Source/shotwell/src/core/DataSource.vala" - _g_object_unref0 (values); -#line 258 "/home/jens/Source/shotwell/src/core/DataSource.vala" - _g_free0 (name); -#line 1957 "DataSource.c" - } -#line 258 "/home/jens/Source/shotwell/src/core/DataSource.vala" - _g_object_unref0 (_name_it); -#line 1961 "DataSource.c" - } -#line 273 "/home/jens/Source/shotwell/src/core/DataSource.vala" - _tmp50_ = builder; -#line 273 "/home/jens/Source/shotwell/src/core/DataSource.vala" - _tmp51_ = _tmp50_->str; -#line 273 "/home/jens/Source/shotwell/src/core/DataSource.vala" - _tmp52_ = strlen (_tmp51_); -#line 273 "/home/jens/Source/shotwell/src/core/DataSource.vala" - _tmp53_ = _tmp52_; -#line 273 "/home/jens/Source/shotwell/src/core/DataSource.vala" - if (_tmp53_ > 0) { -#line 1973 "DataSource.c" - GString* _tmp54_; - const gchar* _tmp55_; -#line 273 "/home/jens/Source/shotwell/src/core/DataSource.vala" - _tmp54_ = builder; -#line 273 "/home/jens/Source/shotwell/src/core/DataSource.vala" - _tmp55_ = _tmp54_->str; -#line 273 "/home/jens/Source/shotwell/src/core/DataSource.vala" - _tmp49_ = _tmp55_; -#line 1982 "DataSource.c" - } else { -#line 273 "/home/jens/Source/shotwell/src/core/DataSource.vala" - _tmp49_ = NULL; -#line 1986 "DataSource.c" - } -#line 273 "/home/jens/Source/shotwell/src/core/DataSource.vala" - _tmp56_ = g_strdup (_tmp49_); -#line 273 "/home/jens/Source/shotwell/src/core/DataSource.vala" - result = _tmp56_; -#line 273 "/home/jens/Source/shotwell/src/core/DataSource.vala" - _g_string_free0 (builder); -#line 273 "/home/jens/Source/shotwell/src/core/DataSource.vala" - return result; -#line 1996 "DataSource.c" -} - - -void -data_source_rehydrate_backlinks (DataSource* self, - SourceCollection* unlinked_from, - const gchar* dehydrated) -{ - GeeHashMap* _tmp0_; - gchar** lines = NULL; - gchar** _tmp1_; - gchar** _tmp2_; - gint lines_length1; - gint _lines_size_; - gchar** _tmp3_; - gint _tmp3__length1; -#line 278 "/home/jens/Source/shotwell/src/core/DataSource.vala" - g_return_if_fail (IS_DATA_SOURCE (self)); -#line 278 "/home/jens/Source/shotwell/src/core/DataSource.vala" - g_return_if_fail (IS_SOURCE_COLLECTION (unlinked_from)); -#line 279 "/home/jens/Source/shotwell/src/core/DataSource.vala" - self->priv->unlinked_from_collection = unlinked_from; -#line 280 "/home/jens/Source/shotwell/src/core/DataSource.vala" - _tmp0_ = gee_hash_map_new (G_TYPE_STRING, (GBoxedCopyFunc) g_strdup, (GDestroyNotify) g_free, GEE_TYPE_LIST, (GBoxedCopyFunc) g_object_ref, (GDestroyNotify) g_object_unref, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL); -#line 280 "/home/jens/Source/shotwell/src/core/DataSource.vala" - _g_object_unref0 (self->priv->backlinks); -#line 280 "/home/jens/Source/shotwell/src/core/DataSource.vala" - self->priv->backlinks = _tmp0_; -#line 282 "/home/jens/Source/shotwell/src/core/DataSource.vala" - if (dehydrated == NULL) { -#line 283 "/home/jens/Source/shotwell/src/core/DataSource.vala" - return; -#line 2029 "DataSource.c" - } -#line 285 "/home/jens/Source/shotwell/src/core/DataSource.vala" - _tmp2_ = _tmp1_ = g_strsplit (dehydrated, "\n", 0); -#line 285 "/home/jens/Source/shotwell/src/core/DataSource.vala" - lines = _tmp2_; -#line 285 "/home/jens/Source/shotwell/src/core/DataSource.vala" - lines_length1 = _vala_array_length (_tmp1_); -#line 285 "/home/jens/Source/shotwell/src/core/DataSource.vala" - _lines_size_ = lines_length1; -#line 286 "/home/jens/Source/shotwell/src/core/DataSource.vala" - _tmp3_ = lines; -#line 286 "/home/jens/Source/shotwell/src/core/DataSource.vala" - _tmp3__length1 = lines_length1; -#line 2043 "DataSource.c" - { - gchar** line_collection = NULL; - gint line_collection_length1 = 0; - gint _line_collection_size_ = 0; - gint line_it = 0; -#line 286 "/home/jens/Source/shotwell/src/core/DataSource.vala" - line_collection = _tmp3_; -#line 286 "/home/jens/Source/shotwell/src/core/DataSource.vala" - line_collection_length1 = _tmp3__length1; -#line 286 "/home/jens/Source/shotwell/src/core/DataSource.vala" - for (line_it = 0; line_it < _tmp3__length1; line_it = line_it + 1) { -#line 2055 "DataSource.c" - gchar* _tmp4_; - gchar* line = NULL; -#line 286 "/home/jens/Source/shotwell/src/core/DataSource.vala" - _tmp4_ = g_strdup (line_collection[line_it]); -#line 286 "/home/jens/Source/shotwell/src/core/DataSource.vala" - line = _tmp4_; -#line 2062 "DataSource.c" - { - const gchar* _tmp5_; - gint _tmp6_; - gint _tmp7_; - gchar** tokens = NULL; - const gchar* _tmp8_; - gchar** _tmp9_; - gchar** _tmp10_; - gint tokens_length1; - gint _tokens_size_; - gchar** _tmp11_; - gint _tmp11__length1; - gchar** decoded_values = NULL; - gchar** _tmp15_; - gint _tmp15__length1; - const gchar* _tmp16_; - gchar** _tmp17_; - gchar** _tmp18_; - gint decoded_values_length1; - gint _decoded_values_size_; - GeeList* values = NULL; - GeeArrayList* _tmp19_; - gchar** _tmp20_; - gint _tmp20__length1; - GeeList* _tmp29_; - gint _tmp30_; - gint _tmp31_; -#line 287 "/home/jens/Source/shotwell/src/core/DataSource.vala" - _tmp5_ = line; -#line 287 "/home/jens/Source/shotwell/src/core/DataSource.vala" - _tmp6_ = strlen (_tmp5_); -#line 287 "/home/jens/Source/shotwell/src/core/DataSource.vala" - _tmp7_ = _tmp6_; -#line 287 "/home/jens/Source/shotwell/src/core/DataSource.vala" - if (_tmp7_ == 0) { -#line 288 "/home/jens/Source/shotwell/src/core/DataSource.vala" - _g_free0 (line); -#line 288 "/home/jens/Source/shotwell/src/core/DataSource.vala" - continue; -#line 2102 "DataSource.c" - } -#line 290 "/home/jens/Source/shotwell/src/core/DataSource.vala" - _tmp8_ = line; -#line 290 "/home/jens/Source/shotwell/src/core/DataSource.vala" - _tmp10_ = _tmp9_ = g_strsplit (_tmp8_, "=", 2); -#line 290 "/home/jens/Source/shotwell/src/core/DataSource.vala" - tokens = _tmp10_; -#line 290 "/home/jens/Source/shotwell/src/core/DataSource.vala" - tokens_length1 = _vala_array_length (_tmp9_); -#line 290 "/home/jens/Source/shotwell/src/core/DataSource.vala" - _tokens_size_ = tokens_length1; -#line 291 "/home/jens/Source/shotwell/src/core/DataSource.vala" - _tmp11_ = tokens; -#line 291 "/home/jens/Source/shotwell/src/core/DataSource.vala" - _tmp11__length1 = tokens_length1; -#line 291 "/home/jens/Source/shotwell/src/core/DataSource.vala" - if (_tmp11__length1 < 2) { -#line 2120 "DataSource.c" - const gchar* _tmp12_; - gchar* _tmp13_; - gchar* _tmp14_; -#line 292 "/home/jens/Source/shotwell/src/core/DataSource.vala" - _tmp12_ = line; -#line 292 "/home/jens/Source/shotwell/src/core/DataSource.vala" - _tmp13_ = data_object_to_string (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_DATA_OBJECT, DataObject)); -#line 292 "/home/jens/Source/shotwell/src/core/DataSource.vala" - _tmp14_ = _tmp13_; -#line 292 "/home/jens/Source/shotwell/src/core/DataSource.vala" - g_warning ("DataSource.vala:292: Unable to rehydrate \"%s\" for %s: name and value" \ -" not present", _tmp12_, _tmp14_); -#line 292 "/home/jens/Source/shotwell/src/core/DataSource.vala" - _g_free0 (_tmp14_); -#line 295 "/home/jens/Source/shotwell/src/core/DataSource.vala" - tokens = (_vala_array_free (tokens, tokens_length1, (GDestroyNotify) g_free), NULL); -#line 295 "/home/jens/Source/shotwell/src/core/DataSource.vala" - _g_free0 (line); -#line 295 "/home/jens/Source/shotwell/src/core/DataSource.vala" - continue; -#line 2140 "DataSource.c" - } -#line 298 "/home/jens/Source/shotwell/src/core/DataSource.vala" - _tmp15_ = tokens; -#line 298 "/home/jens/Source/shotwell/src/core/DataSource.vala" - _tmp15__length1 = tokens_length1; -#line 298 "/home/jens/Source/shotwell/src/core/DataSource.vala" - _tmp16_ = _tmp15_[1]; -#line 298 "/home/jens/Source/shotwell/src/core/DataSource.vala" - _tmp18_ = _tmp17_ = g_strsplit (_tmp16_, "|", 0); -#line 298 "/home/jens/Source/shotwell/src/core/DataSource.vala" - decoded_values = _tmp18_; -#line 298 "/home/jens/Source/shotwell/src/core/DataSource.vala" - decoded_values_length1 = _vala_array_length (_tmp17_); -#line 298 "/home/jens/Source/shotwell/src/core/DataSource.vala" - _decoded_values_size_ = decoded_values_length1; -#line 299 "/home/jens/Source/shotwell/src/core/DataSource.vala" - _tmp19_ = gee_array_list_new (G_TYPE_STRING, (GBoxedCopyFunc) g_strdup, (GDestroyNotify) g_free, NULL, NULL, NULL); -#line 299 "/home/jens/Source/shotwell/src/core/DataSource.vala" - values = G_TYPE_CHECK_INSTANCE_CAST (_tmp19_, GEE_TYPE_LIST, GeeList); -#line 300 "/home/jens/Source/shotwell/src/core/DataSource.vala" - _tmp20_ = decoded_values; -#line 300 "/home/jens/Source/shotwell/src/core/DataSource.vala" - _tmp20__length1 = decoded_values_length1; -#line 2164 "DataSource.c" - { - gchar** value_collection = NULL; - gint value_collection_length1 = 0; - gint _value_collection_size_ = 0; - gint value_it = 0; -#line 300 "/home/jens/Source/shotwell/src/core/DataSource.vala" - value_collection = _tmp20_; -#line 300 "/home/jens/Source/shotwell/src/core/DataSource.vala" - value_collection_length1 = _tmp20__length1; -#line 300 "/home/jens/Source/shotwell/src/core/DataSource.vala" - for (value_it = 0; value_it < _tmp20__length1; value_it = value_it + 1) { -#line 2176 "DataSource.c" - gchar* _tmp21_; - gchar* value = NULL; -#line 300 "/home/jens/Source/shotwell/src/core/DataSource.vala" - _tmp21_ = g_strdup (value_collection[value_it]); -#line 300 "/home/jens/Source/shotwell/src/core/DataSource.vala" - value = _tmp21_; -#line 2183 "DataSource.c" - { - gboolean _tmp22_ = FALSE; - const gchar* _tmp23_; -#line 301 "/home/jens/Source/shotwell/src/core/DataSource.vala" - _tmp23_ = value; -#line 301 "/home/jens/Source/shotwell/src/core/DataSource.vala" - if (_tmp23_ != NULL) { -#line 2191 "DataSource.c" - const gchar* _tmp24_; - gint _tmp25_; - gint _tmp26_; -#line 301 "/home/jens/Source/shotwell/src/core/DataSource.vala" - _tmp24_ = value; -#line 301 "/home/jens/Source/shotwell/src/core/DataSource.vala" - _tmp25_ = strlen (_tmp24_); -#line 301 "/home/jens/Source/shotwell/src/core/DataSource.vala" - _tmp26_ = _tmp25_; -#line 301 "/home/jens/Source/shotwell/src/core/DataSource.vala" - _tmp22_ = _tmp26_ > 0; -#line 2203 "DataSource.c" - } else { -#line 301 "/home/jens/Source/shotwell/src/core/DataSource.vala" - _tmp22_ = FALSE; -#line 2207 "DataSource.c" - } -#line 301 "/home/jens/Source/shotwell/src/core/DataSource.vala" - if (_tmp22_) { -#line 2211 "DataSource.c" - GeeList* _tmp27_; - const gchar* _tmp28_; -#line 302 "/home/jens/Source/shotwell/src/core/DataSource.vala" - _tmp27_ = values; -#line 302 "/home/jens/Source/shotwell/src/core/DataSource.vala" - _tmp28_ = value; -#line 302 "/home/jens/Source/shotwell/src/core/DataSource.vala" - gee_collection_add (G_TYPE_CHECK_INSTANCE_CAST (_tmp27_, GEE_TYPE_COLLECTION, GeeCollection), _tmp28_); -#line 2220 "DataSource.c" - } -#line 300 "/home/jens/Source/shotwell/src/core/DataSource.vala" - _g_free0 (value); -#line 2224 "DataSource.c" - } - } - } -#line 305 "/home/jens/Source/shotwell/src/core/DataSource.vala" - _tmp29_ = values; -#line 305 "/home/jens/Source/shotwell/src/core/DataSource.vala" - _tmp30_ = gee_collection_get_size (G_TYPE_CHECK_INSTANCE_CAST (_tmp29_, GEE_TYPE_COLLECTION, GeeCollection)); -#line 305 "/home/jens/Source/shotwell/src/core/DataSource.vala" - _tmp31_ = _tmp30_; -#line 305 "/home/jens/Source/shotwell/src/core/DataSource.vala" - if (_tmp31_ > 0) { -#line 2236 "DataSource.c" - GeeHashMap* _tmp32_; - gchar** _tmp33_; - gint _tmp33__length1; - const gchar* _tmp34_; - GeeList* _tmp35_; -#line 306 "/home/jens/Source/shotwell/src/core/DataSource.vala" - _tmp32_ = self->priv->backlinks; -#line 306 "/home/jens/Source/shotwell/src/core/DataSource.vala" - _tmp33_ = tokens; -#line 306 "/home/jens/Source/shotwell/src/core/DataSource.vala" - _tmp33__length1 = tokens_length1; -#line 306 "/home/jens/Source/shotwell/src/core/DataSource.vala" - _tmp34_ = _tmp33_[0]; -#line 306 "/home/jens/Source/shotwell/src/core/DataSource.vala" - _tmp35_ = values; -#line 306 "/home/jens/Source/shotwell/src/core/DataSource.vala" - gee_abstract_map_set (G_TYPE_CHECK_INSTANCE_CAST (_tmp32_, GEE_TYPE_ABSTRACT_MAP, GeeAbstractMap), _tmp34_, _tmp35_); -#line 2254 "DataSource.c" - } -#line 286 "/home/jens/Source/shotwell/src/core/DataSource.vala" - _g_object_unref0 (values); -#line 286 "/home/jens/Source/shotwell/src/core/DataSource.vala" - decoded_values = (_vala_array_free (decoded_values, decoded_values_length1, (GDestroyNotify) g_free), NULL); -#line 286 "/home/jens/Source/shotwell/src/core/DataSource.vala" - tokens = (_vala_array_free (tokens, tokens_length1, (GDestroyNotify) g_free), NULL); -#line 286 "/home/jens/Source/shotwell/src/core/DataSource.vala" - _g_free0 (line); -#line 2264 "DataSource.c" - } - } - } -#line 278 "/home/jens/Source/shotwell/src/core/DataSource.vala" - lines = (_vala_array_free (lines, lines_length1, (GDestroyNotify) g_free), NULL); -#line 2270 "DataSource.c" -} - - -static SourceSnapshot* -data_source_real_save_snapshot (DataSource* self) -{ - SourceSnapshot* result = NULL; -#line 312 "/home/jens/Source/shotwell/src/core/DataSource.vala" - result = NULL; -#line 312 "/home/jens/Source/shotwell/src/core/DataSource.vala" - return result; -#line 2282 "DataSource.c" -} - - -SourceSnapshot* -data_source_save_snapshot (DataSource* self) -{ -#line 311 "/home/jens/Source/shotwell/src/core/DataSource.vala" - g_return_val_if_fail (IS_DATA_SOURCE (self), NULL); -#line 311 "/home/jens/Source/shotwell/src/core/DataSource.vala" - return DATA_SOURCE_GET_CLASS (self)->save_snapshot (self); -#line 2293 "DataSource.c" -} - - -void -data_source_internal_mark_for_destroy (DataSource* self) -{ -#line 316 "/home/jens/Source/shotwell/src/core/DataSource.vala" - g_return_if_fail (IS_DATA_SOURCE (self)); -#line 317 "/home/jens/Source/shotwell/src/core/DataSource.vala" - self->priv->marked_for_destroy = TRUE; -#line 2304 "DataSource.c" -} - - -static gboolean -data_source_real_internal_delete_backing (DataSource* self, - GError** error) -{ - gboolean result = FALSE; -#line 325 "/home/jens/Source/shotwell/src/core/DataSource.vala" - result = TRUE; -#line 325 "/home/jens/Source/shotwell/src/core/DataSource.vala" - return result; -#line 2317 "DataSource.c" -} - - -gboolean -data_source_internal_delete_backing (DataSource* self, - GError** error) -{ -#line 324 "/home/jens/Source/shotwell/src/core/DataSource.vala" - g_return_val_if_fail (IS_DATA_SOURCE (self), FALSE); -#line 324 "/home/jens/Source/shotwell/src/core/DataSource.vala" - return DATA_SOURCE_GET_CLASS (self)->internal_delete_backing (self, error); -#line 2329 "DataSource.c" -} - - -static gboolean -data_source_real_equals (DataSource* self, - DataSource* source) -{ - gboolean result = FALSE; -#line 330 "/home/jens/Source/shotwell/src/core/DataSource.vala" - g_return_val_if_fail ((source == NULL) || IS_DATA_SOURCE (source), FALSE); -#line 331 "/home/jens/Source/shotwell/src/core/DataSource.vala" - result = self == source; -#line 331 "/home/jens/Source/shotwell/src/core/DataSource.vala" - return result; -#line 2344 "DataSource.c" -} - - -gboolean -data_source_equals (DataSource* self, - DataSource* source) -{ -#line 330 "/home/jens/Source/shotwell/src/core/DataSource.vala" - g_return_val_if_fail (IS_DATA_SOURCE (self), FALSE); -#line 330 "/home/jens/Source/shotwell/src/core/DataSource.vala" - return DATA_SOURCE_GET_CLASS (self)->equals (self, source); -#line 2356 "DataSource.c" -} - - -static void -data_source_real_destroy (DataSource* self) -{ - gboolean _tmp0_; -#line 341 "/home/jens/Source/shotwell/src/core/DataSource.vala" - _tmp0_ = self->priv->marked_for_destroy; -#line 341 "/home/jens/Source/shotwell/src/core/DataSource.vala" - _vala_assert (_tmp0_, "marked_for_destroy"); -#line 344 "/home/jens/Source/shotwell/src/core/DataSource.vala" - self->priv->is_destroyed = TRUE; -#line 2370 "DataSource.c" - { - gint ctr = 0; -#line 347 "/home/jens/Source/shotwell/src/core/DataSource.vala" - ctr = 0; -#line 2375 "DataSource.c" - { - gboolean _tmp1_ = FALSE; -#line 347 "/home/jens/Source/shotwell/src/core/DataSource.vala" - _tmp1_ = TRUE; -#line 347 "/home/jens/Source/shotwell/src/core/DataSource.vala" - while (TRUE) { -#line 2382 "DataSource.c" - gint _tmp3_; - DataView** _tmp4_; - gint _tmp4__length1; - DataView** _tmp5_; - gint _tmp5__length1; - gint _tmp6_; - DataView* _tmp7_; -#line 347 "/home/jens/Source/shotwell/src/core/DataSource.vala" - if (!_tmp1_) { -#line 2392 "DataSource.c" - gint _tmp2_; -#line 347 "/home/jens/Source/shotwell/src/core/DataSource.vala" - _tmp2_ = ctr; -#line 347 "/home/jens/Source/shotwell/src/core/DataSource.vala" - ctr = _tmp2_ + 1; -#line 2398 "DataSource.c" - } -#line 347 "/home/jens/Source/shotwell/src/core/DataSource.vala" - _tmp1_ = FALSE; -#line 347 "/home/jens/Source/shotwell/src/core/DataSource.vala" - _tmp3_ = ctr; -#line 347 "/home/jens/Source/shotwell/src/core/DataSource.vala" - _tmp4_ = self->priv->subscribers; -#line 347 "/home/jens/Source/shotwell/src/core/DataSource.vala" - _tmp4__length1 = self->priv->subscribers_length1; -#line 347 "/home/jens/Source/shotwell/src/core/DataSource.vala" - if (!(_tmp3_ < _tmp4__length1)) { -#line 347 "/home/jens/Source/shotwell/src/core/DataSource.vala" - break; -#line 2412 "DataSource.c" - } -#line 348 "/home/jens/Source/shotwell/src/core/DataSource.vala" - _tmp5_ = self->priv->subscribers; -#line 348 "/home/jens/Source/shotwell/src/core/DataSource.vala" - _tmp5__length1 = self->priv->subscribers_length1; -#line 348 "/home/jens/Source/shotwell/src/core/DataSource.vala" - _tmp6_ = ctr; -#line 348 "/home/jens/Source/shotwell/src/core/DataSource.vala" - _tmp7_ = _tmp5_[_tmp6_]; -#line 348 "/home/jens/Source/shotwell/src/core/DataSource.vala" - if (_tmp7_ != NULL) { -#line 2424 "DataSource.c" - DataView* view = NULL; - DataView** _tmp8_; - gint _tmp8__length1; - gint _tmp9_; - DataView* _tmp10_; - DataView* _tmp11_; - DataView** _tmp12_; - gint _tmp12__length1; - gint _tmp13_; - DataView* _tmp14_; - DataView* _tmp15_; -#line 349 "/home/jens/Source/shotwell/src/core/DataSource.vala" - _tmp8_ = self->priv->subscribers; -#line 349 "/home/jens/Source/shotwell/src/core/DataSource.vala" - _tmp8__length1 = self->priv->subscribers_length1; -#line 349 "/home/jens/Source/shotwell/src/core/DataSource.vala" - _tmp9_ = ctr; -#line 349 "/home/jens/Source/shotwell/src/core/DataSource.vala" - _tmp10_ = _tmp8_[_tmp9_]; -#line 349 "/home/jens/Source/shotwell/src/core/DataSource.vala" - _tmp11_ = _g_object_ref0 (_tmp10_); -#line 349 "/home/jens/Source/shotwell/src/core/DataSource.vala" - view = _tmp11_; -#line 350 "/home/jens/Source/shotwell/src/core/DataSource.vala" - _tmp12_ = self->priv->subscribers; -#line 350 "/home/jens/Source/shotwell/src/core/DataSource.vala" - _tmp12__length1 = self->priv->subscribers_length1; -#line 350 "/home/jens/Source/shotwell/src/core/DataSource.vala" - _tmp13_ = ctr; -#line 350 "/home/jens/Source/shotwell/src/core/DataSource.vala" - _g_object_unref0 (_tmp12_[_tmp13_]); -#line 350 "/home/jens/Source/shotwell/src/core/DataSource.vala" - _tmp12_[_tmp13_] = NULL; -#line 350 "/home/jens/Source/shotwell/src/core/DataSource.vala" - _tmp14_ = _tmp12_[_tmp13_]; -#line 352 "/home/jens/Source/shotwell/src/core/DataSource.vala" - _tmp15_ = view; -#line 352 "/home/jens/Source/shotwell/src/core/DataSource.vala" - data_view_notify_unsubscribed (_tmp15_, self); -#line 348 "/home/jens/Source/shotwell/src/core/DataSource.vala" - _g_object_unref0 (view); -#line 2466 "DataSource.c" - } - } - } - } -#line 357 "/home/jens/Source/shotwell/src/core/DataSource.vala" - g_signal_emit (self, data_source_signals[DATA_SOURCE_DESTROYED_SIGNAL], 0); -#line 2473 "DataSource.c" -} - - -void -data_source_destroy (DataSource* self) -{ -#line 340 "/home/jens/Source/shotwell/src/core/DataSource.vala" - g_return_if_fail (IS_DATA_SOURCE (self)); -#line 340 "/home/jens/Source/shotwell/src/core/DataSource.vala" - DATA_SOURCE_GET_CLASS (self)->destroy (self); -#line 2484 "DataSource.c" -} - - -gboolean -data_source_destroy_orphan (DataSource* self, - gboolean delete_backing) -{ - gboolean result = FALSE; - gboolean ret = FALSE; - SourceCollection* _tmp9_; - GError * _inner_error_ = NULL; -#line 366 "/home/jens/Source/shotwell/src/core/DataSource.vala" - g_return_val_if_fail (IS_DATA_SOURCE (self), FALSE); -#line 367 "/home/jens/Source/shotwell/src/core/DataSource.vala" - ret = TRUE; -#line 368 "/home/jens/Source/shotwell/src/core/DataSource.vala" - if (delete_backing) { -#line 2502 "DataSource.c" - { - gboolean _tmp0_ = FALSE; - gboolean _tmp1_; -#line 370 "/home/jens/Source/shotwell/src/core/DataSource.vala" - _tmp0_ = data_source_internal_delete_backing (self, &_inner_error_); -#line 370 "/home/jens/Source/shotwell/src/core/DataSource.vala" - if (G_UNLIKELY (_inner_error_ != NULL)) { -#line 2510 "DataSource.c" - goto __catch54_g_error; - } -#line 370 "/home/jens/Source/shotwell/src/core/DataSource.vala" - ret = _tmp0_; -#line 371 "/home/jens/Source/shotwell/src/core/DataSource.vala" - _tmp1_ = ret; -#line 371 "/home/jens/Source/shotwell/src/core/DataSource.vala" - if (!_tmp1_) { -#line 2519 "DataSource.c" - gchar* _tmp2_; - gchar* _tmp3_; -#line 372 "/home/jens/Source/shotwell/src/core/DataSource.vala" - _tmp2_ = data_object_to_string (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_DATA_OBJECT, DataObject)); -#line 372 "/home/jens/Source/shotwell/src/core/DataSource.vala" - _tmp3_ = _tmp2_; -#line 372 "/home/jens/Source/shotwell/src/core/DataSource.vala" - g_warning ("DataSource.vala:372: Unable to delete backing for %s", _tmp3_); -#line 372 "/home/jens/Source/shotwell/src/core/DataSource.vala" - _g_free0 (_tmp3_); -#line 2530 "DataSource.c" - } - } - goto __finally54; - __catch54_g_error: - { - GError* err = NULL; - gchar* _tmp4_; - gchar* _tmp5_; - GError* _tmp6_; - const gchar* _tmp7_; -#line 369 "/home/jens/Source/shotwell/src/core/DataSource.vala" - err = _inner_error_; -#line 369 "/home/jens/Source/shotwell/src/core/DataSource.vala" - _inner_error_ = NULL; -#line 375 "/home/jens/Source/shotwell/src/core/DataSource.vala" - _tmp4_ = data_object_to_string (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_DATA_OBJECT, DataObject)); -#line 375 "/home/jens/Source/shotwell/src/core/DataSource.vala" - _tmp5_ = _tmp4_; -#line 375 "/home/jens/Source/shotwell/src/core/DataSource.vala" - _tmp6_ = err; -#line 375 "/home/jens/Source/shotwell/src/core/DataSource.vala" - _tmp7_ = _tmp6_->message; -#line 375 "/home/jens/Source/shotwell/src/core/DataSource.vala" - g_warning ("DataSource.vala:375: Unable to delete backing for %s: %s", _tmp5_, _tmp7_); -#line 375 "/home/jens/Source/shotwell/src/core/DataSource.vala" - _g_free0 (_tmp5_); -#line 376 "/home/jens/Source/shotwell/src/core/DataSource.vala" - ret = FALSE; -#line 369 "/home/jens/Source/shotwell/src/core/DataSource.vala" - _g_error_free0 (err); -#line 2561 "DataSource.c" - } - __finally54: -#line 369 "/home/jens/Source/shotwell/src/core/DataSource.vala" - if (G_UNLIKELY (_inner_error_ != NULL)) { -#line 2566 "DataSource.c" - gboolean _tmp8_ = FALSE; -#line 369 "/home/jens/Source/shotwell/src/core/DataSource.vala" - g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code); -#line 369 "/home/jens/Source/shotwell/src/core/DataSource.vala" - g_clear_error (&_inner_error_); -#line 369 "/home/jens/Source/shotwell/src/core/DataSource.vala" - return _tmp8_; -#line 2574 "DataSource.c" - } - } -#line 380 "/home/jens/Source/shotwell/src/core/DataSource.vala" - data_source_internal_mark_for_destroy (self); -#line 381 "/home/jens/Source/shotwell/src/core/DataSource.vala" - data_source_destroy (self); -#line 383 "/home/jens/Source/shotwell/src/core/DataSource.vala" - _tmp9_ = self->priv->unlinked_from_collection; -#line 383 "/home/jens/Source/shotwell/src/core/DataSource.vala" - if (_tmp9_ != NULL) { -#line 2585 "DataSource.c" - SourceCollection* _tmp10_; -#line 384 "/home/jens/Source/shotwell/src/core/DataSource.vala" - _tmp10_ = self->priv->unlinked_from_collection; -#line 384 "/home/jens/Source/shotwell/src/core/DataSource.vala" - source_collection_notify_unlinked_destroyed (_tmp10_, self); -#line 2591 "DataSource.c" - } -#line 386 "/home/jens/Source/shotwell/src/core/DataSource.vala" - result = ret; -#line 386 "/home/jens/Source/shotwell/src/core/DataSource.vala" - return result; -#line 2597 "DataSource.c" -} - - -static void -_vala_array_add66 (DataView** * array, - int* length, - int* size, - DataView* value) -{ -#line 406 "/home/jens/Source/shotwell/src/core/DataSource.vala" - if ((*length) == (*size)) { -#line 406 "/home/jens/Source/shotwell/src/core/DataSource.vala" - *size = (*size) ? (2 * (*size)) : 4; -#line 406 "/home/jens/Source/shotwell/src/core/DataSource.vala" - *array = g_renew (DataView*, *array, (*size) + 1); -#line 2613 "DataSource.c" - } -#line 406 "/home/jens/Source/shotwell/src/core/DataSource.vala" - (*array)[(*length)++] = value; -#line 406 "/home/jens/Source/shotwell/src/core/DataSource.vala" - (*array)[*length] = NULL; -#line 2619 "DataSource.c" -} - - -void -data_source_internal_subscribe (DataSource* self, - DataView* view) -{ - gboolean _tmp0_; - DataView** _tmp12_; - gint _tmp12__length1; - DataView* _tmp13_; -#line 395 "/home/jens/Source/shotwell/src/core/DataSource.vala" - g_return_if_fail (IS_DATA_SOURCE (self)); -#line 395 "/home/jens/Source/shotwell/src/core/DataSource.vala" - g_return_if_fail (IS_DATA_VIEW (view)); -#line 396 "/home/jens/Source/shotwell/src/core/DataSource.vala" - _tmp0_ = self->priv->in_contact; -#line 396 "/home/jens/Source/shotwell/src/core/DataSource.vala" - _vala_assert (!_tmp0_, "!in_contact"); -#line 2639 "DataSource.c" - { - gint ctr = 0; -#line 398 "/home/jens/Source/shotwell/src/core/DataSource.vala" - ctr = 0; -#line 2644 "DataSource.c" - { - gboolean _tmp1_ = FALSE; -#line 398 "/home/jens/Source/shotwell/src/core/DataSource.vala" - _tmp1_ = TRUE; -#line 398 "/home/jens/Source/shotwell/src/core/DataSource.vala" - while (TRUE) { -#line 2651 "DataSource.c" - gint _tmp3_; - DataView** _tmp4_; - gint _tmp4__length1; - DataView** _tmp5_; - gint _tmp5__length1; - gint _tmp6_; - DataView* _tmp7_; -#line 398 "/home/jens/Source/shotwell/src/core/DataSource.vala" - if (!_tmp1_) { -#line 2661 "DataSource.c" - gint _tmp2_; -#line 398 "/home/jens/Source/shotwell/src/core/DataSource.vala" - _tmp2_ = ctr; -#line 398 "/home/jens/Source/shotwell/src/core/DataSource.vala" - ctr = _tmp2_ + 1; -#line 2667 "DataSource.c" - } -#line 398 "/home/jens/Source/shotwell/src/core/DataSource.vala" - _tmp1_ = FALSE; -#line 398 "/home/jens/Source/shotwell/src/core/DataSource.vala" - _tmp3_ = ctr; -#line 398 "/home/jens/Source/shotwell/src/core/DataSource.vala" - _tmp4_ = self->priv->subscribers; -#line 398 "/home/jens/Source/shotwell/src/core/DataSource.vala" - _tmp4__length1 = self->priv->subscribers_length1; -#line 398 "/home/jens/Source/shotwell/src/core/DataSource.vala" - if (!(_tmp3_ < _tmp4__length1)) { -#line 398 "/home/jens/Source/shotwell/src/core/DataSource.vala" - break; -#line 2681 "DataSource.c" - } -#line 399 "/home/jens/Source/shotwell/src/core/DataSource.vala" - _tmp5_ = self->priv->subscribers; -#line 399 "/home/jens/Source/shotwell/src/core/DataSource.vala" - _tmp5__length1 = self->priv->subscribers_length1; -#line 399 "/home/jens/Source/shotwell/src/core/DataSource.vala" - _tmp6_ = ctr; -#line 399 "/home/jens/Source/shotwell/src/core/DataSource.vala" - _tmp7_ = _tmp5_[_tmp6_]; -#line 399 "/home/jens/Source/shotwell/src/core/DataSource.vala" - if (_tmp7_ == NULL) { -#line 2693 "DataSource.c" - DataView** _tmp8_; - gint _tmp8__length1; - gint _tmp9_; - DataView* _tmp10_; - DataView* _tmp11_; -#line 400 "/home/jens/Source/shotwell/src/core/DataSource.vala" - _tmp8_ = self->priv->subscribers; -#line 400 "/home/jens/Source/shotwell/src/core/DataSource.vala" - _tmp8__length1 = self->priv->subscribers_length1; -#line 400 "/home/jens/Source/shotwell/src/core/DataSource.vala" - _tmp9_ = ctr; -#line 400 "/home/jens/Source/shotwell/src/core/DataSource.vala" - _tmp10_ = _g_object_ref0 (view); -#line 400 "/home/jens/Source/shotwell/src/core/DataSource.vala" - _g_object_unref0 (_tmp8_[_tmp9_]); -#line 400 "/home/jens/Source/shotwell/src/core/DataSource.vala" - _tmp8_[_tmp9_] = _tmp10_; -#line 400 "/home/jens/Source/shotwell/src/core/DataSource.vala" - _tmp11_ = _tmp8_[_tmp9_]; -#line 402 "/home/jens/Source/shotwell/src/core/DataSource.vala" - return; -#line 2715 "DataSource.c" - } - } - } - } -#line 406 "/home/jens/Source/shotwell/src/core/DataSource.vala" - _tmp12_ = self->priv->subscribers; -#line 406 "/home/jens/Source/shotwell/src/core/DataSource.vala" - _tmp12__length1 = self->priv->subscribers_length1; -#line 406 "/home/jens/Source/shotwell/src/core/DataSource.vala" - _tmp13_ = _g_object_ref0 (view); -#line 406 "/home/jens/Source/shotwell/src/core/DataSource.vala" - _vala_array_add66 (&self->priv->subscribers, &self->priv->subscribers_length1, &self->priv->_subscribers_size_, _tmp13_); -#line 2728 "DataSource.c" -} - - -void -data_source_internal_unsubscribe (DataSource* self, - DataView* view) -{ - gboolean _tmp0_; -#line 411 "/home/jens/Source/shotwell/src/core/DataSource.vala" - g_return_if_fail (IS_DATA_SOURCE (self)); -#line 411 "/home/jens/Source/shotwell/src/core/DataSource.vala" - g_return_if_fail (IS_DATA_VIEW (view)); -#line 412 "/home/jens/Source/shotwell/src/core/DataSource.vala" - _tmp0_ = self->priv->in_contact; -#line 412 "/home/jens/Source/shotwell/src/core/DataSource.vala" - _vala_assert (!_tmp0_, "!in_contact"); -#line 2745 "DataSource.c" - { - gint ctr = 0; -#line 414 "/home/jens/Source/shotwell/src/core/DataSource.vala" - ctr = 0; -#line 2750 "DataSource.c" - { - gboolean _tmp1_ = FALSE; -#line 414 "/home/jens/Source/shotwell/src/core/DataSource.vala" - _tmp1_ = TRUE; -#line 414 "/home/jens/Source/shotwell/src/core/DataSource.vala" - while (TRUE) { -#line 2757 "DataSource.c" - gint _tmp3_; - DataView** _tmp4_; - gint _tmp4__length1; - DataView** _tmp5_; - gint _tmp5__length1; - gint _tmp6_; - DataView* _tmp7_; -#line 414 "/home/jens/Source/shotwell/src/core/DataSource.vala" - if (!_tmp1_) { -#line 2767 "DataSource.c" - gint _tmp2_; -#line 414 "/home/jens/Source/shotwell/src/core/DataSource.vala" - _tmp2_ = ctr; -#line 414 "/home/jens/Source/shotwell/src/core/DataSource.vala" - ctr = _tmp2_ + 1; -#line 2773 "DataSource.c" - } -#line 414 "/home/jens/Source/shotwell/src/core/DataSource.vala" - _tmp1_ = FALSE; -#line 414 "/home/jens/Source/shotwell/src/core/DataSource.vala" - _tmp3_ = ctr; -#line 414 "/home/jens/Source/shotwell/src/core/DataSource.vala" - _tmp4_ = self->priv->subscribers; -#line 414 "/home/jens/Source/shotwell/src/core/DataSource.vala" - _tmp4__length1 = self->priv->subscribers_length1; -#line 414 "/home/jens/Source/shotwell/src/core/DataSource.vala" - if (!(_tmp3_ < _tmp4__length1)) { -#line 414 "/home/jens/Source/shotwell/src/core/DataSource.vala" - break; -#line 2787 "DataSource.c" - } -#line 415 "/home/jens/Source/shotwell/src/core/DataSource.vala" - _tmp5_ = self->priv->subscribers; -#line 415 "/home/jens/Source/shotwell/src/core/DataSource.vala" - _tmp5__length1 = self->priv->subscribers_length1; -#line 415 "/home/jens/Source/shotwell/src/core/DataSource.vala" - _tmp6_ = ctr; -#line 415 "/home/jens/Source/shotwell/src/core/DataSource.vala" - _tmp7_ = _tmp5_[_tmp6_]; -#line 415 "/home/jens/Source/shotwell/src/core/DataSource.vala" - if (_tmp7_ == view) { -#line 2799 "DataSource.c" - DataView** _tmp8_; - gint _tmp8__length1; - gint _tmp9_; - DataView* _tmp10_; -#line 416 "/home/jens/Source/shotwell/src/core/DataSource.vala" - _tmp8_ = self->priv->subscribers; -#line 416 "/home/jens/Source/shotwell/src/core/DataSource.vala" - _tmp8__length1 = self->priv->subscribers_length1; -#line 416 "/home/jens/Source/shotwell/src/core/DataSource.vala" - _tmp9_ = ctr; -#line 416 "/home/jens/Source/shotwell/src/core/DataSource.vala" - _g_object_unref0 (_tmp8_[_tmp9_]); -#line 416 "/home/jens/Source/shotwell/src/core/DataSource.vala" - _tmp8_[_tmp9_] = NULL; -#line 416 "/home/jens/Source/shotwell/src/core/DataSource.vala" - _tmp10_ = _tmp8_[_tmp9_]; -#line 418 "/home/jens/Source/shotwell/src/core/DataSource.vala" - return; -#line 2818 "DataSource.c" - } - } - } - } -} - - -void -data_source_contact_subscribers (DataSource* self, - DataSourceContactSubscriber contact_subscriber, - void* contact_subscriber_target) -{ - gboolean _tmp0_; -#line 423 "/home/jens/Source/shotwell/src/core/DataSource.vala" - g_return_if_fail (IS_DATA_SOURCE (self)); -#line 424 "/home/jens/Source/shotwell/src/core/DataSource.vala" - _tmp0_ = self->priv->in_contact; -#line 424 "/home/jens/Source/shotwell/src/core/DataSource.vala" - _vala_assert (!_tmp0_, "!in_contact"); -#line 426 "/home/jens/Source/shotwell/src/core/DataSource.vala" - self->priv->in_contact = TRUE; -#line 2840 "DataSource.c" - { - gint ctr = 0; -#line 427 "/home/jens/Source/shotwell/src/core/DataSource.vala" - ctr = 0; -#line 2845 "DataSource.c" - { - gboolean _tmp1_ = FALSE; -#line 427 "/home/jens/Source/shotwell/src/core/DataSource.vala" - _tmp1_ = TRUE; -#line 427 "/home/jens/Source/shotwell/src/core/DataSource.vala" - while (TRUE) { -#line 2852 "DataSource.c" - gint _tmp3_; - DataView** _tmp4_; - gint _tmp4__length1; - DataView** _tmp5_; - gint _tmp5__length1; - gint _tmp6_; - DataView* _tmp7_; -#line 427 "/home/jens/Source/shotwell/src/core/DataSource.vala" - if (!_tmp1_) { -#line 2862 "DataSource.c" - gint _tmp2_; -#line 427 "/home/jens/Source/shotwell/src/core/DataSource.vala" - _tmp2_ = ctr; -#line 427 "/home/jens/Source/shotwell/src/core/DataSource.vala" - ctr = _tmp2_ + 1; -#line 2868 "DataSource.c" - } -#line 427 "/home/jens/Source/shotwell/src/core/DataSource.vala" - _tmp1_ = FALSE; -#line 427 "/home/jens/Source/shotwell/src/core/DataSource.vala" - _tmp3_ = ctr; -#line 427 "/home/jens/Source/shotwell/src/core/DataSource.vala" - _tmp4_ = self->priv->subscribers; -#line 427 "/home/jens/Source/shotwell/src/core/DataSource.vala" - _tmp4__length1 = self->priv->subscribers_length1; -#line 427 "/home/jens/Source/shotwell/src/core/DataSource.vala" - if (!(_tmp3_ < _tmp4__length1)) { -#line 427 "/home/jens/Source/shotwell/src/core/DataSource.vala" - break; -#line 2882 "DataSource.c" - } -#line 428 "/home/jens/Source/shotwell/src/core/DataSource.vala" - _tmp5_ = self->priv->subscribers; -#line 428 "/home/jens/Source/shotwell/src/core/DataSource.vala" - _tmp5__length1 = self->priv->subscribers_length1; -#line 428 "/home/jens/Source/shotwell/src/core/DataSource.vala" - _tmp6_ = ctr; -#line 428 "/home/jens/Source/shotwell/src/core/DataSource.vala" - _tmp7_ = _tmp5_[_tmp6_]; -#line 428 "/home/jens/Source/shotwell/src/core/DataSource.vala" - if (_tmp7_ != NULL) { -#line 2894 "DataSource.c" - DataView** _tmp8_; - gint _tmp8__length1; - gint _tmp9_; - DataView* _tmp10_; -#line 429 "/home/jens/Source/shotwell/src/core/DataSource.vala" - _tmp8_ = self->priv->subscribers; -#line 429 "/home/jens/Source/shotwell/src/core/DataSource.vala" - _tmp8__length1 = self->priv->subscribers_length1; -#line 429 "/home/jens/Source/shotwell/src/core/DataSource.vala" - _tmp9_ = ctr; -#line 429 "/home/jens/Source/shotwell/src/core/DataSource.vala" - _tmp10_ = _tmp8_[_tmp9_]; -#line 429 "/home/jens/Source/shotwell/src/core/DataSource.vala" - contact_subscriber (_tmp10_, contact_subscriber_target); -#line 2909 "DataSource.c" - } - } - } - } -#line 431 "/home/jens/Source/shotwell/src/core/DataSource.vala" - self->priv->in_contact = FALSE; -#line 2916 "DataSource.c" -} - - -void -data_source_contact_subscribers_alteration (DataSource* self, - Alteration* alteration) -{ - gboolean _tmp0_; -#line 434 "/home/jens/Source/shotwell/src/core/DataSource.vala" - g_return_if_fail (IS_DATA_SOURCE (self)); -#line 434 "/home/jens/Source/shotwell/src/core/DataSource.vala" - g_return_if_fail (IS_ALTERATION (alteration)); -#line 435 "/home/jens/Source/shotwell/src/core/DataSource.vala" - _tmp0_ = self->priv->in_contact; -#line 435 "/home/jens/Source/shotwell/src/core/DataSource.vala" - _vala_assert (!_tmp0_, "!in_contact"); -#line 437 "/home/jens/Source/shotwell/src/core/DataSource.vala" - self->priv->in_contact = TRUE; -#line 2935 "DataSource.c" - { - gint ctr = 0; -#line 438 "/home/jens/Source/shotwell/src/core/DataSource.vala" - ctr = 0; -#line 2940 "DataSource.c" - { - gboolean _tmp1_ = FALSE; -#line 438 "/home/jens/Source/shotwell/src/core/DataSource.vala" - _tmp1_ = TRUE; -#line 438 "/home/jens/Source/shotwell/src/core/DataSource.vala" - while (TRUE) { -#line 2947 "DataSource.c" - gint _tmp3_; - DataView** _tmp4_; - gint _tmp4__length1; - DataView** _tmp5_; - gint _tmp5__length1; - gint _tmp6_; - DataView* _tmp7_; -#line 438 "/home/jens/Source/shotwell/src/core/DataSource.vala" - if (!_tmp1_) { -#line 2957 "DataSource.c" - gint _tmp2_; -#line 438 "/home/jens/Source/shotwell/src/core/DataSource.vala" - _tmp2_ = ctr; -#line 438 "/home/jens/Source/shotwell/src/core/DataSource.vala" - ctr = _tmp2_ + 1; -#line 2963 "DataSource.c" - } -#line 438 "/home/jens/Source/shotwell/src/core/DataSource.vala" - _tmp1_ = FALSE; -#line 438 "/home/jens/Source/shotwell/src/core/DataSource.vala" - _tmp3_ = ctr; -#line 438 "/home/jens/Source/shotwell/src/core/DataSource.vala" - _tmp4_ = self->priv->subscribers; -#line 438 "/home/jens/Source/shotwell/src/core/DataSource.vala" - _tmp4__length1 = self->priv->subscribers_length1; -#line 438 "/home/jens/Source/shotwell/src/core/DataSource.vala" - if (!(_tmp3_ < _tmp4__length1)) { -#line 438 "/home/jens/Source/shotwell/src/core/DataSource.vala" - break; -#line 2977 "DataSource.c" - } -#line 439 "/home/jens/Source/shotwell/src/core/DataSource.vala" - _tmp5_ = self->priv->subscribers; -#line 439 "/home/jens/Source/shotwell/src/core/DataSource.vala" - _tmp5__length1 = self->priv->subscribers_length1; -#line 439 "/home/jens/Source/shotwell/src/core/DataSource.vala" - _tmp6_ = ctr; -#line 439 "/home/jens/Source/shotwell/src/core/DataSource.vala" - _tmp7_ = _tmp5_[_tmp6_]; -#line 439 "/home/jens/Source/shotwell/src/core/DataSource.vala" - if (_tmp7_ != NULL) { -#line 2989 "DataSource.c" - DataView** _tmp8_; - gint _tmp8__length1; - gint _tmp9_; - DataView* _tmp10_; -#line 440 "/home/jens/Source/shotwell/src/core/DataSource.vala" - _tmp8_ = self->priv->subscribers; -#line 440 "/home/jens/Source/shotwell/src/core/DataSource.vala" - _tmp8__length1 = self->priv->subscribers_length1; -#line 440 "/home/jens/Source/shotwell/src/core/DataSource.vala" - _tmp9_ = ctr; -#line 440 "/home/jens/Source/shotwell/src/core/DataSource.vala" - _tmp10_ = _tmp8_[_tmp9_]; -#line 440 "/home/jens/Source/shotwell/src/core/DataSource.vala" - data_object_notify_altered (G_TYPE_CHECK_INSTANCE_CAST (_tmp10_, TYPE_DATA_OBJECT, DataObject), alteration); -#line 3004 "DataSource.c" - } - } - } - } -#line 442 "/home/jens/Source/shotwell/src/core/DataSource.vala" - self->priv->in_contact = FALSE; -#line 3011 "DataSource.c" -} - - -static void -data_source_real_unlinked (DataSource* self, - SourceCollection* sources) -{ -#line 51 "/home/jens/Source/shotwell/src/core/DataSource.vala" - g_return_if_fail (IS_SOURCE_COLLECTION (sources)); -#line 3021 "DataSource.c" -} - - -static void -g_cclosure_user_marshal_VOID__DATA_COLLECTION (GClosure * closure, - GValue * return_value, - guint n_param_values, - const GValue * param_values, - gpointer invocation_hint, - gpointer marshal_data) -{ - typedef void (*GMarshalFunc_VOID__DATA_COLLECTION) (gpointer data1, gpointer arg_1, gpointer data2); - register GMarshalFunc_VOID__DATA_COLLECTION callback; - register GCClosure * cc; - register gpointer data1; - register gpointer data2; - cc = (GCClosure *) closure; -#line 38 "/home/jens/Source/shotwell/src/core/DataSource.vala" - g_return_if_fail (n_param_values == 2); -#line 38 "/home/jens/Source/shotwell/src/core/DataSource.vala" - if (G_CCLOSURE_SWAP_DATA (closure)) { -#line 38 "/home/jens/Source/shotwell/src/core/DataSource.vala" - data1 = closure->data; -#line 38 "/home/jens/Source/shotwell/src/core/DataSource.vala" - data2 = param_values->data[0].v_pointer; -#line 3047 "DataSource.c" - } else { -#line 38 "/home/jens/Source/shotwell/src/core/DataSource.vala" - data1 = param_values->data[0].v_pointer; -#line 38 "/home/jens/Source/shotwell/src/core/DataSource.vala" - data2 = closure->data; -#line 3053 "DataSource.c" - } -#line 38 "/home/jens/Source/shotwell/src/core/DataSource.vala" - callback = (GMarshalFunc_VOID__DATA_COLLECTION) (marshal_data ? marshal_data : cc->callback); -#line 38 "/home/jens/Source/shotwell/src/core/DataSource.vala" - callback (data1, value_get_data_collection (param_values + 1), data2); -#line 3059 "DataSource.c" -} - - -static void -data_source_real_relinked (DataSource* self, - SourceCollection* sources) -{ -#line 55 "/home/jens/Source/shotwell/src/core/DataSource.vala" - g_return_if_fail (IS_SOURCE_COLLECTION (sources)); -#line 3069 "DataSource.c" -} - - -static void -data_source_real_destroyed (DataSource* self) -{ -} - - -static void -data_source_class_init (DataSourceClass * klass) -{ -#line 38 "/home/jens/Source/shotwell/src/core/DataSource.vala" - data_source_parent_class = g_type_class_peek_parent (klass); -#line 38 "/home/jens/Source/shotwell/src/core/DataSource.vala" - g_type_class_add_private (klass, sizeof (DataSourcePrivate)); -#line 38 "/home/jens/Source/shotwell/src/core/DataSource.vala" - ((DataObjectClass *) klass)->notify_membership_changed = (void (*) (DataObject *, DataCollection*)) data_source_real_notify_membership_changed; -#line 38 "/home/jens/Source/shotwell/src/core/DataSource.vala" - ((DataSourceClass *) klass)->notify_held_in_tank = (void (*) (DataSource *, SourceHoldingTank*)) data_source_real_notify_held_in_tank; -#line 38 "/home/jens/Source/shotwell/src/core/DataSource.vala" - ((DataObjectClass *) klass)->notify_altered = (void (*) (DataObject *, Alteration*)) data_source_real_notify_altered; -#line 38 "/home/jens/Source/shotwell/src/core/DataSource.vala" - ((DataSourceClass *) klass)->notify_unlinking = (void (*) (DataSource *, SourceCollection*)) data_source_real_notify_unlinking; -#line 38 "/home/jens/Source/shotwell/src/core/DataSource.vala" - ((DataSourceClass *) klass)->notify_unlinked = (void (*) (DataSource *)) data_source_real_notify_unlinked; -#line 38 "/home/jens/Source/shotwell/src/core/DataSource.vala" - ((DataSourceClass *) klass)->notify_relinking = (void (*) (DataSource *, SourceCollection*)) data_source_real_notify_relinking; -#line 38 "/home/jens/Source/shotwell/src/core/DataSource.vala" - ((DataSourceClass *) klass)->notify_relinked = (void (*) (DataSource *)) data_source_real_notify_relinked; -#line 38 "/home/jens/Source/shotwell/src/core/DataSource.vala" - ((DataSourceClass *) klass)->get_typename = (gchar* (*) (DataSource *)) data_source_real_get_typename; -#line 38 "/home/jens/Source/shotwell/src/core/DataSource.vala" - ((DataSourceClass *) klass)->get_instance_id = (gint64 (*) (DataSource *)) data_source_real_get_instance_id; -#line 38 "/home/jens/Source/shotwell/src/core/DataSource.vala" - ((DataSourceClass *) klass)->get_source_id = (gchar* (*) (DataSource *)) data_source_real_get_source_id; -#line 38 "/home/jens/Source/shotwell/src/core/DataSource.vala" - ((DataSourceClass *) klass)->commit_backlinks = (void (*) (DataSource *, SourceCollection*, const gchar*)) data_source_real_commit_backlinks; -#line 38 "/home/jens/Source/shotwell/src/core/DataSource.vala" - ((DataSourceClass *) klass)->save_snapshot = (SourceSnapshot* (*) (DataSource *)) data_source_real_save_snapshot; -#line 38 "/home/jens/Source/shotwell/src/core/DataSource.vala" - ((DataSourceClass *) klass)->internal_delete_backing = (gboolean (*) (DataSource *, GError**)) data_source_real_internal_delete_backing; -#line 38 "/home/jens/Source/shotwell/src/core/DataSource.vala" - ((DataSourceClass *) klass)->equals = (gboolean (*) (DataSource *, DataSource*)) data_source_real_equals; -#line 38 "/home/jens/Source/shotwell/src/core/DataSource.vala" - ((DataSourceClass *) klass)->destroy = (void (*) (DataSource *)) data_source_real_destroy; -#line 38 "/home/jens/Source/shotwell/src/core/DataSource.vala" - ((DataSourceClass *) klass)->unlinked = data_source_real_unlinked; -#line 38 "/home/jens/Source/shotwell/src/core/DataSource.vala" - ((DataSourceClass *) klass)->relinked = data_source_real_relinked; -#line 38 "/home/jens/Source/shotwell/src/core/DataSource.vala" - ((DataSourceClass *) klass)->destroyed = data_source_real_destroyed; -#line 38 "/home/jens/Source/shotwell/src/core/DataSource.vala" - G_OBJECT_CLASS (klass)->finalize = data_source_finalize; -#line 38 "/home/jens/Source/shotwell/src/core/DataSource.vala" - data_source_signals[DATA_SOURCE_UNLINKED_SIGNAL] = g_signal_new ("unlinked", TYPE_DATA_SOURCE, G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET (DataSourceClass, unlinked), NULL, NULL, g_cclosure_user_marshal_VOID__DATA_COLLECTION, G_TYPE_NONE, 1, TYPE_SOURCE_COLLECTION); -#line 38 "/home/jens/Source/shotwell/src/core/DataSource.vala" - data_source_signals[DATA_SOURCE_RELINKED_SIGNAL] = g_signal_new ("relinked", TYPE_DATA_SOURCE, G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET (DataSourceClass, relinked), NULL, NULL, g_cclosure_user_marshal_VOID__DATA_COLLECTION, G_TYPE_NONE, 1, TYPE_SOURCE_COLLECTION); -#line 38 "/home/jens/Source/shotwell/src/core/DataSource.vala" - data_source_signals[DATA_SOURCE_DESTROYED_SIGNAL] = g_signal_new ("destroyed", TYPE_DATA_SOURCE, G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET (DataSourceClass, destroyed), NULL, NULL, g_cclosure_marshal_VOID__VOID, G_TYPE_NONE, 0); -#line 3130 "DataSource.c" -} - - -static void -data_source_instance_init (DataSource * self) -{ - DataView** _tmp0_; -#line 38 "/home/jens/Source/shotwell/src/core/DataSource.vala" - self->priv = DATA_SOURCE_GET_PRIVATE (self); -#line 42 "/home/jens/Source/shotwell/src/core/DataSource.vala" - _tmp0_ = g_new0 (DataView*, 4 + 1); -#line 42 "/home/jens/Source/shotwell/src/core/DataSource.vala" - self->priv->subscribers = _tmp0_; -#line 42 "/home/jens/Source/shotwell/src/core/DataSource.vala" - self->priv->subscribers_length1 = 4; -#line 42 "/home/jens/Source/shotwell/src/core/DataSource.vala" - self->priv->_subscribers_size_ = self->priv->subscribers_length1; -#line 43 "/home/jens/Source/shotwell/src/core/DataSource.vala" - self->priv->holding_tank = NULL; -#line 44 "/home/jens/Source/shotwell/src/core/DataSource.vala" - self->priv->unlinked_from_collection = NULL; -#line 45 "/home/jens/Source/shotwell/src/core/DataSource.vala" - self->priv->backlinks = NULL; -#line 46 "/home/jens/Source/shotwell/src/core/DataSource.vala" - self->priv->in_contact = FALSE; -#line 47 "/home/jens/Source/shotwell/src/core/DataSource.vala" - self->priv->marked_for_destroy = FALSE; -#line 48 "/home/jens/Source/shotwell/src/core/DataSource.vala" - self->priv->is_destroyed = FALSE; -#line 3160 "DataSource.c" -} - - -static void -data_source_finalize (GObject * obj) -{ - DataSource * self; -#line 38 "/home/jens/Source/shotwell/src/core/DataSource.vala" - self = G_TYPE_CHECK_INSTANCE_CAST (obj, TYPE_DATA_SOURCE, DataSource); -#line 42 "/home/jens/Source/shotwell/src/core/DataSource.vala" - self->priv->subscribers = (_vala_array_free (self->priv->subscribers, self->priv->subscribers_length1, (GDestroyNotify) g_object_unref), NULL); -#line 43 "/home/jens/Source/shotwell/src/core/DataSource.vala" - _source_holding_tank_unref0 (self->priv->holding_tank); -#line 45 "/home/jens/Source/shotwell/src/core/DataSource.vala" - _g_object_unref0 (self->priv->backlinks); -#line 38 "/home/jens/Source/shotwell/src/core/DataSource.vala" - G_OBJECT_CLASS (data_source_parent_class)->finalize (obj); -#line 3178 "DataSource.c" -} - - -GType -data_source_get_type (void) -{ - static volatile gsize data_source_type_id__volatile = 0; - if (g_once_init_enter (&data_source_type_id__volatile)) { - static const GTypeInfo g_define_type_info = { sizeof (DataSourceClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) data_source_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (DataSource), 0, (GInstanceInitFunc) data_source_instance_init, NULL }; - GType data_source_type_id; - data_source_type_id = g_type_register_static (TYPE_DATA_OBJECT, "DataSource", &g_define_type_info, G_TYPE_FLAG_ABSTRACT); - g_once_init_leave (&data_source_type_id__volatile, data_source_type_id); - } - return data_source_type_id__volatile; -} - - -static void -source_snapshot_real_notify_broken (SourceSnapshot* self) -{ -#line 455 "/home/jens/Source/shotwell/src/core/DataSource.vala" - self->priv->snapshot_broken = TRUE; -#line 457 "/home/jens/Source/shotwell/src/core/DataSource.vala" - g_signal_emit (self, source_snapshot_signals[SOURCE_SNAPSHOT_BROKEN_SIGNAL], 0); -#line 3203 "DataSource.c" -} - - -void -source_snapshot_notify_broken (SourceSnapshot* self) -{ -#line 454 "/home/jens/Source/shotwell/src/core/DataSource.vala" - g_return_if_fail (IS_SOURCE_SNAPSHOT (self)); -#line 454 "/home/jens/Source/shotwell/src/core/DataSource.vala" - SOURCE_SNAPSHOT_GET_CLASS (self)->notify_broken (self); -#line 3214 "DataSource.c" -} - - -gboolean -source_snapshot_is_broken (SourceSnapshot* self) -{ - gboolean result = FALSE; - gboolean _tmp0_; -#line 460 "/home/jens/Source/shotwell/src/core/DataSource.vala" - g_return_val_if_fail (IS_SOURCE_SNAPSHOT (self), FALSE); -#line 461 "/home/jens/Source/shotwell/src/core/DataSource.vala" - _tmp0_ = self->priv->snapshot_broken; -#line 461 "/home/jens/Source/shotwell/src/core/DataSource.vala" - result = _tmp0_; -#line 461 "/home/jens/Source/shotwell/src/core/DataSource.vala" - return result; -#line 3231 "DataSource.c" -} - - -SourceSnapshot* -source_snapshot_construct (GType object_type) -{ - SourceSnapshot* self = NULL; -#line 446 "/home/jens/Source/shotwell/src/core/DataSource.vala" - self = (SourceSnapshot*) g_type_create_instance (object_type); -#line 446 "/home/jens/Source/shotwell/src/core/DataSource.vala" - return self; -#line 3243 "DataSource.c" -} - - -static void -source_snapshot_real_broken (SourceSnapshot* self) -{ -} - - -static void -value_source_snapshot_init (GValue* value) -{ -#line 446 "/home/jens/Source/shotwell/src/core/DataSource.vala" - value->data[0].v_pointer = NULL; -#line 3258 "DataSource.c" -} - - -static void -value_source_snapshot_free_value (GValue* value) -{ -#line 446 "/home/jens/Source/shotwell/src/core/DataSource.vala" - if (value->data[0].v_pointer) { -#line 446 "/home/jens/Source/shotwell/src/core/DataSource.vala" - source_snapshot_unref (value->data[0].v_pointer); -#line 3269 "DataSource.c" - } -} - - -static void -value_source_snapshot_copy_value (const GValue* src_value, - GValue* dest_value) -{ -#line 446 "/home/jens/Source/shotwell/src/core/DataSource.vala" - if (src_value->data[0].v_pointer) { -#line 446 "/home/jens/Source/shotwell/src/core/DataSource.vala" - dest_value->data[0].v_pointer = source_snapshot_ref (src_value->data[0].v_pointer); -#line 3282 "DataSource.c" - } else { -#line 446 "/home/jens/Source/shotwell/src/core/DataSource.vala" - dest_value->data[0].v_pointer = NULL; -#line 3286 "DataSource.c" - } -} - - -static gpointer -value_source_snapshot_peek_pointer (const GValue* value) -{ -#line 446 "/home/jens/Source/shotwell/src/core/DataSource.vala" - return value->data[0].v_pointer; -#line 3296 "DataSource.c" -} - - -static gchar* -value_source_snapshot_collect_value (GValue* value, - guint n_collect_values, - GTypeCValue* collect_values, - guint collect_flags) -{ -#line 446 "/home/jens/Source/shotwell/src/core/DataSource.vala" - if (collect_values[0].v_pointer) { -#line 3308 "DataSource.c" - SourceSnapshot * object; - object = collect_values[0].v_pointer; -#line 446 "/home/jens/Source/shotwell/src/core/DataSource.vala" - if (object->parent_instance.g_class == NULL) { -#line 446 "/home/jens/Source/shotwell/src/core/DataSource.vala" - return g_strconcat ("invalid unclassed object pointer for value type `", G_VALUE_TYPE_NAME (value), "'", NULL); -#line 3315 "DataSource.c" - } else if (!g_value_type_compatible (G_TYPE_FROM_INSTANCE (object), G_VALUE_TYPE (value))) { -#line 446 "/home/jens/Source/shotwell/src/core/DataSource.vala" - return g_strconcat ("invalid object type `", g_type_name (G_TYPE_FROM_INSTANCE (object)), "' for value type `", G_VALUE_TYPE_NAME (value), "'", NULL); -#line 3319 "DataSource.c" - } -#line 446 "/home/jens/Source/shotwell/src/core/DataSource.vala" - value->data[0].v_pointer = source_snapshot_ref (object); -#line 3323 "DataSource.c" - } else { -#line 446 "/home/jens/Source/shotwell/src/core/DataSource.vala" - value->data[0].v_pointer = NULL; -#line 3327 "DataSource.c" - } -#line 446 "/home/jens/Source/shotwell/src/core/DataSource.vala" - return NULL; -#line 3331 "DataSource.c" -} - - -static gchar* -value_source_snapshot_lcopy_value (const GValue* value, - guint n_collect_values, - GTypeCValue* collect_values, - guint collect_flags) -{ - SourceSnapshot ** object_p; - object_p = collect_values[0].v_pointer; -#line 446 "/home/jens/Source/shotwell/src/core/DataSource.vala" - if (!object_p) { -#line 446 "/home/jens/Source/shotwell/src/core/DataSource.vala" - return g_strdup_printf ("value location for `%s' passed as NULL", G_VALUE_TYPE_NAME (value)); -#line 3347 "DataSource.c" - } -#line 446 "/home/jens/Source/shotwell/src/core/DataSource.vala" - if (!value->data[0].v_pointer) { -#line 446 "/home/jens/Source/shotwell/src/core/DataSource.vala" - *object_p = NULL; -#line 3353 "DataSource.c" - } else if (collect_flags & G_VALUE_NOCOPY_CONTENTS) { -#line 446 "/home/jens/Source/shotwell/src/core/DataSource.vala" - *object_p = value->data[0].v_pointer; -#line 3357 "DataSource.c" - } else { -#line 446 "/home/jens/Source/shotwell/src/core/DataSource.vala" - *object_p = source_snapshot_ref (value->data[0].v_pointer); -#line 3361 "DataSource.c" - } -#line 446 "/home/jens/Source/shotwell/src/core/DataSource.vala" - return NULL; -#line 3365 "DataSource.c" -} - - -GParamSpec* -param_spec_source_snapshot (const gchar* name, - const gchar* nick, - const gchar* blurb, - GType object_type, - GParamFlags flags) -{ - ParamSpecSourceSnapshot* spec; -#line 446 "/home/jens/Source/shotwell/src/core/DataSource.vala" - g_return_val_if_fail (g_type_is_a (object_type, TYPE_SOURCE_SNAPSHOT), NULL); -#line 446 "/home/jens/Source/shotwell/src/core/DataSource.vala" - spec = g_param_spec_internal (G_TYPE_PARAM_OBJECT, name, nick, blurb, flags); -#line 446 "/home/jens/Source/shotwell/src/core/DataSource.vala" - G_PARAM_SPEC (spec)->value_type = object_type; -#line 446 "/home/jens/Source/shotwell/src/core/DataSource.vala" - return G_PARAM_SPEC (spec); -#line 3385 "DataSource.c" -} - - -gpointer -value_get_source_snapshot (const GValue* value) -{ -#line 446 "/home/jens/Source/shotwell/src/core/DataSource.vala" - g_return_val_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, TYPE_SOURCE_SNAPSHOT), NULL); -#line 446 "/home/jens/Source/shotwell/src/core/DataSource.vala" - return value->data[0].v_pointer; -#line 3396 "DataSource.c" -} - - -void -value_set_source_snapshot (GValue* value, - gpointer v_object) -{ - SourceSnapshot * old; -#line 446 "/home/jens/Source/shotwell/src/core/DataSource.vala" - g_return_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, TYPE_SOURCE_SNAPSHOT)); -#line 446 "/home/jens/Source/shotwell/src/core/DataSource.vala" - old = value->data[0].v_pointer; -#line 446 "/home/jens/Source/shotwell/src/core/DataSource.vala" - if (v_object) { -#line 446 "/home/jens/Source/shotwell/src/core/DataSource.vala" - g_return_if_fail (G_TYPE_CHECK_INSTANCE_TYPE (v_object, TYPE_SOURCE_SNAPSHOT)); -#line 446 "/home/jens/Source/shotwell/src/core/DataSource.vala" - g_return_if_fail (g_value_type_compatible (G_TYPE_FROM_INSTANCE (v_object), G_VALUE_TYPE (value))); -#line 446 "/home/jens/Source/shotwell/src/core/DataSource.vala" - value->data[0].v_pointer = v_object; -#line 446 "/home/jens/Source/shotwell/src/core/DataSource.vala" - source_snapshot_ref (value->data[0].v_pointer); -#line 3419 "DataSource.c" - } else { -#line 446 "/home/jens/Source/shotwell/src/core/DataSource.vala" - value->data[0].v_pointer = NULL; -#line 3423 "DataSource.c" - } -#line 446 "/home/jens/Source/shotwell/src/core/DataSource.vala" - if (old) { -#line 446 "/home/jens/Source/shotwell/src/core/DataSource.vala" - source_snapshot_unref (old); -#line 3429 "DataSource.c" - } -} - - -void -value_take_source_snapshot (GValue* value, - gpointer v_object) -{ - SourceSnapshot * old; -#line 446 "/home/jens/Source/shotwell/src/core/DataSource.vala" - g_return_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, TYPE_SOURCE_SNAPSHOT)); -#line 446 "/home/jens/Source/shotwell/src/core/DataSource.vala" - old = value->data[0].v_pointer; -#line 446 "/home/jens/Source/shotwell/src/core/DataSource.vala" - if (v_object) { -#line 446 "/home/jens/Source/shotwell/src/core/DataSource.vala" - g_return_if_fail (G_TYPE_CHECK_INSTANCE_TYPE (v_object, TYPE_SOURCE_SNAPSHOT)); -#line 446 "/home/jens/Source/shotwell/src/core/DataSource.vala" - g_return_if_fail (g_value_type_compatible (G_TYPE_FROM_INSTANCE (v_object), G_VALUE_TYPE (value))); -#line 446 "/home/jens/Source/shotwell/src/core/DataSource.vala" - value->data[0].v_pointer = v_object; -#line 3451 "DataSource.c" - } else { -#line 446 "/home/jens/Source/shotwell/src/core/DataSource.vala" - value->data[0].v_pointer = NULL; -#line 3455 "DataSource.c" - } -#line 446 "/home/jens/Source/shotwell/src/core/DataSource.vala" - if (old) { -#line 446 "/home/jens/Source/shotwell/src/core/DataSource.vala" - source_snapshot_unref (old); -#line 3461 "DataSource.c" - } -} - - -static void -source_snapshot_class_init (SourceSnapshotClass * klass) -{ -#line 446 "/home/jens/Source/shotwell/src/core/DataSource.vala" - source_snapshot_parent_class = g_type_class_peek_parent (klass); -#line 446 "/home/jens/Source/shotwell/src/core/DataSource.vala" - ((SourceSnapshotClass *) klass)->finalize = source_snapshot_finalize; -#line 446 "/home/jens/Source/shotwell/src/core/DataSource.vala" - g_type_class_add_private (klass, sizeof (SourceSnapshotPrivate)); -#line 446 "/home/jens/Source/shotwell/src/core/DataSource.vala" - ((SourceSnapshotClass *) klass)->notify_broken = (void (*) (SourceSnapshot *)) source_snapshot_real_notify_broken; -#line 446 "/home/jens/Source/shotwell/src/core/DataSource.vala" - ((SourceSnapshotClass *) klass)->broken = source_snapshot_real_broken; -#line 446 "/home/jens/Source/shotwell/src/core/DataSource.vala" - source_snapshot_signals[SOURCE_SNAPSHOT_BROKEN_SIGNAL] = g_signal_new ("broken", TYPE_SOURCE_SNAPSHOT, G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET (SourceSnapshotClass, broken), NULL, NULL, g_cclosure_marshal_VOID__VOID, G_TYPE_NONE, 0); -#line 3481 "DataSource.c" -} - - -static void -source_snapshot_instance_init (SourceSnapshot * self) -{ -#line 446 "/home/jens/Source/shotwell/src/core/DataSource.vala" - self->priv = SOURCE_SNAPSHOT_GET_PRIVATE (self); -#line 447 "/home/jens/Source/shotwell/src/core/DataSource.vala" - self->priv->snapshot_broken = FALSE; -#line 446 "/home/jens/Source/shotwell/src/core/DataSource.vala" - self->ref_count = 1; -#line 3494 "DataSource.c" -} - - -static void -source_snapshot_finalize (SourceSnapshot * obj) -{ - SourceSnapshot * self; -#line 446 "/home/jens/Source/shotwell/src/core/DataSource.vala" - self = G_TYPE_CHECK_INSTANCE_CAST (obj, TYPE_SOURCE_SNAPSHOT, SourceSnapshot); -#line 446 "/home/jens/Source/shotwell/src/core/DataSource.vala" - g_signal_handlers_destroy (self); -#line 3506 "DataSource.c" -} - - -GType -source_snapshot_get_type (void) -{ - static volatile gsize source_snapshot_type_id__volatile = 0; - if (g_once_init_enter (&source_snapshot_type_id__volatile)) { - static const GTypeValueTable g_define_type_value_table = { value_source_snapshot_init, value_source_snapshot_free_value, value_source_snapshot_copy_value, value_source_snapshot_peek_pointer, "p", value_source_snapshot_collect_value, "p", value_source_snapshot_lcopy_value }; - static const GTypeInfo g_define_type_info = { sizeof (SourceSnapshotClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) source_snapshot_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (SourceSnapshot), 0, (GInstanceInitFunc) source_snapshot_instance_init, &g_define_type_value_table }; - static const GTypeFundamentalInfo g_define_type_fundamental_info = { (G_TYPE_FLAG_CLASSED | G_TYPE_FLAG_INSTANTIATABLE | G_TYPE_FLAG_DERIVABLE | G_TYPE_FLAG_DEEP_DERIVABLE) }; - GType source_snapshot_type_id; - source_snapshot_type_id = g_type_register_fundamental (g_type_fundamental_next (), "SourceSnapshot", &g_define_type_info, &g_define_type_fundamental_info, G_TYPE_FLAG_ABSTRACT); - g_once_init_leave (&source_snapshot_type_id__volatile, source_snapshot_type_id); - } - return source_snapshot_type_id__volatile; -} - - -gpointer -source_snapshot_ref (gpointer instance) -{ - SourceSnapshot * self; - self = instance; -#line 446 "/home/jens/Source/shotwell/src/core/DataSource.vala" - g_atomic_int_inc (&self->ref_count); -#line 446 "/home/jens/Source/shotwell/src/core/DataSource.vala" - return instance; -#line 3535 "DataSource.c" -} - - -void -source_snapshot_unref (gpointer instance) -{ - SourceSnapshot * self; - self = instance; -#line 446 "/home/jens/Source/shotwell/src/core/DataSource.vala" - if (g_atomic_int_dec_and_test (&self->ref_count)) { -#line 446 "/home/jens/Source/shotwell/src/core/DataSource.vala" - SOURCE_SNAPSHOT_GET_CLASS (self)->finalize (self); -#line 446 "/home/jens/Source/shotwell/src/core/DataSource.vala" - g_type_free_instance ((GTypeInstance *) self); -#line 3550 "DataSource.c" - } -} - - -static gchar* -string_strip (const gchar* self) -{ - gchar* result = NULL; - gchar* _result_ = NULL; - gchar* _tmp0_; - const gchar* _tmp1_; -#line 1248 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" - g_return_val_if_fail (self != NULL, NULL); -#line 1249 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" - _tmp0_ = g_strdup (self); -#line 1249 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" - _result_ = _tmp0_; -#line 1250 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" - _tmp1_ = _result_; -#line 1250 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" - g_strstrip (_tmp1_); -#line 1251 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" - result = _result_; -#line 1251 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" - return result; -#line 3576 "DataSource.c" -} - - -SourceBacklink* -source_backlink_construct (GType object_type, - const gchar* name, - const gchar* value) -{ - SourceBacklink* self = NULL; - gchar* _tmp0_; - gchar* _tmp1_; -#line 498 "/home/jens/Source/shotwell/src/core/DataSource.vala" - g_return_val_if_fail (name != NULL, NULL); -#line 498 "/home/jens/Source/shotwell/src/core/DataSource.vala" - g_return_val_if_fail (value != NULL, NULL); -#line 498 "/home/jens/Source/shotwell/src/core/DataSource.vala" - self = (SourceBacklink*) g_type_create_instance (object_type); -#line 499 "/home/jens/Source/shotwell/src/core/DataSource.vala" - _vala_assert (source_backlink_validate_name_value (name, value), "validate_name_value(name, value)"); -#line 501 "/home/jens/Source/shotwell/src/core/DataSource.vala" - _tmp0_ = string_strip (name); -#line 501 "/home/jens/Source/shotwell/src/core/DataSource.vala" - _g_free0 (self->priv->_name); -#line 501 "/home/jens/Source/shotwell/src/core/DataSource.vala" - self->priv->_name = _tmp0_; -#line 502 "/home/jens/Source/shotwell/src/core/DataSource.vala" - _tmp1_ = string_strip (value); -#line 502 "/home/jens/Source/shotwell/src/core/DataSource.vala" - _g_free0 (self->priv->_value); -#line 502 "/home/jens/Source/shotwell/src/core/DataSource.vala" - self->priv->_value = _tmp1_; -#line 498 "/home/jens/Source/shotwell/src/core/DataSource.vala" - return self; -#line 3610 "DataSource.c" -} - - -SourceBacklink* -source_backlink_new (const gchar* name, - const gchar* value) -{ -#line 498 "/home/jens/Source/shotwell/src/core/DataSource.vala" - return source_backlink_construct (TYPE_SOURCE_BACKLINK, name, value); -#line 3620 "DataSource.c" -} - - -SourceBacklink* -source_backlink_construct_from_source (GType object_type, - DataSource* source) -{ - SourceBacklink* self = NULL; - gchar* _tmp0_; - gchar* _tmp1_; - gchar* _tmp2_; - gchar* _tmp3_; - gchar* _tmp4_; - gchar* _tmp5_; - const gchar* _tmp6_; - const gchar* _tmp7_; -#line 505 "/home/jens/Source/shotwell/src/core/DataSource.vala" - g_return_val_if_fail (IS_DATA_SOURCE (source), NULL); -#line 505 "/home/jens/Source/shotwell/src/core/DataSource.vala" - self = (SourceBacklink*) g_type_create_instance (object_type); -#line 506 "/home/jens/Source/shotwell/src/core/DataSource.vala" - _tmp0_ = data_source_get_typename (source); -#line 506 "/home/jens/Source/shotwell/src/core/DataSource.vala" - _tmp1_ = _tmp0_; -#line 506 "/home/jens/Source/shotwell/src/core/DataSource.vala" - _tmp2_ = string_strip (_tmp1_); -#line 506 "/home/jens/Source/shotwell/src/core/DataSource.vala" - _g_free0 (self->priv->_name); -#line 506 "/home/jens/Source/shotwell/src/core/DataSource.vala" - self->priv->_name = _tmp2_; -#line 506 "/home/jens/Source/shotwell/src/core/DataSource.vala" - _g_free0 (_tmp1_); -#line 507 "/home/jens/Source/shotwell/src/core/DataSource.vala" - _tmp3_ = g_strdup_printf ("%" G_GINT64_FORMAT, data_source_get_instance_id (source)); -#line 507 "/home/jens/Source/shotwell/src/core/DataSource.vala" - _tmp4_ = _tmp3_; -#line 507 "/home/jens/Source/shotwell/src/core/DataSource.vala" - _tmp5_ = string_strip (_tmp4_); -#line 507 "/home/jens/Source/shotwell/src/core/DataSource.vala" - _g_free0 (self->priv->_value); -#line 507 "/home/jens/Source/shotwell/src/core/DataSource.vala" - self->priv->_value = _tmp5_; -#line 507 "/home/jens/Source/shotwell/src/core/DataSource.vala" - _g_free0 (_tmp4_); -#line 509 "/home/jens/Source/shotwell/src/core/DataSource.vala" - _tmp6_ = self->priv->_name; -#line 509 "/home/jens/Source/shotwell/src/core/DataSource.vala" - _tmp7_ = self->priv->_value; -#line 509 "/home/jens/Source/shotwell/src/core/DataSource.vala" - _vala_assert (source_backlink_validate_name_value (_tmp6_, _tmp7_), "validate_name_value(_name, _value)"); -#line 505 "/home/jens/Source/shotwell/src/core/DataSource.vala" - return self; -#line 3673 "DataSource.c" -} - - -SourceBacklink* -source_backlink_new_from_source (DataSource* source) -{ -#line 505 "/home/jens/Source/shotwell/src/core/DataSource.vala" - return source_backlink_construct_from_source (TYPE_SOURCE_BACKLINK, source); -#line 3682 "DataSource.c" -} - - -static gboolean -string_contains (const gchar* self, - const gchar* needle) -{ - gboolean result = FALSE; - gchar* _tmp0_; -#line 1417 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" - g_return_val_if_fail (self != NULL, FALSE); -#line 1417 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" - g_return_val_if_fail (needle != NULL, FALSE); -#line 1418 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" - _tmp0_ = strstr ((gchar*) self, (gchar*) needle); -#line 1418 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" - result = _tmp0_ != NULL; -#line 1418 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" - return result; -#line 3702 "DataSource.c" -} - - -static gboolean -source_backlink_validate_name_value (const gchar* name, - const gchar* value) -{ - gboolean result = FALSE; - gboolean _tmp0_ = FALSE; - gboolean _tmp1_ = FALSE; -#line 512 "/home/jens/Source/shotwell/src/core/DataSource.vala" - g_return_val_if_fail (name != NULL, FALSE); -#line 512 "/home/jens/Source/shotwell/src/core/DataSource.vala" - g_return_val_if_fail (value != NULL, FALSE); -#line 513 "/home/jens/Source/shotwell/src/core/DataSource.vala" - if (!string_contains (name, "=")) { -#line 513 "/home/jens/Source/shotwell/src/core/DataSource.vala" - _tmp1_ = !string_contains (name, "|"); -#line 3721 "DataSource.c" - } else { -#line 513 "/home/jens/Source/shotwell/src/core/DataSource.vala" - _tmp1_ = FALSE; -#line 3725 "DataSource.c" - } -#line 513 "/home/jens/Source/shotwell/src/core/DataSource.vala" - if (_tmp1_) { -#line 513 "/home/jens/Source/shotwell/src/core/DataSource.vala" - _tmp0_ = !string_contains (value, "|"); -#line 3731 "DataSource.c" - } else { -#line 513 "/home/jens/Source/shotwell/src/core/DataSource.vala" - _tmp0_ = FALSE; -#line 3735 "DataSource.c" - } -#line 513 "/home/jens/Source/shotwell/src/core/DataSource.vala" - result = _tmp0_; -#line 513 "/home/jens/Source/shotwell/src/core/DataSource.vala" - return result; -#line 3741 "DataSource.c" -} - - -gchar* -source_backlink_to_string (SourceBacklink* self) -{ - gchar* result = NULL; - const gchar* _tmp0_; - const gchar* _tmp1_; - const gchar* _tmp2_; - const gchar* _tmp3_; - gchar* _tmp4_; -#line 516 "/home/jens/Source/shotwell/src/core/DataSource.vala" - g_return_val_if_fail (IS_SOURCE_BACKLINK (self), NULL); -#line 517 "/home/jens/Source/shotwell/src/core/DataSource.vala" - _tmp0_ = source_backlink_get_name (self); -#line 517 "/home/jens/Source/shotwell/src/core/DataSource.vala" - _tmp1_ = _tmp0_; -#line 517 "/home/jens/Source/shotwell/src/core/DataSource.vala" - _tmp2_ = source_backlink_get_value (self); -#line 517 "/home/jens/Source/shotwell/src/core/DataSource.vala" - _tmp3_ = _tmp2_; -#line 517 "/home/jens/Source/shotwell/src/core/DataSource.vala" - _tmp4_ = g_strdup_printf ("Backlink %s=%s", _tmp1_, _tmp3_); -#line 517 "/home/jens/Source/shotwell/src/core/DataSource.vala" - result = _tmp4_; -#line 517 "/home/jens/Source/shotwell/src/core/DataSource.vala" - return result; -#line 3770 "DataSource.c" -} - - -guint -source_backlink_hash_func (SourceBacklink* backlink) -{ - guint result = 0U; - GHashFunc _tmp0_; - const gchar* _tmp1_; - GHashFunc _tmp2_; - const gchar* _tmp3_; -#line 520 "/home/jens/Source/shotwell/src/core/DataSource.vala" - g_return_val_if_fail ((backlink == NULL) || IS_SOURCE_BACKLINK (backlink), 0U); -#line 521 "/home/jens/Source/shotwell/src/core/DataSource.vala" - _tmp0_ = g_str_hash; -#line 521 "/home/jens/Source/shotwell/src/core/DataSource.vala" - _tmp1_ = backlink->priv->_name; -#line 521 "/home/jens/Source/shotwell/src/core/DataSource.vala" - _tmp2_ = g_str_hash; -#line 521 "/home/jens/Source/shotwell/src/core/DataSource.vala" - _tmp3_ = backlink->priv->_value; -#line 521 "/home/jens/Source/shotwell/src/core/DataSource.vala" - result = _tmp0_ (_tmp1_) ^ _tmp2_ (_tmp3_); -#line 521 "/home/jens/Source/shotwell/src/core/DataSource.vala" - return result; -#line 3796 "DataSource.c" -} - - -gboolean -source_backlink_equal_func (SourceBacklink* alink, - SourceBacklink* blink) -{ - gboolean result = FALSE; - gboolean _tmp0_ = FALSE; - GEqualFunc _tmp1_; - const gchar* _tmp2_; - const gchar* _tmp3_; -#line 524 "/home/jens/Source/shotwell/src/core/DataSource.vala" - g_return_val_if_fail ((alink == NULL) || IS_SOURCE_BACKLINK (alink), FALSE); -#line 524 "/home/jens/Source/shotwell/src/core/DataSource.vala" - g_return_val_if_fail ((blink == NULL) || IS_SOURCE_BACKLINK (blink), FALSE); -#line 525 "/home/jens/Source/shotwell/src/core/DataSource.vala" - _tmp1_ = g_str_equal; -#line 525 "/home/jens/Source/shotwell/src/core/DataSource.vala" - _tmp2_ = alink->priv->_name; -#line 525 "/home/jens/Source/shotwell/src/core/DataSource.vala" - _tmp3_ = blink->priv->_name; -#line 525 "/home/jens/Source/shotwell/src/core/DataSource.vala" - if (_tmp1_ (_tmp2_, _tmp3_)) { -#line 3821 "DataSource.c" - GEqualFunc _tmp4_; - const gchar* _tmp5_; - const gchar* _tmp6_; -#line 525 "/home/jens/Source/shotwell/src/core/DataSource.vala" - _tmp4_ = g_str_equal; -#line 525 "/home/jens/Source/shotwell/src/core/DataSource.vala" - _tmp5_ = alink->priv->_value; -#line 525 "/home/jens/Source/shotwell/src/core/DataSource.vala" - _tmp6_ = blink->priv->_value; -#line 525 "/home/jens/Source/shotwell/src/core/DataSource.vala" - _tmp0_ = _tmp4_ (_tmp5_, _tmp6_); -#line 3833 "DataSource.c" - } else { -#line 525 "/home/jens/Source/shotwell/src/core/DataSource.vala" - _tmp0_ = FALSE; -#line 3837 "DataSource.c" - } -#line 525 "/home/jens/Source/shotwell/src/core/DataSource.vala" - result = _tmp0_; -#line 525 "/home/jens/Source/shotwell/src/core/DataSource.vala" - return result; -#line 3843 "DataSource.c" -} - - -const gchar* -source_backlink_get_name (SourceBacklink* self) -{ - const gchar* result; - const gchar* _tmp0_; -#line 473 "/home/jens/Source/shotwell/src/core/DataSource.vala" - g_return_val_if_fail (IS_SOURCE_BACKLINK (self), NULL); -#line 474 "/home/jens/Source/shotwell/src/core/DataSource.vala" - _tmp0_ = self->priv->_name; -#line 474 "/home/jens/Source/shotwell/src/core/DataSource.vala" - result = _tmp0_; -#line 474 "/home/jens/Source/shotwell/src/core/DataSource.vala" - return result; -#line 3860 "DataSource.c" -} - - -const gchar* -source_backlink_get_value (SourceBacklink* self) -{ - const gchar* result; - const gchar* _tmp0_; -#line 479 "/home/jens/Source/shotwell/src/core/DataSource.vala" - g_return_val_if_fail (IS_SOURCE_BACKLINK (self), NULL); -#line 480 "/home/jens/Source/shotwell/src/core/DataSource.vala" - _tmp0_ = self->priv->_value; -#line 480 "/home/jens/Source/shotwell/src/core/DataSource.vala" - result = _tmp0_; -#line 480 "/home/jens/Source/shotwell/src/core/DataSource.vala" - return result; -#line 3877 "DataSource.c" -} - - -const gchar* -source_backlink_get_typename (SourceBacklink* self) -{ - const gchar* result; - const gchar* _tmp0_; -#line 486 "/home/jens/Source/shotwell/src/core/DataSource.vala" - g_return_val_if_fail (IS_SOURCE_BACKLINK (self), NULL); -#line 487 "/home/jens/Source/shotwell/src/core/DataSource.vala" - _tmp0_ = self->priv->_name; -#line 487 "/home/jens/Source/shotwell/src/core/DataSource.vala" - result = _tmp0_; -#line 487 "/home/jens/Source/shotwell/src/core/DataSource.vala" - return result; -#line 3894 "DataSource.c" -} - - -static gint64 -int64_parse (const gchar* str) -{ - gint64 result = 0LL; - gint64 _tmp0_; -#line 687 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" - g_return_val_if_fail (str != NULL, 0LL); -#line 688 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" - _tmp0_ = g_ascii_strtoll (str, NULL, (guint) 0); -#line 688 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" - result = _tmp0_; -#line 688 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" - return result; -#line 3911 "DataSource.c" -} - - -gint64 -source_backlink_get_instance_id (SourceBacklink* self) -{ - gint64 result; - const gchar* _tmp0_; -#line 493 "/home/jens/Source/shotwell/src/core/DataSource.vala" - g_return_val_if_fail (IS_SOURCE_BACKLINK (self), 0LL); -#line 494 "/home/jens/Source/shotwell/src/core/DataSource.vala" - _tmp0_ = self->priv->_value; -#line 494 "/home/jens/Source/shotwell/src/core/DataSource.vala" - result = int64_parse (_tmp0_); -#line 494 "/home/jens/Source/shotwell/src/core/DataSource.vala" - return result; -#line 3928 "DataSource.c" -} - - -static void -value_source_backlink_init (GValue* value) -{ -#line 468 "/home/jens/Source/shotwell/src/core/DataSource.vala" - value->data[0].v_pointer = NULL; -#line 3937 "DataSource.c" -} - - -static void -value_source_backlink_free_value (GValue* value) -{ -#line 468 "/home/jens/Source/shotwell/src/core/DataSource.vala" - if (value->data[0].v_pointer) { -#line 468 "/home/jens/Source/shotwell/src/core/DataSource.vala" - source_backlink_unref (value->data[0].v_pointer); -#line 3948 "DataSource.c" - } -} - - -static void -value_source_backlink_copy_value (const GValue* src_value, - GValue* dest_value) -{ -#line 468 "/home/jens/Source/shotwell/src/core/DataSource.vala" - if (src_value->data[0].v_pointer) { -#line 468 "/home/jens/Source/shotwell/src/core/DataSource.vala" - dest_value->data[0].v_pointer = source_backlink_ref (src_value->data[0].v_pointer); -#line 3961 "DataSource.c" - } else { -#line 468 "/home/jens/Source/shotwell/src/core/DataSource.vala" - dest_value->data[0].v_pointer = NULL; -#line 3965 "DataSource.c" - } -} - - -static gpointer -value_source_backlink_peek_pointer (const GValue* value) -{ -#line 468 "/home/jens/Source/shotwell/src/core/DataSource.vala" - return value->data[0].v_pointer; -#line 3975 "DataSource.c" -} - - -static gchar* -value_source_backlink_collect_value (GValue* value, - guint n_collect_values, - GTypeCValue* collect_values, - guint collect_flags) -{ -#line 468 "/home/jens/Source/shotwell/src/core/DataSource.vala" - if (collect_values[0].v_pointer) { -#line 3987 "DataSource.c" - SourceBacklink * object; - object = collect_values[0].v_pointer; -#line 468 "/home/jens/Source/shotwell/src/core/DataSource.vala" - if (object->parent_instance.g_class == NULL) { -#line 468 "/home/jens/Source/shotwell/src/core/DataSource.vala" - return g_strconcat ("invalid unclassed object pointer for value type `", G_VALUE_TYPE_NAME (value), "'", NULL); -#line 3994 "DataSource.c" - } else if (!g_value_type_compatible (G_TYPE_FROM_INSTANCE (object), G_VALUE_TYPE (value))) { -#line 468 "/home/jens/Source/shotwell/src/core/DataSource.vala" - return g_strconcat ("invalid object type `", g_type_name (G_TYPE_FROM_INSTANCE (object)), "' for value type `", G_VALUE_TYPE_NAME (value), "'", NULL); -#line 3998 "DataSource.c" - } -#line 468 "/home/jens/Source/shotwell/src/core/DataSource.vala" - value->data[0].v_pointer = source_backlink_ref (object); -#line 4002 "DataSource.c" - } else { -#line 468 "/home/jens/Source/shotwell/src/core/DataSource.vala" - value->data[0].v_pointer = NULL; -#line 4006 "DataSource.c" - } -#line 468 "/home/jens/Source/shotwell/src/core/DataSource.vala" - return NULL; -#line 4010 "DataSource.c" -} - - -static gchar* -value_source_backlink_lcopy_value (const GValue* value, - guint n_collect_values, - GTypeCValue* collect_values, - guint collect_flags) -{ - SourceBacklink ** object_p; - object_p = collect_values[0].v_pointer; -#line 468 "/home/jens/Source/shotwell/src/core/DataSource.vala" - if (!object_p) { -#line 468 "/home/jens/Source/shotwell/src/core/DataSource.vala" - return g_strdup_printf ("value location for `%s' passed as NULL", G_VALUE_TYPE_NAME (value)); -#line 4026 "DataSource.c" - } -#line 468 "/home/jens/Source/shotwell/src/core/DataSource.vala" - if (!value->data[0].v_pointer) { -#line 468 "/home/jens/Source/shotwell/src/core/DataSource.vala" - *object_p = NULL; -#line 4032 "DataSource.c" - } else if (collect_flags & G_VALUE_NOCOPY_CONTENTS) { -#line 468 "/home/jens/Source/shotwell/src/core/DataSource.vala" - *object_p = value->data[0].v_pointer; -#line 4036 "DataSource.c" - } else { -#line 468 "/home/jens/Source/shotwell/src/core/DataSource.vala" - *object_p = source_backlink_ref (value->data[0].v_pointer); -#line 4040 "DataSource.c" - } -#line 468 "/home/jens/Source/shotwell/src/core/DataSource.vala" - return NULL; -#line 4044 "DataSource.c" -} - - -GParamSpec* -param_spec_source_backlink (const gchar* name, - const gchar* nick, - const gchar* blurb, - GType object_type, - GParamFlags flags) -{ - ParamSpecSourceBacklink* spec; -#line 468 "/home/jens/Source/shotwell/src/core/DataSource.vala" - g_return_val_if_fail (g_type_is_a (object_type, TYPE_SOURCE_BACKLINK), NULL); -#line 468 "/home/jens/Source/shotwell/src/core/DataSource.vala" - spec = g_param_spec_internal (G_TYPE_PARAM_OBJECT, name, nick, blurb, flags); -#line 468 "/home/jens/Source/shotwell/src/core/DataSource.vala" - G_PARAM_SPEC (spec)->value_type = object_type; -#line 468 "/home/jens/Source/shotwell/src/core/DataSource.vala" - return G_PARAM_SPEC (spec); -#line 4064 "DataSource.c" -} - - -gpointer -value_get_source_backlink (const GValue* value) -{ -#line 468 "/home/jens/Source/shotwell/src/core/DataSource.vala" - g_return_val_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, TYPE_SOURCE_BACKLINK), NULL); -#line 468 "/home/jens/Source/shotwell/src/core/DataSource.vala" - return value->data[0].v_pointer; -#line 4075 "DataSource.c" -} - - -void -value_set_source_backlink (GValue* value, - gpointer v_object) -{ - SourceBacklink * old; -#line 468 "/home/jens/Source/shotwell/src/core/DataSource.vala" - g_return_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, TYPE_SOURCE_BACKLINK)); -#line 468 "/home/jens/Source/shotwell/src/core/DataSource.vala" - old = value->data[0].v_pointer; -#line 468 "/home/jens/Source/shotwell/src/core/DataSource.vala" - if (v_object) { -#line 468 "/home/jens/Source/shotwell/src/core/DataSource.vala" - g_return_if_fail (G_TYPE_CHECK_INSTANCE_TYPE (v_object, TYPE_SOURCE_BACKLINK)); -#line 468 "/home/jens/Source/shotwell/src/core/DataSource.vala" - g_return_if_fail (g_value_type_compatible (G_TYPE_FROM_INSTANCE (v_object), G_VALUE_TYPE (value))); -#line 468 "/home/jens/Source/shotwell/src/core/DataSource.vala" - value->data[0].v_pointer = v_object; -#line 468 "/home/jens/Source/shotwell/src/core/DataSource.vala" - source_backlink_ref (value->data[0].v_pointer); -#line 4098 "DataSource.c" - } else { -#line 468 "/home/jens/Source/shotwell/src/core/DataSource.vala" - value->data[0].v_pointer = NULL; -#line 4102 "DataSource.c" - } -#line 468 "/home/jens/Source/shotwell/src/core/DataSource.vala" - if (old) { -#line 468 "/home/jens/Source/shotwell/src/core/DataSource.vala" - source_backlink_unref (old); -#line 4108 "DataSource.c" - } -} - - -void -value_take_source_backlink (GValue* value, - gpointer v_object) -{ - SourceBacklink * old; -#line 468 "/home/jens/Source/shotwell/src/core/DataSource.vala" - g_return_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, TYPE_SOURCE_BACKLINK)); -#line 468 "/home/jens/Source/shotwell/src/core/DataSource.vala" - old = value->data[0].v_pointer; -#line 468 "/home/jens/Source/shotwell/src/core/DataSource.vala" - if (v_object) { -#line 468 "/home/jens/Source/shotwell/src/core/DataSource.vala" - g_return_if_fail (G_TYPE_CHECK_INSTANCE_TYPE (v_object, TYPE_SOURCE_BACKLINK)); -#line 468 "/home/jens/Source/shotwell/src/core/DataSource.vala" - g_return_if_fail (g_value_type_compatible (G_TYPE_FROM_INSTANCE (v_object), G_VALUE_TYPE (value))); -#line 468 "/home/jens/Source/shotwell/src/core/DataSource.vala" - value->data[0].v_pointer = v_object; -#line 4130 "DataSource.c" - } else { -#line 468 "/home/jens/Source/shotwell/src/core/DataSource.vala" - value->data[0].v_pointer = NULL; -#line 4134 "DataSource.c" - } -#line 468 "/home/jens/Source/shotwell/src/core/DataSource.vala" - if (old) { -#line 468 "/home/jens/Source/shotwell/src/core/DataSource.vala" - source_backlink_unref (old); -#line 4140 "DataSource.c" - } -} - - -static void -source_backlink_class_init (SourceBacklinkClass * klass) -{ -#line 468 "/home/jens/Source/shotwell/src/core/DataSource.vala" - source_backlink_parent_class = g_type_class_peek_parent (klass); -#line 468 "/home/jens/Source/shotwell/src/core/DataSource.vala" - ((SourceBacklinkClass *) klass)->finalize = source_backlink_finalize; -#line 468 "/home/jens/Source/shotwell/src/core/DataSource.vala" - g_type_class_add_private (klass, sizeof (SourceBacklinkPrivate)); -#line 4154 "DataSource.c" -} - - -static void -source_backlink_instance_init (SourceBacklink * self) -{ -#line 468 "/home/jens/Source/shotwell/src/core/DataSource.vala" - self->priv = SOURCE_BACKLINK_GET_PRIVATE (self); -#line 468 "/home/jens/Source/shotwell/src/core/DataSource.vala" - self->ref_count = 1; -#line 4165 "DataSource.c" -} - - -static void -source_backlink_finalize (SourceBacklink * obj) -{ - SourceBacklink * self; -#line 468 "/home/jens/Source/shotwell/src/core/DataSource.vala" - self = G_TYPE_CHECK_INSTANCE_CAST (obj, TYPE_SOURCE_BACKLINK, SourceBacklink); -#line 468 "/home/jens/Source/shotwell/src/core/DataSource.vala" - g_signal_handlers_destroy (self); -#line 469 "/home/jens/Source/shotwell/src/core/DataSource.vala" - _g_free0 (self->priv->_name); -#line 470 "/home/jens/Source/shotwell/src/core/DataSource.vala" - _g_free0 (self->priv->_value); -#line 4181 "DataSource.c" -} - - -GType -source_backlink_get_type (void) -{ - static volatile gsize source_backlink_type_id__volatile = 0; - if (g_once_init_enter (&source_backlink_type_id__volatile)) { - static const GTypeValueTable g_define_type_value_table = { value_source_backlink_init, value_source_backlink_free_value, value_source_backlink_copy_value, value_source_backlink_peek_pointer, "p", value_source_backlink_collect_value, "p", value_source_backlink_lcopy_value }; - static const GTypeInfo g_define_type_info = { sizeof (SourceBacklinkClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) source_backlink_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (SourceBacklink), 0, (GInstanceInitFunc) source_backlink_instance_init, &g_define_type_value_table }; - static const GTypeFundamentalInfo g_define_type_fundamental_info = { (G_TYPE_FLAG_CLASSED | G_TYPE_FLAG_INSTANTIATABLE | G_TYPE_FLAG_DERIVABLE | G_TYPE_FLAG_DEEP_DERIVABLE) }; - GType source_backlink_type_id; - source_backlink_type_id = g_type_register_fundamental (g_type_fundamental_next (), "SourceBacklink", &g_define_type_info, &g_define_type_fundamental_info, 0); - g_once_init_leave (&source_backlink_type_id__volatile, source_backlink_type_id); - } - return source_backlink_type_id__volatile; -} - - -gpointer -source_backlink_ref (gpointer instance) -{ - SourceBacklink * self; - self = instance; -#line 468 "/home/jens/Source/shotwell/src/core/DataSource.vala" - g_atomic_int_inc (&self->ref_count); -#line 468 "/home/jens/Source/shotwell/src/core/DataSource.vala" - return instance; -#line 4210 "DataSource.c" -} - - -void -source_backlink_unref (gpointer instance) -{ - SourceBacklink * self; - self = instance; -#line 468 "/home/jens/Source/shotwell/src/core/DataSource.vala" - if (g_atomic_int_dec_and_test (&self->ref_count)) { -#line 468 "/home/jens/Source/shotwell/src/core/DataSource.vala" - SOURCE_BACKLINK_GET_CLASS (self)->finalize (self); -#line 468 "/home/jens/Source/shotwell/src/core/DataSource.vala" - g_type_free_instance ((GTypeInstance *) self); -#line 4225 "DataSource.c" - } -} - - -static void -_source_proxy_on_source_added_data_collection_items_added (DataCollection* _sender, - GeeIterable* added, - gpointer self) -{ -#line 588 "/home/jens/Source/shotwell/src/core/DataSource.vala" - source_proxy_on_source_added ((SourceProxy*) self, added); -#line 4237 "DataSource.c" -} - - -static void -_source_proxy_on_snapshot_broken_source_snapshot_broken (SourceSnapshot* _sender, - gpointer self) -{ -#line 577 "/home/jens/Source/shotwell/src/core/DataSource.vala" - source_proxy_on_snapshot_broken ((SourceProxy*) self); -#line 4247 "DataSource.c" -} - - -SourceProxy* -source_proxy_construct (GType object_type, - DataSource* source) -{ - SourceProxy* self = NULL; - gchar* _tmp0_; - SourceSnapshot* _tmp1_; - SourceSnapshot* _tmp2_; - SourceSnapshot* _tmp3_; - DataCollection* _tmp4_; - SourceCollection* _tmp5_; - SourceCollection* _tmp6_; -#line 571 "/home/jens/Source/shotwell/src/core/DataSource.vala" - g_return_val_if_fail (IS_DATA_SOURCE (source), NULL); -#line 571 "/home/jens/Source/shotwell/src/core/DataSource.vala" - self = (SourceProxy*) g_type_create_instance (object_type); -#line 572 "/home/jens/Source/shotwell/src/core/DataSource.vala" - self->priv->object_id = data_object_get_object_id (G_TYPE_CHECK_INSTANCE_CAST (source, TYPE_DATA_OBJECT, DataObject)); -#line 573 "/home/jens/Source/shotwell/src/core/DataSource.vala" - _tmp0_ = data_object_to_string (G_TYPE_CHECK_INSTANCE_CAST (source, TYPE_DATA_OBJECT, DataObject)); -#line 573 "/home/jens/Source/shotwell/src/core/DataSource.vala" - _g_free0 (self->priv->source_string); -#line 573 "/home/jens/Source/shotwell/src/core/DataSource.vala" - self->priv->source_string = _tmp0_; -#line 575 "/home/jens/Source/shotwell/src/core/DataSource.vala" - _tmp1_ = data_source_save_snapshot (source); -#line 575 "/home/jens/Source/shotwell/src/core/DataSource.vala" - _source_snapshot_unref0 (self->priv->snapshot); -#line 575 "/home/jens/Source/shotwell/src/core/DataSource.vala" - self->priv->snapshot = _tmp1_; -#line 576 "/home/jens/Source/shotwell/src/core/DataSource.vala" - _tmp2_ = self->priv->snapshot; -#line 576 "/home/jens/Source/shotwell/src/core/DataSource.vala" - _vala_assert (_tmp2_ != NULL, "snapshot != null"); -#line 577 "/home/jens/Source/shotwell/src/core/DataSource.vala" - _tmp3_ = self->priv->snapshot; -#line 577 "/home/jens/Source/shotwell/src/core/DataSource.vala" - g_signal_connect (_tmp3_, "broken", (GCallback) _source_proxy_on_snapshot_broken_source_snapshot_broken, self); -#line 579 "/home/jens/Source/shotwell/src/core/DataSource.vala" - source_proxy_set_source (self, source); -#line 581 "/home/jens/Source/shotwell/src/core/DataSource.vala" - _tmp4_ = data_object_get_membership (G_TYPE_CHECK_INSTANCE_CAST (source, TYPE_DATA_OBJECT, DataObject)); -#line 581 "/home/jens/Source/shotwell/src/core/DataSource.vala" - _data_collection_unref0 (self->priv->membership); -#line 581 "/home/jens/Source/shotwell/src/core/DataSource.vala" - self->priv->membership = G_TYPE_CHECK_INSTANCE_CAST (_tmp4_, TYPE_SOURCE_COLLECTION, SourceCollection); -#line 582 "/home/jens/Source/shotwell/src/core/DataSource.vala" - _tmp5_ = self->priv->membership; -#line 582 "/home/jens/Source/shotwell/src/core/DataSource.vala" - _vala_assert (_tmp5_ != NULL, "membership != null"); -#line 583 "/home/jens/Source/shotwell/src/core/DataSource.vala" - _tmp6_ = self->priv->membership; -#line 583 "/home/jens/Source/shotwell/src/core/DataSource.vala" - g_signal_connect (G_TYPE_CHECK_INSTANCE_CAST (_tmp6_, TYPE_DATA_COLLECTION, DataCollection), "items-added", (GCallback) _source_proxy_on_source_added_data_collection_items_added, self); -#line 571 "/home/jens/Source/shotwell/src/core/DataSource.vala" - return self; -#line 4307 "DataSource.c" -} - - -static DataSource* -source_proxy_real_reconstitute (SourceProxy* self, - gint64 object_id, - SourceSnapshot* snapshot) -{ -#line 591 "/home/jens/Source/shotwell/src/core/DataSource.vala" - g_critical ("Type `%s' does not implement abstract method `source_proxy_reconstitute'", g_type_name (G_TYPE_FROM_INSTANCE (self))); -#line 591 "/home/jens/Source/shotwell/src/core/DataSource.vala" - return NULL; -#line 4320 "DataSource.c" -} - - -DataSource* -source_proxy_reconstitute (SourceProxy* self, - gint64 object_id, - SourceSnapshot* snapshot) -{ -#line 591 "/home/jens/Source/shotwell/src/core/DataSource.vala" - g_return_val_if_fail (IS_SOURCE_PROXY (self), NULL); -#line 591 "/home/jens/Source/shotwell/src/core/DataSource.vala" - return SOURCE_PROXY_GET_CLASS (self)->reconstitute (self, object_id, snapshot); -#line 4333 "DataSource.c" -} - - -static void -source_proxy_real_notify_reconstituted (SourceProxy* self, - DataSource* source) -{ -#line 593 "/home/jens/Source/shotwell/src/core/DataSource.vala" - g_return_if_fail (IS_DATA_SOURCE (source)); -#line 594 "/home/jens/Source/shotwell/src/core/DataSource.vala" - g_signal_emit (self, source_proxy_signals[SOURCE_PROXY_RECONSTITUTED_SIGNAL], 0, source); -#line 4345 "DataSource.c" -} - - -void -source_proxy_notify_reconstituted (SourceProxy* self, - DataSource* source) -{ -#line 593 "/home/jens/Source/shotwell/src/core/DataSource.vala" - g_return_if_fail (IS_SOURCE_PROXY (self)); -#line 593 "/home/jens/Source/shotwell/src/core/DataSource.vala" - SOURCE_PROXY_GET_CLASS (self)->notify_reconstituted (self, source); -#line 4357 "DataSource.c" -} - - -static void -source_proxy_real_notify_dehydrated (SourceProxy* self) -{ -#line 598 "/home/jens/Source/shotwell/src/core/DataSource.vala" - g_signal_emit (self, source_proxy_signals[SOURCE_PROXY_DEHYDRATED_SIGNAL], 0); -#line 4366 "DataSource.c" -} - - -void -source_proxy_notify_dehydrated (SourceProxy* self) -{ -#line 597 "/home/jens/Source/shotwell/src/core/DataSource.vala" - g_return_if_fail (IS_SOURCE_PROXY (self)); -#line 597 "/home/jens/Source/shotwell/src/core/DataSource.vala" - SOURCE_PROXY_GET_CLASS (self)->notify_dehydrated (self); -#line 4377 "DataSource.c" -} - - -static void -source_proxy_real_notify_broken (SourceProxy* self) -{ -#line 602 "/home/jens/Source/shotwell/src/core/DataSource.vala" - g_signal_emit (self, source_proxy_signals[SOURCE_PROXY_BROKEN_SIGNAL], 0); -#line 4386 "DataSource.c" -} - - -void -source_proxy_notify_broken (SourceProxy* self) -{ -#line 601 "/home/jens/Source/shotwell/src/core/DataSource.vala" - g_return_if_fail (IS_SOURCE_PROXY (self)); -#line 601 "/home/jens/Source/shotwell/src/core/DataSource.vala" - SOURCE_PROXY_GET_CLASS (self)->notify_broken (self); -#line 4397 "DataSource.c" -} - - -static void -source_proxy_on_snapshot_broken (SourceProxy* self) -{ -#line 605 "/home/jens/Source/shotwell/src/core/DataSource.vala" - g_return_if_fail (IS_SOURCE_PROXY (self)); -#line 606 "/home/jens/Source/shotwell/src/core/DataSource.vala" - source_proxy_drop_source (self); -#line 608 "/home/jens/Source/shotwell/src/core/DataSource.vala" - source_proxy_notify_broken (self); -#line 4410 "DataSource.c" -} - - -static void -_source_proxy_on_destroyed_data_source_destroyed (DataSource* _sender, - gpointer self) -{ -#line 615 "/home/jens/Source/shotwell/src/core/DataSource.vala" - source_proxy_on_destroyed ((SourceProxy*) self); -#line 4420 "DataSource.c" -} - - -static void -source_proxy_set_source (SourceProxy* self, - DataSource* source) -{ - DataSource* _tmp0_; -#line 611 "/home/jens/Source/shotwell/src/core/DataSource.vala" - g_return_if_fail (IS_SOURCE_PROXY (self)); -#line 611 "/home/jens/Source/shotwell/src/core/DataSource.vala" - g_return_if_fail (IS_DATA_SOURCE (source)); -#line 612 "/home/jens/Source/shotwell/src/core/DataSource.vala" - source_proxy_drop_source (self); -#line 614 "/home/jens/Source/shotwell/src/core/DataSource.vala" - _tmp0_ = _g_object_ref0 (source); -#line 614 "/home/jens/Source/shotwell/src/core/DataSource.vala" - _g_object_unref0 (self->priv->source); -#line 614 "/home/jens/Source/shotwell/src/core/DataSource.vala" - self->priv->source = _tmp0_; -#line 615 "/home/jens/Source/shotwell/src/core/DataSource.vala" - g_signal_connect (source, "destroyed", (GCallback) _source_proxy_on_destroyed_data_source_destroyed, self); -#line 4443 "DataSource.c" -} - - -static void -source_proxy_drop_source (SourceProxy* self) -{ - DataSource* _tmp0_; - DataSource* _tmp1_; - guint _tmp2_; -#line 618 "/home/jens/Source/shotwell/src/core/DataSource.vala" - g_return_if_fail (IS_SOURCE_PROXY (self)); -#line 619 "/home/jens/Source/shotwell/src/core/DataSource.vala" - _tmp0_ = self->priv->source; -#line 619 "/home/jens/Source/shotwell/src/core/DataSource.vala" - if (_tmp0_ == NULL) { -#line 620 "/home/jens/Source/shotwell/src/core/DataSource.vala" - return; -#line 4461 "DataSource.c" - } -#line 622 "/home/jens/Source/shotwell/src/core/DataSource.vala" - _tmp1_ = self->priv->source; -#line 622 "/home/jens/Source/shotwell/src/core/DataSource.vala" - g_signal_parse_name ("destroyed", TYPE_DATA_SOURCE, &_tmp2_, NULL, FALSE); -#line 622 "/home/jens/Source/shotwell/src/core/DataSource.vala" - g_signal_handlers_disconnect_matched (_tmp1_, G_SIGNAL_MATCH_ID | G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA, _tmp2_, 0, NULL, (GCallback) _source_proxy_on_destroyed_data_source_destroyed, self); -#line 623 "/home/jens/Source/shotwell/src/core/DataSource.vala" - _g_object_unref0 (self->priv->source); -#line 623 "/home/jens/Source/shotwell/src/core/DataSource.vala" - self->priv->source = NULL; -#line 4473 "DataSource.c" -} - - -DataSource* -source_proxy_get_source (SourceProxy* self) -{ - DataSource* result = NULL; - SourceSnapshot* _tmp0_; - DataSource* _tmp1_; - DataSource* new_source = NULL; - gint64 _tmp4_; - SourceSnapshot* _tmp5_; - DataSource* _tmp6_; - DataSource* _tmp7_; - DataSource* _tmp8_; - gint64 _tmp11_; - DataSource* _tmp12_; - DataSource* _tmp14_; - gint64 _tmp15_; - SourceCollection* _tmp16_; - DataSource* _tmp17_; - DataSource* _tmp18_; - DataSource* _tmp19_; -#line 626 "/home/jens/Source/shotwell/src/core/DataSource.vala" - g_return_val_if_fail (IS_SOURCE_PROXY (self), NULL); -#line 627 "/home/jens/Source/shotwell/src/core/DataSource.vala" - _tmp0_ = self->priv->snapshot; -#line 627 "/home/jens/Source/shotwell/src/core/DataSource.vala" - if (source_snapshot_is_broken (_tmp0_)) { -#line 628 "/home/jens/Source/shotwell/src/core/DataSource.vala" - result = NULL; -#line 628 "/home/jens/Source/shotwell/src/core/DataSource.vala" - return result; -#line 4507 "DataSource.c" - } -#line 630 "/home/jens/Source/shotwell/src/core/DataSource.vala" - _tmp1_ = self->priv->source; -#line 630 "/home/jens/Source/shotwell/src/core/DataSource.vala" - if (_tmp1_ != NULL) { -#line 4513 "DataSource.c" - DataSource* _tmp2_; - DataSource* _tmp3_; -#line 631 "/home/jens/Source/shotwell/src/core/DataSource.vala" - _tmp2_ = self->priv->source; -#line 631 "/home/jens/Source/shotwell/src/core/DataSource.vala" - _tmp3_ = _g_object_ref0 (_tmp2_); -#line 631 "/home/jens/Source/shotwell/src/core/DataSource.vala" - result = _tmp3_; -#line 631 "/home/jens/Source/shotwell/src/core/DataSource.vala" - return result; -#line 4524 "DataSource.c" - } -#line 636 "/home/jens/Source/shotwell/src/core/DataSource.vala" - _tmp4_ = self->priv->object_id; -#line 636 "/home/jens/Source/shotwell/src/core/DataSource.vala" - _tmp5_ = self->priv->snapshot; -#line 636 "/home/jens/Source/shotwell/src/core/DataSource.vala" - _tmp6_ = source_proxy_reconstitute (self, _tmp4_, _tmp5_); -#line 636 "/home/jens/Source/shotwell/src/core/DataSource.vala" - new_source = _tmp6_; -#line 637 "/home/jens/Source/shotwell/src/core/DataSource.vala" - _tmp7_ = self->priv->source; -#line 637 "/home/jens/Source/shotwell/src/core/DataSource.vala" - _tmp8_ = new_source; -#line 637 "/home/jens/Source/shotwell/src/core/DataSource.vala" - if (_tmp7_ != _tmp8_) { -#line 4540 "DataSource.c" - DataSource* _tmp9_; - DataSource* _tmp10_; -#line 638 "/home/jens/Source/shotwell/src/core/DataSource.vala" - _tmp9_ = new_source; -#line 638 "/home/jens/Source/shotwell/src/core/DataSource.vala" - _tmp10_ = _g_object_ref0 (_tmp9_); -#line 638 "/home/jens/Source/shotwell/src/core/DataSource.vala" - _g_object_unref0 (self->priv->source); -#line 638 "/home/jens/Source/shotwell/src/core/DataSource.vala" - self->priv->source = _tmp10_; -#line 4551 "DataSource.c" - } -#line 639 "/home/jens/Source/shotwell/src/core/DataSource.vala" - _tmp11_ = self->priv->object_id; -#line 639 "/home/jens/Source/shotwell/src/core/DataSource.vala" - _tmp12_ = self->priv->source; -#line 639 "/home/jens/Source/shotwell/src/core/DataSource.vala" - if (_tmp11_ != data_object_get_object_id (G_TYPE_CHECK_INSTANCE_CAST (_tmp12_, TYPE_DATA_OBJECT, DataObject))) { -#line 4559 "DataSource.c" - DataSource* _tmp13_; -#line 640 "/home/jens/Source/shotwell/src/core/DataSource.vala" - _tmp13_ = new_source; -#line 640 "/home/jens/Source/shotwell/src/core/DataSource.vala" - self->priv->object_id = data_object_get_object_id (G_TYPE_CHECK_INSTANCE_CAST (_tmp13_, TYPE_DATA_OBJECT, DataObject)); -#line 4565 "DataSource.c" - } -#line 641 "/home/jens/Source/shotwell/src/core/DataSource.vala" - _tmp14_ = self->priv->source; -#line 641 "/home/jens/Source/shotwell/src/core/DataSource.vala" - _tmp15_ = self->priv->object_id; -#line 641 "/home/jens/Source/shotwell/src/core/DataSource.vala" - _vala_assert (data_object_get_object_id (G_TYPE_CHECK_INSTANCE_CAST (_tmp14_, TYPE_DATA_OBJECT, DataObject)) == _tmp15_, "source.get_object_id() == object_id"); -#line 642 "/home/jens/Source/shotwell/src/core/DataSource.vala" - _tmp16_ = self->priv->membership; -#line 642 "/home/jens/Source/shotwell/src/core/DataSource.vala" - _tmp17_ = self->priv->source; -#line 642 "/home/jens/Source/shotwell/src/core/DataSource.vala" - _vala_assert (data_collection_contains (G_TYPE_CHECK_INSTANCE_CAST (_tmp16_, TYPE_DATA_COLLECTION, DataCollection), G_TYPE_CHECK_INSTANCE_CAST (_tmp17_, TYPE_DATA_OBJECT, DataObject)), "membership.contains(source)"); -#line 644 "/home/jens/Source/shotwell/src/core/DataSource.vala" - _tmp18_ = self->priv->source; -#line 644 "/home/jens/Source/shotwell/src/core/DataSource.vala" - _tmp19_ = _g_object_ref0 (_tmp18_); -#line 644 "/home/jens/Source/shotwell/src/core/DataSource.vala" - result = _tmp19_; -#line 644 "/home/jens/Source/shotwell/src/core/DataSource.vala" - _g_object_unref0 (new_source); -#line 644 "/home/jens/Source/shotwell/src/core/DataSource.vala" - return result; -#line 4589 "DataSource.c" -} - - -static void -source_proxy_on_destroyed (SourceProxy* self) -{ - DataSource* _tmp0_; -#line 647 "/home/jens/Source/shotwell/src/core/DataSource.vala" - g_return_if_fail (IS_SOURCE_PROXY (self)); -#line 648 "/home/jens/Source/shotwell/src/core/DataSource.vala" - _tmp0_ = self->priv->source; -#line 648 "/home/jens/Source/shotwell/src/core/DataSource.vala" - _vala_assert (_tmp0_ != NULL, "source != null"); -#line 651 "/home/jens/Source/shotwell/src/core/DataSource.vala" - source_proxy_drop_source (self); -#line 653 "/home/jens/Source/shotwell/src/core/DataSource.vala" - source_proxy_notify_dehydrated (self); -#line 4607 "DataSource.c" -} - - -static void -source_proxy_on_source_added (SourceProxy* self, - GeeIterable* added) -{ - DataSource* _tmp0_; -#line 656 "/home/jens/Source/shotwell/src/core/DataSource.vala" - g_return_if_fail (IS_SOURCE_PROXY (self)); -#line 656 "/home/jens/Source/shotwell/src/core/DataSource.vala" - g_return_if_fail (GEE_IS_ITERABLE (added)); -#line 658 "/home/jens/Source/shotwell/src/core/DataSource.vala" - _tmp0_ = self->priv->source; -#line 658 "/home/jens/Source/shotwell/src/core/DataSource.vala" - if (_tmp0_ != NULL) { -#line 659 "/home/jens/Source/shotwell/src/core/DataSource.vala" - return; -#line 4626 "DataSource.c" - } - { - GeeIterator* _object_it = NULL; - GeeIterator* _tmp1_; -#line 661 "/home/jens/Source/shotwell/src/core/DataSource.vala" - _tmp1_ = gee_iterable_iterator (added); -#line 661 "/home/jens/Source/shotwell/src/core/DataSource.vala" - _object_it = _tmp1_; -#line 661 "/home/jens/Source/shotwell/src/core/DataSource.vala" - while (TRUE) { -#line 4637 "DataSource.c" - GeeIterator* _tmp2_; - DataObject* object = NULL; - GeeIterator* _tmp3_; - gpointer _tmp4_; - DataObject* _tmp5_; - gint64 _tmp6_; - DataObject* _tmp7_; - DataObject* _tmp8_; -#line 661 "/home/jens/Source/shotwell/src/core/DataSource.vala" - _tmp2_ = _object_it; -#line 661 "/home/jens/Source/shotwell/src/core/DataSource.vala" - if (!gee_iterator_next (_tmp2_)) { -#line 661 "/home/jens/Source/shotwell/src/core/DataSource.vala" - break; -#line 4652 "DataSource.c" - } -#line 661 "/home/jens/Source/shotwell/src/core/DataSource.vala" - _tmp3_ = _object_it; -#line 661 "/home/jens/Source/shotwell/src/core/DataSource.vala" - _tmp4_ = gee_iterator_get (_tmp3_); -#line 661 "/home/jens/Source/shotwell/src/core/DataSource.vala" - object = (DataObject*) _tmp4_; -#line 663 "/home/jens/Source/shotwell/src/core/DataSource.vala" - _tmp5_ = object; -#line 663 "/home/jens/Source/shotwell/src/core/DataSource.vala" - _tmp6_ = self->priv->object_id; -#line 663 "/home/jens/Source/shotwell/src/core/DataSource.vala" - if (data_object_get_object_id (_tmp5_) != _tmp6_) { -#line 664 "/home/jens/Source/shotwell/src/core/DataSource.vala" - _g_object_unref0 (object); -#line 664 "/home/jens/Source/shotwell/src/core/DataSource.vala" - continue; -#line 4670 "DataSource.c" - } -#line 667 "/home/jens/Source/shotwell/src/core/DataSource.vala" - _tmp7_ = object; -#line 667 "/home/jens/Source/shotwell/src/core/DataSource.vala" - source_proxy_set_source (self, G_TYPE_CHECK_INSTANCE_CAST (_tmp7_, TYPE_DATA_SOURCE, DataSource)); -#line 669 "/home/jens/Source/shotwell/src/core/DataSource.vala" - _tmp8_ = object; -#line 669 "/home/jens/Source/shotwell/src/core/DataSource.vala" - source_proxy_notify_reconstituted (self, G_TYPE_CHECK_INSTANCE_CAST (_tmp8_, TYPE_DATA_SOURCE, DataSource)); -#line 671 "/home/jens/Source/shotwell/src/core/DataSource.vala" - _g_object_unref0 (object); -#line 671 "/home/jens/Source/shotwell/src/core/DataSource.vala" - break; -#line 4684 "DataSource.c" - } -#line 661 "/home/jens/Source/shotwell/src/core/DataSource.vala" - _g_object_unref0 (_object_it); -#line 4688 "DataSource.c" - } -} - - -static void -source_proxy_real_reconstituted (SourceProxy* self, - DataSource* source) -{ -#line 558 "/home/jens/Source/shotwell/src/core/DataSource.vala" - g_return_if_fail (IS_DATA_SOURCE (source)); -#line 4699 "DataSource.c" -} - - -static void -source_proxy_real_dehydrated (SourceProxy* self) -{ -} - - -static void -source_proxy_real_broken (SourceProxy* self) -{ -} - - -static void -value_source_proxy_init (GValue* value) -{ -#line 549 "/home/jens/Source/shotwell/src/core/DataSource.vala" - value->data[0].v_pointer = NULL; -#line 4720 "DataSource.c" -} - - -static void -value_source_proxy_free_value (GValue* value) -{ -#line 549 "/home/jens/Source/shotwell/src/core/DataSource.vala" - if (value->data[0].v_pointer) { -#line 549 "/home/jens/Source/shotwell/src/core/DataSource.vala" - source_proxy_unref (value->data[0].v_pointer); -#line 4731 "DataSource.c" - } -} - - -static void -value_source_proxy_copy_value (const GValue* src_value, - GValue* dest_value) -{ -#line 549 "/home/jens/Source/shotwell/src/core/DataSource.vala" - if (src_value->data[0].v_pointer) { -#line 549 "/home/jens/Source/shotwell/src/core/DataSource.vala" - dest_value->data[0].v_pointer = source_proxy_ref (src_value->data[0].v_pointer); -#line 4744 "DataSource.c" - } else { -#line 549 "/home/jens/Source/shotwell/src/core/DataSource.vala" - dest_value->data[0].v_pointer = NULL; -#line 4748 "DataSource.c" - } -} - - -static gpointer -value_source_proxy_peek_pointer (const GValue* value) -{ -#line 549 "/home/jens/Source/shotwell/src/core/DataSource.vala" - return value->data[0].v_pointer; -#line 4758 "DataSource.c" -} - - -static gchar* -value_source_proxy_collect_value (GValue* value, - guint n_collect_values, - GTypeCValue* collect_values, - guint collect_flags) -{ -#line 549 "/home/jens/Source/shotwell/src/core/DataSource.vala" - if (collect_values[0].v_pointer) { -#line 4770 "DataSource.c" - SourceProxy * object; - object = collect_values[0].v_pointer; -#line 549 "/home/jens/Source/shotwell/src/core/DataSource.vala" - if (object->parent_instance.g_class == NULL) { -#line 549 "/home/jens/Source/shotwell/src/core/DataSource.vala" - return g_strconcat ("invalid unclassed object pointer for value type `", G_VALUE_TYPE_NAME (value), "'", NULL); -#line 4777 "DataSource.c" - } else if (!g_value_type_compatible (G_TYPE_FROM_INSTANCE (object), G_VALUE_TYPE (value))) { -#line 549 "/home/jens/Source/shotwell/src/core/DataSource.vala" - return g_strconcat ("invalid object type `", g_type_name (G_TYPE_FROM_INSTANCE (object)), "' for value type `", G_VALUE_TYPE_NAME (value), "'", NULL); -#line 4781 "DataSource.c" - } -#line 549 "/home/jens/Source/shotwell/src/core/DataSource.vala" - value->data[0].v_pointer = source_proxy_ref (object); -#line 4785 "DataSource.c" - } else { -#line 549 "/home/jens/Source/shotwell/src/core/DataSource.vala" - value->data[0].v_pointer = NULL; -#line 4789 "DataSource.c" - } -#line 549 "/home/jens/Source/shotwell/src/core/DataSource.vala" - return NULL; -#line 4793 "DataSource.c" -} - - -static gchar* -value_source_proxy_lcopy_value (const GValue* value, - guint n_collect_values, - GTypeCValue* collect_values, - guint collect_flags) -{ - SourceProxy ** object_p; - object_p = collect_values[0].v_pointer; -#line 549 "/home/jens/Source/shotwell/src/core/DataSource.vala" - if (!object_p) { -#line 549 "/home/jens/Source/shotwell/src/core/DataSource.vala" - return g_strdup_printf ("value location for `%s' passed as NULL", G_VALUE_TYPE_NAME (value)); -#line 4809 "DataSource.c" - } -#line 549 "/home/jens/Source/shotwell/src/core/DataSource.vala" - if (!value->data[0].v_pointer) { -#line 549 "/home/jens/Source/shotwell/src/core/DataSource.vala" - *object_p = NULL; -#line 4815 "DataSource.c" - } else if (collect_flags & G_VALUE_NOCOPY_CONTENTS) { -#line 549 "/home/jens/Source/shotwell/src/core/DataSource.vala" - *object_p = value->data[0].v_pointer; -#line 4819 "DataSource.c" - } else { -#line 549 "/home/jens/Source/shotwell/src/core/DataSource.vala" - *object_p = source_proxy_ref (value->data[0].v_pointer); -#line 4823 "DataSource.c" - } -#line 549 "/home/jens/Source/shotwell/src/core/DataSource.vala" - return NULL; -#line 4827 "DataSource.c" -} - - -GParamSpec* -param_spec_source_proxy (const gchar* name, - const gchar* nick, - const gchar* blurb, - GType object_type, - GParamFlags flags) -{ - ParamSpecSourceProxy* spec; -#line 549 "/home/jens/Source/shotwell/src/core/DataSource.vala" - g_return_val_if_fail (g_type_is_a (object_type, TYPE_SOURCE_PROXY), NULL); -#line 549 "/home/jens/Source/shotwell/src/core/DataSource.vala" - spec = g_param_spec_internal (G_TYPE_PARAM_OBJECT, name, nick, blurb, flags); -#line 549 "/home/jens/Source/shotwell/src/core/DataSource.vala" - G_PARAM_SPEC (spec)->value_type = object_type; -#line 549 "/home/jens/Source/shotwell/src/core/DataSource.vala" - return G_PARAM_SPEC (spec); -#line 4847 "DataSource.c" -} - - -gpointer -value_get_source_proxy (const GValue* value) -{ -#line 549 "/home/jens/Source/shotwell/src/core/DataSource.vala" - g_return_val_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, TYPE_SOURCE_PROXY), NULL); -#line 549 "/home/jens/Source/shotwell/src/core/DataSource.vala" - return value->data[0].v_pointer; -#line 4858 "DataSource.c" -} - - -void -value_set_source_proxy (GValue* value, - gpointer v_object) -{ - SourceProxy * old; -#line 549 "/home/jens/Source/shotwell/src/core/DataSource.vala" - g_return_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, TYPE_SOURCE_PROXY)); -#line 549 "/home/jens/Source/shotwell/src/core/DataSource.vala" - old = value->data[0].v_pointer; -#line 549 "/home/jens/Source/shotwell/src/core/DataSource.vala" - if (v_object) { -#line 549 "/home/jens/Source/shotwell/src/core/DataSource.vala" - g_return_if_fail (G_TYPE_CHECK_INSTANCE_TYPE (v_object, TYPE_SOURCE_PROXY)); -#line 549 "/home/jens/Source/shotwell/src/core/DataSource.vala" - g_return_if_fail (g_value_type_compatible (G_TYPE_FROM_INSTANCE (v_object), G_VALUE_TYPE (value))); -#line 549 "/home/jens/Source/shotwell/src/core/DataSource.vala" - value->data[0].v_pointer = v_object; -#line 549 "/home/jens/Source/shotwell/src/core/DataSource.vala" - source_proxy_ref (value->data[0].v_pointer); -#line 4881 "DataSource.c" - } else { -#line 549 "/home/jens/Source/shotwell/src/core/DataSource.vala" - value->data[0].v_pointer = NULL; -#line 4885 "DataSource.c" - } -#line 549 "/home/jens/Source/shotwell/src/core/DataSource.vala" - if (old) { -#line 549 "/home/jens/Source/shotwell/src/core/DataSource.vala" - source_proxy_unref (old); -#line 4891 "DataSource.c" - } -} - - -void -value_take_source_proxy (GValue* value, - gpointer v_object) -{ - SourceProxy * old; -#line 549 "/home/jens/Source/shotwell/src/core/DataSource.vala" - g_return_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, TYPE_SOURCE_PROXY)); -#line 549 "/home/jens/Source/shotwell/src/core/DataSource.vala" - old = value->data[0].v_pointer; -#line 549 "/home/jens/Source/shotwell/src/core/DataSource.vala" - if (v_object) { -#line 549 "/home/jens/Source/shotwell/src/core/DataSource.vala" - g_return_if_fail (G_TYPE_CHECK_INSTANCE_TYPE (v_object, TYPE_SOURCE_PROXY)); -#line 549 "/home/jens/Source/shotwell/src/core/DataSource.vala" - g_return_if_fail (g_value_type_compatible (G_TYPE_FROM_INSTANCE (v_object), G_VALUE_TYPE (value))); -#line 549 "/home/jens/Source/shotwell/src/core/DataSource.vala" - value->data[0].v_pointer = v_object; -#line 4913 "DataSource.c" - } else { -#line 549 "/home/jens/Source/shotwell/src/core/DataSource.vala" - value->data[0].v_pointer = NULL; -#line 4917 "DataSource.c" - } -#line 549 "/home/jens/Source/shotwell/src/core/DataSource.vala" - if (old) { -#line 549 "/home/jens/Source/shotwell/src/core/DataSource.vala" - source_proxy_unref (old); -#line 4923 "DataSource.c" - } -} - - -static void -source_proxy_class_init (SourceProxyClass * klass) -{ -#line 549 "/home/jens/Source/shotwell/src/core/DataSource.vala" - source_proxy_parent_class = g_type_class_peek_parent (klass); -#line 549 "/home/jens/Source/shotwell/src/core/DataSource.vala" - ((SourceProxyClass *) klass)->finalize = source_proxy_finalize; -#line 549 "/home/jens/Source/shotwell/src/core/DataSource.vala" - g_type_class_add_private (klass, sizeof (SourceProxyPrivate)); -#line 549 "/home/jens/Source/shotwell/src/core/DataSource.vala" - ((SourceProxyClass *) klass)->reconstitute = (DataSource* (*) (SourceProxy *, gint64, SourceSnapshot*)) source_proxy_real_reconstitute; -#line 549 "/home/jens/Source/shotwell/src/core/DataSource.vala" - ((SourceProxyClass *) klass)->notify_reconstituted = (void (*) (SourceProxy *, DataSource*)) source_proxy_real_notify_reconstituted; -#line 549 "/home/jens/Source/shotwell/src/core/DataSource.vala" - ((SourceProxyClass *) klass)->notify_dehydrated = (void (*) (SourceProxy *)) source_proxy_real_notify_dehydrated; -#line 549 "/home/jens/Source/shotwell/src/core/DataSource.vala" - ((SourceProxyClass *) klass)->notify_broken = (void (*) (SourceProxy *)) source_proxy_real_notify_broken; -#line 549 "/home/jens/Source/shotwell/src/core/DataSource.vala" - ((SourceProxyClass *) klass)->reconstituted = source_proxy_real_reconstituted; -#line 549 "/home/jens/Source/shotwell/src/core/DataSource.vala" - ((SourceProxyClass *) klass)->dehydrated = source_proxy_real_dehydrated; -#line 549 "/home/jens/Source/shotwell/src/core/DataSource.vala" - ((SourceProxyClass *) klass)->broken = source_proxy_real_broken; -#line 549 "/home/jens/Source/shotwell/src/core/DataSource.vala" - source_proxy_signals[SOURCE_PROXY_RECONSTITUTED_SIGNAL] = g_signal_new ("reconstituted", TYPE_SOURCE_PROXY, G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET (SourceProxyClass, reconstituted), NULL, NULL, g_cclosure_marshal_VOID__OBJECT, G_TYPE_NONE, 1, TYPE_DATA_SOURCE); -#line 549 "/home/jens/Source/shotwell/src/core/DataSource.vala" - source_proxy_signals[SOURCE_PROXY_DEHYDRATED_SIGNAL] = g_signal_new ("dehydrated", TYPE_SOURCE_PROXY, G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET (SourceProxyClass, dehydrated), NULL, NULL, g_cclosure_marshal_VOID__VOID, G_TYPE_NONE, 0); -#line 549 "/home/jens/Source/shotwell/src/core/DataSource.vala" - source_proxy_signals[SOURCE_PROXY_BROKEN_SIGNAL] = g_signal_new ("broken", TYPE_SOURCE_PROXY, G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET (SourceProxyClass, broken), NULL, NULL, g_cclosure_marshal_VOID__VOID, G_TYPE_NONE, 0); -#line 4957 "DataSource.c" -} - - -static void -source_proxy_instance_init (SourceProxy * self) -{ -#line 549 "/home/jens/Source/shotwell/src/core/DataSource.vala" - self->priv = SOURCE_PROXY_GET_PRIVATE (self); -#line 549 "/home/jens/Source/shotwell/src/core/DataSource.vala" - self->ref_count = 1; -#line 4968 "DataSource.c" -} - - -static void -source_proxy_finalize (SourceProxy * obj) -{ - SourceProxy * self; - SourceCollection* _tmp0_; - guint _tmp1_; -#line 549 "/home/jens/Source/shotwell/src/core/DataSource.vala" - self = G_TYPE_CHECK_INSTANCE_CAST (obj, TYPE_SOURCE_PROXY, SourceProxy); -#line 549 "/home/jens/Source/shotwell/src/core/DataSource.vala" - g_signal_handlers_destroy (self); -#line 587 "/home/jens/Source/shotwell/src/core/DataSource.vala" - source_proxy_drop_source (self); -#line 588 "/home/jens/Source/shotwell/src/core/DataSource.vala" - _tmp0_ = self->priv->membership; -#line 588 "/home/jens/Source/shotwell/src/core/DataSource.vala" - g_signal_parse_name ("items-added", TYPE_DATA_COLLECTION, &_tmp1_, NULL, FALSE); -#line 588 "/home/jens/Source/shotwell/src/core/DataSource.vala" - g_signal_handlers_disconnect_matched (G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, TYPE_DATA_COLLECTION, DataCollection), G_SIGNAL_MATCH_ID | G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA, _tmp1_, 0, NULL, (GCallback) _source_proxy_on_source_added_data_collection_items_added, self); -#line 551 "/home/jens/Source/shotwell/src/core/DataSource.vala" - _g_free0 (self->priv->source_string); -#line 552 "/home/jens/Source/shotwell/src/core/DataSource.vala" - _g_object_unref0 (self->priv->source); -#line 553 "/home/jens/Source/shotwell/src/core/DataSource.vala" - _source_snapshot_unref0 (self->priv->snapshot); -#line 554 "/home/jens/Source/shotwell/src/core/DataSource.vala" - _data_collection_unref0 (self->priv->membership); -#line 4998 "DataSource.c" -} - - -GType -source_proxy_get_type (void) -{ - static volatile gsize source_proxy_type_id__volatile = 0; - if (g_once_init_enter (&source_proxy_type_id__volatile)) { - static const GTypeValueTable g_define_type_value_table = { value_source_proxy_init, value_source_proxy_free_value, value_source_proxy_copy_value, value_source_proxy_peek_pointer, "p", value_source_proxy_collect_value, "p", value_source_proxy_lcopy_value }; - static const GTypeInfo g_define_type_info = { sizeof (SourceProxyClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) source_proxy_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (SourceProxy), 0, (GInstanceInitFunc) source_proxy_instance_init, &g_define_type_value_table }; - static const GTypeFundamentalInfo g_define_type_fundamental_info = { (G_TYPE_FLAG_CLASSED | G_TYPE_FLAG_INSTANTIATABLE | G_TYPE_FLAG_DERIVABLE | G_TYPE_FLAG_DEEP_DERIVABLE) }; - GType source_proxy_type_id; - source_proxy_type_id = g_type_register_fundamental (g_type_fundamental_next (), "SourceProxy", &g_define_type_info, &g_define_type_fundamental_info, G_TYPE_FLAG_ABSTRACT); - g_once_init_leave (&source_proxy_type_id__volatile, source_proxy_type_id); - } - return source_proxy_type_id__volatile; -} - - -gpointer -source_proxy_ref (gpointer instance) -{ - SourceProxy * self; - self = instance; -#line 549 "/home/jens/Source/shotwell/src/core/DataSource.vala" - g_atomic_int_inc (&self->ref_count); -#line 549 "/home/jens/Source/shotwell/src/core/DataSource.vala" - return instance; -#line 5027 "DataSource.c" -} - - -void -source_proxy_unref (gpointer instance) -{ - SourceProxy * self; - self = instance; -#line 549 "/home/jens/Source/shotwell/src/core/DataSource.vala" - if (g_atomic_int_dec_and_test (&self->ref_count)) { -#line 549 "/home/jens/Source/shotwell/src/core/DataSource.vala" - SOURCE_PROXY_GET_CLASS (self)->finalize (self); -#line 549 "/home/jens/Source/shotwell/src/core/DataSource.vala" - g_type_free_instance ((GTypeInstance *) self); -#line 5042 "DataSource.c" - } -} - - -SourceProxy* -proxyable_get_proxy (Proxyable* self) -{ -#line 677 "/home/jens/Source/shotwell/src/core/DataSource.vala" - g_return_val_if_fail (IS_PROXYABLE (self), NULL); -#line 677 "/home/jens/Source/shotwell/src/core/DataSource.vala" - return PROXYABLE_GET_INTERFACE (self)->get_proxy (self); -#line 5054 "DataSource.c" -} - - -static void -proxyable_base_init (ProxyableIface * iface) -{ -#line 676 "/home/jens/Source/shotwell/src/core/DataSource.vala" - static gboolean initialized = FALSE; -#line 676 "/home/jens/Source/shotwell/src/core/DataSource.vala" - if (!initialized) { -#line 676 "/home/jens/Source/shotwell/src/core/DataSource.vala" - initialized = TRUE; -#line 5067 "DataSource.c" - } -} - - -GType -proxyable_get_type (void) -{ - static volatile gsize proxyable_type_id__volatile = 0; - if (g_once_init_enter (&proxyable_type_id__volatile)) { - static const GTypeInfo g_define_type_info = { sizeof (ProxyableIface), (GBaseInitFunc) proxyable_base_init, (GBaseFinalizeFunc) NULL, (GClassInitFunc) NULL, (GClassFinalizeFunc) NULL, NULL, 0, 0, (GInstanceInitFunc) NULL, NULL }; - GType proxyable_type_id; - proxyable_type_id = g_type_register_static (G_TYPE_INTERFACE, "Proxyable", &g_define_type_info, 0); - g_type_interface_add_prerequisite (proxyable_type_id, G_TYPE_OBJECT); - g_once_init_leave (&proxyable_type_id__volatile, proxyable_type_id); - } - return proxyable_type_id__volatile; -} - - -static void -_vala_array_destroy (gpointer array, - gint array_length, - GDestroyNotify destroy_func) -{ - if ((array != NULL) && (destroy_func != NULL)) { - int i; - for (i = 0; i < array_length; i = i + 1) { - if (((gpointer*) array)[i] != NULL) { - destroy_func (((gpointer*) array)[i]); - } - } - } -} - - -static void -_vala_array_free (gpointer array, - gint array_length, - GDestroyNotify destroy_func) -{ - _vala_array_destroy (array, array_length, destroy_func); - g_free (array); -} - - -static gint -_vala_array_length (gpointer array) -{ - int length; - length = 0; - if (array) { - while (((gpointer*) array)[length]) { - length++; - } - } - return length; -} - - - diff --git a/src/core/DataSourceTypes.c b/src/core/DataSourceTypes.c deleted file mode 100644 index 5fda46c..0000000 --- a/src/core/DataSourceTypes.c +++ /dev/null @@ -1,1336 +0,0 @@ -/* DataSourceTypes.c generated by valac 0.40.4, the Vala compiler - * generated from DataSourceTypes.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. - */ -/**/ -/* Media sources*/ -/**/ - - -#include <glib.h> -#include <glib-object.h> -#include <stdlib.h> -#include <string.h> -#include <gdk-pixbuf/gdk-pixbuf.h> -#include <gio/gio.h> -#include <time.h> -#include <gee.h> - - -#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; -typedef struct _DataObjectPrivate DataObjectPrivate; - -#define TYPE_ALTERATION (alteration_get_type ()) -#define ALTERATION(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_ALTERATION, Alteration)) -#define ALTERATION_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_ALTERATION, AlterationClass)) -#define IS_ALTERATION(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_ALTERATION)) -#define IS_ALTERATION_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_ALTERATION)) -#define ALTERATION_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_ALTERATION, AlterationClass)) - -typedef struct _Alteration Alteration; -typedef struct _AlterationClass AlterationClass; - -#define TYPE_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_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; -typedef struct _DataSourcePrivate DataSourcePrivate; - -#define TYPE_SOURCE_HOLDING_TANK (source_holding_tank_get_type ()) -#define SOURCE_HOLDING_TANK(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_SOURCE_HOLDING_TANK, SourceHoldingTank)) -#define SOURCE_HOLDING_TANK_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_SOURCE_HOLDING_TANK, SourceHoldingTankClass)) -#define IS_SOURCE_HOLDING_TANK(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_SOURCE_HOLDING_TANK)) -#define IS_SOURCE_HOLDING_TANK_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_SOURCE_HOLDING_TANK)) -#define SOURCE_HOLDING_TANK_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_SOURCE_HOLDING_TANK, SourceHoldingTankClass)) - -typedef struct _SourceHoldingTank SourceHoldingTank; -typedef struct _SourceHoldingTankClass SourceHoldingTankClass; - -#define TYPE_SOURCE_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_SOURCE_SNAPSHOT (source_snapshot_get_type ()) -#define SOURCE_SNAPSHOT(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_SOURCE_SNAPSHOT, SourceSnapshot)) -#define SOURCE_SNAPSHOT_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_SOURCE_SNAPSHOT, SourceSnapshotClass)) -#define IS_SOURCE_SNAPSHOT(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_SOURCE_SNAPSHOT)) -#define IS_SOURCE_SNAPSHOT_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_SOURCE_SNAPSHOT)) -#define SOURCE_SNAPSHOT_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_SOURCE_SNAPSHOT, SourceSnapshotClass)) - -typedef struct _SourceSnapshot SourceSnapshot; -typedef struct _SourceSnapshotClass SourceSnapshotClass; - -#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; -typedef struct _ThumbnailSourcePrivate ThumbnailSourcePrivate; - -#define TYPE_PHOTO_FILE_FORMAT (photo_file_format_get_type ()) -enum { - THUMBNAIL_SOURCE_0_PROPERTY, - THUMBNAIL_SOURCE_NUM_PROPERTIES -}; -static GParamSpec* thumbnail_source_properties[THUMBNAIL_SOURCE_NUM_PROPERTIES]; - -#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; -enum { - THUMBNAIL_SOURCE_THUMBNAIL_ALTERED_SIGNAL, - THUMBNAIL_SOURCE_NUM_SIGNALS -}; -static guint thumbnail_source_signals[THUMBNAIL_SOURCE_NUM_SIGNALS] = {0}; - -#define TYPE_INDEXABLE (indexable_get_type ()) -#define INDEXABLE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_INDEXABLE, Indexable)) -#define IS_INDEXABLE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_INDEXABLE)) -#define INDEXABLE_GET_INTERFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE ((obj), TYPE_INDEXABLE, IndexableIface)) - -typedef struct _Indexable Indexable; -typedef struct _IndexableIface IndexableIface; - -#define TYPE_MEDIA_SOURCE (media_source_get_type ()) -#define MEDIA_SOURCE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_MEDIA_SOURCE, MediaSource)) -#define MEDIA_SOURCE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_MEDIA_SOURCE, MediaSourceClass)) -#define IS_MEDIA_SOURCE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_MEDIA_SOURCE)) -#define IS_MEDIA_SOURCE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_MEDIA_SOURCE)) -#define MEDIA_SOURCE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_MEDIA_SOURCE, MediaSourceClass)) - -typedef struct _MediaSource MediaSource; -typedef struct _MediaSourceClass MediaSourceClass; -typedef struct _MediaSourcePrivate MediaSourcePrivate; - -#define TYPE_EVENT_ID (event_id_get_type ()) -typedef struct _EventID EventID; - -#define TYPE_BACKING_FILE_STATE (backing_file_state_get_type ()) -#define BACKING_FILE_STATE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_BACKING_FILE_STATE, BackingFileState)) -#define BACKING_FILE_STATE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_BACKING_FILE_STATE, BackingFileStateClass)) -#define IS_BACKING_FILE_STATE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_BACKING_FILE_STATE)) -#define IS_BACKING_FILE_STATE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_BACKING_FILE_STATE)) -#define BACKING_FILE_STATE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_BACKING_FILE_STATE, BackingFileStateClass)) - -typedef struct _BackingFileState BackingFileState; -typedef struct _BackingFileStateClass BackingFileStateClass; - -#define TYPE_RATING (rating_get_type ()) - -#define PHOTO_TYPE_EXCEPTION (photo_exception_get_type ()) - -#define TYPE_DIMENSIONS (dimensions_get_type ()) -typedef struct _Dimensions Dimensions; - -#define TYPE_SCALING (scaling_get_type ()) - -#define TYPE_SCALE_CONSTRAINT (scale_constraint_get_type ()) -typedef struct _Scaling Scaling; - -#define TYPE_IMPORT_ID (import_id_get_type ()) -typedef struct _ImportID ImportID; - -#define TYPE_PHOTO_SOURCE (photo_source_get_type ()) -#define PHOTO_SOURCE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_PHOTO_SOURCE, PhotoSource)) -#define PHOTO_SOURCE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_PHOTO_SOURCE, PhotoSourceClass)) -#define IS_PHOTO_SOURCE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_PHOTO_SOURCE)) -#define IS_PHOTO_SOURCE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_PHOTO_SOURCE)) -#define PHOTO_SOURCE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_PHOTO_SOURCE, PhotoSourceClass)) - -typedef struct _PhotoSource PhotoSource; -typedef struct _PhotoSourceClass PhotoSourceClass; -typedef struct _PhotoSourcePrivate PhotoSourcePrivate; - -#define TYPE_MEDIA_METADATA (media_metadata_get_type ()) -#define MEDIA_METADATA(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_MEDIA_METADATA, MediaMetadata)) -#define MEDIA_METADATA_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_MEDIA_METADATA, MediaMetadataClass)) -#define IS_MEDIA_METADATA(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_MEDIA_METADATA)) -#define IS_MEDIA_METADATA_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_MEDIA_METADATA)) -#define MEDIA_METADATA_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_MEDIA_METADATA, MediaMetadataClass)) - -typedef struct _MediaMetadata MediaMetadata; -typedef struct _MediaMetadataClass MediaMetadataClass; - -#define TYPE_PHOTO_METADATA (photo_metadata_get_type ()) -#define PHOTO_METADATA(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_PHOTO_METADATA, PhotoMetadata)) -#define PHOTO_METADATA_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_PHOTO_METADATA, PhotoMetadataClass)) -#define IS_PHOTO_METADATA(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_PHOTO_METADATA)) -#define IS_PHOTO_METADATA_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_PHOTO_METADATA)) -#define PHOTO_METADATA_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_PHOTO_METADATA, PhotoMetadataClass)) - -typedef struct _PhotoMetadata PhotoMetadata; -typedef struct _PhotoMetadataClass PhotoMetadataClass; -enum { - PHOTO_SOURCE_0_PROPERTY, - PHOTO_SOURCE_NUM_PROPERTIES -}; -static GParamSpec* photo_source_properties[PHOTO_SOURCE_NUM_PROPERTIES]; - -#define TYPE_VIDEO_SOURCE (video_source_get_type ()) -#define VIDEO_SOURCE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_VIDEO_SOURCE, VideoSource)) -#define VIDEO_SOURCE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_VIDEO_SOURCE, VideoSourceClass)) -#define IS_VIDEO_SOURCE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_VIDEO_SOURCE)) -#define IS_VIDEO_SOURCE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_VIDEO_SOURCE)) -#define VIDEO_SOURCE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_VIDEO_SOURCE, VideoSourceClass)) - -typedef struct _VideoSource VideoSource; -typedef struct _VideoSourceClass VideoSourceClass; -typedef struct _VideoSourcePrivate VideoSourcePrivate; -enum { - VIDEO_SOURCE_0_PROPERTY, - VIDEO_SOURCE_NUM_PROPERTIES -}; -static GParamSpec* video_source_properties[VIDEO_SOURCE_NUM_PROPERTIES]; - -#define TYPE_EVENT_SOURCE (event_source_get_type ()) -#define EVENT_SOURCE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_EVENT_SOURCE, EventSource)) -#define EVENT_SOURCE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_EVENT_SOURCE, EventSourceClass)) -#define IS_EVENT_SOURCE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_EVENT_SOURCE)) -#define IS_EVENT_SOURCE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_EVENT_SOURCE)) -#define EVENT_SOURCE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_EVENT_SOURCE, EventSourceClass)) - -typedef struct _EventSource EventSource; -typedef struct _EventSourceClass EventSourceClass; -typedef struct _EventSourcePrivate EventSourcePrivate; -enum { - EVENT_SOURCE_0_PROPERTY, - EVENT_SOURCE_NUM_PROPERTIES -}; -static GParamSpec* event_source_properties[EVENT_SOURCE_NUM_PROPERTIES]; - -#define TYPE_CONTAINER_SOURCE (container_source_get_type ()) -#define CONTAINER_SOURCE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_CONTAINER_SOURCE, ContainerSource)) -#define IS_CONTAINER_SOURCE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_CONTAINER_SOURCE)) -#define CONTAINER_SOURCE_GET_INTERFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE ((obj), TYPE_CONTAINER_SOURCE, ContainerSourceIface)) - -typedef struct _ContainerSource ContainerSource; -typedef struct _ContainerSourceIface ContainerSourceIface; - -#define TYPE_SOURCE_BACKLINK (source_backlink_get_type ()) -#define SOURCE_BACKLINK(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_SOURCE_BACKLINK, SourceBacklink)) -#define SOURCE_BACKLINK_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_SOURCE_BACKLINK, SourceBacklinkClass)) -#define IS_SOURCE_BACKLINK(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_SOURCE_BACKLINK)) -#define IS_SOURCE_BACKLINK_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_SOURCE_BACKLINK)) -#define SOURCE_BACKLINK_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_SOURCE_BACKLINK, SourceBacklinkClass)) - -typedef struct _SourceBacklink SourceBacklink; -typedef struct _SourceBacklinkClass SourceBacklinkClass; - -struct _DataObject { - GObject parent_instance; - DataObjectPrivate * priv; -}; - -struct _DataObjectClass { - GObjectClass parent_class; - void (*notify_altered) (DataObject* self, Alteration* alteration); - void (*notify_membership_changed) (DataObject* self, DataCollection* collection); - void (*notify_collection_property_set) (DataObject* self, const gchar* name, GValue* old, GValue* val); - void (*notify_collection_property_cleared) (DataObject* self, const gchar* name); - gchar* (*get_name) (DataObject* self); - gchar* (*to_string) (DataObject* self); -}; - -struct _DataSource { - DataObject parent_instance; - DataSourcePrivate * priv; -}; - -struct _DataSourceClass { - DataObjectClass parent_class; - void (*notify_held_in_tank) (DataSource* self, SourceHoldingTank* holding_tank); - void (*notify_unlinking) (DataSource* self, SourceCollection* collection); - void (*notify_unlinked) (DataSource* self); - void (*notify_relinking) (DataSource* self, SourceCollection* collection); - void (*notify_relinked) (DataSource* self); - gchar* (*get_typename) (DataSource* self); - gint64 (*get_instance_id) (DataSource* self); - gchar* (*get_source_id) (DataSource* self); - void (*commit_backlinks) (DataSource* self, SourceCollection* sources, const gchar* dehydrated); - SourceSnapshot* (*save_snapshot) (DataSource* self); - gboolean (*internal_delete_backing) (DataSource* self, GError** error); - gboolean (*equals) (DataSource* self, DataSource* source); - void (*destroy) (DataSource* self); - void (*unlinked) (DataSource* self, SourceCollection* sources); - void (*relinked) (DataSource* self, SourceCollection* sources); - void (*destroyed) (DataSource* self); -}; - -typedef enum { - PHOTO_FILE_FORMAT_JFIF, - PHOTO_FILE_FORMAT_RAW, - PHOTO_FILE_FORMAT_PNG, - PHOTO_FILE_FORMAT_TIFF, - PHOTO_FILE_FORMAT_BMP, - PHOTO_FILE_FORMAT_UNKNOWN -} PhotoFileFormat; - -struct _ThumbnailSource { - DataSource parent_instance; - ThumbnailSourcePrivate * priv; -}; - -struct _ThumbnailSourceClass { - DataSourceClass parent_class; - void (*notify_thumbnail_altered) (ThumbnailSource* self); - GdkPixbuf* (*get_thumbnail) (ThumbnailSource* self, gint scale, GError** error); - GdkPixbuf* (*create_thumbnail) (ThumbnailSource* self, gint scale, GError** error); - gchar* (*get_representative_id) (ThumbnailSource* self); - PhotoFileFormat (*get_preferred_thumbnail_format) (ThumbnailSource* self); - void (*thumbnail_altered) (ThumbnailSource* self); -}; - -typedef void (*DataSourceContactSubscriber) (DataView* view, void* user_data); -struct _IndexableIface { - GTypeInterface parent_iface; - const gchar* (*get_indexable_keywords) (Indexable* self); -}; - -struct _EventID { - gint64 id; -}; - -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 { - PHOTO_EXCEPTION_NONE = 0, - PHOTO_EXCEPTION_ORIENTATION = 1 << 0, - PHOTO_EXCEPTION_CROP = 1 << 1, - PHOTO_EXCEPTION_REDEYE = 1 << 2, - PHOTO_EXCEPTION_ADJUST = 1 << 3, - PHOTO_EXCEPTION_STRAIGHTEN = 1 << 4, - PHOTO_EXCEPTION_ALL = 0xFFFFFFFFLL -} PhotoException; - -struct _Dimensions { - gint width; - gint height; -}; - -typedef enum { - SCALE_CONSTRAINT_ORIGINAL, - SCALE_CONSTRAINT_DIMENSIONS, - SCALE_CONSTRAINT_WIDTH, - SCALE_CONSTRAINT_HEIGHT, - SCALE_CONSTRAINT_FILL_VIEWPORT -} ScaleConstraint; - -struct _Scaling { - ScaleConstraint constraint; - gint scale; - Dimensions viewport; - gboolean scale_up; -}; - -struct _ImportID { - gint64 id; -}; - -struct _MediaSource { - ThumbnailSource parent_instance; - MediaSourcePrivate * priv; -}; - -struct _MediaSourceClass { - ThumbnailSourceClass parent_class; - void (*notify_master_replaced) (MediaSource* self, GFile* old_file, GFile* new_file); - gboolean (*set_event_id) (MediaSource* self, EventID* id); - gchar* (*get_basename) (MediaSource* self); - GFile* (*get_file) (MediaSource* self); - GFile* (*get_master_file) (MediaSource* self); - guint64 (*get_master_filesize) (MediaSource* self); - guint64 (*get_filesize) (MediaSource* self); - time_t (*get_timestamp) (MediaSource* self); - BackingFileState** (*get_backing_files_state) (MediaSource* self, int* result_length1); - gchar* (*get_title) (MediaSource* self); - gchar* (*get_comment) (MediaSource* self); - void (*set_title) (MediaSource* self, const gchar* title); - gboolean (*set_comment) (MediaSource* self, const gchar* comment); - Rating (*get_rating) (MediaSource* self); - void (*set_rating) (MediaSource* self, Rating rating); - void (*increase_rating) (MediaSource* self); - void (*decrease_rating) (MediaSource* self); - void (*get_dimensions) (MediaSource* self, PhotoException disallowed_steps, Dimensions* result); - GdkPixbuf* (*get_preview_pixbuf) (MediaSource* self, Scaling* scaling, GError** error); - gboolean (*is_trashed) (MediaSource* self); - void (*trash) (MediaSource* self); - void (*untrash) (MediaSource* self); - gboolean (*is_offline) (MediaSource* self); - void (*mark_offline) (MediaSource* self); - void (*mark_online) (MediaSource* self); - gchar* (*get_master_md5) (MediaSource* self); - void (*get_event_id) (MediaSource* self, EventID* result); - time_t (*get_exposure_time) (MediaSource* self); - void (*get_import_id) (MediaSource* self, ImportID* result); - void (*master_replaced) (MediaSource* self, GFile* old_file, GFile* new_file); -}; - -struct _PhotoSource { - MediaSource parent_instance; - PhotoSourcePrivate * priv; -}; - -struct _PhotoSourceClass { - MediaSourceClass parent_class; - PhotoMetadata* (*get_metadata) (PhotoSource* self); - GdkPixbuf* (*get_pixbuf) (PhotoSource* self, Scaling* scaling, GError** error); -}; - -struct _VideoSource { - MediaSource parent_instance; - VideoSourcePrivate * priv; -}; - -struct _VideoSourceClass { - MediaSourceClass parent_class; -}; - -struct _EventSource { - ThumbnailSource parent_instance; - EventSourcePrivate * priv; -}; - -struct _EventSourceClass { - ThumbnailSourceClass parent_class; - time_t (*get_start_time) (EventSource* self); - time_t (*get_end_time) (EventSource* self); - guint64 (*get_total_filesize) (EventSource* self); - gint (*get_media_count) (EventSource* self); - GeeCollection* (*get_media) (EventSource* self); - gchar* (*get_comment) (EventSource* self); - gboolean (*set_comment) (EventSource* self, const gchar* comment); -}; - -struct _ContainerSourceIface { - GTypeInterface parent_iface; - gboolean (*has_links) (ContainerSource* self); - SourceBacklink* (*get_backlink) (ContainerSource* self); - void (*break_link) (ContainerSource* self, DataSource* source); - void (*break_link_many) (ContainerSource* self, GeeCollection* sources); - void (*establish_link) (ContainerSource* self, DataSource* source); - void (*establish_link_many) (ContainerSource* self, GeeCollection* sources); -}; - - -static gpointer thumbnail_source_parent_class = NULL; -static gpointer photo_source_parent_class = NULL; -static gpointer video_source_parent_class = NULL; -static gpointer event_source_parent_class = NULL; - -GType data_object_get_type (void) G_GNUC_CONST; -gpointer alteration_ref (gpointer instance); -void alteration_unref (gpointer instance); -GParamSpec* param_spec_alteration (const gchar* name, - const gchar* nick, - const gchar* blurb, - GType object_type, - GParamFlags flags); -void value_set_alteration (GValue* value, - gpointer v_object); -void value_take_alteration (GValue* value, - gpointer v_object); -gpointer value_get_alteration (const GValue* value); -GType alteration_get_type (void) G_GNUC_CONST; -gpointer data_collection_ref (gpointer instance); -void data_collection_unref (gpointer instance); -GParamSpec* param_spec_data_collection (const gchar* name, - const gchar* nick, - const gchar* blurb, - GType object_type, - GParamFlags flags); -void value_set_data_collection (GValue* value, - gpointer v_object); -void value_take_data_collection (GValue* value, - gpointer v_object); -gpointer value_get_data_collection (const GValue* value); -GType data_collection_get_type (void) G_GNUC_CONST; -GType data_source_get_type (void) G_GNUC_CONST; -gpointer source_holding_tank_ref (gpointer instance); -void source_holding_tank_unref (gpointer instance); -GParamSpec* param_spec_source_holding_tank (const gchar* name, - const gchar* nick, - const gchar* blurb, - GType object_type, - GParamFlags flags); -void value_set_source_holding_tank (GValue* value, - gpointer v_object); -void value_take_source_holding_tank (GValue* value, - gpointer v_object); -gpointer value_get_source_holding_tank (const GValue* value); -GType source_holding_tank_get_type (void) G_GNUC_CONST; -GType source_collection_get_type (void) G_GNUC_CONST; -gpointer source_snapshot_ref (gpointer instance); -void source_snapshot_unref (gpointer instance); -GParamSpec* param_spec_source_snapshot (const gchar* name, - const gchar* nick, - const gchar* blurb, - GType object_type, - GParamFlags flags); -void value_set_source_snapshot (GValue* value, - gpointer v_object); -void value_take_source_snapshot (GValue* value, - gpointer v_object); -gpointer value_get_source_snapshot (const GValue* value); -GType source_snapshot_get_type (void) G_GNUC_CONST; -GType thumbnail_source_get_type (void) G_GNUC_CONST; -GType photo_file_format_get_type (void) G_GNUC_CONST; -ThumbnailSource* thumbnail_source_construct (GType object_type, - gint64 object_id); -DataSource* data_source_construct (GType object_type, - gint64 object_id); -void thumbnail_source_notify_thumbnail_altered (ThumbnailSource* self); -static void thumbnail_source_real_notify_thumbnail_altered (ThumbnailSource* self); -GType data_view_get_type (void) G_GNUC_CONST; -void data_source_contact_subscribers (DataSource* self, - DataSourceContactSubscriber contact_subscriber, - void* contact_subscriber_target); -static void thumbnail_source_subscriber_thumbnail_altered (ThumbnailSource* self, - DataView* view); -static void _thumbnail_source_subscriber_thumbnail_altered_data_source_contact_subscriber (DataView* view, - gpointer self); -GType thumbnail_view_get_type (void) G_GNUC_CONST; -void thumbnail_view_notify_thumbnail_altered (ThumbnailView* self); -GdkPixbuf* thumbnail_source_get_thumbnail (ThumbnailSource* self, - gint scale, - GError** error); -static GdkPixbuf* thumbnail_source_real_get_thumbnail (ThumbnailSource* self, - gint scale, - GError** error); -GdkPixbuf* thumbnail_source_create_thumbnail (ThumbnailSource* self, - gint scale, - GError** error); -static GdkPixbuf* thumbnail_source_real_create_thumbnail (ThumbnailSource* self, - gint scale, - GError** error); -gchar* thumbnail_source_get_representative_id (ThumbnailSource* self); -static gchar* thumbnail_source_real_get_representative_id (ThumbnailSource* self); -gchar* data_source_get_source_id (DataSource* self); -PhotoFileFormat thumbnail_source_get_preferred_thumbnail_format (ThumbnailSource* self); -static PhotoFileFormat thumbnail_source_real_get_preferred_thumbnail_format (ThumbnailSource* self); -static void thumbnail_source_real_thumbnail_altered (ThumbnailSource* self); -GType indexable_get_type (void) G_GNUC_CONST; -GType media_source_get_type (void) G_GNUC_CONST; -GType event_id_get_type (void) G_GNUC_CONST; -EventID* event_id_dup (const EventID* self); -void event_id_free (EventID* self); -gpointer backing_file_state_ref (gpointer instance); -void backing_file_state_unref (gpointer instance); -GParamSpec* param_spec_backing_file_state (const gchar* name, - const gchar* nick, - const gchar* blurb, - GType object_type, - GParamFlags flags); -void value_set_backing_file_state (GValue* value, - gpointer v_object); -void value_take_backing_file_state (GValue* value, - gpointer v_object); -gpointer value_get_backing_file_state (const GValue* value); -GType backing_file_state_get_type (void) G_GNUC_CONST; -GType rating_get_type (void) G_GNUC_CONST; -GType photo_exception_get_type (void) G_GNUC_CONST; -GType dimensions_get_type (void) G_GNUC_CONST; -Dimensions* dimensions_dup (const Dimensions* self); -void dimensions_free (Dimensions* self); -GType scaling_get_type (void) G_GNUC_CONST; -GType scale_constraint_get_type (void) G_GNUC_CONST; -Scaling* scaling_dup (const Scaling* self); -void scaling_free (Scaling* self); -GType import_id_get_type (void) G_GNUC_CONST; -ImportID* import_id_dup (const ImportID* self); -void import_id_free (ImportID* self); -GType photo_source_get_type (void) G_GNUC_CONST; -gpointer media_metadata_ref (gpointer instance); -void media_metadata_unref (gpointer instance); -GParamSpec* param_spec_media_metadata (const gchar* name, - const gchar* nick, - const gchar* blurb, - GType object_type, - GParamFlags flags); -void value_set_media_metadata (GValue* value, - gpointer v_object); -void value_take_media_metadata (GValue* value, - gpointer v_object); -gpointer value_get_media_metadata (const GValue* value); -GType media_metadata_get_type (void) G_GNUC_CONST; -GType photo_metadata_get_type (void) G_GNUC_CONST; -PhotoSource* photo_source_construct (GType object_type, - gint64 object_id); -MediaSource* media_source_construct (GType object_type, - gint64 object_id); -PhotoMetadata* photo_source_get_metadata (PhotoSource* self); -static PhotoMetadata* photo_source_real_get_metadata (PhotoSource* self); -GdkPixbuf* photo_source_get_pixbuf (PhotoSource* self, - Scaling* scaling, - GError** error); -static GdkPixbuf* photo_source_real_get_pixbuf (PhotoSource* self, - Scaling* scaling, - GError** error); -GType video_source_get_type (void) G_GNUC_CONST; -VideoSource* video_source_construct (GType object_type); -#define DATA_OBJECT_INVALID_OBJECT_ID ((gint64) -1) -GType event_source_get_type (void) G_GNUC_CONST; -EventSource* event_source_construct (GType object_type, - gint64 object_id); -time_t event_source_get_start_time (EventSource* self); -static time_t event_source_real_get_start_time (EventSource* self); -time_t event_source_get_end_time (EventSource* self); -static time_t event_source_real_get_end_time (EventSource* self); -guint64 event_source_get_total_filesize (EventSource* self); -static guint64 event_source_real_get_total_filesize (EventSource* self); -gint event_source_get_media_count (EventSource* self); -static gint event_source_real_get_media_count (EventSource* self); -GeeCollection* event_source_get_media (EventSource* self); -static GeeCollection* event_source_real_get_media (EventSource* self); -gchar* event_source_get_comment (EventSource* self); -static gchar* event_source_real_get_comment (EventSource* self); -gboolean event_source_set_comment (EventSource* self, - const gchar* comment); -static gboolean event_source_real_set_comment (EventSource* self, - const gchar* comment); -gpointer source_backlink_ref (gpointer instance); -void source_backlink_unref (gpointer instance); -GParamSpec* param_spec_source_backlink (const gchar* name, - const gchar* nick, - const gchar* blurb, - GType object_type, - GParamFlags flags); -void value_set_source_backlink (GValue* value, - gpointer v_object); -void value_take_source_backlink (GValue* value, - gpointer v_object); -gpointer value_get_source_backlink (const GValue* value); -GType source_backlink_get_type (void) G_GNUC_CONST; -GType container_source_get_type (void) G_GNUC_CONST; -gboolean container_source_has_links (ContainerSource* self); -SourceBacklink* container_source_get_backlink (ContainerSource* self); -void container_source_break_link (ContainerSource* self, - DataSource* source); -void container_source_break_link_many (ContainerSource* self, - GeeCollection* sources); -void container_source_establish_link (ContainerSource* self, - DataSource* source); -void container_source_establish_link_many (ContainerSource* self, - GeeCollection* sources); - - -ThumbnailSource* -thumbnail_source_construct (GType object_type, - gint64 object_id) -{ - ThumbnailSource * self = NULL; -#line 16 "/home/jens/Source/shotwell/src/core/DataSourceTypes.vala" - self = (ThumbnailSource*) data_source_construct (object_type, object_id); -#line 15 "/home/jens/Source/shotwell/src/core/DataSourceTypes.vala" - return self; -#line 687 "DataSourceTypes.c" -} - - -static void -_thumbnail_source_subscriber_thumbnail_altered_data_source_contact_subscriber (DataView* view, - gpointer self) -{ -#line 24 "/home/jens/Source/shotwell/src/core/DataSourceTypes.vala" - thumbnail_source_subscriber_thumbnail_altered ((ThumbnailSource*) self, view); -#line 697 "DataSourceTypes.c" -} - - -static void -thumbnail_source_real_notify_thumbnail_altered (ThumbnailSource* self) -{ -#line 21 "/home/jens/Source/shotwell/src/core/DataSourceTypes.vala" - g_signal_emit (self, thumbnail_source_signals[THUMBNAIL_SOURCE_THUMBNAIL_ALTERED_SIGNAL], 0); -#line 24 "/home/jens/Source/shotwell/src/core/DataSourceTypes.vala" - data_source_contact_subscribers (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_DATA_SOURCE, DataSource), _thumbnail_source_subscriber_thumbnail_altered_data_source_contact_subscriber, self); -#line 708 "DataSourceTypes.c" -} - - -void -thumbnail_source_notify_thumbnail_altered (ThumbnailSource* self) -{ -#line 19 "/home/jens/Source/shotwell/src/core/DataSourceTypes.vala" - g_return_if_fail (IS_THUMBNAIL_SOURCE (self)); -#line 19 "/home/jens/Source/shotwell/src/core/DataSourceTypes.vala" - THUMBNAIL_SOURCE_GET_CLASS (self)->notify_thumbnail_altered (self); -#line 719 "DataSourceTypes.c" -} - - -static void -thumbnail_source_subscriber_thumbnail_altered (ThumbnailSource* self, - DataView* view) -{ -#line 27 "/home/jens/Source/shotwell/src/core/DataSourceTypes.vala" - g_return_if_fail (IS_THUMBNAIL_SOURCE (self)); -#line 27 "/home/jens/Source/shotwell/src/core/DataSourceTypes.vala" - g_return_if_fail (IS_DATA_VIEW (view)); -#line 28 "/home/jens/Source/shotwell/src/core/DataSourceTypes.vala" - thumbnail_view_notify_thumbnail_altered (G_TYPE_CHECK_INSTANCE_CAST (view, TYPE_THUMBNAIL_VIEW, ThumbnailView)); -#line 733 "DataSourceTypes.c" -} - - -static GdkPixbuf* -thumbnail_source_real_get_thumbnail (ThumbnailSource* self, - gint scale, - GError** error) -{ -#line 31 "/home/jens/Source/shotwell/src/core/DataSourceTypes.vala" - g_critical ("Type `%s' does not implement abstract method `thumbnail_source_get_thumbnail'", g_type_name (G_TYPE_FROM_INSTANCE (self))); -#line 31 "/home/jens/Source/shotwell/src/core/DataSourceTypes.vala" - return NULL; -#line 746 "DataSourceTypes.c" -} - - -GdkPixbuf* -thumbnail_source_get_thumbnail (ThumbnailSource* self, - gint scale, - GError** error) -{ -#line 31 "/home/jens/Source/shotwell/src/core/DataSourceTypes.vala" - g_return_val_if_fail (IS_THUMBNAIL_SOURCE (self), NULL); -#line 31 "/home/jens/Source/shotwell/src/core/DataSourceTypes.vala" - return THUMBNAIL_SOURCE_GET_CLASS (self)->get_thumbnail (self, scale, error); -#line 759 "DataSourceTypes.c" -} - - -static GdkPixbuf* -thumbnail_source_real_create_thumbnail (ThumbnailSource* self, - gint scale, - GError** error) -{ -#line 35 "/home/jens/Source/shotwell/src/core/DataSourceTypes.vala" - g_critical ("Type `%s' does not implement abstract method `thumbnail_source_create_thumbnail'", g_type_name (G_TYPE_FROM_INSTANCE (self))); -#line 35 "/home/jens/Source/shotwell/src/core/DataSourceTypes.vala" - return NULL; -#line 772 "DataSourceTypes.c" -} - - -GdkPixbuf* -thumbnail_source_create_thumbnail (ThumbnailSource* self, - gint scale, - GError** error) -{ -#line 35 "/home/jens/Source/shotwell/src/core/DataSourceTypes.vala" - g_return_val_if_fail (IS_THUMBNAIL_SOURCE (self), NULL); -#line 35 "/home/jens/Source/shotwell/src/core/DataSourceTypes.vala" - return THUMBNAIL_SOURCE_GET_CLASS (self)->create_thumbnail (self, scale, error); -#line 785 "DataSourceTypes.c" -} - - -static gchar* -thumbnail_source_real_get_representative_id (ThumbnailSource* self) -{ - gchar* result = NULL; - gchar* _tmp0_; -#line 47 "/home/jens/Source/shotwell/src/core/DataSourceTypes.vala" - _tmp0_ = data_source_get_source_id (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_DATA_SOURCE, DataSource)); -#line 47 "/home/jens/Source/shotwell/src/core/DataSourceTypes.vala" - result = _tmp0_; -#line 47 "/home/jens/Source/shotwell/src/core/DataSourceTypes.vala" - return result; -#line 800 "DataSourceTypes.c" -} - - -gchar* -thumbnail_source_get_representative_id (ThumbnailSource* self) -{ -#line 46 "/home/jens/Source/shotwell/src/core/DataSourceTypes.vala" - g_return_val_if_fail (IS_THUMBNAIL_SOURCE (self), NULL); -#line 46 "/home/jens/Source/shotwell/src/core/DataSourceTypes.vala" - return THUMBNAIL_SOURCE_GET_CLASS (self)->get_representative_id (self); -#line 811 "DataSourceTypes.c" -} - - -static PhotoFileFormat -thumbnail_source_real_get_preferred_thumbnail_format (ThumbnailSource* self) -{ -#line 50 "/home/jens/Source/shotwell/src/core/DataSourceTypes.vala" - g_critical ("Type `%s' does not implement abstract method `thumbnail_source_get_preferred_thumbnail_format'", g_type_name (G_TYPE_FROM_INSTANCE (self))); -#line 50 "/home/jens/Source/shotwell/src/core/DataSourceTypes.vala" - return 0; -#line 822 "DataSourceTypes.c" -} - - -PhotoFileFormat -thumbnail_source_get_preferred_thumbnail_format (ThumbnailSource* self) -{ -#line 50 "/home/jens/Source/shotwell/src/core/DataSourceTypes.vala" - g_return_val_if_fail (IS_THUMBNAIL_SOURCE (self), 0); -#line 50 "/home/jens/Source/shotwell/src/core/DataSourceTypes.vala" - return THUMBNAIL_SOURCE_GET_CLASS (self)->get_preferred_thumbnail_format (self); -#line 833 "DataSourceTypes.c" -} - - -static void -thumbnail_source_real_thumbnail_altered (ThumbnailSource* self) -{ -} - - -static void -thumbnail_source_class_init (ThumbnailSourceClass * klass) -{ -#line 11 "/home/jens/Source/shotwell/src/core/DataSourceTypes.vala" - thumbnail_source_parent_class = g_type_class_peek_parent (klass); -#line 11 "/home/jens/Source/shotwell/src/core/DataSourceTypes.vala" - ((ThumbnailSourceClass *) klass)->notify_thumbnail_altered = (void (*) (ThumbnailSource *)) thumbnail_source_real_notify_thumbnail_altered; -#line 11 "/home/jens/Source/shotwell/src/core/DataSourceTypes.vala" - ((ThumbnailSourceClass *) klass)->get_thumbnail = (GdkPixbuf* (*) (ThumbnailSource *, gint, GError**)) thumbnail_source_real_get_thumbnail; -#line 11 "/home/jens/Source/shotwell/src/core/DataSourceTypes.vala" - ((ThumbnailSourceClass *) klass)->create_thumbnail = (GdkPixbuf* (*) (ThumbnailSource *, gint, GError**)) thumbnail_source_real_create_thumbnail; -#line 11 "/home/jens/Source/shotwell/src/core/DataSourceTypes.vala" - ((ThumbnailSourceClass *) klass)->get_representative_id = (gchar* (*) (ThumbnailSource *)) thumbnail_source_real_get_representative_id; -#line 11 "/home/jens/Source/shotwell/src/core/DataSourceTypes.vala" - ((ThumbnailSourceClass *) klass)->get_preferred_thumbnail_format = (PhotoFileFormat (*) (ThumbnailSource *)) thumbnail_source_real_get_preferred_thumbnail_format; -#line 11 "/home/jens/Source/shotwell/src/core/DataSourceTypes.vala" - ((ThumbnailSourceClass *) klass)->thumbnail_altered = thumbnail_source_real_thumbnail_altered; -#line 11 "/home/jens/Source/shotwell/src/core/DataSourceTypes.vala" - thumbnail_source_signals[THUMBNAIL_SOURCE_THUMBNAIL_ALTERED_SIGNAL] = g_signal_new ("thumbnail-altered", TYPE_THUMBNAIL_SOURCE, G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET (ThumbnailSourceClass, thumbnail_altered), NULL, NULL, g_cclosure_marshal_VOID__VOID, G_TYPE_NONE, 0); -#line 862 "DataSourceTypes.c" -} - - -static void -thumbnail_source_instance_init (ThumbnailSource * self) -{ -} - - -GType -thumbnail_source_get_type (void) -{ - static volatile gsize thumbnail_source_type_id__volatile = 0; - if (g_once_init_enter (&thumbnail_source_type_id__volatile)) { - static const GTypeInfo g_define_type_info = { sizeof (ThumbnailSourceClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) thumbnail_source_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (ThumbnailSource), 0, (GInstanceInitFunc) thumbnail_source_instance_init, NULL }; - GType thumbnail_source_type_id; - thumbnail_source_type_id = g_type_register_static (TYPE_DATA_SOURCE, "ThumbnailSource", &g_define_type_info, G_TYPE_FLAG_ABSTRACT); - g_once_init_leave (&thumbnail_source_type_id__volatile, thumbnail_source_type_id); - } - return thumbnail_source_type_id__volatile; -} - - -PhotoSource* -photo_source_construct (GType object_type, - gint64 object_id) -{ - PhotoSource * self = NULL; -#line 55 "/home/jens/Source/shotwell/src/core/DataSourceTypes.vala" - self = (PhotoSource*) media_source_construct (object_type, object_id); -#line 54 "/home/jens/Source/shotwell/src/core/DataSourceTypes.vala" - return self; -#line 895 "DataSourceTypes.c" -} - - -static PhotoMetadata* -photo_source_real_get_metadata (PhotoSource* self) -{ -#line 58 "/home/jens/Source/shotwell/src/core/DataSourceTypes.vala" - g_critical ("Type `%s' does not implement abstract method `photo_source_get_metadata'", g_type_name (G_TYPE_FROM_INSTANCE (self))); -#line 58 "/home/jens/Source/shotwell/src/core/DataSourceTypes.vala" - return NULL; -#line 906 "DataSourceTypes.c" -} - - -PhotoMetadata* -photo_source_get_metadata (PhotoSource* self) -{ -#line 58 "/home/jens/Source/shotwell/src/core/DataSourceTypes.vala" - g_return_val_if_fail (IS_PHOTO_SOURCE (self), NULL); -#line 58 "/home/jens/Source/shotwell/src/core/DataSourceTypes.vala" - return PHOTO_SOURCE_GET_CLASS (self)->get_metadata (self); -#line 917 "DataSourceTypes.c" -} - - -static GdkPixbuf* -photo_source_real_get_pixbuf (PhotoSource* self, - Scaling* scaling, - GError** error) -{ -#line 60 "/home/jens/Source/shotwell/src/core/DataSourceTypes.vala" - g_critical ("Type `%s' does not implement abstract method `photo_source_get_pixbuf'", g_type_name (G_TYPE_FROM_INSTANCE (self))); -#line 60 "/home/jens/Source/shotwell/src/core/DataSourceTypes.vala" - return NULL; -#line 930 "DataSourceTypes.c" -} - - -GdkPixbuf* -photo_source_get_pixbuf (PhotoSource* self, - Scaling* scaling, - GError** error) -{ -#line 60 "/home/jens/Source/shotwell/src/core/DataSourceTypes.vala" - g_return_val_if_fail (IS_PHOTO_SOURCE (self), NULL); -#line 60 "/home/jens/Source/shotwell/src/core/DataSourceTypes.vala" - return PHOTO_SOURCE_GET_CLASS (self)->get_pixbuf (self, scaling, error); -#line 943 "DataSourceTypes.c" -} - - -static void -photo_source_class_init (PhotoSourceClass * klass) -{ -#line 53 "/home/jens/Source/shotwell/src/core/DataSourceTypes.vala" - photo_source_parent_class = g_type_class_peek_parent (klass); -#line 53 "/home/jens/Source/shotwell/src/core/DataSourceTypes.vala" - ((PhotoSourceClass *) klass)->get_metadata = (PhotoMetadata* (*) (PhotoSource *)) photo_source_real_get_metadata; -#line 53 "/home/jens/Source/shotwell/src/core/DataSourceTypes.vala" - ((PhotoSourceClass *) klass)->get_pixbuf = (GdkPixbuf* (*) (PhotoSource *, Scaling*, GError**)) photo_source_real_get_pixbuf; -#line 956 "DataSourceTypes.c" -} - - -static void -photo_source_instance_init (PhotoSource * self) -{ -} - - -GType -photo_source_get_type (void) -{ - static volatile gsize photo_source_type_id__volatile = 0; - if (g_once_init_enter (&photo_source_type_id__volatile)) { - static const GTypeInfo g_define_type_info = { sizeof (PhotoSourceClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) photo_source_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (PhotoSource), 0, (GInstanceInitFunc) photo_source_instance_init, NULL }; - GType photo_source_type_id; - photo_source_type_id = g_type_register_static (TYPE_MEDIA_SOURCE, "PhotoSource", &g_define_type_info, G_TYPE_FLAG_ABSTRACT); - g_once_init_leave (&photo_source_type_id__volatile, photo_source_type_id); - } - return photo_source_type_id__volatile; -} - - -VideoSource* -video_source_construct (GType object_type) -{ - VideoSource * self = NULL; -#line 63 "/home/jens/Source/shotwell/src/core/DataSourceTypes.vala" - self = (VideoSource*) media_source_construct (object_type, DATA_OBJECT_INVALID_OBJECT_ID); -#line 63 "/home/jens/Source/shotwell/src/core/DataSourceTypes.vala" - return self; -#line 988 "DataSourceTypes.c" -} - - -static void -video_source_class_init (VideoSourceClass * klass) -{ -#line 63 "/home/jens/Source/shotwell/src/core/DataSourceTypes.vala" - video_source_parent_class = g_type_class_peek_parent (klass); -#line 997 "DataSourceTypes.c" -} - - -static void -video_source_instance_init (VideoSource * self) -{ -} - - -GType -video_source_get_type (void) -{ - static volatile gsize video_source_type_id__volatile = 0; - if (g_once_init_enter (&video_source_type_id__volatile)) { - static const GTypeInfo g_define_type_info = { sizeof (VideoSourceClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) video_source_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (VideoSource), 0, (GInstanceInitFunc) video_source_instance_init, NULL }; - GType video_source_type_id; - video_source_type_id = g_type_register_static (TYPE_MEDIA_SOURCE, "VideoSource", &g_define_type_info, G_TYPE_FLAG_ABSTRACT); - g_once_init_leave (&video_source_type_id__volatile, video_source_type_id); - } - return video_source_type_id__volatile; -} - - -EventSource* -event_source_construct (GType object_type, - gint64 object_id) -{ - EventSource * self = NULL; -#line 72 "/home/jens/Source/shotwell/src/core/DataSourceTypes.vala" - self = (EventSource*) thumbnail_source_construct (object_type, object_id); -#line 71 "/home/jens/Source/shotwell/src/core/DataSourceTypes.vala" - return self; -#line 1030 "DataSourceTypes.c" -} - - -static time_t -event_source_real_get_start_time (EventSource* self) -{ - time_t _tmp0_ = 0; -#line 75 "/home/jens/Source/shotwell/src/core/DataSourceTypes.vala" - g_critical ("Type `%s' does not implement abstract method `event_source_get_start_time'", g_type_name (G_TYPE_FROM_INSTANCE (self))); -#line 75 "/home/jens/Source/shotwell/src/core/DataSourceTypes.vala" - return _tmp0_; -#line 1042 "DataSourceTypes.c" -} - - -time_t -event_source_get_start_time (EventSource* self) -{ -#line 75 "/home/jens/Source/shotwell/src/core/DataSourceTypes.vala" - g_return_val_if_fail (IS_EVENT_SOURCE (self), 0); -#line 75 "/home/jens/Source/shotwell/src/core/DataSourceTypes.vala" - return EVENT_SOURCE_GET_CLASS (self)->get_start_time (self); -#line 1053 "DataSourceTypes.c" -} - - -static time_t -event_source_real_get_end_time (EventSource* self) -{ - time_t _tmp0_ = 0; -#line 77 "/home/jens/Source/shotwell/src/core/DataSourceTypes.vala" - g_critical ("Type `%s' does not implement abstract method `event_source_get_end_time'", g_type_name (G_TYPE_FROM_INSTANCE (self))); -#line 77 "/home/jens/Source/shotwell/src/core/DataSourceTypes.vala" - return _tmp0_; -#line 1065 "DataSourceTypes.c" -} - - -time_t -event_source_get_end_time (EventSource* self) -{ -#line 77 "/home/jens/Source/shotwell/src/core/DataSourceTypes.vala" - g_return_val_if_fail (IS_EVENT_SOURCE (self), 0); -#line 77 "/home/jens/Source/shotwell/src/core/DataSourceTypes.vala" - return EVENT_SOURCE_GET_CLASS (self)->get_end_time (self); -#line 1076 "DataSourceTypes.c" -} - - -static guint64 -event_source_real_get_total_filesize (EventSource* self) -{ - guint64 _tmp0_ = 0ULL; -#line 79 "/home/jens/Source/shotwell/src/core/DataSourceTypes.vala" - g_critical ("Type `%s' does not implement abstract method `event_source_get_total_filesize'", g_type_name (G_TYPE_FROM_INSTANCE (self))); -#line 79 "/home/jens/Source/shotwell/src/core/DataSourceTypes.vala" - return _tmp0_; -#line 1088 "DataSourceTypes.c" -} - - -guint64 -event_source_get_total_filesize (EventSource* self) -{ -#line 79 "/home/jens/Source/shotwell/src/core/DataSourceTypes.vala" - g_return_val_if_fail (IS_EVENT_SOURCE (self), 0ULL); -#line 79 "/home/jens/Source/shotwell/src/core/DataSourceTypes.vala" - return EVENT_SOURCE_GET_CLASS (self)->get_total_filesize (self); -#line 1099 "DataSourceTypes.c" -} - - -static gint -event_source_real_get_media_count (EventSource* self) -{ - gint _tmp0_ = 0; -#line 81 "/home/jens/Source/shotwell/src/core/DataSourceTypes.vala" - g_critical ("Type `%s' does not implement abstract method `event_source_get_media_count'", g_type_name (G_TYPE_FROM_INSTANCE (self))); -#line 81 "/home/jens/Source/shotwell/src/core/DataSourceTypes.vala" - return _tmp0_; -#line 1111 "DataSourceTypes.c" -} - - -gint -event_source_get_media_count (EventSource* self) -{ -#line 81 "/home/jens/Source/shotwell/src/core/DataSourceTypes.vala" - g_return_val_if_fail (IS_EVENT_SOURCE (self), 0); -#line 81 "/home/jens/Source/shotwell/src/core/DataSourceTypes.vala" - return EVENT_SOURCE_GET_CLASS (self)->get_media_count (self); -#line 1122 "DataSourceTypes.c" -} - - -static GeeCollection* -event_source_real_get_media (EventSource* self) -{ -#line 83 "/home/jens/Source/shotwell/src/core/DataSourceTypes.vala" - g_critical ("Type `%s' does not implement abstract method `event_source_get_media'", g_type_name (G_TYPE_FROM_INSTANCE (self))); -#line 83 "/home/jens/Source/shotwell/src/core/DataSourceTypes.vala" - return NULL; -#line 1133 "DataSourceTypes.c" -} - - -GeeCollection* -event_source_get_media (EventSource* self) -{ -#line 83 "/home/jens/Source/shotwell/src/core/DataSourceTypes.vala" - g_return_val_if_fail (IS_EVENT_SOURCE (self), NULL); -#line 83 "/home/jens/Source/shotwell/src/core/DataSourceTypes.vala" - return EVENT_SOURCE_GET_CLASS (self)->get_media (self); -#line 1144 "DataSourceTypes.c" -} - - -static gchar* -event_source_real_get_comment (EventSource* self) -{ -#line 85 "/home/jens/Source/shotwell/src/core/DataSourceTypes.vala" - g_critical ("Type `%s' does not implement abstract method `event_source_get_comment'", g_type_name (G_TYPE_FROM_INSTANCE (self))); -#line 85 "/home/jens/Source/shotwell/src/core/DataSourceTypes.vala" - return NULL; -#line 1155 "DataSourceTypes.c" -} - - -gchar* -event_source_get_comment (EventSource* self) -{ -#line 85 "/home/jens/Source/shotwell/src/core/DataSourceTypes.vala" - g_return_val_if_fail (IS_EVENT_SOURCE (self), NULL); -#line 85 "/home/jens/Source/shotwell/src/core/DataSourceTypes.vala" - return EVENT_SOURCE_GET_CLASS (self)->get_comment (self); -#line 1166 "DataSourceTypes.c" -} - - -static gboolean -event_source_real_set_comment (EventSource* self, - const gchar* comment) -{ - gboolean _tmp0_ = FALSE; -#line 87 "/home/jens/Source/shotwell/src/core/DataSourceTypes.vala" - g_critical ("Type `%s' does not implement abstract method `event_source_set_comment'", g_type_name (G_TYPE_FROM_INSTANCE (self))); -#line 87 "/home/jens/Source/shotwell/src/core/DataSourceTypes.vala" - return _tmp0_; -#line 1179 "DataSourceTypes.c" -} - - -gboolean -event_source_set_comment (EventSource* self, - const gchar* comment) -{ -#line 87 "/home/jens/Source/shotwell/src/core/DataSourceTypes.vala" - g_return_val_if_fail (IS_EVENT_SOURCE (self), FALSE); -#line 87 "/home/jens/Source/shotwell/src/core/DataSourceTypes.vala" - return EVENT_SOURCE_GET_CLASS (self)->set_comment (self, comment); -#line 1191 "DataSourceTypes.c" -} - - -static void -event_source_class_init (EventSourceClass * klass) -{ -#line 70 "/home/jens/Source/shotwell/src/core/DataSourceTypes.vala" - event_source_parent_class = g_type_class_peek_parent (klass); -#line 70 "/home/jens/Source/shotwell/src/core/DataSourceTypes.vala" - ((EventSourceClass *) klass)->get_start_time = (time_t (*) (EventSource *)) event_source_real_get_start_time; -#line 70 "/home/jens/Source/shotwell/src/core/DataSourceTypes.vala" - ((EventSourceClass *) klass)->get_end_time = (time_t (*) (EventSource *)) event_source_real_get_end_time; -#line 70 "/home/jens/Source/shotwell/src/core/DataSourceTypes.vala" - ((EventSourceClass *) klass)->get_total_filesize = (guint64 (*) (EventSource *)) event_source_real_get_total_filesize; -#line 70 "/home/jens/Source/shotwell/src/core/DataSourceTypes.vala" - ((EventSourceClass *) klass)->get_media_count = (gint (*) (EventSource *)) event_source_real_get_media_count; -#line 70 "/home/jens/Source/shotwell/src/core/DataSourceTypes.vala" - ((EventSourceClass *) klass)->get_media = (GeeCollection* (*) (EventSource *)) event_source_real_get_media; -#line 70 "/home/jens/Source/shotwell/src/core/DataSourceTypes.vala" - ((EventSourceClass *) klass)->get_comment = (gchar* (*) (EventSource *)) event_source_real_get_comment; -#line 70 "/home/jens/Source/shotwell/src/core/DataSourceTypes.vala" - ((EventSourceClass *) klass)->set_comment = (gboolean (*) (EventSource *, const gchar*)) event_source_real_set_comment; -#line 1214 "DataSourceTypes.c" -} - - -static void -event_source_instance_init (EventSource * self) -{ -} - - -GType -event_source_get_type (void) -{ - static volatile gsize event_source_type_id__volatile = 0; - if (g_once_init_enter (&event_source_type_id__volatile)) { - static const GTypeInfo g_define_type_info = { sizeof (EventSourceClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) event_source_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (EventSource), 0, (GInstanceInitFunc) event_source_instance_init, NULL }; - GType event_source_type_id; - event_source_type_id = g_type_register_static (TYPE_THUMBNAIL_SOURCE, "EventSource", &g_define_type_info, G_TYPE_FLAG_ABSTRACT); - g_once_init_leave (&event_source_type_id__volatile, event_source_type_id); - } - return event_source_type_id__volatile; -} - - -gboolean -container_source_has_links (ContainerSource* self) -{ -#line 95 "/home/jens/Source/shotwell/src/core/DataSourceTypes.vala" - g_return_val_if_fail (IS_CONTAINER_SOURCE (self), FALSE); -#line 95 "/home/jens/Source/shotwell/src/core/DataSourceTypes.vala" - return CONTAINER_SOURCE_GET_INTERFACE (self)->has_links (self); -#line 1245 "DataSourceTypes.c" -} - - -SourceBacklink* -container_source_get_backlink (ContainerSource* self) -{ -#line 97 "/home/jens/Source/shotwell/src/core/DataSourceTypes.vala" - g_return_val_if_fail (IS_CONTAINER_SOURCE (self), NULL); -#line 97 "/home/jens/Source/shotwell/src/core/DataSourceTypes.vala" - return CONTAINER_SOURCE_GET_INTERFACE (self)->get_backlink (self); -#line 1256 "DataSourceTypes.c" -} - - -void -container_source_break_link (ContainerSource* self, - DataSource* source) -{ -#line 99 "/home/jens/Source/shotwell/src/core/DataSourceTypes.vala" - g_return_if_fail (IS_CONTAINER_SOURCE (self)); -#line 99 "/home/jens/Source/shotwell/src/core/DataSourceTypes.vala" - CONTAINER_SOURCE_GET_INTERFACE (self)->break_link (self, source); -#line 1268 "DataSourceTypes.c" -} - - -void -container_source_break_link_many (ContainerSource* self, - GeeCollection* sources) -{ -#line 101 "/home/jens/Source/shotwell/src/core/DataSourceTypes.vala" - g_return_if_fail (IS_CONTAINER_SOURCE (self)); -#line 101 "/home/jens/Source/shotwell/src/core/DataSourceTypes.vala" - CONTAINER_SOURCE_GET_INTERFACE (self)->break_link_many (self, sources); -#line 1280 "DataSourceTypes.c" -} - - -void -container_source_establish_link (ContainerSource* self, - DataSource* source) -{ -#line 103 "/home/jens/Source/shotwell/src/core/DataSourceTypes.vala" - g_return_if_fail (IS_CONTAINER_SOURCE (self)); -#line 103 "/home/jens/Source/shotwell/src/core/DataSourceTypes.vala" - CONTAINER_SOURCE_GET_INTERFACE (self)->establish_link (self, source); -#line 1292 "DataSourceTypes.c" -} - - -void -container_source_establish_link_many (ContainerSource* self, - GeeCollection* sources) -{ -#line 105 "/home/jens/Source/shotwell/src/core/DataSourceTypes.vala" - g_return_if_fail (IS_CONTAINER_SOURCE (self)); -#line 105 "/home/jens/Source/shotwell/src/core/DataSourceTypes.vala" - CONTAINER_SOURCE_GET_INTERFACE (self)->establish_link_many (self, sources); -#line 1304 "DataSourceTypes.c" -} - - -static void -container_source_base_init (ContainerSourceIface * iface) -{ -#line 94 "/home/jens/Source/shotwell/src/core/DataSourceTypes.vala" - static gboolean initialized = FALSE; -#line 94 "/home/jens/Source/shotwell/src/core/DataSourceTypes.vala" - if (!initialized) { -#line 94 "/home/jens/Source/shotwell/src/core/DataSourceTypes.vala" - initialized = TRUE; -#line 1317 "DataSourceTypes.c" - } -} - - -GType -container_source_get_type (void) -{ - static volatile gsize container_source_type_id__volatile = 0; - if (g_once_init_enter (&container_source_type_id__volatile)) { - static const GTypeInfo g_define_type_info = { sizeof (ContainerSourceIface), (GBaseInitFunc) container_source_base_init, (GBaseFinalizeFunc) NULL, (GClassInitFunc) NULL, (GClassFinalizeFunc) NULL, NULL, 0, 0, (GInstanceInitFunc) NULL, NULL }; - GType container_source_type_id; - container_source_type_id = g_type_register_static (G_TYPE_INTERFACE, "ContainerSource", &g_define_type_info, 0); - g_type_interface_add_prerequisite (container_source_type_id, TYPE_DATA_SOURCE); - g_once_init_leave (&container_source_type_id__volatile, container_source_type_id); - } - return container_source_type_id__volatile; -} - - - diff --git a/src/core/DataView.c b/src/core/DataView.c deleted file mode 100644 index 7267434..0000000 --- a/src/core/DataView.c +++ /dev/null @@ -1,745 +0,0 @@ -/* DataView.c generated by valac 0.40.4, the Vala compiler - * generated from DataView.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> - - -#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; -typedef struct _DataObjectPrivate DataObjectPrivate; - -#define TYPE_ALTERATION (alteration_get_type ()) -#define ALTERATION(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_ALTERATION, Alteration)) -#define ALTERATION_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_ALTERATION, AlterationClass)) -#define IS_ALTERATION(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_ALTERATION)) -#define IS_ALTERATION_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_ALTERATION)) -#define ALTERATION_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_ALTERATION, AlterationClass)) - -typedef struct _Alteration Alteration; -typedef struct _AlterationClass AlterationClass; - -#define TYPE_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_DATA_VIEW (data_view_get_type ()) -#define DATA_VIEW(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_DATA_VIEW, DataView)) -#define DATA_VIEW_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_DATA_VIEW, DataViewClass)) -#define IS_DATA_VIEW(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_DATA_VIEW)) -#define IS_DATA_VIEW_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_DATA_VIEW)) -#define DATA_VIEW_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_DATA_VIEW, DataViewClass)) - -typedef struct _DataView DataView; -typedef struct _DataViewClass DataViewClass; -typedef struct _DataViewPrivate DataViewPrivate; - -#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; -enum { - DATA_VIEW_0_PROPERTY, - DATA_VIEW_NUM_PROPERTIES -}; -static GParamSpec* data_view_properties[DATA_VIEW_NUM_PROPERTIES]; -#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL))) -#define _g_free0(var) (var = (g_free (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 _data_collection_unref0(var) ((var == NULL) ? NULL : (var = (data_collection_unref (var), NULL))) -enum { - DATA_VIEW_STATE_CHANGED_SIGNAL, - DATA_VIEW_VISIBILITY_CHANGED_SIGNAL, - DATA_VIEW_VIEW_ALTERED_SIGNAL, - DATA_VIEW_GEOMETRY_ALTERED_SIGNAL, - DATA_VIEW_UNSUBSCRIBED_SIGNAL, - DATA_VIEW_NUM_SIGNALS -}; -static guint data_view_signals[DATA_VIEW_NUM_SIGNALS] = {0}; - -struct _DataObject { - GObject parent_instance; - DataObjectPrivate * priv; -}; - -struct _DataObjectClass { - GObjectClass parent_class; - void (*notify_altered) (DataObject* self, Alteration* alteration); - void (*notify_membership_changed) (DataObject* self, DataCollection* collection); - void (*notify_collection_property_set) (DataObject* self, const gchar* name, GValue* old, GValue* val); - void (*notify_collection_property_cleared) (DataObject* self, const gchar* name); - gchar* (*get_name) (DataObject* self); - gchar* (*to_string) (DataObject* self); -}; - -struct _DataView { - DataObject parent_instance; - DataViewPrivate * priv; -}; - -struct _DataViewClass { - DataObjectClass parent_class; - void (*notify_view_altered) (DataView* self); - void (*notify_geometry_altered) (DataView* self); - void (*notify_unsubscribed) (DataView* self, DataSource* source); - void (*state_changed) (DataView* self, gboolean selected); - void (*visibility_changed) (DataView* self, gboolean visible); - void (*view_altered) (DataView* self); - void (*geometry_altered) (DataView* self); - void (*unsubscribed) (DataView* self, DataSource* source); -}; - -struct _DataViewPrivate { - DataSource* source; - gboolean selected; - gboolean visible; -}; - - -static gpointer data_view_parent_class = NULL; - -GType data_object_get_type (void) G_GNUC_CONST; -gpointer alteration_ref (gpointer instance); -void alteration_unref (gpointer instance); -GParamSpec* param_spec_alteration (const gchar* name, - const gchar* nick, - const gchar* blurb, - GType object_type, - GParamFlags flags); -void value_set_alteration (GValue* value, - gpointer v_object); -void value_take_alteration (GValue* value, - gpointer v_object); -gpointer value_get_alteration (const GValue* value); -GType alteration_get_type (void) G_GNUC_CONST; -gpointer data_collection_ref (gpointer instance); -void data_collection_unref (gpointer instance); -GParamSpec* param_spec_data_collection (const gchar* name, - const gchar* nick, - const gchar* blurb, - GType object_type, - GParamFlags flags); -void value_set_data_collection (GValue* value, - gpointer v_object); -void value_take_data_collection (GValue* value, - gpointer v_object); -gpointer value_get_data_collection (const GValue* value); -GType data_collection_get_type (void) G_GNUC_CONST; -GType data_view_get_type (void) G_GNUC_CONST; -GType data_source_get_type (void) G_GNUC_CONST; -#define DATA_VIEW_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), TYPE_DATA_VIEW, DataViewPrivate)) -void data_source_internal_unsubscribe (DataSource* self, - DataView* view); -DataView* data_view_new (DataSource* source); -DataView* data_view_construct (GType object_type, - DataSource* source); -#define DATA_OBJECT_INVALID_OBJECT_ID ((gint64) -1) -DataObject* data_object_construct (GType object_type, - gint64 object_id); -void data_source_internal_subscribe (DataSource* self, - DataView* view); -static gchar* data_view_real_get_name (DataObject* base); -gchar* data_object_get_name (DataObject* self); -static gchar* data_view_real_to_string (DataObject* base); -gchar* data_object_to_string (DataObject* self); -DataSource* data_view_get_source (DataView* self); -gboolean data_view_is_selected (DataView* self); -void data_view_internal_set_selected (DataView* self, - gboolean selected); -gboolean data_view_internal_toggle (DataView* self); -gboolean data_view_is_visible (DataView* self); -void data_view_internal_set_visible (DataView* self, - gboolean visible); -void data_view_notify_view_altered (DataView* self); -static void data_view_real_notify_view_altered (DataView* self); -GType view_collection_get_type (void) G_GNUC_CONST; -DataCollection* data_object_get_membership (DataObject* self); -gboolean data_collection_are_notifications_frozen (DataCollection* self); -void view_collection_internal_notify_view_altered (ViewCollection* self, - DataView* view); -void data_view_notify_geometry_altered (DataView* self); -static void data_view_real_notify_geometry_altered (DataView* self); -void view_collection_internal_notify_geometry_altered (ViewCollection* self, - DataView* view); -void data_view_notify_unsubscribed (DataView* self, - DataSource* source); -static void data_view_real_notify_unsubscribed (DataView* self, - DataSource* source); -static void data_view_real_state_changed (DataView* self, - gboolean selected); -static void data_view_real_visibility_changed (DataView* self, - gboolean visible); -static void data_view_real_view_altered (DataView* self); -static void data_view_real_geometry_altered (DataView* self); -static void data_view_real_unsubscribed (DataView* self, - DataSource* source); -static void data_view_finalize (GObject * obj); - - -static gpointer -_g_object_ref0 (gpointer self) -{ -#line 33 "/home/jens/Source/shotwell/src/core/DataView.vala" - return self ? g_object_ref (self) : NULL; -#line 221 "DataView.c" -} - - -DataView* -data_view_construct (GType object_type, - DataSource* source) -{ - DataView * self = NULL; - DataSource* _tmp0_; -#line 32 "/home/jens/Source/shotwell/src/core/DataView.vala" - g_return_val_if_fail (IS_DATA_SOURCE (source), NULL); -#line 32 "/home/jens/Source/shotwell/src/core/DataView.vala" - self = (DataView*) data_object_construct (object_type, DATA_OBJECT_INVALID_OBJECT_ID); -#line 33 "/home/jens/Source/shotwell/src/core/DataView.vala" - _tmp0_ = _g_object_ref0 (source); -#line 33 "/home/jens/Source/shotwell/src/core/DataView.vala" - _g_object_unref0 (self->priv->source); -#line 33 "/home/jens/Source/shotwell/src/core/DataView.vala" - self->priv->source = _tmp0_; -#line 37 "/home/jens/Source/shotwell/src/core/DataView.vala" - data_source_internal_subscribe (source, self); -#line 32 "/home/jens/Source/shotwell/src/core/DataView.vala" - return self; -#line 245 "DataView.c" -} - - -DataView* -data_view_new (DataSource* source) -{ -#line 32 "/home/jens/Source/shotwell/src/core/DataView.vala" - return data_view_construct (TYPE_DATA_VIEW, source); -#line 254 "DataView.c" -} - - -static gchar* -data_view_real_get_name (DataObject* base) -{ - DataView * self; - gchar* result = NULL; - DataSource* _tmp0_; - gchar* _tmp1_; - gchar* _tmp2_; - gchar* _tmp3_; - gchar* _tmp4_; -#line 47 "/home/jens/Source/shotwell/src/core/DataView.vala" - self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_DATA_VIEW, DataView); -#line 48 "/home/jens/Source/shotwell/src/core/DataView.vala" - _tmp0_ = self->priv->source; -#line 48 "/home/jens/Source/shotwell/src/core/DataView.vala" - _tmp1_ = data_object_get_name (G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, TYPE_DATA_OBJECT, DataObject)); -#line 48 "/home/jens/Source/shotwell/src/core/DataView.vala" - _tmp2_ = _tmp1_; -#line 48 "/home/jens/Source/shotwell/src/core/DataView.vala" - _tmp3_ = g_strdup_printf ("View of %s", _tmp2_); -#line 48 "/home/jens/Source/shotwell/src/core/DataView.vala" - _tmp4_ = _tmp3_; -#line 48 "/home/jens/Source/shotwell/src/core/DataView.vala" - _g_free0 (_tmp2_); -#line 48 "/home/jens/Source/shotwell/src/core/DataView.vala" - result = _tmp4_; -#line 48 "/home/jens/Source/shotwell/src/core/DataView.vala" - return result; -#line 286 "DataView.c" -} - - -static gchar* -data_view_real_to_string (DataObject* base) -{ - DataView * self; - gchar* result = NULL; - gchar* _tmp0_; - gchar* _tmp1_; - DataSource* _tmp2_; - gchar* _tmp3_; - gchar* _tmp4_; - gchar* _tmp5_; - gchar* _tmp6_; -#line 51 "/home/jens/Source/shotwell/src/core/DataView.vala" - self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_DATA_VIEW, DataView); -#line 52 "/home/jens/Source/shotwell/src/core/DataView.vala" - _tmp0_ = data_object_get_name (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_DATA_OBJECT, DataObject)); -#line 52 "/home/jens/Source/shotwell/src/core/DataView.vala" - _tmp1_ = _tmp0_; -#line 52 "/home/jens/Source/shotwell/src/core/DataView.vala" - _tmp2_ = self->priv->source; -#line 52 "/home/jens/Source/shotwell/src/core/DataView.vala" - _tmp3_ = data_object_to_string (G_TYPE_CHECK_INSTANCE_CAST (_tmp2_, TYPE_DATA_OBJECT, DataObject)); -#line 52 "/home/jens/Source/shotwell/src/core/DataView.vala" - _tmp4_ = _tmp3_; -#line 52 "/home/jens/Source/shotwell/src/core/DataView.vala" - _tmp5_ = g_strdup_printf ("DataView %s [DataSource %s]", _tmp1_, _tmp4_); -#line 52 "/home/jens/Source/shotwell/src/core/DataView.vala" - _tmp6_ = _tmp5_; -#line 52 "/home/jens/Source/shotwell/src/core/DataView.vala" - _g_free0 (_tmp4_); -#line 52 "/home/jens/Source/shotwell/src/core/DataView.vala" - _g_free0 (_tmp1_); -#line 52 "/home/jens/Source/shotwell/src/core/DataView.vala" - result = _tmp6_; -#line 52 "/home/jens/Source/shotwell/src/core/DataView.vala" - return result; -#line 326 "DataView.c" -} - - -DataSource* -data_view_get_source (DataView* self) -{ - DataSource* result = NULL; - DataSource* _tmp0_; - DataSource* _tmp1_; -#line 55 "/home/jens/Source/shotwell/src/core/DataView.vala" - g_return_val_if_fail (IS_DATA_VIEW (self), NULL); -#line 56 "/home/jens/Source/shotwell/src/core/DataView.vala" - _tmp0_ = self->priv->source; -#line 56 "/home/jens/Source/shotwell/src/core/DataView.vala" - _tmp1_ = _g_object_ref0 (_tmp0_); -#line 56 "/home/jens/Source/shotwell/src/core/DataView.vala" - result = _tmp1_; -#line 56 "/home/jens/Source/shotwell/src/core/DataView.vala" - return result; -#line 346 "DataView.c" -} - - -gboolean -data_view_is_selected (DataView* self) -{ - gboolean result = FALSE; - gboolean _tmp0_; -#line 59 "/home/jens/Source/shotwell/src/core/DataView.vala" - g_return_val_if_fail (IS_DATA_VIEW (self), FALSE); -#line 60 "/home/jens/Source/shotwell/src/core/DataView.vala" - _tmp0_ = self->priv->selected; -#line 60 "/home/jens/Source/shotwell/src/core/DataView.vala" - result = _tmp0_; -#line 60 "/home/jens/Source/shotwell/src/core/DataView.vala" - return result; -#line 363 "DataView.c" -} - - -void -data_view_internal_set_selected (DataView* self, - gboolean selected) -{ - gboolean _tmp0_; -#line 64 "/home/jens/Source/shotwell/src/core/DataView.vala" - g_return_if_fail (IS_DATA_VIEW (self)); -#line 65 "/home/jens/Source/shotwell/src/core/DataView.vala" - _tmp0_ = self->priv->selected; -#line 65 "/home/jens/Source/shotwell/src/core/DataView.vala" - if (_tmp0_ == selected) { -#line 66 "/home/jens/Source/shotwell/src/core/DataView.vala" - return; -#line 380 "DataView.c" - } -#line 68 "/home/jens/Source/shotwell/src/core/DataView.vala" - self->priv->selected = selected; -#line 69 "/home/jens/Source/shotwell/src/core/DataView.vala" - g_signal_emit (self, data_view_signals[DATA_VIEW_STATE_CHANGED_SIGNAL], 0, selected); -#line 386 "DataView.c" -} - - -gboolean -data_view_internal_toggle (DataView* self) -{ - gboolean result = FALSE; - gboolean _tmp0_; - gboolean _tmp1_; - gboolean _tmp2_; -#line 73 "/home/jens/Source/shotwell/src/core/DataView.vala" - g_return_val_if_fail (IS_DATA_VIEW (self), FALSE); -#line 74 "/home/jens/Source/shotwell/src/core/DataView.vala" - _tmp0_ = self->priv->selected; -#line 74 "/home/jens/Source/shotwell/src/core/DataView.vala" - self->priv->selected = !_tmp0_; -#line 75 "/home/jens/Source/shotwell/src/core/DataView.vala" - _tmp1_ = self->priv->selected; -#line 75 "/home/jens/Source/shotwell/src/core/DataView.vala" - g_signal_emit (self, data_view_signals[DATA_VIEW_STATE_CHANGED_SIGNAL], 0, _tmp1_); -#line 77 "/home/jens/Source/shotwell/src/core/DataView.vala" - _tmp2_ = self->priv->selected; -#line 77 "/home/jens/Source/shotwell/src/core/DataView.vala" - result = _tmp2_; -#line 77 "/home/jens/Source/shotwell/src/core/DataView.vala" - return result; -#line 413 "DataView.c" -} - - -gboolean -data_view_is_visible (DataView* self) -{ - gboolean result = FALSE; - gboolean _tmp0_; -#line 80 "/home/jens/Source/shotwell/src/core/DataView.vala" - g_return_val_if_fail (IS_DATA_VIEW (self), FALSE); -#line 81 "/home/jens/Source/shotwell/src/core/DataView.vala" - _tmp0_ = self->priv->visible; -#line 81 "/home/jens/Source/shotwell/src/core/DataView.vala" - result = _tmp0_; -#line 81 "/home/jens/Source/shotwell/src/core/DataView.vala" - return result; -#line 430 "DataView.c" -} - - -void -data_view_internal_set_visible (DataView* self, - gboolean visible) -{ - gboolean _tmp0_; -#line 85 "/home/jens/Source/shotwell/src/core/DataView.vala" - g_return_if_fail (IS_DATA_VIEW (self)); -#line 86 "/home/jens/Source/shotwell/src/core/DataView.vala" - _tmp0_ = self->priv->visible; -#line 86 "/home/jens/Source/shotwell/src/core/DataView.vala" - if (_tmp0_ == visible) { -#line 87 "/home/jens/Source/shotwell/src/core/DataView.vala" - return; -#line 447 "DataView.c" - } -#line 89 "/home/jens/Source/shotwell/src/core/DataView.vala" - self->priv->visible = visible; -#line 90 "/home/jens/Source/shotwell/src/core/DataView.vala" - g_signal_emit (self, data_view_signals[DATA_VIEW_VISIBILITY_CHANGED_SIGNAL], 0, visible); -#line 453 "DataView.c" -} - - -static void -data_view_real_notify_view_altered (DataView* self) -{ - gboolean _tmp0_; - ViewCollection* vc = NULL; - DataCollection* _tmp1_; - ViewCollection* _tmp2_; - ViewCollection* _tmp3_; -#line 95 "/home/jens/Source/shotwell/src/core/DataView.vala" - _tmp0_ = self->priv->visible; -#line 95 "/home/jens/Source/shotwell/src/core/DataView.vala" - if (!_tmp0_) { -#line 96 "/home/jens/Source/shotwell/src/core/DataView.vala" - return; -#line 471 "DataView.c" - } -#line 98 "/home/jens/Source/shotwell/src/core/DataView.vala" - _tmp1_ = data_object_get_membership (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_DATA_OBJECT, DataObject)); -#line 98 "/home/jens/Source/shotwell/src/core/DataView.vala" - _tmp2_ = G_TYPE_CHECK_INSTANCE_TYPE (_tmp1_, TYPE_VIEW_COLLECTION) ? ((ViewCollection*) _tmp1_) : NULL; -#line 98 "/home/jens/Source/shotwell/src/core/DataView.vala" - if (_tmp2_ == NULL) { -#line 98 "/home/jens/Source/shotwell/src/core/DataView.vala" - _data_collection_unref0 (_tmp1_); -#line 481 "DataView.c" - } -#line 98 "/home/jens/Source/shotwell/src/core/DataView.vala" - vc = _tmp2_; -#line 99 "/home/jens/Source/shotwell/src/core/DataView.vala" - _tmp3_ = vc; -#line 99 "/home/jens/Source/shotwell/src/core/DataView.vala" - if (_tmp3_ != NULL) { -#line 489 "DataView.c" - ViewCollection* _tmp4_; - ViewCollection* _tmp5_; -#line 100 "/home/jens/Source/shotwell/src/core/DataView.vala" - _tmp4_ = vc; -#line 100 "/home/jens/Source/shotwell/src/core/DataView.vala" - if (!data_collection_are_notifications_frozen (G_TYPE_CHECK_INSTANCE_CAST (_tmp4_, TYPE_DATA_COLLECTION, DataCollection))) { -#line 101 "/home/jens/Source/shotwell/src/core/DataView.vala" - g_signal_emit (self, data_view_signals[DATA_VIEW_VIEW_ALTERED_SIGNAL], 0); -#line 498 "DataView.c" - } -#line 104 "/home/jens/Source/shotwell/src/core/DataView.vala" - _tmp5_ = vc; -#line 104 "/home/jens/Source/shotwell/src/core/DataView.vala" - view_collection_internal_notify_view_altered (_tmp5_, self); -#line 504 "DataView.c" - } else { -#line 106 "/home/jens/Source/shotwell/src/core/DataView.vala" - g_signal_emit (self, data_view_signals[DATA_VIEW_VIEW_ALTERED_SIGNAL], 0); -#line 508 "DataView.c" - } -#line 93 "/home/jens/Source/shotwell/src/core/DataView.vala" - _data_collection_unref0 (vc); -#line 512 "DataView.c" -} - - -void -data_view_notify_view_altered (DataView* self) -{ -#line 93 "/home/jens/Source/shotwell/src/core/DataView.vala" - g_return_if_fail (IS_DATA_VIEW (self)); -#line 93 "/home/jens/Source/shotwell/src/core/DataView.vala" - DATA_VIEW_GET_CLASS (self)->notify_view_altered (self); -#line 523 "DataView.c" -} - - -static void -data_view_real_notify_geometry_altered (DataView* self) -{ - gboolean _tmp0_; - ViewCollection* vc = NULL; - DataCollection* _tmp1_; - ViewCollection* _tmp2_; - ViewCollection* _tmp3_; -#line 112 "/home/jens/Source/shotwell/src/core/DataView.vala" - _tmp0_ = self->priv->visible; -#line 112 "/home/jens/Source/shotwell/src/core/DataView.vala" - if (!_tmp0_) { -#line 113 "/home/jens/Source/shotwell/src/core/DataView.vala" - return; -#line 541 "DataView.c" - } -#line 115 "/home/jens/Source/shotwell/src/core/DataView.vala" - _tmp1_ = data_object_get_membership (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_DATA_OBJECT, DataObject)); -#line 115 "/home/jens/Source/shotwell/src/core/DataView.vala" - _tmp2_ = G_TYPE_CHECK_INSTANCE_TYPE (_tmp1_, TYPE_VIEW_COLLECTION) ? ((ViewCollection*) _tmp1_) : NULL; -#line 115 "/home/jens/Source/shotwell/src/core/DataView.vala" - if (_tmp2_ == NULL) { -#line 115 "/home/jens/Source/shotwell/src/core/DataView.vala" - _data_collection_unref0 (_tmp1_); -#line 551 "DataView.c" - } -#line 115 "/home/jens/Source/shotwell/src/core/DataView.vala" - vc = _tmp2_; -#line 116 "/home/jens/Source/shotwell/src/core/DataView.vala" - _tmp3_ = vc; -#line 116 "/home/jens/Source/shotwell/src/core/DataView.vala" - if (_tmp3_ != NULL) { -#line 559 "DataView.c" - ViewCollection* _tmp4_; - ViewCollection* _tmp5_; -#line 117 "/home/jens/Source/shotwell/src/core/DataView.vala" - _tmp4_ = vc; -#line 117 "/home/jens/Source/shotwell/src/core/DataView.vala" - if (!data_collection_are_notifications_frozen (G_TYPE_CHECK_INSTANCE_CAST (_tmp4_, TYPE_DATA_COLLECTION, DataCollection))) { -#line 118 "/home/jens/Source/shotwell/src/core/DataView.vala" - g_signal_emit (self, data_view_signals[DATA_VIEW_GEOMETRY_ALTERED_SIGNAL], 0); -#line 568 "DataView.c" - } -#line 121 "/home/jens/Source/shotwell/src/core/DataView.vala" - _tmp5_ = vc; -#line 121 "/home/jens/Source/shotwell/src/core/DataView.vala" - view_collection_internal_notify_geometry_altered (_tmp5_, self); -#line 574 "DataView.c" - } else { -#line 123 "/home/jens/Source/shotwell/src/core/DataView.vala" - g_signal_emit (self, data_view_signals[DATA_VIEW_GEOMETRY_ALTERED_SIGNAL], 0); -#line 578 "DataView.c" - } -#line 110 "/home/jens/Source/shotwell/src/core/DataView.vala" - _data_collection_unref0 (vc); -#line 582 "DataView.c" -} - - -void -data_view_notify_geometry_altered (DataView* self) -{ -#line 110 "/home/jens/Source/shotwell/src/core/DataView.vala" - g_return_if_fail (IS_DATA_VIEW (self)); -#line 110 "/home/jens/Source/shotwell/src/core/DataView.vala" - DATA_VIEW_GET_CLASS (self)->notify_geometry_altered (self); -#line 593 "DataView.c" -} - - -static void -data_view_real_notify_unsubscribed (DataView* self, - DataSource* source) -{ -#line 128 "/home/jens/Source/shotwell/src/core/DataView.vala" - g_return_if_fail (IS_DATA_SOURCE (source)); -#line 129 "/home/jens/Source/shotwell/src/core/DataView.vala" - g_signal_emit (self, data_view_signals[DATA_VIEW_UNSUBSCRIBED_SIGNAL], 0, source); -#line 605 "DataView.c" -} - - -void -data_view_notify_unsubscribed (DataView* self, - DataSource* source) -{ -#line 128 "/home/jens/Source/shotwell/src/core/DataView.vala" - g_return_if_fail (IS_DATA_VIEW (self)); -#line 128 "/home/jens/Source/shotwell/src/core/DataView.vala" - DATA_VIEW_GET_CLASS (self)->notify_unsubscribed (self, source); -#line 617 "DataView.c" -} - - -static void -data_view_real_state_changed (DataView* self, - gboolean selected) -{ -} - - -static void -data_view_real_visibility_changed (DataView* self, - gboolean visible) -{ -} - - -static void -data_view_real_view_altered (DataView* self) -{ -} - - -static void -data_view_real_geometry_altered (DataView* self) -{ -} - - -static void -data_view_real_unsubscribed (DataView* self, - DataSource* source) -{ -#line 29 "/home/jens/Source/shotwell/src/core/DataView.vala" - g_return_if_fail (IS_DATA_SOURCE (source)); -#line 653 "DataView.c" -} - - -static void -data_view_class_init (DataViewClass * klass) -{ -#line 7 "/home/jens/Source/shotwell/src/core/DataView.vala" - data_view_parent_class = g_type_class_peek_parent (klass); -#line 7 "/home/jens/Source/shotwell/src/core/DataView.vala" - g_type_class_add_private (klass, sizeof (DataViewPrivate)); -#line 7 "/home/jens/Source/shotwell/src/core/DataView.vala" - ((DataObjectClass *) klass)->get_name = (gchar* (*) (DataObject *)) data_view_real_get_name; -#line 7 "/home/jens/Source/shotwell/src/core/DataView.vala" - ((DataObjectClass *) klass)->to_string = (gchar* (*) (DataObject *)) data_view_real_to_string; -#line 7 "/home/jens/Source/shotwell/src/core/DataView.vala" - ((DataViewClass *) klass)->notify_view_altered = (void (*) (DataView *)) data_view_real_notify_view_altered; -#line 7 "/home/jens/Source/shotwell/src/core/DataView.vala" - ((DataViewClass *) klass)->notify_geometry_altered = (void (*) (DataView *)) data_view_real_notify_geometry_altered; -#line 7 "/home/jens/Source/shotwell/src/core/DataView.vala" - ((DataViewClass *) klass)->notify_unsubscribed = (void (*) (DataView *, DataSource*)) data_view_real_notify_unsubscribed; -#line 7 "/home/jens/Source/shotwell/src/core/DataView.vala" - ((DataViewClass *) klass)->state_changed = data_view_real_state_changed; -#line 7 "/home/jens/Source/shotwell/src/core/DataView.vala" - ((DataViewClass *) klass)->visibility_changed = data_view_real_visibility_changed; -#line 7 "/home/jens/Source/shotwell/src/core/DataView.vala" - ((DataViewClass *) klass)->view_altered = data_view_real_view_altered; -#line 7 "/home/jens/Source/shotwell/src/core/DataView.vala" - ((DataViewClass *) klass)->geometry_altered = data_view_real_geometry_altered; -#line 7 "/home/jens/Source/shotwell/src/core/DataView.vala" - ((DataViewClass *) klass)->unsubscribed = data_view_real_unsubscribed; -#line 7 "/home/jens/Source/shotwell/src/core/DataView.vala" - G_OBJECT_CLASS (klass)->finalize = data_view_finalize; -#line 7 "/home/jens/Source/shotwell/src/core/DataView.vala" - data_view_signals[DATA_VIEW_STATE_CHANGED_SIGNAL] = g_signal_new ("state-changed", TYPE_DATA_VIEW, G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET (DataViewClass, state_changed), NULL, NULL, g_cclosure_marshal_VOID__BOOLEAN, G_TYPE_NONE, 1, G_TYPE_BOOLEAN); -#line 7 "/home/jens/Source/shotwell/src/core/DataView.vala" - data_view_signals[DATA_VIEW_VISIBILITY_CHANGED_SIGNAL] = g_signal_new ("visibility-changed", TYPE_DATA_VIEW, G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET (DataViewClass, visibility_changed), NULL, NULL, g_cclosure_marshal_VOID__BOOLEAN, G_TYPE_NONE, 1, G_TYPE_BOOLEAN); -#line 7 "/home/jens/Source/shotwell/src/core/DataView.vala" - data_view_signals[DATA_VIEW_VIEW_ALTERED_SIGNAL] = g_signal_new ("view-altered", TYPE_DATA_VIEW, G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET (DataViewClass, view_altered), NULL, NULL, g_cclosure_marshal_VOID__VOID, G_TYPE_NONE, 0); -#line 7 "/home/jens/Source/shotwell/src/core/DataView.vala" - data_view_signals[DATA_VIEW_GEOMETRY_ALTERED_SIGNAL] = g_signal_new ("geometry-altered", TYPE_DATA_VIEW, G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET (DataViewClass, geometry_altered), NULL, NULL, g_cclosure_marshal_VOID__VOID, G_TYPE_NONE, 0); -#line 7 "/home/jens/Source/shotwell/src/core/DataView.vala" - data_view_signals[DATA_VIEW_UNSUBSCRIBED_SIGNAL] = g_signal_new ("unsubscribed", TYPE_DATA_VIEW, G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET (DataViewClass, unsubscribed), NULL, NULL, g_cclosure_marshal_VOID__OBJECT, G_TYPE_NONE, 1, TYPE_DATA_SOURCE); -#line 696 "DataView.c" -} - - -static void -data_view_instance_init (DataView * self) -{ -#line 7 "/home/jens/Source/shotwell/src/core/DataView.vala" - self->priv = DATA_VIEW_GET_PRIVATE (self); -#line 9 "/home/jens/Source/shotwell/src/core/DataView.vala" - self->priv->selected = FALSE; -#line 10 "/home/jens/Source/shotwell/src/core/DataView.vala" - self->priv->visible = TRUE; -#line 709 "DataView.c" -} - - -static void -data_view_finalize (GObject * obj) -{ - DataView * self; - DataSource* _tmp0_; -#line 7 "/home/jens/Source/shotwell/src/core/DataView.vala" - self = G_TYPE_CHECK_INSTANCE_CAST (obj, TYPE_DATA_VIEW, DataView); -#line 44 "/home/jens/Source/shotwell/src/core/DataView.vala" - _tmp0_ = self->priv->source; -#line 44 "/home/jens/Source/shotwell/src/core/DataView.vala" - data_source_internal_unsubscribe (_tmp0_, self); -#line 8 "/home/jens/Source/shotwell/src/core/DataView.vala" - _g_object_unref0 (self->priv->source); -#line 7 "/home/jens/Source/shotwell/src/core/DataView.vala" - G_OBJECT_CLASS (data_view_parent_class)->finalize (obj); -#line 728 "DataView.c" -} - - -GType -data_view_get_type (void) -{ - static volatile gsize data_view_type_id__volatile = 0; - if (g_once_init_enter (&data_view_type_id__volatile)) { - static const GTypeInfo g_define_type_info = { sizeof (DataViewClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) data_view_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (DataView), 0, (GInstanceInitFunc) data_view_instance_init, NULL }; - GType data_view_type_id; - data_view_type_id = g_type_register_static (TYPE_DATA_OBJECT, "DataView", &g_define_type_info, 0); - g_once_init_leave (&data_view_type_id__volatile, data_view_type_id); - } - return data_view_type_id__volatile; -} - - - diff --git a/src/core/DataViewTypes.c b/src/core/DataViewTypes.c deleted file mode 100644 index b70a8ff..0000000 --- a/src/core/DataViewTypes.c +++ /dev/null @@ -1,621 +0,0 @@ -/* DataViewTypes.c generated by valac 0.40.4, the Vala compiler - * generated from DataViewTypes.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> - - -#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; -typedef struct _DataObjectPrivate DataObjectPrivate; - -#define TYPE_ALTERATION (alteration_get_type ()) -#define ALTERATION(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_ALTERATION, Alteration)) -#define ALTERATION_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_ALTERATION, AlterationClass)) -#define IS_ALTERATION(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_ALTERATION)) -#define IS_ALTERATION_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_ALTERATION)) -#define ALTERATION_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_ALTERATION, AlterationClass)) - -typedef struct _Alteration Alteration; -typedef struct _AlterationClass AlterationClass; - -#define TYPE_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_DATA_VIEW (data_view_get_type ()) -#define DATA_VIEW(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_DATA_VIEW, DataView)) -#define DATA_VIEW_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_DATA_VIEW, DataViewClass)) -#define IS_DATA_VIEW(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_DATA_VIEW)) -#define IS_DATA_VIEW_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_DATA_VIEW)) -#define DATA_VIEW_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_DATA_VIEW, DataViewClass)) - -typedef struct _DataView DataView; -typedef struct _DataViewClass DataViewClass; -typedef struct _DataViewPrivate DataViewPrivate; - -#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_VIEW (thumbnail_view_get_type ()) -#define THUMBNAIL_VIEW(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_THUMBNAIL_VIEW, ThumbnailView)) -#define THUMBNAIL_VIEW_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_THUMBNAIL_VIEW, ThumbnailViewClass)) -#define IS_THUMBNAIL_VIEW(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_THUMBNAIL_VIEW)) -#define IS_THUMBNAIL_VIEW_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_THUMBNAIL_VIEW)) -#define THUMBNAIL_VIEW_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_THUMBNAIL_VIEW, ThumbnailViewClass)) - -typedef struct _ThumbnailView ThumbnailView; -typedef struct _ThumbnailViewClass ThumbnailViewClass; -typedef struct _ThumbnailViewPrivate ThumbnailViewPrivate; -enum { - THUMBNAIL_VIEW_0_PROPERTY, - THUMBNAIL_VIEW_NUM_PROPERTIES -}; -static GParamSpec* thumbnail_view_properties[THUMBNAIL_VIEW_NUM_PROPERTIES]; - -#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; -enum { - THUMBNAIL_VIEW_THUMBNAIL_ALTERED_SIGNAL, - THUMBNAIL_VIEW_NUM_SIGNALS -}; -static guint thumbnail_view_signals[THUMBNAIL_VIEW_NUM_SIGNALS] = {0}; - -#define TYPE_PHOTO_VIEW (photo_view_get_type ()) -#define PHOTO_VIEW(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_PHOTO_VIEW, PhotoView)) -#define PHOTO_VIEW_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_PHOTO_VIEW, PhotoViewClass)) -#define IS_PHOTO_VIEW(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_PHOTO_VIEW)) -#define IS_PHOTO_VIEW_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_PHOTO_VIEW)) -#define PHOTO_VIEW_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_PHOTO_VIEW, PhotoViewClass)) - -typedef struct _PhotoView PhotoView; -typedef struct _PhotoViewClass PhotoViewClass; -typedef struct _PhotoViewPrivate PhotoViewPrivate; -enum { - PHOTO_VIEW_0_PROPERTY, - PHOTO_VIEW_NUM_PROPERTIES -}; -static GParamSpec* photo_view_properties[PHOTO_VIEW_NUM_PROPERTIES]; - -#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 TYPE_PHOTO_SOURCE (photo_source_get_type ()) -#define PHOTO_SOURCE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_PHOTO_SOURCE, PhotoSource)) -#define PHOTO_SOURCE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_PHOTO_SOURCE, PhotoSourceClass)) -#define IS_PHOTO_SOURCE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_PHOTO_SOURCE)) -#define IS_PHOTO_SOURCE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_PHOTO_SOURCE)) -#define PHOTO_SOURCE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_PHOTO_SOURCE, PhotoSourceClass)) - -typedef struct _PhotoSource PhotoSource; -typedef struct _PhotoSourceClass PhotoSourceClass; - -#define TYPE_VIDEO_VIEW (video_view_get_type ()) -#define VIDEO_VIEW(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_VIDEO_VIEW, VideoView)) -#define VIDEO_VIEW_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_VIDEO_VIEW, VideoViewClass)) -#define IS_VIDEO_VIEW(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_VIDEO_VIEW)) -#define IS_VIDEO_VIEW_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_VIDEO_VIEW)) -#define VIDEO_VIEW_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_VIDEO_VIEW, VideoViewClass)) - -typedef struct _VideoView VideoView; -typedef struct _VideoViewClass VideoViewClass; -typedef struct _VideoViewPrivate VideoViewPrivate; -enum { - VIDEO_VIEW_0_PROPERTY, - VIDEO_VIEW_NUM_PROPERTIES -}; -static GParamSpec* video_view_properties[VIDEO_VIEW_NUM_PROPERTIES]; - -#define TYPE_VIDEO_SOURCE (video_source_get_type ()) -#define VIDEO_SOURCE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_VIDEO_SOURCE, VideoSource)) -#define VIDEO_SOURCE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_VIDEO_SOURCE, VideoSourceClass)) -#define IS_VIDEO_SOURCE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_VIDEO_SOURCE)) -#define IS_VIDEO_SOURCE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_VIDEO_SOURCE)) -#define VIDEO_SOURCE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_VIDEO_SOURCE, VideoSourceClass)) - -typedef struct _VideoSource VideoSource; -typedef struct _VideoSourceClass VideoSourceClass; - -#define TYPE_EVENT_VIEW (event_view_get_type ()) -#define EVENT_VIEW(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_EVENT_VIEW, EventView)) -#define EVENT_VIEW_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_EVENT_VIEW, EventViewClass)) -#define IS_EVENT_VIEW(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_EVENT_VIEW)) -#define IS_EVENT_VIEW_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_EVENT_VIEW)) -#define EVENT_VIEW_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_EVENT_VIEW, EventViewClass)) - -typedef struct _EventView EventView; -typedef struct _EventViewClass EventViewClass; -typedef struct _EventViewPrivate EventViewPrivate; -enum { - EVENT_VIEW_0_PROPERTY, - EVENT_VIEW_NUM_PROPERTIES -}; -static GParamSpec* event_view_properties[EVENT_VIEW_NUM_PROPERTIES]; - -#define TYPE_EVENT_SOURCE (event_source_get_type ()) -#define EVENT_SOURCE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_EVENT_SOURCE, EventSource)) -#define EVENT_SOURCE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_EVENT_SOURCE, EventSourceClass)) -#define IS_EVENT_SOURCE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_EVENT_SOURCE)) -#define IS_EVENT_SOURCE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_EVENT_SOURCE)) -#define EVENT_SOURCE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_EVENT_SOURCE, EventSourceClass)) - -typedef struct _EventSource EventSource; -typedef struct _EventSourceClass EventSourceClass; - -struct _DataObject { - GObject parent_instance; - DataObjectPrivate * priv; -}; - -struct _DataObjectClass { - GObjectClass parent_class; - void (*notify_altered) (DataObject* self, Alteration* alteration); - void (*notify_membership_changed) (DataObject* self, DataCollection* collection); - void (*notify_collection_property_set) (DataObject* self, const gchar* name, GValue* old, GValue* val); - void (*notify_collection_property_cleared) (DataObject* self, const gchar* name); - gchar* (*get_name) (DataObject* self); - gchar* (*to_string) (DataObject* self); -}; - -struct _DataView { - DataObject parent_instance; - DataViewPrivate * priv; -}; - -struct _DataViewClass { - DataObjectClass parent_class; - void (*notify_view_altered) (DataView* self); - void (*notify_geometry_altered) (DataView* self); - void (*notify_unsubscribed) (DataView* self, DataSource* source); - void (*state_changed) (DataView* self, gboolean selected); - void (*visibility_changed) (DataView* self, gboolean visible); - void (*view_altered) (DataView* self); - void (*geometry_altered) (DataView* self); - void (*unsubscribed) (DataView* self, DataSource* source); -}; - -struct _ThumbnailView { - DataView parent_instance; - ThumbnailViewPrivate * priv; -}; - -struct _ThumbnailViewClass { - DataViewClass parent_class; - void (*notify_thumbnail_altered) (ThumbnailView* self); - void (*thumbnail_altered) (ThumbnailView* self); -}; - -struct _PhotoView { - ThumbnailView parent_instance; - PhotoViewPrivate * priv; -}; - -struct _PhotoViewClass { - ThumbnailViewClass parent_class; -}; - -struct _VideoView { - ThumbnailView parent_instance; - VideoViewPrivate * priv; -}; - -struct _VideoViewClass { - ThumbnailViewClass parent_class; -}; - -struct _EventView { - ThumbnailView parent_instance; - EventViewPrivate * priv; -}; - -struct _EventViewClass { - ThumbnailViewClass parent_class; -}; - - -static gpointer thumbnail_view_parent_class = NULL; -static gpointer photo_view_parent_class = NULL; -static gpointer video_view_parent_class = NULL; -static gpointer event_view_parent_class = NULL; - -GType data_object_get_type (void) G_GNUC_CONST; -gpointer alteration_ref (gpointer instance); -void alteration_unref (gpointer instance); -GParamSpec* param_spec_alteration (const gchar* name, - const gchar* nick, - const gchar* blurb, - GType object_type, - GParamFlags flags); -void value_set_alteration (GValue* value, - gpointer v_object); -void value_take_alteration (GValue* value, - gpointer v_object); -gpointer value_get_alteration (const GValue* value); -GType alteration_get_type (void) G_GNUC_CONST; -gpointer data_collection_ref (gpointer instance); -void data_collection_unref (gpointer instance); -GParamSpec* param_spec_data_collection (const gchar* name, - const gchar* nick, - const gchar* blurb, - GType object_type, - GParamFlags flags); -void value_set_data_collection (GValue* value, - gpointer v_object); -void value_take_data_collection (GValue* value, - gpointer v_object); -gpointer value_get_data_collection (const GValue* value); -GType data_collection_get_type (void) G_GNUC_CONST; -GType data_view_get_type (void) G_GNUC_CONST; -GType data_source_get_type (void) G_GNUC_CONST; -GType thumbnail_view_get_type (void) G_GNUC_CONST; -GType thumbnail_source_get_type (void) G_GNUC_CONST; -ThumbnailView* thumbnail_view_new (ThumbnailSource* source); -ThumbnailView* thumbnail_view_construct (GType object_type, - ThumbnailSource* source); -DataView* data_view_new (DataSource* source); -DataView* data_view_construct (GType object_type, - DataSource* source); -void thumbnail_view_notify_thumbnail_altered (ThumbnailView* self); -static void thumbnail_view_real_notify_thumbnail_altered (ThumbnailView* self); -static void thumbnail_view_real_thumbnail_altered (ThumbnailView* self); -GType photo_view_get_type (void) G_GNUC_CONST; -GType media_source_get_type (void) G_GNUC_CONST; -GType photo_source_get_type (void) G_GNUC_CONST; -PhotoView* photo_view_new (PhotoSource* source); -PhotoView* photo_view_construct (GType object_type, - PhotoSource* source); -PhotoSource* photo_view_get_photo_source (PhotoView* self); -DataSource* data_view_get_source (DataView* self); -GType video_view_get_type (void) G_GNUC_CONST; -GType video_source_get_type (void) G_GNUC_CONST; -VideoView* video_view_new (VideoSource* source); -VideoView* video_view_construct (GType object_type, - VideoSource* source); -VideoSource* video_view_get_video_source (VideoView* self); -GType event_view_get_type (void) G_GNUC_CONST; -GType event_source_get_type (void) G_GNUC_CONST; -EventView* event_view_new (EventSource* source); -EventView* event_view_construct (GType object_type, - EventSource* source); -EventSource* event_view_get_event_source (EventView* self); - - -ThumbnailView* -thumbnail_view_construct (GType object_type, - ThumbnailSource* source) -{ - ThumbnailView * self = NULL; -#line 11 "/home/jens/Source/shotwell/src/core/DataViewTypes.vala" - g_return_val_if_fail (IS_THUMBNAIL_SOURCE (source), NULL); -#line 12 "/home/jens/Source/shotwell/src/core/DataViewTypes.vala" - self = (ThumbnailView*) data_view_construct (object_type, G_TYPE_CHECK_INSTANCE_CAST (source, TYPE_DATA_SOURCE, DataSource)); -#line 11 "/home/jens/Source/shotwell/src/core/DataViewTypes.vala" - return self; -#line 338 "DataViewTypes.c" -} - - -ThumbnailView* -thumbnail_view_new (ThumbnailSource* source) -{ -#line 11 "/home/jens/Source/shotwell/src/core/DataViewTypes.vala" - return thumbnail_view_construct (TYPE_THUMBNAIL_VIEW, source); -#line 347 "DataViewTypes.c" -} - - -static void -thumbnail_view_real_notify_thumbnail_altered (ThumbnailView* self) -{ -#line 17 "/home/jens/Source/shotwell/src/core/DataViewTypes.vala" - g_signal_emit (self, thumbnail_view_signals[THUMBNAIL_VIEW_THUMBNAIL_ALTERED_SIGNAL], 0); -#line 356 "DataViewTypes.c" -} - - -void -thumbnail_view_notify_thumbnail_altered (ThumbnailView* self) -{ -#line 15 "/home/jens/Source/shotwell/src/core/DataViewTypes.vala" - g_return_if_fail (IS_THUMBNAIL_VIEW (self)); -#line 15 "/home/jens/Source/shotwell/src/core/DataViewTypes.vala" - THUMBNAIL_VIEW_GET_CLASS (self)->notify_thumbnail_altered (self); -#line 367 "DataViewTypes.c" -} - - -static void -thumbnail_view_real_thumbnail_altered (ThumbnailView* self) -{ -} - - -static void -thumbnail_view_class_init (ThumbnailViewClass * klass) -{ -#line 7 "/home/jens/Source/shotwell/src/core/DataViewTypes.vala" - thumbnail_view_parent_class = g_type_class_peek_parent (klass); -#line 7 "/home/jens/Source/shotwell/src/core/DataViewTypes.vala" - ((ThumbnailViewClass *) klass)->notify_thumbnail_altered = (void (*) (ThumbnailView *)) thumbnail_view_real_notify_thumbnail_altered; -#line 7 "/home/jens/Source/shotwell/src/core/DataViewTypes.vala" - ((ThumbnailViewClass *) klass)->thumbnail_altered = thumbnail_view_real_thumbnail_altered; -#line 7 "/home/jens/Source/shotwell/src/core/DataViewTypes.vala" - thumbnail_view_signals[THUMBNAIL_VIEW_THUMBNAIL_ALTERED_SIGNAL] = g_signal_new ("thumbnail-altered", TYPE_THUMBNAIL_VIEW, G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET (ThumbnailViewClass, thumbnail_altered), NULL, NULL, g_cclosure_marshal_VOID__VOID, G_TYPE_NONE, 0); -#line 388 "DataViewTypes.c" -} - - -static void -thumbnail_view_instance_init (ThumbnailView * self) -{ -} - - -GType -thumbnail_view_get_type (void) -{ - static volatile gsize thumbnail_view_type_id__volatile = 0; - if (g_once_init_enter (&thumbnail_view_type_id__volatile)) { - static const GTypeInfo g_define_type_info = { sizeof (ThumbnailViewClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) thumbnail_view_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (ThumbnailView), 0, (GInstanceInitFunc) thumbnail_view_instance_init, NULL }; - GType thumbnail_view_type_id; - thumbnail_view_type_id = g_type_register_static (TYPE_DATA_VIEW, "ThumbnailView", &g_define_type_info, 0); - g_once_init_leave (&thumbnail_view_type_id__volatile, thumbnail_view_type_id); - } - return thumbnail_view_type_id__volatile; -} - - -PhotoView* -photo_view_construct (GType object_type, - PhotoSource* source) -{ - PhotoView * self = NULL; -#line 22 "/home/jens/Source/shotwell/src/core/DataViewTypes.vala" - g_return_val_if_fail (IS_PHOTO_SOURCE (source), NULL); -#line 23 "/home/jens/Source/shotwell/src/core/DataViewTypes.vala" - self = (PhotoView*) thumbnail_view_construct (object_type, G_TYPE_CHECK_INSTANCE_CAST (source, TYPE_THUMBNAIL_SOURCE, ThumbnailSource)); -#line 22 "/home/jens/Source/shotwell/src/core/DataViewTypes.vala" - return self; -#line 423 "DataViewTypes.c" -} - - -PhotoView* -photo_view_new (PhotoSource* source) -{ -#line 22 "/home/jens/Source/shotwell/src/core/DataViewTypes.vala" - return photo_view_construct (TYPE_PHOTO_VIEW, source); -#line 432 "DataViewTypes.c" -} - - -PhotoSource* -photo_view_get_photo_source (PhotoView* self) -{ - PhotoSource* result = NULL; - DataSource* _tmp0_; -#line 26 "/home/jens/Source/shotwell/src/core/DataViewTypes.vala" - g_return_val_if_fail (IS_PHOTO_VIEW (self), NULL); -#line 27 "/home/jens/Source/shotwell/src/core/DataViewTypes.vala" - _tmp0_ = data_view_get_source (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_DATA_VIEW, DataView)); -#line 27 "/home/jens/Source/shotwell/src/core/DataViewTypes.vala" - result = G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, TYPE_PHOTO_SOURCE, PhotoSource); -#line 27 "/home/jens/Source/shotwell/src/core/DataViewTypes.vala" - return result; -#line 449 "DataViewTypes.c" -} - - -static void -photo_view_class_init (PhotoViewClass * klass) -{ -#line 21 "/home/jens/Source/shotwell/src/core/DataViewTypes.vala" - photo_view_parent_class = g_type_class_peek_parent (klass); -#line 458 "DataViewTypes.c" -} - - -static void -photo_view_instance_init (PhotoView * self) -{ -} - - -GType -photo_view_get_type (void) -{ - static volatile gsize photo_view_type_id__volatile = 0; - if (g_once_init_enter (&photo_view_type_id__volatile)) { - static const GTypeInfo g_define_type_info = { sizeof (PhotoViewClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) photo_view_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (PhotoView), 0, (GInstanceInitFunc) photo_view_instance_init, NULL }; - GType photo_view_type_id; - photo_view_type_id = g_type_register_static (TYPE_THUMBNAIL_VIEW, "PhotoView", &g_define_type_info, 0); - g_once_init_leave (&photo_view_type_id__volatile, photo_view_type_id); - } - return photo_view_type_id__volatile; -} - - -VideoView* -video_view_construct (GType object_type, - VideoSource* source) -{ - VideoView * self = NULL; -#line 32 "/home/jens/Source/shotwell/src/core/DataViewTypes.vala" - g_return_val_if_fail (IS_VIDEO_SOURCE (source), NULL); -#line 33 "/home/jens/Source/shotwell/src/core/DataViewTypes.vala" - self = (VideoView*) thumbnail_view_construct (object_type, G_TYPE_CHECK_INSTANCE_CAST (source, TYPE_THUMBNAIL_SOURCE, ThumbnailSource)); -#line 32 "/home/jens/Source/shotwell/src/core/DataViewTypes.vala" - return self; -#line 493 "DataViewTypes.c" -} - - -VideoView* -video_view_new (VideoSource* source) -{ -#line 32 "/home/jens/Source/shotwell/src/core/DataViewTypes.vala" - return video_view_construct (TYPE_VIDEO_VIEW, source); -#line 502 "DataViewTypes.c" -} - - -VideoSource* -video_view_get_video_source (VideoView* self) -{ - VideoSource* result = NULL; - DataSource* _tmp0_; -#line 36 "/home/jens/Source/shotwell/src/core/DataViewTypes.vala" - g_return_val_if_fail (IS_VIDEO_VIEW (self), NULL); -#line 37 "/home/jens/Source/shotwell/src/core/DataViewTypes.vala" - _tmp0_ = data_view_get_source (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_DATA_VIEW, DataView)); -#line 37 "/home/jens/Source/shotwell/src/core/DataViewTypes.vala" - result = G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, TYPE_VIDEO_SOURCE, VideoSource); -#line 37 "/home/jens/Source/shotwell/src/core/DataViewTypes.vala" - return result; -#line 519 "DataViewTypes.c" -} - - -static void -video_view_class_init (VideoViewClass * klass) -{ -#line 31 "/home/jens/Source/shotwell/src/core/DataViewTypes.vala" - video_view_parent_class = g_type_class_peek_parent (klass); -#line 528 "DataViewTypes.c" -} - - -static void -video_view_instance_init (VideoView * self) -{ -} - - -GType -video_view_get_type (void) -{ - static volatile gsize video_view_type_id__volatile = 0; - if (g_once_init_enter (&video_view_type_id__volatile)) { - static const GTypeInfo g_define_type_info = { sizeof (VideoViewClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) video_view_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (VideoView), 0, (GInstanceInitFunc) video_view_instance_init, NULL }; - GType video_view_type_id; - video_view_type_id = g_type_register_static (TYPE_THUMBNAIL_VIEW, "VideoView", &g_define_type_info, 0); - g_once_init_leave (&video_view_type_id__volatile, video_view_type_id); - } - return video_view_type_id__volatile; -} - - -EventView* -event_view_construct (GType object_type, - EventSource* source) -{ - EventView * self = NULL; -#line 42 "/home/jens/Source/shotwell/src/core/DataViewTypes.vala" - g_return_val_if_fail (IS_EVENT_SOURCE (source), NULL); -#line 43 "/home/jens/Source/shotwell/src/core/DataViewTypes.vala" - self = (EventView*) thumbnail_view_construct (object_type, G_TYPE_CHECK_INSTANCE_CAST (source, TYPE_THUMBNAIL_SOURCE, ThumbnailSource)); -#line 42 "/home/jens/Source/shotwell/src/core/DataViewTypes.vala" - return self; -#line 563 "DataViewTypes.c" -} - - -EventView* -event_view_new (EventSource* source) -{ -#line 42 "/home/jens/Source/shotwell/src/core/DataViewTypes.vala" - return event_view_construct (TYPE_EVENT_VIEW, source); -#line 572 "DataViewTypes.c" -} - - -EventSource* -event_view_get_event_source (EventView* self) -{ - EventSource* result = NULL; - DataSource* _tmp0_; -#line 46 "/home/jens/Source/shotwell/src/core/DataViewTypes.vala" - g_return_val_if_fail (IS_EVENT_VIEW (self), NULL); -#line 47 "/home/jens/Source/shotwell/src/core/DataViewTypes.vala" - _tmp0_ = data_view_get_source (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_DATA_VIEW, DataView)); -#line 47 "/home/jens/Source/shotwell/src/core/DataViewTypes.vala" - result = G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, TYPE_EVENT_SOURCE, EventSource); -#line 47 "/home/jens/Source/shotwell/src/core/DataViewTypes.vala" - return result; -#line 589 "DataViewTypes.c" -} - - -static void -event_view_class_init (EventViewClass * klass) -{ -#line 41 "/home/jens/Source/shotwell/src/core/DataViewTypes.vala" - event_view_parent_class = g_type_class_peek_parent (klass); -#line 598 "DataViewTypes.c" -} - - -static void -event_view_instance_init (EventView * self) -{ -} - - -GType -event_view_get_type (void) -{ - static volatile gsize event_view_type_id__volatile = 0; - if (g_once_init_enter (&event_view_type_id__volatile)) { - static const GTypeInfo g_define_type_info = { sizeof (EventViewClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) event_view_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (EventView), 0, (GInstanceInitFunc) event_view_instance_init, NULL }; - GType event_view_type_id; - event_view_type_id = g_type_register_static (TYPE_THUMBNAIL_VIEW, "EventView", &g_define_type_info, 0); - g_once_init_leave (&event_view_type_id__volatile, event_view_type_id); - } - return event_view_type_id__volatile; -} - - - diff --git a/src/core/DatabaseSourceCollection.c b/src/core/DatabaseSourceCollection.c deleted file mode 100644 index b61808a..0000000 --- a/src/core/DatabaseSourceCollection.c +++ /dev/null @@ -1,945 +0,0 @@ -/* DatabaseSourceCollection.c generated by valac 0.40.4, the Vala compiler - * generated from DatabaseSourceCollection.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 <gee.h> - - -#define TYPE_DATA_OBJECT (data_object_get_type ()) -#define DATA_OBJECT(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_DATA_OBJECT, DataObject)) -#define DATA_OBJECT_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_DATA_OBJECT, DataObjectClass)) -#define IS_DATA_OBJECT(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_DATA_OBJECT)) -#define IS_DATA_OBJECT_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_DATA_OBJECT)) -#define DATA_OBJECT_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_DATA_OBJECT, DataObjectClass)) - -typedef struct _DataObject DataObject; -typedef struct _DataObjectClass DataObjectClass; - -#define TYPE_DATA_SOURCE (data_source_get_type ()) -#define DATA_SOURCE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_DATA_SOURCE, DataSource)) -#define DATA_SOURCE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_DATA_SOURCE, DataSourceClass)) -#define IS_DATA_SOURCE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_DATA_SOURCE)) -#define IS_DATA_SOURCE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_DATA_SOURCE)) -#define DATA_SOURCE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_DATA_SOURCE, DataSourceClass)) - -typedef struct _DataSource DataSource; -typedef struct _DataSourceClass DataSourceClass; - -#define TYPE_DATA_COLLECTION (data_collection_get_type ()) -#define DATA_COLLECTION(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_DATA_COLLECTION, DataCollection)) -#define DATA_COLLECTION_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_DATA_COLLECTION, DataCollectionClass)) -#define IS_DATA_COLLECTION(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_DATA_COLLECTION)) -#define IS_DATA_COLLECTION_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_DATA_COLLECTION)) -#define DATA_COLLECTION_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_DATA_COLLECTION, DataCollectionClass)) - -typedef struct _DataCollection DataCollection; -typedef struct _DataCollectionClass DataCollectionClass; -typedef struct _DataCollectionPrivate DataCollectionPrivate; - -#define TYPE_ALTERATION (alteration_get_type ()) -#define ALTERATION(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_ALTERATION, Alteration)) -#define ALTERATION_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_ALTERATION, AlterationClass)) -#define IS_ALTERATION(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_ALTERATION)) -#define IS_ALTERATION_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_ALTERATION)) -#define ALTERATION_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_ALTERATION, AlterationClass)) - -typedef struct _Alteration Alteration; -typedef struct _AlterationClass AlterationClass; - -#define TYPE_MARKER (marker_get_type ()) -#define MARKER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_MARKER, Marker)) -#define IS_MARKER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_MARKER)) -#define MARKER_GET_INTERFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE ((obj), TYPE_MARKER, MarkerIface)) - -typedef struct _Marker Marker; -typedef struct _MarkerIface MarkerIface; - -#define TYPE_SOURCE_COLLECTION (source_collection_get_type ()) -#define SOURCE_COLLECTION(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_SOURCE_COLLECTION, SourceCollection)) -#define SOURCE_COLLECTION_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_SOURCE_COLLECTION, SourceCollectionClass)) -#define IS_SOURCE_COLLECTION(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_SOURCE_COLLECTION)) -#define IS_SOURCE_COLLECTION_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_SOURCE_COLLECTION)) -#define SOURCE_COLLECTION_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_SOURCE_COLLECTION, SourceCollectionClass)) - -typedef struct _SourceCollection SourceCollection; -typedef struct _SourceCollectionClass SourceCollectionClass; -typedef struct _SourceCollectionPrivate SourceCollectionPrivate; - -#define TYPE_SOURCE_BACKLINK (source_backlink_get_type ()) -#define SOURCE_BACKLINK(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_SOURCE_BACKLINK, SourceBacklink)) -#define SOURCE_BACKLINK_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_SOURCE_BACKLINK, SourceBacklinkClass)) -#define IS_SOURCE_BACKLINK(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_SOURCE_BACKLINK)) -#define IS_SOURCE_BACKLINK_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_SOURCE_BACKLINK)) -#define SOURCE_BACKLINK_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_SOURCE_BACKLINK, SourceBacklinkClass)) - -typedef struct _SourceBacklink SourceBacklink; -typedef struct _SourceBacklinkClass SourceBacklinkClass; - -#define TYPE_DATABASE_SOURCE_COLLECTION (database_source_collection_get_type ()) -#define DATABASE_SOURCE_COLLECTION(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_DATABASE_SOURCE_COLLECTION, DatabaseSourceCollection)) -#define DATABASE_SOURCE_COLLECTION_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_DATABASE_SOURCE_COLLECTION, DatabaseSourceCollectionClass)) -#define IS_DATABASE_SOURCE_COLLECTION(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_DATABASE_SOURCE_COLLECTION)) -#define IS_DATABASE_SOURCE_COLLECTION_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_DATABASE_SOURCE_COLLECTION)) -#define DATABASE_SOURCE_COLLECTION_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_DATABASE_SOURCE_COLLECTION, DatabaseSourceCollectionClass)) - -typedef struct _DatabaseSourceCollection DatabaseSourceCollection; -typedef struct _DatabaseSourceCollectionClass DatabaseSourceCollectionClass; -typedef struct _DatabaseSourceCollectionPrivate DatabaseSourceCollectionPrivate; -#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL))) - -#define TYPE_SOURCE_HOLDING_TANK (source_holding_tank_get_type ()) -#define SOURCE_HOLDING_TANK(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_SOURCE_HOLDING_TANK, SourceHoldingTank)) -#define SOURCE_HOLDING_TANK_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_SOURCE_HOLDING_TANK, SourceHoldingTankClass)) -#define IS_SOURCE_HOLDING_TANK(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_SOURCE_HOLDING_TANK)) -#define IS_SOURCE_HOLDING_TANK_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_SOURCE_HOLDING_TANK)) -#define SOURCE_HOLDING_TANK_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_SOURCE_HOLDING_TANK, SourceHoldingTankClass)) - -typedef struct _SourceHoldingTank SourceHoldingTank; -typedef struct _SourceHoldingTankClass SourceHoldingTankClass; -typedef struct _SourceHoldingTankPrivate SourceHoldingTankPrivate; - -#define TYPE_DATABASE_SOURCE_HOLDING_TANK (database_source_holding_tank_get_type ()) -#define DATABASE_SOURCE_HOLDING_TANK(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_DATABASE_SOURCE_HOLDING_TANK, DatabaseSourceHoldingTank)) -#define DATABASE_SOURCE_HOLDING_TANK_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_DATABASE_SOURCE_HOLDING_TANK, DatabaseSourceHoldingTankClass)) -#define IS_DATABASE_SOURCE_HOLDING_TANK(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_DATABASE_SOURCE_HOLDING_TANK)) -#define IS_DATABASE_SOURCE_HOLDING_TANK_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_DATABASE_SOURCE_HOLDING_TANK)) -#define DATABASE_SOURCE_HOLDING_TANK_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_DATABASE_SOURCE_HOLDING_TANK, DatabaseSourceHoldingTankClass)) - -typedef struct _DatabaseSourceHoldingTank DatabaseSourceHoldingTank; -typedef struct _DatabaseSourceHoldingTankClass DatabaseSourceHoldingTankClass; -typedef struct _DatabaseSourceHoldingTankPrivate DatabaseSourceHoldingTankPrivate; -#define _vala_assert(expr, msg) if G_LIKELY (expr) ; else g_assertion_message_expr (G_LOG_DOMAIN, __FILE__, __LINE__, G_STRFUNC, msg); -#define _vala_return_if_fail(expr, msg) if G_LIKELY (expr) ; else { g_return_if_fail_warning (G_LOG_DOMAIN, G_STRFUNC, msg); return; } -#define _vala_return_val_if_fail(expr, msg, val) if G_LIKELY (expr) ; else { g_return_if_fail_warning (G_LOG_DOMAIN, G_STRFUNC, msg); return val; } -#define _vala_warn_if_fail(expr, msg) if G_LIKELY (expr) ; else g_warn_message (G_LOG_DOMAIN, __FILE__, __LINE__, G_STRFUNC, msg); - -typedef gint64 (*GetSourceDatabaseKey) (DataSource* source, void* user_data); -typedef gint64 (*Comparator) (void* a, void* b, void* user_data); -typedef gboolean (*ComparatorPredicate) (DataObject* object, Alteration* alteration, void* user_data); -typedef gboolean (*ProgressMonitor) (guint64 current, guint64 total, gboolean do_event_loop, void* user_data); -struct _MarkerIface { - GTypeInterface parent_iface; - void (*mark) (Marker* self, DataObject* object); - void (*unmark) (Marker* self, DataObject* object); - gboolean (*toggle) (Marker* self, DataObject* object); - void (*mark_many) (Marker* self, GeeCollection* list); - void (*unmark_many) (Marker* self, GeeCollection* list); - void (*mark_all) (Marker* self); - gint (*get_count) (Marker* self); - GeeCollection* (*get_all) (Marker* self); -}; - -struct _DataCollection { - GTypeInstance parent_instance; - volatile int ref_count; - DataCollectionPrivate * priv; -}; - -struct _DataCollectionClass { - GTypeClass parent_class; - void (*finalize) (DataCollection *self); - gchar* (*to_string) (DataCollection* self); - void (*notify_items_added) (DataCollection* self, GeeIterable* added); - void (*notify_items_removed) (DataCollection* self, GeeIterable* removed); - void (*notify_contents_altered) (DataCollection* self, GeeIterable* added, GeeIterable* removed); - void (*notify_items_altered) (DataCollection* self, GeeMap* items); - void (*notify_ordering_changed) (DataCollection* self); - void (*notify_property_set) (DataCollection* self, const gchar* name, GValue* old, GValue* val); - void (*notify_property_cleared) (DataCollection* self, const gchar* name); - gboolean (*valid_type) (DataCollection* self, DataObject* object); - void (*set_comparator) (DataCollection* self, Comparator comparator, void* comparator_target, ComparatorPredicate predicate, void* predicate_target); - void (*reset_comparator) (DataCollection* self); - GeeCollection* (*get_all) (DataCollection* self); - gint (*get_count) (DataCollection* self); - DataObject* (*get_at) (DataCollection* self, gint index); - gint (*index_of) (DataCollection* self, DataObject* object); - gboolean (*contains) (DataCollection* self, DataObject* object); - gboolean (*add) (DataCollection* self, DataObject* object); - GeeCollection* (*add_many) (DataCollection* self, GeeCollection* objects, ProgressMonitor monitor, void* monitor_target); - void (*remove_marked) (DataCollection* self, Marker* m); - void (*clear) (DataCollection* self); - void (*close) (DataCollection* self); - void (*notify_frozen) (DataCollection* self); - void (*notify_thawed) (DataCollection* self); - void (*items_added) (DataCollection* self, GeeIterable* added); - void (*items_removed) (DataCollection* self, GeeIterable* removed); - void (*contents_altered) (DataCollection* self, GeeIterable* added, GeeIterable* removed); - void (*items_altered) (DataCollection* self, GeeMap* items); - void (*ordering_changed) (DataCollection* self); - void (*property_set) (DataCollection* self, const gchar* name, GValue* old, GValue* val); - void (*property_cleared) (DataCollection* self, const gchar* name); - void (*frozen) (DataCollection* self); - void (*thawed) (DataCollection* self); -}; - -struct _SourceCollection { - DataCollection parent_instance; - SourceCollectionPrivate * priv; -}; - -struct _SourceCollectionClass { - DataCollectionClass parent_class; - gboolean (*holds_type_of_source) (SourceCollection* self, DataSource* source); - void (*notify_items_unlinking) (SourceCollection* self, GeeCollection* unlinking); - void (*notify_items_relinked) (SourceCollection* self, GeeCollection* relinked); - void (*notify_item_destroyed) (SourceCollection* self, DataSource* source); - void (*notify_items_destroyed) (SourceCollection* self, GeeCollection* destroyed); - void (*notify_unlinked_destroyed) (SourceCollection* self, DataSource* unlinked); - void (*notify_backlink_removed) (SourceCollection* self, SourceBacklink* backlink, GeeCollection* sources); - gboolean (*has_backlink) (SourceCollection* self, SourceBacklink* backlink); - void (*remove_backlink) (SourceCollection* self, SourceBacklink* backlink); - void (*items_unlinking) (SourceCollection* self, GeeCollection* unlinking); - void (*items_relinked) (SourceCollection* self, GeeCollection* relinked); - void (*item_destroyed) (SourceCollection* self, DataSource* source); - void (*items_destroyed) (SourceCollection* self, GeeCollection* destroyed); - void (*unlinked_destroyed) (SourceCollection* self, DataSource* source); - void (*backlink_removed) (SourceCollection* self, SourceBacklink* backlink, GeeCollection* sources); -}; - -struct _DatabaseSourceCollection { - SourceCollection parent_instance; - DatabaseSourceCollectionPrivate * priv; -}; - -struct _DatabaseSourceCollectionClass { - SourceCollectionClass parent_class; -}; - -struct _DatabaseSourceCollectionPrivate { - GetSourceDatabaseKey source_key_func; - gpointer source_key_func_target; - GeeHashMap* map; -}; - -struct _SourceHoldingTank { - GTypeInstance parent_instance; - volatile int ref_count; - SourceHoldingTankPrivate * priv; -}; - -struct _SourceHoldingTankClass { - GTypeClass parent_class; - void (*finalize) (SourceHoldingTank *self); - void (*notify_contents_altered) (SourceHoldingTank* self, GeeCollection* added, GeeCollection* removed); - void (*contents_altered) (SourceHoldingTank* self, GeeCollection* added, GeeCollection* removed); -}; - -struct _DatabaseSourceHoldingTank { - SourceHoldingTank parent_instance; - DatabaseSourceHoldingTankPrivate * priv; -}; - -struct _DatabaseSourceHoldingTankClass { - SourceHoldingTankClass parent_class; -}; - -struct _DatabaseSourceHoldingTankPrivate { - GetSourceDatabaseKey get_key; - gpointer get_key_target; - GeeHashMap* map; -}; - -typedef gboolean (*SourceHoldingTankCheckToKeep) (DataSource* source, Alteration* alteration, void* user_data); - -static gpointer database_source_collection_parent_class = NULL; -static gpointer database_source_holding_tank_parent_class = NULL; - -GType data_object_get_type (void) G_GNUC_CONST; -GType data_source_get_type (void) G_GNUC_CONST; -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; -gpointer alteration_ref (gpointer instance); -void alteration_unref (gpointer instance); -GParamSpec* param_spec_alteration (const gchar* name, - const gchar* nick, - const gchar* blurb, - GType object_type, - GParamFlags flags); -void value_set_alteration (GValue* value, - gpointer v_object); -void value_take_alteration (GValue* value, - gpointer v_object); -gpointer value_get_alteration (const GValue* value); -GType alteration_get_type (void) G_GNUC_CONST; -GType marker_get_type (void) G_GNUC_CONST; -GType source_collection_get_type (void) G_GNUC_CONST; -gpointer source_backlink_ref (gpointer instance); -void source_backlink_unref (gpointer instance); -GParamSpec* param_spec_source_backlink (const gchar* name, - const gchar* nick, - const gchar* blurb, - GType object_type, - GParamFlags flags); -void value_set_source_backlink (GValue* value, - gpointer v_object); -void value_take_source_backlink (GValue* value, - gpointer v_object); -gpointer value_get_source_backlink (const GValue* value); -GType source_backlink_get_type (void) G_GNUC_CONST; -GType database_source_collection_get_type (void) G_GNUC_CONST; -#define DATABASE_SOURCE_COLLECTION_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), TYPE_DATABASE_SOURCE_COLLECTION, DatabaseSourceCollectionPrivate)) -guint int64_hash (gint64* n); -static guint _int64_hash_gee_hash_data_func (gconstpointer v, - gpointer self); -gboolean int64_equal (gint64* a, - gint64* b); -static gboolean _int64_equal_gee_equal_data_func (gconstpointer a, - gconstpointer b, - gpointer self); -static gint64* _int64_dup (gint64* self); -DatabaseSourceCollection* database_source_collection_construct (GType object_type, - const gchar* name, - GetSourceDatabaseKey source_key_func, - void* source_key_func_target); -SourceCollection* source_collection_construct (GType object_type, - const gchar* name); -static void database_source_collection_real_notify_items_added (DataCollection* base, - GeeIterable* added); -void data_collection_notify_items_added (DataCollection* self, - GeeIterable* added); -static void database_source_collection_real_notify_items_removed (DataCollection* base, - GeeIterable* removed); -void data_collection_notify_items_removed (DataCollection* self, - GeeIterable* removed); -DataSource* database_source_collection_fetch_by_key (DatabaseSourceCollection* self, - gint64 key); -static void database_source_collection_finalize (DataCollection * obj); -gpointer source_holding_tank_ref (gpointer instance); -void source_holding_tank_unref (gpointer instance); -GParamSpec* param_spec_source_holding_tank (const gchar* name, - const gchar* nick, - const gchar* blurb, - GType object_type, - GParamFlags flags); -void value_set_source_holding_tank (GValue* value, - gpointer v_object); -void value_take_source_holding_tank (GValue* value, - gpointer v_object); -gpointer value_get_source_holding_tank (const GValue* value); -GType source_holding_tank_get_type (void) G_GNUC_CONST; -GType database_source_holding_tank_get_type (void) G_GNUC_CONST; -#define DATABASE_SOURCE_HOLDING_TANK_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), TYPE_DATABASE_SOURCE_HOLDING_TANK, DatabaseSourceHoldingTankPrivate)) -DatabaseSourceHoldingTank* database_source_holding_tank_new (SourceCollection* sources, - SourceHoldingTankCheckToKeep check_to_keep, - void* check_to_keep_target, - GetSourceDatabaseKey get_key, - void* get_key_target); -DatabaseSourceHoldingTank* database_source_holding_tank_construct (GType object_type, - SourceCollection* sources, - SourceHoldingTankCheckToKeep check_to_keep, - void* check_to_keep_target, - GetSourceDatabaseKey get_key, - void* get_key_target); -SourceHoldingTank* source_holding_tank_new (SourceCollection* sources, - SourceHoldingTankCheckToKeep check_to_keep, - void* check_to_keep_target); -SourceHoldingTank* source_holding_tank_construct (GType object_type, - SourceCollection* sources, - SourceHoldingTankCheckToKeep check_to_keep, - void* check_to_keep_target); -DataSource* database_source_holding_tank_get_by_id (DatabaseSourceHoldingTank* self, - gint64 id); -static void database_source_holding_tank_real_notify_contents_altered (SourceHoldingTank* base, - GeeCollection* added, - GeeCollection* removed); -void source_holding_tank_notify_contents_altered (SourceHoldingTank* self, - GeeCollection* added, - GeeCollection* removed); -static void database_source_holding_tank_finalize (SourceHoldingTank * obj); - - -static guint -_int64_hash_gee_hash_data_func (gconstpointer v, - gpointer self) -{ - guint result; - result = int64_hash ((gint64*) v); -#line 17 "/home/jens/Source/shotwell/src/core/DatabaseSourceCollection.vala" - return result; -#line 381 "DatabaseSourceCollection.c" -} - - -static gboolean -_int64_equal_gee_equal_data_func (gconstpointer a, - gconstpointer b, - gpointer self) -{ - gboolean result; - result = int64_equal ((gint64*) a, (gint64*) b); -#line 17 "/home/jens/Source/shotwell/src/core/DatabaseSourceCollection.vala" - return result; -#line 394 "DatabaseSourceCollection.c" -} - - -static gint64* -_int64_dup (gint64* self) -{ - gint64* dup; -#line 17 "/home/jens/Source/shotwell/src/core/DatabaseSourceCollection.vala" - dup = g_new0 (gint64, 1); -#line 17 "/home/jens/Source/shotwell/src/core/DatabaseSourceCollection.vala" - memcpy (dup, self, sizeof (gint64)); -#line 17 "/home/jens/Source/shotwell/src/core/DatabaseSourceCollection.vala" - return dup; -#line 408 "DatabaseSourceCollection.c" -} - - -DatabaseSourceCollection* -database_source_collection_construct (GType object_type, - const gchar* name, - GetSourceDatabaseKey source_key_func, - void* source_key_func_target) -{ - DatabaseSourceCollection* self = NULL; -#line 20 "/home/jens/Source/shotwell/src/core/DatabaseSourceCollection.vala" - g_return_val_if_fail (name != NULL, NULL); -#line 21 "/home/jens/Source/shotwell/src/core/DatabaseSourceCollection.vala" - self = (DatabaseSourceCollection*) source_collection_construct (object_type, name); -#line 23 "/home/jens/Source/shotwell/src/core/DatabaseSourceCollection.vala" - self->priv->source_key_func = source_key_func; -#line 23 "/home/jens/Source/shotwell/src/core/DatabaseSourceCollection.vala" - self->priv->source_key_func_target = source_key_func_target; -#line 20 "/home/jens/Source/shotwell/src/core/DatabaseSourceCollection.vala" - return self; -#line 429 "DatabaseSourceCollection.c" -} - - -static gpointer -_g_object_ref0 (gpointer self) -{ -#line 28 "/home/jens/Source/shotwell/src/core/DatabaseSourceCollection.vala" - return self ? g_object_ref (self) : NULL; -#line 438 "DatabaseSourceCollection.c" -} - - -static void -database_source_collection_real_notify_items_added (DataCollection* base, - GeeIterable* added) -{ - DatabaseSourceCollection * self; -#line 26 "/home/jens/Source/shotwell/src/core/DatabaseSourceCollection.vala" - self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_DATABASE_SOURCE_COLLECTION, DatabaseSourceCollection); -#line 26 "/home/jens/Source/shotwell/src/core/DatabaseSourceCollection.vala" - g_return_if_fail (GEE_IS_ITERABLE (added)); -#line 451 "DatabaseSourceCollection.c" - { - GeeIterator* _object_it = NULL; - GeeIterator* _tmp0_; -#line 27 "/home/jens/Source/shotwell/src/core/DatabaseSourceCollection.vala" - _tmp0_ = gee_iterable_iterator (added); -#line 27 "/home/jens/Source/shotwell/src/core/DatabaseSourceCollection.vala" - _object_it = _tmp0_; -#line 27 "/home/jens/Source/shotwell/src/core/DatabaseSourceCollection.vala" - while (TRUE) { -#line 461 "DatabaseSourceCollection.c" - GeeIterator* _tmp1_; - DataObject* object = NULL; - GeeIterator* _tmp2_; - gpointer _tmp3_; - DataSource* source = NULL; - DataObject* _tmp4_; - DataSource* _tmp5_; - gint64 key = 0LL; - GetSourceDatabaseKey _tmp6_; - void* _tmp6__target; - DataSource* _tmp7_; - GeeHashMap* _tmp8_; - gint64 _tmp9_; - GeeHashMap* _tmp10_; - gint64 _tmp11_; - DataSource* _tmp12_; -#line 27 "/home/jens/Source/shotwell/src/core/DatabaseSourceCollection.vala" - _tmp1_ = _object_it; -#line 27 "/home/jens/Source/shotwell/src/core/DatabaseSourceCollection.vala" - if (!gee_iterator_next (_tmp1_)) { -#line 27 "/home/jens/Source/shotwell/src/core/DatabaseSourceCollection.vala" - break; -#line 484 "DatabaseSourceCollection.c" - } -#line 27 "/home/jens/Source/shotwell/src/core/DatabaseSourceCollection.vala" - _tmp2_ = _object_it; -#line 27 "/home/jens/Source/shotwell/src/core/DatabaseSourceCollection.vala" - _tmp3_ = gee_iterator_get (_tmp2_); -#line 27 "/home/jens/Source/shotwell/src/core/DatabaseSourceCollection.vala" - object = (DataObject*) _tmp3_; -#line 28 "/home/jens/Source/shotwell/src/core/DatabaseSourceCollection.vala" - _tmp4_ = object; -#line 28 "/home/jens/Source/shotwell/src/core/DatabaseSourceCollection.vala" - _tmp5_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_CAST (_tmp4_, TYPE_DATA_SOURCE, DataSource)); -#line 28 "/home/jens/Source/shotwell/src/core/DatabaseSourceCollection.vala" - source = _tmp5_; -#line 29 "/home/jens/Source/shotwell/src/core/DatabaseSourceCollection.vala" - _tmp6_ = self->priv->source_key_func; -#line 29 "/home/jens/Source/shotwell/src/core/DatabaseSourceCollection.vala" - _tmp6__target = self->priv->source_key_func_target; -#line 29 "/home/jens/Source/shotwell/src/core/DatabaseSourceCollection.vala" - _tmp7_ = source; -#line 29 "/home/jens/Source/shotwell/src/core/DatabaseSourceCollection.vala" - key = _tmp6_ (_tmp7_, _tmp6__target); -#line 31 "/home/jens/Source/shotwell/src/core/DatabaseSourceCollection.vala" - _tmp8_ = self->priv->map; -#line 31 "/home/jens/Source/shotwell/src/core/DatabaseSourceCollection.vala" - _tmp9_ = key; -#line 31 "/home/jens/Source/shotwell/src/core/DatabaseSourceCollection.vala" - _vala_assert (!gee_abstract_map_has_key (G_TYPE_CHECK_INSTANCE_CAST (_tmp8_, GEE_TYPE_ABSTRACT_MAP, GeeAbstractMap), &_tmp9_), "!map.has_key(key)"); -#line 33 "/home/jens/Source/shotwell/src/core/DatabaseSourceCollection.vala" - _tmp10_ = self->priv->map; -#line 33 "/home/jens/Source/shotwell/src/core/DatabaseSourceCollection.vala" - _tmp11_ = key; -#line 33 "/home/jens/Source/shotwell/src/core/DatabaseSourceCollection.vala" - _tmp12_ = source; -#line 33 "/home/jens/Source/shotwell/src/core/DatabaseSourceCollection.vala" - gee_abstract_map_set (G_TYPE_CHECK_INSTANCE_CAST (_tmp10_, GEE_TYPE_ABSTRACT_MAP, GeeAbstractMap), &_tmp11_, _tmp12_); -#line 27 "/home/jens/Source/shotwell/src/core/DatabaseSourceCollection.vala" - _g_object_unref0 (source); -#line 27 "/home/jens/Source/shotwell/src/core/DatabaseSourceCollection.vala" - _g_object_unref0 (object); -#line 524 "DatabaseSourceCollection.c" - } -#line 27 "/home/jens/Source/shotwell/src/core/DatabaseSourceCollection.vala" - _g_object_unref0 (_object_it); -#line 528 "DatabaseSourceCollection.c" - } -#line 36 "/home/jens/Source/shotwell/src/core/DatabaseSourceCollection.vala" - DATA_COLLECTION_CLASS (database_source_collection_parent_class)->notify_items_added (G_TYPE_CHECK_INSTANCE_CAST (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_SOURCE_COLLECTION, SourceCollection), TYPE_DATA_COLLECTION, DataCollection), added); -#line 532 "DatabaseSourceCollection.c" -} - - -static void -database_source_collection_real_notify_items_removed (DataCollection* base, - GeeIterable* removed) -{ - DatabaseSourceCollection * self; -#line 39 "/home/jens/Source/shotwell/src/core/DatabaseSourceCollection.vala" - self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_DATABASE_SOURCE_COLLECTION, DatabaseSourceCollection); -#line 39 "/home/jens/Source/shotwell/src/core/DatabaseSourceCollection.vala" - g_return_if_fail (GEE_IS_ITERABLE (removed)); -#line 545 "DatabaseSourceCollection.c" - { - GeeIterator* _object_it = NULL; - GeeIterator* _tmp0_; -#line 40 "/home/jens/Source/shotwell/src/core/DatabaseSourceCollection.vala" - _tmp0_ = gee_iterable_iterator (removed); -#line 40 "/home/jens/Source/shotwell/src/core/DatabaseSourceCollection.vala" - _object_it = _tmp0_; -#line 40 "/home/jens/Source/shotwell/src/core/DatabaseSourceCollection.vala" - while (TRUE) { -#line 555 "DatabaseSourceCollection.c" - GeeIterator* _tmp1_; - DataObject* object = NULL; - GeeIterator* _tmp2_; - gpointer _tmp3_; - gint64 key = 0LL; - GetSourceDatabaseKey _tmp4_; - void* _tmp4__target; - DataObject* _tmp5_; - gboolean is_removed = FALSE; - GeeHashMap* _tmp6_; - gint64 _tmp7_; - gboolean _tmp8_; - gboolean _tmp9_; -#line 40 "/home/jens/Source/shotwell/src/core/DatabaseSourceCollection.vala" - _tmp1_ = _object_it; -#line 40 "/home/jens/Source/shotwell/src/core/DatabaseSourceCollection.vala" - if (!gee_iterator_next (_tmp1_)) { -#line 40 "/home/jens/Source/shotwell/src/core/DatabaseSourceCollection.vala" - break; -#line 575 "DatabaseSourceCollection.c" - } -#line 40 "/home/jens/Source/shotwell/src/core/DatabaseSourceCollection.vala" - _tmp2_ = _object_it; -#line 40 "/home/jens/Source/shotwell/src/core/DatabaseSourceCollection.vala" - _tmp3_ = gee_iterator_get (_tmp2_); -#line 40 "/home/jens/Source/shotwell/src/core/DatabaseSourceCollection.vala" - object = (DataObject*) _tmp3_; -#line 41 "/home/jens/Source/shotwell/src/core/DatabaseSourceCollection.vala" - _tmp4_ = self->priv->source_key_func; -#line 41 "/home/jens/Source/shotwell/src/core/DatabaseSourceCollection.vala" - _tmp4__target = self->priv->source_key_func_target; -#line 41 "/home/jens/Source/shotwell/src/core/DatabaseSourceCollection.vala" - _tmp5_ = object; -#line 41 "/home/jens/Source/shotwell/src/core/DatabaseSourceCollection.vala" - key = _tmp4_ (G_TYPE_CHECK_INSTANCE_CAST (_tmp5_, TYPE_DATA_SOURCE, DataSource), _tmp4__target); -#line 43 "/home/jens/Source/shotwell/src/core/DatabaseSourceCollection.vala" - _tmp6_ = self->priv->map; -#line 43 "/home/jens/Source/shotwell/src/core/DatabaseSourceCollection.vala" - _tmp7_ = key; -#line 43 "/home/jens/Source/shotwell/src/core/DatabaseSourceCollection.vala" - _tmp8_ = gee_abstract_map_unset (G_TYPE_CHECK_INSTANCE_CAST (_tmp6_, GEE_TYPE_ABSTRACT_MAP, GeeAbstractMap), &_tmp7_, NULL); -#line 43 "/home/jens/Source/shotwell/src/core/DatabaseSourceCollection.vala" - is_removed = _tmp8_; -#line 44 "/home/jens/Source/shotwell/src/core/DatabaseSourceCollection.vala" - _tmp9_ = is_removed; -#line 44 "/home/jens/Source/shotwell/src/core/DatabaseSourceCollection.vala" - _vala_assert (_tmp9_, "is_removed"); -#line 40 "/home/jens/Source/shotwell/src/core/DatabaseSourceCollection.vala" - _g_object_unref0 (object); -#line 605 "DatabaseSourceCollection.c" - } -#line 40 "/home/jens/Source/shotwell/src/core/DatabaseSourceCollection.vala" - _g_object_unref0 (_object_it); -#line 609 "DatabaseSourceCollection.c" - } -#line 47 "/home/jens/Source/shotwell/src/core/DatabaseSourceCollection.vala" - DATA_COLLECTION_CLASS (database_source_collection_parent_class)->notify_items_removed (G_TYPE_CHECK_INSTANCE_CAST (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_SOURCE_COLLECTION, SourceCollection), TYPE_DATA_COLLECTION, DataCollection), removed); -#line 613 "DatabaseSourceCollection.c" -} - - -DataSource* -database_source_collection_fetch_by_key (DatabaseSourceCollection* self, - gint64 key) -{ - DataSource* result = NULL; - GeeHashMap* _tmp0_; - gpointer _tmp1_; -#line 50 "/home/jens/Source/shotwell/src/core/DatabaseSourceCollection.vala" - g_return_val_if_fail (IS_DATABASE_SOURCE_COLLECTION (self), NULL); -#line 51 "/home/jens/Source/shotwell/src/core/DatabaseSourceCollection.vala" - _tmp0_ = self->priv->map; -#line 51 "/home/jens/Source/shotwell/src/core/DatabaseSourceCollection.vala" - _tmp1_ = gee_abstract_map_get (G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, GEE_TYPE_ABSTRACT_MAP, GeeAbstractMap), &key); -#line 51 "/home/jens/Source/shotwell/src/core/DatabaseSourceCollection.vala" - result = (DataSource*) _tmp1_; -#line 51 "/home/jens/Source/shotwell/src/core/DatabaseSourceCollection.vala" - return result; -#line 634 "DatabaseSourceCollection.c" -} - - -static void -database_source_collection_class_init (DatabaseSourceCollectionClass * klass) -{ -#line 15 "/home/jens/Source/shotwell/src/core/DatabaseSourceCollection.vala" - database_source_collection_parent_class = g_type_class_peek_parent (klass); -#line 15 "/home/jens/Source/shotwell/src/core/DatabaseSourceCollection.vala" - ((DataCollectionClass *) klass)->finalize = database_source_collection_finalize; -#line 15 "/home/jens/Source/shotwell/src/core/DatabaseSourceCollection.vala" - g_type_class_add_private (klass, sizeof (DatabaseSourceCollectionPrivate)); -#line 15 "/home/jens/Source/shotwell/src/core/DatabaseSourceCollection.vala" - ((DataCollectionClass *) klass)->notify_items_added = (void (*) (DataCollection *, GeeIterable*)) database_source_collection_real_notify_items_added; -#line 15 "/home/jens/Source/shotwell/src/core/DatabaseSourceCollection.vala" - ((DataCollectionClass *) klass)->notify_items_removed = (void (*) (DataCollection *, GeeIterable*)) database_source_collection_real_notify_items_removed; -#line 651 "DatabaseSourceCollection.c" -} - - -static void -database_source_collection_instance_init (DatabaseSourceCollection * self) -{ - GeeHashMap* _tmp0_; -#line 15 "/home/jens/Source/shotwell/src/core/DatabaseSourceCollection.vala" - self->priv = DATABASE_SOURCE_COLLECTION_GET_PRIVATE (self); -#line 17 "/home/jens/Source/shotwell/src/core/DatabaseSourceCollection.vala" - _tmp0_ = gee_hash_map_new (G_TYPE_INT64, (GBoxedCopyFunc) _int64_dup, (GDestroyNotify) g_free, TYPE_DATA_SOURCE, (GBoxedCopyFunc) g_object_ref, (GDestroyNotify) g_object_unref, _int64_hash_gee_hash_data_func, NULL, NULL, _int64_equal_gee_equal_data_func, NULL, NULL, NULL, NULL, NULL); -#line 17 "/home/jens/Source/shotwell/src/core/DatabaseSourceCollection.vala" - self->priv->map = _tmp0_; -#line 665 "DatabaseSourceCollection.c" -} - - -static void -database_source_collection_finalize (DataCollection * obj) -{ - DatabaseSourceCollection * self; -#line 15 "/home/jens/Source/shotwell/src/core/DatabaseSourceCollection.vala" - self = G_TYPE_CHECK_INSTANCE_CAST (obj, TYPE_DATABASE_SOURCE_COLLECTION, DatabaseSourceCollection); -#line 17 "/home/jens/Source/shotwell/src/core/DatabaseSourceCollection.vala" - _g_object_unref0 (self->priv->map); -#line 15 "/home/jens/Source/shotwell/src/core/DatabaseSourceCollection.vala" - DATA_COLLECTION_CLASS (database_source_collection_parent_class)->finalize (obj); -#line 679 "DatabaseSourceCollection.c" -} - - -GType -database_source_collection_get_type (void) -{ - static volatile gsize database_source_collection_type_id__volatile = 0; - if (g_once_init_enter (&database_source_collection_type_id__volatile)) { - static const GTypeInfo g_define_type_info = { sizeof (DatabaseSourceCollectionClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) database_source_collection_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (DatabaseSourceCollection), 0, (GInstanceInitFunc) database_source_collection_instance_init, NULL }; - GType database_source_collection_type_id; - database_source_collection_type_id = g_type_register_static (TYPE_SOURCE_COLLECTION, "DatabaseSourceCollection", &g_define_type_info, G_TYPE_FLAG_ABSTRACT); - g_once_init_leave (&database_source_collection_type_id__volatile, database_source_collection_type_id); - } - return database_source_collection_type_id__volatile; -} - - -DatabaseSourceHoldingTank* -database_source_holding_tank_construct (GType object_type, - SourceCollection* sources, - SourceHoldingTankCheckToKeep check_to_keep, - void* check_to_keep_target, - GetSourceDatabaseKey get_key, - void* get_key_target) -{ - DatabaseSourceHoldingTank* self = NULL; -#line 60 "/home/jens/Source/shotwell/src/core/DatabaseSourceCollection.vala" - g_return_val_if_fail (IS_SOURCE_COLLECTION (sources), NULL); -#line 62 "/home/jens/Source/shotwell/src/core/DatabaseSourceCollection.vala" - self = (DatabaseSourceHoldingTank*) source_holding_tank_construct (object_type, sources, check_to_keep, check_to_keep_target); -#line 64 "/home/jens/Source/shotwell/src/core/DatabaseSourceCollection.vala" - self->priv->get_key = get_key; -#line 64 "/home/jens/Source/shotwell/src/core/DatabaseSourceCollection.vala" - self->priv->get_key_target = get_key_target; -#line 60 "/home/jens/Source/shotwell/src/core/DatabaseSourceCollection.vala" - return self; -#line 716 "DatabaseSourceCollection.c" -} - - -DatabaseSourceHoldingTank* -database_source_holding_tank_new (SourceCollection* sources, - SourceHoldingTankCheckToKeep check_to_keep, - void* check_to_keep_target, - GetSourceDatabaseKey get_key, - void* get_key_target) -{ -#line 60 "/home/jens/Source/shotwell/src/core/DatabaseSourceCollection.vala" - return database_source_holding_tank_construct (TYPE_DATABASE_SOURCE_HOLDING_TANK, sources, check_to_keep, check_to_keep_target, get_key, get_key_target); -#line 729 "DatabaseSourceCollection.c" -} - - -DataSource* -database_source_holding_tank_get_by_id (DatabaseSourceHoldingTank* self, - gint64 id) -{ - DataSource* result = NULL; - GeeHashMap* _tmp0_; - gpointer _tmp1_; -#line 67 "/home/jens/Source/shotwell/src/core/DatabaseSourceCollection.vala" - g_return_val_if_fail (IS_DATABASE_SOURCE_HOLDING_TANK (self), NULL); -#line 68 "/home/jens/Source/shotwell/src/core/DatabaseSourceCollection.vala" - _tmp0_ = self->priv->map; -#line 68 "/home/jens/Source/shotwell/src/core/DatabaseSourceCollection.vala" - _tmp1_ = gee_abstract_map_get (G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, GEE_TYPE_ABSTRACT_MAP, GeeAbstractMap), &id); -#line 68 "/home/jens/Source/shotwell/src/core/DatabaseSourceCollection.vala" - result = (DataSource*) _tmp1_; -#line 68 "/home/jens/Source/shotwell/src/core/DatabaseSourceCollection.vala" - return result; -#line 750 "DatabaseSourceCollection.c" -} - - -static void -database_source_holding_tank_real_notify_contents_altered (SourceHoldingTank* base, - GeeCollection* added, - GeeCollection* removed) -{ - DatabaseSourceHoldingTank * self; -#line 71 "/home/jens/Source/shotwell/src/core/DatabaseSourceCollection.vala" - self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_DATABASE_SOURCE_HOLDING_TANK, DatabaseSourceHoldingTank); -#line 71 "/home/jens/Source/shotwell/src/core/DatabaseSourceCollection.vala" - g_return_if_fail ((added == NULL) || GEE_IS_COLLECTION (added)); -#line 71 "/home/jens/Source/shotwell/src/core/DatabaseSourceCollection.vala" - g_return_if_fail ((removed == NULL) || GEE_IS_COLLECTION (removed)); -#line 73 "/home/jens/Source/shotwell/src/core/DatabaseSourceCollection.vala" - if (added != NULL) { -#line 768 "DatabaseSourceCollection.c" - { - GeeIterator* _source_it = NULL; - GeeIterator* _tmp0_; -#line 74 "/home/jens/Source/shotwell/src/core/DatabaseSourceCollection.vala" - _tmp0_ = gee_iterable_iterator (G_TYPE_CHECK_INSTANCE_CAST (added, GEE_TYPE_ITERABLE, GeeIterable)); -#line 74 "/home/jens/Source/shotwell/src/core/DatabaseSourceCollection.vala" - _source_it = _tmp0_; -#line 74 "/home/jens/Source/shotwell/src/core/DatabaseSourceCollection.vala" - while (TRUE) { -#line 778 "DatabaseSourceCollection.c" - GeeIterator* _tmp1_; - DataSource* source = NULL; - GeeIterator* _tmp2_; - gpointer _tmp3_; - GeeHashMap* _tmp4_; - GetSourceDatabaseKey _tmp5_; - void* _tmp5__target; - DataSource* _tmp6_; - gint64 _tmp7_; - DataSource* _tmp8_; -#line 74 "/home/jens/Source/shotwell/src/core/DatabaseSourceCollection.vala" - _tmp1_ = _source_it; -#line 74 "/home/jens/Source/shotwell/src/core/DatabaseSourceCollection.vala" - if (!gee_iterator_next (_tmp1_)) { -#line 74 "/home/jens/Source/shotwell/src/core/DatabaseSourceCollection.vala" - break; -#line 795 "DatabaseSourceCollection.c" - } -#line 74 "/home/jens/Source/shotwell/src/core/DatabaseSourceCollection.vala" - _tmp2_ = _source_it; -#line 74 "/home/jens/Source/shotwell/src/core/DatabaseSourceCollection.vala" - _tmp3_ = gee_iterator_get (_tmp2_); -#line 74 "/home/jens/Source/shotwell/src/core/DatabaseSourceCollection.vala" - source = (DataSource*) _tmp3_; -#line 75 "/home/jens/Source/shotwell/src/core/DatabaseSourceCollection.vala" - _tmp4_ = self->priv->map; -#line 75 "/home/jens/Source/shotwell/src/core/DatabaseSourceCollection.vala" - _tmp5_ = self->priv->get_key; -#line 75 "/home/jens/Source/shotwell/src/core/DatabaseSourceCollection.vala" - _tmp5__target = self->priv->get_key_target; -#line 75 "/home/jens/Source/shotwell/src/core/DatabaseSourceCollection.vala" - _tmp6_ = source; -#line 75 "/home/jens/Source/shotwell/src/core/DatabaseSourceCollection.vala" - _tmp7_ = _tmp5_ (_tmp6_, _tmp5__target); -#line 75 "/home/jens/Source/shotwell/src/core/DatabaseSourceCollection.vala" - _tmp8_ = source; -#line 75 "/home/jens/Source/shotwell/src/core/DatabaseSourceCollection.vala" - gee_abstract_map_set (G_TYPE_CHECK_INSTANCE_CAST (_tmp4_, GEE_TYPE_ABSTRACT_MAP, GeeAbstractMap), &_tmp7_, _tmp8_); -#line 74 "/home/jens/Source/shotwell/src/core/DatabaseSourceCollection.vala" - _g_object_unref0 (source); -#line 819 "DatabaseSourceCollection.c" - } -#line 74 "/home/jens/Source/shotwell/src/core/DatabaseSourceCollection.vala" - _g_object_unref0 (_source_it); -#line 823 "DatabaseSourceCollection.c" - } - } -#line 78 "/home/jens/Source/shotwell/src/core/DatabaseSourceCollection.vala" - if (removed != NULL) { -#line 828 "DatabaseSourceCollection.c" - { - GeeIterator* _source_it = NULL; - GeeIterator* _tmp9_; -#line 79 "/home/jens/Source/shotwell/src/core/DatabaseSourceCollection.vala" - _tmp9_ = gee_iterable_iterator (G_TYPE_CHECK_INSTANCE_CAST (removed, GEE_TYPE_ITERABLE, GeeIterable)); -#line 79 "/home/jens/Source/shotwell/src/core/DatabaseSourceCollection.vala" - _source_it = _tmp9_; -#line 79 "/home/jens/Source/shotwell/src/core/DatabaseSourceCollection.vala" - while (TRUE) { -#line 838 "DatabaseSourceCollection.c" - GeeIterator* _tmp10_; - DataSource* source = NULL; - GeeIterator* _tmp11_; - gpointer _tmp12_; - GeeHashMap* _tmp13_; - GetSourceDatabaseKey _tmp14_; - void* _tmp14__target; - DataSource* _tmp15_; - gint64 _tmp16_; -#line 79 "/home/jens/Source/shotwell/src/core/DatabaseSourceCollection.vala" - _tmp10_ = _source_it; -#line 79 "/home/jens/Source/shotwell/src/core/DatabaseSourceCollection.vala" - if (!gee_iterator_next (_tmp10_)) { -#line 79 "/home/jens/Source/shotwell/src/core/DatabaseSourceCollection.vala" - break; -#line 854 "DatabaseSourceCollection.c" - } -#line 79 "/home/jens/Source/shotwell/src/core/DatabaseSourceCollection.vala" - _tmp11_ = _source_it; -#line 79 "/home/jens/Source/shotwell/src/core/DatabaseSourceCollection.vala" - _tmp12_ = gee_iterator_get (_tmp11_); -#line 79 "/home/jens/Source/shotwell/src/core/DatabaseSourceCollection.vala" - source = (DataSource*) _tmp12_; -#line 80 "/home/jens/Source/shotwell/src/core/DatabaseSourceCollection.vala" - _tmp13_ = self->priv->map; -#line 80 "/home/jens/Source/shotwell/src/core/DatabaseSourceCollection.vala" - _tmp14_ = self->priv->get_key; -#line 80 "/home/jens/Source/shotwell/src/core/DatabaseSourceCollection.vala" - _tmp14__target = self->priv->get_key_target; -#line 80 "/home/jens/Source/shotwell/src/core/DatabaseSourceCollection.vala" - _tmp15_ = source; -#line 80 "/home/jens/Source/shotwell/src/core/DatabaseSourceCollection.vala" - _tmp16_ = _tmp14_ (_tmp15_, _tmp14__target); -#line 80 "/home/jens/Source/shotwell/src/core/DatabaseSourceCollection.vala" - gee_abstract_map_unset (G_TYPE_CHECK_INSTANCE_CAST (_tmp13_, GEE_TYPE_ABSTRACT_MAP, GeeAbstractMap), &_tmp16_, NULL); -#line 79 "/home/jens/Source/shotwell/src/core/DatabaseSourceCollection.vala" - _g_object_unref0 (source); -#line 876 "DatabaseSourceCollection.c" - } -#line 79 "/home/jens/Source/shotwell/src/core/DatabaseSourceCollection.vala" - _g_object_unref0 (_source_it); -#line 880 "DatabaseSourceCollection.c" - } - } -#line 83 "/home/jens/Source/shotwell/src/core/DatabaseSourceCollection.vala" - SOURCE_HOLDING_TANK_CLASS (database_source_holding_tank_parent_class)->notify_contents_altered (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_SOURCE_HOLDING_TANK, SourceHoldingTank), added, removed); -#line 885 "DatabaseSourceCollection.c" -} - - -static void -database_source_holding_tank_class_init (DatabaseSourceHoldingTankClass * klass) -{ -#line 55 "/home/jens/Source/shotwell/src/core/DatabaseSourceCollection.vala" - database_source_holding_tank_parent_class = g_type_class_peek_parent (klass); -#line 55 "/home/jens/Source/shotwell/src/core/DatabaseSourceCollection.vala" - ((SourceHoldingTankClass *) klass)->finalize = database_source_holding_tank_finalize; -#line 55 "/home/jens/Source/shotwell/src/core/DatabaseSourceCollection.vala" - g_type_class_add_private (klass, sizeof (DatabaseSourceHoldingTankPrivate)); -#line 55 "/home/jens/Source/shotwell/src/core/DatabaseSourceCollection.vala" - ((SourceHoldingTankClass *) klass)->notify_contents_altered = (void (*) (SourceHoldingTank *, GeeCollection*, GeeCollection*)) database_source_holding_tank_real_notify_contents_altered; -#line 900 "DatabaseSourceCollection.c" -} - - -static void -database_source_holding_tank_instance_init (DatabaseSourceHoldingTank * self) -{ - GeeHashMap* _tmp0_; -#line 55 "/home/jens/Source/shotwell/src/core/DatabaseSourceCollection.vala" - self->priv = DATABASE_SOURCE_HOLDING_TANK_GET_PRIVATE (self); -#line 57 "/home/jens/Source/shotwell/src/core/DatabaseSourceCollection.vala" - _tmp0_ = gee_hash_map_new (G_TYPE_INT64, (GBoxedCopyFunc) _int64_dup, (GDestroyNotify) g_free, TYPE_DATA_SOURCE, (GBoxedCopyFunc) g_object_ref, (GDestroyNotify) g_object_unref, _int64_hash_gee_hash_data_func, NULL, NULL, _int64_equal_gee_equal_data_func, NULL, NULL, NULL, NULL, NULL); -#line 57 "/home/jens/Source/shotwell/src/core/DatabaseSourceCollection.vala" - self->priv->map = _tmp0_; -#line 914 "DatabaseSourceCollection.c" -} - - -static void -database_source_holding_tank_finalize (SourceHoldingTank * obj) -{ - DatabaseSourceHoldingTank * self; -#line 55 "/home/jens/Source/shotwell/src/core/DatabaseSourceCollection.vala" - self = G_TYPE_CHECK_INSTANCE_CAST (obj, TYPE_DATABASE_SOURCE_HOLDING_TANK, DatabaseSourceHoldingTank); -#line 57 "/home/jens/Source/shotwell/src/core/DatabaseSourceCollection.vala" - _g_object_unref0 (self->priv->map); -#line 55 "/home/jens/Source/shotwell/src/core/DatabaseSourceCollection.vala" - SOURCE_HOLDING_TANK_CLASS (database_source_holding_tank_parent_class)->finalize (obj); -#line 928 "DatabaseSourceCollection.c" -} - - -GType -database_source_holding_tank_get_type (void) -{ - static volatile gsize database_source_holding_tank_type_id__volatile = 0; - if (g_once_init_enter (&database_source_holding_tank_type_id__volatile)) { - static const GTypeInfo g_define_type_info = { sizeof (DatabaseSourceHoldingTankClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) database_source_holding_tank_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (DatabaseSourceHoldingTank), 0, (GInstanceInitFunc) database_source_holding_tank_instance_init, NULL }; - GType database_source_holding_tank_type_id; - database_source_holding_tank_type_id = g_type_register_static (TYPE_SOURCE_HOLDING_TANK, "DatabaseSourceHoldingTank", &g_define_type_info, 0); - g_once_init_leave (&database_source_holding_tank_type_id__volatile, database_source_holding_tank_type_id); - } - return database_source_holding_tank_type_id__volatile; -} - - - diff --git a/src/core/SourceCollection.c b/src/core/SourceCollection.c deleted file mode 100644 index 9de9400..0000000 --- a/src/core/SourceCollection.c +++ /dev/null @@ -1,1807 +0,0 @@ -/* SourceCollection.c generated by valac 0.40.4, the Vala compiler - * generated from SourceCollection.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 <gee.h> - - -#define TYPE_DATA_COLLECTION (data_collection_get_type ()) -#define DATA_COLLECTION(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_DATA_COLLECTION, DataCollection)) -#define DATA_COLLECTION_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_DATA_COLLECTION, DataCollectionClass)) -#define IS_DATA_COLLECTION(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_DATA_COLLECTION)) -#define IS_DATA_COLLECTION_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_DATA_COLLECTION)) -#define DATA_COLLECTION_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_DATA_COLLECTION, DataCollectionClass)) - -typedef struct _DataCollection DataCollection; -typedef struct _DataCollectionClass DataCollectionClass; -typedef struct _DataCollectionPrivate DataCollectionPrivate; - -#define TYPE_DATA_OBJECT (data_object_get_type ()) -#define DATA_OBJECT(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_DATA_OBJECT, DataObject)) -#define DATA_OBJECT_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_DATA_OBJECT, DataObjectClass)) -#define IS_DATA_OBJECT(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_DATA_OBJECT)) -#define IS_DATA_OBJECT_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_DATA_OBJECT)) -#define DATA_OBJECT_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_DATA_OBJECT, DataObjectClass)) - -typedef struct _DataObject DataObject; -typedef struct _DataObjectClass DataObjectClass; - -#define TYPE_ALTERATION (alteration_get_type ()) -#define ALTERATION(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_ALTERATION, Alteration)) -#define ALTERATION_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_ALTERATION, AlterationClass)) -#define IS_ALTERATION(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_ALTERATION)) -#define IS_ALTERATION_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_ALTERATION)) -#define ALTERATION_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_ALTERATION, AlterationClass)) - -typedef struct _Alteration Alteration; -typedef struct _AlterationClass AlterationClass; - -#define TYPE_MARKER (marker_get_type ()) -#define MARKER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_MARKER, Marker)) -#define IS_MARKER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_MARKER)) -#define MARKER_GET_INTERFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE ((obj), TYPE_MARKER, MarkerIface)) - -typedef struct _Marker Marker; -typedef struct _MarkerIface MarkerIface; - -#define TYPE_SOURCE_COLLECTION (source_collection_get_type ()) -#define SOURCE_COLLECTION(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_SOURCE_COLLECTION, SourceCollection)) -#define SOURCE_COLLECTION_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_SOURCE_COLLECTION, SourceCollectionClass)) -#define IS_SOURCE_COLLECTION(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_SOURCE_COLLECTION)) -#define IS_SOURCE_COLLECTION_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_SOURCE_COLLECTION)) -#define SOURCE_COLLECTION_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_SOURCE_COLLECTION, SourceCollectionClass)) - -typedef struct _SourceCollection SourceCollection; -typedef struct _SourceCollectionClass SourceCollectionClass; -typedef struct _SourceCollectionPrivate SourceCollectionPrivate; - -#define TYPE_DATA_SOURCE (data_source_get_type ()) -#define DATA_SOURCE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_DATA_SOURCE, DataSource)) -#define DATA_SOURCE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_DATA_SOURCE, DataSourceClass)) -#define IS_DATA_SOURCE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_DATA_SOURCE)) -#define IS_DATA_SOURCE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_DATA_SOURCE)) -#define DATA_SOURCE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_DATA_SOURCE, DataSourceClass)) - -typedef struct _DataSource DataSource; -typedef struct _DataSourceClass DataSourceClass; - -#define TYPE_SOURCE_BACKLINK (source_backlink_get_type ()) -#define SOURCE_BACKLINK(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_SOURCE_BACKLINK, SourceBacklink)) -#define SOURCE_BACKLINK_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_SOURCE_BACKLINK, SourceBacklinkClass)) -#define IS_SOURCE_BACKLINK(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_SOURCE_BACKLINK)) -#define IS_SOURCE_BACKLINK_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_SOURCE_BACKLINK)) -#define SOURCE_BACKLINK_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_SOURCE_BACKLINK, SourceBacklinkClass)) - -typedef struct _SourceBacklink SourceBacklink; -typedef struct _SourceBacklinkClass SourceBacklinkClass; -#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL))) - -#define TYPE_THUMBNAIL_SOURCE (thumbnail_source_get_type ()) -#define THUMBNAIL_SOURCE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_THUMBNAIL_SOURCE, ThumbnailSource)) -#define THUMBNAIL_SOURCE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_THUMBNAIL_SOURCE, ThumbnailSourceClass)) -#define IS_THUMBNAIL_SOURCE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_THUMBNAIL_SOURCE)) -#define IS_THUMBNAIL_SOURCE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_THUMBNAIL_SOURCE)) -#define THUMBNAIL_SOURCE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_THUMBNAIL_SOURCE, ThumbnailSourceClass)) - -typedef struct _ThumbnailSource ThumbnailSource; -typedef struct _ThumbnailSourceClass ThumbnailSourceClass; - -#define TYPE_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 SOURCE_COLLECTION_TYPE_DESTROY_COUNTER (source_collection_destroy_counter_get_type ()) -#define SOURCE_COLLECTION_DESTROY_COUNTER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), SOURCE_COLLECTION_TYPE_DESTROY_COUNTER, SourceCollectionDestroyCounter)) -#define SOURCE_COLLECTION_DESTROY_COUNTER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), SOURCE_COLLECTION_TYPE_DESTROY_COUNTER, SourceCollectionDestroyCounterClass)) -#define SOURCE_COLLECTION_IS_DESTROY_COUNTER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), SOURCE_COLLECTION_TYPE_DESTROY_COUNTER)) -#define SOURCE_COLLECTION_IS_DESTROY_COUNTER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), SOURCE_COLLECTION_TYPE_DESTROY_COUNTER)) -#define SOURCE_COLLECTION_DESTROY_COUNTER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), SOURCE_COLLECTION_TYPE_DESTROY_COUNTER, SourceCollectionDestroyCounterClass)) - -typedef struct _SourceCollectionDestroyCounter SourceCollectionDestroyCounter; -typedef struct _SourceCollectionDestroyCounterClass SourceCollectionDestroyCounterClass; -typedef struct _SourceCollectionDestroyCounterPrivate SourceCollectionDestroyCounterPrivate; -#define _g_error_free0(var) ((var == NULL) ? NULL : (var = (g_error_free (var), NULL))) -enum { - SOURCE_COLLECTION_DESTROY_COUNTER_0_PROPERTY, - SOURCE_COLLECTION_DESTROY_COUNTER_NUM_PROPERTIES -}; -static GParamSpec* source_collection_destroy_counter_properties[SOURCE_COLLECTION_DESTROY_COUNTER_NUM_PROPERTIES]; -enum { - SOURCE_COLLECTION_ITEMS_UNLINKING_SIGNAL, - SOURCE_COLLECTION_ITEMS_RELINKED_SIGNAL, - SOURCE_COLLECTION_ITEM_DESTROYED_SIGNAL, - SOURCE_COLLECTION_ITEMS_DESTROYED_SIGNAL, - SOURCE_COLLECTION_UNLINKED_DESTROYED_SIGNAL, - SOURCE_COLLECTION_BACKLINK_REMOVED_SIGNAL, - SOURCE_COLLECTION_NUM_SIGNALS -}; -static guint source_collection_signals[SOURCE_COLLECTION_NUM_SIGNALS] = {0}; -#define _vala_assert(expr, msg) if G_LIKELY (expr) ; else g_assertion_message_expr (G_LOG_DOMAIN, __FILE__, __LINE__, G_STRFUNC, msg); -#define _vala_return_if_fail(expr, msg) if G_LIKELY (expr) ; else { g_return_if_fail_warning (G_LOG_DOMAIN, G_STRFUNC, msg); return; } -#define _vala_return_val_if_fail(expr, msg, val) if G_LIKELY (expr) ; else { g_return_if_fail_warning (G_LOG_DOMAIN, G_STRFUNC, msg); return val; } -#define _vala_warn_if_fail(expr, msg) if G_LIKELY (expr) ; else g_warn_message (G_LOG_DOMAIN, __FILE__, __LINE__, G_STRFUNC, msg); - -typedef gint64 (*Comparator) (void* a, void* b, void* user_data); -typedef gboolean (*ComparatorPredicate) (DataObject* object, Alteration* alteration, void* user_data); -typedef gboolean (*ProgressMonitor) (guint64 current, guint64 total, gboolean do_event_loop, void* user_data); -struct _MarkerIface { - GTypeInterface parent_iface; - void (*mark) (Marker* self, DataObject* object); - void (*unmark) (Marker* self, DataObject* object); - gboolean (*toggle) (Marker* self, DataObject* object); - void (*mark_many) (Marker* self, GeeCollection* list); - void (*unmark_many) (Marker* self, GeeCollection* list); - void (*mark_all) (Marker* self); - gint (*get_count) (Marker* self); - GeeCollection* (*get_all) (Marker* self); -}; - -struct _DataCollection { - GTypeInstance parent_instance; - volatile int ref_count; - DataCollectionPrivate * priv; -}; - -struct _DataCollectionClass { - GTypeClass parent_class; - void (*finalize) (DataCollection *self); - gchar* (*to_string) (DataCollection* self); - void (*notify_items_added) (DataCollection* self, GeeIterable* added); - void (*notify_items_removed) (DataCollection* self, GeeIterable* removed); - void (*notify_contents_altered) (DataCollection* self, GeeIterable* added, GeeIterable* removed); - void (*notify_items_altered) (DataCollection* self, GeeMap* items); - void (*notify_ordering_changed) (DataCollection* self); - void (*notify_property_set) (DataCollection* self, const gchar* name, GValue* old, GValue* val); - void (*notify_property_cleared) (DataCollection* self, const gchar* name); - gboolean (*valid_type) (DataCollection* self, DataObject* object); - void (*set_comparator) (DataCollection* self, Comparator comparator, void* comparator_target, ComparatorPredicate predicate, void* predicate_target); - void (*reset_comparator) (DataCollection* self); - GeeCollection* (*get_all) (DataCollection* self); - gint (*get_count) (DataCollection* self); - DataObject* (*get_at) (DataCollection* self, gint index); - gint (*index_of) (DataCollection* self, DataObject* object); - gboolean (*contains) (DataCollection* self, DataObject* object); - gboolean (*add) (DataCollection* self, DataObject* object); - GeeCollection* (*add_many) (DataCollection* self, GeeCollection* objects, ProgressMonitor monitor, void* monitor_target); - void (*remove_marked) (DataCollection* self, Marker* m); - void (*clear) (DataCollection* self); - void (*close) (DataCollection* self); - void (*notify_frozen) (DataCollection* self); - void (*notify_thawed) (DataCollection* self); - void (*items_added) (DataCollection* self, GeeIterable* added); - void (*items_removed) (DataCollection* self, GeeIterable* removed); - void (*contents_altered) (DataCollection* self, GeeIterable* added, GeeIterable* removed); - void (*items_altered) (DataCollection* self, GeeMap* items); - void (*ordering_changed) (DataCollection* self); - void (*property_set) (DataCollection* self, const gchar* name, GValue* old, GValue* val); - void (*property_cleared) (DataCollection* self, const gchar* name); - void (*frozen) (DataCollection* self); - void (*thawed) (DataCollection* self); -}; - -struct _SourceCollection { - DataCollection parent_instance; - SourceCollectionPrivate * priv; -}; - -struct _SourceCollectionClass { - DataCollectionClass parent_class; - gboolean (*holds_type_of_source) (SourceCollection* self, DataSource* source); - void (*notify_items_unlinking) (SourceCollection* self, GeeCollection* unlinking); - void (*notify_items_relinked) (SourceCollection* self, GeeCollection* relinked); - void (*notify_item_destroyed) (SourceCollection* self, DataSource* source); - void (*notify_items_destroyed) (SourceCollection* self, GeeCollection* destroyed); - void (*notify_unlinked_destroyed) (SourceCollection* self, DataSource* unlinked); - void (*notify_backlink_removed) (SourceCollection* self, SourceBacklink* backlink, GeeCollection* sources); - gboolean (*has_backlink) (SourceCollection* self, SourceBacklink* backlink); - void (*remove_backlink) (SourceCollection* self, SourceBacklink* backlink); - void (*items_unlinking) (SourceCollection* self, GeeCollection* unlinking); - void (*items_relinked) (SourceCollection* self, GeeCollection* relinked); - void (*item_destroyed) (SourceCollection* self, DataSource* source); - void (*items_destroyed) (SourceCollection* self, GeeCollection* destroyed); - void (*unlinked_destroyed) (SourceCollection* self, DataSource* source); - void (*backlink_removed) (SourceCollection* self, SourceBacklink* backlink, GeeCollection* sources); -}; - -struct _SourceCollectionPrivate { - GeeMultiMap* backlinks; -}; - -typedef gboolean (*MarkedAction) (DataObject* object, GObject* user, void* user_data); -struct _SourceCollectionDestroyCounter { - GObject parent_instance; - SourceCollectionDestroyCounterPrivate * priv; - Marker* remove_marker; - GeeArrayList* notify_list; - GeeArrayList* not_removed; -}; - -struct _SourceCollectionDestroyCounterClass { - GObjectClass parent_class; -}; - - -static gpointer source_collection_parent_class = NULL; -static gpointer source_collection_destroy_counter_parent_class = NULL; - -gpointer data_collection_ref (gpointer instance); -void data_collection_unref (gpointer instance); -GParamSpec* param_spec_data_collection (const gchar* name, - const gchar* nick, - const gchar* blurb, - GType object_type, - GParamFlags flags); -void value_set_data_collection (GValue* value, - gpointer v_object); -void value_take_data_collection (GValue* value, - gpointer v_object); -gpointer value_get_data_collection (const GValue* value); -GType data_collection_get_type (void) G_GNUC_CONST; -GType data_object_get_type (void) G_GNUC_CONST; -gpointer alteration_ref (gpointer instance); -void alteration_unref (gpointer instance); -GParamSpec* param_spec_alteration (const gchar* name, - const gchar* nick, - const gchar* blurb, - GType object_type, - GParamFlags flags); -void value_set_alteration (GValue* value, - gpointer v_object); -void value_take_alteration (GValue* value, - gpointer v_object); -gpointer value_get_alteration (const GValue* value); -GType alteration_get_type (void) G_GNUC_CONST; -GType marker_get_type (void) G_GNUC_CONST; -GType source_collection_get_type (void) G_GNUC_CONST; -GType data_source_get_type (void) G_GNUC_CONST; -gpointer source_backlink_ref (gpointer instance); -void source_backlink_unref (gpointer instance); -GParamSpec* param_spec_source_backlink (const gchar* name, - const gchar* nick, - const gchar* blurb, - GType object_type, - GParamFlags flags); -void value_set_source_backlink (GValue* value, - gpointer v_object); -void value_take_source_backlink (GValue* value, - gpointer v_object); -gpointer value_get_source_backlink (const GValue* value); -GType source_backlink_get_type (void) G_GNUC_CONST; -#define SOURCE_COLLECTION_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), TYPE_SOURCE_COLLECTION, SourceCollectionPrivate)) -SourceCollection* source_collection_construct (GType object_type, - const gchar* name); -DataCollection* data_collection_new (const gchar* name); -DataCollection* data_collection_construct (GType object_type, - const gchar* name); -gboolean source_collection_holds_type_of_source (SourceCollection* self, - DataSource* source); -static gboolean source_collection_real_holds_type_of_source (SourceCollection* self, - DataSource* source); -void source_collection_notify_items_unlinking (SourceCollection* self, - GeeCollection* unlinking); -static void source_collection_real_notify_items_unlinking (SourceCollection* self, - GeeCollection* unlinking); -void source_collection_notify_items_relinked (SourceCollection* self, - GeeCollection* relinked); -static void source_collection_real_notify_items_relinked (SourceCollection* self, - GeeCollection* relinked); -void source_collection_notify_item_destroyed (SourceCollection* self, - DataSource* source); -static void source_collection_real_notify_item_destroyed (SourceCollection* self, - DataSource* source); -void source_collection_notify_items_destroyed (SourceCollection* self, - GeeCollection* destroyed); -static void source_collection_real_notify_items_destroyed (SourceCollection* self, - GeeCollection* destroyed); -void source_collection_notify_unlinked_destroyed (SourceCollection* self, - DataSource* unlinked); -static void source_collection_real_notify_unlinked_destroyed (SourceCollection* self, - DataSource* unlinked); -void source_collection_notify_backlink_removed (SourceCollection* self, - SourceBacklink* backlink, - GeeCollection* sources); -static void source_collection_real_notify_backlink_removed (SourceCollection* self, - SourceBacklink* backlink, - GeeCollection* sources); -static gboolean source_collection_real_valid_type (DataCollection* base, - DataObject* object); -GType thumbnail_source_get_type (void) G_GNUC_CONST; -GType media_source_get_type (void) G_GNUC_CONST; -gint source_collection_destroy_marked (SourceCollection* self, - Marker* marker, - gboolean delete_backing, - ProgressMonitor monitor, - void* monitor_target, - GeeList* not_removed); -static GType source_collection_destroy_counter_get_type (void) G_GNUC_CONST G_GNUC_UNUSED; -Marker* data_collection_start_marking (DataCollection* self); -static SourceCollectionDestroyCounter* source_collection_destroy_counter_new (Marker* remove_marker); -static SourceCollectionDestroyCounter* source_collection_destroy_counter_construct (GType object_type, - Marker* remove_marker); -void data_collection_act_on_marked (DataCollection* self, - Marker* m, - MarkedAction action, - void* action_target, - ProgressMonitor monitor, - void* monitor_target, - GObject* user); -static gboolean source_collection_destroy_and_delete_source (SourceCollection* self, - DataObject* object, - GObject* user); -static gboolean _source_collection_destroy_and_delete_source_marked_action (DataObject* object, - GObject* user, - gpointer self); -static gboolean source_collection_destroy_source (SourceCollection* self, - DataObject* object, - GObject* user); -static gboolean _source_collection_destroy_source_marked_action (DataObject* object, - GObject* user, - gpointer self); -void data_collection_remove_marked (DataCollection* self, - Marker* m); -gboolean data_source_internal_delete_backing (DataSource* self, - GError** error); -void data_source_internal_mark_for_destroy (DataSource* self); -void data_source_destroy (DataSource* self); -void marker_mark (Marker* self, - DataObject* object); -void source_collection_internal_backlink_set (SourceCollection* self, - DataSource* source, - SourceBacklink* backlink); -guint source_backlink_hash_func (SourceBacklink* backlink); -static guint _source_backlink_hash_func_gee_hash_data_func (gconstpointer v, - gpointer self); -gboolean source_backlink_equal_func (SourceBacklink* alink, - SourceBacklink* blink); -static gboolean _source_backlink_equal_func_gee_equal_data_func (gconstpointer a, - gconstpointer b, - gpointer self); -void source_collection_internal_backlink_removed (SourceCollection* self, - DataSource* source, - SourceBacklink* backlink); -gboolean source_collection_has_backlink (SourceCollection* self, - SourceBacklink* backlink); -static gboolean source_collection_real_has_backlink (SourceCollection* self, - SourceBacklink* backlink); -GeeCollection* source_collection_unlink_marked (SourceCollection* self, - Marker* marker, - ProgressMonitor monitor, - void* monitor_target); -static gboolean source_collection_prepare_for_unlink (SourceCollection* self, - DataObject* object, - GObject* user); -static gboolean _source_collection_prepare_for_unlink_marked_action (DataObject* object, - GObject* user, - gpointer self); -Marker* data_collection_mark_many (DataCollection* self, - GeeCollection* objects); -void data_source_notify_unlinking (DataSource* self, - SourceCollection* collection); -void source_collection_relink (SourceCollection* self, - DataSource* source); -void data_source_notify_relinking (DataSource* self, - SourceCollection* collection); -gboolean data_collection_add (DataCollection* self, - DataObject* object); -GeeCollection* data_collection_get_singleton (DataObject* object); -void data_source_notify_relinked (DataSource* self); -void source_collection_relink_many (SourceCollection* self, - GeeCollection* relink); -GeeCollection* data_collection_add_many (DataCollection* self, - GeeCollection* objects, - ProgressMonitor monitor, - void* monitor_target); -void source_collection_remove_backlink (SourceCollection* self, - SourceBacklink* backlink); -static void source_collection_real_remove_backlink (SourceCollection* self, - SourceBacklink* backlink); -gboolean data_source_remove_backlink (DataSource* self, - SourceBacklink* backlink); -static void source_collection_real_items_unlinking (SourceCollection* self, - GeeCollection* unlinking); -static void source_collection_real_items_relinked (SourceCollection* self, - GeeCollection* relinked); -static void source_collection_real_item_destroyed (SourceCollection* self, - DataSource* source); -static void source_collection_real_items_destroyed (SourceCollection* self, - GeeCollection* destroyed); -static void source_collection_real_unlinked_destroyed (SourceCollection* self, - DataSource* source); -static void source_collection_real_backlink_removed (SourceCollection* self, - SourceBacklink* backlink, - GeeCollection* sources); -static void g_cclosure_user_marshal_VOID__SOURCE_BACKLINK_OBJECT (GClosure * closure, - GValue * return_value, - guint n_param_values, - const GValue * param_values, - gpointer invocation_hint, - gpointer marshal_data); -static void source_collection_destroy_counter_finalize (GObject * obj); -static void source_collection_finalize (DataCollection * obj); - - -SourceCollection* -source_collection_construct (GType object_type, - const gchar* name) -{ - SourceCollection* self = NULL; -#line 50 "/home/jens/Source/shotwell/src/core/SourceCollection.vala" - g_return_val_if_fail (name != NULL, NULL); -#line 51 "/home/jens/Source/shotwell/src/core/SourceCollection.vala" - self = (SourceCollection*) data_collection_construct (object_type, name); -#line 50 "/home/jens/Source/shotwell/src/core/SourceCollection.vala" - return self; -#line 451 "SourceCollection.c" -} - - -static gboolean -source_collection_real_holds_type_of_source (SourceCollection* self, - DataSource* source) -{ - gboolean _tmp0_ = FALSE; -#line 54 "/home/jens/Source/shotwell/src/core/SourceCollection.vala" - g_critical ("Type `%s' does not implement abstract method `source_collection_holds_type_of_source'", g_type_name (G_TYPE_FROM_INSTANCE (self))); -#line 54 "/home/jens/Source/shotwell/src/core/SourceCollection.vala" - return _tmp0_; -#line 464 "SourceCollection.c" -} - - -gboolean -source_collection_holds_type_of_source (SourceCollection* self, - DataSource* source) -{ -#line 54 "/home/jens/Source/shotwell/src/core/SourceCollection.vala" - g_return_val_if_fail (IS_SOURCE_COLLECTION (self), FALSE); -#line 54 "/home/jens/Source/shotwell/src/core/SourceCollection.vala" - return SOURCE_COLLECTION_GET_CLASS (self)->holds_type_of_source (self, source); -#line 476 "SourceCollection.c" -} - - -static void -source_collection_real_notify_items_unlinking (SourceCollection* self, - GeeCollection* unlinking) -{ -#line 56 "/home/jens/Source/shotwell/src/core/SourceCollection.vala" - g_return_if_fail (GEE_IS_COLLECTION (unlinking)); -#line 57 "/home/jens/Source/shotwell/src/core/SourceCollection.vala" - g_signal_emit (self, source_collection_signals[SOURCE_COLLECTION_ITEMS_UNLINKING_SIGNAL], 0, unlinking); -#line 488 "SourceCollection.c" -} - - -void -source_collection_notify_items_unlinking (SourceCollection* self, - GeeCollection* unlinking) -{ -#line 56 "/home/jens/Source/shotwell/src/core/SourceCollection.vala" - g_return_if_fail (IS_SOURCE_COLLECTION (self)); -#line 56 "/home/jens/Source/shotwell/src/core/SourceCollection.vala" - SOURCE_COLLECTION_GET_CLASS (self)->notify_items_unlinking (self, unlinking); -#line 500 "SourceCollection.c" -} - - -static void -source_collection_real_notify_items_relinked (SourceCollection* self, - GeeCollection* relinked) -{ -#line 60 "/home/jens/Source/shotwell/src/core/SourceCollection.vala" - g_return_if_fail (GEE_IS_COLLECTION (relinked)); -#line 61 "/home/jens/Source/shotwell/src/core/SourceCollection.vala" - g_signal_emit (self, source_collection_signals[SOURCE_COLLECTION_ITEMS_RELINKED_SIGNAL], 0, relinked); -#line 512 "SourceCollection.c" -} - - -void -source_collection_notify_items_relinked (SourceCollection* self, - GeeCollection* relinked) -{ -#line 60 "/home/jens/Source/shotwell/src/core/SourceCollection.vala" - g_return_if_fail (IS_SOURCE_COLLECTION (self)); -#line 60 "/home/jens/Source/shotwell/src/core/SourceCollection.vala" - SOURCE_COLLECTION_GET_CLASS (self)->notify_items_relinked (self, relinked); -#line 524 "SourceCollection.c" -} - - -static void -source_collection_real_notify_item_destroyed (SourceCollection* self, - DataSource* source) -{ -#line 64 "/home/jens/Source/shotwell/src/core/SourceCollection.vala" - g_return_if_fail (IS_DATA_SOURCE (source)); -#line 65 "/home/jens/Source/shotwell/src/core/SourceCollection.vala" - g_signal_emit (self, source_collection_signals[SOURCE_COLLECTION_ITEM_DESTROYED_SIGNAL], 0, source); -#line 536 "SourceCollection.c" -} - - -void -source_collection_notify_item_destroyed (SourceCollection* self, - DataSource* source) -{ -#line 64 "/home/jens/Source/shotwell/src/core/SourceCollection.vala" - g_return_if_fail (IS_SOURCE_COLLECTION (self)); -#line 64 "/home/jens/Source/shotwell/src/core/SourceCollection.vala" - SOURCE_COLLECTION_GET_CLASS (self)->notify_item_destroyed (self, source); -#line 548 "SourceCollection.c" -} - - -static void -source_collection_real_notify_items_destroyed (SourceCollection* self, - GeeCollection* destroyed) -{ -#line 68 "/home/jens/Source/shotwell/src/core/SourceCollection.vala" - g_return_if_fail (GEE_IS_COLLECTION (destroyed)); -#line 69 "/home/jens/Source/shotwell/src/core/SourceCollection.vala" - g_signal_emit (self, source_collection_signals[SOURCE_COLLECTION_ITEMS_DESTROYED_SIGNAL], 0, destroyed); -#line 560 "SourceCollection.c" -} - - -void -source_collection_notify_items_destroyed (SourceCollection* self, - GeeCollection* destroyed) -{ -#line 68 "/home/jens/Source/shotwell/src/core/SourceCollection.vala" - g_return_if_fail (IS_SOURCE_COLLECTION (self)); -#line 68 "/home/jens/Source/shotwell/src/core/SourceCollection.vala" - SOURCE_COLLECTION_GET_CLASS (self)->notify_items_destroyed (self, destroyed); -#line 572 "SourceCollection.c" -} - - -static void -source_collection_real_notify_unlinked_destroyed (SourceCollection* self, - DataSource* unlinked) -{ -#line 73 "/home/jens/Source/shotwell/src/core/SourceCollection.vala" - g_return_if_fail (IS_DATA_SOURCE (unlinked)); -#line 74 "/home/jens/Source/shotwell/src/core/SourceCollection.vala" - g_signal_emit (self, source_collection_signals[SOURCE_COLLECTION_UNLINKED_DESTROYED_SIGNAL], 0, unlinked); -#line 584 "SourceCollection.c" -} - - -void -source_collection_notify_unlinked_destroyed (SourceCollection* self, - DataSource* unlinked) -{ -#line 73 "/home/jens/Source/shotwell/src/core/SourceCollection.vala" - g_return_if_fail (IS_SOURCE_COLLECTION (self)); -#line 73 "/home/jens/Source/shotwell/src/core/SourceCollection.vala" - SOURCE_COLLECTION_GET_CLASS (self)->notify_unlinked_destroyed (self, unlinked); -#line 596 "SourceCollection.c" -} - - -static void -source_collection_real_notify_backlink_removed (SourceCollection* self, - SourceBacklink* backlink, - GeeCollection* sources) -{ -#line 77 "/home/jens/Source/shotwell/src/core/SourceCollection.vala" - g_return_if_fail (IS_SOURCE_BACKLINK (backlink)); -#line 77 "/home/jens/Source/shotwell/src/core/SourceCollection.vala" - g_return_if_fail (GEE_IS_COLLECTION (sources)); -#line 79 "/home/jens/Source/shotwell/src/core/SourceCollection.vala" - g_signal_emit (self, source_collection_signals[SOURCE_COLLECTION_BACKLINK_REMOVED_SIGNAL], 0, backlink, sources); -#line 611 "SourceCollection.c" -} - - -void -source_collection_notify_backlink_removed (SourceCollection* self, - SourceBacklink* backlink, - GeeCollection* sources) -{ -#line 77 "/home/jens/Source/shotwell/src/core/SourceCollection.vala" - g_return_if_fail (IS_SOURCE_COLLECTION (self)); -#line 77 "/home/jens/Source/shotwell/src/core/SourceCollection.vala" - SOURCE_COLLECTION_GET_CLASS (self)->notify_backlink_removed (self, backlink, sources); -#line 624 "SourceCollection.c" -} - - -static gboolean -source_collection_real_valid_type (DataCollection* base, - DataObject* object) -{ - SourceCollection * self; - gboolean result = FALSE; -#line 82 "/home/jens/Source/shotwell/src/core/SourceCollection.vala" - self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_SOURCE_COLLECTION, SourceCollection); -#line 82 "/home/jens/Source/shotwell/src/core/SourceCollection.vala" - g_return_val_if_fail (IS_DATA_OBJECT (object), FALSE); -#line 83 "/home/jens/Source/shotwell/src/core/SourceCollection.vala" - result = G_TYPE_CHECK_INSTANCE_TYPE (object, TYPE_DATA_SOURCE); -#line 83 "/home/jens/Source/shotwell/src/core/SourceCollection.vala" - return result; -#line 642 "SourceCollection.c" -} - - -static gboolean -_source_collection_destroy_and_delete_source_marked_action (DataObject* object, - GObject* user, - gpointer self) -{ - gboolean result; - result = source_collection_destroy_and_delete_source ((SourceCollection*) self, object, user); -#line 93 "/home/jens/Source/shotwell/src/core/SourceCollection.vala" - return result; -#line 655 "SourceCollection.c" -} - - -static gboolean -_source_collection_destroy_source_marked_action (DataObject* object, - GObject* user, - gpointer self) -{ - gboolean result; - result = source_collection_destroy_source ((SourceCollection*) self, object, user); -#line 95 "/home/jens/Source/shotwell/src/core/SourceCollection.vala" - return result; -#line 668 "SourceCollection.c" -} - - -static gpointer -_g_object_ref0 (gpointer self) -{ -#line 98 "/home/jens/Source/shotwell/src/core/SourceCollection.vala" - return self ? g_object_ref (self) : NULL; -#line 677 "SourceCollection.c" -} - - -gint -source_collection_destroy_marked (SourceCollection* self, - Marker* marker, - gboolean delete_backing, - ProgressMonitor monitor, - void* monitor_target, - GeeList* not_removed) -{ - gint result = 0; - SourceCollectionDestroyCounter* counter = NULL; - Marker* _tmp0_; - Marker* _tmp1_; - SourceCollectionDestroyCounter* _tmp2_; - SourceCollectionDestroyCounter* _tmp3_; - SourceCollectionDestroyCounter* _tmp19_; - GeeArrayList* _tmp20_; - SourceCollectionDestroyCounter* _tmp21_; - Marker* _tmp22_; - SourceCollectionDestroyCounter* _tmp25_; - GeeArrayList* _tmp26_; - gint _tmp27_; - gint _tmp28_; -#line 88 "/home/jens/Source/shotwell/src/core/SourceCollection.vala" - g_return_val_if_fail (IS_SOURCE_COLLECTION (self), 0); -#line 88 "/home/jens/Source/shotwell/src/core/SourceCollection.vala" - g_return_val_if_fail (IS_MARKER (marker), 0); -#line 88 "/home/jens/Source/shotwell/src/core/SourceCollection.vala" - g_return_val_if_fail ((not_removed == NULL) || GEE_IS_LIST (not_removed), 0); -#line 90 "/home/jens/Source/shotwell/src/core/SourceCollection.vala" - _tmp0_ = data_collection_start_marking (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_DATA_COLLECTION, DataCollection)); -#line 90 "/home/jens/Source/shotwell/src/core/SourceCollection.vala" - _tmp1_ = _tmp0_; -#line 90 "/home/jens/Source/shotwell/src/core/SourceCollection.vala" - _tmp2_ = source_collection_destroy_counter_new (_tmp1_); -#line 90 "/home/jens/Source/shotwell/src/core/SourceCollection.vala" - _tmp3_ = _tmp2_; -#line 90 "/home/jens/Source/shotwell/src/core/SourceCollection.vala" - _g_object_unref0 (_tmp1_); -#line 90 "/home/jens/Source/shotwell/src/core/SourceCollection.vala" - counter = _tmp3_; -#line 92 "/home/jens/Source/shotwell/src/core/SourceCollection.vala" - if (delete_backing) { -#line 723 "SourceCollection.c" - SourceCollectionDestroyCounter* _tmp4_; -#line 93 "/home/jens/Source/shotwell/src/core/SourceCollection.vala" - _tmp4_ = counter; -#line 93 "/home/jens/Source/shotwell/src/core/SourceCollection.vala" - data_collection_act_on_marked (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_DATA_COLLECTION, DataCollection), marker, _source_collection_destroy_and_delete_source_marked_action, self, monitor, monitor_target, G_TYPE_CHECK_INSTANCE_CAST (_tmp4_, G_TYPE_OBJECT, GObject)); -#line 729 "SourceCollection.c" - } else { - SourceCollectionDestroyCounter* _tmp5_; -#line 95 "/home/jens/Source/shotwell/src/core/SourceCollection.vala" - _tmp5_ = counter; -#line 95 "/home/jens/Source/shotwell/src/core/SourceCollection.vala" - data_collection_act_on_marked (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_DATA_COLLECTION, DataCollection), marker, _source_collection_destroy_source_marked_action, self, monitor, monitor_target, G_TYPE_CHECK_INSTANCE_CAST (_tmp5_, G_TYPE_OBJECT, GObject)); -#line 736 "SourceCollection.c" - } - { - GeeArrayList* _source_list = NULL; - SourceCollectionDestroyCounter* _tmp6_; - GeeArrayList* _tmp7_; - GeeArrayList* _tmp8_; - gint _source_size = 0; - GeeArrayList* _tmp9_; - gint _tmp10_; - gint _tmp11_; - gint _source_index = 0; -#line 98 "/home/jens/Source/shotwell/src/core/SourceCollection.vala" - _tmp6_ = counter; -#line 98 "/home/jens/Source/shotwell/src/core/SourceCollection.vala" - _tmp7_ = _tmp6_->notify_list; -#line 98 "/home/jens/Source/shotwell/src/core/SourceCollection.vala" - _tmp8_ = _g_object_ref0 (_tmp7_); -#line 98 "/home/jens/Source/shotwell/src/core/SourceCollection.vala" - _source_list = _tmp8_; -#line 98 "/home/jens/Source/shotwell/src/core/SourceCollection.vala" - _tmp9_ = _source_list; -#line 98 "/home/jens/Source/shotwell/src/core/SourceCollection.vala" - _tmp10_ = gee_abstract_collection_get_size (G_TYPE_CHECK_INSTANCE_CAST (_tmp9_, GEE_TYPE_ABSTRACT_COLLECTION, GeeAbstractCollection)); -#line 98 "/home/jens/Source/shotwell/src/core/SourceCollection.vala" - _tmp11_ = _tmp10_; -#line 98 "/home/jens/Source/shotwell/src/core/SourceCollection.vala" - _source_size = _tmp11_; -#line 98 "/home/jens/Source/shotwell/src/core/SourceCollection.vala" - _source_index = -1; -#line 98 "/home/jens/Source/shotwell/src/core/SourceCollection.vala" - while (TRUE) { -#line 768 "SourceCollection.c" - gint _tmp12_; - gint _tmp13_; - gint _tmp14_; - DataSource* source = NULL; - GeeArrayList* _tmp15_; - gint _tmp16_; - gpointer _tmp17_; - DataSource* _tmp18_; -#line 98 "/home/jens/Source/shotwell/src/core/SourceCollection.vala" - _tmp12_ = _source_index; -#line 98 "/home/jens/Source/shotwell/src/core/SourceCollection.vala" - _source_index = _tmp12_ + 1; -#line 98 "/home/jens/Source/shotwell/src/core/SourceCollection.vala" - _tmp13_ = _source_index; -#line 98 "/home/jens/Source/shotwell/src/core/SourceCollection.vala" - _tmp14_ = _source_size; -#line 98 "/home/jens/Source/shotwell/src/core/SourceCollection.vala" - if (!(_tmp13_ < _tmp14_)) { -#line 98 "/home/jens/Source/shotwell/src/core/SourceCollection.vala" - break; -#line 789 "SourceCollection.c" - } -#line 98 "/home/jens/Source/shotwell/src/core/SourceCollection.vala" - _tmp15_ = _source_list; -#line 98 "/home/jens/Source/shotwell/src/core/SourceCollection.vala" - _tmp16_ = _source_index; -#line 98 "/home/jens/Source/shotwell/src/core/SourceCollection.vala" - _tmp17_ = gee_abstract_list_get (G_TYPE_CHECK_INSTANCE_CAST (_tmp15_, GEE_TYPE_ABSTRACT_LIST, GeeAbstractList), _tmp16_); -#line 98 "/home/jens/Source/shotwell/src/core/SourceCollection.vala" - source = (DataSource*) _tmp17_; -#line 99 "/home/jens/Source/shotwell/src/core/SourceCollection.vala" - _tmp18_ = source; -#line 99 "/home/jens/Source/shotwell/src/core/SourceCollection.vala" - source_collection_notify_item_destroyed (self, _tmp18_); -#line 98 "/home/jens/Source/shotwell/src/core/SourceCollection.vala" - _g_object_unref0 (source); -#line 805 "SourceCollection.c" - } -#line 98 "/home/jens/Source/shotwell/src/core/SourceCollection.vala" - _g_object_unref0 (_source_list); -#line 809 "SourceCollection.c" - } -#line 100 "/home/jens/Source/shotwell/src/core/SourceCollection.vala" - _tmp19_ = counter; -#line 100 "/home/jens/Source/shotwell/src/core/SourceCollection.vala" - _tmp20_ = _tmp19_->notify_list; -#line 100 "/home/jens/Source/shotwell/src/core/SourceCollection.vala" - source_collection_notify_items_destroyed (self, G_TYPE_CHECK_INSTANCE_CAST (_tmp20_, GEE_TYPE_COLLECTION, GeeCollection)); -#line 103 "/home/jens/Source/shotwell/src/core/SourceCollection.vala" - _tmp21_ = counter; -#line 103 "/home/jens/Source/shotwell/src/core/SourceCollection.vala" - _tmp22_ = _tmp21_->remove_marker; -#line 103 "/home/jens/Source/shotwell/src/core/SourceCollection.vala" - data_collection_remove_marked (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_DATA_COLLECTION, DataCollection), _tmp22_); -#line 105 "/home/jens/Source/shotwell/src/core/SourceCollection.vala" - if (NULL != not_removed) { -#line 825 "SourceCollection.c" - SourceCollectionDestroyCounter* _tmp23_; - GeeArrayList* _tmp24_; -#line 106 "/home/jens/Source/shotwell/src/core/SourceCollection.vala" - _tmp23_ = counter; -#line 106 "/home/jens/Source/shotwell/src/core/SourceCollection.vala" - _tmp24_ = _tmp23_->not_removed; -#line 106 "/home/jens/Source/shotwell/src/core/SourceCollection.vala" - gee_collection_add_all (G_TYPE_CHECK_INSTANCE_CAST (not_removed, GEE_TYPE_COLLECTION, GeeCollection), G_TYPE_CHECK_INSTANCE_CAST (_tmp24_, GEE_TYPE_COLLECTION, GeeCollection)); -#line 834 "SourceCollection.c" - } -#line 109 "/home/jens/Source/shotwell/src/core/SourceCollection.vala" - _tmp25_ = counter; -#line 109 "/home/jens/Source/shotwell/src/core/SourceCollection.vala" - _tmp26_ = _tmp25_->not_removed; -#line 109 "/home/jens/Source/shotwell/src/core/SourceCollection.vala" - _tmp27_ = gee_abstract_collection_get_size (G_TYPE_CHECK_INSTANCE_CAST (_tmp26_, GEE_TYPE_ABSTRACT_COLLECTION, GeeAbstractCollection)); -#line 109 "/home/jens/Source/shotwell/src/core/SourceCollection.vala" - _tmp28_ = _tmp27_; -#line 109 "/home/jens/Source/shotwell/src/core/SourceCollection.vala" - result = _tmp28_; -#line 109 "/home/jens/Source/shotwell/src/core/SourceCollection.vala" - _g_object_unref0 (counter); -#line 109 "/home/jens/Source/shotwell/src/core/SourceCollection.vala" - return result; -#line 850 "SourceCollection.c" -} - - -static gboolean -source_collection_destroy_and_delete_source (SourceCollection* self, - DataObject* object, - GObject* user) -{ - gboolean result = FALSE; - gboolean success = FALSE; - gboolean _tmp2_ = FALSE; - gboolean _tmp3_; - gboolean _tmp5_ = FALSE; - GError * _inner_error_ = NULL; -#line 112 "/home/jens/Source/shotwell/src/core/SourceCollection.vala" - g_return_val_if_fail (IS_SOURCE_COLLECTION (self), FALSE); -#line 112 "/home/jens/Source/shotwell/src/core/SourceCollection.vala" - g_return_val_if_fail (IS_DATA_OBJECT (object), FALSE); -#line 112 "/home/jens/Source/shotwell/src/core/SourceCollection.vala" - g_return_val_if_fail ((user == NULL) || G_IS_OBJECT (user), FALSE); -#line 113 "/home/jens/Source/shotwell/src/core/SourceCollection.vala" - success = FALSE; -#line 873 "SourceCollection.c" - { - gboolean _tmp0_ = FALSE; -#line 115 "/home/jens/Source/shotwell/src/core/SourceCollection.vala" - _tmp0_ = data_source_internal_delete_backing (G_TYPE_CHECK_INSTANCE_CAST (object, TYPE_DATA_SOURCE, DataSource), &_inner_error_); -#line 115 "/home/jens/Source/shotwell/src/core/SourceCollection.vala" - if (G_UNLIKELY (_inner_error_ != NULL)) { -#line 880 "SourceCollection.c" - goto __catch53_g_error; - } -#line 115 "/home/jens/Source/shotwell/src/core/SourceCollection.vala" - success = _tmp0_; -#line 885 "SourceCollection.c" - } - goto __finally53; - __catch53_g_error: - { - GError* err = NULL; -#line 114 "/home/jens/Source/shotwell/src/core/SourceCollection.vala" - err = _inner_error_; -#line 114 "/home/jens/Source/shotwell/src/core/SourceCollection.vala" - _inner_error_ = NULL; -#line 117 "/home/jens/Source/shotwell/src/core/SourceCollection.vala" - success = FALSE; -#line 114 "/home/jens/Source/shotwell/src/core/SourceCollection.vala" - _g_error_free0 (err); -#line 899 "SourceCollection.c" - } - __finally53: -#line 114 "/home/jens/Source/shotwell/src/core/SourceCollection.vala" - if (G_UNLIKELY (_inner_error_ != NULL)) { -#line 904 "SourceCollection.c" - gboolean _tmp1_ = FALSE; -#line 114 "/home/jens/Source/shotwell/src/core/SourceCollection.vala" - g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code); -#line 114 "/home/jens/Source/shotwell/src/core/SourceCollection.vala" - g_clear_error (&_inner_error_); -#line 114 "/home/jens/Source/shotwell/src/core/SourceCollection.vala" - return _tmp1_; -#line 912 "SourceCollection.c" - } -#line 120 "/home/jens/Source/shotwell/src/core/SourceCollection.vala" - _tmp3_ = success; -#line 120 "/home/jens/Source/shotwell/src/core/SourceCollection.vala" - if (!_tmp3_) { -#line 120 "/home/jens/Source/shotwell/src/core/SourceCollection.vala" - _tmp2_ = G_TYPE_CHECK_INSTANCE_TYPE (object, TYPE_MEDIA_SOURCE); -#line 920 "SourceCollection.c" - } else { -#line 120 "/home/jens/Source/shotwell/src/core/SourceCollection.vala" - _tmp2_ = FALSE; -#line 924 "SourceCollection.c" - } -#line 120 "/home/jens/Source/shotwell/src/core/SourceCollection.vala" - if (_tmp2_) { -#line 928 "SourceCollection.c" - GeeArrayList* _tmp4_; -#line 121 "/home/jens/Source/shotwell/src/core/SourceCollection.vala" - _tmp4_ = G_TYPE_CHECK_INSTANCE_CAST (user, SOURCE_COLLECTION_TYPE_DESTROY_COUNTER, SourceCollectionDestroyCounter)->not_removed; -#line 121 "/home/jens/Source/shotwell/src/core/SourceCollection.vala" - gee_abstract_collection_add (G_TYPE_CHECK_INSTANCE_CAST (_tmp4_, GEE_TYPE_ABSTRACT_COLLECTION, GeeAbstractCollection), G_TYPE_CHECK_INSTANCE_CAST (object, TYPE_MEDIA_SOURCE, MediaSource)); -#line 934 "SourceCollection.c" - } -#line 124 "/home/jens/Source/shotwell/src/core/SourceCollection.vala" - if (source_collection_destroy_source (self, object, user)) { -#line 938 "SourceCollection.c" - gboolean _tmp6_; -#line 124 "/home/jens/Source/shotwell/src/core/SourceCollection.vala" - _tmp6_ = success; -#line 124 "/home/jens/Source/shotwell/src/core/SourceCollection.vala" - _tmp5_ = _tmp6_; -#line 944 "SourceCollection.c" - } else { -#line 124 "/home/jens/Source/shotwell/src/core/SourceCollection.vala" - _tmp5_ = FALSE; -#line 948 "SourceCollection.c" - } -#line 124 "/home/jens/Source/shotwell/src/core/SourceCollection.vala" - result = _tmp5_; -#line 124 "/home/jens/Source/shotwell/src/core/SourceCollection.vala" - return result; -#line 954 "SourceCollection.c" -} - - -static gboolean -source_collection_destroy_source (SourceCollection* self, - DataObject* object, - GObject* user) -{ - gboolean result = FALSE; - DataSource* source = NULL; - DataSource* _tmp0_; - Marker* _tmp1_; - GeeArrayList* _tmp2_; -#line 127 "/home/jens/Source/shotwell/src/core/SourceCollection.vala" - g_return_val_if_fail (IS_SOURCE_COLLECTION (self), FALSE); -#line 127 "/home/jens/Source/shotwell/src/core/SourceCollection.vala" - g_return_val_if_fail (IS_DATA_OBJECT (object), FALSE); -#line 127 "/home/jens/Source/shotwell/src/core/SourceCollection.vala" - g_return_val_if_fail ((user == NULL) || G_IS_OBJECT (user), FALSE); -#line 128 "/home/jens/Source/shotwell/src/core/SourceCollection.vala" - _tmp0_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_CAST (object, TYPE_DATA_SOURCE, DataSource)); -#line 128 "/home/jens/Source/shotwell/src/core/SourceCollection.vala" - source = _tmp0_; -#line 130 "/home/jens/Source/shotwell/src/core/SourceCollection.vala" - data_source_internal_mark_for_destroy (source); -#line 131 "/home/jens/Source/shotwell/src/core/SourceCollection.vala" - data_source_destroy (source); -#line 133 "/home/jens/Source/shotwell/src/core/SourceCollection.vala" - _tmp1_ = G_TYPE_CHECK_INSTANCE_CAST (user, SOURCE_COLLECTION_TYPE_DESTROY_COUNTER, SourceCollectionDestroyCounter)->remove_marker; -#line 133 "/home/jens/Source/shotwell/src/core/SourceCollection.vala" - marker_mark (_tmp1_, G_TYPE_CHECK_INSTANCE_CAST (source, TYPE_DATA_OBJECT, DataObject)); -#line 134 "/home/jens/Source/shotwell/src/core/SourceCollection.vala" - _tmp2_ = G_TYPE_CHECK_INSTANCE_CAST (user, SOURCE_COLLECTION_TYPE_DESTROY_COUNTER, SourceCollectionDestroyCounter)->notify_list; -#line 134 "/home/jens/Source/shotwell/src/core/SourceCollection.vala" - gee_abstract_collection_add (G_TYPE_CHECK_INSTANCE_CAST (_tmp2_, GEE_TYPE_ABSTRACT_COLLECTION, GeeAbstractCollection), source); -#line 136 "/home/jens/Source/shotwell/src/core/SourceCollection.vala" - result = TRUE; -#line 136 "/home/jens/Source/shotwell/src/core/SourceCollection.vala" - _g_object_unref0 (source); -#line 136 "/home/jens/Source/shotwell/src/core/SourceCollection.vala" - return result; -#line 996 "SourceCollection.c" -} - - -static guint -_source_backlink_hash_func_gee_hash_data_func (gconstpointer v, - gpointer self) -{ - guint result; - result = source_backlink_hash_func ((SourceBacklink*) v); -#line 142 "/home/jens/Source/shotwell/src/core/SourceCollection.vala" - return result; -#line 1008 "SourceCollection.c" -} - - -static gboolean -_source_backlink_equal_func_gee_equal_data_func (gconstpointer a, - gconstpointer b, - gpointer self) -{ - gboolean result; - result = source_backlink_equal_func ((SourceBacklink*) a, (SourceBacklink*) b); -#line 142 "/home/jens/Source/shotwell/src/core/SourceCollection.vala" - return result; -#line 1021 "SourceCollection.c" -} - - -void -source_collection_internal_backlink_set (SourceCollection* self, - DataSource* source, - SourceBacklink* backlink) -{ - GeeMultiMap* _tmp0_; - GeeMultiMap* _tmp2_; -#line 140 "/home/jens/Source/shotwell/src/core/SourceCollection.vala" - g_return_if_fail (IS_SOURCE_COLLECTION (self)); -#line 140 "/home/jens/Source/shotwell/src/core/SourceCollection.vala" - g_return_if_fail (IS_DATA_SOURCE (source)); -#line 140 "/home/jens/Source/shotwell/src/core/SourceCollection.vala" - g_return_if_fail (IS_SOURCE_BACKLINK (backlink)); -#line 141 "/home/jens/Source/shotwell/src/core/SourceCollection.vala" - _tmp0_ = self->priv->backlinks; -#line 141 "/home/jens/Source/shotwell/src/core/SourceCollection.vala" - if (_tmp0_ == NULL) { -#line 1042 "SourceCollection.c" - GeeHashMultiMap* _tmp1_; -#line 142 "/home/jens/Source/shotwell/src/core/SourceCollection.vala" - _tmp1_ = gee_hash_multi_map_new (TYPE_SOURCE_BACKLINK, (GBoxedCopyFunc) source_backlink_ref, (GDestroyNotify) source_backlink_unref, TYPE_DATA_SOURCE, (GBoxedCopyFunc) g_object_ref, (GDestroyNotify) g_object_unref, _source_backlink_hash_func_gee_hash_data_func, NULL, NULL, _source_backlink_equal_func_gee_equal_data_func, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL); -#line 142 "/home/jens/Source/shotwell/src/core/SourceCollection.vala" - _g_object_unref0 (self->priv->backlinks); -#line 142 "/home/jens/Source/shotwell/src/core/SourceCollection.vala" - self->priv->backlinks = G_TYPE_CHECK_INSTANCE_CAST (_tmp1_, GEE_TYPE_MULTI_MAP, GeeMultiMap); -#line 1050 "SourceCollection.c" - } -#line 146 "/home/jens/Source/shotwell/src/core/SourceCollection.vala" - _tmp2_ = self->priv->backlinks; -#line 146 "/home/jens/Source/shotwell/src/core/SourceCollection.vala" - gee_multi_map_set (_tmp2_, backlink, source); -#line 1056 "SourceCollection.c" -} - - -void -source_collection_internal_backlink_removed (SourceCollection* self, - DataSource* source, - SourceBacklink* backlink) -{ - GeeMultiMap* _tmp0_; - gboolean removed = FALSE; - GeeMultiMap* _tmp1_; -#line 150 "/home/jens/Source/shotwell/src/core/SourceCollection.vala" - g_return_if_fail (IS_SOURCE_COLLECTION (self)); -#line 150 "/home/jens/Source/shotwell/src/core/SourceCollection.vala" - g_return_if_fail (IS_DATA_SOURCE (source)); -#line 150 "/home/jens/Source/shotwell/src/core/SourceCollection.vala" - g_return_if_fail (IS_SOURCE_BACKLINK (backlink)); -#line 151 "/home/jens/Source/shotwell/src/core/SourceCollection.vala" - _tmp0_ = self->priv->backlinks; -#line 151 "/home/jens/Source/shotwell/src/core/SourceCollection.vala" - _vala_assert (_tmp0_ != NULL, "backlinks != null"); -#line 153 "/home/jens/Source/shotwell/src/core/SourceCollection.vala" - _tmp1_ = self->priv->backlinks; -#line 153 "/home/jens/Source/shotwell/src/core/SourceCollection.vala" - removed = gee_multi_map_remove (_tmp1_, backlink, source); -#line 154 "/home/jens/Source/shotwell/src/core/SourceCollection.vala" - _vala_assert (removed, "removed"); -#line 1084 "SourceCollection.c" -} - - -static gboolean -source_collection_real_has_backlink (SourceCollection* self, - SourceBacklink* backlink) -{ - gboolean result = FALSE; - gboolean _tmp0_ = FALSE; - GeeMultiMap* _tmp1_; -#line 157 "/home/jens/Source/shotwell/src/core/SourceCollection.vala" - g_return_val_if_fail (IS_SOURCE_BACKLINK (backlink), FALSE); -#line 158 "/home/jens/Source/shotwell/src/core/SourceCollection.vala" - _tmp1_ = self->priv->backlinks; -#line 158 "/home/jens/Source/shotwell/src/core/SourceCollection.vala" - if (_tmp1_ != NULL) { -#line 1101 "SourceCollection.c" - GeeMultiMap* _tmp2_; -#line 158 "/home/jens/Source/shotwell/src/core/SourceCollection.vala" - _tmp2_ = self->priv->backlinks; -#line 158 "/home/jens/Source/shotwell/src/core/SourceCollection.vala" - _tmp0_ = gee_multi_map_contains (_tmp2_, backlink); -#line 1107 "SourceCollection.c" - } else { -#line 158 "/home/jens/Source/shotwell/src/core/SourceCollection.vala" - _tmp0_ = FALSE; -#line 1111 "SourceCollection.c" - } -#line 158 "/home/jens/Source/shotwell/src/core/SourceCollection.vala" - result = _tmp0_; -#line 158 "/home/jens/Source/shotwell/src/core/SourceCollection.vala" - return result; -#line 1117 "SourceCollection.c" -} - - -gboolean -source_collection_has_backlink (SourceCollection* self, - SourceBacklink* backlink) -{ -#line 157 "/home/jens/Source/shotwell/src/core/SourceCollection.vala" - g_return_val_if_fail (IS_SOURCE_COLLECTION (self), FALSE); -#line 157 "/home/jens/Source/shotwell/src/core/SourceCollection.vala" - return SOURCE_COLLECTION_GET_CLASS (self)->has_backlink (self, backlink); -#line 1129 "SourceCollection.c" -} - - -static gboolean -_source_collection_prepare_for_unlink_marked_action (DataObject* object, - GObject* user, - gpointer self) -{ - gboolean result; - result = source_collection_prepare_for_unlink ((SourceCollection*) self, object, user); -#line 163 "/home/jens/Source/shotwell/src/core/SourceCollection.vala" - return result; -#line 1142 "SourceCollection.c" -} - - -GeeCollection* -source_collection_unlink_marked (SourceCollection* self, - Marker* marker, - ProgressMonitor monitor, - void* monitor_target) -{ - GeeCollection* result = NULL; - GeeArrayList* list = NULL; - GeeArrayList* _tmp0_; - GeeArrayList* _tmp1_; - GeeArrayList* _tmp2_; - gint _tmp3_; - gint _tmp4_; - GeeArrayList* _tmp5_; - GeeArrayList* _tmp6_; - Marker* _tmp7_; - Marker* _tmp8_; -#line 161 "/home/jens/Source/shotwell/src/core/SourceCollection.vala" - g_return_val_if_fail (IS_SOURCE_COLLECTION (self), NULL); -#line 161 "/home/jens/Source/shotwell/src/core/SourceCollection.vala" - g_return_val_if_fail (IS_MARKER (marker), NULL); -#line 162 "/home/jens/Source/shotwell/src/core/SourceCollection.vala" - _tmp0_ = gee_array_list_new (TYPE_DATA_SOURCE, (GBoxedCopyFunc) g_object_ref, (GDestroyNotify) g_object_unref, NULL, NULL, NULL); -#line 162 "/home/jens/Source/shotwell/src/core/SourceCollection.vala" - list = _tmp0_; -#line 163 "/home/jens/Source/shotwell/src/core/SourceCollection.vala" - _tmp1_ = list; -#line 163 "/home/jens/Source/shotwell/src/core/SourceCollection.vala" - data_collection_act_on_marked (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_DATA_COLLECTION, DataCollection), marker, _source_collection_prepare_for_unlink_marked_action, self, monitor, monitor_target, G_TYPE_CHECK_INSTANCE_CAST (_tmp1_, G_TYPE_OBJECT, GObject)); -#line 165 "/home/jens/Source/shotwell/src/core/SourceCollection.vala" - _tmp2_ = list; -#line 165 "/home/jens/Source/shotwell/src/core/SourceCollection.vala" - _tmp3_ = gee_abstract_collection_get_size (G_TYPE_CHECK_INSTANCE_CAST (_tmp2_, GEE_TYPE_ABSTRACT_COLLECTION, GeeAbstractCollection)); -#line 165 "/home/jens/Source/shotwell/src/core/SourceCollection.vala" - _tmp4_ = _tmp3_; -#line 165 "/home/jens/Source/shotwell/src/core/SourceCollection.vala" - if (_tmp4_ == 0) { -#line 166 "/home/jens/Source/shotwell/src/core/SourceCollection.vala" - result = NULL; -#line 166 "/home/jens/Source/shotwell/src/core/SourceCollection.vala" - _g_object_unref0 (list); -#line 166 "/home/jens/Source/shotwell/src/core/SourceCollection.vala" - return result; -#line 1189 "SourceCollection.c" - } -#line 168 "/home/jens/Source/shotwell/src/core/SourceCollection.vala" - _tmp5_ = list; -#line 168 "/home/jens/Source/shotwell/src/core/SourceCollection.vala" - source_collection_notify_items_unlinking (self, G_TYPE_CHECK_INSTANCE_CAST (_tmp5_, GEE_TYPE_COLLECTION, GeeCollection)); -#line 170 "/home/jens/Source/shotwell/src/core/SourceCollection.vala" - _tmp6_ = list; -#line 170 "/home/jens/Source/shotwell/src/core/SourceCollection.vala" - _tmp7_ = data_collection_mark_many (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_DATA_COLLECTION, DataCollection), G_TYPE_CHECK_INSTANCE_CAST (_tmp6_, GEE_TYPE_COLLECTION, GeeCollection)); -#line 170 "/home/jens/Source/shotwell/src/core/SourceCollection.vala" - _tmp8_ = _tmp7_; -#line 170 "/home/jens/Source/shotwell/src/core/SourceCollection.vala" - data_collection_remove_marked (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_DATA_COLLECTION, DataCollection), _tmp8_); -#line 170 "/home/jens/Source/shotwell/src/core/SourceCollection.vala" - _g_object_unref0 (_tmp8_); -#line 172 "/home/jens/Source/shotwell/src/core/SourceCollection.vala" - result = G_TYPE_CHECK_INSTANCE_CAST (list, GEE_TYPE_COLLECTION, GeeCollection); -#line 172 "/home/jens/Source/shotwell/src/core/SourceCollection.vala" - return result; -#line 1209 "SourceCollection.c" -} - - -static gboolean -source_collection_prepare_for_unlink (SourceCollection* self, - DataObject* object, - GObject* user) -{ - gboolean result = FALSE; - DataSource* source = NULL; - DataSource* _tmp0_; -#line 175 "/home/jens/Source/shotwell/src/core/SourceCollection.vala" - g_return_val_if_fail (IS_SOURCE_COLLECTION (self), FALSE); -#line 175 "/home/jens/Source/shotwell/src/core/SourceCollection.vala" - g_return_val_if_fail (IS_DATA_OBJECT (object), FALSE); -#line 175 "/home/jens/Source/shotwell/src/core/SourceCollection.vala" - g_return_val_if_fail ((user == NULL) || G_IS_OBJECT (user), FALSE); -#line 176 "/home/jens/Source/shotwell/src/core/SourceCollection.vala" - _tmp0_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_CAST (object, TYPE_DATA_SOURCE, DataSource)); -#line 176 "/home/jens/Source/shotwell/src/core/SourceCollection.vala" - source = _tmp0_; -#line 178 "/home/jens/Source/shotwell/src/core/SourceCollection.vala" - data_source_notify_unlinking (source, self); -#line 179 "/home/jens/Source/shotwell/src/core/SourceCollection.vala" - gee_collection_add (G_TYPE_CHECK_INSTANCE_CAST (G_TYPE_CHECK_INSTANCE_CAST (user, GEE_TYPE_LIST, GeeList), GEE_TYPE_COLLECTION, GeeCollection), source); -#line 181 "/home/jens/Source/shotwell/src/core/SourceCollection.vala" - result = TRUE; -#line 181 "/home/jens/Source/shotwell/src/core/SourceCollection.vala" - _g_object_unref0 (source); -#line 181 "/home/jens/Source/shotwell/src/core/SourceCollection.vala" - return result; -#line 1241 "SourceCollection.c" -} - - -void -source_collection_relink (SourceCollection* self, - DataSource* source) -{ - GeeCollection* _tmp0_; - GeeCollection* _tmp1_; -#line 184 "/home/jens/Source/shotwell/src/core/SourceCollection.vala" - g_return_if_fail (IS_SOURCE_COLLECTION (self)); -#line 184 "/home/jens/Source/shotwell/src/core/SourceCollection.vala" - g_return_if_fail (IS_DATA_SOURCE (source)); -#line 185 "/home/jens/Source/shotwell/src/core/SourceCollection.vala" - data_source_notify_relinking (source, self); -#line 187 "/home/jens/Source/shotwell/src/core/SourceCollection.vala" - data_collection_add (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_DATA_COLLECTION, DataCollection), G_TYPE_CHECK_INSTANCE_CAST (source, TYPE_DATA_OBJECT, DataObject)); -#line 188 "/home/jens/Source/shotwell/src/core/SourceCollection.vala" - _tmp0_ = data_collection_get_singleton (G_TYPE_CHECK_INSTANCE_CAST (source, TYPE_DATA_OBJECT, DataObject)); -#line 188 "/home/jens/Source/shotwell/src/core/SourceCollection.vala" - _tmp1_ = G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, GEE_TYPE_COLLECTION, GeeCollection); -#line 188 "/home/jens/Source/shotwell/src/core/SourceCollection.vala" - source_collection_notify_items_relinked (self, _tmp1_); -#line 188 "/home/jens/Source/shotwell/src/core/SourceCollection.vala" - _g_object_unref0 (_tmp1_); -#line 190 "/home/jens/Source/shotwell/src/core/SourceCollection.vala" - data_source_notify_relinked (source); -#line 1269 "SourceCollection.c" -} - - -void -source_collection_relink_many (SourceCollection* self, - GeeCollection* relink) -{ - gint _tmp0_; - gint _tmp1_; - GeeCollection* _tmp7_; - GeeCollection* _tmp8_; -#line 193 "/home/jens/Source/shotwell/src/core/SourceCollection.vala" - g_return_if_fail (IS_SOURCE_COLLECTION (self)); -#line 193 "/home/jens/Source/shotwell/src/core/SourceCollection.vala" - g_return_if_fail (GEE_IS_COLLECTION (relink)); -#line 194 "/home/jens/Source/shotwell/src/core/SourceCollection.vala" - _tmp0_ = gee_collection_get_size (relink); -#line 194 "/home/jens/Source/shotwell/src/core/SourceCollection.vala" - _tmp1_ = _tmp0_; -#line 194 "/home/jens/Source/shotwell/src/core/SourceCollection.vala" - if (_tmp1_ == 0) { -#line 195 "/home/jens/Source/shotwell/src/core/SourceCollection.vala" - return; -#line 1293 "SourceCollection.c" - } - { - GeeIterator* _source_it = NULL; - GeeIterator* _tmp2_; -#line 197 "/home/jens/Source/shotwell/src/core/SourceCollection.vala" - _tmp2_ = gee_iterable_iterator (G_TYPE_CHECK_INSTANCE_CAST (relink, GEE_TYPE_ITERABLE, GeeIterable)); -#line 197 "/home/jens/Source/shotwell/src/core/SourceCollection.vala" - _source_it = _tmp2_; -#line 197 "/home/jens/Source/shotwell/src/core/SourceCollection.vala" - while (TRUE) { -#line 1304 "SourceCollection.c" - GeeIterator* _tmp3_; - DataSource* source = NULL; - GeeIterator* _tmp4_; - gpointer _tmp5_; - DataSource* _tmp6_; -#line 197 "/home/jens/Source/shotwell/src/core/SourceCollection.vala" - _tmp3_ = _source_it; -#line 197 "/home/jens/Source/shotwell/src/core/SourceCollection.vala" - if (!gee_iterator_next (_tmp3_)) { -#line 197 "/home/jens/Source/shotwell/src/core/SourceCollection.vala" - break; -#line 1316 "SourceCollection.c" - } -#line 197 "/home/jens/Source/shotwell/src/core/SourceCollection.vala" - _tmp4_ = _source_it; -#line 197 "/home/jens/Source/shotwell/src/core/SourceCollection.vala" - _tmp5_ = gee_iterator_get (_tmp4_); -#line 197 "/home/jens/Source/shotwell/src/core/SourceCollection.vala" - source = (DataSource*) _tmp5_; -#line 198 "/home/jens/Source/shotwell/src/core/SourceCollection.vala" - _tmp6_ = source; -#line 198 "/home/jens/Source/shotwell/src/core/SourceCollection.vala" - data_source_notify_relinking (_tmp6_, self); -#line 197 "/home/jens/Source/shotwell/src/core/SourceCollection.vala" - _g_object_unref0 (source); -#line 1330 "SourceCollection.c" - } -#line 197 "/home/jens/Source/shotwell/src/core/SourceCollection.vala" - _g_object_unref0 (_source_it); -#line 1334 "SourceCollection.c" - } -#line 200 "/home/jens/Source/shotwell/src/core/SourceCollection.vala" - _tmp7_ = data_collection_add_many (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_DATA_COLLECTION, DataCollection), relink, NULL, NULL); -#line 200 "/home/jens/Source/shotwell/src/core/SourceCollection.vala" - _tmp8_ = _tmp7_; -#line 200 "/home/jens/Source/shotwell/src/core/SourceCollection.vala" - _g_object_unref0 (_tmp8_); -#line 201 "/home/jens/Source/shotwell/src/core/SourceCollection.vala" - source_collection_notify_items_relinked (self, relink); -#line 1344 "SourceCollection.c" - { - GeeIterator* _source_it = NULL; - GeeIterator* _tmp9_; -#line 203 "/home/jens/Source/shotwell/src/core/SourceCollection.vala" - _tmp9_ = gee_iterable_iterator (G_TYPE_CHECK_INSTANCE_CAST (relink, GEE_TYPE_ITERABLE, GeeIterable)); -#line 203 "/home/jens/Source/shotwell/src/core/SourceCollection.vala" - _source_it = _tmp9_; -#line 203 "/home/jens/Source/shotwell/src/core/SourceCollection.vala" - while (TRUE) { -#line 1354 "SourceCollection.c" - GeeIterator* _tmp10_; - DataSource* source = NULL; - GeeIterator* _tmp11_; - gpointer _tmp12_; - DataSource* _tmp13_; -#line 203 "/home/jens/Source/shotwell/src/core/SourceCollection.vala" - _tmp10_ = _source_it; -#line 203 "/home/jens/Source/shotwell/src/core/SourceCollection.vala" - if (!gee_iterator_next (_tmp10_)) { -#line 203 "/home/jens/Source/shotwell/src/core/SourceCollection.vala" - break; -#line 1366 "SourceCollection.c" - } -#line 203 "/home/jens/Source/shotwell/src/core/SourceCollection.vala" - _tmp11_ = _source_it; -#line 203 "/home/jens/Source/shotwell/src/core/SourceCollection.vala" - _tmp12_ = gee_iterator_get (_tmp11_); -#line 203 "/home/jens/Source/shotwell/src/core/SourceCollection.vala" - source = (DataSource*) _tmp12_; -#line 204 "/home/jens/Source/shotwell/src/core/SourceCollection.vala" - _tmp13_ = source; -#line 204 "/home/jens/Source/shotwell/src/core/SourceCollection.vala" - data_source_notify_relinked (_tmp13_); -#line 203 "/home/jens/Source/shotwell/src/core/SourceCollection.vala" - _g_object_unref0 (source); -#line 1380 "SourceCollection.c" - } -#line 203 "/home/jens/Source/shotwell/src/core/SourceCollection.vala" - _g_object_unref0 (_source_it); -#line 1384 "SourceCollection.c" - } -} - - -static void -source_collection_real_remove_backlink (SourceCollection* self, - SourceBacklink* backlink) -{ - GeeMultiMap* _tmp0_; - GeeArrayList* sources = NULL; - GeeArrayList* _tmp1_; - GeeArrayList* _tmp2_; - GeeMultiMap* _tmp3_; - GeeCollection* _tmp4_; - GeeCollection* _tmp5_; - GeeArrayList* _tmp18_; -#line 207 "/home/jens/Source/shotwell/src/core/SourceCollection.vala" - g_return_if_fail (IS_SOURCE_BACKLINK (backlink)); -#line 208 "/home/jens/Source/shotwell/src/core/SourceCollection.vala" - _tmp0_ = self->priv->backlinks; -#line 208 "/home/jens/Source/shotwell/src/core/SourceCollection.vala" - if (_tmp0_ == NULL) { -#line 209 "/home/jens/Source/shotwell/src/core/SourceCollection.vala" - return; -#line 1409 "SourceCollection.c" - } -#line 212 "/home/jens/Source/shotwell/src/core/SourceCollection.vala" - _tmp1_ = gee_array_list_new (TYPE_DATA_SOURCE, (GBoxedCopyFunc) g_object_ref, (GDestroyNotify) g_object_unref, NULL, NULL, NULL); -#line 212 "/home/jens/Source/shotwell/src/core/SourceCollection.vala" - sources = _tmp1_; -#line 213 "/home/jens/Source/shotwell/src/core/SourceCollection.vala" - _tmp2_ = sources; -#line 213 "/home/jens/Source/shotwell/src/core/SourceCollection.vala" - _tmp3_ = self->priv->backlinks; -#line 213 "/home/jens/Source/shotwell/src/core/SourceCollection.vala" - _tmp4_ = gee_multi_map_get (_tmp3_, backlink); -#line 213 "/home/jens/Source/shotwell/src/core/SourceCollection.vala" - _tmp5_ = _tmp4_; -#line 213 "/home/jens/Source/shotwell/src/core/SourceCollection.vala" - gee_array_list_add_all (_tmp2_, _tmp5_); -#line 213 "/home/jens/Source/shotwell/src/core/SourceCollection.vala" - _g_object_unref0 (_tmp5_); -#line 1427 "SourceCollection.c" - { - GeeArrayList* _source_list = NULL; - GeeArrayList* _tmp6_; - GeeArrayList* _tmp7_; - gint _source_size = 0; - GeeArrayList* _tmp8_; - gint _tmp9_; - gint _tmp10_; - gint _source_index = 0; -#line 215 "/home/jens/Source/shotwell/src/core/SourceCollection.vala" - _tmp6_ = sources; -#line 215 "/home/jens/Source/shotwell/src/core/SourceCollection.vala" - _tmp7_ = _g_object_ref0 (_tmp6_); -#line 215 "/home/jens/Source/shotwell/src/core/SourceCollection.vala" - _source_list = _tmp7_; -#line 215 "/home/jens/Source/shotwell/src/core/SourceCollection.vala" - _tmp8_ = _source_list; -#line 215 "/home/jens/Source/shotwell/src/core/SourceCollection.vala" - _tmp9_ = gee_abstract_collection_get_size (G_TYPE_CHECK_INSTANCE_CAST (_tmp8_, GEE_TYPE_ABSTRACT_COLLECTION, GeeAbstractCollection)); -#line 215 "/home/jens/Source/shotwell/src/core/SourceCollection.vala" - _tmp10_ = _tmp9_; -#line 215 "/home/jens/Source/shotwell/src/core/SourceCollection.vala" - _source_size = _tmp10_; -#line 215 "/home/jens/Source/shotwell/src/core/SourceCollection.vala" - _source_index = -1; -#line 215 "/home/jens/Source/shotwell/src/core/SourceCollection.vala" - while (TRUE) { -#line 1455 "SourceCollection.c" - gint _tmp11_; - gint _tmp12_; - gint _tmp13_; - DataSource* source = NULL; - GeeArrayList* _tmp14_; - gint _tmp15_; - gpointer _tmp16_; - DataSource* _tmp17_; -#line 215 "/home/jens/Source/shotwell/src/core/SourceCollection.vala" - _tmp11_ = _source_index; -#line 215 "/home/jens/Source/shotwell/src/core/SourceCollection.vala" - _source_index = _tmp11_ + 1; -#line 215 "/home/jens/Source/shotwell/src/core/SourceCollection.vala" - _tmp12_ = _source_index; -#line 215 "/home/jens/Source/shotwell/src/core/SourceCollection.vala" - _tmp13_ = _source_size; -#line 215 "/home/jens/Source/shotwell/src/core/SourceCollection.vala" - if (!(_tmp12_ < _tmp13_)) { -#line 215 "/home/jens/Source/shotwell/src/core/SourceCollection.vala" - break; -#line 1476 "SourceCollection.c" - } -#line 215 "/home/jens/Source/shotwell/src/core/SourceCollection.vala" - _tmp14_ = _source_list; -#line 215 "/home/jens/Source/shotwell/src/core/SourceCollection.vala" - _tmp15_ = _source_index; -#line 215 "/home/jens/Source/shotwell/src/core/SourceCollection.vala" - _tmp16_ = gee_abstract_list_get (G_TYPE_CHECK_INSTANCE_CAST (_tmp14_, GEE_TYPE_ABSTRACT_LIST, GeeAbstractList), _tmp15_); -#line 215 "/home/jens/Source/shotwell/src/core/SourceCollection.vala" - source = (DataSource*) _tmp16_; -#line 216 "/home/jens/Source/shotwell/src/core/SourceCollection.vala" - _tmp17_ = source; -#line 216 "/home/jens/Source/shotwell/src/core/SourceCollection.vala" - data_source_remove_backlink (_tmp17_, backlink); -#line 215 "/home/jens/Source/shotwell/src/core/SourceCollection.vala" - _g_object_unref0 (source); -#line 1492 "SourceCollection.c" - } -#line 215 "/home/jens/Source/shotwell/src/core/SourceCollection.vala" - _g_object_unref0 (_source_list); -#line 1496 "SourceCollection.c" - } -#line 218 "/home/jens/Source/shotwell/src/core/SourceCollection.vala" - _tmp18_ = sources; -#line 218 "/home/jens/Source/shotwell/src/core/SourceCollection.vala" - source_collection_notify_backlink_removed (self, backlink, G_TYPE_CHECK_INSTANCE_CAST (_tmp18_, GEE_TYPE_COLLECTION, GeeCollection)); -#line 207 "/home/jens/Source/shotwell/src/core/SourceCollection.vala" - _g_object_unref0 (sources); -#line 1504 "SourceCollection.c" -} - - -void -source_collection_remove_backlink (SourceCollection* self, - SourceBacklink* backlink) -{ -#line 207 "/home/jens/Source/shotwell/src/core/SourceCollection.vala" - g_return_if_fail (IS_SOURCE_COLLECTION (self)); -#line 207 "/home/jens/Source/shotwell/src/core/SourceCollection.vala" - SOURCE_COLLECTION_GET_CLASS (self)->remove_backlink (self, backlink); -#line 1516 "SourceCollection.c" -} - - -static void -source_collection_real_items_unlinking (SourceCollection* self, - GeeCollection* unlinking) -{ -#line 20 "/home/jens/Source/shotwell/src/core/SourceCollection.vala" - g_return_if_fail (GEE_IS_COLLECTION (unlinking)); -#line 1526 "SourceCollection.c" -} - - -static void -source_collection_real_items_relinked (SourceCollection* self, - GeeCollection* relinked) -{ -#line 25 "/home/jens/Source/shotwell/src/core/SourceCollection.vala" - g_return_if_fail (GEE_IS_COLLECTION (relinked)); -#line 1536 "SourceCollection.c" -} - - -static void -source_collection_real_item_destroyed (SourceCollection* self, - DataSource* source) -{ -#line 30 "/home/jens/Source/shotwell/src/core/SourceCollection.vala" - g_return_if_fail (IS_DATA_SOURCE (source)); -#line 1546 "SourceCollection.c" -} - - -static void -source_collection_real_items_destroyed (SourceCollection* self, - GeeCollection* destroyed) -{ -#line 35 "/home/jens/Source/shotwell/src/core/SourceCollection.vala" - g_return_if_fail (GEE_IS_COLLECTION (destroyed)); -#line 1556 "SourceCollection.c" -} - - -static void -source_collection_real_unlinked_destroyed (SourceCollection* self, - DataSource* source) -{ -#line 40 "/home/jens/Source/shotwell/src/core/SourceCollection.vala" - g_return_if_fail (IS_DATA_SOURCE (source)); -#line 1566 "SourceCollection.c" -} - - -static void -source_collection_real_backlink_removed (SourceCollection* self, - SourceBacklink* backlink, - GeeCollection* sources) -{ -#line 44 "/home/jens/Source/shotwell/src/core/SourceCollection.vala" - g_return_if_fail (IS_SOURCE_BACKLINK (backlink)); -#line 44 "/home/jens/Source/shotwell/src/core/SourceCollection.vala" - g_return_if_fail (GEE_IS_COLLECTION (sources)); -#line 1579 "SourceCollection.c" -} - - -static void -g_cclosure_user_marshal_VOID__SOURCE_BACKLINK_OBJECT (GClosure * closure, - GValue * return_value, - guint n_param_values, - const GValue * param_values, - gpointer invocation_hint, - gpointer marshal_data) -{ - typedef void (*GMarshalFunc_VOID__SOURCE_BACKLINK_OBJECT) (gpointer data1, gpointer arg_1, gpointer arg_2, gpointer data2); - register GMarshalFunc_VOID__SOURCE_BACKLINK_OBJECT callback; - register GCClosure * cc; - register gpointer data1; - register gpointer data2; - cc = (GCClosure *) closure; -#line 7 "/home/jens/Source/shotwell/src/core/SourceCollection.vala" - g_return_if_fail (n_param_values == 3); -#line 7 "/home/jens/Source/shotwell/src/core/SourceCollection.vala" - if (G_CCLOSURE_SWAP_DATA (closure)) { -#line 7 "/home/jens/Source/shotwell/src/core/SourceCollection.vala" - data1 = closure->data; -#line 7 "/home/jens/Source/shotwell/src/core/SourceCollection.vala" - data2 = param_values->data[0].v_pointer; -#line 1605 "SourceCollection.c" - } else { -#line 7 "/home/jens/Source/shotwell/src/core/SourceCollection.vala" - data1 = param_values->data[0].v_pointer; -#line 7 "/home/jens/Source/shotwell/src/core/SourceCollection.vala" - data2 = closure->data; -#line 1611 "SourceCollection.c" - } -#line 7 "/home/jens/Source/shotwell/src/core/SourceCollection.vala" - callback = (GMarshalFunc_VOID__SOURCE_BACKLINK_OBJECT) (marshal_data ? marshal_data : cc->callback); -#line 7 "/home/jens/Source/shotwell/src/core/SourceCollection.vala" - callback (data1, value_get_source_backlink (param_values + 1), g_value_get_object (param_values + 2), data2); -#line 1617 "SourceCollection.c" -} - - -static SourceCollectionDestroyCounter* -source_collection_destroy_counter_construct (GType object_type, - Marker* remove_marker) -{ - SourceCollectionDestroyCounter * self = NULL; - Marker* _tmp0_; -#line 13 "/home/jens/Source/shotwell/src/core/SourceCollection.vala" - g_return_val_if_fail (IS_MARKER (remove_marker), NULL); -#line 13 "/home/jens/Source/shotwell/src/core/SourceCollection.vala" - self = (SourceCollectionDestroyCounter*) g_object_new (object_type, NULL); -#line 14 "/home/jens/Source/shotwell/src/core/SourceCollection.vala" - _tmp0_ = _g_object_ref0 (remove_marker); -#line 14 "/home/jens/Source/shotwell/src/core/SourceCollection.vala" - _g_object_unref0 (self->remove_marker); -#line 14 "/home/jens/Source/shotwell/src/core/SourceCollection.vala" - self->remove_marker = _tmp0_; -#line 13 "/home/jens/Source/shotwell/src/core/SourceCollection.vala" - return self; -#line 1639 "SourceCollection.c" -} - - -static SourceCollectionDestroyCounter* -source_collection_destroy_counter_new (Marker* remove_marker) -{ -#line 13 "/home/jens/Source/shotwell/src/core/SourceCollection.vala" - return source_collection_destroy_counter_construct (SOURCE_COLLECTION_TYPE_DESTROY_COUNTER, remove_marker); -#line 1648 "SourceCollection.c" -} - - -static void -source_collection_destroy_counter_class_init (SourceCollectionDestroyCounterClass * klass) -{ -#line 8 "/home/jens/Source/shotwell/src/core/SourceCollection.vala" - source_collection_destroy_counter_parent_class = g_type_class_peek_parent (klass); -#line 8 "/home/jens/Source/shotwell/src/core/SourceCollection.vala" - G_OBJECT_CLASS (klass)->finalize = source_collection_destroy_counter_finalize; -#line 1659 "SourceCollection.c" -} - - -static void -source_collection_destroy_counter_instance_init (SourceCollectionDestroyCounter * self) -{ - GeeArrayList* _tmp0_; - GeeArrayList* _tmp1_; -#line 10 "/home/jens/Source/shotwell/src/core/SourceCollection.vala" - _tmp0_ = gee_array_list_new (TYPE_DATA_SOURCE, (GBoxedCopyFunc) g_object_ref, (GDestroyNotify) g_object_unref, NULL, NULL, NULL); -#line 10 "/home/jens/Source/shotwell/src/core/SourceCollection.vala" - self->notify_list = _tmp0_; -#line 11 "/home/jens/Source/shotwell/src/core/SourceCollection.vala" - _tmp1_ = gee_array_list_new (TYPE_MEDIA_SOURCE, (GBoxedCopyFunc) g_object_ref, (GDestroyNotify) g_object_unref, NULL, NULL, NULL); -#line 11 "/home/jens/Source/shotwell/src/core/SourceCollection.vala" - self->not_removed = _tmp1_; -#line 1676 "SourceCollection.c" -} - - -static void -source_collection_destroy_counter_finalize (GObject * obj) -{ - SourceCollectionDestroyCounter * self; -#line 8 "/home/jens/Source/shotwell/src/core/SourceCollection.vala" - self = G_TYPE_CHECK_INSTANCE_CAST (obj, SOURCE_COLLECTION_TYPE_DESTROY_COUNTER, SourceCollectionDestroyCounter); -#line 9 "/home/jens/Source/shotwell/src/core/SourceCollection.vala" - _g_object_unref0 (self->remove_marker); -#line 10 "/home/jens/Source/shotwell/src/core/SourceCollection.vala" - _g_object_unref0 (self->notify_list); -#line 11 "/home/jens/Source/shotwell/src/core/SourceCollection.vala" - _g_object_unref0 (self->not_removed); -#line 8 "/home/jens/Source/shotwell/src/core/SourceCollection.vala" - G_OBJECT_CLASS (source_collection_destroy_counter_parent_class)->finalize (obj); -#line 1694 "SourceCollection.c" -} - - -static GType -source_collection_destroy_counter_get_type (void) -{ - static volatile gsize source_collection_destroy_counter_type_id__volatile = 0; - if (g_once_init_enter (&source_collection_destroy_counter_type_id__volatile)) { - static const GTypeInfo g_define_type_info = { sizeof (SourceCollectionDestroyCounterClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) source_collection_destroy_counter_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (SourceCollectionDestroyCounter), 0, (GInstanceInitFunc) source_collection_destroy_counter_instance_init, NULL }; - GType source_collection_destroy_counter_type_id; - source_collection_destroy_counter_type_id = g_type_register_static (G_TYPE_OBJECT, "SourceCollectionDestroyCounter", &g_define_type_info, 0); - g_once_init_leave (&source_collection_destroy_counter_type_id__volatile, source_collection_destroy_counter_type_id); - } - return source_collection_destroy_counter_type_id__volatile; -} - - -static void -source_collection_class_init (SourceCollectionClass * klass) -{ -#line 7 "/home/jens/Source/shotwell/src/core/SourceCollection.vala" - source_collection_parent_class = g_type_class_peek_parent (klass); -#line 7 "/home/jens/Source/shotwell/src/core/SourceCollection.vala" - ((DataCollectionClass *) klass)->finalize = source_collection_finalize; -#line 7 "/home/jens/Source/shotwell/src/core/SourceCollection.vala" - g_type_class_add_private (klass, sizeof (SourceCollectionPrivate)); -#line 7 "/home/jens/Source/shotwell/src/core/SourceCollection.vala" - ((SourceCollectionClass *) klass)->holds_type_of_source = (gboolean (*) (SourceCollection *, DataSource*)) source_collection_real_holds_type_of_source; -#line 7 "/home/jens/Source/shotwell/src/core/SourceCollection.vala" - ((SourceCollectionClass *) klass)->notify_items_unlinking = (void (*) (SourceCollection *, GeeCollection*)) source_collection_real_notify_items_unlinking; -#line 7 "/home/jens/Source/shotwell/src/core/SourceCollection.vala" - ((SourceCollectionClass *) klass)->notify_items_relinked = (void (*) (SourceCollection *, GeeCollection*)) source_collection_real_notify_items_relinked; -#line 7 "/home/jens/Source/shotwell/src/core/SourceCollection.vala" - ((SourceCollectionClass *) klass)->notify_item_destroyed = (void (*) (SourceCollection *, DataSource*)) source_collection_real_notify_item_destroyed; -#line 7 "/home/jens/Source/shotwell/src/core/SourceCollection.vala" - ((SourceCollectionClass *) klass)->notify_items_destroyed = (void (*) (SourceCollection *, GeeCollection*)) source_collection_real_notify_items_destroyed; -#line 7 "/home/jens/Source/shotwell/src/core/SourceCollection.vala" - ((SourceCollectionClass *) klass)->notify_unlinked_destroyed = (void (*) (SourceCollection *, DataSource*)) source_collection_real_notify_unlinked_destroyed; -#line 7 "/home/jens/Source/shotwell/src/core/SourceCollection.vala" - ((SourceCollectionClass *) klass)->notify_backlink_removed = (void (*) (SourceCollection *, SourceBacklink*, GeeCollection*)) source_collection_real_notify_backlink_removed; -#line 7 "/home/jens/Source/shotwell/src/core/SourceCollection.vala" - ((DataCollectionClass *) klass)->valid_type = (gboolean (*) (DataCollection *, DataObject*)) source_collection_real_valid_type; -#line 7 "/home/jens/Source/shotwell/src/core/SourceCollection.vala" - ((SourceCollectionClass *) klass)->has_backlink = (gboolean (*) (SourceCollection *, SourceBacklink*)) source_collection_real_has_backlink; -#line 7 "/home/jens/Source/shotwell/src/core/SourceCollection.vala" - ((SourceCollectionClass *) klass)->remove_backlink = (void (*) (SourceCollection *, SourceBacklink*)) source_collection_real_remove_backlink; -#line 7 "/home/jens/Source/shotwell/src/core/SourceCollection.vala" - ((SourceCollectionClass *) klass)->items_unlinking = source_collection_real_items_unlinking; -#line 7 "/home/jens/Source/shotwell/src/core/SourceCollection.vala" - ((SourceCollectionClass *) klass)->items_relinked = source_collection_real_items_relinked; -#line 7 "/home/jens/Source/shotwell/src/core/SourceCollection.vala" - ((SourceCollectionClass *) klass)->item_destroyed = source_collection_real_item_destroyed; -#line 7 "/home/jens/Source/shotwell/src/core/SourceCollection.vala" - ((SourceCollectionClass *) klass)->items_destroyed = source_collection_real_items_destroyed; -#line 7 "/home/jens/Source/shotwell/src/core/SourceCollection.vala" - ((SourceCollectionClass *) klass)->unlinked_destroyed = source_collection_real_unlinked_destroyed; -#line 7 "/home/jens/Source/shotwell/src/core/SourceCollection.vala" - ((SourceCollectionClass *) klass)->backlink_removed = source_collection_real_backlink_removed; -#line 7 "/home/jens/Source/shotwell/src/core/SourceCollection.vala" - source_collection_signals[SOURCE_COLLECTION_ITEMS_UNLINKING_SIGNAL] = g_signal_new ("items-unlinking", TYPE_SOURCE_COLLECTION, G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET (SourceCollectionClass, items_unlinking), NULL, NULL, g_cclosure_marshal_VOID__OBJECT, G_TYPE_NONE, 1, GEE_TYPE_COLLECTION); -#line 7 "/home/jens/Source/shotwell/src/core/SourceCollection.vala" - source_collection_signals[SOURCE_COLLECTION_ITEMS_RELINKED_SIGNAL] = g_signal_new ("items-relinked", TYPE_SOURCE_COLLECTION, G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET (SourceCollectionClass, items_relinked), NULL, NULL, g_cclosure_marshal_VOID__OBJECT, G_TYPE_NONE, 1, GEE_TYPE_COLLECTION); -#line 7 "/home/jens/Source/shotwell/src/core/SourceCollection.vala" - source_collection_signals[SOURCE_COLLECTION_ITEM_DESTROYED_SIGNAL] = g_signal_new ("item-destroyed", TYPE_SOURCE_COLLECTION, G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET (SourceCollectionClass, item_destroyed), NULL, NULL, g_cclosure_marshal_VOID__OBJECT, G_TYPE_NONE, 1, TYPE_DATA_SOURCE); -#line 7 "/home/jens/Source/shotwell/src/core/SourceCollection.vala" - source_collection_signals[SOURCE_COLLECTION_ITEMS_DESTROYED_SIGNAL] = g_signal_new ("items-destroyed", TYPE_SOURCE_COLLECTION, G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET (SourceCollectionClass, items_destroyed), NULL, NULL, g_cclosure_marshal_VOID__OBJECT, G_TYPE_NONE, 1, GEE_TYPE_COLLECTION); -#line 7 "/home/jens/Source/shotwell/src/core/SourceCollection.vala" - source_collection_signals[SOURCE_COLLECTION_UNLINKED_DESTROYED_SIGNAL] = g_signal_new ("unlinked-destroyed", TYPE_SOURCE_COLLECTION, G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET (SourceCollectionClass, unlinked_destroyed), NULL, NULL, g_cclosure_marshal_VOID__OBJECT, G_TYPE_NONE, 1, TYPE_DATA_SOURCE); -#line 7 "/home/jens/Source/shotwell/src/core/SourceCollection.vala" - source_collection_signals[SOURCE_COLLECTION_BACKLINK_REMOVED_SIGNAL] = g_signal_new ("backlink-removed", TYPE_SOURCE_COLLECTION, G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET (SourceCollectionClass, backlink_removed), NULL, NULL, g_cclosure_user_marshal_VOID__SOURCE_BACKLINK_OBJECT, G_TYPE_NONE, 2, TYPE_SOURCE_BACKLINK, GEE_TYPE_COLLECTION); -#line 1765 "SourceCollection.c" -} - - -static void -source_collection_instance_init (SourceCollection * self) -{ -#line 7 "/home/jens/Source/shotwell/src/core/SourceCollection.vala" - self->priv = SOURCE_COLLECTION_GET_PRIVATE (self); -#line 48 "/home/jens/Source/shotwell/src/core/SourceCollection.vala" - self->priv->backlinks = NULL; -#line 1776 "SourceCollection.c" -} - - -static void -source_collection_finalize (DataCollection * obj) -{ - SourceCollection * self; -#line 7 "/home/jens/Source/shotwell/src/core/SourceCollection.vala" - self = G_TYPE_CHECK_INSTANCE_CAST (obj, TYPE_SOURCE_COLLECTION, SourceCollection); -#line 48 "/home/jens/Source/shotwell/src/core/SourceCollection.vala" - _g_object_unref0 (self->priv->backlinks); -#line 7 "/home/jens/Source/shotwell/src/core/SourceCollection.vala" - DATA_COLLECTION_CLASS (source_collection_parent_class)->finalize (obj); -#line 1790 "SourceCollection.c" -} - - -GType -source_collection_get_type (void) -{ - static volatile gsize source_collection_type_id__volatile = 0; - if (g_once_init_enter (&source_collection_type_id__volatile)) { - static const GTypeInfo g_define_type_info = { sizeof (SourceCollectionClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) source_collection_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (SourceCollection), 0, (GInstanceInitFunc) source_collection_instance_init, NULL }; - GType source_collection_type_id; - source_collection_type_id = g_type_register_static (TYPE_DATA_COLLECTION, "SourceCollection", &g_define_type_info, G_TYPE_FLAG_ABSTRACT); - g_once_init_leave (&source_collection_type_id__volatile, source_collection_type_id); - } - return source_collection_type_id__volatile; -} - - - diff --git a/src/core/SourceHoldingTank.c b/src/core/SourceHoldingTank.c deleted file mode 100644 index 809af37..0000000 --- a/src/core/SourceHoldingTank.c +++ /dev/null @@ -1,1736 +0,0 @@ -/* SourceHoldingTank.c generated by valac 0.40.4, the Vala compiler - * generated from SourceHoldingTank.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. - */ -/* A SourceHoldingTank is similar to the holding tank used by ContainerSourceCollection, but for*/ -/* non-ContainerSources to be held offline from their natural SourceCollection (i.e. PhotoSources*/ -/* being held in a trashcan, for example). It is *not* a DataCollection (important!), but rather*/ -/* a signalled collection that moves DataSources to and from their SourceCollection.*/ -/**/ -/* DataSources can be shuttled from their SourceCollection to the SourceHoldingTank manually*/ -/* (via unlink_and_hold) or can be automatically moved by installing a HoldingPredicate.*/ -/* Only one HoldingConditional may be installed. Because of assertions in the methods, it's unwise*/ -/* to use more than one method. add() and add_many() should ONLY be used for DataSources not*/ -/* first installed in their SourceCollection (i.e. they're born in the SourceHoldingTank).*/ -/**/ -/* NOTE: DataSources should never be in more than one SourceHoldingTank. No tests are performed*/ -/* here to verify this. This is why a filter/predicate method (which could automatically move*/ -/* them in as they're altered) is not offered; there's no easy way to keep DataSources from being*/ -/* moved into more than one holding tank, or which should have preference. The CheckToRemove*/ -/* predicate is offered only to know when to release them.*/ - - -#include <glib.h> -#include <glib-object.h> -#include <gee.h> -#include <stdlib.h> -#include <string.h> -#include <gobject/gvaluecollector.h> - - -#define TYPE_SOURCE_HOLDING_TANK (source_holding_tank_get_type ()) -#define SOURCE_HOLDING_TANK(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_SOURCE_HOLDING_TANK, SourceHoldingTank)) -#define SOURCE_HOLDING_TANK_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_SOURCE_HOLDING_TANK, SourceHoldingTankClass)) -#define IS_SOURCE_HOLDING_TANK(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_SOURCE_HOLDING_TANK)) -#define IS_SOURCE_HOLDING_TANK_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_SOURCE_HOLDING_TANK)) -#define SOURCE_HOLDING_TANK_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_SOURCE_HOLDING_TANK, SourceHoldingTankClass)) - -typedef struct _SourceHoldingTank SourceHoldingTank; -typedef struct _SourceHoldingTankClass SourceHoldingTankClass; -typedef struct _SourceHoldingTankPrivate SourceHoldingTankPrivate; - -#define TYPE_DATA_OBJECT (data_object_get_type ()) -#define DATA_OBJECT(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_DATA_OBJECT, DataObject)) -#define DATA_OBJECT_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_DATA_OBJECT, DataObjectClass)) -#define IS_DATA_OBJECT(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_DATA_OBJECT)) -#define IS_DATA_OBJECT_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_DATA_OBJECT)) -#define DATA_OBJECT_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_DATA_OBJECT, DataObjectClass)) - -typedef struct _DataObject DataObject; -typedef struct _DataObjectClass DataObjectClass; - -#define TYPE_DATA_SOURCE (data_source_get_type ()) -#define DATA_SOURCE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_DATA_SOURCE, DataSource)) -#define DATA_SOURCE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_DATA_SOURCE, DataSourceClass)) -#define IS_DATA_SOURCE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_DATA_SOURCE)) -#define IS_DATA_SOURCE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_DATA_SOURCE)) -#define DATA_SOURCE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_DATA_SOURCE, DataSourceClass)) - -typedef struct _DataSource DataSource; -typedef struct _DataSourceClass DataSourceClass; - -#define TYPE_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_ALTERATION (alteration_get_type ()) -#define ALTERATION(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_ALTERATION, Alteration)) -#define ALTERATION_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_ALTERATION, AlterationClass)) -#define IS_ALTERATION(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_ALTERATION)) -#define IS_ALTERATION_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_ALTERATION)) -#define ALTERATION_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_ALTERATION, AlterationClass)) - -typedef struct _Alteration Alteration; -typedef struct _AlterationClass AlterationClass; - -#define TYPE_DATA_SET (data_set_get_type ()) -#define DATA_SET(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_DATA_SET, DataSet)) -#define DATA_SET_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_DATA_SET, DataSetClass)) -#define IS_DATA_SET(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_DATA_SET)) -#define IS_DATA_SET_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_DATA_SET)) -#define DATA_SET_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_DATA_SET, DataSetClass)) - -typedef struct _DataSet DataSet; -typedef struct _DataSetClass DataSetClass; -#define _data_collection_unref0(var) ((var == NULL) ? NULL : (var = (data_collection_unref (var), NULL))) -#define _data_set_unref0(var) ((var == NULL) ? NULL : (var = (data_set_unref (var), NULL))) -#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL))) - -#define TYPE_MARKER (marker_get_type ()) -#define MARKER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_MARKER, Marker)) -#define IS_MARKER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_MARKER)) -#define MARKER_GET_INTERFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE ((obj), TYPE_MARKER, MarkerIface)) - -typedef struct _Marker Marker; -typedef struct _MarkerIface MarkerIface; - -#define TYPE_SOURCE_BACKLINK (source_backlink_get_type ()) -#define SOURCE_BACKLINK(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_SOURCE_BACKLINK, SourceBacklink)) -#define SOURCE_BACKLINK_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_SOURCE_BACKLINK, SourceBacklinkClass)) -#define IS_SOURCE_BACKLINK(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_SOURCE_BACKLINK)) -#define IS_SOURCE_BACKLINK_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_SOURCE_BACKLINK)) -#define SOURCE_BACKLINK_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_SOURCE_BACKLINK, SourceBacklinkClass)) - -typedef struct _SourceBacklink SourceBacklink; -typedef struct _SourceBacklinkClass SourceBacklinkClass; - -#define TYPE_SINGLETON_COLLECTION (singleton_collection_get_type ()) -#define SINGLETON_COLLECTION(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_SINGLETON_COLLECTION, SingletonCollection)) -#define SINGLETON_COLLECTION_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_SINGLETON_COLLECTION, SingletonCollectionClass)) -#define IS_SINGLETON_COLLECTION(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_SINGLETON_COLLECTION)) -#define IS_SINGLETON_COLLECTION_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_SINGLETON_COLLECTION)) -#define SINGLETON_COLLECTION_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_SINGLETON_COLLECTION, SingletonCollectionClass)) - -typedef struct _SingletonCollection SingletonCollection; -typedef struct _SingletonCollectionClass SingletonCollectionClass; -#define _g_free0(var) (var = (g_free (var), NULL)) -typedef struct _ParamSpecSourceHoldingTank ParamSpecSourceHoldingTank; -enum { - SOURCE_HOLDING_TANK_CONTENTS_ALTERED_SIGNAL, - SOURCE_HOLDING_TANK_NUM_SIGNALS -}; -static guint source_holding_tank_signals[SOURCE_HOLDING_TANK_NUM_SIGNALS] = {0}; -#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 _SourceHoldingTank { - GTypeInstance parent_instance; - volatile int ref_count; - SourceHoldingTankPrivate * priv; -}; - -struct _SourceHoldingTankClass { - GTypeClass parent_class; - void (*finalize) (SourceHoldingTank *self); - void (*notify_contents_altered) (SourceHoldingTank* self, GeeCollection* added, GeeCollection* removed); - void (*contents_altered) (SourceHoldingTank* self, GeeCollection* added, GeeCollection* removed); -}; - -typedef gboolean (*SourceHoldingTankCheckToKeep) (DataSource* source, Alteration* alteration, void* user_data); -struct _SourceHoldingTankPrivate { - SourceCollection* sources; - SourceHoldingTankCheckToKeep check_to_keep; - gpointer check_to_keep_target; - DataSet* tank; - GeeHashSet* relinks; - GeeHashSet* unlinking; - gint64 ordinal; -}; - -struct _MarkerIface { - GTypeInterface parent_iface; - void (*mark) (Marker* self, DataObject* object); - void (*unmark) (Marker* self, DataObject* object); - gboolean (*toggle) (Marker* self, DataObject* object); - void (*mark_many) (Marker* self, GeeCollection* list); - void (*unmark_many) (Marker* self, GeeCollection* list); - void (*mark_all) (Marker* self); - gint (*get_count) (Marker* self); - GeeCollection* (*get_all) (Marker* self); -}; - -typedef gboolean (*ProgressMonitor) (guint64 current, guint64 total, gboolean do_event_loop, void* user_data); -struct _ParamSpecSourceHoldingTank { - GParamSpec parent_instance; -}; - - -static gpointer source_holding_tank_parent_class = NULL; - -gpointer source_holding_tank_ref (gpointer instance); -void source_holding_tank_unref (gpointer instance); -GParamSpec* param_spec_source_holding_tank (const gchar* name, - const gchar* nick, - const gchar* blurb, - GType object_type, - GParamFlags flags); -void value_set_source_holding_tank (GValue* value, - gpointer v_object); -void value_take_source_holding_tank (GValue* value, - gpointer v_object); -gpointer value_get_source_holding_tank (const GValue* value); -GType source_holding_tank_get_type (void) G_GNUC_CONST; -GType data_object_get_type (void) G_GNUC_CONST; -GType data_source_get_type (void) G_GNUC_CONST; -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; -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 data_set_ref (gpointer instance); -void data_set_unref (gpointer instance); -GParamSpec* param_spec_data_set (const gchar* name, - const gchar* nick, - const gchar* blurb, - GType object_type, - GParamFlags flags); -void value_set_data_set (GValue* value, - gpointer v_object); -void value_take_data_set (GValue* value, - gpointer v_object); -gpointer value_get_data_set (const GValue* value); -GType data_set_get_type (void) G_GNUC_CONST; -#define SOURCE_HOLDING_TANK_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), TYPE_SOURCE_HOLDING_TANK, SourceHoldingTankPrivate)) -static void source_holding_tank_on_source_destroyed (SourceHoldingTank* self, - DataSource* source); -static void _source_holding_tank_on_source_destroyed_source_collection_item_destroyed (SourceCollection* _sender, - DataSource* source, - gpointer self); -static void source_holding_tank_on_source_collection_thawed (SourceHoldingTank* self); -static void _source_holding_tank_on_source_collection_thawed_data_collection_thawed (DataCollection* _sender, - gpointer self); -DataSet* data_set_new (void); -DataSet* data_set_construct (GType object_type); -SourceHoldingTank* source_holding_tank_new (SourceCollection* sources, - SourceHoldingTankCheckToKeep check_to_keep, - void* check_to_keep_target); -SourceHoldingTank* source_holding_tank_construct (GType object_type, - SourceCollection* sources, - SourceHoldingTankCheckToKeep check_to_keep, - void* check_to_keep_target); -void source_holding_tank_notify_contents_altered (SourceHoldingTank* self, - GeeCollection* added, - GeeCollection* removed); -static void source_holding_tank_real_notify_contents_altered (SourceHoldingTank* self, - GeeCollection* added, - GeeCollection* removed); -void data_source_notify_held_in_tank (DataSource* self, - SourceHoldingTank* holding_tank); -gint source_holding_tank_get_count (SourceHoldingTank* self); -gint data_set_get_count (DataSet* self); -GeeCollection* source_holding_tank_get_all (SourceHoldingTank* self); -GeeList* data_set_get_all (DataSet* self); -gboolean source_holding_tank_contains (SourceHoldingTank* self, - DataSource* source); -gboolean data_set_contains (DataSet* self, - DataObject* object); -void source_holding_tank_add_many (SourceHoldingTank* self, - GeeCollection* many); -void data_object_internal_set_ordinal (DataObject* self, - gint64 ordinal); -gboolean data_set_add_many (DataSet* self, - GeeCollection* objects); -void source_holding_tank_unlink_and_hold (SourceHoldingTank* self, - GeeCollection* unlink); -GType marker_get_type (void) G_GNUC_CONST; -GeeCollection* source_collection_unlink_marked (SourceCollection* self, - Marker* marker, - ProgressMonitor monitor, - void* monitor_target); -Marker* data_collection_mark_many (DataCollection* self, - GeeCollection* objects); -gpointer source_backlink_ref (gpointer instance); -void source_backlink_unref (gpointer instance); -GParamSpec* param_spec_source_backlink (const gchar* name, - const gchar* nick, - const gchar* blurb, - GType object_type, - GParamFlags flags); -void value_set_source_backlink (GValue* value, - gpointer v_object); -void value_take_source_backlink (GValue* value, - gpointer v_object); -gpointer value_get_source_backlink (const GValue* value); -GType source_backlink_get_type (void) G_GNUC_CONST; -gboolean source_holding_tank_has_backlink (SourceHoldingTank* self, - SourceBacklink* backlink); -DataObject* data_set_get_at (DataSet* self, - gint index); -gboolean data_source_has_backlink (DataSource* self, - SourceBacklink* backlink); -void source_holding_tank_remove_backlink (SourceHoldingTank* self, - SourceBacklink* backlink); -gboolean data_source_remove_backlink (DataSource* self, - SourceBacklink* backlink); -void source_holding_tank_destroy_orphans (SourceHoldingTank* self, - GeeList* destroy, - gboolean delete_backing, - ProgressMonitor monitor, - void* monitor_target, - GeeList* not_removed); -gboolean data_set_remove_many (DataSet* self, - GeeCollection* objects); -gboolean data_source_destroy_orphan (DataSource* self, - gboolean delete_backing); -gboolean data_set_remove (DataSet* self, - DataObject* object); -SingletonCollection* singleton_collection_new (GType g_type, - GBoxedCopyFunc g_dup_func, - GDestroyNotify g_destroy_func, - gconstpointer object); -SingletonCollection* singleton_collection_construct (GType object_type, - GType g_type, - GBoxedCopyFunc g_dup_func, - GDestroyNotify g_destroy_func, - gconstpointer object); -GType singleton_collection_get_type (void) G_GNUC_CONST; -void source_holding_tank_internal_notify_altered (SourceHoldingTank* self, - DataSource* source, - Alteration* alteration); -gchar* data_object_to_string (DataObject* self); -gchar* source_holding_tank_to_string (SourceHoldingTank* self); -gboolean data_collection_are_notifications_frozen (DataCollection* self); -void source_collection_relink (SourceCollection* self, - DataSource* source); -void source_collection_relink_many (SourceCollection* self, - GeeCollection* relink); -static void source_holding_tank_real_contents_altered (SourceHoldingTank* self, - GeeCollection* added, - GeeCollection* removed); -static void g_cclosure_user_marshal_VOID__OBJECT_OBJECT (GClosure * closure, - GValue * return_value, - guint n_param_values, - const GValue * param_values, - gpointer invocation_hint, - gpointer marshal_data); -static void source_holding_tank_finalize (SourceHoldingTank * obj); - - -static void -_source_holding_tank_on_source_destroyed_source_collection_item_destroyed (SourceCollection* _sender, - DataSource* source, - gpointer self) -{ -#line 48 "/home/jens/Source/shotwell/src/core/SourceHoldingTank.vala" - source_holding_tank_on_source_destroyed ((SourceHoldingTank*) self, source); -#line 371 "SourceHoldingTank.c" -} - - -static void -_source_holding_tank_on_source_collection_thawed_data_collection_thawed (DataCollection* _sender, - gpointer self) -{ -#line 49 "/home/jens/Source/shotwell/src/core/SourceHoldingTank.vala" - source_holding_tank_on_source_collection_thawed ((SourceHoldingTank*) self); -#line 381 "SourceHoldingTank.c" -} - - -static gpointer -_data_collection_ref0 (gpointer self) -{ -#line 40 "/home/jens/Source/shotwell/src/core/SourceHoldingTank.vala" - return self ? data_collection_ref (self) : NULL; -#line 390 "SourceHoldingTank.c" -} - - -SourceHoldingTank* -source_holding_tank_construct (GType object_type, - SourceCollection* sources, - SourceHoldingTankCheckToKeep check_to_keep, - void* check_to_keep_target) -{ - SourceHoldingTank* self = NULL; - SourceCollection* _tmp0_; - SourceCollection* _tmp1_; - SourceCollection* _tmp2_; -#line 39 "/home/jens/Source/shotwell/src/core/SourceHoldingTank.vala" - g_return_val_if_fail (IS_SOURCE_COLLECTION (sources), NULL); -#line 39 "/home/jens/Source/shotwell/src/core/SourceHoldingTank.vala" - self = (SourceHoldingTank*) g_type_create_instance (object_type); -#line 40 "/home/jens/Source/shotwell/src/core/SourceHoldingTank.vala" - _tmp0_ = _data_collection_ref0 (sources); -#line 40 "/home/jens/Source/shotwell/src/core/SourceHoldingTank.vala" - _data_collection_unref0 (self->priv->sources); -#line 40 "/home/jens/Source/shotwell/src/core/SourceHoldingTank.vala" - self->priv->sources = _tmp0_; -#line 41 "/home/jens/Source/shotwell/src/core/SourceHoldingTank.vala" - self->priv->check_to_keep = check_to_keep; -#line 41 "/home/jens/Source/shotwell/src/core/SourceHoldingTank.vala" - self->priv->check_to_keep_target = check_to_keep_target; -#line 43 "/home/jens/Source/shotwell/src/core/SourceHoldingTank.vala" - _tmp1_ = self->priv->sources; -#line 43 "/home/jens/Source/shotwell/src/core/SourceHoldingTank.vala" - g_signal_connect (_tmp1_, "item-destroyed", (GCallback) _source_holding_tank_on_source_destroyed_source_collection_item_destroyed, self); -#line 44 "/home/jens/Source/shotwell/src/core/SourceHoldingTank.vala" - _tmp2_ = self->priv->sources; -#line 44 "/home/jens/Source/shotwell/src/core/SourceHoldingTank.vala" - g_signal_connect (G_TYPE_CHECK_INSTANCE_CAST (_tmp2_, TYPE_DATA_COLLECTION, DataCollection), "thawed", (GCallback) _source_holding_tank_on_source_collection_thawed_data_collection_thawed, self); -#line 39 "/home/jens/Source/shotwell/src/core/SourceHoldingTank.vala" - return self; -#line 428 "SourceHoldingTank.c" -} - - -SourceHoldingTank* -source_holding_tank_new (SourceCollection* sources, - SourceHoldingTankCheckToKeep check_to_keep, - void* check_to_keep_target) -{ -#line 39 "/home/jens/Source/shotwell/src/core/SourceHoldingTank.vala" - return source_holding_tank_construct (TYPE_SOURCE_HOLDING_TANK, sources, check_to_keep, check_to_keep_target); -#line 439 "SourceHoldingTank.c" -} - - -static void -source_holding_tank_real_notify_contents_altered (SourceHoldingTank* self, - GeeCollection* added, - GeeCollection* removed) -{ -#line 52 "/home/jens/Source/shotwell/src/core/SourceHoldingTank.vala" - g_return_if_fail ((added == NULL) || GEE_IS_COLLECTION (added)); -#line 52 "/home/jens/Source/shotwell/src/core/SourceHoldingTank.vala" - g_return_if_fail ((removed == NULL) || GEE_IS_COLLECTION (removed)); -#line 54 "/home/jens/Source/shotwell/src/core/SourceHoldingTank.vala" - if (added != NULL) { -#line 454 "SourceHoldingTank.c" - { - GeeIterator* _source_it = NULL; - GeeIterator* _tmp0_; -#line 55 "/home/jens/Source/shotwell/src/core/SourceHoldingTank.vala" - _tmp0_ = gee_iterable_iterator (G_TYPE_CHECK_INSTANCE_CAST (added, GEE_TYPE_ITERABLE, GeeIterable)); -#line 55 "/home/jens/Source/shotwell/src/core/SourceHoldingTank.vala" - _source_it = _tmp0_; -#line 55 "/home/jens/Source/shotwell/src/core/SourceHoldingTank.vala" - while (TRUE) { -#line 464 "SourceHoldingTank.c" - GeeIterator* _tmp1_; - DataSource* source = NULL; - GeeIterator* _tmp2_; - gpointer _tmp3_; - DataSource* _tmp4_; -#line 55 "/home/jens/Source/shotwell/src/core/SourceHoldingTank.vala" - _tmp1_ = _source_it; -#line 55 "/home/jens/Source/shotwell/src/core/SourceHoldingTank.vala" - if (!gee_iterator_next (_tmp1_)) { -#line 55 "/home/jens/Source/shotwell/src/core/SourceHoldingTank.vala" - break; -#line 476 "SourceHoldingTank.c" - } -#line 55 "/home/jens/Source/shotwell/src/core/SourceHoldingTank.vala" - _tmp2_ = _source_it; -#line 55 "/home/jens/Source/shotwell/src/core/SourceHoldingTank.vala" - _tmp3_ = gee_iterator_get (_tmp2_); -#line 55 "/home/jens/Source/shotwell/src/core/SourceHoldingTank.vala" - source = (DataSource*) _tmp3_; -#line 56 "/home/jens/Source/shotwell/src/core/SourceHoldingTank.vala" - _tmp4_ = source; -#line 56 "/home/jens/Source/shotwell/src/core/SourceHoldingTank.vala" - data_source_notify_held_in_tank (_tmp4_, self); -#line 55 "/home/jens/Source/shotwell/src/core/SourceHoldingTank.vala" - _g_object_unref0 (source); -#line 490 "SourceHoldingTank.c" - } -#line 55 "/home/jens/Source/shotwell/src/core/SourceHoldingTank.vala" - _g_object_unref0 (_source_it); -#line 494 "SourceHoldingTank.c" - } - } -#line 59 "/home/jens/Source/shotwell/src/core/SourceHoldingTank.vala" - if (removed != NULL) { -#line 499 "SourceHoldingTank.c" - { - GeeIterator* _source_it = NULL; - GeeIterator* _tmp5_; -#line 60 "/home/jens/Source/shotwell/src/core/SourceHoldingTank.vala" - _tmp5_ = gee_iterable_iterator (G_TYPE_CHECK_INSTANCE_CAST (removed, GEE_TYPE_ITERABLE, GeeIterable)); -#line 60 "/home/jens/Source/shotwell/src/core/SourceHoldingTank.vala" - _source_it = _tmp5_; -#line 60 "/home/jens/Source/shotwell/src/core/SourceHoldingTank.vala" - while (TRUE) { -#line 509 "SourceHoldingTank.c" - GeeIterator* _tmp6_; - DataSource* source = NULL; - GeeIterator* _tmp7_; - gpointer _tmp8_; - DataSource* _tmp9_; -#line 60 "/home/jens/Source/shotwell/src/core/SourceHoldingTank.vala" - _tmp6_ = _source_it; -#line 60 "/home/jens/Source/shotwell/src/core/SourceHoldingTank.vala" - if (!gee_iterator_next (_tmp6_)) { -#line 60 "/home/jens/Source/shotwell/src/core/SourceHoldingTank.vala" - break; -#line 521 "SourceHoldingTank.c" - } -#line 60 "/home/jens/Source/shotwell/src/core/SourceHoldingTank.vala" - _tmp7_ = _source_it; -#line 60 "/home/jens/Source/shotwell/src/core/SourceHoldingTank.vala" - _tmp8_ = gee_iterator_get (_tmp7_); -#line 60 "/home/jens/Source/shotwell/src/core/SourceHoldingTank.vala" - source = (DataSource*) _tmp8_; -#line 61 "/home/jens/Source/shotwell/src/core/SourceHoldingTank.vala" - _tmp9_ = source; -#line 61 "/home/jens/Source/shotwell/src/core/SourceHoldingTank.vala" - data_source_notify_held_in_tank (_tmp9_, NULL); -#line 60 "/home/jens/Source/shotwell/src/core/SourceHoldingTank.vala" - _g_object_unref0 (source); -#line 535 "SourceHoldingTank.c" - } -#line 60 "/home/jens/Source/shotwell/src/core/SourceHoldingTank.vala" - _g_object_unref0 (_source_it); -#line 539 "SourceHoldingTank.c" - } - } -#line 64 "/home/jens/Source/shotwell/src/core/SourceHoldingTank.vala" - g_signal_emit (self, source_holding_tank_signals[SOURCE_HOLDING_TANK_CONTENTS_ALTERED_SIGNAL], 0, added, removed); -#line 544 "SourceHoldingTank.c" -} - - -void -source_holding_tank_notify_contents_altered (SourceHoldingTank* self, - GeeCollection* added, - GeeCollection* removed) -{ -#line 52 "/home/jens/Source/shotwell/src/core/SourceHoldingTank.vala" - g_return_if_fail (IS_SOURCE_HOLDING_TANK (self)); -#line 52 "/home/jens/Source/shotwell/src/core/SourceHoldingTank.vala" - SOURCE_HOLDING_TANK_GET_CLASS (self)->notify_contents_altered (self, added, removed); -#line 557 "SourceHoldingTank.c" -} - - -gint -source_holding_tank_get_count (SourceHoldingTank* self) -{ - gint result = 0; - DataSet* _tmp0_; -#line 67 "/home/jens/Source/shotwell/src/core/SourceHoldingTank.vala" - g_return_val_if_fail (IS_SOURCE_HOLDING_TANK (self), 0); -#line 68 "/home/jens/Source/shotwell/src/core/SourceHoldingTank.vala" - _tmp0_ = self->priv->tank; -#line 68 "/home/jens/Source/shotwell/src/core/SourceHoldingTank.vala" - result = data_set_get_count (_tmp0_); -#line 68 "/home/jens/Source/shotwell/src/core/SourceHoldingTank.vala" - return result; -#line 574 "SourceHoldingTank.c" -} - - -GeeCollection* -source_holding_tank_get_all (SourceHoldingTank* self) -{ - GeeCollection* result = NULL; - DataSet* _tmp0_; - GeeList* _tmp1_; -#line 71 "/home/jens/Source/shotwell/src/core/SourceHoldingTank.vala" - g_return_val_if_fail (IS_SOURCE_HOLDING_TANK (self), NULL); -#line 72 "/home/jens/Source/shotwell/src/core/SourceHoldingTank.vala" - _tmp0_ = self->priv->tank; -#line 72 "/home/jens/Source/shotwell/src/core/SourceHoldingTank.vala" - _tmp1_ = data_set_get_all (_tmp0_); -#line 72 "/home/jens/Source/shotwell/src/core/SourceHoldingTank.vala" - result = G_TYPE_CHECK_INSTANCE_CAST (_tmp1_, GEE_TYPE_COLLECTION, GeeCollection); -#line 72 "/home/jens/Source/shotwell/src/core/SourceHoldingTank.vala" - return result; -#line 594 "SourceHoldingTank.c" -} - - -gboolean -source_holding_tank_contains (SourceHoldingTank* self, - DataSource* source) -{ - gboolean result = FALSE; - gboolean _tmp0_ = FALSE; - DataSet* _tmp1_; -#line 75 "/home/jens/Source/shotwell/src/core/SourceHoldingTank.vala" - g_return_val_if_fail (IS_SOURCE_HOLDING_TANK (self), FALSE); -#line 75 "/home/jens/Source/shotwell/src/core/SourceHoldingTank.vala" - g_return_val_if_fail (IS_DATA_SOURCE (source), FALSE); -#line 76 "/home/jens/Source/shotwell/src/core/SourceHoldingTank.vala" - _tmp1_ = self->priv->tank; -#line 76 "/home/jens/Source/shotwell/src/core/SourceHoldingTank.vala" - if (data_set_contains (_tmp1_, G_TYPE_CHECK_INSTANCE_CAST (source, TYPE_DATA_OBJECT, DataObject))) { -#line 76 "/home/jens/Source/shotwell/src/core/SourceHoldingTank.vala" - _tmp0_ = TRUE; -#line 615 "SourceHoldingTank.c" - } else { - GeeHashSet* _tmp2_; -#line 76 "/home/jens/Source/shotwell/src/core/SourceHoldingTank.vala" - _tmp2_ = self->priv->unlinking; -#line 76 "/home/jens/Source/shotwell/src/core/SourceHoldingTank.vala" - _tmp0_ = gee_abstract_collection_contains (G_TYPE_CHECK_INSTANCE_CAST (_tmp2_, GEE_TYPE_ABSTRACT_COLLECTION, GeeAbstractCollection), source); -#line 622 "SourceHoldingTank.c" - } -#line 76 "/home/jens/Source/shotwell/src/core/SourceHoldingTank.vala" - result = _tmp0_; -#line 76 "/home/jens/Source/shotwell/src/core/SourceHoldingTank.vala" - return result; -#line 628 "SourceHoldingTank.c" -} - - -void -source_holding_tank_add_many (SourceHoldingTank* self, - GeeCollection* many) -{ - gint _tmp0_; - gint _tmp1_; - gboolean added = FALSE; - DataSet* _tmp8_; - gboolean _tmp9_; -#line 80 "/home/jens/Source/shotwell/src/core/SourceHoldingTank.vala" - g_return_if_fail (IS_SOURCE_HOLDING_TANK (self)); -#line 80 "/home/jens/Source/shotwell/src/core/SourceHoldingTank.vala" - g_return_if_fail (GEE_IS_COLLECTION (many)); -#line 81 "/home/jens/Source/shotwell/src/core/SourceHoldingTank.vala" - _tmp0_ = gee_collection_get_size (many); -#line 81 "/home/jens/Source/shotwell/src/core/SourceHoldingTank.vala" - _tmp1_ = _tmp0_; -#line 81 "/home/jens/Source/shotwell/src/core/SourceHoldingTank.vala" - if (_tmp1_ == 0) { -#line 82 "/home/jens/Source/shotwell/src/core/SourceHoldingTank.vala" - return; -#line 653 "SourceHoldingTank.c" - } - { - GeeIterator* _source_it = NULL; - GeeIterator* _tmp2_; -#line 84 "/home/jens/Source/shotwell/src/core/SourceHoldingTank.vala" - _tmp2_ = gee_iterable_iterator (G_TYPE_CHECK_INSTANCE_CAST (many, GEE_TYPE_ITERABLE, GeeIterable)); -#line 84 "/home/jens/Source/shotwell/src/core/SourceHoldingTank.vala" - _source_it = _tmp2_; -#line 84 "/home/jens/Source/shotwell/src/core/SourceHoldingTank.vala" - while (TRUE) { -#line 664 "SourceHoldingTank.c" - GeeIterator* _tmp3_; - DataSource* source = NULL; - GeeIterator* _tmp4_; - gpointer _tmp5_; - DataSource* _tmp6_; - gint64 _tmp7_; -#line 84 "/home/jens/Source/shotwell/src/core/SourceHoldingTank.vala" - _tmp3_ = _source_it; -#line 84 "/home/jens/Source/shotwell/src/core/SourceHoldingTank.vala" - if (!gee_iterator_next (_tmp3_)) { -#line 84 "/home/jens/Source/shotwell/src/core/SourceHoldingTank.vala" - break; -#line 677 "SourceHoldingTank.c" - } -#line 84 "/home/jens/Source/shotwell/src/core/SourceHoldingTank.vala" - _tmp4_ = _source_it; -#line 84 "/home/jens/Source/shotwell/src/core/SourceHoldingTank.vala" - _tmp5_ = gee_iterator_get (_tmp4_); -#line 84 "/home/jens/Source/shotwell/src/core/SourceHoldingTank.vala" - source = (DataSource*) _tmp5_; -#line 85 "/home/jens/Source/shotwell/src/core/SourceHoldingTank.vala" - _tmp6_ = source; -#line 85 "/home/jens/Source/shotwell/src/core/SourceHoldingTank.vala" - _tmp7_ = self->priv->ordinal; -#line 85 "/home/jens/Source/shotwell/src/core/SourceHoldingTank.vala" - self->priv->ordinal = _tmp7_ + 1; -#line 85 "/home/jens/Source/shotwell/src/core/SourceHoldingTank.vala" - data_object_internal_set_ordinal (G_TYPE_CHECK_INSTANCE_CAST (_tmp6_, TYPE_DATA_OBJECT, DataObject), _tmp7_); -#line 84 "/home/jens/Source/shotwell/src/core/SourceHoldingTank.vala" - _g_object_unref0 (source); -#line 695 "SourceHoldingTank.c" - } -#line 84 "/home/jens/Source/shotwell/src/core/SourceHoldingTank.vala" - _g_object_unref0 (_source_it); -#line 699 "SourceHoldingTank.c" - } -#line 87 "/home/jens/Source/shotwell/src/core/SourceHoldingTank.vala" - _tmp8_ = self->priv->tank; -#line 87 "/home/jens/Source/shotwell/src/core/SourceHoldingTank.vala" - added = data_set_add_many (_tmp8_, many); -#line 88 "/home/jens/Source/shotwell/src/core/SourceHoldingTank.vala" - _tmp9_ = added; -#line 88 "/home/jens/Source/shotwell/src/core/SourceHoldingTank.vala" - _vala_assert (_tmp9_, "added"); -#line 90 "/home/jens/Source/shotwell/src/core/SourceHoldingTank.vala" - source_holding_tank_notify_contents_altered (self, many, NULL); -#line 711 "SourceHoldingTank.c" -} - - -void -source_holding_tank_unlink_and_hold (SourceHoldingTank* self, - GeeCollection* unlink) -{ - gint _tmp0_; - gint _tmp1_; - GeeHashSet* _tmp2_; - SourceCollection* _tmp3_; - SourceCollection* _tmp4_; - Marker* _tmp5_; - Marker* _tmp6_; - GeeCollection* _tmp7_; - GeeCollection* _tmp8_; - gboolean added = FALSE; - DataSet* _tmp15_; - gboolean _tmp16_; - GeeHashSet* _tmp17_; -#line 95 "/home/jens/Source/shotwell/src/core/SourceHoldingTank.vala" - g_return_if_fail (IS_SOURCE_HOLDING_TANK (self)); -#line 95 "/home/jens/Source/shotwell/src/core/SourceHoldingTank.vala" - g_return_if_fail (GEE_IS_COLLECTION (unlink)); -#line 96 "/home/jens/Source/shotwell/src/core/SourceHoldingTank.vala" - _tmp0_ = gee_collection_get_size (unlink); -#line 96 "/home/jens/Source/shotwell/src/core/SourceHoldingTank.vala" - _tmp1_ = _tmp0_; -#line 96 "/home/jens/Source/shotwell/src/core/SourceHoldingTank.vala" - if (_tmp1_ == 0) { -#line 97 "/home/jens/Source/shotwell/src/core/SourceHoldingTank.vala" - return; -#line 744 "SourceHoldingTank.c" - } -#line 100 "/home/jens/Source/shotwell/src/core/SourceHoldingTank.vala" - _tmp2_ = self->priv->unlinking; -#line 100 "/home/jens/Source/shotwell/src/core/SourceHoldingTank.vala" - gee_collection_add_all (G_TYPE_CHECK_INSTANCE_CAST (_tmp2_, GEE_TYPE_COLLECTION, GeeCollection), unlink); -#line 102 "/home/jens/Source/shotwell/src/core/SourceHoldingTank.vala" - _tmp3_ = self->priv->sources; -#line 102 "/home/jens/Source/shotwell/src/core/SourceHoldingTank.vala" - _tmp4_ = self->priv->sources; -#line 102 "/home/jens/Source/shotwell/src/core/SourceHoldingTank.vala" - _tmp5_ = data_collection_mark_many (G_TYPE_CHECK_INSTANCE_CAST (_tmp4_, TYPE_DATA_COLLECTION, DataCollection), unlink); -#line 102 "/home/jens/Source/shotwell/src/core/SourceHoldingTank.vala" - _tmp6_ = _tmp5_; -#line 102 "/home/jens/Source/shotwell/src/core/SourceHoldingTank.vala" - _tmp7_ = source_collection_unlink_marked (_tmp3_, _tmp6_, NULL, NULL); -#line 102 "/home/jens/Source/shotwell/src/core/SourceHoldingTank.vala" - _tmp8_ = _tmp7_; -#line 102 "/home/jens/Source/shotwell/src/core/SourceHoldingTank.vala" - _g_object_unref0 (_tmp8_); -#line 102 "/home/jens/Source/shotwell/src/core/SourceHoldingTank.vala" - _g_object_unref0 (_tmp6_); -#line 766 "SourceHoldingTank.c" - { - GeeIterator* _source_it = NULL; - GeeIterator* _tmp9_; -#line 104 "/home/jens/Source/shotwell/src/core/SourceHoldingTank.vala" - _tmp9_ = gee_iterable_iterator (G_TYPE_CHECK_INSTANCE_CAST (unlink, GEE_TYPE_ITERABLE, GeeIterable)); -#line 104 "/home/jens/Source/shotwell/src/core/SourceHoldingTank.vala" - _source_it = _tmp9_; -#line 104 "/home/jens/Source/shotwell/src/core/SourceHoldingTank.vala" - while (TRUE) { -#line 776 "SourceHoldingTank.c" - GeeIterator* _tmp10_; - DataSource* source = NULL; - GeeIterator* _tmp11_; - gpointer _tmp12_; - DataSource* _tmp13_; - gint64 _tmp14_; -#line 104 "/home/jens/Source/shotwell/src/core/SourceHoldingTank.vala" - _tmp10_ = _source_it; -#line 104 "/home/jens/Source/shotwell/src/core/SourceHoldingTank.vala" - if (!gee_iterator_next (_tmp10_)) { -#line 104 "/home/jens/Source/shotwell/src/core/SourceHoldingTank.vala" - break; -#line 789 "SourceHoldingTank.c" - } -#line 104 "/home/jens/Source/shotwell/src/core/SourceHoldingTank.vala" - _tmp11_ = _source_it; -#line 104 "/home/jens/Source/shotwell/src/core/SourceHoldingTank.vala" - _tmp12_ = gee_iterator_get (_tmp11_); -#line 104 "/home/jens/Source/shotwell/src/core/SourceHoldingTank.vala" - source = (DataSource*) _tmp12_; -#line 105 "/home/jens/Source/shotwell/src/core/SourceHoldingTank.vala" - _tmp13_ = source; -#line 105 "/home/jens/Source/shotwell/src/core/SourceHoldingTank.vala" - _tmp14_ = self->priv->ordinal; -#line 105 "/home/jens/Source/shotwell/src/core/SourceHoldingTank.vala" - self->priv->ordinal = _tmp14_ + 1; -#line 105 "/home/jens/Source/shotwell/src/core/SourceHoldingTank.vala" - data_object_internal_set_ordinal (G_TYPE_CHECK_INSTANCE_CAST (_tmp13_, TYPE_DATA_OBJECT, DataObject), _tmp14_); -#line 104 "/home/jens/Source/shotwell/src/core/SourceHoldingTank.vala" - _g_object_unref0 (source); -#line 807 "SourceHoldingTank.c" - } -#line 104 "/home/jens/Source/shotwell/src/core/SourceHoldingTank.vala" - _g_object_unref0 (_source_it); -#line 811 "SourceHoldingTank.c" - } -#line 107 "/home/jens/Source/shotwell/src/core/SourceHoldingTank.vala" - _tmp15_ = self->priv->tank; -#line 107 "/home/jens/Source/shotwell/src/core/SourceHoldingTank.vala" - added = data_set_add_many (_tmp15_, unlink); -#line 108 "/home/jens/Source/shotwell/src/core/SourceHoldingTank.vala" - _tmp16_ = added; -#line 108 "/home/jens/Source/shotwell/src/core/SourceHoldingTank.vala" - _vala_assert (_tmp16_, "added"); -#line 111 "/home/jens/Source/shotwell/src/core/SourceHoldingTank.vala" - _tmp17_ = self->priv->unlinking; -#line 111 "/home/jens/Source/shotwell/src/core/SourceHoldingTank.vala" - gee_collection_remove_all (G_TYPE_CHECK_INSTANCE_CAST (_tmp17_, GEE_TYPE_COLLECTION, GeeCollection), unlink); -#line 113 "/home/jens/Source/shotwell/src/core/SourceHoldingTank.vala" - source_holding_tank_notify_contents_altered (self, unlink, NULL); -#line 827 "SourceHoldingTank.c" -} - - -gboolean -source_holding_tank_has_backlink (SourceHoldingTank* self, - SourceBacklink* backlink) -{ - gboolean result = FALSE; - gint count = 0; - DataSet* _tmp0_; -#line 116 "/home/jens/Source/shotwell/src/core/SourceHoldingTank.vala" - g_return_val_if_fail (IS_SOURCE_HOLDING_TANK (self), FALSE); -#line 116 "/home/jens/Source/shotwell/src/core/SourceHoldingTank.vala" - g_return_val_if_fail (IS_SOURCE_BACKLINK (backlink), FALSE); -#line 117 "/home/jens/Source/shotwell/src/core/SourceHoldingTank.vala" - _tmp0_ = self->priv->tank; -#line 117 "/home/jens/Source/shotwell/src/core/SourceHoldingTank.vala" - count = data_set_get_count (_tmp0_); -#line 846 "SourceHoldingTank.c" - { - gint ctr = 0; -#line 118 "/home/jens/Source/shotwell/src/core/SourceHoldingTank.vala" - ctr = 0; -#line 851 "SourceHoldingTank.c" - { - gboolean _tmp1_ = FALSE; -#line 118 "/home/jens/Source/shotwell/src/core/SourceHoldingTank.vala" - _tmp1_ = TRUE; -#line 118 "/home/jens/Source/shotwell/src/core/SourceHoldingTank.vala" - while (TRUE) { -#line 858 "SourceHoldingTank.c" - gint _tmp3_; - gint _tmp4_; - DataSet* _tmp5_; - gint _tmp6_; - DataObject* _tmp7_; - DataSource* _tmp8_; - gboolean _tmp9_; -#line 118 "/home/jens/Source/shotwell/src/core/SourceHoldingTank.vala" - if (!_tmp1_) { -#line 868 "SourceHoldingTank.c" - gint _tmp2_; -#line 118 "/home/jens/Source/shotwell/src/core/SourceHoldingTank.vala" - _tmp2_ = ctr; -#line 118 "/home/jens/Source/shotwell/src/core/SourceHoldingTank.vala" - ctr = _tmp2_ + 1; -#line 874 "SourceHoldingTank.c" - } -#line 118 "/home/jens/Source/shotwell/src/core/SourceHoldingTank.vala" - _tmp1_ = FALSE; -#line 118 "/home/jens/Source/shotwell/src/core/SourceHoldingTank.vala" - _tmp3_ = ctr; -#line 118 "/home/jens/Source/shotwell/src/core/SourceHoldingTank.vala" - _tmp4_ = count; -#line 118 "/home/jens/Source/shotwell/src/core/SourceHoldingTank.vala" - if (!(_tmp3_ < _tmp4_)) { -#line 118 "/home/jens/Source/shotwell/src/core/SourceHoldingTank.vala" - break; -#line 886 "SourceHoldingTank.c" - } -#line 119 "/home/jens/Source/shotwell/src/core/SourceHoldingTank.vala" - _tmp5_ = self->priv->tank; -#line 119 "/home/jens/Source/shotwell/src/core/SourceHoldingTank.vala" - _tmp6_ = ctr; -#line 119 "/home/jens/Source/shotwell/src/core/SourceHoldingTank.vala" - _tmp7_ = data_set_get_at (_tmp5_, _tmp6_); -#line 119 "/home/jens/Source/shotwell/src/core/SourceHoldingTank.vala" - _tmp8_ = G_TYPE_CHECK_INSTANCE_CAST (_tmp7_, TYPE_DATA_SOURCE, DataSource); -#line 119 "/home/jens/Source/shotwell/src/core/SourceHoldingTank.vala" - _tmp9_ = data_source_has_backlink (_tmp8_, backlink); -#line 119 "/home/jens/Source/shotwell/src/core/SourceHoldingTank.vala" - _g_object_unref0 (_tmp8_); -#line 119 "/home/jens/Source/shotwell/src/core/SourceHoldingTank.vala" - if (_tmp9_) { -#line 120 "/home/jens/Source/shotwell/src/core/SourceHoldingTank.vala" - result = TRUE; -#line 120 "/home/jens/Source/shotwell/src/core/SourceHoldingTank.vala" - return result; -#line 906 "SourceHoldingTank.c" - } - } - } - } -#line 123 "/home/jens/Source/shotwell/src/core/SourceHoldingTank.vala" - result = FALSE; -#line 123 "/home/jens/Source/shotwell/src/core/SourceHoldingTank.vala" - return result; -#line 915 "SourceHoldingTank.c" -} - - -void -source_holding_tank_remove_backlink (SourceHoldingTank* self, - SourceBacklink* backlink) -{ - gint count = 0; - DataSet* _tmp0_; -#line 126 "/home/jens/Source/shotwell/src/core/SourceHoldingTank.vala" - g_return_if_fail (IS_SOURCE_HOLDING_TANK (self)); -#line 126 "/home/jens/Source/shotwell/src/core/SourceHoldingTank.vala" - g_return_if_fail (IS_SOURCE_BACKLINK (backlink)); -#line 127 "/home/jens/Source/shotwell/src/core/SourceHoldingTank.vala" - _tmp0_ = self->priv->tank; -#line 127 "/home/jens/Source/shotwell/src/core/SourceHoldingTank.vala" - count = data_set_get_count (_tmp0_); -#line 933 "SourceHoldingTank.c" - { - gint ctr = 0; -#line 128 "/home/jens/Source/shotwell/src/core/SourceHoldingTank.vala" - ctr = 0; -#line 938 "SourceHoldingTank.c" - { - gboolean _tmp1_ = FALSE; -#line 128 "/home/jens/Source/shotwell/src/core/SourceHoldingTank.vala" - _tmp1_ = TRUE; -#line 128 "/home/jens/Source/shotwell/src/core/SourceHoldingTank.vala" - while (TRUE) { -#line 945 "SourceHoldingTank.c" - gint _tmp3_; - gint _tmp4_; - DataSet* _tmp5_; - gint _tmp6_; - DataObject* _tmp7_; - DataSource* _tmp8_; -#line 128 "/home/jens/Source/shotwell/src/core/SourceHoldingTank.vala" - if (!_tmp1_) { -#line 954 "SourceHoldingTank.c" - gint _tmp2_; -#line 128 "/home/jens/Source/shotwell/src/core/SourceHoldingTank.vala" - _tmp2_ = ctr; -#line 128 "/home/jens/Source/shotwell/src/core/SourceHoldingTank.vala" - ctr = _tmp2_ + 1; -#line 960 "SourceHoldingTank.c" - } -#line 128 "/home/jens/Source/shotwell/src/core/SourceHoldingTank.vala" - _tmp1_ = FALSE; -#line 128 "/home/jens/Source/shotwell/src/core/SourceHoldingTank.vala" - _tmp3_ = ctr; -#line 128 "/home/jens/Source/shotwell/src/core/SourceHoldingTank.vala" - _tmp4_ = count; -#line 128 "/home/jens/Source/shotwell/src/core/SourceHoldingTank.vala" - if (!(_tmp3_ < _tmp4_)) { -#line 128 "/home/jens/Source/shotwell/src/core/SourceHoldingTank.vala" - break; -#line 972 "SourceHoldingTank.c" - } -#line 129 "/home/jens/Source/shotwell/src/core/SourceHoldingTank.vala" - _tmp5_ = self->priv->tank; -#line 129 "/home/jens/Source/shotwell/src/core/SourceHoldingTank.vala" - _tmp6_ = ctr; -#line 129 "/home/jens/Source/shotwell/src/core/SourceHoldingTank.vala" - _tmp7_ = data_set_get_at (_tmp5_, _tmp6_); -#line 129 "/home/jens/Source/shotwell/src/core/SourceHoldingTank.vala" - _tmp8_ = G_TYPE_CHECK_INSTANCE_CAST (_tmp7_, TYPE_DATA_SOURCE, DataSource); -#line 129 "/home/jens/Source/shotwell/src/core/SourceHoldingTank.vala" - data_source_remove_backlink (_tmp8_, backlink); -#line 129 "/home/jens/Source/shotwell/src/core/SourceHoldingTank.vala" - _g_object_unref0 (_tmp8_); -#line 986 "SourceHoldingTank.c" - } - } - } -} - - -void -source_holding_tank_destroy_orphans (SourceHoldingTank* self, - GeeList* destroy, - gboolean delete_backing, - ProgressMonitor monitor, - void* monitor_target, - GeeList* not_removed) -{ - gint _tmp0_; - gint _tmp1_; - gboolean removed = FALSE; - DataSet* _tmp2_; - gboolean _tmp3_; - gint count = 0; - gint _tmp4_; - gint _tmp5_; -#line 132 "/home/jens/Source/shotwell/src/core/SourceHoldingTank.vala" - g_return_if_fail (IS_SOURCE_HOLDING_TANK (self)); -#line 132 "/home/jens/Source/shotwell/src/core/SourceHoldingTank.vala" - g_return_if_fail (GEE_IS_LIST (destroy)); -#line 132 "/home/jens/Source/shotwell/src/core/SourceHoldingTank.vala" - g_return_if_fail ((not_removed == NULL) || GEE_IS_LIST (not_removed)); -#line 134 "/home/jens/Source/shotwell/src/core/SourceHoldingTank.vala" - _tmp0_ = gee_collection_get_size (G_TYPE_CHECK_INSTANCE_CAST (destroy, GEE_TYPE_COLLECTION, GeeCollection)); -#line 134 "/home/jens/Source/shotwell/src/core/SourceHoldingTank.vala" - _tmp1_ = _tmp0_; -#line 134 "/home/jens/Source/shotwell/src/core/SourceHoldingTank.vala" - if (_tmp1_ == 0) { -#line 135 "/home/jens/Source/shotwell/src/core/SourceHoldingTank.vala" - return; -#line 1023 "SourceHoldingTank.c" - } -#line 137 "/home/jens/Source/shotwell/src/core/SourceHoldingTank.vala" - _tmp2_ = self->priv->tank; -#line 137 "/home/jens/Source/shotwell/src/core/SourceHoldingTank.vala" - removed = data_set_remove_many (_tmp2_, G_TYPE_CHECK_INSTANCE_CAST (destroy, GEE_TYPE_COLLECTION, GeeCollection)); -#line 138 "/home/jens/Source/shotwell/src/core/SourceHoldingTank.vala" - _tmp3_ = removed; -#line 138 "/home/jens/Source/shotwell/src/core/SourceHoldingTank.vala" - _vala_assert (_tmp3_, "removed"); -#line 140 "/home/jens/Source/shotwell/src/core/SourceHoldingTank.vala" - source_holding_tank_notify_contents_altered (self, NULL, G_TYPE_CHECK_INSTANCE_CAST (destroy, GEE_TYPE_COLLECTION, GeeCollection)); -#line 142 "/home/jens/Source/shotwell/src/core/SourceHoldingTank.vala" - _tmp4_ = gee_collection_get_size (G_TYPE_CHECK_INSTANCE_CAST (destroy, GEE_TYPE_COLLECTION, GeeCollection)); -#line 142 "/home/jens/Source/shotwell/src/core/SourceHoldingTank.vala" - _tmp5_ = _tmp4_; -#line 142 "/home/jens/Source/shotwell/src/core/SourceHoldingTank.vala" - count = _tmp5_; -#line 1041 "SourceHoldingTank.c" - { - gint ctr = 0; -#line 143 "/home/jens/Source/shotwell/src/core/SourceHoldingTank.vala" - ctr = 0; -#line 1046 "SourceHoldingTank.c" - { - gboolean _tmp6_ = FALSE; -#line 143 "/home/jens/Source/shotwell/src/core/SourceHoldingTank.vala" - _tmp6_ = TRUE; -#line 143 "/home/jens/Source/shotwell/src/core/SourceHoldingTank.vala" - while (TRUE) { -#line 1053 "SourceHoldingTank.c" - gint _tmp8_; - gint _tmp9_; - DataSource* source = NULL; - gint _tmp10_; - gpointer _tmp11_; - DataSource* _tmp12_; -#line 143 "/home/jens/Source/shotwell/src/core/SourceHoldingTank.vala" - if (!_tmp6_) { -#line 1062 "SourceHoldingTank.c" - gint _tmp7_; -#line 143 "/home/jens/Source/shotwell/src/core/SourceHoldingTank.vala" - _tmp7_ = ctr; -#line 143 "/home/jens/Source/shotwell/src/core/SourceHoldingTank.vala" - ctr = _tmp7_ + 1; -#line 1068 "SourceHoldingTank.c" - } -#line 143 "/home/jens/Source/shotwell/src/core/SourceHoldingTank.vala" - _tmp6_ = FALSE; -#line 143 "/home/jens/Source/shotwell/src/core/SourceHoldingTank.vala" - _tmp8_ = ctr; -#line 143 "/home/jens/Source/shotwell/src/core/SourceHoldingTank.vala" - _tmp9_ = count; -#line 143 "/home/jens/Source/shotwell/src/core/SourceHoldingTank.vala" - if (!(_tmp8_ < _tmp9_)) { -#line 143 "/home/jens/Source/shotwell/src/core/SourceHoldingTank.vala" - break; -#line 1080 "SourceHoldingTank.c" - } -#line 144 "/home/jens/Source/shotwell/src/core/SourceHoldingTank.vala" - _tmp10_ = ctr; -#line 144 "/home/jens/Source/shotwell/src/core/SourceHoldingTank.vala" - _tmp11_ = gee_list_get (destroy, _tmp10_); -#line 144 "/home/jens/Source/shotwell/src/core/SourceHoldingTank.vala" - source = (DataSource*) _tmp11_; -#line 145 "/home/jens/Source/shotwell/src/core/SourceHoldingTank.vala" - _tmp12_ = source; -#line 145 "/home/jens/Source/shotwell/src/core/SourceHoldingTank.vala" - if (!data_source_destroy_orphan (_tmp12_, delete_backing)) { -#line 146 "/home/jens/Source/shotwell/src/core/SourceHoldingTank.vala" - if (NULL != not_removed) { -#line 1094 "SourceHoldingTank.c" - DataSource* _tmp13_; -#line 147 "/home/jens/Source/shotwell/src/core/SourceHoldingTank.vala" - _tmp13_ = source; -#line 147 "/home/jens/Source/shotwell/src/core/SourceHoldingTank.vala" - gee_collection_add (G_TYPE_CHECK_INSTANCE_CAST (not_removed, GEE_TYPE_COLLECTION, GeeCollection), _tmp13_); -#line 1100 "SourceHoldingTank.c" - } - } -#line 150 "/home/jens/Source/shotwell/src/core/SourceHoldingTank.vala" - if (monitor != NULL) { -#line 1105 "SourceHoldingTank.c" - gint _tmp14_; - gint _tmp15_; -#line 151 "/home/jens/Source/shotwell/src/core/SourceHoldingTank.vala" - _tmp14_ = ctr; -#line 151 "/home/jens/Source/shotwell/src/core/SourceHoldingTank.vala" - _tmp15_ = count; -#line 151 "/home/jens/Source/shotwell/src/core/SourceHoldingTank.vala" - monitor ((guint64) (_tmp14_ + 1), (guint64) _tmp15_, TRUE, monitor_target); -#line 1114 "SourceHoldingTank.c" - } -#line 143 "/home/jens/Source/shotwell/src/core/SourceHoldingTank.vala" - _g_object_unref0 (source); -#line 1118 "SourceHoldingTank.c" - } - } - } -} - - -static void -source_holding_tank_on_source_destroyed (SourceHoldingTank* self, - DataSource* source) -{ - DataSet* _tmp0_; - gboolean removed = FALSE; - DataSet* _tmp1_; - gboolean _tmp2_; - SingletonCollection* _tmp3_; - SingletonCollection* _tmp4_; -#line 155 "/home/jens/Source/shotwell/src/core/SourceHoldingTank.vala" - g_return_if_fail (IS_SOURCE_HOLDING_TANK (self)); -#line 155 "/home/jens/Source/shotwell/src/core/SourceHoldingTank.vala" - g_return_if_fail (IS_DATA_SOURCE (source)); -#line 156 "/home/jens/Source/shotwell/src/core/SourceHoldingTank.vala" - _tmp0_ = self->priv->tank; -#line 156 "/home/jens/Source/shotwell/src/core/SourceHoldingTank.vala" - if (!data_set_contains (_tmp0_, G_TYPE_CHECK_INSTANCE_CAST (source, TYPE_DATA_OBJECT, DataObject))) { -#line 157 "/home/jens/Source/shotwell/src/core/SourceHoldingTank.vala" - return; -#line 1145 "SourceHoldingTank.c" - } -#line 159 "/home/jens/Source/shotwell/src/core/SourceHoldingTank.vala" - _tmp1_ = self->priv->tank; -#line 159 "/home/jens/Source/shotwell/src/core/SourceHoldingTank.vala" - removed = data_set_remove (_tmp1_, G_TYPE_CHECK_INSTANCE_CAST (source, TYPE_DATA_OBJECT, DataObject)); -#line 160 "/home/jens/Source/shotwell/src/core/SourceHoldingTank.vala" - _tmp2_ = removed; -#line 160 "/home/jens/Source/shotwell/src/core/SourceHoldingTank.vala" - _vala_assert (_tmp2_, "removed"); -#line 162 "/home/jens/Source/shotwell/src/core/SourceHoldingTank.vala" - _tmp3_ = singleton_collection_new (TYPE_DATA_SOURCE, (GBoxedCopyFunc) g_object_ref, (GDestroyNotify) g_object_unref, source); -#line 162 "/home/jens/Source/shotwell/src/core/SourceHoldingTank.vala" - _tmp4_ = _tmp3_; -#line 162 "/home/jens/Source/shotwell/src/core/SourceHoldingTank.vala" - source_holding_tank_notify_contents_altered (self, NULL, G_TYPE_CHECK_INSTANCE_CAST (_tmp4_, GEE_TYPE_COLLECTION, GeeCollection)); -#line 162 "/home/jens/Source/shotwell/src/core/SourceHoldingTank.vala" - _g_object_unref0 (_tmp4_); -#line 1163 "SourceHoldingTank.c" -} - - -void -source_holding_tank_internal_notify_altered (SourceHoldingTank* self, - DataSource* source, - Alteration* alteration) -{ - DataSet* _tmp0_; - SourceHoldingTankCheckToKeep _tmp5_; - void* _tmp5__target; - gboolean removed = FALSE; - DataSet* _tmp6_; - gboolean _tmp7_; - SourceCollection* _tmp8_; - SingletonCollection* _tmp10_; - SingletonCollection* _tmp11_; - SourceCollection* _tmp12_; -#line 166 "/home/jens/Source/shotwell/src/core/SourceHoldingTank.vala" - g_return_if_fail (IS_SOURCE_HOLDING_TANK (self)); -#line 166 "/home/jens/Source/shotwell/src/core/SourceHoldingTank.vala" - g_return_if_fail (IS_DATA_SOURCE (source)); -#line 166 "/home/jens/Source/shotwell/src/core/SourceHoldingTank.vala" - g_return_if_fail (IS_ALTERATION (alteration)); -#line 167 "/home/jens/Source/shotwell/src/core/SourceHoldingTank.vala" - _tmp0_ = self->priv->tank; -#line 167 "/home/jens/Source/shotwell/src/core/SourceHoldingTank.vala" - if (!data_set_contains (_tmp0_, G_TYPE_CHECK_INSTANCE_CAST (source, TYPE_DATA_OBJECT, DataObject))) { -#line 1192 "SourceHoldingTank.c" - gchar* _tmp1_; - gchar* _tmp2_; - gchar* _tmp3_; - gchar* _tmp4_; -#line 168 "/home/jens/Source/shotwell/src/core/SourceHoldingTank.vala" - _tmp1_ = data_object_to_string (G_TYPE_CHECK_INSTANCE_CAST (source, TYPE_DATA_OBJECT, DataObject)); -#line 168 "/home/jens/Source/shotwell/src/core/SourceHoldingTank.vala" - _tmp2_ = _tmp1_; -#line 168 "/home/jens/Source/shotwell/src/core/SourceHoldingTank.vala" - _tmp3_ = source_holding_tank_to_string (self); -#line 168 "/home/jens/Source/shotwell/src/core/SourceHoldingTank.vala" - _tmp4_ = _tmp3_; -#line 168 "/home/jens/Source/shotwell/src/core/SourceHoldingTank.vala" - g_debug ("SourceHoldingTank.vala:168: SourceHoldingTank.internal_notify_altered " \ -"called for %s not stored in %s", _tmp2_, _tmp4_); -#line 168 "/home/jens/Source/shotwell/src/core/SourceHoldingTank.vala" - _g_free0 (_tmp4_); -#line 168 "/home/jens/Source/shotwell/src/core/SourceHoldingTank.vala" - _g_free0 (_tmp2_); -#line 171 "/home/jens/Source/shotwell/src/core/SourceHoldingTank.vala" - return; -#line 1213 "SourceHoldingTank.c" - } -#line 175 "/home/jens/Source/shotwell/src/core/SourceHoldingTank.vala" - _tmp5_ = self->priv->check_to_keep; -#line 175 "/home/jens/Source/shotwell/src/core/SourceHoldingTank.vala" - _tmp5__target = self->priv->check_to_keep_target; -#line 175 "/home/jens/Source/shotwell/src/core/SourceHoldingTank.vala" - if (_tmp5_ (source, alteration, _tmp5__target)) { -#line 176 "/home/jens/Source/shotwell/src/core/SourceHoldingTank.vala" - return; -#line 1223 "SourceHoldingTank.c" - } -#line 178 "/home/jens/Source/shotwell/src/core/SourceHoldingTank.vala" - _tmp6_ = self->priv->tank; -#line 178 "/home/jens/Source/shotwell/src/core/SourceHoldingTank.vala" - removed = data_set_remove (_tmp6_, G_TYPE_CHECK_INSTANCE_CAST (source, TYPE_DATA_OBJECT, DataObject)); -#line 179 "/home/jens/Source/shotwell/src/core/SourceHoldingTank.vala" - _tmp7_ = removed; -#line 179 "/home/jens/Source/shotwell/src/core/SourceHoldingTank.vala" - _vala_assert (_tmp7_, "removed"); -#line 181 "/home/jens/Source/shotwell/src/core/SourceHoldingTank.vala" - _tmp8_ = self->priv->sources; -#line 181 "/home/jens/Source/shotwell/src/core/SourceHoldingTank.vala" - if (data_collection_are_notifications_frozen (G_TYPE_CHECK_INSTANCE_CAST (_tmp8_, TYPE_DATA_COLLECTION, DataCollection))) { -#line 1237 "SourceHoldingTank.c" - GeeHashSet* _tmp9_; -#line 182 "/home/jens/Source/shotwell/src/core/SourceHoldingTank.vala" - _tmp9_ = self->priv->relinks; -#line 182 "/home/jens/Source/shotwell/src/core/SourceHoldingTank.vala" - gee_abstract_collection_add (G_TYPE_CHECK_INSTANCE_CAST (_tmp9_, GEE_TYPE_ABSTRACT_COLLECTION, GeeAbstractCollection), source); -#line 184 "/home/jens/Source/shotwell/src/core/SourceHoldingTank.vala" - return; -#line 1245 "SourceHoldingTank.c" - } -#line 187 "/home/jens/Source/shotwell/src/core/SourceHoldingTank.vala" - _tmp10_ = singleton_collection_new (TYPE_DATA_SOURCE, (GBoxedCopyFunc) g_object_ref, (GDestroyNotify) g_object_unref, source); -#line 187 "/home/jens/Source/shotwell/src/core/SourceHoldingTank.vala" - _tmp11_ = _tmp10_; -#line 187 "/home/jens/Source/shotwell/src/core/SourceHoldingTank.vala" - source_holding_tank_notify_contents_altered (self, NULL, G_TYPE_CHECK_INSTANCE_CAST (_tmp11_, GEE_TYPE_COLLECTION, GeeCollection)); -#line 187 "/home/jens/Source/shotwell/src/core/SourceHoldingTank.vala" - _g_object_unref0 (_tmp11_); -#line 189 "/home/jens/Source/shotwell/src/core/SourceHoldingTank.vala" - _tmp12_ = self->priv->sources; -#line 189 "/home/jens/Source/shotwell/src/core/SourceHoldingTank.vala" - source_collection_relink (_tmp12_, source); -#line 1259 "SourceHoldingTank.c" -} - - -static gpointer -_g_object_ref0 (gpointer self) -{ -#line 197 "/home/jens/Source/shotwell/src/core/SourceHoldingTank.vala" - return self ? g_object_ref (self) : NULL; -#line 1268 "SourceHoldingTank.c" -} - - -static void -source_holding_tank_on_source_collection_thawed (SourceHoldingTank* self) -{ - GeeHashSet* _tmp0_; - gint _tmp1_; - gint _tmp2_; - GeeHashSet* copy = NULL; - GeeHashSet* _tmp3_; - GeeHashSet* _tmp4_; - GeeHashSet* _tmp5_; - GeeHashSet* _tmp6_; - SourceCollection* _tmp7_; - GeeHashSet* _tmp8_; -#line 192 "/home/jens/Source/shotwell/src/core/SourceHoldingTank.vala" - g_return_if_fail (IS_SOURCE_HOLDING_TANK (self)); -#line 193 "/home/jens/Source/shotwell/src/core/SourceHoldingTank.vala" - _tmp0_ = self->priv->relinks; -#line 193 "/home/jens/Source/shotwell/src/core/SourceHoldingTank.vala" - _tmp1_ = gee_abstract_collection_get_size (G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, GEE_TYPE_ABSTRACT_COLLECTION, GeeAbstractCollection)); -#line 193 "/home/jens/Source/shotwell/src/core/SourceHoldingTank.vala" - _tmp2_ = _tmp1_; -#line 193 "/home/jens/Source/shotwell/src/core/SourceHoldingTank.vala" - if (_tmp2_ == 0) { -#line 194 "/home/jens/Source/shotwell/src/core/SourceHoldingTank.vala" - return; -#line 1297 "SourceHoldingTank.c" - } -#line 197 "/home/jens/Source/shotwell/src/core/SourceHoldingTank.vala" - _tmp3_ = self->priv->relinks; -#line 197 "/home/jens/Source/shotwell/src/core/SourceHoldingTank.vala" - _tmp4_ = _g_object_ref0 (_tmp3_); -#line 197 "/home/jens/Source/shotwell/src/core/SourceHoldingTank.vala" - copy = _tmp4_; -#line 198 "/home/jens/Source/shotwell/src/core/SourceHoldingTank.vala" - _tmp5_ = gee_hash_set_new (TYPE_DATA_SOURCE, (GBoxedCopyFunc) g_object_ref, (GDestroyNotify) g_object_unref, NULL, NULL, NULL, NULL, NULL, NULL); -#line 198 "/home/jens/Source/shotwell/src/core/SourceHoldingTank.vala" - _g_object_unref0 (self->priv->relinks); -#line 198 "/home/jens/Source/shotwell/src/core/SourceHoldingTank.vala" - self->priv->relinks = _tmp5_; -#line 200 "/home/jens/Source/shotwell/src/core/SourceHoldingTank.vala" - _tmp6_ = copy; -#line 200 "/home/jens/Source/shotwell/src/core/SourceHoldingTank.vala" - source_holding_tank_notify_contents_altered (self, NULL, G_TYPE_CHECK_INSTANCE_CAST (_tmp6_, GEE_TYPE_COLLECTION, GeeCollection)); -#line 202 "/home/jens/Source/shotwell/src/core/SourceHoldingTank.vala" - _tmp7_ = self->priv->sources; -#line 202 "/home/jens/Source/shotwell/src/core/SourceHoldingTank.vala" - _tmp8_ = copy; -#line 202 "/home/jens/Source/shotwell/src/core/SourceHoldingTank.vala" - source_collection_relink_many (_tmp7_, G_TYPE_CHECK_INSTANCE_CAST (_tmp8_, GEE_TYPE_COLLECTION, GeeCollection)); -#line 192 "/home/jens/Source/shotwell/src/core/SourceHoldingTank.vala" - _g_object_unref0 (copy); -#line 1323 "SourceHoldingTank.c" -} - - -gchar* -source_holding_tank_to_string (SourceHoldingTank* self) -{ - gchar* result = NULL; - gchar* _tmp0_; -#line 205 "/home/jens/Source/shotwell/src/core/SourceHoldingTank.vala" - g_return_val_if_fail (IS_SOURCE_HOLDING_TANK (self), NULL); -#line 206 "/home/jens/Source/shotwell/src/core/SourceHoldingTank.vala" - _tmp0_ = g_strdup_printf ("SourceHoldingTank @ 0x%p", self); -#line 206 "/home/jens/Source/shotwell/src/core/SourceHoldingTank.vala" - result = _tmp0_; -#line 206 "/home/jens/Source/shotwell/src/core/SourceHoldingTank.vala" - return result; -#line 1340 "SourceHoldingTank.c" -} - - -static void -source_holding_tank_real_contents_altered (SourceHoldingTank* self, - GeeCollection* added, - GeeCollection* removed) -{ -#line 35 "/home/jens/Source/shotwell/src/core/SourceHoldingTank.vala" - g_return_if_fail ((added == NULL) || GEE_IS_COLLECTION (added)); -#line 35 "/home/jens/Source/shotwell/src/core/SourceHoldingTank.vala" - g_return_if_fail ((removed == NULL) || GEE_IS_COLLECTION (removed)); -#line 1353 "SourceHoldingTank.c" -} - - -static void -g_cclosure_user_marshal_VOID__OBJECT_OBJECT (GClosure * closure, - GValue * return_value, - guint n_param_values, - const GValue * param_values, - gpointer invocation_hint, - gpointer marshal_data) -{ - typedef void (*GMarshalFunc_VOID__OBJECT_OBJECT) (gpointer data1, gpointer arg_1, gpointer arg_2, gpointer data2); - register GMarshalFunc_VOID__OBJECT_OBJECT callback; - register GCClosure * cc; - register gpointer data1; - register gpointer data2; - cc = (GCClosure *) closure; -#line 24 "/home/jens/Source/shotwell/src/core/SourceHoldingTank.vala" - g_return_if_fail (n_param_values == 3); -#line 24 "/home/jens/Source/shotwell/src/core/SourceHoldingTank.vala" - if (G_CCLOSURE_SWAP_DATA (closure)) { -#line 24 "/home/jens/Source/shotwell/src/core/SourceHoldingTank.vala" - data1 = closure->data; -#line 24 "/home/jens/Source/shotwell/src/core/SourceHoldingTank.vala" - data2 = param_values->data[0].v_pointer; -#line 1379 "SourceHoldingTank.c" - } else { -#line 24 "/home/jens/Source/shotwell/src/core/SourceHoldingTank.vala" - data1 = param_values->data[0].v_pointer; -#line 24 "/home/jens/Source/shotwell/src/core/SourceHoldingTank.vala" - data2 = closure->data; -#line 1385 "SourceHoldingTank.c" - } -#line 24 "/home/jens/Source/shotwell/src/core/SourceHoldingTank.vala" - callback = (GMarshalFunc_VOID__OBJECT_OBJECT) (marshal_data ? marshal_data : cc->callback); -#line 24 "/home/jens/Source/shotwell/src/core/SourceHoldingTank.vala" - callback (data1, g_value_get_object (param_values + 1), g_value_get_object (param_values + 2), data2); -#line 1391 "SourceHoldingTank.c" -} - - -static void -value_source_holding_tank_init (GValue* value) -{ -#line 24 "/home/jens/Source/shotwell/src/core/SourceHoldingTank.vala" - value->data[0].v_pointer = NULL; -#line 1400 "SourceHoldingTank.c" -} - - -static void -value_source_holding_tank_free_value (GValue* value) -{ -#line 24 "/home/jens/Source/shotwell/src/core/SourceHoldingTank.vala" - if (value->data[0].v_pointer) { -#line 24 "/home/jens/Source/shotwell/src/core/SourceHoldingTank.vala" - source_holding_tank_unref (value->data[0].v_pointer); -#line 1411 "SourceHoldingTank.c" - } -} - - -static void -value_source_holding_tank_copy_value (const GValue* src_value, - GValue* dest_value) -{ -#line 24 "/home/jens/Source/shotwell/src/core/SourceHoldingTank.vala" - if (src_value->data[0].v_pointer) { -#line 24 "/home/jens/Source/shotwell/src/core/SourceHoldingTank.vala" - dest_value->data[0].v_pointer = source_holding_tank_ref (src_value->data[0].v_pointer); -#line 1424 "SourceHoldingTank.c" - } else { -#line 24 "/home/jens/Source/shotwell/src/core/SourceHoldingTank.vala" - dest_value->data[0].v_pointer = NULL; -#line 1428 "SourceHoldingTank.c" - } -} - - -static gpointer -value_source_holding_tank_peek_pointer (const GValue* value) -{ -#line 24 "/home/jens/Source/shotwell/src/core/SourceHoldingTank.vala" - return value->data[0].v_pointer; -#line 1438 "SourceHoldingTank.c" -} - - -static gchar* -value_source_holding_tank_collect_value (GValue* value, - guint n_collect_values, - GTypeCValue* collect_values, - guint collect_flags) -{ -#line 24 "/home/jens/Source/shotwell/src/core/SourceHoldingTank.vala" - if (collect_values[0].v_pointer) { -#line 1450 "SourceHoldingTank.c" - SourceHoldingTank * object; - object = collect_values[0].v_pointer; -#line 24 "/home/jens/Source/shotwell/src/core/SourceHoldingTank.vala" - if (object->parent_instance.g_class == NULL) { -#line 24 "/home/jens/Source/shotwell/src/core/SourceHoldingTank.vala" - return g_strconcat ("invalid unclassed object pointer for value type `", G_VALUE_TYPE_NAME (value), "'", NULL); -#line 1457 "SourceHoldingTank.c" - } else if (!g_value_type_compatible (G_TYPE_FROM_INSTANCE (object), G_VALUE_TYPE (value))) { -#line 24 "/home/jens/Source/shotwell/src/core/SourceHoldingTank.vala" - return g_strconcat ("invalid object type `", g_type_name (G_TYPE_FROM_INSTANCE (object)), "' for value type `", G_VALUE_TYPE_NAME (value), "'", NULL); -#line 1461 "SourceHoldingTank.c" - } -#line 24 "/home/jens/Source/shotwell/src/core/SourceHoldingTank.vala" - value->data[0].v_pointer = source_holding_tank_ref (object); -#line 1465 "SourceHoldingTank.c" - } else { -#line 24 "/home/jens/Source/shotwell/src/core/SourceHoldingTank.vala" - value->data[0].v_pointer = NULL; -#line 1469 "SourceHoldingTank.c" - } -#line 24 "/home/jens/Source/shotwell/src/core/SourceHoldingTank.vala" - return NULL; -#line 1473 "SourceHoldingTank.c" -} - - -static gchar* -value_source_holding_tank_lcopy_value (const GValue* value, - guint n_collect_values, - GTypeCValue* collect_values, - guint collect_flags) -{ - SourceHoldingTank ** object_p; - object_p = collect_values[0].v_pointer; -#line 24 "/home/jens/Source/shotwell/src/core/SourceHoldingTank.vala" - if (!object_p) { -#line 24 "/home/jens/Source/shotwell/src/core/SourceHoldingTank.vala" - return g_strdup_printf ("value location for `%s' passed as NULL", G_VALUE_TYPE_NAME (value)); -#line 1489 "SourceHoldingTank.c" - } -#line 24 "/home/jens/Source/shotwell/src/core/SourceHoldingTank.vala" - if (!value->data[0].v_pointer) { -#line 24 "/home/jens/Source/shotwell/src/core/SourceHoldingTank.vala" - *object_p = NULL; -#line 1495 "SourceHoldingTank.c" - } else if (collect_flags & G_VALUE_NOCOPY_CONTENTS) { -#line 24 "/home/jens/Source/shotwell/src/core/SourceHoldingTank.vala" - *object_p = value->data[0].v_pointer; -#line 1499 "SourceHoldingTank.c" - } else { -#line 24 "/home/jens/Source/shotwell/src/core/SourceHoldingTank.vala" - *object_p = source_holding_tank_ref (value->data[0].v_pointer); -#line 1503 "SourceHoldingTank.c" - } -#line 24 "/home/jens/Source/shotwell/src/core/SourceHoldingTank.vala" - return NULL; -#line 1507 "SourceHoldingTank.c" -} - - -GParamSpec* -param_spec_source_holding_tank (const gchar* name, - const gchar* nick, - const gchar* blurb, - GType object_type, - GParamFlags flags) -{ - ParamSpecSourceHoldingTank* spec; -#line 24 "/home/jens/Source/shotwell/src/core/SourceHoldingTank.vala" - g_return_val_if_fail (g_type_is_a (object_type, TYPE_SOURCE_HOLDING_TANK), NULL); -#line 24 "/home/jens/Source/shotwell/src/core/SourceHoldingTank.vala" - spec = g_param_spec_internal (G_TYPE_PARAM_OBJECT, name, nick, blurb, flags); -#line 24 "/home/jens/Source/shotwell/src/core/SourceHoldingTank.vala" - G_PARAM_SPEC (spec)->value_type = object_type; -#line 24 "/home/jens/Source/shotwell/src/core/SourceHoldingTank.vala" - return G_PARAM_SPEC (spec); -#line 1527 "SourceHoldingTank.c" -} - - -gpointer -value_get_source_holding_tank (const GValue* value) -{ -#line 24 "/home/jens/Source/shotwell/src/core/SourceHoldingTank.vala" - g_return_val_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, TYPE_SOURCE_HOLDING_TANK), NULL); -#line 24 "/home/jens/Source/shotwell/src/core/SourceHoldingTank.vala" - return value->data[0].v_pointer; -#line 1538 "SourceHoldingTank.c" -} - - -void -value_set_source_holding_tank (GValue* value, - gpointer v_object) -{ - SourceHoldingTank * old; -#line 24 "/home/jens/Source/shotwell/src/core/SourceHoldingTank.vala" - g_return_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, TYPE_SOURCE_HOLDING_TANK)); -#line 24 "/home/jens/Source/shotwell/src/core/SourceHoldingTank.vala" - old = value->data[0].v_pointer; -#line 24 "/home/jens/Source/shotwell/src/core/SourceHoldingTank.vala" - if (v_object) { -#line 24 "/home/jens/Source/shotwell/src/core/SourceHoldingTank.vala" - g_return_if_fail (G_TYPE_CHECK_INSTANCE_TYPE (v_object, TYPE_SOURCE_HOLDING_TANK)); -#line 24 "/home/jens/Source/shotwell/src/core/SourceHoldingTank.vala" - g_return_if_fail (g_value_type_compatible (G_TYPE_FROM_INSTANCE (v_object), G_VALUE_TYPE (value))); -#line 24 "/home/jens/Source/shotwell/src/core/SourceHoldingTank.vala" - value->data[0].v_pointer = v_object; -#line 24 "/home/jens/Source/shotwell/src/core/SourceHoldingTank.vala" - source_holding_tank_ref (value->data[0].v_pointer); -#line 1561 "SourceHoldingTank.c" - } else { -#line 24 "/home/jens/Source/shotwell/src/core/SourceHoldingTank.vala" - value->data[0].v_pointer = NULL; -#line 1565 "SourceHoldingTank.c" - } -#line 24 "/home/jens/Source/shotwell/src/core/SourceHoldingTank.vala" - if (old) { -#line 24 "/home/jens/Source/shotwell/src/core/SourceHoldingTank.vala" - source_holding_tank_unref (old); -#line 1571 "SourceHoldingTank.c" - } -} - - -void -value_take_source_holding_tank (GValue* value, - gpointer v_object) -{ - SourceHoldingTank * old; -#line 24 "/home/jens/Source/shotwell/src/core/SourceHoldingTank.vala" - g_return_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, TYPE_SOURCE_HOLDING_TANK)); -#line 24 "/home/jens/Source/shotwell/src/core/SourceHoldingTank.vala" - old = value->data[0].v_pointer; -#line 24 "/home/jens/Source/shotwell/src/core/SourceHoldingTank.vala" - if (v_object) { -#line 24 "/home/jens/Source/shotwell/src/core/SourceHoldingTank.vala" - g_return_if_fail (G_TYPE_CHECK_INSTANCE_TYPE (v_object, TYPE_SOURCE_HOLDING_TANK)); -#line 24 "/home/jens/Source/shotwell/src/core/SourceHoldingTank.vala" - g_return_if_fail (g_value_type_compatible (G_TYPE_FROM_INSTANCE (v_object), G_VALUE_TYPE (value))); -#line 24 "/home/jens/Source/shotwell/src/core/SourceHoldingTank.vala" - value->data[0].v_pointer = v_object; -#line 1593 "SourceHoldingTank.c" - } else { -#line 24 "/home/jens/Source/shotwell/src/core/SourceHoldingTank.vala" - value->data[0].v_pointer = NULL; -#line 1597 "SourceHoldingTank.c" - } -#line 24 "/home/jens/Source/shotwell/src/core/SourceHoldingTank.vala" - if (old) { -#line 24 "/home/jens/Source/shotwell/src/core/SourceHoldingTank.vala" - source_holding_tank_unref (old); -#line 1603 "SourceHoldingTank.c" - } -} - - -static void -source_holding_tank_class_init (SourceHoldingTankClass * klass) -{ -#line 24 "/home/jens/Source/shotwell/src/core/SourceHoldingTank.vala" - source_holding_tank_parent_class = g_type_class_peek_parent (klass); -#line 24 "/home/jens/Source/shotwell/src/core/SourceHoldingTank.vala" - ((SourceHoldingTankClass *) klass)->finalize = source_holding_tank_finalize; -#line 24 "/home/jens/Source/shotwell/src/core/SourceHoldingTank.vala" - g_type_class_add_private (klass, sizeof (SourceHoldingTankPrivate)); -#line 24 "/home/jens/Source/shotwell/src/core/SourceHoldingTank.vala" - ((SourceHoldingTankClass *) klass)->notify_contents_altered = (void (*) (SourceHoldingTank *, GeeCollection*, GeeCollection*)) source_holding_tank_real_notify_contents_altered; -#line 24 "/home/jens/Source/shotwell/src/core/SourceHoldingTank.vala" - ((SourceHoldingTankClass *) klass)->contents_altered = source_holding_tank_real_contents_altered; -#line 24 "/home/jens/Source/shotwell/src/core/SourceHoldingTank.vala" - source_holding_tank_signals[SOURCE_HOLDING_TANK_CONTENTS_ALTERED_SIGNAL] = g_signal_new ("contents-altered", TYPE_SOURCE_HOLDING_TANK, G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET (SourceHoldingTankClass, contents_altered), NULL, NULL, g_cclosure_user_marshal_VOID__OBJECT_OBJECT, G_TYPE_NONE, 2, GEE_TYPE_COLLECTION, GEE_TYPE_COLLECTION); -#line 1623 "SourceHoldingTank.c" -} - - -static void -source_holding_tank_instance_init (SourceHoldingTank * self) -{ - DataSet* _tmp0_; - GeeHashSet* _tmp1_; - GeeHashSet* _tmp2_; -#line 24 "/home/jens/Source/shotwell/src/core/SourceHoldingTank.vala" - self->priv = SOURCE_HOLDING_TANK_GET_PRIVATE (self); -#line 30 "/home/jens/Source/shotwell/src/core/SourceHoldingTank.vala" - _tmp0_ = data_set_new (); -#line 30 "/home/jens/Source/shotwell/src/core/SourceHoldingTank.vala" - self->priv->tank = _tmp0_; -#line 31 "/home/jens/Source/shotwell/src/core/SourceHoldingTank.vala" - _tmp1_ = gee_hash_set_new (TYPE_DATA_SOURCE, (GBoxedCopyFunc) g_object_ref, (GDestroyNotify) g_object_unref, NULL, NULL, NULL, NULL, NULL, NULL); -#line 31 "/home/jens/Source/shotwell/src/core/SourceHoldingTank.vala" - self->priv->relinks = _tmp1_; -#line 32 "/home/jens/Source/shotwell/src/core/SourceHoldingTank.vala" - _tmp2_ = gee_hash_set_new (TYPE_DATA_SOURCE, (GBoxedCopyFunc) g_object_ref, (GDestroyNotify) g_object_unref, NULL, NULL, NULL, NULL, NULL, NULL); -#line 32 "/home/jens/Source/shotwell/src/core/SourceHoldingTank.vala" - self->priv->unlinking = _tmp2_; -#line 33 "/home/jens/Source/shotwell/src/core/SourceHoldingTank.vala" - self->priv->ordinal = (gint64) 0; -#line 24 "/home/jens/Source/shotwell/src/core/SourceHoldingTank.vala" - self->ref_count = 1; -#line 1651 "SourceHoldingTank.c" -} - - -static void -source_holding_tank_finalize (SourceHoldingTank * obj) -{ - SourceHoldingTank * self; - SourceCollection* _tmp0_; - guint _tmp1_; - SourceCollection* _tmp2_; - guint _tmp3_; -#line 24 "/home/jens/Source/shotwell/src/core/SourceHoldingTank.vala" - self = G_TYPE_CHECK_INSTANCE_CAST (obj, TYPE_SOURCE_HOLDING_TANK, SourceHoldingTank); -#line 24 "/home/jens/Source/shotwell/src/core/SourceHoldingTank.vala" - g_signal_handlers_destroy (self); -#line 48 "/home/jens/Source/shotwell/src/core/SourceHoldingTank.vala" - _tmp0_ = self->priv->sources; -#line 48 "/home/jens/Source/shotwell/src/core/SourceHoldingTank.vala" - g_signal_parse_name ("item-destroyed", TYPE_SOURCE_COLLECTION, &_tmp1_, NULL, FALSE); -#line 48 "/home/jens/Source/shotwell/src/core/SourceHoldingTank.vala" - g_signal_handlers_disconnect_matched (_tmp0_, G_SIGNAL_MATCH_ID | G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA, _tmp1_, 0, NULL, (GCallback) _source_holding_tank_on_source_destroyed_source_collection_item_destroyed, self); -#line 49 "/home/jens/Source/shotwell/src/core/SourceHoldingTank.vala" - _tmp2_ = self->priv->sources; -#line 49 "/home/jens/Source/shotwell/src/core/SourceHoldingTank.vala" - g_signal_parse_name ("thawed", TYPE_DATA_COLLECTION, &_tmp3_, NULL, FALSE); -#line 49 "/home/jens/Source/shotwell/src/core/SourceHoldingTank.vala" - g_signal_handlers_disconnect_matched (G_TYPE_CHECK_INSTANCE_CAST (_tmp2_, TYPE_DATA_COLLECTION, DataCollection), G_SIGNAL_MATCH_ID | G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA, _tmp3_, 0, NULL, (GCallback) _source_holding_tank_on_source_collection_thawed_data_collection_thawed, self); -#line 28 "/home/jens/Source/shotwell/src/core/SourceHoldingTank.vala" - _data_collection_unref0 (self->priv->sources); -#line 30 "/home/jens/Source/shotwell/src/core/SourceHoldingTank.vala" - _data_set_unref0 (self->priv->tank); -#line 31 "/home/jens/Source/shotwell/src/core/SourceHoldingTank.vala" - _g_object_unref0 (self->priv->relinks); -#line 32 "/home/jens/Source/shotwell/src/core/SourceHoldingTank.vala" - _g_object_unref0 (self->priv->unlinking); -#line 1687 "SourceHoldingTank.c" -} - - -GType -source_holding_tank_get_type (void) -{ - static volatile gsize source_holding_tank_type_id__volatile = 0; - if (g_once_init_enter (&source_holding_tank_type_id__volatile)) { - static const GTypeValueTable g_define_type_value_table = { value_source_holding_tank_init, value_source_holding_tank_free_value, value_source_holding_tank_copy_value, value_source_holding_tank_peek_pointer, "p", value_source_holding_tank_collect_value, "p", value_source_holding_tank_lcopy_value }; - static const GTypeInfo g_define_type_info = { sizeof (SourceHoldingTankClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) source_holding_tank_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (SourceHoldingTank), 0, (GInstanceInitFunc) source_holding_tank_instance_init, &g_define_type_value_table }; - static const GTypeFundamentalInfo g_define_type_fundamental_info = { (G_TYPE_FLAG_CLASSED | G_TYPE_FLAG_INSTANTIATABLE | G_TYPE_FLAG_DERIVABLE | G_TYPE_FLAG_DEEP_DERIVABLE) }; - GType source_holding_tank_type_id; - source_holding_tank_type_id = g_type_register_fundamental (g_type_fundamental_next (), "SourceHoldingTank", &g_define_type_info, &g_define_type_fundamental_info, 0); - g_once_init_leave (&source_holding_tank_type_id__volatile, source_holding_tank_type_id); - } - return source_holding_tank_type_id__volatile; -} - - -gpointer -source_holding_tank_ref (gpointer instance) -{ - SourceHoldingTank * self; - self = instance; -#line 24 "/home/jens/Source/shotwell/src/core/SourceHoldingTank.vala" - g_atomic_int_inc (&self->ref_count); -#line 24 "/home/jens/Source/shotwell/src/core/SourceHoldingTank.vala" - return instance; -#line 1716 "SourceHoldingTank.c" -} - - -void -source_holding_tank_unref (gpointer instance) -{ - SourceHoldingTank * self; - self = instance; -#line 24 "/home/jens/Source/shotwell/src/core/SourceHoldingTank.vala" - if (g_atomic_int_dec_and_test (&self->ref_count)) { -#line 24 "/home/jens/Source/shotwell/src/core/SourceHoldingTank.vala" - SOURCE_HOLDING_TANK_GET_CLASS (self)->finalize (self); -#line 24 "/home/jens/Source/shotwell/src/core/SourceHoldingTank.vala" - g_type_free_instance ((GTypeInstance *) self); -#line 1731 "SourceHoldingTank.c" - } -} - - - diff --git a/src/core/SourceInterfaces.c b/src/core/SourceInterfaces.c deleted file mode 100644 index a68996d..0000000 --- a/src/core/SourceInterfaces.c +++ /dev/null @@ -1,290 +0,0 @@ -/* SourceInterfaces.c generated by valac 0.40.4, the Vala compiler - * generated from SourceInterfaces.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. - */ -/* See the note in MediaInterfaces.vala for some thoughts on the theory of expanding Shotwell's*/ -/* features via interfaces rather than class hierarchies.*/ -/* Indexable DataSources provide raw strings that may be searched against (and, in the future,*/ -/* indexed) for free-text search queries. DataSources implementing Indexable must prepare and*/ -/* store (i.e. cache) these strings using prepare_indexable_string(s), as preparing the strings*/ -/* for each call is expensive.*/ -/**/ -/* When the indexable string has changed, the object should fire an alteration of*/ -/* "indexable:keywords". The prepare methods will not do this.*/ - - -#include <glib.h> -#include <glib-object.h> -#include <stdlib.h> -#include <string.h> - - -#define TYPE_DATA_OBJECT (data_object_get_type ()) -#define DATA_OBJECT(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_DATA_OBJECT, DataObject)) -#define DATA_OBJECT_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_DATA_OBJECT, DataObjectClass)) -#define IS_DATA_OBJECT(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_DATA_OBJECT)) -#define IS_DATA_OBJECT_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_DATA_OBJECT)) -#define DATA_OBJECT_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_DATA_OBJECT, DataObjectClass)) - -typedef struct _DataObject DataObject; -typedef struct _DataObjectClass DataObjectClass; - -#define TYPE_DATA_SOURCE (data_source_get_type ()) -#define DATA_SOURCE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_DATA_SOURCE, DataSource)) -#define DATA_SOURCE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_DATA_SOURCE, DataSourceClass)) -#define IS_DATA_SOURCE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_DATA_SOURCE)) -#define IS_DATA_SOURCE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_DATA_SOURCE)) -#define DATA_SOURCE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_DATA_SOURCE, DataSourceClass)) - -typedef struct _DataSource DataSource; -typedef struct _DataSourceClass DataSourceClass; - -#define TYPE_INDEXABLE (indexable_get_type ()) -#define INDEXABLE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_INDEXABLE, Indexable)) -#define IS_INDEXABLE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_INDEXABLE)) -#define INDEXABLE_GET_INTERFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE ((obj), TYPE_INDEXABLE, IndexableIface)) - -typedef struct _Indexable Indexable; -typedef struct _IndexableIface IndexableIface; -#define _g_free0(var) (var = (g_free (var), NULL)) -#define _g_string_free0(var) ((var == NULL) ? NULL : (var = (g_string_free (var, TRUE), NULL))) - -struct _IndexableIface { - GTypeInterface parent_iface; - const gchar* (*get_indexable_keywords) (Indexable* self); -}; - - - -GType data_object_get_type (void) G_GNUC_CONST; -GType data_source_get_type (void) G_GNUC_CONST; -GType indexable_get_type (void) G_GNUC_CONST; -const gchar* indexable_get_indexable_keywords (Indexable* self); -gchar* indexable_prepare_indexable_string (const gchar* str); -gboolean is_string_empty (const gchar* s); -gchar* string_remove_diacritics (const gchar* istring); -gchar* indexable_prepare_indexable_strings (gchar** strs, - int strs_length1); - - -const gchar* -indexable_get_indexable_keywords (Indexable* self) -{ -#line 19 "/home/jens/Source/shotwell/src/core/SourceInterfaces.vala" - g_return_val_if_fail (IS_INDEXABLE (self), NULL); -#line 19 "/home/jens/Source/shotwell/src/core/SourceInterfaces.vala" - return INDEXABLE_GET_INTERFACE (self)->get_indexable_keywords (self); -#line 82 "SourceInterfaces.c" -} - - -gchar* -indexable_prepare_indexable_string (const gchar* str) -{ - gchar* result = NULL; - gchar* _tmp0_; - gchar* _tmp1_; - gchar* _tmp2_; - gchar* _tmp3_; -#line 22 "/home/jens/Source/shotwell/src/core/SourceInterfaces.vala" - if (is_string_empty (str)) { -#line 23 "/home/jens/Source/shotwell/src/core/SourceInterfaces.vala" - result = NULL; -#line 23 "/home/jens/Source/shotwell/src/core/SourceInterfaces.vala" - return result; -#line 100 "SourceInterfaces.c" - } -#line 24 "/home/jens/Source/shotwell/src/core/SourceInterfaces.vala" - _tmp0_ = g_utf8_strdown (str, (gssize) -1); -#line 24 "/home/jens/Source/shotwell/src/core/SourceInterfaces.vala" - _tmp1_ = _tmp0_; -#line 24 "/home/jens/Source/shotwell/src/core/SourceInterfaces.vala" - _tmp2_ = string_remove_diacritics (_tmp1_); -#line 24 "/home/jens/Source/shotwell/src/core/SourceInterfaces.vala" - _tmp3_ = _tmp2_; -#line 24 "/home/jens/Source/shotwell/src/core/SourceInterfaces.vala" - _g_free0 (_tmp1_); -#line 24 "/home/jens/Source/shotwell/src/core/SourceInterfaces.vala" - result = _tmp3_; -#line 24 "/home/jens/Source/shotwell/src/core/SourceInterfaces.vala" - return result; -#line 116 "SourceInterfaces.c" -} - - -gchar* -indexable_prepare_indexable_strings (gchar** strs, - int strs_length1) -{ - gchar* result = NULL; - gboolean _tmp0_ = FALSE; - GString* builder = NULL; - GString* _tmp1_; - gint ctr = 0; - const gchar* _tmp14_ = NULL; - GString* _tmp15_; - const gchar* _tmp16_; - gchar* _tmp19_; -#line 28 "/home/jens/Source/shotwell/src/core/SourceInterfaces.vala" - if (strs == NULL) { -#line 28 "/home/jens/Source/shotwell/src/core/SourceInterfaces.vala" - _tmp0_ = TRUE; -#line 137 "SourceInterfaces.c" - } else { -#line 28 "/home/jens/Source/shotwell/src/core/SourceInterfaces.vala" - _tmp0_ = strs_length1 == 0; -#line 141 "SourceInterfaces.c" - } -#line 28 "/home/jens/Source/shotwell/src/core/SourceInterfaces.vala" - if (_tmp0_) { -#line 29 "/home/jens/Source/shotwell/src/core/SourceInterfaces.vala" - result = NULL; -#line 29 "/home/jens/Source/shotwell/src/core/SourceInterfaces.vala" - return result; -#line 149 "SourceInterfaces.c" - } -#line 31 "/home/jens/Source/shotwell/src/core/SourceInterfaces.vala" - _tmp1_ = g_string_new (""); -#line 31 "/home/jens/Source/shotwell/src/core/SourceInterfaces.vala" - builder = _tmp1_; -#line 32 "/home/jens/Source/shotwell/src/core/SourceInterfaces.vala" - ctr = 0; -#line 157 "SourceInterfaces.c" - { - gboolean _tmp2_ = FALSE; -#line 33 "/home/jens/Source/shotwell/src/core/SourceInterfaces.vala" - _tmp2_ = TRUE; -#line 33 "/home/jens/Source/shotwell/src/core/SourceInterfaces.vala" - while (TRUE) { -#line 164 "SourceInterfaces.c" - gint _tmp5_; - const gchar* _tmp6_; -#line 33 "/home/jens/Source/shotwell/src/core/SourceInterfaces.vala" - if (!_tmp2_) { -#line 169 "SourceInterfaces.c" - gint _tmp3_; - gint _tmp4_; -#line 39 "/home/jens/Source/shotwell/src/core/SourceInterfaces.vala" - _tmp3_ = ctr; -#line 39 "/home/jens/Source/shotwell/src/core/SourceInterfaces.vala" - ctr = _tmp3_ + 1; -#line 39 "/home/jens/Source/shotwell/src/core/SourceInterfaces.vala" - _tmp4_ = ctr; -#line 39 "/home/jens/Source/shotwell/src/core/SourceInterfaces.vala" - if (!(_tmp4_ < strs_length1)) { -#line 39 "/home/jens/Source/shotwell/src/core/SourceInterfaces.vala" - break; -#line 182 "SourceInterfaces.c" - } - } -#line 33 "/home/jens/Source/shotwell/src/core/SourceInterfaces.vala" - _tmp2_ = FALSE; -#line 34 "/home/jens/Source/shotwell/src/core/SourceInterfaces.vala" - _tmp5_ = ctr; -#line 34 "/home/jens/Source/shotwell/src/core/SourceInterfaces.vala" - _tmp6_ = strs[_tmp5_]; -#line 34 "/home/jens/Source/shotwell/src/core/SourceInterfaces.vala" - if (!is_string_empty (_tmp6_)) { -#line 193 "SourceInterfaces.c" - GString* _tmp7_; - gint _tmp8_; - const gchar* _tmp9_; - gchar* _tmp10_; - gchar* _tmp11_; - gint _tmp12_; -#line 35 "/home/jens/Source/shotwell/src/core/SourceInterfaces.vala" - _tmp7_ = builder; -#line 35 "/home/jens/Source/shotwell/src/core/SourceInterfaces.vala" - _tmp8_ = ctr; -#line 35 "/home/jens/Source/shotwell/src/core/SourceInterfaces.vala" - _tmp9_ = strs[_tmp8_]; -#line 35 "/home/jens/Source/shotwell/src/core/SourceInterfaces.vala" - _tmp10_ = g_utf8_strdown (_tmp9_, (gssize) -1); -#line 35 "/home/jens/Source/shotwell/src/core/SourceInterfaces.vala" - _tmp11_ = _tmp10_; -#line 35 "/home/jens/Source/shotwell/src/core/SourceInterfaces.vala" - g_string_append (_tmp7_, _tmp11_); -#line 35 "/home/jens/Source/shotwell/src/core/SourceInterfaces.vala" - _g_free0 (_tmp11_); -#line 36 "/home/jens/Source/shotwell/src/core/SourceInterfaces.vala" - _tmp12_ = ctr; -#line 36 "/home/jens/Source/shotwell/src/core/SourceInterfaces.vala" - if (_tmp12_ < (strs_length1 - 1)) { -#line 218 "SourceInterfaces.c" - GString* _tmp13_; -#line 37 "/home/jens/Source/shotwell/src/core/SourceInterfaces.vala" - _tmp13_ = builder; -#line 37 "/home/jens/Source/shotwell/src/core/SourceInterfaces.vala" - g_string_append_c (_tmp13_, ' '); -#line 224 "SourceInterfaces.c" - } - } - } - } -#line 41 "/home/jens/Source/shotwell/src/core/SourceInterfaces.vala" - _tmp15_ = builder; -#line 41 "/home/jens/Source/shotwell/src/core/SourceInterfaces.vala" - _tmp16_ = _tmp15_->str; -#line 41 "/home/jens/Source/shotwell/src/core/SourceInterfaces.vala" - if (!is_string_empty (_tmp16_)) { -#line 235 "SourceInterfaces.c" - GString* _tmp17_; - const gchar* _tmp18_; -#line 41 "/home/jens/Source/shotwell/src/core/SourceInterfaces.vala" - _tmp17_ = builder; -#line 41 "/home/jens/Source/shotwell/src/core/SourceInterfaces.vala" - _tmp18_ = _tmp17_->str; -#line 41 "/home/jens/Source/shotwell/src/core/SourceInterfaces.vala" - _tmp14_ = _tmp18_; -#line 244 "SourceInterfaces.c" - } else { -#line 41 "/home/jens/Source/shotwell/src/core/SourceInterfaces.vala" - _tmp14_ = NULL; -#line 248 "SourceInterfaces.c" - } -#line 41 "/home/jens/Source/shotwell/src/core/SourceInterfaces.vala" - _tmp19_ = g_strdup (_tmp14_); -#line 41 "/home/jens/Source/shotwell/src/core/SourceInterfaces.vala" - result = _tmp19_; -#line 41 "/home/jens/Source/shotwell/src/core/SourceInterfaces.vala" - _g_string_free0 (builder); -#line 41 "/home/jens/Source/shotwell/src/core/SourceInterfaces.vala" - return result; -#line 258 "SourceInterfaces.c" -} - - -static void -indexable_base_init (IndexableIface * iface) -{ -#line 18 "/home/jens/Source/shotwell/src/core/SourceInterfaces.vala" - static gboolean initialized = FALSE; -#line 18 "/home/jens/Source/shotwell/src/core/SourceInterfaces.vala" - if (!initialized) { -#line 18 "/home/jens/Source/shotwell/src/core/SourceInterfaces.vala" - initialized = TRUE; -#line 271 "SourceInterfaces.c" - } -} - - -GType -indexable_get_type (void) -{ - static volatile gsize indexable_type_id__volatile = 0; - if (g_once_init_enter (&indexable_type_id__volatile)) { - static const GTypeInfo g_define_type_info = { sizeof (IndexableIface), (GBaseInitFunc) indexable_base_init, (GBaseFinalizeFunc) NULL, (GClassInitFunc) NULL, (GClassFinalizeFunc) NULL, NULL, 0, 0, (GInstanceInitFunc) NULL, NULL }; - GType indexable_type_id; - indexable_type_id = g_type_register_static (G_TYPE_INTERFACE, "Indexable", &g_define_type_info, 0); - g_type_interface_add_prerequisite (indexable_type_id, TYPE_DATA_SOURCE); - g_once_init_leave (&indexable_type_id__volatile, indexable_type_id); - } - return indexable_type_id__volatile; -} - - - diff --git a/src/core/Tracker.c b/src/core/Tracker.c deleted file mode 100644 index 3e3aee8..0000000 --- a/src/core/Tracker.c +++ /dev/null @@ -1,2135 +0,0 @@ -/* Tracker.c generated by valac 0.40.4, the Vala compiler - * generated from Tracker.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 <gee.h> -#include <gobject/gvaluecollector.h> - - -#define CORE_TYPE_TRACKER_ACCUMULATOR (core_tracker_accumulator_get_type ()) -#define CORE_TRACKER_ACCUMULATOR(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), CORE_TYPE_TRACKER_ACCUMULATOR, CoreTrackerAccumulator)) -#define CORE_IS_TRACKER_ACCUMULATOR(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), CORE_TYPE_TRACKER_ACCUMULATOR)) -#define CORE_TRACKER_ACCUMULATOR_GET_INTERFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE ((obj), CORE_TYPE_TRACKER_ACCUMULATOR, CoreTrackerAccumulatorIface)) - -typedef struct _CoreTrackerAccumulator CoreTrackerAccumulator; -typedef struct _CoreTrackerAccumulatorIface CoreTrackerAccumulatorIface; - -#define TYPE_DATA_OBJECT (data_object_get_type ()) -#define DATA_OBJECT(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_DATA_OBJECT, DataObject)) -#define DATA_OBJECT_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_DATA_OBJECT, DataObjectClass)) -#define IS_DATA_OBJECT(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_DATA_OBJECT)) -#define IS_DATA_OBJECT_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_DATA_OBJECT)) -#define DATA_OBJECT_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_DATA_OBJECT, DataObjectClass)) - -typedef struct _DataObject DataObject; -typedef struct _DataObjectClass DataObjectClass; - -#define TYPE_ALTERATION (alteration_get_type ()) -#define ALTERATION(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_ALTERATION, Alteration)) -#define ALTERATION_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_ALTERATION, AlterationClass)) -#define IS_ALTERATION(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_ALTERATION)) -#define IS_ALTERATION_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_ALTERATION)) -#define ALTERATION_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_ALTERATION, AlterationClass)) - -typedef struct _Alteration Alteration; -typedef struct _AlterationClass AlterationClass; - -#define 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; -typedef struct _CoreTrackerPrivate CoreTrackerPrivate; - -#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 _data_collection_unref0(var) ((var == NULL) ? NULL : (var = (data_collection_unref (var), NULL))) -#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL))) -#define _alteration_unref0(var) ((var == NULL) ? NULL : (var = (alteration_unref (var), NULL))) -typedef struct _CoreParamSpecTracker CoreParamSpecTracker; -enum { - CORE_TRACKER_UPDATED_SIGNAL, - CORE_TRACKER_NUM_SIGNALS -}; -static guint core_tracker_signals[CORE_TRACKER_NUM_SIGNALS] = {0}; - -#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; -typedef struct _CoreViewTrackerPrivate CoreViewTrackerPrivate; - -#define CORE_VIEW_TRACKER_TYPE_MUX (core_view_tracker_mux_get_type ()) -#define CORE_VIEW_TRACKER_MUX(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), CORE_VIEW_TRACKER_TYPE_MUX, CoreViewTrackerMux)) -#define CORE_VIEW_TRACKER_MUX_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), CORE_VIEW_TRACKER_TYPE_MUX, CoreViewTrackerMuxClass)) -#define CORE_VIEW_TRACKER_IS_MUX(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), CORE_VIEW_TRACKER_TYPE_MUX)) -#define CORE_VIEW_TRACKER_IS_MUX_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), CORE_VIEW_TRACKER_TYPE_MUX)) -#define CORE_VIEW_TRACKER_MUX_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), CORE_VIEW_TRACKER_TYPE_MUX, CoreViewTrackerMuxClass)) - -typedef struct _CoreViewTrackerMux CoreViewTrackerMux; -typedef struct _CoreViewTrackerMuxClass CoreViewTrackerMuxClass; - -#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_DATA_VIEW (data_view_get_type ()) -#define DATA_VIEW(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_DATA_VIEW, DataView)) -#define DATA_VIEW_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_DATA_VIEW, DataViewClass)) -#define IS_DATA_VIEW(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_DATA_VIEW)) -#define IS_DATA_VIEW_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_DATA_VIEW)) -#define DATA_VIEW_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_DATA_VIEW, DataViewClass)) - -typedef struct _DataView DataView; -typedef struct _DataViewClass DataViewClass; -typedef struct _CoreViewTrackerMuxPrivate CoreViewTrackerMuxPrivate; -enum { - CORE_VIEW_TRACKER_MUX_0_PROPERTY, - CORE_VIEW_TRACKER_MUX_NUM_PROPERTIES -}; -static GParamSpec* core_view_tracker_mux_properties[CORE_VIEW_TRACKER_MUX_NUM_PROPERTIES]; -#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 _CoreTrackerAccumulatorIface { - GTypeInterface parent_iface; - gboolean (*include) (CoreTrackerAccumulator* self, DataObject* object); - gboolean (*uninclude) (CoreTrackerAccumulator* self, DataObject* object); - gboolean (*altered) (CoreTrackerAccumulator* self, DataObject* object, Alteration* alteration); -}; - -struct _CoreTracker { - GTypeInstance parent_instance; - volatile int ref_count; - CoreTrackerPrivate * priv; -}; - -struct _CoreTrackerClass { - GTypeClass parent_class; - void (*finalize) (CoreTracker *self); - void (*updated) (CoreTracker* self); -}; - -struct _CoreTrackerPrivate { - DataCollection* collection; - GeeCollection* initial; - CoreTrackerAccumulator* acc; -}; - -typedef gboolean (*CoreTrackerIncludeUnincludeObject) (DataObject* object, void* user_data); -struct _CoreParamSpecTracker { - GParamSpec parent_instance; -}; - -struct _CoreViewTracker { - CoreTracker parent_instance; - CoreViewTrackerPrivate * priv; -}; - -struct _CoreViewTrackerClass { - CoreTrackerClass parent_class; -}; - -struct _CoreViewTrackerPrivate { - CoreViewTrackerMux* mux; -}; - -struct _CoreViewTrackerMux { - GObject parent_instance; - CoreViewTrackerMuxPrivate * priv; - CoreTrackerAccumulator* all; - CoreTrackerAccumulator* visible; - CoreTrackerAccumulator* selected; -}; - -struct _CoreViewTrackerMuxClass { - GObjectClass parent_class; -}; - - -static gpointer core_tracker_parent_class = NULL; -static gpointer core_view_tracker_parent_class = NULL; -static gpointer core_view_tracker_mux_parent_class = NULL; -static CoreTrackerAccumulatorIface * core_view_tracker_mux_core_tracker_accumulator_parent_iface = NULL; - -GType data_object_get_type (void) G_GNUC_CONST; -gpointer alteration_ref (gpointer instance); -void alteration_unref (gpointer instance); -GParamSpec* param_spec_alteration (const gchar* name, - const gchar* nick, - const gchar* blurb, - GType object_type, - GParamFlags flags); -void value_set_alteration (GValue* value, - gpointer v_object); -void value_take_alteration (GValue* value, - gpointer v_object); -gpointer value_get_alteration (const GValue* value); -GType alteration_get_type (void) G_GNUC_CONST; -GType core_tracker_accumulator_get_type (void) G_GNUC_CONST; -gboolean core_tracker_accumulator_include (CoreTrackerAccumulator* self, - DataObject* object); -gboolean core_tracker_accumulator_uninclude (CoreTrackerAccumulator* self, - DataObject* object); -gboolean core_tracker_accumulator_altered (CoreTrackerAccumulator* self, - DataObject* object, - Alteration* alteration); -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; -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; -#define CORE_TRACKER_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), CORE_TYPE_TRACKER, CoreTrackerPrivate)) -static void core_tracker_on_items_added (CoreTracker* self, - GeeIterable* added); -static void _core_tracker_on_items_added_data_collection_items_added (DataCollection* _sender, - GeeIterable* added, - gpointer self); -static void core_tracker_on_items_removed (CoreTracker* self, - GeeIterable* removed); -static void _core_tracker_on_items_removed_data_collection_items_removed (DataCollection* _sender, - GeeIterable* removed, - gpointer self); -static void core_tracker_on_items_altered (CoreTracker* self, - GeeMap* map); -static void _core_tracker_on_items_altered_data_collection_items_altered (DataCollection* _sender, - GeeMap* items, - gpointer self); -CoreTracker* core_tracker_new (DataCollection* collection, - GeeCollection* initial); -CoreTracker* core_tracker_construct (GType object_type, - DataCollection* collection, - GeeCollection* initial); -void core_tracker_start (CoreTracker* self, - CoreTrackerAccumulator* acc); -GeeCollection* data_collection_get_all (DataCollection* self); -DataCollection* core_tracker_get_collection (CoreTracker* self); -void core_tracker_include_uninclude (CoreTracker* self, - GeeIterable* objects, - CoreTrackerIncludeUnincludeObject cb, - void* cb_target); -static gboolean _core_tracker_accumulator_include_core_tracker_include_uninclude_object (DataObject* object, - gpointer self); -static gboolean _core_tracker_accumulator_uninclude_core_tracker_include_uninclude_object (DataObject* object, - gpointer self); -static void core_tracker_real_updated (CoreTracker* self); -static void core_tracker_finalize (CoreTracker * obj); -GType core_view_tracker_get_type (void) G_GNUC_CONST; -static GType core_view_tracker_mux_get_type (void) G_GNUC_CONST G_GNUC_UNUSED; -#define CORE_VIEW_TRACKER_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), CORE_TYPE_VIEW_TRACKER, CoreViewTrackerPrivate)) -GType view_collection_get_type (void) G_GNUC_CONST; -GType data_view_get_type (void) G_GNUC_CONST; -static void core_view_tracker_on_items_shown (CoreViewTracker* self, - GeeCollection* shown); -static void _core_view_tracker_on_items_shown_view_collection_items_shown (ViewCollection* _sender, - GeeCollection* visible, - gpointer self); -static void core_view_tracker_on_items_hidden (CoreViewTracker* self, - GeeCollection* hidden); -static void _core_view_tracker_on_items_hidden_view_collection_items_hidden (ViewCollection* _sender, - GeeCollection* hidden, - gpointer self); -static void core_view_tracker_on_items_selected (CoreViewTracker* self, - GeeIterable* selected); -static void _core_view_tracker_on_items_selected_view_collection_items_selected (ViewCollection* _sender, - GeeIterable* selected, - gpointer self); -static void core_view_tracker_on_items_unselected (CoreViewTracker* self, - GeeIterable* unselected); -static void _core_view_tracker_on_items_unselected_view_collection_items_unselected (ViewCollection* _sender, - GeeIterable* unselected, - gpointer self); -CoreViewTracker* core_view_tracker_new (ViewCollection* collection); -CoreViewTracker* core_view_tracker_construct (GType object_type, - ViewCollection* collection); -GeeCollection* view_collection_get_all_unfiltered (ViewCollection* self); -void core_view_tracker_start (CoreViewTracker* self, - CoreTrackerAccumulator* all, - CoreTrackerAccumulator* visible, - CoreTrackerAccumulator* selected); -static CoreViewTrackerMux* core_view_tracker_mux_new (CoreTrackerAccumulator* all, - CoreTrackerAccumulator* visible, - CoreTrackerAccumulator* selected); -static CoreViewTrackerMux* core_view_tracker_mux_construct (GType object_type, - CoreTrackerAccumulator* all, - CoreTrackerAccumulator* visible, - CoreTrackerAccumulator* selected); -static gboolean core_view_tracker_mux_real_include (CoreTrackerAccumulator* base, - DataObject* object); -gboolean data_view_is_visible (DataView* self); -gboolean data_view_is_selected (DataView* self); -static gboolean core_view_tracker_mux_real_uninclude (CoreTrackerAccumulator* base, - DataObject* object); -static gboolean core_view_tracker_mux_real_altered (CoreTrackerAccumulator* base, - DataObject* object, - Alteration* alteration); -static void core_view_tracker_mux_finalize (GObject * obj); -static void core_view_tracker_finalize (CoreTracker * obj); - - -gboolean -core_tracker_accumulator_include (CoreTrackerAccumulator* self, - DataObject* object) -{ -#line 13 "/home/jens/Source/shotwell/src/core/Tracker.vala" - g_return_val_if_fail (CORE_IS_TRACKER_ACCUMULATOR (self), FALSE); -#line 13 "/home/jens/Source/shotwell/src/core/Tracker.vala" - return CORE_TRACKER_ACCUMULATOR_GET_INTERFACE (self)->include (self, object); -#line 332 "Tracker.c" -} - - -gboolean -core_tracker_accumulator_uninclude (CoreTrackerAccumulator* self, - DataObject* object) -{ -#line 15 "/home/jens/Source/shotwell/src/core/Tracker.vala" - g_return_val_if_fail (CORE_IS_TRACKER_ACCUMULATOR (self), FALSE); -#line 15 "/home/jens/Source/shotwell/src/core/Tracker.vala" - return CORE_TRACKER_ACCUMULATOR_GET_INTERFACE (self)->uninclude (self, object); -#line 344 "Tracker.c" -} - - -gboolean -core_tracker_accumulator_altered (CoreTrackerAccumulator* self, - DataObject* object, - Alteration* alteration) -{ -#line 17 "/home/jens/Source/shotwell/src/core/Tracker.vala" - g_return_val_if_fail (CORE_IS_TRACKER_ACCUMULATOR (self), FALSE); -#line 17 "/home/jens/Source/shotwell/src/core/Tracker.vala" - return CORE_TRACKER_ACCUMULATOR_GET_INTERFACE (self)->altered (self, object, alteration); -#line 357 "Tracker.c" -} - - -static void -core_tracker_accumulator_base_init (CoreTrackerAccumulatorIface * iface) -{ -#line 12 "/home/jens/Source/shotwell/src/core/Tracker.vala" - static gboolean initialized = FALSE; -#line 12 "/home/jens/Source/shotwell/src/core/Tracker.vala" - if (!initialized) { -#line 12 "/home/jens/Source/shotwell/src/core/Tracker.vala" - initialized = TRUE; -#line 370 "Tracker.c" - } -} - - -GType -core_tracker_accumulator_get_type (void) -{ - static volatile gsize core_tracker_accumulator_type_id__volatile = 0; - if (g_once_init_enter (&core_tracker_accumulator_type_id__volatile)) { - static const GTypeInfo g_define_type_info = { sizeof (CoreTrackerAccumulatorIface), (GBaseInitFunc) core_tracker_accumulator_base_init, (GBaseFinalizeFunc) NULL, (GClassInitFunc) NULL, (GClassFinalizeFunc) NULL, NULL, 0, 0, (GInstanceInitFunc) NULL, NULL }; - GType core_tracker_accumulator_type_id; - core_tracker_accumulator_type_id = g_type_register_static (G_TYPE_INTERFACE, "CoreTrackerAccumulator", &g_define_type_info, 0); - g_type_interface_add_prerequisite (core_tracker_accumulator_type_id, G_TYPE_OBJECT); - g_once_init_leave (&core_tracker_accumulator_type_id__volatile, core_tracker_accumulator_type_id); - } - return core_tracker_accumulator_type_id__volatile; -} - - -static void -_core_tracker_on_items_added_data_collection_items_added (DataCollection* _sender, - GeeIterable* added, - gpointer self) -{ -#line 40 "/home/jens/Source/shotwell/src/core/Tracker.vala" - core_tracker_on_items_added ((CoreTracker*) self, added); -#line 397 "Tracker.c" -} - - -static void -_core_tracker_on_items_removed_data_collection_items_removed (DataCollection* _sender, - GeeIterable* removed, - gpointer self) -{ -#line 41 "/home/jens/Source/shotwell/src/core/Tracker.vala" - core_tracker_on_items_removed ((CoreTracker*) self, removed); -#line 408 "Tracker.c" -} - - -static void -_core_tracker_on_items_altered_data_collection_items_altered (DataCollection* _sender, - GeeMap* items, - gpointer self) -{ -#line 42 "/home/jens/Source/shotwell/src/core/Tracker.vala" - core_tracker_on_items_altered ((CoreTracker*) self, items); -#line 419 "Tracker.c" -} - - -static gpointer -_data_collection_ref0 (gpointer self) -{ -#line 34 "/home/jens/Source/shotwell/src/core/Tracker.vala" - return self ? data_collection_ref (self) : NULL; -#line 428 "Tracker.c" -} - - -static gpointer -_g_object_ref0 (gpointer self) -{ -#line 35 "/home/jens/Source/shotwell/src/core/Tracker.vala" - return self ? g_object_ref (self) : NULL; -#line 437 "Tracker.c" -} - - -CoreTracker* -core_tracker_construct (GType object_type, - DataCollection* collection, - GeeCollection* initial) -{ - CoreTracker* self = NULL; - DataCollection* _tmp0_; - GeeCollection* _tmp1_; -#line 33 "/home/jens/Source/shotwell/src/core/Tracker.vala" - g_return_val_if_fail (IS_DATA_COLLECTION (collection), NULL); -#line 33 "/home/jens/Source/shotwell/src/core/Tracker.vala" - g_return_val_if_fail ((initial == NULL) || GEE_IS_COLLECTION (initial), NULL); -#line 33 "/home/jens/Source/shotwell/src/core/Tracker.vala" - self = (CoreTracker*) g_type_create_instance (object_type); -#line 34 "/home/jens/Source/shotwell/src/core/Tracker.vala" - _tmp0_ = _data_collection_ref0 (collection); -#line 34 "/home/jens/Source/shotwell/src/core/Tracker.vala" - _data_collection_unref0 (self->priv->collection); -#line 34 "/home/jens/Source/shotwell/src/core/Tracker.vala" - self->priv->collection = _tmp0_; -#line 35 "/home/jens/Source/shotwell/src/core/Tracker.vala" - _tmp1_ = _g_object_ref0 (initial); -#line 35 "/home/jens/Source/shotwell/src/core/Tracker.vala" - _g_object_unref0 (self->priv->initial); -#line 35 "/home/jens/Source/shotwell/src/core/Tracker.vala" - self->priv->initial = _tmp1_; -#line 33 "/home/jens/Source/shotwell/src/core/Tracker.vala" - return self; -#line 469 "Tracker.c" -} - - -CoreTracker* -core_tracker_new (DataCollection* collection, - GeeCollection* initial) -{ -#line 33 "/home/jens/Source/shotwell/src/core/Tracker.vala" - return core_tracker_construct (CORE_TYPE_TRACKER, collection, initial); -#line 479 "Tracker.c" -} - - -void -core_tracker_start (CoreTracker* self, - CoreTrackerAccumulator* acc) -{ - CoreTrackerAccumulator* _tmp0_; - CoreTrackerAccumulator* _tmp1_; - DataCollection* _tmp2_; - DataCollection* _tmp3_; - DataCollection* _tmp4_; - gboolean _tmp5_ = FALSE; - GeeCollection* _tmp6_; -#line 46 "/home/jens/Source/shotwell/src/core/Tracker.vala" - g_return_if_fail (CORE_IS_TRACKER (self)); -#line 46 "/home/jens/Source/shotwell/src/core/Tracker.vala" - g_return_if_fail (CORE_IS_TRACKER_ACCUMULATOR (acc)); -#line 48 "/home/jens/Source/shotwell/src/core/Tracker.vala" - _tmp0_ = self->priv->acc; -#line 48 "/home/jens/Source/shotwell/src/core/Tracker.vala" - _vala_assert (_tmp0_ == NULL, "this.acc == null"); -#line 50 "/home/jens/Source/shotwell/src/core/Tracker.vala" - _tmp1_ = _g_object_ref0 (acc); -#line 50 "/home/jens/Source/shotwell/src/core/Tracker.vala" - _g_object_unref0 (self->priv->acc); -#line 50 "/home/jens/Source/shotwell/src/core/Tracker.vala" - self->priv->acc = _tmp1_; -#line 52 "/home/jens/Source/shotwell/src/core/Tracker.vala" - _tmp2_ = self->priv->collection; -#line 52 "/home/jens/Source/shotwell/src/core/Tracker.vala" - g_signal_connect (_tmp2_, "items-added", (GCallback) _core_tracker_on_items_added_data_collection_items_added, self); -#line 53 "/home/jens/Source/shotwell/src/core/Tracker.vala" - _tmp3_ = self->priv->collection; -#line 53 "/home/jens/Source/shotwell/src/core/Tracker.vala" - g_signal_connect (_tmp3_, "items-removed", (GCallback) _core_tracker_on_items_removed_data_collection_items_removed, self); -#line 54 "/home/jens/Source/shotwell/src/core/Tracker.vala" - _tmp4_ = self->priv->collection; -#line 54 "/home/jens/Source/shotwell/src/core/Tracker.vala" - g_signal_connect (_tmp4_, "items-altered", (GCallback) _core_tracker_on_items_altered_data_collection_items_altered, self); -#line 56 "/home/jens/Source/shotwell/src/core/Tracker.vala" - _tmp6_ = self->priv->initial; -#line 56 "/home/jens/Source/shotwell/src/core/Tracker.vala" - if (_tmp6_ != NULL) { -#line 524 "Tracker.c" - GeeCollection* _tmp7_; - gint _tmp8_; - gint _tmp9_; -#line 56 "/home/jens/Source/shotwell/src/core/Tracker.vala" - _tmp7_ = self->priv->initial; -#line 56 "/home/jens/Source/shotwell/src/core/Tracker.vala" - _tmp8_ = gee_collection_get_size (_tmp7_); -#line 56 "/home/jens/Source/shotwell/src/core/Tracker.vala" - _tmp9_ = _tmp8_; -#line 56 "/home/jens/Source/shotwell/src/core/Tracker.vala" - _tmp5_ = _tmp9_ > 0; -#line 536 "Tracker.c" - } else { -#line 56 "/home/jens/Source/shotwell/src/core/Tracker.vala" - _tmp5_ = FALSE; -#line 540 "Tracker.c" - } -#line 56 "/home/jens/Source/shotwell/src/core/Tracker.vala" - if (_tmp5_) { -#line 544 "Tracker.c" - GeeCollection* _tmp10_; -#line 57 "/home/jens/Source/shotwell/src/core/Tracker.vala" - _tmp10_ = self->priv->initial; -#line 57 "/home/jens/Source/shotwell/src/core/Tracker.vala" - core_tracker_on_items_added (self, G_TYPE_CHECK_INSTANCE_CAST (_tmp10_, GEE_TYPE_ITERABLE, GeeIterable)); -#line 550 "Tracker.c" - } else { - GeeCollection* _tmp11_; -#line 58 "/home/jens/Source/shotwell/src/core/Tracker.vala" - _tmp11_ = self->priv->initial; -#line 58 "/home/jens/Source/shotwell/src/core/Tracker.vala" - if (_tmp11_ == NULL) { -#line 557 "Tracker.c" - DataCollection* _tmp12_; - GeeCollection* _tmp13_; - GeeCollection* _tmp14_; -#line 59 "/home/jens/Source/shotwell/src/core/Tracker.vala" - _tmp12_ = self->priv->collection; -#line 59 "/home/jens/Source/shotwell/src/core/Tracker.vala" - _tmp13_ = data_collection_get_all (_tmp12_); -#line 59 "/home/jens/Source/shotwell/src/core/Tracker.vala" - _tmp14_ = _tmp13_; -#line 59 "/home/jens/Source/shotwell/src/core/Tracker.vala" - core_tracker_on_items_added (self, G_TYPE_CHECK_INSTANCE_CAST (_tmp14_, GEE_TYPE_ITERABLE, GeeIterable)); -#line 59 "/home/jens/Source/shotwell/src/core/Tracker.vala" - _g_object_unref0 (_tmp14_); -#line 571 "Tracker.c" - } - } -#line 61 "/home/jens/Source/shotwell/src/core/Tracker.vala" - _g_object_unref0 (self->priv->initial); -#line 61 "/home/jens/Source/shotwell/src/core/Tracker.vala" - self->priv->initial = NULL; -#line 578 "Tracker.c" -} - - -DataCollection* -core_tracker_get_collection (CoreTracker* self) -{ - DataCollection* result = NULL; - DataCollection* _tmp0_; - DataCollection* _tmp1_; -#line 64 "/home/jens/Source/shotwell/src/core/Tracker.vala" - g_return_val_if_fail (CORE_IS_TRACKER (self), NULL); -#line 65 "/home/jens/Source/shotwell/src/core/Tracker.vala" - _tmp0_ = self->priv->collection; -#line 65 "/home/jens/Source/shotwell/src/core/Tracker.vala" - _tmp1_ = _data_collection_ref0 (_tmp0_); -#line 65 "/home/jens/Source/shotwell/src/core/Tracker.vala" - result = _tmp1_; -#line 65 "/home/jens/Source/shotwell/src/core/Tracker.vala" - return result; -#line 598 "Tracker.c" -} - - -static gboolean -_core_tracker_accumulator_include_core_tracker_include_uninclude_object (DataObject* object, - gpointer self) -{ - gboolean result; - result = core_tracker_accumulator_include ((CoreTrackerAccumulator*) self, object); -#line 69 "/home/jens/Source/shotwell/src/core/Tracker.vala" - return result; -#line 610 "Tracker.c" -} - - -static void -core_tracker_on_items_added (CoreTracker* self, - GeeIterable* added) -{ - CoreTrackerAccumulator* _tmp0_; -#line 68 "/home/jens/Source/shotwell/src/core/Tracker.vala" - g_return_if_fail (CORE_IS_TRACKER (self)); -#line 68 "/home/jens/Source/shotwell/src/core/Tracker.vala" - g_return_if_fail (GEE_IS_ITERABLE (added)); -#line 69 "/home/jens/Source/shotwell/src/core/Tracker.vala" - _tmp0_ = self->priv->acc; -#line 69 "/home/jens/Source/shotwell/src/core/Tracker.vala" - core_tracker_include_uninclude (self, added, _core_tracker_accumulator_include_core_tracker_include_uninclude_object, _tmp0_); -#line 627 "Tracker.c" -} - - -static gboolean -_core_tracker_accumulator_uninclude_core_tracker_include_uninclude_object (DataObject* object, - gpointer self) -{ - gboolean result; - result = core_tracker_accumulator_uninclude ((CoreTrackerAccumulator*) self, object); -#line 73 "/home/jens/Source/shotwell/src/core/Tracker.vala" - return result; -#line 639 "Tracker.c" -} - - -static void -core_tracker_on_items_removed (CoreTracker* self, - GeeIterable* removed) -{ - CoreTrackerAccumulator* _tmp0_; -#line 72 "/home/jens/Source/shotwell/src/core/Tracker.vala" - g_return_if_fail (CORE_IS_TRACKER (self)); -#line 72 "/home/jens/Source/shotwell/src/core/Tracker.vala" - g_return_if_fail (GEE_IS_ITERABLE (removed)); -#line 73 "/home/jens/Source/shotwell/src/core/Tracker.vala" - _tmp0_ = self->priv->acc; -#line 73 "/home/jens/Source/shotwell/src/core/Tracker.vala" - core_tracker_include_uninclude (self, removed, _core_tracker_accumulator_uninclude_core_tracker_include_uninclude_object, _tmp0_); -#line 656 "Tracker.c" -} - - -void -core_tracker_include_uninclude (CoreTracker* self, - GeeIterable* objects, - CoreTrackerIncludeUnincludeObject cb, - void* cb_target) -{ - gboolean fire_updated = FALSE; - gboolean _tmp7_; -#line 77 "/home/jens/Source/shotwell/src/core/Tracker.vala" - g_return_if_fail (CORE_IS_TRACKER (self)); -#line 77 "/home/jens/Source/shotwell/src/core/Tracker.vala" - g_return_if_fail (GEE_IS_ITERABLE (objects)); -#line 78 "/home/jens/Source/shotwell/src/core/Tracker.vala" - fire_updated = FALSE; -#line 674 "Tracker.c" - { - GeeIterator* _object_it = NULL; - GeeIterator* _tmp0_; -#line 79 "/home/jens/Source/shotwell/src/core/Tracker.vala" - _tmp0_ = gee_iterable_iterator (objects); -#line 79 "/home/jens/Source/shotwell/src/core/Tracker.vala" - _object_it = _tmp0_; -#line 79 "/home/jens/Source/shotwell/src/core/Tracker.vala" - while (TRUE) { -#line 684 "Tracker.c" - GeeIterator* _tmp1_; - DataObject* object = NULL; - GeeIterator* _tmp2_; - gpointer _tmp3_; - gboolean _tmp4_ = FALSE; - DataObject* _tmp5_; -#line 79 "/home/jens/Source/shotwell/src/core/Tracker.vala" - _tmp1_ = _object_it; -#line 79 "/home/jens/Source/shotwell/src/core/Tracker.vala" - if (!gee_iterator_next (_tmp1_)) { -#line 79 "/home/jens/Source/shotwell/src/core/Tracker.vala" - break; -#line 697 "Tracker.c" - } -#line 79 "/home/jens/Source/shotwell/src/core/Tracker.vala" - _tmp2_ = _object_it; -#line 79 "/home/jens/Source/shotwell/src/core/Tracker.vala" - _tmp3_ = gee_iterator_get (_tmp2_); -#line 79 "/home/jens/Source/shotwell/src/core/Tracker.vala" - object = (DataObject*) _tmp3_; -#line 80 "/home/jens/Source/shotwell/src/core/Tracker.vala" - _tmp5_ = object; -#line 80 "/home/jens/Source/shotwell/src/core/Tracker.vala" - if (cb (_tmp5_, cb_target)) { -#line 80 "/home/jens/Source/shotwell/src/core/Tracker.vala" - _tmp4_ = TRUE; -#line 711 "Tracker.c" - } else { - gboolean _tmp6_; -#line 80 "/home/jens/Source/shotwell/src/core/Tracker.vala" - _tmp6_ = fire_updated; -#line 80 "/home/jens/Source/shotwell/src/core/Tracker.vala" - _tmp4_ = _tmp6_; -#line 718 "Tracker.c" - } -#line 80 "/home/jens/Source/shotwell/src/core/Tracker.vala" - fire_updated = _tmp4_; -#line 79 "/home/jens/Source/shotwell/src/core/Tracker.vala" - _g_object_unref0 (object); -#line 724 "Tracker.c" - } -#line 79 "/home/jens/Source/shotwell/src/core/Tracker.vala" - _g_object_unref0 (_object_it); -#line 728 "Tracker.c" - } -#line 82 "/home/jens/Source/shotwell/src/core/Tracker.vala" - _tmp7_ = fire_updated; -#line 82 "/home/jens/Source/shotwell/src/core/Tracker.vala" - if (_tmp7_) { -#line 83 "/home/jens/Source/shotwell/src/core/Tracker.vala" - g_signal_emit (self, core_tracker_signals[CORE_TRACKER_UPDATED_SIGNAL], 0); -#line 736 "Tracker.c" - } -} - - -static void -core_tracker_on_items_altered (CoreTracker* self, - GeeMap* map) -{ - gboolean fire_updated = FALSE; - gboolean _tmp16_; -#line 86 "/home/jens/Source/shotwell/src/core/Tracker.vala" - g_return_if_fail (CORE_IS_TRACKER (self)); -#line 86 "/home/jens/Source/shotwell/src/core/Tracker.vala" - g_return_if_fail (GEE_IS_MAP (map)); -#line 87 "/home/jens/Source/shotwell/src/core/Tracker.vala" - fire_updated = FALSE; -#line 753 "Tracker.c" - { - GeeIterator* _object_it = NULL; - GeeSet* _tmp0_; - GeeSet* _tmp1_; - GeeSet* _tmp2_; - GeeIterator* _tmp3_; - GeeIterator* _tmp4_; -#line 88 "/home/jens/Source/shotwell/src/core/Tracker.vala" - _tmp0_ = gee_map_get_keys (map); -#line 88 "/home/jens/Source/shotwell/src/core/Tracker.vala" - _tmp1_ = _tmp0_; -#line 88 "/home/jens/Source/shotwell/src/core/Tracker.vala" - _tmp2_ = _tmp1_; -#line 88 "/home/jens/Source/shotwell/src/core/Tracker.vala" - _tmp3_ = gee_iterable_iterator (G_TYPE_CHECK_INSTANCE_CAST (_tmp2_, GEE_TYPE_ITERABLE, GeeIterable)); -#line 88 "/home/jens/Source/shotwell/src/core/Tracker.vala" - _tmp4_ = _tmp3_; -#line 88 "/home/jens/Source/shotwell/src/core/Tracker.vala" - _g_object_unref0 (_tmp2_); -#line 88 "/home/jens/Source/shotwell/src/core/Tracker.vala" - _object_it = _tmp4_; -#line 88 "/home/jens/Source/shotwell/src/core/Tracker.vala" - while (TRUE) { -#line 777 "Tracker.c" - GeeIterator* _tmp5_; - DataObject* object = NULL; - GeeIterator* _tmp6_; - gpointer _tmp7_; - gboolean _tmp8_ = FALSE; - CoreTrackerAccumulator* _tmp9_; - DataObject* _tmp10_; - DataObject* _tmp11_; - gpointer _tmp12_; - Alteration* _tmp13_; - gboolean _tmp14_; -#line 88 "/home/jens/Source/shotwell/src/core/Tracker.vala" - _tmp5_ = _object_it; -#line 88 "/home/jens/Source/shotwell/src/core/Tracker.vala" - if (!gee_iterator_next (_tmp5_)) { -#line 88 "/home/jens/Source/shotwell/src/core/Tracker.vala" - break; -#line 795 "Tracker.c" - } -#line 88 "/home/jens/Source/shotwell/src/core/Tracker.vala" - _tmp6_ = _object_it; -#line 88 "/home/jens/Source/shotwell/src/core/Tracker.vala" - _tmp7_ = gee_iterator_get (_tmp6_); -#line 88 "/home/jens/Source/shotwell/src/core/Tracker.vala" - object = (DataObject*) _tmp7_; -#line 89 "/home/jens/Source/shotwell/src/core/Tracker.vala" - _tmp9_ = self->priv->acc; -#line 89 "/home/jens/Source/shotwell/src/core/Tracker.vala" - _tmp10_ = object; -#line 89 "/home/jens/Source/shotwell/src/core/Tracker.vala" - _tmp11_ = object; -#line 89 "/home/jens/Source/shotwell/src/core/Tracker.vala" - _tmp12_ = gee_map_get (map, _tmp11_); -#line 89 "/home/jens/Source/shotwell/src/core/Tracker.vala" - _tmp13_ = (Alteration*) _tmp12_; -#line 89 "/home/jens/Source/shotwell/src/core/Tracker.vala" - _tmp14_ = core_tracker_accumulator_altered (_tmp9_, _tmp10_, _tmp13_); -#line 89 "/home/jens/Source/shotwell/src/core/Tracker.vala" - _alteration_unref0 (_tmp13_); -#line 89 "/home/jens/Source/shotwell/src/core/Tracker.vala" - if (_tmp14_) { -#line 89 "/home/jens/Source/shotwell/src/core/Tracker.vala" - _tmp8_ = TRUE; -#line 821 "Tracker.c" - } else { - gboolean _tmp15_; -#line 89 "/home/jens/Source/shotwell/src/core/Tracker.vala" - _tmp15_ = fire_updated; -#line 89 "/home/jens/Source/shotwell/src/core/Tracker.vala" - _tmp8_ = _tmp15_; -#line 828 "Tracker.c" - } -#line 89 "/home/jens/Source/shotwell/src/core/Tracker.vala" - fire_updated = _tmp8_; -#line 88 "/home/jens/Source/shotwell/src/core/Tracker.vala" - _g_object_unref0 (object); -#line 834 "Tracker.c" - } -#line 88 "/home/jens/Source/shotwell/src/core/Tracker.vala" - _g_object_unref0 (_object_it); -#line 838 "Tracker.c" - } -#line 91 "/home/jens/Source/shotwell/src/core/Tracker.vala" - _tmp16_ = fire_updated; -#line 91 "/home/jens/Source/shotwell/src/core/Tracker.vala" - if (_tmp16_) { -#line 92 "/home/jens/Source/shotwell/src/core/Tracker.vala" - g_signal_emit (self, core_tracker_signals[CORE_TRACKER_UPDATED_SIGNAL], 0); -#line 846 "Tracker.c" - } -} - - -static void -core_tracker_real_updated (CoreTracker* self) -{ -} - - -static void -core_value_tracker_init (GValue* value) -{ -#line 23 "/home/jens/Source/shotwell/src/core/Tracker.vala" - value->data[0].v_pointer = NULL; -#line 862 "Tracker.c" -} - - -static void -core_value_tracker_free_value (GValue* value) -{ -#line 23 "/home/jens/Source/shotwell/src/core/Tracker.vala" - if (value->data[0].v_pointer) { -#line 23 "/home/jens/Source/shotwell/src/core/Tracker.vala" - core_tracker_unref (value->data[0].v_pointer); -#line 873 "Tracker.c" - } -} - - -static void -core_value_tracker_copy_value (const GValue* src_value, - GValue* dest_value) -{ -#line 23 "/home/jens/Source/shotwell/src/core/Tracker.vala" - if (src_value->data[0].v_pointer) { -#line 23 "/home/jens/Source/shotwell/src/core/Tracker.vala" - dest_value->data[0].v_pointer = core_tracker_ref (src_value->data[0].v_pointer); -#line 886 "Tracker.c" - } else { -#line 23 "/home/jens/Source/shotwell/src/core/Tracker.vala" - dest_value->data[0].v_pointer = NULL; -#line 890 "Tracker.c" - } -} - - -static gpointer -core_value_tracker_peek_pointer (const GValue* value) -{ -#line 23 "/home/jens/Source/shotwell/src/core/Tracker.vala" - return value->data[0].v_pointer; -#line 900 "Tracker.c" -} - - -static gchar* -core_value_tracker_collect_value (GValue* value, - guint n_collect_values, - GTypeCValue* collect_values, - guint collect_flags) -{ -#line 23 "/home/jens/Source/shotwell/src/core/Tracker.vala" - if (collect_values[0].v_pointer) { -#line 912 "Tracker.c" - CoreTracker * object; - object = collect_values[0].v_pointer; -#line 23 "/home/jens/Source/shotwell/src/core/Tracker.vala" - if (object->parent_instance.g_class == NULL) { -#line 23 "/home/jens/Source/shotwell/src/core/Tracker.vala" - return g_strconcat ("invalid unclassed object pointer for value type `", G_VALUE_TYPE_NAME (value), "'", NULL); -#line 919 "Tracker.c" - } else if (!g_value_type_compatible (G_TYPE_FROM_INSTANCE (object), G_VALUE_TYPE (value))) { -#line 23 "/home/jens/Source/shotwell/src/core/Tracker.vala" - return g_strconcat ("invalid object type `", g_type_name (G_TYPE_FROM_INSTANCE (object)), "' for value type `", G_VALUE_TYPE_NAME (value), "'", NULL); -#line 923 "Tracker.c" - } -#line 23 "/home/jens/Source/shotwell/src/core/Tracker.vala" - value->data[0].v_pointer = core_tracker_ref (object); -#line 927 "Tracker.c" - } else { -#line 23 "/home/jens/Source/shotwell/src/core/Tracker.vala" - value->data[0].v_pointer = NULL; -#line 931 "Tracker.c" - } -#line 23 "/home/jens/Source/shotwell/src/core/Tracker.vala" - return NULL; -#line 935 "Tracker.c" -} - - -static gchar* -core_value_tracker_lcopy_value (const GValue* value, - guint n_collect_values, - GTypeCValue* collect_values, - guint collect_flags) -{ - CoreTracker ** object_p; - object_p = collect_values[0].v_pointer; -#line 23 "/home/jens/Source/shotwell/src/core/Tracker.vala" - if (!object_p) { -#line 23 "/home/jens/Source/shotwell/src/core/Tracker.vala" - return g_strdup_printf ("value location for `%s' passed as NULL", G_VALUE_TYPE_NAME (value)); -#line 951 "Tracker.c" - } -#line 23 "/home/jens/Source/shotwell/src/core/Tracker.vala" - if (!value->data[0].v_pointer) { -#line 23 "/home/jens/Source/shotwell/src/core/Tracker.vala" - *object_p = NULL; -#line 957 "Tracker.c" - } else if (collect_flags & G_VALUE_NOCOPY_CONTENTS) { -#line 23 "/home/jens/Source/shotwell/src/core/Tracker.vala" - *object_p = value->data[0].v_pointer; -#line 961 "Tracker.c" - } else { -#line 23 "/home/jens/Source/shotwell/src/core/Tracker.vala" - *object_p = core_tracker_ref (value->data[0].v_pointer); -#line 965 "Tracker.c" - } -#line 23 "/home/jens/Source/shotwell/src/core/Tracker.vala" - return NULL; -#line 969 "Tracker.c" -} - - -GParamSpec* -core_param_spec_tracker (const gchar* name, - const gchar* nick, - const gchar* blurb, - GType object_type, - GParamFlags flags) -{ - CoreParamSpecTracker* spec; -#line 23 "/home/jens/Source/shotwell/src/core/Tracker.vala" - g_return_val_if_fail (g_type_is_a (object_type, CORE_TYPE_TRACKER), NULL); -#line 23 "/home/jens/Source/shotwell/src/core/Tracker.vala" - spec = g_param_spec_internal (G_TYPE_PARAM_OBJECT, name, nick, blurb, flags); -#line 23 "/home/jens/Source/shotwell/src/core/Tracker.vala" - G_PARAM_SPEC (spec)->value_type = object_type; -#line 23 "/home/jens/Source/shotwell/src/core/Tracker.vala" - return G_PARAM_SPEC (spec); -#line 989 "Tracker.c" -} - - -gpointer -core_value_get_tracker (const GValue* value) -{ -#line 23 "/home/jens/Source/shotwell/src/core/Tracker.vala" - g_return_val_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, CORE_TYPE_TRACKER), NULL); -#line 23 "/home/jens/Source/shotwell/src/core/Tracker.vala" - return value->data[0].v_pointer; -#line 1000 "Tracker.c" -} - - -void -core_value_set_tracker (GValue* value, - gpointer v_object) -{ - CoreTracker * old; -#line 23 "/home/jens/Source/shotwell/src/core/Tracker.vala" - g_return_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, CORE_TYPE_TRACKER)); -#line 23 "/home/jens/Source/shotwell/src/core/Tracker.vala" - old = value->data[0].v_pointer; -#line 23 "/home/jens/Source/shotwell/src/core/Tracker.vala" - if (v_object) { -#line 23 "/home/jens/Source/shotwell/src/core/Tracker.vala" - g_return_if_fail (G_TYPE_CHECK_INSTANCE_TYPE (v_object, CORE_TYPE_TRACKER)); -#line 23 "/home/jens/Source/shotwell/src/core/Tracker.vala" - g_return_if_fail (g_value_type_compatible (G_TYPE_FROM_INSTANCE (v_object), G_VALUE_TYPE (value))); -#line 23 "/home/jens/Source/shotwell/src/core/Tracker.vala" - value->data[0].v_pointer = v_object; -#line 23 "/home/jens/Source/shotwell/src/core/Tracker.vala" - core_tracker_ref (value->data[0].v_pointer); -#line 1023 "Tracker.c" - } else { -#line 23 "/home/jens/Source/shotwell/src/core/Tracker.vala" - value->data[0].v_pointer = NULL; -#line 1027 "Tracker.c" - } -#line 23 "/home/jens/Source/shotwell/src/core/Tracker.vala" - if (old) { -#line 23 "/home/jens/Source/shotwell/src/core/Tracker.vala" - core_tracker_unref (old); -#line 1033 "Tracker.c" - } -} - - -void -core_value_take_tracker (GValue* value, - gpointer v_object) -{ - CoreTracker * old; -#line 23 "/home/jens/Source/shotwell/src/core/Tracker.vala" - g_return_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, CORE_TYPE_TRACKER)); -#line 23 "/home/jens/Source/shotwell/src/core/Tracker.vala" - old = value->data[0].v_pointer; -#line 23 "/home/jens/Source/shotwell/src/core/Tracker.vala" - if (v_object) { -#line 23 "/home/jens/Source/shotwell/src/core/Tracker.vala" - g_return_if_fail (G_TYPE_CHECK_INSTANCE_TYPE (v_object, CORE_TYPE_TRACKER)); -#line 23 "/home/jens/Source/shotwell/src/core/Tracker.vala" - g_return_if_fail (g_value_type_compatible (G_TYPE_FROM_INSTANCE (v_object), G_VALUE_TYPE (value))); -#line 23 "/home/jens/Source/shotwell/src/core/Tracker.vala" - value->data[0].v_pointer = v_object; -#line 1055 "Tracker.c" - } else { -#line 23 "/home/jens/Source/shotwell/src/core/Tracker.vala" - value->data[0].v_pointer = NULL; -#line 1059 "Tracker.c" - } -#line 23 "/home/jens/Source/shotwell/src/core/Tracker.vala" - if (old) { -#line 23 "/home/jens/Source/shotwell/src/core/Tracker.vala" - core_tracker_unref (old); -#line 1065 "Tracker.c" - } -} - - -static void -core_tracker_class_init (CoreTrackerClass * klass) -{ -#line 23 "/home/jens/Source/shotwell/src/core/Tracker.vala" - core_tracker_parent_class = g_type_class_peek_parent (klass); -#line 23 "/home/jens/Source/shotwell/src/core/Tracker.vala" - ((CoreTrackerClass *) klass)->finalize = core_tracker_finalize; -#line 23 "/home/jens/Source/shotwell/src/core/Tracker.vala" - g_type_class_add_private (klass, sizeof (CoreTrackerPrivate)); -#line 23 "/home/jens/Source/shotwell/src/core/Tracker.vala" - ((CoreTrackerClass *) klass)->updated = core_tracker_real_updated; -#line 23 "/home/jens/Source/shotwell/src/core/Tracker.vala" - core_tracker_signals[CORE_TRACKER_UPDATED_SIGNAL] = g_signal_new ("updated", CORE_TYPE_TRACKER, G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET (CoreTrackerClass, updated), NULL, NULL, g_cclosure_marshal_VOID__VOID, G_TYPE_NONE, 0); -#line 1083 "Tracker.c" -} - - -static void -core_tracker_instance_init (CoreTracker * self) -{ -#line 23 "/home/jens/Source/shotwell/src/core/Tracker.vala" - self->priv = CORE_TRACKER_GET_PRIVATE (self); -#line 28 "/home/jens/Source/shotwell/src/core/Tracker.vala" - self->priv->acc = NULL; -#line 23 "/home/jens/Source/shotwell/src/core/Tracker.vala" - self->ref_count = 1; -#line 1096 "Tracker.c" -} - - -static void -core_tracker_finalize (CoreTracker * obj) -{ - CoreTracker * self; - CoreTrackerAccumulator* _tmp0_; -#line 23 "/home/jens/Source/shotwell/src/core/Tracker.vala" - self = G_TYPE_CHECK_INSTANCE_CAST (obj, CORE_TYPE_TRACKER, CoreTracker); -#line 23 "/home/jens/Source/shotwell/src/core/Tracker.vala" - g_signal_handlers_destroy (self); -#line 39 "/home/jens/Source/shotwell/src/core/Tracker.vala" - _tmp0_ = self->priv->acc; -#line 39 "/home/jens/Source/shotwell/src/core/Tracker.vala" - if (_tmp0_ != NULL) { -#line 1113 "Tracker.c" - DataCollection* _tmp1_; - guint _tmp2_; - DataCollection* _tmp3_; - guint _tmp4_; - DataCollection* _tmp5_; - guint _tmp6_; -#line 40 "/home/jens/Source/shotwell/src/core/Tracker.vala" - _tmp1_ = self->priv->collection; -#line 40 "/home/jens/Source/shotwell/src/core/Tracker.vala" - g_signal_parse_name ("items-added", TYPE_DATA_COLLECTION, &_tmp2_, NULL, FALSE); -#line 40 "/home/jens/Source/shotwell/src/core/Tracker.vala" - g_signal_handlers_disconnect_matched (_tmp1_, G_SIGNAL_MATCH_ID | G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA, _tmp2_, 0, NULL, (GCallback) _core_tracker_on_items_added_data_collection_items_added, self); -#line 41 "/home/jens/Source/shotwell/src/core/Tracker.vala" - _tmp3_ = self->priv->collection; -#line 41 "/home/jens/Source/shotwell/src/core/Tracker.vala" - g_signal_parse_name ("items-removed", TYPE_DATA_COLLECTION, &_tmp4_, NULL, FALSE); -#line 41 "/home/jens/Source/shotwell/src/core/Tracker.vala" - g_signal_handlers_disconnect_matched (_tmp3_, G_SIGNAL_MATCH_ID | G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA, _tmp4_, 0, NULL, (GCallback) _core_tracker_on_items_removed_data_collection_items_removed, self); -#line 42 "/home/jens/Source/shotwell/src/core/Tracker.vala" - _tmp5_ = self->priv->collection; -#line 42 "/home/jens/Source/shotwell/src/core/Tracker.vala" - g_signal_parse_name ("items-altered", TYPE_DATA_COLLECTION, &_tmp6_, NULL, FALSE); -#line 42 "/home/jens/Source/shotwell/src/core/Tracker.vala" - g_signal_handlers_disconnect_matched (_tmp5_, G_SIGNAL_MATCH_ID | G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA, _tmp6_, 0, NULL, (GCallback) _core_tracker_on_items_altered_data_collection_items_altered, self); -#line 1138 "Tracker.c" - } -#line 26 "/home/jens/Source/shotwell/src/core/Tracker.vala" - _data_collection_unref0 (self->priv->collection); -#line 27 "/home/jens/Source/shotwell/src/core/Tracker.vala" - _g_object_unref0 (self->priv->initial); -#line 28 "/home/jens/Source/shotwell/src/core/Tracker.vala" - _g_object_unref0 (self->priv->acc); -#line 1146 "Tracker.c" -} - - -GType -core_tracker_get_type (void) -{ - static volatile gsize core_tracker_type_id__volatile = 0; - if (g_once_init_enter (&core_tracker_type_id__volatile)) { - static const GTypeValueTable g_define_type_value_table = { core_value_tracker_init, core_value_tracker_free_value, core_value_tracker_copy_value, core_value_tracker_peek_pointer, "p", core_value_tracker_collect_value, "p", core_value_tracker_lcopy_value }; - static const GTypeInfo g_define_type_info = { sizeof (CoreTrackerClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) core_tracker_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (CoreTracker), 0, (GInstanceInitFunc) core_tracker_instance_init, &g_define_type_value_table }; - static const GTypeFundamentalInfo g_define_type_fundamental_info = { (G_TYPE_FLAG_CLASSED | G_TYPE_FLAG_INSTANTIATABLE | G_TYPE_FLAG_DERIVABLE | G_TYPE_FLAG_DEEP_DERIVABLE) }; - GType core_tracker_type_id; - core_tracker_type_id = g_type_register_fundamental (g_type_fundamental_next (), "CoreTracker", &g_define_type_info, &g_define_type_fundamental_info, 0); - g_once_init_leave (&core_tracker_type_id__volatile, core_tracker_type_id); - } - return core_tracker_type_id__volatile; -} - - -gpointer -core_tracker_ref (gpointer instance) -{ - CoreTracker * self; - self = instance; -#line 23 "/home/jens/Source/shotwell/src/core/Tracker.vala" - g_atomic_int_inc (&self->ref_count); -#line 23 "/home/jens/Source/shotwell/src/core/Tracker.vala" - return instance; -#line 1175 "Tracker.c" -} - - -void -core_tracker_unref (gpointer instance) -{ - CoreTracker * self; - self = instance; -#line 23 "/home/jens/Source/shotwell/src/core/Tracker.vala" - if (g_atomic_int_dec_and_test (&self->ref_count)) { -#line 23 "/home/jens/Source/shotwell/src/core/Tracker.vala" - CORE_TRACKER_GET_CLASS (self)->finalize (self); -#line 23 "/home/jens/Source/shotwell/src/core/Tracker.vala" - g_type_free_instance ((GTypeInstance *) self); -#line 1190 "Tracker.c" - } -} - - -static void -_core_view_tracker_on_items_shown_view_collection_items_shown (ViewCollection* _sender, - GeeCollection* visible, - gpointer self) -{ -#line 173 "/home/jens/Source/shotwell/src/core/Tracker.vala" - core_view_tracker_on_items_shown ((CoreViewTracker*) self, visible); -#line 1202 "Tracker.c" -} - - -static void -_core_view_tracker_on_items_hidden_view_collection_items_hidden (ViewCollection* _sender, - GeeCollection* hidden, - gpointer self) -{ -#line 174 "/home/jens/Source/shotwell/src/core/Tracker.vala" - core_view_tracker_on_items_hidden ((CoreViewTracker*) self, hidden); -#line 1213 "Tracker.c" -} - - -static void -_core_view_tracker_on_items_selected_view_collection_items_selected (ViewCollection* _sender, - GeeIterable* selected, - gpointer self) -{ -#line 175 "/home/jens/Source/shotwell/src/core/Tracker.vala" - core_view_tracker_on_items_selected ((CoreViewTracker*) self, selected); -#line 1224 "Tracker.c" -} - - -static void -_core_view_tracker_on_items_unselected_view_collection_items_unselected (ViewCollection* _sender, - GeeIterable* unselected, - gpointer self) -{ -#line 176 "/home/jens/Source/shotwell/src/core/Tracker.vala" - core_view_tracker_on_items_unselected ((CoreViewTracker*) self, unselected); -#line 1235 "Tracker.c" -} - - -CoreViewTracker* -core_view_tracker_construct (GType object_type, - ViewCollection* collection) -{ - CoreViewTracker* self = NULL; - GeeCollection* _tmp0_; - GeeCollection* _tmp1_; -#line 165 "/home/jens/Source/shotwell/src/core/Tracker.vala" - g_return_val_if_fail (IS_VIEW_COLLECTION (collection), NULL); -#line 166 "/home/jens/Source/shotwell/src/core/Tracker.vala" - _tmp0_ = view_collection_get_all_unfiltered (collection); -#line 166 "/home/jens/Source/shotwell/src/core/Tracker.vala" - _tmp1_ = _tmp0_; -#line 166 "/home/jens/Source/shotwell/src/core/Tracker.vala" - self = (CoreViewTracker*) core_tracker_construct (object_type, G_TYPE_CHECK_INSTANCE_CAST (collection, TYPE_DATA_COLLECTION, DataCollection), _tmp1_); -#line 166 "/home/jens/Source/shotwell/src/core/Tracker.vala" - _g_object_unref0 (_tmp1_); -#line 165 "/home/jens/Source/shotwell/src/core/Tracker.vala" - return self; -#line 1258 "Tracker.c" -} - - -CoreViewTracker* -core_view_tracker_new (ViewCollection* collection) -{ -#line 165 "/home/jens/Source/shotwell/src/core/Tracker.vala" - return core_view_tracker_construct (CORE_TYPE_VIEW_TRACKER, collection); -#line 1267 "Tracker.c" -} - - -void -core_view_tracker_start (CoreViewTracker* self, - CoreTrackerAccumulator* all, - CoreTrackerAccumulator* visible, - CoreTrackerAccumulator* selected) -{ - CoreViewTrackerMux* _tmp0_; - CoreViewTrackerMux* _tmp1_; - ViewCollection* collection = NULL; - DataCollection* _tmp2_; - ViewCollection* _tmp3_; - CoreViewTrackerMux* _tmp4_; -#line 180 "/home/jens/Source/shotwell/src/core/Tracker.vala" - g_return_if_fail (CORE_IS_VIEW_TRACKER (self)); -#line 180 "/home/jens/Source/shotwell/src/core/Tracker.vala" - g_return_if_fail ((all == NULL) || CORE_IS_TRACKER_ACCUMULATOR (all)); -#line 180 "/home/jens/Source/shotwell/src/core/Tracker.vala" - g_return_if_fail ((visible == NULL) || CORE_IS_TRACKER_ACCUMULATOR (visible)); -#line 180 "/home/jens/Source/shotwell/src/core/Tracker.vala" - g_return_if_fail ((selected == NULL) || CORE_IS_TRACKER_ACCUMULATOR (selected)); -#line 181 "/home/jens/Source/shotwell/src/core/Tracker.vala" - _tmp0_ = self->priv->mux; -#line 181 "/home/jens/Source/shotwell/src/core/Tracker.vala" - _vala_assert (_tmp0_ == NULL, "mux == null"); -#line 183 "/home/jens/Source/shotwell/src/core/Tracker.vala" - _tmp1_ = core_view_tracker_mux_new (all, visible, selected); -#line 183 "/home/jens/Source/shotwell/src/core/Tracker.vala" - _g_object_unref0 (self->priv->mux); -#line 183 "/home/jens/Source/shotwell/src/core/Tracker.vala" - self->priv->mux = _tmp1_; -#line 185 "/home/jens/Source/shotwell/src/core/Tracker.vala" - _tmp2_ = core_tracker_get_collection (G_TYPE_CHECK_INSTANCE_CAST (self, CORE_TYPE_TRACKER, CoreTracker)); -#line 185 "/home/jens/Source/shotwell/src/core/Tracker.vala" - _tmp3_ = G_TYPE_CHECK_INSTANCE_TYPE (_tmp2_, TYPE_VIEW_COLLECTION) ? ((ViewCollection*) _tmp2_) : NULL; -#line 185 "/home/jens/Source/shotwell/src/core/Tracker.vala" - if (_tmp3_ == NULL) { -#line 185 "/home/jens/Source/shotwell/src/core/Tracker.vala" - _data_collection_unref0 (_tmp2_); -#line 1309 "Tracker.c" - } -#line 185 "/home/jens/Source/shotwell/src/core/Tracker.vala" - collection = _tmp3_; -#line 186 "/home/jens/Source/shotwell/src/core/Tracker.vala" - _vala_assert (collection != NULL, "collection != null"); -#line 187 "/home/jens/Source/shotwell/src/core/Tracker.vala" - g_signal_connect (collection, "items-shown", (GCallback) _core_view_tracker_on_items_shown_view_collection_items_shown, self); -#line 188 "/home/jens/Source/shotwell/src/core/Tracker.vala" - g_signal_connect (collection, "items-hidden", (GCallback) _core_view_tracker_on_items_hidden_view_collection_items_hidden, self); -#line 189 "/home/jens/Source/shotwell/src/core/Tracker.vala" - g_signal_connect (collection, "items-selected", (GCallback) _core_view_tracker_on_items_selected_view_collection_items_selected, self); -#line 190 "/home/jens/Source/shotwell/src/core/Tracker.vala" - g_signal_connect (collection, "items-unselected", (GCallback) _core_view_tracker_on_items_unselected_view_collection_items_unselected, self); -#line 192 "/home/jens/Source/shotwell/src/core/Tracker.vala" - _tmp4_ = self->priv->mux; -#line 192 "/home/jens/Source/shotwell/src/core/Tracker.vala" - core_tracker_start (G_TYPE_CHECK_INSTANCE_CAST (self, CORE_TYPE_TRACKER, CoreTracker), G_TYPE_CHECK_INSTANCE_CAST (_tmp4_, CORE_TYPE_TRACKER_ACCUMULATOR, CoreTrackerAccumulator)); -#line 180 "/home/jens/Source/shotwell/src/core/Tracker.vala" - _data_collection_unref0 (collection); -#line 1329 "Tracker.c" -} - - -static void -core_view_tracker_on_items_shown (CoreViewTracker* self, - GeeCollection* shown) -{ - CoreViewTrackerMux* _tmp0_; - CoreTrackerAccumulator* _tmp1_; -#line 195 "/home/jens/Source/shotwell/src/core/Tracker.vala" - g_return_if_fail (CORE_IS_VIEW_TRACKER (self)); -#line 195 "/home/jens/Source/shotwell/src/core/Tracker.vala" - g_return_if_fail (GEE_IS_COLLECTION (shown)); -#line 196 "/home/jens/Source/shotwell/src/core/Tracker.vala" - _tmp0_ = self->priv->mux; -#line 196 "/home/jens/Source/shotwell/src/core/Tracker.vala" - _tmp1_ = _tmp0_->visible; -#line 196 "/home/jens/Source/shotwell/src/core/Tracker.vala" - if (_tmp1_ != NULL) { -#line 1349 "Tracker.c" - CoreViewTrackerMux* _tmp2_; - CoreTrackerAccumulator* _tmp3_; -#line 197 "/home/jens/Source/shotwell/src/core/Tracker.vala" - _tmp2_ = self->priv->mux; -#line 197 "/home/jens/Source/shotwell/src/core/Tracker.vala" - _tmp3_ = _tmp2_->visible; -#line 197 "/home/jens/Source/shotwell/src/core/Tracker.vala" - core_tracker_include_uninclude (G_TYPE_CHECK_INSTANCE_CAST (self, CORE_TYPE_TRACKER, CoreTracker), G_TYPE_CHECK_INSTANCE_CAST (shown, GEE_TYPE_ITERABLE, GeeIterable), _core_tracker_accumulator_include_core_tracker_include_uninclude_object, _tmp3_); -#line 1358 "Tracker.c" - } -} - - -static void -core_view_tracker_on_items_hidden (CoreViewTracker* self, - GeeCollection* hidden) -{ - CoreViewTrackerMux* _tmp0_; - CoreTrackerAccumulator* _tmp1_; -#line 200 "/home/jens/Source/shotwell/src/core/Tracker.vala" - g_return_if_fail (CORE_IS_VIEW_TRACKER (self)); -#line 200 "/home/jens/Source/shotwell/src/core/Tracker.vala" - g_return_if_fail (GEE_IS_COLLECTION (hidden)); -#line 201 "/home/jens/Source/shotwell/src/core/Tracker.vala" - _tmp0_ = self->priv->mux; -#line 201 "/home/jens/Source/shotwell/src/core/Tracker.vala" - _tmp1_ = _tmp0_->visible; -#line 201 "/home/jens/Source/shotwell/src/core/Tracker.vala" - if (_tmp1_ != NULL) { -#line 1379 "Tracker.c" - CoreViewTrackerMux* _tmp2_; - CoreTrackerAccumulator* _tmp3_; -#line 202 "/home/jens/Source/shotwell/src/core/Tracker.vala" - _tmp2_ = self->priv->mux; -#line 202 "/home/jens/Source/shotwell/src/core/Tracker.vala" - _tmp3_ = _tmp2_->visible; -#line 202 "/home/jens/Source/shotwell/src/core/Tracker.vala" - core_tracker_include_uninclude (G_TYPE_CHECK_INSTANCE_CAST (self, CORE_TYPE_TRACKER, CoreTracker), G_TYPE_CHECK_INSTANCE_CAST (hidden, GEE_TYPE_ITERABLE, GeeIterable), _core_tracker_accumulator_uninclude_core_tracker_include_uninclude_object, _tmp3_); -#line 1388 "Tracker.c" - } -} - - -static void -core_view_tracker_on_items_selected (CoreViewTracker* self, - GeeIterable* selected) -{ - CoreViewTrackerMux* _tmp0_; - CoreTrackerAccumulator* _tmp1_; -#line 205 "/home/jens/Source/shotwell/src/core/Tracker.vala" - g_return_if_fail (CORE_IS_VIEW_TRACKER (self)); -#line 205 "/home/jens/Source/shotwell/src/core/Tracker.vala" - g_return_if_fail (GEE_IS_ITERABLE (selected)); -#line 206 "/home/jens/Source/shotwell/src/core/Tracker.vala" - _tmp0_ = self->priv->mux; -#line 206 "/home/jens/Source/shotwell/src/core/Tracker.vala" - _tmp1_ = _tmp0_->selected; -#line 206 "/home/jens/Source/shotwell/src/core/Tracker.vala" - if (_tmp1_ != NULL) { -#line 1409 "Tracker.c" - CoreViewTrackerMux* _tmp2_; - CoreTrackerAccumulator* _tmp3_; -#line 207 "/home/jens/Source/shotwell/src/core/Tracker.vala" - _tmp2_ = self->priv->mux; -#line 207 "/home/jens/Source/shotwell/src/core/Tracker.vala" - _tmp3_ = _tmp2_->selected; -#line 207 "/home/jens/Source/shotwell/src/core/Tracker.vala" - core_tracker_include_uninclude (G_TYPE_CHECK_INSTANCE_CAST (self, CORE_TYPE_TRACKER, CoreTracker), selected, _core_tracker_accumulator_include_core_tracker_include_uninclude_object, _tmp3_); -#line 1418 "Tracker.c" - } -} - - -static void -core_view_tracker_on_items_unselected (CoreViewTracker* self, - GeeIterable* unselected) -{ - CoreViewTrackerMux* _tmp0_; - CoreTrackerAccumulator* _tmp1_; -#line 210 "/home/jens/Source/shotwell/src/core/Tracker.vala" - g_return_if_fail (CORE_IS_VIEW_TRACKER (self)); -#line 210 "/home/jens/Source/shotwell/src/core/Tracker.vala" - g_return_if_fail (GEE_IS_ITERABLE (unselected)); -#line 211 "/home/jens/Source/shotwell/src/core/Tracker.vala" - _tmp0_ = self->priv->mux; -#line 211 "/home/jens/Source/shotwell/src/core/Tracker.vala" - _tmp1_ = _tmp0_->selected; -#line 211 "/home/jens/Source/shotwell/src/core/Tracker.vala" - if (_tmp1_ != NULL) { -#line 1439 "Tracker.c" - CoreViewTrackerMux* _tmp2_; - CoreTrackerAccumulator* _tmp3_; -#line 212 "/home/jens/Source/shotwell/src/core/Tracker.vala" - _tmp2_ = self->priv->mux; -#line 212 "/home/jens/Source/shotwell/src/core/Tracker.vala" - _tmp3_ = _tmp2_->selected; -#line 212 "/home/jens/Source/shotwell/src/core/Tracker.vala" - core_tracker_include_uninclude (G_TYPE_CHECK_INSTANCE_CAST (self, CORE_TYPE_TRACKER, CoreTracker), unselected, _core_tracker_accumulator_uninclude_core_tracker_include_uninclude_object, _tmp3_); -#line 1448 "Tracker.c" - } -} - - -static CoreViewTrackerMux* -core_view_tracker_mux_construct (GType object_type, - CoreTrackerAccumulator* all, - CoreTrackerAccumulator* visible, - CoreTrackerAccumulator* selected) -{ - CoreViewTrackerMux * self = NULL; - CoreTrackerAccumulator* _tmp0_; - CoreTrackerAccumulator* _tmp1_; - CoreTrackerAccumulator* _tmp2_; -#line 105 "/home/jens/Source/shotwell/src/core/Tracker.vala" - g_return_val_if_fail ((all == NULL) || CORE_IS_TRACKER_ACCUMULATOR (all), NULL); -#line 105 "/home/jens/Source/shotwell/src/core/Tracker.vala" - g_return_val_if_fail ((visible == NULL) || CORE_IS_TRACKER_ACCUMULATOR (visible), NULL); -#line 105 "/home/jens/Source/shotwell/src/core/Tracker.vala" - g_return_val_if_fail ((selected == NULL) || CORE_IS_TRACKER_ACCUMULATOR (selected), NULL); -#line 105 "/home/jens/Source/shotwell/src/core/Tracker.vala" - self = (CoreViewTrackerMux*) g_object_new (object_type, NULL); -#line 106 "/home/jens/Source/shotwell/src/core/Tracker.vala" - _tmp0_ = _g_object_ref0 (all); -#line 106 "/home/jens/Source/shotwell/src/core/Tracker.vala" - _g_object_unref0 (self->all); -#line 106 "/home/jens/Source/shotwell/src/core/Tracker.vala" - self->all = _tmp0_; -#line 107 "/home/jens/Source/shotwell/src/core/Tracker.vala" - _tmp1_ = _g_object_ref0 (visible); -#line 107 "/home/jens/Source/shotwell/src/core/Tracker.vala" - _g_object_unref0 (self->visible); -#line 107 "/home/jens/Source/shotwell/src/core/Tracker.vala" - self->visible = _tmp1_; -#line 108 "/home/jens/Source/shotwell/src/core/Tracker.vala" - _tmp2_ = _g_object_ref0 (selected); -#line 108 "/home/jens/Source/shotwell/src/core/Tracker.vala" - _g_object_unref0 (self->selected); -#line 108 "/home/jens/Source/shotwell/src/core/Tracker.vala" - self->selected = _tmp2_; -#line 105 "/home/jens/Source/shotwell/src/core/Tracker.vala" - return self; -#line 1491 "Tracker.c" -} - - -static CoreViewTrackerMux* -core_view_tracker_mux_new (CoreTrackerAccumulator* all, - CoreTrackerAccumulator* visible, - CoreTrackerAccumulator* selected) -{ -#line 105 "/home/jens/Source/shotwell/src/core/Tracker.vala" - return core_view_tracker_mux_construct (CORE_VIEW_TRACKER_TYPE_MUX, all, visible, selected); -#line 1502 "Tracker.c" -} - - -static gboolean -core_view_tracker_mux_real_include (CoreTrackerAccumulator* base, - DataObject* object) -{ - CoreViewTrackerMux * self; - gboolean result = FALSE; - DataView* view = NULL; - DataView* _tmp0_; - gboolean fire_updated = FALSE; - CoreTrackerAccumulator* _tmp1_; - gboolean _tmp6_ = FALSE; - CoreTrackerAccumulator* _tmp7_; - gboolean _tmp13_ = FALSE; - CoreTrackerAccumulator* _tmp14_; -#line 111 "/home/jens/Source/shotwell/src/core/Tracker.vala" - self = G_TYPE_CHECK_INSTANCE_CAST (base, CORE_VIEW_TRACKER_TYPE_MUX, CoreViewTrackerMux); -#line 111 "/home/jens/Source/shotwell/src/core/Tracker.vala" - g_return_val_if_fail (IS_DATA_OBJECT (object), FALSE); -#line 112 "/home/jens/Source/shotwell/src/core/Tracker.vala" - _tmp0_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_CAST (object, TYPE_DATA_VIEW, DataView)); -#line 112 "/home/jens/Source/shotwell/src/core/Tracker.vala" - view = _tmp0_; -#line 114 "/home/jens/Source/shotwell/src/core/Tracker.vala" - fire_updated = FALSE; -#line 116 "/home/jens/Source/shotwell/src/core/Tracker.vala" - _tmp1_ = self->all; -#line 116 "/home/jens/Source/shotwell/src/core/Tracker.vala" - if (_tmp1_ != NULL) { -#line 1534 "Tracker.c" - gboolean _tmp2_ = FALSE; - CoreTrackerAccumulator* _tmp3_; - DataView* _tmp4_; -#line 117 "/home/jens/Source/shotwell/src/core/Tracker.vala" - _tmp3_ = self->all; -#line 117 "/home/jens/Source/shotwell/src/core/Tracker.vala" - _tmp4_ = view; -#line 117 "/home/jens/Source/shotwell/src/core/Tracker.vala" - if (core_tracker_accumulator_include (_tmp3_, G_TYPE_CHECK_INSTANCE_CAST (_tmp4_, TYPE_DATA_OBJECT, DataObject))) { -#line 117 "/home/jens/Source/shotwell/src/core/Tracker.vala" - _tmp2_ = TRUE; -#line 1546 "Tracker.c" - } else { - gboolean _tmp5_; -#line 117 "/home/jens/Source/shotwell/src/core/Tracker.vala" - _tmp5_ = fire_updated; -#line 117 "/home/jens/Source/shotwell/src/core/Tracker.vala" - _tmp2_ = _tmp5_; -#line 1553 "Tracker.c" - } -#line 117 "/home/jens/Source/shotwell/src/core/Tracker.vala" - fire_updated = _tmp2_; -#line 1557 "Tracker.c" - } -#line 119 "/home/jens/Source/shotwell/src/core/Tracker.vala" - _tmp7_ = self->visible; -#line 119 "/home/jens/Source/shotwell/src/core/Tracker.vala" - if (_tmp7_ != NULL) { -#line 1563 "Tracker.c" - DataView* _tmp8_; -#line 119 "/home/jens/Source/shotwell/src/core/Tracker.vala" - _tmp8_ = view; -#line 119 "/home/jens/Source/shotwell/src/core/Tracker.vala" - _tmp6_ = data_view_is_visible (_tmp8_); -#line 1569 "Tracker.c" - } else { -#line 119 "/home/jens/Source/shotwell/src/core/Tracker.vala" - _tmp6_ = FALSE; -#line 1573 "Tracker.c" - } -#line 119 "/home/jens/Source/shotwell/src/core/Tracker.vala" - if (_tmp6_) { -#line 1577 "Tracker.c" - gboolean _tmp9_ = FALSE; - CoreTrackerAccumulator* _tmp10_; - DataView* _tmp11_; -#line 120 "/home/jens/Source/shotwell/src/core/Tracker.vala" - _tmp10_ = self->visible; -#line 120 "/home/jens/Source/shotwell/src/core/Tracker.vala" - _tmp11_ = view; -#line 120 "/home/jens/Source/shotwell/src/core/Tracker.vala" - if (core_tracker_accumulator_include (_tmp10_, G_TYPE_CHECK_INSTANCE_CAST (_tmp11_, TYPE_DATA_OBJECT, DataObject))) { -#line 120 "/home/jens/Source/shotwell/src/core/Tracker.vala" - _tmp9_ = TRUE; -#line 1589 "Tracker.c" - } else { - gboolean _tmp12_; -#line 120 "/home/jens/Source/shotwell/src/core/Tracker.vala" - _tmp12_ = fire_updated; -#line 120 "/home/jens/Source/shotwell/src/core/Tracker.vala" - _tmp9_ = _tmp12_; -#line 1596 "Tracker.c" - } -#line 120 "/home/jens/Source/shotwell/src/core/Tracker.vala" - fire_updated = _tmp9_; -#line 1600 "Tracker.c" - } -#line 122 "/home/jens/Source/shotwell/src/core/Tracker.vala" - _tmp14_ = self->selected; -#line 122 "/home/jens/Source/shotwell/src/core/Tracker.vala" - if (_tmp14_ != NULL) { -#line 1606 "Tracker.c" - DataView* _tmp15_; -#line 122 "/home/jens/Source/shotwell/src/core/Tracker.vala" - _tmp15_ = view; -#line 122 "/home/jens/Source/shotwell/src/core/Tracker.vala" - _tmp13_ = data_view_is_selected (_tmp15_); -#line 1612 "Tracker.c" - } else { -#line 122 "/home/jens/Source/shotwell/src/core/Tracker.vala" - _tmp13_ = FALSE; -#line 1616 "Tracker.c" - } -#line 122 "/home/jens/Source/shotwell/src/core/Tracker.vala" - if (_tmp13_) { -#line 1620 "Tracker.c" - gboolean _tmp16_ = FALSE; - CoreTrackerAccumulator* _tmp17_; - DataView* _tmp18_; -#line 123 "/home/jens/Source/shotwell/src/core/Tracker.vala" - _tmp17_ = self->selected; -#line 123 "/home/jens/Source/shotwell/src/core/Tracker.vala" - _tmp18_ = view; -#line 123 "/home/jens/Source/shotwell/src/core/Tracker.vala" - if (core_tracker_accumulator_include (_tmp17_, G_TYPE_CHECK_INSTANCE_CAST (_tmp18_, TYPE_DATA_OBJECT, DataObject))) { -#line 123 "/home/jens/Source/shotwell/src/core/Tracker.vala" - _tmp16_ = TRUE; -#line 1632 "Tracker.c" - } else { - gboolean _tmp19_; -#line 123 "/home/jens/Source/shotwell/src/core/Tracker.vala" - _tmp19_ = fire_updated; -#line 123 "/home/jens/Source/shotwell/src/core/Tracker.vala" - _tmp16_ = _tmp19_; -#line 1639 "Tracker.c" - } -#line 123 "/home/jens/Source/shotwell/src/core/Tracker.vala" - fire_updated = _tmp16_; -#line 1643 "Tracker.c" - } -#line 125 "/home/jens/Source/shotwell/src/core/Tracker.vala" - result = fire_updated; -#line 125 "/home/jens/Source/shotwell/src/core/Tracker.vala" - _g_object_unref0 (view); -#line 125 "/home/jens/Source/shotwell/src/core/Tracker.vala" - return result; -#line 1651 "Tracker.c" -} - - -static gboolean -core_view_tracker_mux_real_uninclude (CoreTrackerAccumulator* base, - DataObject* object) -{ - CoreViewTrackerMux * self; - gboolean result = FALSE; - DataView* view = NULL; - DataView* _tmp0_; - gboolean fire_updated = FALSE; - CoreTrackerAccumulator* _tmp1_; - gboolean _tmp6_ = FALSE; - CoreTrackerAccumulator* _tmp7_; - gboolean _tmp13_ = FALSE; - CoreTrackerAccumulator* _tmp14_; -#line 128 "/home/jens/Source/shotwell/src/core/Tracker.vala" - self = G_TYPE_CHECK_INSTANCE_CAST (base, CORE_VIEW_TRACKER_TYPE_MUX, CoreViewTrackerMux); -#line 128 "/home/jens/Source/shotwell/src/core/Tracker.vala" - g_return_val_if_fail (IS_DATA_OBJECT (object), FALSE); -#line 129 "/home/jens/Source/shotwell/src/core/Tracker.vala" - _tmp0_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_CAST (object, TYPE_DATA_VIEW, DataView)); -#line 129 "/home/jens/Source/shotwell/src/core/Tracker.vala" - view = _tmp0_; -#line 131 "/home/jens/Source/shotwell/src/core/Tracker.vala" - fire_updated = FALSE; -#line 133 "/home/jens/Source/shotwell/src/core/Tracker.vala" - _tmp1_ = self->all; -#line 133 "/home/jens/Source/shotwell/src/core/Tracker.vala" - if (_tmp1_ != NULL) { -#line 1683 "Tracker.c" - gboolean _tmp2_ = FALSE; - CoreTrackerAccumulator* _tmp3_; - DataView* _tmp4_; -#line 134 "/home/jens/Source/shotwell/src/core/Tracker.vala" - _tmp3_ = self->all; -#line 134 "/home/jens/Source/shotwell/src/core/Tracker.vala" - _tmp4_ = view; -#line 134 "/home/jens/Source/shotwell/src/core/Tracker.vala" - if (core_tracker_accumulator_uninclude (_tmp3_, G_TYPE_CHECK_INSTANCE_CAST (_tmp4_, TYPE_DATA_OBJECT, DataObject))) { -#line 134 "/home/jens/Source/shotwell/src/core/Tracker.vala" - _tmp2_ = TRUE; -#line 1695 "Tracker.c" - } else { - gboolean _tmp5_; -#line 134 "/home/jens/Source/shotwell/src/core/Tracker.vala" - _tmp5_ = fire_updated; -#line 134 "/home/jens/Source/shotwell/src/core/Tracker.vala" - _tmp2_ = _tmp5_; -#line 1702 "Tracker.c" - } -#line 134 "/home/jens/Source/shotwell/src/core/Tracker.vala" - fire_updated = _tmp2_; -#line 1706 "Tracker.c" - } -#line 136 "/home/jens/Source/shotwell/src/core/Tracker.vala" - _tmp7_ = self->visible; -#line 136 "/home/jens/Source/shotwell/src/core/Tracker.vala" - if (_tmp7_ != NULL) { -#line 1712 "Tracker.c" - DataView* _tmp8_; -#line 136 "/home/jens/Source/shotwell/src/core/Tracker.vala" - _tmp8_ = view; -#line 136 "/home/jens/Source/shotwell/src/core/Tracker.vala" - _tmp6_ = data_view_is_visible (_tmp8_); -#line 1718 "Tracker.c" - } else { -#line 136 "/home/jens/Source/shotwell/src/core/Tracker.vala" - _tmp6_ = FALSE; -#line 1722 "Tracker.c" - } -#line 136 "/home/jens/Source/shotwell/src/core/Tracker.vala" - if (_tmp6_) { -#line 1726 "Tracker.c" - gboolean _tmp9_ = FALSE; - CoreTrackerAccumulator* _tmp10_; - DataView* _tmp11_; -#line 137 "/home/jens/Source/shotwell/src/core/Tracker.vala" - _tmp10_ = self->visible; -#line 137 "/home/jens/Source/shotwell/src/core/Tracker.vala" - _tmp11_ = view; -#line 137 "/home/jens/Source/shotwell/src/core/Tracker.vala" - if (core_tracker_accumulator_uninclude (_tmp10_, G_TYPE_CHECK_INSTANCE_CAST (_tmp11_, TYPE_DATA_OBJECT, DataObject))) { -#line 137 "/home/jens/Source/shotwell/src/core/Tracker.vala" - _tmp9_ = TRUE; -#line 1738 "Tracker.c" - } else { - gboolean _tmp12_; -#line 137 "/home/jens/Source/shotwell/src/core/Tracker.vala" - _tmp12_ = fire_updated; -#line 137 "/home/jens/Source/shotwell/src/core/Tracker.vala" - _tmp9_ = _tmp12_; -#line 1745 "Tracker.c" - } -#line 137 "/home/jens/Source/shotwell/src/core/Tracker.vala" - fire_updated = _tmp9_; -#line 1749 "Tracker.c" - } -#line 139 "/home/jens/Source/shotwell/src/core/Tracker.vala" - _tmp14_ = self->selected; -#line 139 "/home/jens/Source/shotwell/src/core/Tracker.vala" - if (_tmp14_ != NULL) { -#line 1755 "Tracker.c" - DataView* _tmp15_; -#line 139 "/home/jens/Source/shotwell/src/core/Tracker.vala" - _tmp15_ = view; -#line 139 "/home/jens/Source/shotwell/src/core/Tracker.vala" - _tmp13_ = data_view_is_selected (_tmp15_); -#line 1761 "Tracker.c" - } else { -#line 139 "/home/jens/Source/shotwell/src/core/Tracker.vala" - _tmp13_ = FALSE; -#line 1765 "Tracker.c" - } -#line 139 "/home/jens/Source/shotwell/src/core/Tracker.vala" - if (_tmp13_) { -#line 1769 "Tracker.c" - gboolean _tmp16_ = FALSE; - CoreTrackerAccumulator* _tmp17_; - DataView* _tmp18_; -#line 140 "/home/jens/Source/shotwell/src/core/Tracker.vala" - _tmp17_ = self->selected; -#line 140 "/home/jens/Source/shotwell/src/core/Tracker.vala" - _tmp18_ = view; -#line 140 "/home/jens/Source/shotwell/src/core/Tracker.vala" - if (core_tracker_accumulator_uninclude (_tmp17_, G_TYPE_CHECK_INSTANCE_CAST (_tmp18_, TYPE_DATA_OBJECT, DataObject))) { -#line 140 "/home/jens/Source/shotwell/src/core/Tracker.vala" - _tmp16_ = TRUE; -#line 1781 "Tracker.c" - } else { - gboolean _tmp19_; -#line 140 "/home/jens/Source/shotwell/src/core/Tracker.vala" - _tmp19_ = fire_updated; -#line 140 "/home/jens/Source/shotwell/src/core/Tracker.vala" - _tmp16_ = _tmp19_; -#line 1788 "Tracker.c" - } -#line 140 "/home/jens/Source/shotwell/src/core/Tracker.vala" - fire_updated = _tmp16_; -#line 1792 "Tracker.c" - } -#line 142 "/home/jens/Source/shotwell/src/core/Tracker.vala" - result = fire_updated; -#line 142 "/home/jens/Source/shotwell/src/core/Tracker.vala" - _g_object_unref0 (view); -#line 142 "/home/jens/Source/shotwell/src/core/Tracker.vala" - return result; -#line 1800 "Tracker.c" -} - - -static gboolean -core_view_tracker_mux_real_altered (CoreTrackerAccumulator* base, - DataObject* object, - Alteration* alteration) -{ - CoreViewTrackerMux * self; - gboolean result = FALSE; - DataView* view = NULL; - DataView* _tmp0_; - gboolean fire_updated = FALSE; - CoreTrackerAccumulator* _tmp1_; - gboolean _tmp6_ = FALSE; - CoreTrackerAccumulator* _tmp7_; - gboolean _tmp13_ = FALSE; - CoreTrackerAccumulator* _tmp14_; -#line 145 "/home/jens/Source/shotwell/src/core/Tracker.vala" - self = G_TYPE_CHECK_INSTANCE_CAST (base, CORE_VIEW_TRACKER_TYPE_MUX, CoreViewTrackerMux); -#line 145 "/home/jens/Source/shotwell/src/core/Tracker.vala" - g_return_val_if_fail (IS_DATA_OBJECT (object), FALSE); -#line 145 "/home/jens/Source/shotwell/src/core/Tracker.vala" - g_return_val_if_fail (IS_ALTERATION (alteration), FALSE); -#line 146 "/home/jens/Source/shotwell/src/core/Tracker.vala" - _tmp0_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_CAST (object, TYPE_DATA_VIEW, DataView)); -#line 146 "/home/jens/Source/shotwell/src/core/Tracker.vala" - view = _tmp0_; -#line 148 "/home/jens/Source/shotwell/src/core/Tracker.vala" - fire_updated = FALSE; -#line 150 "/home/jens/Source/shotwell/src/core/Tracker.vala" - _tmp1_ = self->all; -#line 150 "/home/jens/Source/shotwell/src/core/Tracker.vala" - if (_tmp1_ != NULL) { -#line 1835 "Tracker.c" - gboolean _tmp2_ = FALSE; - CoreTrackerAccumulator* _tmp3_; - DataView* _tmp4_; -#line 151 "/home/jens/Source/shotwell/src/core/Tracker.vala" - _tmp3_ = self->all; -#line 151 "/home/jens/Source/shotwell/src/core/Tracker.vala" - _tmp4_ = view; -#line 151 "/home/jens/Source/shotwell/src/core/Tracker.vala" - if (core_tracker_accumulator_altered (_tmp3_, G_TYPE_CHECK_INSTANCE_CAST (_tmp4_, TYPE_DATA_OBJECT, DataObject), alteration)) { -#line 151 "/home/jens/Source/shotwell/src/core/Tracker.vala" - _tmp2_ = TRUE; -#line 1847 "Tracker.c" - } else { - gboolean _tmp5_; -#line 151 "/home/jens/Source/shotwell/src/core/Tracker.vala" - _tmp5_ = fire_updated; -#line 151 "/home/jens/Source/shotwell/src/core/Tracker.vala" - _tmp2_ = _tmp5_; -#line 1854 "Tracker.c" - } -#line 151 "/home/jens/Source/shotwell/src/core/Tracker.vala" - fire_updated = _tmp2_; -#line 1858 "Tracker.c" - } -#line 153 "/home/jens/Source/shotwell/src/core/Tracker.vala" - _tmp7_ = self->visible; -#line 153 "/home/jens/Source/shotwell/src/core/Tracker.vala" - if (_tmp7_ != NULL) { -#line 1864 "Tracker.c" - DataView* _tmp8_; -#line 153 "/home/jens/Source/shotwell/src/core/Tracker.vala" - _tmp8_ = view; -#line 153 "/home/jens/Source/shotwell/src/core/Tracker.vala" - _tmp6_ = data_view_is_visible (_tmp8_); -#line 1870 "Tracker.c" - } else { -#line 153 "/home/jens/Source/shotwell/src/core/Tracker.vala" - _tmp6_ = FALSE; -#line 1874 "Tracker.c" - } -#line 153 "/home/jens/Source/shotwell/src/core/Tracker.vala" - if (_tmp6_) { -#line 1878 "Tracker.c" - gboolean _tmp9_ = FALSE; - CoreTrackerAccumulator* _tmp10_; - DataView* _tmp11_; -#line 154 "/home/jens/Source/shotwell/src/core/Tracker.vala" - _tmp10_ = self->visible; -#line 154 "/home/jens/Source/shotwell/src/core/Tracker.vala" - _tmp11_ = view; -#line 154 "/home/jens/Source/shotwell/src/core/Tracker.vala" - if (core_tracker_accumulator_altered (_tmp10_, G_TYPE_CHECK_INSTANCE_CAST (_tmp11_, TYPE_DATA_OBJECT, DataObject), alteration)) { -#line 154 "/home/jens/Source/shotwell/src/core/Tracker.vala" - _tmp9_ = TRUE; -#line 1890 "Tracker.c" - } else { - gboolean _tmp12_; -#line 154 "/home/jens/Source/shotwell/src/core/Tracker.vala" - _tmp12_ = fire_updated; -#line 154 "/home/jens/Source/shotwell/src/core/Tracker.vala" - _tmp9_ = _tmp12_; -#line 1897 "Tracker.c" - } -#line 154 "/home/jens/Source/shotwell/src/core/Tracker.vala" - fire_updated = _tmp9_; -#line 1901 "Tracker.c" - } -#line 156 "/home/jens/Source/shotwell/src/core/Tracker.vala" - _tmp14_ = self->selected; -#line 156 "/home/jens/Source/shotwell/src/core/Tracker.vala" - if (_tmp14_ != NULL) { -#line 1907 "Tracker.c" - DataView* _tmp15_; -#line 156 "/home/jens/Source/shotwell/src/core/Tracker.vala" - _tmp15_ = view; -#line 156 "/home/jens/Source/shotwell/src/core/Tracker.vala" - _tmp13_ = data_view_is_selected (_tmp15_); -#line 1913 "Tracker.c" - } else { -#line 156 "/home/jens/Source/shotwell/src/core/Tracker.vala" - _tmp13_ = FALSE; -#line 1917 "Tracker.c" - } -#line 156 "/home/jens/Source/shotwell/src/core/Tracker.vala" - if (_tmp13_) { -#line 1921 "Tracker.c" - gboolean _tmp16_ = FALSE; - CoreTrackerAccumulator* _tmp17_; - DataView* _tmp18_; -#line 157 "/home/jens/Source/shotwell/src/core/Tracker.vala" - _tmp17_ = self->selected; -#line 157 "/home/jens/Source/shotwell/src/core/Tracker.vala" - _tmp18_ = view; -#line 157 "/home/jens/Source/shotwell/src/core/Tracker.vala" - if (core_tracker_accumulator_altered (_tmp17_, G_TYPE_CHECK_INSTANCE_CAST (_tmp18_, TYPE_DATA_OBJECT, DataObject), alteration)) { -#line 157 "/home/jens/Source/shotwell/src/core/Tracker.vala" - _tmp16_ = TRUE; -#line 1933 "Tracker.c" - } else { - gboolean _tmp19_; -#line 157 "/home/jens/Source/shotwell/src/core/Tracker.vala" - _tmp19_ = fire_updated; -#line 157 "/home/jens/Source/shotwell/src/core/Tracker.vala" - _tmp16_ = _tmp19_; -#line 1940 "Tracker.c" - } -#line 157 "/home/jens/Source/shotwell/src/core/Tracker.vala" - fire_updated = _tmp16_; -#line 1944 "Tracker.c" - } -#line 159 "/home/jens/Source/shotwell/src/core/Tracker.vala" - result = fire_updated; -#line 159 "/home/jens/Source/shotwell/src/core/Tracker.vala" - _g_object_unref0 (view); -#line 159 "/home/jens/Source/shotwell/src/core/Tracker.vala" - return result; -#line 1952 "Tracker.c" -} - - -static void -core_view_tracker_mux_class_init (CoreViewTrackerMuxClass * klass) -{ -#line 100 "/home/jens/Source/shotwell/src/core/Tracker.vala" - core_view_tracker_mux_parent_class = g_type_class_peek_parent (klass); -#line 100 "/home/jens/Source/shotwell/src/core/Tracker.vala" - G_OBJECT_CLASS (klass)->finalize = core_view_tracker_mux_finalize; -#line 1963 "Tracker.c" -} - - -static void -core_view_tracker_mux_core_tracker_accumulator_interface_init (CoreTrackerAccumulatorIface * iface) -{ -#line 100 "/home/jens/Source/shotwell/src/core/Tracker.vala" - core_view_tracker_mux_core_tracker_accumulator_parent_iface = g_type_interface_peek_parent (iface); -#line 100 "/home/jens/Source/shotwell/src/core/Tracker.vala" - iface->include = (gboolean (*) (CoreTrackerAccumulator *, DataObject*)) core_view_tracker_mux_real_include; -#line 100 "/home/jens/Source/shotwell/src/core/Tracker.vala" - iface->uninclude = (gboolean (*) (CoreTrackerAccumulator *, DataObject*)) core_view_tracker_mux_real_uninclude; -#line 100 "/home/jens/Source/shotwell/src/core/Tracker.vala" - iface->altered = (gboolean (*) (CoreTrackerAccumulator *, DataObject*, Alteration*)) core_view_tracker_mux_real_altered; -#line 1978 "Tracker.c" -} - - -static void -core_view_tracker_mux_instance_init (CoreViewTrackerMux * self) -{ -} - - -static void -core_view_tracker_mux_finalize (GObject * obj) -{ - CoreViewTrackerMux * self; -#line 100 "/home/jens/Source/shotwell/src/core/Tracker.vala" - self = G_TYPE_CHECK_INSTANCE_CAST (obj, CORE_VIEW_TRACKER_TYPE_MUX, CoreViewTrackerMux); -#line 101 "/home/jens/Source/shotwell/src/core/Tracker.vala" - _g_object_unref0 (self->all); -#line 102 "/home/jens/Source/shotwell/src/core/Tracker.vala" - _g_object_unref0 (self->visible); -#line 103 "/home/jens/Source/shotwell/src/core/Tracker.vala" - _g_object_unref0 (self->selected); -#line 100 "/home/jens/Source/shotwell/src/core/Tracker.vala" - G_OBJECT_CLASS (core_view_tracker_mux_parent_class)->finalize (obj); -#line 2002 "Tracker.c" -} - - -static GType -core_view_tracker_mux_get_type (void) -{ - static volatile gsize core_view_tracker_mux_type_id__volatile = 0; - if (g_once_init_enter (&core_view_tracker_mux_type_id__volatile)) { - static const GTypeInfo g_define_type_info = { sizeof (CoreViewTrackerMuxClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) core_view_tracker_mux_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (CoreViewTrackerMux), 0, (GInstanceInitFunc) core_view_tracker_mux_instance_init, NULL }; - static const GInterfaceInfo core_tracker_accumulator_info = { (GInterfaceInitFunc) core_view_tracker_mux_core_tracker_accumulator_interface_init, (GInterfaceFinalizeFunc) NULL, NULL}; - GType core_view_tracker_mux_type_id; - core_view_tracker_mux_type_id = g_type_register_static (G_TYPE_OBJECT, "CoreViewTrackerMux", &g_define_type_info, 0); - g_type_add_interface_static (core_view_tracker_mux_type_id, CORE_TYPE_TRACKER_ACCUMULATOR, &core_tracker_accumulator_info); - g_once_init_leave (&core_view_tracker_mux_type_id__volatile, core_view_tracker_mux_type_id); - } - return core_view_tracker_mux_type_id__volatile; -} - - -static void -core_view_tracker_class_init (CoreViewTrackerClass * klass) -{ -#line 99 "/home/jens/Source/shotwell/src/core/Tracker.vala" - core_view_tracker_parent_class = g_type_class_peek_parent (klass); -#line 99 "/home/jens/Source/shotwell/src/core/Tracker.vala" - ((CoreTrackerClass *) klass)->finalize = core_view_tracker_finalize; -#line 99 "/home/jens/Source/shotwell/src/core/Tracker.vala" - g_type_class_add_private (klass, sizeof (CoreViewTrackerPrivate)); -#line 2031 "Tracker.c" -} - - -static void -core_view_tracker_instance_init (CoreViewTracker * self) -{ -#line 99 "/home/jens/Source/shotwell/src/core/Tracker.vala" - self->priv = CORE_VIEW_TRACKER_GET_PRIVATE (self); -#line 163 "/home/jens/Source/shotwell/src/core/Tracker.vala" - self->priv->mux = NULL; -#line 2042 "Tracker.c" -} - - -static void -core_view_tracker_finalize (CoreTracker * obj) -{ - CoreViewTracker * self; - CoreViewTrackerMux* _tmp0_; -#line 99 "/home/jens/Source/shotwell/src/core/Tracker.vala" - self = G_TYPE_CHECK_INSTANCE_CAST (obj, CORE_TYPE_VIEW_TRACKER, CoreViewTracker); -#line 170 "/home/jens/Source/shotwell/src/core/Tracker.vala" - _tmp0_ = self->priv->mux; -#line 170 "/home/jens/Source/shotwell/src/core/Tracker.vala" - if (_tmp0_ != NULL) { -#line 2057 "Tracker.c" - ViewCollection* collection = NULL; - DataCollection* _tmp1_; - ViewCollection* _tmp2_; - ViewCollection* _tmp3_; - ViewCollection* _tmp4_; - guint _tmp5_; - ViewCollection* _tmp6_; - guint _tmp7_; - ViewCollection* _tmp8_; - guint _tmp9_; - ViewCollection* _tmp10_; - guint _tmp11_; -#line 171 "/home/jens/Source/shotwell/src/core/Tracker.vala" - _tmp1_ = core_tracker_get_collection (G_TYPE_CHECK_INSTANCE_CAST (self, CORE_TYPE_TRACKER, CoreTracker)); -#line 171 "/home/jens/Source/shotwell/src/core/Tracker.vala" - _tmp2_ = G_TYPE_CHECK_INSTANCE_TYPE (_tmp1_, TYPE_VIEW_COLLECTION) ? ((ViewCollection*) _tmp1_) : NULL; -#line 171 "/home/jens/Source/shotwell/src/core/Tracker.vala" - if (_tmp2_ == NULL) { -#line 171 "/home/jens/Source/shotwell/src/core/Tracker.vala" - _data_collection_unref0 (_tmp1_); -#line 2078 "Tracker.c" - } -#line 171 "/home/jens/Source/shotwell/src/core/Tracker.vala" - collection = _tmp2_; -#line 172 "/home/jens/Source/shotwell/src/core/Tracker.vala" - _tmp3_ = collection; -#line 172 "/home/jens/Source/shotwell/src/core/Tracker.vala" - _vala_assert (_tmp3_ != NULL, "collection != null"); -#line 173 "/home/jens/Source/shotwell/src/core/Tracker.vala" - _tmp4_ = collection; -#line 173 "/home/jens/Source/shotwell/src/core/Tracker.vala" - g_signal_parse_name ("items-shown", TYPE_VIEW_COLLECTION, &_tmp5_, NULL, FALSE); -#line 173 "/home/jens/Source/shotwell/src/core/Tracker.vala" - g_signal_handlers_disconnect_matched (_tmp4_, G_SIGNAL_MATCH_ID | G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA, _tmp5_, 0, NULL, (GCallback) _core_view_tracker_on_items_shown_view_collection_items_shown, self); -#line 174 "/home/jens/Source/shotwell/src/core/Tracker.vala" - _tmp6_ = collection; -#line 174 "/home/jens/Source/shotwell/src/core/Tracker.vala" - g_signal_parse_name ("items-hidden", TYPE_VIEW_COLLECTION, &_tmp7_, NULL, FALSE); -#line 174 "/home/jens/Source/shotwell/src/core/Tracker.vala" - g_signal_handlers_disconnect_matched (_tmp6_, G_SIGNAL_MATCH_ID | G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA, _tmp7_, 0, NULL, (GCallback) _core_view_tracker_on_items_hidden_view_collection_items_hidden, self); -#line 175 "/home/jens/Source/shotwell/src/core/Tracker.vala" - _tmp8_ = collection; -#line 175 "/home/jens/Source/shotwell/src/core/Tracker.vala" - g_signal_parse_name ("items-selected", TYPE_VIEW_COLLECTION, &_tmp9_, NULL, FALSE); -#line 175 "/home/jens/Source/shotwell/src/core/Tracker.vala" - g_signal_handlers_disconnect_matched (_tmp8_, G_SIGNAL_MATCH_ID | G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA, _tmp9_, 0, NULL, (GCallback) _core_view_tracker_on_items_selected_view_collection_items_selected, self); -#line 176 "/home/jens/Source/shotwell/src/core/Tracker.vala" - _tmp10_ = collection; -#line 176 "/home/jens/Source/shotwell/src/core/Tracker.vala" - g_signal_parse_name ("items-unselected", TYPE_VIEW_COLLECTION, &_tmp11_, NULL, FALSE); -#line 176 "/home/jens/Source/shotwell/src/core/Tracker.vala" - g_signal_handlers_disconnect_matched (_tmp10_, G_SIGNAL_MATCH_ID | G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA, _tmp11_, 0, NULL, (GCallback) _core_view_tracker_on_items_unselected_view_collection_items_unselected, self); -#line 170 "/home/jens/Source/shotwell/src/core/Tracker.vala" - _data_collection_unref0 (collection); -#line 2112 "Tracker.c" - } -#line 163 "/home/jens/Source/shotwell/src/core/Tracker.vala" - _g_object_unref0 (self->priv->mux); -#line 99 "/home/jens/Source/shotwell/src/core/Tracker.vala" - CORE_TRACKER_CLASS (core_view_tracker_parent_class)->finalize (obj); -#line 2118 "Tracker.c" -} - - -GType -core_view_tracker_get_type (void) -{ - static volatile gsize core_view_tracker_type_id__volatile = 0; - if (g_once_init_enter (&core_view_tracker_type_id__volatile)) { - static const GTypeInfo g_define_type_info = { sizeof (CoreViewTrackerClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) core_view_tracker_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (CoreViewTracker), 0, (GInstanceInitFunc) core_view_tracker_instance_init, NULL }; - GType core_view_tracker_type_id; - core_view_tracker_type_id = g_type_register_static (CORE_TYPE_TRACKER, "CoreViewTracker", &g_define_type_info, 0); - g_once_init_leave (&core_view_tracker_type_id__volatile, core_view_tracker_type_id); - } - return core_view_tracker_type_id__volatile; -} - - - diff --git a/src/core/ViewCollection.c b/src/core/ViewCollection.c deleted file mode 100644 index 20c7fd1..0000000 --- a/src/core/ViewCollection.c +++ /dev/null @@ -1,9130 +0,0 @@ -/* ViewCollection.c generated by valac 0.40.4, the Vala compiler - * generated from ViewCollection.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. - */ -/* A ViewCollection holds DataView objects, which are view instances wrapping DataSource objects.*/ -/* Thus, multiple views can exist of a single SourceCollection, each view displaying all or some*/ -/* of that SourceCollection. A view collection also has a notion of order*/ -/* (first/last/next/previous) that can be overridden by child classes. It also understands hidden*/ -/* objects, which are withheld entirely from the collection until they're made visible. Currently*/ -/* the only way to hide objects is with a ViewFilter.*/ -/**/ -/* A ViewCollection may also be locked. When locked, it will not (a) remove hidden items from the*/ -/* collection and (b) remove DataViews representing unlinked DataSources. This allows for the*/ -/* ViewCollection to be "frozen" while manipulating items within it. When the collection is*/ -/* unlocked, all changes are applied at once.*/ -/**/ -/* The default implementation provides a browser which orders the view in the order they're*/ -/* stored in DataCollection, which is not specified.*/ - - -#include <glib.h> -#include <glib-object.h> -#include <stdlib.h> -#include <string.h> -#include <gee.h> -#include <gobject/gvaluecollector.h> - - -#define TYPE_DATA_COLLECTION (data_collection_get_type ()) -#define DATA_COLLECTION(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_DATA_COLLECTION, DataCollection)) -#define DATA_COLLECTION_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_DATA_COLLECTION, DataCollectionClass)) -#define IS_DATA_COLLECTION(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_DATA_COLLECTION)) -#define IS_DATA_COLLECTION_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_DATA_COLLECTION)) -#define DATA_COLLECTION_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_DATA_COLLECTION, DataCollectionClass)) - -typedef struct _DataCollection DataCollection; -typedef struct _DataCollectionClass DataCollectionClass; -typedef struct _DataCollectionPrivate DataCollectionPrivate; - -#define TYPE_DATA_OBJECT (data_object_get_type ()) -#define DATA_OBJECT(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_DATA_OBJECT, DataObject)) -#define DATA_OBJECT_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_DATA_OBJECT, DataObjectClass)) -#define IS_DATA_OBJECT(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_DATA_OBJECT)) -#define IS_DATA_OBJECT_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_DATA_OBJECT)) -#define DATA_OBJECT_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_DATA_OBJECT, DataObjectClass)) - -typedef struct _DataObject DataObject; -typedef struct _DataObjectClass DataObjectClass; - -#define TYPE_ALTERATION (alteration_get_type ()) -#define ALTERATION(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_ALTERATION, Alteration)) -#define ALTERATION_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_ALTERATION, AlterationClass)) -#define IS_ALTERATION(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_ALTERATION)) -#define IS_ALTERATION_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_ALTERATION)) -#define ALTERATION_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_ALTERATION, AlterationClass)) - -typedef struct _Alteration Alteration; -typedef struct _AlterationClass AlterationClass; - -#define TYPE_MARKER (marker_get_type ()) -#define MARKER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_MARKER, Marker)) -#define IS_MARKER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_MARKER)) -#define MARKER_GET_INTERFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE ((obj), TYPE_MARKER, MarkerIface)) - -typedef struct _Marker Marker; -typedef struct _MarkerIface MarkerIface; - -#define TYPE_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; -typedef struct _ViewCollectionPrivate ViewCollectionPrivate; - -#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_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_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 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_TYPE_MONITOR_IMPL (view_collection_monitor_impl_get_type ()) -#define VIEW_COLLECTION_MONITOR_IMPL(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), VIEW_COLLECTION_TYPE_MONITOR_IMPL, ViewCollectionMonitorImpl)) -#define VIEW_COLLECTION_MONITOR_IMPL_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), VIEW_COLLECTION_TYPE_MONITOR_IMPL, ViewCollectionMonitorImplClass)) -#define VIEW_COLLECTION_IS_MONITOR_IMPL(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), VIEW_COLLECTION_TYPE_MONITOR_IMPL)) -#define VIEW_COLLECTION_IS_MONITOR_IMPL_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), VIEW_COLLECTION_TYPE_MONITOR_IMPL)) -#define VIEW_COLLECTION_MONITOR_IMPL_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), VIEW_COLLECTION_TYPE_MONITOR_IMPL, ViewCollectionMonitorImplClass)) - -typedef struct _ViewCollectionMonitorImpl ViewCollectionMonitorImpl; -typedef struct _ViewCollectionMonitorImplClass ViewCollectionMonitorImplClass; - -#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_DATA_SET (data_set_get_type ()) -#define DATA_SET(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_DATA_SET, DataSet)) -#define DATA_SET_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_DATA_SET, DataSetClass)) -#define IS_DATA_SET(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_DATA_SET)) -#define IS_DATA_SET_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_DATA_SET)) -#define DATA_SET_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_DATA_SET, DataSetClass)) - -typedef struct _DataSet DataSet; -typedef struct _DataSetClass DataSetClass; -#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL))) -#define _data_collection_unref0(var) ((var == NULL) ? NULL : (var = (data_collection_unref (var), NULL))) -#define _data_set_unref0(var) ((var == NULL) ? NULL : (var = (data_set_unref (var), NULL))) -#define _g_free0(var) (var = (g_free (var), NULL)) -#define _view_filter_unref0(var) ((var == NULL) ? NULL : (var = (view_filter_unref (var), NULL))) - -#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 _view_collection_monitor_unref0(var) ((var == NULL) ? NULL : (var = (view_collection_monitor_unref (var), NULL))) -typedef struct _ViewCollectionMonitorPrivate ViewCollectionMonitorPrivate; -typedef struct _ViewCollectionMonitorImplPrivate ViewCollectionMonitorImplPrivate; -#define _alteration_unref0(var) ((var == NULL) ? NULL : (var = (alteration_unref (var), NULL))) - -#define TYPE_THUMBNAIL_SOURCE (thumbnail_source_get_type ()) -#define THUMBNAIL_SOURCE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_THUMBNAIL_SOURCE, ThumbnailSource)) -#define THUMBNAIL_SOURCE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_THUMBNAIL_SOURCE, ThumbnailSourceClass)) -#define IS_THUMBNAIL_SOURCE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_THUMBNAIL_SOURCE)) -#define IS_THUMBNAIL_SOURCE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_THUMBNAIL_SOURCE)) -#define THUMBNAIL_SOURCE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_THUMBNAIL_SOURCE, ThumbnailSourceClass)) - -typedef struct _ThumbnailSource ThumbnailSource; -typedef struct _ThumbnailSourceClass ThumbnailSourceClass; - -#define TYPE_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 TYPE_RATING (rating_get_type ()) - -#define VIEW_COLLECTION_TYPE_TOGGLE_LISTS (view_collection_toggle_lists_get_type ()) -#define VIEW_COLLECTION_TOGGLE_LISTS(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), VIEW_COLLECTION_TYPE_TOGGLE_LISTS, ViewCollectionToggleLists)) -#define VIEW_COLLECTION_TOGGLE_LISTS_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), VIEW_COLLECTION_TYPE_TOGGLE_LISTS, ViewCollectionToggleListsClass)) -#define VIEW_COLLECTION_IS_TOGGLE_LISTS(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), VIEW_COLLECTION_TYPE_TOGGLE_LISTS)) -#define VIEW_COLLECTION_IS_TOGGLE_LISTS_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), VIEW_COLLECTION_TYPE_TOGGLE_LISTS)) -#define VIEW_COLLECTION_TOGGLE_LISTS_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), VIEW_COLLECTION_TYPE_TOGGLE_LISTS, ViewCollectionToggleListsClass)) - -typedef struct _ViewCollectionToggleLists ViewCollectionToggleLists; -typedef struct _ViewCollectionToggleListsClass ViewCollectionToggleListsClass; -typedef struct _ViewCollectionToggleListsPrivate ViewCollectionToggleListsPrivate; -typedef struct _ViewCollectionParamSpecMonitor ViewCollectionParamSpecMonitor; -#define _view_manager_unref0(var) ((var == NULL) ? NULL : (var = (view_manager_unref (var), NULL))) -enum { - VIEW_COLLECTION_TOGGLE_LISTS_0_PROPERTY, - VIEW_COLLECTION_TOGGLE_LISTS_NUM_PROPERTIES -}; -static GParamSpec* view_collection_toggle_lists_properties[VIEW_COLLECTION_TOGGLE_LISTS_NUM_PROPERTIES]; -enum { - VIEW_COLLECTION_ITEMS_SELECTED_SIGNAL, - VIEW_COLLECTION_ITEMS_UNSELECTED_SIGNAL, - VIEW_COLLECTION_ITEMS_STATE_CHANGED_SIGNAL, - VIEW_COLLECTION_SELECTION_GROUP_ALTERED_SIGNAL, - VIEW_COLLECTION_ITEMS_SHOWN_SIGNAL, - VIEW_COLLECTION_ITEMS_HIDDEN_SIGNAL, - VIEW_COLLECTION_ITEMS_VISIBILITY_CHANGED_SIGNAL, - VIEW_COLLECTION_ITEM_VIEW_ALTERED_SIGNAL, - VIEW_COLLECTION_ITEM_GEOMETRY_ALTERED_SIGNAL, - VIEW_COLLECTION_VIEWS_ALTERED_SIGNAL, - VIEW_COLLECTION_GEOMETRIES_ALTERED_SIGNAL, - VIEW_COLLECTION_VIEW_FILTER_INSTALLED_SIGNAL, - VIEW_COLLECTION_VIEW_FILTER_REMOVED_SIGNAL, - VIEW_COLLECTION_NUM_SIGNALS -}; -static guint view_collection_signals[VIEW_COLLECTION_NUM_SIGNALS] = {0}; -typedef struct _ViewManagerPrivate ViewManagerPrivate; -typedef struct _ParamSpecViewManager ParamSpecViewManager; -typedef struct _ViewFilterPrivate ViewFilterPrivate; -typedef struct _ParamSpecViewFilter ParamSpecViewFilter; -enum { - VIEW_FILTER_REFRESH_SIGNAL, - VIEW_FILTER_NUM_SIGNALS -}; -static guint view_filter_signals[VIEW_FILTER_NUM_SIGNALS] = {0}; -#define _vala_assert(expr, msg) if G_LIKELY (expr) ; else g_assertion_message_expr (G_LOG_DOMAIN, __FILE__, __LINE__, G_STRFUNC, msg); -#define _vala_return_if_fail(expr, msg) if G_LIKELY (expr) ; else { g_return_if_fail_warning (G_LOG_DOMAIN, G_STRFUNC, msg); return; } -#define _vala_return_val_if_fail(expr, msg, val) if G_LIKELY (expr) ; else { g_return_if_fail_warning (G_LOG_DOMAIN, G_STRFUNC, msg); return val; } -#define _vala_warn_if_fail(expr, msg) if G_LIKELY (expr) ; else g_warn_message (G_LOG_DOMAIN, __FILE__, __LINE__, G_STRFUNC, msg); - -typedef gint64 (*Comparator) (void* a, void* b, void* user_data); -typedef gboolean (*ComparatorPredicate) (DataObject* object, Alteration* alteration, void* user_data); -typedef gboolean (*ProgressMonitor) (guint64 current, guint64 total, gboolean do_event_loop, void* user_data); -struct _MarkerIface { - GTypeInterface parent_iface; - void (*mark) (Marker* self, DataObject* object); - void (*unmark) (Marker* self, DataObject* object); - gboolean (*toggle) (Marker* self, DataObject* object); - void (*mark_many) (Marker* self, GeeCollection* list); - void (*unmark_many) (Marker* self, GeeCollection* list); - void (*mark_all) (Marker* self); - gint (*get_count) (Marker* self); - GeeCollection* (*get_all) (Marker* self); -}; - -struct _DataCollection { - GTypeInstance parent_instance; - volatile int ref_count; - DataCollectionPrivate * priv; -}; - -struct _DataCollectionClass { - GTypeClass parent_class; - void (*finalize) (DataCollection *self); - gchar* (*to_string) (DataCollection* self); - void (*notify_items_added) (DataCollection* self, GeeIterable* added); - void (*notify_items_removed) (DataCollection* self, GeeIterable* removed); - void (*notify_contents_altered) (DataCollection* self, GeeIterable* added, GeeIterable* removed); - void (*notify_items_altered) (DataCollection* self, GeeMap* items); - void (*notify_ordering_changed) (DataCollection* self); - void (*notify_property_set) (DataCollection* self, const gchar* name, GValue* old, GValue* val); - void (*notify_property_cleared) (DataCollection* self, const gchar* name); - gboolean (*valid_type) (DataCollection* self, DataObject* object); - void (*set_comparator) (DataCollection* self, Comparator comparator, void* comparator_target, ComparatorPredicate predicate, void* predicate_target); - void (*reset_comparator) (DataCollection* self); - GeeCollection* (*get_all) (DataCollection* self); - gint (*get_count) (DataCollection* self); - DataObject* (*get_at) (DataCollection* self, gint index); - gint (*index_of) (DataCollection* self, DataObject* object); - gboolean (*contains) (DataCollection* self, DataObject* object); - gboolean (*add) (DataCollection* self, DataObject* object); - GeeCollection* (*add_many) (DataCollection* self, GeeCollection* objects, ProgressMonitor monitor, void* monitor_target); - void (*remove_marked) (DataCollection* self, Marker* m); - void (*clear) (DataCollection* self); - void (*close) (DataCollection* self); - void (*notify_frozen) (DataCollection* self); - void (*notify_thawed) (DataCollection* self); - void (*items_added) (DataCollection* self, GeeIterable* added); - void (*items_removed) (DataCollection* self, GeeIterable* removed); - void (*contents_altered) (DataCollection* self, GeeIterable* added, GeeIterable* removed); - void (*items_altered) (DataCollection* self, GeeMap* items); - void (*ordering_changed) (DataCollection* self); - void (*property_set) (DataCollection* self, const gchar* name, GValue* old, GValue* val); - void (*property_cleared) (DataCollection* self, const gchar* name); - void (*frozen) (DataCollection* self); - void (*thawed) (DataCollection* self); -}; - -struct _ViewCollection { - DataCollection parent_instance; - ViewCollectionPrivate * priv; -}; - -struct _ViewCollectionClass { - DataCollectionClass parent_class; - void (*notify_items_selected_unselected) (ViewCollection* self, GeeCollection* selected, GeeCollection* unselected); - void (*notify_selection_group_altered) (ViewCollection* self); - void (*notify_item_view_altered) (ViewCollection* self, DataView* view); - void (*notify_views_altered) (ViewCollection* self, GeeCollection* views); - void (*notify_item_geometry_altered) (ViewCollection* self, DataView* view); - void (*notify_geometries_altered) (ViewCollection* self, GeeCollection* views); - void (*notify_items_shown) (ViewCollection* self, GeeCollection* shown); - void (*notify_items_hidden) (ViewCollection* self, GeeCollection* hidden); - void (*notify_items_visibility_changed) (ViewCollection* self, GeeCollection* changed); - void (*notify_view_filter_installed) (ViewCollection* self, ViewFilter* filter); - void (*notify_view_filter_removed) (ViewCollection* self, ViewFilter* filter); - DataView* (*get_first) (ViewCollection* self); - DataView* (*get_first_unrejected) (ViewCollection* self); - DataView* (*get_last) (ViewCollection* self); - DataView* (*get_next) (ViewCollection* self, DataView* view); - DataView* (*get_previous) (ViewCollection* self, DataView* view); - void (*items_selected) (ViewCollection* self, GeeIterable* selected); - void (*items_unselected) (ViewCollection* self, GeeIterable* unselected); - void (*items_state_changed) (ViewCollection* self, GeeIterable* changed); - void (*selection_group_altered) (ViewCollection* self); - void (*items_shown) (ViewCollection* self, GeeCollection* visible); - void (*items_hidden) (ViewCollection* self, GeeCollection* hidden); - void (*items_visibility_changed) (ViewCollection* self, GeeCollection* changed); - void (*item_view_altered) (ViewCollection* self, DataView* view); - void (*item_geometry_altered) (ViewCollection* self, DataView* view); - void (*views_altered) (ViewCollection* self, GeeCollection* views); - void (*geometries_altered) (ViewCollection* self, GeeCollection* views); - void (*view_filter_installed) (ViewCollection* self, ViewFilter* filer); - void (*view_filter_removed) (ViewCollection* self, ViewFilter* filer); -}; - -typedef DataView* (*CreateView) (DataSource* source, void* user_data); -typedef gboolean (*CreateViewPredicate) (DataSource* source, void* user_data); -struct _ViewCollectionPrivate { - GeeHashMultiMap* monitors; - ViewCollection* mirroring; - CreateView mirroring_ctor; - gpointer mirroring_ctor_target; - CreateViewPredicate should_mirror; - gpointer should_mirror_target; - GeeSet* filters; - DataSet* selected; - DataSet* visible; - GeeHashSet* frozen_views_altered; - GeeHashSet* frozen_geometries_altered; - GeeHashMap* source_map; -}; - -struct _ViewCollectionMonitor { - GTypeInstance parent_instance; - volatile int ref_count; - ViewCollectionMonitorPrivate * priv; -}; - -struct _ViewCollectionMonitorClass { - GTypeClass parent_class; - void (*finalize) (ViewCollectionMonitor *self); -}; - -struct _ViewCollectionMonitorImpl { - ViewCollectionMonitor parent_instance; - ViewCollectionMonitorImplPrivate * priv; - ViewCollection* owner; - SourceCollection* sources; - ViewManager* manager; - Alteration* prereq; -}; - -struct _ViewCollectionMonitorImplClass { - ViewCollectionMonitorClass parent_class; -}; - -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 gboolean (*MarkedAction) (DataObject* object, GObject* user, void* user_data); -struct _ViewCollectionToggleLists { - GObject parent_instance; - ViewCollectionToggleListsPrivate * priv; - GeeArrayList* selected; - GeeArrayList* unselected; -}; - -struct _ViewCollectionToggleListsClass { - GObjectClass parent_class; -}; - -struct _ViewCollectionParamSpecMonitor { - GParamSpec parent_instance; -}; - -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 _ParamSpecViewManager { - GParamSpec parent_instance; -}; - -struct _ViewFilter { - GTypeInstance parent_instance; - volatile int ref_count; - ViewFilterPrivate * priv; -}; - -struct _ViewFilterClass { - GTypeClass parent_class; - void (*finalize) (ViewFilter *self); - gboolean (*predicate) (ViewFilter* self, DataView* view); - void (*refresh) (ViewFilter* self); -}; - -struct _ParamSpecViewFilter { - GParamSpec parent_instance; -}; - - -static gpointer view_collection_parent_class = NULL; -static gpointer view_collection_monitor_parent_class = NULL; -static gpointer view_collection_monitor_impl_parent_class = NULL; -static gpointer view_collection_toggle_lists_parent_class = NULL; -static gpointer view_manager_parent_class = NULL; -static gpointer view_filter_parent_class = NULL; - -gpointer data_collection_ref (gpointer instance); -void data_collection_unref (gpointer instance); -GParamSpec* param_spec_data_collection (const gchar* name, - const gchar* nick, - const gchar* blurb, - GType object_type, - GParamFlags flags); -void value_set_data_collection (GValue* value, - gpointer v_object); -void value_take_data_collection (GValue* value, - gpointer v_object); -gpointer value_get_data_collection (const GValue* value); -GType data_collection_get_type (void) G_GNUC_CONST; -GType data_object_get_type (void) G_GNUC_CONST; -gpointer alteration_ref (gpointer instance); -void alteration_unref (gpointer instance); -GParamSpec* param_spec_alteration (const gchar* name, - const gchar* nick, - const gchar* blurb, - GType object_type, - GParamFlags flags); -void value_set_alteration (GValue* value, - gpointer v_object); -void value_take_alteration (GValue* value, - gpointer v_object); -gpointer value_get_alteration (const GValue* value); -GType alteration_get_type (void) G_GNUC_CONST; -GType marker_get_type (void) G_GNUC_CONST; -GType view_collection_get_type (void) G_GNUC_CONST; -GType data_view_get_type (void) G_GNUC_CONST; -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 source_collection_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; -static GType view_collection_monitor_impl_get_type (void) G_GNUC_CONST G_GNUC_UNUSED; -GType data_source_get_type (void) G_GNUC_CONST; -gpointer data_set_ref (gpointer instance); -void data_set_unref (gpointer instance); -GParamSpec* param_spec_data_set (const gchar* name, - const gchar* nick, - const gchar* blurb, - GType object_type, - GParamFlags flags); -void value_set_data_set (GValue* value, - gpointer v_object); -void value_take_data_set (GValue* value, - gpointer v_object); -gpointer value_get_data_set (const GValue* value); -GType data_set_get_type (void) G_GNUC_CONST; -#define VIEW_COLLECTION_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), TYPE_VIEW_COLLECTION, ViewCollectionPrivate)) -DataSet* data_set_new (void); -DataSet* data_set_construct (GType object_type); -ViewCollection* view_collection_new (const gchar* name); -ViewCollection* view_collection_construct (GType object_type, - const gchar* name); -DataCollection* data_collection_new (const gchar* name); -DataCollection* data_collection_construct (GType object_type, - const gchar* name); -void view_collection_notify_items_selected_unselected (ViewCollection* self, - GeeCollection* selected, - GeeCollection* unselected); -static void view_collection_real_notify_items_selected_unselected (ViewCollection* self, - GeeCollection* selected, - GeeCollection* unselected); -void view_collection_notify_selection_group_altered (ViewCollection* self); -static void view_collection_real_notify_selection_group_altered (ViewCollection* self); -void view_collection_notify_item_view_altered (ViewCollection* self, - DataView* view); -static void view_collection_real_notify_item_view_altered (ViewCollection* self, - DataView* view); -void view_collection_notify_views_altered (ViewCollection* self, - GeeCollection* views); -static void view_collection_real_notify_views_altered (ViewCollection* self, - GeeCollection* views); -void view_collection_notify_item_geometry_altered (ViewCollection* self, - DataView* view); -static void view_collection_real_notify_item_geometry_altered (ViewCollection* self, - DataView* view); -void view_collection_notify_geometries_altered (ViewCollection* self, - GeeCollection* views); -static void view_collection_real_notify_geometries_altered (ViewCollection* self, - GeeCollection* views); -void view_collection_notify_items_shown (ViewCollection* self, - GeeCollection* shown); -static void view_collection_real_notify_items_shown (ViewCollection* self, - GeeCollection* shown); -void view_collection_notify_items_hidden (ViewCollection* self, - GeeCollection* hidden); -static void view_collection_real_notify_items_hidden (ViewCollection* self, - GeeCollection* hidden); -void view_collection_notify_items_visibility_changed (ViewCollection* self, - GeeCollection* changed); -static void view_collection_real_notify_items_visibility_changed (ViewCollection* self, - GeeCollection* changed); -void view_collection_notify_view_filter_installed (ViewCollection* self, - ViewFilter* filter); -static void view_collection_real_notify_view_filter_installed (ViewCollection* self, - ViewFilter* filter); -void view_collection_notify_view_filter_removed (ViewCollection* self, - ViewFilter* filter); -static void view_collection_real_notify_view_filter_removed (ViewCollection* self, - ViewFilter* filter); -static void view_collection_real_clear (DataCollection* base); -gchar* data_collection_to_string (DataCollection* self); -void data_collection_clear (DataCollection* self); -static void view_collection_real_close (DataCollection* base); -void view_collection_halt_all_monitoring (ViewCollection* self); -void view_collection_halt_mirroring (ViewCollection* self); -static void view_collection_on_view_filter_refresh (ViewCollection* self); -static void _view_collection_on_view_filter_refresh_view_filter_refresh (ViewFilter* _sender, - gpointer self); -void data_collection_close (DataCollection* self); -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; -ViewCollectionMonitor* view_collection_monitor_source_collection (ViewCollection* self, - SourceCollection* sources, - ViewManager* manager, - Alteration* prereq, - GeeCollection* initial, - ProgressMonitor progress_monitor, - void* progress_monitor_target); -void data_collection_freeze_notifications (DataCollection* self); -static ViewCollectionMonitorImpl* view_collection_monitor_impl_new (ViewCollection* owner, - SourceCollection* sources, - ViewManager* manager, - Alteration* prereq); -static ViewCollectionMonitorImpl* view_collection_monitor_impl_construct (GType object_type, - ViewCollection* owner, - SourceCollection* sources, - ViewManager* manager, - Alteration* prereq); -DataView* view_manager_create_view (ViewManager* self, - DataSource* source); -GeeCollection* data_collection_add_many (DataCollection* self, - GeeCollection* objects, - ProgressMonitor monitor, - void* monitor_target); -static void view_collection_add_sources (ViewCollection* self, - SourceCollection* sources, - GeeIterable* added, - ProgressMonitor progress_monitor, - void* progress_monitor_target); -GeeCollection* data_collection_get_all (DataCollection* self); -void data_collection_thaw_notifications (DataCollection* self); -void view_collection_halt_monitoring (ViewCollection* self, - ViewCollectionMonitor* m); -void view_collection_mirror (ViewCollection* self, - ViewCollection* to_mirror, - CreateView mirroring_ctor, - void* mirroring_ctor_target, - CreateViewPredicate should_mirror, - void* should_mirror_target); -void data_collection_set_comparator (DataCollection* self, - Comparator comparator, - void* comparator_target, - ComparatorPredicate predicate, - void* predicate_target); -Comparator data_collection_get_comparator (DataCollection* self, - void** result_target); -ComparatorPredicate data_collection_get_comparator_predicate (DataCollection* self, - void** result_target); -static void view_collection_on_mirror_contents_added (ViewCollection* self, - GeeIterable* added); -static void _view_collection_on_mirror_contents_added_data_collection_items_added (DataCollection* _sender, - GeeIterable* added, - gpointer self); -static void view_collection_on_mirror_contents_removed (ViewCollection* self, - GeeIterable* removed); -static void _view_collection_on_mirror_contents_removed_data_collection_items_removed (DataCollection* _sender, - GeeIterable* removed, - gpointer self); -void view_collection_copy_into (ViewCollection* self, - ViewCollection* to_copy, - CreateView copying_ctor, - void* copying_ctor_target, - CreateViewPredicate should_copy, - void* should_copy_target); -DataSource* data_view_get_source (DataView* self); -gboolean view_collection_is_view_filter_installed (ViewCollection* self, - ViewFilter* f); -void view_collection_install_view_filter (ViewCollection* self, - ViewFilter* f); -void view_collection_remove_view_filter (ViewCollection* self, - ViewFilter* f); -static void view_collection_filter_altered_items (ViewCollection* self, - GeeCollection* views); -static gboolean view_collection_is_in_filter (ViewCollection* self, - DataView* view); -gboolean view_filter_predicate (ViewFilter* self, - DataView* view); -static gboolean view_collection_real_valid_type (DataCollection* base, - DataObject* object); -static void view_collection_on_sources_added (ViewCollection* self, - DataCollection* sources, - GeeIterable* added); -gboolean view_manager_include_in_view (ViewManager* self, - DataSource* source); -static DataView* _view_manager_create_view_create_view (DataSource* source, - gpointer self); -gboolean data_collection_add (DataCollection* self, - DataObject* object); -static gboolean view_collection_real_add (DataCollection* base, - DataObject* object); -void data_view_internal_set_visible (DataView* self, - gboolean visible); -GeeCollection* data_collection_get_singleton (DataObject* object); -static GeeCollection* view_collection_real_add_many (DataCollection* base, - GeeCollection* objects, - ProgressMonitor monitor, - void* monitor_target); -static void view_collection_on_sources_removed (ViewCollection* self, - GeeIterable* removed); -Marker* data_collection_start_marking (DataCollection* self); -void marker_mark (Marker* self, - DataObject* object); -gint marker_get_count (Marker* self); -void data_collection_remove_marked (DataCollection* self, - Marker* m); -static void view_collection_on_sources_altered (ViewCollection* self, - DataCollection* collection, - GeeMap* items); -gboolean alteration_contains_any (Alteration* self, - Alteration* other); -gboolean view_collection_has_view_for_source (ViewCollection* self, - DataSource* source); -DataView* view_collection_get_view_for_source (ViewCollection* self, - DataSource* source); -gboolean data_set_contains (DataSet* self, - DataObject* object); -gboolean data_set_resort_object (DataSet* self, - DataObject* object, - Alteration* alteration); -static gboolean view_collection_is_visible (ViewCollection* self, - DataView* view); -Marker* data_collection_mark_many (DataCollection* self, - GeeCollection* objects); -void data_collection_notify_ordering_changed (DataCollection* self); -static void view_collection_real_notify_items_added (DataCollection* base, - GeeIterable* added); -gboolean data_view_is_selected (DataView* self); -gboolean data_view_is_visible (DataView* self); -static gboolean view_collection_add_many_visible (ViewCollection* self, - GeeCollection* many); -static void view_collection_add_many_selected (ViewCollection* self, - GeeCollection* views); -void data_collection_notify_items_added (DataCollection* self, - GeeIterable* added); -static void view_collection_real_notify_items_removed (DataCollection* base, - GeeIterable* removed); -gboolean data_set_remove (DataSet* self, - DataObject* object); -static void view_collection_remove_many_selected (ViewCollection* self, - GeeCollection* views); -void data_collection_notify_items_removed (DataCollection* self, - GeeIterable* removed); -static void view_collection_show_items (ViewCollection* self, - GeeList* to_show); -static void view_collection_hide_items (ViewCollection* self, - GeeList* to_hide); -static void view_collection_real_items_altered (DataCollection* base, - GeeMap* map); -static void view_collection_real_set_comparator (DataCollection* base, - Comparator comparator, - void* comparator_target, - ComparatorPredicate predicate, - void* predicate_target); -void data_set_set_comparator (DataSet* self, - Comparator user_comparator, - void* user_comparator_target, - ComparatorPredicate comparator_predicate, - void* comparator_predicate_target); -static void view_collection_real_reset_comparator (DataCollection* base); -void data_set_reset_comparator (DataSet* self); -void data_collection_reset_comparator (DataCollection* self); -static GeeCollection* view_collection_real_get_all (DataCollection* base); -GeeList* data_set_get_all (DataSet* self); -GeeCollection* view_collection_get_all_unfiltered (ViewCollection* self); -static gint view_collection_real_get_count (DataCollection* base); -gint data_set_get_count (DataSet* self); -gint data_collection_get_count (DataCollection* self); -gint view_collection_get_unfiltered_count (ViewCollection* self); -static DataObject* view_collection_real_get_at (DataCollection* base, - gint index); -DataObject* data_set_get_at (DataSet* self, - gint index); -DataObject* data_collection_get_at (DataCollection* self, - gint index); -static gint view_collection_real_index_of (DataCollection* base, - DataObject* object); -gint data_set_index_of (DataSet* self, - DataObject* object); -gint data_collection_index_of (DataCollection* self, - DataObject* object); -static gboolean view_collection_real_contains (DataCollection* base, - DataObject* object); -gboolean data_collection_contains (DataCollection* self, - DataObject* object); -DataView* view_collection_get_first (ViewCollection* self); -static DataView* view_collection_real_get_first (ViewCollection* self); -DataView* view_collection_get_first_unrejected (ViewCollection* self); -static DataView* view_collection_real_get_first_unrejected (ViewCollection* self); -GType thumbnail_source_get_type (void) G_GNUC_CONST; -GType media_source_get_type (void) G_GNUC_CONST; -GType rating_get_type (void) G_GNUC_CONST; -Rating media_source_get_rating (MediaSource* self); -DataView* view_collection_get_next (ViewCollection* self, - DataView* view); -DataView* view_collection_get_last (ViewCollection* self); -static DataView* view_collection_real_get_last (ViewCollection* self); -static DataView* view_collection_real_get_next (ViewCollection* self, - DataView* view); -DataView* view_collection_get_previous (ViewCollection* self, - DataView* view); -static DataView* view_collection_real_get_previous (ViewCollection* self, - DataView* view); -gboolean view_collection_get_immediate_neighbors (ViewCollection* self, - DataSource* home, - DataSource* * next, - DataSource* * prev, - const gchar* type_selector); -gchar* data_source_get_typename (DataSource* self); -GeeSet* view_collection_get_extended_neighbors (ViewCollection* self, - DataSource* home, - const gchar* typename); -gboolean data_set_add_many (DataSet* self, - GeeCollection* objects); -gboolean data_set_remove_many (DataSet* self, - GeeCollection* objects); -void view_collection_select_marked (ViewCollection* self, - Marker* marker); -void data_collection_act_on_marked (DataCollection* self, - Marker* m, - MarkedAction action, - void* action_target, - ProgressMonitor monitor, - void* monitor_target, - GObject* user); -static gboolean view_collection_select_item (ViewCollection* self, - DataObject* object, - GObject* user); -static gboolean _view_collection_select_item_marked_action (DataObject* object, - GObject* user, - gpointer self); -void view_collection_select_all (ViewCollection* self); -void marker_mark_all (Marker* self); -void data_view_internal_set_selected (DataView* self, - gboolean selected); -void view_collection_unselect_marked (ViewCollection* self, - Marker* marker); -static gboolean view_collection_unselect_item (ViewCollection* self, - DataObject* object, - GObject* user); -static gboolean _view_collection_unselect_item_marked_action (DataObject* object, - GObject* user, - gpointer self); -void view_collection_unselect_all (ViewCollection* self); -void marker_mark_many (Marker* self, - GeeCollection* list); -GeeList* view_collection_get_selected (ViewCollection* self); -void view_collection_unselect_all_but (ViewCollection* self, - DataView* exception); -void view_collection_unselect_and_select_marked (ViewCollection* self, - Marker* unselect, - Marker* select); -void view_collection_toggle_marked (ViewCollection* self, - Marker* marker); -static GType view_collection_toggle_lists_get_type (void) G_GNUC_CONST G_GNUC_UNUSED; -static ViewCollectionToggleLists* view_collection_toggle_lists_new (void); -static ViewCollectionToggleLists* view_collection_toggle_lists_construct (GType object_type); -static gboolean view_collection_toggle_item (ViewCollection* self, - DataObject* object, - GObject* user); -static gboolean _view_collection_toggle_item_marked_action (DataObject* object, - GObject* user, - gpointer self); -gboolean data_view_internal_toggle (DataView* self); -gint view_collection_get_selected_count (ViewCollection* self); -DataView* view_collection_get_selected_at (ViewCollection* self, - gint index); -DataSet* data_collection_get_dataset_copy (DataCollection* self); -gboolean view_collection_has_view_for_source_with_filtered (ViewCollection* self, - DataSource* source); -DataView* view_collection_get_view_for_source_filtered (ViewCollection* self, - DataSource* source); -GeeCollection* view_collection_get_sources (ViewCollection* self); -gboolean view_collection_has_source_of_type (ViewCollection* self, - GType t); -gint view_collection_get_sources_of_type_count (ViewCollection* self, - GType t); -GeeList* view_collection_get_sources_of_type (ViewCollection* self, - GType t); -GeeList* view_collection_get_selected_sources (ViewCollection* self); -DataSource* view_collection_get_selected_source_at (ViewCollection* self, - gint index); -GeeList* view_collection_get_selected_sources_of_type (ViewCollection* self, - GType t); -gint view_collection_index_of_source (ViewCollection* self, - DataSource* source); -void view_collection_internal_notify_view_altered (ViewCollection* self, - DataView* view); -gboolean data_collection_are_notifications_frozen (DataCollection* self); -void view_collection_internal_notify_geometry_altered (ViewCollection* self, - DataView* view); -static void view_collection_real_notify_thawed (DataCollection* base); -void data_collection_notify_thawed (DataCollection* self); -gboolean view_collection_are_items_filtered_out (ViewCollection* self); -static void view_collection_real_items_selected (ViewCollection* self, - GeeIterable* selected); -static void view_collection_real_items_unselected (ViewCollection* self, - GeeIterable* unselected); -static void view_collection_real_items_state_changed (ViewCollection* self, - GeeIterable* changed); -static void view_collection_real_selection_group_altered (ViewCollection* self); -static void view_collection_real_items_shown (ViewCollection* self, - GeeCollection* visible); -static void view_collection_real_items_hidden (ViewCollection* self, - GeeCollection* hidden); -static void view_collection_real_items_visibility_changed (ViewCollection* self, - GeeCollection* changed); -static void view_collection_real_item_view_altered (ViewCollection* self, - DataView* view); -static void view_collection_real_item_geometry_altered (ViewCollection* self, - DataView* view); -static void view_collection_real_views_altered (ViewCollection* self, - GeeCollection* views); -static void view_collection_real_geometries_altered (ViewCollection* self, - GeeCollection* views); -static void view_collection_real_view_filter_installed (ViewCollection* self, - ViewFilter* filer); -static void g_cclosure_user_marshal_VOID__VIEW_FILTER (GClosure * closure, - GValue * return_value, - guint n_param_values, - const GValue * param_values, - gpointer invocation_hint, - gpointer marshal_data); -static void view_collection_real_view_filter_removed (ViewCollection* self, - ViewFilter* filer); -ViewCollectionMonitor* view_collection_monitor_new (void); -ViewCollectionMonitor* view_collection_monitor_construct (GType object_type); -static void view_collection_monitor_finalize (ViewCollectionMonitor * obj); -static void _view_collection_on_sources_added_data_collection_items_added (DataCollection* _sender, - GeeIterable* added, - gpointer self); -static void _view_collection_on_sources_removed_data_collection_items_removed (DataCollection* _sender, - GeeIterable* removed, - gpointer self); -static void _view_collection_on_sources_altered_data_collection_items_altered (DataCollection* _sender, - GeeMap* items, - gpointer self); -static void view_collection_monitor_impl_finalize (ViewCollectionMonitor * obj); -static void view_collection_toggle_lists_finalize (GObject * obj); -static void view_collection_finalize (DataCollection * obj); -static gboolean view_manager_real_include_in_view (ViewManager* self, - DataSource* source); -static DataView* view_manager_real_create_view (ViewManager* self, - DataSource* source); -ViewManager* view_manager_construct (GType object_type); -static void view_manager_finalize (ViewManager * obj); -static gboolean view_filter_real_predicate (ViewFilter* self, - DataView* view); -ViewFilter* view_filter_construct (GType object_type); -static void view_filter_real_refresh (ViewFilter* self); -static void view_filter_finalize (ViewFilter * obj); - - -ViewCollection* -view_collection_construct (GType object_type, - const gchar* name) -{ - ViewCollection* self = NULL; -#line 125 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - g_return_val_if_fail (name != NULL, NULL); -#line 126 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - self = (ViewCollection*) data_collection_construct (object_type, name); -#line 125 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - return self; -#line 958 "ViewCollection.c" -} - - -ViewCollection* -view_collection_new (const gchar* name) -{ -#line 125 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - return view_collection_construct (TYPE_VIEW_COLLECTION, name); -#line 967 "ViewCollection.c" -} - - -static gpointer -_g_object_ref0 (gpointer self) -{ -#line 142 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - return self ? g_object_ref (self) : NULL; -#line 976 "ViewCollection.c" -} - - -static void -view_collection_real_notify_items_selected_unselected (ViewCollection* self, - GeeCollection* selected, - GeeCollection* unselected) -{ - gboolean _tmp0_ = FALSE; - gboolean has_selected = FALSE; - gboolean _tmp3_ = FALSE; - gboolean has_unselected = FALSE; - gboolean _tmp6_; - gboolean _tmp7_; - GeeCollection* sum = NULL; - gboolean _tmp8_ = FALSE; - gboolean _tmp9_; - GeeCollection* _tmp22_; -#line 129 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - g_return_if_fail ((selected == NULL) || GEE_IS_COLLECTION (selected)); -#line 129 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - g_return_if_fail ((unselected == NULL) || GEE_IS_COLLECTION (unselected)); -#line 131 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - if (selected != NULL) { -#line 1001 "ViewCollection.c" - gint _tmp1_; - gint _tmp2_; -#line 131 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp1_ = gee_collection_get_size (selected); -#line 131 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp2_ = _tmp1_; -#line 131 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp0_ = _tmp2_ > 0; -#line 1010 "ViewCollection.c" - } else { -#line 131 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp0_ = FALSE; -#line 1014 "ViewCollection.c" - } -#line 131 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - has_selected = _tmp0_; -#line 132 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - if (unselected != NULL) { -#line 1020 "ViewCollection.c" - gint _tmp4_; - gint _tmp5_; -#line 132 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp4_ = gee_collection_get_size (unselected); -#line 132 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp5_ = _tmp4_; -#line 132 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp3_ = _tmp5_ > 0; -#line 1029 "ViewCollection.c" - } else { -#line 132 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp3_ = FALSE; -#line 1033 "ViewCollection.c" - } -#line 132 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - has_unselected = _tmp3_; -#line 134 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp6_ = has_selected; -#line 134 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - if (_tmp6_) { -#line 135 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - g_signal_emit (self, view_collection_signals[VIEW_COLLECTION_ITEMS_SELECTED_SIGNAL], 0, G_TYPE_CHECK_INSTANCE_CAST (selected, GEE_TYPE_ITERABLE, GeeIterable)); -#line 1043 "ViewCollection.c" - } -#line 137 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp7_ = has_unselected; -#line 137 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - if (_tmp7_) { -#line 138 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - g_signal_emit (self, view_collection_signals[VIEW_COLLECTION_ITEMS_UNSELECTED_SIGNAL], 0, G_TYPE_CHECK_INSTANCE_CAST (unselected, GEE_TYPE_ITERABLE, GeeIterable)); -#line 1051 "ViewCollection.c" - } -#line 141 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp9_ = has_selected; -#line 141 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - if (_tmp9_) { -#line 1057 "ViewCollection.c" - gboolean _tmp10_; -#line 141 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp10_ = has_unselected; -#line 141 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp8_ = !_tmp10_; -#line 1063 "ViewCollection.c" - } else { -#line 141 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp8_ = FALSE; -#line 1067 "ViewCollection.c" - } -#line 141 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - if (_tmp8_) { -#line 1071 "ViewCollection.c" - GeeCollection* _tmp11_; -#line 142 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp11_ = _g_object_ref0 (selected); -#line 142 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _g_object_unref0 (sum); -#line 142 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - sum = _tmp11_; -#line 1079 "ViewCollection.c" - } else { - gboolean _tmp12_ = FALSE; - gboolean _tmp13_; -#line 143 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp13_ = has_selected; -#line 143 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - if (!_tmp13_) { -#line 1087 "ViewCollection.c" - gboolean _tmp14_; -#line 143 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp14_ = has_unselected; -#line 143 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp12_ = _tmp14_; -#line 1093 "ViewCollection.c" - } else { -#line 143 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp12_ = FALSE; -#line 1097 "ViewCollection.c" - } -#line 143 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - if (_tmp12_) { -#line 1101 "ViewCollection.c" - GeeCollection* _tmp15_; -#line 144 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp15_ = _g_object_ref0 (unselected); -#line 144 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _g_object_unref0 (sum); -#line 144 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - sum = _tmp15_; -#line 1109 "ViewCollection.c" - } else { - gboolean _tmp16_ = FALSE; - gboolean _tmp17_; -#line 145 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp17_ = has_selected; -#line 145 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - if (!_tmp17_) { -#line 1117 "ViewCollection.c" - gboolean _tmp18_; -#line 145 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp18_ = has_unselected; -#line 145 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp16_ = !_tmp18_; -#line 1123 "ViewCollection.c" - } else { -#line 145 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp16_ = FALSE; -#line 1127 "ViewCollection.c" - } -#line 145 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - if (_tmp16_) { -#line 146 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _g_object_unref0 (sum); -#line 146 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - sum = NULL; -#line 1135 "ViewCollection.c" - } else { - GeeHashSet* _tmp19_; - GeeCollection* _tmp20_; - GeeCollection* _tmp21_; -#line 148 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp19_ = gee_hash_set_new (TYPE_DATA_VIEW, (GBoxedCopyFunc) g_object_ref, (GDestroyNotify) g_object_unref, NULL, NULL, NULL, NULL, NULL, NULL); -#line 148 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _g_object_unref0 (sum); -#line 148 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - sum = G_TYPE_CHECK_INSTANCE_CAST (_tmp19_, GEE_TYPE_COLLECTION, GeeCollection); -#line 149 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp20_ = sum; -#line 149 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - gee_collection_add_all (_tmp20_, selected); -#line 150 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp21_ = sum; -#line 150 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - gee_collection_add_all (_tmp21_, unselected); -#line 1154 "ViewCollection.c" - } - } - } -#line 153 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp22_ = sum; -#line 153 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - if (_tmp22_ != NULL) { -#line 1162 "ViewCollection.c" - GeeCollection* _tmp23_; -#line 154 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp23_ = sum; -#line 154 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - g_signal_emit (self, view_collection_signals[VIEW_COLLECTION_ITEMS_STATE_CHANGED_SIGNAL], 0, G_TYPE_CHECK_INSTANCE_CAST (_tmp23_, GEE_TYPE_ITERABLE, GeeIterable)); -#line 155 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - view_collection_notify_selection_group_altered (self); -#line 1170 "ViewCollection.c" - } -#line 129 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _g_object_unref0 (sum); -#line 1174 "ViewCollection.c" -} - - -void -view_collection_notify_items_selected_unselected (ViewCollection* self, - GeeCollection* selected, - GeeCollection* unselected) -{ -#line 129 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - g_return_if_fail (IS_VIEW_COLLECTION (self)); -#line 129 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - VIEW_COLLECTION_GET_CLASS (self)->notify_items_selected_unselected (self, selected, unselected); -#line 1187 "ViewCollection.c" -} - - -static void -view_collection_real_notify_selection_group_altered (ViewCollection* self) -{ -#line 160 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - g_signal_emit (self, view_collection_signals[VIEW_COLLECTION_SELECTION_GROUP_ALTERED_SIGNAL], 0); -#line 1196 "ViewCollection.c" -} - - -void -view_collection_notify_selection_group_altered (ViewCollection* self) -{ -#line 159 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - g_return_if_fail (IS_VIEW_COLLECTION (self)); -#line 159 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - VIEW_COLLECTION_GET_CLASS (self)->notify_selection_group_altered (self); -#line 1207 "ViewCollection.c" -} - - -static void -view_collection_real_notify_item_view_altered (ViewCollection* self, - DataView* view) -{ -#line 163 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - g_return_if_fail (IS_DATA_VIEW (view)); -#line 164 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - g_signal_emit (self, view_collection_signals[VIEW_COLLECTION_ITEM_VIEW_ALTERED_SIGNAL], 0, view); -#line 1219 "ViewCollection.c" -} - - -void -view_collection_notify_item_view_altered (ViewCollection* self, - DataView* view) -{ -#line 163 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - g_return_if_fail (IS_VIEW_COLLECTION (self)); -#line 163 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - VIEW_COLLECTION_GET_CLASS (self)->notify_item_view_altered (self, view); -#line 1231 "ViewCollection.c" -} - - -static void -view_collection_real_notify_views_altered (ViewCollection* self, - GeeCollection* views) -{ -#line 167 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - g_return_if_fail (GEE_IS_COLLECTION (views)); -#line 168 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - g_signal_emit (self, view_collection_signals[VIEW_COLLECTION_VIEWS_ALTERED_SIGNAL], 0, views); -#line 1243 "ViewCollection.c" -} - - -void -view_collection_notify_views_altered (ViewCollection* self, - GeeCollection* views) -{ -#line 167 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - g_return_if_fail (IS_VIEW_COLLECTION (self)); -#line 167 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - VIEW_COLLECTION_GET_CLASS (self)->notify_views_altered (self, views); -#line 1255 "ViewCollection.c" -} - - -static void -view_collection_real_notify_item_geometry_altered (ViewCollection* self, - DataView* view) -{ -#line 171 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - g_return_if_fail (IS_DATA_VIEW (view)); -#line 172 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - g_signal_emit (self, view_collection_signals[VIEW_COLLECTION_ITEM_GEOMETRY_ALTERED_SIGNAL], 0, view); -#line 1267 "ViewCollection.c" -} - - -void -view_collection_notify_item_geometry_altered (ViewCollection* self, - DataView* view) -{ -#line 171 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - g_return_if_fail (IS_VIEW_COLLECTION (self)); -#line 171 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - VIEW_COLLECTION_GET_CLASS (self)->notify_item_geometry_altered (self, view); -#line 1279 "ViewCollection.c" -} - - -static void -view_collection_real_notify_geometries_altered (ViewCollection* self, - GeeCollection* views) -{ -#line 175 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - g_return_if_fail (GEE_IS_COLLECTION (views)); -#line 176 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - g_signal_emit (self, view_collection_signals[VIEW_COLLECTION_GEOMETRIES_ALTERED_SIGNAL], 0, views); -#line 1291 "ViewCollection.c" -} - - -void -view_collection_notify_geometries_altered (ViewCollection* self, - GeeCollection* views) -{ -#line 175 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - g_return_if_fail (IS_VIEW_COLLECTION (self)); -#line 175 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - VIEW_COLLECTION_GET_CLASS (self)->notify_geometries_altered (self, views); -#line 1303 "ViewCollection.c" -} - - -static void -view_collection_real_notify_items_shown (ViewCollection* self, - GeeCollection* shown) -{ -#line 179 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - g_return_if_fail (GEE_IS_COLLECTION (shown)); -#line 180 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - g_signal_emit (self, view_collection_signals[VIEW_COLLECTION_ITEMS_SHOWN_SIGNAL], 0, shown); -#line 1315 "ViewCollection.c" -} - - -void -view_collection_notify_items_shown (ViewCollection* self, - GeeCollection* shown) -{ -#line 179 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - g_return_if_fail (IS_VIEW_COLLECTION (self)); -#line 179 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - VIEW_COLLECTION_GET_CLASS (self)->notify_items_shown (self, shown); -#line 1327 "ViewCollection.c" -} - - -static void -view_collection_real_notify_items_hidden (ViewCollection* self, - GeeCollection* hidden) -{ -#line 183 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - g_return_if_fail (GEE_IS_COLLECTION (hidden)); -#line 184 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - g_signal_emit (self, view_collection_signals[VIEW_COLLECTION_ITEMS_HIDDEN_SIGNAL], 0, hidden); -#line 1339 "ViewCollection.c" -} - - -void -view_collection_notify_items_hidden (ViewCollection* self, - GeeCollection* hidden) -{ -#line 183 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - g_return_if_fail (IS_VIEW_COLLECTION (self)); -#line 183 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - VIEW_COLLECTION_GET_CLASS (self)->notify_items_hidden (self, hidden); -#line 1351 "ViewCollection.c" -} - - -static void -view_collection_real_notify_items_visibility_changed (ViewCollection* self, - GeeCollection* changed) -{ -#line 187 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - g_return_if_fail (GEE_IS_COLLECTION (changed)); -#line 188 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - g_signal_emit (self, view_collection_signals[VIEW_COLLECTION_ITEMS_VISIBILITY_CHANGED_SIGNAL], 0, changed); -#line 1363 "ViewCollection.c" -} - - -void -view_collection_notify_items_visibility_changed (ViewCollection* self, - GeeCollection* changed) -{ -#line 187 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - g_return_if_fail (IS_VIEW_COLLECTION (self)); -#line 187 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - VIEW_COLLECTION_GET_CLASS (self)->notify_items_visibility_changed (self, changed); -#line 1375 "ViewCollection.c" -} - - -static void -view_collection_real_notify_view_filter_installed (ViewCollection* self, - ViewFilter* filter) -{ -#line 191 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - g_return_if_fail (IS_VIEW_FILTER (filter)); -#line 192 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - g_signal_emit (self, view_collection_signals[VIEW_COLLECTION_VIEW_FILTER_INSTALLED_SIGNAL], 0, filter); -#line 1387 "ViewCollection.c" -} - - -void -view_collection_notify_view_filter_installed (ViewCollection* self, - ViewFilter* filter) -{ -#line 191 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - g_return_if_fail (IS_VIEW_COLLECTION (self)); -#line 191 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - VIEW_COLLECTION_GET_CLASS (self)->notify_view_filter_installed (self, filter); -#line 1399 "ViewCollection.c" -} - - -static void -view_collection_real_notify_view_filter_removed (ViewCollection* self, - ViewFilter* filter) -{ -#line 195 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - g_return_if_fail (IS_VIEW_FILTER (filter)); -#line 196 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - g_signal_emit (self, view_collection_signals[VIEW_COLLECTION_VIEW_FILTER_REMOVED_SIGNAL], 0, filter); -#line 1411 "ViewCollection.c" -} - - -void -view_collection_notify_view_filter_removed (ViewCollection* self, - ViewFilter* filter) -{ -#line 195 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - g_return_if_fail (IS_VIEW_COLLECTION (self)); -#line 195 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - VIEW_COLLECTION_GET_CLASS (self)->notify_view_filter_removed (self, filter); -#line 1423 "ViewCollection.c" -} - - -static void -view_collection_real_clear (DataCollection* base) -{ - ViewCollection * self; - gboolean _tmp0_ = FALSE; - GeeHashMultiMap* _tmp1_; - gint _tmp2_; - gint _tmp3_; -#line 199 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_VIEW_COLLECTION, ViewCollection); -#line 202 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp1_ = self->priv->monitors; -#line 202 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp2_ = gee_multi_map_get_size (G_TYPE_CHECK_INSTANCE_CAST (_tmp1_, GEE_TYPE_MULTI_MAP, GeeMultiMap)); -#line 202 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp3_ = _tmp2_; -#line 202 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - if (_tmp3_ > 0) { -#line 202 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp0_ = TRUE; -#line 1447 "ViewCollection.c" - } else { - ViewCollection* _tmp4_; -#line 202 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp4_ = self->priv->mirroring; -#line 202 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp0_ = _tmp4_ != NULL; -#line 1454 "ViewCollection.c" - } -#line 202 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - if (_tmp0_) { -#line 1458 "ViewCollection.c" - gchar* _tmp5_; - gchar* _tmp6_; -#line 203 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp5_ = data_collection_to_string (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_DATA_COLLECTION, DataCollection)); -#line 203 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp6_ = _tmp5_; -#line 203 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - g_warning ("ViewCollection.vala:203: Cannot clear %s: monitoring or mirroring in e" \ -"ffect", _tmp6_); -#line 203 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _g_free0 (_tmp6_); -#line 205 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - return; -#line 1471 "ViewCollection.c" - } -#line 208 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - DATA_COLLECTION_CLASS (view_collection_parent_class)->clear (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_DATA_COLLECTION, DataCollection)); -#line 1475 "ViewCollection.c" -} - - -static void -_view_collection_on_view_filter_refresh_view_filter_refresh (ViewFilter* _sender, - gpointer self) -{ -#line 215 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - view_collection_on_view_filter_refresh ((ViewCollection*) self); -#line 1485 "ViewCollection.c" -} - - -static void -view_collection_real_close (DataCollection* base) -{ - ViewCollection * self; - GeeSet* _tmp7_; -#line 211 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_VIEW_COLLECTION, ViewCollection); -#line 212 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - view_collection_halt_all_monitoring (self); -#line 213 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - view_collection_halt_mirroring (self); -#line 1500 "ViewCollection.c" - { - GeeIterator* _f_it = NULL; - GeeSet* _tmp0_; - GeeIterator* _tmp1_; -#line 214 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp0_ = self->priv->filters; -#line 214 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp1_ = gee_iterable_iterator (G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, GEE_TYPE_ITERABLE, GeeIterable)); -#line 214 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _f_it = _tmp1_; -#line 214 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - while (TRUE) { -#line 1513 "ViewCollection.c" - GeeIterator* _tmp2_; - ViewFilter* f = NULL; - GeeIterator* _tmp3_; - gpointer _tmp4_; - ViewFilter* _tmp5_; - guint _tmp6_; -#line 214 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp2_ = _f_it; -#line 214 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - if (!gee_iterator_next (_tmp2_)) { -#line 214 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - break; -#line 1526 "ViewCollection.c" - } -#line 214 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp3_ = _f_it; -#line 214 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp4_ = gee_iterator_get (_tmp3_); -#line 214 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - f = (ViewFilter*) _tmp4_; -#line 215 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp5_ = f; -#line 215 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - g_signal_parse_name ("refresh", TYPE_VIEW_FILTER, &_tmp6_, NULL, FALSE); -#line 215 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - g_signal_handlers_disconnect_matched (_tmp5_, G_SIGNAL_MATCH_ID | G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA, _tmp6_, 0, NULL, (GCallback) _view_collection_on_view_filter_refresh_view_filter_refresh, self); -#line 214 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _view_filter_unref0 (f); -#line 1542 "ViewCollection.c" - } -#line 214 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _g_object_unref0 (_f_it); -#line 1546 "ViewCollection.c" - } -#line 216 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp7_ = self->priv->filters; -#line 216 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - gee_collection_clear (G_TYPE_CHECK_INSTANCE_CAST (_tmp7_, GEE_TYPE_COLLECTION, GeeCollection)); -#line 218 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - DATA_COLLECTION_CLASS (view_collection_parent_class)->close (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_DATA_COLLECTION, DataCollection)); -#line 1554 "ViewCollection.c" -} - - -ViewCollectionMonitor* -view_collection_monitor_source_collection (ViewCollection* self, - SourceCollection* sources, - ViewManager* manager, - Alteration* prereq, - GeeCollection* initial, - ProgressMonitor progress_monitor, - void* progress_monitor_target) -{ - ViewCollectionMonitor* result = NULL; - ViewCollectionMonitorImpl* monitor = NULL; - ViewCollectionMonitorImpl* _tmp0_; - GeeHashMultiMap* _tmp1_; - ViewCollectionMonitorImpl* _tmp2_; - gboolean _tmp3_ = FALSE; -#line 221 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - g_return_val_if_fail (IS_VIEW_COLLECTION (self), NULL); -#line 221 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - g_return_val_if_fail (IS_SOURCE_COLLECTION (sources), NULL); -#line 221 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - g_return_val_if_fail (IS_VIEW_MANAGER (manager), NULL); -#line 221 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - g_return_val_if_fail ((prereq == NULL) || IS_ALTERATION (prereq), NULL); -#line 221 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - g_return_val_if_fail ((initial == NULL) || GEE_IS_COLLECTION (initial), NULL); -#line 225 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - view_collection_halt_mirroring (self); -#line 227 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - data_collection_freeze_notifications (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_DATA_COLLECTION, DataCollection)); -#line 230 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp0_ = view_collection_monitor_impl_new (self, sources, manager, prereq); -#line 230 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - monitor = _tmp0_; -#line 231 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp1_ = self->priv->monitors; -#line 231 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp2_ = monitor; -#line 231 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - gee_multi_map_set (G_TYPE_CHECK_INSTANCE_CAST (_tmp1_, GEE_TYPE_MULTI_MAP, GeeMultiMap), sources, _tmp2_); -#line 233 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - if (initial != NULL) { -#line 1599 "ViewCollection.c" - gint _tmp4_; - gint _tmp5_; -#line 233 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp4_ = gee_collection_get_size (initial); -#line 233 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp5_ = _tmp4_; -#line 233 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp3_ = _tmp5_ > 0; -#line 1608 "ViewCollection.c" - } else { -#line 233 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp3_ = FALSE; -#line 1612 "ViewCollection.c" - } -#line 233 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - if (_tmp3_) { -#line 1616 "ViewCollection.c" - GeeArrayList* created_views = NULL; - GeeArrayList* _tmp6_; - GeeArrayList* _tmp15_; - GeeCollection* _tmp16_; - GeeCollection* _tmp17_; -#line 235 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp6_ = gee_array_list_new (TYPE_DATA_VIEW, (GBoxedCopyFunc) g_object_ref, (GDestroyNotify) g_object_unref, NULL, NULL, NULL); -#line 235 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - created_views = _tmp6_; -#line 1626 "ViewCollection.c" - { - GeeIterator* _source_it = NULL; - GeeIterator* _tmp7_; -#line 236 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp7_ = gee_iterable_iterator (G_TYPE_CHECK_INSTANCE_CAST (initial, GEE_TYPE_ITERABLE, GeeIterable)); -#line 236 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _source_it = _tmp7_; -#line 236 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - while (TRUE) { -#line 1636 "ViewCollection.c" - GeeIterator* _tmp8_; - DataSource* source = NULL; - GeeIterator* _tmp9_; - gpointer _tmp10_; - GeeArrayList* _tmp11_; - DataSource* _tmp12_; - DataView* _tmp13_; - DataView* _tmp14_; -#line 236 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp8_ = _source_it; -#line 236 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - if (!gee_iterator_next (_tmp8_)) { -#line 236 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - break; -#line 1651 "ViewCollection.c" - } -#line 236 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp9_ = _source_it; -#line 236 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp10_ = gee_iterator_get (_tmp9_); -#line 236 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - source = (DataSource*) _tmp10_; -#line 237 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp11_ = created_views; -#line 237 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp12_ = source; -#line 237 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp13_ = view_manager_create_view (manager, _tmp12_); -#line 237 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp14_ = _tmp13_; -#line 237 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - gee_abstract_collection_add (G_TYPE_CHECK_INSTANCE_CAST (_tmp11_, GEE_TYPE_ABSTRACT_COLLECTION, GeeAbstractCollection), _tmp14_); -#line 237 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _g_object_unref0 (_tmp14_); -#line 236 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _g_object_unref0 (source); -#line 1673 "ViewCollection.c" - } -#line 236 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _g_object_unref0 (_source_it); -#line 1677 "ViewCollection.c" - } -#line 239 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp15_ = created_views; -#line 239 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp16_ = data_collection_add_many (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_DATA_COLLECTION, DataCollection), G_TYPE_CHECK_INSTANCE_CAST (_tmp15_, GEE_TYPE_COLLECTION, GeeCollection), progress_monitor, progress_monitor_target); -#line 239 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp17_ = _tmp16_; -#line 239 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _g_object_unref0 (_tmp17_); -#line 233 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _g_object_unref0 (created_views); -#line 1689 "ViewCollection.c" - } else { - GeeCollection* _tmp18_; - GeeIterable* _tmp19_; -#line 242 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp18_ = data_collection_get_all (G_TYPE_CHECK_INSTANCE_CAST (sources, TYPE_DATA_COLLECTION, DataCollection)); -#line 242 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp19_ = G_TYPE_CHECK_INSTANCE_CAST (_tmp18_, GEE_TYPE_ITERABLE, GeeIterable); -#line 242 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - view_collection_add_sources (self, sources, _tmp19_, progress_monitor, progress_monitor_target); -#line 242 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _g_object_unref0 (_tmp19_); -#line 1701 "ViewCollection.c" - } -#line 245 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - data_collection_thaw_notifications (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_DATA_COLLECTION, DataCollection)); -#line 247 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - result = G_TYPE_CHECK_INSTANCE_CAST (monitor, VIEW_COLLECTION_TYPE_MONITOR, ViewCollectionMonitor); -#line 247 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - return result; -#line 1709 "ViewCollection.c" -} - - -static gpointer -_view_collection_monitor_ref0 (gpointer self) -{ -#line 251 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - return self ? view_collection_monitor_ref (self) : NULL; -#line 1718 "ViewCollection.c" -} - - -void -view_collection_halt_monitoring (ViewCollection* self, - ViewCollectionMonitor* m) -{ - ViewCollectionMonitorImpl* monitor = NULL; - ViewCollectionMonitorImpl* _tmp0_; - gboolean removed = FALSE; - GeeHashMultiMap* _tmp1_; - SourceCollection* _tmp2_; -#line 250 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - g_return_if_fail (IS_VIEW_COLLECTION (self)); -#line 250 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - g_return_if_fail (VIEW_COLLECTION_IS_MONITOR (m)); -#line 251 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp0_ = _view_collection_monitor_ref0 (G_TYPE_CHECK_INSTANCE_CAST (m, VIEW_COLLECTION_TYPE_MONITOR_IMPL, ViewCollectionMonitorImpl)); -#line 251 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - monitor = _tmp0_; -#line 253 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp1_ = self->priv->monitors; -#line 253 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp2_ = monitor->sources; -#line 253 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - removed = gee_multi_map_remove (G_TYPE_CHECK_INSTANCE_CAST (_tmp1_, GEE_TYPE_MULTI_MAP, GeeMultiMap), _tmp2_, monitor); -#line 254 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _vala_assert (removed, "removed"); -#line 250 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _view_collection_monitor_unref0 (monitor); -#line 1749 "ViewCollection.c" -} - - -void -view_collection_halt_all_monitoring (ViewCollection* self) -{ - GeeHashMultiMap* _tmp0_; -#line 257 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - g_return_if_fail (IS_VIEW_COLLECTION (self)); -#line 258 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp0_ = self->priv->monitors; -#line 258 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - gee_multi_map_clear (G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, GEE_TYPE_MULTI_MAP, GeeMultiMap)); -#line 1763 "ViewCollection.c" -} - - -static gpointer -_data_collection_ref0 (gpointer self) -{ -#line 267 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - return self ? data_collection_ref (self) : NULL; -#line 1772 "ViewCollection.c" -} - - -static void -_view_collection_on_mirror_contents_added_data_collection_items_added (DataCollection* _sender, - GeeIterable* added, - gpointer self) -{ -#line 275 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - view_collection_on_mirror_contents_added ((ViewCollection*) self, added); -#line 1783 "ViewCollection.c" -} - - -static void -_view_collection_on_mirror_contents_removed_data_collection_items_removed (DataCollection* _sender, - GeeIterable* removed, - gpointer self) -{ -#line 276 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - view_collection_on_mirror_contents_removed ((ViewCollection*) self, removed); -#line 1794 "ViewCollection.c" -} - - -void -view_collection_mirror (ViewCollection* self, - ViewCollection* to_mirror, - CreateView mirroring_ctor, - void* mirroring_ctor_target, - CreateViewPredicate should_mirror, - void* should_mirror_target) -{ - ViewCollection* _tmp0_; - void* _tmp1_; - Comparator _tmp2_; - void* _tmp3_; - ComparatorPredicate _tmp4_; - ViewCollection* _tmp5_; - GeeCollection* _tmp6_; - GeeCollection* _tmp7_; - ViewCollection* _tmp8_; - ViewCollection* _tmp9_; -#line 261 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - g_return_if_fail (IS_VIEW_COLLECTION (self)); -#line 261 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - g_return_if_fail (IS_VIEW_COLLECTION (to_mirror)); -#line 263 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - view_collection_halt_mirroring (self); -#line 264 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - view_collection_halt_all_monitoring (self); -#line 265 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - data_collection_clear (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_DATA_COLLECTION, DataCollection)); -#line 267 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp0_ = _data_collection_ref0 (to_mirror); -#line 267 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _data_collection_unref0 (self->priv->mirroring); -#line 267 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - self->priv->mirroring = _tmp0_; -#line 268 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - self->priv->mirroring_ctor = mirroring_ctor; -#line 268 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - self->priv->mirroring_ctor_target = mirroring_ctor_target; -#line 269 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - self->priv->should_mirror = should_mirror; -#line 269 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - self->priv->should_mirror_target = should_mirror_target; -#line 270 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp2_ = data_collection_get_comparator (G_TYPE_CHECK_INSTANCE_CAST (to_mirror, TYPE_DATA_COLLECTION, DataCollection), &_tmp1_); -#line 270 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp4_ = data_collection_get_comparator_predicate (G_TYPE_CHECK_INSTANCE_CAST (to_mirror, TYPE_DATA_COLLECTION, DataCollection), &_tmp3_); -#line 270 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - data_collection_set_comparator (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_DATA_COLLECTION, DataCollection), _tmp2_, _tmp1_, _tmp4_, _tmp3_); -#line 273 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp5_ = self->priv->mirroring; -#line 273 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp6_ = data_collection_get_all (G_TYPE_CHECK_INSTANCE_CAST (_tmp5_, TYPE_DATA_COLLECTION, DataCollection)); -#line 273 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp7_ = _tmp6_; -#line 273 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - view_collection_on_mirror_contents_added (self, G_TYPE_CHECK_INSTANCE_CAST (_tmp7_, GEE_TYPE_ITERABLE, GeeIterable)); -#line 273 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _g_object_unref0 (_tmp7_); -#line 275 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp8_ = self->priv->mirroring; -#line 275 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - g_signal_connect (G_TYPE_CHECK_INSTANCE_CAST (_tmp8_, TYPE_DATA_COLLECTION, DataCollection), "items-added", (GCallback) _view_collection_on_mirror_contents_added_data_collection_items_added, self); -#line 276 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp9_ = self->priv->mirroring; -#line 276 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - g_signal_connect (G_TYPE_CHECK_INSTANCE_CAST (_tmp9_, TYPE_DATA_COLLECTION, DataCollection), "items-removed", (GCallback) _view_collection_on_mirror_contents_removed_data_collection_items_removed, self); -#line 1864 "ViewCollection.c" -} - - -void -view_collection_halt_mirroring (ViewCollection* self) -{ - ViewCollection* _tmp0_; -#line 279 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - g_return_if_fail (IS_VIEW_COLLECTION (self)); -#line 280 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp0_ = self->priv->mirroring; -#line 280 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - if (_tmp0_ != NULL) { -#line 1878 "ViewCollection.c" - ViewCollection* _tmp1_; - guint _tmp2_; - ViewCollection* _tmp3_; - guint _tmp4_; -#line 281 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp1_ = self->priv->mirroring; -#line 281 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - g_signal_parse_name ("items-added", TYPE_DATA_COLLECTION, &_tmp2_, NULL, FALSE); -#line 281 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - g_signal_handlers_disconnect_matched (G_TYPE_CHECK_INSTANCE_CAST (_tmp1_, TYPE_DATA_COLLECTION, DataCollection), G_SIGNAL_MATCH_ID | G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA, _tmp2_, 0, NULL, (GCallback) _view_collection_on_mirror_contents_added_data_collection_items_added, self); -#line 282 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp3_ = self->priv->mirroring; -#line 282 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - g_signal_parse_name ("items-removed", TYPE_DATA_COLLECTION, &_tmp4_, NULL, FALSE); -#line 282 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - g_signal_handlers_disconnect_matched (G_TYPE_CHECK_INSTANCE_CAST (_tmp3_, TYPE_DATA_COLLECTION, DataCollection), G_SIGNAL_MATCH_ID | G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA, _tmp4_, 0, NULL, (GCallback) _view_collection_on_mirror_contents_removed_data_collection_items_removed, self); -#line 1895 "ViewCollection.c" - } -#line 285 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _data_collection_unref0 (self->priv->mirroring); -#line 285 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - self->priv->mirroring = NULL; -#line 1901 "ViewCollection.c" -} - - -void -view_collection_copy_into (ViewCollection* self, - ViewCollection* to_copy, - CreateView copying_ctor, - void* copying_ctor_target, - CreateViewPredicate should_copy, - void* should_copy_target) -{ - GeeArrayList* copy_view = NULL; - GeeArrayList* _tmp0_; - GeeArrayList* _tmp20_; - GeeCollection* _tmp21_; - GeeCollection* _tmp22_; -#line 288 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - g_return_if_fail (IS_VIEW_COLLECTION (self)); -#line 288 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - g_return_if_fail (IS_VIEW_COLLECTION (to_copy)); -#line 291 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp0_ = gee_array_list_new (TYPE_DATA_OBJECT, (GBoxedCopyFunc) g_object_ref, (GDestroyNotify) g_object_unref, NULL, NULL, NULL); -#line 291 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - copy_view = _tmp0_; -#line 1926 "ViewCollection.c" - { - GeeIterator* _object_it = NULL; - GeeCollection* _tmp1_; - GeeCollection* _tmp2_; - GeeIterator* _tmp3_; - GeeIterator* _tmp4_; -#line 292 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp1_ = data_collection_get_all (G_TYPE_CHECK_INSTANCE_CAST (to_copy, TYPE_DATA_COLLECTION, DataCollection)); -#line 292 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp2_ = _tmp1_; -#line 292 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp3_ = gee_iterable_iterator (G_TYPE_CHECK_INSTANCE_CAST (_tmp2_, GEE_TYPE_ITERABLE, GeeIterable)); -#line 292 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp4_ = _tmp3_; -#line 292 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _g_object_unref0 (_tmp2_); -#line 292 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _object_it = _tmp4_; -#line 292 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - while (TRUE) { -#line 1947 "ViewCollection.c" - GeeIterator* _tmp5_; - DataObject* object = NULL; - GeeIterator* _tmp6_; - gpointer _tmp7_; - DataView* view = NULL; - DataObject* _tmp8_; - DataView* _tmp9_; - DataView* _tmp10_; - DataSource* _tmp11_; - DataSource* _tmp12_; - gboolean _tmp13_; -#line 292 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp5_ = _object_it; -#line 292 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - if (!gee_iterator_next (_tmp5_)) { -#line 292 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - break; -#line 1965 "ViewCollection.c" - } -#line 292 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp6_ = _object_it; -#line 292 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp7_ = gee_iterator_get (_tmp6_); -#line 292 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - object = (DataObject*) _tmp7_; -#line 293 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp8_ = object; -#line 293 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp9_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_CAST (_tmp8_, TYPE_DATA_VIEW, DataView)); -#line 293 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - view = _tmp9_; -#line 294 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp10_ = view; -#line 294 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp11_ = data_view_get_source (_tmp10_); -#line 294 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp12_ = _tmp11_; -#line 294 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp13_ = should_copy (_tmp12_, should_copy_target); -#line 294 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _g_object_unref0 (_tmp12_); -#line 294 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - if (_tmp13_) { -#line 1991 "ViewCollection.c" - GeeArrayList* _tmp14_; - DataView* _tmp15_; - DataSource* _tmp16_; - DataSource* _tmp17_; - DataView* _tmp18_; - DataView* _tmp19_; -#line 295 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp14_ = copy_view; -#line 295 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp15_ = view; -#line 295 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp16_ = data_view_get_source (_tmp15_); -#line 295 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp17_ = _tmp16_; -#line 295 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp18_ = copying_ctor (_tmp17_, copying_ctor_target); -#line 295 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp19_ = _tmp18_; -#line 295 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - gee_abstract_collection_add (G_TYPE_CHECK_INSTANCE_CAST (_tmp14_, GEE_TYPE_ABSTRACT_COLLECTION, GeeAbstractCollection), G_TYPE_CHECK_INSTANCE_CAST (_tmp19_, TYPE_DATA_OBJECT, DataObject)); -#line 295 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _g_object_unref0 (_tmp19_); -#line 295 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _g_object_unref0 (_tmp17_); -#line 2016 "ViewCollection.c" - } -#line 292 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _g_object_unref0 (view); -#line 292 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _g_object_unref0 (object); -#line 2022 "ViewCollection.c" - } -#line 292 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _g_object_unref0 (_object_it); -#line 2026 "ViewCollection.c" - } -#line 298 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp20_ = copy_view; -#line 298 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp21_ = data_collection_add_many (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_DATA_COLLECTION, DataCollection), G_TYPE_CHECK_INSTANCE_CAST (_tmp20_, GEE_TYPE_COLLECTION, GeeCollection), NULL, NULL); -#line 298 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp22_ = _tmp21_; -#line 298 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _g_object_unref0 (_tmp22_); -#line 288 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _g_object_unref0 (copy_view); -#line 2038 "ViewCollection.c" -} - - -gboolean -view_collection_is_view_filter_installed (ViewCollection* self, - ViewFilter* f) -{ - gboolean result = FALSE; - GeeSet* _tmp0_; -#line 301 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - g_return_val_if_fail (IS_VIEW_COLLECTION (self), FALSE); -#line 301 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - g_return_val_if_fail (IS_VIEW_FILTER (f), FALSE); -#line 302 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp0_ = self->priv->filters; -#line 302 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - result = gee_collection_contains (G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, GEE_TYPE_COLLECTION, GeeCollection), f); -#line 302 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - return result; -#line 2058 "ViewCollection.c" -} - - -void -view_collection_install_view_filter (ViewCollection* self, - ViewFilter* f) -{ - GeeSet* _tmp0_; -#line 305 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - g_return_if_fail (IS_VIEW_COLLECTION (self)); -#line 305 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - g_return_if_fail (IS_VIEW_FILTER (f)); -#line 306 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - if (view_collection_is_view_filter_installed (self, f)) { -#line 307 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - return; -#line 2075 "ViewCollection.c" - } -#line 309 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp0_ = self->priv->filters; -#line 309 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - gee_collection_add (G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, GEE_TYPE_COLLECTION, GeeCollection), f); -#line 310 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - g_signal_connect (f, "refresh", (GCallback) _view_collection_on_view_filter_refresh_view_filter_refresh, self); -#line 313 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - view_collection_on_view_filter_refresh (self); -#line 316 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - view_collection_notify_view_filter_installed (self, f); -#line 2087 "ViewCollection.c" -} - - -void -view_collection_remove_view_filter (ViewCollection* self, - ViewFilter* f) -{ - GeeSet* _tmp0_; - guint _tmp1_; -#line 319 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - g_return_if_fail (IS_VIEW_COLLECTION (self)); -#line 319 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - g_return_if_fail (IS_VIEW_FILTER (f)); -#line 320 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - if (!view_collection_is_view_filter_installed (self, f)) { -#line 321 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - return; -#line 2105 "ViewCollection.c" - } -#line 323 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp0_ = self->priv->filters; -#line 323 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - gee_collection_remove (G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, GEE_TYPE_COLLECTION, GeeCollection), f); -#line 324 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - g_signal_parse_name ("refresh", TYPE_VIEW_FILTER, &_tmp1_, NULL, FALSE); -#line 324 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - g_signal_handlers_disconnect_matched (f, G_SIGNAL_MATCH_ID | G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA, _tmp1_, 0, NULL, (GCallback) _view_collection_on_view_filter_refresh_view_filter_refresh, self); -#line 327 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - view_collection_on_view_filter_refresh (self); -#line 330 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - view_collection_notify_view_filter_removed (self, f); -#line 2119 "ViewCollection.c" -} - - -static void -view_collection_on_view_filter_refresh (ViewCollection* self) -{ - GeeCollection* _tmp0_; - GeeCollection* _tmp1_; -#line 333 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - g_return_if_fail (IS_VIEW_COLLECTION (self)); -#line 334 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp0_ = DATA_COLLECTION_CLASS (view_collection_parent_class)->get_all (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_DATA_COLLECTION, DataCollection)); -#line 334 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp1_ = G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, GEE_TYPE_COLLECTION, GeeCollection); -#line 334 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - view_collection_filter_altered_items (self, _tmp1_); -#line 334 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _g_object_unref0 (_tmp1_); -#line 2138 "ViewCollection.c" -} - - -static gboolean -view_collection_is_in_filter (ViewCollection* self, - DataView* view) -{ - gboolean result = FALSE; -#line 338 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - g_return_val_if_fail (IS_VIEW_COLLECTION (self), FALSE); -#line 338 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - g_return_val_if_fail (IS_DATA_VIEW (view), FALSE); -#line 2151 "ViewCollection.c" - { - GeeIterator* _f_it = NULL; - GeeSet* _tmp0_; - GeeIterator* _tmp1_; -#line 339 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp0_ = self->priv->filters; -#line 339 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp1_ = gee_iterable_iterator (G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, GEE_TYPE_ITERABLE, GeeIterable)); -#line 339 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _f_it = _tmp1_; -#line 339 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - while (TRUE) { -#line 2164 "ViewCollection.c" - GeeIterator* _tmp2_; - ViewFilter* f = NULL; - GeeIterator* _tmp3_; - gpointer _tmp4_; - ViewFilter* _tmp5_; -#line 339 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp2_ = _f_it; -#line 339 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - if (!gee_iterator_next (_tmp2_)) { -#line 339 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - break; -#line 2176 "ViewCollection.c" - } -#line 339 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp3_ = _f_it; -#line 339 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp4_ = gee_iterator_get (_tmp3_); -#line 339 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - f = (ViewFilter*) _tmp4_; -#line 340 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp5_ = f; -#line 340 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - if (!view_filter_predicate (_tmp5_, view)) { -#line 341 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - result = FALSE; -#line 341 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _view_filter_unref0 (f); -#line 341 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _g_object_unref0 (_f_it); -#line 341 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - return result; -#line 2196 "ViewCollection.c" - } -#line 339 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _view_filter_unref0 (f); -#line 2200 "ViewCollection.c" - } -#line 339 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _g_object_unref0 (_f_it); -#line 2204 "ViewCollection.c" - } -#line 343 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - result = TRUE; -#line 343 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - return result; -#line 2210 "ViewCollection.c" -} - - -static gboolean -view_collection_real_valid_type (DataCollection* base, - DataObject* object) -{ - ViewCollection * self; - gboolean result = FALSE; -#line 346 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_VIEW_COLLECTION, ViewCollection); -#line 346 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - g_return_val_if_fail (IS_DATA_OBJECT (object), FALSE); -#line 347 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - result = G_TYPE_CHECK_INSTANCE_TYPE (object, TYPE_DATA_VIEW); -#line 347 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - return result; -#line 2228 "ViewCollection.c" -} - - -static void -view_collection_on_sources_added (ViewCollection* self, - DataCollection* sources, - GeeIterable* added) -{ -#line 350 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - g_return_if_fail (IS_VIEW_COLLECTION (self)); -#line 350 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - g_return_if_fail (IS_DATA_COLLECTION (sources)); -#line 350 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - g_return_if_fail (GEE_IS_ITERABLE (added)); -#line 351 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - view_collection_add_sources (self, G_TYPE_CHECK_INSTANCE_CAST (sources, TYPE_SOURCE_COLLECTION, SourceCollection), added, NULL, NULL); -#line 2245 "ViewCollection.c" -} - - -static DataView* -_view_manager_create_view_create_view (DataSource* source, - gpointer self) -{ - DataView* result; - result = view_manager_create_view ((ViewManager*) self, source); -#line 364 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - return result; -#line 2257 "ViewCollection.c" -} - - -static void -view_collection_add_sources (ViewCollection* self, - SourceCollection* sources, - GeeIterable* added, - ProgressMonitor progress_monitor, - void* progress_monitor_target) -{ - DataView* created_view = NULL; - GeeArrayList* created_views = NULL; - DataView* _tmp32_; -#line 354 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - g_return_if_fail (IS_VIEW_COLLECTION (self)); -#line 354 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - g_return_if_fail (IS_SOURCE_COLLECTION (sources)); -#line 354 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - g_return_if_fail (GEE_IS_ITERABLE (added)); -#line 358 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - created_view = NULL; -#line 359 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - created_views = NULL; -#line 2281 "ViewCollection.c" - { - GeeIterator* _source_it = NULL; - GeeIterator* _tmp0_; -#line 360 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp0_ = gee_iterable_iterator (added); -#line 360 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _source_it = _tmp0_; -#line 360 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - while (TRUE) { -#line 2291 "ViewCollection.c" - GeeIterator* _tmp1_; - DataSource* source = NULL; - GeeIterator* _tmp2_; - gpointer _tmp3_; - CreateView factory = NULL; - void* factory_target; - GDestroyNotify factory_target_destroy_notify; - CreateView _tmp17_; - void* _tmp17__target; -#line 360 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp1_ = _source_it; -#line 360 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - if (!gee_iterator_next (_tmp1_)) { -#line 360 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - break; -#line 2307 "ViewCollection.c" - } -#line 360 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp2_ = _source_it; -#line 360 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp3_ = gee_iterator_get (_tmp2_); -#line 360 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - source = (DataSource*) _tmp3_; -#line 361 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - factory = NULL; -#line 361 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - factory_target = NULL; -#line 361 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - factory_target_destroy_notify = NULL; -#line 2321 "ViewCollection.c" - { - GeeIterator* _monitor_it = NULL; - GeeHashMultiMap* _tmp4_; - GeeCollection* _tmp5_; - GeeCollection* _tmp6_; - GeeIterator* _tmp7_; - GeeIterator* _tmp8_; -#line 362 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp4_ = self->priv->monitors; -#line 362 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp5_ = gee_multi_map_get (G_TYPE_CHECK_INSTANCE_CAST (_tmp4_, GEE_TYPE_MULTI_MAP, GeeMultiMap), sources); -#line 362 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp6_ = _tmp5_; -#line 362 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp7_ = gee_iterable_iterator (G_TYPE_CHECK_INSTANCE_CAST (_tmp6_, GEE_TYPE_ITERABLE, GeeIterable)); -#line 362 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp8_ = _tmp7_; -#line 362 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _g_object_unref0 (_tmp6_); -#line 362 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _monitor_it = _tmp8_; -#line 362 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - while (TRUE) { -#line 2345 "ViewCollection.c" - GeeIterator* _tmp9_; - ViewCollectionMonitorImpl* monitor = NULL; - GeeIterator* _tmp10_; - gpointer _tmp11_; - ViewCollectionMonitorImpl* _tmp12_; - ViewManager* _tmp13_; - DataSource* _tmp14_; -#line 362 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp9_ = _monitor_it; -#line 362 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - if (!gee_iterator_next (_tmp9_)) { -#line 362 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - break; -#line 2359 "ViewCollection.c" - } -#line 362 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp10_ = _monitor_it; -#line 362 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp11_ = gee_iterator_get (_tmp10_); -#line 362 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - monitor = (ViewCollectionMonitorImpl*) _tmp11_; -#line 363 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp12_ = monitor; -#line 363 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp13_ = _tmp12_->manager; -#line 363 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp14_ = source; -#line 363 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - if (view_manager_include_in_view (_tmp13_, _tmp14_)) { -#line 2375 "ViewCollection.c" - ViewCollectionMonitorImpl* _tmp15_; - ViewManager* _tmp16_; -#line 364 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp15_ = monitor; -#line 364 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp16_ = _tmp15_->manager; -#line 364 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - (factory_target_destroy_notify == NULL) ? NULL : (factory_target_destroy_notify (factory_target), NULL); -#line 364 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - factory = NULL; -#line 364 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - factory_target = NULL; -#line 364 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - factory_target_destroy_notify = NULL; -#line 364 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - factory = _view_manager_create_view_create_view; -#line 364 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - factory_target = view_manager_ref (_tmp16_); -#line 364 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - factory_target_destroy_notify = view_manager_unref; -#line 366 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _view_collection_monitor_unref0 (monitor); -#line 366 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - break; -#line 2400 "ViewCollection.c" - } -#line 362 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _view_collection_monitor_unref0 (monitor); -#line 2404 "ViewCollection.c" - } -#line 362 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _g_object_unref0 (_monitor_it); -#line 2408 "ViewCollection.c" - } -#line 370 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp17_ = factory; -#line 370 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp17__target = factory_target; -#line 370 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - if (_tmp17_ != NULL) { -#line 2416 "ViewCollection.c" - DataView* new_view = NULL; - CreateView _tmp18_; - void* _tmp18__target; - DataSource* _tmp19_; - DataView* _tmp20_; - GeeArrayList* _tmp21_; -#line 371 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp18_ = factory; -#line 371 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp18__target = factory_target; -#line 371 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp19_ = source; -#line 371 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp20_ = _tmp18_ (_tmp19_, _tmp18__target); -#line 371 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - new_view = _tmp20_; -#line 375 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp21_ = created_views; -#line 375 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - if (_tmp21_ != NULL) { -#line 2437 "ViewCollection.c" - GeeArrayList* _tmp22_; - DataView* _tmp23_; -#line 376 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp22_ = created_views; -#line 376 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp23_ = new_view; -#line 376 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - gee_abstract_collection_add (G_TYPE_CHECK_INSTANCE_CAST (_tmp22_, GEE_TYPE_ABSTRACT_COLLECTION, GeeAbstractCollection), _tmp23_); -#line 2446 "ViewCollection.c" - } else { - DataView* _tmp24_; -#line 377 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp24_ = created_view; -#line 377 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - if (_tmp24_ == NULL) { -#line 2453 "ViewCollection.c" - DataView* _tmp25_; - DataView* _tmp26_; -#line 378 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp25_ = new_view; -#line 378 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp26_ = _g_object_ref0 (_tmp25_); -#line 378 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _g_object_unref0 (created_view); -#line 378 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - created_view = _tmp26_; -#line 2464 "ViewCollection.c" - } else { - GeeArrayList* _tmp27_; - GeeArrayList* _tmp28_; - DataView* _tmp29_; - GeeArrayList* _tmp30_; - DataView* _tmp31_; -#line 380 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp27_ = gee_array_list_new (TYPE_DATA_VIEW, (GBoxedCopyFunc) g_object_ref, (GDestroyNotify) g_object_unref, NULL, NULL, NULL); -#line 380 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _g_object_unref0 (created_views); -#line 380 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - created_views = _tmp27_; -#line 381 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp28_ = created_views; -#line 381 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp29_ = created_view; -#line 381 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - gee_abstract_collection_add (G_TYPE_CHECK_INSTANCE_CAST (_tmp28_, GEE_TYPE_ABSTRACT_COLLECTION, GeeAbstractCollection), _tmp29_); -#line 382 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _g_object_unref0 (created_view); -#line 382 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - created_view = NULL; -#line 383 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp30_ = created_views; -#line 383 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp31_ = new_view; -#line 383 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - gee_abstract_collection_add (G_TYPE_CHECK_INSTANCE_CAST (_tmp30_, GEE_TYPE_ABSTRACT_COLLECTION, GeeAbstractCollection), _tmp31_); -#line 2493 "ViewCollection.c" - } - } -#line 370 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _g_object_unref0 (new_view); -#line 2498 "ViewCollection.c" - } -#line 360 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - (factory_target_destroy_notify == NULL) ? NULL : (factory_target_destroy_notify (factory_target), NULL); -#line 360 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - factory = NULL; -#line 360 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - factory_target = NULL; -#line 360 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - factory_target_destroy_notify = NULL; -#line 360 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _g_object_unref0 (source); -#line 2510 "ViewCollection.c" - } -#line 360 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _g_object_unref0 (_source_it); -#line 2514 "ViewCollection.c" - } -#line 388 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp32_ = created_view; -#line 388 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - if (_tmp32_ != NULL) { -#line 2520 "ViewCollection.c" - DataView* _tmp33_; -#line 389 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp33_ = created_view; -#line 389 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - data_collection_add (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_DATA_COLLECTION, DataCollection), G_TYPE_CHECK_INSTANCE_CAST (_tmp33_, TYPE_DATA_OBJECT, DataObject)); -#line 2526 "ViewCollection.c" - } else { - gboolean _tmp34_ = FALSE; - GeeArrayList* _tmp35_; -#line 390 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp35_ = created_views; -#line 390 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - if (_tmp35_ != NULL) { -#line 2534 "ViewCollection.c" - GeeArrayList* _tmp36_; - gint _tmp37_; - gint _tmp38_; -#line 390 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp36_ = created_views; -#line 390 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp37_ = gee_abstract_collection_get_size (G_TYPE_CHECK_INSTANCE_CAST (_tmp36_, GEE_TYPE_ABSTRACT_COLLECTION, GeeAbstractCollection)); -#line 390 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp38_ = _tmp37_; -#line 390 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp34_ = _tmp38_ > 0; -#line 2546 "ViewCollection.c" - } else { -#line 390 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp34_ = FALSE; -#line 2550 "ViewCollection.c" - } -#line 390 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - if (_tmp34_) { -#line 2554 "ViewCollection.c" - GeeArrayList* _tmp39_; - GeeCollection* _tmp40_; - GeeCollection* _tmp41_; -#line 391 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp39_ = created_views; -#line 391 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp40_ = data_collection_add_many (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_DATA_COLLECTION, DataCollection), G_TYPE_CHECK_INSTANCE_CAST (_tmp39_, GEE_TYPE_COLLECTION, GeeCollection), progress_monitor, progress_monitor_target); -#line 391 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp41_ = _tmp40_; -#line 391 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _g_object_unref0 (_tmp41_); -#line 2566 "ViewCollection.c" - } - } -#line 354 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _g_object_unref0 (created_views); -#line 354 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _g_object_unref0 (created_view); -#line 2573 "ViewCollection.c" -} - - -static gboolean -view_collection_real_add (DataCollection* base, - DataObject* object) -{ - ViewCollection * self; - gboolean result = FALSE; - GeeCollection* _tmp0_; - GeeCollection* _tmp1_; -#line 394 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_VIEW_COLLECTION, ViewCollection); -#line 394 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - g_return_val_if_fail (IS_DATA_OBJECT (object), FALSE); -#line 395 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - data_view_internal_set_visible (G_TYPE_CHECK_INSTANCE_CAST (object, TYPE_DATA_VIEW, DataView), TRUE); -#line 397 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - if (!DATA_COLLECTION_CLASS (view_collection_parent_class)->add (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_DATA_COLLECTION, DataCollection), object)) { -#line 398 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - result = FALSE; -#line 398 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - return result; -#line 2597 "ViewCollection.c" - } -#line 400 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp0_ = data_collection_get_singleton (object); -#line 400 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp1_ = G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, GEE_TYPE_COLLECTION, GeeCollection); -#line 400 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - view_collection_filter_altered_items (self, _tmp1_); -#line 400 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _g_object_unref0 (_tmp1_); -#line 402 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - result = TRUE; -#line 402 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - return result; -#line 2611 "ViewCollection.c" -} - - -static GeeCollection* -view_collection_real_add_many (DataCollection* base, - GeeCollection* objects, - ProgressMonitor monitor, - void* monitor_target) -{ - ViewCollection * self; - GeeCollection* result = NULL; - GeeCollection* return_list = NULL; - GeeCollection* _tmp5_; -#line 405 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_VIEW_COLLECTION, ViewCollection); -#line 405 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - g_return_val_if_fail (GEE_IS_COLLECTION (objects), NULL); -#line 2629 "ViewCollection.c" - { - GeeIterator* _object_it = NULL; - GeeIterator* _tmp0_; -#line 407 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp0_ = gee_iterable_iterator (G_TYPE_CHECK_INSTANCE_CAST (objects, GEE_TYPE_ITERABLE, GeeIterable)); -#line 407 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _object_it = _tmp0_; -#line 407 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - while (TRUE) { -#line 2639 "ViewCollection.c" - GeeIterator* _tmp1_; - DataObject* object = NULL; - GeeIterator* _tmp2_; - gpointer _tmp3_; - DataObject* _tmp4_; -#line 407 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp1_ = _object_it; -#line 407 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - if (!gee_iterator_next (_tmp1_)) { -#line 407 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - break; -#line 2651 "ViewCollection.c" - } -#line 407 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp2_ = _object_it; -#line 407 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp3_ = gee_iterator_get (_tmp2_); -#line 407 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - object = (DataObject*) _tmp3_; -#line 408 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp4_ = object; -#line 408 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - data_view_internal_set_visible (G_TYPE_CHECK_INSTANCE_CAST (_tmp4_, TYPE_DATA_VIEW, DataView), TRUE); -#line 407 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _g_object_unref0 (object); -#line 2665 "ViewCollection.c" - } -#line 407 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _g_object_unref0 (_object_it); -#line 2669 "ViewCollection.c" - } -#line 410 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp5_ = DATA_COLLECTION_CLASS (view_collection_parent_class)->add_many (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_DATA_COLLECTION, DataCollection), objects, monitor, monitor_target); -#line 410 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - return_list = _tmp5_; -#line 412 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - view_collection_filter_altered_items (self, G_TYPE_CHECK_INSTANCE_CAST (return_list, GEE_TYPE_COLLECTION, GeeCollection)); -#line 414 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - result = return_list; -#line 414 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - return result; -#line 2681 "ViewCollection.c" -} - - -static void -view_collection_on_sources_removed (ViewCollection* self, - GeeIterable* removed) -{ - Marker* marker = NULL; - gboolean _tmp12_ = FALSE; - Marker* _tmp13_; -#line 417 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - g_return_if_fail (IS_VIEW_COLLECTION (self)); -#line 417 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - g_return_if_fail (GEE_IS_ITERABLE (removed)); -#line 419 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - marker = NULL; -#line 2698 "ViewCollection.c" - { - GeeIterator* _source_it = NULL; - GeeIterator* _tmp0_; -#line 420 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp0_ = gee_iterable_iterator (removed); -#line 420 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _source_it = _tmp0_; -#line 420 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - while (TRUE) { -#line 2708 "ViewCollection.c" - GeeIterator* _tmp1_; - DataSource* source = NULL; - GeeIterator* _tmp2_; - gpointer _tmp3_; - DataView* view = NULL; - GeeHashMap* _tmp4_; - DataSource* _tmp5_; - gpointer _tmp6_; - DataView* _tmp7_; -#line 420 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp1_ = _source_it; -#line 420 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - if (!gee_iterator_next (_tmp1_)) { -#line 420 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - break; -#line 2724 "ViewCollection.c" - } -#line 420 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp2_ = _source_it; -#line 420 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp3_ = gee_iterator_get (_tmp2_); -#line 420 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - source = (DataSource*) _tmp3_; -#line 421 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp4_ = self->priv->source_map; -#line 421 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp5_ = source; -#line 421 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp6_ = gee_abstract_map_get (G_TYPE_CHECK_INSTANCE_CAST (_tmp4_, GEE_TYPE_ABSTRACT_MAP, GeeAbstractMap), _tmp5_); -#line 421 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - view = (DataView*) _tmp6_; -#line 424 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp7_ = view; -#line 424 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - if (_tmp7_ != NULL) { -#line 2744 "ViewCollection.c" - Marker* _tmp8_; - Marker* _tmp10_; - DataView* _tmp11_; -#line 425 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp8_ = marker; -#line 425 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - if (_tmp8_ == NULL) { -#line 2752 "ViewCollection.c" - Marker* _tmp9_; -#line 426 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp9_ = data_collection_start_marking (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_DATA_COLLECTION, DataCollection)); -#line 426 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _g_object_unref0 (marker); -#line 426 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - marker = _tmp9_; -#line 2760 "ViewCollection.c" - } -#line 428 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp10_ = marker; -#line 428 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp11_ = view; -#line 428 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - marker_mark (_tmp10_, G_TYPE_CHECK_INSTANCE_CAST (_tmp11_, TYPE_DATA_OBJECT, DataObject)); -#line 2768 "ViewCollection.c" - } -#line 420 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _g_object_unref0 (view); -#line 420 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _g_object_unref0 (source); -#line 2774 "ViewCollection.c" - } -#line 420 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _g_object_unref0 (_source_it); -#line 2778 "ViewCollection.c" - } -#line 432 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp13_ = marker; -#line 432 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - if (_tmp13_ != NULL) { -#line 2784 "ViewCollection.c" - Marker* _tmp14_; -#line 432 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp14_ = marker; -#line 432 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp12_ = marker_get_count (_tmp14_) != 0; -#line 2790 "ViewCollection.c" - } else { -#line 432 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp12_ = FALSE; -#line 2794 "ViewCollection.c" - } -#line 432 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - if (_tmp12_) { -#line 2798 "ViewCollection.c" - Marker* _tmp15_; -#line 433 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp15_ = marker; -#line 433 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - data_collection_remove_marked (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_DATA_COLLECTION, DataCollection), _tmp15_); -#line 2804 "ViewCollection.c" - } -#line 417 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _g_object_unref0 (marker); -#line 2808 "ViewCollection.c" -} - - -static void -view_collection_on_sources_altered (ViewCollection* self, - DataCollection* collection, - GeeMap* items) -{ - GeeArrayList* to_add = NULL; - GeeArrayList* to_remove = NULL; - gboolean ordering_changed = FALSE; - GeeArrayList* _tmp69_; - GeeArrayList* _tmp73_; - gboolean _tmp77_; -#line 436 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - g_return_if_fail (IS_VIEW_COLLECTION (self)); -#line 436 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - g_return_if_fail (IS_DATA_COLLECTION (collection)); -#line 436 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - g_return_if_fail (GEE_IS_MAP (items)); -#line 439 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - to_add = NULL; -#line 440 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - to_remove = NULL; -#line 441 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - ordering_changed = FALSE; -#line 2835 "ViewCollection.c" - { - GeeIterator* _object_it = NULL; - GeeSet* _tmp0_; - GeeSet* _tmp1_; - GeeSet* _tmp2_; - GeeIterator* _tmp3_; - GeeIterator* _tmp4_; -#line 442 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp0_ = gee_map_get_keys (items); -#line 442 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp1_ = _tmp0_; -#line 442 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp2_ = _tmp1_; -#line 442 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp3_ = gee_iterable_iterator (G_TYPE_CHECK_INSTANCE_CAST (_tmp2_, GEE_TYPE_ITERABLE, GeeIterable)); -#line 442 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp4_ = _tmp3_; -#line 442 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _g_object_unref0 (_tmp2_); -#line 442 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _object_it = _tmp4_; -#line 442 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - while (TRUE) { -#line 2859 "ViewCollection.c" - GeeIterator* _tmp5_; - DataObject* object = NULL; - GeeIterator* _tmp6_; - gpointer _tmp7_; - Alteration* alteration = NULL; - DataObject* _tmp8_; - gpointer _tmp9_; - DataSource* source = NULL; - DataObject* _tmp10_; - DataSource* _tmp11_; - ViewCollectionMonitorImpl* monitor = NULL; - gboolean ignored = FALSE; - gboolean _tmp31_; - gboolean _tmp33_ = FALSE; - ViewCollectionMonitorImpl* _tmp34_; -#line 442 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp5_ = _object_it; -#line 442 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - if (!gee_iterator_next (_tmp5_)) { -#line 442 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - break; -#line 2881 "ViewCollection.c" - } -#line 442 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp6_ = _object_it; -#line 442 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp7_ = gee_iterator_get (_tmp6_); -#line 442 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - object = (DataObject*) _tmp7_; -#line 443 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp8_ = object; -#line 443 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp9_ = gee_map_get (items, _tmp8_); -#line 443 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - alteration = (Alteration*) _tmp9_; -#line 444 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp10_ = object; -#line 444 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp11_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_CAST (_tmp10_, TYPE_DATA_SOURCE, DataSource)); -#line 444 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - source = _tmp11_; -#line 446 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - monitor = NULL; -#line 447 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - ignored = TRUE; -#line 2905 "ViewCollection.c" - { - GeeIterator* _monitor_impl_it = NULL; - GeeHashMultiMap* _tmp12_; - GeeCollection* _tmp13_; - GeeCollection* _tmp14_; - GeeIterator* _tmp15_; - GeeIterator* _tmp16_; -#line 448 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp12_ = self->priv->monitors; -#line 448 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp13_ = gee_multi_map_get (G_TYPE_CHECK_INSTANCE_CAST (_tmp12_, GEE_TYPE_MULTI_MAP, GeeMultiMap), G_TYPE_CHECK_INSTANCE_CAST (collection, TYPE_SOURCE_COLLECTION, SourceCollection)); -#line 448 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp14_ = _tmp13_; -#line 448 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp15_ = gee_iterable_iterator (G_TYPE_CHECK_INSTANCE_CAST (_tmp14_, GEE_TYPE_ITERABLE, GeeIterable)); -#line 448 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp16_ = _tmp15_; -#line 448 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _g_object_unref0 (_tmp14_); -#line 448 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _monitor_impl_it = _tmp16_; -#line 448 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - while (TRUE) { -#line 2929 "ViewCollection.c" - GeeIterator* _tmp17_; - ViewCollectionMonitorImpl* monitor_impl = NULL; - GeeIterator* _tmp18_; - gpointer _tmp19_; - gboolean _tmp20_ = FALSE; - ViewCollectionMonitorImpl* _tmp21_; - Alteration* _tmp22_; - ViewCollectionMonitorImpl* _tmp26_; - ViewManager* _tmp27_; - DataSource* _tmp28_; -#line 448 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp17_ = _monitor_impl_it; -#line 448 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - if (!gee_iterator_next (_tmp17_)) { -#line 448 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - break; -#line 2946 "ViewCollection.c" - } -#line 448 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp18_ = _monitor_impl_it; -#line 448 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp19_ = gee_iterator_get (_tmp18_); -#line 448 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - monitor_impl = (ViewCollectionMonitorImpl*) _tmp19_; -#line 449 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp21_ = monitor_impl; -#line 449 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp22_ = _tmp21_->prereq; -#line 449 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - if (_tmp22_ != NULL) { -#line 2960 "ViewCollection.c" - Alteration* _tmp23_; - ViewCollectionMonitorImpl* _tmp24_; - Alteration* _tmp25_; -#line 449 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp23_ = alteration; -#line 449 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp24_ = monitor_impl; -#line 449 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp25_ = _tmp24_->prereq; -#line 449 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp20_ = !alteration_contains_any (_tmp23_, _tmp25_); -#line 2972 "ViewCollection.c" - } else { -#line 449 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp20_ = FALSE; -#line 2976 "ViewCollection.c" - } -#line 449 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - if (_tmp20_) { -#line 450 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _view_collection_monitor_unref0 (monitor_impl); -#line 450 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - continue; -#line 2984 "ViewCollection.c" - } -#line 452 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - ignored = FALSE; -#line 454 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp26_ = monitor_impl; -#line 454 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp27_ = _tmp26_->manager; -#line 454 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp28_ = source; -#line 454 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - if (view_manager_include_in_view (_tmp27_, _tmp28_)) { -#line 2996 "ViewCollection.c" - ViewCollectionMonitorImpl* _tmp29_; - ViewCollectionMonitorImpl* _tmp30_; -#line 455 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp29_ = monitor_impl; -#line 455 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp30_ = _view_collection_monitor_ref0 (_tmp29_); -#line 455 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _view_collection_monitor_unref0 (monitor); -#line 455 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - monitor = _tmp30_; -#line 457 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _view_collection_monitor_unref0 (monitor_impl); -#line 457 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - break; -#line 3011 "ViewCollection.c" - } -#line 448 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _view_collection_monitor_unref0 (monitor_impl); -#line 3015 "ViewCollection.c" - } -#line 448 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _g_object_unref0 (_monitor_impl_it); -#line 3019 "ViewCollection.c" - } -#line 461 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp31_ = ignored; -#line 461 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - if (_tmp31_) { -#line 3025 "ViewCollection.c" - ViewCollectionMonitorImpl* _tmp32_; -#line 462 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp32_ = monitor; -#line 462 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _vala_assert (_tmp32_ == NULL, "monitor == null"); -#line 464 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _view_collection_monitor_unref0 (monitor); -#line 464 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _g_object_unref0 (source); -#line 464 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _alteration_unref0 (alteration); -#line 464 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _g_object_unref0 (object); -#line 464 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - continue; -#line 3041 "ViewCollection.c" - } -#line 467 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp34_ = monitor; -#line 467 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - if (_tmp34_ != NULL) { -#line 3047 "ViewCollection.c" - DataSource* _tmp35_; -#line 467 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp35_ = source; -#line 467 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp33_ = !view_collection_has_view_for_source (self, _tmp35_); -#line 3053 "ViewCollection.c" - } else { -#line 467 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp33_ = FALSE; -#line 3057 "ViewCollection.c" - } -#line 467 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - if (_tmp33_) { -#line 3061 "ViewCollection.c" - GeeArrayList* _tmp36_; - GeeArrayList* _tmp38_; - ViewCollectionMonitorImpl* _tmp39_; - ViewManager* _tmp40_; - DataSource* _tmp41_; - DataView* _tmp42_; - DataView* _tmp43_; -#line 468 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp36_ = to_add; -#line 468 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - if (_tmp36_ == NULL) { -#line 3073 "ViewCollection.c" - GeeArrayList* _tmp37_; -#line 469 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp37_ = gee_array_list_new (TYPE_DATA_VIEW, (GBoxedCopyFunc) g_object_ref, (GDestroyNotify) g_object_unref, NULL, NULL, NULL); -#line 469 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _g_object_unref0 (to_add); -#line 469 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - to_add = _tmp37_; -#line 3081 "ViewCollection.c" - } -#line 471 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp38_ = to_add; -#line 471 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp39_ = monitor; -#line 471 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp40_ = _tmp39_->manager; -#line 471 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp41_ = source; -#line 471 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp42_ = view_manager_create_view (_tmp40_, _tmp41_); -#line 471 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp43_ = _tmp42_; -#line 471 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - gee_abstract_collection_add (G_TYPE_CHECK_INSTANCE_CAST (_tmp38_, GEE_TYPE_ABSTRACT_COLLECTION, GeeAbstractCollection), _tmp43_); -#line 471 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _g_object_unref0 (_tmp43_); -#line 3099 "ViewCollection.c" - } else { - gboolean _tmp44_ = FALSE; - ViewCollectionMonitorImpl* _tmp45_; -#line 472 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp45_ = monitor; -#line 472 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - if (_tmp45_ == NULL) { -#line 3107 "ViewCollection.c" - DataSource* _tmp46_; -#line 472 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp46_ = source; -#line 472 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp44_ = view_collection_has_view_for_source (self, _tmp46_); -#line 3113 "ViewCollection.c" - } else { -#line 472 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp44_ = FALSE; -#line 3117 "ViewCollection.c" - } -#line 472 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - if (_tmp44_) { -#line 3121 "ViewCollection.c" - GeeArrayList* _tmp47_; - GeeArrayList* _tmp49_; - DataSource* _tmp50_; - DataView* _tmp51_; - DataView* _tmp52_; -#line 473 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp47_ = to_remove; -#line 473 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - if (_tmp47_ == NULL) { -#line 3131 "ViewCollection.c" - GeeArrayList* _tmp48_; -#line 474 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp48_ = gee_array_list_new (TYPE_DATA_VIEW, (GBoxedCopyFunc) g_object_ref, (GDestroyNotify) g_object_unref, NULL, NULL, NULL); -#line 474 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _g_object_unref0 (to_remove); -#line 474 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - to_remove = _tmp48_; -#line 3139 "ViewCollection.c" - } -#line 476 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp49_ = to_remove; -#line 476 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp50_ = source; -#line 476 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp51_ = view_collection_get_view_for_source (self, _tmp50_); -#line 476 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp52_ = _tmp51_; -#line 476 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - gee_abstract_collection_add (G_TYPE_CHECK_INSTANCE_CAST (_tmp49_, GEE_TYPE_ABSTRACT_COLLECTION, GeeAbstractCollection), _tmp52_); -#line 476 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _g_object_unref0 (_tmp52_); -#line 3153 "ViewCollection.c" - } else { - gboolean _tmp53_ = FALSE; - ViewCollectionMonitorImpl* _tmp54_; -#line 477 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp54_ = monitor; -#line 477 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - if (_tmp54_ != NULL) { -#line 3161 "ViewCollection.c" - DataSource* _tmp55_; -#line 477 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp55_ = source; -#line 477 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp53_ = view_collection_has_view_for_source (self, _tmp55_); -#line 3167 "ViewCollection.c" - } else { -#line 477 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp53_ = FALSE; -#line 3171 "ViewCollection.c" - } -#line 477 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - if (_tmp53_) { -#line 3175 "ViewCollection.c" - DataView* view = NULL; - DataSource* _tmp56_; - DataView* _tmp57_; - DataSet* _tmp58_; - DataView* _tmp59_; - gboolean _tmp63_ = FALSE; - DataSet* _tmp64_; -#line 478 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp56_ = source; -#line 478 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp57_ = view_collection_get_view_for_source (self, _tmp56_); -#line 478 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - view = _tmp57_; -#line 480 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp58_ = self->priv->selected; -#line 480 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp59_ = view; -#line 480 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - if (data_set_contains (_tmp58_, G_TYPE_CHECK_INSTANCE_CAST (_tmp59_, TYPE_DATA_OBJECT, DataObject))) { -#line 3195 "ViewCollection.c" - DataSet* _tmp60_; - DataView* _tmp61_; - Alteration* _tmp62_; -#line 481 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp60_ = self->priv->selected; -#line 481 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp61_ = view; -#line 481 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp62_ = alteration; -#line 481 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - data_set_resort_object (_tmp60_, G_TYPE_CHECK_INSTANCE_CAST (_tmp61_, TYPE_DATA_OBJECT, DataObject), _tmp62_); -#line 3207 "ViewCollection.c" - } -#line 483 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp64_ = self->priv->visible; -#line 483 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - if (_tmp64_ != NULL) { -#line 3213 "ViewCollection.c" - DataView* _tmp65_; -#line 483 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp65_ = view; -#line 483 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp63_ = view_collection_is_visible (self, _tmp65_); -#line 3219 "ViewCollection.c" - } else { -#line 483 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp63_ = FALSE; -#line 3223 "ViewCollection.c" - } -#line 483 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - if (_tmp63_) { -#line 3227 "ViewCollection.c" - DataSet* _tmp66_; - DataView* _tmp67_; - Alteration* _tmp68_; -#line 484 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp66_ = self->priv->visible; -#line 484 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp67_ = view; -#line 484 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp68_ = alteration; -#line 484 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - if (data_set_resort_object (_tmp66_, G_TYPE_CHECK_INSTANCE_CAST (_tmp67_, TYPE_DATA_OBJECT, DataObject), _tmp68_)) { -#line 485 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - ordering_changed = TRUE; -#line 3241 "ViewCollection.c" - } - } -#line 477 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _g_object_unref0 (view); -#line 3246 "ViewCollection.c" - } - } - } -#line 442 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _view_collection_monitor_unref0 (monitor); -#line 442 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _g_object_unref0 (source); -#line 442 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _alteration_unref0 (alteration); -#line 442 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _g_object_unref0 (object); -#line 3258 "ViewCollection.c" - } -#line 442 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _g_object_unref0 (_object_it); -#line 3262 "ViewCollection.c" - } -#line 490 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp69_ = to_add; -#line 490 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - if (_tmp69_ != NULL) { -#line 3268 "ViewCollection.c" - GeeArrayList* _tmp70_; - GeeCollection* _tmp71_; - GeeCollection* _tmp72_; -#line 491 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp70_ = to_add; -#line 491 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp71_ = data_collection_add_many (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_DATA_COLLECTION, DataCollection), G_TYPE_CHECK_INSTANCE_CAST (_tmp70_, GEE_TYPE_COLLECTION, GeeCollection), NULL, NULL); -#line 491 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp72_ = _tmp71_; -#line 491 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _g_object_unref0 (_tmp72_); -#line 3280 "ViewCollection.c" - } -#line 493 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp73_ = to_remove; -#line 493 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - if (_tmp73_ != NULL) { -#line 3286 "ViewCollection.c" - GeeArrayList* _tmp74_; - Marker* _tmp75_; - Marker* _tmp76_; -#line 494 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp74_ = to_remove; -#line 494 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp75_ = data_collection_mark_many (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_DATA_COLLECTION, DataCollection), G_TYPE_CHECK_INSTANCE_CAST (_tmp74_, GEE_TYPE_COLLECTION, GeeCollection)); -#line 494 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp76_ = _tmp75_; -#line 494 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - data_collection_remove_marked (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_DATA_COLLECTION, DataCollection), _tmp76_); -#line 494 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _g_object_unref0 (_tmp76_); -#line 3300 "ViewCollection.c" - } -#line 496 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp77_ = ordering_changed; -#line 496 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - if (_tmp77_) { -#line 497 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - data_collection_notify_ordering_changed (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_DATA_COLLECTION, DataCollection)); -#line 3308 "ViewCollection.c" - } -#line 436 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _g_object_unref0 (to_remove); -#line 436 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _g_object_unref0 (to_add); -#line 3314 "ViewCollection.c" -} - - -static void -view_collection_on_mirror_contents_added (ViewCollection* self, - GeeIterable* added) -{ - GeeArrayList* to_add = NULL; - GeeArrayList* _tmp0_; - GeeArrayList* _tmp16_; - gint _tmp17_; - gint _tmp18_; -#line 500 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - g_return_if_fail (IS_VIEW_COLLECTION (self)); -#line 500 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - g_return_if_fail (GEE_IS_ITERABLE (added)); -#line 501 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp0_ = gee_array_list_new (TYPE_DATA_VIEW, (GBoxedCopyFunc) g_object_ref, (GDestroyNotify) g_object_unref, NULL, NULL, NULL); -#line 501 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - to_add = _tmp0_; -#line 3335 "ViewCollection.c" - { - GeeIterator* _object_it = NULL; - GeeIterator* _tmp1_; -#line 502 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp1_ = gee_iterable_iterator (added); -#line 502 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _object_it = _tmp1_; -#line 502 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - while (TRUE) { -#line 3345 "ViewCollection.c" - GeeIterator* _tmp2_; - DataObject* object = NULL; - GeeIterator* _tmp3_; - gpointer _tmp4_; - DataSource* source = NULL; - DataObject* _tmp5_; - DataSource* _tmp6_; - gboolean _tmp7_ = FALSE; - CreateViewPredicate _tmp8_; - void* _tmp8__target; -#line 502 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp2_ = _object_it; -#line 502 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - if (!gee_iterator_next (_tmp2_)) { -#line 502 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - break; -#line 3362 "ViewCollection.c" - } -#line 502 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp3_ = _object_it; -#line 502 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp4_ = gee_iterator_get (_tmp3_); -#line 502 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - object = (DataObject*) _tmp4_; -#line 503 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp5_ = object; -#line 503 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp6_ = data_view_get_source (G_TYPE_CHECK_INSTANCE_CAST (_tmp5_, TYPE_DATA_VIEW, DataView)); -#line 503 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - source = _tmp6_; -#line 505 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp8_ = self->priv->should_mirror; -#line 505 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp8__target = self->priv->should_mirror_target; -#line 505 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - if (_tmp8_ == NULL) { -#line 505 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp7_ = TRUE; -#line 3384 "ViewCollection.c" - } else { - CreateViewPredicate _tmp9_; - void* _tmp9__target; - DataSource* _tmp10_; -#line 505 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp9_ = self->priv->should_mirror; -#line 505 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp9__target = self->priv->should_mirror_target; -#line 505 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp10_ = source; -#line 505 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp7_ = _tmp9_ (_tmp10_, _tmp9__target); -#line 3397 "ViewCollection.c" - } -#line 505 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - if (_tmp7_) { -#line 3401 "ViewCollection.c" - GeeArrayList* _tmp11_; - CreateView _tmp12_; - void* _tmp12__target; - DataSource* _tmp13_; - DataView* _tmp14_; - DataView* _tmp15_; -#line 506 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp11_ = to_add; -#line 506 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp12_ = self->priv->mirroring_ctor; -#line 506 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp12__target = self->priv->mirroring_ctor_target; -#line 506 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp13_ = source; -#line 506 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp14_ = _tmp12_ (_tmp13_, _tmp12__target); -#line 506 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp15_ = _tmp14_; -#line 506 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - gee_abstract_collection_add (G_TYPE_CHECK_INSTANCE_CAST (_tmp11_, GEE_TYPE_ABSTRACT_COLLECTION, GeeAbstractCollection), _tmp15_); -#line 506 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _g_object_unref0 (_tmp15_); -#line 3424 "ViewCollection.c" - } -#line 502 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _g_object_unref0 (source); -#line 502 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _g_object_unref0 (object); -#line 3430 "ViewCollection.c" - } -#line 502 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _g_object_unref0 (_object_it); -#line 3434 "ViewCollection.c" - } -#line 509 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp16_ = to_add; -#line 509 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp17_ = gee_abstract_collection_get_size (G_TYPE_CHECK_INSTANCE_CAST (_tmp16_, GEE_TYPE_ABSTRACT_COLLECTION, GeeAbstractCollection)); -#line 509 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp18_ = _tmp17_; -#line 509 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - if (_tmp18_ > 0) { -#line 3444 "ViewCollection.c" - GeeArrayList* _tmp19_; - GeeCollection* _tmp20_; - GeeCollection* _tmp21_; -#line 510 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp19_ = to_add; -#line 510 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp20_ = data_collection_add_many (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_DATA_COLLECTION, DataCollection), G_TYPE_CHECK_INSTANCE_CAST (_tmp19_, GEE_TYPE_COLLECTION, GeeCollection), NULL, NULL); -#line 510 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp21_ = _tmp20_; -#line 510 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _g_object_unref0 (_tmp21_); -#line 3456 "ViewCollection.c" - } -#line 500 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _g_object_unref0 (to_add); -#line 3460 "ViewCollection.c" -} - - -static void -view_collection_on_mirror_contents_removed (ViewCollection* self, - GeeIterable* removed) -{ - Marker* marker = NULL; - Marker* _tmp0_; - Marker* _tmp15_; -#line 513 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - g_return_if_fail (IS_VIEW_COLLECTION (self)); -#line 513 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - g_return_if_fail (GEE_IS_ITERABLE (removed)); -#line 514 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp0_ = data_collection_start_marking (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_DATA_COLLECTION, DataCollection)); -#line 514 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - marker = _tmp0_; -#line 3479 "ViewCollection.c" - { - GeeIterator* _object_it = NULL; - GeeIterator* _tmp1_; -#line 515 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp1_ = gee_iterable_iterator (removed); -#line 515 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _object_it = _tmp1_; -#line 515 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - while (TRUE) { -#line 3489 "ViewCollection.c" - GeeIterator* _tmp2_; - DataObject* object = NULL; - GeeIterator* _tmp3_; - gpointer _tmp4_; - DataView* view = NULL; - DataObject* _tmp5_; - DataView* _tmp6_; - DataView* our_view = NULL; - DataView* _tmp7_; - DataSource* _tmp8_; - DataSource* _tmp9_; - DataView* _tmp10_; - DataView* _tmp11_; - DataView* _tmp12_; - Marker* _tmp13_; - DataView* _tmp14_; -#line 515 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp2_ = _object_it; -#line 515 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - if (!gee_iterator_next (_tmp2_)) { -#line 515 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - break; -#line 3512 "ViewCollection.c" - } -#line 515 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp3_ = _object_it; -#line 515 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp4_ = gee_iterator_get (_tmp3_); -#line 515 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - object = (DataObject*) _tmp4_; -#line 516 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp5_ = object; -#line 516 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp6_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_CAST (_tmp5_, TYPE_DATA_VIEW, DataView)); -#line 516 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - view = _tmp6_; -#line 518 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp7_ = view; -#line 518 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp8_ = data_view_get_source (_tmp7_); -#line 518 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp9_ = _tmp8_; -#line 518 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp10_ = view_collection_get_view_for_source (self, _tmp9_); -#line 518 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp11_ = _tmp10_; -#line 518 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _g_object_unref0 (_tmp9_); -#line 518 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - our_view = _tmp11_; -#line 519 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp12_ = our_view; -#line 519 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _vala_assert (_tmp12_ != NULL, "our_view != null"); -#line 521 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp13_ = marker; -#line 521 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp14_ = our_view; -#line 521 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - marker_mark (_tmp13_, G_TYPE_CHECK_INSTANCE_CAST (_tmp14_, TYPE_DATA_OBJECT, DataObject)); -#line 515 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _g_object_unref0 (our_view); -#line 515 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _g_object_unref0 (view); -#line 515 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _g_object_unref0 (object); -#line 3556 "ViewCollection.c" - } -#line 515 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _g_object_unref0 (_object_it); -#line 3560 "ViewCollection.c" - } -#line 524 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp15_ = marker; -#line 524 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - data_collection_remove_marked (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_DATA_COLLECTION, DataCollection), _tmp15_); -#line 513 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _g_object_unref0 (marker); -#line 3568 "ViewCollection.c" -} - - -static void -view_collection_real_notify_items_added (DataCollection* base, - GeeIterable* added) -{ - ViewCollection * self; - GeeArrayList* added_visible = NULL; - GeeArrayList* added_selected = NULL; - GeeArrayList* _tmp25_; - GeeArrayList* _tmp28_; -#line 528 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_VIEW_COLLECTION, ViewCollection); -#line 528 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - g_return_if_fail (GEE_IS_ITERABLE (added)); -#line 529 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - added_visible = NULL; -#line 530 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - added_selected = NULL; -#line 3589 "ViewCollection.c" - { - GeeIterator* _object_it = NULL; - GeeIterator* _tmp0_; -#line 532 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp0_ = gee_iterable_iterator (added); -#line 532 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _object_it = _tmp0_; -#line 532 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - while (TRUE) { -#line 3599 "ViewCollection.c" - GeeIterator* _tmp1_; - DataObject* object = NULL; - GeeIterator* _tmp2_; - gpointer _tmp3_; - DataView* view = NULL; - DataObject* _tmp4_; - DataView* _tmp5_; - GeeHashMap* _tmp6_; - DataView* _tmp7_; - DataSource* _tmp8_; - DataSource* _tmp9_; - DataView* _tmp10_; - gboolean _tmp11_ = FALSE; - DataView* _tmp12_; - gboolean _tmp18_ = FALSE; - DataView* _tmp19_; -#line 532 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp1_ = _object_it; -#line 532 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - if (!gee_iterator_next (_tmp1_)) { -#line 532 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - break; -#line 3622 "ViewCollection.c" - } -#line 532 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp2_ = _object_it; -#line 532 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp3_ = gee_iterator_get (_tmp2_); -#line 532 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - object = (DataObject*) _tmp3_; -#line 533 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp4_ = object; -#line 533 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp5_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_CAST (_tmp4_, TYPE_DATA_VIEW, DataView)); -#line 533 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - view = _tmp5_; -#line 534 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp6_ = self->priv->source_map; -#line 534 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp7_ = view; -#line 534 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp8_ = data_view_get_source (_tmp7_); -#line 534 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp9_ = _tmp8_; -#line 534 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp10_ = view; -#line 534 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - gee_abstract_map_set (G_TYPE_CHECK_INSTANCE_CAST (_tmp6_, GEE_TYPE_ABSTRACT_MAP, GeeAbstractMap), _tmp9_, _tmp10_); -#line 534 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _g_object_unref0 (_tmp9_); -#line 536 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp12_ = view; -#line 536 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - if (data_view_is_selected (_tmp12_)) { -#line 3654 "ViewCollection.c" - DataView* _tmp13_; -#line 536 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp13_ = view; -#line 536 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp11_ = data_view_is_visible (_tmp13_); -#line 3660 "ViewCollection.c" - } else { -#line 536 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp11_ = FALSE; -#line 3664 "ViewCollection.c" - } -#line 536 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - if (_tmp11_) { -#line 3668 "ViewCollection.c" - GeeArrayList* _tmp14_; - GeeArrayList* _tmp16_; - DataView* _tmp17_; -#line 537 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp14_ = added_selected; -#line 537 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - if (_tmp14_ == NULL) { -#line 3676 "ViewCollection.c" - GeeArrayList* _tmp15_; -#line 538 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp15_ = gee_array_list_new (TYPE_DATA_VIEW, (GBoxedCopyFunc) g_object_ref, (GDestroyNotify) g_object_unref, NULL, NULL, NULL); -#line 538 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _g_object_unref0 (added_selected); -#line 538 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - added_selected = _tmp15_; -#line 3684 "ViewCollection.c" - } -#line 540 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp16_ = added_selected; -#line 540 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp17_ = view; -#line 540 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - gee_abstract_collection_add (G_TYPE_CHECK_INSTANCE_CAST (_tmp16_, GEE_TYPE_ABSTRACT_COLLECTION, GeeAbstractCollection), _tmp17_); -#line 3692 "ViewCollection.c" - } -#line 544 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp19_ = view; -#line 544 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - if (data_view_is_visible (_tmp19_)) { -#line 3698 "ViewCollection.c" - DataSet* _tmp20_; -#line 544 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp20_ = self->priv->visible; -#line 544 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp18_ = _tmp20_ != NULL; -#line 3704 "ViewCollection.c" - } else { -#line 544 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp18_ = FALSE; -#line 3708 "ViewCollection.c" - } -#line 544 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - if (_tmp18_) { -#line 3712 "ViewCollection.c" - GeeArrayList* _tmp21_; - GeeArrayList* _tmp23_; - DataView* _tmp24_; -#line 545 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp21_ = added_visible; -#line 545 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - if (_tmp21_ == NULL) { -#line 3720 "ViewCollection.c" - GeeArrayList* _tmp22_; -#line 546 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp22_ = gee_array_list_new (TYPE_DATA_VIEW, (GBoxedCopyFunc) g_object_ref, (GDestroyNotify) g_object_unref, NULL, NULL, NULL); -#line 546 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _g_object_unref0 (added_visible); -#line 546 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - added_visible = _tmp22_; -#line 3728 "ViewCollection.c" - } -#line 548 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp23_ = added_visible; -#line 548 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp24_ = view; -#line 548 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - gee_abstract_collection_add (G_TYPE_CHECK_INSTANCE_CAST (_tmp23_, GEE_TYPE_ABSTRACT_COLLECTION, GeeAbstractCollection), _tmp24_); -#line 3736 "ViewCollection.c" - } -#line 532 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _g_object_unref0 (view); -#line 532 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _g_object_unref0 (object); -#line 3742 "ViewCollection.c" - } -#line 532 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _g_object_unref0 (_object_it); -#line 3746 "ViewCollection.c" - } -#line 552 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp25_ = added_visible; -#line 552 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - if (_tmp25_ != NULL) { -#line 3752 "ViewCollection.c" - gboolean is_added = FALSE; - GeeArrayList* _tmp26_; - gboolean _tmp27_; -#line 553 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp26_ = added_visible; -#line 553 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - is_added = view_collection_add_many_visible (self, G_TYPE_CHECK_INSTANCE_CAST (_tmp26_, GEE_TYPE_COLLECTION, GeeCollection)); -#line 554 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp27_ = is_added; -#line 554 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _vala_assert (_tmp27_, "is_added"); -#line 3764 "ViewCollection.c" - } -#line 557 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp28_ = added_selected; -#line 557 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - if (_tmp28_ != NULL) { -#line 3770 "ViewCollection.c" - GeeArrayList* _tmp29_; - GeeArrayList* _tmp30_; -#line 558 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp29_ = added_selected; -#line 558 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - view_collection_add_many_selected (self, G_TYPE_CHECK_INSTANCE_CAST (_tmp29_, GEE_TYPE_COLLECTION, GeeCollection)); -#line 559 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp30_ = added_selected; -#line 559 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - view_collection_notify_items_selected_unselected (self, G_TYPE_CHECK_INSTANCE_CAST (_tmp30_, GEE_TYPE_COLLECTION, GeeCollection), NULL); -#line 3781 "ViewCollection.c" - } -#line 562 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - DATA_COLLECTION_CLASS (view_collection_parent_class)->notify_items_added (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_DATA_COLLECTION, DataCollection), added); -#line 528 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _g_object_unref0 (added_selected); -#line 528 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _g_object_unref0 (added_visible); -#line 3789 "ViewCollection.c" -} - - -static void -view_collection_real_notify_items_removed (DataCollection* base, - GeeIterable* removed) -{ - ViewCollection * self; - GeeArrayList* selected_removed = NULL; - GeeArrayList* _tmp33_; -#line 566 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_VIEW_COLLECTION, ViewCollection); -#line 566 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - g_return_if_fail (GEE_IS_ITERABLE (removed)); -#line 567 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - selected_removed = NULL; -#line 3806 "ViewCollection.c" - { - GeeIterator* _object_it = NULL; - GeeIterator* _tmp0_; -#line 568 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp0_ = gee_iterable_iterator (removed); -#line 568 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _object_it = _tmp0_; -#line 568 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - while (TRUE) { -#line 3816 "ViewCollection.c" - GeeIterator* _tmp1_; - DataObject* object = NULL; - GeeIterator* _tmp2_; - gpointer _tmp3_; - DataView* view = NULL; - DataObject* _tmp4_; - DataView* _tmp5_; - GeeHashMap* _tmp6_; - DataView* _tmp7_; - DataSource* _tmp8_; - DataSource* _tmp9_; - gboolean _tmp10_; -#line 568 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp1_ = _object_it; -#line 568 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - if (!gee_iterator_next (_tmp1_)) { -#line 568 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - break; -#line 3835 "ViewCollection.c" - } -#line 568 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp2_ = _object_it; -#line 568 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp3_ = gee_iterator_get (_tmp2_); -#line 568 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - object = (DataObject*) _tmp3_; -#line 569 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp4_ = object; -#line 569 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp5_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_CAST (_tmp4_, TYPE_DATA_VIEW, DataView)); -#line 569 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - view = _tmp5_; -#line 575 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp6_ = self->priv->source_map; -#line 575 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp7_ = view; -#line 575 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp8_ = data_view_get_source (_tmp7_); -#line 575 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp9_ = _tmp8_; -#line 575 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp10_ = gee_abstract_map_has_key (G_TYPE_CHECK_INSTANCE_CAST (_tmp6_, GEE_TYPE_ABSTRACT_MAP, GeeAbstractMap), _tmp9_); -#line 575 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _g_object_unref0 (_tmp9_); -#line 575 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - if (_tmp10_) { -#line 3863 "ViewCollection.c" - gboolean is_removed = FALSE; - GeeHashMap* _tmp11_; - DataView* _tmp12_; - DataSource* _tmp13_; - DataSource* _tmp14_; - gboolean _tmp15_; - gboolean _tmp16_; - gboolean _tmp17_; - DataView* _tmp18_; - gboolean _tmp27_ = FALSE; - DataView* _tmp28_; -#line 576 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp11_ = self->priv->source_map; -#line 576 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp12_ = view; -#line 576 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp13_ = data_view_get_source (_tmp12_); -#line 576 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp14_ = _tmp13_; -#line 576 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp15_ = gee_abstract_map_unset (G_TYPE_CHECK_INSTANCE_CAST (_tmp11_, GEE_TYPE_ABSTRACT_MAP, GeeAbstractMap), _tmp14_, NULL); -#line 576 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp16_ = _tmp15_; -#line 576 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _g_object_unref0 (_tmp14_); -#line 576 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - is_removed = _tmp16_; -#line 577 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp17_ = is_removed; -#line 577 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _vala_assert (_tmp17_, "is_removed"); -#line 579 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp18_ = view; -#line 579 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - if (data_view_is_selected (_tmp18_)) { -#line 3899 "ViewCollection.c" - DataSet* _tmp19_; - DataView* _tmp20_; - DataView* _tmp21_; - DataView* _tmp22_; -#line 581 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp19_ = self->priv->selected; -#line 581 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp20_ = view; -#line 581 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp21_ = view; -#line 581 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _vala_assert (data_set_contains (_tmp19_, G_TYPE_CHECK_INSTANCE_CAST (_tmp20_, TYPE_DATA_OBJECT, DataObject)) == data_view_is_visible (_tmp21_), "selected.contains(view) == view.is_visible()"); -#line 583 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp22_ = view; -#line 583 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - if (data_view_is_visible (_tmp22_)) { -#line 3916 "ViewCollection.c" - GeeArrayList* _tmp23_; - GeeArrayList* _tmp25_; - DataView* _tmp26_; -#line 584 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp23_ = selected_removed; -#line 584 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - if (_tmp23_ == NULL) { -#line 3924 "ViewCollection.c" - GeeArrayList* _tmp24_; -#line 585 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp24_ = gee_array_list_new (TYPE_DATA_VIEW, (GBoxedCopyFunc) g_object_ref, (GDestroyNotify) g_object_unref, NULL, NULL, NULL); -#line 585 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _g_object_unref0 (selected_removed); -#line 585 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - selected_removed = _tmp24_; -#line 3932 "ViewCollection.c" - } -#line 587 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp25_ = selected_removed; -#line 587 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp26_ = view; -#line 587 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - gee_abstract_collection_add (G_TYPE_CHECK_INSTANCE_CAST (_tmp25_, GEE_TYPE_ABSTRACT_COLLECTION, GeeAbstractCollection), _tmp26_); -#line 3940 "ViewCollection.c" - } - } -#line 591 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp28_ = view; -#line 591 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - if (data_view_is_visible (_tmp28_)) { -#line 3947 "ViewCollection.c" - DataSet* _tmp29_; -#line 591 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp29_ = self->priv->visible; -#line 591 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp27_ = _tmp29_ != NULL; -#line 3953 "ViewCollection.c" - } else { -#line 591 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp27_ = FALSE; -#line 3957 "ViewCollection.c" - } -#line 591 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - if (_tmp27_) { -#line 3961 "ViewCollection.c" - DataSet* _tmp30_; - DataView* _tmp31_; - gboolean _tmp32_; -#line 592 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp30_ = self->priv->visible; -#line 592 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp31_ = view; -#line 592 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - is_removed = data_set_remove (_tmp30_, G_TYPE_CHECK_INSTANCE_CAST (_tmp31_, TYPE_DATA_OBJECT, DataObject)); -#line 593 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp32_ = is_removed; -#line 593 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _vala_assert (_tmp32_, "is_removed"); -#line 3975 "ViewCollection.c" - } - } -#line 568 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _g_object_unref0 (view); -#line 568 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _g_object_unref0 (object); -#line 3982 "ViewCollection.c" - } -#line 568 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _g_object_unref0 (_object_it); -#line 3986 "ViewCollection.c" - } -#line 598 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp33_ = selected_removed; -#line 598 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - if (_tmp33_ != NULL) { -#line 3992 "ViewCollection.c" - GeeArrayList* _tmp34_; -#line 599 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp34_ = selected_removed; -#line 599 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - view_collection_remove_many_selected (self, G_TYPE_CHECK_INSTANCE_CAST (_tmp34_, GEE_TYPE_COLLECTION, GeeCollection)); -#line 604 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - view_collection_notify_selection_group_altered (self); -#line 4000 "ViewCollection.c" - } -#line 607 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - DATA_COLLECTION_CLASS (view_collection_parent_class)->notify_items_removed (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_DATA_COLLECTION, DataCollection), removed); -#line 566 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _g_object_unref0 (selected_removed); -#line 4006 "ViewCollection.c" -} - - -static void -view_collection_filter_altered_items (ViewCollection* self, - GeeCollection* views) -{ - GeeArrayList* to_show = NULL; - GeeArrayList* to_hide = NULL; - GeeArrayList* _tmp15_; - GeeArrayList* _tmp17_; -#line 610 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - g_return_if_fail (IS_VIEW_COLLECTION (self)); -#line 610 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - g_return_if_fail (GEE_IS_COLLECTION (views)); -#line 613 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - to_show = NULL; -#line 614 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - to_hide = NULL; -#line 4026 "ViewCollection.c" - { - GeeIterator* _view_it = NULL; - GeeIterator* _tmp0_; -#line 619 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp0_ = gee_iterable_iterator (G_TYPE_CHECK_INSTANCE_CAST (views, GEE_TYPE_ITERABLE, GeeIterable)); -#line 619 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _view_it = _tmp0_; -#line 619 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - while (TRUE) { -#line 4036 "ViewCollection.c" - GeeIterator* _tmp1_; - DataView* view = NULL; - GeeIterator* _tmp2_; - gpointer _tmp3_; - DataView* _tmp4_; -#line 619 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp1_ = _view_it; -#line 619 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - if (!gee_iterator_next (_tmp1_)) { -#line 619 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - break; -#line 4048 "ViewCollection.c" - } -#line 619 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp2_ = _view_it; -#line 619 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp3_ = gee_iterator_get (_tmp2_); -#line 619 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - view = (DataView*) _tmp3_; -#line 620 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp4_ = view; -#line 620 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - if (view_collection_is_in_filter (self, _tmp4_)) { -#line 4060 "ViewCollection.c" - DataView* _tmp5_; -#line 621 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp5_ = view; -#line 621 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - if (!data_view_is_visible (_tmp5_)) { -#line 4066 "ViewCollection.c" - GeeArrayList* _tmp6_; - GeeArrayList* _tmp8_; - DataView* _tmp9_; -#line 622 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp6_ = to_show; -#line 622 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - if (_tmp6_ == NULL) { -#line 4074 "ViewCollection.c" - GeeArrayList* _tmp7_; -#line 623 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp7_ = gee_array_list_new (TYPE_DATA_VIEW, (GBoxedCopyFunc) g_object_ref, (GDestroyNotify) g_object_unref, NULL, NULL, NULL); -#line 623 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _g_object_unref0 (to_show); -#line 623 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - to_show = _tmp7_; -#line 4082 "ViewCollection.c" - } -#line 625 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp8_ = to_show; -#line 625 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp9_ = view; -#line 625 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - gee_abstract_collection_add (G_TYPE_CHECK_INSTANCE_CAST (_tmp8_, GEE_TYPE_ABSTRACT_COLLECTION, GeeAbstractCollection), _tmp9_); -#line 4090 "ViewCollection.c" - } - } else { - DataView* _tmp10_; -#line 628 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp10_ = view; -#line 628 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - if (data_view_is_visible (_tmp10_)) { -#line 4098 "ViewCollection.c" - GeeArrayList* _tmp11_; - GeeArrayList* _tmp13_; - DataView* _tmp14_; -#line 629 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp11_ = to_hide; -#line 629 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - if (_tmp11_ == NULL) { -#line 4106 "ViewCollection.c" - GeeArrayList* _tmp12_; -#line 630 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp12_ = gee_array_list_new (TYPE_DATA_VIEW, (GBoxedCopyFunc) g_object_ref, (GDestroyNotify) g_object_unref, NULL, NULL, NULL); -#line 630 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _g_object_unref0 (to_hide); -#line 630 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - to_hide = _tmp12_; -#line 4114 "ViewCollection.c" - } -#line 632 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp13_ = to_hide; -#line 632 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp14_ = view; -#line 632 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - gee_abstract_collection_add (G_TYPE_CHECK_INSTANCE_CAST (_tmp13_, GEE_TYPE_ABSTRACT_COLLECTION, GeeAbstractCollection), _tmp14_); -#line 4122 "ViewCollection.c" - } - } -#line 619 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _g_object_unref0 (view); -#line 4127 "ViewCollection.c" - } -#line 619 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _g_object_unref0 (_view_it); -#line 4131 "ViewCollection.c" - } -#line 641 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp15_ = to_show; -#line 641 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - if (_tmp15_ != NULL) { -#line 4137 "ViewCollection.c" - GeeArrayList* _tmp16_; -#line 642 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp16_ = to_show; -#line 642 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - view_collection_show_items (self, G_TYPE_CHECK_INSTANCE_CAST (_tmp16_, GEE_TYPE_LIST, GeeList)); -#line 4143 "ViewCollection.c" - } -#line 644 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp17_ = to_hide; -#line 644 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - if (_tmp17_ != NULL) { -#line 4149 "ViewCollection.c" - GeeArrayList* _tmp18_; -#line 645 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp18_ = to_hide; -#line 645 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - view_collection_hide_items (self, G_TYPE_CHECK_INSTANCE_CAST (_tmp18_, GEE_TYPE_LIST, GeeList)); -#line 4155 "ViewCollection.c" - } -#line 610 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _g_object_unref0 (to_hide); -#line 610 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _g_object_unref0 (to_show); -#line 4161 "ViewCollection.c" -} - - -static void -view_collection_real_items_altered (DataCollection* base, - GeeMap* map) -{ - ViewCollection * self; - GeeSet* _tmp0_; - GeeSet* _tmp1_; - GeeCollection* _tmp2_; -#line 648 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_VIEW_COLLECTION, ViewCollection); -#line 648 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - g_return_if_fail (GEE_IS_MAP (map)); -#line 650 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp0_ = gee_map_get_keys (map); -#line 650 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp1_ = _tmp0_; -#line 650 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp2_ = G_TYPE_CHECK_INSTANCE_CAST (_tmp1_, GEE_TYPE_COLLECTION, GeeCollection); -#line 650 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - view_collection_filter_altered_items (self, _tmp2_); -#line 650 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _g_object_unref0 (_tmp2_); -#line 652 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - DATA_COLLECTION_CLASS (view_collection_parent_class)->items_altered (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_DATA_COLLECTION, DataCollection), map); -#line 4189 "ViewCollection.c" -} - - -static void -view_collection_real_set_comparator (DataCollection* base, - Comparator comparator, - void* comparator_target, - ComparatorPredicate predicate, - void* predicate_target) -{ - ViewCollection * self; - DataSet* _tmp0_; - DataSet* _tmp1_; -#line 655 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_VIEW_COLLECTION, ViewCollection); -#line 656 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp0_ = self->priv->selected; -#line 656 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - data_set_set_comparator (_tmp0_, comparator, comparator_target, predicate, predicate_target); -#line 657 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp1_ = self->priv->visible; -#line 657 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - if (_tmp1_ != NULL) { -#line 4213 "ViewCollection.c" - DataSet* _tmp2_; -#line 658 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp2_ = self->priv->visible; -#line 658 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - data_set_set_comparator (_tmp2_, comparator, comparator_target, predicate, predicate_target); -#line 4219 "ViewCollection.c" - } -#line 660 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - DATA_COLLECTION_CLASS (view_collection_parent_class)->set_comparator (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_DATA_COLLECTION, DataCollection), comparator, comparator_target, predicate, predicate_target); -#line 4223 "ViewCollection.c" -} - - -static void -view_collection_real_reset_comparator (DataCollection* base) -{ - ViewCollection * self; - DataSet* _tmp0_; - DataSet* _tmp1_; -#line 663 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_VIEW_COLLECTION, ViewCollection); -#line 664 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp0_ = self->priv->selected; -#line 664 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - data_set_reset_comparator (_tmp0_); -#line 665 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp1_ = self->priv->visible; -#line 665 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - if (_tmp1_ != NULL) { -#line 4243 "ViewCollection.c" - DataSet* _tmp2_; -#line 666 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp2_ = self->priv->visible; -#line 666 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - data_set_reset_comparator (_tmp2_); -#line 4249 "ViewCollection.c" - } -#line 668 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - DATA_COLLECTION_CLASS (view_collection_parent_class)->reset_comparator (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_DATA_COLLECTION, DataCollection)); -#line 4253 "ViewCollection.c" -} - - -static GeeCollection* -view_collection_real_get_all (DataCollection* base) -{ - ViewCollection * self; - GeeCollection* result = NULL; - GeeCollection* _tmp0_ = NULL; - DataSet* _tmp1_; -#line 671 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_VIEW_COLLECTION, ViewCollection); -#line 672 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp1_ = self->priv->visible; -#line 672 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - if (_tmp1_ != NULL) { -#line 4270 "ViewCollection.c" - DataSet* _tmp2_; - GeeList* _tmp3_; -#line 672 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp2_ = self->priv->visible; -#line 672 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp3_ = data_set_get_all (_tmp2_); -#line 672 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _g_object_unref0 (_tmp0_); -#line 672 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp0_ = G_TYPE_CHECK_INSTANCE_CAST (_tmp3_, GEE_TYPE_COLLECTION, GeeCollection); -#line 4281 "ViewCollection.c" - } else { - GeeCollection* _tmp4_; -#line 672 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp4_ = DATA_COLLECTION_CLASS (view_collection_parent_class)->get_all (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_DATA_COLLECTION, DataCollection)); -#line 672 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _g_object_unref0 (_tmp0_); -#line 672 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp0_ = _tmp4_; -#line 4290 "ViewCollection.c" - } -#line 672 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - result = _tmp0_; -#line 672 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - return result; -#line 4296 "ViewCollection.c" -} - - -GeeCollection* -view_collection_get_all_unfiltered (ViewCollection* self) -{ - GeeCollection* result = NULL; - GeeCollection* _tmp0_; -#line 675 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - g_return_val_if_fail (IS_VIEW_COLLECTION (self), NULL); -#line 676 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp0_ = DATA_COLLECTION_CLASS (view_collection_parent_class)->get_all (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_DATA_COLLECTION, DataCollection)); -#line 676 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - result = _tmp0_; -#line 676 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - return result; -#line 4313 "ViewCollection.c" -} - - -static gint -view_collection_real_get_count (DataCollection* base) -{ - ViewCollection * self; - gint result = 0; - gint _tmp0_ = 0; - DataSet* _tmp1_; -#line 679 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_VIEW_COLLECTION, ViewCollection); -#line 680 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp1_ = self->priv->visible; -#line 680 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - if (_tmp1_ != NULL) { -#line 4330 "ViewCollection.c" - DataSet* _tmp2_; -#line 680 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp2_ = self->priv->visible; -#line 680 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp0_ = data_set_get_count (_tmp2_); -#line 4336 "ViewCollection.c" - } else { -#line 680 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp0_ = DATA_COLLECTION_CLASS (view_collection_parent_class)->get_count (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_DATA_COLLECTION, DataCollection)); -#line 4340 "ViewCollection.c" - } -#line 680 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - result = _tmp0_; -#line 680 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - return result; -#line 4346 "ViewCollection.c" -} - - -gint -view_collection_get_unfiltered_count (ViewCollection* self) -{ - gint result = 0; -#line 683 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - g_return_val_if_fail (IS_VIEW_COLLECTION (self), 0); -#line 684 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - result = DATA_COLLECTION_CLASS (view_collection_parent_class)->get_count (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_DATA_COLLECTION, DataCollection)); -#line 684 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - return result; -#line 4360 "ViewCollection.c" -} - - -static DataObject* -view_collection_real_get_at (DataCollection* base, - gint index) -{ - ViewCollection * self; - DataObject* result = NULL; - DataObject* _tmp0_ = NULL; - DataSet* _tmp1_; -#line 687 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_VIEW_COLLECTION, ViewCollection); -#line 688 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp1_ = self->priv->visible; -#line 688 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - if (_tmp1_ != NULL) { -#line 4378 "ViewCollection.c" - DataSet* _tmp2_; - DataObject* _tmp3_; -#line 688 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp2_ = self->priv->visible; -#line 688 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp3_ = data_set_get_at (_tmp2_, index); -#line 688 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _g_object_unref0 (_tmp0_); -#line 688 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp0_ = _tmp3_; -#line 4389 "ViewCollection.c" - } else { - DataObject* _tmp4_; -#line 688 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp4_ = DATA_COLLECTION_CLASS (view_collection_parent_class)->get_at (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_DATA_COLLECTION, DataCollection), index); -#line 688 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _g_object_unref0 (_tmp0_); -#line 688 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp0_ = _tmp4_; -#line 4398 "ViewCollection.c" - } -#line 688 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - result = _tmp0_; -#line 688 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - return result; -#line 4404 "ViewCollection.c" -} - - -static gint -view_collection_real_index_of (DataCollection* base, - DataObject* object) -{ - ViewCollection * self; - gint result = 0; - gint _tmp0_ = 0; - DataSet* _tmp1_; -#line 691 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_VIEW_COLLECTION, ViewCollection); -#line 691 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - g_return_val_if_fail (IS_DATA_OBJECT (object), 0); -#line 692 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp1_ = self->priv->visible; -#line 692 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - if (_tmp1_ != NULL) { -#line 4424 "ViewCollection.c" - DataSet* _tmp2_; -#line 692 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp2_ = self->priv->visible; -#line 692 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp0_ = data_set_index_of (_tmp2_, object); -#line 4430 "ViewCollection.c" - } else { -#line 692 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp0_ = DATA_COLLECTION_CLASS (view_collection_parent_class)->index_of (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_DATA_COLLECTION, DataCollection), object); -#line 4434 "ViewCollection.c" - } -#line 692 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - result = _tmp0_; -#line 692 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - return result; -#line 4440 "ViewCollection.c" -} - - -static gboolean -view_collection_real_contains (DataCollection* base, - DataObject* object) -{ - ViewCollection * self; - gboolean result = FALSE; -#line 695 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_VIEW_COLLECTION, ViewCollection); -#line 695 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - g_return_val_if_fail (IS_DATA_OBJECT (object), FALSE); -#line 698 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - if (!DATA_COLLECTION_CLASS (view_collection_parent_class)->contains (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_DATA_COLLECTION, DataCollection), object)) { -#line 699 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - result = FALSE; -#line 699 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - return result; -#line 4460 "ViewCollection.c" - } -#line 702 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - result = view_collection_is_visible (self, G_TYPE_CHECK_INSTANCE_CAST (object, TYPE_DATA_VIEW, DataView)); -#line 702 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - return result; -#line 4466 "ViewCollection.c" -} - - -static DataView* -view_collection_real_get_first (ViewCollection* self) -{ - DataView* result = NULL; - DataView* _tmp0_ = NULL; -#line 706 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - if (data_collection_get_count (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_DATA_COLLECTION, DataCollection)) > 0) { -#line 4477 "ViewCollection.c" - DataObject* _tmp1_; -#line 706 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp1_ = data_collection_get_at (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_DATA_COLLECTION, DataCollection), 0); -#line 706 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _g_object_unref0 (_tmp0_); -#line 706 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp0_ = G_TYPE_CHECK_INSTANCE_CAST (_tmp1_, TYPE_DATA_VIEW, DataView); -#line 4485 "ViewCollection.c" - } else { -#line 706 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _g_object_unref0 (_tmp0_); -#line 706 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp0_ = NULL; -#line 4491 "ViewCollection.c" - } -#line 706 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - result = _tmp0_; -#line 706 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - return result; -#line 4497 "ViewCollection.c" -} - - -DataView* -view_collection_get_first (ViewCollection* self) -{ -#line 705 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - g_return_val_if_fail (IS_VIEW_COLLECTION (self), NULL); -#line 705 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - return VIEW_COLLECTION_GET_CLASS (self)->get_first (self); -#line 4508 "ViewCollection.c" -} - - -/** - * @brief A helper method for places in the app that need a - * non-rejected media source (namely Events, when looking to - * automatically choose a thumbnail). - * - * @note If every view in this collection is rejected, we - * return the first view; this is intentional. This prevents - * pathological events that have nothing but rejected images - * in them from breaking. - */ -static DataView* -view_collection_real_get_first_unrejected (ViewCollection* self) -{ - DataView* result = NULL; - DataView* dv = NULL; - DataView* _tmp0_; - gint num_views = 0; - DataView* _tmp13_; -#line 721 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - if (data_collection_get_count (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_DATA_COLLECTION, DataCollection)) < 1) { -#line 722 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - result = NULL; -#line 722 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - return result; -#line 4536 "ViewCollection.c" - } -#line 725 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp0_ = view_collection_get_first (self); -#line 725 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - dv = _tmp0_; -#line 726 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - num_views = data_collection_get_count (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_DATA_COLLECTION, DataCollection)); -#line 728 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - while (TRUE) { -#line 4546 "ViewCollection.c" - gboolean _tmp1_ = FALSE; - DataView* _tmp2_; - MediaSource* tmp = NULL; - DataView* _tmp5_; - DataSource* _tmp6_; - MediaSource* _tmp7_; - gboolean _tmp8_ = FALSE; - MediaSource* _tmp9_; -#line 728 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp2_ = dv; -#line 728 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - if (_tmp2_ != NULL) { -#line 4559 "ViewCollection.c" - DataView* _tmp3_; - gint _tmp4_; -#line 728 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp3_ = dv; -#line 728 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp4_ = num_views; -#line 728 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp1_ = data_collection_index_of (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_DATA_COLLECTION, DataCollection), G_TYPE_CHECK_INSTANCE_CAST (_tmp3_, TYPE_DATA_OBJECT, DataObject)) < (_tmp4_ - 1); -#line 4568 "ViewCollection.c" - } else { -#line 728 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp1_ = FALSE; -#line 4572 "ViewCollection.c" - } -#line 728 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - if (!_tmp1_) { -#line 728 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - break; -#line 4578 "ViewCollection.c" - } -#line 729 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp5_ = dv; -#line 729 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp6_ = data_view_get_source (_tmp5_); -#line 729 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp7_ = G_TYPE_CHECK_INSTANCE_TYPE (_tmp6_, TYPE_MEDIA_SOURCE) ? ((MediaSource*) _tmp6_) : NULL; -#line 729 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - if (_tmp7_ == NULL) { -#line 729 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _g_object_unref0 (_tmp6_); -#line 4590 "ViewCollection.c" - } -#line 729 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - tmp = _tmp7_; -#line 731 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp9_ = tmp; -#line 731 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - if (_tmp9_ != NULL) { -#line 4598 "ViewCollection.c" - MediaSource* _tmp10_; -#line 731 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp10_ = tmp; -#line 731 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp8_ = media_source_get_rating (_tmp10_) != RATING_REJECTED; -#line 4604 "ViewCollection.c" - } else { -#line 731 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp8_ = FALSE; -#line 4608 "ViewCollection.c" - } -#line 731 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - if (_tmp8_) { -#line 733 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - result = dv; -#line 733 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _g_object_unref0 (tmp); -#line 733 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - return result; -#line 4618 "ViewCollection.c" - } else { - DataView* _tmp11_; - DataView* _tmp12_; -#line 735 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp11_ = dv; -#line 735 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp12_ = view_collection_get_next (self, _tmp11_); -#line 735 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _g_object_unref0 (dv); -#line 735 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - dv = _tmp12_; -#line 4630 "ViewCollection.c" - } -#line 728 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _g_object_unref0 (tmp); -#line 4634 "ViewCollection.c" - } -#line 741 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp13_ = view_collection_get_first (self); -#line 741 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - result = _tmp13_; -#line 741 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _g_object_unref0 (dv); -#line 741 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - return result; -#line 4644 "ViewCollection.c" -} - - -DataView* -view_collection_get_first_unrejected (ViewCollection* self) -{ -#line 719 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - g_return_val_if_fail (IS_VIEW_COLLECTION (self), NULL); -#line 719 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - return VIEW_COLLECTION_GET_CLASS (self)->get_first_unrejected (self); -#line 4655 "ViewCollection.c" -} - - -static DataView* -view_collection_real_get_last (ViewCollection* self) -{ - DataView* result = NULL; - DataView* _tmp0_ = NULL; -#line 745 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - if (data_collection_get_count (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_DATA_COLLECTION, DataCollection)) > 0) { -#line 4666 "ViewCollection.c" - DataObject* _tmp1_; -#line 745 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp1_ = data_collection_get_at (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_DATA_COLLECTION, DataCollection), data_collection_get_count (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_DATA_COLLECTION, DataCollection)) - 1); -#line 745 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _g_object_unref0 (_tmp0_); -#line 745 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp0_ = G_TYPE_CHECK_INSTANCE_CAST (_tmp1_, TYPE_DATA_VIEW, DataView); -#line 4674 "ViewCollection.c" - } else { -#line 745 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _g_object_unref0 (_tmp0_); -#line 745 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp0_ = NULL; -#line 4680 "ViewCollection.c" - } -#line 745 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - result = _tmp0_; -#line 745 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - return result; -#line 4686 "ViewCollection.c" -} - - -DataView* -view_collection_get_last (ViewCollection* self) -{ -#line 744 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - g_return_val_if_fail (IS_VIEW_COLLECTION (self), NULL); -#line 744 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - return VIEW_COLLECTION_GET_CLASS (self)->get_last (self); -#line 4697 "ViewCollection.c" -} - - -static DataView* -view_collection_real_get_next (ViewCollection* self, - DataView* view) -{ - DataView* result = NULL; - gint index = 0; - gint _tmp0_; - gint _tmp1_; - gint _tmp2_; - gint _tmp3_; - DataObject* _tmp4_; -#line 748 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - g_return_val_if_fail (IS_DATA_VIEW (view), NULL); -#line 749 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - if (data_collection_get_count (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_DATA_COLLECTION, DataCollection)) == 0) { -#line 750 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - result = NULL; -#line 750 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - return result; -#line 4720 "ViewCollection.c" - } -#line 752 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - index = data_collection_index_of (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_DATA_COLLECTION, DataCollection), G_TYPE_CHECK_INSTANCE_CAST (view, TYPE_DATA_OBJECT, DataObject)); -#line 753 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp0_ = index; -#line 753 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - if (_tmp0_ < 0) { -#line 754 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - result = NULL; -#line 754 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - return result; -#line 4732 "ViewCollection.c" - } -#line 756 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp1_ = index; -#line 756 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - index = _tmp1_ + 1; -#line 757 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp2_ = index; -#line 757 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - if (_tmp2_ >= data_collection_get_count (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_DATA_COLLECTION, DataCollection))) { -#line 758 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - index = 0; -#line 4744 "ViewCollection.c" - } -#line 760 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp3_ = index; -#line 760 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp4_ = data_collection_get_at (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_DATA_COLLECTION, DataCollection), _tmp3_); -#line 760 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - result = G_TYPE_CHECK_INSTANCE_CAST (_tmp4_, TYPE_DATA_VIEW, DataView); -#line 760 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - return result; -#line 4754 "ViewCollection.c" -} - - -DataView* -view_collection_get_next (ViewCollection* self, - DataView* view) -{ -#line 748 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - g_return_val_if_fail (IS_VIEW_COLLECTION (self), NULL); -#line 748 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - return VIEW_COLLECTION_GET_CLASS (self)->get_next (self, view); -#line 4766 "ViewCollection.c" -} - - -static DataView* -view_collection_real_get_previous (ViewCollection* self, - DataView* view) -{ - DataView* result = NULL; - gint index = 0; - gint _tmp0_; - gint _tmp1_; - gint _tmp2_; - gint _tmp3_; - DataObject* _tmp4_; -#line 763 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - g_return_val_if_fail (IS_DATA_VIEW (view), NULL); -#line 764 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - if (data_collection_get_count (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_DATA_COLLECTION, DataCollection)) == 0) { -#line 765 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - result = NULL; -#line 765 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - return result; -#line 4789 "ViewCollection.c" - } -#line 767 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - index = data_collection_index_of (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_DATA_COLLECTION, DataCollection), G_TYPE_CHECK_INSTANCE_CAST (view, TYPE_DATA_OBJECT, DataObject)); -#line 768 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp0_ = index; -#line 768 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - if (_tmp0_ < 0) { -#line 769 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - result = NULL; -#line 769 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - return result; -#line 4801 "ViewCollection.c" - } -#line 771 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp1_ = index; -#line 771 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - index = _tmp1_ - 1; -#line 772 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp2_ = index; -#line 772 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - if (_tmp2_ < 0) { -#line 773 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - index = data_collection_get_count (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_DATA_COLLECTION, DataCollection)) - 1; -#line 4813 "ViewCollection.c" - } -#line 775 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp3_ = index; -#line 775 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp4_ = data_collection_get_at (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_DATA_COLLECTION, DataCollection), _tmp3_); -#line 775 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - result = G_TYPE_CHECK_INSTANCE_CAST (_tmp4_, TYPE_DATA_VIEW, DataView); -#line 775 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - return result; -#line 4823 "ViewCollection.c" -} - - -DataView* -view_collection_get_previous (ViewCollection* self, - DataView* view) -{ -#line 763 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - g_return_val_if_fail (IS_VIEW_COLLECTION (self), NULL); -#line 763 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - return VIEW_COLLECTION_GET_CLASS (self)->get_previous (self, view); -#line 4835 "ViewCollection.c" -} - - -gboolean -view_collection_get_immediate_neighbors (ViewCollection* self, - DataSource* home, - DataSource* * next, - DataSource* * prev, - const gchar* type_selector) -{ - DataSource* _vala_next = NULL; - DataSource* _vala_prev = NULL; - gboolean result = FALSE; - DataView* home_view = NULL; - DataView* _tmp0_; - DataView* _tmp1_; - DataView* next_view = NULL; - DataView* _tmp2_; - DataView* _tmp3_; - DataView* prev_view = NULL; - DataView* _tmp16_; - DataView* _tmp17_; -#line 778 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - g_return_val_if_fail (IS_VIEW_COLLECTION (self), FALSE); -#line 778 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - g_return_val_if_fail (IS_DATA_SOURCE (home), FALSE); -#line 780 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _g_object_unref0 (_vala_next); -#line 780 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _vala_next = NULL; -#line 781 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _g_object_unref0 (_vala_prev); -#line 781 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _vala_prev = NULL; -#line 783 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp0_ = view_collection_get_view_for_source (self, home); -#line 783 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - home_view = _tmp0_; -#line 784 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp1_ = home_view; -#line 784 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - if (_tmp1_ == NULL) { -#line 785 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - result = FALSE; -#line 785 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _g_object_unref0 (home_view); -#line 785 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - if (next) { -#line 785 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - *next = _vala_next; -#line 4886 "ViewCollection.c" - } else { -#line 785 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _g_object_unref0 (_vala_next); -#line 4890 "ViewCollection.c" - } -#line 785 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - if (prev) { -#line 785 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - *prev = _vala_prev; -#line 4896 "ViewCollection.c" - } else { -#line 785 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _g_object_unref0 (_vala_prev); -#line 4900 "ViewCollection.c" - } -#line 785 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - return result; -#line 4904 "ViewCollection.c" - } -#line 787 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp2_ = home_view; -#line 787 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp3_ = view_collection_get_next (self, _tmp2_); -#line 787 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - next_view = _tmp3_; -#line 788 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - while (TRUE) { -#line 4914 "ViewCollection.c" - DataView* _tmp4_; - DataView* _tmp5_; - gboolean _tmp6_ = FALSE; - DataView* _tmp14_; - DataView* _tmp15_; -#line 788 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp4_ = next_view; -#line 788 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp5_ = home_view; -#line 788 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - if (!(_tmp4_ != _tmp5_)) { -#line 788 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - break; -#line 4928 "ViewCollection.c" - } -#line 789 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - if (type_selector == NULL) { -#line 789 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp6_ = TRUE; -#line 4934 "ViewCollection.c" - } else { - DataView* _tmp7_; - DataSource* _tmp8_; - DataSource* _tmp9_; - gchar* _tmp10_; - gchar* _tmp11_; -#line 789 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp7_ = next_view; -#line 789 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp8_ = data_view_get_source (_tmp7_); -#line 789 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp9_ = _tmp8_; -#line 789 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp10_ = data_source_get_typename (_tmp9_); -#line 789 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp11_ = _tmp10_; -#line 789 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp6_ = g_strcmp0 (_tmp11_, type_selector) == 0; -#line 789 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _g_free0 (_tmp11_); -#line 789 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _g_object_unref0 (_tmp9_); -#line 4957 "ViewCollection.c" - } -#line 789 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - if (_tmp6_) { -#line 4961 "ViewCollection.c" - DataView* _tmp12_; - DataSource* _tmp13_; -#line 790 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp12_ = next_view; -#line 790 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp13_ = data_view_get_source (_tmp12_); -#line 790 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _g_object_unref0 (_vala_next); -#line 790 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _vala_next = _tmp13_; -#line 791 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - break; -#line 4974 "ViewCollection.c" - } -#line 793 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp14_ = next_view; -#line 793 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp15_ = view_collection_get_next (self, _tmp14_); -#line 793 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _g_object_unref0 (next_view); -#line 793 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - next_view = _tmp15_; -#line 4984 "ViewCollection.c" - } -#line 796 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp16_ = home_view; -#line 796 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp17_ = view_collection_get_previous (self, _tmp16_); -#line 796 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - prev_view = _tmp17_; -#line 797 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - while (TRUE) { -#line 4994 "ViewCollection.c" - DataView* _tmp18_; - DataView* _tmp19_; - gboolean _tmp20_ = FALSE; - DataView* _tmp28_; - DataView* _tmp29_; -#line 797 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp18_ = prev_view; -#line 797 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp19_ = home_view; -#line 797 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - if (!(_tmp18_ != _tmp19_)) { -#line 797 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - break; -#line 5008 "ViewCollection.c" - } -#line 798 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - if (type_selector == NULL) { -#line 798 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp20_ = TRUE; -#line 5014 "ViewCollection.c" - } else { - DataView* _tmp21_; - DataSource* _tmp22_; - DataSource* _tmp23_; - gchar* _tmp24_; - gchar* _tmp25_; -#line 798 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp21_ = prev_view; -#line 798 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp22_ = data_view_get_source (_tmp21_); -#line 798 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp23_ = _tmp22_; -#line 798 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp24_ = data_source_get_typename (_tmp23_); -#line 798 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp25_ = _tmp24_; -#line 798 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp20_ = g_strcmp0 (_tmp25_, type_selector) == 0; -#line 798 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _g_free0 (_tmp25_); -#line 798 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _g_object_unref0 (_tmp23_); -#line 5037 "ViewCollection.c" - } -#line 798 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - if (_tmp20_) { -#line 5041 "ViewCollection.c" - DataView* _tmp26_; - DataSource* _tmp27_; -#line 799 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp26_ = prev_view; -#line 799 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp27_ = data_view_get_source (_tmp26_); -#line 799 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _g_object_unref0 (_vala_prev); -#line 799 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _vala_prev = _tmp27_; -#line 800 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - break; -#line 5054 "ViewCollection.c" - } -#line 802 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp28_ = prev_view; -#line 802 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp29_ = view_collection_get_previous (self, _tmp28_); -#line 802 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _g_object_unref0 (prev_view); -#line 802 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - prev_view = _tmp29_; -#line 5064 "ViewCollection.c" - } -#line 805 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - result = TRUE; -#line 805 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _g_object_unref0 (prev_view); -#line 805 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _g_object_unref0 (next_view); -#line 805 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _g_object_unref0 (home_view); -#line 805 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - if (next) { -#line 805 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - *next = _vala_next; -#line 5078 "ViewCollection.c" - } else { -#line 805 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _g_object_unref0 (_vala_next); -#line 5082 "ViewCollection.c" - } -#line 805 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - if (prev) { -#line 805 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - *prev = _vala_prev; -#line 5088 "ViewCollection.c" - } else { -#line 805 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _g_object_unref0 (_vala_prev); -#line 5092 "ViewCollection.c" - } -#line 805 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - return result; -#line 5096 "ViewCollection.c" -} - - -GeeSet* -view_collection_get_extended_neighbors (ViewCollection* self, - DataSource* home, - const gchar* typename) -{ - GeeSet* result = NULL; - GeeSet* neighbors = NULL; - GeeHashSet* _tmp0_; - DataSource* next = NULL; - DataSource* prev = NULL; - DataSource* _tmp1_ = NULL; - DataSource* _tmp2_ = NULL; - gboolean _tmp3_; - DataSource* _tmp4_; - DataSource* _tmp13_; - GeeSet* _tmp22_; -#line 809 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - g_return_val_if_fail (IS_VIEW_COLLECTION (self), NULL); -#line 809 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - g_return_val_if_fail (IS_DATA_SOURCE (home), NULL); -#line 811 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp0_ = gee_hash_set_new (TYPE_DATA_SOURCE, (GBoxedCopyFunc) g_object_ref, (GDestroyNotify) g_object_unref, NULL, NULL, NULL, NULL, NULL, NULL); -#line 811 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - neighbors = G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, GEE_TYPE_SET, GeeSet); -#line 815 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp3_ = view_collection_get_immediate_neighbors (self, home, &_tmp1_, &_tmp2_, typename); -#line 815 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _g_object_unref0 (next); -#line 815 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - next = _tmp1_; -#line 815 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _g_object_unref0 (prev); -#line 815 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - prev = _tmp2_; -#line 815 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - if (!_tmp3_) { -#line 816 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - result = neighbors; -#line 816 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _g_object_unref0 (prev); -#line 816 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _g_object_unref0 (next); -#line 816 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - return result; -#line 5144 "ViewCollection.c" - } -#line 819 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp4_ = next; -#line 819 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - if (_tmp4_ != NULL) { -#line 5150 "ViewCollection.c" - GeeSet* _tmp5_; - DataSource* _tmp6_; - DataSource* next_next = NULL; - DataSource* next_prev = NULL; - DataSource* _tmp7_; - DataSource* _tmp8_ = NULL; - DataSource* _tmp9_ = NULL; - DataSource* _tmp10_; -#line 820 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp5_ = neighbors; -#line 820 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp6_ = next; -#line 820 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - gee_collection_add (G_TYPE_CHECK_INSTANCE_CAST (_tmp5_, GEE_TYPE_COLLECTION, GeeCollection), _tmp6_); -#line 823 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp7_ = next; -#line 823 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - view_collection_get_immediate_neighbors (self, _tmp7_, &_tmp8_, &_tmp9_, typename); -#line 823 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _g_object_unref0 (next_next); -#line 823 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - next_next = _tmp8_; -#line 823 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _g_object_unref0 (next_prev); -#line 823 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - next_prev = _tmp9_; -#line 826 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp10_ = next_next; -#line 826 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - if (_tmp10_ != NULL) { -#line 5181 "ViewCollection.c" - GeeSet* _tmp11_; - DataSource* _tmp12_; -#line 827 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp11_ = neighbors; -#line 827 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp12_ = next_next; -#line 827 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - gee_collection_add (G_TYPE_CHECK_INSTANCE_CAST (_tmp11_, GEE_TYPE_COLLECTION, GeeCollection), _tmp12_); -#line 5190 "ViewCollection.c" - } -#line 819 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _g_object_unref0 (next_prev); -#line 819 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _g_object_unref0 (next_next); -#line 5196 "ViewCollection.c" - } -#line 831 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp13_ = prev; -#line 831 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - if (_tmp13_ != NULL) { -#line 5202 "ViewCollection.c" - GeeSet* _tmp14_; - DataSource* _tmp15_; - DataSource* next_prev = NULL; - DataSource* prev_prev = NULL; - DataSource* _tmp16_; - DataSource* _tmp17_ = NULL; - DataSource* _tmp18_ = NULL; - DataSource* _tmp19_; -#line 832 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp14_ = neighbors; -#line 832 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp15_ = prev; -#line 832 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - gee_collection_add (G_TYPE_CHECK_INSTANCE_CAST (_tmp14_, GEE_TYPE_COLLECTION, GeeCollection), _tmp15_); -#line 835 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp16_ = prev; -#line 835 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - view_collection_get_immediate_neighbors (self, _tmp16_, &_tmp17_, &_tmp18_, typename); -#line 835 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _g_object_unref0 (next_prev); -#line 835 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - next_prev = _tmp17_; -#line 835 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _g_object_unref0 (prev_prev); -#line 835 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - prev_prev = _tmp18_; -#line 838 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp19_ = prev_prev; -#line 838 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - if (_tmp19_ != NULL) { -#line 5233 "ViewCollection.c" - GeeSet* _tmp20_; - DataSource* _tmp21_; -#line 839 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp20_ = neighbors; -#line 839 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp21_ = prev_prev; -#line 839 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - gee_collection_add (G_TYPE_CHECK_INSTANCE_CAST (_tmp20_, GEE_TYPE_COLLECTION, GeeCollection), _tmp21_); -#line 5242 "ViewCollection.c" - } -#line 831 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _g_object_unref0 (prev_prev); -#line 831 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _g_object_unref0 (next_prev); -#line 5248 "ViewCollection.c" - } -#line 843 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp22_ = neighbors; -#line 843 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - gee_collection_remove (G_TYPE_CHECK_INSTANCE_CAST (_tmp22_, GEE_TYPE_COLLECTION, GeeCollection), home); -#line 845 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - result = neighbors; -#line 845 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _g_object_unref0 (prev); -#line 845 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _g_object_unref0 (next); -#line 845 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - return result; -#line 5262 "ViewCollection.c" -} - - -static void -view_collection_add_many_selected (ViewCollection* self, - GeeCollection* views) -{ - gint _tmp0_; - gint _tmp1_; - gboolean added = FALSE; - DataSet* _tmp7_; - gboolean _tmp8_; -#line 850 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - g_return_if_fail (IS_VIEW_COLLECTION (self)); -#line 850 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - g_return_if_fail (GEE_IS_COLLECTION (views)); -#line 851 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp0_ = gee_collection_get_size (views); -#line 851 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp1_ = _tmp0_; -#line 851 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - if (_tmp1_ == 0) { -#line 852 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - return; -#line 5287 "ViewCollection.c" - } - { - GeeIterator* _view_it = NULL; - GeeIterator* _tmp2_; -#line 854 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp2_ = gee_iterable_iterator (G_TYPE_CHECK_INSTANCE_CAST (views, GEE_TYPE_ITERABLE, GeeIterable)); -#line 854 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _view_it = _tmp2_; -#line 854 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - while (TRUE) { -#line 5298 "ViewCollection.c" - GeeIterator* _tmp3_; - DataView* view = NULL; - GeeIterator* _tmp4_; - gpointer _tmp5_; - DataView* _tmp6_; -#line 854 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp3_ = _view_it; -#line 854 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - if (!gee_iterator_next (_tmp3_)) { -#line 854 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - break; -#line 5310 "ViewCollection.c" - } -#line 854 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp4_ = _view_it; -#line 854 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp5_ = gee_iterator_get (_tmp4_); -#line 854 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - view = (DataView*) _tmp5_; -#line 855 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp6_ = view; -#line 855 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _vala_assert (data_view_is_visible (_tmp6_), "view.is_visible()"); -#line 854 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _g_object_unref0 (view); -#line 5324 "ViewCollection.c" - } -#line 854 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _g_object_unref0 (_view_it); -#line 5328 "ViewCollection.c" - } -#line 857 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp7_ = self->priv->selected; -#line 857 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - added = data_set_add_many (_tmp7_, views); -#line 858 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp8_ = added; -#line 858 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _vala_assert (_tmp8_, "added"); -#line 5338 "ViewCollection.c" -} - - -static void -view_collection_remove_many_selected (ViewCollection* self, - GeeCollection* views) -{ - gint _tmp0_; - gint _tmp1_; - gboolean removed = FALSE; - DataSet* _tmp2_; - gboolean _tmp3_; -#line 861 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - g_return_if_fail (IS_VIEW_COLLECTION (self)); -#line 861 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - g_return_if_fail (GEE_IS_COLLECTION (views)); -#line 862 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp0_ = gee_collection_get_size (views); -#line 862 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp1_ = _tmp0_; -#line 862 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - if (_tmp1_ == 0) { -#line 863 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - return; -#line 5363 "ViewCollection.c" - } -#line 865 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp2_ = self->priv->selected; -#line 865 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - removed = data_set_remove_many (_tmp2_, views); -#line 866 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp3_ = removed; -#line 866 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _vala_assert (_tmp3_, "removed"); -#line 5373 "ViewCollection.c" -} - - -static gboolean -_view_collection_select_item_marked_action (DataObject* object, - GObject* user, - gpointer self) -{ - gboolean result; - result = view_collection_select_item ((ViewCollection*) self, object, user); -#line 872 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - return result; -#line 5386 "ViewCollection.c" -} - - -void -view_collection_select_marked (ViewCollection* self, - Marker* marker) -{ - GeeArrayList* selected = NULL; - GeeArrayList* _tmp0_; - GeeArrayList* _tmp1_; - GeeArrayList* _tmp2_; - gint _tmp3_; - gint _tmp4_; -#line 870 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - g_return_if_fail (IS_VIEW_COLLECTION (self)); -#line 870 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - g_return_if_fail (IS_MARKER (marker)); -#line 871 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp0_ = gee_array_list_new (TYPE_DATA_VIEW, (GBoxedCopyFunc) g_object_ref, (GDestroyNotify) g_object_unref, NULL, NULL, NULL); -#line 871 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - selected = _tmp0_; -#line 872 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp1_ = selected; -#line 872 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - data_collection_act_on_marked (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_DATA_COLLECTION, DataCollection), marker, _view_collection_select_item_marked_action, self, NULL, NULL, G_TYPE_CHECK_INSTANCE_CAST (_tmp1_, G_TYPE_OBJECT, GObject)); -#line 874 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp2_ = selected; -#line 874 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp3_ = gee_abstract_collection_get_size (G_TYPE_CHECK_INSTANCE_CAST (_tmp2_, GEE_TYPE_ABSTRACT_COLLECTION, GeeAbstractCollection)); -#line 874 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp4_ = _tmp3_; -#line 874 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - if (_tmp4_ > 0) { -#line 5420 "ViewCollection.c" - GeeArrayList* _tmp5_; - GeeArrayList* _tmp6_; -#line 875 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp5_ = selected; -#line 875 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - view_collection_add_many_selected (self, G_TYPE_CHECK_INSTANCE_CAST (_tmp5_, GEE_TYPE_COLLECTION, GeeCollection)); -#line 876 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp6_ = selected; -#line 876 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - view_collection_notify_items_selected_unselected (self, G_TYPE_CHECK_INSTANCE_CAST (_tmp6_, GEE_TYPE_COLLECTION, GeeCollection), NULL); -#line 5431 "ViewCollection.c" - } -#line 870 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _g_object_unref0 (selected); -#line 5435 "ViewCollection.c" -} - - -void -view_collection_select_all (ViewCollection* self) -{ - Marker* marker = NULL; - Marker* _tmp0_; -#line 881 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - g_return_if_fail (IS_VIEW_COLLECTION (self)); -#line 882 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp0_ = data_collection_start_marking (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_DATA_COLLECTION, DataCollection)); -#line 882 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - marker = _tmp0_; -#line 883 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - marker_mark_all (marker); -#line 884 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - view_collection_select_marked (self, marker); -#line 881 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _g_object_unref0 (marker); -#line 5456 "ViewCollection.c" -} - - -static gboolean -view_collection_select_item (ViewCollection* self, - DataObject* object, - GObject* user) -{ - gboolean result = FALSE; - DataView* view = NULL; - DataView* _tmp0_; - DataView* _tmp1_; - DataView* _tmp5_; - DataView* _tmp6_; -#line 887 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - g_return_val_if_fail (IS_VIEW_COLLECTION (self), FALSE); -#line 887 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - g_return_val_if_fail (IS_DATA_OBJECT (object), FALSE); -#line 887 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - g_return_val_if_fail ((user == NULL) || G_IS_OBJECT (user), FALSE); -#line 888 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp0_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_CAST (object, TYPE_DATA_VIEW, DataView)); -#line 888 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - view = _tmp0_; -#line 889 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp1_ = view; -#line 889 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - if (data_view_is_selected (_tmp1_)) { -#line 5485 "ViewCollection.c" - DataView* _tmp2_; -#line 890 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp2_ = view; -#line 890 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - if (data_view_is_visible (_tmp2_)) { -#line 5491 "ViewCollection.c" - DataSet* _tmp3_; - DataView* _tmp4_; -#line 891 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp3_ = self->priv->selected; -#line 891 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp4_ = view; -#line 891 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _vala_assert (data_set_contains (_tmp3_, G_TYPE_CHECK_INSTANCE_CAST (_tmp4_, TYPE_DATA_OBJECT, DataObject)), "selected.contains(view)"); -#line 5500 "ViewCollection.c" - } -#line 893 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - result = TRUE; -#line 893 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _g_object_unref0 (view); -#line 893 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - return result; -#line 5508 "ViewCollection.c" - } -#line 896 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp5_ = view; -#line 896 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - data_view_internal_set_selected (_tmp5_, TRUE); -#line 900 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp6_ = view; -#line 900 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - if (data_view_is_visible (_tmp6_)) { -#line 5518 "ViewCollection.c" - DataView* _tmp7_; -#line 901 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp7_ = view; -#line 901 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - gee_abstract_collection_add (G_TYPE_CHECK_INSTANCE_CAST (G_TYPE_CHECK_INSTANCE_CAST (user, GEE_TYPE_ARRAY_LIST, GeeArrayList), GEE_TYPE_ABSTRACT_COLLECTION, GeeAbstractCollection), _tmp7_); -#line 5524 "ViewCollection.c" - } -#line 903 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - result = TRUE; -#line 903 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _g_object_unref0 (view); -#line 903 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - return result; -#line 5532 "ViewCollection.c" -} - - -static gboolean -_view_collection_unselect_item_marked_action (DataObject* object, - GObject* user, - gpointer self) -{ - gboolean result; - result = view_collection_unselect_item ((ViewCollection*) self, object, user); -#line 909 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - return result; -#line 5545 "ViewCollection.c" -} - - -void -view_collection_unselect_marked (ViewCollection* self, - Marker* marker) -{ - GeeArrayList* unselected = NULL; - GeeArrayList* _tmp0_; - GeeArrayList* _tmp1_; - GeeArrayList* _tmp2_; - gint _tmp3_; - gint _tmp4_; -#line 907 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - g_return_if_fail (IS_VIEW_COLLECTION (self)); -#line 907 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - g_return_if_fail (IS_MARKER (marker)); -#line 908 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp0_ = gee_array_list_new (TYPE_DATA_VIEW, (GBoxedCopyFunc) g_object_ref, (GDestroyNotify) g_object_unref, NULL, NULL, NULL); -#line 908 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - unselected = _tmp0_; -#line 909 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp1_ = unselected; -#line 909 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - data_collection_act_on_marked (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_DATA_COLLECTION, DataCollection), marker, _view_collection_unselect_item_marked_action, self, NULL, NULL, G_TYPE_CHECK_INSTANCE_CAST (_tmp1_, G_TYPE_OBJECT, GObject)); -#line 911 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp2_ = unselected; -#line 911 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp3_ = gee_abstract_collection_get_size (G_TYPE_CHECK_INSTANCE_CAST (_tmp2_, GEE_TYPE_ABSTRACT_COLLECTION, GeeAbstractCollection)); -#line 911 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp4_ = _tmp3_; -#line 911 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - if (_tmp4_ > 0) { -#line 5579 "ViewCollection.c" - GeeArrayList* _tmp5_; - GeeArrayList* _tmp6_; -#line 912 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp5_ = unselected; -#line 912 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - view_collection_remove_many_selected (self, G_TYPE_CHECK_INSTANCE_CAST (_tmp5_, GEE_TYPE_COLLECTION, GeeCollection)); -#line 913 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp6_ = unselected; -#line 913 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - view_collection_notify_items_selected_unselected (self, NULL, G_TYPE_CHECK_INSTANCE_CAST (_tmp6_, GEE_TYPE_COLLECTION, GeeCollection)); -#line 5590 "ViewCollection.c" - } -#line 907 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _g_object_unref0 (unselected); -#line 5594 "ViewCollection.c" -} - - -void -view_collection_unselect_all (ViewCollection* self) -{ - DataSet* _tmp0_; - Marker* marker = NULL; - Marker* _tmp1_; - Marker* _tmp2_; - GeeList* _tmp3_; - GeeList* _tmp4_; - Marker* _tmp5_; -#line 918 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - g_return_if_fail (IS_VIEW_COLLECTION (self)); -#line 919 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp0_ = self->priv->selected; -#line 919 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - if (data_set_get_count (_tmp0_) == 0) { -#line 920 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - return; -#line 5616 "ViewCollection.c" - } -#line 922 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp1_ = data_collection_start_marking (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_DATA_COLLECTION, DataCollection)); -#line 922 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - marker = _tmp1_; -#line 923 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp2_ = marker; -#line 923 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp3_ = view_collection_get_selected (self); -#line 923 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp4_ = _tmp3_; -#line 923 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - marker_mark_many (_tmp2_, G_TYPE_CHECK_INSTANCE_CAST (_tmp4_, GEE_TYPE_COLLECTION, GeeCollection)); -#line 923 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _g_object_unref0 (_tmp4_); -#line 925 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp5_ = marker; -#line 925 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - view_collection_unselect_marked (self, _tmp5_); -#line 918 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _g_object_unref0 (marker); -#line 5638 "ViewCollection.c" -} - - -void -view_collection_unselect_all_but (ViewCollection* self, - DataView* exception) -{ - Marker* marker = NULL; - Marker* _tmp0_; - Marker* _tmp13_; -#line 929 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - g_return_if_fail (IS_VIEW_COLLECTION (self)); -#line 929 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - g_return_if_fail (IS_DATA_VIEW (exception)); -#line 930 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp0_ = data_collection_start_marking (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_DATA_COLLECTION, DataCollection)); -#line 930 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - marker = _tmp0_; -#line 5657 "ViewCollection.c" - { - GeeIterator* _object_it = NULL; - GeeCollection* _tmp1_; - GeeCollection* _tmp2_; - GeeIterator* _tmp3_; - GeeIterator* _tmp4_; -#line 931 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp1_ = data_collection_get_all (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_DATA_COLLECTION, DataCollection)); -#line 931 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp2_ = _tmp1_; -#line 931 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp3_ = gee_iterable_iterator (G_TYPE_CHECK_INSTANCE_CAST (_tmp2_, GEE_TYPE_ITERABLE, GeeIterable)); -#line 931 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp4_ = _tmp3_; -#line 931 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _g_object_unref0 (_tmp2_); -#line 931 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _object_it = _tmp4_; -#line 931 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - while (TRUE) { -#line 5678 "ViewCollection.c" - GeeIterator* _tmp5_; - DataObject* object = NULL; - GeeIterator* _tmp6_; - gpointer _tmp7_; - DataView* view = NULL; - DataObject* _tmp8_; - DataView* _tmp9_; - DataView* _tmp10_; -#line 931 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp5_ = _object_it; -#line 931 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - if (!gee_iterator_next (_tmp5_)) { -#line 931 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - break; -#line 5693 "ViewCollection.c" - } -#line 931 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp6_ = _object_it; -#line 931 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp7_ = gee_iterator_get (_tmp6_); -#line 931 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - object = (DataObject*) _tmp7_; -#line 932 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp8_ = object; -#line 932 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp9_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_CAST (_tmp8_, TYPE_DATA_VIEW, DataView)); -#line 932 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - view = _tmp9_; -#line 933 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp10_ = view; -#line 933 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - if (_tmp10_ != exception) { -#line 5711 "ViewCollection.c" - Marker* _tmp11_; - DataView* _tmp12_; -#line 934 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp11_ = marker; -#line 934 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp12_ = view; -#line 934 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - marker_mark (_tmp11_, G_TYPE_CHECK_INSTANCE_CAST (_tmp12_, TYPE_DATA_OBJECT, DataObject)); -#line 5720 "ViewCollection.c" - } -#line 931 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _g_object_unref0 (view); -#line 931 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _g_object_unref0 (object); -#line 5726 "ViewCollection.c" - } -#line 931 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _g_object_unref0 (_object_it); -#line 5730 "ViewCollection.c" - } -#line 937 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp13_ = marker; -#line 937 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - view_collection_unselect_marked (self, _tmp13_); -#line 929 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _g_object_unref0 (marker); -#line 5738 "ViewCollection.c" -} - - -static gboolean -view_collection_unselect_item (ViewCollection* self, - DataObject* object, - GObject* user) -{ - gboolean result = FALSE; - DataView* view = NULL; - DataView* _tmp0_; - DataView* _tmp1_; - DataView* _tmp4_; - DataView* _tmp5_; -#line 940 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - g_return_val_if_fail (IS_VIEW_COLLECTION (self), FALSE); -#line 940 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - g_return_val_if_fail (IS_DATA_OBJECT (object), FALSE); -#line 940 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - g_return_val_if_fail ((user == NULL) || G_IS_OBJECT (user), FALSE); -#line 941 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp0_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_CAST (object, TYPE_DATA_VIEW, DataView)); -#line 941 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - view = _tmp0_; -#line 942 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp1_ = view; -#line 942 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - if (!data_view_is_selected (_tmp1_)) { -#line 5767 "ViewCollection.c" - DataSet* _tmp2_; - DataView* _tmp3_; -#line 943 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp2_ = self->priv->selected; -#line 943 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp3_ = view; -#line 943 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _vala_assert (!data_set_contains (_tmp2_, G_TYPE_CHECK_INSTANCE_CAST (_tmp3_, TYPE_DATA_OBJECT, DataObject)), "!selected.contains(view)"); -#line 945 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - result = TRUE; -#line 945 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _g_object_unref0 (view); -#line 945 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - return result; -#line 5782 "ViewCollection.c" - } -#line 948 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp4_ = view; -#line 948 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - data_view_internal_set_selected (_tmp4_, FALSE); -#line 949 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp5_ = view; -#line 949 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - gee_abstract_collection_add (G_TYPE_CHECK_INSTANCE_CAST (G_TYPE_CHECK_INSTANCE_CAST (user, GEE_TYPE_ARRAY_LIST, GeeArrayList), GEE_TYPE_ABSTRACT_COLLECTION, GeeAbstractCollection), _tmp5_); -#line 951 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - result = TRUE; -#line 951 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _g_object_unref0 (view); -#line 951 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - return result; -#line 5798 "ViewCollection.c" -} - - -void -view_collection_unselect_and_select_marked (ViewCollection* self, - Marker* unselect, - Marker* select) -{ - GeeArrayList* unselected = NULL; - GeeArrayList* _tmp0_; - GeeArrayList* selected = NULL; - GeeArrayList* _tmp1_; -#line 955 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - g_return_if_fail (IS_VIEW_COLLECTION (self)); -#line 955 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - g_return_if_fail (IS_MARKER (unselect)); -#line 955 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - g_return_if_fail (IS_MARKER (select)); -#line 956 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp0_ = gee_array_list_new (TYPE_DATA_VIEW, (GBoxedCopyFunc) g_object_ref, (GDestroyNotify) g_object_unref, NULL, NULL, NULL); -#line 956 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - unselected = _tmp0_; -#line 957 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - data_collection_act_on_marked (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_DATA_COLLECTION, DataCollection), unselect, _view_collection_unselect_item_marked_action, self, NULL, NULL, G_TYPE_CHECK_INSTANCE_CAST (unselected, G_TYPE_OBJECT, GObject)); -#line 959 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - view_collection_remove_many_selected (self, G_TYPE_CHECK_INSTANCE_CAST (unselected, GEE_TYPE_COLLECTION, GeeCollection)); -#line 961 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp1_ = gee_array_list_new (TYPE_DATA_VIEW, (GBoxedCopyFunc) g_object_ref, (GDestroyNotify) g_object_unref, NULL, NULL, NULL); -#line 961 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - selected = _tmp1_; -#line 962 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - data_collection_act_on_marked (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_DATA_COLLECTION, DataCollection), select, _view_collection_select_item_marked_action, self, NULL, NULL, G_TYPE_CHECK_INSTANCE_CAST (selected, G_TYPE_OBJECT, GObject)); -#line 964 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - view_collection_add_many_selected (self, G_TYPE_CHECK_INSTANCE_CAST (selected, GEE_TYPE_COLLECTION, GeeCollection)); -#line 966 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - view_collection_notify_items_selected_unselected (self, G_TYPE_CHECK_INSTANCE_CAST (selected, GEE_TYPE_COLLECTION, GeeCollection), G_TYPE_CHECK_INSTANCE_CAST (unselected, GEE_TYPE_COLLECTION, GeeCollection)); -#line 955 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _g_object_unref0 (selected); -#line 955 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _g_object_unref0 (unselected); -#line 5839 "ViewCollection.c" -} - - -static gboolean -_view_collection_toggle_item_marked_action (DataObject* object, - GObject* user, - gpointer self) -{ - gboolean result; - result = view_collection_toggle_item ((ViewCollection*) self, object, user); -#line 973 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - return result; -#line 5852 "ViewCollection.c" -} - - -void -view_collection_toggle_marked (ViewCollection* self, - Marker* marker) -{ - ViewCollectionToggleLists* lists = NULL; - ViewCollectionToggleLists* _tmp0_; - GeeArrayList* _tmp1_; - GeeArrayList* _tmp2_; - GeeArrayList* _tmp3_; - GeeArrayList* _tmp4_; -#line 971 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - g_return_if_fail (IS_VIEW_COLLECTION (self)); -#line 971 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - g_return_if_fail (IS_MARKER (marker)); -#line 972 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp0_ = view_collection_toggle_lists_new (); -#line 972 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - lists = _tmp0_; -#line 973 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - data_collection_act_on_marked (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_DATA_COLLECTION, DataCollection), marker, _view_collection_toggle_item_marked_action, self, NULL, NULL, G_TYPE_CHECK_INSTANCE_CAST (lists, G_TYPE_OBJECT, GObject)); -#line 976 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp1_ = lists->selected; -#line 976 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - view_collection_add_many_selected (self, G_TYPE_CHECK_INSTANCE_CAST (_tmp1_, GEE_TYPE_COLLECTION, GeeCollection)); -#line 977 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp2_ = lists->unselected; -#line 977 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - view_collection_remove_many_selected (self, G_TYPE_CHECK_INSTANCE_CAST (_tmp2_, GEE_TYPE_COLLECTION, GeeCollection)); -#line 979 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp3_ = lists->selected; -#line 979 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp4_ = lists->unselected; -#line 979 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - view_collection_notify_items_selected_unselected (self, G_TYPE_CHECK_INSTANCE_CAST (_tmp3_, GEE_TYPE_COLLECTION, GeeCollection), G_TYPE_CHECK_INSTANCE_CAST (_tmp4_, GEE_TYPE_COLLECTION, GeeCollection)); -#line 971 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _g_object_unref0 (lists); -#line 5892 "ViewCollection.c" -} - - -static gboolean -view_collection_toggle_item (ViewCollection* self, - DataObject* object, - GObject* user) -{ - gboolean result = FALSE; - DataView* view = NULL; - DataView* _tmp0_; - ViewCollectionToggleLists* lists = NULL; - ViewCollectionToggleLists* _tmp1_; - DataView* _tmp2_; -#line 982 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - g_return_val_if_fail (IS_VIEW_COLLECTION (self), FALSE); -#line 982 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - g_return_val_if_fail (IS_DATA_OBJECT (object), FALSE); -#line 982 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - g_return_val_if_fail ((user == NULL) || G_IS_OBJECT (user), FALSE); -#line 983 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp0_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_CAST (object, TYPE_DATA_VIEW, DataView)); -#line 983 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - view = _tmp0_; -#line 984 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp1_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_CAST (user, VIEW_COLLECTION_TYPE_TOGGLE_LISTS, ViewCollectionToggleLists)); -#line 984 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - lists = _tmp1_; -#line 990 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp2_ = view; -#line 990 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - if (data_view_internal_toggle (_tmp2_)) { -#line 5925 "ViewCollection.c" - DataView* _tmp3_; -#line 991 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp3_ = view; -#line 991 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - if (data_view_is_visible (_tmp3_)) { -#line 5931 "ViewCollection.c" - ViewCollectionToggleLists* _tmp4_; - GeeArrayList* _tmp5_; - DataView* _tmp6_; -#line 992 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp4_ = lists; -#line 992 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp5_ = _tmp4_->selected; -#line 992 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp6_ = view; -#line 992 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - gee_abstract_collection_add (G_TYPE_CHECK_INSTANCE_CAST (_tmp5_, GEE_TYPE_ABSTRACT_COLLECTION, GeeAbstractCollection), _tmp6_); -#line 5943 "ViewCollection.c" - } - } else { - ViewCollectionToggleLists* _tmp7_; - GeeArrayList* _tmp8_; - DataView* _tmp9_; -#line 994 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp7_ = lists; -#line 994 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp8_ = _tmp7_->unselected; -#line 994 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp9_ = view; -#line 994 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - gee_abstract_collection_add (G_TYPE_CHECK_INSTANCE_CAST (_tmp8_, GEE_TYPE_ABSTRACT_COLLECTION, GeeAbstractCollection), _tmp9_); -#line 5957 "ViewCollection.c" - } -#line 997 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - result = TRUE; -#line 997 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _g_object_unref0 (lists); -#line 997 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _g_object_unref0 (view); -#line 997 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - return result; -#line 5967 "ViewCollection.c" -} - - -gint -view_collection_get_selected_count (ViewCollection* self) -{ - gint result = 0; - DataSet* _tmp0_; -#line 1000 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - g_return_val_if_fail (IS_VIEW_COLLECTION (self), 0); -#line 1001 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp0_ = self->priv->selected; -#line 1001 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - result = data_set_get_count (_tmp0_); -#line 1001 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - return result; -#line 5984 "ViewCollection.c" -} - - -GeeList* -view_collection_get_selected (ViewCollection* self) -{ - GeeList* result = NULL; - DataSet* _tmp0_; - GeeList* _tmp1_; -#line 1004 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - g_return_val_if_fail (IS_VIEW_COLLECTION (self), NULL); -#line 1005 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp0_ = self->priv->selected; -#line 1005 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp1_ = data_set_get_all (_tmp0_); -#line 1005 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - result = G_TYPE_CHECK_INSTANCE_CAST (_tmp1_, GEE_TYPE_LIST, GeeList); -#line 1005 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - return result; -#line 6004 "ViewCollection.c" -} - - -DataView* -view_collection_get_selected_at (ViewCollection* self, - gint index) -{ - DataView* result = NULL; - DataSet* _tmp0_; - DataObject* _tmp1_; -#line 1008 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - g_return_val_if_fail (IS_VIEW_COLLECTION (self), NULL); -#line 1009 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp0_ = self->priv->selected; -#line 1009 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp1_ = data_set_get_at (_tmp0_, index); -#line 1009 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - result = G_TYPE_CHECK_INSTANCE_CAST (_tmp1_, TYPE_DATA_VIEW, DataView); -#line 1009 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - return result; -#line 6025 "ViewCollection.c" -} - - -static gboolean -view_collection_is_visible (ViewCollection* self, - DataView* view) -{ - gboolean result = FALSE; - gboolean _tmp0_ = FALSE; - DataSet* _tmp1_; -#line 1012 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - g_return_val_if_fail (IS_VIEW_COLLECTION (self), FALSE); -#line 1012 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - g_return_val_if_fail (IS_DATA_VIEW (view), FALSE); -#line 1013 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp1_ = self->priv->visible; -#line 1013 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - if (_tmp1_ != NULL) { -#line 6044 "ViewCollection.c" - DataSet* _tmp2_; -#line 1013 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp2_ = self->priv->visible; -#line 1013 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp0_ = data_set_contains (_tmp2_, G_TYPE_CHECK_INSTANCE_CAST (view, TYPE_DATA_OBJECT, DataObject)); -#line 6050 "ViewCollection.c" - } else { -#line 1013 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp0_ = TRUE; -#line 6054 "ViewCollection.c" - } -#line 1013 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - result = _tmp0_; -#line 1013 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - return result; -#line 6060 "ViewCollection.c" -} - - -static gboolean -view_collection_add_many_visible (ViewCollection* self, - GeeCollection* many) -{ - gboolean result = FALSE; - DataSet* _tmp0_; - DataSet* _tmp1_; - DataSet* _tmp2_; -#line 1016 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - g_return_val_if_fail (IS_VIEW_COLLECTION (self), FALSE); -#line 1016 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - g_return_val_if_fail (GEE_IS_COLLECTION (many), FALSE); -#line 1017 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp0_ = self->priv->visible; -#line 1017 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - if (_tmp0_ == NULL) { -#line 1018 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - result = TRUE; -#line 1018 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - return result; -#line 6084 "ViewCollection.c" - } -#line 1020 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp1_ = self->priv->visible; -#line 1020 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - if (!data_set_add_many (_tmp1_, many)) { -#line 1021 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - result = FALSE; -#line 1021 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - return result; -#line 6094 "ViewCollection.c" - } -#line 1024 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp2_ = self->priv->visible; -#line 1024 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - if (data_set_get_count (_tmp2_) == DATA_COLLECTION_CLASS (view_collection_parent_class)->get_count (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_DATA_COLLECTION, DataCollection))) { -#line 1025 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _data_set_unref0 (self->priv->visible); -#line 1025 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - self->priv->visible = NULL; -#line 6104 "ViewCollection.c" - } -#line 1027 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - result = TRUE; -#line 1027 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - return result; -#line 6110 "ViewCollection.c" -} - - -static void -view_collection_hide_items (ViewCollection* self, - GeeList* to_hide) -{ - GeeArrayList* unselected = NULL; - GeeArrayList* _tmp0_; - gint count = 0; - gint _tmp1_; - gint _tmp2_; - DataSet* _tmp17_; - gboolean removed = FALSE; - DataSet* _tmp19_; - gboolean _tmp20_; - GeeArrayList* _tmp21_; - GeeArrayList* _tmp22_; - gint _tmp23_; - gint _tmp24_; - gint _tmp26_; - gint _tmp27_; -#line 1031 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - g_return_if_fail (IS_VIEW_COLLECTION (self)); -#line 1031 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - g_return_if_fail (GEE_IS_LIST (to_hide)); -#line 1032 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp0_ = gee_array_list_new (TYPE_DATA_VIEW, (GBoxedCopyFunc) g_object_ref, (GDestroyNotify) g_object_unref, NULL, NULL, NULL); -#line 1032 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - unselected = _tmp0_; -#line 1034 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp1_ = gee_collection_get_size (G_TYPE_CHECK_INSTANCE_CAST (to_hide, GEE_TYPE_COLLECTION, GeeCollection)); -#line 1034 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp2_ = _tmp1_; -#line 1034 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - count = _tmp2_; -#line 6147 "ViewCollection.c" - { - gint ctr = 0; -#line 1035 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - ctr = 0; -#line 6152 "ViewCollection.c" - { - gboolean _tmp3_ = FALSE; -#line 1035 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp3_ = TRUE; -#line 1035 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - while (TRUE) { -#line 6159 "ViewCollection.c" - gint _tmp5_; - gint _tmp6_; - DataView* view = NULL; - gint _tmp7_; - gpointer _tmp8_; - DataView* _tmp9_; - DataView* _tmp10_; - DataView* _tmp16_; -#line 1035 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - if (!_tmp3_) { -#line 6170 "ViewCollection.c" - gint _tmp4_; -#line 1035 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp4_ = ctr; -#line 1035 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - ctr = _tmp4_ + 1; -#line 6176 "ViewCollection.c" - } -#line 1035 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp3_ = FALSE; -#line 1035 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp5_ = ctr; -#line 1035 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp6_ = count; -#line 1035 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - if (!(_tmp5_ < _tmp6_)) { -#line 1035 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - break; -#line 6188 "ViewCollection.c" - } -#line 1036 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp7_ = ctr; -#line 1036 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp8_ = gee_list_get (to_hide, _tmp7_); -#line 1036 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - view = (DataView*) _tmp8_; -#line 1037 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp9_ = view; -#line 1037 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _vala_assert (data_view_is_visible (_tmp9_), "view.is_visible()"); -#line 1039 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp10_ = view; -#line 1039 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - if (data_view_is_selected (_tmp10_)) { -#line 6204 "ViewCollection.c" - DataView* _tmp11_; - GeeArrayList* _tmp12_; - DataView* _tmp13_; -#line 1040 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp11_ = view; -#line 1040 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - data_view_internal_set_selected (_tmp11_, FALSE); -#line 1041 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp12_ = unselected; -#line 1041 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp13_ = view; -#line 1041 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - gee_abstract_collection_add (G_TYPE_CHECK_INSTANCE_CAST (_tmp12_, GEE_TYPE_ABSTRACT_COLLECTION, GeeAbstractCollection), _tmp13_); -#line 6218 "ViewCollection.c" - } else { - DataSet* _tmp14_; - DataView* _tmp15_; -#line 1043 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp14_ = self->priv->selected; -#line 1043 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp15_ = view; -#line 1043 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _vala_assert (!data_set_contains (_tmp14_, G_TYPE_CHECK_INSTANCE_CAST (_tmp15_, TYPE_DATA_OBJECT, DataObject)), "!selected.contains(view)"); -#line 6228 "ViewCollection.c" - } -#line 1046 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp16_ = view; -#line 1046 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - data_view_internal_set_visible (_tmp16_, FALSE); -#line 1035 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _g_object_unref0 (view); -#line 6236 "ViewCollection.c" - } - } - } -#line 1049 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp17_ = self->priv->visible; -#line 1049 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - if (_tmp17_ == NULL) { -#line 6244 "ViewCollection.c" - DataSet* _tmp18_; -#line 1051 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp18_ = data_collection_get_dataset_copy (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_DATA_COLLECTION, DataCollection)); -#line 1051 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _data_set_unref0 (self->priv->visible); -#line 1051 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - self->priv->visible = _tmp18_; -#line 6252 "ViewCollection.c" - } -#line 1054 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp19_ = self->priv->visible; -#line 1054 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - removed = data_set_remove_many (_tmp19_, G_TYPE_CHECK_INSTANCE_CAST (to_hide, GEE_TYPE_COLLECTION, GeeCollection)); -#line 1055 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp20_ = removed; -#line 1055 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _vala_assert (_tmp20_, "removed"); -#line 1057 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp21_ = unselected; -#line 1057 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - view_collection_remove_many_selected (self, G_TYPE_CHECK_INSTANCE_CAST (_tmp21_, GEE_TYPE_COLLECTION, GeeCollection)); -#line 1059 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp22_ = unselected; -#line 1059 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp23_ = gee_abstract_collection_get_size (G_TYPE_CHECK_INSTANCE_CAST (_tmp22_, GEE_TYPE_ABSTRACT_COLLECTION, GeeAbstractCollection)); -#line 1059 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp24_ = _tmp23_; -#line 1059 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - if (_tmp24_ > 0) { -#line 6274 "ViewCollection.c" - GeeArrayList* _tmp25_; -#line 1060 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp25_ = unselected; -#line 1060 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - view_collection_notify_items_selected_unselected (self, NULL, G_TYPE_CHECK_INSTANCE_CAST (_tmp25_, GEE_TYPE_COLLECTION, GeeCollection)); -#line 6280 "ViewCollection.c" - } -#line 1062 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp26_ = gee_collection_get_size (G_TYPE_CHECK_INSTANCE_CAST (to_hide, GEE_TYPE_COLLECTION, GeeCollection)); -#line 1062 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp27_ = _tmp26_; -#line 1062 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - if (_tmp27_ > 0) { -#line 1063 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - view_collection_notify_items_hidden (self, G_TYPE_CHECK_INSTANCE_CAST (to_hide, GEE_TYPE_COLLECTION, GeeCollection)); -#line 1064 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - view_collection_notify_items_visibility_changed (self, G_TYPE_CHECK_INSTANCE_CAST (to_hide, GEE_TYPE_COLLECTION, GeeCollection)); -#line 6292 "ViewCollection.c" - } -#line 1031 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _g_object_unref0 (unselected); -#line 6296 "ViewCollection.c" -} - - -static void -view_collection_show_items (ViewCollection* self, - GeeList* to_show) -{ - GeeArrayList* added_selected = NULL; - GeeArrayList* _tmp0_; - gint count = 0; - gint _tmp1_; - gint _tmp2_; - gboolean added = FALSE; - gboolean _tmp16_; - GeeArrayList* _tmp17_; - gint _tmp18_; - gint _tmp19_; -#line 1069 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - g_return_if_fail (IS_VIEW_COLLECTION (self)); -#line 1069 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - g_return_if_fail (GEE_IS_LIST (to_show)); -#line 1070 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp0_ = gee_array_list_new (TYPE_DATA_VIEW, (GBoxedCopyFunc) g_object_ref, (GDestroyNotify) g_object_unref, NULL, NULL, NULL); -#line 1070 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - added_selected = _tmp0_; -#line 1072 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp1_ = gee_collection_get_size (G_TYPE_CHECK_INSTANCE_CAST (to_show, GEE_TYPE_COLLECTION, GeeCollection)); -#line 1072 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp2_ = _tmp1_; -#line 1072 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - count = _tmp2_; -#line 6328 "ViewCollection.c" - { - gint ctr = 0; -#line 1073 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - ctr = 0; -#line 6333 "ViewCollection.c" - { - gboolean _tmp3_ = FALSE; -#line 1073 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp3_ = TRUE; -#line 1073 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - while (TRUE) { -#line 6340 "ViewCollection.c" - gint _tmp5_; - gint _tmp6_; - DataView* view = NULL; - gint _tmp7_; - gpointer _tmp8_; - DataView* _tmp9_; - DataView* _tmp10_; - DataView* _tmp11_; -#line 1073 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - if (!_tmp3_) { -#line 6351 "ViewCollection.c" - gint _tmp4_; -#line 1073 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp4_ = ctr; -#line 1073 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - ctr = _tmp4_ + 1; -#line 6357 "ViewCollection.c" - } -#line 1073 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp3_ = FALSE; -#line 1073 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp5_ = ctr; -#line 1073 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp6_ = count; -#line 1073 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - if (!(_tmp5_ < _tmp6_)) { -#line 1073 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - break; -#line 6369 "ViewCollection.c" - } -#line 1074 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp7_ = ctr; -#line 1074 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp8_ = gee_list_get (to_show, _tmp7_); -#line 1074 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - view = (DataView*) _tmp8_; -#line 1075 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp9_ = view; -#line 1075 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _vala_assert (!data_view_is_visible (_tmp9_), "!view.is_visible()"); -#line 1077 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp10_ = view; -#line 1077 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - data_view_internal_set_visible (_tmp10_, TRUE); -#line 1080 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp11_ = view; -#line 1080 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - if (data_view_is_selected (_tmp11_)) { -#line 6389 "ViewCollection.c" - DataSet* _tmp12_; - DataView* _tmp13_; - GeeArrayList* _tmp14_; - DataView* _tmp15_; -#line 1081 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp12_ = self->priv->selected; -#line 1081 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp13_ = view; -#line 1081 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _vala_assert (!data_set_contains (_tmp12_, G_TYPE_CHECK_INSTANCE_CAST (_tmp13_, TYPE_DATA_OBJECT, DataObject)), "!selected.contains(view)"); -#line 1082 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp14_ = added_selected; -#line 1082 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp15_ = view; -#line 1082 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - gee_abstract_collection_add (G_TYPE_CHECK_INSTANCE_CAST (_tmp14_, GEE_TYPE_ABSTRACT_COLLECTION, GeeAbstractCollection), _tmp15_); -#line 6406 "ViewCollection.c" - } -#line 1073 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _g_object_unref0 (view); -#line 6410 "ViewCollection.c" - } - } - } -#line 1086 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - added = view_collection_add_many_visible (self, G_TYPE_CHECK_INSTANCE_CAST (to_show, GEE_TYPE_COLLECTION, GeeCollection)); -#line 1087 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp16_ = added; -#line 1087 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _vala_assert (_tmp16_, "added"); -#line 1089 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp17_ = added_selected; -#line 1089 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - view_collection_add_many_selected (self, G_TYPE_CHECK_INSTANCE_CAST (_tmp17_, GEE_TYPE_COLLECTION, GeeCollection)); -#line 1091 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp18_ = gee_collection_get_size (G_TYPE_CHECK_INSTANCE_CAST (to_show, GEE_TYPE_COLLECTION, GeeCollection)); -#line 1091 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp19_ = _tmp18_; -#line 1091 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - if (_tmp19_ > 0) { -#line 1092 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - view_collection_notify_items_shown (self, G_TYPE_CHECK_INSTANCE_CAST (to_show, GEE_TYPE_COLLECTION, GeeCollection)); -#line 1093 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - view_collection_notify_items_visibility_changed (self, G_TYPE_CHECK_INSTANCE_CAST (to_show, GEE_TYPE_COLLECTION, GeeCollection)); -#line 6434 "ViewCollection.c" - } -#line 1069 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _g_object_unref0 (added_selected); -#line 6438 "ViewCollection.c" -} - - -gboolean -view_collection_has_view_for_source (ViewCollection* self, - DataSource* source) -{ - gboolean result = FALSE; - DataView* _tmp0_; - DataView* _tmp1_; - gboolean _tmp2_; -#line 1098 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - g_return_val_if_fail (IS_VIEW_COLLECTION (self), FALSE); -#line 1098 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - g_return_val_if_fail (IS_DATA_SOURCE (source), FALSE); -#line 1099 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp0_ = view_collection_get_view_for_source (self, source); -#line 1099 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp1_ = _tmp0_; -#line 1099 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp2_ = _tmp1_ != NULL; -#line 1099 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _g_object_unref0 (_tmp1_); -#line 1099 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - result = _tmp2_; -#line 1099 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - return result; -#line 6466 "ViewCollection.c" -} - - -DataView* -view_collection_get_view_for_source (ViewCollection* self, - DataSource* source) -{ - DataView* result = NULL; - GeeHashMap* _tmp0_; - gpointer _tmp1_; -#line 1103 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - g_return_val_if_fail (IS_VIEW_COLLECTION (self), NULL); -#line 1103 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - g_return_val_if_fail (IS_DATA_SOURCE (source), NULL); -#line 1104 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp0_ = self->priv->source_map; -#line 1104 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp1_ = gee_abstract_map_get (G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, GEE_TYPE_ABSTRACT_MAP, GeeAbstractMap), source); -#line 1104 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - result = (DataView*) _tmp1_; -#line 1104 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - return result; -#line 6489 "ViewCollection.c" -} - - -gboolean -view_collection_has_view_for_source_with_filtered (ViewCollection* self, - DataSource* source) -{ - gboolean result = FALSE; - DataView* _tmp0_; - DataView* _tmp1_; - gboolean _tmp2_; -#line 1108 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - g_return_val_if_fail (IS_VIEW_COLLECTION (self), FALSE); -#line 1108 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - g_return_val_if_fail (IS_DATA_SOURCE (source), FALSE); -#line 1109 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp0_ = view_collection_get_view_for_source_filtered (self, source); -#line 1109 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp1_ = _tmp0_; -#line 1109 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp2_ = _tmp1_ != NULL; -#line 1109 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _g_object_unref0 (_tmp1_); -#line 1109 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - result = _tmp2_; -#line 1109 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - return result; -#line 6517 "ViewCollection.c" -} - - -DataView* -view_collection_get_view_for_source_filtered (ViewCollection* self, - DataSource* source) -{ - DataView* result = NULL; - DataView* view = NULL; - GeeHashMap* _tmp0_; - gpointer _tmp1_; - gboolean _tmp2_ = FALSE; - DataView* _tmp3_; -#line 1113 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - g_return_val_if_fail (IS_VIEW_COLLECTION (self), NULL); -#line 1113 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - g_return_val_if_fail (IS_DATA_SOURCE (source), NULL); -#line 1114 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp0_ = self->priv->source_map; -#line 1114 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp1_ = gee_abstract_map_get (G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, GEE_TYPE_ABSTRACT_MAP, GeeAbstractMap), source); -#line 1114 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - view = (DataView*) _tmp1_; -#line 1116 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp3_ = view; -#line 1116 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - if (_tmp3_ != NULL) { -#line 6545 "ViewCollection.c" - DataView* _tmp4_; -#line 1116 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp4_ = view; -#line 1116 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp2_ = !view_collection_is_in_filter (self, _tmp4_); -#line 6551 "ViewCollection.c" - } else { -#line 1116 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp2_ = FALSE; -#line 6555 "ViewCollection.c" - } -#line 1116 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - if (_tmp2_) { -#line 1117 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - result = NULL; -#line 1117 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _g_object_unref0 (view); -#line 1117 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - return result; -#line 6565 "ViewCollection.c" - } -#line 1118 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - result = view; -#line 1118 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - return result; -#line 6571 "ViewCollection.c" -} - - -GeeCollection* -view_collection_get_sources (ViewCollection* self) -{ - GeeCollection* result = NULL; - GeeHashMap* _tmp0_; - GeeSet* _tmp1_; - GeeSet* _tmp2_; - GeeSet* _tmp3_; - GeeSet* _tmp4_; - GeeSet* _tmp5_; - GeeCollection* _tmp6_; -#line 1122 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - g_return_val_if_fail (IS_VIEW_COLLECTION (self), NULL); -#line 1123 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp0_ = self->priv->source_map; -#line 1123 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp1_ = gee_abstract_map_get_keys (G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, GEE_TYPE_ABSTRACT_MAP, GeeAbstractMap)); -#line 1123 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp2_ = _tmp1_; -#line 1123 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp3_ = _tmp2_; -#line 1123 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp4_ = gee_set_get_read_only_view (_tmp3_); -#line 1123 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp5_ = _tmp4_; -#line 1123 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp6_ = G_TYPE_CHECK_INSTANCE_CAST (_tmp5_, GEE_TYPE_COLLECTION, GeeCollection); -#line 1123 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _g_object_unref0 (_tmp3_); -#line 1123 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - result = _tmp6_; -#line 1123 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - return result; -#line 6608 "ViewCollection.c" -} - - -gboolean -view_collection_has_source_of_type (ViewCollection* self, - GType t) -{ - gboolean result = FALSE; -#line 1127 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - g_return_val_if_fail (IS_VIEW_COLLECTION (self), FALSE); -#line 1128 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _vala_assert (g_type_is_a (t, TYPE_DATA_SOURCE), "t.is_a(typeof(DataSource))"); -#line 6621 "ViewCollection.c" - { - GeeIterator* _source_it = NULL; - GeeHashMap* _tmp0_; - GeeSet* _tmp1_; - GeeSet* _tmp2_; - GeeSet* _tmp3_; - GeeIterator* _tmp4_; - GeeIterator* _tmp5_; -#line 1130 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp0_ = self->priv->source_map; -#line 1130 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp1_ = gee_abstract_map_get_keys (G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, GEE_TYPE_ABSTRACT_MAP, GeeAbstractMap)); -#line 1130 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp2_ = _tmp1_; -#line 1130 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp3_ = _tmp2_; -#line 1130 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp4_ = gee_iterable_iterator (G_TYPE_CHECK_INSTANCE_CAST (_tmp3_, GEE_TYPE_ITERABLE, GeeIterable)); -#line 1130 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp5_ = _tmp4_; -#line 1130 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _g_object_unref0 (_tmp3_); -#line 1130 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _source_it = _tmp5_; -#line 1130 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - while (TRUE) { -#line 6648 "ViewCollection.c" - GeeIterator* _tmp6_; - DataSource* source = NULL; - GeeIterator* _tmp7_; - gpointer _tmp8_; - DataSource* _tmp9_; -#line 1130 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp6_ = _source_it; -#line 1130 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - if (!gee_iterator_next (_tmp6_)) { -#line 1130 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - break; -#line 6660 "ViewCollection.c" - } -#line 1130 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp7_ = _source_it; -#line 1130 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp8_ = gee_iterator_get (_tmp7_); -#line 1130 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - source = (DataSource*) _tmp8_; -#line 1131 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp9_ = source; -#line 1131 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - if (g_type_is_a (G_TYPE_FROM_INSTANCE (G_TYPE_CHECK_INSTANCE_CAST (_tmp9_, G_TYPE_OBJECT, GObject)), t)) { -#line 1132 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - result = TRUE; -#line 1132 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _g_object_unref0 (source); -#line 1132 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _g_object_unref0 (_source_it); -#line 1132 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - return result; -#line 6680 "ViewCollection.c" - } -#line 1130 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _g_object_unref0 (source); -#line 6684 "ViewCollection.c" - } -#line 1130 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _g_object_unref0 (_source_it); -#line 6688 "ViewCollection.c" - } -#line 1135 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - result = FALSE; -#line 1135 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - return result; -#line 6694 "ViewCollection.c" -} - - -gint -view_collection_get_sources_of_type_count (ViewCollection* self, - GType t) -{ - gint result = 0; - gint count = 0; -#line 1138 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - g_return_val_if_fail (IS_VIEW_COLLECTION (self), 0); -#line 1139 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _vala_assert (g_type_is_a (t, TYPE_DATA_SOURCE), "t.is_a(typeof(DataSource))"); -#line 1141 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - count = 0; -#line 6710 "ViewCollection.c" - { - GeeIterator* _object_it = NULL; - GeeCollection* _tmp0_; - GeeCollection* _tmp1_; - GeeIterator* _tmp2_; - GeeIterator* _tmp3_; -#line 1142 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp0_ = data_collection_get_all (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_DATA_COLLECTION, DataCollection)); -#line 1142 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp1_ = _tmp0_; -#line 1142 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp2_ = gee_iterable_iterator (G_TYPE_CHECK_INSTANCE_CAST (_tmp1_, GEE_TYPE_ITERABLE, GeeIterable)); -#line 1142 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp3_ = _tmp2_; -#line 1142 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _g_object_unref0 (_tmp1_); -#line 1142 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _object_it = _tmp3_; -#line 1142 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - while (TRUE) { -#line 6731 "ViewCollection.c" - GeeIterator* _tmp4_; - DataObject* object = NULL; - GeeIterator* _tmp5_; - gpointer _tmp6_; - DataObject* _tmp7_; - DataSource* _tmp8_; - DataSource* _tmp9_; - gboolean _tmp10_; -#line 1142 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp4_ = _object_it; -#line 1142 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - if (!gee_iterator_next (_tmp4_)) { -#line 1142 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - break; -#line 6746 "ViewCollection.c" - } -#line 1142 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp5_ = _object_it; -#line 1142 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp6_ = gee_iterator_get (_tmp5_); -#line 1142 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - object = (DataObject*) _tmp6_; -#line 1143 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp7_ = object; -#line 1143 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp8_ = data_view_get_source (G_TYPE_CHECK_INSTANCE_CAST (_tmp7_, TYPE_DATA_VIEW, DataView)); -#line 1143 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp9_ = _tmp8_; -#line 1143 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp10_ = g_type_is_a (G_TYPE_FROM_INSTANCE (G_TYPE_CHECK_INSTANCE_CAST (_tmp9_, G_TYPE_OBJECT, GObject)), t); -#line 1143 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _g_object_unref0 (_tmp9_); -#line 1143 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - if (_tmp10_) { -#line 6766 "ViewCollection.c" - gint _tmp11_; -#line 1144 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp11_ = count; -#line 1144 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - count = _tmp11_ + 1; -#line 6772 "ViewCollection.c" - } -#line 1142 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _g_object_unref0 (object); -#line 6776 "ViewCollection.c" - } -#line 1142 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _g_object_unref0 (_object_it); -#line 6780 "ViewCollection.c" - } -#line 1147 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - result = count; -#line 1147 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - return result; -#line 6786 "ViewCollection.c" -} - - -GeeList* -view_collection_get_sources_of_type (ViewCollection* self, - GType t) -{ - GeeList* result = NULL; - GeeList* sources = NULL; -#line 1150 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - g_return_val_if_fail (IS_VIEW_COLLECTION (self), NULL); -#line 1151 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _vala_assert (g_type_is_a (t, TYPE_DATA_SOURCE), "t.is_a(typeof(DataSource))"); -#line 1153 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - sources = NULL; -#line 6802 "ViewCollection.c" - { - GeeIterator* _object_it = NULL; - GeeCollection* _tmp0_; - GeeCollection* _tmp1_; - GeeIterator* _tmp2_; - GeeIterator* _tmp3_; -#line 1154 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp0_ = data_collection_get_all (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_DATA_COLLECTION, DataCollection)); -#line 1154 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp1_ = _tmp0_; -#line 1154 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp2_ = gee_iterable_iterator (G_TYPE_CHECK_INSTANCE_CAST (_tmp1_, GEE_TYPE_ITERABLE, GeeIterable)); -#line 1154 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp3_ = _tmp2_; -#line 1154 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _g_object_unref0 (_tmp1_); -#line 1154 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _object_it = _tmp3_; -#line 1154 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - while (TRUE) { -#line 6823 "ViewCollection.c" - GeeIterator* _tmp4_; - DataObject* object = NULL; - GeeIterator* _tmp5_; - gpointer _tmp6_; - DataSource* source = NULL; - DataObject* _tmp7_; - DataSource* _tmp8_; - DataSource* _tmp9_; -#line 1154 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp4_ = _object_it; -#line 1154 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - if (!gee_iterator_next (_tmp4_)) { -#line 1154 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - break; -#line 6838 "ViewCollection.c" - } -#line 1154 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp5_ = _object_it; -#line 1154 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp6_ = gee_iterator_get (_tmp5_); -#line 1154 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - object = (DataObject*) _tmp6_; -#line 1155 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp7_ = object; -#line 1155 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp8_ = data_view_get_source (G_TYPE_CHECK_INSTANCE_CAST (_tmp7_, TYPE_DATA_VIEW, DataView)); -#line 1155 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - source = _tmp8_; -#line 1156 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp9_ = source; -#line 1156 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - if (g_type_is_a (G_TYPE_FROM_INSTANCE (G_TYPE_CHECK_INSTANCE_CAST (_tmp9_, G_TYPE_OBJECT, GObject)), t)) { -#line 6856 "ViewCollection.c" - GeeList* _tmp10_; - GeeList* _tmp12_; - DataSource* _tmp13_; -#line 1157 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp10_ = sources; -#line 1157 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - if (_tmp10_ == NULL) { -#line 6864 "ViewCollection.c" - GeeArrayList* _tmp11_; -#line 1158 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp11_ = gee_array_list_new (TYPE_DATA_SOURCE, (GBoxedCopyFunc) g_object_ref, (GDestroyNotify) g_object_unref, NULL, NULL, NULL); -#line 1158 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _g_object_unref0 (sources); -#line 1158 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - sources = G_TYPE_CHECK_INSTANCE_CAST (_tmp11_, GEE_TYPE_LIST, GeeList); -#line 6872 "ViewCollection.c" - } -#line 1160 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp12_ = sources; -#line 1160 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp13_ = source; -#line 1160 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - gee_collection_add (G_TYPE_CHECK_INSTANCE_CAST (_tmp12_, GEE_TYPE_COLLECTION, GeeCollection), _tmp13_); -#line 6880 "ViewCollection.c" - } -#line 1154 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _g_object_unref0 (source); -#line 1154 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _g_object_unref0 (object); -#line 6886 "ViewCollection.c" - } -#line 1154 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _g_object_unref0 (_object_it); -#line 6890 "ViewCollection.c" - } -#line 1164 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - result = sources; -#line 1164 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - return result; -#line 6896 "ViewCollection.c" -} - - -GeeList* -view_collection_get_selected_sources (ViewCollection* self) -{ - GeeList* result = NULL; - GeeList* sources = NULL; - GeeArrayList* _tmp0_; - gint count = 0; - DataSet* _tmp1_; -#line 1167 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - g_return_val_if_fail (IS_VIEW_COLLECTION (self), NULL); -#line 1168 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp0_ = gee_array_list_new (TYPE_DATA_SOURCE, (GBoxedCopyFunc) g_object_ref, (GDestroyNotify) g_object_unref, NULL, NULL, NULL); -#line 1168 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - sources = G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, GEE_TYPE_LIST, GeeList); -#line 1170 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp1_ = self->priv->selected; -#line 1170 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - count = data_set_get_count (_tmp1_); -#line 6918 "ViewCollection.c" - { - gint ctr = 0; -#line 1171 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - ctr = 0; -#line 6923 "ViewCollection.c" - { - gboolean _tmp2_ = FALSE; -#line 1171 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp2_ = TRUE; -#line 1171 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - while (TRUE) { -#line 6930 "ViewCollection.c" - gint _tmp4_; - gint _tmp5_; - GeeList* _tmp6_; - DataSet* _tmp7_; - gint _tmp8_; - DataObject* _tmp9_; - DataView* _tmp10_; - DataSource* _tmp11_; - DataSource* _tmp12_; -#line 1171 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - if (!_tmp2_) { -#line 6942 "ViewCollection.c" - gint _tmp3_; -#line 1171 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp3_ = ctr; -#line 1171 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - ctr = _tmp3_ + 1; -#line 6948 "ViewCollection.c" - } -#line 1171 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp2_ = FALSE; -#line 1171 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp4_ = ctr; -#line 1171 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp5_ = count; -#line 1171 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - if (!(_tmp4_ < _tmp5_)) { -#line 1171 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - break; -#line 6960 "ViewCollection.c" - } -#line 1172 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp6_ = sources; -#line 1172 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp7_ = self->priv->selected; -#line 1172 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp8_ = ctr; -#line 1172 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp9_ = data_set_get_at (_tmp7_, _tmp8_); -#line 1172 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp10_ = G_TYPE_CHECK_INSTANCE_CAST (_tmp9_, TYPE_DATA_VIEW, DataView); -#line 1172 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp11_ = data_view_get_source (_tmp10_); -#line 1172 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp12_ = _tmp11_; -#line 1172 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - gee_collection_add (G_TYPE_CHECK_INSTANCE_CAST (_tmp6_, GEE_TYPE_COLLECTION, GeeCollection), _tmp12_); -#line 1172 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _g_object_unref0 (_tmp12_); -#line 1172 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _g_object_unref0 (_tmp10_); -#line 6982 "ViewCollection.c" - } - } - } -#line 1174 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - result = sources; -#line 1174 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - return result; -#line 6990 "ViewCollection.c" -} - - -DataSource* -view_collection_get_selected_source_at (ViewCollection* self, - gint index) -{ - DataSource* result = NULL; - DataObject* object = NULL; - DataSet* _tmp0_; - DataObject* _tmp1_; - DataSource* _tmp2_ = NULL; - DataObject* _tmp3_; -#line 1177 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - g_return_val_if_fail (IS_VIEW_COLLECTION (self), NULL); -#line 1178 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp0_ = self->priv->selected; -#line 1178 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp1_ = data_set_get_at (_tmp0_, index); -#line 1178 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - object = _tmp1_; -#line 1180 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp3_ = object; -#line 1180 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - if (_tmp3_ != NULL) { -#line 7016 "ViewCollection.c" - DataObject* _tmp4_; - DataSource* _tmp5_; -#line 1180 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp4_ = object; -#line 1180 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp5_ = data_view_get_source (G_TYPE_CHECK_INSTANCE_CAST (_tmp4_, TYPE_DATA_VIEW, DataView)); -#line 1180 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _g_object_unref0 (_tmp2_); -#line 1180 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp2_ = _tmp5_; -#line 7027 "ViewCollection.c" - } else { -#line 1180 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _g_object_unref0 (_tmp2_); -#line 1180 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp2_ = NULL; -#line 7033 "ViewCollection.c" - } -#line 1180 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - result = _tmp2_; -#line 1180 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _g_object_unref0 (object); -#line 1180 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - return result; -#line 7041 "ViewCollection.c" -} - - -GeeList* -view_collection_get_selected_sources_of_type (ViewCollection* self, - GType t) -{ - GeeList* result = NULL; - GeeList* sources = NULL; -#line 1183 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - g_return_val_if_fail (IS_VIEW_COLLECTION (self), NULL); -#line 1184 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - sources = NULL; -#line 7055 "ViewCollection.c" - { - GeeList* _view_list = NULL; - GeeList* _tmp0_; - gint _view_size = 0; - GeeList* _tmp1_; - gint _tmp2_; - gint _tmp3_; - gint _view_index = 0; -#line 1185 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp0_ = view_collection_get_selected (self); -#line 1185 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _view_list = _tmp0_; -#line 1185 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp1_ = _view_list; -#line 1185 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp2_ = gee_collection_get_size (G_TYPE_CHECK_INSTANCE_CAST (_tmp1_, GEE_TYPE_COLLECTION, GeeCollection)); -#line 1185 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp3_ = _tmp2_; -#line 1185 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _view_size = _tmp3_; -#line 1185 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _view_index = -1; -#line 1185 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - while (TRUE) { -#line 7080 "ViewCollection.c" - gint _tmp4_; - gint _tmp5_; - gint _tmp6_; - DataView* view = NULL; - GeeList* _tmp7_; - gint _tmp8_; - gpointer _tmp9_; - DataSource* source = NULL; - DataView* _tmp10_; - DataSource* _tmp11_; - DataSource* _tmp12_; -#line 1185 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp4_ = _view_index; -#line 1185 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _view_index = _tmp4_ + 1; -#line 1185 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp5_ = _view_index; -#line 1185 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp6_ = _view_size; -#line 1185 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - if (!(_tmp5_ < _tmp6_)) { -#line 1185 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - break; -#line 7104 "ViewCollection.c" - } -#line 1185 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp7_ = _view_list; -#line 1185 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp8_ = _view_index; -#line 1185 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp9_ = gee_list_get (_tmp7_, _tmp8_); -#line 1185 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - view = (DataView*) _tmp9_; -#line 1186 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp10_ = view; -#line 1186 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp11_ = data_view_get_source (_tmp10_); -#line 1186 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - source = _tmp11_; -#line 1187 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp12_ = source; -#line 1187 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - if (g_type_is_a (G_TYPE_FROM_INSTANCE (G_TYPE_CHECK_INSTANCE_CAST (_tmp12_, G_TYPE_OBJECT, GObject)), t)) { -#line 7124 "ViewCollection.c" - GeeList* _tmp13_; - GeeList* _tmp15_; - DataSource* _tmp16_; -#line 1188 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp13_ = sources; -#line 1188 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - if (_tmp13_ == NULL) { -#line 7132 "ViewCollection.c" - GeeArrayList* _tmp14_; -#line 1189 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp14_ = gee_array_list_new (TYPE_DATA_SOURCE, (GBoxedCopyFunc) g_object_ref, (GDestroyNotify) g_object_unref, NULL, NULL, NULL); -#line 1189 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _g_object_unref0 (sources); -#line 1189 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - sources = G_TYPE_CHECK_INSTANCE_CAST (_tmp14_, GEE_TYPE_LIST, GeeList); -#line 7140 "ViewCollection.c" - } -#line 1191 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp15_ = sources; -#line 1191 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp16_ = source; -#line 1191 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - gee_collection_add (G_TYPE_CHECK_INSTANCE_CAST (_tmp15_, GEE_TYPE_COLLECTION, GeeCollection), _tmp16_); -#line 7148 "ViewCollection.c" - } -#line 1185 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _g_object_unref0 (source); -#line 1185 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _g_object_unref0 (view); -#line 7154 "ViewCollection.c" - } -#line 1185 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _g_object_unref0 (_view_list); -#line 7158 "ViewCollection.c" - } -#line 1195 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - result = sources; -#line 1195 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - return result; -#line 7164 "ViewCollection.c" -} - - -gint -view_collection_index_of_source (ViewCollection* self, - DataSource* source) -{ - gint result = 0; - DataView* view = NULL; - DataView* _tmp0_; - gint _tmp1_ = 0; - DataView* _tmp2_; -#line 1199 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - g_return_val_if_fail (IS_VIEW_COLLECTION (self), 0); -#line 1199 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - g_return_val_if_fail (IS_DATA_SOURCE (source), 0); -#line 1200 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp0_ = view_collection_get_view_for_source (self, source); -#line 1200 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - view = _tmp0_; -#line 1202 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp2_ = view; -#line 1202 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - if (_tmp2_ != NULL) { -#line 7189 "ViewCollection.c" - DataView* _tmp3_; -#line 1202 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp3_ = view; -#line 1202 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp1_ = data_collection_index_of (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_DATA_COLLECTION, DataCollection), G_TYPE_CHECK_INSTANCE_CAST (_tmp3_, TYPE_DATA_OBJECT, DataObject)); -#line 7195 "ViewCollection.c" - } else { -#line 1202 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp1_ = -1; -#line 7199 "ViewCollection.c" - } -#line 1202 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - result = _tmp1_; -#line 1202 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _g_object_unref0 (view); -#line 1202 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - return result; -#line 7207 "ViewCollection.c" -} - - -void -view_collection_internal_notify_view_altered (ViewCollection* self, - DataView* view) -{ -#line 1206 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - g_return_if_fail (IS_VIEW_COLLECTION (self)); -#line 1206 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - g_return_if_fail (IS_DATA_VIEW (view)); -#line 1207 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - if (!data_collection_are_notifications_frozen (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_DATA_COLLECTION, DataCollection))) { -#line 7221 "ViewCollection.c" - GeeCollection* _tmp0_; - GeeCollection* _tmp1_; -#line 1208 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - view_collection_notify_item_view_altered (self, view); -#line 1209 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp0_ = data_collection_get_singleton (G_TYPE_CHECK_INSTANCE_CAST (view, TYPE_DATA_OBJECT, DataObject)); -#line 1209 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp1_ = G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, GEE_TYPE_COLLECTION, GeeCollection); -#line 1209 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - view_collection_notify_views_altered (self, _tmp1_); -#line 1209 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _g_object_unref0 (_tmp1_); -#line 7234 "ViewCollection.c" - } else { - GeeHashSet* _tmp2_; - GeeHashSet* _tmp4_; -#line 1211 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp2_ = self->priv->frozen_views_altered; -#line 1211 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - if (_tmp2_ == NULL) { -#line 7242 "ViewCollection.c" - GeeHashSet* _tmp3_; -#line 1212 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp3_ = gee_hash_set_new (TYPE_DATA_VIEW, (GBoxedCopyFunc) g_object_ref, (GDestroyNotify) g_object_unref, NULL, NULL, NULL, NULL, NULL, NULL); -#line 1212 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _g_object_unref0 (self->priv->frozen_views_altered); -#line 1212 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - self->priv->frozen_views_altered = _tmp3_; -#line 7250 "ViewCollection.c" - } -#line 1213 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp4_ = self->priv->frozen_views_altered; -#line 1213 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - gee_abstract_collection_add (G_TYPE_CHECK_INSTANCE_CAST (_tmp4_, GEE_TYPE_ABSTRACT_COLLECTION, GeeAbstractCollection), view); -#line 7256 "ViewCollection.c" - } -} - - -void -view_collection_internal_notify_geometry_altered (ViewCollection* self, - DataView* view) -{ -#line 1218 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - g_return_if_fail (IS_VIEW_COLLECTION (self)); -#line 1218 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - g_return_if_fail (IS_DATA_VIEW (view)); -#line 1219 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - if (!data_collection_are_notifications_frozen (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_DATA_COLLECTION, DataCollection))) { -#line 7271 "ViewCollection.c" - GeeCollection* _tmp0_; - GeeCollection* _tmp1_; -#line 1220 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - view_collection_notify_item_geometry_altered (self, view); -#line 1221 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp0_ = data_collection_get_singleton (G_TYPE_CHECK_INSTANCE_CAST (view, TYPE_DATA_OBJECT, DataObject)); -#line 1221 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp1_ = G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, GEE_TYPE_COLLECTION, GeeCollection); -#line 1221 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - view_collection_notify_geometries_altered (self, _tmp1_); -#line 1221 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _g_object_unref0 (_tmp1_); -#line 7284 "ViewCollection.c" - } else { - GeeHashSet* _tmp2_; - GeeHashSet* _tmp4_; -#line 1223 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp2_ = self->priv->frozen_geometries_altered; -#line 1223 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - if (_tmp2_ == NULL) { -#line 7292 "ViewCollection.c" - GeeHashSet* _tmp3_; -#line 1224 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp3_ = gee_hash_set_new (TYPE_DATA_VIEW, (GBoxedCopyFunc) g_object_ref, (GDestroyNotify) g_object_unref, NULL, NULL, NULL, NULL, NULL, NULL); -#line 1224 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _g_object_unref0 (self->priv->frozen_geometries_altered); -#line 1224 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - self->priv->frozen_geometries_altered = _tmp3_; -#line 7300 "ViewCollection.c" - } -#line 1225 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp4_ = self->priv->frozen_geometries_altered; -#line 1225 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - gee_abstract_collection_add (G_TYPE_CHECK_INSTANCE_CAST (_tmp4_, GEE_TYPE_ABSTRACT_COLLECTION, GeeAbstractCollection), view); -#line 7306 "ViewCollection.c" - } -} - - -static void -view_collection_real_notify_thawed (DataCollection* base) -{ - ViewCollection * self; - GeeHashSet* _tmp0_; - GeeHashSet* _tmp8_; -#line 1229 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_VIEW_COLLECTION, ViewCollection); -#line 1230 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp0_ = self->priv->frozen_views_altered; -#line 1230 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - if (_tmp0_ != NULL) { -#line 7323 "ViewCollection.c" - GeeHashSet* _tmp7_; - { - GeeIterator* _view_it = NULL; - GeeHashSet* _tmp1_; - GeeIterator* _tmp2_; -#line 1231 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp1_ = self->priv->frozen_views_altered; -#line 1231 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp2_ = gee_abstract_collection_iterator (G_TYPE_CHECK_INSTANCE_CAST (_tmp1_, GEE_TYPE_ABSTRACT_COLLECTION, GeeAbstractCollection)); -#line 1231 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _view_it = _tmp2_; -#line 1231 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - while (TRUE) { -#line 7337 "ViewCollection.c" - GeeIterator* _tmp3_; - DataView* view = NULL; - GeeIterator* _tmp4_; - gpointer _tmp5_; - DataView* _tmp6_; -#line 1231 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp3_ = _view_it; -#line 1231 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - if (!gee_iterator_next (_tmp3_)) { -#line 1231 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - break; -#line 7349 "ViewCollection.c" - } -#line 1231 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp4_ = _view_it; -#line 1231 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp5_ = gee_iterator_get (_tmp4_); -#line 1231 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - view = (DataView*) _tmp5_; -#line 1232 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp6_ = view; -#line 1232 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - view_collection_notify_item_view_altered (self, _tmp6_); -#line 1231 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _g_object_unref0 (view); -#line 7363 "ViewCollection.c" - } -#line 1231 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _g_object_unref0 (_view_it); -#line 7367 "ViewCollection.c" - } -#line 1233 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp7_ = self->priv->frozen_views_altered; -#line 1233 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - view_collection_notify_views_altered (self, G_TYPE_CHECK_INSTANCE_CAST (_tmp7_, GEE_TYPE_COLLECTION, GeeCollection)); -#line 1234 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _g_object_unref0 (self->priv->frozen_views_altered); -#line 1234 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - self->priv->frozen_views_altered = NULL; -#line 7377 "ViewCollection.c" - } -#line 1237 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp8_ = self->priv->frozen_geometries_altered; -#line 1237 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - if (_tmp8_ != NULL) { -#line 7383 "ViewCollection.c" - GeeHashSet* _tmp15_; - { - GeeIterator* _view_it = NULL; - GeeHashSet* _tmp9_; - GeeIterator* _tmp10_; -#line 1238 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp9_ = self->priv->frozen_geometries_altered; -#line 1238 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp10_ = gee_abstract_collection_iterator (G_TYPE_CHECK_INSTANCE_CAST (_tmp9_, GEE_TYPE_ABSTRACT_COLLECTION, GeeAbstractCollection)); -#line 1238 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _view_it = _tmp10_; -#line 1238 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - while (TRUE) { -#line 7397 "ViewCollection.c" - GeeIterator* _tmp11_; - DataView* view = NULL; - GeeIterator* _tmp12_; - gpointer _tmp13_; - DataView* _tmp14_; -#line 1238 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp11_ = _view_it; -#line 1238 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - if (!gee_iterator_next (_tmp11_)) { -#line 1238 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - break; -#line 7409 "ViewCollection.c" - } -#line 1238 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp12_ = _view_it; -#line 1238 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp13_ = gee_iterator_get (_tmp12_); -#line 1238 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - view = (DataView*) _tmp13_; -#line 1239 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp14_ = view; -#line 1239 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - view_collection_notify_item_geometry_altered (self, _tmp14_); -#line 1238 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _g_object_unref0 (view); -#line 7423 "ViewCollection.c" - } -#line 1238 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _g_object_unref0 (_view_it); -#line 7427 "ViewCollection.c" - } -#line 1240 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp15_ = self->priv->frozen_geometries_altered; -#line 1240 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - view_collection_notify_geometries_altered (self, G_TYPE_CHECK_INSTANCE_CAST (_tmp15_, GEE_TYPE_COLLECTION, GeeCollection)); -#line 1241 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _g_object_unref0 (self->priv->frozen_geometries_altered); -#line 1241 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - self->priv->frozen_geometries_altered = NULL; -#line 7437 "ViewCollection.c" - } -#line 1244 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - DATA_COLLECTION_CLASS (view_collection_parent_class)->notify_thawed (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_DATA_COLLECTION, DataCollection)); -#line 7441 "ViewCollection.c" -} - - -gboolean -view_collection_are_items_filtered_out (ViewCollection* self) -{ - gboolean result = FALSE; -#line 1247 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - g_return_val_if_fail (IS_VIEW_COLLECTION (self), FALSE); -#line 1248 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - result = DATA_COLLECTION_CLASS (view_collection_parent_class)->get_count (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_DATA_COLLECTION, DataCollection)) != data_collection_get_count (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_DATA_COLLECTION, DataCollection)); -#line 1248 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - return result; -#line 7455 "ViewCollection.c" -} - - -static void -view_collection_real_items_selected (ViewCollection* self, - GeeIterable* selected) -{ -#line 75 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - g_return_if_fail (GEE_IS_ITERABLE (selected)); -#line 7465 "ViewCollection.c" -} - - -static void -view_collection_real_items_unselected (ViewCollection* self, - GeeIterable* unselected) -{ -#line 79 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - g_return_if_fail (GEE_IS_ITERABLE (unselected)); -#line 7475 "ViewCollection.c" -} - - -static void -view_collection_real_items_state_changed (ViewCollection* self, - GeeIterable* changed) -{ -#line 83 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - g_return_if_fail (GEE_IS_ITERABLE (changed)); -#line 7485 "ViewCollection.c" -} - - -static void -view_collection_real_selection_group_altered (ViewCollection* self) -{ -} - - -static void -view_collection_real_items_shown (ViewCollection* self, - GeeCollection* visible) -{ -#line 94 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - g_return_if_fail (GEE_IS_COLLECTION (visible)); -#line 7501 "ViewCollection.c" -} - - -static void -view_collection_real_items_hidden (ViewCollection* self, - GeeCollection* hidden) -{ -#line 98 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - g_return_if_fail (GEE_IS_COLLECTION (hidden)); -#line 7511 "ViewCollection.c" -} - - -static void -view_collection_real_items_visibility_changed (ViewCollection* self, - GeeCollection* changed) -{ -#line 102 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - g_return_if_fail (GEE_IS_COLLECTION (changed)); -#line 7521 "ViewCollection.c" -} - - -static void -view_collection_real_item_view_altered (ViewCollection* self, - DataView* view) -{ -#line 106 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - g_return_if_fail (IS_DATA_VIEW (view)); -#line 7531 "ViewCollection.c" -} - - -static void -view_collection_real_item_geometry_altered (ViewCollection* self, - DataView* view) -{ -#line 110 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - g_return_if_fail (IS_DATA_VIEW (view)); -#line 7541 "ViewCollection.c" -} - - -static void -view_collection_real_views_altered (ViewCollection* self, - GeeCollection* views) -{ -#line 113 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - g_return_if_fail (GEE_IS_COLLECTION (views)); -#line 7551 "ViewCollection.c" -} - - -static void -view_collection_real_geometries_altered (ViewCollection* self, - GeeCollection* views) -{ -#line 116 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - g_return_if_fail (GEE_IS_COLLECTION (views)); -#line 7561 "ViewCollection.c" -} - - -static void -view_collection_real_view_filter_installed (ViewCollection* self, - ViewFilter* filer) -{ -#line 119 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - g_return_if_fail (IS_VIEW_FILTER (filer)); -#line 7571 "ViewCollection.c" -} - - -static void -g_cclosure_user_marshal_VOID__VIEW_FILTER (GClosure * closure, - GValue * return_value, - guint n_param_values, - const GValue * param_values, - gpointer invocation_hint, - gpointer marshal_data) -{ - typedef void (*GMarshalFunc_VOID__VIEW_FILTER) (gpointer data1, gpointer arg_1, gpointer data2); - register GMarshalFunc_VOID__VIEW_FILTER callback; - register GCClosure * cc; - register gpointer data1; - register gpointer data2; - cc = (GCClosure *) closure; -#line 21 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - g_return_if_fail (n_param_values == 2); -#line 21 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - if (G_CCLOSURE_SWAP_DATA (closure)) { -#line 21 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - data1 = closure->data; -#line 21 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - data2 = param_values->data[0].v_pointer; -#line 7597 "ViewCollection.c" - } else { -#line 21 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - data1 = param_values->data[0].v_pointer; -#line 21 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - data2 = closure->data; -#line 7603 "ViewCollection.c" - } -#line 21 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - callback = (GMarshalFunc_VOID__VIEW_FILTER) (marshal_data ? marshal_data : cc->callback); -#line 21 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - callback (data1, value_get_view_filter (param_values + 1), data2); -#line 7609 "ViewCollection.c" -} - - -static void -view_collection_real_view_filter_removed (ViewCollection* self, - ViewFilter* filer) -{ -#line 122 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - g_return_if_fail (IS_VIEW_FILTER (filer)); -#line 7619 "ViewCollection.c" -} - - -ViewCollectionMonitor* -view_collection_monitor_construct (GType object_type) -{ - ViewCollectionMonitor* self = NULL; -#line 22 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - self = (ViewCollectionMonitor*) g_type_create_instance (object_type); -#line 22 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - return self; -#line 7631 "ViewCollection.c" -} - - -ViewCollectionMonitor* -view_collection_monitor_new (void) -{ -#line 22 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - return view_collection_monitor_construct (VIEW_COLLECTION_TYPE_MONITOR); -#line 7640 "ViewCollection.c" -} - - -static void -view_collection_value_monitor_init (GValue* value) -{ -#line 22 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - value->data[0].v_pointer = NULL; -#line 7649 "ViewCollection.c" -} - - -static void -view_collection_value_monitor_free_value (GValue* value) -{ -#line 22 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - if (value->data[0].v_pointer) { -#line 22 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - view_collection_monitor_unref (value->data[0].v_pointer); -#line 7660 "ViewCollection.c" - } -} - - -static void -view_collection_value_monitor_copy_value (const GValue* src_value, - GValue* dest_value) -{ -#line 22 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - if (src_value->data[0].v_pointer) { -#line 22 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - dest_value->data[0].v_pointer = view_collection_monitor_ref (src_value->data[0].v_pointer); -#line 7673 "ViewCollection.c" - } else { -#line 22 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - dest_value->data[0].v_pointer = NULL; -#line 7677 "ViewCollection.c" - } -} - - -static gpointer -view_collection_value_monitor_peek_pointer (const GValue* value) -{ -#line 22 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - return value->data[0].v_pointer; -#line 7687 "ViewCollection.c" -} - - -static gchar* -view_collection_value_monitor_collect_value (GValue* value, - guint n_collect_values, - GTypeCValue* collect_values, - guint collect_flags) -{ -#line 22 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - if (collect_values[0].v_pointer) { -#line 7699 "ViewCollection.c" - ViewCollectionMonitor * object; - object = collect_values[0].v_pointer; -#line 22 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - if (object->parent_instance.g_class == NULL) { -#line 22 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - return g_strconcat ("invalid unclassed object pointer for value type `", G_VALUE_TYPE_NAME (value), "'", NULL); -#line 7706 "ViewCollection.c" - } else if (!g_value_type_compatible (G_TYPE_FROM_INSTANCE (object), G_VALUE_TYPE (value))) { -#line 22 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - return g_strconcat ("invalid object type `", g_type_name (G_TYPE_FROM_INSTANCE (object)), "' for value type `", G_VALUE_TYPE_NAME (value), "'", NULL); -#line 7710 "ViewCollection.c" - } -#line 22 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - value->data[0].v_pointer = view_collection_monitor_ref (object); -#line 7714 "ViewCollection.c" - } else { -#line 22 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - value->data[0].v_pointer = NULL; -#line 7718 "ViewCollection.c" - } -#line 22 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - return NULL; -#line 7722 "ViewCollection.c" -} - - -static gchar* -view_collection_value_monitor_lcopy_value (const GValue* value, - guint n_collect_values, - GTypeCValue* collect_values, - guint collect_flags) -{ - ViewCollectionMonitor ** object_p; - object_p = collect_values[0].v_pointer; -#line 22 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - if (!object_p) { -#line 22 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - return g_strdup_printf ("value location for `%s' passed as NULL", G_VALUE_TYPE_NAME (value)); -#line 7738 "ViewCollection.c" - } -#line 22 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - if (!value->data[0].v_pointer) { -#line 22 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - *object_p = NULL; -#line 7744 "ViewCollection.c" - } else if (collect_flags & G_VALUE_NOCOPY_CONTENTS) { -#line 22 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - *object_p = value->data[0].v_pointer; -#line 7748 "ViewCollection.c" - } else { -#line 22 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - *object_p = view_collection_monitor_ref (value->data[0].v_pointer); -#line 7752 "ViewCollection.c" - } -#line 22 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - return NULL; -#line 7756 "ViewCollection.c" -} - - -GParamSpec* -view_collection_param_spec_monitor (const gchar* name, - const gchar* nick, - const gchar* blurb, - GType object_type, - GParamFlags flags) -{ - ViewCollectionParamSpecMonitor* spec; -#line 22 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - g_return_val_if_fail (g_type_is_a (object_type, VIEW_COLLECTION_TYPE_MONITOR), NULL); -#line 22 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - spec = g_param_spec_internal (G_TYPE_PARAM_OBJECT, name, nick, blurb, flags); -#line 22 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - G_PARAM_SPEC (spec)->value_type = object_type; -#line 22 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - return G_PARAM_SPEC (spec); -#line 7776 "ViewCollection.c" -} - - -gpointer -view_collection_value_get_monitor (const GValue* value) -{ -#line 22 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - g_return_val_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, VIEW_COLLECTION_TYPE_MONITOR), NULL); -#line 22 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - return value->data[0].v_pointer; -#line 7787 "ViewCollection.c" -} - - -void -view_collection_value_set_monitor (GValue* value, - gpointer v_object) -{ - ViewCollectionMonitor * old; -#line 22 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - g_return_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, VIEW_COLLECTION_TYPE_MONITOR)); -#line 22 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - old = value->data[0].v_pointer; -#line 22 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - if (v_object) { -#line 22 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - g_return_if_fail (G_TYPE_CHECK_INSTANCE_TYPE (v_object, VIEW_COLLECTION_TYPE_MONITOR)); -#line 22 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - g_return_if_fail (g_value_type_compatible (G_TYPE_FROM_INSTANCE (v_object), G_VALUE_TYPE (value))); -#line 22 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - value->data[0].v_pointer = v_object; -#line 22 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - view_collection_monitor_ref (value->data[0].v_pointer); -#line 7810 "ViewCollection.c" - } else { -#line 22 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - value->data[0].v_pointer = NULL; -#line 7814 "ViewCollection.c" - } -#line 22 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - if (old) { -#line 22 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - view_collection_monitor_unref (old); -#line 7820 "ViewCollection.c" - } -} - - -void -view_collection_value_take_monitor (GValue* value, - gpointer v_object) -{ - ViewCollectionMonitor * old; -#line 22 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - g_return_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, VIEW_COLLECTION_TYPE_MONITOR)); -#line 22 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - old = value->data[0].v_pointer; -#line 22 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - if (v_object) { -#line 22 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - g_return_if_fail (G_TYPE_CHECK_INSTANCE_TYPE (v_object, VIEW_COLLECTION_TYPE_MONITOR)); -#line 22 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - g_return_if_fail (g_value_type_compatible (G_TYPE_FROM_INSTANCE (v_object), G_VALUE_TYPE (value))); -#line 22 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - value->data[0].v_pointer = v_object; -#line 7842 "ViewCollection.c" - } else { -#line 22 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - value->data[0].v_pointer = NULL; -#line 7846 "ViewCollection.c" - } -#line 22 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - if (old) { -#line 22 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - view_collection_monitor_unref (old); -#line 7852 "ViewCollection.c" - } -} - - -static void -view_collection_monitor_class_init (ViewCollectionMonitorClass * klass) -{ -#line 22 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - view_collection_monitor_parent_class = g_type_class_peek_parent (klass); -#line 22 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - ((ViewCollectionMonitorClass *) klass)->finalize = view_collection_monitor_finalize; -#line 7864 "ViewCollection.c" -} - - -static void -view_collection_monitor_instance_init (ViewCollectionMonitor * self) -{ -#line 22 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - self->ref_count = 1; -#line 7873 "ViewCollection.c" -} - - -static void -view_collection_monitor_finalize (ViewCollectionMonitor * obj) -{ - ViewCollectionMonitor * self; -#line 22 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - self = G_TYPE_CHECK_INSTANCE_CAST (obj, VIEW_COLLECTION_TYPE_MONITOR, ViewCollectionMonitor); -#line 22 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - g_signal_handlers_destroy (self); -#line 7885 "ViewCollection.c" -} - - -GType -view_collection_monitor_get_type (void) -{ - static volatile gsize view_collection_monitor_type_id__volatile = 0; - if (g_once_init_enter (&view_collection_monitor_type_id__volatile)) { - static const GTypeValueTable g_define_type_value_table = { view_collection_value_monitor_init, view_collection_value_monitor_free_value, view_collection_value_monitor_copy_value, view_collection_value_monitor_peek_pointer, "p", view_collection_value_monitor_collect_value, "p", view_collection_value_monitor_lcopy_value }; - static const GTypeInfo g_define_type_info = { sizeof (ViewCollectionMonitorClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) view_collection_monitor_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (ViewCollectionMonitor), 0, (GInstanceInitFunc) view_collection_monitor_instance_init, &g_define_type_value_table }; - static const GTypeFundamentalInfo g_define_type_fundamental_info = { (G_TYPE_FLAG_CLASSED | G_TYPE_FLAG_INSTANTIATABLE | G_TYPE_FLAG_DERIVABLE | G_TYPE_FLAG_DEEP_DERIVABLE) }; - GType view_collection_monitor_type_id; - view_collection_monitor_type_id = g_type_register_fundamental (g_type_fundamental_next (), "ViewCollectionMonitor", &g_define_type_info, &g_define_type_fundamental_info, 0); - g_once_init_leave (&view_collection_monitor_type_id__volatile, view_collection_monitor_type_id); - } - return view_collection_monitor_type_id__volatile; -} - - -gpointer -view_collection_monitor_ref (gpointer instance) -{ - ViewCollectionMonitor * self; - self = instance; -#line 22 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - g_atomic_int_inc (&self->ref_count); -#line 22 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - return instance; -#line 7914 "ViewCollection.c" -} - - -void -view_collection_monitor_unref (gpointer instance) -{ - ViewCollectionMonitor * self; - self = instance; -#line 22 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - if (g_atomic_int_dec_and_test (&self->ref_count)) { -#line 22 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - VIEW_COLLECTION_MONITOR_GET_CLASS (self)->finalize (self); -#line 22 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - g_type_free_instance ((GTypeInstance *) self); -#line 7929 "ViewCollection.c" - } -} - - -static void -_view_collection_on_sources_added_data_collection_items_added (DataCollection* _sender, - GeeIterable* added, - gpointer self) -{ -#line 44 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - view_collection_on_sources_added ((ViewCollection*) self, _sender, added); -#line 7941 "ViewCollection.c" -} - - -static void -_view_collection_on_sources_removed_data_collection_items_removed (DataCollection* _sender, - GeeIterable* removed, - gpointer self) -{ -#line 45 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - view_collection_on_sources_removed ((ViewCollection*) self, removed); -#line 7952 "ViewCollection.c" -} - - -static void -_view_collection_on_sources_altered_data_collection_items_altered (DataCollection* _sender, - GeeMap* items, - gpointer self) -{ -#line 46 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - view_collection_on_sources_altered ((ViewCollection*) self, _sender, items); -#line 7963 "ViewCollection.c" -} - - -static gpointer -_view_manager_ref0 (gpointer self) -{ -#line 35 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - return self ? view_manager_ref (self) : NULL; -#line 7972 "ViewCollection.c" -} - - -static gpointer -_alteration_ref0 (gpointer self) -{ -#line 36 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - return self ? alteration_ref (self) : NULL; -#line 7981 "ViewCollection.c" -} - - -static ViewCollectionMonitorImpl* -view_collection_monitor_impl_construct (GType object_type, - ViewCollection* owner, - SourceCollection* sources, - ViewManager* manager, - Alteration* prereq) -{ - ViewCollectionMonitorImpl* self = NULL; - ViewCollection* _tmp0_; - SourceCollection* _tmp1_; - ViewManager* _tmp2_; - Alteration* _tmp3_; -#line 31 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - g_return_val_if_fail (IS_VIEW_COLLECTION (owner), NULL); -#line 31 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - g_return_val_if_fail (IS_SOURCE_COLLECTION (sources), NULL); -#line 31 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - g_return_val_if_fail (IS_VIEW_MANAGER (manager), NULL); -#line 31 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - g_return_val_if_fail ((prereq == NULL) || IS_ALTERATION (prereq), NULL); -#line 31 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - self = (ViewCollectionMonitorImpl*) view_collection_monitor_construct (object_type); -#line 33 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp0_ = _data_collection_ref0 (owner); -#line 33 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _data_collection_unref0 (self->owner); -#line 33 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - self->owner = _tmp0_; -#line 34 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp1_ = _data_collection_ref0 (sources); -#line 34 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _data_collection_unref0 (self->sources); -#line 34 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - self->sources = _tmp1_; -#line 35 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp2_ = _view_manager_ref0 (manager); -#line 35 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _view_manager_unref0 (self->manager); -#line 35 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - self->manager = _tmp2_; -#line 36 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp3_ = _alteration_ref0 (prereq); -#line 36 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _alteration_unref0 (self->prereq); -#line 36 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - self->prereq = _tmp3_; -#line 38 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - g_signal_connect (G_TYPE_CHECK_INSTANCE_CAST (sources, TYPE_DATA_COLLECTION, DataCollection), "items-added", (GCallback) _view_collection_on_sources_added_data_collection_items_added, owner); -#line 39 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - g_signal_connect (G_TYPE_CHECK_INSTANCE_CAST (sources, TYPE_DATA_COLLECTION, DataCollection), "items-removed", (GCallback) _view_collection_on_sources_removed_data_collection_items_removed, owner); -#line 40 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - g_signal_connect (G_TYPE_CHECK_INSTANCE_CAST (sources, TYPE_DATA_COLLECTION, DataCollection), "items-altered", (GCallback) _view_collection_on_sources_altered_data_collection_items_altered, owner); -#line 31 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - return self; -#line 8039 "ViewCollection.c" -} - - -static ViewCollectionMonitorImpl* -view_collection_monitor_impl_new (ViewCollection* owner, - SourceCollection* sources, - ViewManager* manager, - Alteration* prereq) -{ -#line 31 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - return view_collection_monitor_impl_construct (VIEW_COLLECTION_TYPE_MONITOR_IMPL, owner, sources, manager, prereq); -#line 8051 "ViewCollection.c" -} - - -static void -view_collection_monitor_impl_class_init (ViewCollectionMonitorImplClass * klass) -{ -#line 25 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - view_collection_monitor_impl_parent_class = g_type_class_peek_parent (klass); -#line 25 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - ((ViewCollectionMonitorClass *) klass)->finalize = view_collection_monitor_impl_finalize; -#line 8062 "ViewCollection.c" -} - - -static void -view_collection_monitor_impl_instance_init (ViewCollectionMonitorImpl * self) -{ -} - - -static void -view_collection_monitor_impl_finalize (ViewCollectionMonitor * obj) -{ - ViewCollectionMonitorImpl * self; - SourceCollection* _tmp0_; - ViewCollection* _tmp1_; - guint _tmp2_; - SourceCollection* _tmp3_; - ViewCollection* _tmp4_; - guint _tmp5_; - SourceCollection* _tmp6_; - ViewCollection* _tmp7_; - guint _tmp8_; -#line 25 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - self = G_TYPE_CHECK_INSTANCE_CAST (obj, VIEW_COLLECTION_TYPE_MONITOR_IMPL, ViewCollectionMonitorImpl); -#line 44 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp0_ = self->sources; -#line 44 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp1_ = self->owner; -#line 44 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - g_signal_parse_name ("items-added", TYPE_DATA_COLLECTION, &_tmp2_, NULL, FALSE); -#line 44 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - g_signal_handlers_disconnect_matched (G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, TYPE_DATA_COLLECTION, DataCollection), G_SIGNAL_MATCH_ID | G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA, _tmp2_, 0, NULL, (GCallback) _view_collection_on_sources_added_data_collection_items_added, _tmp1_); -#line 45 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp3_ = self->sources; -#line 45 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp4_ = self->owner; -#line 45 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - g_signal_parse_name ("items-removed", TYPE_DATA_COLLECTION, &_tmp5_, NULL, FALSE); -#line 45 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - g_signal_handlers_disconnect_matched (G_TYPE_CHECK_INSTANCE_CAST (_tmp3_, TYPE_DATA_COLLECTION, DataCollection), G_SIGNAL_MATCH_ID | G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA, _tmp5_, 0, NULL, (GCallback) _view_collection_on_sources_removed_data_collection_items_removed, _tmp4_); -#line 46 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp6_ = self->sources; -#line 46 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp7_ = self->owner; -#line 46 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - g_signal_parse_name ("items-altered", TYPE_DATA_COLLECTION, &_tmp8_, NULL, FALSE); -#line 46 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - g_signal_handlers_disconnect_matched (G_TYPE_CHECK_INSTANCE_CAST (_tmp6_, TYPE_DATA_COLLECTION, DataCollection), G_SIGNAL_MATCH_ID | G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA, _tmp8_, 0, NULL, (GCallback) _view_collection_on_sources_altered_data_collection_items_altered, _tmp7_); -#line 26 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _data_collection_unref0 (self->owner); -#line 27 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _data_collection_unref0 (self->sources); -#line 28 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _view_manager_unref0 (self->manager); -#line 29 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _alteration_unref0 (self->prereq); -#line 25 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - VIEW_COLLECTION_MONITOR_CLASS (view_collection_monitor_impl_parent_class)->finalize (obj); -#line 8121 "ViewCollection.c" -} - - -static GType -view_collection_monitor_impl_get_type (void) -{ - static volatile gsize view_collection_monitor_impl_type_id__volatile = 0; - if (g_once_init_enter (&view_collection_monitor_impl_type_id__volatile)) { - static const GTypeInfo g_define_type_info = { sizeof (ViewCollectionMonitorImplClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) view_collection_monitor_impl_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (ViewCollectionMonitorImpl), 0, (GInstanceInitFunc) view_collection_monitor_impl_instance_init, NULL }; - GType view_collection_monitor_impl_type_id; - view_collection_monitor_impl_type_id = g_type_register_static (VIEW_COLLECTION_TYPE_MONITOR, "ViewCollectionMonitorImpl", &g_define_type_info, 0); - g_once_init_leave (&view_collection_monitor_impl_type_id__volatile, view_collection_monitor_impl_type_id); - } - return view_collection_monitor_impl_type_id__volatile; -} - - -static ViewCollectionToggleLists* -view_collection_toggle_lists_construct (GType object_type) -{ - ViewCollectionToggleLists * self = NULL; -#line 50 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - self = (ViewCollectionToggleLists*) g_object_new (object_type, NULL); -#line 50 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - return self; -#line 8147 "ViewCollection.c" -} - - -static ViewCollectionToggleLists* -view_collection_toggle_lists_new (void) -{ -#line 50 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - return view_collection_toggle_lists_construct (VIEW_COLLECTION_TYPE_TOGGLE_LISTS); -#line 8156 "ViewCollection.c" -} - - -static void -view_collection_toggle_lists_class_init (ViewCollectionToggleListsClass * klass) -{ -#line 50 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - view_collection_toggle_lists_parent_class = g_type_class_peek_parent (klass); -#line 50 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - G_OBJECT_CLASS (klass)->finalize = view_collection_toggle_lists_finalize; -#line 8167 "ViewCollection.c" -} - - -static void -view_collection_toggle_lists_instance_init (ViewCollectionToggleLists * self) -{ - GeeArrayList* _tmp0_; - GeeArrayList* _tmp1_; -#line 51 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp0_ = gee_array_list_new (TYPE_DATA_VIEW, (GBoxedCopyFunc) g_object_ref, (GDestroyNotify) g_object_unref, NULL, NULL, NULL); -#line 51 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - self->selected = _tmp0_; -#line 52 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp1_ = gee_array_list_new (TYPE_DATA_VIEW, (GBoxedCopyFunc) g_object_ref, (GDestroyNotify) g_object_unref, NULL, NULL, NULL); -#line 52 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - self->unselected = _tmp1_; -#line 8184 "ViewCollection.c" -} - - -static void -view_collection_toggle_lists_finalize (GObject * obj) -{ - ViewCollectionToggleLists * self; -#line 50 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - self = G_TYPE_CHECK_INSTANCE_CAST (obj, VIEW_COLLECTION_TYPE_TOGGLE_LISTS, ViewCollectionToggleLists); -#line 51 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _g_object_unref0 (self->selected); -#line 52 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _g_object_unref0 (self->unselected); -#line 50 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - G_OBJECT_CLASS (view_collection_toggle_lists_parent_class)->finalize (obj); -#line 8200 "ViewCollection.c" -} - - -static GType -view_collection_toggle_lists_get_type (void) -{ - static volatile gsize view_collection_toggle_lists_type_id__volatile = 0; - if (g_once_init_enter (&view_collection_toggle_lists_type_id__volatile)) { - static const GTypeInfo g_define_type_info = { sizeof (ViewCollectionToggleListsClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) view_collection_toggle_lists_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (ViewCollectionToggleLists), 0, (GInstanceInitFunc) view_collection_toggle_lists_instance_init, NULL }; - GType view_collection_toggle_lists_type_id; - view_collection_toggle_lists_type_id = g_type_register_static (G_TYPE_OBJECT, "ViewCollectionToggleLists", &g_define_type_info, 0); - g_once_init_leave (&view_collection_toggle_lists_type_id__volatile, view_collection_toggle_lists_type_id); - } - return view_collection_toggle_lists_type_id__volatile; -} - - -static void -view_collection_class_init (ViewCollectionClass * klass) -{ -#line 21 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - view_collection_parent_class = g_type_class_peek_parent (klass); -#line 21 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - ((DataCollectionClass *) klass)->finalize = view_collection_finalize; -#line 21 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - g_type_class_add_private (klass, sizeof (ViewCollectionPrivate)); -#line 21 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - ((ViewCollectionClass *) klass)->notify_items_selected_unselected = (void (*) (ViewCollection *, GeeCollection*, GeeCollection*)) view_collection_real_notify_items_selected_unselected; -#line 21 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - ((ViewCollectionClass *) klass)->notify_selection_group_altered = (void (*) (ViewCollection *)) view_collection_real_notify_selection_group_altered; -#line 21 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - ((ViewCollectionClass *) klass)->notify_item_view_altered = (void (*) (ViewCollection *, DataView*)) view_collection_real_notify_item_view_altered; -#line 21 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - ((ViewCollectionClass *) klass)->notify_views_altered = (void (*) (ViewCollection *, GeeCollection*)) view_collection_real_notify_views_altered; -#line 21 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - ((ViewCollectionClass *) klass)->notify_item_geometry_altered = (void (*) (ViewCollection *, DataView*)) view_collection_real_notify_item_geometry_altered; -#line 21 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - ((ViewCollectionClass *) klass)->notify_geometries_altered = (void (*) (ViewCollection *, GeeCollection*)) view_collection_real_notify_geometries_altered; -#line 21 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - ((ViewCollectionClass *) klass)->notify_items_shown = (void (*) (ViewCollection *, GeeCollection*)) view_collection_real_notify_items_shown; -#line 21 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - ((ViewCollectionClass *) klass)->notify_items_hidden = (void (*) (ViewCollection *, GeeCollection*)) view_collection_real_notify_items_hidden; -#line 21 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - ((ViewCollectionClass *) klass)->notify_items_visibility_changed = (void (*) (ViewCollection *, GeeCollection*)) view_collection_real_notify_items_visibility_changed; -#line 21 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - ((ViewCollectionClass *) klass)->notify_view_filter_installed = (void (*) (ViewCollection *, ViewFilter*)) view_collection_real_notify_view_filter_installed; -#line 21 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - ((ViewCollectionClass *) klass)->notify_view_filter_removed = (void (*) (ViewCollection *, ViewFilter*)) view_collection_real_notify_view_filter_removed; -#line 21 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - ((DataCollectionClass *) klass)->clear = (void (*) (DataCollection *)) view_collection_real_clear; -#line 21 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - ((DataCollectionClass *) klass)->close = (void (*) (DataCollection *)) view_collection_real_close; -#line 21 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - ((DataCollectionClass *) klass)->valid_type = (gboolean (*) (DataCollection *, DataObject*)) view_collection_real_valid_type; -#line 21 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - ((DataCollectionClass *) klass)->add = (gboolean (*) (DataCollection *, DataObject*)) view_collection_real_add; -#line 21 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - ((DataCollectionClass *) klass)->add_many = (GeeCollection* (*) (DataCollection *, GeeCollection*, ProgressMonitor, void*)) view_collection_real_add_many; -#line 21 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - ((DataCollectionClass *) klass)->notify_items_added = (void (*) (DataCollection *, GeeIterable*)) view_collection_real_notify_items_added; -#line 21 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - ((DataCollectionClass *) klass)->notify_items_removed = (void (*) (DataCollection *, GeeIterable*)) view_collection_real_notify_items_removed; -#line 21 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - ((DataCollectionClass *) klass)->items_altered = (void (*) (DataCollection *, GeeMap*)) view_collection_real_items_altered; -#line 21 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - ((DataCollectionClass *) klass)->set_comparator = (void (*) (DataCollection *, Comparator, void*, ComparatorPredicate, void*)) view_collection_real_set_comparator; -#line 21 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - ((DataCollectionClass *) klass)->reset_comparator = (void (*) (DataCollection *)) view_collection_real_reset_comparator; -#line 21 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - ((DataCollectionClass *) klass)->get_all = (GeeCollection* (*) (DataCollection *)) view_collection_real_get_all; -#line 21 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - ((DataCollectionClass *) klass)->get_count = (gint (*) (DataCollection *)) view_collection_real_get_count; -#line 21 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - ((DataCollectionClass *) klass)->get_at = (DataObject* (*) (DataCollection *, gint)) view_collection_real_get_at; -#line 21 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - ((DataCollectionClass *) klass)->index_of = (gint (*) (DataCollection *, DataObject*)) view_collection_real_index_of; -#line 21 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - ((DataCollectionClass *) klass)->contains = (gboolean (*) (DataCollection *, DataObject*)) view_collection_real_contains; -#line 21 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - ((ViewCollectionClass *) klass)->get_first = (DataView* (*) (ViewCollection *)) view_collection_real_get_first; -#line 21 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - ((ViewCollectionClass *) klass)->get_first_unrejected = (DataView* (*) (ViewCollection *)) view_collection_real_get_first_unrejected; -#line 21 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - ((ViewCollectionClass *) klass)->get_last = (DataView* (*) (ViewCollection *)) view_collection_real_get_last; -#line 21 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - ((ViewCollectionClass *) klass)->get_next = (DataView* (*) (ViewCollection *, DataView*)) view_collection_real_get_next; -#line 21 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - ((ViewCollectionClass *) klass)->get_previous = (DataView* (*) (ViewCollection *, DataView*)) view_collection_real_get_previous; -#line 21 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - ((DataCollectionClass *) klass)->notify_thawed = (void (*) (DataCollection *)) view_collection_real_notify_thawed; -#line 21 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - ((ViewCollectionClass *) klass)->items_selected = view_collection_real_items_selected; -#line 21 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - ((ViewCollectionClass *) klass)->items_unselected = view_collection_real_items_unselected; -#line 21 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - ((ViewCollectionClass *) klass)->items_state_changed = view_collection_real_items_state_changed; -#line 21 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - ((ViewCollectionClass *) klass)->selection_group_altered = view_collection_real_selection_group_altered; -#line 21 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - ((ViewCollectionClass *) klass)->items_shown = view_collection_real_items_shown; -#line 21 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - ((ViewCollectionClass *) klass)->items_hidden = view_collection_real_items_hidden; -#line 21 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - ((ViewCollectionClass *) klass)->items_visibility_changed = view_collection_real_items_visibility_changed; -#line 21 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - ((ViewCollectionClass *) klass)->item_view_altered = view_collection_real_item_view_altered; -#line 21 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - ((ViewCollectionClass *) klass)->item_geometry_altered = view_collection_real_item_geometry_altered; -#line 21 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - ((ViewCollectionClass *) klass)->views_altered = view_collection_real_views_altered; -#line 21 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - ((ViewCollectionClass *) klass)->geometries_altered = view_collection_real_geometries_altered; -#line 21 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - ((ViewCollectionClass *) klass)->view_filter_installed = view_collection_real_view_filter_installed; -#line 21 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - ((ViewCollectionClass *) klass)->view_filter_removed = view_collection_real_view_filter_removed; -#line 21 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - view_collection_signals[VIEW_COLLECTION_ITEMS_SELECTED_SIGNAL] = g_signal_new ("items-selected", TYPE_VIEW_COLLECTION, G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET (ViewCollectionClass, items_selected), NULL, NULL, g_cclosure_marshal_VOID__OBJECT, G_TYPE_NONE, 1, GEE_TYPE_ITERABLE); -#line 21 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - view_collection_signals[VIEW_COLLECTION_ITEMS_UNSELECTED_SIGNAL] = g_signal_new ("items-unselected", TYPE_VIEW_COLLECTION, G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET (ViewCollectionClass, items_unselected), NULL, NULL, g_cclosure_marshal_VOID__OBJECT, G_TYPE_NONE, 1, GEE_TYPE_ITERABLE); -#line 21 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - view_collection_signals[VIEW_COLLECTION_ITEMS_STATE_CHANGED_SIGNAL] = g_signal_new ("items-state-changed", TYPE_VIEW_COLLECTION, G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET (ViewCollectionClass, items_state_changed), NULL, NULL, g_cclosure_marshal_VOID__OBJECT, G_TYPE_NONE, 1, GEE_TYPE_ITERABLE); -#line 21 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - view_collection_signals[VIEW_COLLECTION_SELECTION_GROUP_ALTERED_SIGNAL] = g_signal_new ("selection-group-altered", TYPE_VIEW_COLLECTION, G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET (ViewCollectionClass, selection_group_altered), NULL, NULL, g_cclosure_marshal_VOID__VOID, G_TYPE_NONE, 0); -#line 21 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - view_collection_signals[VIEW_COLLECTION_ITEMS_SHOWN_SIGNAL] = g_signal_new ("items-shown", TYPE_VIEW_COLLECTION, G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET (ViewCollectionClass, items_shown), NULL, NULL, g_cclosure_marshal_VOID__OBJECT, G_TYPE_NONE, 1, GEE_TYPE_COLLECTION); -#line 21 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - view_collection_signals[VIEW_COLLECTION_ITEMS_HIDDEN_SIGNAL] = g_signal_new ("items-hidden", TYPE_VIEW_COLLECTION, G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET (ViewCollectionClass, items_hidden), NULL, NULL, g_cclosure_marshal_VOID__OBJECT, G_TYPE_NONE, 1, GEE_TYPE_COLLECTION); -#line 21 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - view_collection_signals[VIEW_COLLECTION_ITEMS_VISIBILITY_CHANGED_SIGNAL] = g_signal_new ("items-visibility-changed", TYPE_VIEW_COLLECTION, G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET (ViewCollectionClass, items_visibility_changed), NULL, NULL, g_cclosure_marshal_VOID__OBJECT, G_TYPE_NONE, 1, GEE_TYPE_COLLECTION); -#line 21 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - view_collection_signals[VIEW_COLLECTION_ITEM_VIEW_ALTERED_SIGNAL] = g_signal_new ("item-view-altered", TYPE_VIEW_COLLECTION, G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET (ViewCollectionClass, item_view_altered), NULL, NULL, g_cclosure_marshal_VOID__OBJECT, G_TYPE_NONE, 1, TYPE_DATA_VIEW); -#line 21 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - view_collection_signals[VIEW_COLLECTION_ITEM_GEOMETRY_ALTERED_SIGNAL] = g_signal_new ("item-geometry-altered", TYPE_VIEW_COLLECTION, G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET (ViewCollectionClass, item_geometry_altered), NULL, NULL, g_cclosure_marshal_VOID__OBJECT, G_TYPE_NONE, 1, TYPE_DATA_VIEW); -#line 21 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - view_collection_signals[VIEW_COLLECTION_VIEWS_ALTERED_SIGNAL] = g_signal_new ("views-altered", TYPE_VIEW_COLLECTION, G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET (ViewCollectionClass, views_altered), NULL, NULL, g_cclosure_marshal_VOID__OBJECT, G_TYPE_NONE, 1, GEE_TYPE_COLLECTION); -#line 21 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - view_collection_signals[VIEW_COLLECTION_GEOMETRIES_ALTERED_SIGNAL] = g_signal_new ("geometries-altered", TYPE_VIEW_COLLECTION, G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET (ViewCollectionClass, geometries_altered), NULL, NULL, g_cclosure_marshal_VOID__OBJECT, G_TYPE_NONE, 1, GEE_TYPE_COLLECTION); -#line 21 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - view_collection_signals[VIEW_COLLECTION_VIEW_FILTER_INSTALLED_SIGNAL] = g_signal_new ("view-filter-installed", TYPE_VIEW_COLLECTION, G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET (ViewCollectionClass, view_filter_installed), NULL, NULL, g_cclosure_user_marshal_VOID__VIEW_FILTER, G_TYPE_NONE, 1, TYPE_VIEW_FILTER); -#line 21 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - view_collection_signals[VIEW_COLLECTION_VIEW_FILTER_REMOVED_SIGNAL] = g_signal_new ("view-filter-removed", TYPE_VIEW_COLLECTION, G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET (ViewCollectionClass, view_filter_removed), NULL, NULL, g_cclosure_user_marshal_VOID__VIEW_FILTER, G_TYPE_NONE, 1, TYPE_VIEW_FILTER); -#line 8343 "ViewCollection.c" -} - - -static void -view_collection_instance_init (ViewCollection * self) -{ - GeeHashMultiMap* _tmp0_; - GeeHashSet* _tmp1_; - DataSet* _tmp2_; - GeeHashMap* _tmp3_; -#line 21 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - self->priv = VIEW_COLLECTION_GET_PRIVATE (self); -#line 59 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp0_ = gee_hash_multi_map_new (TYPE_SOURCE_COLLECTION, (GBoxedCopyFunc) data_collection_ref, (GDestroyNotify) data_collection_unref, VIEW_COLLECTION_TYPE_MONITOR_IMPL, (GBoxedCopyFunc) view_collection_monitor_ref, (GDestroyNotify) view_collection_monitor_unref, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL); -#line 59 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - self->priv->monitors = _tmp0_; -#line 61 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - self->priv->mirroring = NULL; -#line 62 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - self->priv->mirroring_ctor = NULL; -#line 62 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - self->priv->mirroring_ctor_target = self; -#line 63 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - self->priv->should_mirror = NULL; -#line 63 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - self->priv->should_mirror_target = self; -#line 64 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp1_ = gee_hash_set_new (TYPE_VIEW_FILTER, (GBoxedCopyFunc) view_filter_ref, (GDestroyNotify) view_filter_unref, NULL, NULL, NULL, NULL, NULL, NULL); -#line 64 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - self->priv->filters = G_TYPE_CHECK_INSTANCE_CAST (_tmp1_, GEE_TYPE_SET, GeeSet); -#line 65 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp2_ = data_set_new (); -#line 65 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - self->priv->selected = _tmp2_; -#line 66 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - self->priv->visible = NULL; -#line 67 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - self->priv->frozen_views_altered = NULL; -#line 68 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - self->priv->frozen_geometries_altered = NULL; -#line 72 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _tmp3_ = gee_hash_map_new (TYPE_DATA_SOURCE, (GBoxedCopyFunc) g_object_ref, (GDestroyNotify) g_object_unref, TYPE_DATA_VIEW, (GBoxedCopyFunc) g_object_ref, (GDestroyNotify) g_object_unref, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL); -#line 72 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - self->priv->source_map = _tmp3_; -#line 8388 "ViewCollection.c" -} - - -static void -view_collection_finalize (DataCollection * obj) -{ - ViewCollection * self; -#line 21 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - self = G_TYPE_CHECK_INSTANCE_CAST (obj, TYPE_VIEW_COLLECTION, ViewCollection); -#line 59 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _g_object_unref0 (self->priv->monitors); -#line 61 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _data_collection_unref0 (self->priv->mirroring); -#line 64 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _g_object_unref0 (self->priv->filters); -#line 65 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _data_set_unref0 (self->priv->selected); -#line 66 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _data_set_unref0 (self->priv->visible); -#line 67 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _g_object_unref0 (self->priv->frozen_views_altered); -#line 68 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _g_object_unref0 (self->priv->frozen_geometries_altered); -#line 72 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - _g_object_unref0 (self->priv->source_map); -#line 21 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - DATA_COLLECTION_CLASS (view_collection_parent_class)->finalize (obj); -#line 8416 "ViewCollection.c" -} - - -GType -view_collection_get_type (void) -{ - static volatile gsize view_collection_type_id__volatile = 0; - if (g_once_init_enter (&view_collection_type_id__volatile)) { - static const GTypeInfo g_define_type_info = { sizeof (ViewCollectionClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) view_collection_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (ViewCollection), 0, (GInstanceInitFunc) view_collection_instance_init, NULL }; - GType view_collection_type_id; - view_collection_type_id = g_type_register_static (TYPE_DATA_COLLECTION, "ViewCollection", &g_define_type_info, 0); - g_once_init_leave (&view_collection_type_id__volatile, view_collection_type_id); - } - return view_collection_type_id__volatile; -} - - -static gboolean -view_manager_real_include_in_view (ViewManager* self, - DataSource* source) -{ - gboolean result = FALSE; -#line 1258 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - g_return_val_if_fail (IS_DATA_SOURCE (source), FALSE); -#line 1259 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - result = TRUE; -#line 1259 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - return result; -#line 8445 "ViewCollection.c" -} - - -gboolean -view_manager_include_in_view (ViewManager* self, - DataSource* source) -{ -#line 1258 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - g_return_val_if_fail (IS_VIEW_MANAGER (self), FALSE); -#line 1258 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - return VIEW_MANAGER_GET_CLASS (self)->include_in_view (self, source); -#line 8457 "ViewCollection.c" -} - - -static DataView* -view_manager_real_create_view (ViewManager* self, - DataSource* source) -{ -#line 1264 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - g_critical ("Type `%s' does not implement abstract method `view_manager_create_view'", g_type_name (G_TYPE_FROM_INSTANCE (self))); -#line 1264 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - return NULL; -#line 8469 "ViewCollection.c" -} - - -DataView* -view_manager_create_view (ViewManager* self, - DataSource* source) -{ -#line 1264 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - g_return_val_if_fail (IS_VIEW_MANAGER (self), NULL); -#line 1264 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - return VIEW_MANAGER_GET_CLASS (self)->create_view (self, source); -#line 8481 "ViewCollection.c" -} - - -ViewManager* -view_manager_construct (GType object_type) -{ - ViewManager* self = NULL; -#line 1254 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - self = (ViewManager*) g_type_create_instance (object_type); -#line 1254 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - return self; -#line 8493 "ViewCollection.c" -} - - -static void -value_view_manager_init (GValue* value) -{ -#line 1254 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - value->data[0].v_pointer = NULL; -#line 8502 "ViewCollection.c" -} - - -static void -value_view_manager_free_value (GValue* value) -{ -#line 1254 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - if (value->data[0].v_pointer) { -#line 1254 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - view_manager_unref (value->data[0].v_pointer); -#line 8513 "ViewCollection.c" - } -} - - -static void -value_view_manager_copy_value (const GValue* src_value, - GValue* dest_value) -{ -#line 1254 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - if (src_value->data[0].v_pointer) { -#line 1254 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - dest_value->data[0].v_pointer = view_manager_ref (src_value->data[0].v_pointer); -#line 8526 "ViewCollection.c" - } else { -#line 1254 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - dest_value->data[0].v_pointer = NULL; -#line 8530 "ViewCollection.c" - } -} - - -static gpointer -value_view_manager_peek_pointer (const GValue* value) -{ -#line 1254 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - return value->data[0].v_pointer; -#line 8540 "ViewCollection.c" -} - - -static gchar* -value_view_manager_collect_value (GValue* value, - guint n_collect_values, - GTypeCValue* collect_values, - guint collect_flags) -{ -#line 1254 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - if (collect_values[0].v_pointer) { -#line 8552 "ViewCollection.c" - ViewManager * object; - object = collect_values[0].v_pointer; -#line 1254 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - if (object->parent_instance.g_class == NULL) { -#line 1254 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - return g_strconcat ("invalid unclassed object pointer for value type `", G_VALUE_TYPE_NAME (value), "'", NULL); -#line 8559 "ViewCollection.c" - } else if (!g_value_type_compatible (G_TYPE_FROM_INSTANCE (object), G_VALUE_TYPE (value))) { -#line 1254 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - return g_strconcat ("invalid object type `", g_type_name (G_TYPE_FROM_INSTANCE (object)), "' for value type `", G_VALUE_TYPE_NAME (value), "'", NULL); -#line 8563 "ViewCollection.c" - } -#line 1254 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - value->data[0].v_pointer = view_manager_ref (object); -#line 8567 "ViewCollection.c" - } else { -#line 1254 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - value->data[0].v_pointer = NULL; -#line 8571 "ViewCollection.c" - } -#line 1254 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - return NULL; -#line 8575 "ViewCollection.c" -} - - -static gchar* -value_view_manager_lcopy_value (const GValue* value, - guint n_collect_values, - GTypeCValue* collect_values, - guint collect_flags) -{ - ViewManager ** object_p; - object_p = collect_values[0].v_pointer; -#line 1254 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - if (!object_p) { -#line 1254 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - return g_strdup_printf ("value location for `%s' passed as NULL", G_VALUE_TYPE_NAME (value)); -#line 8591 "ViewCollection.c" - } -#line 1254 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - if (!value->data[0].v_pointer) { -#line 1254 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - *object_p = NULL; -#line 8597 "ViewCollection.c" - } else if (collect_flags & G_VALUE_NOCOPY_CONTENTS) { -#line 1254 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - *object_p = value->data[0].v_pointer; -#line 8601 "ViewCollection.c" - } else { -#line 1254 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - *object_p = view_manager_ref (value->data[0].v_pointer); -#line 8605 "ViewCollection.c" - } -#line 1254 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - return NULL; -#line 8609 "ViewCollection.c" -} - - -GParamSpec* -param_spec_view_manager (const gchar* name, - const gchar* nick, - const gchar* blurb, - GType object_type, - GParamFlags flags) -{ - ParamSpecViewManager* spec; -#line 1254 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - g_return_val_if_fail (g_type_is_a (object_type, TYPE_VIEW_MANAGER), NULL); -#line 1254 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - spec = g_param_spec_internal (G_TYPE_PARAM_OBJECT, name, nick, blurb, flags); -#line 1254 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - G_PARAM_SPEC (spec)->value_type = object_type; -#line 1254 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - return G_PARAM_SPEC (spec); -#line 8629 "ViewCollection.c" -} - - -gpointer -value_get_view_manager (const GValue* value) -{ -#line 1254 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - g_return_val_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, TYPE_VIEW_MANAGER), NULL); -#line 1254 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - return value->data[0].v_pointer; -#line 8640 "ViewCollection.c" -} - - -void -value_set_view_manager (GValue* value, - gpointer v_object) -{ - ViewManager * old; -#line 1254 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - g_return_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, TYPE_VIEW_MANAGER)); -#line 1254 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - old = value->data[0].v_pointer; -#line 1254 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - if (v_object) { -#line 1254 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - g_return_if_fail (G_TYPE_CHECK_INSTANCE_TYPE (v_object, TYPE_VIEW_MANAGER)); -#line 1254 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - g_return_if_fail (g_value_type_compatible (G_TYPE_FROM_INSTANCE (v_object), G_VALUE_TYPE (value))); -#line 1254 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - value->data[0].v_pointer = v_object; -#line 1254 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - view_manager_ref (value->data[0].v_pointer); -#line 8663 "ViewCollection.c" - } else { -#line 1254 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - value->data[0].v_pointer = NULL; -#line 8667 "ViewCollection.c" - } -#line 1254 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - if (old) { -#line 1254 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - view_manager_unref (old); -#line 8673 "ViewCollection.c" - } -} - - -void -value_take_view_manager (GValue* value, - gpointer v_object) -{ - ViewManager * old; -#line 1254 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - g_return_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, TYPE_VIEW_MANAGER)); -#line 1254 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - old = value->data[0].v_pointer; -#line 1254 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - if (v_object) { -#line 1254 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - g_return_if_fail (G_TYPE_CHECK_INSTANCE_TYPE (v_object, TYPE_VIEW_MANAGER)); -#line 1254 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - g_return_if_fail (g_value_type_compatible (G_TYPE_FROM_INSTANCE (v_object), G_VALUE_TYPE (value))); -#line 1254 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - value->data[0].v_pointer = v_object; -#line 8695 "ViewCollection.c" - } else { -#line 1254 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - value->data[0].v_pointer = NULL; -#line 8699 "ViewCollection.c" - } -#line 1254 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - if (old) { -#line 1254 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - view_manager_unref (old); -#line 8705 "ViewCollection.c" - } -} - - -static void -view_manager_class_init (ViewManagerClass * klass) -{ -#line 1254 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - view_manager_parent_class = g_type_class_peek_parent (klass); -#line 1254 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - ((ViewManagerClass *) klass)->finalize = view_manager_finalize; -#line 1254 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - ((ViewManagerClass *) klass)->include_in_view = (gboolean (*) (ViewManager *, DataSource*)) view_manager_real_include_in_view; -#line 1254 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - ((ViewManagerClass *) klass)->create_view = (DataView* (*) (ViewManager *, DataSource*)) view_manager_real_create_view; -#line 8721 "ViewCollection.c" -} - - -static void -view_manager_instance_init (ViewManager * self) -{ -#line 1254 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - self->ref_count = 1; -#line 8730 "ViewCollection.c" -} - - -static void -view_manager_finalize (ViewManager * obj) -{ - ViewManager * self; -#line 1254 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - self = G_TYPE_CHECK_INSTANCE_CAST (obj, TYPE_VIEW_MANAGER, ViewManager); -#line 1254 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - g_signal_handlers_destroy (self); -#line 8742 "ViewCollection.c" -} - - -GType -view_manager_get_type (void) -{ - static volatile gsize view_manager_type_id__volatile = 0; - if (g_once_init_enter (&view_manager_type_id__volatile)) { - static const GTypeValueTable g_define_type_value_table = { value_view_manager_init, value_view_manager_free_value, value_view_manager_copy_value, value_view_manager_peek_pointer, "p", value_view_manager_collect_value, "p", value_view_manager_lcopy_value }; - static const GTypeInfo g_define_type_info = { sizeof (ViewManagerClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) view_manager_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (ViewManager), 0, (GInstanceInitFunc) view_manager_instance_init, &g_define_type_value_table }; - static const GTypeFundamentalInfo g_define_type_fundamental_info = { (G_TYPE_FLAG_CLASSED | G_TYPE_FLAG_INSTANTIATABLE | G_TYPE_FLAG_DERIVABLE | G_TYPE_FLAG_DEEP_DERIVABLE) }; - GType view_manager_type_id; - view_manager_type_id = g_type_register_fundamental (g_type_fundamental_next (), "ViewManager", &g_define_type_info, &g_define_type_fundamental_info, G_TYPE_FLAG_ABSTRACT); - g_once_init_leave (&view_manager_type_id__volatile, view_manager_type_id); - } - return view_manager_type_id__volatile; -} - - -gpointer -view_manager_ref (gpointer instance) -{ - ViewManager * self; - self = instance; -#line 1254 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - g_atomic_int_inc (&self->ref_count); -#line 1254 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - return instance; -#line 8771 "ViewCollection.c" -} - - -void -view_manager_unref (gpointer instance) -{ - ViewManager * self; - self = instance; -#line 1254 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - if (g_atomic_int_dec_and_test (&self->ref_count)) { -#line 1254 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - VIEW_MANAGER_GET_CLASS (self)->finalize (self); -#line 1254 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - g_type_free_instance ((GTypeInstance *) self); -#line 8786 "ViewCollection.c" - } -} - - -static gboolean -view_filter_real_predicate (ViewFilter* self, - DataView* view) -{ - gboolean _tmp0_ = FALSE; -#line 1286 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - g_critical ("Type `%s' does not implement abstract method `view_filter_predicate'", g_type_name (G_TYPE_FROM_INSTANCE (self))); -#line 1286 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - return _tmp0_; -#line 8800 "ViewCollection.c" -} - - -gboolean -view_filter_predicate (ViewFilter* self, - DataView* view) -{ -#line 1286 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - g_return_val_if_fail (IS_VIEW_FILTER (self), FALSE); -#line 1286 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - return VIEW_FILTER_GET_CLASS (self)->predicate (self, view); -#line 8812 "ViewCollection.c" -} - - -ViewFilter* -view_filter_construct (GType object_type) -{ - ViewFilter* self = NULL; -#line 1279 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - self = (ViewFilter*) g_type_create_instance (object_type); -#line 1279 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - return self; -#line 8824 "ViewCollection.c" -} - - -static void -view_filter_real_refresh (ViewFilter* self) -{ -} - - -static void -value_view_filter_init (GValue* value) -{ -#line 1279 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - value->data[0].v_pointer = NULL; -#line 8839 "ViewCollection.c" -} - - -static void -value_view_filter_free_value (GValue* value) -{ -#line 1279 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - if (value->data[0].v_pointer) { -#line 1279 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - view_filter_unref (value->data[0].v_pointer); -#line 8850 "ViewCollection.c" - } -} - - -static void -value_view_filter_copy_value (const GValue* src_value, - GValue* dest_value) -{ -#line 1279 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - if (src_value->data[0].v_pointer) { -#line 1279 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - dest_value->data[0].v_pointer = view_filter_ref (src_value->data[0].v_pointer); -#line 8863 "ViewCollection.c" - } else { -#line 1279 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - dest_value->data[0].v_pointer = NULL; -#line 8867 "ViewCollection.c" - } -} - - -static gpointer -value_view_filter_peek_pointer (const GValue* value) -{ -#line 1279 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - return value->data[0].v_pointer; -#line 8877 "ViewCollection.c" -} - - -static gchar* -value_view_filter_collect_value (GValue* value, - guint n_collect_values, - GTypeCValue* collect_values, - guint collect_flags) -{ -#line 1279 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - if (collect_values[0].v_pointer) { -#line 8889 "ViewCollection.c" - ViewFilter * object; - object = collect_values[0].v_pointer; -#line 1279 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - if (object->parent_instance.g_class == NULL) { -#line 1279 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - return g_strconcat ("invalid unclassed object pointer for value type `", G_VALUE_TYPE_NAME (value), "'", NULL); -#line 8896 "ViewCollection.c" - } else if (!g_value_type_compatible (G_TYPE_FROM_INSTANCE (object), G_VALUE_TYPE (value))) { -#line 1279 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - return g_strconcat ("invalid object type `", g_type_name (G_TYPE_FROM_INSTANCE (object)), "' for value type `", G_VALUE_TYPE_NAME (value), "'", NULL); -#line 8900 "ViewCollection.c" - } -#line 1279 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - value->data[0].v_pointer = view_filter_ref (object); -#line 8904 "ViewCollection.c" - } else { -#line 1279 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - value->data[0].v_pointer = NULL; -#line 8908 "ViewCollection.c" - } -#line 1279 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - return NULL; -#line 8912 "ViewCollection.c" -} - - -static gchar* -value_view_filter_lcopy_value (const GValue* value, - guint n_collect_values, - GTypeCValue* collect_values, - guint collect_flags) -{ - ViewFilter ** object_p; - object_p = collect_values[0].v_pointer; -#line 1279 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - if (!object_p) { -#line 1279 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - return g_strdup_printf ("value location for `%s' passed as NULL", G_VALUE_TYPE_NAME (value)); -#line 8928 "ViewCollection.c" - } -#line 1279 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - if (!value->data[0].v_pointer) { -#line 1279 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - *object_p = NULL; -#line 8934 "ViewCollection.c" - } else if (collect_flags & G_VALUE_NOCOPY_CONTENTS) { -#line 1279 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - *object_p = value->data[0].v_pointer; -#line 8938 "ViewCollection.c" - } else { -#line 1279 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - *object_p = view_filter_ref (value->data[0].v_pointer); -#line 8942 "ViewCollection.c" - } -#line 1279 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - return NULL; -#line 8946 "ViewCollection.c" -} - - -GParamSpec* -param_spec_view_filter (const gchar* name, - const gchar* nick, - const gchar* blurb, - GType object_type, - GParamFlags flags) -{ - ParamSpecViewFilter* spec; -#line 1279 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - g_return_val_if_fail (g_type_is_a (object_type, TYPE_VIEW_FILTER), NULL); -#line 1279 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - spec = g_param_spec_internal (G_TYPE_PARAM_OBJECT, name, nick, blurb, flags); -#line 1279 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - G_PARAM_SPEC (spec)->value_type = object_type; -#line 1279 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - return G_PARAM_SPEC (spec); -#line 8966 "ViewCollection.c" -} - - -gpointer -value_get_view_filter (const GValue* value) -{ -#line 1279 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - g_return_val_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, TYPE_VIEW_FILTER), NULL); -#line 1279 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - return value->data[0].v_pointer; -#line 8977 "ViewCollection.c" -} - - -void -value_set_view_filter (GValue* value, - gpointer v_object) -{ - ViewFilter * old; -#line 1279 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - g_return_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, TYPE_VIEW_FILTER)); -#line 1279 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - old = value->data[0].v_pointer; -#line 1279 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - if (v_object) { -#line 1279 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - g_return_if_fail (G_TYPE_CHECK_INSTANCE_TYPE (v_object, TYPE_VIEW_FILTER)); -#line 1279 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - g_return_if_fail (g_value_type_compatible (G_TYPE_FROM_INSTANCE (v_object), G_VALUE_TYPE (value))); -#line 1279 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - value->data[0].v_pointer = v_object; -#line 1279 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - view_filter_ref (value->data[0].v_pointer); -#line 9000 "ViewCollection.c" - } else { -#line 1279 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - value->data[0].v_pointer = NULL; -#line 9004 "ViewCollection.c" - } -#line 1279 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - if (old) { -#line 1279 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - view_filter_unref (old); -#line 9010 "ViewCollection.c" - } -} - - -void -value_take_view_filter (GValue* value, - gpointer v_object) -{ - ViewFilter * old; -#line 1279 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - g_return_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, TYPE_VIEW_FILTER)); -#line 1279 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - old = value->data[0].v_pointer; -#line 1279 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - if (v_object) { -#line 1279 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - g_return_if_fail (G_TYPE_CHECK_INSTANCE_TYPE (v_object, TYPE_VIEW_FILTER)); -#line 1279 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - g_return_if_fail (g_value_type_compatible (G_TYPE_FROM_INSTANCE (v_object), G_VALUE_TYPE (value))); -#line 1279 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - value->data[0].v_pointer = v_object; -#line 9032 "ViewCollection.c" - } else { -#line 1279 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - value->data[0].v_pointer = NULL; -#line 9036 "ViewCollection.c" - } -#line 1279 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - if (old) { -#line 1279 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - view_filter_unref (old); -#line 9042 "ViewCollection.c" - } -} - - -static void -view_filter_class_init (ViewFilterClass * klass) -{ -#line 1279 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - view_filter_parent_class = g_type_class_peek_parent (klass); -#line 1279 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - ((ViewFilterClass *) klass)->finalize = view_filter_finalize; -#line 1279 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - ((ViewFilterClass *) klass)->predicate = (gboolean (*) (ViewFilter *, DataView*)) view_filter_real_predicate; -#line 1279 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - ((ViewFilterClass *) klass)->refresh = view_filter_real_refresh; -#line 1279 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - view_filter_signals[VIEW_FILTER_REFRESH_SIGNAL] = g_signal_new ("refresh", TYPE_VIEW_FILTER, G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET (ViewFilterClass, refresh), NULL, NULL, g_cclosure_marshal_VOID__VOID, G_TYPE_NONE, 0); -#line 9060 "ViewCollection.c" -} - - -static void -view_filter_instance_init (ViewFilter * self) -{ -#line 1279 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - self->ref_count = 1; -#line 9069 "ViewCollection.c" -} - - -static void -view_filter_finalize (ViewFilter * obj) -{ - ViewFilter * self; -#line 1279 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - self = G_TYPE_CHECK_INSTANCE_CAST (obj, TYPE_VIEW_FILTER, ViewFilter); -#line 1279 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - g_signal_handlers_destroy (self); -#line 9081 "ViewCollection.c" -} - - -GType -view_filter_get_type (void) -{ - static volatile gsize view_filter_type_id__volatile = 0; - if (g_once_init_enter (&view_filter_type_id__volatile)) { - static const GTypeValueTable g_define_type_value_table = { value_view_filter_init, value_view_filter_free_value, value_view_filter_copy_value, value_view_filter_peek_pointer, "p", value_view_filter_collect_value, "p", value_view_filter_lcopy_value }; - static const GTypeInfo g_define_type_info = { sizeof (ViewFilterClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) view_filter_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (ViewFilter), 0, (GInstanceInitFunc) view_filter_instance_init, &g_define_type_value_table }; - static const GTypeFundamentalInfo g_define_type_fundamental_info = { (G_TYPE_FLAG_CLASSED | G_TYPE_FLAG_INSTANTIATABLE | G_TYPE_FLAG_DERIVABLE | G_TYPE_FLAG_DEEP_DERIVABLE) }; - GType view_filter_type_id; - view_filter_type_id = g_type_register_fundamental (g_type_fundamental_next (), "ViewFilter", &g_define_type_info, &g_define_type_fundamental_info, G_TYPE_FLAG_ABSTRACT); - g_once_init_leave (&view_filter_type_id__volatile, view_filter_type_id); - } - return view_filter_type_id__volatile; -} - - -gpointer -view_filter_ref (gpointer instance) -{ - ViewFilter * self; - self = instance; -#line 1279 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - g_atomic_int_inc (&self->ref_count); -#line 1279 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - return instance; -#line 9110 "ViewCollection.c" -} - - -void -view_filter_unref (gpointer instance) -{ - ViewFilter * self; - self = instance; -#line 1279 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - if (g_atomic_int_dec_and_test (&self->ref_count)) { -#line 1279 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - VIEW_FILTER_GET_CLASS (self)->finalize (self); -#line 1279 "/home/jens/Source/shotwell/src/core/ViewCollection.vala" - g_type_free_instance ((GTypeInstance *) self); -#line 9125 "ViewCollection.c" - } -} - - - diff --git a/src/core/util.c b/src/core/util.c deleted file mode 100644 index 2b9ace7..0000000 --- a/src/core/util.c +++ /dev/null @@ -1,2043 +0,0 @@ -/* util.c generated by valac 0.40.4, the Vala compiler - * generated from util.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. - */ -/* SingletonCollection is a read-only collection designed to hold exactly one item in it. This*/ -/* is far more efficient than creating a dummy collection (such as ArrayList) merely to pass around*/ -/* a single item, particularly for signals which require Iterables and Collections.*/ -/**/ -/* This collection cannot be used to store null.*/ - - -#include <glib.h> -#include <glib-object.h> -#include <gee.h> -#include <stdlib.h> -#include <string.h> -#include <float.h> -#include <math.h> -#include <gobject/gvaluecollector.h> - - -#define TYPE_SINGLETON_COLLECTION (singleton_collection_get_type ()) -#define SINGLETON_COLLECTION(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_SINGLETON_COLLECTION, SingletonCollection)) -#define SINGLETON_COLLECTION_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_SINGLETON_COLLECTION, SingletonCollectionClass)) -#define IS_SINGLETON_COLLECTION(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_SINGLETON_COLLECTION)) -#define IS_SINGLETON_COLLECTION_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_SINGLETON_COLLECTION)) -#define SINGLETON_COLLECTION_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_SINGLETON_COLLECTION, SingletonCollectionClass)) - -typedef struct _SingletonCollection SingletonCollection; -typedef struct _SingletonCollectionClass SingletonCollectionClass; -typedef struct _SingletonCollectionPrivate SingletonCollectionPrivate; -enum { - SINGLETON_COLLECTION_0_PROPERTY, - SINGLETON_COLLECTION_G_TYPE, - SINGLETON_COLLECTION_G_DUP_FUNC, - SINGLETON_COLLECTION_G_DESTROY_FUNC, - SINGLETON_COLLECTION_READ_ONLY_PROPERTY, - SINGLETON_COLLECTION_SIZE_PROPERTY, - SINGLETON_COLLECTION_NUM_PROPERTIES -}; -static GParamSpec* singleton_collection_properties[SINGLETON_COLLECTION_NUM_PROPERTIES]; -#define _g_destroy_func0(var) (((var == NULL) || (g_destroy_func == NULL)) ? NULL : (var = (g_destroy_func (var), NULL))) - -#define SINGLETON_COLLECTION_TYPE_SINGLETON_ITERATOR (singleton_collection_singleton_iterator_get_type ()) -#define SINGLETON_COLLECTION_SINGLETON_ITERATOR(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), SINGLETON_COLLECTION_TYPE_SINGLETON_ITERATOR, SingletonCollectionSingletonIterator)) -#define SINGLETON_COLLECTION_SINGLETON_ITERATOR_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), SINGLETON_COLLECTION_TYPE_SINGLETON_ITERATOR, SingletonCollectionSingletonIteratorClass)) -#define SINGLETON_COLLECTION_IS_SINGLETON_ITERATOR(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), SINGLETON_COLLECTION_TYPE_SINGLETON_ITERATOR)) -#define SINGLETON_COLLECTION_IS_SINGLETON_ITERATOR_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), SINGLETON_COLLECTION_TYPE_SINGLETON_ITERATOR)) -#define SINGLETON_COLLECTION_SINGLETON_ITERATOR_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), SINGLETON_COLLECTION_TYPE_SINGLETON_ITERATOR, SingletonCollectionSingletonIteratorClass)) - -typedef struct _SingletonCollectionSingletonIterator SingletonCollectionSingletonIterator; -typedef struct _SingletonCollectionSingletonIteratorClass SingletonCollectionSingletonIteratorClass; -typedef struct _SingletonCollectionSingletonIteratorPrivate SingletonCollectionSingletonIteratorPrivate; -enum { - SINGLETON_COLLECTION_SINGLETON_ITERATOR_0_PROPERTY, - SINGLETON_COLLECTION_SINGLETON_ITERATOR_G_TYPE, - SINGLETON_COLLECTION_SINGLETON_ITERATOR_G_DUP_FUNC, - SINGLETON_COLLECTION_SINGLETON_ITERATOR_G_DESTROY_FUNC, - SINGLETON_COLLECTION_SINGLETON_ITERATOR_READ_ONLY_PROPERTY, - SINGLETON_COLLECTION_SINGLETON_ITERATOR_VALID_PROPERTY, - SINGLETON_COLLECTION_SINGLETON_ITERATOR_NUM_PROPERTIES -}; -static GParamSpec* singleton_collection_singleton_iterator_properties[SINGLETON_COLLECTION_SINGLETON_ITERATOR_NUM_PROPERTIES]; -#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL))) - -#define TYPE_MARKER (marker_get_type ()) -#define MARKER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_MARKER, Marker)) -#define IS_MARKER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_MARKER)) -#define MARKER_GET_INTERFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE ((obj), TYPE_MARKER, MarkerIface)) - -typedef struct _Marker Marker; -typedef struct _MarkerIface MarkerIface; - -#define TYPE_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_UNKNOWN_TOTAL_MONITOR (unknown_total_monitor_get_type ()) -#define UNKNOWN_TOTAL_MONITOR(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_UNKNOWN_TOTAL_MONITOR, UnknownTotalMonitor)) -#define UNKNOWN_TOTAL_MONITOR_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_UNKNOWN_TOTAL_MONITOR, UnknownTotalMonitorClass)) -#define IS_UNKNOWN_TOTAL_MONITOR(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_UNKNOWN_TOTAL_MONITOR)) -#define IS_UNKNOWN_TOTAL_MONITOR_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_UNKNOWN_TOTAL_MONITOR)) -#define UNKNOWN_TOTAL_MONITOR_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_UNKNOWN_TOTAL_MONITOR, UnknownTotalMonitorClass)) - -typedef struct _UnknownTotalMonitor UnknownTotalMonitor; -typedef struct _UnknownTotalMonitorClass UnknownTotalMonitorClass; -typedef struct _UnknownTotalMonitorPrivate UnknownTotalMonitorPrivate; -typedef struct _ParamSpecUnknownTotalMonitor ParamSpecUnknownTotalMonitor; - -#define TYPE_AGGREGATE_PROGRESS_MONITOR (aggregate_progress_monitor_get_type ()) -#define AGGREGATE_PROGRESS_MONITOR(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_AGGREGATE_PROGRESS_MONITOR, AggregateProgressMonitor)) -#define AGGREGATE_PROGRESS_MONITOR_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_AGGREGATE_PROGRESS_MONITOR, AggregateProgressMonitorClass)) -#define IS_AGGREGATE_PROGRESS_MONITOR(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_AGGREGATE_PROGRESS_MONITOR)) -#define IS_AGGREGATE_PROGRESS_MONITOR_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_AGGREGATE_PROGRESS_MONITOR)) -#define AGGREGATE_PROGRESS_MONITOR_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_AGGREGATE_PROGRESS_MONITOR, AggregateProgressMonitorClass)) - -typedef struct _AggregateProgressMonitor AggregateProgressMonitor; -typedef struct _AggregateProgressMonitorClass AggregateProgressMonitorClass; -typedef struct _AggregateProgressMonitorPrivate AggregateProgressMonitorPrivate; -#define _g_free0(var) (var = (g_free (var), NULL)) -typedef struct _ParamSpecAggregateProgressMonitor ParamSpecAggregateProgressMonitor; - -struct _SingletonCollection { - GeeAbstractCollection parent_instance; - SingletonCollectionPrivate * priv; -}; - -struct _SingletonCollectionClass { - GeeAbstractCollectionClass parent_class; -}; - -struct _SingletonCollectionPrivate { - GType g_type; - GBoxedCopyFunc g_dup_func; - GDestroyNotify g_destroy_func; - gpointer object; -}; - -struct _SingletonCollectionSingletonIterator { - GObject parent_instance; - SingletonCollectionSingletonIteratorPrivate * priv; -}; - -struct _SingletonCollectionSingletonIteratorClass { - GObjectClass parent_class; -}; - -struct _SingletonCollectionSingletonIteratorPrivate { - GType g_type; - GBoxedCopyFunc g_dup_func; - GDestroyNotify g_destroy_func; - SingletonCollection* c; - gboolean done; - gpointer current; -}; - -struct _MarkerIface { - GTypeInterface parent_iface; - void (*mark) (Marker* self, DataObject* object); - void (*unmark) (Marker* self, DataObject* object); - gboolean (*toggle) (Marker* self, DataObject* object); - void (*mark_many) (Marker* self, GeeCollection* list); - void (*unmark_many) (Marker* self, GeeCollection* list); - void (*mark_all) (Marker* self); - gint (*get_count) (Marker* self); - GeeCollection* (*get_all) (Marker* self); -}; - -typedef gboolean (*MarkedAction) (DataObject* object, GObject* user, void* user_data); -typedef gboolean (*ProgressMonitor) (guint64 current, guint64 total, gboolean do_event_loop, void* user_data); -struct _UnknownTotalMonitor { - GTypeInstance parent_instance; - volatile int ref_count; - UnknownTotalMonitorPrivate * priv; -}; - -struct _UnknownTotalMonitorClass { - GTypeClass parent_class; - void (*finalize) (UnknownTotalMonitor *self); -}; - -struct _UnknownTotalMonitorPrivate { - guint64 total; - ProgressMonitor wrapped_monitor; - gpointer wrapped_monitor_target; -}; - -struct _ParamSpecUnknownTotalMonitor { - GParamSpec parent_instance; -}; - -struct _AggregateProgressMonitor { - GTypeInstance parent_instance; - volatile int ref_count; - AggregateProgressMonitorPrivate * priv; -}; - -struct _AggregateProgressMonitorClass { - GTypeClass parent_class; - void (*finalize) (AggregateProgressMonitor *self); -}; - -struct _AggregateProgressMonitorPrivate { - guint64 grand_total; - ProgressMonitor wrapped_monitor; - gpointer wrapped_monitor_target; - guint64 aggregate_count; - guint64 last_count; -}; - -struct _ParamSpecAggregateProgressMonitor { - GParamSpec parent_instance; -}; - - -static gpointer singleton_collection_parent_class = NULL; -static gpointer singleton_collection_singleton_iterator_parent_class = NULL; -static GeeTraversableIface * singleton_collection_singleton_iterator_gee_traversable_parent_iface = NULL; -static GeeIteratorIface * singleton_collection_singleton_iterator_gee_iterator_parent_iface = NULL; -static gpointer unknown_total_monitor_parent_class = NULL; -static gpointer aggregate_progress_monitor_parent_class = NULL; - -GType singleton_collection_get_type (void) G_GNUC_CONST; -#define SINGLETON_COLLECTION_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), TYPE_SINGLETON_COLLECTION, SingletonCollectionPrivate)) -SingletonCollection* singleton_collection_new (GType g_type, - GBoxedCopyFunc g_dup_func, - GDestroyNotify g_destroy_func, - gconstpointer object); -SingletonCollection* singleton_collection_construct (GType object_type, - GType g_type, - GBoxedCopyFunc g_dup_func, - GDestroyNotify g_destroy_func, - gconstpointer object); -static gboolean singleton_collection_real_add (GeeAbstractCollection* base, - gconstpointer object); -static void singleton_collection_real_clear (GeeAbstractCollection* base); -static gboolean singleton_collection_real_contains (GeeAbstractCollection* base, - gconstpointer object); -static GeeIterator* singleton_collection_real_iterator (GeeAbstractCollection* base); -static SingletonCollectionSingletonIterator* singleton_collection_singleton_iterator_new (GType g_type, - GBoxedCopyFunc g_dup_func, - GDestroyNotify g_destroy_func, - SingletonCollection* c); -static SingletonCollectionSingletonIterator* singleton_collection_singleton_iterator_construct (GType object_type, - GType g_type, - GBoxedCopyFunc g_dup_func, - GDestroyNotify g_destroy_func, - SingletonCollection* c); -static GType singleton_collection_singleton_iterator_get_type (void) G_GNUC_CONST G_GNUC_UNUSED; -static gboolean singleton_collection_real_remove (GeeAbstractCollection* base, - gconstpointer item); -#define SINGLETON_COLLECTION_SINGLETON_ITERATOR_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), SINGLETON_COLLECTION_TYPE_SINGLETON_ITERATOR, SingletonCollectionSingletonIteratorPrivate)) -static gboolean singleton_collection_singleton_iterator_real_foreach (GeeTraversable* base, - GeeForallFunc f, - void* f_target); -static gpointer singleton_collection_singleton_iterator_real_get (GeeIterator* base); -static gboolean singleton_collection_singleton_iterator_real_has_next (GeeIterator* base); -static gboolean singleton_collection_singleton_iterator_real_next (GeeIterator* base); -static void singleton_collection_singleton_iterator_real_remove (GeeIterator* base); -static void singleton_collection_singleton_iterator_finalize (GObject * obj); -static void _vala_singleton_collection_singleton_iterator_get_property (GObject * object, - guint property_id, - GValue * value, - GParamSpec * pspec); -static void _vala_singleton_collection_singleton_iterator_set_property (GObject * object, - guint property_id, - const GValue * value, - GParamSpec * pspec); -static void singleton_collection_finalize (GObject * obj); -static void _vala_singleton_collection_get_property (GObject * object, - guint property_id, - GValue * value, - GParamSpec * pspec); -static void _vala_singleton_collection_set_property (GObject * object, - guint property_id, - const GValue * value, - GParamSpec * pspec); -GType data_object_get_type (void) G_GNUC_CONST; -GType marker_get_type (void) G_GNUC_CONST; -void marker_mark (Marker* self, - DataObject* object); -void marker_unmark (Marker* self, - DataObject* object); -gboolean marker_toggle (Marker* self, - DataObject* object); -void marker_mark_many (Marker* self, - GeeCollection* list); -void marker_unmark_many (Marker* self, - GeeCollection* list); -void marker_mark_all (Marker* self); -gint marker_get_count (Marker* self); -GeeCollection* marker_get_all (Marker* self); -gpointer unknown_total_monitor_ref (gpointer instance); -void unknown_total_monitor_unref (gpointer instance); -GParamSpec* param_spec_unknown_total_monitor (const gchar* name, - const gchar* nick, - const gchar* blurb, - GType object_type, - GParamFlags flags); -void value_set_unknown_total_monitor (GValue* value, - gpointer v_object); -void value_take_unknown_total_monitor (GValue* value, - gpointer v_object); -gpointer value_get_unknown_total_monitor (const GValue* value); -GType unknown_total_monitor_get_type (void) G_GNUC_CONST; -#define UNKNOWN_TOTAL_MONITOR_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), TYPE_UNKNOWN_TOTAL_MONITOR, UnknownTotalMonitorPrivate)) -UnknownTotalMonitor* unknown_total_monitor_new (guint64 total, - ProgressMonitor wrapped_monitor, - void* wrapped_monitor_target); -UnknownTotalMonitor* unknown_total_monitor_construct (GType object_type, - guint64 total, - ProgressMonitor wrapped_monitor, - void* wrapped_monitor_target); -gboolean unknown_total_monitor_monitor (UnknownTotalMonitor* self, - guint64 count, - guint64 total); -static void unknown_total_monitor_finalize (UnknownTotalMonitor * obj); -gpointer aggregate_progress_monitor_ref (gpointer instance); -void aggregate_progress_monitor_unref (gpointer instance); -GParamSpec* param_spec_aggregate_progress_monitor (const gchar* name, - const gchar* nick, - const gchar* blurb, - GType object_type, - GParamFlags flags); -void value_set_aggregate_progress_monitor (GValue* value, - gpointer v_object); -void value_take_aggregate_progress_monitor (GValue* value, - gpointer v_object); -gpointer value_get_aggregate_progress_monitor (const GValue* value); -GType aggregate_progress_monitor_get_type (void) G_GNUC_CONST; -#define AGGREGATE_PROGRESS_MONITOR_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), TYPE_AGGREGATE_PROGRESS_MONITOR, AggregateProgressMonitorPrivate)) -AggregateProgressMonitor* aggregate_progress_monitor_new (guint64 grand_total, - ProgressMonitor wrapped_monitor, - void* wrapped_monitor_target); -AggregateProgressMonitor* aggregate_progress_monitor_construct (GType object_type, - guint64 grand_total, - ProgressMonitor wrapped_monitor, - void* wrapped_monitor_target); -void aggregate_progress_monitor_next_step (AggregateProgressMonitor* self, - const gchar* name); -gboolean aggregate_progress_monitor_monitor (AggregateProgressMonitor* self, - guint64 count, - guint64 total); -static void aggregate_progress_monitor_finalize (AggregateProgressMonitor * obj); -gboolean null_progress_monitor (guint64 count, - guint64 total); -gdouble degrees_to_radians (gdouble theta); - - -SingletonCollection* -singleton_collection_construct (GType object_type, - GType g_type, - GBoxedCopyFunc g_dup_func, - GDestroyNotify g_destroy_func, - gconstpointer object) -{ - SingletonCollection * self = NULL; - gpointer _tmp0_; -#line 65 "/home/jens/Source/shotwell/src/core/util.vala" - self = (SingletonCollection*) gee_abstract_collection_construct (object_type, g_type, (GBoxedCopyFunc) g_dup_func, (GDestroyNotify) g_destroy_func); -#line 65 "/home/jens/Source/shotwell/src/core/util.vala" - self->priv->g_type = g_type; -#line 65 "/home/jens/Source/shotwell/src/core/util.vala" - self->priv->g_dup_func = g_dup_func; -#line 65 "/home/jens/Source/shotwell/src/core/util.vala" - self->priv->g_destroy_func = g_destroy_func; -#line 66 "/home/jens/Source/shotwell/src/core/util.vala" - _tmp0_ = ((object != NULL) && (g_dup_func != NULL)) ? g_dup_func ((gpointer) object) : ((gpointer) object); -#line 66 "/home/jens/Source/shotwell/src/core/util.vala" - _g_destroy_func0 (self->priv->object); -#line 66 "/home/jens/Source/shotwell/src/core/util.vala" - self->priv->object = _tmp0_; -#line 65 "/home/jens/Source/shotwell/src/core/util.vala" - return self; -#line 366 "util.c" -} - - -SingletonCollection* -singleton_collection_new (GType g_type, - GBoxedCopyFunc g_dup_func, - GDestroyNotify g_destroy_func, - gconstpointer object) -{ -#line 65 "/home/jens/Source/shotwell/src/core/util.vala" - return singleton_collection_construct (TYPE_SINGLETON_COLLECTION, g_type, g_dup_func, g_destroy_func, object); -#line 378 "util.c" -} - - -static gboolean -singleton_collection_real_add (GeeAbstractCollection* base, - gconstpointer object) -{ - SingletonCollection * self; - gboolean result = FALSE; -#line 73 "/home/jens/Source/shotwell/src/core/util.vala" - self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_SINGLETON_COLLECTION, SingletonCollection); -#line 74 "/home/jens/Source/shotwell/src/core/util.vala" - g_warning ("util.vala:74: Cannot add to SingletonCollection"); -#line 76 "/home/jens/Source/shotwell/src/core/util.vala" - result = FALSE; -#line 76 "/home/jens/Source/shotwell/src/core/util.vala" - return result; -#line 396 "util.c" -} - - -static void -singleton_collection_real_clear (GeeAbstractCollection* base) -{ - SingletonCollection * self; -#line 79 "/home/jens/Source/shotwell/src/core/util.vala" - self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_SINGLETON_COLLECTION, SingletonCollection); -#line 80 "/home/jens/Source/shotwell/src/core/util.vala" - ((self->priv->object == NULL) || (self->priv->g_destroy_func == NULL)) ? NULL : (self->priv->object = (self->priv->g_destroy_func (self->priv->object), NULL)); -#line 80 "/home/jens/Source/shotwell/src/core/util.vala" - self->priv->object = NULL; -#line 410 "util.c" -} - - -static gboolean -singleton_collection_real_contains (GeeAbstractCollection* base, - gconstpointer object) -{ - SingletonCollection * self; - gboolean result = FALSE; - gconstpointer _tmp0_; -#line 83 "/home/jens/Source/shotwell/src/core/util.vala" - self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_SINGLETON_COLLECTION, SingletonCollection); -#line 84 "/home/jens/Source/shotwell/src/core/util.vala" - _tmp0_ = self->priv->object; -#line 84 "/home/jens/Source/shotwell/src/core/util.vala" - result = _tmp0_ == object; -#line 84 "/home/jens/Source/shotwell/src/core/util.vala" - return result; -#line 429 "util.c" -} - - -static GeeIterator* -singleton_collection_real_iterator (GeeAbstractCollection* base) -{ - SingletonCollection * self; - GeeIterator* result = NULL; - SingletonCollectionSingletonIterator* _tmp0_; -#line 87 "/home/jens/Source/shotwell/src/core/util.vala" - self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_SINGLETON_COLLECTION, SingletonCollection); -#line 88 "/home/jens/Source/shotwell/src/core/util.vala" - _tmp0_ = singleton_collection_singleton_iterator_new (self->priv->g_type, (GBoxedCopyFunc) self->priv->g_dup_func, (GDestroyNotify) self->priv->g_destroy_func, self); -#line 88 "/home/jens/Source/shotwell/src/core/util.vala" - result = G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, GEE_TYPE_ITERATOR, GeeIterator); -#line 88 "/home/jens/Source/shotwell/src/core/util.vala" - return result; -#line 447 "util.c" -} - - -static gboolean -singleton_collection_real_remove (GeeAbstractCollection* base, - gconstpointer item) -{ - SingletonCollection * self; - gboolean result = FALSE; - gconstpointer _tmp0_; -#line 91 "/home/jens/Source/shotwell/src/core/util.vala" - self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_SINGLETON_COLLECTION, SingletonCollection); -#line 92 "/home/jens/Source/shotwell/src/core/util.vala" - _tmp0_ = self->priv->object; -#line 92 "/home/jens/Source/shotwell/src/core/util.vala" - if (item == _tmp0_) { -#line 93 "/home/jens/Source/shotwell/src/core/util.vala" - ((self->priv->object == NULL) || (self->priv->g_destroy_func == NULL)) ? NULL : (self->priv->object = (self->priv->g_destroy_func (self->priv->object), NULL)); -#line 93 "/home/jens/Source/shotwell/src/core/util.vala" - self->priv->object = NULL; -#line 95 "/home/jens/Source/shotwell/src/core/util.vala" - result = TRUE; -#line 95 "/home/jens/Source/shotwell/src/core/util.vala" - return result; -#line 472 "util.c" - } -#line 98 "/home/jens/Source/shotwell/src/core/util.vala" - result = FALSE; -#line 98 "/home/jens/Source/shotwell/src/core/util.vala" - return result; -#line 478 "util.c" -} - - -static gboolean -singleton_collection_real_get_read_only (GeeAbstractCollection* base) -{ - gboolean result; - SingletonCollection* self; -#line 70 "/home/jens/Source/shotwell/src/core/util.vala" - self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_SINGLETON_COLLECTION, SingletonCollection); -#line 70 "/home/jens/Source/shotwell/src/core/util.vala" - result = FALSE; -#line 70 "/home/jens/Source/shotwell/src/core/util.vala" - return result; -#line 493 "util.c" -} - - -static gint -singleton_collection_real_get_size (GeeAbstractCollection* base) -{ - gint result; - SingletonCollection* self; - gint _tmp0_ = 0; - gconstpointer _tmp1_; -#line 102 "/home/jens/Source/shotwell/src/core/util.vala" - self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_SINGLETON_COLLECTION, SingletonCollection); -#line 103 "/home/jens/Source/shotwell/src/core/util.vala" - _tmp1_ = self->priv->object; -#line 103 "/home/jens/Source/shotwell/src/core/util.vala" - if (_tmp1_ != NULL) { -#line 103 "/home/jens/Source/shotwell/src/core/util.vala" - _tmp0_ = 1; -#line 512 "util.c" - } else { -#line 103 "/home/jens/Source/shotwell/src/core/util.vala" - _tmp0_ = 0; -#line 516 "util.c" - } -#line 103 "/home/jens/Source/shotwell/src/core/util.vala" - result = _tmp0_; -#line 103 "/home/jens/Source/shotwell/src/core/util.vala" - return result; -#line 522 "util.c" -} - - -static gpointer -_g_object_ref0 (gpointer self) -{ -#line 20 "/home/jens/Source/shotwell/src/core/util.vala" - return self ? g_object_ref (self) : NULL; -#line 531 "util.c" -} - - -static SingletonCollectionSingletonIterator* -singleton_collection_singleton_iterator_construct (GType object_type, - GType g_type, - GBoxedCopyFunc g_dup_func, - GDestroyNotify g_destroy_func, - SingletonCollection* c) -{ - SingletonCollectionSingletonIterator * self = NULL; - SingletonCollection* _tmp0_; -#line 19 "/home/jens/Source/shotwell/src/core/util.vala" - g_return_val_if_fail (IS_SINGLETON_COLLECTION (c), NULL); -#line 19 "/home/jens/Source/shotwell/src/core/util.vala" - self = (SingletonCollectionSingletonIterator*) g_object_new (object_type, NULL); -#line 19 "/home/jens/Source/shotwell/src/core/util.vala" - self->priv->g_type = g_type; -#line 19 "/home/jens/Source/shotwell/src/core/util.vala" - self->priv->g_dup_func = g_dup_func; -#line 19 "/home/jens/Source/shotwell/src/core/util.vala" - self->priv->g_destroy_func = g_destroy_func; -#line 20 "/home/jens/Source/shotwell/src/core/util.vala" - _tmp0_ = _g_object_ref0 (c); -#line 20 "/home/jens/Source/shotwell/src/core/util.vala" - _g_object_unref0 (self->priv->c); -#line 20 "/home/jens/Source/shotwell/src/core/util.vala" - self->priv->c = _tmp0_; -#line 19 "/home/jens/Source/shotwell/src/core/util.vala" - return self; -#line 562 "util.c" -} - - -static SingletonCollectionSingletonIterator* -singleton_collection_singleton_iterator_new (GType g_type, - GBoxedCopyFunc g_dup_func, - GDestroyNotify g_destroy_func, - SingletonCollection* c) -{ -#line 19 "/home/jens/Source/shotwell/src/core/util.vala" - return singleton_collection_singleton_iterator_construct (SINGLETON_COLLECTION_TYPE_SINGLETON_ITERATOR, g_type, g_dup_func, g_destroy_func, c); -#line 574 "util.c" -} - - -static gboolean -singleton_collection_singleton_iterator_real_foreach (GeeTraversable* base, - GeeForallFunc f, - void* f_target) -{ - SingletonCollectionSingletonIterator * self; - gboolean result = FALSE; - SingletonCollection* _tmp0_; - gconstpointer _tmp1_; - gpointer _tmp2_; -#line 31 "/home/jens/Source/shotwell/src/core/util.vala" - self = G_TYPE_CHECK_INSTANCE_CAST (base, SINGLETON_COLLECTION_TYPE_SINGLETON_ITERATOR, SingletonCollectionSingletonIterator); -#line 32 "/home/jens/Source/shotwell/src/core/util.vala" - _tmp0_ = self->priv->c; -#line 32 "/home/jens/Source/shotwell/src/core/util.vala" - _tmp1_ = _tmp0_->priv->object; -#line 32 "/home/jens/Source/shotwell/src/core/util.vala" - _tmp2_ = ((_tmp1_ != NULL) && (self->priv->g_dup_func != NULL)) ? self->priv->g_dup_func ((gpointer) _tmp1_) : ((gpointer) _tmp1_); -#line 32 "/home/jens/Source/shotwell/src/core/util.vala" - result = f (_tmp2_, f_target); -#line 32 "/home/jens/Source/shotwell/src/core/util.vala" - return result; -#line 600 "util.c" -} - - -static gpointer -singleton_collection_singleton_iterator_real_get (GeeIterator* base) -{ - SingletonCollectionSingletonIterator * self; - gpointer result = NULL; - gconstpointer _tmp0_; - gpointer _tmp1_; -#line 35 "/home/jens/Source/shotwell/src/core/util.vala" - self = G_TYPE_CHECK_INSTANCE_CAST (base, SINGLETON_COLLECTION_TYPE_SINGLETON_ITERATOR, SingletonCollectionSingletonIterator); -#line 36 "/home/jens/Source/shotwell/src/core/util.vala" - _tmp0_ = self->priv->current; -#line 36 "/home/jens/Source/shotwell/src/core/util.vala" - _tmp1_ = ((_tmp0_ != NULL) && (self->priv->g_dup_func != NULL)) ? self->priv->g_dup_func ((gpointer) _tmp0_) : ((gpointer) _tmp0_); -#line 36 "/home/jens/Source/shotwell/src/core/util.vala" - result = _tmp1_; -#line 36 "/home/jens/Source/shotwell/src/core/util.vala" - return result; -#line 621 "util.c" -} - - -static gboolean -singleton_collection_singleton_iterator_real_has_next (GeeIterator* base) -{ - SingletonCollectionSingletonIterator * self; - gboolean result = FALSE; -#line 39 "/home/jens/Source/shotwell/src/core/util.vala" - self = G_TYPE_CHECK_INSTANCE_CAST (base, SINGLETON_COLLECTION_TYPE_SINGLETON_ITERATOR, SingletonCollectionSingletonIterator); -#line 40 "/home/jens/Source/shotwell/src/core/util.vala" - result = FALSE; -#line 40 "/home/jens/Source/shotwell/src/core/util.vala" - return result; -#line 636 "util.c" -} - - -static gboolean -singleton_collection_singleton_iterator_real_next (GeeIterator* base) -{ - SingletonCollectionSingletonIterator * self; - gboolean result = FALSE; - gboolean _tmp0_; - SingletonCollection* _tmp1_; - gconstpointer _tmp2_; - gpointer _tmp3_; -#line 43 "/home/jens/Source/shotwell/src/core/util.vala" - self = G_TYPE_CHECK_INSTANCE_CAST (base, SINGLETON_COLLECTION_TYPE_SINGLETON_ITERATOR, SingletonCollectionSingletonIterator); -#line 44 "/home/jens/Source/shotwell/src/core/util.vala" - _tmp0_ = self->priv->done; -#line 44 "/home/jens/Source/shotwell/src/core/util.vala" - if (_tmp0_) { -#line 45 "/home/jens/Source/shotwell/src/core/util.vala" - result = FALSE; -#line 45 "/home/jens/Source/shotwell/src/core/util.vala" - return result; -#line 659 "util.c" - } -#line 47 "/home/jens/Source/shotwell/src/core/util.vala" - self->priv->done = TRUE; -#line 48 "/home/jens/Source/shotwell/src/core/util.vala" - _tmp1_ = self->priv->c; -#line 48 "/home/jens/Source/shotwell/src/core/util.vala" - _tmp2_ = _tmp1_->priv->object; -#line 48 "/home/jens/Source/shotwell/src/core/util.vala" - _tmp3_ = ((_tmp2_ != NULL) && (self->priv->g_dup_func != NULL)) ? self->priv->g_dup_func ((gpointer) _tmp2_) : ((gpointer) _tmp2_); -#line 48 "/home/jens/Source/shotwell/src/core/util.vala" - ((self->priv->current == NULL) || (self->priv->g_destroy_func == NULL)) ? NULL : (self->priv->current = (self->priv->g_destroy_func (self->priv->current), NULL)); -#line 48 "/home/jens/Source/shotwell/src/core/util.vala" - self->priv->current = _tmp3_; -#line 50 "/home/jens/Source/shotwell/src/core/util.vala" - result = TRUE; -#line 50 "/home/jens/Source/shotwell/src/core/util.vala" - return result; -#line 677 "util.c" -} - - -static void -singleton_collection_singleton_iterator_real_remove (GeeIterator* base) -{ - SingletonCollectionSingletonIterator * self; - gboolean _tmp0_; -#line 53 "/home/jens/Source/shotwell/src/core/util.vala" - self = G_TYPE_CHECK_INSTANCE_CAST (base, SINGLETON_COLLECTION_TYPE_SINGLETON_ITERATOR, SingletonCollectionSingletonIterator); -#line 54 "/home/jens/Source/shotwell/src/core/util.vala" - _tmp0_ = self->priv->done; -#line 54 "/home/jens/Source/shotwell/src/core/util.vala" - if (!_tmp0_) { -#line 692 "util.c" - SingletonCollection* _tmp1_; -#line 55 "/home/jens/Source/shotwell/src/core/util.vala" - _tmp1_ = self->priv->c; -#line 55 "/home/jens/Source/shotwell/src/core/util.vala" - ((_tmp1_->priv->object == NULL) || (self->priv->g_destroy_func == NULL)) ? NULL : (_tmp1_->priv->object = (self->priv->g_destroy_func (_tmp1_->priv->object), NULL)); -#line 55 "/home/jens/Source/shotwell/src/core/util.vala" - _tmp1_->priv->object = NULL; -#line 56 "/home/jens/Source/shotwell/src/core/util.vala" - ((self->priv->current == NULL) || (self->priv->g_destroy_func == NULL)) ? NULL : (self->priv->current = (self->priv->g_destroy_func (self->priv->current), NULL)); -#line 56 "/home/jens/Source/shotwell/src/core/util.vala" - self->priv->current = NULL; -#line 704 "util.c" - } -#line 59 "/home/jens/Source/shotwell/src/core/util.vala" - self->priv->done = TRUE; -#line 708 "util.c" -} - - -static gboolean -singleton_collection_singleton_iterator_real_get_read_only (GeeIterator* base) -{ - gboolean result; - SingletonCollectionSingletonIterator* self; - gboolean _tmp0_; -#line 24 "/home/jens/Source/shotwell/src/core/util.vala" - self = G_TYPE_CHECK_INSTANCE_CAST (base, SINGLETON_COLLECTION_TYPE_SINGLETON_ITERATOR, SingletonCollectionSingletonIterator); -#line 24 "/home/jens/Source/shotwell/src/core/util.vala" - _tmp0_ = self->priv->done; -#line 24 "/home/jens/Source/shotwell/src/core/util.vala" - result = _tmp0_; -#line 24 "/home/jens/Source/shotwell/src/core/util.vala" - return result; -#line 726 "util.c" -} - - -static gboolean -singleton_collection_singleton_iterator_real_get_valid (GeeIterator* base) -{ - gboolean result; - SingletonCollectionSingletonIterator* self; - gboolean _tmp0_; -#line 28 "/home/jens/Source/shotwell/src/core/util.vala" - self = G_TYPE_CHECK_INSTANCE_CAST (base, SINGLETON_COLLECTION_TYPE_SINGLETON_ITERATOR, SingletonCollectionSingletonIterator); -#line 28 "/home/jens/Source/shotwell/src/core/util.vala" - _tmp0_ = self->priv->done; -#line 28 "/home/jens/Source/shotwell/src/core/util.vala" - result = _tmp0_; -#line 28 "/home/jens/Source/shotwell/src/core/util.vala" - return result; -#line 744 "util.c" -} - - -static void -singleton_collection_singleton_iterator_class_init (SingletonCollectionSingletonIteratorClass * klass) -{ -#line 14 "/home/jens/Source/shotwell/src/core/util.vala" - singleton_collection_singleton_iterator_parent_class = g_type_class_peek_parent (klass); -#line 14 "/home/jens/Source/shotwell/src/core/util.vala" - g_type_class_add_private (klass, sizeof (SingletonCollectionSingletonIteratorPrivate)); -#line 14 "/home/jens/Source/shotwell/src/core/util.vala" - G_OBJECT_CLASS (klass)->get_property = _vala_singleton_collection_singleton_iterator_get_property; -#line 14 "/home/jens/Source/shotwell/src/core/util.vala" - G_OBJECT_CLASS (klass)->set_property = _vala_singleton_collection_singleton_iterator_set_property; -#line 14 "/home/jens/Source/shotwell/src/core/util.vala" - G_OBJECT_CLASS (klass)->finalize = singleton_collection_singleton_iterator_finalize; -#line 14 "/home/jens/Source/shotwell/src/core/util.vala" - g_object_class_install_property (G_OBJECT_CLASS (klass), SINGLETON_COLLECTION_SINGLETON_ITERATOR_G_TYPE, g_param_spec_gtype ("g-type", "type", "type", G_TYPE_NONE, G_PARAM_STATIC_STRINGS | G_PARAM_WRITABLE | G_PARAM_CONSTRUCT_ONLY)); -#line 14 "/home/jens/Source/shotwell/src/core/util.vala" - g_object_class_install_property (G_OBJECT_CLASS (klass), SINGLETON_COLLECTION_SINGLETON_ITERATOR_G_DUP_FUNC, g_param_spec_pointer ("g-dup-func", "dup func", "dup func", G_PARAM_STATIC_STRINGS | G_PARAM_WRITABLE | G_PARAM_CONSTRUCT_ONLY)); -#line 14 "/home/jens/Source/shotwell/src/core/util.vala" - g_object_class_install_property (G_OBJECT_CLASS (klass), SINGLETON_COLLECTION_SINGLETON_ITERATOR_G_DESTROY_FUNC, g_param_spec_pointer ("g-destroy-func", "destroy func", "destroy func", G_PARAM_STATIC_STRINGS | G_PARAM_WRITABLE | G_PARAM_CONSTRUCT_ONLY)); -#line 14 "/home/jens/Source/shotwell/src/core/util.vala" - g_object_class_install_property (G_OBJECT_CLASS (klass), SINGLETON_COLLECTION_SINGLETON_ITERATOR_READ_ONLY_PROPERTY, singleton_collection_singleton_iterator_properties[SINGLETON_COLLECTION_SINGLETON_ITERATOR_READ_ONLY_PROPERTY] = g_param_spec_boolean ("read-only", "read-only", "read-only", FALSE, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE)); -#line 14 "/home/jens/Source/shotwell/src/core/util.vala" - g_object_class_install_property (G_OBJECT_CLASS (klass), SINGLETON_COLLECTION_SINGLETON_ITERATOR_VALID_PROPERTY, singleton_collection_singleton_iterator_properties[SINGLETON_COLLECTION_SINGLETON_ITERATOR_VALID_PROPERTY] = g_param_spec_boolean ("valid", "valid", "valid", FALSE, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE)); -#line 771 "util.c" -} - - -static GType -singleton_collection_singleton_iterator_gee_traversable_get_g_type (SingletonCollectionSingletonIterator* self) -{ -#line 14 "/home/jens/Source/shotwell/src/core/util.vala" - return self->priv->g_type; -#line 780 "util.c" -} - - -static GBoxedCopyFunc -singleton_collection_singleton_iterator_gee_traversable_get_g_dup_func (SingletonCollectionSingletonIterator* self) -{ -#line 14 "/home/jens/Source/shotwell/src/core/util.vala" - return self->priv->g_dup_func; -#line 789 "util.c" -} - - -static GDestroyNotify -singleton_collection_singleton_iterator_gee_traversable_get_g_destroy_func (SingletonCollectionSingletonIterator* self) -{ -#line 14 "/home/jens/Source/shotwell/src/core/util.vala" - return self->priv->g_destroy_func; -#line 798 "util.c" -} - - -static void -singleton_collection_singleton_iterator_gee_traversable_interface_init (GeeTraversableIface * iface) -{ -#line 14 "/home/jens/Source/shotwell/src/core/util.vala" - singleton_collection_singleton_iterator_gee_traversable_parent_iface = g_type_interface_peek_parent (iface); -#line 14 "/home/jens/Source/shotwell/src/core/util.vala" - iface->foreach = (gboolean (*) (GeeTraversable *, GeeForallFunc, void*)) singleton_collection_singleton_iterator_real_foreach; -#line 14 "/home/jens/Source/shotwell/src/core/util.vala" - iface->get_g_type = (GType (*) (GeeTraversable *)) singleton_collection_singleton_iterator_gee_traversable_get_g_type; -#line 14 "/home/jens/Source/shotwell/src/core/util.vala" - iface->get_g_dup_func = (GBoxedCopyFunc (*) (GeeTraversable *)) singleton_collection_singleton_iterator_gee_traversable_get_g_dup_func; -#line 14 "/home/jens/Source/shotwell/src/core/util.vala" - iface->get_g_destroy_func = (GDestroyNotify (*) (GeeTraversable *)) singleton_collection_singleton_iterator_gee_traversable_get_g_destroy_func; -#line 815 "util.c" -} - - -static void -singleton_collection_singleton_iterator_gee_iterator_interface_init (GeeIteratorIface * iface) -{ -#line 14 "/home/jens/Source/shotwell/src/core/util.vala" - singleton_collection_singleton_iterator_gee_iterator_parent_iface = g_type_interface_peek_parent (iface); -#line 14 "/home/jens/Source/shotwell/src/core/util.vala" - iface->get = (gpointer (*) (GeeIterator *)) singleton_collection_singleton_iterator_real_get; -#line 14 "/home/jens/Source/shotwell/src/core/util.vala" - iface->has_next = (gboolean (*) (GeeIterator *)) singleton_collection_singleton_iterator_real_has_next; -#line 14 "/home/jens/Source/shotwell/src/core/util.vala" - iface->next = (gboolean (*) (GeeIterator *)) singleton_collection_singleton_iterator_real_next; -#line 14 "/home/jens/Source/shotwell/src/core/util.vala" - iface->remove = (void (*) (GeeIterator *)) singleton_collection_singleton_iterator_real_remove; -#line 14 "/home/jens/Source/shotwell/src/core/util.vala" - iface->get_read_only = singleton_collection_singleton_iterator_real_get_read_only; -#line 14 "/home/jens/Source/shotwell/src/core/util.vala" - iface->get_valid = singleton_collection_singleton_iterator_real_get_valid; -#line 836 "util.c" -} - - -static void -singleton_collection_singleton_iterator_instance_init (SingletonCollectionSingletonIterator * self) -{ -#line 14 "/home/jens/Source/shotwell/src/core/util.vala" - self->priv = SINGLETON_COLLECTION_SINGLETON_ITERATOR_GET_PRIVATE (self); -#line 16 "/home/jens/Source/shotwell/src/core/util.vala" - self->priv->done = FALSE; -#line 17 "/home/jens/Source/shotwell/src/core/util.vala" - self->priv->current = NULL; -#line 849 "util.c" -} - - -static void -singleton_collection_singleton_iterator_finalize (GObject * obj) -{ - SingletonCollectionSingletonIterator * self; -#line 14 "/home/jens/Source/shotwell/src/core/util.vala" - self = G_TYPE_CHECK_INSTANCE_CAST (obj, SINGLETON_COLLECTION_TYPE_SINGLETON_ITERATOR, SingletonCollectionSingletonIterator); -#line 15 "/home/jens/Source/shotwell/src/core/util.vala" - _g_object_unref0 (self->priv->c); -#line 17 "/home/jens/Source/shotwell/src/core/util.vala" - ((self->priv->current == NULL) || (self->priv->g_destroy_func == NULL)) ? NULL : (self->priv->current = (self->priv->g_destroy_func (self->priv->current), NULL)); -#line 14 "/home/jens/Source/shotwell/src/core/util.vala" - G_OBJECT_CLASS (singleton_collection_singleton_iterator_parent_class)->finalize (obj); -#line 865 "util.c" -} - - -static GType -singleton_collection_singleton_iterator_get_type (void) -{ - static volatile gsize singleton_collection_singleton_iterator_type_id__volatile = 0; - if (g_once_init_enter (&singleton_collection_singleton_iterator_type_id__volatile)) { - static const GTypeInfo g_define_type_info = { sizeof (SingletonCollectionSingletonIteratorClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) singleton_collection_singleton_iterator_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (SingletonCollectionSingletonIterator), 0, (GInstanceInitFunc) singleton_collection_singleton_iterator_instance_init, NULL }; - static const GInterfaceInfo gee_traversable_info = { (GInterfaceInitFunc) singleton_collection_singleton_iterator_gee_traversable_interface_init, (GInterfaceFinalizeFunc) NULL, NULL}; - static const GInterfaceInfo gee_iterator_info = { (GInterfaceInitFunc) singleton_collection_singleton_iterator_gee_iterator_interface_init, (GInterfaceFinalizeFunc) NULL, NULL}; - GType singleton_collection_singleton_iterator_type_id; - singleton_collection_singleton_iterator_type_id = g_type_register_static (G_TYPE_OBJECT, "SingletonCollectionSingletonIterator", &g_define_type_info, 0); - g_type_add_interface_static (singleton_collection_singleton_iterator_type_id, GEE_TYPE_TRAVERSABLE, &gee_traversable_info); - g_type_add_interface_static (singleton_collection_singleton_iterator_type_id, GEE_TYPE_ITERATOR, &gee_iterator_info); - g_once_init_leave (&singleton_collection_singleton_iterator_type_id__volatile, singleton_collection_singleton_iterator_type_id); - } - return singleton_collection_singleton_iterator_type_id__volatile; -} - - -static void -_vala_singleton_collection_singleton_iterator_get_property (GObject * object, - guint property_id, - GValue * value, - GParamSpec * pspec) -{ - SingletonCollectionSingletonIterator * self; - self = G_TYPE_CHECK_INSTANCE_CAST (object, SINGLETON_COLLECTION_TYPE_SINGLETON_ITERATOR, SingletonCollectionSingletonIterator); -#line 14 "/home/jens/Source/shotwell/src/core/util.vala" - switch (property_id) { -#line 14 "/home/jens/Source/shotwell/src/core/util.vala" - case SINGLETON_COLLECTION_SINGLETON_ITERATOR_READ_ONLY_PROPERTY: -#line 14 "/home/jens/Source/shotwell/src/core/util.vala" - g_value_set_boolean (value, gee_iterator_get_read_only (G_TYPE_CHECK_INSTANCE_CAST (self, GEE_TYPE_ITERATOR, GeeIterator))); -#line 14 "/home/jens/Source/shotwell/src/core/util.vala" - break; -#line 14 "/home/jens/Source/shotwell/src/core/util.vala" - case SINGLETON_COLLECTION_SINGLETON_ITERATOR_VALID_PROPERTY: -#line 14 "/home/jens/Source/shotwell/src/core/util.vala" - g_value_set_boolean (value, gee_iterator_get_valid (G_TYPE_CHECK_INSTANCE_CAST (self, GEE_TYPE_ITERATOR, GeeIterator))); -#line 14 "/home/jens/Source/shotwell/src/core/util.vala" - break; -#line 909 "util.c" - default: -#line 14 "/home/jens/Source/shotwell/src/core/util.vala" - G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec); -#line 14 "/home/jens/Source/shotwell/src/core/util.vala" - break; -#line 915 "util.c" - } -} - - -static void -_vala_singleton_collection_singleton_iterator_set_property (GObject * object, - guint property_id, - const GValue * value, - GParamSpec * pspec) -{ - SingletonCollectionSingletonIterator * self; - self = G_TYPE_CHECK_INSTANCE_CAST (object, SINGLETON_COLLECTION_TYPE_SINGLETON_ITERATOR, SingletonCollectionSingletonIterator); -#line 14 "/home/jens/Source/shotwell/src/core/util.vala" - switch (property_id) { -#line 14 "/home/jens/Source/shotwell/src/core/util.vala" - case SINGLETON_COLLECTION_SINGLETON_ITERATOR_G_TYPE: -#line 14 "/home/jens/Source/shotwell/src/core/util.vala" - self->priv->g_type = g_value_get_gtype (value); -#line 14 "/home/jens/Source/shotwell/src/core/util.vala" - break; -#line 14 "/home/jens/Source/shotwell/src/core/util.vala" - case SINGLETON_COLLECTION_SINGLETON_ITERATOR_G_DUP_FUNC: -#line 14 "/home/jens/Source/shotwell/src/core/util.vala" - self->priv->g_dup_func = g_value_get_pointer (value); -#line 14 "/home/jens/Source/shotwell/src/core/util.vala" - break; -#line 14 "/home/jens/Source/shotwell/src/core/util.vala" - case SINGLETON_COLLECTION_SINGLETON_ITERATOR_G_DESTROY_FUNC: -#line 14 "/home/jens/Source/shotwell/src/core/util.vala" - self->priv->g_destroy_func = g_value_get_pointer (value); -#line 14 "/home/jens/Source/shotwell/src/core/util.vala" - break; -#line 948 "util.c" - default: -#line 14 "/home/jens/Source/shotwell/src/core/util.vala" - G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec); -#line 14 "/home/jens/Source/shotwell/src/core/util.vala" - break; -#line 954 "util.c" - } -} - - -static void -singleton_collection_class_init (SingletonCollectionClass * klass) -{ -#line 13 "/home/jens/Source/shotwell/src/core/util.vala" - singleton_collection_parent_class = g_type_class_peek_parent (klass); -#line 13 "/home/jens/Source/shotwell/src/core/util.vala" - g_type_class_add_private (klass, sizeof (SingletonCollectionPrivate)); -#line 13 "/home/jens/Source/shotwell/src/core/util.vala" - ((GeeAbstractCollectionClass *) klass)->add = (gboolean (*) (GeeAbstractCollection *, gconstpointer)) singleton_collection_real_add; -#line 13 "/home/jens/Source/shotwell/src/core/util.vala" - ((GeeAbstractCollectionClass *) klass)->clear = (void (*) (GeeAbstractCollection *)) singleton_collection_real_clear; -#line 13 "/home/jens/Source/shotwell/src/core/util.vala" - ((GeeAbstractCollectionClass *) klass)->contains = (gboolean (*) (GeeAbstractCollection *, gconstpointer)) singleton_collection_real_contains; -#line 13 "/home/jens/Source/shotwell/src/core/util.vala" - ((GeeAbstractCollectionClass *) klass)->iterator = (GeeIterator* (*) (GeeAbstractCollection *)) singleton_collection_real_iterator; -#line 13 "/home/jens/Source/shotwell/src/core/util.vala" - ((GeeAbstractCollectionClass *) klass)->remove = (gboolean (*) (GeeAbstractCollection *, gconstpointer)) singleton_collection_real_remove; -#line 13 "/home/jens/Source/shotwell/src/core/util.vala" - GEE_ABSTRACT_COLLECTION_CLASS (klass)->get_read_only = singleton_collection_real_get_read_only; -#line 13 "/home/jens/Source/shotwell/src/core/util.vala" - GEE_ABSTRACT_COLLECTION_CLASS (klass)->get_size = singleton_collection_real_get_size; -#line 13 "/home/jens/Source/shotwell/src/core/util.vala" - G_OBJECT_CLASS (klass)->get_property = _vala_singleton_collection_get_property; -#line 13 "/home/jens/Source/shotwell/src/core/util.vala" - G_OBJECT_CLASS (klass)->set_property = _vala_singleton_collection_set_property; -#line 13 "/home/jens/Source/shotwell/src/core/util.vala" - G_OBJECT_CLASS (klass)->finalize = singleton_collection_finalize; -#line 13 "/home/jens/Source/shotwell/src/core/util.vala" - g_object_class_install_property (G_OBJECT_CLASS (klass), SINGLETON_COLLECTION_G_TYPE, g_param_spec_gtype ("g-type", "type", "type", G_TYPE_NONE, G_PARAM_STATIC_STRINGS | G_PARAM_WRITABLE | G_PARAM_CONSTRUCT_ONLY)); -#line 13 "/home/jens/Source/shotwell/src/core/util.vala" - g_object_class_install_property (G_OBJECT_CLASS (klass), SINGLETON_COLLECTION_G_DUP_FUNC, g_param_spec_pointer ("g-dup-func", "dup func", "dup func", G_PARAM_STATIC_STRINGS | G_PARAM_WRITABLE | G_PARAM_CONSTRUCT_ONLY)); -#line 13 "/home/jens/Source/shotwell/src/core/util.vala" - g_object_class_install_property (G_OBJECT_CLASS (klass), SINGLETON_COLLECTION_G_DESTROY_FUNC, g_param_spec_pointer ("g-destroy-func", "destroy func", "destroy func", G_PARAM_STATIC_STRINGS | G_PARAM_WRITABLE | G_PARAM_CONSTRUCT_ONLY)); -#line 13 "/home/jens/Source/shotwell/src/core/util.vala" - g_object_class_install_property (G_OBJECT_CLASS (klass), SINGLETON_COLLECTION_READ_ONLY_PROPERTY, singleton_collection_properties[SINGLETON_COLLECTION_READ_ONLY_PROPERTY] = g_param_spec_boolean ("read-only", "read-only", "read-only", FALSE, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE)); -#line 13 "/home/jens/Source/shotwell/src/core/util.vala" - g_object_class_install_property (G_OBJECT_CLASS (klass), SINGLETON_COLLECTION_SIZE_PROPERTY, singleton_collection_properties[SINGLETON_COLLECTION_SIZE_PROPERTY] = g_param_spec_int ("size", "size", "size", G_MININT, G_MAXINT, 0, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE)); -#line 996 "util.c" -} - - -static void -singleton_collection_instance_init (SingletonCollection * self) -{ -#line 13 "/home/jens/Source/shotwell/src/core/util.vala" - self->priv = SINGLETON_COLLECTION_GET_PRIVATE (self); -#line 1005 "util.c" -} - - -static void -singleton_collection_finalize (GObject * obj) -{ - SingletonCollection * self; -#line 13 "/home/jens/Source/shotwell/src/core/util.vala" - self = G_TYPE_CHECK_INSTANCE_CAST (obj, TYPE_SINGLETON_COLLECTION, SingletonCollection); -#line 63 "/home/jens/Source/shotwell/src/core/util.vala" - ((self->priv->object == NULL) || (self->priv->g_destroy_func == NULL)) ? NULL : (self->priv->object = (self->priv->g_destroy_func (self->priv->object), NULL)); -#line 13 "/home/jens/Source/shotwell/src/core/util.vala" - G_OBJECT_CLASS (singleton_collection_parent_class)->finalize (obj); -#line 1019 "util.c" -} - - -GType -singleton_collection_get_type (void) -{ - static volatile gsize singleton_collection_type_id__volatile = 0; - if (g_once_init_enter (&singleton_collection_type_id__volatile)) { - static const GTypeInfo g_define_type_info = { sizeof (SingletonCollectionClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) singleton_collection_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (SingletonCollection), 0, (GInstanceInitFunc) singleton_collection_instance_init, NULL }; - GType singleton_collection_type_id; - singleton_collection_type_id = g_type_register_static (GEE_TYPE_ABSTRACT_COLLECTION, "SingletonCollection", &g_define_type_info, 0); - g_once_init_leave (&singleton_collection_type_id__volatile, singleton_collection_type_id); - } - return singleton_collection_type_id__volatile; -} - - -static void -_vala_singleton_collection_get_property (GObject * object, - guint property_id, - GValue * value, - GParamSpec * pspec) -{ - SingletonCollection * self; - self = G_TYPE_CHECK_INSTANCE_CAST (object, TYPE_SINGLETON_COLLECTION, SingletonCollection); -#line 13 "/home/jens/Source/shotwell/src/core/util.vala" - switch (property_id) { -#line 13 "/home/jens/Source/shotwell/src/core/util.vala" - case SINGLETON_COLLECTION_READ_ONLY_PROPERTY: -#line 13 "/home/jens/Source/shotwell/src/core/util.vala" - g_value_set_boolean (value, gee_abstract_collection_get_read_only (G_TYPE_CHECK_INSTANCE_CAST (self, GEE_TYPE_ABSTRACT_COLLECTION, GeeAbstractCollection))); -#line 13 "/home/jens/Source/shotwell/src/core/util.vala" - break; -#line 13 "/home/jens/Source/shotwell/src/core/util.vala" - case SINGLETON_COLLECTION_SIZE_PROPERTY: -#line 13 "/home/jens/Source/shotwell/src/core/util.vala" - g_value_set_int (value, gee_abstract_collection_get_size (G_TYPE_CHECK_INSTANCE_CAST (self, GEE_TYPE_ABSTRACT_COLLECTION, GeeAbstractCollection))); -#line 13 "/home/jens/Source/shotwell/src/core/util.vala" - break; -#line 1059 "util.c" - default: -#line 13 "/home/jens/Source/shotwell/src/core/util.vala" - G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec); -#line 13 "/home/jens/Source/shotwell/src/core/util.vala" - break; -#line 1065 "util.c" - } -} - - -static void -_vala_singleton_collection_set_property (GObject * object, - guint property_id, - const GValue * value, - GParamSpec * pspec) -{ - SingletonCollection * self; - self = G_TYPE_CHECK_INSTANCE_CAST (object, TYPE_SINGLETON_COLLECTION, SingletonCollection); -#line 13 "/home/jens/Source/shotwell/src/core/util.vala" - switch (property_id) { -#line 13 "/home/jens/Source/shotwell/src/core/util.vala" - case SINGLETON_COLLECTION_G_TYPE: -#line 13 "/home/jens/Source/shotwell/src/core/util.vala" - self->priv->g_type = g_value_get_gtype (value); -#line 13 "/home/jens/Source/shotwell/src/core/util.vala" - break; -#line 13 "/home/jens/Source/shotwell/src/core/util.vala" - case SINGLETON_COLLECTION_G_DUP_FUNC: -#line 13 "/home/jens/Source/shotwell/src/core/util.vala" - self->priv->g_dup_func = g_value_get_pointer (value); -#line 13 "/home/jens/Source/shotwell/src/core/util.vala" - break; -#line 13 "/home/jens/Source/shotwell/src/core/util.vala" - case SINGLETON_COLLECTION_G_DESTROY_FUNC: -#line 13 "/home/jens/Source/shotwell/src/core/util.vala" - self->priv->g_destroy_func = g_value_get_pointer (value); -#line 13 "/home/jens/Source/shotwell/src/core/util.vala" - break; -#line 1098 "util.c" - default: -#line 13 "/home/jens/Source/shotwell/src/core/util.vala" - G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec); -#line 13 "/home/jens/Source/shotwell/src/core/util.vala" - break; -#line 1104 "util.c" - } -} - - -void -marker_mark (Marker* self, - DataObject* object) -{ -#line 113 "/home/jens/Source/shotwell/src/core/util.vala" - g_return_if_fail (IS_MARKER (self)); -#line 113 "/home/jens/Source/shotwell/src/core/util.vala" - MARKER_GET_INTERFACE (self)->mark (self, object); -#line 1117 "util.c" -} - - -void -marker_unmark (Marker* self, - DataObject* object) -{ -#line 115 "/home/jens/Source/shotwell/src/core/util.vala" - g_return_if_fail (IS_MARKER (self)); -#line 115 "/home/jens/Source/shotwell/src/core/util.vala" - MARKER_GET_INTERFACE (self)->unmark (self, object); -#line 1129 "util.c" -} - - -gboolean -marker_toggle (Marker* self, - DataObject* object) -{ -#line 117 "/home/jens/Source/shotwell/src/core/util.vala" - g_return_val_if_fail (IS_MARKER (self), FALSE); -#line 117 "/home/jens/Source/shotwell/src/core/util.vala" - return MARKER_GET_INTERFACE (self)->toggle (self, object); -#line 1141 "util.c" -} - - -void -marker_mark_many (Marker* self, - GeeCollection* list) -{ -#line 119 "/home/jens/Source/shotwell/src/core/util.vala" - g_return_if_fail (IS_MARKER (self)); -#line 119 "/home/jens/Source/shotwell/src/core/util.vala" - MARKER_GET_INTERFACE (self)->mark_many (self, list); -#line 1153 "util.c" -} - - -void -marker_unmark_many (Marker* self, - GeeCollection* list) -{ -#line 121 "/home/jens/Source/shotwell/src/core/util.vala" - g_return_if_fail (IS_MARKER (self)); -#line 121 "/home/jens/Source/shotwell/src/core/util.vala" - MARKER_GET_INTERFACE (self)->unmark_many (self, list); -#line 1165 "util.c" -} - - -void -marker_mark_all (Marker* self) -{ -#line 123 "/home/jens/Source/shotwell/src/core/util.vala" - g_return_if_fail (IS_MARKER (self)); -#line 123 "/home/jens/Source/shotwell/src/core/util.vala" - MARKER_GET_INTERFACE (self)->mark_all (self); -#line 1176 "util.c" -} - - -gint -marker_get_count (Marker* self) -{ -#line 127 "/home/jens/Source/shotwell/src/core/util.vala" - g_return_val_if_fail (IS_MARKER (self), 0); -#line 127 "/home/jens/Source/shotwell/src/core/util.vala" - return MARKER_GET_INTERFACE (self)->get_count (self); -#line 1187 "util.c" -} - - -GeeCollection* -marker_get_all (Marker* self) -{ -#line 130 "/home/jens/Source/shotwell/src/core/util.vala" - g_return_val_if_fail (IS_MARKER (self), NULL); -#line 130 "/home/jens/Source/shotwell/src/core/util.vala" - return MARKER_GET_INTERFACE (self)->get_all (self); -#line 1198 "util.c" -} - - -static void -marker_base_init (MarkerIface * iface) -{ -#line 112 "/home/jens/Source/shotwell/src/core/util.vala" - static gboolean initialized = FALSE; -#line 112 "/home/jens/Source/shotwell/src/core/util.vala" - if (!initialized) { -#line 112 "/home/jens/Source/shotwell/src/core/util.vala" - initialized = TRUE; -#line 1211 "util.c" - } -} - - -GType -marker_get_type (void) -{ - static volatile gsize marker_type_id__volatile = 0; - if (g_once_init_enter (&marker_type_id__volatile)) { - static const GTypeInfo g_define_type_info = { sizeof (MarkerIface), (GBaseInitFunc) marker_base_init, (GBaseFinalizeFunc) NULL, (GClassInitFunc) NULL, (GClassFinalizeFunc) NULL, NULL, 0, 0, (GInstanceInitFunc) NULL, NULL }; - GType marker_type_id; - marker_type_id = g_type_register_static (G_TYPE_INTERFACE, "Marker", &g_define_type_info, 0); - g_type_interface_add_prerequisite (marker_type_id, G_TYPE_OBJECT); - g_once_init_leave (&marker_type_id__volatile, marker_type_id); - } - return marker_type_id__volatile; -} - - -UnknownTotalMonitor* -unknown_total_monitor_construct (GType object_type, - guint64 total, - ProgressMonitor wrapped_monitor, - void* wrapped_monitor_target) -{ - UnknownTotalMonitor* self = NULL; -#line 147 "/home/jens/Source/shotwell/src/core/util.vala" - self = (UnknownTotalMonitor*) g_type_create_instance (object_type); -#line 148 "/home/jens/Source/shotwell/src/core/util.vala" - self->priv->total = total; -#line 149 "/home/jens/Source/shotwell/src/core/util.vala" - self->priv->wrapped_monitor = wrapped_monitor; -#line 149 "/home/jens/Source/shotwell/src/core/util.vala" - self->priv->wrapped_monitor_target = wrapped_monitor_target; -#line 147 "/home/jens/Source/shotwell/src/core/util.vala" - return self; -#line 1248 "util.c" -} - - -UnknownTotalMonitor* -unknown_total_monitor_new (guint64 total, - ProgressMonitor wrapped_monitor, - void* wrapped_monitor_target) -{ -#line 147 "/home/jens/Source/shotwell/src/core/util.vala" - return unknown_total_monitor_construct (TYPE_UNKNOWN_TOTAL_MONITOR, total, wrapped_monitor, wrapped_monitor_target); -#line 1259 "util.c" -} - - -gboolean -unknown_total_monitor_monitor (UnknownTotalMonitor* self, - guint64 count, - guint64 total) -{ - gboolean result = FALSE; - ProgressMonitor _tmp0_; - void* _tmp0__target; - guint64 _tmp1_; -#line 152 "/home/jens/Source/shotwell/src/core/util.vala" - g_return_val_if_fail (IS_UNKNOWN_TOTAL_MONITOR (self), FALSE); -#line 153 "/home/jens/Source/shotwell/src/core/util.vala" - _tmp0_ = self->priv->wrapped_monitor; -#line 153 "/home/jens/Source/shotwell/src/core/util.vala" - _tmp0__target = self->priv->wrapped_monitor_target; -#line 153 "/home/jens/Source/shotwell/src/core/util.vala" - _tmp1_ = self->priv->total; -#line 153 "/home/jens/Source/shotwell/src/core/util.vala" - result = _tmp0_ (count, _tmp1_, TRUE, _tmp0__target); -#line 153 "/home/jens/Source/shotwell/src/core/util.vala" - return result; -#line 1284 "util.c" -} - - -static void -value_unknown_total_monitor_init (GValue* value) -{ -#line 143 "/home/jens/Source/shotwell/src/core/util.vala" - value->data[0].v_pointer = NULL; -#line 1293 "util.c" -} - - -static void -value_unknown_total_monitor_free_value (GValue* value) -{ -#line 143 "/home/jens/Source/shotwell/src/core/util.vala" - if (value->data[0].v_pointer) { -#line 143 "/home/jens/Source/shotwell/src/core/util.vala" - unknown_total_monitor_unref (value->data[0].v_pointer); -#line 1304 "util.c" - } -} - - -static void -value_unknown_total_monitor_copy_value (const GValue* src_value, - GValue* dest_value) -{ -#line 143 "/home/jens/Source/shotwell/src/core/util.vala" - if (src_value->data[0].v_pointer) { -#line 143 "/home/jens/Source/shotwell/src/core/util.vala" - dest_value->data[0].v_pointer = unknown_total_monitor_ref (src_value->data[0].v_pointer); -#line 1317 "util.c" - } else { -#line 143 "/home/jens/Source/shotwell/src/core/util.vala" - dest_value->data[0].v_pointer = NULL; -#line 1321 "util.c" - } -} - - -static gpointer -value_unknown_total_monitor_peek_pointer (const GValue* value) -{ -#line 143 "/home/jens/Source/shotwell/src/core/util.vala" - return value->data[0].v_pointer; -#line 1331 "util.c" -} - - -static gchar* -value_unknown_total_monitor_collect_value (GValue* value, - guint n_collect_values, - GTypeCValue* collect_values, - guint collect_flags) -{ -#line 143 "/home/jens/Source/shotwell/src/core/util.vala" - if (collect_values[0].v_pointer) { -#line 1343 "util.c" - UnknownTotalMonitor * object; - object = collect_values[0].v_pointer; -#line 143 "/home/jens/Source/shotwell/src/core/util.vala" - if (object->parent_instance.g_class == NULL) { -#line 143 "/home/jens/Source/shotwell/src/core/util.vala" - return g_strconcat ("invalid unclassed object pointer for value type `", G_VALUE_TYPE_NAME (value), "'", NULL); -#line 1350 "util.c" - } else if (!g_value_type_compatible (G_TYPE_FROM_INSTANCE (object), G_VALUE_TYPE (value))) { -#line 143 "/home/jens/Source/shotwell/src/core/util.vala" - return g_strconcat ("invalid object type `", g_type_name (G_TYPE_FROM_INSTANCE (object)), "' for value type `", G_VALUE_TYPE_NAME (value), "'", NULL); -#line 1354 "util.c" - } -#line 143 "/home/jens/Source/shotwell/src/core/util.vala" - value->data[0].v_pointer = unknown_total_monitor_ref (object); -#line 1358 "util.c" - } else { -#line 143 "/home/jens/Source/shotwell/src/core/util.vala" - value->data[0].v_pointer = NULL; -#line 1362 "util.c" - } -#line 143 "/home/jens/Source/shotwell/src/core/util.vala" - return NULL; -#line 1366 "util.c" -} - - -static gchar* -value_unknown_total_monitor_lcopy_value (const GValue* value, - guint n_collect_values, - GTypeCValue* collect_values, - guint collect_flags) -{ - UnknownTotalMonitor ** object_p; - object_p = collect_values[0].v_pointer; -#line 143 "/home/jens/Source/shotwell/src/core/util.vala" - if (!object_p) { -#line 143 "/home/jens/Source/shotwell/src/core/util.vala" - return g_strdup_printf ("value location for `%s' passed as NULL", G_VALUE_TYPE_NAME (value)); -#line 1382 "util.c" - } -#line 143 "/home/jens/Source/shotwell/src/core/util.vala" - if (!value->data[0].v_pointer) { -#line 143 "/home/jens/Source/shotwell/src/core/util.vala" - *object_p = NULL; -#line 1388 "util.c" - } else if (collect_flags & G_VALUE_NOCOPY_CONTENTS) { -#line 143 "/home/jens/Source/shotwell/src/core/util.vala" - *object_p = value->data[0].v_pointer; -#line 1392 "util.c" - } else { -#line 143 "/home/jens/Source/shotwell/src/core/util.vala" - *object_p = unknown_total_monitor_ref (value->data[0].v_pointer); -#line 1396 "util.c" - } -#line 143 "/home/jens/Source/shotwell/src/core/util.vala" - return NULL; -#line 1400 "util.c" -} - - -GParamSpec* -param_spec_unknown_total_monitor (const gchar* name, - const gchar* nick, - const gchar* blurb, - GType object_type, - GParamFlags flags) -{ - ParamSpecUnknownTotalMonitor* spec; -#line 143 "/home/jens/Source/shotwell/src/core/util.vala" - g_return_val_if_fail (g_type_is_a (object_type, TYPE_UNKNOWN_TOTAL_MONITOR), NULL); -#line 143 "/home/jens/Source/shotwell/src/core/util.vala" - spec = g_param_spec_internal (G_TYPE_PARAM_OBJECT, name, nick, blurb, flags); -#line 143 "/home/jens/Source/shotwell/src/core/util.vala" - G_PARAM_SPEC (spec)->value_type = object_type; -#line 143 "/home/jens/Source/shotwell/src/core/util.vala" - return G_PARAM_SPEC (spec); -#line 1420 "util.c" -} - - -gpointer -value_get_unknown_total_monitor (const GValue* value) -{ -#line 143 "/home/jens/Source/shotwell/src/core/util.vala" - g_return_val_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, TYPE_UNKNOWN_TOTAL_MONITOR), NULL); -#line 143 "/home/jens/Source/shotwell/src/core/util.vala" - return value->data[0].v_pointer; -#line 1431 "util.c" -} - - -void -value_set_unknown_total_monitor (GValue* value, - gpointer v_object) -{ - UnknownTotalMonitor * old; -#line 143 "/home/jens/Source/shotwell/src/core/util.vala" - g_return_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, TYPE_UNKNOWN_TOTAL_MONITOR)); -#line 143 "/home/jens/Source/shotwell/src/core/util.vala" - old = value->data[0].v_pointer; -#line 143 "/home/jens/Source/shotwell/src/core/util.vala" - if (v_object) { -#line 143 "/home/jens/Source/shotwell/src/core/util.vala" - g_return_if_fail (G_TYPE_CHECK_INSTANCE_TYPE (v_object, TYPE_UNKNOWN_TOTAL_MONITOR)); -#line 143 "/home/jens/Source/shotwell/src/core/util.vala" - g_return_if_fail (g_value_type_compatible (G_TYPE_FROM_INSTANCE (v_object), G_VALUE_TYPE (value))); -#line 143 "/home/jens/Source/shotwell/src/core/util.vala" - value->data[0].v_pointer = v_object; -#line 143 "/home/jens/Source/shotwell/src/core/util.vala" - unknown_total_monitor_ref (value->data[0].v_pointer); -#line 1454 "util.c" - } else { -#line 143 "/home/jens/Source/shotwell/src/core/util.vala" - value->data[0].v_pointer = NULL; -#line 1458 "util.c" - } -#line 143 "/home/jens/Source/shotwell/src/core/util.vala" - if (old) { -#line 143 "/home/jens/Source/shotwell/src/core/util.vala" - unknown_total_monitor_unref (old); -#line 1464 "util.c" - } -} - - -void -value_take_unknown_total_monitor (GValue* value, - gpointer v_object) -{ - UnknownTotalMonitor * old; -#line 143 "/home/jens/Source/shotwell/src/core/util.vala" - g_return_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, TYPE_UNKNOWN_TOTAL_MONITOR)); -#line 143 "/home/jens/Source/shotwell/src/core/util.vala" - old = value->data[0].v_pointer; -#line 143 "/home/jens/Source/shotwell/src/core/util.vala" - if (v_object) { -#line 143 "/home/jens/Source/shotwell/src/core/util.vala" - g_return_if_fail (G_TYPE_CHECK_INSTANCE_TYPE (v_object, TYPE_UNKNOWN_TOTAL_MONITOR)); -#line 143 "/home/jens/Source/shotwell/src/core/util.vala" - g_return_if_fail (g_value_type_compatible (G_TYPE_FROM_INSTANCE (v_object), G_VALUE_TYPE (value))); -#line 143 "/home/jens/Source/shotwell/src/core/util.vala" - value->data[0].v_pointer = v_object; -#line 1486 "util.c" - } else { -#line 143 "/home/jens/Source/shotwell/src/core/util.vala" - value->data[0].v_pointer = NULL; -#line 1490 "util.c" - } -#line 143 "/home/jens/Source/shotwell/src/core/util.vala" - if (old) { -#line 143 "/home/jens/Source/shotwell/src/core/util.vala" - unknown_total_monitor_unref (old); -#line 1496 "util.c" - } -} - - -static void -unknown_total_monitor_class_init (UnknownTotalMonitorClass * klass) -{ -#line 143 "/home/jens/Source/shotwell/src/core/util.vala" - unknown_total_monitor_parent_class = g_type_class_peek_parent (klass); -#line 143 "/home/jens/Source/shotwell/src/core/util.vala" - ((UnknownTotalMonitorClass *) klass)->finalize = unknown_total_monitor_finalize; -#line 143 "/home/jens/Source/shotwell/src/core/util.vala" - g_type_class_add_private (klass, sizeof (UnknownTotalMonitorPrivate)); -#line 1510 "util.c" -} - - -static void -unknown_total_monitor_instance_init (UnknownTotalMonitor * self) -{ -#line 143 "/home/jens/Source/shotwell/src/core/util.vala" - self->priv = UNKNOWN_TOTAL_MONITOR_GET_PRIVATE (self); -#line 143 "/home/jens/Source/shotwell/src/core/util.vala" - self->ref_count = 1; -#line 1521 "util.c" -} - - -static void -unknown_total_monitor_finalize (UnknownTotalMonitor * obj) -{ - UnknownTotalMonitor * self; -#line 143 "/home/jens/Source/shotwell/src/core/util.vala" - self = G_TYPE_CHECK_INSTANCE_CAST (obj, TYPE_UNKNOWN_TOTAL_MONITOR, UnknownTotalMonitor); -#line 143 "/home/jens/Source/shotwell/src/core/util.vala" - g_signal_handlers_destroy (self); -#line 1533 "util.c" -} - - -GType -unknown_total_monitor_get_type (void) -{ - static volatile gsize unknown_total_monitor_type_id__volatile = 0; - if (g_once_init_enter (&unknown_total_monitor_type_id__volatile)) { - static const GTypeValueTable g_define_type_value_table = { value_unknown_total_monitor_init, value_unknown_total_monitor_free_value, value_unknown_total_monitor_copy_value, value_unknown_total_monitor_peek_pointer, "p", value_unknown_total_monitor_collect_value, "p", value_unknown_total_monitor_lcopy_value }; - static const GTypeInfo g_define_type_info = { sizeof (UnknownTotalMonitorClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) unknown_total_monitor_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (UnknownTotalMonitor), 0, (GInstanceInitFunc) unknown_total_monitor_instance_init, &g_define_type_value_table }; - static const GTypeFundamentalInfo g_define_type_fundamental_info = { (G_TYPE_FLAG_CLASSED | G_TYPE_FLAG_INSTANTIATABLE | G_TYPE_FLAG_DERIVABLE | G_TYPE_FLAG_DEEP_DERIVABLE) }; - GType unknown_total_monitor_type_id; - unknown_total_monitor_type_id = g_type_register_fundamental (g_type_fundamental_next (), "UnknownTotalMonitor", &g_define_type_info, &g_define_type_fundamental_info, 0); - g_once_init_leave (&unknown_total_monitor_type_id__volatile, unknown_total_monitor_type_id); - } - return unknown_total_monitor_type_id__volatile; -} - - -gpointer -unknown_total_monitor_ref (gpointer instance) -{ - UnknownTotalMonitor * self; - self = instance; -#line 143 "/home/jens/Source/shotwell/src/core/util.vala" - g_atomic_int_inc (&self->ref_count); -#line 143 "/home/jens/Source/shotwell/src/core/util.vala" - return instance; -#line 1562 "util.c" -} - - -void -unknown_total_monitor_unref (gpointer instance) -{ - UnknownTotalMonitor * self; - self = instance; -#line 143 "/home/jens/Source/shotwell/src/core/util.vala" - if (g_atomic_int_dec_and_test (&self->ref_count)) { -#line 143 "/home/jens/Source/shotwell/src/core/util.vala" - UNKNOWN_TOTAL_MONITOR_GET_CLASS (self)->finalize (self); -#line 143 "/home/jens/Source/shotwell/src/core/util.vala" - g_type_free_instance ((GTypeInstance *) self); -#line 1577 "util.c" - } -} - - -AggregateProgressMonitor* -aggregate_progress_monitor_construct (GType object_type, - guint64 grand_total, - ProgressMonitor wrapped_monitor, - void* wrapped_monitor_target) -{ - AggregateProgressMonitor* self = NULL; -#line 165 "/home/jens/Source/shotwell/src/core/util.vala" - self = (AggregateProgressMonitor*) g_type_create_instance (object_type); -#line 166 "/home/jens/Source/shotwell/src/core/util.vala" - self->priv->grand_total = grand_total; -#line 167 "/home/jens/Source/shotwell/src/core/util.vala" - self->priv->wrapped_monitor = wrapped_monitor; -#line 167 "/home/jens/Source/shotwell/src/core/util.vala" - self->priv->wrapped_monitor_target = wrapped_monitor_target; -#line 165 "/home/jens/Source/shotwell/src/core/util.vala" - return self; -#line 1599 "util.c" -} - - -AggregateProgressMonitor* -aggregate_progress_monitor_new (guint64 grand_total, - ProgressMonitor wrapped_monitor, - void* wrapped_monitor_target) -{ -#line 165 "/home/jens/Source/shotwell/src/core/util.vala" - return aggregate_progress_monitor_construct (TYPE_AGGREGATE_PROGRESS_MONITOR, grand_total, wrapped_monitor, wrapped_monitor_target); -#line 1610 "util.c" -} - - -void -aggregate_progress_monitor_next_step (AggregateProgressMonitor* self, - const gchar* name) -{ - guint64 _tmp0_; - gchar* _tmp1_; - gchar* _tmp2_; - guint64 _tmp3_; - gchar* _tmp4_; - gchar* _tmp5_; -#line 170 "/home/jens/Source/shotwell/src/core/util.vala" - g_return_if_fail (IS_AGGREGATE_PROGRESS_MONITOR (self)); -#line 170 "/home/jens/Source/shotwell/src/core/util.vala" - g_return_if_fail (name != NULL); -#line 171 "/home/jens/Source/shotwell/src/core/util.vala" - _tmp0_ = self->priv->aggregate_count; -#line 171 "/home/jens/Source/shotwell/src/core/util.vala" - _tmp1_ = g_strdup_printf ("%" G_GUINT64_FORMAT, _tmp0_); -#line 171 "/home/jens/Source/shotwell/src/core/util.vala" - _tmp2_ = _tmp1_; -#line 171 "/home/jens/Source/shotwell/src/core/util.vala" - _tmp3_ = self->priv->grand_total; -#line 171 "/home/jens/Source/shotwell/src/core/util.vala" - _tmp4_ = g_strdup_printf ("%" G_GUINT64_FORMAT, _tmp3_); -#line 171 "/home/jens/Source/shotwell/src/core/util.vala" - _tmp5_ = _tmp4_; -#line 171 "/home/jens/Source/shotwell/src/core/util.vala" - g_debug ("util.vala:171: next step: %s (%s/%s)", name, _tmp2_, _tmp5_); -#line 171 "/home/jens/Source/shotwell/src/core/util.vala" - _g_free0 (_tmp5_); -#line 171 "/home/jens/Source/shotwell/src/core/util.vala" - _g_free0 (_tmp2_); -#line 172 "/home/jens/Source/shotwell/src/core/util.vala" - self->priv->last_count = G_MAXUINT64; -#line 1648 "util.c" -} - - -gboolean -aggregate_progress_monitor_monitor (AggregateProgressMonitor* self, - guint64 count, - guint64 total) -{ - gboolean result = FALSE; - guint64 _tmp0_ = 0ULL; - guint64 _tmp1_; - guint64 _tmp3_; - guint64 _tmp4_; - guint64 _tmp5_; - ProgressMonitor _tmp7_; - void* _tmp7__target; - guint64 _tmp8_; - guint64 _tmp9_; -#line 175 "/home/jens/Source/shotwell/src/core/util.vala" - g_return_val_if_fail (IS_AGGREGATE_PROGRESS_MONITOR (self), FALSE); -#line 177 "/home/jens/Source/shotwell/src/core/util.vala" - _tmp1_ = self->priv->last_count; -#line 177 "/home/jens/Source/shotwell/src/core/util.vala" - if (_tmp1_ != G_MAXUINT64) { -#line 1673 "util.c" - guint64 _tmp2_; -#line 177 "/home/jens/Source/shotwell/src/core/util.vala" - _tmp2_ = self->priv->last_count; -#line 177 "/home/jens/Source/shotwell/src/core/util.vala" - _tmp0_ = count - _tmp2_; -#line 1679 "util.c" - } else { -#line 177 "/home/jens/Source/shotwell/src/core/util.vala" - _tmp0_ = count; -#line 1683 "util.c" - } -#line 177 "/home/jens/Source/shotwell/src/core/util.vala" - _tmp3_ = self->priv->aggregate_count; -#line 177 "/home/jens/Source/shotwell/src/core/util.vala" - self->priv->aggregate_count = _tmp3_ + _tmp0_; -#line 178 "/home/jens/Source/shotwell/src/core/util.vala" - _tmp4_ = self->priv->aggregate_count; -#line 178 "/home/jens/Source/shotwell/src/core/util.vala" - _tmp5_ = self->priv->grand_total; -#line 178 "/home/jens/Source/shotwell/src/core/util.vala" - if (_tmp4_ > _tmp5_) { -#line 1695 "util.c" - guint64 _tmp6_; -#line 179 "/home/jens/Source/shotwell/src/core/util.vala" - _tmp6_ = self->priv->grand_total; -#line 179 "/home/jens/Source/shotwell/src/core/util.vala" - self->priv->aggregate_count = _tmp6_; -#line 1701 "util.c" - } -#line 182 "/home/jens/Source/shotwell/src/core/util.vala" - self->priv->last_count = count; -#line 184 "/home/jens/Source/shotwell/src/core/util.vala" - _tmp7_ = self->priv->wrapped_monitor; -#line 184 "/home/jens/Source/shotwell/src/core/util.vala" - _tmp7__target = self->priv->wrapped_monitor_target; -#line 184 "/home/jens/Source/shotwell/src/core/util.vala" - _tmp8_ = self->priv->aggregate_count; -#line 184 "/home/jens/Source/shotwell/src/core/util.vala" - _tmp9_ = self->priv->grand_total; -#line 184 "/home/jens/Source/shotwell/src/core/util.vala" - result = _tmp7_ (_tmp8_, _tmp9_, TRUE, _tmp7__target); -#line 184 "/home/jens/Source/shotwell/src/core/util.vala" - return result; -#line 1717 "util.c" -} - - -static void -value_aggregate_progress_monitor_init (GValue* value) -{ -#line 159 "/home/jens/Source/shotwell/src/core/util.vala" - value->data[0].v_pointer = NULL; -#line 1726 "util.c" -} - - -static void -value_aggregate_progress_monitor_free_value (GValue* value) -{ -#line 159 "/home/jens/Source/shotwell/src/core/util.vala" - if (value->data[0].v_pointer) { -#line 159 "/home/jens/Source/shotwell/src/core/util.vala" - aggregate_progress_monitor_unref (value->data[0].v_pointer); -#line 1737 "util.c" - } -} - - -static void -value_aggregate_progress_monitor_copy_value (const GValue* src_value, - GValue* dest_value) -{ -#line 159 "/home/jens/Source/shotwell/src/core/util.vala" - if (src_value->data[0].v_pointer) { -#line 159 "/home/jens/Source/shotwell/src/core/util.vala" - dest_value->data[0].v_pointer = aggregate_progress_monitor_ref (src_value->data[0].v_pointer); -#line 1750 "util.c" - } else { -#line 159 "/home/jens/Source/shotwell/src/core/util.vala" - dest_value->data[0].v_pointer = NULL; -#line 1754 "util.c" - } -} - - -static gpointer -value_aggregate_progress_monitor_peek_pointer (const GValue* value) -{ -#line 159 "/home/jens/Source/shotwell/src/core/util.vala" - return value->data[0].v_pointer; -#line 1764 "util.c" -} - - -static gchar* -value_aggregate_progress_monitor_collect_value (GValue* value, - guint n_collect_values, - GTypeCValue* collect_values, - guint collect_flags) -{ -#line 159 "/home/jens/Source/shotwell/src/core/util.vala" - if (collect_values[0].v_pointer) { -#line 1776 "util.c" - AggregateProgressMonitor * object; - object = collect_values[0].v_pointer; -#line 159 "/home/jens/Source/shotwell/src/core/util.vala" - if (object->parent_instance.g_class == NULL) { -#line 159 "/home/jens/Source/shotwell/src/core/util.vala" - return g_strconcat ("invalid unclassed object pointer for value type `", G_VALUE_TYPE_NAME (value), "'", NULL); -#line 1783 "util.c" - } else if (!g_value_type_compatible (G_TYPE_FROM_INSTANCE (object), G_VALUE_TYPE (value))) { -#line 159 "/home/jens/Source/shotwell/src/core/util.vala" - return g_strconcat ("invalid object type `", g_type_name (G_TYPE_FROM_INSTANCE (object)), "' for value type `", G_VALUE_TYPE_NAME (value), "'", NULL); -#line 1787 "util.c" - } -#line 159 "/home/jens/Source/shotwell/src/core/util.vala" - value->data[0].v_pointer = aggregate_progress_monitor_ref (object); -#line 1791 "util.c" - } else { -#line 159 "/home/jens/Source/shotwell/src/core/util.vala" - value->data[0].v_pointer = NULL; -#line 1795 "util.c" - } -#line 159 "/home/jens/Source/shotwell/src/core/util.vala" - return NULL; -#line 1799 "util.c" -} - - -static gchar* -value_aggregate_progress_monitor_lcopy_value (const GValue* value, - guint n_collect_values, - GTypeCValue* collect_values, - guint collect_flags) -{ - AggregateProgressMonitor ** object_p; - object_p = collect_values[0].v_pointer; -#line 159 "/home/jens/Source/shotwell/src/core/util.vala" - if (!object_p) { -#line 159 "/home/jens/Source/shotwell/src/core/util.vala" - return g_strdup_printf ("value location for `%s' passed as NULL", G_VALUE_TYPE_NAME (value)); -#line 1815 "util.c" - } -#line 159 "/home/jens/Source/shotwell/src/core/util.vala" - if (!value->data[0].v_pointer) { -#line 159 "/home/jens/Source/shotwell/src/core/util.vala" - *object_p = NULL; -#line 1821 "util.c" - } else if (collect_flags & G_VALUE_NOCOPY_CONTENTS) { -#line 159 "/home/jens/Source/shotwell/src/core/util.vala" - *object_p = value->data[0].v_pointer; -#line 1825 "util.c" - } else { -#line 159 "/home/jens/Source/shotwell/src/core/util.vala" - *object_p = aggregate_progress_monitor_ref (value->data[0].v_pointer); -#line 1829 "util.c" - } -#line 159 "/home/jens/Source/shotwell/src/core/util.vala" - return NULL; -#line 1833 "util.c" -} - - -GParamSpec* -param_spec_aggregate_progress_monitor (const gchar* name, - const gchar* nick, - const gchar* blurb, - GType object_type, - GParamFlags flags) -{ - ParamSpecAggregateProgressMonitor* spec; -#line 159 "/home/jens/Source/shotwell/src/core/util.vala" - g_return_val_if_fail (g_type_is_a (object_type, TYPE_AGGREGATE_PROGRESS_MONITOR), NULL); -#line 159 "/home/jens/Source/shotwell/src/core/util.vala" - spec = g_param_spec_internal (G_TYPE_PARAM_OBJECT, name, nick, blurb, flags); -#line 159 "/home/jens/Source/shotwell/src/core/util.vala" - G_PARAM_SPEC (spec)->value_type = object_type; -#line 159 "/home/jens/Source/shotwell/src/core/util.vala" - return G_PARAM_SPEC (spec); -#line 1853 "util.c" -} - - -gpointer -value_get_aggregate_progress_monitor (const GValue* value) -{ -#line 159 "/home/jens/Source/shotwell/src/core/util.vala" - g_return_val_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, TYPE_AGGREGATE_PROGRESS_MONITOR), NULL); -#line 159 "/home/jens/Source/shotwell/src/core/util.vala" - return value->data[0].v_pointer; -#line 1864 "util.c" -} - - -void -value_set_aggregate_progress_monitor (GValue* value, - gpointer v_object) -{ - AggregateProgressMonitor * old; -#line 159 "/home/jens/Source/shotwell/src/core/util.vala" - g_return_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, TYPE_AGGREGATE_PROGRESS_MONITOR)); -#line 159 "/home/jens/Source/shotwell/src/core/util.vala" - old = value->data[0].v_pointer; -#line 159 "/home/jens/Source/shotwell/src/core/util.vala" - if (v_object) { -#line 159 "/home/jens/Source/shotwell/src/core/util.vala" - g_return_if_fail (G_TYPE_CHECK_INSTANCE_TYPE (v_object, TYPE_AGGREGATE_PROGRESS_MONITOR)); -#line 159 "/home/jens/Source/shotwell/src/core/util.vala" - g_return_if_fail (g_value_type_compatible (G_TYPE_FROM_INSTANCE (v_object), G_VALUE_TYPE (value))); -#line 159 "/home/jens/Source/shotwell/src/core/util.vala" - value->data[0].v_pointer = v_object; -#line 159 "/home/jens/Source/shotwell/src/core/util.vala" - aggregate_progress_monitor_ref (value->data[0].v_pointer); -#line 1887 "util.c" - } else { -#line 159 "/home/jens/Source/shotwell/src/core/util.vala" - value->data[0].v_pointer = NULL; -#line 1891 "util.c" - } -#line 159 "/home/jens/Source/shotwell/src/core/util.vala" - if (old) { -#line 159 "/home/jens/Source/shotwell/src/core/util.vala" - aggregate_progress_monitor_unref (old); -#line 1897 "util.c" - } -} - - -void -value_take_aggregate_progress_monitor (GValue* value, - gpointer v_object) -{ - AggregateProgressMonitor * old; -#line 159 "/home/jens/Source/shotwell/src/core/util.vala" - g_return_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, TYPE_AGGREGATE_PROGRESS_MONITOR)); -#line 159 "/home/jens/Source/shotwell/src/core/util.vala" - old = value->data[0].v_pointer; -#line 159 "/home/jens/Source/shotwell/src/core/util.vala" - if (v_object) { -#line 159 "/home/jens/Source/shotwell/src/core/util.vala" - g_return_if_fail (G_TYPE_CHECK_INSTANCE_TYPE (v_object, TYPE_AGGREGATE_PROGRESS_MONITOR)); -#line 159 "/home/jens/Source/shotwell/src/core/util.vala" - g_return_if_fail (g_value_type_compatible (G_TYPE_FROM_INSTANCE (v_object), G_VALUE_TYPE (value))); -#line 159 "/home/jens/Source/shotwell/src/core/util.vala" - value->data[0].v_pointer = v_object; -#line 1919 "util.c" - } else { -#line 159 "/home/jens/Source/shotwell/src/core/util.vala" - value->data[0].v_pointer = NULL; -#line 1923 "util.c" - } -#line 159 "/home/jens/Source/shotwell/src/core/util.vala" - if (old) { -#line 159 "/home/jens/Source/shotwell/src/core/util.vala" - aggregate_progress_monitor_unref (old); -#line 1929 "util.c" - } -} - - -static void -aggregate_progress_monitor_class_init (AggregateProgressMonitorClass * klass) -{ -#line 159 "/home/jens/Source/shotwell/src/core/util.vala" - aggregate_progress_monitor_parent_class = g_type_class_peek_parent (klass); -#line 159 "/home/jens/Source/shotwell/src/core/util.vala" - ((AggregateProgressMonitorClass *) klass)->finalize = aggregate_progress_monitor_finalize; -#line 159 "/home/jens/Source/shotwell/src/core/util.vala" - g_type_class_add_private (klass, sizeof (AggregateProgressMonitorPrivate)); -#line 1943 "util.c" -} - - -static void -aggregate_progress_monitor_instance_init (AggregateProgressMonitor * self) -{ -#line 159 "/home/jens/Source/shotwell/src/core/util.vala" - self->priv = AGGREGATE_PROGRESS_MONITOR_GET_PRIVATE (self); -#line 162 "/home/jens/Source/shotwell/src/core/util.vala" - self->priv->aggregate_count = (guint64) 0; -#line 163 "/home/jens/Source/shotwell/src/core/util.vala" - self->priv->last_count = G_MAXUINT64; -#line 159 "/home/jens/Source/shotwell/src/core/util.vala" - self->ref_count = 1; -#line 1958 "util.c" -} - - -static void -aggregate_progress_monitor_finalize (AggregateProgressMonitor * obj) -{ - AggregateProgressMonitor * self; -#line 159 "/home/jens/Source/shotwell/src/core/util.vala" - self = G_TYPE_CHECK_INSTANCE_CAST (obj, TYPE_AGGREGATE_PROGRESS_MONITOR, AggregateProgressMonitor); -#line 159 "/home/jens/Source/shotwell/src/core/util.vala" - g_signal_handlers_destroy (self); -#line 1970 "util.c" -} - - -GType -aggregate_progress_monitor_get_type (void) -{ - static volatile gsize aggregate_progress_monitor_type_id__volatile = 0; - if (g_once_init_enter (&aggregate_progress_monitor_type_id__volatile)) { - static const GTypeValueTable g_define_type_value_table = { value_aggregate_progress_monitor_init, value_aggregate_progress_monitor_free_value, value_aggregate_progress_monitor_copy_value, value_aggregate_progress_monitor_peek_pointer, "p", value_aggregate_progress_monitor_collect_value, "p", value_aggregate_progress_monitor_lcopy_value }; - static const GTypeInfo g_define_type_info = { sizeof (AggregateProgressMonitorClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) aggregate_progress_monitor_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (AggregateProgressMonitor), 0, (GInstanceInitFunc) aggregate_progress_monitor_instance_init, &g_define_type_value_table }; - static const GTypeFundamentalInfo g_define_type_fundamental_info = { (G_TYPE_FLAG_CLASSED | G_TYPE_FLAG_INSTANTIATABLE | G_TYPE_FLAG_DERIVABLE | G_TYPE_FLAG_DEEP_DERIVABLE) }; - GType aggregate_progress_monitor_type_id; - aggregate_progress_monitor_type_id = g_type_register_fundamental (g_type_fundamental_next (), "AggregateProgressMonitor", &g_define_type_info, &g_define_type_fundamental_info, 0); - g_once_init_leave (&aggregate_progress_monitor_type_id__volatile, aggregate_progress_monitor_type_id); - } - return aggregate_progress_monitor_type_id__volatile; -} - - -gpointer -aggregate_progress_monitor_ref (gpointer instance) -{ - AggregateProgressMonitor * self; - self = instance; -#line 159 "/home/jens/Source/shotwell/src/core/util.vala" - g_atomic_int_inc (&self->ref_count); -#line 159 "/home/jens/Source/shotwell/src/core/util.vala" - return instance; -#line 1999 "util.c" -} - - -void -aggregate_progress_monitor_unref (gpointer instance) -{ - AggregateProgressMonitor * self; - self = instance; -#line 159 "/home/jens/Source/shotwell/src/core/util.vala" - if (g_atomic_int_dec_and_test (&self->ref_count)) { -#line 159 "/home/jens/Source/shotwell/src/core/util.vala" - AGGREGATE_PROGRESS_MONITOR_GET_CLASS (self)->finalize (self); -#line 159 "/home/jens/Source/shotwell/src/core/util.vala" - g_type_free_instance ((GTypeInstance *) self); -#line 2014 "util.c" - } -} - - -gboolean -null_progress_monitor (guint64 count, - guint64 total) -{ - gboolean result = FALSE; -#line 190 "/home/jens/Source/shotwell/src/core/util.vala" - result = TRUE; -#line 190 "/home/jens/Source/shotwell/src/core/util.vala" - return result; -#line 2028 "util.c" -} - - -gdouble -degrees_to_radians (gdouble theta) -{ - gdouble result = 0.0; -#line 195 "/home/jens/Source/shotwell/src/core/util.vala" - result = theta * (G_PI / 180.0); -#line 195 "/home/jens/Source/shotwell/src/core/util.vala" - return result; -#line 2040 "util.c" -} - - - |