diff options
author | Jörg Frings-Fürst <debian@jff-webhosting.net> | 2018-05-01 14:34:32 +0200 |
---|---|---|
committer | Jörg Frings-Fürst <debian@jff-webhosting.net> | 2018-05-01 14:34:32 +0200 |
commit | 49120f48474fc8fdc2448c75d961bc238213cfac (patch) | |
tree | 05bcdb95d65a807cf0f1ffffd066c09074b5cf56 /src/util | |
parent | 2492891f112caac6076ce49721d9d5d78a152c3a (diff) |
New upstream version 0.28.2upstream/0.28.2
Diffstat (limited to 'src/util')
-rw-r--r-- | src/util/KeyValueMap.c | 226 | ||||
-rw-r--r-- | src/util/image.c | 859 | ||||
-rw-r--r-- | src/util/image.vala | 53 | ||||
-rw-r--r-- | src/util/misc.c | 1948 | ||||
-rw-r--r-- | src/util/misc.vala | 9 | ||||
-rw-r--r-- | src/util/system.c | 104 | ||||
-rw-r--r-- | src/util/system.vala | 5 |
7 files changed, 1764 insertions, 1440 deletions
diff --git a/src/util/KeyValueMap.c b/src/util/KeyValueMap.c index ff453c2..210929f 100644 --- a/src/util/KeyValueMap.c +++ b/src/util/KeyValueMap.c @@ -98,8 +98,6 @@ KeyValueMap* key_value_map_construct (GType object_type, const gchar* group) { const gchar* _tmp0_; gchar* _tmp1_; #line 11 "/home/jens/Source/shotwell/src/util/KeyValueMap.vala" - g_return_val_if_fail (group != NULL, NULL); -#line 11 "/home/jens/Source/shotwell/src/util/KeyValueMap.vala" self = (KeyValueMap*) g_type_create_instance (object_type); #line 12 "/home/jens/Source/shotwell/src/util/KeyValueMap.vala" _tmp0_ = group; @@ -111,14 +109,14 @@ KeyValueMap* key_value_map_construct (GType object_type, const gchar* group) { self->priv->group = _tmp1_; #line 11 "/home/jens/Source/shotwell/src/util/KeyValueMap.vala" return self; -#line 115 "KeyValueMap.c" +#line 113 "KeyValueMap.c" } KeyValueMap* key_value_map_new (const gchar* group) { #line 11 "/home/jens/Source/shotwell/src/util/KeyValueMap.vala" return key_value_map_construct (TYPE_KEY_VALUE_MAP, group); -#line 122 "KeyValueMap.c" +#line 120 "KeyValueMap.c" } @@ -127,15 +125,13 @@ KeyValueMap* key_value_map_copy (KeyValueMap* self) { KeyValueMap* clone = NULL; const gchar* _tmp0_; KeyValueMap* _tmp1_; -#line 15 "/home/jens/Source/shotwell/src/util/KeyValueMap.vala" - g_return_val_if_fail (IS_KEY_VALUE_MAP (self), NULL); #line 16 "/home/jens/Source/shotwell/src/util/KeyValueMap.vala" _tmp0_ = self->priv->group; #line 16 "/home/jens/Source/shotwell/src/util/KeyValueMap.vala" _tmp1_ = key_value_map_new (_tmp0_); #line 16 "/home/jens/Source/shotwell/src/util/KeyValueMap.vala" clone = _tmp1_; -#line 139 "KeyValueMap.c" +#line 135 "KeyValueMap.c" { GeeIterator* _key_it = NULL; GeeHashMap* _tmp2_; @@ -162,7 +158,7 @@ KeyValueMap* key_value_map_copy (KeyValueMap* self) { _key_it = _tmp7_; #line 17 "/home/jens/Source/shotwell/src/util/KeyValueMap.vala" while (TRUE) { -#line 166 "KeyValueMap.c" +#line 162 "KeyValueMap.c" GeeIterator* _tmp8_; gboolean _tmp9_; gchar* key = NULL; @@ -183,7 +179,7 @@ KeyValueMap* key_value_map_copy (KeyValueMap* self) { if (!_tmp9_) { #line 17 "/home/jens/Source/shotwell/src/util/KeyValueMap.vala" break; -#line 187 "KeyValueMap.c" +#line 183 "KeyValueMap.c" } #line 17 "/home/jens/Source/shotwell/src/util/KeyValueMap.vala" _tmp10_ = _key_it; @@ -211,17 +207,17 @@ KeyValueMap* key_value_map_copy (KeyValueMap* self) { _g_free0 (_tmp18_); #line 17 "/home/jens/Source/shotwell/src/util/KeyValueMap.vala" _g_free0 (key); -#line 215 "KeyValueMap.c" +#line 211 "KeyValueMap.c" } #line 17 "/home/jens/Source/shotwell/src/util/KeyValueMap.vala" _g_object_unref0 (_key_it); -#line 219 "KeyValueMap.c" +#line 215 "KeyValueMap.c" } #line 20 "/home/jens/Source/shotwell/src/util/KeyValueMap.vala" result = clone; #line 20 "/home/jens/Source/shotwell/src/util/KeyValueMap.vala" return result; -#line 225 "KeyValueMap.c" +#line 221 "KeyValueMap.c" } @@ -229,8 +225,6 @@ gchar* key_value_map_get_group (KeyValueMap* self) { gchar* result = NULL; const gchar* _tmp0_; gchar* _tmp1_; -#line 23 "/home/jens/Source/shotwell/src/util/KeyValueMap.vala" - g_return_val_if_fail (IS_KEY_VALUE_MAP (self), NULL); #line 24 "/home/jens/Source/shotwell/src/util/KeyValueMap.vala" _tmp0_ = self->priv->group; #line 24 "/home/jens/Source/shotwell/src/util/KeyValueMap.vala" @@ -239,7 +233,7 @@ gchar* key_value_map_get_group (KeyValueMap* self) { result = _tmp1_; #line 24 "/home/jens/Source/shotwell/src/util/KeyValueMap.vala" return result; -#line 243 "KeyValueMap.c" +#line 237 "KeyValueMap.c" } @@ -248,8 +242,6 @@ GeeSet* key_value_map_get_keys (KeyValueMap* self) { GeeHashMap* _tmp0_; GeeSet* _tmp1_; GeeSet* _tmp2_; -#line 27 "/home/jens/Source/shotwell/src/util/KeyValueMap.vala" - g_return_val_if_fail (IS_KEY_VALUE_MAP (self), NULL); #line 28 "/home/jens/Source/shotwell/src/util/KeyValueMap.vala" _tmp0_ = self->priv->map; #line 28 "/home/jens/Source/shotwell/src/util/KeyValueMap.vala" @@ -260,7 +252,7 @@ GeeSet* key_value_map_get_keys (KeyValueMap* self) { result = _tmp2_; #line 28 "/home/jens/Source/shotwell/src/util/KeyValueMap.vala" return result; -#line 264 "KeyValueMap.c" +#line 256 "KeyValueMap.c" } @@ -269,10 +261,6 @@ gboolean key_value_map_has_key (KeyValueMap* self, const gchar* key) { GeeHashMap* _tmp0_; const gchar* _tmp1_; gboolean _tmp2_; -#line 31 "/home/jens/Source/shotwell/src/util/KeyValueMap.vala" - g_return_val_if_fail (IS_KEY_VALUE_MAP (self), FALSE); -#line 31 "/home/jens/Source/shotwell/src/util/KeyValueMap.vala" - g_return_val_if_fail (key != NULL, FALSE); #line 32 "/home/jens/Source/shotwell/src/util/KeyValueMap.vala" _tmp0_ = self->priv->map; #line 32 "/home/jens/Source/shotwell/src/util/KeyValueMap.vala" @@ -283,7 +271,7 @@ gboolean key_value_map_has_key (KeyValueMap* self, const gchar* key) { result = _tmp2_; #line 32 "/home/jens/Source/shotwell/src/util/KeyValueMap.vala" return result; -#line 287 "KeyValueMap.c" +#line 275 "KeyValueMap.c" } @@ -292,12 +280,6 @@ void key_value_map_set_string (KeyValueMap* self, const gchar* key, const gchar* GeeHashMap* _tmp1_; const gchar* _tmp2_; const gchar* _tmp3_; -#line 35 "/home/jens/Source/shotwell/src/util/KeyValueMap.vala" - g_return_if_fail (IS_KEY_VALUE_MAP (self)); -#line 35 "/home/jens/Source/shotwell/src/util/KeyValueMap.vala" - g_return_if_fail (key != NULL); -#line 35 "/home/jens/Source/shotwell/src/util/KeyValueMap.vala" - g_return_if_fail (value != NULL); #line 36 "/home/jens/Source/shotwell/src/util/KeyValueMap.vala" _tmp0_ = key; #line 36 "/home/jens/Source/shotwell/src/util/KeyValueMap.vala" @@ -310,7 +292,7 @@ void key_value_map_set_string (KeyValueMap* self, const gchar* key, const gchar* _tmp3_ = value; #line 38 "/home/jens/Source/shotwell/src/util/KeyValueMap.vala" gee_abstract_map_set (G_TYPE_CHECK_INSTANCE_CAST (_tmp1_, GEE_TYPE_ABSTRACT_MAP, GeeAbstractMap), _tmp2_, _tmp3_); -#line 314 "KeyValueMap.c" +#line 296 "KeyValueMap.c" } @@ -321,10 +303,6 @@ void key_value_map_set_int (KeyValueMap* self, const gchar* key, gint value) { gint _tmp3_; gchar* _tmp4_; gchar* _tmp5_; -#line 41 "/home/jens/Source/shotwell/src/util/KeyValueMap.vala" - g_return_if_fail (IS_KEY_VALUE_MAP (self)); -#line 41 "/home/jens/Source/shotwell/src/util/KeyValueMap.vala" - g_return_if_fail (key != NULL); #line 42 "/home/jens/Source/shotwell/src/util/KeyValueMap.vala" _tmp0_ = key; #line 42 "/home/jens/Source/shotwell/src/util/KeyValueMap.vala" @@ -343,7 +321,7 @@ void key_value_map_set_int (KeyValueMap* self, const gchar* key, gint value) { gee_abstract_map_set (G_TYPE_CHECK_INSTANCE_CAST (_tmp1_, GEE_TYPE_ABSTRACT_MAP, GeeAbstractMap), _tmp2_, _tmp5_); #line 44 "/home/jens/Source/shotwell/src/util/KeyValueMap.vala" _g_free0 (_tmp5_); -#line 347 "KeyValueMap.c" +#line 325 "KeyValueMap.c" } @@ -373,7 +351,7 @@ static gchar* double_to_string (gdouble self) { result = _tmp4_; #line 871 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" return result; -#line 377 "KeyValueMap.c" +#line 355 "KeyValueMap.c" } @@ -384,10 +362,6 @@ void key_value_map_set_double (KeyValueMap* self, const gchar* key, gdouble valu gdouble _tmp3_; gchar* _tmp4_; gchar* _tmp5_; -#line 47 "/home/jens/Source/shotwell/src/util/KeyValueMap.vala" - g_return_if_fail (IS_KEY_VALUE_MAP (self)); -#line 47 "/home/jens/Source/shotwell/src/util/KeyValueMap.vala" - g_return_if_fail (key != NULL); #line 48 "/home/jens/Source/shotwell/src/util/KeyValueMap.vala" _tmp0_ = key; #line 48 "/home/jens/Source/shotwell/src/util/KeyValueMap.vala" @@ -406,7 +380,7 @@ void key_value_map_set_double (KeyValueMap* self, const gchar* key, gdouble valu gee_abstract_map_set (G_TYPE_CHECK_INSTANCE_CAST (_tmp1_, GEE_TYPE_ABSTRACT_MAP, GeeAbstractMap), _tmp2_, _tmp5_); #line 50 "/home/jens/Source/shotwell/src/util/KeyValueMap.vala" _g_free0 (_tmp5_); -#line 410 "KeyValueMap.c" +#line 384 "KeyValueMap.c" } @@ -417,10 +391,6 @@ void key_value_map_set_float (KeyValueMap* self, const gchar* key, gfloat value) gfloat _tmp3_; gchar* _tmp4_; gchar* _tmp5_; -#line 53 "/home/jens/Source/shotwell/src/util/KeyValueMap.vala" - g_return_if_fail (IS_KEY_VALUE_MAP (self)); -#line 53 "/home/jens/Source/shotwell/src/util/KeyValueMap.vala" - g_return_if_fail (key != NULL); #line 54 "/home/jens/Source/shotwell/src/util/KeyValueMap.vala" _tmp0_ = key; #line 54 "/home/jens/Source/shotwell/src/util/KeyValueMap.vala" @@ -439,7 +409,7 @@ void key_value_map_set_float (KeyValueMap* self, const gchar* key, gfloat value) gee_abstract_map_set (G_TYPE_CHECK_INSTANCE_CAST (_tmp1_, GEE_TYPE_ABSTRACT_MAP, GeeAbstractMap), _tmp2_, _tmp5_); #line 56 "/home/jens/Source/shotwell/src/util/KeyValueMap.vala" _g_free0 (_tmp5_); -#line 443 "KeyValueMap.c" +#line 413 "KeyValueMap.c" } @@ -447,7 +417,7 @@ static gchar* bool_to_string (gboolean self) { gchar* result = NULL; #line 37 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" if (self) { -#line 451 "KeyValueMap.c" +#line 421 "KeyValueMap.c" gchar* _tmp0_; #line 38 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" _tmp0_ = g_strdup ("true"); @@ -455,7 +425,7 @@ static gchar* bool_to_string (gboolean self) { result = _tmp0_; #line 38 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" return result; -#line 459 "KeyValueMap.c" +#line 429 "KeyValueMap.c" } else { gchar* _tmp1_; #line 40 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" @@ -464,7 +434,7 @@ static gchar* bool_to_string (gboolean self) { result = _tmp1_; #line 40 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" return result; -#line 468 "KeyValueMap.c" +#line 438 "KeyValueMap.c" } } @@ -476,10 +446,6 @@ void key_value_map_set_bool (KeyValueMap* self, const gchar* key, gboolean value gboolean _tmp3_; gchar* _tmp4_; gchar* _tmp5_; -#line 59 "/home/jens/Source/shotwell/src/util/KeyValueMap.vala" - g_return_if_fail (IS_KEY_VALUE_MAP (self)); -#line 59 "/home/jens/Source/shotwell/src/util/KeyValueMap.vala" - g_return_if_fail (key != NULL); #line 60 "/home/jens/Source/shotwell/src/util/KeyValueMap.vala" _tmp0_ = key; #line 60 "/home/jens/Source/shotwell/src/util/KeyValueMap.vala" @@ -498,7 +464,7 @@ void key_value_map_set_bool (KeyValueMap* self, const gchar* key, gboolean value gee_abstract_map_set (G_TYPE_CHECK_INSTANCE_CAST (_tmp1_, GEE_TYPE_ABSTRACT_MAP, GeeAbstractMap), _tmp2_, _tmp5_); #line 62 "/home/jens/Source/shotwell/src/util/KeyValueMap.vala" _g_free0 (_tmp5_); -#line 502 "KeyValueMap.c" +#line 468 "KeyValueMap.c" } @@ -511,10 +477,6 @@ gchar* key_value_map_get_string (KeyValueMap* self, const gchar* key, const gcha const gchar* _tmp3_ = NULL; const gchar* _tmp4_; gchar* _tmp7_; -#line 65 "/home/jens/Source/shotwell/src/util/KeyValueMap.vala" - g_return_val_if_fail (IS_KEY_VALUE_MAP (self), NULL); -#line 65 "/home/jens/Source/shotwell/src/util/KeyValueMap.vala" - g_return_val_if_fail (key != NULL, NULL); #line 66 "/home/jens/Source/shotwell/src/util/KeyValueMap.vala" _tmp0_ = self->priv->map; #line 66 "/home/jens/Source/shotwell/src/util/KeyValueMap.vala" @@ -527,20 +489,20 @@ gchar* key_value_map_get_string (KeyValueMap* self, const gchar* key, const gcha _tmp4_ = value; #line 68 "/home/jens/Source/shotwell/src/util/KeyValueMap.vala" if (_tmp4_ != NULL) { -#line 531 "KeyValueMap.c" +#line 493 "KeyValueMap.c" const gchar* _tmp5_; #line 68 "/home/jens/Source/shotwell/src/util/KeyValueMap.vala" _tmp5_ = value; #line 68 "/home/jens/Source/shotwell/src/util/KeyValueMap.vala" _tmp3_ = _tmp5_; -#line 537 "KeyValueMap.c" +#line 499 "KeyValueMap.c" } else { const gchar* _tmp6_; #line 68 "/home/jens/Source/shotwell/src/util/KeyValueMap.vala" _tmp6_ = def; #line 68 "/home/jens/Source/shotwell/src/util/KeyValueMap.vala" _tmp3_ = _tmp6_; -#line 544 "KeyValueMap.c" +#line 506 "KeyValueMap.c" } #line 68 "/home/jens/Source/shotwell/src/util/KeyValueMap.vala" _tmp7_ = g_strdup (_tmp3_); @@ -550,7 +512,7 @@ gchar* key_value_map_get_string (KeyValueMap* self, const gchar* key, const gcha _g_free0 (value); #line 68 "/home/jens/Source/shotwell/src/util/KeyValueMap.vala" return result; -#line 554 "KeyValueMap.c" +#line 516 "KeyValueMap.c" } @@ -562,10 +524,6 @@ gint key_value_map_get_int (KeyValueMap* self, const gchar* key, gint def) { gpointer _tmp2_; gint _tmp3_ = 0; const gchar* _tmp4_; -#line 71 "/home/jens/Source/shotwell/src/util/KeyValueMap.vala" - g_return_val_if_fail (IS_KEY_VALUE_MAP (self), 0); -#line 71 "/home/jens/Source/shotwell/src/util/KeyValueMap.vala" - g_return_val_if_fail (key != NULL, 0); #line 72 "/home/jens/Source/shotwell/src/util/KeyValueMap.vala" _tmp0_ = self->priv->map; #line 72 "/home/jens/Source/shotwell/src/util/KeyValueMap.vala" @@ -578,7 +536,7 @@ gint key_value_map_get_int (KeyValueMap* self, const gchar* key, gint def) { _tmp4_ = value; #line 74 "/home/jens/Source/shotwell/src/util/KeyValueMap.vala" if (_tmp4_ != NULL) { -#line 582 "KeyValueMap.c" +#line 540 "KeyValueMap.c" const gchar* _tmp5_; gint _tmp6_; #line 74 "/home/jens/Source/shotwell/src/util/KeyValueMap.vala" @@ -587,14 +545,14 @@ gint key_value_map_get_int (KeyValueMap* self, const gchar* key, gint def) { _tmp6_ = atoi (_tmp5_); #line 74 "/home/jens/Source/shotwell/src/util/KeyValueMap.vala" _tmp3_ = _tmp6_; -#line 591 "KeyValueMap.c" +#line 549 "KeyValueMap.c" } else { gint _tmp7_; #line 74 "/home/jens/Source/shotwell/src/util/KeyValueMap.vala" _tmp7_ = def; #line 74 "/home/jens/Source/shotwell/src/util/KeyValueMap.vala" _tmp3_ = _tmp7_; -#line 598 "KeyValueMap.c" +#line 556 "KeyValueMap.c" } #line 74 "/home/jens/Source/shotwell/src/util/KeyValueMap.vala" result = _tmp3_; @@ -602,7 +560,7 @@ gint key_value_map_get_int (KeyValueMap* self, const gchar* key, gint def) { _g_free0 (value); #line 74 "/home/jens/Source/shotwell/src/util/KeyValueMap.vala" return result; -#line 606 "KeyValueMap.c" +#line 564 "KeyValueMap.c" } @@ -610,8 +568,6 @@ static gdouble double_parse (const gchar* str) { gdouble result = 0.0; const gchar* _tmp0_; gdouble _tmp1_; -#line 877 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - g_return_val_if_fail (str != NULL, 0.0); #line 878 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" _tmp0_ = str; #line 878 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" @@ -620,7 +576,7 @@ static gdouble double_parse (const gchar* str) { result = _tmp1_; #line 878 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" return result; -#line 624 "KeyValueMap.c" +#line 580 "KeyValueMap.c" } @@ -632,10 +588,6 @@ gdouble key_value_map_get_double (KeyValueMap* self, const gchar* key, gdouble d gpointer _tmp2_; gdouble _tmp3_ = 0.0; const gchar* _tmp4_; -#line 77 "/home/jens/Source/shotwell/src/util/KeyValueMap.vala" - g_return_val_if_fail (IS_KEY_VALUE_MAP (self), 0.0); -#line 77 "/home/jens/Source/shotwell/src/util/KeyValueMap.vala" - g_return_val_if_fail (key != NULL, 0.0); #line 78 "/home/jens/Source/shotwell/src/util/KeyValueMap.vala" _tmp0_ = self->priv->map; #line 78 "/home/jens/Source/shotwell/src/util/KeyValueMap.vala" @@ -648,7 +600,7 @@ gdouble key_value_map_get_double (KeyValueMap* self, const gchar* key, gdouble d _tmp4_ = value; #line 80 "/home/jens/Source/shotwell/src/util/KeyValueMap.vala" if (_tmp4_ != NULL) { -#line 652 "KeyValueMap.c" +#line 604 "KeyValueMap.c" const gchar* _tmp5_; gdouble _tmp6_; #line 80 "/home/jens/Source/shotwell/src/util/KeyValueMap.vala" @@ -657,14 +609,14 @@ gdouble key_value_map_get_double (KeyValueMap* self, const gchar* key, gdouble d _tmp6_ = double_parse (_tmp5_); #line 80 "/home/jens/Source/shotwell/src/util/KeyValueMap.vala" _tmp3_ = _tmp6_; -#line 661 "KeyValueMap.c" +#line 613 "KeyValueMap.c" } else { gdouble _tmp7_; #line 80 "/home/jens/Source/shotwell/src/util/KeyValueMap.vala" _tmp7_ = def; #line 80 "/home/jens/Source/shotwell/src/util/KeyValueMap.vala" _tmp3_ = _tmp7_; -#line 668 "KeyValueMap.c" +#line 620 "KeyValueMap.c" } #line 80 "/home/jens/Source/shotwell/src/util/KeyValueMap.vala" result = _tmp3_; @@ -672,7 +624,7 @@ gdouble key_value_map_get_double (KeyValueMap* self, const gchar* key, gdouble d _g_free0 (value); #line 80 "/home/jens/Source/shotwell/src/util/KeyValueMap.vala" return result; -#line 676 "KeyValueMap.c" +#line 628 "KeyValueMap.c" } @@ -684,10 +636,6 @@ gfloat key_value_map_get_float (KeyValueMap* self, const gchar* key, gfloat def) gpointer _tmp2_; gfloat _tmp3_ = 0.0F; const gchar* _tmp4_; -#line 83 "/home/jens/Source/shotwell/src/util/KeyValueMap.vala" - g_return_val_if_fail (IS_KEY_VALUE_MAP (self), 0.0F); -#line 83 "/home/jens/Source/shotwell/src/util/KeyValueMap.vala" - g_return_val_if_fail (key != NULL, 0.0F); #line 84 "/home/jens/Source/shotwell/src/util/KeyValueMap.vala" _tmp0_ = self->priv->map; #line 84 "/home/jens/Source/shotwell/src/util/KeyValueMap.vala" @@ -700,7 +648,7 @@ gfloat key_value_map_get_float (KeyValueMap* self, const gchar* key, gfloat def) _tmp4_ = value; #line 86 "/home/jens/Source/shotwell/src/util/KeyValueMap.vala" if (_tmp4_ != NULL) { -#line 704 "KeyValueMap.c" +#line 652 "KeyValueMap.c" const gchar* _tmp5_; gdouble _tmp6_; #line 86 "/home/jens/Source/shotwell/src/util/KeyValueMap.vala" @@ -709,14 +657,14 @@ gfloat key_value_map_get_float (KeyValueMap* self, const gchar* key, gfloat def) _tmp6_ = double_parse (_tmp5_); #line 86 "/home/jens/Source/shotwell/src/util/KeyValueMap.vala" _tmp3_ = (gfloat) _tmp6_; -#line 713 "KeyValueMap.c" +#line 661 "KeyValueMap.c" } else { gfloat _tmp7_; #line 86 "/home/jens/Source/shotwell/src/util/KeyValueMap.vala" _tmp7_ = def; #line 86 "/home/jens/Source/shotwell/src/util/KeyValueMap.vala" _tmp3_ = _tmp7_; -#line 720 "KeyValueMap.c" +#line 668 "KeyValueMap.c" } #line 86 "/home/jens/Source/shotwell/src/util/KeyValueMap.vala" result = _tmp3_; @@ -724,15 +672,13 @@ gfloat key_value_map_get_float (KeyValueMap* self, const gchar* key, gfloat def) _g_free0 (value); #line 86 "/home/jens/Source/shotwell/src/util/KeyValueMap.vala" return result; -#line 728 "KeyValueMap.c" +#line 676 "KeyValueMap.c" } static gboolean bool_parse (const gchar* str) { gboolean result = FALSE; const gchar* _tmp0_; -#line 44 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - g_return_val_if_fail (str != NULL, FALSE); #line 45 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" _tmp0_ = str; #line 45 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" @@ -741,13 +687,13 @@ static gboolean bool_parse (const gchar* str) { result = TRUE; #line 46 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" return result; -#line 745 "KeyValueMap.c" +#line 691 "KeyValueMap.c" } else { #line 48 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" result = FALSE; #line 48 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" return result; -#line 751 "KeyValueMap.c" +#line 697 "KeyValueMap.c" } } @@ -760,10 +706,6 @@ gboolean key_value_map_get_bool (KeyValueMap* self, const gchar* key, gboolean d gpointer _tmp2_; gboolean _tmp3_ = FALSE; const gchar* _tmp4_; -#line 89 "/home/jens/Source/shotwell/src/util/KeyValueMap.vala" - g_return_val_if_fail (IS_KEY_VALUE_MAP (self), FALSE); -#line 89 "/home/jens/Source/shotwell/src/util/KeyValueMap.vala" - g_return_val_if_fail (key != NULL, FALSE); #line 90 "/home/jens/Source/shotwell/src/util/KeyValueMap.vala" _tmp0_ = self->priv->map; #line 90 "/home/jens/Source/shotwell/src/util/KeyValueMap.vala" @@ -776,7 +718,7 @@ gboolean key_value_map_get_bool (KeyValueMap* self, const gchar* key, gboolean d _tmp4_ = value; #line 92 "/home/jens/Source/shotwell/src/util/KeyValueMap.vala" if (_tmp4_ != NULL) { -#line 780 "KeyValueMap.c" +#line 722 "KeyValueMap.c" const gchar* _tmp5_; gboolean _tmp6_; #line 92 "/home/jens/Source/shotwell/src/util/KeyValueMap.vala" @@ -785,14 +727,14 @@ gboolean key_value_map_get_bool (KeyValueMap* self, const gchar* key, gboolean d _tmp6_ = bool_parse (_tmp5_); #line 92 "/home/jens/Source/shotwell/src/util/KeyValueMap.vala" _tmp3_ = _tmp6_; -#line 789 "KeyValueMap.c" +#line 731 "KeyValueMap.c" } else { gboolean _tmp7_; #line 92 "/home/jens/Source/shotwell/src/util/KeyValueMap.vala" _tmp7_ = def; #line 92 "/home/jens/Source/shotwell/src/util/KeyValueMap.vala" _tmp3_ = _tmp7_; -#line 796 "KeyValueMap.c" +#line 738 "KeyValueMap.c" } #line 92 "/home/jens/Source/shotwell/src/util/KeyValueMap.vala" result = _tmp3_; @@ -800,7 +742,7 @@ gboolean key_value_map_get_bool (KeyValueMap* self, const gchar* key, gboolean d _g_free0 (value); #line 92 "/home/jens/Source/shotwell/src/util/KeyValueMap.vala" return result; -#line 804 "KeyValueMap.c" +#line 746 "KeyValueMap.c" } @@ -810,12 +752,6 @@ void key_value_map_get_point (KeyValueMap* self, const gchar* key, GdkPoint* def const gchar* _tmp1_; gpointer _tmp2_; const gchar* _tmp3_; -#line 100 "/home/jens/Source/shotwell/src/util/KeyValueMap.vala" - g_return_if_fail (IS_KEY_VALUE_MAP (self)); -#line 100 "/home/jens/Source/shotwell/src/util/KeyValueMap.vala" - g_return_if_fail (key != NULL); -#line 100 "/home/jens/Source/shotwell/src/util/KeyValueMap.vala" - g_return_if_fail (def != NULL); #line 101 "/home/jens/Source/shotwell/src/util/KeyValueMap.vala" _tmp0_ = self->priv->map; #line 101 "/home/jens/Source/shotwell/src/util/KeyValueMap.vala" @@ -828,7 +764,7 @@ void key_value_map_get_point (KeyValueMap* self, const gchar* key, GdkPoint* def _tmp3_ = value; #line 103 "/home/jens/Source/shotwell/src/util/KeyValueMap.vala" if (_tmp3_ == NULL) { -#line 832 "KeyValueMap.c" +#line 768 "KeyValueMap.c" GdkPoint _tmp4_; #line 104 "/home/jens/Source/shotwell/src/util/KeyValueMap.vala" _tmp4_ = *def; @@ -838,7 +774,7 @@ void key_value_map_get_point (KeyValueMap* self, const gchar* key, GdkPoint* def _g_free0 (value); #line 104 "/home/jens/Source/shotwell/src/util/KeyValueMap.vala" return; -#line 842 "KeyValueMap.c" +#line 778 "KeyValueMap.c" } else { GdkPoint _result_ = {0}; GdkPoint _tmp5_ = {0}; @@ -860,7 +796,7 @@ void key_value_map_get_point (KeyValueMap* self, const gchar* key, GdkPoint* def _g_free0 (value); #line 108 "/home/jens/Source/shotwell/src/util/KeyValueMap.vala" return; -#line 864 "KeyValueMap.c" +#line 800 "KeyValueMap.c" } else { GdkPoint _tmp8_; #line 110 "/home/jens/Source/shotwell/src/util/KeyValueMap.vala" @@ -871,12 +807,12 @@ void key_value_map_get_point (KeyValueMap* self, const gchar* key, GdkPoint* def _g_free0 (value); #line 110 "/home/jens/Source/shotwell/src/util/KeyValueMap.vala" return; -#line 875 "KeyValueMap.c" +#line 811 "KeyValueMap.c" } } #line 100 "/home/jens/Source/shotwell/src/util/KeyValueMap.vala" _g_free0 (value); -#line 880 "KeyValueMap.c" +#line 816 "KeyValueMap.c" } @@ -889,12 +825,6 @@ void key_value_map_set_point (KeyValueMap* self, const gchar* key, GdkPoint* poi gint _tmp5_; gchar* _tmp6_; gchar* _tmp7_; -#line 114 "/home/jens/Source/shotwell/src/util/KeyValueMap.vala" - g_return_if_fail (IS_KEY_VALUE_MAP (self)); -#line 114 "/home/jens/Source/shotwell/src/util/KeyValueMap.vala" - g_return_if_fail (key != NULL); -#line 114 "/home/jens/Source/shotwell/src/util/KeyValueMap.vala" - g_return_if_fail (point != NULL); #line 115 "/home/jens/Source/shotwell/src/util/KeyValueMap.vala" _tmp0_ = self->priv->map; #line 115 "/home/jens/Source/shotwell/src/util/KeyValueMap.vala" @@ -915,14 +845,14 @@ void key_value_map_set_point (KeyValueMap* self, const gchar* key, GdkPoint* poi gee_abstract_map_set (G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, GEE_TYPE_ABSTRACT_MAP, GeeAbstractMap), _tmp1_, _tmp7_); #line 115 "/home/jens/Source/shotwell/src/util/KeyValueMap.vala" _g_free0 (_tmp7_); -#line 919 "KeyValueMap.c" +#line 849 "KeyValueMap.c" } static void value_key_value_map_init (GValue* value) { #line 7 "/home/jens/Source/shotwell/src/util/KeyValueMap.vala" value->data[0].v_pointer = NULL; -#line 926 "KeyValueMap.c" +#line 856 "KeyValueMap.c" } @@ -931,7 +861,7 @@ static void value_key_value_map_free_value (GValue* value) { if (value->data[0].v_pointer) { #line 7 "/home/jens/Source/shotwell/src/util/KeyValueMap.vala" key_value_map_unref (value->data[0].v_pointer); -#line 935 "KeyValueMap.c" +#line 865 "KeyValueMap.c" } } @@ -941,11 +871,11 @@ static void value_key_value_map_copy_value (const GValue* src_value, GValue* des if (src_value->data[0].v_pointer) { #line 7 "/home/jens/Source/shotwell/src/util/KeyValueMap.vala" dest_value->data[0].v_pointer = key_value_map_ref (src_value->data[0].v_pointer); -#line 945 "KeyValueMap.c" +#line 875 "KeyValueMap.c" } else { #line 7 "/home/jens/Source/shotwell/src/util/KeyValueMap.vala" dest_value->data[0].v_pointer = NULL; -#line 949 "KeyValueMap.c" +#line 879 "KeyValueMap.c" } } @@ -953,37 +883,37 @@ static void value_key_value_map_copy_value (const GValue* src_value, GValue* des static gpointer value_key_value_map_peek_pointer (const GValue* value) { #line 7 "/home/jens/Source/shotwell/src/util/KeyValueMap.vala" return value->data[0].v_pointer; -#line 957 "KeyValueMap.c" +#line 887 "KeyValueMap.c" } static gchar* value_key_value_map_collect_value (GValue* value, guint n_collect_values, GTypeCValue* collect_values, guint collect_flags) { #line 7 "/home/jens/Source/shotwell/src/util/KeyValueMap.vala" if (collect_values[0].v_pointer) { -#line 964 "KeyValueMap.c" +#line 894 "KeyValueMap.c" KeyValueMap * object; object = collect_values[0].v_pointer; #line 7 "/home/jens/Source/shotwell/src/util/KeyValueMap.vala" if (object->parent_instance.g_class == NULL) { #line 7 "/home/jens/Source/shotwell/src/util/KeyValueMap.vala" return g_strconcat ("invalid unclassed object pointer for value type `", G_VALUE_TYPE_NAME (value), "'", NULL); -#line 971 "KeyValueMap.c" +#line 901 "KeyValueMap.c" } else if (!g_value_type_compatible (G_TYPE_FROM_INSTANCE (object), G_VALUE_TYPE (value))) { #line 7 "/home/jens/Source/shotwell/src/util/KeyValueMap.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 975 "KeyValueMap.c" +#line 905 "KeyValueMap.c" } #line 7 "/home/jens/Source/shotwell/src/util/KeyValueMap.vala" value->data[0].v_pointer = key_value_map_ref (object); -#line 979 "KeyValueMap.c" +#line 909 "KeyValueMap.c" } else { #line 7 "/home/jens/Source/shotwell/src/util/KeyValueMap.vala" value->data[0].v_pointer = NULL; -#line 983 "KeyValueMap.c" +#line 913 "KeyValueMap.c" } #line 7 "/home/jens/Source/shotwell/src/util/KeyValueMap.vala" return NULL; -#line 987 "KeyValueMap.c" +#line 917 "KeyValueMap.c" } @@ -994,25 +924,25 @@ static gchar* value_key_value_map_lcopy_value (const GValue* value, guint n_coll if (!object_p) { #line 7 "/home/jens/Source/shotwell/src/util/KeyValueMap.vala" return g_strdup_printf ("value location for `%s' passed as NULL", G_VALUE_TYPE_NAME (value)); -#line 998 "KeyValueMap.c" +#line 928 "KeyValueMap.c" } #line 7 "/home/jens/Source/shotwell/src/util/KeyValueMap.vala" if (!value->data[0].v_pointer) { #line 7 "/home/jens/Source/shotwell/src/util/KeyValueMap.vala" *object_p = NULL; -#line 1004 "KeyValueMap.c" +#line 934 "KeyValueMap.c" } else if (collect_flags & G_VALUE_NOCOPY_CONTENTS) { #line 7 "/home/jens/Source/shotwell/src/util/KeyValueMap.vala" *object_p = value->data[0].v_pointer; -#line 1008 "KeyValueMap.c" +#line 938 "KeyValueMap.c" } else { #line 7 "/home/jens/Source/shotwell/src/util/KeyValueMap.vala" *object_p = key_value_map_ref (value->data[0].v_pointer); -#line 1012 "KeyValueMap.c" +#line 942 "KeyValueMap.c" } #line 7 "/home/jens/Source/shotwell/src/util/KeyValueMap.vala" return NULL; -#line 1016 "KeyValueMap.c" +#line 946 "KeyValueMap.c" } @@ -1026,7 +956,7 @@ GParamSpec* param_spec_key_value_map (const gchar* name, const gchar* nick, cons G_PARAM_SPEC (spec)->value_type = object_type; #line 7 "/home/jens/Source/shotwell/src/util/KeyValueMap.vala" return G_PARAM_SPEC (spec); -#line 1030 "KeyValueMap.c" +#line 960 "KeyValueMap.c" } @@ -1035,7 +965,7 @@ gpointer value_get_key_value_map (const GValue* value) { g_return_val_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, TYPE_KEY_VALUE_MAP), NULL); #line 7 "/home/jens/Source/shotwell/src/util/KeyValueMap.vala" return value->data[0].v_pointer; -#line 1039 "KeyValueMap.c" +#line 969 "KeyValueMap.c" } @@ -1055,17 +985,17 @@ void value_set_key_value_map (GValue* value, gpointer v_object) { value->data[0].v_pointer = v_object; #line 7 "/home/jens/Source/shotwell/src/util/KeyValueMap.vala" key_value_map_ref (value->data[0].v_pointer); -#line 1059 "KeyValueMap.c" +#line 989 "KeyValueMap.c" } else { #line 7 "/home/jens/Source/shotwell/src/util/KeyValueMap.vala" value->data[0].v_pointer = NULL; -#line 1063 "KeyValueMap.c" +#line 993 "KeyValueMap.c" } #line 7 "/home/jens/Source/shotwell/src/util/KeyValueMap.vala" if (old) { #line 7 "/home/jens/Source/shotwell/src/util/KeyValueMap.vala" key_value_map_unref (old); -#line 1069 "KeyValueMap.c" +#line 999 "KeyValueMap.c" } } @@ -1084,17 +1014,17 @@ void value_take_key_value_map (GValue* value, gpointer v_object) { 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/util/KeyValueMap.vala" value->data[0].v_pointer = v_object; -#line 1088 "KeyValueMap.c" +#line 1018 "KeyValueMap.c" } else { #line 7 "/home/jens/Source/shotwell/src/util/KeyValueMap.vala" value->data[0].v_pointer = NULL; -#line 1092 "KeyValueMap.c" +#line 1022 "KeyValueMap.c" } #line 7 "/home/jens/Source/shotwell/src/util/KeyValueMap.vala" if (old) { #line 7 "/home/jens/Source/shotwell/src/util/KeyValueMap.vala" key_value_map_unref (old); -#line 1098 "KeyValueMap.c" +#line 1028 "KeyValueMap.c" } } @@ -1106,7 +1036,7 @@ static void key_value_map_class_init (KeyValueMapClass * klass) { ((KeyValueMapClass *) klass)->finalize = key_value_map_finalize; #line 7 "/home/jens/Source/shotwell/src/util/KeyValueMap.vala" g_type_class_add_private (klass, sizeof (KeyValueMapPrivate)); -#line 1110 "KeyValueMap.c" +#line 1040 "KeyValueMap.c" } @@ -1120,7 +1050,7 @@ static void key_value_map_instance_init (KeyValueMap * self) { self->priv->map = _tmp0_; #line 7 "/home/jens/Source/shotwell/src/util/KeyValueMap.vala" self->ref_count = 1; -#line 1124 "KeyValueMap.c" +#line 1054 "KeyValueMap.c" } @@ -1134,7 +1064,7 @@ static void key_value_map_finalize (KeyValueMap * obj) { _g_free0 (self->priv->group); #line 9 "/home/jens/Source/shotwell/src/util/KeyValueMap.vala" _g_object_unref0 (self->priv->map); -#line 1138 "KeyValueMap.c" +#line 1068 "KeyValueMap.c" } @@ -1159,7 +1089,7 @@ gpointer key_value_map_ref (gpointer instance) { g_atomic_int_inc (&self->ref_count); #line 7 "/home/jens/Source/shotwell/src/util/KeyValueMap.vala" return instance; -#line 1163 "KeyValueMap.c" +#line 1093 "KeyValueMap.c" } @@ -1172,7 +1102,7 @@ void key_value_map_unref (gpointer instance) { KEY_VALUE_MAP_GET_CLASS (self)->finalize (self); #line 7 "/home/jens/Source/shotwell/src/util/KeyValueMap.vala" g_type_free_instance ((GTypeInstance *) self); -#line 1176 "KeyValueMap.c" +#line 1106 "KeyValueMap.c" } } diff --git a/src/util/image.c b/src/util/image.c index d103a3f..324464c 100644 --- a/src/util/image.c +++ b/src/util/image.c @@ -27,6 +27,27 @@ typedef struct _Dimensions Dimensions; #define _cairo_destroy0(var) ((var == NULL) ? NULL : (var = (cairo_destroy (var), NULL))) #define _cairo_surface_destroy0(var) ((var == NULL) ? NULL : (var = (cairo_surface_destroy (var), NULL))) +#define TYPE_CONFIGURATION_FACADE (configuration_facade_get_type ()) +#define CONFIGURATION_FACADE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_CONFIGURATION_FACADE, ConfigurationFacade)) +#define CONFIGURATION_FACADE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_CONFIGURATION_FACADE, ConfigurationFacadeClass)) +#define IS_CONFIGURATION_FACADE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_CONFIGURATION_FACADE)) +#define IS_CONFIGURATION_FACADE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_CONFIGURATION_FACADE)) +#define CONFIGURATION_FACADE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_CONFIGURATION_FACADE, ConfigurationFacadeClass)) + +typedef struct _ConfigurationFacade ConfigurationFacade; +typedef struct _ConfigurationFacadeClass ConfigurationFacadeClass; + +#define CONFIG_TYPE_FACADE (config_facade_get_type ()) +#define CONFIG_FACADE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), CONFIG_TYPE_FACADE, ConfigFacade)) +#define CONFIG_FACADE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), CONFIG_TYPE_FACADE, ConfigFacadeClass)) +#define CONFIG_IS_FACADE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), CONFIG_TYPE_FACADE)) +#define CONFIG_IS_FACADE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), CONFIG_TYPE_FACADE)) +#define CONFIG_FACADE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), CONFIG_TYPE_FACADE, ConfigFacadeClass)) + +typedef struct _ConfigFacade ConfigFacade; +typedef struct _ConfigFacadeClass ConfigFacadeClass; +#define _g_free0(var) (var = (g_free (var), NULL)) + #define TYPE_BOX (box_get_type ()) typedef struct _Box Box; #define _vala_assert(expr, msg) if G_LIKELY (expr) ; else g_assertion_message_expr (G_LOG_DOMAIN, __FILE__, __LINE__, G_STRFUNC, msg); @@ -47,6 +68,8 @@ struct _Box { }; +extern cairo_surface_t* background_surface; +cairo_surface_t* background_surface = NULL; gboolean is_color_parsable (const gchar* spec); void parse_color (const gchar* spec, GdkRGBA* result); @@ -82,6 +105,14 @@ gdouble degrees_to_radians (gdouble theta); GdkPixbuf* rotate_arb (GdkPixbuf* source_pixbuf, gdouble angle); void rotate_point_arb (GdkPoint* source_point, gint img_w, gint img_h, gdouble angle, gboolean invert, GdkPoint* result); void derotate_point_arb (GdkPoint* source_point, gint img_w, gint img_h, gdouble angle, GdkPoint* result); +cairo_surface_t* get_background_surface (void); +GType configuration_facade_get_type (void) G_GNUC_CONST; +GType config_facade_get_type (void) G_GNUC_CONST; +ConfigFacade* config_facade_get_instance (void); +gchar* configuration_facade_get_transparent_background_type (ConfigurationFacade* self); +gchar* configuration_facade_get_transparent_background_color (ConfigurationFacade* self); +void invalidate_transparent_background (void); +void paint_pixmap_with_background (cairo_t* ctx, GdkPixbuf* pixbuf, gint x, gint y); GType box_get_type (void) G_GNUC_CONST; Box* box_dup (const Box* self); void box_free (Box* self); @@ -108,7 +139,7 @@ gboolean is_color_parsable (const gchar* spec) { result = _tmp1_; #line 119 "/home/jens/Source/shotwell/src/util/image.vala" return result; -#line 112 "image.c" +#line 143 "image.c" } @@ -125,7 +156,7 @@ void parse_color (const gchar* spec, GdkRGBA* result) { *result = _tmp1_; #line 123 "/home/jens/Source/shotwell/src/util/image.vala" return; -#line 129 "image.c" +#line 160 "image.c" } @@ -143,19 +174,19 @@ void fetch_color (const gchar* spec, GdkRGBA* result) { _tmp1_ = gdk_rgba_parse (&rgba, _tmp0_); #line 128 "/home/jens/Source/shotwell/src/util/image.vala" if (!_tmp1_) { -#line 147 "image.c" +#line 178 "image.c" const gchar* _tmp2_; #line 129 "/home/jens/Source/shotwell/src/util/image.vala" _tmp2_ = spec; #line 129 "/home/jens/Source/shotwell/src/util/image.vala" g_error ("image.vala:129: Can't parse color %s", _tmp2_); -#line 153 "image.c" +#line 184 "image.c" } #line 131 "/home/jens/Source/shotwell/src/util/image.vala" *result = rgba; #line 131 "/home/jens/Source/shotwell/src/util/image.vala" return; -#line 159 "image.c" +#line 190 "image.c" } @@ -202,14 +233,14 @@ void set_source_color_from_string (cairo_t* ctx, const gchar* spec) { _tmp10_ = _tmp9_.alpha; #line 136 "/home/jens/Source/shotwell/src/util/image.vala" cairo_set_source_rgba (_tmp2_, _tmp4_, _tmp6_, _tmp8_, _tmp10_); -#line 206 "image.c" +#line 237 "image.c" } static gpointer _g_object_ref0 (gpointer self) { #line 147 "/home/jens/Source/shotwell/src/util/image.vala" return self ? g_object_ref (self) : NULL; -#line 213 "image.c" +#line 244 "image.c" } @@ -219,7 +250,7 @@ GdkPixbuf* get_placeholder_pixbuf (void) { GError * _inner_error_ = NULL; #line 144 "/home/jens/Source/shotwell/src/util/image.vala" pixbuf = NULL; -#line 223 "image.c" +#line 254 "image.c" { GtkIconTheme* icon_theme = NULL; GtkIconTheme* _tmp0_; @@ -241,7 +272,7 @@ GdkPixbuf* get_placeholder_pixbuf (void) { if (G_UNLIKELY (_inner_error_ != NULL)) { #line 148 "/home/jens/Source/shotwell/src/util/image.vala" _g_object_unref0 (icon_theme); -#line 245 "image.c" +#line 276 "image.c" goto __catch4_g_error; } #line 148 "/home/jens/Source/shotwell/src/util/image.vala" @@ -256,7 +287,7 @@ GdkPixbuf* get_placeholder_pixbuf (void) { _g_object_unref0 (_tmp2_); #line 146 "/home/jens/Source/shotwell/src/util/image.vala" _g_object_unref0 (icon_theme); -#line 260 "image.c" +#line 291 "image.c" } goto __finally4; __catch4_g_error: @@ -283,7 +314,7 @@ GdkPixbuf* get_placeholder_pixbuf (void) { g_warning ("image.vala:152: Could not load icon from theme: %s", _tmp7_); #line 146 "/home/jens/Source/shotwell/src/util/image.vala" _g_error_free0 (_error_); -#line 287 "image.c" +#line 318 "image.c" } __finally4: #line 146 "/home/jens/Source/shotwell/src/util/image.vala" @@ -296,13 +327,13 @@ GdkPixbuf* get_placeholder_pixbuf (void) { g_clear_error (&_inner_error_); #line 146 "/home/jens/Source/shotwell/src/util/image.vala" return NULL; -#line 300 "image.c" +#line 331 "image.c" } #line 155 "/home/jens/Source/shotwell/src/util/image.vala" result = pixbuf; #line 155 "/home/jens/Source/shotwell/src/util/image.vala" return result; -#line 306 "image.c" +#line 337 "image.c" } @@ -354,7 +385,7 @@ GdkPixbuf* scale_pixbuf (GdkPixbuf* pixbuf, gint scale, GdkInterpType interp, gb _tmp9_ = _tmp8_.width; #line 161 "/home/jens/Source/shotwell/src/util/image.vala" if (_tmp7_ == _tmp9_) { -#line 358 "image.c" +#line 389 "image.c" Dimensions _tmp10_; gint _tmp11_; Dimensions _tmp12_; @@ -369,15 +400,15 @@ GdkPixbuf* scale_pixbuf (GdkPixbuf* pixbuf, gint scale, GdkInterpType interp, gb _tmp13_ = _tmp12_.height; #line 161 "/home/jens/Source/shotwell/src/util/image.vala" _tmp5_ = _tmp11_ == _tmp13_; -#line 373 "image.c" +#line 404 "image.c" } else { #line 161 "/home/jens/Source/shotwell/src/util/image.vala" _tmp5_ = FALSE; -#line 377 "image.c" +#line 408 "image.c" } #line 161 "/home/jens/Source/shotwell/src/util/image.vala" if (_tmp5_) { -#line 381 "image.c" +#line 412 "image.c" GdkPixbuf* _tmp14_; GdkPixbuf* _tmp15_; #line 162 "/home/jens/Source/shotwell/src/util/image.vala" @@ -388,7 +419,7 @@ GdkPixbuf* scale_pixbuf (GdkPixbuf* pixbuf, gint scale, GdkInterpType interp, gb result = _tmp15_; #line 162 "/home/jens/Source/shotwell/src/util/image.vala" return result; -#line 392 "image.c" +#line 423 "image.c" } #line 165 "/home/jens/Source/shotwell/src/util/image.vala" dimensions_with_min (&scaled, MIN_SCALED_WIDTH, MIN_SCALED_HEIGHT, &_tmp16_); @@ -412,7 +443,7 @@ GdkPixbuf* scale_pixbuf (GdkPixbuf* pixbuf, gint scale, GdkInterpType interp, gb result = _tmp23_; #line 167 "/home/jens/Source/shotwell/src/util/image.vala" return result; -#line 416 "image.c" +#line 447 "image.c" } @@ -454,7 +485,7 @@ GdkPixbuf* resize_pixbuf (GdkPixbuf* pixbuf, Dimensions* resized, GdkInterpType _tmp6_ = _tmp5_.width; #line 172 "/home/jens/Source/shotwell/src/util/image.vala" if (_tmp4_ == _tmp6_) { -#line 458 "image.c" +#line 489 "image.c" Dimensions _tmp7_; gint _tmp8_; Dimensions _tmp9_; @@ -469,15 +500,15 @@ GdkPixbuf* resize_pixbuf (GdkPixbuf* pixbuf, Dimensions* resized, GdkInterpType _tmp10_ = _tmp9_.height; #line 172 "/home/jens/Source/shotwell/src/util/image.vala" _tmp2_ = _tmp8_ == _tmp10_; -#line 473 "image.c" +#line 504 "image.c" } else { #line 172 "/home/jens/Source/shotwell/src/util/image.vala" _tmp2_ = FALSE; -#line 477 "image.c" +#line 508 "image.c" } #line 172 "/home/jens/Source/shotwell/src/util/image.vala" if (_tmp2_) { -#line 481 "image.c" +#line 512 "image.c" GdkPixbuf* _tmp11_; GdkPixbuf* _tmp12_; #line 173 "/home/jens/Source/shotwell/src/util/image.vala" @@ -488,7 +519,7 @@ GdkPixbuf* resize_pixbuf (GdkPixbuf* pixbuf, Dimensions* resized, GdkInterpType result = _tmp12_; #line 173 "/home/jens/Source/shotwell/src/util/image.vala" return result; -#line 492 "image.c" +#line 523 "image.c" } #line 176 "/home/jens/Source/shotwell/src/util/image.vala" dimensions_with_min (resized, MIN_SCALED_WIDTH, MIN_SCALED_HEIGHT, &_tmp13_); @@ -512,7 +543,7 @@ GdkPixbuf* resize_pixbuf (GdkPixbuf* pixbuf, Dimensions* resized, GdkInterpType result = _tmp20_; #line 178 "/home/jens/Source/shotwell/src/util/image.vala" return result; -#line 516 "image.c" +#line 547 "image.c" } @@ -542,7 +573,7 @@ void draw_rounded_corners_filled (cairo_t* ctx, Dimensions* dim, GdkPoint* origi _tmp4_ = ctx; #line 186 "/home/jens/Source/shotwell/src/util/image.vala" cairo_paint (_tmp4_); -#line 546 "image.c" +#line 577 "image.c" } @@ -648,7 +679,7 @@ void context_rounded_corners (cairo_t* cx, Dimensions* dim, GdkPoint* origin, gd _tmp21_ = cx; #line 209 "/home/jens/Source/shotwell/src/util/image.vala" cairo_clip (_tmp21_); -#line 652 "image.c" +#line 683 "image.c" } @@ -667,7 +698,7 @@ inline guchar shift_color_byte (gint b, gint shift) { result = (guchar) _tmp2_; #line 213 "/home/jens/Source/shotwell/src/util/image.vala" return result; -#line 671 "image.c" +#line 702 "image.c" } @@ -706,17 +737,17 @@ void shift_colors (GdkPixbuf* pixbuf, gint red, gint green, gint blue, gint alph _tmp1_ = red; #line 217 "/home/jens/Source/shotwell/src/util/image.vala" if (_tmp1_ >= -255) { -#line 710 "image.c" +#line 741 "image.c" gint _tmp2_; #line 217 "/home/jens/Source/shotwell/src/util/image.vala" _tmp2_ = red; #line 217 "/home/jens/Source/shotwell/src/util/image.vala" _tmp0_ = _tmp2_ <= 255; -#line 716 "image.c" +#line 747 "image.c" } else { #line 217 "/home/jens/Source/shotwell/src/util/image.vala" _tmp0_ = FALSE; -#line 720 "image.c" +#line 751 "image.c" } #line 217 "/home/jens/Source/shotwell/src/util/image.vala" _vala_assert (_tmp0_, "red >= -255 && red <= 255"); @@ -724,17 +755,17 @@ void shift_colors (GdkPixbuf* pixbuf, gint red, gint green, gint blue, gint alph _tmp4_ = green; #line 218 "/home/jens/Source/shotwell/src/util/image.vala" if (_tmp4_ >= -255) { -#line 728 "image.c" +#line 759 "image.c" gint _tmp5_; #line 218 "/home/jens/Source/shotwell/src/util/image.vala" _tmp5_ = green; #line 218 "/home/jens/Source/shotwell/src/util/image.vala" _tmp3_ = _tmp5_ <= 255; -#line 734 "image.c" +#line 765 "image.c" } else { #line 218 "/home/jens/Source/shotwell/src/util/image.vala" _tmp3_ = FALSE; -#line 738 "image.c" +#line 769 "image.c" } #line 218 "/home/jens/Source/shotwell/src/util/image.vala" _vala_assert (_tmp3_, "green >= -255 && green <= 255"); @@ -742,17 +773,17 @@ void shift_colors (GdkPixbuf* pixbuf, gint red, gint green, gint blue, gint alph _tmp7_ = blue; #line 219 "/home/jens/Source/shotwell/src/util/image.vala" if (_tmp7_ >= -255) { -#line 746 "image.c" +#line 777 "image.c" gint _tmp8_; #line 219 "/home/jens/Source/shotwell/src/util/image.vala" _tmp8_ = blue; #line 219 "/home/jens/Source/shotwell/src/util/image.vala" _tmp6_ = _tmp8_ <= 255; -#line 752 "image.c" +#line 783 "image.c" } else { #line 219 "/home/jens/Source/shotwell/src/util/image.vala" _tmp6_ = FALSE; -#line 756 "image.c" +#line 787 "image.c" } #line 219 "/home/jens/Source/shotwell/src/util/image.vala" _vala_assert (_tmp6_, "blue >= -255 && blue <= 255"); @@ -760,17 +791,17 @@ void shift_colors (GdkPixbuf* pixbuf, gint red, gint green, gint blue, gint alph _tmp10_ = alpha; #line 220 "/home/jens/Source/shotwell/src/util/image.vala" if (_tmp10_ >= -255) { -#line 764 "image.c" +#line 795 "image.c" gint _tmp11_; #line 220 "/home/jens/Source/shotwell/src/util/image.vala" _tmp11_ = alpha; #line 220 "/home/jens/Source/shotwell/src/util/image.vala" _tmp9_ = _tmp11_ <= 255; -#line 770 "image.c" +#line 801 "image.c" } else { #line 220 "/home/jens/Source/shotwell/src/util/image.vala" _tmp9_ = FALSE; -#line 774 "image.c" +#line 805 "image.c" } #line 220 "/home/jens/Source/shotwell/src/util/image.vala" _vala_assert (_tmp9_, "alpha >= -255 && alpha <= 255"); @@ -820,19 +851,19 @@ void shift_colors (GdkPixbuf* pixbuf, gint red, gint green, gint blue, gint alph _tmp26_ = gdk_pixbuf_get_bits_per_sample (_tmp25_); #line 230 "/home/jens/Source/shotwell/src/util/image.vala" _vala_assert (_tmp26_ == 8, "pixbuf.get_bits_per_sample() == 8"); -#line 824 "image.c" +#line 855 "image.c" { gint y = 0; #line 232 "/home/jens/Source/shotwell/src/util/image.vala" y = 0; -#line 829 "image.c" +#line 860 "image.c" { gboolean _tmp27_ = FALSE; #line 232 "/home/jens/Source/shotwell/src/util/image.vala" _tmp27_ = TRUE; #line 232 "/home/jens/Source/shotwell/src/util/image.vala" while (TRUE) { -#line 836 "image.c" +#line 867 "image.c" gint _tmp29_; gint _tmp30_; gint y_offset = 0; @@ -840,13 +871,13 @@ void shift_colors (GdkPixbuf* pixbuf, gint red, gint green, gint blue, gint alph gint _tmp32_; #line 232 "/home/jens/Source/shotwell/src/util/image.vala" if (!_tmp27_) { -#line 844 "image.c" +#line 875 "image.c" gint _tmp28_; #line 232 "/home/jens/Source/shotwell/src/util/image.vala" _tmp28_ = y; #line 232 "/home/jens/Source/shotwell/src/util/image.vala" y = _tmp28_ + 1; -#line 850 "image.c" +#line 881 "image.c" } #line 232 "/home/jens/Source/shotwell/src/util/image.vala" _tmp27_ = FALSE; @@ -858,7 +889,7 @@ void shift_colors (GdkPixbuf* pixbuf, gint red, gint green, gint blue, gint alph if (!(_tmp29_ < _tmp30_)) { #line 232 "/home/jens/Source/shotwell/src/util/image.vala" break; -#line 862 "image.c" +#line 893 "image.c" } #line 233 "/home/jens/Source/shotwell/src/util/image.vala" _tmp31_ = y; @@ -866,19 +897,19 @@ void shift_colors (GdkPixbuf* pixbuf, gint red, gint green, gint blue, gint alph _tmp32_ = rowstride; #line 233 "/home/jens/Source/shotwell/src/util/image.vala" y_offset = _tmp31_ * _tmp32_; -#line 870 "image.c" +#line 901 "image.c" { gint x = 0; #line 235 "/home/jens/Source/shotwell/src/util/image.vala" x = 0; -#line 875 "image.c" +#line 906 "image.c" { gboolean _tmp33_ = FALSE; #line 235 "/home/jens/Source/shotwell/src/util/image.vala" _tmp33_ = TRUE; #line 235 "/home/jens/Source/shotwell/src/util/image.vala" while (TRUE) { -#line 882 "image.c" +#line 913 "image.c" gint _tmp35_; gint _tmp36_; gint offset = 0; @@ -892,13 +923,13 @@ void shift_colors (GdkPixbuf* pixbuf, gint red, gint green, gint blue, gint alph gint _tmp68_; #line 235 "/home/jens/Source/shotwell/src/util/image.vala" if (!_tmp33_) { -#line 896 "image.c" +#line 927 "image.c" gint _tmp34_; #line 235 "/home/jens/Source/shotwell/src/util/image.vala" _tmp34_ = x; #line 235 "/home/jens/Source/shotwell/src/util/image.vala" x = _tmp34_ + 1; -#line 902 "image.c" +#line 933 "image.c" } #line 235 "/home/jens/Source/shotwell/src/util/image.vala" _tmp33_ = FALSE; @@ -910,7 +941,7 @@ void shift_colors (GdkPixbuf* pixbuf, gint red, gint green, gint blue, gint alph if (!(_tmp35_ < _tmp36_)) { #line 235 "/home/jens/Source/shotwell/src/util/image.vala" break; -#line 914 "image.c" +#line 945 "image.c" } #line 236 "/home/jens/Source/shotwell/src/util/image.vala" _tmp37_ = y_offset; @@ -924,7 +955,7 @@ void shift_colors (GdkPixbuf* pixbuf, gint red, gint green, gint blue, gint alph _tmp40_ = red; #line 238 "/home/jens/Source/shotwell/src/util/image.vala" if (_tmp40_ != 0) { -#line 928 "image.c" +#line 959 "image.c" guchar* _tmp41_; gint _tmp42_; guchar* _tmp43_; @@ -951,13 +982,13 @@ void shift_colors (GdkPixbuf* pixbuf, gint red, gint green, gint blue, gint alph _tmp41_[_tmp42_] = _tmp47_; #line 239 "/home/jens/Source/shotwell/src/util/image.vala" _tmp48_ = _tmp41_[_tmp42_]; -#line 955 "image.c" +#line 986 "image.c" } #line 241 "/home/jens/Source/shotwell/src/util/image.vala" _tmp49_ = green; #line 241 "/home/jens/Source/shotwell/src/util/image.vala" if (_tmp49_ != 0) { -#line 961 "image.c" +#line 992 "image.c" guchar* _tmp50_; gint _tmp51_; guchar* _tmp52_; @@ -984,13 +1015,13 @@ void shift_colors (GdkPixbuf* pixbuf, gint red, gint green, gint blue, gint alph _tmp50_[_tmp51_ + 1] = _tmp56_; #line 242 "/home/jens/Source/shotwell/src/util/image.vala" _tmp57_ = _tmp50_[_tmp51_ + 1]; -#line 988 "image.c" +#line 1019 "image.c" } #line 244 "/home/jens/Source/shotwell/src/util/image.vala" _tmp58_ = blue; #line 244 "/home/jens/Source/shotwell/src/util/image.vala" if (_tmp58_ != 0) { -#line 994 "image.c" +#line 1025 "image.c" guchar* _tmp59_; gint _tmp60_; guchar* _tmp61_; @@ -1017,27 +1048,27 @@ void shift_colors (GdkPixbuf* pixbuf, gint red, gint green, gint blue, gint alph _tmp59_[_tmp60_ + 2] = _tmp65_; #line 245 "/home/jens/Source/shotwell/src/util/image.vala" _tmp66_ = _tmp59_[_tmp60_ + 2]; -#line 1021 "image.c" +#line 1052 "image.c" } #line 247 "/home/jens/Source/shotwell/src/util/image.vala" _tmp68_ = alpha; #line 247 "/home/jens/Source/shotwell/src/util/image.vala" if (_tmp68_ != 0) { -#line 1027 "image.c" +#line 1058 "image.c" gint _tmp69_; #line 247 "/home/jens/Source/shotwell/src/util/image.vala" _tmp69_ = channels; #line 247 "/home/jens/Source/shotwell/src/util/image.vala" _tmp67_ = _tmp69_ >= 4; -#line 1033 "image.c" +#line 1064 "image.c" } else { #line 247 "/home/jens/Source/shotwell/src/util/image.vala" _tmp67_ = FALSE; -#line 1037 "image.c" +#line 1068 "image.c" } #line 247 "/home/jens/Source/shotwell/src/util/image.vala" if (_tmp67_) { -#line 1041 "image.c" +#line 1072 "image.c" guchar* _tmp70_; gint _tmp71_; guchar* _tmp72_; @@ -1064,7 +1095,7 @@ void shift_colors (GdkPixbuf* pixbuf, gint red, gint green, gint blue, gint alph _tmp70_[_tmp71_ + 3] = _tmp76_; #line 248 "/home/jens/Source/shotwell/src/util/image.vala" _tmp77_ = _tmp70_[_tmp71_ + 3]; -#line 1068 "image.c" +#line 1099 "image.c" } } } @@ -1093,7 +1124,7 @@ gboolean coord_in_rectangle (gint x, gint y, GdkRectangle* rect) { _tmp5_ = _tmp4_.x; #line 254 "/home/jens/Source/shotwell/src/util/image.vala" if (_tmp3_ >= _tmp5_) { -#line 1097 "image.c" +#line 1128 "image.c" gint _tmp6_; GdkRectangle _tmp7_; gint _tmp8_; @@ -1111,15 +1142,15 @@ gboolean coord_in_rectangle (gint x, gint y, GdkRectangle* rect) { _tmp10_ = _tmp9_.width; #line 254 "/home/jens/Source/shotwell/src/util/image.vala" _tmp2_ = _tmp6_ < (_tmp8_ + _tmp10_); -#line 1115 "image.c" +#line 1146 "image.c" } else { #line 254 "/home/jens/Source/shotwell/src/util/image.vala" _tmp2_ = FALSE; -#line 1119 "image.c" +#line 1150 "image.c" } #line 254 "/home/jens/Source/shotwell/src/util/image.vala" if (_tmp2_) { -#line 1123 "image.c" +#line 1154 "image.c" gint _tmp11_; GdkRectangle _tmp12_; gint _tmp13_; @@ -1131,15 +1162,15 @@ gboolean coord_in_rectangle (gint x, gint y, GdkRectangle* rect) { _tmp13_ = _tmp12_.y; #line 254 "/home/jens/Source/shotwell/src/util/image.vala" _tmp1_ = _tmp11_ >= _tmp13_; -#line 1135 "image.c" +#line 1166 "image.c" } else { #line 254 "/home/jens/Source/shotwell/src/util/image.vala" _tmp1_ = FALSE; -#line 1139 "image.c" +#line 1170 "image.c" } #line 254 "/home/jens/Source/shotwell/src/util/image.vala" if (_tmp1_) { -#line 1143 "image.c" +#line 1174 "image.c" gint _tmp14_; GdkRectangle _tmp15_; gint _tmp16_; @@ -1157,17 +1188,17 @@ gboolean coord_in_rectangle (gint x, gint y, GdkRectangle* rect) { _tmp18_ = _tmp17_.height; #line 254 "/home/jens/Source/shotwell/src/util/image.vala" _tmp0_ = _tmp14_ <= (_tmp16_ + _tmp18_); -#line 1161 "image.c" +#line 1192 "image.c" } else { #line 254 "/home/jens/Source/shotwell/src/util/image.vala" _tmp0_ = FALSE; -#line 1165 "image.c" +#line 1196 "image.c" } #line 254 "/home/jens/Source/shotwell/src/util/image.vala" result = _tmp0_; #line 254 "/home/jens/Source/shotwell/src/util/image.vala" return result; -#line 1171 "image.c" +#line 1202 "image.c" } @@ -1194,7 +1225,7 @@ gboolean rectangles_equal (GdkRectangle* a, GdkRectangle* b) { _tmp6_ = _tmp5_.x; #line 258 "/home/jens/Source/shotwell/src/util/image.vala" if (_tmp4_ == _tmp6_) { -#line 1198 "image.c" +#line 1229 "image.c" GdkRectangle _tmp7_; gint _tmp8_; GdkRectangle _tmp9_; @@ -1209,15 +1240,15 @@ gboolean rectangles_equal (GdkRectangle* a, GdkRectangle* b) { _tmp10_ = _tmp9_.y; #line 258 "/home/jens/Source/shotwell/src/util/image.vala" _tmp2_ = _tmp8_ == _tmp10_; -#line 1213 "image.c" +#line 1244 "image.c" } else { #line 258 "/home/jens/Source/shotwell/src/util/image.vala" _tmp2_ = FALSE; -#line 1217 "image.c" +#line 1248 "image.c" } #line 258 "/home/jens/Source/shotwell/src/util/image.vala" if (_tmp2_) { -#line 1221 "image.c" +#line 1252 "image.c" GdkRectangle _tmp11_; gint _tmp12_; GdkRectangle _tmp13_; @@ -1232,15 +1263,15 @@ gboolean rectangles_equal (GdkRectangle* a, GdkRectangle* b) { _tmp14_ = _tmp13_.width; #line 258 "/home/jens/Source/shotwell/src/util/image.vala" _tmp1_ = _tmp12_ == _tmp14_; -#line 1236 "image.c" +#line 1267 "image.c" } else { #line 258 "/home/jens/Source/shotwell/src/util/image.vala" _tmp1_ = FALSE; -#line 1240 "image.c" +#line 1271 "image.c" } #line 258 "/home/jens/Source/shotwell/src/util/image.vala" if (_tmp1_) { -#line 1244 "image.c" +#line 1275 "image.c" GdkRectangle _tmp15_; gint _tmp16_; GdkRectangle _tmp17_; @@ -1255,17 +1286,17 @@ gboolean rectangles_equal (GdkRectangle* a, GdkRectangle* b) { _tmp18_ = _tmp17_.height; #line 258 "/home/jens/Source/shotwell/src/util/image.vala" _tmp0_ = _tmp16_ == _tmp18_; -#line 1259 "image.c" +#line 1290 "image.c" } else { #line 258 "/home/jens/Source/shotwell/src/util/image.vala" _tmp0_ = FALSE; -#line 1263 "image.c" +#line 1294 "image.c" } #line 258 "/home/jens/Source/shotwell/src/util/image.vala" result = _tmp0_; #line 258 "/home/jens/Source/shotwell/src/util/image.vala" return result; -#line 1269 "image.c" +#line 1300 "image.c" } @@ -1304,7 +1335,7 @@ gchar* rectangle_to_string (GdkRectangle* rect) { result = _tmp8_; #line 262 "/home/jens/Source/shotwell/src/util/image.vala" return result; -#line 1308 "image.c" +#line 1339 "image.c" } @@ -1388,7 +1419,7 @@ void clamp_rectangle (GdkRectangle* original, Dimensions* max, GdkRectangle* res *result = rect; #line 272 "/home/jens/Source/shotwell/src/util/image.vala" return; -#line 1392 "image.c" +#line 1423 "image.c" } @@ -1427,7 +1458,7 @@ void scale_point (GdkPoint* p, gdouble factor, GdkPoint* result) { *result = _result_; #line 280 "/home/jens/Source/shotwell/src/util/image.vala" return; -#line 1431 "image.c" +#line 1462 "image.c" } @@ -1474,7 +1505,7 @@ void add_points (GdkPoint* p1, GdkPoint* p2, GdkPoint* result) { *result = _result_; #line 288 "/home/jens/Source/shotwell/src/util/image.vala" return; -#line 1478 "image.c" +#line 1509 "image.c" } @@ -1521,7 +1552,7 @@ void subtract_points (GdkPoint* p1, GdkPoint* p2, GdkPoint* result) { *result = _result_; #line 296 "/home/jens/Source/shotwell/src/util/image.vala" return; -#line 1525 "image.c" +#line 1556 "image.c" } @@ -1540,19 +1571,19 @@ void fix_cairo_pixbuf (GdkPixbuf* pixbuf) { _tmp2_ = _tmp1_; #line 301 "/home/jens/Source/shotwell/src/util/image.vala" gdk_pixels = _tmp2_; -#line 1544 "image.c" +#line 1575 "image.c" { gint j = 0; #line 302 "/home/jens/Source/shotwell/src/util/image.vala" j = 0; -#line 1549 "image.c" +#line 1580 "image.c" { gboolean _tmp3_ = FALSE; #line 302 "/home/jens/Source/shotwell/src/util/image.vala" _tmp3_ = TRUE; #line 302 "/home/jens/Source/shotwell/src/util/image.vala" while (TRUE) { -#line 1556 "image.c" +#line 1587 "image.c" gint _tmp5_; GdkPixbuf* _tmp6_; gint _tmp7_; @@ -1570,13 +1601,13 @@ void fix_cairo_pixbuf (GdkPixbuf* pixbuf) { gint _tmp29_; #line 302 "/home/jens/Source/shotwell/src/util/image.vala" if (!_tmp3_) { -#line 1574 "image.c" +#line 1605 "image.c" gint _tmp4_; #line 302 "/home/jens/Source/shotwell/src/util/image.vala" _tmp4_ = j; #line 302 "/home/jens/Source/shotwell/src/util/image.vala" j = _tmp4_ + 1; -#line 1580 "image.c" +#line 1611 "image.c" } #line 302 "/home/jens/Source/shotwell/src/util/image.vala" _tmp3_ = FALSE; @@ -1592,7 +1623,7 @@ void fix_cairo_pixbuf (GdkPixbuf* pixbuf) { if (!(_tmp5_ < _tmp8_)) { #line 302 "/home/jens/Source/shotwell/src/util/image.vala" break; -#line 1596 "image.c" +#line 1627 "image.c" } #line 303 "/home/jens/Source/shotwell/src/util/image.vala" _tmp9_ = gdk_pixels; @@ -1610,7 +1641,7 @@ void fix_cairo_pixbuf (GdkPixbuf* pixbuf) { end = _tmp10_ + (4 * _tmp13_); #line 306 "/home/jens/Source/shotwell/src/util/image.vala" while (TRUE) { -#line 1614 "image.c" +#line 1645 "image.c" guchar* _tmp14_; guchar* _tmp15_; guchar tmp = '\0'; @@ -1632,7 +1663,7 @@ void fix_cairo_pixbuf (GdkPixbuf* pixbuf) { if (!(_tmp14_ < _tmp15_)) { #line 306 "/home/jens/Source/shotwell/src/util/image.vala" break; -#line 1636 "image.c" +#line 1667 "image.c" } #line 307 "/home/jens/Source/shotwell/src/util/image.vala" _tmp16_ = p; @@ -1662,7 +1693,7 @@ void fix_cairo_pixbuf (GdkPixbuf* pixbuf) { _tmp25_ = p; #line 317 "/home/jens/Source/shotwell/src/util/image.vala" p = _tmp25_ + 4; -#line 1666 "image.c" +#line 1697 "image.c" } #line 320 "/home/jens/Source/shotwell/src/util/image.vala" _tmp26_ = gdk_pixels; @@ -1674,7 +1705,7 @@ void fix_cairo_pixbuf (GdkPixbuf* pixbuf) { _tmp29_ = _tmp28_; #line 320 "/home/jens/Source/shotwell/src/util/image.vala" gdk_pixels = _tmp26_ + _tmp29_; -#line 1678 "image.c" +#line 1709 "image.c" } } } @@ -1754,13 +1785,13 @@ void compute_arb_rotated_size (gdouble src_width, gdouble src_height, gdouble an if (dest_width) { #line 334 "/home/jens/Source/shotwell/src/util/image.vala" *dest_width = _vala_dest_width; -#line 1758 "image.c" +#line 1789 "image.c" } #line 334 "/home/jens/Source/shotwell/src/util/image.vala" if (dest_height) { #line 334 "/home/jens/Source/shotwell/src/util/image.vala" *dest_height = _vala_dest_height; -#line 1764 "image.c" +#line 1795 "image.c" } } @@ -1850,7 +1881,7 @@ GdkPixbuf* rotate_arb (GdkPixbuf* source_pixbuf, gdouble angle) { _tmp0_ = angle; #line 353 "/home/jens/Source/shotwell/src/util/image.vala" if (_tmp0_ == 0.0) { -#line 1854 "image.c" +#line 1885 "image.c" GdkPixbuf* _tmp1_; GdkPixbuf* _tmp2_; #line 354 "/home/jens/Source/shotwell/src/util/image.vala" @@ -1861,7 +1892,7 @@ GdkPixbuf* rotate_arb (GdkPixbuf* source_pixbuf, gdouble angle) { result = _tmp2_; #line 354 "/home/jens/Source/shotwell/src/util/image.vala" return result; -#line 1865 "image.c" +#line 1896 "image.c" } #line 361 "/home/jens/Source/shotwell/src/util/image.vala" _tmp3_ = source_pixbuf; @@ -1905,11 +1936,11 @@ GdkPixbuf* rotate_arb (GdkPixbuf* source_pixbuf, gdouble angle) { if (_tmp20_) { #line 369 "/home/jens/Source/shotwell/src/util/image.vala" _tmp17_ = CAIRO_FORMAT_ARGB32; -#line 1909 "image.c" +#line 1940 "image.c" } else { #line 369 "/home/jens/Source/shotwell/src/util/image.vala" _tmp17_ = CAIRO_FORMAT_RGB24; -#line 1913 "image.c" +#line 1944 "image.c" } #line 367 "/home/jens/Source/shotwell/src/util/image.vala" _tmp21_ = dest_pixbuf; @@ -2037,7 +2068,7 @@ GdkPixbuf* rotate_arb (GdkPixbuf* source_pixbuf, gdouble angle) { _cairo_surface_destroy0 (surface); #line 390 "/home/jens/Source/shotwell/src/util/image.vala" return result; -#line 2041 "image.c" +#line 2072 "image.c" } @@ -2086,7 +2117,7 @@ void rotate_point_arb (GdkPoint* source_point, gint img_w, gint img_h, gdouble a _tmp0_ = angle; #line 409 "/home/jens/Source/shotwell/src/util/image.vala" if (_tmp0_ == 0.0) { -#line 2090 "image.c" +#line 2121 "image.c" GdkPoint _tmp1_; #line 411 "/home/jens/Source/shotwell/src/util/image.vala" _tmp1_ = *source_point; @@ -2094,7 +2125,7 @@ void rotate_point_arb (GdkPoint* source_point, gint img_w, gint img_h, gdouble a *result = _tmp1_; #line 411 "/home/jens/Source/shotwell/src/util/image.vala" return; -#line 2098 "image.c" +#line 2129 "image.c" } #line 416 "/home/jens/Source/shotwell/src/util/image.vala" _tmp2_ = img_w; @@ -2132,13 +2163,13 @@ void rotate_point_arb (GdkPoint* source_point, gint img_w, gint img_h, gdouble a _tmp13_ = invert; #line 422 "/home/jens/Source/shotwell/src/util/image.vala" if (_tmp13_) { -#line 2136 "image.c" +#line 2167 "image.c" cairo_status_t _tmp14_; #line 423 "/home/jens/Source/shotwell/src/util/image.vala" _tmp14_ = cairo_matrix_invert (&matrix); #line 423 "/home/jens/Source/shotwell/src/util/image.vala" _vala_assert (_tmp14_ == CAIRO_STATUS_SUCCESS, "matrix.invert() == Cairo.Status.SUCCESS"); -#line 2142 "image.c" +#line 2173 "image.c" } #line 425 "/home/jens/Source/shotwell/src/util/image.vala" _tmp15_ = *source_point; @@ -2166,7 +2197,7 @@ void rotate_point_arb (GdkPoint* source_point, gint img_w, gint img_h, gdouble a *result = _tmp21_; #line 429 "/home/jens/Source/shotwell/src/util/image.vala" return; -#line 2170 "image.c" +#line 2201 "image.c" } @@ -2205,7 +2236,335 @@ void derotate_point_arb (GdkPoint* source_point, gint img_w, gint img_h, gdouble *result = _tmp4_; #line 446 "/home/jens/Source/shotwell/src/util/image.vala" return; -#line 2209 "image.c" +#line 2240 "image.c" +} + + +static gpointer _cairo_surface_reference0 (gpointer self) { +#line 484 "/home/jens/Source/shotwell/src/util/image.vala" + return self ? cairo_surface_reference (self) : NULL; +#line 2247 "image.c" +} + + +cairo_surface_t* get_background_surface (void) { + cairo_surface_t* result = NULL; + cairo_surface_t* _tmp0_; + cairo_surface_t* _tmp31_; + cairo_surface_t* _tmp32_; +#line 452 "/home/jens/Source/shotwell/src/util/image.vala" + _tmp0_ = background_surface; +#line 452 "/home/jens/Source/shotwell/src/util/image.vala" + if (_tmp0_ == NULL) { +#line 2260 "image.c" + gchar* color_a = NULL; + gchar* color_b = NULL; + ConfigFacade* config = NULL; + ConfigFacade* _tmp1_; + gchar* type = NULL; + ConfigFacade* _tmp2_; + gchar* _tmp3_; + const gchar* _tmp4_; + const gchar* _tmp5_; + GQuark _tmp7_ = 0U; +#line 458 "/home/jens/Source/shotwell/src/util/image.vala" + static GQuark _tmp6_label0 = 0; +#line 458 "/home/jens/Source/shotwell/src/util/image.vala" + static GQuark _tmp6_label1 = 0; +#line 2275 "image.c" + cairo_surface_t* _tmp17_; + cairo_t* ctx = NULL; + cairo_surface_t* _tmp18_; + cairo_t* _tmp19_; + cairo_t* _tmp20_; + cairo_t* _tmp21_; + const gchar* _tmp22_; + cairo_t* _tmp23_; + cairo_t* _tmp24_; + cairo_t* _tmp25_; + cairo_t* _tmp26_; + const gchar* _tmp27_; + cairo_t* _tmp28_; + cairo_t* _tmp29_; + cairo_t* _tmp30_; +#line 455 "/home/jens/Source/shotwell/src/util/image.vala" + _tmp1_ = config_facade_get_instance (); +#line 455 "/home/jens/Source/shotwell/src/util/image.vala" + config = _tmp1_; +#line 457 "/home/jens/Source/shotwell/src/util/image.vala" + _tmp2_ = config; +#line 457 "/home/jens/Source/shotwell/src/util/image.vala" + _tmp3_ = configuration_facade_get_transparent_background_type (G_TYPE_CHECK_INSTANCE_CAST (_tmp2_, TYPE_CONFIGURATION_FACADE, ConfigurationFacade)); +#line 457 "/home/jens/Source/shotwell/src/util/image.vala" + type = _tmp3_; +#line 458 "/home/jens/Source/shotwell/src/util/image.vala" + _tmp4_ = type; +#line 458 "/home/jens/Source/shotwell/src/util/image.vala" + _tmp5_ = _tmp4_; +#line 458 "/home/jens/Source/shotwell/src/util/image.vala" + _tmp7_ = (NULL == _tmp5_) ? 0 : g_quark_from_string (_tmp5_); +#line 458 "/home/jens/Source/shotwell/src/util/image.vala" + if (_tmp7_ == ((0 != _tmp6_label0) ? _tmp6_label0 : (_tmp6_label0 = g_quark_from_static_string ("checkered")))) { +#line 458 "/home/jens/Source/shotwell/src/util/image.vala" + switch (0) { +#line 2311 "image.c" + default: + { + gchar* _tmp8_; + gchar* _tmp9_; +#line 460 "/home/jens/Source/shotwell/src/util/image.vala" + _tmp8_ = g_strdup ("#808080"); +#line 460 "/home/jens/Source/shotwell/src/util/image.vala" + _g_free0 (color_a); +#line 460 "/home/jens/Source/shotwell/src/util/image.vala" + color_a = _tmp8_; +#line 461 "/home/jens/Source/shotwell/src/util/image.vala" + _tmp9_ = g_strdup ("#ccc"); +#line 461 "/home/jens/Source/shotwell/src/util/image.vala" + _g_free0 (color_b); +#line 461 "/home/jens/Source/shotwell/src/util/image.vala" + color_b = _tmp9_; +#line 462 "/home/jens/Source/shotwell/src/util/image.vala" + break; +#line 2330 "image.c" + } + } + } else if (_tmp7_ == ((0 != _tmp6_label1) ? _tmp6_label1 : (_tmp6_label1 = g_quark_from_static_string ("solid")))) { +#line 458 "/home/jens/Source/shotwell/src/util/image.vala" + switch (0) { +#line 2336 "image.c" + default: + { + ConfigFacade* _tmp10_; + gchar* _tmp11_; + const gchar* _tmp12_; + gchar* _tmp13_; +#line 464 "/home/jens/Source/shotwell/src/util/image.vala" + _tmp10_ = config; +#line 464 "/home/jens/Source/shotwell/src/util/image.vala" + _tmp11_ = configuration_facade_get_transparent_background_color (G_TYPE_CHECK_INSTANCE_CAST (_tmp10_, TYPE_CONFIGURATION_FACADE, ConfigurationFacade)); +#line 464 "/home/jens/Source/shotwell/src/util/image.vala" + _g_free0 (color_b); +#line 464 "/home/jens/Source/shotwell/src/util/image.vala" + color_b = _tmp11_; +#line 464 "/home/jens/Source/shotwell/src/util/image.vala" + _tmp12_ = color_b; +#line 464 "/home/jens/Source/shotwell/src/util/image.vala" + _tmp13_ = g_strdup (_tmp12_); +#line 464 "/home/jens/Source/shotwell/src/util/image.vala" + _g_free0 (color_a); +#line 464 "/home/jens/Source/shotwell/src/util/image.vala" + color_a = _tmp13_; +#line 465 "/home/jens/Source/shotwell/src/util/image.vala" + break; +#line 2361 "image.c" + } + } + } else { +#line 458 "/home/jens/Source/shotwell/src/util/image.vala" + switch (0) { +#line 2367 "image.c" + default: + { + gchar* _tmp14_; + const gchar* _tmp15_; + gchar* _tmp16_; +#line 467 "/home/jens/Source/shotwell/src/util/image.vala" + _tmp14_ = g_strdup ("#000"); +#line 467 "/home/jens/Source/shotwell/src/util/image.vala" + _g_free0 (color_b); +#line 467 "/home/jens/Source/shotwell/src/util/image.vala" + color_b = _tmp14_; +#line 467 "/home/jens/Source/shotwell/src/util/image.vala" + _tmp15_ = color_b; +#line 467 "/home/jens/Source/shotwell/src/util/image.vala" + _tmp16_ = g_strdup (_tmp15_); +#line 467 "/home/jens/Source/shotwell/src/util/image.vala" + _g_free0 (color_a); +#line 467 "/home/jens/Source/shotwell/src/util/image.vala" + color_a = _tmp16_; +#line 468 "/home/jens/Source/shotwell/src/util/image.vala" + break; +#line 2389 "image.c" + } + } + } +#line 471 "/home/jens/Source/shotwell/src/util/image.vala" + _tmp17_ = cairo_image_surface_create (CAIRO_FORMAT_RGB24, 16, 16); +#line 471 "/home/jens/Source/shotwell/src/util/image.vala" + _cairo_surface_destroy0 (background_surface); +#line 471 "/home/jens/Source/shotwell/src/util/image.vala" + background_surface = _tmp17_; +#line 472 "/home/jens/Source/shotwell/src/util/image.vala" + _tmp18_ = background_surface; +#line 472 "/home/jens/Source/shotwell/src/util/image.vala" + _tmp19_ = cairo_create (_tmp18_); +#line 472 "/home/jens/Source/shotwell/src/util/image.vala" + ctx = _tmp19_; +#line 473 "/home/jens/Source/shotwell/src/util/image.vala" + _tmp20_ = ctx; +#line 473 "/home/jens/Source/shotwell/src/util/image.vala" + cairo_set_operator (_tmp20_, CAIRO_OPERATOR_SOURCE); +#line 474 "/home/jens/Source/shotwell/src/util/image.vala" + _tmp21_ = ctx; +#line 474 "/home/jens/Source/shotwell/src/util/image.vala" + _tmp22_ = color_a; +#line 474 "/home/jens/Source/shotwell/src/util/image.vala" + set_source_color_from_string (_tmp21_, _tmp22_); +#line 475 "/home/jens/Source/shotwell/src/util/image.vala" + _tmp23_ = ctx; +#line 475 "/home/jens/Source/shotwell/src/util/image.vala" + cairo_rectangle (_tmp23_, (gdouble) 0, (gdouble) 0, (gdouble) 8, (gdouble) 8); +#line 476 "/home/jens/Source/shotwell/src/util/image.vala" + _tmp24_ = ctx; +#line 476 "/home/jens/Source/shotwell/src/util/image.vala" + cairo_rectangle (_tmp24_, (gdouble) 8, (gdouble) 8, (gdouble) 8, (gdouble) 8); +#line 477 "/home/jens/Source/shotwell/src/util/image.vala" + _tmp25_ = ctx; +#line 477 "/home/jens/Source/shotwell/src/util/image.vala" + cairo_fill (_tmp25_); +#line 478 "/home/jens/Source/shotwell/src/util/image.vala" + _tmp26_ = ctx; +#line 478 "/home/jens/Source/shotwell/src/util/image.vala" + _tmp27_ = color_b; +#line 478 "/home/jens/Source/shotwell/src/util/image.vala" + set_source_color_from_string (_tmp26_, _tmp27_); +#line 479 "/home/jens/Source/shotwell/src/util/image.vala" + _tmp28_ = ctx; +#line 479 "/home/jens/Source/shotwell/src/util/image.vala" + cairo_rectangle (_tmp28_, (gdouble) 0, (gdouble) 8, (gdouble) 8, (gdouble) 8); +#line 480 "/home/jens/Source/shotwell/src/util/image.vala" + _tmp29_ = ctx; +#line 480 "/home/jens/Source/shotwell/src/util/image.vala" + cairo_rectangle (_tmp29_, (gdouble) 8, (gdouble) 0, (gdouble) 8, (gdouble) 8); +#line 481 "/home/jens/Source/shotwell/src/util/image.vala" + _tmp30_ = ctx; +#line 481 "/home/jens/Source/shotwell/src/util/image.vala" + cairo_fill (_tmp30_); +#line 452 "/home/jens/Source/shotwell/src/util/image.vala" + _cairo_destroy0 (ctx); +#line 452 "/home/jens/Source/shotwell/src/util/image.vala" + _g_free0 (type); +#line 452 "/home/jens/Source/shotwell/src/util/image.vala" + _g_object_unref0 (config); +#line 452 "/home/jens/Source/shotwell/src/util/image.vala" + _g_free0 (color_b); +#line 452 "/home/jens/Source/shotwell/src/util/image.vala" + _g_free0 (color_a); +#line 2455 "image.c" + } +#line 484 "/home/jens/Source/shotwell/src/util/image.vala" + _tmp31_ = background_surface; +#line 484 "/home/jens/Source/shotwell/src/util/image.vala" + _tmp32_ = _cairo_surface_reference0 (_tmp31_); +#line 484 "/home/jens/Source/shotwell/src/util/image.vala" + result = _tmp32_; +#line 484 "/home/jens/Source/shotwell/src/util/image.vala" + return result; +#line 2465 "image.c" +} + + +void invalidate_transparent_background (void) { +#line 488 "/home/jens/Source/shotwell/src/util/image.vala" + _cairo_surface_destroy0 (background_surface); +#line 488 "/home/jens/Source/shotwell/src/util/image.vala" + background_surface = NULL; +#line 2474 "image.c" +} + + +void paint_pixmap_with_background (cairo_t* ctx, GdkPixbuf* pixbuf, gint x, gint y) { + GdkPixbuf* _tmp0_; + gboolean _tmp1_; + cairo_t* _tmp17_; + GdkPixbuf* _tmp18_; + gint _tmp19_; + gint _tmp20_; + cairo_t* _tmp21_; +#line 491 "/home/jens/Source/shotwell/src/util/image.vala" + g_return_if_fail (ctx != NULL); +#line 491 "/home/jens/Source/shotwell/src/util/image.vala" + g_return_if_fail (GDK_IS_PIXBUF (pixbuf)); +#line 492 "/home/jens/Source/shotwell/src/util/image.vala" + _tmp0_ = pixbuf; +#line 492 "/home/jens/Source/shotwell/src/util/image.vala" + _tmp1_ = gdk_pixbuf_get_has_alpha (_tmp0_); +#line 492 "/home/jens/Source/shotwell/src/util/image.vala" + if (_tmp1_) { +#line 2496 "image.c" + cairo_t* _tmp2_; + cairo_surface_t* _tmp3_; + cairo_surface_t* _tmp4_; + cairo_t* _tmp5_; + cairo_pattern_t* _tmp6_; + cairo_t* _tmp7_; + gint _tmp8_; + gint _tmp9_; + GdkPixbuf* _tmp10_; + gint _tmp11_; + gint _tmp12_; + GdkPixbuf* _tmp13_; + gint _tmp14_; + gint _tmp15_; + cairo_t* _tmp16_; +#line 493 "/home/jens/Source/shotwell/src/util/image.vala" + _tmp2_ = ctx; +#line 493 "/home/jens/Source/shotwell/src/util/image.vala" + _tmp3_ = get_background_surface (); +#line 493 "/home/jens/Source/shotwell/src/util/image.vala" + _tmp4_ = _tmp3_; +#line 493 "/home/jens/Source/shotwell/src/util/image.vala" + cairo_set_source_surface (_tmp2_, _tmp4_, (gdouble) 0, (gdouble) 0); +#line 493 "/home/jens/Source/shotwell/src/util/image.vala" + _cairo_surface_destroy0 (_tmp4_); +#line 494 "/home/jens/Source/shotwell/src/util/image.vala" + _tmp5_ = ctx; +#line 494 "/home/jens/Source/shotwell/src/util/image.vala" + _tmp6_ = cairo_get_source (_tmp5_); +#line 494 "/home/jens/Source/shotwell/src/util/image.vala" + cairo_pattern_set_extend (_tmp6_, CAIRO_EXTEND_REPEAT); +#line 495 "/home/jens/Source/shotwell/src/util/image.vala" + _tmp7_ = ctx; +#line 495 "/home/jens/Source/shotwell/src/util/image.vala" + _tmp8_ = x; +#line 495 "/home/jens/Source/shotwell/src/util/image.vala" + _tmp9_ = y; +#line 495 "/home/jens/Source/shotwell/src/util/image.vala" + _tmp10_ = pixbuf; +#line 495 "/home/jens/Source/shotwell/src/util/image.vala" + _tmp11_ = gdk_pixbuf_get_width (_tmp10_); +#line 495 "/home/jens/Source/shotwell/src/util/image.vala" + _tmp12_ = _tmp11_; +#line 495 "/home/jens/Source/shotwell/src/util/image.vala" + _tmp13_ = pixbuf; +#line 495 "/home/jens/Source/shotwell/src/util/image.vala" + _tmp14_ = gdk_pixbuf_get_height (_tmp13_); +#line 495 "/home/jens/Source/shotwell/src/util/image.vala" + _tmp15_ = _tmp14_; +#line 495 "/home/jens/Source/shotwell/src/util/image.vala" + cairo_rectangle (_tmp7_, (gdouble) _tmp8_, (gdouble) _tmp9_, (gdouble) _tmp12_, (gdouble) _tmp15_); +#line 496 "/home/jens/Source/shotwell/src/util/image.vala" + _tmp16_ = ctx; +#line 496 "/home/jens/Source/shotwell/src/util/image.vala" + cairo_fill (_tmp16_); +#line 2552 "image.c" + } +#line 499 "/home/jens/Source/shotwell/src/util/image.vala" + _tmp17_ = ctx; +#line 499 "/home/jens/Source/shotwell/src/util/image.vala" + _tmp18_ = pixbuf; +#line 499 "/home/jens/Source/shotwell/src/util/image.vala" + _tmp19_ = x; +#line 499 "/home/jens/Source/shotwell/src/util/image.vala" + _tmp20_ = y; +#line 499 "/home/jens/Source/shotwell/src/util/image.vala" + gdk_cairo_set_source_pixbuf (_tmp17_, _tmp18_, (gdouble) _tmp19_, (gdouble) _tmp20_); +#line 500 "/home/jens/Source/shotwell/src/util/image.vala" + _tmp21_ = ctx; +#line 500 "/home/jens/Source/shotwell/src/util/image.vala" + cairo_paint (_tmp21_); +#line 2568 "image.c" } @@ -2289,263 +2648,263 @@ void clamp_inside_rotated_image (Box* src, gint img_w, gint img_h, gdouble angle gint _tmp73_; Box _tmp78_ = {0}; gboolean _tmp79_; -#line 451 "/home/jens/Source/shotwell/src/util/image.vala" +#line 504 "/home/jens/Source/shotwell/src/util/image.vala" g_return_if_fail (src != NULL); -#line 454 "/home/jens/Source/shotwell/src/util/image.vala" +#line 507 "/home/jens/Source/shotwell/src/util/image.vala" _tmp0_ = *src; -#line 454 "/home/jens/Source/shotwell/src/util/image.vala" +#line 507 "/home/jens/Source/shotwell/src/util/image.vala" _tmp1_ = _tmp0_.left; -#line 454 "/home/jens/Source/shotwell/src/util/image.vala" +#line 507 "/home/jens/Source/shotwell/src/util/image.vala" _tmp2_ = *src; -#line 454 "/home/jens/Source/shotwell/src/util/image.vala" +#line 507 "/home/jens/Source/shotwell/src/util/image.vala" _tmp3_ = _tmp2_.top; -#line 454 "/home/jens/Source/shotwell/src/util/image.vala" +#line 507 "/home/jens/Source/shotwell/src/util/image.vala" _tmp4_.x = _tmp1_; -#line 454 "/home/jens/Source/shotwell/src/util/image.vala" +#line 507 "/home/jens/Source/shotwell/src/util/image.vala" _tmp4_.y = _tmp3_; -#line 454 "/home/jens/Source/shotwell/src/util/image.vala" +#line 507 "/home/jens/Source/shotwell/src/util/image.vala" _tmp5_ = img_w; -#line 454 "/home/jens/Source/shotwell/src/util/image.vala" +#line 507 "/home/jens/Source/shotwell/src/util/image.vala" _tmp6_ = img_h; -#line 454 "/home/jens/Source/shotwell/src/util/image.vala" +#line 507 "/home/jens/Source/shotwell/src/util/image.vala" _tmp7_ = angle_deg; -#line 454 "/home/jens/Source/shotwell/src/util/image.vala" +#line 507 "/home/jens/Source/shotwell/src/util/image.vala" derotate_point_arb (&_tmp4_, _tmp5_, _tmp6_, _tmp7_, &_tmp8_); -#line 454 "/home/jens/Source/shotwell/src/util/image.vala" +#line 507 "/home/jens/Source/shotwell/src/util/image.vala" top_left = _tmp8_; -#line 455 "/home/jens/Source/shotwell/src/util/image.vala" +#line 508 "/home/jens/Source/shotwell/src/util/image.vala" _tmp9_ = *src; -#line 455 "/home/jens/Source/shotwell/src/util/image.vala" +#line 508 "/home/jens/Source/shotwell/src/util/image.vala" _tmp10_ = _tmp9_.right; -#line 455 "/home/jens/Source/shotwell/src/util/image.vala" +#line 508 "/home/jens/Source/shotwell/src/util/image.vala" _tmp11_ = *src; -#line 455 "/home/jens/Source/shotwell/src/util/image.vala" +#line 508 "/home/jens/Source/shotwell/src/util/image.vala" _tmp12_ = _tmp11_.top; -#line 455 "/home/jens/Source/shotwell/src/util/image.vala" +#line 508 "/home/jens/Source/shotwell/src/util/image.vala" _tmp13_.x = _tmp10_; -#line 455 "/home/jens/Source/shotwell/src/util/image.vala" +#line 508 "/home/jens/Source/shotwell/src/util/image.vala" _tmp13_.y = _tmp12_; -#line 455 "/home/jens/Source/shotwell/src/util/image.vala" +#line 508 "/home/jens/Source/shotwell/src/util/image.vala" _tmp14_ = img_w; -#line 455 "/home/jens/Source/shotwell/src/util/image.vala" +#line 508 "/home/jens/Source/shotwell/src/util/image.vala" _tmp15_ = img_h; -#line 455 "/home/jens/Source/shotwell/src/util/image.vala" +#line 508 "/home/jens/Source/shotwell/src/util/image.vala" _tmp16_ = angle_deg; -#line 455 "/home/jens/Source/shotwell/src/util/image.vala" +#line 508 "/home/jens/Source/shotwell/src/util/image.vala" derotate_point_arb (&_tmp13_, _tmp14_, _tmp15_, _tmp16_, &_tmp17_); -#line 455 "/home/jens/Source/shotwell/src/util/image.vala" +#line 508 "/home/jens/Source/shotwell/src/util/image.vala" top_right = _tmp17_; -#line 456 "/home/jens/Source/shotwell/src/util/image.vala" +#line 509 "/home/jens/Source/shotwell/src/util/image.vala" _tmp18_ = *src; -#line 456 "/home/jens/Source/shotwell/src/util/image.vala" +#line 509 "/home/jens/Source/shotwell/src/util/image.vala" _tmp19_ = _tmp18_.left; -#line 456 "/home/jens/Source/shotwell/src/util/image.vala" +#line 509 "/home/jens/Source/shotwell/src/util/image.vala" _tmp20_ = *src; -#line 456 "/home/jens/Source/shotwell/src/util/image.vala" +#line 509 "/home/jens/Source/shotwell/src/util/image.vala" _tmp21_ = _tmp20_.bottom; -#line 456 "/home/jens/Source/shotwell/src/util/image.vala" +#line 509 "/home/jens/Source/shotwell/src/util/image.vala" _tmp22_.x = _tmp19_; -#line 456 "/home/jens/Source/shotwell/src/util/image.vala" +#line 509 "/home/jens/Source/shotwell/src/util/image.vala" _tmp22_.y = _tmp21_; -#line 456 "/home/jens/Source/shotwell/src/util/image.vala" +#line 509 "/home/jens/Source/shotwell/src/util/image.vala" _tmp23_ = img_w; -#line 456 "/home/jens/Source/shotwell/src/util/image.vala" +#line 509 "/home/jens/Source/shotwell/src/util/image.vala" _tmp24_ = img_h; -#line 456 "/home/jens/Source/shotwell/src/util/image.vala" +#line 509 "/home/jens/Source/shotwell/src/util/image.vala" _tmp25_ = angle_deg; -#line 456 "/home/jens/Source/shotwell/src/util/image.vala" +#line 509 "/home/jens/Source/shotwell/src/util/image.vala" derotate_point_arb (&_tmp22_, _tmp23_, _tmp24_, _tmp25_, &_tmp26_); -#line 456 "/home/jens/Source/shotwell/src/util/image.vala" +#line 509 "/home/jens/Source/shotwell/src/util/image.vala" bottom_left = _tmp26_; -#line 457 "/home/jens/Source/shotwell/src/util/image.vala" +#line 510 "/home/jens/Source/shotwell/src/util/image.vala" _tmp27_ = *src; -#line 457 "/home/jens/Source/shotwell/src/util/image.vala" +#line 510 "/home/jens/Source/shotwell/src/util/image.vala" _tmp28_ = _tmp27_.right; -#line 457 "/home/jens/Source/shotwell/src/util/image.vala" +#line 510 "/home/jens/Source/shotwell/src/util/image.vala" _tmp29_ = *src; -#line 457 "/home/jens/Source/shotwell/src/util/image.vala" +#line 510 "/home/jens/Source/shotwell/src/util/image.vala" _tmp30_ = _tmp29_.bottom; -#line 457 "/home/jens/Source/shotwell/src/util/image.vala" +#line 510 "/home/jens/Source/shotwell/src/util/image.vala" _tmp31_.x = _tmp28_; -#line 457 "/home/jens/Source/shotwell/src/util/image.vala" +#line 510 "/home/jens/Source/shotwell/src/util/image.vala" _tmp31_.y = _tmp30_; -#line 457 "/home/jens/Source/shotwell/src/util/image.vala" +#line 510 "/home/jens/Source/shotwell/src/util/image.vala" _tmp32_ = img_w; -#line 457 "/home/jens/Source/shotwell/src/util/image.vala" +#line 510 "/home/jens/Source/shotwell/src/util/image.vala" _tmp33_ = img_h; -#line 457 "/home/jens/Source/shotwell/src/util/image.vala" +#line 510 "/home/jens/Source/shotwell/src/util/image.vala" _tmp34_ = angle_deg; -#line 457 "/home/jens/Source/shotwell/src/util/image.vala" +#line 510 "/home/jens/Source/shotwell/src/util/image.vala" derotate_point_arb (&_tmp31_, _tmp32_, _tmp33_, _tmp34_, &_tmp35_); -#line 457 "/home/jens/Source/shotwell/src/util/image.vala" +#line 510 "/home/jens/Source/shotwell/src/util/image.vala" bottom_right = _tmp35_; -#line 459 "/home/jens/Source/shotwell/src/util/image.vala" +#line 512 "/home/jens/Source/shotwell/src/util/image.vala" _tmp36_ = angle_deg; -#line 459 "/home/jens/Source/shotwell/src/util/image.vala" +#line 512 "/home/jens/Source/shotwell/src/util/image.vala" _tmp37_ = degrees_to_radians (_tmp36_); -#line 459 "/home/jens/Source/shotwell/src/util/image.vala" +#line 512 "/home/jens/Source/shotwell/src/util/image.vala" angle = _tmp37_; -#line 460 "/home/jens/Source/shotwell/src/util/image.vala" +#line 513 "/home/jens/Source/shotwell/src/util/image.vala" top_offset = 0; -#line 460 "/home/jens/Source/shotwell/src/util/image.vala" +#line 513 "/home/jens/Source/shotwell/src/util/image.vala" bottom_offset = 0; -#line 460 "/home/jens/Source/shotwell/src/util/image.vala" +#line 513 "/home/jens/Source/shotwell/src/util/image.vala" left_offset = 0; -#line 460 "/home/jens/Source/shotwell/src/util/image.vala" +#line 513 "/home/jens/Source/shotwell/src/util/image.vala" right_offset = 0; -#line 462 "/home/jens/Source/shotwell/src/util/image.vala" +#line 515 "/home/jens/Source/shotwell/src/util/image.vala" _tmp38_ = top_left; -#line 462 "/home/jens/Source/shotwell/src/util/image.vala" +#line 515 "/home/jens/Source/shotwell/src/util/image.vala" _tmp39_ = _tmp38_.y; -#line 462 "/home/jens/Source/shotwell/src/util/image.vala" +#line 515 "/home/jens/Source/shotwell/src/util/image.vala" _tmp40_ = top_right; -#line 462 "/home/jens/Source/shotwell/src/util/image.vala" +#line 515 "/home/jens/Source/shotwell/src/util/image.vala" _tmp41_ = _tmp40_.y; -#line 462 "/home/jens/Source/shotwell/src/util/image.vala" +#line 515 "/home/jens/Source/shotwell/src/util/image.vala" _tmp42_ = MIN (_tmp39_, _tmp41_); -#line 462 "/home/jens/Source/shotwell/src/util/image.vala" +#line 515 "/home/jens/Source/shotwell/src/util/image.vala" top = _tmp42_; -#line 463 "/home/jens/Source/shotwell/src/util/image.vala" +#line 516 "/home/jens/Source/shotwell/src/util/image.vala" _tmp43_ = top; -#line 463 "/home/jens/Source/shotwell/src/util/image.vala" +#line 516 "/home/jens/Source/shotwell/src/util/image.vala" if (_tmp43_ < 0) { -#line 2413 "image.c" +#line 2772 "image.c" gint _tmp44_; gdouble _tmp45_; gdouble _tmp46_; -#line 464 "/home/jens/Source/shotwell/src/util/image.vala" +#line 517 "/home/jens/Source/shotwell/src/util/image.vala" _tmp44_ = top; -#line 464 "/home/jens/Source/shotwell/src/util/image.vala" +#line 517 "/home/jens/Source/shotwell/src/util/image.vala" _tmp45_ = angle; -#line 464 "/home/jens/Source/shotwell/src/util/image.vala" +#line 517 "/home/jens/Source/shotwell/src/util/image.vala" _tmp46_ = cos (_tmp45_); -#line 464 "/home/jens/Source/shotwell/src/util/image.vala" +#line 517 "/home/jens/Source/shotwell/src/util/image.vala" top_offset = (gint) ((0 - _tmp44_) * _tmp46_); -#line 2425 "image.c" +#line 2784 "image.c" } -#line 466 "/home/jens/Source/shotwell/src/util/image.vala" +#line 519 "/home/jens/Source/shotwell/src/util/image.vala" _tmp47_ = bottom_left; -#line 466 "/home/jens/Source/shotwell/src/util/image.vala" +#line 519 "/home/jens/Source/shotwell/src/util/image.vala" _tmp48_ = _tmp47_.y; -#line 466 "/home/jens/Source/shotwell/src/util/image.vala" +#line 519 "/home/jens/Source/shotwell/src/util/image.vala" _tmp49_ = bottom_right; -#line 466 "/home/jens/Source/shotwell/src/util/image.vala" +#line 519 "/home/jens/Source/shotwell/src/util/image.vala" _tmp50_ = _tmp49_.y; -#line 466 "/home/jens/Source/shotwell/src/util/image.vala" +#line 519 "/home/jens/Source/shotwell/src/util/image.vala" _tmp51_ = MAX (_tmp48_, _tmp50_); -#line 466 "/home/jens/Source/shotwell/src/util/image.vala" +#line 519 "/home/jens/Source/shotwell/src/util/image.vala" bottom = _tmp51_; -#line 467 "/home/jens/Source/shotwell/src/util/image.vala" +#line 520 "/home/jens/Source/shotwell/src/util/image.vala" _tmp52_ = bottom; -#line 467 "/home/jens/Source/shotwell/src/util/image.vala" +#line 520 "/home/jens/Source/shotwell/src/util/image.vala" _tmp53_ = img_h; -#line 467 "/home/jens/Source/shotwell/src/util/image.vala" +#line 520 "/home/jens/Source/shotwell/src/util/image.vala" if (_tmp52_ > _tmp53_) { -#line 2445 "image.c" +#line 2804 "image.c" gint _tmp54_; gint _tmp55_; gdouble _tmp56_; gdouble _tmp57_; -#line 468 "/home/jens/Source/shotwell/src/util/image.vala" +#line 521 "/home/jens/Source/shotwell/src/util/image.vala" _tmp54_ = img_h; -#line 468 "/home/jens/Source/shotwell/src/util/image.vala" +#line 521 "/home/jens/Source/shotwell/src/util/image.vala" _tmp55_ = bottom; -#line 468 "/home/jens/Source/shotwell/src/util/image.vala" +#line 521 "/home/jens/Source/shotwell/src/util/image.vala" _tmp56_ = angle; -#line 468 "/home/jens/Source/shotwell/src/util/image.vala" +#line 521 "/home/jens/Source/shotwell/src/util/image.vala" _tmp57_ = cos (_tmp56_); -#line 468 "/home/jens/Source/shotwell/src/util/image.vala" +#line 521 "/home/jens/Source/shotwell/src/util/image.vala" bottom_offset = (gint) ((_tmp54_ - _tmp55_) * _tmp57_); -#line 2460 "image.c" +#line 2819 "image.c" } -#line 470 "/home/jens/Source/shotwell/src/util/image.vala" +#line 523 "/home/jens/Source/shotwell/src/util/image.vala" _tmp58_ = top_left; -#line 470 "/home/jens/Source/shotwell/src/util/image.vala" +#line 523 "/home/jens/Source/shotwell/src/util/image.vala" _tmp59_ = _tmp58_.x; -#line 470 "/home/jens/Source/shotwell/src/util/image.vala" +#line 523 "/home/jens/Source/shotwell/src/util/image.vala" _tmp60_ = bottom_left; -#line 470 "/home/jens/Source/shotwell/src/util/image.vala" +#line 523 "/home/jens/Source/shotwell/src/util/image.vala" _tmp61_ = _tmp60_.x; -#line 470 "/home/jens/Source/shotwell/src/util/image.vala" +#line 523 "/home/jens/Source/shotwell/src/util/image.vala" _tmp62_ = MIN (_tmp59_, _tmp61_); -#line 470 "/home/jens/Source/shotwell/src/util/image.vala" +#line 523 "/home/jens/Source/shotwell/src/util/image.vala" left = _tmp62_; -#line 471 "/home/jens/Source/shotwell/src/util/image.vala" +#line 524 "/home/jens/Source/shotwell/src/util/image.vala" _tmp63_ = left; -#line 471 "/home/jens/Source/shotwell/src/util/image.vala" +#line 524 "/home/jens/Source/shotwell/src/util/image.vala" if (_tmp63_ < 0) { -#line 2478 "image.c" +#line 2837 "image.c" gint _tmp64_; gdouble _tmp65_; gdouble _tmp66_; -#line 472 "/home/jens/Source/shotwell/src/util/image.vala" +#line 525 "/home/jens/Source/shotwell/src/util/image.vala" _tmp64_ = left; -#line 472 "/home/jens/Source/shotwell/src/util/image.vala" +#line 525 "/home/jens/Source/shotwell/src/util/image.vala" _tmp65_ = angle; -#line 472 "/home/jens/Source/shotwell/src/util/image.vala" +#line 525 "/home/jens/Source/shotwell/src/util/image.vala" _tmp66_ = cos (_tmp65_); -#line 472 "/home/jens/Source/shotwell/src/util/image.vala" +#line 525 "/home/jens/Source/shotwell/src/util/image.vala" left_offset = (gint) ((0 - _tmp64_) * _tmp66_); -#line 2490 "image.c" +#line 2849 "image.c" } -#line 474 "/home/jens/Source/shotwell/src/util/image.vala" +#line 527 "/home/jens/Source/shotwell/src/util/image.vala" _tmp67_ = top_right; -#line 474 "/home/jens/Source/shotwell/src/util/image.vala" +#line 527 "/home/jens/Source/shotwell/src/util/image.vala" _tmp68_ = _tmp67_.x; -#line 474 "/home/jens/Source/shotwell/src/util/image.vala" +#line 527 "/home/jens/Source/shotwell/src/util/image.vala" _tmp69_ = bottom_right; -#line 474 "/home/jens/Source/shotwell/src/util/image.vala" +#line 527 "/home/jens/Source/shotwell/src/util/image.vala" _tmp70_ = _tmp69_.x; -#line 474 "/home/jens/Source/shotwell/src/util/image.vala" +#line 527 "/home/jens/Source/shotwell/src/util/image.vala" _tmp71_ = MAX (_tmp68_, _tmp70_); -#line 474 "/home/jens/Source/shotwell/src/util/image.vala" +#line 527 "/home/jens/Source/shotwell/src/util/image.vala" right = _tmp71_; -#line 475 "/home/jens/Source/shotwell/src/util/image.vala" +#line 528 "/home/jens/Source/shotwell/src/util/image.vala" _tmp72_ = right; -#line 475 "/home/jens/Source/shotwell/src/util/image.vala" +#line 528 "/home/jens/Source/shotwell/src/util/image.vala" _tmp73_ = img_w; -#line 475 "/home/jens/Source/shotwell/src/util/image.vala" +#line 528 "/home/jens/Source/shotwell/src/util/image.vala" if (_tmp72_ > _tmp73_) { -#line 2510 "image.c" +#line 2869 "image.c" gint _tmp74_; gint _tmp75_; gdouble _tmp76_; gdouble _tmp77_; -#line 476 "/home/jens/Source/shotwell/src/util/image.vala" +#line 529 "/home/jens/Source/shotwell/src/util/image.vala" _tmp74_ = img_w; -#line 476 "/home/jens/Source/shotwell/src/util/image.vala" +#line 529 "/home/jens/Source/shotwell/src/util/image.vala" _tmp75_ = right; -#line 476 "/home/jens/Source/shotwell/src/util/image.vala" +#line 529 "/home/jens/Source/shotwell/src/util/image.vala" _tmp76_ = angle; -#line 476 "/home/jens/Source/shotwell/src/util/image.vala" +#line 529 "/home/jens/Source/shotwell/src/util/image.vala" _tmp77_ = cos (_tmp76_); -#line 476 "/home/jens/Source/shotwell/src/util/image.vala" +#line 529 "/home/jens/Source/shotwell/src/util/image.vala" right_offset = (gint) ((_tmp74_ - _tmp75_) * _tmp77_); -#line 2525 "image.c" +#line 2884 "image.c" } -#line 478 "/home/jens/Source/shotwell/src/util/image.vala" +#line 531 "/home/jens/Source/shotwell/src/util/image.vala" _tmp79_ = preserve_geom; -#line 478 "/home/jens/Source/shotwell/src/util/image.vala" +#line 531 "/home/jens/Source/shotwell/src/util/image.vala" if (_tmp79_) { -#line 2531 "image.c" +#line 2890 "image.c" gint _tmp80_; gint _tmp81_; gint _tmp82_; gint _tmp83_; Box _tmp84_ = {0}; -#line 478 "/home/jens/Source/shotwell/src/util/image.vala" +#line 531 "/home/jens/Source/shotwell/src/util/image.vala" _tmp80_ = left_offset; -#line 478 "/home/jens/Source/shotwell/src/util/image.vala" +#line 531 "/home/jens/Source/shotwell/src/util/image.vala" _tmp81_ = right_offset; -#line 478 "/home/jens/Source/shotwell/src/util/image.vala" +#line 531 "/home/jens/Source/shotwell/src/util/image.vala" _tmp82_ = top_offset; -#line 478 "/home/jens/Source/shotwell/src/util/image.vala" +#line 531 "/home/jens/Source/shotwell/src/util/image.vala" _tmp83_ = bottom_offset; -#line 478 "/home/jens/Source/shotwell/src/util/image.vala" +#line 531 "/home/jens/Source/shotwell/src/util/image.vala" box_get_offset (src, _tmp80_ + _tmp81_, _tmp82_ + _tmp83_, &_tmp84_); -#line 478 "/home/jens/Source/shotwell/src/util/image.vala" +#line 531 "/home/jens/Source/shotwell/src/util/image.vala" _tmp78_ = _tmp84_; -#line 2549 "image.c" +#line 2908 "image.c" } else { Box _tmp85_; gint _tmp86_; @@ -2559,39 +2918,39 @@ void clamp_inside_rotated_image (Box* src, gint img_w, gint img_h, gdouble angle Box _tmp94_; gint _tmp95_; gint _tmp96_; -#line 479 "/home/jens/Source/shotwell/src/util/image.vala" +#line 532 "/home/jens/Source/shotwell/src/util/image.vala" _tmp85_ = *src; -#line 479 "/home/jens/Source/shotwell/src/util/image.vala" +#line 532 "/home/jens/Source/shotwell/src/util/image.vala" _tmp86_ = _tmp85_.left; -#line 479 "/home/jens/Source/shotwell/src/util/image.vala" +#line 532 "/home/jens/Source/shotwell/src/util/image.vala" _tmp87_ = left_offset; -#line 479 "/home/jens/Source/shotwell/src/util/image.vala" +#line 532 "/home/jens/Source/shotwell/src/util/image.vala" _tmp88_ = *src; -#line 479 "/home/jens/Source/shotwell/src/util/image.vala" +#line 532 "/home/jens/Source/shotwell/src/util/image.vala" _tmp89_ = _tmp88_.top; -#line 479 "/home/jens/Source/shotwell/src/util/image.vala" +#line 532 "/home/jens/Source/shotwell/src/util/image.vala" _tmp90_ = top_offset; -#line 479 "/home/jens/Source/shotwell/src/util/image.vala" +#line 532 "/home/jens/Source/shotwell/src/util/image.vala" _tmp91_ = *src; -#line 479 "/home/jens/Source/shotwell/src/util/image.vala" +#line 532 "/home/jens/Source/shotwell/src/util/image.vala" _tmp92_ = _tmp91_.right; -#line 479 "/home/jens/Source/shotwell/src/util/image.vala" +#line 532 "/home/jens/Source/shotwell/src/util/image.vala" _tmp93_ = right_offset; -#line 479 "/home/jens/Source/shotwell/src/util/image.vala" +#line 532 "/home/jens/Source/shotwell/src/util/image.vala" _tmp94_ = *src; -#line 479 "/home/jens/Source/shotwell/src/util/image.vala" +#line 532 "/home/jens/Source/shotwell/src/util/image.vala" _tmp95_ = _tmp94_.bottom; -#line 479 "/home/jens/Source/shotwell/src/util/image.vala" +#line 532 "/home/jens/Source/shotwell/src/util/image.vala" _tmp96_ = bottom_offset; -#line 479 "/home/jens/Source/shotwell/src/util/image.vala" +#line 532 "/home/jens/Source/shotwell/src/util/image.vala" box_init (&_tmp78_, _tmp86_ + _tmp87_, _tmp89_ + _tmp90_, _tmp92_ + _tmp93_, _tmp95_ + _tmp96_); -#line 2589 "image.c" +#line 2948 "image.c" } -#line 478 "/home/jens/Source/shotwell/src/util/image.vala" +#line 531 "/home/jens/Source/shotwell/src/util/image.vala" *result = _tmp78_; -#line 478 "/home/jens/Source/shotwell/src/util/image.vala" +#line 531 "/home/jens/Source/shotwell/src/util/image.vala" return; -#line 2595 "image.c" +#line 2954 "image.c" } diff --git a/src/util/image.vala b/src/util/image.vala index 4adafae..f8646e2 100644 --- a/src/util/image.vala +++ b/src/util/image.vala @@ -446,6 +446,59 @@ Gdk.Point derotate_point_arb(Gdk.Point source_point, int img_w, int img_h, doubl return rotate_point_arb(source_point, img_w, img_h, angle, true); } +private static Cairo.Surface background_surface = null; + +private Cairo.Surface get_background_surface() { + if (background_surface == null) { + string color_a; + string color_b; + var config = Config.Facade.get_instance(); + + var type = config.get_transparent_background_type(); + switch (type) { + case "checkered": + color_a = "#808080"; + color_b = "#ccc"; + break; + case "solid": + color_a = color_b = config.get_transparent_background_color(); + break; + default: + color_a = color_b = "#000"; + break; + } + + background_surface = new Cairo.ImageSurface(Cairo.Format.RGB24, 16, 16); + var ctx = new Cairo.Context(background_surface); + ctx.set_operator(Cairo.Operator.SOURCE); + set_source_color_from_string(ctx, color_a); + ctx.rectangle(0,0,8,8); + ctx.rectangle(8,8,8,8); + ctx.fill(); + set_source_color_from_string(ctx, color_b); + ctx.rectangle(0,8,8,8); + ctx.rectangle(8,0,8,8); + ctx.fill(); + } + + return background_surface; +} + +public void invalidate_transparent_background() { + background_surface = null; +} + +public void paint_pixmap_with_background (Cairo.Context ctx, Gdk.Pixbuf pixbuf, int x, int y) { + if (pixbuf.get_has_alpha()) { + ctx.set_source_surface(get_background_surface(), 0, 0); + ctx.get_source().set_extend(Cairo.Extend.REPEAT); + ctx.rectangle(x, y, pixbuf.width, pixbuf.height); + ctx.fill(); + } + + Gdk.cairo_set_source_pixbuf(ctx, pixbuf, x, y); + ctx.paint(); +} // Force an axially-aligned box to be inside a rotated rectangle. Box clamp_inside_rotated_image(Box src, int img_w, int img_h, double angle_deg, diff --git a/src/util/misc.c b/src/util/misc.c index 98b6719..beac274 100644 --- a/src/util/misc.c +++ b/src/util/misc.c @@ -10,9 +10,9 @@ #include <glib.h> #include <glib-object.h> #include <time.h> +#include <gio/gio.h> #include <stdlib.h> #include <string.h> -#include <gio/gio.h> #include <gee.h> #include <gdk/gdk.h> #include <float.h> @@ -193,7 +193,6 @@ gulong timeval_to_ms (GTimeVal* time_val); gulong now_ms (void); gulong now_sec (void); time_t now_time_t (void); -gchar* md5_binary (guint8* buffer, gsize length); gchar* md5_file (GFile* file, GError** error); gboolean equal_sets (GeeSet* a, GeeSet* b); GeeSet* intersection_of_sets (GeeSet* a, GeeSet* b, GeeSet* excluded); @@ -282,32 +281,32 @@ guint int64_hash (gint64* n) { u8 = (guint8*) _tmp0_; #line 10 "/home/jens/Source/shotwell/src/util/misc.vala" hash = (guint) 0; -#line 286 "misc.c" +#line 285 "misc.c" { gint ctr = 0; #line 11 "/home/jens/Source/shotwell/src/util/misc.vala" ctr = 0; -#line 291 "misc.c" +#line 290 "misc.c" { gboolean _tmp1_ = FALSE; #line 11 "/home/jens/Source/shotwell/src/util/misc.vala" _tmp1_ = TRUE; #line 11 "/home/jens/Source/shotwell/src/util/misc.vala" while (TRUE) { -#line 298 "misc.c" +#line 297 "misc.c" gint _tmp3_; guint _tmp4_; guint _tmp5_; guint8* _tmp6_; #line 11 "/home/jens/Source/shotwell/src/util/misc.vala" if (!_tmp1_) { -#line 305 "misc.c" +#line 304 "misc.c" gint _tmp2_; #line 11 "/home/jens/Source/shotwell/src/util/misc.vala" _tmp2_ = ctr; #line 11 "/home/jens/Source/shotwell/src/util/misc.vala" ctr = _tmp2_ + 1; -#line 311 "misc.c" +#line 310 "misc.c" } #line 11 "/home/jens/Source/shotwell/src/util/misc.vala" _tmp1_ = FALSE; @@ -317,7 +316,7 @@ guint int64_hash (gint64* n) { if (!(((gulong) _tmp3_) < (sizeof (gint64) / sizeof (guint8)))) { #line 11 "/home/jens/Source/shotwell/src/util/misc.vala" break; -#line 321 "misc.c" +#line 320 "misc.c" } #line 12 "/home/jens/Source/shotwell/src/util/misc.vala" _tmp4_ = hash; @@ -329,7 +328,7 @@ guint int64_hash (gint64* n) { u8 = _tmp6_ + 1; #line 12 "/home/jens/Source/shotwell/src/util/misc.vala" hash = ((_tmp4_ << 4) ^ (_tmp5_ >> 28)) ^ (*_tmp6_); -#line 333 "misc.c" +#line 332 "misc.c" } } } @@ -337,7 +336,7 @@ guint int64_hash (gint64* n) { result = hash; #line 15 "/home/jens/Source/shotwell/src/util/misc.vala" return result; -#line 341 "misc.c" +#line 340 "misc.c" } @@ -359,7 +358,7 @@ gboolean int64_equal (gint64* a, gint64* b) { result = (*bia) == (*bib); #line 22 "/home/jens/Source/shotwell/src/util/misc.vala" return result; -#line 363 "misc.c" +#line 362 "misc.c" } @@ -383,7 +382,7 @@ gint int64_compare (gint64* a, gint64* b) { result = -1; #line 28 "/home/jens/Source/shotwell/src/util/misc.vala" return result; -#line 387 "misc.c" +#line 386 "misc.c" } else { gint64 _tmp3_; #line 29 "/home/jens/Source/shotwell/src/util/misc.vala" @@ -394,13 +393,13 @@ gint int64_compare (gint64* a, gint64* b) { result = 1; #line 30 "/home/jens/Source/shotwell/src/util/misc.vala" return result; -#line 398 "misc.c" +#line 397 "misc.c" } else { #line 32 "/home/jens/Source/shotwell/src/util/misc.vala" result = 0; #line 32 "/home/jens/Source/shotwell/src/util/misc.vala" return result; -#line 404 "misc.c" +#line 403 "misc.c" } } } @@ -432,7 +431,7 @@ gint uint64_compare (guint64* a, guint64* b) { result = -1; #line 40 "/home/jens/Source/shotwell/src/util/misc.vala" return result; -#line 436 "misc.c" +#line 435 "misc.c" } else { guint64 _tmp4_; guint64 _tmp5_; @@ -446,13 +445,13 @@ gint uint64_compare (guint64* a, guint64* b) { result = 1; #line 42 "/home/jens/Source/shotwell/src/util/misc.vala" return result; -#line 450 "misc.c" +#line 449 "misc.c" } else { #line 44 "/home/jens/Source/shotwell/src/util/misc.vala" result = 0; #line 44 "/home/jens/Source/shotwell/src/util/misc.vala" return result; -#line 456 "misc.c" +#line 455 "misc.c" } } } @@ -474,7 +473,7 @@ gboolean bool_value_equals (GValue* a, GValue* b) { result = g_value_get_boolean (&_tmp0_) == g_value_get_boolean (&_tmp1_); #line 50 "/home/jens/Source/shotwell/src/util/misc.vala" return result; -#line 478 "misc.c" +#line 477 "misc.c" } @@ -494,7 +493,7 @@ gboolean int_value_equals (GValue* a, GValue* b) { result = g_value_get_int (&_tmp0_) == g_value_get_int (&_tmp1_); #line 54 "/home/jens/Source/shotwell/src/util/misc.vala" return result; -#line 498 "misc.c" +#line 497 "misc.c" } @@ -518,7 +517,7 @@ gulong timeval_to_ms (GTimeVal* time_val) { result = (((gulong) _tmp1_) * 1000) + (((gulong) _tmp3_) / 1000); #line 58 "/home/jens/Source/shotwell/src/util/misc.vala" return result; -#line 522 "misc.c" +#line 521 "misc.c" } @@ -534,7 +533,7 @@ gulong now_ms (void) { result = _tmp1_; #line 62 "/home/jens/Source/shotwell/src/util/misc.vala" return result; -#line 538 "misc.c" +#line 537 "misc.c" } @@ -553,7 +552,7 @@ gulong now_sec (void) { result = (gulong) _tmp1_; #line 68 "/home/jens/Source/shotwell/src/util/misc.vala" return result; -#line 557 "misc.c" +#line 556 "misc.c" } @@ -566,44 +565,7 @@ inline time_t now_time_t (void) { result = (time_t) _tmp0_; #line 72 "/home/jens/Source/shotwell/src/util/misc.vala" return result; -#line 570 "misc.c" -} - - -gchar* md5_binary (guint8* buffer, gsize length) { - gchar* result = NULL; - gsize _tmp0_; - GChecksum* md5 = NULL; - GChecksum* _tmp1_; - guint8* _tmp2_; - gsize _tmp3_; - const gchar* _tmp4_; - gchar* _tmp5_; -#line 76 "/home/jens/Source/shotwell/src/util/misc.vala" - _tmp0_ = length; -#line 76 "/home/jens/Source/shotwell/src/util/misc.vala" - _vala_assert (_tmp0_ != ((gsize) 0), "length != 0"); -#line 78 "/home/jens/Source/shotwell/src/util/misc.vala" - _tmp1_ = g_checksum_new (G_CHECKSUM_MD5); -#line 78 "/home/jens/Source/shotwell/src/util/misc.vala" - md5 = _tmp1_; -#line 79 "/home/jens/Source/shotwell/src/util/misc.vala" - _tmp2_ = buffer; -#line 79 "/home/jens/Source/shotwell/src/util/misc.vala" - _tmp3_ = length; -#line 79 "/home/jens/Source/shotwell/src/util/misc.vala" - g_checksum_update (md5, (guchar*) _tmp2_, _tmp3_); -#line 81 "/home/jens/Source/shotwell/src/util/misc.vala" - _tmp4_ = g_checksum_get_string (md5); -#line 81 "/home/jens/Source/shotwell/src/util/misc.vala" - _tmp5_ = g_strdup (_tmp4_); -#line 81 "/home/jens/Source/shotwell/src/util/misc.vala" - result = _tmp5_; -#line 81 "/home/jens/Source/shotwell/src/util/misc.vala" - _g_checksum_free0 (md5); -#line 81 "/home/jens/Source/shotwell/src/util/misc.vala" - return result; -#line 607 "misc.c" +#line 569 "misc.c" } @@ -622,45 +584,45 @@ gchar* md5_file (GFile* file, GError** error) { const gchar* _tmp19_; gchar* _tmp20_; GError * _inner_error_ = NULL; -#line 84 "/home/jens/Source/shotwell/src/util/misc.vala" +#line 75 "/home/jens/Source/shotwell/src/util/misc.vala" g_return_val_if_fail (G_IS_FILE (file), NULL); -#line 85 "/home/jens/Source/shotwell/src/util/misc.vala" +#line 76 "/home/jens/Source/shotwell/src/util/misc.vala" _tmp0_ = g_checksum_new (G_CHECKSUM_MD5); -#line 85 "/home/jens/Source/shotwell/src/util/misc.vala" +#line 76 "/home/jens/Source/shotwell/src/util/misc.vala" md5 = _tmp0_; -#line 86 "/home/jens/Source/shotwell/src/util/misc.vala" +#line 77 "/home/jens/Source/shotwell/src/util/misc.vala" _tmp1_ = g_new0 (guint8, 64 * 1024); -#line 86 "/home/jens/Source/shotwell/src/util/misc.vala" +#line 77 "/home/jens/Source/shotwell/src/util/misc.vala" buffer = _tmp1_; -#line 86 "/home/jens/Source/shotwell/src/util/misc.vala" +#line 77 "/home/jens/Source/shotwell/src/util/misc.vala" buffer_length1 = 64 * 1024; -#line 86 "/home/jens/Source/shotwell/src/util/misc.vala" +#line 77 "/home/jens/Source/shotwell/src/util/misc.vala" _buffer_size_ = buffer_length1; -#line 88 "/home/jens/Source/shotwell/src/util/misc.vala" +#line 79 "/home/jens/Source/shotwell/src/util/misc.vala" _tmp2_ = file; -#line 88 "/home/jens/Source/shotwell/src/util/misc.vala" +#line 79 "/home/jens/Source/shotwell/src/util/misc.vala" _tmp3_ = g_file_read (_tmp2_, NULL, &_inner_error_); -#line 88 "/home/jens/Source/shotwell/src/util/misc.vala" +#line 79 "/home/jens/Source/shotwell/src/util/misc.vala" fins = _tmp3_; -#line 88 "/home/jens/Source/shotwell/src/util/misc.vala" +#line 79 "/home/jens/Source/shotwell/src/util/misc.vala" if (G_UNLIKELY (_inner_error_ != NULL)) { -#line 88 "/home/jens/Source/shotwell/src/util/misc.vala" +#line 79 "/home/jens/Source/shotwell/src/util/misc.vala" g_propagate_error (error, _inner_error_); -#line 88 "/home/jens/Source/shotwell/src/util/misc.vala" +#line 79 "/home/jens/Source/shotwell/src/util/misc.vala" buffer = (g_free (buffer), NULL); -#line 88 "/home/jens/Source/shotwell/src/util/misc.vala" +#line 79 "/home/jens/Source/shotwell/src/util/misc.vala" _g_checksum_free0 (md5); -#line 88 "/home/jens/Source/shotwell/src/util/misc.vala" +#line 79 "/home/jens/Source/shotwell/src/util/misc.vala" return NULL; -#line 656 "misc.c" +#line 618 "misc.c" } { gboolean _tmp4_ = FALSE; -#line 89 "/home/jens/Source/shotwell/src/util/misc.vala" +#line 80 "/home/jens/Source/shotwell/src/util/misc.vala" _tmp4_ = TRUE; -#line 89 "/home/jens/Source/shotwell/src/util/misc.vala" +#line 80 "/home/jens/Source/shotwell/src/util/misc.vala" while (TRUE) { -#line 664 "misc.c" +#line 626 "misc.c" gsize bytes_read = 0UL; GFileInputStream* _tmp5_; guint8* _tmp6_; @@ -671,66 +633,66 @@ gchar* md5_file (GFile* file, GError** error) { guint8* _tmp10_; gint _tmp10__length1; gsize _tmp11_; -#line 89 "/home/jens/Source/shotwell/src/util/misc.vala" +#line 80 "/home/jens/Source/shotwell/src/util/misc.vala" if (!_tmp4_) { -#line 677 "misc.c" +#line 639 "misc.c" } -#line 89 "/home/jens/Source/shotwell/src/util/misc.vala" +#line 80 "/home/jens/Source/shotwell/src/util/misc.vala" _tmp4_ = FALSE; -#line 90 "/home/jens/Source/shotwell/src/util/misc.vala" +#line 81 "/home/jens/Source/shotwell/src/util/misc.vala" _tmp5_ = fins; -#line 90 "/home/jens/Source/shotwell/src/util/misc.vala" +#line 81 "/home/jens/Source/shotwell/src/util/misc.vala" _tmp6_ = buffer; -#line 90 "/home/jens/Source/shotwell/src/util/misc.vala" +#line 81 "/home/jens/Source/shotwell/src/util/misc.vala" _tmp6__length1 = buffer_length1; -#line 90 "/home/jens/Source/shotwell/src/util/misc.vala" +#line 81 "/home/jens/Source/shotwell/src/util/misc.vala" _tmp7_ = g_input_stream_read (G_TYPE_CHECK_INSTANCE_CAST (_tmp5_, g_input_stream_get_type (), GInputStream), _tmp6_, (gsize) _tmp6__length1, NULL, &_inner_error_); -#line 90 "/home/jens/Source/shotwell/src/util/misc.vala" +#line 81 "/home/jens/Source/shotwell/src/util/misc.vala" bytes_read = (gsize) _tmp7_; -#line 90 "/home/jens/Source/shotwell/src/util/misc.vala" +#line 81 "/home/jens/Source/shotwell/src/util/misc.vala" if (G_UNLIKELY (_inner_error_ != NULL)) { -#line 90 "/home/jens/Source/shotwell/src/util/misc.vala" +#line 81 "/home/jens/Source/shotwell/src/util/misc.vala" g_propagate_error (error, _inner_error_); -#line 90 "/home/jens/Source/shotwell/src/util/misc.vala" +#line 81 "/home/jens/Source/shotwell/src/util/misc.vala" _g_object_unref0 (fins); -#line 90 "/home/jens/Source/shotwell/src/util/misc.vala" +#line 81 "/home/jens/Source/shotwell/src/util/misc.vala" buffer = (g_free (buffer), NULL); -#line 90 "/home/jens/Source/shotwell/src/util/misc.vala" +#line 81 "/home/jens/Source/shotwell/src/util/misc.vala" _g_checksum_free0 (md5); -#line 90 "/home/jens/Source/shotwell/src/util/misc.vala" +#line 81 "/home/jens/Source/shotwell/src/util/misc.vala" return NULL; -#line 703 "misc.c" +#line 665 "misc.c" } -#line 91 "/home/jens/Source/shotwell/src/util/misc.vala" +#line 82 "/home/jens/Source/shotwell/src/util/misc.vala" _tmp8_ = bytes_read; -#line 91 "/home/jens/Source/shotwell/src/util/misc.vala" +#line 82 "/home/jens/Source/shotwell/src/util/misc.vala" if (_tmp8_ <= ((gsize) 0)) { -#line 92 "/home/jens/Source/shotwell/src/util/misc.vala" +#line 83 "/home/jens/Source/shotwell/src/util/misc.vala" break; -#line 711 "misc.c" +#line 673 "misc.c" } -#line 94 "/home/jens/Source/shotwell/src/util/misc.vala" +#line 85 "/home/jens/Source/shotwell/src/util/misc.vala" _tmp9_ = md5; -#line 94 "/home/jens/Source/shotwell/src/util/misc.vala" +#line 85 "/home/jens/Source/shotwell/src/util/misc.vala" _tmp10_ = buffer; -#line 94 "/home/jens/Source/shotwell/src/util/misc.vala" +#line 85 "/home/jens/Source/shotwell/src/util/misc.vala" _tmp10__length1 = buffer_length1; -#line 94 "/home/jens/Source/shotwell/src/util/misc.vala" +#line 85 "/home/jens/Source/shotwell/src/util/misc.vala" _tmp11_ = bytes_read; -#line 94 "/home/jens/Source/shotwell/src/util/misc.vala" +#line 85 "/home/jens/Source/shotwell/src/util/misc.vala" g_checksum_update (_tmp9_, (guchar*) _tmp10_, _tmp11_); -#line 723 "misc.c" +#line 685 "misc.c" } } { GFileInputStream* _tmp12_; -#line 98 "/home/jens/Source/shotwell/src/util/misc.vala" +#line 89 "/home/jens/Source/shotwell/src/util/misc.vala" _tmp12_ = fins; -#line 98 "/home/jens/Source/shotwell/src/util/misc.vala" +#line 89 "/home/jens/Source/shotwell/src/util/misc.vala" g_input_stream_close (G_TYPE_CHECK_INSTANCE_CAST (_tmp12_, g_input_stream_get_type (), GInputStream), NULL, &_inner_error_); -#line 98 "/home/jens/Source/shotwell/src/util/misc.vala" +#line 89 "/home/jens/Source/shotwell/src/util/misc.vala" if (G_UNLIKELY (_inner_error_ != NULL)) { -#line 734 "misc.c" +#line 696 "misc.c" goto __catch5_g_error; } } @@ -743,60 +705,60 @@ gchar* md5_file (GFile* file, GError** error) { gchar* _tmp15_; GError* _tmp16_; const gchar* _tmp17_; -#line 97 "/home/jens/Source/shotwell/src/util/misc.vala" +#line 88 "/home/jens/Source/shotwell/src/util/misc.vala" err = _inner_error_; -#line 97 "/home/jens/Source/shotwell/src/util/misc.vala" +#line 88 "/home/jens/Source/shotwell/src/util/misc.vala" _inner_error_ = NULL; -#line 100 "/home/jens/Source/shotwell/src/util/misc.vala" +#line 91 "/home/jens/Source/shotwell/src/util/misc.vala" _tmp13_ = file; -#line 100 "/home/jens/Source/shotwell/src/util/misc.vala" +#line 91 "/home/jens/Source/shotwell/src/util/misc.vala" _tmp14_ = g_file_get_path (_tmp13_); -#line 100 "/home/jens/Source/shotwell/src/util/misc.vala" +#line 91 "/home/jens/Source/shotwell/src/util/misc.vala" _tmp15_ = _tmp14_; -#line 100 "/home/jens/Source/shotwell/src/util/misc.vala" +#line 91 "/home/jens/Source/shotwell/src/util/misc.vala" _tmp16_ = err; -#line 100 "/home/jens/Source/shotwell/src/util/misc.vala" +#line 91 "/home/jens/Source/shotwell/src/util/misc.vala" _tmp17_ = _tmp16_->message; -#line 100 "/home/jens/Source/shotwell/src/util/misc.vala" - g_warning ("misc.vala:100: Unable to close MD5 input stream for %s: %s", _tmp15_, _tmp17_); -#line 100 "/home/jens/Source/shotwell/src/util/misc.vala" +#line 91 "/home/jens/Source/shotwell/src/util/misc.vala" + g_warning ("misc.vala:91: Unable to close MD5 input stream for %s: %s", _tmp15_, _tmp17_); +#line 91 "/home/jens/Source/shotwell/src/util/misc.vala" _g_free0 (_tmp15_); -#line 97 "/home/jens/Source/shotwell/src/util/misc.vala" +#line 88 "/home/jens/Source/shotwell/src/util/misc.vala" _g_error_free0 (err); -#line 767 "misc.c" +#line 729 "misc.c" } __finally5: -#line 97 "/home/jens/Source/shotwell/src/util/misc.vala" +#line 88 "/home/jens/Source/shotwell/src/util/misc.vala" if (G_UNLIKELY (_inner_error_ != NULL)) { -#line 97 "/home/jens/Source/shotwell/src/util/misc.vala" +#line 88 "/home/jens/Source/shotwell/src/util/misc.vala" g_propagate_error (error, _inner_error_); -#line 97 "/home/jens/Source/shotwell/src/util/misc.vala" +#line 88 "/home/jens/Source/shotwell/src/util/misc.vala" _g_object_unref0 (fins); -#line 97 "/home/jens/Source/shotwell/src/util/misc.vala" +#line 88 "/home/jens/Source/shotwell/src/util/misc.vala" buffer = (g_free (buffer), NULL); -#line 97 "/home/jens/Source/shotwell/src/util/misc.vala" +#line 88 "/home/jens/Source/shotwell/src/util/misc.vala" _g_checksum_free0 (md5); -#line 97 "/home/jens/Source/shotwell/src/util/misc.vala" +#line 88 "/home/jens/Source/shotwell/src/util/misc.vala" return NULL; -#line 782 "misc.c" +#line 744 "misc.c" } -#line 103 "/home/jens/Source/shotwell/src/util/misc.vala" +#line 94 "/home/jens/Source/shotwell/src/util/misc.vala" _tmp18_ = md5; -#line 103 "/home/jens/Source/shotwell/src/util/misc.vala" +#line 94 "/home/jens/Source/shotwell/src/util/misc.vala" _tmp19_ = g_checksum_get_string (_tmp18_); -#line 103 "/home/jens/Source/shotwell/src/util/misc.vala" +#line 94 "/home/jens/Source/shotwell/src/util/misc.vala" _tmp20_ = g_strdup (_tmp19_); -#line 103 "/home/jens/Source/shotwell/src/util/misc.vala" +#line 94 "/home/jens/Source/shotwell/src/util/misc.vala" result = _tmp20_; -#line 103 "/home/jens/Source/shotwell/src/util/misc.vala" +#line 94 "/home/jens/Source/shotwell/src/util/misc.vala" _g_object_unref0 (fins); -#line 103 "/home/jens/Source/shotwell/src/util/misc.vala" +#line 94 "/home/jens/Source/shotwell/src/util/misc.vala" buffer = (g_free (buffer), NULL); -#line 103 "/home/jens/Source/shotwell/src/util/misc.vala" +#line 94 "/home/jens/Source/shotwell/src/util/misc.vala" _g_checksum_free0 (md5); -#line 103 "/home/jens/Source/shotwell/src/util/misc.vala" +#line 94 "/home/jens/Source/shotwell/src/util/misc.vala" return result; -#line 800 "misc.c" +#line 762 "misc.c" } @@ -818,208 +780,208 @@ gboolean equal_sets (GeeSet* a, GeeSet* b) { GeeSet* _tmp27_; gint _tmp28_; gint _tmp29_; -#line 107 "/home/jens/Source/shotwell/src/util/misc.vala" +#line 98 "/home/jens/Source/shotwell/src/util/misc.vala" g_return_val_if_fail ((a == NULL) || GEE_IS_SET (a), FALSE); -#line 107 "/home/jens/Source/shotwell/src/util/misc.vala" +#line 98 "/home/jens/Source/shotwell/src/util/misc.vala" g_return_val_if_fail ((b == NULL) || GEE_IS_SET (b), FALSE); -#line 108 "/home/jens/Source/shotwell/src/util/misc.vala" +#line 99 "/home/jens/Source/shotwell/src/util/misc.vala" _tmp2_ = a; -#line 108 "/home/jens/Source/shotwell/src/util/misc.vala" +#line 99 "/home/jens/Source/shotwell/src/util/misc.vala" if (_tmp2_ != NULL) { -#line 830 "misc.c" +#line 792 "misc.c" GeeSet* _tmp3_; gint _tmp4_; gint _tmp5_; -#line 108 "/home/jens/Source/shotwell/src/util/misc.vala" +#line 99 "/home/jens/Source/shotwell/src/util/misc.vala" _tmp3_ = a; -#line 108 "/home/jens/Source/shotwell/src/util/misc.vala" +#line 99 "/home/jens/Source/shotwell/src/util/misc.vala" _tmp4_ = gee_collection_get_size (G_TYPE_CHECK_INSTANCE_CAST (_tmp3_, GEE_TYPE_COLLECTION, GeeCollection)); -#line 108 "/home/jens/Source/shotwell/src/util/misc.vala" +#line 99 "/home/jens/Source/shotwell/src/util/misc.vala" _tmp5_ = _tmp4_; -#line 108 "/home/jens/Source/shotwell/src/util/misc.vala" +#line 99 "/home/jens/Source/shotwell/src/util/misc.vala" _tmp1_ = _tmp5_ == 0; -#line 842 "misc.c" +#line 804 "misc.c" } else { -#line 108 "/home/jens/Source/shotwell/src/util/misc.vala" +#line 99 "/home/jens/Source/shotwell/src/util/misc.vala" _tmp1_ = FALSE; -#line 846 "misc.c" +#line 808 "misc.c" } -#line 108 "/home/jens/Source/shotwell/src/util/misc.vala" +#line 99 "/home/jens/Source/shotwell/src/util/misc.vala" if (_tmp1_) { -#line 850 "misc.c" +#line 812 "misc.c" GeeSet* _tmp6_; -#line 108 "/home/jens/Source/shotwell/src/util/misc.vala" +#line 99 "/home/jens/Source/shotwell/src/util/misc.vala" _tmp6_ = b; -#line 108 "/home/jens/Source/shotwell/src/util/misc.vala" +#line 99 "/home/jens/Source/shotwell/src/util/misc.vala" _tmp0_ = _tmp6_ == NULL; -#line 856 "misc.c" +#line 818 "misc.c" } else { -#line 108 "/home/jens/Source/shotwell/src/util/misc.vala" +#line 99 "/home/jens/Source/shotwell/src/util/misc.vala" _tmp0_ = FALSE; -#line 860 "misc.c" +#line 822 "misc.c" } -#line 108 "/home/jens/Source/shotwell/src/util/misc.vala" +#line 99 "/home/jens/Source/shotwell/src/util/misc.vala" if (_tmp0_) { -#line 109 "/home/jens/Source/shotwell/src/util/misc.vala" +#line 100 "/home/jens/Source/shotwell/src/util/misc.vala" result = TRUE; -#line 109 "/home/jens/Source/shotwell/src/util/misc.vala" +#line 100 "/home/jens/Source/shotwell/src/util/misc.vala" return result; -#line 868 "misc.c" +#line 830 "misc.c" } -#line 111 "/home/jens/Source/shotwell/src/util/misc.vala" +#line 102 "/home/jens/Source/shotwell/src/util/misc.vala" _tmp8_ = a; -#line 111 "/home/jens/Source/shotwell/src/util/misc.vala" +#line 102 "/home/jens/Source/shotwell/src/util/misc.vala" if (_tmp8_ == NULL) { -#line 874 "misc.c" +#line 836 "misc.c" gboolean _tmp9_ = FALSE; GeeSet* _tmp10_; -#line 111 "/home/jens/Source/shotwell/src/util/misc.vala" +#line 102 "/home/jens/Source/shotwell/src/util/misc.vala" _tmp10_ = b; -#line 111 "/home/jens/Source/shotwell/src/util/misc.vala" +#line 102 "/home/jens/Source/shotwell/src/util/misc.vala" if (_tmp10_ != NULL) { -#line 881 "misc.c" +#line 843 "misc.c" GeeSet* _tmp11_; gint _tmp12_; gint _tmp13_; -#line 111 "/home/jens/Source/shotwell/src/util/misc.vala" +#line 102 "/home/jens/Source/shotwell/src/util/misc.vala" _tmp11_ = b; -#line 111 "/home/jens/Source/shotwell/src/util/misc.vala" +#line 102 "/home/jens/Source/shotwell/src/util/misc.vala" _tmp12_ = gee_collection_get_size (G_TYPE_CHECK_INSTANCE_CAST (_tmp11_, GEE_TYPE_COLLECTION, GeeCollection)); -#line 111 "/home/jens/Source/shotwell/src/util/misc.vala" +#line 102 "/home/jens/Source/shotwell/src/util/misc.vala" _tmp13_ = _tmp12_; -#line 111 "/home/jens/Source/shotwell/src/util/misc.vala" +#line 102 "/home/jens/Source/shotwell/src/util/misc.vala" _tmp9_ = _tmp13_ == 0; -#line 893 "misc.c" +#line 855 "misc.c" } else { -#line 111 "/home/jens/Source/shotwell/src/util/misc.vala" +#line 102 "/home/jens/Source/shotwell/src/util/misc.vala" _tmp9_ = FALSE; -#line 897 "misc.c" +#line 859 "misc.c" } -#line 111 "/home/jens/Source/shotwell/src/util/misc.vala" +#line 102 "/home/jens/Source/shotwell/src/util/misc.vala" _tmp7_ = _tmp9_; -#line 901 "misc.c" +#line 863 "misc.c" } else { -#line 111 "/home/jens/Source/shotwell/src/util/misc.vala" +#line 102 "/home/jens/Source/shotwell/src/util/misc.vala" _tmp7_ = FALSE; -#line 905 "misc.c" +#line 867 "misc.c" } -#line 111 "/home/jens/Source/shotwell/src/util/misc.vala" +#line 102 "/home/jens/Source/shotwell/src/util/misc.vala" if (_tmp7_) { -#line 112 "/home/jens/Source/shotwell/src/util/misc.vala" +#line 103 "/home/jens/Source/shotwell/src/util/misc.vala" result = TRUE; -#line 112 "/home/jens/Source/shotwell/src/util/misc.vala" +#line 103 "/home/jens/Source/shotwell/src/util/misc.vala" return result; -#line 913 "misc.c" +#line 875 "misc.c" } -#line 114 "/home/jens/Source/shotwell/src/util/misc.vala" +#line 105 "/home/jens/Source/shotwell/src/util/misc.vala" _tmp16_ = a; -#line 114 "/home/jens/Source/shotwell/src/util/misc.vala" +#line 105 "/home/jens/Source/shotwell/src/util/misc.vala" if (_tmp16_ == NULL) { -#line 919 "misc.c" +#line 881 "misc.c" GeeSet* _tmp17_; -#line 114 "/home/jens/Source/shotwell/src/util/misc.vala" +#line 105 "/home/jens/Source/shotwell/src/util/misc.vala" _tmp17_ = b; -#line 114 "/home/jens/Source/shotwell/src/util/misc.vala" +#line 105 "/home/jens/Source/shotwell/src/util/misc.vala" _tmp15_ = _tmp17_ != NULL; -#line 925 "misc.c" +#line 887 "misc.c" } else { -#line 114 "/home/jens/Source/shotwell/src/util/misc.vala" +#line 105 "/home/jens/Source/shotwell/src/util/misc.vala" _tmp15_ = FALSE; -#line 929 "misc.c" +#line 891 "misc.c" } -#line 114 "/home/jens/Source/shotwell/src/util/misc.vala" +#line 105 "/home/jens/Source/shotwell/src/util/misc.vala" if (_tmp15_) { -#line 114 "/home/jens/Source/shotwell/src/util/misc.vala" +#line 105 "/home/jens/Source/shotwell/src/util/misc.vala" _tmp14_ = TRUE; -#line 935 "misc.c" +#line 897 "misc.c" } else { gboolean _tmp18_ = FALSE; GeeSet* _tmp19_; -#line 114 "/home/jens/Source/shotwell/src/util/misc.vala" +#line 105 "/home/jens/Source/shotwell/src/util/misc.vala" _tmp19_ = a; -#line 114 "/home/jens/Source/shotwell/src/util/misc.vala" +#line 105 "/home/jens/Source/shotwell/src/util/misc.vala" if (_tmp19_ != NULL) { -#line 943 "misc.c" +#line 905 "misc.c" GeeSet* _tmp20_; -#line 114 "/home/jens/Source/shotwell/src/util/misc.vala" +#line 105 "/home/jens/Source/shotwell/src/util/misc.vala" _tmp20_ = b; -#line 114 "/home/jens/Source/shotwell/src/util/misc.vala" +#line 105 "/home/jens/Source/shotwell/src/util/misc.vala" _tmp18_ = _tmp20_ == NULL; -#line 949 "misc.c" +#line 911 "misc.c" } else { -#line 114 "/home/jens/Source/shotwell/src/util/misc.vala" +#line 105 "/home/jens/Source/shotwell/src/util/misc.vala" _tmp18_ = FALSE; -#line 953 "misc.c" +#line 915 "misc.c" } -#line 114 "/home/jens/Source/shotwell/src/util/misc.vala" +#line 105 "/home/jens/Source/shotwell/src/util/misc.vala" _tmp14_ = _tmp18_; -#line 957 "misc.c" +#line 919 "misc.c" } -#line 114 "/home/jens/Source/shotwell/src/util/misc.vala" +#line 105 "/home/jens/Source/shotwell/src/util/misc.vala" if (_tmp14_) { -#line 115 "/home/jens/Source/shotwell/src/util/misc.vala" +#line 106 "/home/jens/Source/shotwell/src/util/misc.vala" result = FALSE; -#line 115 "/home/jens/Source/shotwell/src/util/misc.vala" +#line 106 "/home/jens/Source/shotwell/src/util/misc.vala" return result; -#line 965 "misc.c" +#line 927 "misc.c" } -#line 117 "/home/jens/Source/shotwell/src/util/misc.vala" +#line 108 "/home/jens/Source/shotwell/src/util/misc.vala" _tmp22_ = a; -#line 117 "/home/jens/Source/shotwell/src/util/misc.vala" +#line 108 "/home/jens/Source/shotwell/src/util/misc.vala" if (_tmp22_ == NULL) { -#line 971 "misc.c" +#line 933 "misc.c" GeeSet* _tmp23_; -#line 117 "/home/jens/Source/shotwell/src/util/misc.vala" +#line 108 "/home/jens/Source/shotwell/src/util/misc.vala" _tmp23_ = b; -#line 117 "/home/jens/Source/shotwell/src/util/misc.vala" +#line 108 "/home/jens/Source/shotwell/src/util/misc.vala" _tmp21_ = _tmp23_ == NULL; -#line 977 "misc.c" +#line 939 "misc.c" } else { -#line 117 "/home/jens/Source/shotwell/src/util/misc.vala" +#line 108 "/home/jens/Source/shotwell/src/util/misc.vala" _tmp21_ = FALSE; -#line 981 "misc.c" +#line 943 "misc.c" } -#line 117 "/home/jens/Source/shotwell/src/util/misc.vala" +#line 108 "/home/jens/Source/shotwell/src/util/misc.vala" if (_tmp21_) { -#line 118 "/home/jens/Source/shotwell/src/util/misc.vala" +#line 109 "/home/jens/Source/shotwell/src/util/misc.vala" result = TRUE; -#line 118 "/home/jens/Source/shotwell/src/util/misc.vala" +#line 109 "/home/jens/Source/shotwell/src/util/misc.vala" return result; -#line 989 "misc.c" +#line 951 "misc.c" } -#line 120 "/home/jens/Source/shotwell/src/util/misc.vala" +#line 111 "/home/jens/Source/shotwell/src/util/misc.vala" _tmp24_ = a; -#line 120 "/home/jens/Source/shotwell/src/util/misc.vala" +#line 111 "/home/jens/Source/shotwell/src/util/misc.vala" _tmp25_ = gee_collection_get_size (G_TYPE_CHECK_INSTANCE_CAST (_tmp24_, GEE_TYPE_COLLECTION, GeeCollection)); -#line 120 "/home/jens/Source/shotwell/src/util/misc.vala" +#line 111 "/home/jens/Source/shotwell/src/util/misc.vala" _tmp26_ = _tmp25_; -#line 120 "/home/jens/Source/shotwell/src/util/misc.vala" +#line 111 "/home/jens/Source/shotwell/src/util/misc.vala" _tmp27_ = b; -#line 120 "/home/jens/Source/shotwell/src/util/misc.vala" +#line 111 "/home/jens/Source/shotwell/src/util/misc.vala" _tmp28_ = gee_collection_get_size (G_TYPE_CHECK_INSTANCE_CAST (_tmp27_, GEE_TYPE_COLLECTION, GeeCollection)); -#line 120 "/home/jens/Source/shotwell/src/util/misc.vala" +#line 111 "/home/jens/Source/shotwell/src/util/misc.vala" _tmp29_ = _tmp28_; -#line 120 "/home/jens/Source/shotwell/src/util/misc.vala" +#line 111 "/home/jens/Source/shotwell/src/util/misc.vala" if (_tmp26_ != _tmp29_) { -#line 121 "/home/jens/Source/shotwell/src/util/misc.vala" +#line 112 "/home/jens/Source/shotwell/src/util/misc.vala" result = FALSE; -#line 121 "/home/jens/Source/shotwell/src/util/misc.vala" +#line 112 "/home/jens/Source/shotwell/src/util/misc.vala" return result; -#line 1009 "misc.c" +#line 971 "misc.c" } { GeeIterator* _element_it = NULL; GeeSet* _tmp30_; GeeIterator* _tmp31_; -#line 125 "/home/jens/Source/shotwell/src/util/misc.vala" +#line 116 "/home/jens/Source/shotwell/src/util/misc.vala" _tmp30_ = a; -#line 125 "/home/jens/Source/shotwell/src/util/misc.vala" +#line 116 "/home/jens/Source/shotwell/src/util/misc.vala" _tmp31_ = gee_iterable_iterator (G_TYPE_CHECK_INSTANCE_CAST (_tmp30_, GEE_TYPE_ITERABLE, GeeIterable)); -#line 125 "/home/jens/Source/shotwell/src/util/misc.vala" +#line 116 "/home/jens/Source/shotwell/src/util/misc.vala" _element_it = _tmp31_; -#line 125 "/home/jens/Source/shotwell/src/util/misc.vala" +#line 116 "/home/jens/Source/shotwell/src/util/misc.vala" while (TRUE) { -#line 1023 "misc.c" +#line 985 "misc.c" GeeIterator* _tmp32_; gboolean _tmp33_; gchar* element = NULL; @@ -1028,60 +990,60 @@ gboolean equal_sets (GeeSet* a, GeeSet* b) { GeeSet* _tmp36_; const gchar* _tmp37_; gboolean _tmp38_; -#line 125 "/home/jens/Source/shotwell/src/util/misc.vala" +#line 116 "/home/jens/Source/shotwell/src/util/misc.vala" _tmp32_ = _element_it; -#line 125 "/home/jens/Source/shotwell/src/util/misc.vala" +#line 116 "/home/jens/Source/shotwell/src/util/misc.vala" _tmp33_ = gee_iterator_next (_tmp32_); -#line 125 "/home/jens/Source/shotwell/src/util/misc.vala" +#line 116 "/home/jens/Source/shotwell/src/util/misc.vala" if (!_tmp33_) { -#line 125 "/home/jens/Source/shotwell/src/util/misc.vala" +#line 116 "/home/jens/Source/shotwell/src/util/misc.vala" break; -#line 1040 "misc.c" +#line 1002 "misc.c" } -#line 125 "/home/jens/Source/shotwell/src/util/misc.vala" +#line 116 "/home/jens/Source/shotwell/src/util/misc.vala" _tmp34_ = _element_it; -#line 125 "/home/jens/Source/shotwell/src/util/misc.vala" +#line 116 "/home/jens/Source/shotwell/src/util/misc.vala" _tmp35_ = gee_iterator_get (_tmp34_); -#line 125 "/home/jens/Source/shotwell/src/util/misc.vala" +#line 116 "/home/jens/Source/shotwell/src/util/misc.vala" element = (gchar*) _tmp35_; -#line 126 "/home/jens/Source/shotwell/src/util/misc.vala" +#line 117 "/home/jens/Source/shotwell/src/util/misc.vala" _tmp36_ = b; -#line 126 "/home/jens/Source/shotwell/src/util/misc.vala" +#line 117 "/home/jens/Source/shotwell/src/util/misc.vala" _tmp37_ = element; -#line 126 "/home/jens/Source/shotwell/src/util/misc.vala" +#line 117 "/home/jens/Source/shotwell/src/util/misc.vala" _tmp38_ = gee_collection_contains (G_TYPE_CHECK_INSTANCE_CAST (_tmp36_, GEE_TYPE_COLLECTION, GeeCollection), _tmp37_); -#line 126 "/home/jens/Source/shotwell/src/util/misc.vala" +#line 117 "/home/jens/Source/shotwell/src/util/misc.vala" if (!_tmp38_) { -#line 127 "/home/jens/Source/shotwell/src/util/misc.vala" +#line 118 "/home/jens/Source/shotwell/src/util/misc.vala" result = FALSE; -#line 127 "/home/jens/Source/shotwell/src/util/misc.vala" +#line 118 "/home/jens/Source/shotwell/src/util/misc.vala" _g_free0 (element); -#line 127 "/home/jens/Source/shotwell/src/util/misc.vala" +#line 118 "/home/jens/Source/shotwell/src/util/misc.vala" _g_object_unref0 (_element_it); -#line 127 "/home/jens/Source/shotwell/src/util/misc.vala" +#line 118 "/home/jens/Source/shotwell/src/util/misc.vala" return result; -#line 1064 "misc.c" +#line 1026 "misc.c" } -#line 125 "/home/jens/Source/shotwell/src/util/misc.vala" +#line 116 "/home/jens/Source/shotwell/src/util/misc.vala" _g_free0 (element); -#line 1068 "misc.c" +#line 1030 "misc.c" } -#line 125 "/home/jens/Source/shotwell/src/util/misc.vala" +#line 116 "/home/jens/Source/shotwell/src/util/misc.vala" _g_object_unref0 (_element_it); -#line 1072 "misc.c" +#line 1034 "misc.c" } -#line 130 "/home/jens/Source/shotwell/src/util/misc.vala" +#line 121 "/home/jens/Source/shotwell/src/util/misc.vala" result = TRUE; -#line 130 "/home/jens/Source/shotwell/src/util/misc.vala" +#line 121 "/home/jens/Source/shotwell/src/util/misc.vala" return result; -#line 1078 "misc.c" +#line 1040 "misc.c" } static gpointer _g_object_ref0 (gpointer self) { -#line 166 "/home/jens/Source/shotwell/src/util/misc.vala" +#line 157 "/home/jens/Source/shotwell/src/util/misc.vala" return self ? g_object_ref (self) : NULL; -#line 1085 "misc.c" +#line 1047 "misc.c" } @@ -1098,112 +1060,112 @@ GeeSet* intersection_of_sets (GeeSet* a, GeeSet* b, GeeSet* excluded) { gint _tmp43_; gint _tmp44_; GeeSet* _tmp46_; -#line 134 "/home/jens/Source/shotwell/src/util/misc.vala" +#line 125 "/home/jens/Source/shotwell/src/util/misc.vala" g_return_val_if_fail ((a == NULL) || GEE_IS_SET (a), NULL); -#line 134 "/home/jens/Source/shotwell/src/util/misc.vala" +#line 125 "/home/jens/Source/shotwell/src/util/misc.vala" g_return_val_if_fail ((b == NULL) || GEE_IS_SET (b), NULL); -#line 134 "/home/jens/Source/shotwell/src/util/misc.vala" +#line 125 "/home/jens/Source/shotwell/src/util/misc.vala" g_return_val_if_fail ((excluded == NULL) || GEE_IS_SET (excluded), NULL); -#line 136 "/home/jens/Source/shotwell/src/util/misc.vala" +#line 127 "/home/jens/Source/shotwell/src/util/misc.vala" _tmp1_ = a; -#line 136 "/home/jens/Source/shotwell/src/util/misc.vala" +#line 127 "/home/jens/Source/shotwell/src/util/misc.vala" if (_tmp1_ != NULL) { -#line 1112 "misc.c" +#line 1074 "misc.c" GeeSet* _tmp2_; -#line 136 "/home/jens/Source/shotwell/src/util/misc.vala" +#line 127 "/home/jens/Source/shotwell/src/util/misc.vala" _tmp2_ = b; -#line 136 "/home/jens/Source/shotwell/src/util/misc.vala" +#line 127 "/home/jens/Source/shotwell/src/util/misc.vala" _tmp0_ = _tmp2_ == NULL; -#line 1118 "misc.c" +#line 1080 "misc.c" } else { -#line 136 "/home/jens/Source/shotwell/src/util/misc.vala" +#line 127 "/home/jens/Source/shotwell/src/util/misc.vala" _tmp0_ = FALSE; -#line 1122 "misc.c" +#line 1084 "misc.c" } -#line 136 "/home/jens/Source/shotwell/src/util/misc.vala" +#line 127 "/home/jens/Source/shotwell/src/util/misc.vala" if (_tmp0_) { -#line 1126 "misc.c" +#line 1088 "misc.c" GeeSet* _tmp3_; -#line 137 "/home/jens/Source/shotwell/src/util/misc.vala" +#line 128 "/home/jens/Source/shotwell/src/util/misc.vala" _tmp3_ = excluded; -#line 137 "/home/jens/Source/shotwell/src/util/misc.vala" +#line 128 "/home/jens/Source/shotwell/src/util/misc.vala" if (_tmp3_ != NULL) { -#line 1132 "misc.c" +#line 1094 "misc.c" GeeSet* _tmp4_; GeeSet* _tmp5_; -#line 138 "/home/jens/Source/shotwell/src/util/misc.vala" +#line 129 "/home/jens/Source/shotwell/src/util/misc.vala" _tmp4_ = excluded; -#line 138 "/home/jens/Source/shotwell/src/util/misc.vala" +#line 129 "/home/jens/Source/shotwell/src/util/misc.vala" _tmp5_ = a; -#line 138 "/home/jens/Source/shotwell/src/util/misc.vala" +#line 129 "/home/jens/Source/shotwell/src/util/misc.vala" gee_collection_add_all (G_TYPE_CHECK_INSTANCE_CAST (_tmp4_, GEE_TYPE_COLLECTION, GeeCollection), G_TYPE_CHECK_INSTANCE_CAST (_tmp5_, GEE_TYPE_COLLECTION, GeeCollection)); -#line 1141 "misc.c" +#line 1103 "misc.c" } -#line 140 "/home/jens/Source/shotwell/src/util/misc.vala" +#line 131 "/home/jens/Source/shotwell/src/util/misc.vala" result = NULL; -#line 140 "/home/jens/Source/shotwell/src/util/misc.vala" +#line 131 "/home/jens/Source/shotwell/src/util/misc.vala" return result; -#line 1147 "misc.c" +#line 1109 "misc.c" } -#line 143 "/home/jens/Source/shotwell/src/util/misc.vala" +#line 134 "/home/jens/Source/shotwell/src/util/misc.vala" _tmp7_ = a; -#line 143 "/home/jens/Source/shotwell/src/util/misc.vala" +#line 134 "/home/jens/Source/shotwell/src/util/misc.vala" if (_tmp7_ == NULL) { -#line 1153 "misc.c" +#line 1115 "misc.c" GeeSet* _tmp8_; -#line 143 "/home/jens/Source/shotwell/src/util/misc.vala" +#line 134 "/home/jens/Source/shotwell/src/util/misc.vala" _tmp8_ = b; -#line 143 "/home/jens/Source/shotwell/src/util/misc.vala" +#line 134 "/home/jens/Source/shotwell/src/util/misc.vala" _tmp6_ = _tmp8_ != NULL; -#line 1159 "misc.c" +#line 1121 "misc.c" } else { -#line 143 "/home/jens/Source/shotwell/src/util/misc.vala" +#line 134 "/home/jens/Source/shotwell/src/util/misc.vala" _tmp6_ = FALSE; -#line 1163 "misc.c" +#line 1125 "misc.c" } -#line 143 "/home/jens/Source/shotwell/src/util/misc.vala" +#line 134 "/home/jens/Source/shotwell/src/util/misc.vala" if (_tmp6_) { -#line 1167 "misc.c" +#line 1129 "misc.c" GeeSet* _tmp9_; -#line 144 "/home/jens/Source/shotwell/src/util/misc.vala" +#line 135 "/home/jens/Source/shotwell/src/util/misc.vala" _tmp9_ = excluded; -#line 144 "/home/jens/Source/shotwell/src/util/misc.vala" +#line 135 "/home/jens/Source/shotwell/src/util/misc.vala" if (_tmp9_ != NULL) { -#line 1173 "misc.c" +#line 1135 "misc.c" GeeSet* _tmp10_; GeeSet* _tmp11_; -#line 145 "/home/jens/Source/shotwell/src/util/misc.vala" +#line 136 "/home/jens/Source/shotwell/src/util/misc.vala" _tmp10_ = excluded; -#line 145 "/home/jens/Source/shotwell/src/util/misc.vala" +#line 136 "/home/jens/Source/shotwell/src/util/misc.vala" _tmp11_ = b; -#line 145 "/home/jens/Source/shotwell/src/util/misc.vala" +#line 136 "/home/jens/Source/shotwell/src/util/misc.vala" gee_collection_add_all (G_TYPE_CHECK_INSTANCE_CAST (_tmp10_, GEE_TYPE_COLLECTION, GeeCollection), G_TYPE_CHECK_INSTANCE_CAST (_tmp11_, GEE_TYPE_COLLECTION, GeeCollection)); -#line 1182 "misc.c" +#line 1144 "misc.c" } -#line 147 "/home/jens/Source/shotwell/src/util/misc.vala" +#line 138 "/home/jens/Source/shotwell/src/util/misc.vala" result = NULL; -#line 147 "/home/jens/Source/shotwell/src/util/misc.vala" +#line 138 "/home/jens/Source/shotwell/src/util/misc.vala" return result; -#line 1188 "misc.c" +#line 1150 "misc.c" } -#line 150 "/home/jens/Source/shotwell/src/util/misc.vala" +#line 141 "/home/jens/Source/shotwell/src/util/misc.vala" _tmp12_ = gee_hash_set_new (G_TYPE_STRING, (GBoxedCopyFunc) g_strdup, (GDestroyNotify) g_free, NULL, NULL, NULL, NULL, NULL, NULL); -#line 150 "/home/jens/Source/shotwell/src/util/misc.vala" +#line 141 "/home/jens/Source/shotwell/src/util/misc.vala" intersection = G_TYPE_CHECK_INSTANCE_CAST (_tmp12_, GEE_TYPE_SET, GeeSet); -#line 1194 "misc.c" +#line 1156 "misc.c" { GeeIterator* _element_it = NULL; GeeSet* _tmp13_; GeeIterator* _tmp14_; -#line 152 "/home/jens/Source/shotwell/src/util/misc.vala" +#line 143 "/home/jens/Source/shotwell/src/util/misc.vala" _tmp13_ = a; -#line 152 "/home/jens/Source/shotwell/src/util/misc.vala" +#line 143 "/home/jens/Source/shotwell/src/util/misc.vala" _tmp14_ = gee_iterable_iterator (G_TYPE_CHECK_INSTANCE_CAST (_tmp13_, GEE_TYPE_ITERABLE, GeeIterable)); -#line 152 "/home/jens/Source/shotwell/src/util/misc.vala" +#line 143 "/home/jens/Source/shotwell/src/util/misc.vala" _element_it = _tmp14_; -#line 152 "/home/jens/Source/shotwell/src/util/misc.vala" +#line 143 "/home/jens/Source/shotwell/src/util/misc.vala" while (TRUE) { -#line 1207 "misc.c" +#line 1169 "misc.c" GeeIterator* _tmp15_; gboolean _tmp16_; gchar* element = NULL; @@ -1212,79 +1174,79 @@ GeeSet* intersection_of_sets (GeeSet* a, GeeSet* b, GeeSet* excluded) { GeeSet* _tmp19_; const gchar* _tmp20_; gboolean _tmp21_; -#line 152 "/home/jens/Source/shotwell/src/util/misc.vala" +#line 143 "/home/jens/Source/shotwell/src/util/misc.vala" _tmp15_ = _element_it; -#line 152 "/home/jens/Source/shotwell/src/util/misc.vala" +#line 143 "/home/jens/Source/shotwell/src/util/misc.vala" _tmp16_ = gee_iterator_next (_tmp15_); -#line 152 "/home/jens/Source/shotwell/src/util/misc.vala" +#line 143 "/home/jens/Source/shotwell/src/util/misc.vala" if (!_tmp16_) { -#line 152 "/home/jens/Source/shotwell/src/util/misc.vala" +#line 143 "/home/jens/Source/shotwell/src/util/misc.vala" break; -#line 1224 "misc.c" +#line 1186 "misc.c" } -#line 152 "/home/jens/Source/shotwell/src/util/misc.vala" +#line 143 "/home/jens/Source/shotwell/src/util/misc.vala" _tmp17_ = _element_it; -#line 152 "/home/jens/Source/shotwell/src/util/misc.vala" +#line 143 "/home/jens/Source/shotwell/src/util/misc.vala" _tmp18_ = gee_iterator_get (_tmp17_); -#line 152 "/home/jens/Source/shotwell/src/util/misc.vala" +#line 143 "/home/jens/Source/shotwell/src/util/misc.vala" element = (gchar*) _tmp18_; -#line 153 "/home/jens/Source/shotwell/src/util/misc.vala" +#line 144 "/home/jens/Source/shotwell/src/util/misc.vala" _tmp19_ = b; -#line 153 "/home/jens/Source/shotwell/src/util/misc.vala" +#line 144 "/home/jens/Source/shotwell/src/util/misc.vala" _tmp20_ = element; -#line 153 "/home/jens/Source/shotwell/src/util/misc.vala" +#line 144 "/home/jens/Source/shotwell/src/util/misc.vala" _tmp21_ = gee_collection_contains (G_TYPE_CHECK_INSTANCE_CAST (_tmp19_, GEE_TYPE_COLLECTION, GeeCollection), _tmp20_); -#line 153 "/home/jens/Source/shotwell/src/util/misc.vala" +#line 144 "/home/jens/Source/shotwell/src/util/misc.vala" if (_tmp21_) { -#line 1240 "misc.c" +#line 1202 "misc.c" GeeSet* _tmp22_; const gchar* _tmp23_; -#line 154 "/home/jens/Source/shotwell/src/util/misc.vala" +#line 145 "/home/jens/Source/shotwell/src/util/misc.vala" _tmp22_ = intersection; -#line 154 "/home/jens/Source/shotwell/src/util/misc.vala" +#line 145 "/home/jens/Source/shotwell/src/util/misc.vala" _tmp23_ = element; -#line 154 "/home/jens/Source/shotwell/src/util/misc.vala" +#line 145 "/home/jens/Source/shotwell/src/util/misc.vala" gee_collection_add (G_TYPE_CHECK_INSTANCE_CAST (_tmp22_, GEE_TYPE_COLLECTION, GeeCollection), _tmp23_); -#line 1249 "misc.c" +#line 1211 "misc.c" } else { GeeSet* _tmp24_; -#line 155 "/home/jens/Source/shotwell/src/util/misc.vala" +#line 146 "/home/jens/Source/shotwell/src/util/misc.vala" _tmp24_ = excluded; -#line 155 "/home/jens/Source/shotwell/src/util/misc.vala" +#line 146 "/home/jens/Source/shotwell/src/util/misc.vala" if (_tmp24_ != NULL) { -#line 1256 "misc.c" +#line 1218 "misc.c" GeeSet* _tmp25_; const gchar* _tmp26_; -#line 156 "/home/jens/Source/shotwell/src/util/misc.vala" +#line 147 "/home/jens/Source/shotwell/src/util/misc.vala" _tmp25_ = excluded; -#line 156 "/home/jens/Source/shotwell/src/util/misc.vala" +#line 147 "/home/jens/Source/shotwell/src/util/misc.vala" _tmp26_ = element; -#line 156 "/home/jens/Source/shotwell/src/util/misc.vala" +#line 147 "/home/jens/Source/shotwell/src/util/misc.vala" gee_collection_add (G_TYPE_CHECK_INSTANCE_CAST (_tmp25_, GEE_TYPE_COLLECTION, GeeCollection), _tmp26_); -#line 1265 "misc.c" +#line 1227 "misc.c" } } -#line 152 "/home/jens/Source/shotwell/src/util/misc.vala" +#line 143 "/home/jens/Source/shotwell/src/util/misc.vala" _g_free0 (element); -#line 1270 "misc.c" +#line 1232 "misc.c" } -#line 152 "/home/jens/Source/shotwell/src/util/misc.vala" +#line 143 "/home/jens/Source/shotwell/src/util/misc.vala" _g_object_unref0 (_element_it); -#line 1274 "misc.c" +#line 1236 "misc.c" } { GeeIterator* _element_it = NULL; GeeSet* _tmp27_; GeeIterator* _tmp28_; -#line 159 "/home/jens/Source/shotwell/src/util/misc.vala" +#line 150 "/home/jens/Source/shotwell/src/util/misc.vala" _tmp27_ = b; -#line 159 "/home/jens/Source/shotwell/src/util/misc.vala" +#line 150 "/home/jens/Source/shotwell/src/util/misc.vala" _tmp28_ = gee_iterable_iterator (G_TYPE_CHECK_INSTANCE_CAST (_tmp27_, GEE_TYPE_ITERABLE, GeeIterable)); -#line 159 "/home/jens/Source/shotwell/src/util/misc.vala" +#line 150 "/home/jens/Source/shotwell/src/util/misc.vala" _element_it = _tmp28_; -#line 159 "/home/jens/Source/shotwell/src/util/misc.vala" +#line 150 "/home/jens/Source/shotwell/src/util/misc.vala" while (TRUE) { -#line 1288 "misc.c" +#line 1250 "misc.c" GeeIterator* _tmp29_; gboolean _tmp30_; gchar* element = NULL; @@ -1293,95 +1255,95 @@ GeeSet* intersection_of_sets (GeeSet* a, GeeSet* b, GeeSet* excluded) { GeeSet* _tmp33_; const gchar* _tmp34_; gboolean _tmp35_; -#line 159 "/home/jens/Source/shotwell/src/util/misc.vala" +#line 150 "/home/jens/Source/shotwell/src/util/misc.vala" _tmp29_ = _element_it; -#line 159 "/home/jens/Source/shotwell/src/util/misc.vala" +#line 150 "/home/jens/Source/shotwell/src/util/misc.vala" _tmp30_ = gee_iterator_next (_tmp29_); -#line 159 "/home/jens/Source/shotwell/src/util/misc.vala" +#line 150 "/home/jens/Source/shotwell/src/util/misc.vala" if (!_tmp30_) { -#line 159 "/home/jens/Source/shotwell/src/util/misc.vala" +#line 150 "/home/jens/Source/shotwell/src/util/misc.vala" break; -#line 1305 "misc.c" +#line 1267 "misc.c" } -#line 159 "/home/jens/Source/shotwell/src/util/misc.vala" +#line 150 "/home/jens/Source/shotwell/src/util/misc.vala" _tmp31_ = _element_it; -#line 159 "/home/jens/Source/shotwell/src/util/misc.vala" +#line 150 "/home/jens/Source/shotwell/src/util/misc.vala" _tmp32_ = gee_iterator_get (_tmp31_); -#line 159 "/home/jens/Source/shotwell/src/util/misc.vala" +#line 150 "/home/jens/Source/shotwell/src/util/misc.vala" element = (gchar*) _tmp32_; -#line 160 "/home/jens/Source/shotwell/src/util/misc.vala" +#line 151 "/home/jens/Source/shotwell/src/util/misc.vala" _tmp33_ = a; -#line 160 "/home/jens/Source/shotwell/src/util/misc.vala" +#line 151 "/home/jens/Source/shotwell/src/util/misc.vala" _tmp34_ = element; -#line 160 "/home/jens/Source/shotwell/src/util/misc.vala" +#line 151 "/home/jens/Source/shotwell/src/util/misc.vala" _tmp35_ = gee_collection_contains (G_TYPE_CHECK_INSTANCE_CAST (_tmp33_, GEE_TYPE_COLLECTION, GeeCollection), _tmp34_); -#line 160 "/home/jens/Source/shotwell/src/util/misc.vala" +#line 151 "/home/jens/Source/shotwell/src/util/misc.vala" if (_tmp35_) { -#line 1321 "misc.c" +#line 1283 "misc.c" GeeSet* _tmp36_; const gchar* _tmp37_; -#line 161 "/home/jens/Source/shotwell/src/util/misc.vala" +#line 152 "/home/jens/Source/shotwell/src/util/misc.vala" _tmp36_ = intersection; -#line 161 "/home/jens/Source/shotwell/src/util/misc.vala" +#line 152 "/home/jens/Source/shotwell/src/util/misc.vala" _tmp37_ = element; -#line 161 "/home/jens/Source/shotwell/src/util/misc.vala" +#line 152 "/home/jens/Source/shotwell/src/util/misc.vala" gee_collection_add (G_TYPE_CHECK_INSTANCE_CAST (_tmp36_, GEE_TYPE_COLLECTION, GeeCollection), _tmp37_); -#line 1330 "misc.c" +#line 1292 "misc.c" } else { GeeSet* _tmp38_; -#line 162 "/home/jens/Source/shotwell/src/util/misc.vala" +#line 153 "/home/jens/Source/shotwell/src/util/misc.vala" _tmp38_ = excluded; -#line 162 "/home/jens/Source/shotwell/src/util/misc.vala" +#line 153 "/home/jens/Source/shotwell/src/util/misc.vala" if (_tmp38_ != NULL) { -#line 1337 "misc.c" +#line 1299 "misc.c" GeeSet* _tmp39_; const gchar* _tmp40_; -#line 163 "/home/jens/Source/shotwell/src/util/misc.vala" +#line 154 "/home/jens/Source/shotwell/src/util/misc.vala" _tmp39_ = excluded; -#line 163 "/home/jens/Source/shotwell/src/util/misc.vala" +#line 154 "/home/jens/Source/shotwell/src/util/misc.vala" _tmp40_ = element; -#line 163 "/home/jens/Source/shotwell/src/util/misc.vala" +#line 154 "/home/jens/Source/shotwell/src/util/misc.vala" gee_collection_add (G_TYPE_CHECK_INSTANCE_CAST (_tmp39_, GEE_TYPE_COLLECTION, GeeCollection), _tmp40_); -#line 1346 "misc.c" +#line 1308 "misc.c" } } -#line 159 "/home/jens/Source/shotwell/src/util/misc.vala" +#line 150 "/home/jens/Source/shotwell/src/util/misc.vala" _g_free0 (element); -#line 1351 "misc.c" +#line 1313 "misc.c" } -#line 159 "/home/jens/Source/shotwell/src/util/misc.vala" +#line 150 "/home/jens/Source/shotwell/src/util/misc.vala" _g_object_unref0 (_element_it); -#line 1355 "misc.c" +#line 1317 "misc.c" } -#line 166 "/home/jens/Source/shotwell/src/util/misc.vala" +#line 157 "/home/jens/Source/shotwell/src/util/misc.vala" _tmp42_ = intersection; -#line 166 "/home/jens/Source/shotwell/src/util/misc.vala" +#line 157 "/home/jens/Source/shotwell/src/util/misc.vala" _tmp43_ = gee_collection_get_size (G_TYPE_CHECK_INSTANCE_CAST (_tmp42_, GEE_TYPE_COLLECTION, GeeCollection)); -#line 166 "/home/jens/Source/shotwell/src/util/misc.vala" +#line 157 "/home/jens/Source/shotwell/src/util/misc.vala" _tmp44_ = _tmp43_; -#line 166 "/home/jens/Source/shotwell/src/util/misc.vala" +#line 157 "/home/jens/Source/shotwell/src/util/misc.vala" if (_tmp44_ > 0) { -#line 1365 "misc.c" +#line 1327 "misc.c" GeeSet* _tmp45_; -#line 166 "/home/jens/Source/shotwell/src/util/misc.vala" +#line 157 "/home/jens/Source/shotwell/src/util/misc.vala" _tmp45_ = intersection; -#line 166 "/home/jens/Source/shotwell/src/util/misc.vala" +#line 157 "/home/jens/Source/shotwell/src/util/misc.vala" _tmp41_ = _tmp45_; -#line 1371 "misc.c" +#line 1333 "misc.c" } else { -#line 166 "/home/jens/Source/shotwell/src/util/misc.vala" +#line 157 "/home/jens/Source/shotwell/src/util/misc.vala" _tmp41_ = NULL; -#line 1375 "misc.c" +#line 1337 "misc.c" } -#line 166 "/home/jens/Source/shotwell/src/util/misc.vala" +#line 157 "/home/jens/Source/shotwell/src/util/misc.vala" _tmp46_ = _g_object_ref0 (_tmp41_); -#line 166 "/home/jens/Source/shotwell/src/util/misc.vala" +#line 157 "/home/jens/Source/shotwell/src/util/misc.vala" result = _tmp46_; -#line 166 "/home/jens/Source/shotwell/src/util/misc.vala" +#line 157 "/home/jens/Source/shotwell/src/util/misc.vala" _g_object_unref0 (intersection); -#line 166 "/home/jens/Source/shotwell/src/util/misc.vala" +#line 157 "/home/jens/Source/shotwell/src/util/misc.vala" return result; -#line 1385 "misc.c" +#line 1347 "misc.c" } @@ -1407,38 +1369,38 @@ guchar* serialize_photo_ids (GeeCollection* photos, int* result_length1) { gint _tmp20__length1; guchar* _tmp21_; gint _tmp21__length1; -#line 169 "/home/jens/Source/shotwell/src/util/misc.vala" +#line 160 "/home/jens/Source/shotwell/src/util/misc.vala" g_return_val_if_fail (GEE_IS_COLLECTION (photos), NULL); -#line 170 "/home/jens/Source/shotwell/src/util/misc.vala" +#line 161 "/home/jens/Source/shotwell/src/util/misc.vala" _tmp0_ = photos; -#line 170 "/home/jens/Source/shotwell/src/util/misc.vala" +#line 161 "/home/jens/Source/shotwell/src/util/misc.vala" _tmp1_ = gee_collection_get_size (_tmp0_); -#line 170 "/home/jens/Source/shotwell/src/util/misc.vala" +#line 161 "/home/jens/Source/shotwell/src/util/misc.vala" _tmp2_ = _tmp1_; -#line 170 "/home/jens/Source/shotwell/src/util/misc.vala" +#line 161 "/home/jens/Source/shotwell/src/util/misc.vala" _tmp3_ = g_new0 (gint64, _tmp2_); -#line 170 "/home/jens/Source/shotwell/src/util/misc.vala" +#line 161 "/home/jens/Source/shotwell/src/util/misc.vala" ids = _tmp3_; -#line 170 "/home/jens/Source/shotwell/src/util/misc.vala" +#line 161 "/home/jens/Source/shotwell/src/util/misc.vala" ids_length1 = _tmp2_; -#line 170 "/home/jens/Source/shotwell/src/util/misc.vala" +#line 161 "/home/jens/Source/shotwell/src/util/misc.vala" _ids_size_ = ids_length1; -#line 171 "/home/jens/Source/shotwell/src/util/misc.vala" +#line 162 "/home/jens/Source/shotwell/src/util/misc.vala" ctr = 0; -#line 1429 "misc.c" +#line 1391 "misc.c" { GeeIterator* _photo_it = NULL; GeeCollection* _tmp4_; GeeIterator* _tmp5_; -#line 172 "/home/jens/Source/shotwell/src/util/misc.vala" +#line 163 "/home/jens/Source/shotwell/src/util/misc.vala" _tmp4_ = photos; -#line 172 "/home/jens/Source/shotwell/src/util/misc.vala" +#line 163 "/home/jens/Source/shotwell/src/util/misc.vala" _tmp5_ = gee_iterable_iterator (G_TYPE_CHECK_INSTANCE_CAST (_tmp4_, GEE_TYPE_ITERABLE, GeeIterable)); -#line 172 "/home/jens/Source/shotwell/src/util/misc.vala" +#line 163 "/home/jens/Source/shotwell/src/util/misc.vala" _photo_it = _tmp5_; -#line 172 "/home/jens/Source/shotwell/src/util/misc.vala" +#line 163 "/home/jens/Source/shotwell/src/util/misc.vala" while (TRUE) { -#line 1442 "misc.c" +#line 1404 "misc.c" GeeIterator* _tmp6_; gboolean _tmp7_; Photo* photo = NULL; @@ -1451,87 +1413,87 @@ guchar* serialize_photo_ids (GeeCollection* photos, int* result_length1) { PhotoID _tmp13_ = {0}; gint64 _tmp14_; gint64 _tmp15_; -#line 172 "/home/jens/Source/shotwell/src/util/misc.vala" +#line 163 "/home/jens/Source/shotwell/src/util/misc.vala" _tmp6_ = _photo_it; -#line 172 "/home/jens/Source/shotwell/src/util/misc.vala" +#line 163 "/home/jens/Source/shotwell/src/util/misc.vala" _tmp7_ = gee_iterator_next (_tmp6_); -#line 172 "/home/jens/Source/shotwell/src/util/misc.vala" +#line 163 "/home/jens/Source/shotwell/src/util/misc.vala" if (!_tmp7_) { -#line 172 "/home/jens/Source/shotwell/src/util/misc.vala" +#line 163 "/home/jens/Source/shotwell/src/util/misc.vala" break; -#line 1463 "misc.c" +#line 1425 "misc.c" } -#line 172 "/home/jens/Source/shotwell/src/util/misc.vala" +#line 163 "/home/jens/Source/shotwell/src/util/misc.vala" _tmp8_ = _photo_it; -#line 172 "/home/jens/Source/shotwell/src/util/misc.vala" +#line 163 "/home/jens/Source/shotwell/src/util/misc.vala" _tmp9_ = gee_iterator_get (_tmp8_); -#line 172 "/home/jens/Source/shotwell/src/util/misc.vala" +#line 163 "/home/jens/Source/shotwell/src/util/misc.vala" photo = (Photo*) _tmp9_; -#line 173 "/home/jens/Source/shotwell/src/util/misc.vala" +#line 164 "/home/jens/Source/shotwell/src/util/misc.vala" _tmp10_ = ids; -#line 173 "/home/jens/Source/shotwell/src/util/misc.vala" +#line 164 "/home/jens/Source/shotwell/src/util/misc.vala" _tmp10__length1 = ids_length1; -#line 173 "/home/jens/Source/shotwell/src/util/misc.vala" +#line 164 "/home/jens/Source/shotwell/src/util/misc.vala" _tmp11_ = ctr; -#line 173 "/home/jens/Source/shotwell/src/util/misc.vala" +#line 164 "/home/jens/Source/shotwell/src/util/misc.vala" ctr = _tmp11_ + 1; -#line 173 "/home/jens/Source/shotwell/src/util/misc.vala" +#line 164 "/home/jens/Source/shotwell/src/util/misc.vala" _tmp12_ = photo; -#line 173 "/home/jens/Source/shotwell/src/util/misc.vala" +#line 164 "/home/jens/Source/shotwell/src/util/misc.vala" photo_get_photo_id (_tmp12_, &_tmp13_); -#line 173 "/home/jens/Source/shotwell/src/util/misc.vala" +#line 164 "/home/jens/Source/shotwell/src/util/misc.vala" _tmp14_ = _tmp13_.id; -#line 173 "/home/jens/Source/shotwell/src/util/misc.vala" +#line 164 "/home/jens/Source/shotwell/src/util/misc.vala" _tmp10_[_tmp11_] = _tmp14_; -#line 173 "/home/jens/Source/shotwell/src/util/misc.vala" +#line 164 "/home/jens/Source/shotwell/src/util/misc.vala" _tmp15_ = _tmp10_[_tmp11_]; -#line 172 "/home/jens/Source/shotwell/src/util/misc.vala" +#line 163 "/home/jens/Source/shotwell/src/util/misc.vala" _g_object_unref0 (photo); -#line 1491 "misc.c" +#line 1453 "misc.c" } -#line 172 "/home/jens/Source/shotwell/src/util/misc.vala" +#line 163 "/home/jens/Source/shotwell/src/util/misc.vala" _g_object_unref0 (_photo_it); -#line 1495 "misc.c" +#line 1457 "misc.c" } -#line 175 "/home/jens/Source/shotwell/src/util/misc.vala" +#line 166 "/home/jens/Source/shotwell/src/util/misc.vala" _tmp16_ = photos; -#line 175 "/home/jens/Source/shotwell/src/util/misc.vala" +#line 166 "/home/jens/Source/shotwell/src/util/misc.vala" _tmp17_ = gee_collection_get_size (_tmp16_); -#line 175 "/home/jens/Source/shotwell/src/util/misc.vala" +#line 166 "/home/jens/Source/shotwell/src/util/misc.vala" _tmp18_ = _tmp17_; -#line 175 "/home/jens/Source/shotwell/src/util/misc.vala" +#line 166 "/home/jens/Source/shotwell/src/util/misc.vala" bytes = (gsize) (_tmp18_ * sizeof (gint64)); -#line 176 "/home/jens/Source/shotwell/src/util/misc.vala" +#line 167 "/home/jens/Source/shotwell/src/util/misc.vala" _tmp19_ = g_new0 (guchar, bytes); -#line 176 "/home/jens/Source/shotwell/src/util/misc.vala" +#line 167 "/home/jens/Source/shotwell/src/util/misc.vala" serialized = _tmp19_; -#line 176 "/home/jens/Source/shotwell/src/util/misc.vala" +#line 167 "/home/jens/Source/shotwell/src/util/misc.vala" serialized_length1 = bytes; -#line 176 "/home/jens/Source/shotwell/src/util/misc.vala" +#line 167 "/home/jens/Source/shotwell/src/util/misc.vala" _serialized_size_ = serialized_length1; -#line 177 "/home/jens/Source/shotwell/src/util/misc.vala" +#line 168 "/home/jens/Source/shotwell/src/util/misc.vala" _tmp20_ = ids; -#line 177 "/home/jens/Source/shotwell/src/util/misc.vala" +#line 168 "/home/jens/Source/shotwell/src/util/misc.vala" _tmp20__length1 = ids_length1; -#line 177 "/home/jens/Source/shotwell/src/util/misc.vala" +#line 168 "/home/jens/Source/shotwell/src/util/misc.vala" memcpy (serialized, _tmp20_, bytes); -#line 179 "/home/jens/Source/shotwell/src/util/misc.vala" +#line 170 "/home/jens/Source/shotwell/src/util/misc.vala" _tmp21_ = serialized; -#line 179 "/home/jens/Source/shotwell/src/util/misc.vala" +#line 170 "/home/jens/Source/shotwell/src/util/misc.vala" _tmp21__length1 = serialized_length1; -#line 179 "/home/jens/Source/shotwell/src/util/misc.vala" +#line 170 "/home/jens/Source/shotwell/src/util/misc.vala" if (result_length1) { -#line 179 "/home/jens/Source/shotwell/src/util/misc.vala" +#line 170 "/home/jens/Source/shotwell/src/util/misc.vala" *result_length1 = _tmp21__length1; -#line 1527 "misc.c" +#line 1489 "misc.c" } -#line 179 "/home/jens/Source/shotwell/src/util/misc.vala" +#line 170 "/home/jens/Source/shotwell/src/util/misc.vala" result = _tmp21_; -#line 179 "/home/jens/Source/shotwell/src/util/misc.vala" +#line 170 "/home/jens/Source/shotwell/src/util/misc.vala" ids = (g_free (ids), NULL); -#line 179 "/home/jens/Source/shotwell/src/util/misc.vala" +#line 170 "/home/jens/Source/shotwell/src/util/misc.vala" return result; -#line 1535 "misc.c" +#line 1497 "misc.c" } @@ -1554,101 +1516,101 @@ GeeList* unserialize_photo_ids (guchar* serialized, gint size) { GeeArrayList* _tmp9_; gint64* _tmp10_; gint _tmp10__length1; -#line 183 "/home/jens/Source/shotwell/src/util/misc.vala" +#line 174 "/home/jens/Source/shotwell/src/util/misc.vala" _tmp0_ = size; -#line 183 "/home/jens/Source/shotwell/src/util/misc.vala" +#line 174 "/home/jens/Source/shotwell/src/util/misc.vala" count = (gsize) (_tmp0_ / sizeof (gint64)); -#line 184 "/home/jens/Source/shotwell/src/util/misc.vala" +#line 175 "/home/jens/Source/shotwell/src/util/misc.vala" _tmp2_ = count; -#line 184 "/home/jens/Source/shotwell/src/util/misc.vala" +#line 175 "/home/jens/Source/shotwell/src/util/misc.vala" if (_tmp2_ <= ((gsize) 0)) { -#line 184 "/home/jens/Source/shotwell/src/util/misc.vala" +#line 175 "/home/jens/Source/shotwell/src/util/misc.vala" _tmp1_ = TRUE; -#line 1568 "misc.c" +#line 1530 "misc.c" } else { guchar* _tmp3_; -#line 184 "/home/jens/Source/shotwell/src/util/misc.vala" +#line 175 "/home/jens/Source/shotwell/src/util/misc.vala" _tmp3_ = serialized; -#line 184 "/home/jens/Source/shotwell/src/util/misc.vala" +#line 175 "/home/jens/Source/shotwell/src/util/misc.vala" _tmp1_ = _tmp3_ == NULL; -#line 1575 "misc.c" +#line 1537 "misc.c" } -#line 184 "/home/jens/Source/shotwell/src/util/misc.vala" +#line 175 "/home/jens/Source/shotwell/src/util/misc.vala" if (_tmp1_) { -#line 185 "/home/jens/Source/shotwell/src/util/misc.vala" +#line 176 "/home/jens/Source/shotwell/src/util/misc.vala" result = NULL; -#line 185 "/home/jens/Source/shotwell/src/util/misc.vala" +#line 176 "/home/jens/Source/shotwell/src/util/misc.vala" return result; -#line 1583 "misc.c" +#line 1545 "misc.c" } -#line 187 "/home/jens/Source/shotwell/src/util/misc.vala" +#line 178 "/home/jens/Source/shotwell/src/util/misc.vala" _tmp4_ = count; -#line 187 "/home/jens/Source/shotwell/src/util/misc.vala" +#line 178 "/home/jens/Source/shotwell/src/util/misc.vala" _tmp5_ = g_new0 (gint64, _tmp4_); -#line 187 "/home/jens/Source/shotwell/src/util/misc.vala" +#line 178 "/home/jens/Source/shotwell/src/util/misc.vala" ids = _tmp5_; -#line 187 "/home/jens/Source/shotwell/src/util/misc.vala" +#line 178 "/home/jens/Source/shotwell/src/util/misc.vala" ids_length1 = _tmp4_; -#line 187 "/home/jens/Source/shotwell/src/util/misc.vala" +#line 178 "/home/jens/Source/shotwell/src/util/misc.vala" _ids_size_ = ids_length1; -#line 188 "/home/jens/Source/shotwell/src/util/misc.vala" +#line 179 "/home/jens/Source/shotwell/src/util/misc.vala" _tmp6_ = ids; -#line 188 "/home/jens/Source/shotwell/src/util/misc.vala" +#line 179 "/home/jens/Source/shotwell/src/util/misc.vala" _tmp6__length1 = ids_length1; -#line 188 "/home/jens/Source/shotwell/src/util/misc.vala" +#line 179 "/home/jens/Source/shotwell/src/util/misc.vala" _tmp7_ = serialized; -#line 188 "/home/jens/Source/shotwell/src/util/misc.vala" +#line 179 "/home/jens/Source/shotwell/src/util/misc.vala" _tmp8_ = size; -#line 188 "/home/jens/Source/shotwell/src/util/misc.vala" +#line 179 "/home/jens/Source/shotwell/src/util/misc.vala" memcpy (_tmp6_, _tmp7_, (gsize) _tmp8_); -#line 190 "/home/jens/Source/shotwell/src/util/misc.vala" +#line 181 "/home/jens/Source/shotwell/src/util/misc.vala" _tmp9_ = gee_array_list_new (TYPE_PHOTO_ID, (GBoxedCopyFunc) photo_id_dup, (GDestroyNotify) photo_id_free, NULL, NULL, NULL); -#line 190 "/home/jens/Source/shotwell/src/util/misc.vala" +#line 181 "/home/jens/Source/shotwell/src/util/misc.vala" list = _tmp9_; -#line 191 "/home/jens/Source/shotwell/src/util/misc.vala" +#line 182 "/home/jens/Source/shotwell/src/util/misc.vala" _tmp10_ = ids; -#line 191 "/home/jens/Source/shotwell/src/util/misc.vala" +#line 182 "/home/jens/Source/shotwell/src/util/misc.vala" _tmp10__length1 = ids_length1; -#line 1613 "misc.c" +#line 1575 "misc.c" { gint64* id_collection = NULL; gint id_collection_length1 = 0; gint _id_collection_size_ = 0; gint id_it = 0; -#line 191 "/home/jens/Source/shotwell/src/util/misc.vala" +#line 182 "/home/jens/Source/shotwell/src/util/misc.vala" id_collection = _tmp10_; -#line 191 "/home/jens/Source/shotwell/src/util/misc.vala" +#line 182 "/home/jens/Source/shotwell/src/util/misc.vala" id_collection_length1 = _tmp10__length1; -#line 191 "/home/jens/Source/shotwell/src/util/misc.vala" +#line 182 "/home/jens/Source/shotwell/src/util/misc.vala" for (id_it = 0; id_it < _tmp10__length1; id_it = id_it + 1) { -#line 1625 "misc.c" +#line 1587 "misc.c" gint64 id = 0LL; -#line 191 "/home/jens/Source/shotwell/src/util/misc.vala" +#line 182 "/home/jens/Source/shotwell/src/util/misc.vala" id = id_collection[id_it]; -#line 1629 "misc.c" +#line 1591 "misc.c" { GeeArrayList* _tmp11_; gint64 _tmp12_; PhotoID _tmp13_ = {0}; -#line 192 "/home/jens/Source/shotwell/src/util/misc.vala" +#line 183 "/home/jens/Source/shotwell/src/util/misc.vala" _tmp11_ = list; -#line 192 "/home/jens/Source/shotwell/src/util/misc.vala" +#line 183 "/home/jens/Source/shotwell/src/util/misc.vala" _tmp12_ = id; -#line 192 "/home/jens/Source/shotwell/src/util/misc.vala" +#line 183 "/home/jens/Source/shotwell/src/util/misc.vala" photo_id_init (&_tmp13_, _tmp12_); -#line 192 "/home/jens/Source/shotwell/src/util/misc.vala" +#line 183 "/home/jens/Source/shotwell/src/util/misc.vala" gee_abstract_collection_add (G_TYPE_CHECK_INSTANCE_CAST (_tmp11_, GEE_TYPE_ABSTRACT_COLLECTION, GeeAbstractCollection), &_tmp13_); -#line 1642 "misc.c" +#line 1604 "misc.c" } } } -#line 194 "/home/jens/Source/shotwell/src/util/misc.vala" +#line 185 "/home/jens/Source/shotwell/src/util/misc.vala" result = G_TYPE_CHECK_INSTANCE_CAST (list, GEE_TYPE_LIST, GeeList); -#line 194 "/home/jens/Source/shotwell/src/util/misc.vala" +#line 185 "/home/jens/Source/shotwell/src/util/misc.vala" ids = (g_free (ids), NULL); -#line 194 "/home/jens/Source/shotwell/src/util/misc.vala" +#line 185 "/home/jens/Source/shotwell/src/util/misc.vala" return result; -#line 1652 "misc.c" +#line 1614 "misc.c" } @@ -1674,38 +1636,38 @@ guchar* serialize_media_sources (GeeCollection* media, int* result_length1) { gint _tmp21__length1; guchar* _tmp22_; gint _tmp22__length1; -#line 197 "/home/jens/Source/shotwell/src/util/misc.vala" +#line 188 "/home/jens/Source/shotwell/src/util/misc.vala" g_return_val_if_fail (GEE_IS_COLLECTION (media), NULL); -#line 198 "/home/jens/Source/shotwell/src/util/misc.vala" +#line 189 "/home/jens/Source/shotwell/src/util/misc.vala" _tmp0_ = media; -#line 198 "/home/jens/Source/shotwell/src/util/misc.vala" +#line 189 "/home/jens/Source/shotwell/src/util/misc.vala" _tmp1_ = gee_collection_get_size (_tmp0_); -#line 198 "/home/jens/Source/shotwell/src/util/misc.vala" +#line 189 "/home/jens/Source/shotwell/src/util/misc.vala" _tmp2_ = _tmp1_; -#line 198 "/home/jens/Source/shotwell/src/util/misc.vala" +#line 189 "/home/jens/Source/shotwell/src/util/misc.vala" _tmp3_ = g_new0 (GdkAtom, _tmp2_); -#line 198 "/home/jens/Source/shotwell/src/util/misc.vala" +#line 189 "/home/jens/Source/shotwell/src/util/misc.vala" atoms = _tmp3_; -#line 198 "/home/jens/Source/shotwell/src/util/misc.vala" +#line 189 "/home/jens/Source/shotwell/src/util/misc.vala" atoms_length1 = _tmp2_; -#line 198 "/home/jens/Source/shotwell/src/util/misc.vala" +#line 189 "/home/jens/Source/shotwell/src/util/misc.vala" _atoms_size_ = atoms_length1; -#line 199 "/home/jens/Source/shotwell/src/util/misc.vala" +#line 190 "/home/jens/Source/shotwell/src/util/misc.vala" ctr = 0; -#line 1696 "misc.c" +#line 1658 "misc.c" { GeeIterator* _current_media_it = NULL; GeeCollection* _tmp4_; GeeIterator* _tmp5_; -#line 200 "/home/jens/Source/shotwell/src/util/misc.vala" +#line 191 "/home/jens/Source/shotwell/src/util/misc.vala" _tmp4_ = media; -#line 200 "/home/jens/Source/shotwell/src/util/misc.vala" +#line 191 "/home/jens/Source/shotwell/src/util/misc.vala" _tmp5_ = gee_iterable_iterator (G_TYPE_CHECK_INSTANCE_CAST (_tmp4_, GEE_TYPE_ITERABLE, GeeIterable)); -#line 200 "/home/jens/Source/shotwell/src/util/misc.vala" +#line 191 "/home/jens/Source/shotwell/src/util/misc.vala" _current_media_it = _tmp5_; -#line 200 "/home/jens/Source/shotwell/src/util/misc.vala" +#line 191 "/home/jens/Source/shotwell/src/util/misc.vala" while (TRUE) { -#line 1709 "misc.c" +#line 1671 "misc.c" GeeIterator* _tmp6_; gboolean _tmp7_; MediaSource* current_media = NULL; @@ -1719,91 +1681,91 @@ guchar* serialize_media_sources (GeeCollection* media, int* result_length1) { gchar* _tmp14_; GdkAtom _tmp15_; GdkAtom _tmp16_; -#line 200 "/home/jens/Source/shotwell/src/util/misc.vala" +#line 191 "/home/jens/Source/shotwell/src/util/misc.vala" _tmp6_ = _current_media_it; -#line 200 "/home/jens/Source/shotwell/src/util/misc.vala" +#line 191 "/home/jens/Source/shotwell/src/util/misc.vala" _tmp7_ = gee_iterator_next (_tmp6_); -#line 200 "/home/jens/Source/shotwell/src/util/misc.vala" +#line 191 "/home/jens/Source/shotwell/src/util/misc.vala" if (!_tmp7_) { -#line 200 "/home/jens/Source/shotwell/src/util/misc.vala" +#line 191 "/home/jens/Source/shotwell/src/util/misc.vala" break; -#line 1731 "misc.c" +#line 1693 "misc.c" } -#line 200 "/home/jens/Source/shotwell/src/util/misc.vala" +#line 191 "/home/jens/Source/shotwell/src/util/misc.vala" _tmp8_ = _current_media_it; -#line 200 "/home/jens/Source/shotwell/src/util/misc.vala" +#line 191 "/home/jens/Source/shotwell/src/util/misc.vala" _tmp9_ = gee_iterator_get (_tmp8_); -#line 200 "/home/jens/Source/shotwell/src/util/misc.vala" +#line 191 "/home/jens/Source/shotwell/src/util/misc.vala" current_media = (MediaSource*) _tmp9_; -#line 201 "/home/jens/Source/shotwell/src/util/misc.vala" +#line 192 "/home/jens/Source/shotwell/src/util/misc.vala" _tmp10_ = atoms; -#line 201 "/home/jens/Source/shotwell/src/util/misc.vala" +#line 192 "/home/jens/Source/shotwell/src/util/misc.vala" _tmp10__length1 = atoms_length1; -#line 201 "/home/jens/Source/shotwell/src/util/misc.vala" +#line 192 "/home/jens/Source/shotwell/src/util/misc.vala" _tmp11_ = ctr; -#line 201 "/home/jens/Source/shotwell/src/util/misc.vala" +#line 192 "/home/jens/Source/shotwell/src/util/misc.vala" ctr = _tmp11_ + 1; -#line 201 "/home/jens/Source/shotwell/src/util/misc.vala" +#line 192 "/home/jens/Source/shotwell/src/util/misc.vala" _tmp12_ = current_media; -#line 201 "/home/jens/Source/shotwell/src/util/misc.vala" +#line 192 "/home/jens/Source/shotwell/src/util/misc.vala" _tmp13_ = data_source_get_source_id (G_TYPE_CHECK_INSTANCE_CAST (_tmp12_, TYPE_DATA_SOURCE, DataSource)); -#line 201 "/home/jens/Source/shotwell/src/util/misc.vala" +#line 192 "/home/jens/Source/shotwell/src/util/misc.vala" _tmp14_ = _tmp13_; -#line 201 "/home/jens/Source/shotwell/src/util/misc.vala" +#line 192 "/home/jens/Source/shotwell/src/util/misc.vala" _tmp15_ = gdk_atom_intern (_tmp14_, FALSE); -#line 201 "/home/jens/Source/shotwell/src/util/misc.vala" +#line 192 "/home/jens/Source/shotwell/src/util/misc.vala" _tmp10_[_tmp11_] = _tmp15_; -#line 201 "/home/jens/Source/shotwell/src/util/misc.vala" +#line 192 "/home/jens/Source/shotwell/src/util/misc.vala" _tmp16_ = _tmp10_[_tmp11_]; -#line 201 "/home/jens/Source/shotwell/src/util/misc.vala" +#line 192 "/home/jens/Source/shotwell/src/util/misc.vala" _g_free0 (_tmp14_); -#line 200 "/home/jens/Source/shotwell/src/util/misc.vala" +#line 191 "/home/jens/Source/shotwell/src/util/misc.vala" _g_object_unref0 (current_media); -#line 1763 "misc.c" +#line 1725 "misc.c" } -#line 200 "/home/jens/Source/shotwell/src/util/misc.vala" +#line 191 "/home/jens/Source/shotwell/src/util/misc.vala" _g_object_unref0 (_current_media_it); -#line 1767 "misc.c" +#line 1729 "misc.c" } -#line 203 "/home/jens/Source/shotwell/src/util/misc.vala" +#line 194 "/home/jens/Source/shotwell/src/util/misc.vala" _tmp17_ = media; -#line 203 "/home/jens/Source/shotwell/src/util/misc.vala" +#line 194 "/home/jens/Source/shotwell/src/util/misc.vala" _tmp18_ = gee_collection_get_size (_tmp17_); -#line 203 "/home/jens/Source/shotwell/src/util/misc.vala" +#line 194 "/home/jens/Source/shotwell/src/util/misc.vala" _tmp19_ = _tmp18_; -#line 203 "/home/jens/Source/shotwell/src/util/misc.vala" +#line 194 "/home/jens/Source/shotwell/src/util/misc.vala" bytes = (gsize) (_tmp19_ * sizeof (GdkAtom)); -#line 204 "/home/jens/Source/shotwell/src/util/misc.vala" +#line 195 "/home/jens/Source/shotwell/src/util/misc.vala" _tmp20_ = g_new0 (guchar, bytes); -#line 204 "/home/jens/Source/shotwell/src/util/misc.vala" +#line 195 "/home/jens/Source/shotwell/src/util/misc.vala" serialized = _tmp20_; -#line 204 "/home/jens/Source/shotwell/src/util/misc.vala" +#line 195 "/home/jens/Source/shotwell/src/util/misc.vala" serialized_length1 = bytes; -#line 204 "/home/jens/Source/shotwell/src/util/misc.vala" +#line 195 "/home/jens/Source/shotwell/src/util/misc.vala" _serialized_size_ = serialized_length1; -#line 205 "/home/jens/Source/shotwell/src/util/misc.vala" +#line 196 "/home/jens/Source/shotwell/src/util/misc.vala" _tmp21_ = atoms; -#line 205 "/home/jens/Source/shotwell/src/util/misc.vala" +#line 196 "/home/jens/Source/shotwell/src/util/misc.vala" _tmp21__length1 = atoms_length1; -#line 205 "/home/jens/Source/shotwell/src/util/misc.vala" +#line 196 "/home/jens/Source/shotwell/src/util/misc.vala" memcpy (serialized, _tmp21_, bytes); -#line 207 "/home/jens/Source/shotwell/src/util/misc.vala" +#line 198 "/home/jens/Source/shotwell/src/util/misc.vala" _tmp22_ = serialized; -#line 207 "/home/jens/Source/shotwell/src/util/misc.vala" +#line 198 "/home/jens/Source/shotwell/src/util/misc.vala" _tmp22__length1 = serialized_length1; -#line 207 "/home/jens/Source/shotwell/src/util/misc.vala" +#line 198 "/home/jens/Source/shotwell/src/util/misc.vala" if (result_length1) { -#line 207 "/home/jens/Source/shotwell/src/util/misc.vala" +#line 198 "/home/jens/Source/shotwell/src/util/misc.vala" *result_length1 = _tmp22__length1; -#line 1799 "misc.c" +#line 1761 "misc.c" } -#line 207 "/home/jens/Source/shotwell/src/util/misc.vala" +#line 198 "/home/jens/Source/shotwell/src/util/misc.vala" result = _tmp22_; -#line 207 "/home/jens/Source/shotwell/src/util/misc.vala" +#line 198 "/home/jens/Source/shotwell/src/util/misc.vala" atoms = (g_free (atoms), NULL); -#line 207 "/home/jens/Source/shotwell/src/util/misc.vala" +#line 198 "/home/jens/Source/shotwell/src/util/misc.vala" return result; -#line 1807 "misc.c" +#line 1769 "misc.c" } @@ -1826,78 +1788,78 @@ GeeList* unserialize_media_sources (guchar* serialized, gint size) { GeeArrayList* _tmp9_; GdkAtom* _tmp10_; gint _tmp10__length1; -#line 211 "/home/jens/Source/shotwell/src/util/misc.vala" +#line 202 "/home/jens/Source/shotwell/src/util/misc.vala" _tmp0_ = size; -#line 211 "/home/jens/Source/shotwell/src/util/misc.vala" +#line 202 "/home/jens/Source/shotwell/src/util/misc.vala" count = (gsize) (_tmp0_ / sizeof (GdkAtom)); -#line 212 "/home/jens/Source/shotwell/src/util/misc.vala" +#line 203 "/home/jens/Source/shotwell/src/util/misc.vala" _tmp2_ = count; -#line 212 "/home/jens/Source/shotwell/src/util/misc.vala" +#line 203 "/home/jens/Source/shotwell/src/util/misc.vala" if (_tmp2_ <= ((gsize) 0)) { -#line 212 "/home/jens/Source/shotwell/src/util/misc.vala" +#line 203 "/home/jens/Source/shotwell/src/util/misc.vala" _tmp1_ = TRUE; -#line 1840 "misc.c" +#line 1802 "misc.c" } else { guchar* _tmp3_; -#line 212 "/home/jens/Source/shotwell/src/util/misc.vala" +#line 203 "/home/jens/Source/shotwell/src/util/misc.vala" _tmp3_ = serialized; -#line 212 "/home/jens/Source/shotwell/src/util/misc.vala" +#line 203 "/home/jens/Source/shotwell/src/util/misc.vala" _tmp1_ = _tmp3_ == NULL; -#line 1847 "misc.c" +#line 1809 "misc.c" } -#line 212 "/home/jens/Source/shotwell/src/util/misc.vala" +#line 203 "/home/jens/Source/shotwell/src/util/misc.vala" if (_tmp1_) { -#line 213 "/home/jens/Source/shotwell/src/util/misc.vala" +#line 204 "/home/jens/Source/shotwell/src/util/misc.vala" result = NULL; -#line 213 "/home/jens/Source/shotwell/src/util/misc.vala" +#line 204 "/home/jens/Source/shotwell/src/util/misc.vala" return result; -#line 1855 "misc.c" +#line 1817 "misc.c" } -#line 215 "/home/jens/Source/shotwell/src/util/misc.vala" +#line 206 "/home/jens/Source/shotwell/src/util/misc.vala" _tmp4_ = count; -#line 215 "/home/jens/Source/shotwell/src/util/misc.vala" +#line 206 "/home/jens/Source/shotwell/src/util/misc.vala" _tmp5_ = g_new0 (GdkAtom, _tmp4_); -#line 215 "/home/jens/Source/shotwell/src/util/misc.vala" +#line 206 "/home/jens/Source/shotwell/src/util/misc.vala" atoms = _tmp5_; -#line 215 "/home/jens/Source/shotwell/src/util/misc.vala" +#line 206 "/home/jens/Source/shotwell/src/util/misc.vala" atoms_length1 = _tmp4_; -#line 215 "/home/jens/Source/shotwell/src/util/misc.vala" +#line 206 "/home/jens/Source/shotwell/src/util/misc.vala" _atoms_size_ = atoms_length1; -#line 216 "/home/jens/Source/shotwell/src/util/misc.vala" +#line 207 "/home/jens/Source/shotwell/src/util/misc.vala" _tmp6_ = atoms; -#line 216 "/home/jens/Source/shotwell/src/util/misc.vala" +#line 207 "/home/jens/Source/shotwell/src/util/misc.vala" _tmp6__length1 = atoms_length1; -#line 216 "/home/jens/Source/shotwell/src/util/misc.vala" +#line 207 "/home/jens/Source/shotwell/src/util/misc.vala" _tmp7_ = serialized; -#line 216 "/home/jens/Source/shotwell/src/util/misc.vala" +#line 207 "/home/jens/Source/shotwell/src/util/misc.vala" _tmp8_ = size; -#line 216 "/home/jens/Source/shotwell/src/util/misc.vala" +#line 207 "/home/jens/Source/shotwell/src/util/misc.vala" memcpy (_tmp6_, _tmp7_, (gsize) _tmp8_); -#line 218 "/home/jens/Source/shotwell/src/util/misc.vala" +#line 209 "/home/jens/Source/shotwell/src/util/misc.vala" _tmp9_ = gee_array_list_new (TYPE_MEDIA_SOURCE, (GBoxedCopyFunc) g_object_ref, (GDestroyNotify) g_object_unref, NULL, NULL, NULL); -#line 218 "/home/jens/Source/shotwell/src/util/misc.vala" +#line 209 "/home/jens/Source/shotwell/src/util/misc.vala" list = _tmp9_; -#line 219 "/home/jens/Source/shotwell/src/util/misc.vala" +#line 210 "/home/jens/Source/shotwell/src/util/misc.vala" _tmp10_ = atoms; -#line 219 "/home/jens/Source/shotwell/src/util/misc.vala" +#line 210 "/home/jens/Source/shotwell/src/util/misc.vala" _tmp10__length1 = atoms_length1; -#line 1885 "misc.c" +#line 1847 "misc.c" { GdkAtom* current_atom_collection = NULL; gint current_atom_collection_length1 = 0; gint _current_atom_collection_size_ = 0; gint current_atom_it = 0; -#line 219 "/home/jens/Source/shotwell/src/util/misc.vala" +#line 210 "/home/jens/Source/shotwell/src/util/misc.vala" current_atom_collection = _tmp10_; -#line 219 "/home/jens/Source/shotwell/src/util/misc.vala" +#line 210 "/home/jens/Source/shotwell/src/util/misc.vala" current_atom_collection_length1 = _tmp10__length1; -#line 219 "/home/jens/Source/shotwell/src/util/misc.vala" +#line 210 "/home/jens/Source/shotwell/src/util/misc.vala" for (current_atom_it = 0; current_atom_it < _tmp10__length1; current_atom_it = current_atom_it + 1) { -#line 1897 "misc.c" +#line 1859 "misc.c" GdkAtom current_atom = 0U; -#line 219 "/home/jens/Source/shotwell/src/util/misc.vala" +#line 210 "/home/jens/Source/shotwell/src/util/misc.vala" current_atom = current_atom_collection[current_atom_it]; -#line 1901 "misc.c" +#line 1863 "misc.c" { MediaSource* media = NULL; MediaCollectionRegistry* _tmp11_; @@ -1910,49 +1872,49 @@ GeeList* unserialize_media_sources (guchar* serialized, gint size) { MediaSource* _tmp18_; GeeArrayList* _tmp19_; MediaSource* _tmp20_; -#line 220 "/home/jens/Source/shotwell/src/util/misc.vala" +#line 211 "/home/jens/Source/shotwell/src/util/misc.vala" _tmp11_ = media_collection_registry_get_instance (); -#line 220 "/home/jens/Source/shotwell/src/util/misc.vala" +#line 211 "/home/jens/Source/shotwell/src/util/misc.vala" _tmp12_ = _tmp11_; -#line 220 "/home/jens/Source/shotwell/src/util/misc.vala" +#line 211 "/home/jens/Source/shotwell/src/util/misc.vala" _tmp13_ = current_atom; -#line 220 "/home/jens/Source/shotwell/src/util/misc.vala" +#line 211 "/home/jens/Source/shotwell/src/util/misc.vala" _tmp14_ = gdk_atom_name (_tmp13_); -#line 220 "/home/jens/Source/shotwell/src/util/misc.vala" +#line 211 "/home/jens/Source/shotwell/src/util/misc.vala" _tmp15_ = _tmp14_; -#line 220 "/home/jens/Source/shotwell/src/util/misc.vala" +#line 211 "/home/jens/Source/shotwell/src/util/misc.vala" _tmp16_ = media_collection_registry_fetch_media (_tmp12_, _tmp15_); -#line 220 "/home/jens/Source/shotwell/src/util/misc.vala" +#line 211 "/home/jens/Source/shotwell/src/util/misc.vala" _tmp17_ = _tmp16_; -#line 220 "/home/jens/Source/shotwell/src/util/misc.vala" +#line 211 "/home/jens/Source/shotwell/src/util/misc.vala" _g_free0 (_tmp15_); -#line 220 "/home/jens/Source/shotwell/src/util/misc.vala" +#line 211 "/home/jens/Source/shotwell/src/util/misc.vala" _media_collection_registry_unref0 (_tmp12_); -#line 220 "/home/jens/Source/shotwell/src/util/misc.vala" +#line 211 "/home/jens/Source/shotwell/src/util/misc.vala" media = _tmp17_; -#line 221 "/home/jens/Source/shotwell/src/util/misc.vala" +#line 212 "/home/jens/Source/shotwell/src/util/misc.vala" _tmp18_ = media; -#line 221 "/home/jens/Source/shotwell/src/util/misc.vala" +#line 212 "/home/jens/Source/shotwell/src/util/misc.vala" _vala_assert (_tmp18_ != NULL, "media != null"); -#line 222 "/home/jens/Source/shotwell/src/util/misc.vala" +#line 213 "/home/jens/Source/shotwell/src/util/misc.vala" _tmp19_ = list; -#line 222 "/home/jens/Source/shotwell/src/util/misc.vala" +#line 213 "/home/jens/Source/shotwell/src/util/misc.vala" _tmp20_ = media; -#line 222 "/home/jens/Source/shotwell/src/util/misc.vala" +#line 213 "/home/jens/Source/shotwell/src/util/misc.vala" gee_abstract_collection_add (G_TYPE_CHECK_INSTANCE_CAST (_tmp19_, GEE_TYPE_ABSTRACT_COLLECTION, GeeAbstractCollection), _tmp20_); -#line 219 "/home/jens/Source/shotwell/src/util/misc.vala" +#line 210 "/home/jens/Source/shotwell/src/util/misc.vala" _g_object_unref0 (media); -#line 1946 "misc.c" +#line 1908 "misc.c" } } } -#line 225 "/home/jens/Source/shotwell/src/util/misc.vala" +#line 216 "/home/jens/Source/shotwell/src/util/misc.vala" result = G_TYPE_CHECK_INSTANCE_CAST (list, GEE_TYPE_LIST, GeeList); -#line 225 "/home/jens/Source/shotwell/src/util/misc.vala" +#line 216 "/home/jens/Source/shotwell/src/util/misc.vala" atoms = (g_free (atoms), NULL); -#line 225 "/home/jens/Source/shotwell/src/util/misc.vala" +#line 216 "/home/jens/Source/shotwell/src/util/misc.vala" return result; -#line 1956 "misc.c" +#line 1918 "misc.c" } @@ -1998,7 +1960,7 @@ static gchar* g_time_format (struct tm *self, const gchar* format) { buffer = (g_free (buffer), NULL); #line 2857 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" return result; -#line 2002 "misc.c" +#line 1964 "misc.c" } @@ -2020,144 +1982,144 @@ gchar* format_local_datespan (struct tm* from_date, struct tm* to_date) { gchar* _tmp26_; gchar* _tmp27_; gchar* _tmp28_; -#line 228 "/home/jens/Source/shotwell/src/util/misc.vala" +#line 219 "/home/jens/Source/shotwell/src/util/misc.vala" g_return_val_if_fail (from_date != NULL, NULL); -#line 228 "/home/jens/Source/shotwell/src/util/misc.vala" +#line 219 "/home/jens/Source/shotwell/src/util/misc.vala" g_return_val_if_fail (to_date != NULL, NULL); -#line 233 "/home/jens/Source/shotwell/src/util/misc.vala" +#line 224 "/home/jens/Source/shotwell/src/util/misc.vala" _tmp0_ = *from_date; -#line 233 "/home/jens/Source/shotwell/src/util/misc.vala" +#line 224 "/home/jens/Source/shotwell/src/util/misc.vala" _tmp1_ = _tmp0_.tm_year; -#line 233 "/home/jens/Source/shotwell/src/util/misc.vala" +#line 224 "/home/jens/Source/shotwell/src/util/misc.vala" _tmp2_ = *to_date; -#line 233 "/home/jens/Source/shotwell/src/util/misc.vala" +#line 224 "/home/jens/Source/shotwell/src/util/misc.vala" _tmp3_ = _tmp2_.tm_year; -#line 233 "/home/jens/Source/shotwell/src/util/misc.vala" +#line 224 "/home/jens/Source/shotwell/src/util/misc.vala" if (_tmp1_ == _tmp3_) { -#line 2038 "misc.c" +#line 2000 "misc.c" gboolean _tmp4_ = FALSE; struct tm _tmp5_; gint _tmp6_; struct tm _tmp7_; gint _tmp8_; -#line 235 "/home/jens/Source/shotwell/src/util/misc.vala" +#line 226 "/home/jens/Source/shotwell/src/util/misc.vala" _tmp5_ = *from_date; -#line 235 "/home/jens/Source/shotwell/src/util/misc.vala" +#line 226 "/home/jens/Source/shotwell/src/util/misc.vala" _tmp6_ = _tmp5_.tm_mon; -#line 235 "/home/jens/Source/shotwell/src/util/misc.vala" +#line 226 "/home/jens/Source/shotwell/src/util/misc.vala" _tmp7_ = *to_date; -#line 235 "/home/jens/Source/shotwell/src/util/misc.vala" +#line 226 "/home/jens/Source/shotwell/src/util/misc.vala" _tmp8_ = _tmp7_.tm_mon; -#line 235 "/home/jens/Source/shotwell/src/util/misc.vala" +#line 226 "/home/jens/Source/shotwell/src/util/misc.vala" if (_tmp6_ == _tmp8_) { -#line 2054 "misc.c" +#line 2016 "misc.c" struct tm _tmp9_; gint _tmp10_; struct tm _tmp11_; gint _tmp12_; -#line 235 "/home/jens/Source/shotwell/src/util/misc.vala" +#line 226 "/home/jens/Source/shotwell/src/util/misc.vala" _tmp9_ = *from_date; -#line 235 "/home/jens/Source/shotwell/src/util/misc.vala" +#line 226 "/home/jens/Source/shotwell/src/util/misc.vala" _tmp10_ = _tmp9_.tm_mday; -#line 235 "/home/jens/Source/shotwell/src/util/misc.vala" +#line 226 "/home/jens/Source/shotwell/src/util/misc.vala" _tmp11_ = *to_date; -#line 235 "/home/jens/Source/shotwell/src/util/misc.vala" +#line 226 "/home/jens/Source/shotwell/src/util/misc.vala" _tmp12_ = _tmp11_.tm_mday; -#line 235 "/home/jens/Source/shotwell/src/util/misc.vala" +#line 226 "/home/jens/Source/shotwell/src/util/misc.vala" _tmp4_ = _tmp10_ == (_tmp12_ - 1); -#line 2069 "misc.c" +#line 2031 "misc.c" } else { -#line 235 "/home/jens/Source/shotwell/src/util/misc.vala" +#line 226 "/home/jens/Source/shotwell/src/util/misc.vala" _tmp4_ = FALSE; -#line 2073 "misc.c" +#line 2035 "misc.c" } -#line 235 "/home/jens/Source/shotwell/src/util/misc.vala" +#line 226 "/home/jens/Source/shotwell/src/util/misc.vala" if (_tmp4_) { -#line 2077 "misc.c" +#line 2039 "misc.c" gchar* _tmp13_; gchar* _tmp14_; -#line 237 "/home/jens/Source/shotwell/src/util/misc.vala" +#line 228 "/home/jens/Source/shotwell/src/util/misc.vala" _tmp13_ = resources_get_start_multiday_span_format_string (); -#line 237 "/home/jens/Source/shotwell/src/util/misc.vala" +#line 228 "/home/jens/Source/shotwell/src/util/misc.vala" _g_free0 (from_format); -#line 237 "/home/jens/Source/shotwell/src/util/misc.vala" +#line 228 "/home/jens/Source/shotwell/src/util/misc.vala" from_format = _tmp13_; -#line 238 "/home/jens/Source/shotwell/src/util/misc.vala" +#line 229 "/home/jens/Source/shotwell/src/util/misc.vala" _tmp14_ = resources_get_end_multiday_span_format_string (); -#line 238 "/home/jens/Source/shotwell/src/util/misc.vala" +#line 229 "/home/jens/Source/shotwell/src/util/misc.vala" _g_free0 (to_format); -#line 238 "/home/jens/Source/shotwell/src/util/misc.vala" +#line 229 "/home/jens/Source/shotwell/src/util/misc.vala" to_format = _tmp14_; -#line 2092 "misc.c" +#line 2054 "misc.c" } else { gchar* _tmp15_; gchar* _tmp16_; -#line 242 "/home/jens/Source/shotwell/src/util/misc.vala" +#line 233 "/home/jens/Source/shotwell/src/util/misc.vala" _tmp15_ = resources_get_start_multimonth_span_format_string (); -#line 242 "/home/jens/Source/shotwell/src/util/misc.vala" +#line 233 "/home/jens/Source/shotwell/src/util/misc.vala" _g_free0 (from_format); -#line 242 "/home/jens/Source/shotwell/src/util/misc.vala" +#line 233 "/home/jens/Source/shotwell/src/util/misc.vala" from_format = _tmp15_; -#line 243 "/home/jens/Source/shotwell/src/util/misc.vala" +#line 234 "/home/jens/Source/shotwell/src/util/misc.vala" _tmp16_ = resources_get_end_multimonth_span_format_string (); -#line 243 "/home/jens/Source/shotwell/src/util/misc.vala" +#line 234 "/home/jens/Source/shotwell/src/util/misc.vala" _g_free0 (to_format); -#line 243 "/home/jens/Source/shotwell/src/util/misc.vala" +#line 234 "/home/jens/Source/shotwell/src/util/misc.vala" to_format = _tmp16_; -#line 2108 "misc.c" +#line 2070 "misc.c" } } else { gchar* _tmp17_; gchar* _tmp18_; -#line 248 "/home/jens/Source/shotwell/src/util/misc.vala" +#line 239 "/home/jens/Source/shotwell/src/util/misc.vala" _tmp17_ = resources_get_long_date_format_string (); -#line 248 "/home/jens/Source/shotwell/src/util/misc.vala" +#line 239 "/home/jens/Source/shotwell/src/util/misc.vala" _g_free0 (from_format); -#line 248 "/home/jens/Source/shotwell/src/util/misc.vala" +#line 239 "/home/jens/Source/shotwell/src/util/misc.vala" from_format = _tmp17_; -#line 249 "/home/jens/Source/shotwell/src/util/misc.vala" +#line 240 "/home/jens/Source/shotwell/src/util/misc.vala" _tmp18_ = resources_get_long_date_format_string (); -#line 249 "/home/jens/Source/shotwell/src/util/misc.vala" +#line 240 "/home/jens/Source/shotwell/src/util/misc.vala" _g_free0 (to_format); -#line 249 "/home/jens/Source/shotwell/src/util/misc.vala" +#line 240 "/home/jens/Source/shotwell/src/util/misc.vala" to_format = _tmp18_; -#line 2125 "misc.c" +#line 2087 "misc.c" } -#line 252 "/home/jens/Source/shotwell/src/util/misc.vala" +#line 243 "/home/jens/Source/shotwell/src/util/misc.vala" _tmp19_ = from_format; -#line 252 "/home/jens/Source/shotwell/src/util/misc.vala" +#line 243 "/home/jens/Source/shotwell/src/util/misc.vala" _tmp20_ = g_time_format (from_date, _tmp19_); -#line 252 "/home/jens/Source/shotwell/src/util/misc.vala" +#line 243 "/home/jens/Source/shotwell/src/util/misc.vala" _tmp21_ = _tmp20_; -#line 252 "/home/jens/Source/shotwell/src/util/misc.vala" +#line 243 "/home/jens/Source/shotwell/src/util/misc.vala" _tmp22_ = to_format; -#line 252 "/home/jens/Source/shotwell/src/util/misc.vala" +#line 243 "/home/jens/Source/shotwell/src/util/misc.vala" _tmp23_ = g_time_format (to_date, _tmp22_); -#line 252 "/home/jens/Source/shotwell/src/util/misc.vala" +#line 243 "/home/jens/Source/shotwell/src/util/misc.vala" _tmp24_ = _tmp23_; -#line 252 "/home/jens/Source/shotwell/src/util/misc.vala" +#line 243 "/home/jens/Source/shotwell/src/util/misc.vala" _tmp25_ = g_strdup_printf ("%s - %s", _tmp21_, _tmp24_); -#line 252 "/home/jens/Source/shotwell/src/util/misc.vala" +#line 243 "/home/jens/Source/shotwell/src/util/misc.vala" _tmp26_ = _tmp25_; -#line 252 "/home/jens/Source/shotwell/src/util/misc.vala" +#line 243 "/home/jens/Source/shotwell/src/util/misc.vala" _tmp27_ = string_strip_leading_zeroes (_tmp26_); -#line 252 "/home/jens/Source/shotwell/src/util/misc.vala" +#line 243 "/home/jens/Source/shotwell/src/util/misc.vala" _tmp28_ = _tmp27_; -#line 252 "/home/jens/Source/shotwell/src/util/misc.vala" +#line 243 "/home/jens/Source/shotwell/src/util/misc.vala" _g_free0 (_tmp26_); -#line 252 "/home/jens/Source/shotwell/src/util/misc.vala" +#line 243 "/home/jens/Source/shotwell/src/util/misc.vala" _g_free0 (_tmp24_); -#line 252 "/home/jens/Source/shotwell/src/util/misc.vala" +#line 243 "/home/jens/Source/shotwell/src/util/misc.vala" _g_free0 (_tmp21_); -#line 252 "/home/jens/Source/shotwell/src/util/misc.vala" +#line 243 "/home/jens/Source/shotwell/src/util/misc.vala" result = _tmp28_; -#line 252 "/home/jens/Source/shotwell/src/util/misc.vala" +#line 243 "/home/jens/Source/shotwell/src/util/misc.vala" _g_free0 (to_format); -#line 252 "/home/jens/Source/shotwell/src/util/misc.vala" +#line 243 "/home/jens/Source/shotwell/src/util/misc.vala" _g_free0 (from_format); -#line 252 "/home/jens/Source/shotwell/src/util/misc.vala" +#line 243 "/home/jens/Source/shotwell/src/util/misc.vala" return result; -#line 2161 "misc.c" +#line 2123 "misc.c" } @@ -2169,29 +2131,29 @@ gchar* format_local_date (struct tm* date) { gchar* _tmp3_; gchar* _tmp4_; gchar* _tmp5_; -#line 256 "/home/jens/Source/shotwell/src/util/misc.vala" +#line 247 "/home/jens/Source/shotwell/src/util/misc.vala" g_return_val_if_fail (date != NULL, NULL); -#line 257 "/home/jens/Source/shotwell/src/util/misc.vala" +#line 248 "/home/jens/Source/shotwell/src/util/misc.vala" _tmp0_ = resources_get_long_date_format_string (); -#line 257 "/home/jens/Source/shotwell/src/util/misc.vala" +#line 248 "/home/jens/Source/shotwell/src/util/misc.vala" _tmp1_ = _tmp0_; -#line 257 "/home/jens/Source/shotwell/src/util/misc.vala" +#line 248 "/home/jens/Source/shotwell/src/util/misc.vala" _tmp2_ = g_time_format (date, _tmp1_); -#line 257 "/home/jens/Source/shotwell/src/util/misc.vala" +#line 248 "/home/jens/Source/shotwell/src/util/misc.vala" _tmp3_ = _tmp2_; -#line 257 "/home/jens/Source/shotwell/src/util/misc.vala" +#line 248 "/home/jens/Source/shotwell/src/util/misc.vala" _tmp4_ = string_strip_leading_zeroes (_tmp3_); -#line 257 "/home/jens/Source/shotwell/src/util/misc.vala" +#line 248 "/home/jens/Source/shotwell/src/util/misc.vala" _tmp5_ = _tmp4_; -#line 257 "/home/jens/Source/shotwell/src/util/misc.vala" +#line 248 "/home/jens/Source/shotwell/src/util/misc.vala" _g_free0 (_tmp3_); -#line 257 "/home/jens/Source/shotwell/src/util/misc.vala" +#line 248 "/home/jens/Source/shotwell/src/util/misc.vala" _g_free0 (_tmp1_); -#line 257 "/home/jens/Source/shotwell/src/util/misc.vala" +#line 248 "/home/jens/Source/shotwell/src/util/misc.vala" result = _tmp5_; -#line 257 "/home/jens/Source/shotwell/src/util/misc.vala" +#line 248 "/home/jens/Source/shotwell/src/util/misc.vala" return result; -#line 2195 "misc.c" +#line 2157 "misc.c" } @@ -2201,90 +2163,90 @@ OneShotScheduler* one_shot_scheduler_construct (GType object_type, const gchar* gchar* _tmp1_; OneShotCallback _tmp2_; void* _tmp2__target; -#line 267 "/home/jens/Source/shotwell/src/util/misc.vala" +#line 258 "/home/jens/Source/shotwell/src/util/misc.vala" g_return_val_if_fail (name != NULL, NULL); -#line 267 "/home/jens/Source/shotwell/src/util/misc.vala" +#line 258 "/home/jens/Source/shotwell/src/util/misc.vala" self = (OneShotScheduler*) g_type_create_instance (object_type); -#line 268 "/home/jens/Source/shotwell/src/util/misc.vala" +#line 259 "/home/jens/Source/shotwell/src/util/misc.vala" _tmp0_ = name; -#line 268 "/home/jens/Source/shotwell/src/util/misc.vala" +#line 259 "/home/jens/Source/shotwell/src/util/misc.vala" _tmp1_ = g_strdup (_tmp0_); -#line 268 "/home/jens/Source/shotwell/src/util/misc.vala" +#line 259 "/home/jens/Source/shotwell/src/util/misc.vala" _g_free0 (self->priv->name); -#line 268 "/home/jens/Source/shotwell/src/util/misc.vala" +#line 259 "/home/jens/Source/shotwell/src/util/misc.vala" self->priv->name = _tmp1_; -#line 269 "/home/jens/Source/shotwell/src/util/misc.vala" +#line 260 "/home/jens/Source/shotwell/src/util/misc.vala" _tmp2_ = callback; -#line 269 "/home/jens/Source/shotwell/src/util/misc.vala" +#line 260 "/home/jens/Source/shotwell/src/util/misc.vala" _tmp2__target = callback_target; -#line 269 "/home/jens/Source/shotwell/src/util/misc.vala" +#line 260 "/home/jens/Source/shotwell/src/util/misc.vala" self->priv->callback = _tmp2_; -#line 269 "/home/jens/Source/shotwell/src/util/misc.vala" +#line 260 "/home/jens/Source/shotwell/src/util/misc.vala" self->priv->callback_target = _tmp2__target; -#line 267 "/home/jens/Source/shotwell/src/util/misc.vala" +#line 258 "/home/jens/Source/shotwell/src/util/misc.vala" return self; -#line 2227 "misc.c" +#line 2189 "misc.c" } OneShotScheduler* one_shot_scheduler_new (const gchar* name, OneShotCallback callback, void* callback_target) { -#line 267 "/home/jens/Source/shotwell/src/util/misc.vala" +#line 258 "/home/jens/Source/shotwell/src/util/misc.vala" return one_shot_scheduler_construct (TYPE_ONE_SHOT_SCHEDULER, name, callback, callback_target); -#line 2234 "misc.c" +#line 2196 "misc.c" } gboolean one_shot_scheduler_is_scheduled (OneShotScheduler* self) { gboolean result = FALSE; guint _tmp0_; -#line 280 "/home/jens/Source/shotwell/src/util/misc.vala" +#line 271 "/home/jens/Source/shotwell/src/util/misc.vala" g_return_val_if_fail (IS_ONE_SHOT_SCHEDULER (self), FALSE); -#line 281 "/home/jens/Source/shotwell/src/util/misc.vala" +#line 272 "/home/jens/Source/shotwell/src/util/misc.vala" _tmp0_ = self->priv->scheduled; -#line 281 "/home/jens/Source/shotwell/src/util/misc.vala" +#line 272 "/home/jens/Source/shotwell/src/util/misc.vala" result = _tmp0_ != ((guint) 0); -#line 281 "/home/jens/Source/shotwell/src/util/misc.vala" +#line 272 "/home/jens/Source/shotwell/src/util/misc.vala" return result; -#line 2249 "misc.c" +#line 2211 "misc.c" } void one_shot_scheduler_at_idle (OneShotScheduler* self) { -#line 284 "/home/jens/Source/shotwell/src/util/misc.vala" +#line 275 "/home/jens/Source/shotwell/src/util/misc.vala" g_return_if_fail (IS_ONE_SHOT_SCHEDULER (self)); -#line 285 "/home/jens/Source/shotwell/src/util/misc.vala" +#line 276 "/home/jens/Source/shotwell/src/util/misc.vala" one_shot_scheduler_at_priority_idle (self, G_PRIORITY_DEFAULT_IDLE); -#line 2258 "misc.c" +#line 2220 "misc.c" } static gboolean _one_shot_scheduler_callback_wrapper_gsource_func (gpointer self) { gboolean result; result = one_shot_scheduler_callback_wrapper ((OneShotScheduler*) self); -#line 290 "/home/jens/Source/shotwell/src/util/misc.vala" +#line 281 "/home/jens/Source/shotwell/src/util/misc.vala" return result; -#line 2267 "misc.c" +#line 2229 "misc.c" } void one_shot_scheduler_at_priority_idle (OneShotScheduler* self, gint priority) { guint _tmp0_; -#line 288 "/home/jens/Source/shotwell/src/util/misc.vala" +#line 279 "/home/jens/Source/shotwell/src/util/misc.vala" g_return_if_fail (IS_ONE_SHOT_SCHEDULER (self)); -#line 289 "/home/jens/Source/shotwell/src/util/misc.vala" +#line 280 "/home/jens/Source/shotwell/src/util/misc.vala" _tmp0_ = self->priv->scheduled; -#line 289 "/home/jens/Source/shotwell/src/util/misc.vala" +#line 280 "/home/jens/Source/shotwell/src/util/misc.vala" if (_tmp0_ == ((guint) 0)) { -#line 2279 "misc.c" +#line 2241 "misc.c" gint _tmp1_; guint _tmp2_; -#line 290 "/home/jens/Source/shotwell/src/util/misc.vala" +#line 281 "/home/jens/Source/shotwell/src/util/misc.vala" _tmp1_ = priority; -#line 290 "/home/jens/Source/shotwell/src/util/misc.vala" +#line 281 "/home/jens/Source/shotwell/src/util/misc.vala" _tmp2_ = g_idle_add_full (_tmp1_, _one_shot_scheduler_callback_wrapper_gsource_func, one_shot_scheduler_ref (self), one_shot_scheduler_unref); -#line 290 "/home/jens/Source/shotwell/src/util/misc.vala" +#line 281 "/home/jens/Source/shotwell/src/util/misc.vala" self->priv->scheduled = _tmp2_; -#line 2288 "misc.c" +#line 2250 "misc.c" } } @@ -2292,15 +2254,15 @@ void one_shot_scheduler_at_priority_idle (OneShotScheduler* self, gint priority) void one_shot_scheduler_after_timeout (OneShotScheduler* self, guint msec, gboolean reschedule) { guint _tmp0_; gboolean _tmp1_; -#line 293 "/home/jens/Source/shotwell/src/util/misc.vala" +#line 284 "/home/jens/Source/shotwell/src/util/misc.vala" g_return_if_fail (IS_ONE_SHOT_SCHEDULER (self)); -#line 294 "/home/jens/Source/shotwell/src/util/misc.vala" +#line 285 "/home/jens/Source/shotwell/src/util/misc.vala" _tmp0_ = msec; -#line 294 "/home/jens/Source/shotwell/src/util/misc.vala" +#line 285 "/home/jens/Source/shotwell/src/util/misc.vala" _tmp1_ = reschedule; -#line 294 "/home/jens/Source/shotwell/src/util/misc.vala" +#line 285 "/home/jens/Source/shotwell/src/util/misc.vala" one_shot_scheduler_priority_after_timeout (self, G_PRIORITY_DEFAULT, _tmp0_, _tmp1_); -#line 2304 "misc.c" +#line 2266 "misc.c" } @@ -2311,74 +2273,74 @@ void one_shot_scheduler_priority_after_timeout (OneShotScheduler* self, gint pri gint _tmp5_; guint _tmp6_; guint _tmp7_; -#line 297 "/home/jens/Source/shotwell/src/util/misc.vala" +#line 288 "/home/jens/Source/shotwell/src/util/misc.vala" g_return_if_fail (IS_ONE_SHOT_SCHEDULER (self)); -#line 298 "/home/jens/Source/shotwell/src/util/misc.vala" +#line 289 "/home/jens/Source/shotwell/src/util/misc.vala" _tmp1_ = self->priv->scheduled; -#line 298 "/home/jens/Source/shotwell/src/util/misc.vala" +#line 289 "/home/jens/Source/shotwell/src/util/misc.vala" if (_tmp1_ != ((guint) 0)) { -#line 2321 "misc.c" +#line 2283 "misc.c" gboolean _tmp2_; -#line 298 "/home/jens/Source/shotwell/src/util/misc.vala" +#line 289 "/home/jens/Source/shotwell/src/util/misc.vala" _tmp2_ = reschedule; -#line 298 "/home/jens/Source/shotwell/src/util/misc.vala" +#line 289 "/home/jens/Source/shotwell/src/util/misc.vala" _tmp0_ = !_tmp2_; -#line 2327 "misc.c" +#line 2289 "misc.c" } else { -#line 298 "/home/jens/Source/shotwell/src/util/misc.vala" +#line 289 "/home/jens/Source/shotwell/src/util/misc.vala" _tmp0_ = FALSE; -#line 2331 "misc.c" +#line 2293 "misc.c" } -#line 298 "/home/jens/Source/shotwell/src/util/misc.vala" +#line 289 "/home/jens/Source/shotwell/src/util/misc.vala" if (_tmp0_) { -#line 299 "/home/jens/Source/shotwell/src/util/misc.vala" +#line 290 "/home/jens/Source/shotwell/src/util/misc.vala" return; -#line 2337 "misc.c" +#line 2299 "misc.c" } -#line 301 "/home/jens/Source/shotwell/src/util/misc.vala" +#line 292 "/home/jens/Source/shotwell/src/util/misc.vala" _tmp3_ = self->priv->scheduled; -#line 301 "/home/jens/Source/shotwell/src/util/misc.vala" +#line 292 "/home/jens/Source/shotwell/src/util/misc.vala" if (_tmp3_ != ((guint) 0)) { -#line 2343 "misc.c" +#line 2305 "misc.c" guint _tmp4_; -#line 302 "/home/jens/Source/shotwell/src/util/misc.vala" +#line 293 "/home/jens/Source/shotwell/src/util/misc.vala" _tmp4_ = self->priv->scheduled; -#line 302 "/home/jens/Source/shotwell/src/util/misc.vala" +#line 293 "/home/jens/Source/shotwell/src/util/misc.vala" g_source_remove (_tmp4_); -#line 2349 "misc.c" +#line 2311 "misc.c" } -#line 304 "/home/jens/Source/shotwell/src/util/misc.vala" +#line 295 "/home/jens/Source/shotwell/src/util/misc.vala" _tmp5_ = priority; -#line 304 "/home/jens/Source/shotwell/src/util/misc.vala" +#line 295 "/home/jens/Source/shotwell/src/util/misc.vala" _tmp6_ = msec; -#line 304 "/home/jens/Source/shotwell/src/util/misc.vala" +#line 295 "/home/jens/Source/shotwell/src/util/misc.vala" _tmp7_ = g_timeout_add_full (_tmp5_, _tmp6_, _one_shot_scheduler_callback_wrapper_gsource_func, one_shot_scheduler_ref (self), one_shot_scheduler_unref); -#line 304 "/home/jens/Source/shotwell/src/util/misc.vala" +#line 295 "/home/jens/Source/shotwell/src/util/misc.vala" self->priv->scheduled = _tmp7_; -#line 2359 "misc.c" +#line 2321 "misc.c" } void one_shot_scheduler_cancel (OneShotScheduler* self) { guint _tmp0_; guint _tmp1_; -#line 307 "/home/jens/Source/shotwell/src/util/misc.vala" +#line 298 "/home/jens/Source/shotwell/src/util/misc.vala" g_return_if_fail (IS_ONE_SHOT_SCHEDULER (self)); -#line 308 "/home/jens/Source/shotwell/src/util/misc.vala" +#line 299 "/home/jens/Source/shotwell/src/util/misc.vala" _tmp0_ = self->priv->scheduled; -#line 308 "/home/jens/Source/shotwell/src/util/misc.vala" +#line 299 "/home/jens/Source/shotwell/src/util/misc.vala" if (_tmp0_ == ((guint) 0)) { -#line 309 "/home/jens/Source/shotwell/src/util/misc.vala" +#line 300 "/home/jens/Source/shotwell/src/util/misc.vala" return; -#line 2374 "misc.c" +#line 2336 "misc.c" } -#line 311 "/home/jens/Source/shotwell/src/util/misc.vala" +#line 302 "/home/jens/Source/shotwell/src/util/misc.vala" _tmp1_ = self->priv->scheduled; -#line 311 "/home/jens/Source/shotwell/src/util/misc.vala" +#line 302 "/home/jens/Source/shotwell/src/util/misc.vala" g_source_remove (_tmp1_); -#line 312 "/home/jens/Source/shotwell/src/util/misc.vala" +#line 303 "/home/jens/Source/shotwell/src/util/misc.vala" self->priv->scheduled = (guint) 0; -#line 2382 "misc.c" +#line 2344 "misc.c" } @@ -2386,237 +2348,237 @@ static gboolean one_shot_scheduler_callback_wrapper (OneShotScheduler* self) { gboolean result = FALSE; OneShotCallback _tmp0_; void* _tmp0__target; -#line 315 "/home/jens/Source/shotwell/src/util/misc.vala" +#line 306 "/home/jens/Source/shotwell/src/util/misc.vala" g_return_val_if_fail (IS_ONE_SHOT_SCHEDULER (self), FALSE); -#line 316 "/home/jens/Source/shotwell/src/util/misc.vala" +#line 307 "/home/jens/Source/shotwell/src/util/misc.vala" self->priv->scheduled = (guint) 0; -#line 317 "/home/jens/Source/shotwell/src/util/misc.vala" +#line 308 "/home/jens/Source/shotwell/src/util/misc.vala" _tmp0_ = self->priv->callback; -#line 317 "/home/jens/Source/shotwell/src/util/misc.vala" +#line 308 "/home/jens/Source/shotwell/src/util/misc.vala" _tmp0__target = self->priv->callback_target; -#line 317 "/home/jens/Source/shotwell/src/util/misc.vala" +#line 308 "/home/jens/Source/shotwell/src/util/misc.vala" _tmp0_ (_tmp0__target); -#line 319 "/home/jens/Source/shotwell/src/util/misc.vala" +#line 310 "/home/jens/Source/shotwell/src/util/misc.vala" result = FALSE; -#line 319 "/home/jens/Source/shotwell/src/util/misc.vala" +#line 310 "/home/jens/Source/shotwell/src/util/misc.vala" return result; -#line 2404 "misc.c" +#line 2366 "misc.c" } static void value_one_shot_scheduler_init (GValue* value) { -#line 262 "/home/jens/Source/shotwell/src/util/misc.vala" +#line 253 "/home/jens/Source/shotwell/src/util/misc.vala" value->data[0].v_pointer = NULL; -#line 2411 "misc.c" +#line 2373 "misc.c" } static void value_one_shot_scheduler_free_value (GValue* value) { -#line 262 "/home/jens/Source/shotwell/src/util/misc.vala" +#line 253 "/home/jens/Source/shotwell/src/util/misc.vala" if (value->data[0].v_pointer) { -#line 262 "/home/jens/Source/shotwell/src/util/misc.vala" +#line 253 "/home/jens/Source/shotwell/src/util/misc.vala" one_shot_scheduler_unref (value->data[0].v_pointer); -#line 2420 "misc.c" +#line 2382 "misc.c" } } static void value_one_shot_scheduler_copy_value (const GValue* src_value, GValue* dest_value) { -#line 262 "/home/jens/Source/shotwell/src/util/misc.vala" +#line 253 "/home/jens/Source/shotwell/src/util/misc.vala" if (src_value->data[0].v_pointer) { -#line 262 "/home/jens/Source/shotwell/src/util/misc.vala" +#line 253 "/home/jens/Source/shotwell/src/util/misc.vala" dest_value->data[0].v_pointer = one_shot_scheduler_ref (src_value->data[0].v_pointer); -#line 2430 "misc.c" +#line 2392 "misc.c" } else { -#line 262 "/home/jens/Source/shotwell/src/util/misc.vala" +#line 253 "/home/jens/Source/shotwell/src/util/misc.vala" dest_value->data[0].v_pointer = NULL; -#line 2434 "misc.c" +#line 2396 "misc.c" } } static gpointer value_one_shot_scheduler_peek_pointer (const GValue* value) { -#line 262 "/home/jens/Source/shotwell/src/util/misc.vala" +#line 253 "/home/jens/Source/shotwell/src/util/misc.vala" return value->data[0].v_pointer; -#line 2442 "misc.c" +#line 2404 "misc.c" } static gchar* value_one_shot_scheduler_collect_value (GValue* value, guint n_collect_values, GTypeCValue* collect_values, guint collect_flags) { -#line 262 "/home/jens/Source/shotwell/src/util/misc.vala" +#line 253 "/home/jens/Source/shotwell/src/util/misc.vala" if (collect_values[0].v_pointer) { -#line 2449 "misc.c" +#line 2411 "misc.c" OneShotScheduler * object; object = collect_values[0].v_pointer; -#line 262 "/home/jens/Source/shotwell/src/util/misc.vala" +#line 253 "/home/jens/Source/shotwell/src/util/misc.vala" if (object->parent_instance.g_class == NULL) { -#line 262 "/home/jens/Source/shotwell/src/util/misc.vala" +#line 253 "/home/jens/Source/shotwell/src/util/misc.vala" return g_strconcat ("invalid unclassed object pointer for value type `", G_VALUE_TYPE_NAME (value), "'", NULL); -#line 2456 "misc.c" +#line 2418 "misc.c" } else if (!g_value_type_compatible (G_TYPE_FROM_INSTANCE (object), G_VALUE_TYPE (value))) { -#line 262 "/home/jens/Source/shotwell/src/util/misc.vala" +#line 253 "/home/jens/Source/shotwell/src/util/misc.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 2460 "misc.c" +#line 2422 "misc.c" } -#line 262 "/home/jens/Source/shotwell/src/util/misc.vala" +#line 253 "/home/jens/Source/shotwell/src/util/misc.vala" value->data[0].v_pointer = one_shot_scheduler_ref (object); -#line 2464 "misc.c" +#line 2426 "misc.c" } else { -#line 262 "/home/jens/Source/shotwell/src/util/misc.vala" +#line 253 "/home/jens/Source/shotwell/src/util/misc.vala" value->data[0].v_pointer = NULL; -#line 2468 "misc.c" +#line 2430 "misc.c" } -#line 262 "/home/jens/Source/shotwell/src/util/misc.vala" +#line 253 "/home/jens/Source/shotwell/src/util/misc.vala" return NULL; -#line 2472 "misc.c" +#line 2434 "misc.c" } static gchar* value_one_shot_scheduler_lcopy_value (const GValue* value, guint n_collect_values, GTypeCValue* collect_values, guint collect_flags) { OneShotScheduler ** object_p; object_p = collect_values[0].v_pointer; -#line 262 "/home/jens/Source/shotwell/src/util/misc.vala" +#line 253 "/home/jens/Source/shotwell/src/util/misc.vala" if (!object_p) { -#line 262 "/home/jens/Source/shotwell/src/util/misc.vala" +#line 253 "/home/jens/Source/shotwell/src/util/misc.vala" return g_strdup_printf ("value location for `%s' passed as NULL", G_VALUE_TYPE_NAME (value)); -#line 2483 "misc.c" +#line 2445 "misc.c" } -#line 262 "/home/jens/Source/shotwell/src/util/misc.vala" +#line 253 "/home/jens/Source/shotwell/src/util/misc.vala" if (!value->data[0].v_pointer) { -#line 262 "/home/jens/Source/shotwell/src/util/misc.vala" +#line 253 "/home/jens/Source/shotwell/src/util/misc.vala" *object_p = NULL; -#line 2489 "misc.c" +#line 2451 "misc.c" } else if (collect_flags & G_VALUE_NOCOPY_CONTENTS) { -#line 262 "/home/jens/Source/shotwell/src/util/misc.vala" +#line 253 "/home/jens/Source/shotwell/src/util/misc.vala" *object_p = value->data[0].v_pointer; -#line 2493 "misc.c" +#line 2455 "misc.c" } else { -#line 262 "/home/jens/Source/shotwell/src/util/misc.vala" +#line 253 "/home/jens/Source/shotwell/src/util/misc.vala" *object_p = one_shot_scheduler_ref (value->data[0].v_pointer); -#line 2497 "misc.c" +#line 2459 "misc.c" } -#line 262 "/home/jens/Source/shotwell/src/util/misc.vala" +#line 253 "/home/jens/Source/shotwell/src/util/misc.vala" return NULL; -#line 2501 "misc.c" +#line 2463 "misc.c" } GParamSpec* param_spec_one_shot_scheduler (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags) { ParamSpecOneShotScheduler* spec; -#line 262 "/home/jens/Source/shotwell/src/util/misc.vala" +#line 253 "/home/jens/Source/shotwell/src/util/misc.vala" g_return_val_if_fail (g_type_is_a (object_type, TYPE_ONE_SHOT_SCHEDULER), NULL); -#line 262 "/home/jens/Source/shotwell/src/util/misc.vala" +#line 253 "/home/jens/Source/shotwell/src/util/misc.vala" spec = g_param_spec_internal (G_TYPE_PARAM_OBJECT, name, nick, blurb, flags); -#line 262 "/home/jens/Source/shotwell/src/util/misc.vala" +#line 253 "/home/jens/Source/shotwell/src/util/misc.vala" G_PARAM_SPEC (spec)->value_type = object_type; -#line 262 "/home/jens/Source/shotwell/src/util/misc.vala" +#line 253 "/home/jens/Source/shotwell/src/util/misc.vala" return G_PARAM_SPEC (spec); -#line 2515 "misc.c" +#line 2477 "misc.c" } gpointer value_get_one_shot_scheduler (const GValue* value) { -#line 262 "/home/jens/Source/shotwell/src/util/misc.vala" +#line 253 "/home/jens/Source/shotwell/src/util/misc.vala" g_return_val_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, TYPE_ONE_SHOT_SCHEDULER), NULL); -#line 262 "/home/jens/Source/shotwell/src/util/misc.vala" +#line 253 "/home/jens/Source/shotwell/src/util/misc.vala" return value->data[0].v_pointer; -#line 2524 "misc.c" +#line 2486 "misc.c" } void value_set_one_shot_scheduler (GValue* value, gpointer v_object) { OneShotScheduler * old; -#line 262 "/home/jens/Source/shotwell/src/util/misc.vala" +#line 253 "/home/jens/Source/shotwell/src/util/misc.vala" g_return_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, TYPE_ONE_SHOT_SCHEDULER)); -#line 262 "/home/jens/Source/shotwell/src/util/misc.vala" +#line 253 "/home/jens/Source/shotwell/src/util/misc.vala" old = value->data[0].v_pointer; -#line 262 "/home/jens/Source/shotwell/src/util/misc.vala" +#line 253 "/home/jens/Source/shotwell/src/util/misc.vala" if (v_object) { -#line 262 "/home/jens/Source/shotwell/src/util/misc.vala" +#line 253 "/home/jens/Source/shotwell/src/util/misc.vala" g_return_if_fail (G_TYPE_CHECK_INSTANCE_TYPE (v_object, TYPE_ONE_SHOT_SCHEDULER)); -#line 262 "/home/jens/Source/shotwell/src/util/misc.vala" +#line 253 "/home/jens/Source/shotwell/src/util/misc.vala" g_return_if_fail (g_value_type_compatible (G_TYPE_FROM_INSTANCE (v_object), G_VALUE_TYPE (value))); -#line 262 "/home/jens/Source/shotwell/src/util/misc.vala" +#line 253 "/home/jens/Source/shotwell/src/util/misc.vala" value->data[0].v_pointer = v_object; -#line 262 "/home/jens/Source/shotwell/src/util/misc.vala" +#line 253 "/home/jens/Source/shotwell/src/util/misc.vala" one_shot_scheduler_ref (value->data[0].v_pointer); -#line 2544 "misc.c" +#line 2506 "misc.c" } else { -#line 262 "/home/jens/Source/shotwell/src/util/misc.vala" +#line 253 "/home/jens/Source/shotwell/src/util/misc.vala" value->data[0].v_pointer = NULL; -#line 2548 "misc.c" +#line 2510 "misc.c" } -#line 262 "/home/jens/Source/shotwell/src/util/misc.vala" +#line 253 "/home/jens/Source/shotwell/src/util/misc.vala" if (old) { -#line 262 "/home/jens/Source/shotwell/src/util/misc.vala" +#line 253 "/home/jens/Source/shotwell/src/util/misc.vala" one_shot_scheduler_unref (old); -#line 2554 "misc.c" +#line 2516 "misc.c" } } void value_take_one_shot_scheduler (GValue* value, gpointer v_object) { OneShotScheduler * old; -#line 262 "/home/jens/Source/shotwell/src/util/misc.vala" +#line 253 "/home/jens/Source/shotwell/src/util/misc.vala" g_return_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, TYPE_ONE_SHOT_SCHEDULER)); -#line 262 "/home/jens/Source/shotwell/src/util/misc.vala" +#line 253 "/home/jens/Source/shotwell/src/util/misc.vala" old = value->data[0].v_pointer; -#line 262 "/home/jens/Source/shotwell/src/util/misc.vala" +#line 253 "/home/jens/Source/shotwell/src/util/misc.vala" if (v_object) { -#line 262 "/home/jens/Source/shotwell/src/util/misc.vala" +#line 253 "/home/jens/Source/shotwell/src/util/misc.vala" g_return_if_fail (G_TYPE_CHECK_INSTANCE_TYPE (v_object, TYPE_ONE_SHOT_SCHEDULER)); -#line 262 "/home/jens/Source/shotwell/src/util/misc.vala" +#line 253 "/home/jens/Source/shotwell/src/util/misc.vala" g_return_if_fail (g_value_type_compatible (G_TYPE_FROM_INSTANCE (v_object), G_VALUE_TYPE (value))); -#line 262 "/home/jens/Source/shotwell/src/util/misc.vala" +#line 253 "/home/jens/Source/shotwell/src/util/misc.vala" value->data[0].v_pointer = v_object; -#line 2573 "misc.c" +#line 2535 "misc.c" } else { -#line 262 "/home/jens/Source/shotwell/src/util/misc.vala" +#line 253 "/home/jens/Source/shotwell/src/util/misc.vala" value->data[0].v_pointer = NULL; -#line 2577 "misc.c" +#line 2539 "misc.c" } -#line 262 "/home/jens/Source/shotwell/src/util/misc.vala" +#line 253 "/home/jens/Source/shotwell/src/util/misc.vala" if (old) { -#line 262 "/home/jens/Source/shotwell/src/util/misc.vala" +#line 253 "/home/jens/Source/shotwell/src/util/misc.vala" one_shot_scheduler_unref (old); -#line 2583 "misc.c" +#line 2545 "misc.c" } } static void one_shot_scheduler_class_init (OneShotSchedulerClass * klass) { -#line 262 "/home/jens/Source/shotwell/src/util/misc.vala" +#line 253 "/home/jens/Source/shotwell/src/util/misc.vala" one_shot_scheduler_parent_class = g_type_class_peek_parent (klass); -#line 262 "/home/jens/Source/shotwell/src/util/misc.vala" +#line 253 "/home/jens/Source/shotwell/src/util/misc.vala" ((OneShotSchedulerClass *) klass)->finalize = one_shot_scheduler_finalize; -#line 262 "/home/jens/Source/shotwell/src/util/misc.vala" +#line 253 "/home/jens/Source/shotwell/src/util/misc.vala" g_type_class_add_private (klass, sizeof (OneShotSchedulerPrivate)); -#line 2595 "misc.c" +#line 2557 "misc.c" } static void one_shot_scheduler_instance_init (OneShotScheduler * self) { -#line 262 "/home/jens/Source/shotwell/src/util/misc.vala" +#line 253 "/home/jens/Source/shotwell/src/util/misc.vala" self->priv = ONE_SHOT_SCHEDULER_GET_PRIVATE (self); -#line 265 "/home/jens/Source/shotwell/src/util/misc.vala" +#line 256 "/home/jens/Source/shotwell/src/util/misc.vala" self->priv->scheduled = (guint) 0; -#line 262 "/home/jens/Source/shotwell/src/util/misc.vala" +#line 253 "/home/jens/Source/shotwell/src/util/misc.vala" self->ref_count = 1; -#line 2606 "misc.c" +#line 2568 "misc.c" } static void one_shot_scheduler_finalize (OneShotScheduler * obj) { OneShotScheduler * self; -#line 262 "/home/jens/Source/shotwell/src/util/misc.vala" +#line 253 "/home/jens/Source/shotwell/src/util/misc.vala" self = G_TYPE_CHECK_INSTANCE_CAST (obj, TYPE_ONE_SHOT_SCHEDULER, OneShotScheduler); -#line 262 "/home/jens/Source/shotwell/src/util/misc.vala" +#line 253 "/home/jens/Source/shotwell/src/util/misc.vala" g_signal_handlers_destroy (self); -#line 277 "/home/jens/Source/shotwell/src/util/misc.vala" +#line 268 "/home/jens/Source/shotwell/src/util/misc.vala" one_shot_scheduler_cancel (self); -#line 263 "/home/jens/Source/shotwell/src/util/misc.vala" +#line 254 "/home/jens/Source/shotwell/src/util/misc.vala" _g_free0 (self->priv->name); -#line 2620 "misc.c" +#line 2582 "misc.c" } @@ -2637,24 +2599,24 @@ GType one_shot_scheduler_get_type (void) { gpointer one_shot_scheduler_ref (gpointer instance) { OneShotScheduler * self; self = instance; -#line 262 "/home/jens/Source/shotwell/src/util/misc.vala" +#line 253 "/home/jens/Source/shotwell/src/util/misc.vala" g_atomic_int_inc (&self->ref_count); -#line 262 "/home/jens/Source/shotwell/src/util/misc.vala" +#line 253 "/home/jens/Source/shotwell/src/util/misc.vala" return instance; -#line 2645 "misc.c" +#line 2607 "misc.c" } void one_shot_scheduler_unref (gpointer instance) { OneShotScheduler * self; self = instance; -#line 262 "/home/jens/Source/shotwell/src/util/misc.vala" +#line 253 "/home/jens/Source/shotwell/src/util/misc.vala" if (g_atomic_int_dec_and_test (&self->ref_count)) { -#line 262 "/home/jens/Source/shotwell/src/util/misc.vala" +#line 253 "/home/jens/Source/shotwell/src/util/misc.vala" ONE_SHOT_SCHEDULER_GET_CLASS (self)->finalize (self); -#line 262 "/home/jens/Source/shotwell/src/util/misc.vala" +#line 253 "/home/jens/Source/shotwell/src/util/misc.vala" g_type_free_instance ((GTypeInstance *) self); -#line 2658 "misc.c" +#line 2620 "misc.c" } } @@ -2663,40 +2625,40 @@ OpTimer* op_timer_construct (GType object_type, const gchar* name) { OpTimer* self = NULL; const gchar* _tmp0_; gchar* _tmp1_; -#line 331 "/home/jens/Source/shotwell/src/util/misc.vala" +#line 322 "/home/jens/Source/shotwell/src/util/misc.vala" g_return_val_if_fail (name != NULL, NULL); -#line 331 "/home/jens/Source/shotwell/src/util/misc.vala" +#line 322 "/home/jens/Source/shotwell/src/util/misc.vala" self = (OpTimer*) g_type_create_instance (object_type); -#line 332 "/home/jens/Source/shotwell/src/util/misc.vala" +#line 323 "/home/jens/Source/shotwell/src/util/misc.vala" _tmp0_ = name; -#line 332 "/home/jens/Source/shotwell/src/util/misc.vala" +#line 323 "/home/jens/Source/shotwell/src/util/misc.vala" _tmp1_ = g_strdup (_tmp0_); -#line 332 "/home/jens/Source/shotwell/src/util/misc.vala" +#line 323 "/home/jens/Source/shotwell/src/util/misc.vala" _g_free0 (self->priv->name); -#line 332 "/home/jens/Source/shotwell/src/util/misc.vala" +#line 323 "/home/jens/Source/shotwell/src/util/misc.vala" self->priv->name = _tmp1_; -#line 331 "/home/jens/Source/shotwell/src/util/misc.vala" +#line 322 "/home/jens/Source/shotwell/src/util/misc.vala" return self; -#line 2681 "misc.c" +#line 2643 "misc.c" } OpTimer* op_timer_new (const gchar* name) { -#line 331 "/home/jens/Source/shotwell/src/util/misc.vala" +#line 322 "/home/jens/Source/shotwell/src/util/misc.vala" return op_timer_construct (TYPE_OP_TIMER, name); -#line 2688 "misc.c" +#line 2650 "misc.c" } void op_timer_start (OpTimer* self) { GTimer* _tmp0_; -#line 335 "/home/jens/Source/shotwell/src/util/misc.vala" +#line 326 "/home/jens/Source/shotwell/src/util/misc.vala" g_return_if_fail (IS_OP_TIMER (self)); -#line 336 "/home/jens/Source/shotwell/src/util/misc.vala" +#line 327 "/home/jens/Source/shotwell/src/util/misc.vala" _tmp0_ = self->priv->timer; -#line 336 "/home/jens/Source/shotwell/src/util/misc.vala" +#line 327 "/home/jens/Source/shotwell/src/util/misc.vala" g_timer_start (_tmp0_); -#line 2700 "misc.c" +#line 2662 "misc.c" } @@ -2711,66 +2673,66 @@ void op_timer_stop (OpTimer* self) { gdouble _tmp7_; gdouble _tmp8_; glong _tmp10_; -#line 339 "/home/jens/Source/shotwell/src/util/misc.vala" +#line 330 "/home/jens/Source/shotwell/src/util/misc.vala" g_return_if_fail (IS_OP_TIMER (self)); -#line 340 "/home/jens/Source/shotwell/src/util/misc.vala" +#line 331 "/home/jens/Source/shotwell/src/util/misc.vala" _tmp0_ = self->priv->timer; -#line 340 "/home/jens/Source/shotwell/src/util/misc.vala" +#line 331 "/home/jens/Source/shotwell/src/util/misc.vala" _tmp1_ = g_timer_elapsed (_tmp0_, NULL); -#line 340 "/home/jens/Source/shotwell/src/util/misc.vala" +#line 331 "/home/jens/Source/shotwell/src/util/misc.vala" time = _tmp1_; -#line 342 "/home/jens/Source/shotwell/src/util/misc.vala" +#line 333 "/home/jens/Source/shotwell/src/util/misc.vala" _tmp2_ = self->priv->elapsed; -#line 342 "/home/jens/Source/shotwell/src/util/misc.vala" +#line 333 "/home/jens/Source/shotwell/src/util/misc.vala" _tmp3_ = time; -#line 342 "/home/jens/Source/shotwell/src/util/misc.vala" +#line 333 "/home/jens/Source/shotwell/src/util/misc.vala" self->priv->elapsed = _tmp2_ + _tmp3_; -#line 344 "/home/jens/Source/shotwell/src/util/misc.vala" +#line 335 "/home/jens/Source/shotwell/src/util/misc.vala" _tmp4_ = time; -#line 344 "/home/jens/Source/shotwell/src/util/misc.vala" +#line 335 "/home/jens/Source/shotwell/src/util/misc.vala" _tmp5_ = self->priv->shortest; -#line 344 "/home/jens/Source/shotwell/src/util/misc.vala" +#line 335 "/home/jens/Source/shotwell/src/util/misc.vala" if (_tmp4_ < _tmp5_) { -#line 2735 "misc.c" +#line 2697 "misc.c" gdouble _tmp6_; -#line 345 "/home/jens/Source/shotwell/src/util/misc.vala" +#line 336 "/home/jens/Source/shotwell/src/util/misc.vala" _tmp6_ = time; -#line 345 "/home/jens/Source/shotwell/src/util/misc.vala" +#line 336 "/home/jens/Source/shotwell/src/util/misc.vala" self->priv->shortest = _tmp6_; -#line 2741 "misc.c" +#line 2703 "misc.c" } -#line 347 "/home/jens/Source/shotwell/src/util/misc.vala" +#line 338 "/home/jens/Source/shotwell/src/util/misc.vala" _tmp7_ = time; -#line 347 "/home/jens/Source/shotwell/src/util/misc.vala" +#line 338 "/home/jens/Source/shotwell/src/util/misc.vala" _tmp8_ = self->priv->longest; -#line 347 "/home/jens/Source/shotwell/src/util/misc.vala" +#line 338 "/home/jens/Source/shotwell/src/util/misc.vala" if (_tmp7_ > _tmp8_) { -#line 2749 "misc.c" +#line 2711 "misc.c" gdouble _tmp9_; -#line 348 "/home/jens/Source/shotwell/src/util/misc.vala" +#line 339 "/home/jens/Source/shotwell/src/util/misc.vala" _tmp9_ = time; -#line 348 "/home/jens/Source/shotwell/src/util/misc.vala" +#line 339 "/home/jens/Source/shotwell/src/util/misc.vala" self->priv->longest = _tmp9_; -#line 2755 "misc.c" +#line 2717 "misc.c" } -#line 350 "/home/jens/Source/shotwell/src/util/misc.vala" +#line 341 "/home/jens/Source/shotwell/src/util/misc.vala" _tmp10_ = self->priv->count; -#line 350 "/home/jens/Source/shotwell/src/util/misc.vala" +#line 341 "/home/jens/Source/shotwell/src/util/misc.vala" self->priv->count = _tmp10_ + 1; -#line 2761 "misc.c" +#line 2723 "misc.c" } gchar* op_timer_to_string (OpTimer* self) { gchar* result = NULL; glong _tmp0_; -#line 353 "/home/jens/Source/shotwell/src/util/misc.vala" +#line 344 "/home/jens/Source/shotwell/src/util/misc.vala" g_return_val_if_fail (IS_OP_TIMER (self), NULL); -#line 354 "/home/jens/Source/shotwell/src/util/misc.vala" +#line 345 "/home/jens/Source/shotwell/src/util/misc.vala" _tmp0_ = self->priv->count; -#line 354 "/home/jens/Source/shotwell/src/util/misc.vala" +#line 345 "/home/jens/Source/shotwell/src/util/misc.vala" if (_tmp0_ > ((glong) 0)) { -#line 2774 "misc.c" +#line 2736 "misc.c" const gchar* _tmp1_; glong _tmp2_; gdouble _tmp3_; @@ -2779,267 +2741,267 @@ gchar* op_timer_to_string (OpTimer* self) { glong _tmp6_; gdouble _tmp7_; gchar* _tmp8_; -#line 355 "/home/jens/Source/shotwell/src/util/misc.vala" +#line 346 "/home/jens/Source/shotwell/src/util/misc.vala" _tmp1_ = self->priv->name; -#line 355 "/home/jens/Source/shotwell/src/util/misc.vala" +#line 346 "/home/jens/Source/shotwell/src/util/misc.vala" _tmp2_ = self->priv->count; -#line 355 "/home/jens/Source/shotwell/src/util/misc.vala" +#line 346 "/home/jens/Source/shotwell/src/util/misc.vala" _tmp3_ = self->priv->elapsed; -#line 355 "/home/jens/Source/shotwell/src/util/misc.vala" +#line 346 "/home/jens/Source/shotwell/src/util/misc.vala" _tmp4_ = self->priv->shortest; -#line 355 "/home/jens/Source/shotwell/src/util/misc.vala" +#line 346 "/home/jens/Source/shotwell/src/util/misc.vala" _tmp5_ = self->priv->elapsed; -#line 355 "/home/jens/Source/shotwell/src/util/misc.vala" +#line 346 "/home/jens/Source/shotwell/src/util/misc.vala" _tmp6_ = self->priv->count; -#line 355 "/home/jens/Source/shotwell/src/util/misc.vala" +#line 346 "/home/jens/Source/shotwell/src/util/misc.vala" _tmp7_ = self->priv->longest; -#line 355 "/home/jens/Source/shotwell/src/util/misc.vala" +#line 346 "/home/jens/Source/shotwell/src/util/misc.vala" _tmp8_ = g_strdup_printf ("%s: count=%ld elapsed=%.03lfs min/avg/max=%.03lf/%.03lf/%.03lf", _tmp1_, _tmp2_, _tmp3_, _tmp4_, _tmp5_ / ((gdouble) _tmp6_), _tmp7_); -#line 355 "/home/jens/Source/shotwell/src/util/misc.vala" +#line 346 "/home/jens/Source/shotwell/src/util/misc.vala" result = _tmp8_; -#line 355 "/home/jens/Source/shotwell/src/util/misc.vala" +#line 346 "/home/jens/Source/shotwell/src/util/misc.vala" return result; -#line 2803 "misc.c" +#line 2765 "misc.c" } else { const gchar* _tmp9_; gchar* _tmp10_; -#line 358 "/home/jens/Source/shotwell/src/util/misc.vala" +#line 349 "/home/jens/Source/shotwell/src/util/misc.vala" _tmp9_ = self->priv->name; -#line 358 "/home/jens/Source/shotwell/src/util/misc.vala" +#line 349 "/home/jens/Source/shotwell/src/util/misc.vala" _tmp10_ = g_strdup_printf ("%s: no operations", _tmp9_); -#line 358 "/home/jens/Source/shotwell/src/util/misc.vala" +#line 349 "/home/jens/Source/shotwell/src/util/misc.vala" result = _tmp10_; -#line 358 "/home/jens/Source/shotwell/src/util/misc.vala" +#line 349 "/home/jens/Source/shotwell/src/util/misc.vala" return result; -#line 2815 "misc.c" +#line 2777 "misc.c" } } static void value_op_timer_init (GValue* value) { -#line 323 "/home/jens/Source/shotwell/src/util/misc.vala" +#line 314 "/home/jens/Source/shotwell/src/util/misc.vala" value->data[0].v_pointer = NULL; -#line 2823 "misc.c" +#line 2785 "misc.c" } static void value_op_timer_free_value (GValue* value) { -#line 323 "/home/jens/Source/shotwell/src/util/misc.vala" +#line 314 "/home/jens/Source/shotwell/src/util/misc.vala" if (value->data[0].v_pointer) { -#line 323 "/home/jens/Source/shotwell/src/util/misc.vala" +#line 314 "/home/jens/Source/shotwell/src/util/misc.vala" op_timer_unref (value->data[0].v_pointer); -#line 2832 "misc.c" +#line 2794 "misc.c" } } static void value_op_timer_copy_value (const GValue* src_value, GValue* dest_value) { -#line 323 "/home/jens/Source/shotwell/src/util/misc.vala" +#line 314 "/home/jens/Source/shotwell/src/util/misc.vala" if (src_value->data[0].v_pointer) { -#line 323 "/home/jens/Source/shotwell/src/util/misc.vala" +#line 314 "/home/jens/Source/shotwell/src/util/misc.vala" dest_value->data[0].v_pointer = op_timer_ref (src_value->data[0].v_pointer); -#line 2842 "misc.c" +#line 2804 "misc.c" } else { -#line 323 "/home/jens/Source/shotwell/src/util/misc.vala" +#line 314 "/home/jens/Source/shotwell/src/util/misc.vala" dest_value->data[0].v_pointer = NULL; -#line 2846 "misc.c" +#line 2808 "misc.c" } } static gpointer value_op_timer_peek_pointer (const GValue* value) { -#line 323 "/home/jens/Source/shotwell/src/util/misc.vala" +#line 314 "/home/jens/Source/shotwell/src/util/misc.vala" return value->data[0].v_pointer; -#line 2854 "misc.c" +#line 2816 "misc.c" } static gchar* value_op_timer_collect_value (GValue* value, guint n_collect_values, GTypeCValue* collect_values, guint collect_flags) { -#line 323 "/home/jens/Source/shotwell/src/util/misc.vala" +#line 314 "/home/jens/Source/shotwell/src/util/misc.vala" if (collect_values[0].v_pointer) { -#line 2861 "misc.c" +#line 2823 "misc.c" OpTimer * object; object = collect_values[0].v_pointer; -#line 323 "/home/jens/Source/shotwell/src/util/misc.vala" +#line 314 "/home/jens/Source/shotwell/src/util/misc.vala" if (object->parent_instance.g_class == NULL) { -#line 323 "/home/jens/Source/shotwell/src/util/misc.vala" +#line 314 "/home/jens/Source/shotwell/src/util/misc.vala" return g_strconcat ("invalid unclassed object pointer for value type `", G_VALUE_TYPE_NAME (value), "'", NULL); -#line 2868 "misc.c" +#line 2830 "misc.c" } else if (!g_value_type_compatible (G_TYPE_FROM_INSTANCE (object), G_VALUE_TYPE (value))) { -#line 323 "/home/jens/Source/shotwell/src/util/misc.vala" +#line 314 "/home/jens/Source/shotwell/src/util/misc.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 2872 "misc.c" +#line 2834 "misc.c" } -#line 323 "/home/jens/Source/shotwell/src/util/misc.vala" +#line 314 "/home/jens/Source/shotwell/src/util/misc.vala" value->data[0].v_pointer = op_timer_ref (object); -#line 2876 "misc.c" +#line 2838 "misc.c" } else { -#line 323 "/home/jens/Source/shotwell/src/util/misc.vala" +#line 314 "/home/jens/Source/shotwell/src/util/misc.vala" value->data[0].v_pointer = NULL; -#line 2880 "misc.c" +#line 2842 "misc.c" } -#line 323 "/home/jens/Source/shotwell/src/util/misc.vala" +#line 314 "/home/jens/Source/shotwell/src/util/misc.vala" return NULL; -#line 2884 "misc.c" +#line 2846 "misc.c" } static gchar* value_op_timer_lcopy_value (const GValue* value, guint n_collect_values, GTypeCValue* collect_values, guint collect_flags) { OpTimer ** object_p; object_p = collect_values[0].v_pointer; -#line 323 "/home/jens/Source/shotwell/src/util/misc.vala" +#line 314 "/home/jens/Source/shotwell/src/util/misc.vala" if (!object_p) { -#line 323 "/home/jens/Source/shotwell/src/util/misc.vala" +#line 314 "/home/jens/Source/shotwell/src/util/misc.vala" return g_strdup_printf ("value location for `%s' passed as NULL", G_VALUE_TYPE_NAME (value)); -#line 2895 "misc.c" +#line 2857 "misc.c" } -#line 323 "/home/jens/Source/shotwell/src/util/misc.vala" +#line 314 "/home/jens/Source/shotwell/src/util/misc.vala" if (!value->data[0].v_pointer) { -#line 323 "/home/jens/Source/shotwell/src/util/misc.vala" +#line 314 "/home/jens/Source/shotwell/src/util/misc.vala" *object_p = NULL; -#line 2901 "misc.c" +#line 2863 "misc.c" } else if (collect_flags & G_VALUE_NOCOPY_CONTENTS) { -#line 323 "/home/jens/Source/shotwell/src/util/misc.vala" +#line 314 "/home/jens/Source/shotwell/src/util/misc.vala" *object_p = value->data[0].v_pointer; -#line 2905 "misc.c" +#line 2867 "misc.c" } else { -#line 323 "/home/jens/Source/shotwell/src/util/misc.vala" +#line 314 "/home/jens/Source/shotwell/src/util/misc.vala" *object_p = op_timer_ref (value->data[0].v_pointer); -#line 2909 "misc.c" +#line 2871 "misc.c" } -#line 323 "/home/jens/Source/shotwell/src/util/misc.vala" +#line 314 "/home/jens/Source/shotwell/src/util/misc.vala" return NULL; -#line 2913 "misc.c" +#line 2875 "misc.c" } GParamSpec* param_spec_op_timer (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags) { ParamSpecOpTimer* spec; -#line 323 "/home/jens/Source/shotwell/src/util/misc.vala" +#line 314 "/home/jens/Source/shotwell/src/util/misc.vala" g_return_val_if_fail (g_type_is_a (object_type, TYPE_OP_TIMER), NULL); -#line 323 "/home/jens/Source/shotwell/src/util/misc.vala" +#line 314 "/home/jens/Source/shotwell/src/util/misc.vala" spec = g_param_spec_internal (G_TYPE_PARAM_OBJECT, name, nick, blurb, flags); -#line 323 "/home/jens/Source/shotwell/src/util/misc.vala" +#line 314 "/home/jens/Source/shotwell/src/util/misc.vala" G_PARAM_SPEC (spec)->value_type = object_type; -#line 323 "/home/jens/Source/shotwell/src/util/misc.vala" +#line 314 "/home/jens/Source/shotwell/src/util/misc.vala" return G_PARAM_SPEC (spec); -#line 2927 "misc.c" +#line 2889 "misc.c" } gpointer value_get_op_timer (const GValue* value) { -#line 323 "/home/jens/Source/shotwell/src/util/misc.vala" +#line 314 "/home/jens/Source/shotwell/src/util/misc.vala" g_return_val_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, TYPE_OP_TIMER), NULL); -#line 323 "/home/jens/Source/shotwell/src/util/misc.vala" +#line 314 "/home/jens/Source/shotwell/src/util/misc.vala" return value->data[0].v_pointer; -#line 2936 "misc.c" +#line 2898 "misc.c" } void value_set_op_timer (GValue* value, gpointer v_object) { OpTimer * old; -#line 323 "/home/jens/Source/shotwell/src/util/misc.vala" +#line 314 "/home/jens/Source/shotwell/src/util/misc.vala" g_return_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, TYPE_OP_TIMER)); -#line 323 "/home/jens/Source/shotwell/src/util/misc.vala" +#line 314 "/home/jens/Source/shotwell/src/util/misc.vala" old = value->data[0].v_pointer; -#line 323 "/home/jens/Source/shotwell/src/util/misc.vala" +#line 314 "/home/jens/Source/shotwell/src/util/misc.vala" if (v_object) { -#line 323 "/home/jens/Source/shotwell/src/util/misc.vala" +#line 314 "/home/jens/Source/shotwell/src/util/misc.vala" g_return_if_fail (G_TYPE_CHECK_INSTANCE_TYPE (v_object, TYPE_OP_TIMER)); -#line 323 "/home/jens/Source/shotwell/src/util/misc.vala" +#line 314 "/home/jens/Source/shotwell/src/util/misc.vala" g_return_if_fail (g_value_type_compatible (G_TYPE_FROM_INSTANCE (v_object), G_VALUE_TYPE (value))); -#line 323 "/home/jens/Source/shotwell/src/util/misc.vala" +#line 314 "/home/jens/Source/shotwell/src/util/misc.vala" value->data[0].v_pointer = v_object; -#line 323 "/home/jens/Source/shotwell/src/util/misc.vala" +#line 314 "/home/jens/Source/shotwell/src/util/misc.vala" op_timer_ref (value->data[0].v_pointer); -#line 2956 "misc.c" +#line 2918 "misc.c" } else { -#line 323 "/home/jens/Source/shotwell/src/util/misc.vala" +#line 314 "/home/jens/Source/shotwell/src/util/misc.vala" value->data[0].v_pointer = NULL; -#line 2960 "misc.c" +#line 2922 "misc.c" } -#line 323 "/home/jens/Source/shotwell/src/util/misc.vala" +#line 314 "/home/jens/Source/shotwell/src/util/misc.vala" if (old) { -#line 323 "/home/jens/Source/shotwell/src/util/misc.vala" +#line 314 "/home/jens/Source/shotwell/src/util/misc.vala" op_timer_unref (old); -#line 2966 "misc.c" +#line 2928 "misc.c" } } void value_take_op_timer (GValue* value, gpointer v_object) { OpTimer * old; -#line 323 "/home/jens/Source/shotwell/src/util/misc.vala" +#line 314 "/home/jens/Source/shotwell/src/util/misc.vala" g_return_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, TYPE_OP_TIMER)); -#line 323 "/home/jens/Source/shotwell/src/util/misc.vala" +#line 314 "/home/jens/Source/shotwell/src/util/misc.vala" old = value->data[0].v_pointer; -#line 323 "/home/jens/Source/shotwell/src/util/misc.vala" +#line 314 "/home/jens/Source/shotwell/src/util/misc.vala" if (v_object) { -#line 323 "/home/jens/Source/shotwell/src/util/misc.vala" +#line 314 "/home/jens/Source/shotwell/src/util/misc.vala" g_return_if_fail (G_TYPE_CHECK_INSTANCE_TYPE (v_object, TYPE_OP_TIMER)); -#line 323 "/home/jens/Source/shotwell/src/util/misc.vala" +#line 314 "/home/jens/Source/shotwell/src/util/misc.vala" g_return_if_fail (g_value_type_compatible (G_TYPE_FROM_INSTANCE (v_object), G_VALUE_TYPE (value))); -#line 323 "/home/jens/Source/shotwell/src/util/misc.vala" +#line 314 "/home/jens/Source/shotwell/src/util/misc.vala" value->data[0].v_pointer = v_object; -#line 2985 "misc.c" +#line 2947 "misc.c" } else { -#line 323 "/home/jens/Source/shotwell/src/util/misc.vala" +#line 314 "/home/jens/Source/shotwell/src/util/misc.vala" value->data[0].v_pointer = NULL; -#line 2989 "misc.c" +#line 2951 "misc.c" } -#line 323 "/home/jens/Source/shotwell/src/util/misc.vala" +#line 314 "/home/jens/Source/shotwell/src/util/misc.vala" if (old) { -#line 323 "/home/jens/Source/shotwell/src/util/misc.vala" +#line 314 "/home/jens/Source/shotwell/src/util/misc.vala" op_timer_unref (old); -#line 2995 "misc.c" +#line 2957 "misc.c" } } static void op_timer_class_init (OpTimerClass * klass) { -#line 323 "/home/jens/Source/shotwell/src/util/misc.vala" +#line 314 "/home/jens/Source/shotwell/src/util/misc.vala" op_timer_parent_class = g_type_class_peek_parent (klass); -#line 323 "/home/jens/Source/shotwell/src/util/misc.vala" +#line 314 "/home/jens/Source/shotwell/src/util/misc.vala" ((OpTimerClass *) klass)->finalize = op_timer_finalize; -#line 323 "/home/jens/Source/shotwell/src/util/misc.vala" +#line 314 "/home/jens/Source/shotwell/src/util/misc.vala" g_type_class_add_private (klass, sizeof (OpTimerPrivate)); -#line 3007 "misc.c" +#line 2969 "misc.c" } static void op_timer_instance_init (OpTimer * self) { GTimer* _tmp0_; -#line 323 "/home/jens/Source/shotwell/src/util/misc.vala" +#line 314 "/home/jens/Source/shotwell/src/util/misc.vala" self->priv = OP_TIMER_GET_PRIVATE (self); -#line 325 "/home/jens/Source/shotwell/src/util/misc.vala" +#line 316 "/home/jens/Source/shotwell/src/util/misc.vala" _tmp0_ = g_timer_new (); -#line 325 "/home/jens/Source/shotwell/src/util/misc.vala" +#line 316 "/home/jens/Source/shotwell/src/util/misc.vala" self->priv->timer = _tmp0_; -#line 326 "/home/jens/Source/shotwell/src/util/misc.vala" +#line 317 "/home/jens/Source/shotwell/src/util/misc.vala" self->priv->count = (glong) 0; -#line 327 "/home/jens/Source/shotwell/src/util/misc.vala" +#line 318 "/home/jens/Source/shotwell/src/util/misc.vala" self->priv->elapsed = (gdouble) 0; -#line 328 "/home/jens/Source/shotwell/src/util/misc.vala" +#line 319 "/home/jens/Source/shotwell/src/util/misc.vala" self->priv->shortest = DBL_MAX; -#line 329 "/home/jens/Source/shotwell/src/util/misc.vala" +#line 320 "/home/jens/Source/shotwell/src/util/misc.vala" self->priv->longest = DBL_MIN; -#line 323 "/home/jens/Source/shotwell/src/util/misc.vala" +#line 314 "/home/jens/Source/shotwell/src/util/misc.vala" self->ref_count = 1; -#line 3029 "misc.c" +#line 2991 "misc.c" } static void op_timer_finalize (OpTimer * obj) { OpTimer * self; -#line 323 "/home/jens/Source/shotwell/src/util/misc.vala" +#line 314 "/home/jens/Source/shotwell/src/util/misc.vala" self = G_TYPE_CHECK_INSTANCE_CAST (obj, TYPE_OP_TIMER, OpTimer); -#line 323 "/home/jens/Source/shotwell/src/util/misc.vala" +#line 314 "/home/jens/Source/shotwell/src/util/misc.vala" g_signal_handlers_destroy (self); -#line 324 "/home/jens/Source/shotwell/src/util/misc.vala" +#line 315 "/home/jens/Source/shotwell/src/util/misc.vala" _g_free0 (self->priv->name); -#line 325 "/home/jens/Source/shotwell/src/util/misc.vala" +#line 316 "/home/jens/Source/shotwell/src/util/misc.vala" _g_timer_destroy0 (self->priv->timer); -#line 3043 "misc.c" +#line 3005 "misc.c" } @@ -3060,24 +3022,24 @@ GType op_timer_get_type (void) { gpointer op_timer_ref (gpointer instance) { OpTimer * self; self = instance; -#line 323 "/home/jens/Source/shotwell/src/util/misc.vala" +#line 314 "/home/jens/Source/shotwell/src/util/misc.vala" g_atomic_int_inc (&self->ref_count); -#line 323 "/home/jens/Source/shotwell/src/util/misc.vala" +#line 314 "/home/jens/Source/shotwell/src/util/misc.vala" return instance; -#line 3068 "misc.c" +#line 3030 "misc.c" } void op_timer_unref (gpointer instance) { OpTimer * self; self = instance; -#line 323 "/home/jens/Source/shotwell/src/util/misc.vala" +#line 314 "/home/jens/Source/shotwell/src/util/misc.vala" if (g_atomic_int_dec_and_test (&self->ref_count)) { -#line 323 "/home/jens/Source/shotwell/src/util/misc.vala" +#line 314 "/home/jens/Source/shotwell/src/util/misc.vala" OP_TIMER_GET_CLASS (self)->finalize (self); -#line 323 "/home/jens/Source/shotwell/src/util/misc.vala" +#line 314 "/home/jens/Source/shotwell/src/util/misc.vala" g_type_free_instance ((GTypeInstance *) self); -#line 3081 "misc.c" +#line 3043 "misc.c" } } diff --git a/src/util/misc.vala b/src/util/misc.vala index cbc6dfa..6111ea3 100644 --- a/src/util/misc.vala +++ b/src/util/misc.vala @@ -72,15 +72,6 @@ public inline time_t now_time_t() { return (time_t) now_sec(); } -public string md5_binary(uint8 *buffer, size_t length) { - assert(length != 0); - - Checksum md5 = new Checksum(ChecksumType.MD5); - md5.update((uchar []) buffer, length); - - return md5.get_string(); -} - public string md5_file(File file) throws Error { Checksum md5 = new Checksum(ChecksumType.MD5); uint8[] buffer = new uint8[64 * 1024]; diff --git a/src/util/system.c b/src/util/system.c index d099120..3075260 100644 --- a/src/util/system.c +++ b/src/util/system.c @@ -63,36 +63,60 @@ GFile* get_sys_install_dir (GFile* exec_dir) { if (_tmp6_) { #line 65 "system.c" GFile* _tmp7_; -#line 13 "/home/jens/Source/shotwell/src/util/system.vala" - _tmp7_ = g_file_new_for_path (RESOURCES_PREFIX); -#line 13 "/home/jens/Source/shotwell/src/util/system.vala" - result = _tmp7_; -#line 13 "/home/jens/Source/shotwell/src/util/system.vala" + gchar* _tmp8_; + gchar* _tmp9_; + gboolean _tmp10_; + GFile* _tmp11_; +#line 14 "/home/jens/Source/shotwell/src/util/system.vala" + _tmp7_ = exec_dir; +#line 14 "/home/jens/Source/shotwell/src/util/system.vala" + _tmp8_ = g_file_get_basename (_tmp7_); +#line 14 "/home/jens/Source/shotwell/src/util/system.vala" + _tmp9_ = _tmp8_; +#line 14 "/home/jens/Source/shotwell/src/util/system.vala" + _tmp10_ = g_strcmp0 (_tmp9_, "src") == 0; +#line 14 "/home/jens/Source/shotwell/src/util/system.vala" + _g_free0 (_tmp9_); +#line 14 "/home/jens/Source/shotwell/src/util/system.vala" + if (_tmp10_) { +#line 15 "/home/jens/Source/shotwell/src/util/system.vala" + result = NULL; +#line 15 "/home/jens/Source/shotwell/src/util/system.vala" + _g_object_unref0 (child); +#line 15 "/home/jens/Source/shotwell/src/util/system.vala" + return result; +#line 89 "system.c" + } +#line 18 "/home/jens/Source/shotwell/src/util/system.vala" + _tmp11_ = g_file_new_for_path (RESOURCES_PREFIX); +#line 18 "/home/jens/Source/shotwell/src/util/system.vala" + result = _tmp11_; +#line 18 "/home/jens/Source/shotwell/src/util/system.vala" _g_object_unref0 (child); -#line 13 "/home/jens/Source/shotwell/src/util/system.vala" +#line 18 "/home/jens/Source/shotwell/src/util/system.vala" return result; -#line 75 "system.c" +#line 99 "system.c" } -#line 16 "/home/jens/Source/shotwell/src/util/system.vala" +#line 21 "/home/jens/Source/shotwell/src/util/system.vala" result = NULL; -#line 16 "/home/jens/Source/shotwell/src/util/system.vala" +#line 21 "/home/jens/Source/shotwell/src/util/system.vala" _g_object_unref0 (child); -#line 16 "/home/jens/Source/shotwell/src/util/system.vala" +#line 21 "/home/jens/Source/shotwell/src/util/system.vala" return result; -#line 83 "system.c" +#line 107 "system.c" } gchar* get_nautilus_install_location (void) { gchar* result = NULL; gchar* _tmp0_; -#line 20 "/home/jens/Source/shotwell/src/util/system.vala" +#line 25 "/home/jens/Source/shotwell/src/util/system.vala" _tmp0_ = g_find_program_in_path ("nautilus"); -#line 20 "/home/jens/Source/shotwell/src/util/system.vala" +#line 25 "/home/jens/Source/shotwell/src/util/system.vala" result = _tmp0_; -#line 20 "/home/jens/Source/shotwell/src/util/system.vala" +#line 25 "/home/jens/Source/shotwell/src/util/system.vala" return result; -#line 96 "system.c" +#line 120 "system.c" } @@ -100,23 +124,23 @@ void sys_show_uri (GdkScreen* screen, const gchar* uri, GError** error) { GdkScreen* _tmp0_; const gchar* _tmp1_; GError * _inner_error_ = NULL; -#line 23 "/home/jens/Source/shotwell/src/util/system.vala" +#line 28 "/home/jens/Source/shotwell/src/util/system.vala" g_return_if_fail (GDK_IS_SCREEN (screen)); -#line 23 "/home/jens/Source/shotwell/src/util/system.vala" +#line 28 "/home/jens/Source/shotwell/src/util/system.vala" g_return_if_fail (uri != NULL); -#line 24 "/home/jens/Source/shotwell/src/util/system.vala" +#line 29 "/home/jens/Source/shotwell/src/util/system.vala" _tmp0_ = screen; -#line 24 "/home/jens/Source/shotwell/src/util/system.vala" +#line 29 "/home/jens/Source/shotwell/src/util/system.vala" _tmp1_ = uri; -#line 24 "/home/jens/Source/shotwell/src/util/system.vala" +#line 29 "/home/jens/Source/shotwell/src/util/system.vala" gtk_show_uri (_tmp0_, _tmp1_, (guint32) GDK_CURRENT_TIME, &_inner_error_); -#line 24 "/home/jens/Source/shotwell/src/util/system.vala" +#line 29 "/home/jens/Source/shotwell/src/util/system.vala" if (G_UNLIKELY (_inner_error_ != NULL)) { -#line 24 "/home/jens/Source/shotwell/src/util/system.vala" +#line 29 "/home/jens/Source/shotwell/src/util/system.vala" g_propagate_error (error, _inner_error_); -#line 24 "/home/jens/Source/shotwell/src/util/system.vala" +#line 29 "/home/jens/Source/shotwell/src/util/system.vala" return; -#line 120 "system.c" +#line 144 "system.c" } } @@ -130,37 +154,37 @@ void show_file_in_nautilus (const gchar* filename, GError** error) { gchar* _tmp5_; gchar* _tmp6_; GError * _inner_error_ = NULL; -#line 27 "/home/jens/Source/shotwell/src/util/system.vala" +#line 32 "/home/jens/Source/shotwell/src/util/system.vala" g_return_if_fail (filename != NULL); -#line 28 "/home/jens/Source/shotwell/src/util/system.vala" +#line 33 "/home/jens/Source/shotwell/src/util/system.vala" _tmp0_ = get_nautilus_install_location (); -#line 28 "/home/jens/Source/shotwell/src/util/system.vala" +#line 33 "/home/jens/Source/shotwell/src/util/system.vala" _tmp1_ = _tmp0_; -#line 28 "/home/jens/Source/shotwell/src/util/system.vala" +#line 33 "/home/jens/Source/shotwell/src/util/system.vala" _tmp2_ = g_strconcat (_tmp1_, " ", NULL); -#line 28 "/home/jens/Source/shotwell/src/util/system.vala" +#line 33 "/home/jens/Source/shotwell/src/util/system.vala" _tmp3_ = _tmp2_; -#line 28 "/home/jens/Source/shotwell/src/util/system.vala" +#line 33 "/home/jens/Source/shotwell/src/util/system.vala" _tmp4_ = filename; -#line 28 "/home/jens/Source/shotwell/src/util/system.vala" +#line 33 "/home/jens/Source/shotwell/src/util/system.vala" _tmp5_ = g_strconcat (_tmp3_, _tmp4_, NULL); -#line 28 "/home/jens/Source/shotwell/src/util/system.vala" +#line 33 "/home/jens/Source/shotwell/src/util/system.vala" _tmp6_ = _tmp5_; -#line 28 "/home/jens/Source/shotwell/src/util/system.vala" +#line 33 "/home/jens/Source/shotwell/src/util/system.vala" g_spawn_command_line_async (_tmp6_, &_inner_error_); -#line 28 "/home/jens/Source/shotwell/src/util/system.vala" +#line 33 "/home/jens/Source/shotwell/src/util/system.vala" _g_free0 (_tmp6_); -#line 28 "/home/jens/Source/shotwell/src/util/system.vala" +#line 33 "/home/jens/Source/shotwell/src/util/system.vala" _g_free0 (_tmp3_); -#line 28 "/home/jens/Source/shotwell/src/util/system.vala" +#line 33 "/home/jens/Source/shotwell/src/util/system.vala" _g_free0 (_tmp1_); -#line 28 "/home/jens/Source/shotwell/src/util/system.vala" +#line 33 "/home/jens/Source/shotwell/src/util/system.vala" if (G_UNLIKELY (_inner_error_ != NULL)) { -#line 28 "/home/jens/Source/shotwell/src/util/system.vala" +#line 33 "/home/jens/Source/shotwell/src/util/system.vala" g_propagate_error (error, _inner_error_); -#line 28 "/home/jens/Source/shotwell/src/util/system.vala" +#line 33 "/home/jens/Source/shotwell/src/util/system.vala" return; -#line 164 "system.c" +#line 188 "system.c" } } diff --git a/src/util/system.vala b/src/util/system.vala index f2436e4..38abf1e 100644 --- a/src/util/system.vala +++ b/src/util/system.vala @@ -10,6 +10,11 @@ File? get_sys_install_dir(File exec_dir) { File child = exec_dir.get_child("ui"); if (!FileUtils.test(child.get_path(), FileTest.IS_DIR | FileTest.EXISTS)) { + // If not, let's see if we are in "src" dir - meson out-of-tree build + if (exec_dir.get_basename() == "src") { + return null; + } + return File.new_for_path(Resources.PREFIX); } |