summaryrefslogtreecommitdiff
path: root/src/core/DataSet.c
diff options
context:
space:
mode:
authorJörg Frings-Fürst <debian@jff-webhosting.net>2018-06-25 20:57:00 +0200
committerJörg Frings-Fürst <debian@jff-webhosting.net>2018-06-25 20:57:00 +0200
commita9bafe967a7a664c43dec4aeb64a6f6e0f284e05 (patch)
tree653c43a63b70c47278367ad2a4e92640a6669b44 /src/core/DataSet.c
parent55778740c211992cc86ea87588ab62c6750f36d1 (diff)
parentab841afa5cb39058d9ab2cebb67cfe6369443f6e (diff)
Update upstream source from tag 'upstream/0.28.3'
Update to upstream version '0.28.3' with Debian dir 828a38627ed9287d7cf2466fb15ebdea073742b7
Diffstat (limited to 'src/core/DataSet.c')
-rw-r--r--src/core/DataSet.c750
1 files changed, 389 insertions, 361 deletions
diff --git a/src/core/DataSet.c b/src/core/DataSet.c
index cc12b64..367fefc 100644
--- a/src/core/DataSet.c
+++ b/src/core/DataSet.c
@@ -1,4 +1,4 @@
-/* DataSet.c generated by valac 0.36.6, the Vala compiler
+/* DataSet.c generated by valac 0.40.4, the Vala compiler
* generated from DataSet.vala, do not modify */
/* Copyright 2016 Software Freedom Conservancy Inc.
@@ -26,6 +26,7 @@
/* 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>
@@ -112,60 +113,114 @@ 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);
+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);
+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))
-enum {
- DATA_SET_DUMMY_PROPERTY
-};
-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);
+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);
+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);
+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);
+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);
+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*
+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);
@@ -173,42 +228,40 @@ DataSet* data_set_construct (GType object_type) {
data_set_reset_comparator (self);
#line 35 "/home/jens/Source/shotwell/src/core/DataSet.vala"
return self;
-#line 177 "DataSet.c"
+#line 232 "DataSet.c"
}
-DataSet* data_set_new (void) {
+DataSet*
+data_set_new (void)
+{
#line 35 "/home/jens/Source/shotwell/src/core/DataSet.vala"
return data_set_construct (TYPE_DATA_SET);
-#line 184 "DataSet.c"
+#line 241 "DataSet.c"
}
-static gint64 data_set_order_added_comparator (DataSet* self, void* a, void* b) {
+static gint64
+data_set_order_added_comparator (DataSet* self,
+ void* a,
+ void* b)
+{
gint64 result = 0LL;
- void* _tmp0_;
- gint64 _tmp1_;
- void* _tmp2_;
- gint64 _tmp3_;
#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"
- _tmp0_ = a;
-#line 40 "/home/jens/Source/shotwell/src/core/DataSet.vala"
- _tmp1_ = data_object_internal_get_ordinal (G_TYPE_CHECK_INSTANCE_CAST ((DataObject*) _tmp0_, TYPE_DATA_OBJECT, DataObject));
-#line 40 "/home/jens/Source/shotwell/src/core/DataSet.vala"
- _tmp2_ = b;
-#line 40 "/home/jens/Source/shotwell/src/core/DataSet.vala"
- _tmp3_ = data_object_internal_get_ordinal (G_TYPE_CHECK_INSTANCE_CAST ((DataObject*) _tmp2_, TYPE_DATA_OBJECT, DataObject));
-#line 40 "/home/jens/Source/shotwell/src/core/DataSet.vala"
- result = _tmp1_ - _tmp3_;
+ 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 208 "DataSet.c"
+#line 257 "DataSet.c"
}
-static gboolean data_set_order_added_predicate (DataSet* self, DataObject* object, Alteration* alteration) {
+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);
@@ -220,96 +273,76 @@ static gboolean data_set_order_added_predicate (DataSet* self, DataObject* objec
result = FALSE;
#line 45 "/home/jens/Source/shotwell/src/core/DataSet.vala"
return result;
-#line 224 "DataSet.c"
+#line 277 "DataSet.c"
}
-static gint64 data_set_comparator_wrapper (DataSet* self, void* a, void* b) {
+static gint64
+data_set_comparator_wrapper (DataSet* self,
+ void* a,
+ void* b)
+{
gint64 result = 0LL;
- void* _tmp0_;
- void* _tmp1_;
gint64 _result_ = 0LL;
- Comparator _tmp2_;
- void* _tmp2__target;
- gint64 _tmp7_;
- gint64 _tmp11_;
+ 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"
- _tmp0_ = a;
-#line 49 "/home/jens/Source/shotwell/src/core/DataSet.vala"
- _tmp1_ = b;
-#line 49 "/home/jens/Source/shotwell/src/core/DataSet.vala"
- if (_tmp0_ == _tmp1_) {
+ 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 249 "DataSet.c"
+#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"
- _tmp2_ = self->priv->user_comparator;
+ _tmp0_ = self->priv->user_comparator;
#line 56 "/home/jens/Source/shotwell/src/core/DataSet.vala"
- _tmp2__target = self->priv->user_comparator_target;
+ _tmp0__target = self->priv->user_comparator_target;
#line 56 "/home/jens/Source/shotwell/src/core/DataSet.vala"
- if (_tmp2_ != NULL) {
-#line 259 "DataSet.c"
- Comparator _tmp3_;
- void* _tmp3__target;
- void* _tmp4_;
- void* _tmp5_;
- gint64 _tmp6_;
-#line 57 "/home/jens/Source/shotwell/src/core/DataSet.vala"
- _tmp3_ = self->priv->user_comparator;
+ if (_tmp0_ != NULL) {
+#line 310 "DataSet.c"
+ Comparator _tmp1_;
+ void* _tmp1__target;
#line 57 "/home/jens/Source/shotwell/src/core/DataSet.vala"
- _tmp3__target = self->priv->user_comparator_target;
+ _tmp1_ = self->priv->user_comparator;
#line 57 "/home/jens/Source/shotwell/src/core/DataSet.vala"
- _tmp4_ = a;
+ _tmp1__target = self->priv->user_comparator_target;
#line 57 "/home/jens/Source/shotwell/src/core/DataSet.vala"
- _tmp5_ = b;
-#line 57 "/home/jens/Source/shotwell/src/core/DataSet.vala"
- _tmp6_ = _tmp3_ (_tmp4_, _tmp5_, _tmp3__target);
-#line 57 "/home/jens/Source/shotwell/src/core/DataSet.vala"
- _result_ = _tmp6_;
-#line 277 "DataSet.c"
+ _result_ = _tmp1_ (a, b, _tmp1__target);
+#line 319 "DataSet.c"
}
#line 59 "/home/jens/Source/shotwell/src/core/DataSet.vala"
- _tmp7_ = _result_;
+ _tmp2_ = _result_;
#line 59 "/home/jens/Source/shotwell/src/core/DataSet.vala"
- if (_tmp7_ == ((gint64) 0)) {
-#line 283 "DataSet.c"
- void* _tmp8_;
- void* _tmp9_;
- gint64 _tmp10_;
-#line 60 "/home/jens/Source/shotwell/src/core/DataSet.vala"
- _tmp8_ = a;
-#line 60 "/home/jens/Source/shotwell/src/core/DataSet.vala"
- _tmp9_ = b;
-#line 60 "/home/jens/Source/shotwell/src/core/DataSet.vala"
- _tmp10_ = data_set_order_added_comparator (self, _tmp8_, _tmp9_);
+ if (_tmp2_ == ((gint64) 0)) {
#line 60 "/home/jens/Source/shotwell/src/core/DataSet.vala"
- _result_ = _tmp10_;
-#line 295 "DataSet.c"
+ _result_ = data_set_order_added_comparator (self, a, b);
+#line 327 "DataSet.c"
}
#line 62 "/home/jens/Source/shotwell/src/core/DataSet.vala"
- _tmp11_ = _result_;
+ _tmp3_ = _result_;
#line 62 "/home/jens/Source/shotwell/src/core/DataSet.vala"
- _vala_assert (_tmp11_ != ((gint64) 0), "result != 0");
+ _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 305 "DataSet.c"
+#line 337 "DataSet.c"
}
-gboolean data_set_contains (DataSet* self, DataObject* object) {
+gboolean
+data_set_contains (DataSet* self,
+ DataObject* object)
+{
gboolean result = FALSE;
GeeHashSet* _tmp0_;
- DataObject* _tmp1_;
- gboolean _tmp2_;
#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"
@@ -317,54 +350,59 @@ gboolean data_set_contains (DataSet* self, DataObject* object) {
#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"
- _tmp1_ = object;
-#line 68 "/home/jens/Source/shotwell/src/core/DataSet.vala"
- _tmp2_ = gee_abstract_collection_contains (G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, GEE_TYPE_ABSTRACT_COLLECTION, GeeAbstractCollection), _tmp1_);
-#line 68 "/home/jens/Source/shotwell/src/core/DataSet.vala"
- result = _tmp2_;
+ 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 328 "DataSet.c"
+#line 357 "DataSet.c"
}
-inline gint data_set_get_count (DataSet* self) {
+inline gint
+data_set_get_count (DataSet* self)
+{
gint result = 0;
SortedList* _tmp0_;
- gint _tmp1_;
#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"
- _tmp1_ = sorted_list_get_count (_tmp0_);
-#line 72 "/home/jens/Source/shotwell/src/core/DataSet.vala"
- result = _tmp1_;
+ result = sorted_list_get_count (_tmp0_);
#line 72 "/home/jens/Source/shotwell/src/core/DataSet.vala"
return result;
-#line 346 "DataSet.c"
+#line 374 "DataSet.c"
}
-static gboolean _data_set_order_added_predicate_comparator_predicate (DataObject* object, Alteration* alteration, gpointer self) {
+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 355 "DataSet.c"
+#line 387 "DataSet.c"
}
-static gint64 _data_set_order_added_comparator_comparator (void* a, void* b, gpointer self) {
+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 364 "DataSet.c"
+#line 400 "DataSet.c"
}
-void data_set_reset_comparator (DataSet* self) {
+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));
@@ -380,11 +418,14 @@ void data_set_reset_comparator (DataSet* self) {
_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 384 "DataSet.c"
+#line 422 "DataSet.c"
}
-Comparator data_set_get_comparator (DataSet* self, void** result_target) {
+Comparator
+data_set_get_comparator (DataSet* self,
+ void** result_target)
+{
Comparator result = NULL;
Comparator _tmp0_;
void* _tmp0__target;
@@ -406,11 +447,14 @@ Comparator data_set_get_comparator (DataSet* self, void** result_target) {
result = _tmp1_;
#line 82 "/home/jens/Source/shotwell/src/core/DataSet.vala"
return result;
-#line 410 "DataSet.c"
+#line 451 "DataSet.c"
}
-ComparatorPredicate data_set_get_comparator_predicate (DataSet* self, void** result_target) {
+ComparatorPredicate
+data_set_get_comparator_predicate (DataSet* self,
+ void** result_target)
+{
ComparatorPredicate result = NULL;
ComparatorPredicate _tmp0_;
void* _tmp0__target;
@@ -432,52 +476,52 @@ ComparatorPredicate data_set_get_comparator_predicate (DataSet* self, void** res
result = _tmp1_;
#line 86 "/home/jens/Source/shotwell/src/core/DataSet.vala"
return result;
-#line 436 "DataSet.c"
+#line 480 "DataSet.c"
}
-static gint64 _data_set_comparator_wrapper_comparator (void* a, void* b, gpointer self) {
+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 445 "DataSet.c"
+#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) {
- Comparator _tmp0_;
- void* _tmp0__target;
- ComparatorPredicate _tmp1_;
- void* _tmp1__target;
- SortedList* _tmp2_;
+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"
- _tmp0_ = user_comparator;
+ self->priv->user_comparator = user_comparator;
#line 90 "/home/jens/Source/shotwell/src/core/DataSet.vala"
- _tmp0__target = user_comparator_target;
-#line 90 "/home/jens/Source/shotwell/src/core/DataSet.vala"
- self->priv->user_comparator = _tmp0_;
-#line 90 "/home/jens/Source/shotwell/src/core/DataSet.vala"
- self->priv->user_comparator_target = _tmp0__target;
-#line 91 "/home/jens/Source/shotwell/src/core/DataSet.vala"
- _tmp1_ = comparator_predicate;
+ self->priv->user_comparator_target = user_comparator_target;
#line 91 "/home/jens/Source/shotwell/src/core/DataSet.vala"
- _tmp1__target = comparator_predicate_target;
+ self->priv->comparator_predicate = comparator_predicate;
#line 91 "/home/jens/Source/shotwell/src/core/DataSet.vala"
- self->priv->comparator_predicate = _tmp1_;
-#line 91 "/home/jens/Source/shotwell/src/core/DataSet.vala"
- self->priv->comparator_predicate_target = _tmp1__target;
+ self->priv->comparator_predicate_target = comparator_predicate_target;
#line 92 "/home/jens/Source/shotwell/src/core/DataSet.vala"
- _tmp2_ = self->priv->list;
+ _tmp0_ = self->priv->list;
#line 92 "/home/jens/Source/shotwell/src/core/DataSet.vala"
- sorted_list_resort (_tmp2_, _data_set_comparator_wrapper_comparator, self);
-#line 477 "DataSet.c"
+ sorted_list_resort (_tmp0_, _data_set_comparator_wrapper_comparator, self);
+#line 519 "DataSet.c"
}
-GeeList* data_set_get_all (DataSet* self) {
+GeeList*
+data_set_get_all (DataSet* self)
+{
GeeList* result = NULL;
SortedList* _tmp0_;
GeeList* _tmp1_;
@@ -494,11 +538,13 @@ GeeList* data_set_get_all (DataSet* self) {
result = _tmp2_;
#line 96 "/home/jens/Source/shotwell/src/core/DataSet.vala"
return result;
-#line 498 "DataSet.c"
+#line 542 "DataSet.c"
}
-DataSet* data_set_copy (DataSet* self) {
+DataSet*
+data_set_copy (DataSet* self)
+{
DataSet* result = NULL;
DataSet* clone = NULL;
DataSet* _tmp0_;
@@ -530,37 +576,38 @@ DataSet* data_set_copy (DataSet* self) {
result = clone;
#line 104 "/home/jens/Source/shotwell/src/core/DataSet.vala"
return result;
-#line 534 "DataSet.c"
+#line 580 "DataSet.c"
}
-DataObject* data_set_get_at (DataSet* self, gint index) {
+DataObject*
+data_set_get_at (DataSet* self,
+ gint index)
+{
DataObject* result = NULL;
SortedList* _tmp0_;
- gint _tmp1_;
- gpointer _tmp2_;
+ 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_ = index;
+ _tmp1_ = sorted_list_get_at (_tmp0_, index);
#line 108 "/home/jens/Source/shotwell/src/core/DataSet.vala"
- _tmp2_ = sorted_list_get_at (_tmp0_, _tmp1_);
-#line 108 "/home/jens/Source/shotwell/src/core/DataSet.vala"
- result = (DataObject*) _tmp2_;
+ result = (DataObject*) _tmp1_;
#line 108 "/home/jens/Source/shotwell/src/core/DataSet.vala"
return result;
-#line 555 "DataSet.c"
+#line 601 "DataSet.c"
}
-gint data_set_index_of (DataSet* self, DataObject* object) {
+gint
+data_set_index_of (DataSet* self,
+ DataObject* object)
+{
gint result = 0;
SortedList* _tmp0_;
- DataObject* _tmp1_;
- GEqualFunc _tmp2_;
- gint _tmp3_;
+ 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"
@@ -568,27 +615,22 @@ gint data_set_index_of (DataSet* self, DataObject* object) {
#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_ = object;
-#line 112 "/home/jens/Source/shotwell/src/core/DataSet.vala"
- _tmp2_ = g_direct_equal;
-#line 112 "/home/jens/Source/shotwell/src/core/DataSet.vala"
- _tmp3_ = sorted_list_locate (_tmp0_, _tmp1_, FALSE, _tmp2_);
+ _tmp1_ = g_direct_equal;
#line 112 "/home/jens/Source/shotwell/src/core/DataSet.vala"
- result = _tmp3_;
+ result = sorted_list_locate (_tmp0_, object, FALSE, _tmp1_);
#line 112 "/home/jens/Source/shotwell/src/core/DataSet.vala"
return result;
-#line 581 "DataSet.c"
+#line 624 "DataSet.c"
}
-gboolean data_set_add (DataSet* self, DataObject* object) {
+gboolean
+data_set_add (DataSet* self,
+ DataObject* object)
+{
gboolean result = FALSE;
SortedList* _tmp0_;
- DataObject* _tmp1_;
- gboolean _tmp2_;
- GeeHashSet* _tmp3_;
- DataObject* _tmp4_;
- gboolean _tmp5_;
+ 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"
@@ -596,137 +638,110 @@ gboolean data_set_add (DataSet* self, DataObject* object) {
#line 117 "/home/jens/Source/shotwell/src/core/DataSet.vala"
_tmp0_ = self->priv->list;
#line 117 "/home/jens/Source/shotwell/src/core/DataSet.vala"
- _tmp1_ = object;
-#line 117 "/home/jens/Source/shotwell/src/core/DataSet.vala"
- _tmp2_ = gee_collection_add (G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, GEE_TYPE_COLLECTION, GeeCollection), _tmp1_);
-#line 117 "/home/jens/Source/shotwell/src/core/DataSet.vala"
- if (!_tmp2_) {
+ 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 609 "DataSet.c"
+#line 647 "DataSet.c"
}
#line 120 "/home/jens/Source/shotwell/src/core/DataSet.vala"
- _tmp3_ = self->priv->hash_set;
-#line 120 "/home/jens/Source/shotwell/src/core/DataSet.vala"
- _tmp4_ = object;
+ _tmp1_ = self->priv->hash_set;
#line 120 "/home/jens/Source/shotwell/src/core/DataSet.vala"
- _tmp5_ = gee_abstract_collection_add (G_TYPE_CHECK_INSTANCE_CAST (_tmp3_, GEE_TYPE_ABSTRACT_COLLECTION, GeeAbstractCollection), _tmp4_);
-#line 120 "/home/jens/Source/shotwell/src/core/DataSet.vala"
- if (!_tmp5_) {
-#line 619 "DataSet.c"
- SortedList* _tmp6_;
- DataObject* _tmp7_;
-#line 122 "/home/jens/Source/shotwell/src/core/DataSet.vala"
- _tmp6_ = self->priv->list;
+ 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"
- _tmp7_ = object;
+ _tmp2_ = self->priv->list;
#line 122 "/home/jens/Source/shotwell/src/core/DataSet.vala"
- gee_collection_remove (G_TYPE_CHECK_INSTANCE_CAST (_tmp6_, GEE_TYPE_COLLECTION, GeeCollection), _tmp7_);
+ 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 632 "DataSet.c"
+#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 638 "DataSet.c"
+#line 669 "DataSet.c"
}
-gboolean data_set_add_many (DataSet* self, GeeCollection* objects) {
+gboolean
+data_set_add_many (DataSet* self,
+ GeeCollection* objects)
+{
gboolean result = FALSE;
gint count = 0;
- GeeCollection* _tmp0_;
+ gint _tmp0_;
gint _tmp1_;
gint _tmp2_;
- gint _tmp3_;
- SortedList* _tmp4_;
- GeeCollection* _tmp5_;
- gboolean _tmp6_;
- GeeHashSet* _tmp7_;
- GeeCollection* _tmp8_;
- gboolean _tmp9_;
+ 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_ = objects;
-#line 132 "/home/jens/Source/shotwell/src/core/DataSet.vala"
- _tmp1_ = gee_collection_get_size (_tmp0_);
+ _tmp0_ = gee_collection_get_size (objects);
#line 132 "/home/jens/Source/shotwell/src/core/DataSet.vala"
- _tmp2_ = _tmp1_;
+ _tmp1_ = _tmp0_;
#line 132 "/home/jens/Source/shotwell/src/core/DataSet.vala"
- count = _tmp2_;
+ count = _tmp1_;
#line 133 "/home/jens/Source/shotwell/src/core/DataSet.vala"
- _tmp3_ = count;
+ _tmp2_ = count;
#line 133 "/home/jens/Source/shotwell/src/core/DataSet.vala"
- if (_tmp3_ == 0) {
+ 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 675 "DataSet.c"
+#line 702 "DataSet.c"
}
#line 136 "/home/jens/Source/shotwell/src/core/DataSet.vala"
- _tmp4_ = self->priv->list;
-#line 136 "/home/jens/Source/shotwell/src/core/DataSet.vala"
- _tmp5_ = objects;
-#line 136 "/home/jens/Source/shotwell/src/core/DataSet.vala"
- _tmp6_ = gee_collection_add_all (G_TYPE_CHECK_INSTANCE_CAST (_tmp4_, GEE_TYPE_COLLECTION, GeeCollection), _tmp5_);
+ _tmp3_ = self->priv->list;
#line 136 "/home/jens/Source/shotwell/src/core/DataSet.vala"
- if (!_tmp6_) {
+ 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 689 "DataSet.c"
+#line 712 "DataSet.c"
}
#line 139 "/home/jens/Source/shotwell/src/core/DataSet.vala"
- _tmp7_ = self->priv->hash_set;
-#line 139 "/home/jens/Source/shotwell/src/core/DataSet.vala"
- _tmp8_ = objects;
-#line 139 "/home/jens/Source/shotwell/src/core/DataSet.vala"
- _tmp9_ = gee_collection_add_all (G_TYPE_CHECK_INSTANCE_CAST (_tmp7_, GEE_TYPE_COLLECTION, GeeCollection), _tmp8_);
+ _tmp4_ = self->priv->hash_set;
#line 139 "/home/jens/Source/shotwell/src/core/DataSet.vala"
- if (!_tmp9_) {
-#line 699 "DataSet.c"
- SortedList* _tmp10_;
- GeeCollection* _tmp11_;
-#line 141 "/home/jens/Source/shotwell/src/core/DataSet.vala"
- _tmp10_ = self->priv->list;
+ 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"
- _tmp11_ = objects;
+ _tmp5_ = self->priv->list;
#line 141 "/home/jens/Source/shotwell/src/core/DataSet.vala"
- gee_collection_remove_all (G_TYPE_CHECK_INSTANCE_CAST (_tmp10_, GEE_TYPE_COLLECTION, GeeCollection), _tmp11_);
+ 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 712 "DataSet.c"
+#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 718 "DataSet.c"
+#line 734 "DataSet.c"
}
-gboolean data_set_remove (DataSet* self, DataObject* object) {
+gboolean
+data_set_remove (DataSet* self,
+ DataObject* object)
+{
gboolean result = FALSE;
gboolean success = FALSE;
SortedList* _tmp0_;
- DataObject* _tmp1_;
- gboolean _tmp2_;
- GeeHashSet* _tmp3_;
- DataObject* _tmp4_;
- gboolean _tmp5_;
+ 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"
@@ -736,44 +751,35 @@ gboolean data_set_remove (DataSet* self, DataObject* object) {
#line 152 "/home/jens/Source/shotwell/src/core/DataSet.vala"
_tmp0_ = self->priv->list;
#line 152 "/home/jens/Source/shotwell/src/core/DataSet.vala"
- _tmp1_ = object;
-#line 152 "/home/jens/Source/shotwell/src/core/DataSet.vala"
- _tmp2_ = gee_collection_remove (G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, GEE_TYPE_COLLECTION, GeeCollection), _tmp1_);
-#line 152 "/home/jens/Source/shotwell/src/core/DataSet.vala"
- if (!_tmp2_) {
+ 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 747 "DataSet.c"
+#line 758 "DataSet.c"
}
#line 155 "/home/jens/Source/shotwell/src/core/DataSet.vala"
- _tmp3_ = self->priv->hash_set;
-#line 155 "/home/jens/Source/shotwell/src/core/DataSet.vala"
- _tmp4_ = object;
+ _tmp1_ = self->priv->hash_set;
#line 155 "/home/jens/Source/shotwell/src/core/DataSet.vala"
- _tmp5_ = gee_abstract_collection_remove (G_TYPE_CHECK_INSTANCE_CAST (_tmp3_, GEE_TYPE_ABSTRACT_COLLECTION, GeeAbstractCollection), _tmp4_);
-#line 155 "/home/jens/Source/shotwell/src/core/DataSet.vala"
- if (!_tmp5_) {
+ 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 759 "DataSet.c"
+#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 765 "DataSet.c"
+#line 772 "DataSet.c"
}
-gboolean data_set_remove_many (DataSet* self, GeeCollection* objects) {
+gboolean
+data_set_remove_many (DataSet* self,
+ GeeCollection* objects)
+{
gboolean result = FALSE;
gboolean success = FALSE;
SortedList* _tmp0_;
- GeeCollection* _tmp1_;
- gboolean _tmp2_;
- GeeHashSet* _tmp3_;
- GeeCollection* _tmp4_;
- gboolean _tmp5_;
+ 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"
@@ -783,44 +789,38 @@ gboolean data_set_remove_many (DataSet* self, GeeCollection* objects) {
#line 164 "/home/jens/Source/shotwell/src/core/DataSet.vala"
_tmp0_ = self->priv->list;
#line 164 "/home/jens/Source/shotwell/src/core/DataSet.vala"
- _tmp1_ = objects;
-#line 164 "/home/jens/Source/shotwell/src/core/DataSet.vala"
- _tmp2_ = gee_collection_remove_all (G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, GEE_TYPE_COLLECTION, GeeCollection), _tmp1_);
-#line 164 "/home/jens/Source/shotwell/src/core/DataSet.vala"
- if (!_tmp2_) {
+ 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 794 "DataSet.c"
+#line 796 "DataSet.c"
}
#line 167 "/home/jens/Source/shotwell/src/core/DataSet.vala"
- _tmp3_ = self->priv->hash_set;
-#line 167 "/home/jens/Source/shotwell/src/core/DataSet.vala"
- _tmp4_ = objects;
+ _tmp1_ = self->priv->hash_set;
#line 167 "/home/jens/Source/shotwell/src/core/DataSet.vala"
- _tmp5_ = gee_collection_remove_all (G_TYPE_CHECK_INSTANCE_CAST (_tmp3_, GEE_TYPE_COLLECTION, GeeCollection), _tmp4_);
-#line 167 "/home/jens/Source/shotwell/src/core/DataSet.vala"
- if (!_tmp5_) {
+ 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 806 "DataSet.c"
+#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 812 "DataSet.c"
+#line 810 "DataSet.c"
}
-gboolean data_set_resort_object (DataSet* self, DataObject* object, Alteration* alteration) {
+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* _tmp8_;
- DataObject* _tmp9_;
- gboolean _tmp10_;
+ 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"
@@ -833,43 +833,30 @@ gboolean data_set_resort_object (DataSet* self, DataObject* object, Alteration*
_tmp2__target = self->priv->comparator_predicate_target;
#line 175 "/home/jens/Source/shotwell/src/core/DataSet.vala"
if (_tmp2_ != NULL) {
-#line 837 "DataSet.c"
- Alteration* _tmp3_;
-#line 175 "/home/jens/Source/shotwell/src/core/DataSet.vala"
- _tmp3_ = alteration;
#line 175 "/home/jens/Source/shotwell/src/core/DataSet.vala"
- _tmp1_ = _tmp3_ != NULL;
-#line 843 "DataSet.c"
+ _tmp1_ = alteration != NULL;
+#line 839 "DataSet.c"
} else {
#line 175 "/home/jens/Source/shotwell/src/core/DataSet.vala"
_tmp1_ = FALSE;
-#line 847 "DataSet.c"
+#line 843 "DataSet.c"
}
#line 175 "/home/jens/Source/shotwell/src/core/DataSet.vala"
if (_tmp1_) {
-#line 851 "DataSet.c"
- ComparatorPredicate _tmp4_;
- void* _tmp4__target;
- DataObject* _tmp5_;
- Alteration* _tmp6_;
- gboolean _tmp7_;
-#line 176 "/home/jens/Source/shotwell/src/core/DataSet.vala"
- _tmp4_ = self->priv->comparator_predicate;
-#line 176 "/home/jens/Source/shotwell/src/core/DataSet.vala"
- _tmp4__target = self->priv->comparator_predicate_target;
-#line 176 "/home/jens/Source/shotwell/src/core/DataSet.vala"
- _tmp5_ = object;
+#line 847 "DataSet.c"
+ ComparatorPredicate _tmp3_;
+ void* _tmp3__target;
#line 176 "/home/jens/Source/shotwell/src/core/DataSet.vala"
- _tmp6_ = alteration;
+ _tmp3_ = self->priv->comparator_predicate;
#line 176 "/home/jens/Source/shotwell/src/core/DataSet.vala"
- _tmp7_ = _tmp4_ (_tmp5_, _tmp6_, _tmp4__target);
+ _tmp3__target = self->priv->comparator_predicate_target;
#line 176 "/home/jens/Source/shotwell/src/core/DataSet.vala"
- _tmp0_ = !_tmp7_;
-#line 869 "DataSet.c"
+ _tmp0_ = !_tmp3_ (object, alteration, _tmp3__target);
+#line 856 "DataSet.c"
} else {
#line 175 "/home/jens/Source/shotwell/src/core/DataSet.vala"
_tmp0_ = FALSE;
-#line 873 "DataSet.c"
+#line 860 "DataSet.c"
}
#line 175 "/home/jens/Source/shotwell/src/core/DataSet.vala"
if (_tmp0_) {
@@ -877,120 +864,141 @@ gboolean data_set_resort_object (DataSet* self, DataObject* object, Alteration*
result = FALSE;
#line 177 "/home/jens/Source/shotwell/src/core/DataSet.vala"
return result;
-#line 881 "DataSet.c"
+#line 868 "DataSet.c"
}
#line 180 "/home/jens/Source/shotwell/src/core/DataSet.vala"
- _tmp8_ = self->priv->list;
-#line 180 "/home/jens/Source/shotwell/src/core/DataSet.vala"
- _tmp9_ = object;
-#line 180 "/home/jens/Source/shotwell/src/core/DataSet.vala"
- _tmp10_ = sorted_list_resort_item (_tmp8_, _tmp9_);
+ _tmp4_ = self->priv->list;
#line 180 "/home/jens/Source/shotwell/src/core/DataSet.vala"
- result = _tmp10_;
+ result = sorted_list_resort_item (_tmp4_, object);
#line 180 "/home/jens/Source/shotwell/src/core/DataSet.vala"
return result;
-#line 893 "DataSet.c"
+#line 876 "DataSet.c"
}
-static void value_data_set_init (GValue* value) {
+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 900 "DataSet.c"
+#line 885 "DataSet.c"
}
-static void value_data_set_free_value (GValue* value) {
+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 909 "DataSet.c"
+#line 896 "DataSet.c"
}
}
-static void value_data_set_copy_value (const GValue* src_value, GValue* dest_value) {
+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 919 "DataSet.c"
+#line 909 "DataSet.c"
} else {
#line 29 "/home/jens/Source/shotwell/src/core/DataSet.vala"
dest_value->data[0].v_pointer = NULL;
-#line 923 "DataSet.c"
+#line 913 "DataSet.c"
}
}
-static gpointer value_data_set_peek_pointer (const GValue* value) {
+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 931 "DataSet.c"
+#line 923 "DataSet.c"
}
-static gchar* value_data_set_collect_value (GValue* value, guint n_collect_values, GTypeCValue* collect_values, guint collect_flags) {
+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 938 "DataSet.c"
+#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 945 "DataSet.c"
+#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 949 "DataSet.c"
+#line 946 "DataSet.c"
}
#line 29 "/home/jens/Source/shotwell/src/core/DataSet.vala"
value->data[0].v_pointer = data_set_ref (object);
-#line 953 "DataSet.c"
+#line 950 "DataSet.c"
} else {
#line 29 "/home/jens/Source/shotwell/src/core/DataSet.vala"
value->data[0].v_pointer = NULL;
-#line 957 "DataSet.c"
+#line 954 "DataSet.c"
}
#line 29 "/home/jens/Source/shotwell/src/core/DataSet.vala"
return NULL;
-#line 961 "DataSet.c"
+#line 958 "DataSet.c"
}
-static gchar* value_data_set_lcopy_value (const GValue* value, guint n_collect_values, GTypeCValue* collect_values, guint collect_flags) {
+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 972 "DataSet.c"
+#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 978 "DataSet.c"
+#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 982 "DataSet.c"
+#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 986 "DataSet.c"
+#line 988 "DataSet.c"
}
#line 29 "/home/jens/Source/shotwell/src/core/DataSet.vala"
return NULL;
-#line 990 "DataSet.c"
+#line 992 "DataSet.c"
}
-GParamSpec* param_spec_data_set (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags) {
+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);
@@ -1000,20 +1008,25 @@ GParamSpec* param_spec_data_set (const gchar* name, const gchar* nick, const gch
G_PARAM_SPEC (spec)->value_type = object_type;
#line 29 "/home/jens/Source/shotwell/src/core/DataSet.vala"
return G_PARAM_SPEC (spec);
-#line 1004 "DataSet.c"
+#line 1012 "DataSet.c"
}
-gpointer value_get_data_set (const GValue* value) {
+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 1013 "DataSet.c"
+#line 1023 "DataSet.c"
}
-void value_set_data_set (GValue* value, gpointer v_object) {
+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));
@@ -1029,22 +1042,25 @@ void value_set_data_set (GValue* value, gpointer v_object) {
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 1033 "DataSet.c"
+#line 1046 "DataSet.c"
} else {
#line 29 "/home/jens/Source/shotwell/src/core/DataSet.vala"
value->data[0].v_pointer = NULL;
-#line 1037 "DataSet.c"
+#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 1043 "DataSet.c"
+#line 1056 "DataSet.c"
}
}
-void value_take_data_set (GValue* value, gpointer v_object) {
+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));
@@ -1058,33 +1074,37 @@ void value_take_data_set (GValue* value, gpointer v_object) {
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 1062 "DataSet.c"
+#line 1078 "DataSet.c"
} else {
#line 29 "/home/jens/Source/shotwell/src/core/DataSet.vala"
value->data[0].v_pointer = NULL;
-#line 1066 "DataSet.c"
+#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 1072 "DataSet.c"
+#line 1088 "DataSet.c"
}
}
-static void data_set_class_init (DataSetClass * klass) {
+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 1084 "DataSet.c"
+#line 1102 "DataSet.c"
}
-static void data_set_instance_init (DataSet * self) {
+static void
+data_set_instance_init (DataSet * self)
+{
SortedList* _tmp0_;
GeeHashSet* _tmp1_;
#line 29 "/home/jens/Source/shotwell/src/core/DataSet.vala"
@@ -1107,11 +1127,13 @@ static void data_set_instance_init (DataSet * self) {
self->priv->comparator_predicate_target = self;
#line 29 "/home/jens/Source/shotwell/src/core/DataSet.vala"
self->ref_count = 1;
-#line 1111 "DataSet.c"
+#line 1131 "DataSet.c"
}
-static void data_set_finalize (DataSet * obj) {
+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);
@@ -1121,11 +1143,13 @@ static void data_set_finalize (DataSet * obj) {
_g_object_unref0 (self->priv->list);
#line 31 "/home/jens/Source/shotwell/src/core/DataSet.vala"
_g_object_unref0 (self->priv->hash_set);
-#line 1125 "DataSet.c"
+#line 1147 "DataSet.c"
}
-GType data_set_get_type (void) {
+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 };
@@ -1139,18 +1163,22 @@ GType data_set_get_type (void) {
}
-gpointer data_set_ref (gpointer instance) {
+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 1150 "DataSet.c"
+#line 1176 "DataSet.c"
}
-void data_set_unref (gpointer instance) {
+void
+data_set_unref (gpointer instance)
+{
DataSet * self;
self = instance;
#line 29 "/home/jens/Source/shotwell/src/core/DataSet.vala"
@@ -1159,7 +1187,7 @@ void data_set_unref (gpointer instance) {
DATA_SET_GET_CLASS (self)->finalize (self);
#line 29 "/home/jens/Source/shotwell/src/core/DataSet.vala"
g_type_free_instance ((GTypeInstance *) self);
-#line 1163 "DataSet.c"
+#line 1191 "DataSet.c"
}
}