summaryrefslogtreecommitdiff
path: root/src/util
diff options
context:
space:
mode:
authorJörg Frings-Fürst <debian@jff-webhosting.net>2018-06-25 20:55:59 +0200
committerJörg Frings-Fürst <debian@jff-webhosting.net>2018-06-25 20:55:59 +0200
commitab841afa5cb39058d9ab2cebb67cfe6369443f6e (patch)
tree64961342a79003ee865b3f9f8f41f99f09f37a2e /src/util
parent49120f48474fc8fdc2448c75d961bc238213cfac (diff)
New upstream version 0.28.3upstream/0.28.3
Diffstat (limited to 'src/util')
-rw-r--r--src/util/KeyValueMap.c907
-rw-r--r--src/util/Util.c11
-rw-r--r--src/util/file.c1666
-rw-r--r--src/util/image.c2464
-rw-r--r--src/util/misc.c2047
-rw-r--r--src/util/string.c2168
-rw-r--r--src/util/system.c113
-rw-r--r--src/util/ui.c151
8 files changed, 4352 insertions, 5175 deletions
diff --git a/src/util/KeyValueMap.c b/src/util/KeyValueMap.c
index 210929f..f1405c4 100644
--- a/src/util/KeyValueMap.c
+++ b/src/util/KeyValueMap.c
@@ -1,4 +1,4 @@
-/* KeyValueMap.c generated by valac 0.36.6, the Vala compiler
+/* KeyValueMap.c generated by valac 0.40.4, the Vala compiler
* generated from KeyValueMap.vala, do not modify */
/* Copyright 2016 Software Freedom Conservancy Inc.
@@ -7,6 +7,7 @@
* (version 2.1 or later). See the COPYING file in this distribution.
*/
+
#include <glib.h>
#include <glib-object.h>
#include <stdlib.h>
@@ -63,64 +64,98 @@ static gpointer key_value_map_parent_class = NULL;
gpointer key_value_map_ref (gpointer instance);
void key_value_map_unref (gpointer instance);
-GParamSpec* param_spec_key_value_map (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags);
-void value_set_key_value_map (GValue* value, gpointer v_object);
-void value_take_key_value_map (GValue* value, gpointer v_object);
+GParamSpec* param_spec_key_value_map (const gchar* name,
+ const gchar* nick,
+ const gchar* blurb,
+ GType object_type,
+ GParamFlags flags);
+void value_set_key_value_map (GValue* value,
+ gpointer v_object);
+void value_take_key_value_map (GValue* value,
+ gpointer v_object);
gpointer value_get_key_value_map (const GValue* value);
GType key_value_map_get_type (void) G_GNUC_CONST;
#define KEY_VALUE_MAP_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), TYPE_KEY_VALUE_MAP, KeyValueMapPrivate))
-enum {
- KEY_VALUE_MAP_DUMMY_PROPERTY
-};
KeyValueMap* key_value_map_new (const gchar* group);
-KeyValueMap* key_value_map_construct (GType object_type, const gchar* group);
+KeyValueMap* key_value_map_construct (GType object_type,
+ const gchar* group);
KeyValueMap* key_value_map_copy (KeyValueMap* self);
gchar* key_value_map_get_group (KeyValueMap* self);
GeeSet* key_value_map_get_keys (KeyValueMap* self);
-gboolean key_value_map_has_key (KeyValueMap* self, const gchar* key);
-void key_value_map_set_string (KeyValueMap* self, const gchar* key, const gchar* value);
-void key_value_map_set_int (KeyValueMap* self, const gchar* key, gint value);
-void key_value_map_set_double (KeyValueMap* self, const gchar* key, gdouble value);
-void key_value_map_set_float (KeyValueMap* self, const gchar* key, gfloat value);
-void key_value_map_set_bool (KeyValueMap* self, const gchar* key, gboolean value);
-gchar* key_value_map_get_string (KeyValueMap* self, const gchar* key, const gchar* def);
-gint key_value_map_get_int (KeyValueMap* self, const gchar* key, gint def);
-gdouble key_value_map_get_double (KeyValueMap* self, const gchar* key, gdouble def);
-gfloat key_value_map_get_float (KeyValueMap* self, const gchar* key, gfloat def);
-gboolean key_value_map_get_bool (KeyValueMap* self, const gchar* key, gboolean def);
-void key_value_map_get_point (KeyValueMap* self, const gchar* key, GdkPoint* def, GdkPoint* result);
-void key_value_map_set_point (KeyValueMap* self, const gchar* key, GdkPoint* point);
+gboolean key_value_map_has_key (KeyValueMap* self,
+ const gchar* key);
+void key_value_map_set_string (KeyValueMap* self,
+ const gchar* key,
+ const gchar* value);
+void key_value_map_set_int (KeyValueMap* self,
+ const gchar* key,
+ gint value);
+void key_value_map_set_double (KeyValueMap* self,
+ const gchar* key,
+ gdouble value);
+void key_value_map_set_float (KeyValueMap* self,
+ const gchar* key,
+ gfloat value);
+void key_value_map_set_bool (KeyValueMap* self,
+ const gchar* key,
+ gboolean value);
+gchar* key_value_map_get_string (KeyValueMap* self,
+ const gchar* key,
+ const gchar* def);
+gint key_value_map_get_int (KeyValueMap* self,
+ const gchar* key,
+ gint def);
+gdouble key_value_map_get_double (KeyValueMap* self,
+ const gchar* key,
+ gdouble def);
+gfloat key_value_map_get_float (KeyValueMap* self,
+ const gchar* key,
+ gfloat def);
+gboolean key_value_map_get_bool (KeyValueMap* self,
+ const gchar* key,
+ gboolean def);
+void key_value_map_get_point (KeyValueMap* self,
+ const gchar* key,
+ GdkPoint* def,
+ GdkPoint* result);
+void key_value_map_set_point (KeyValueMap* self,
+ const gchar* key,
+ GdkPoint* point);
static void key_value_map_finalize (KeyValueMap * obj);
-KeyValueMap* key_value_map_construct (GType object_type, const gchar* group) {
+KeyValueMap*
+key_value_map_construct (GType object_type,
+ const gchar* group)
+{
KeyValueMap* self = NULL;
- const gchar* _tmp0_;
- gchar* _tmp1_;
+ gchar* _tmp0_;
#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;
-#line 12 "/home/jens/Source/shotwell/src/util/KeyValueMap.vala"
- _tmp1_ = g_strdup (_tmp0_);
+ _tmp0_ = g_strdup (group);
#line 12 "/home/jens/Source/shotwell/src/util/KeyValueMap.vala"
_g_free0 (self->priv->group);
#line 12 "/home/jens/Source/shotwell/src/util/KeyValueMap.vala"
- self->priv->group = _tmp1_;
+ self->priv->group = _tmp0_;
#line 11 "/home/jens/Source/shotwell/src/util/KeyValueMap.vala"
return self;
-#line 113 "KeyValueMap.c"
+#line 144 "KeyValueMap.c"
}
-KeyValueMap* key_value_map_new (const gchar* group) {
+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 120 "KeyValueMap.c"
+#line 153 "KeyValueMap.c"
}
-KeyValueMap* key_value_map_copy (KeyValueMap* self) {
+KeyValueMap*
+key_value_map_copy (KeyValueMap* self)
+{
KeyValueMap* result = NULL;
KeyValueMap* clone = NULL;
const gchar* _tmp0_;
@@ -131,7 +166,7 @@ KeyValueMap* key_value_map_copy (KeyValueMap* self) {
_tmp1_ = key_value_map_new (_tmp0_);
#line 16 "/home/jens/Source/shotwell/src/util/KeyValueMap.vala"
clone = _tmp1_;
-#line 135 "KeyValueMap.c"
+#line 170 "KeyValueMap.c"
{
GeeIterator* _key_it = NULL;
GeeHashMap* _tmp2_;
@@ -158,70 +193,69 @@ KeyValueMap* key_value_map_copy (KeyValueMap* self) {
_key_it = _tmp7_;
#line 17 "/home/jens/Source/shotwell/src/util/KeyValueMap.vala"
while (TRUE) {
-#line 162 "KeyValueMap.c"
+#line 197 "KeyValueMap.c"
GeeIterator* _tmp8_;
- gboolean _tmp9_;
gchar* key = NULL;
- GeeIterator* _tmp10_;
- gpointer _tmp11_;
- KeyValueMap* _tmp12_;
- GeeHashMap* _tmp13_;
- const gchar* _tmp14_;
- GeeHashMap* _tmp15_;
- const gchar* _tmp16_;
- gpointer _tmp17_;
- gchar* _tmp18_;
+ GeeIterator* _tmp9_;
+ gpointer _tmp10_;
+ KeyValueMap* _tmp11_;
+ GeeHashMap* _tmp12_;
+ const gchar* _tmp13_;
+ GeeHashMap* _tmp14_;
+ const gchar* _tmp15_;
+ gpointer _tmp16_;
+ gchar* _tmp17_;
#line 17 "/home/jens/Source/shotwell/src/util/KeyValueMap.vala"
_tmp8_ = _key_it;
#line 17 "/home/jens/Source/shotwell/src/util/KeyValueMap.vala"
- _tmp9_ = gee_iterator_next (_tmp8_);
-#line 17 "/home/jens/Source/shotwell/src/util/KeyValueMap.vala"
- if (!_tmp9_) {
+ if (!gee_iterator_next (_tmp8_)) {
#line 17 "/home/jens/Source/shotwell/src/util/KeyValueMap.vala"
break;
-#line 183 "KeyValueMap.c"
+#line 215 "KeyValueMap.c"
}
#line 17 "/home/jens/Source/shotwell/src/util/KeyValueMap.vala"
- _tmp10_ = _key_it;
+ _tmp9_ = _key_it;
#line 17 "/home/jens/Source/shotwell/src/util/KeyValueMap.vala"
- _tmp11_ = gee_iterator_get (_tmp10_);
+ _tmp10_ = gee_iterator_get (_tmp9_);
#line 17 "/home/jens/Source/shotwell/src/util/KeyValueMap.vala"
- key = (gchar*) _tmp11_;
+ key = (gchar*) _tmp10_;
#line 18 "/home/jens/Source/shotwell/src/util/KeyValueMap.vala"
- _tmp12_ = clone;
+ _tmp11_ = clone;
#line 18 "/home/jens/Source/shotwell/src/util/KeyValueMap.vala"
- _tmp13_ = _tmp12_->priv->map;
+ _tmp12_ = _tmp11_->priv->map;
#line 18 "/home/jens/Source/shotwell/src/util/KeyValueMap.vala"
- _tmp14_ = key;
+ _tmp13_ = key;
#line 18 "/home/jens/Source/shotwell/src/util/KeyValueMap.vala"
- _tmp15_ = self->priv->map;
+ _tmp14_ = self->priv->map;
#line 18 "/home/jens/Source/shotwell/src/util/KeyValueMap.vala"
- _tmp16_ = key;
+ _tmp15_ = key;
#line 18 "/home/jens/Source/shotwell/src/util/KeyValueMap.vala"
- _tmp17_ = gee_abstract_map_get (G_TYPE_CHECK_INSTANCE_CAST (_tmp15_, GEE_TYPE_ABSTRACT_MAP, GeeAbstractMap), _tmp16_);
+ _tmp16_ = gee_abstract_map_get (G_TYPE_CHECK_INSTANCE_CAST (_tmp14_, GEE_TYPE_ABSTRACT_MAP, GeeAbstractMap), _tmp15_);
#line 18 "/home/jens/Source/shotwell/src/util/KeyValueMap.vala"
- _tmp18_ = (gchar*) _tmp17_;
+ _tmp17_ = (gchar*) _tmp16_;
#line 18 "/home/jens/Source/shotwell/src/util/KeyValueMap.vala"
- gee_abstract_map_set (G_TYPE_CHECK_INSTANCE_CAST (_tmp13_, GEE_TYPE_ABSTRACT_MAP, GeeAbstractMap), _tmp14_, _tmp18_);
+ gee_abstract_map_set (G_TYPE_CHECK_INSTANCE_CAST (_tmp12_, GEE_TYPE_ABSTRACT_MAP, GeeAbstractMap), _tmp13_, _tmp17_);
#line 18 "/home/jens/Source/shotwell/src/util/KeyValueMap.vala"
- _g_free0 (_tmp18_);
+ _g_free0 (_tmp17_);
#line 17 "/home/jens/Source/shotwell/src/util/KeyValueMap.vala"
_g_free0 (key);
-#line 211 "KeyValueMap.c"
+#line 243 "KeyValueMap.c"
}
#line 17 "/home/jens/Source/shotwell/src/util/KeyValueMap.vala"
_g_object_unref0 (_key_it);
-#line 215 "KeyValueMap.c"
+#line 247 "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 221 "KeyValueMap.c"
+#line 253 "KeyValueMap.c"
}
-gchar* key_value_map_get_group (KeyValueMap* self) {
+gchar*
+key_value_map_get_group (KeyValueMap* self)
+{
gchar* result = NULL;
const gchar* _tmp0_;
gchar* _tmp1_;
@@ -233,11 +267,13 @@ gchar* key_value_map_get_group (KeyValueMap* self) {
result = _tmp1_;
#line 24 "/home/jens/Source/shotwell/src/util/KeyValueMap.vala"
return result;
-#line 237 "KeyValueMap.c"
+#line 271 "KeyValueMap.c"
}
-GeeSet* key_value_map_get_keys (KeyValueMap* self) {
+GeeSet*
+key_value_map_get_keys (KeyValueMap* self)
+{
GeeSet* result = NULL;
GeeHashMap* _tmp0_;
GeeSet* _tmp1_;
@@ -252,80 +288,69 @@ GeeSet* key_value_map_get_keys (KeyValueMap* self) {
result = _tmp2_;
#line 28 "/home/jens/Source/shotwell/src/util/KeyValueMap.vala"
return result;
-#line 256 "KeyValueMap.c"
+#line 292 "KeyValueMap.c"
}
-gboolean key_value_map_has_key (KeyValueMap* self, const gchar* key) {
+gboolean
+key_value_map_has_key (KeyValueMap* self,
+ const gchar* key)
+{
gboolean result = FALSE;
GeeHashMap* _tmp0_;
- const gchar* _tmp1_;
- gboolean _tmp2_;
#line 32 "/home/jens/Source/shotwell/src/util/KeyValueMap.vala"
_tmp0_ = self->priv->map;
#line 32 "/home/jens/Source/shotwell/src/util/KeyValueMap.vala"
- _tmp1_ = key;
-#line 32 "/home/jens/Source/shotwell/src/util/KeyValueMap.vala"
- _tmp2_ = gee_abstract_map_has_key (G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, GEE_TYPE_ABSTRACT_MAP, GeeAbstractMap), _tmp1_);
-#line 32 "/home/jens/Source/shotwell/src/util/KeyValueMap.vala"
- result = _tmp2_;
+ result = gee_abstract_map_has_key (G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, GEE_TYPE_ABSTRACT_MAP, GeeAbstractMap), key);
#line 32 "/home/jens/Source/shotwell/src/util/KeyValueMap.vala"
return result;
-#line 275 "KeyValueMap.c"
+#line 308 "KeyValueMap.c"
}
-void key_value_map_set_string (KeyValueMap* self, const gchar* key, const gchar* value) {
- const gchar* _tmp0_;
- GeeHashMap* _tmp1_;
- const gchar* _tmp2_;
- const gchar* _tmp3_;
-#line 36 "/home/jens/Source/shotwell/src/util/KeyValueMap.vala"
- _tmp0_ = key;
+void
+key_value_map_set_string (KeyValueMap* self,
+ const gchar* key,
+ const gchar* value)
+{
+ GeeHashMap* _tmp0_;
#line 36 "/home/jens/Source/shotwell/src/util/KeyValueMap.vala"
- _vala_assert (_tmp0_ != NULL, "key != null");
-#line 38 "/home/jens/Source/shotwell/src/util/KeyValueMap.vala"
- _tmp1_ = self->priv->map;
+ _vala_assert (key != NULL, "key != null");
#line 38 "/home/jens/Source/shotwell/src/util/KeyValueMap.vala"
- _tmp2_ = key;
-#line 38 "/home/jens/Source/shotwell/src/util/KeyValueMap.vala"
- _tmp3_ = value;
+ _tmp0_ = self->priv->map;
#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 296 "KeyValueMap.c"
+ gee_abstract_map_set (G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, GEE_TYPE_ABSTRACT_MAP, GeeAbstractMap), key, value);
+#line 324 "KeyValueMap.c"
}
-void key_value_map_set_int (KeyValueMap* self, const gchar* key, gint value) {
- const gchar* _tmp0_;
- GeeHashMap* _tmp1_;
- const gchar* _tmp2_;
- gint _tmp3_;
- gchar* _tmp4_;
- gchar* _tmp5_;
-#line 42 "/home/jens/Source/shotwell/src/util/KeyValueMap.vala"
- _tmp0_ = key;
+void
+key_value_map_set_int (KeyValueMap* self,
+ const gchar* key,
+ gint value)
+{
+ GeeHashMap* _tmp0_;
+ gchar* _tmp1_;
+ gchar* _tmp2_;
#line 42 "/home/jens/Source/shotwell/src/util/KeyValueMap.vala"
- _vala_assert (_tmp0_ != NULL, "key != null");
+ _vala_assert (key != NULL, "key != null");
#line 44 "/home/jens/Source/shotwell/src/util/KeyValueMap.vala"
- _tmp1_ = self->priv->map;
-#line 44 "/home/jens/Source/shotwell/src/util/KeyValueMap.vala"
- _tmp2_ = key;
-#line 44 "/home/jens/Source/shotwell/src/util/KeyValueMap.vala"
- _tmp3_ = value;
+ _tmp0_ = self->priv->map;
#line 44 "/home/jens/Source/shotwell/src/util/KeyValueMap.vala"
- _tmp4_ = g_strdup_printf ("%i", _tmp3_);
+ _tmp1_ = g_strdup_printf ("%i", value);
#line 44 "/home/jens/Source/shotwell/src/util/KeyValueMap.vala"
- _tmp5_ = _tmp4_;
+ _tmp2_ = _tmp1_;
#line 44 "/home/jens/Source/shotwell/src/util/KeyValueMap.vala"
- gee_abstract_map_set (G_TYPE_CHECK_INSTANCE_CAST (_tmp1_, GEE_TYPE_ABSTRACT_MAP, GeeAbstractMap), _tmp2_, _tmp5_);
+ gee_abstract_map_set (G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, GEE_TYPE_ABSTRACT_MAP, GeeAbstractMap), key, _tmp2_);
#line 44 "/home/jens/Source/shotwell/src/util/KeyValueMap.vala"
- _g_free0 (_tmp5_);
-#line 325 "KeyValueMap.c"
+ _g_free0 (_tmp2_);
+#line 348 "KeyValueMap.c"
}
-static gchar* double_to_string (gdouble self) {
+static gchar*
+double_to_string (gdouble self)
+{
gchar* result = NULL;
gchar* _tmp0_;
gchar* _tmp1_;
@@ -333,620 +358,608 @@ static gchar* double_to_string (gdouble self) {
const gchar* _tmp2_;
gchar* _tmp3_;
gchar* _tmp4_;
-#line 871 "/usr/share/vala-0.36/vapi/glib-2.0.vapi"
+#line 883 "/usr/share/vala-0.40/vapi/glib-2.0.vapi"
_tmp0_ = g_new0 (gchar, G_ASCII_DTOSTR_BUF_SIZE);
-#line 871 "/usr/share/vala-0.36/vapi/glib-2.0.vapi"
+#line 883 "/usr/share/vala-0.40/vapi/glib-2.0.vapi"
_tmp1_ = _tmp0_;
-#line 871 "/usr/share/vala-0.36/vapi/glib-2.0.vapi"
+#line 883 "/usr/share/vala-0.40/vapi/glib-2.0.vapi"
_tmp1__length1 = G_ASCII_DTOSTR_BUF_SIZE;
-#line 871 "/usr/share/vala-0.36/vapi/glib-2.0.vapi"
+#line 883 "/usr/share/vala-0.40/vapi/glib-2.0.vapi"
_tmp2_ = g_ascii_dtostr (_tmp1_, G_ASCII_DTOSTR_BUF_SIZE, self);
-#line 871 "/usr/share/vala-0.36/vapi/glib-2.0.vapi"
+#line 883 "/usr/share/vala-0.40/vapi/glib-2.0.vapi"
_tmp3_ = g_strdup (_tmp2_);
-#line 871 "/usr/share/vala-0.36/vapi/glib-2.0.vapi"
+#line 883 "/usr/share/vala-0.40/vapi/glib-2.0.vapi"
_tmp4_ = _tmp3_;
-#line 871 "/usr/share/vala-0.36/vapi/glib-2.0.vapi"
+#line 883 "/usr/share/vala-0.40/vapi/glib-2.0.vapi"
_tmp1_ = (g_free (_tmp1_), NULL);
-#line 871 "/usr/share/vala-0.36/vapi/glib-2.0.vapi"
+#line 883 "/usr/share/vala-0.40/vapi/glib-2.0.vapi"
result = _tmp4_;
-#line 871 "/usr/share/vala-0.36/vapi/glib-2.0.vapi"
+#line 883 "/usr/share/vala-0.40/vapi/glib-2.0.vapi"
return result;
-#line 355 "KeyValueMap.c"
+#line 380 "KeyValueMap.c"
}
-void key_value_map_set_double (KeyValueMap* self, const gchar* key, gdouble value) {
- const gchar* _tmp0_;
- GeeHashMap* _tmp1_;
- const gchar* _tmp2_;
- gdouble _tmp3_;
- gchar* _tmp4_;
- gchar* _tmp5_;
-#line 48 "/home/jens/Source/shotwell/src/util/KeyValueMap.vala"
- _tmp0_ = key;
+void
+key_value_map_set_double (KeyValueMap* self,
+ const gchar* key,
+ gdouble value)
+{
+ GeeHashMap* _tmp0_;
+ gchar* _tmp1_;
+ gchar* _tmp2_;
#line 48 "/home/jens/Source/shotwell/src/util/KeyValueMap.vala"
- _vala_assert (_tmp0_ != NULL, "key != null");
-#line 50 "/home/jens/Source/shotwell/src/util/KeyValueMap.vala"
- _tmp1_ = self->priv->map;
+ _vala_assert (key != NULL, "key != null");
#line 50 "/home/jens/Source/shotwell/src/util/KeyValueMap.vala"
- _tmp2_ = key;
-#line 50 "/home/jens/Source/shotwell/src/util/KeyValueMap.vala"
- _tmp3_ = value;
+ _tmp0_ = self->priv->map;
#line 50 "/home/jens/Source/shotwell/src/util/KeyValueMap.vala"
- _tmp4_ = double_to_string (_tmp3_);
+ _tmp1_ = double_to_string (value);
#line 50 "/home/jens/Source/shotwell/src/util/KeyValueMap.vala"
- _tmp5_ = _tmp4_;
+ _tmp2_ = _tmp1_;
#line 50 "/home/jens/Source/shotwell/src/util/KeyValueMap.vala"
- gee_abstract_map_set (G_TYPE_CHECK_INSTANCE_CAST (_tmp1_, GEE_TYPE_ABSTRACT_MAP, GeeAbstractMap), _tmp2_, _tmp5_);
+ gee_abstract_map_set (G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, GEE_TYPE_ABSTRACT_MAP, GeeAbstractMap), key, _tmp2_);
#line 50 "/home/jens/Source/shotwell/src/util/KeyValueMap.vala"
- _g_free0 (_tmp5_);
-#line 384 "KeyValueMap.c"
+ _g_free0 (_tmp2_);
+#line 404 "KeyValueMap.c"
}
-void key_value_map_set_float (KeyValueMap* self, const gchar* key, gfloat value) {
- const gchar* _tmp0_;
- GeeHashMap* _tmp1_;
- const gchar* _tmp2_;
- gfloat _tmp3_;
- gchar* _tmp4_;
- gchar* _tmp5_;
-#line 54 "/home/jens/Source/shotwell/src/util/KeyValueMap.vala"
- _tmp0_ = key;
+void
+key_value_map_set_float (KeyValueMap* self,
+ const gchar* key,
+ gfloat value)
+{
+ GeeHashMap* _tmp0_;
+ gchar* _tmp1_;
+ gchar* _tmp2_;
#line 54 "/home/jens/Source/shotwell/src/util/KeyValueMap.vala"
- _vala_assert (_tmp0_ != NULL, "key != null");
-#line 56 "/home/jens/Source/shotwell/src/util/KeyValueMap.vala"
- _tmp1_ = self->priv->map;
+ _vala_assert (key != NULL, "key != null");
#line 56 "/home/jens/Source/shotwell/src/util/KeyValueMap.vala"
- _tmp2_ = key;
-#line 56 "/home/jens/Source/shotwell/src/util/KeyValueMap.vala"
- _tmp3_ = value;
+ _tmp0_ = self->priv->map;
#line 56 "/home/jens/Source/shotwell/src/util/KeyValueMap.vala"
- _tmp4_ = g_strdup_printf ("%g", _tmp3_);
+ _tmp1_ = g_strdup_printf ("%g", value);
#line 56 "/home/jens/Source/shotwell/src/util/KeyValueMap.vala"
- _tmp5_ = _tmp4_;
+ _tmp2_ = _tmp1_;
#line 56 "/home/jens/Source/shotwell/src/util/KeyValueMap.vala"
- gee_abstract_map_set (G_TYPE_CHECK_INSTANCE_CAST (_tmp1_, GEE_TYPE_ABSTRACT_MAP, GeeAbstractMap), _tmp2_, _tmp5_);
+ gee_abstract_map_set (G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, GEE_TYPE_ABSTRACT_MAP, GeeAbstractMap), key, _tmp2_);
#line 56 "/home/jens/Source/shotwell/src/util/KeyValueMap.vala"
- _g_free0 (_tmp5_);
-#line 413 "KeyValueMap.c"
+ _g_free0 (_tmp2_);
+#line 428 "KeyValueMap.c"
}
-static gchar* bool_to_string (gboolean self) {
+static gchar*
+bool_to_string (gboolean self)
+{
gchar* result = NULL;
-#line 37 "/usr/share/vala-0.36/vapi/glib-2.0.vapi"
+#line 37 "/usr/share/vala-0.40/vapi/glib-2.0.vapi"
if (self) {
-#line 421 "KeyValueMap.c"
+#line 438 "KeyValueMap.c"
gchar* _tmp0_;
-#line 38 "/usr/share/vala-0.36/vapi/glib-2.0.vapi"
+#line 38 "/usr/share/vala-0.40/vapi/glib-2.0.vapi"
_tmp0_ = g_strdup ("true");
-#line 38 "/usr/share/vala-0.36/vapi/glib-2.0.vapi"
+#line 38 "/usr/share/vala-0.40/vapi/glib-2.0.vapi"
result = _tmp0_;
-#line 38 "/usr/share/vala-0.36/vapi/glib-2.0.vapi"
+#line 38 "/usr/share/vala-0.40/vapi/glib-2.0.vapi"
return result;
-#line 429 "KeyValueMap.c"
+#line 446 "KeyValueMap.c"
} else {
gchar* _tmp1_;
-#line 40 "/usr/share/vala-0.36/vapi/glib-2.0.vapi"
+#line 40 "/usr/share/vala-0.40/vapi/glib-2.0.vapi"
_tmp1_ = g_strdup ("false");
-#line 40 "/usr/share/vala-0.36/vapi/glib-2.0.vapi"
+#line 40 "/usr/share/vala-0.40/vapi/glib-2.0.vapi"
result = _tmp1_;
-#line 40 "/usr/share/vala-0.36/vapi/glib-2.0.vapi"
+#line 40 "/usr/share/vala-0.40/vapi/glib-2.0.vapi"
return result;
-#line 438 "KeyValueMap.c"
+#line 455 "KeyValueMap.c"
}
}
-void key_value_map_set_bool (KeyValueMap* self, const gchar* key, gboolean value) {
- const gchar* _tmp0_;
- GeeHashMap* _tmp1_;
- const gchar* _tmp2_;
- gboolean _tmp3_;
- gchar* _tmp4_;
- gchar* _tmp5_;
-#line 60 "/home/jens/Source/shotwell/src/util/KeyValueMap.vala"
- _tmp0_ = key;
+void
+key_value_map_set_bool (KeyValueMap* self,
+ const gchar* key,
+ gboolean value)
+{
+ GeeHashMap* _tmp0_;
+ gchar* _tmp1_;
+ gchar* _tmp2_;
#line 60 "/home/jens/Source/shotwell/src/util/KeyValueMap.vala"
- _vala_assert (_tmp0_ != NULL, "key != null");
-#line 62 "/home/jens/Source/shotwell/src/util/KeyValueMap.vala"
- _tmp1_ = self->priv->map;
-#line 62 "/home/jens/Source/shotwell/src/util/KeyValueMap.vala"
- _tmp2_ = key;
+ _vala_assert (key != NULL, "key != null");
#line 62 "/home/jens/Source/shotwell/src/util/KeyValueMap.vala"
- _tmp3_ = value;
+ _tmp0_ = self->priv->map;
#line 62 "/home/jens/Source/shotwell/src/util/KeyValueMap.vala"
- _tmp4_ = bool_to_string (_tmp3_);
+ _tmp1_ = bool_to_string (value);
#line 62 "/home/jens/Source/shotwell/src/util/KeyValueMap.vala"
- _tmp5_ = _tmp4_;
+ _tmp2_ = _tmp1_;
#line 62 "/home/jens/Source/shotwell/src/util/KeyValueMap.vala"
- gee_abstract_map_set (G_TYPE_CHECK_INSTANCE_CAST (_tmp1_, GEE_TYPE_ABSTRACT_MAP, GeeAbstractMap), _tmp2_, _tmp5_);
+ gee_abstract_map_set (G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, GEE_TYPE_ABSTRACT_MAP, GeeAbstractMap), key, _tmp2_);
#line 62 "/home/jens/Source/shotwell/src/util/KeyValueMap.vala"
- _g_free0 (_tmp5_);
-#line 468 "KeyValueMap.c"
+ _g_free0 (_tmp2_);
+#line 480 "KeyValueMap.c"
}
-gchar* key_value_map_get_string (KeyValueMap* self, const gchar* key, const gchar* def) {
+gchar*
+key_value_map_get_string (KeyValueMap* self,
+ const gchar* key,
+ const gchar* def)
+{
gchar* result = NULL;
gchar* value = NULL;
GeeHashMap* _tmp0_;
- const gchar* _tmp1_;
- gpointer _tmp2_;
- const gchar* _tmp3_ = NULL;
- const gchar* _tmp4_;
- gchar* _tmp7_;
+ gpointer _tmp1_;
+ const gchar* _tmp2_ = NULL;
+ const gchar* _tmp3_;
+ gchar* _tmp5_;
#line 66 "/home/jens/Source/shotwell/src/util/KeyValueMap.vala"
_tmp0_ = self->priv->map;
#line 66 "/home/jens/Source/shotwell/src/util/KeyValueMap.vala"
- _tmp1_ = key;
-#line 66 "/home/jens/Source/shotwell/src/util/KeyValueMap.vala"
- _tmp2_ = gee_abstract_map_get (G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, GEE_TYPE_ABSTRACT_MAP, GeeAbstractMap), _tmp1_);
+ _tmp1_ = gee_abstract_map_get (G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, GEE_TYPE_ABSTRACT_MAP, GeeAbstractMap), key);
#line 66 "/home/jens/Source/shotwell/src/util/KeyValueMap.vala"
- value = (gchar*) _tmp2_;
+ value = (gchar*) _tmp1_;
#line 68 "/home/jens/Source/shotwell/src/util/KeyValueMap.vala"
- _tmp4_ = value;
+ _tmp3_ = value;
#line 68 "/home/jens/Source/shotwell/src/util/KeyValueMap.vala"
- if (_tmp4_ != NULL) {
-#line 493 "KeyValueMap.c"
- const gchar* _tmp5_;
+ if (_tmp3_ != NULL) {
+#line 506 "KeyValueMap.c"
+ const gchar* _tmp4_;
#line 68 "/home/jens/Source/shotwell/src/util/KeyValueMap.vala"
- _tmp5_ = value;
+ _tmp4_ = value;
#line 68 "/home/jens/Source/shotwell/src/util/KeyValueMap.vala"
- _tmp3_ = _tmp5_;
-#line 499 "KeyValueMap.c"
+ _tmp2_ = _tmp4_;
+#line 512 "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 506 "KeyValueMap.c"
+ _tmp2_ = def;
+#line 516 "KeyValueMap.c"
}
#line 68 "/home/jens/Source/shotwell/src/util/KeyValueMap.vala"
- _tmp7_ = g_strdup (_tmp3_);
+ _tmp5_ = g_strdup (_tmp2_);
#line 68 "/home/jens/Source/shotwell/src/util/KeyValueMap.vala"
- result = _tmp7_;
+ result = _tmp5_;
#line 68 "/home/jens/Source/shotwell/src/util/KeyValueMap.vala"
_g_free0 (value);
#line 68 "/home/jens/Source/shotwell/src/util/KeyValueMap.vala"
return result;
-#line 516 "KeyValueMap.c"
+#line 526 "KeyValueMap.c"
}
-gint key_value_map_get_int (KeyValueMap* self, const gchar* key, gint def) {
+gint
+key_value_map_get_int (KeyValueMap* self,
+ const gchar* key,
+ gint def)
+{
gint result = 0;
gchar* value = NULL;
GeeHashMap* _tmp0_;
- const gchar* _tmp1_;
- gpointer _tmp2_;
- gint _tmp3_ = 0;
- const gchar* _tmp4_;
+ gpointer _tmp1_;
+ gint _tmp2_ = 0;
+ const gchar* _tmp3_;
#line 72 "/home/jens/Source/shotwell/src/util/KeyValueMap.vala"
_tmp0_ = self->priv->map;
#line 72 "/home/jens/Source/shotwell/src/util/KeyValueMap.vala"
- _tmp1_ = key;
-#line 72 "/home/jens/Source/shotwell/src/util/KeyValueMap.vala"
- _tmp2_ = gee_abstract_map_get (G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, GEE_TYPE_ABSTRACT_MAP, GeeAbstractMap), _tmp1_);
+ _tmp1_ = gee_abstract_map_get (G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, GEE_TYPE_ABSTRACT_MAP, GeeAbstractMap), key);
#line 72 "/home/jens/Source/shotwell/src/util/KeyValueMap.vala"
- value = (gchar*) _tmp2_;
+ value = (gchar*) _tmp1_;
#line 74 "/home/jens/Source/shotwell/src/util/KeyValueMap.vala"
- _tmp4_ = value;
-#line 74 "/home/jens/Source/shotwell/src/util/KeyValueMap.vala"
- if (_tmp4_ != NULL) {
-#line 540 "KeyValueMap.c"
- const gchar* _tmp5_;
- gint _tmp6_;
+ _tmp3_ = value;
#line 74 "/home/jens/Source/shotwell/src/util/KeyValueMap.vala"
- _tmp5_ = value;
+ if (_tmp3_ != NULL) {
+#line 551 "KeyValueMap.c"
+ const gchar* _tmp4_;
#line 74 "/home/jens/Source/shotwell/src/util/KeyValueMap.vala"
- _tmp6_ = atoi (_tmp5_);
+ _tmp4_ = value;
#line 74 "/home/jens/Source/shotwell/src/util/KeyValueMap.vala"
- _tmp3_ = _tmp6_;
-#line 549 "KeyValueMap.c"
+ _tmp2_ = atoi (_tmp4_);
+#line 557 "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 556 "KeyValueMap.c"
+ _tmp2_ = def;
+#line 561 "KeyValueMap.c"
}
#line 74 "/home/jens/Source/shotwell/src/util/KeyValueMap.vala"
- result = _tmp3_;
+ result = _tmp2_;
#line 74 "/home/jens/Source/shotwell/src/util/KeyValueMap.vala"
_g_free0 (value);
#line 74 "/home/jens/Source/shotwell/src/util/KeyValueMap.vala"
return result;
-#line 564 "KeyValueMap.c"
+#line 569 "KeyValueMap.c"
}
-static gdouble double_parse (const gchar* str) {
+static gdouble
+double_parse (const gchar* str)
+{
gdouble result = 0.0;
- const gchar* _tmp0_;
- gdouble _tmp1_;
-#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"
- _tmp1_ = g_ascii_strtod (_tmp0_, NULL);
-#line 878 "/usr/share/vala-0.36/vapi/glib-2.0.vapi"
- result = _tmp1_;
-#line 878 "/usr/share/vala-0.36/vapi/glib-2.0.vapi"
+ gdouble _tmp0_;
+#line 890 "/usr/share/vala-0.40/vapi/glib-2.0.vapi"
+ _tmp0_ = g_ascii_strtod (str, NULL);
+#line 890 "/usr/share/vala-0.40/vapi/glib-2.0.vapi"
+ result = _tmp0_;
+#line 890 "/usr/share/vala-0.40/vapi/glib-2.0.vapi"
return result;
-#line 580 "KeyValueMap.c"
+#line 584 "KeyValueMap.c"
}
-gdouble key_value_map_get_double (KeyValueMap* self, const gchar* key, gdouble def) {
+gdouble
+key_value_map_get_double (KeyValueMap* self,
+ const gchar* key,
+ gdouble def)
+{
gdouble result = 0.0;
gchar* value = NULL;
GeeHashMap* _tmp0_;
- const gchar* _tmp1_;
- gpointer _tmp2_;
- gdouble _tmp3_ = 0.0;
- const gchar* _tmp4_;
+ gpointer _tmp1_;
+ gdouble _tmp2_ = 0.0;
+ const gchar* _tmp3_;
#line 78 "/home/jens/Source/shotwell/src/util/KeyValueMap.vala"
_tmp0_ = self->priv->map;
#line 78 "/home/jens/Source/shotwell/src/util/KeyValueMap.vala"
- _tmp1_ = key;
-#line 78 "/home/jens/Source/shotwell/src/util/KeyValueMap.vala"
- _tmp2_ = gee_abstract_map_get (G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, GEE_TYPE_ABSTRACT_MAP, GeeAbstractMap), _tmp1_);
+ _tmp1_ = gee_abstract_map_get (G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, GEE_TYPE_ABSTRACT_MAP, GeeAbstractMap), key);
#line 78 "/home/jens/Source/shotwell/src/util/KeyValueMap.vala"
- value = (gchar*) _tmp2_;
+ value = (gchar*) _tmp1_;
#line 80 "/home/jens/Source/shotwell/src/util/KeyValueMap.vala"
- _tmp4_ = value;
-#line 80 "/home/jens/Source/shotwell/src/util/KeyValueMap.vala"
- if (_tmp4_ != NULL) {
-#line 604 "KeyValueMap.c"
- const gchar* _tmp5_;
- gdouble _tmp6_;
+ _tmp3_ = value;
#line 80 "/home/jens/Source/shotwell/src/util/KeyValueMap.vala"
- _tmp5_ = value;
+ if (_tmp3_ != NULL) {
+#line 609 "KeyValueMap.c"
+ const gchar* _tmp4_;
#line 80 "/home/jens/Source/shotwell/src/util/KeyValueMap.vala"
- _tmp6_ = double_parse (_tmp5_);
+ _tmp4_ = value;
#line 80 "/home/jens/Source/shotwell/src/util/KeyValueMap.vala"
- _tmp3_ = _tmp6_;
-#line 613 "KeyValueMap.c"
+ _tmp2_ = double_parse (_tmp4_);
+#line 615 "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 620 "KeyValueMap.c"
+ _tmp2_ = def;
+#line 619 "KeyValueMap.c"
}
#line 80 "/home/jens/Source/shotwell/src/util/KeyValueMap.vala"
- result = _tmp3_;
+ result = _tmp2_;
#line 80 "/home/jens/Source/shotwell/src/util/KeyValueMap.vala"
_g_free0 (value);
#line 80 "/home/jens/Source/shotwell/src/util/KeyValueMap.vala"
return result;
-#line 628 "KeyValueMap.c"
+#line 627 "KeyValueMap.c"
}
-gfloat key_value_map_get_float (KeyValueMap* self, const gchar* key, gfloat def) {
+gfloat
+key_value_map_get_float (KeyValueMap* self,
+ const gchar* key,
+ gfloat def)
+{
gfloat result = 0.0F;
gchar* value = NULL;
GeeHashMap* _tmp0_;
- const gchar* _tmp1_;
- gpointer _tmp2_;
- gfloat _tmp3_ = 0.0F;
- const gchar* _tmp4_;
+ gpointer _tmp1_;
+ gfloat _tmp2_ = 0.0F;
+ const gchar* _tmp3_;
#line 84 "/home/jens/Source/shotwell/src/util/KeyValueMap.vala"
_tmp0_ = self->priv->map;
#line 84 "/home/jens/Source/shotwell/src/util/KeyValueMap.vala"
- _tmp1_ = key;
-#line 84 "/home/jens/Source/shotwell/src/util/KeyValueMap.vala"
- _tmp2_ = gee_abstract_map_get (G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, GEE_TYPE_ABSTRACT_MAP, GeeAbstractMap), _tmp1_);
+ _tmp1_ = gee_abstract_map_get (G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, GEE_TYPE_ABSTRACT_MAP, GeeAbstractMap), key);
#line 84 "/home/jens/Source/shotwell/src/util/KeyValueMap.vala"
- value = (gchar*) _tmp2_;
+ value = (gchar*) _tmp1_;
#line 86 "/home/jens/Source/shotwell/src/util/KeyValueMap.vala"
- _tmp4_ = value;
+ _tmp3_ = value;
#line 86 "/home/jens/Source/shotwell/src/util/KeyValueMap.vala"
- if (_tmp4_ != NULL) {
+ if (_tmp3_ != NULL) {
#line 652 "KeyValueMap.c"
- const gchar* _tmp5_;
- gdouble _tmp6_;
-#line 86 "/home/jens/Source/shotwell/src/util/KeyValueMap.vala"
- _tmp5_ = value;
+ const gchar* _tmp4_;
#line 86 "/home/jens/Source/shotwell/src/util/KeyValueMap.vala"
- _tmp6_ = double_parse (_tmp5_);
+ _tmp4_ = value;
#line 86 "/home/jens/Source/shotwell/src/util/KeyValueMap.vala"
- _tmp3_ = (gfloat) _tmp6_;
-#line 661 "KeyValueMap.c"
+ _tmp2_ = (gfloat) double_parse (_tmp4_);
+#line 658 "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 668 "KeyValueMap.c"
+ _tmp2_ = def;
+#line 662 "KeyValueMap.c"
}
#line 86 "/home/jens/Source/shotwell/src/util/KeyValueMap.vala"
- result = _tmp3_;
+ result = _tmp2_;
#line 86 "/home/jens/Source/shotwell/src/util/KeyValueMap.vala"
_g_free0 (value);
#line 86 "/home/jens/Source/shotwell/src/util/KeyValueMap.vala"
return result;
-#line 676 "KeyValueMap.c"
+#line 670 "KeyValueMap.c"
}
-static gboolean bool_parse (const gchar* str) {
+static gboolean
+bool_parse (const gchar* str)
+{
gboolean result = FALSE;
- const gchar* _tmp0_;
-#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"
- if (g_strcmp0 (_tmp0_, "true") == 0) {
-#line 46 "/usr/share/vala-0.36/vapi/glib-2.0.vapi"
+#line 45 "/usr/share/vala-0.40/vapi/glib-2.0.vapi"
+ if (g_strcmp0 (str, "true") == 0) {
+#line 46 "/usr/share/vala-0.40/vapi/glib-2.0.vapi"
result = TRUE;
-#line 46 "/usr/share/vala-0.36/vapi/glib-2.0.vapi"
+#line 46 "/usr/share/vala-0.40/vapi/glib-2.0.vapi"
return result;
-#line 691 "KeyValueMap.c"
+#line 684 "KeyValueMap.c"
} else {
-#line 48 "/usr/share/vala-0.36/vapi/glib-2.0.vapi"
+#line 48 "/usr/share/vala-0.40/vapi/glib-2.0.vapi"
result = FALSE;
-#line 48 "/usr/share/vala-0.36/vapi/glib-2.0.vapi"
+#line 48 "/usr/share/vala-0.40/vapi/glib-2.0.vapi"
return result;
-#line 697 "KeyValueMap.c"
+#line 690 "KeyValueMap.c"
}
}
-gboolean key_value_map_get_bool (KeyValueMap* self, const gchar* key, gboolean def) {
+gboolean
+key_value_map_get_bool (KeyValueMap* self,
+ const gchar* key,
+ gboolean def)
+{
gboolean result = FALSE;
gchar* value = NULL;
GeeHashMap* _tmp0_;
- const gchar* _tmp1_;
- gpointer _tmp2_;
- gboolean _tmp3_ = FALSE;
- const gchar* _tmp4_;
+ gpointer _tmp1_;
+ gboolean _tmp2_ = FALSE;
+ const gchar* _tmp3_;
#line 90 "/home/jens/Source/shotwell/src/util/KeyValueMap.vala"
_tmp0_ = self->priv->map;
#line 90 "/home/jens/Source/shotwell/src/util/KeyValueMap.vala"
- _tmp1_ = key;
+ _tmp1_ = gee_abstract_map_get (G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, GEE_TYPE_ABSTRACT_MAP, GeeAbstractMap), key);
#line 90 "/home/jens/Source/shotwell/src/util/KeyValueMap.vala"
- _tmp2_ = gee_abstract_map_get (G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, GEE_TYPE_ABSTRACT_MAP, GeeAbstractMap), _tmp1_);
-#line 90 "/home/jens/Source/shotwell/src/util/KeyValueMap.vala"
- value = (gchar*) _tmp2_;
-#line 92 "/home/jens/Source/shotwell/src/util/KeyValueMap.vala"
- _tmp4_ = value;
+ value = (gchar*) _tmp1_;
#line 92 "/home/jens/Source/shotwell/src/util/KeyValueMap.vala"
- if (_tmp4_ != NULL) {
-#line 722 "KeyValueMap.c"
- const gchar* _tmp5_;
- gboolean _tmp6_;
+ _tmp3_ = value;
#line 92 "/home/jens/Source/shotwell/src/util/KeyValueMap.vala"
- _tmp5_ = value;
+ if (_tmp3_ != NULL) {
+#line 716 "KeyValueMap.c"
+ const gchar* _tmp4_;
#line 92 "/home/jens/Source/shotwell/src/util/KeyValueMap.vala"
- _tmp6_ = bool_parse (_tmp5_);
+ _tmp4_ = value;
#line 92 "/home/jens/Source/shotwell/src/util/KeyValueMap.vala"
- _tmp3_ = _tmp6_;
-#line 731 "KeyValueMap.c"
+ _tmp2_ = bool_parse (_tmp4_);
+#line 722 "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 738 "KeyValueMap.c"
+ _tmp2_ = def;
+#line 726 "KeyValueMap.c"
}
#line 92 "/home/jens/Source/shotwell/src/util/KeyValueMap.vala"
- result = _tmp3_;
+ result = _tmp2_;
#line 92 "/home/jens/Source/shotwell/src/util/KeyValueMap.vala"
_g_free0 (value);
#line 92 "/home/jens/Source/shotwell/src/util/KeyValueMap.vala"
return result;
-#line 746 "KeyValueMap.c"
+#line 734 "KeyValueMap.c"
}
-void key_value_map_get_point (KeyValueMap* self, const gchar* key, GdkPoint* def, GdkPoint* result) {
+void
+key_value_map_get_point (KeyValueMap* self,
+ const gchar* key,
+ GdkPoint* def,
+ GdkPoint* result)
+{
gchar* value = NULL;
GeeHashMap* _tmp0_;
- const gchar* _tmp1_;
- gpointer _tmp2_;
- const gchar* _tmp3_;
+ gpointer _tmp1_;
+ const gchar* _tmp2_;
#line 101 "/home/jens/Source/shotwell/src/util/KeyValueMap.vala"
_tmp0_ = self->priv->map;
#line 101 "/home/jens/Source/shotwell/src/util/KeyValueMap.vala"
- _tmp1_ = key;
-#line 101 "/home/jens/Source/shotwell/src/util/KeyValueMap.vala"
- _tmp2_ = gee_abstract_map_get (G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, GEE_TYPE_ABSTRACT_MAP, GeeAbstractMap), _tmp1_);
+ _tmp1_ = gee_abstract_map_get (G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, GEE_TYPE_ABSTRACT_MAP, GeeAbstractMap), key);
#line 101 "/home/jens/Source/shotwell/src/util/KeyValueMap.vala"
- value = (gchar*) _tmp2_;
+ value = (gchar*) _tmp1_;
#line 103 "/home/jens/Source/shotwell/src/util/KeyValueMap.vala"
- _tmp3_ = value;
+ _tmp2_ = value;
#line 103 "/home/jens/Source/shotwell/src/util/KeyValueMap.vala"
- if (_tmp3_ == NULL) {
-#line 768 "KeyValueMap.c"
- GdkPoint _tmp4_;
+ if (_tmp2_ == NULL) {
+#line 758 "KeyValueMap.c"
+ GdkPoint _tmp3_;
#line 104 "/home/jens/Source/shotwell/src/util/KeyValueMap.vala"
- _tmp4_ = *def;
+ _tmp3_ = *def;
#line 104 "/home/jens/Source/shotwell/src/util/KeyValueMap.vala"
- *result = _tmp4_;
+ *result = _tmp3_;
#line 104 "/home/jens/Source/shotwell/src/util/KeyValueMap.vala"
_g_free0 (value);
#line 104 "/home/jens/Source/shotwell/src/util/KeyValueMap.vala"
return;
-#line 778 "KeyValueMap.c"
+#line 768 "KeyValueMap.c"
} else {
GdkPoint _result_ = {0};
- GdkPoint _tmp5_ = {0};
- const gchar* _tmp6_;
- gint _tmp7_;
+ GdkPoint _tmp4_ = {0};
+ const gchar* _tmp5_;
#line 106 "/home/jens/Source/shotwell/src/util/KeyValueMap.vala"
- _tmp5_.x = 0;
+ _tmp4_.x = 0;
#line 106 "/home/jens/Source/shotwell/src/util/KeyValueMap.vala"
- _result_ = _tmp5_;
+ _result_ = _tmp4_;
#line 107 "/home/jens/Source/shotwell/src/util/KeyValueMap.vala"
- _tmp6_ = value;
-#line 107 "/home/jens/Source/shotwell/src/util/KeyValueMap.vala"
- _tmp7_ = sscanf (_tmp6_, "(%d, %d)", &_result_.x, &_result_.y);
+ _tmp5_ = value;
#line 107 "/home/jens/Source/shotwell/src/util/KeyValueMap.vala"
- if (_tmp7_ == 2) {
+ if (sscanf (_tmp5_, "(%d, %d)", &_result_.x, &_result_.y) == 2) {
#line 108 "/home/jens/Source/shotwell/src/util/KeyValueMap.vala"
*result = _result_;
#line 108 "/home/jens/Source/shotwell/src/util/KeyValueMap.vala"
_g_free0 (value);
#line 108 "/home/jens/Source/shotwell/src/util/KeyValueMap.vala"
return;
-#line 800 "KeyValueMap.c"
+#line 787 "KeyValueMap.c"
} else {
- GdkPoint _tmp8_;
+ GdkPoint _tmp6_;
#line 110 "/home/jens/Source/shotwell/src/util/KeyValueMap.vala"
- _tmp8_ = *def;
+ _tmp6_ = *def;
#line 110 "/home/jens/Source/shotwell/src/util/KeyValueMap.vala"
- *result = _tmp8_;
+ *result = _tmp6_;
#line 110 "/home/jens/Source/shotwell/src/util/KeyValueMap.vala"
_g_free0 (value);
#line 110 "/home/jens/Source/shotwell/src/util/KeyValueMap.vala"
return;
-#line 811 "KeyValueMap.c"
+#line 798 "KeyValueMap.c"
}
}
#line 100 "/home/jens/Source/shotwell/src/util/KeyValueMap.vala"
_g_free0 (value);
-#line 816 "KeyValueMap.c"
+#line 803 "KeyValueMap.c"
}
-void key_value_map_set_point (KeyValueMap* self, const gchar* key, GdkPoint* point) {
+void
+key_value_map_set_point (KeyValueMap* self,
+ const gchar* key,
+ GdkPoint* point)
+{
GeeHashMap* _tmp0_;
- const gchar* _tmp1_;
- GdkPoint _tmp2_;
- gint _tmp3_;
- GdkPoint _tmp4_;
- gint _tmp5_;
+ GdkPoint _tmp1_;
+ gint _tmp2_;
+ GdkPoint _tmp3_;
+ gint _tmp4_;
+ gchar* _tmp5_;
gchar* _tmp6_;
- gchar* _tmp7_;
#line 115 "/home/jens/Source/shotwell/src/util/KeyValueMap.vala"
_tmp0_ = self->priv->map;
#line 115 "/home/jens/Source/shotwell/src/util/KeyValueMap.vala"
- _tmp1_ = key;
-#line 115 "/home/jens/Source/shotwell/src/util/KeyValueMap.vala"
- _tmp2_ = *point;
+ _tmp1_ = *point;
#line 115 "/home/jens/Source/shotwell/src/util/KeyValueMap.vala"
- _tmp3_ = _tmp2_.x;
+ _tmp2_ = _tmp1_.x;
#line 115 "/home/jens/Source/shotwell/src/util/KeyValueMap.vala"
- _tmp4_ = *point;
+ _tmp3_ = *point;
#line 115 "/home/jens/Source/shotwell/src/util/KeyValueMap.vala"
- _tmp5_ = _tmp4_.y;
+ _tmp4_ = _tmp3_.y;
#line 115 "/home/jens/Source/shotwell/src/util/KeyValueMap.vala"
- _tmp6_ = g_strdup_printf ("(%d, %d)", _tmp3_, _tmp5_);
+ _tmp5_ = g_strdup_printf ("(%d, %d)", _tmp2_, _tmp4_);
#line 115 "/home/jens/Source/shotwell/src/util/KeyValueMap.vala"
- _tmp7_ = _tmp6_;
+ _tmp6_ = _tmp5_;
#line 115 "/home/jens/Source/shotwell/src/util/KeyValueMap.vala"
- gee_abstract_map_set (G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, GEE_TYPE_ABSTRACT_MAP, GeeAbstractMap), _tmp1_, _tmp7_);
+ gee_abstract_map_set (G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, GEE_TYPE_ABSTRACT_MAP, GeeAbstractMap), key, _tmp6_);
#line 115 "/home/jens/Source/shotwell/src/util/KeyValueMap.vala"
- _g_free0 (_tmp7_);
-#line 849 "KeyValueMap.c"
+ _g_free0 (_tmp6_);
+#line 837 "KeyValueMap.c"
}
-static void value_key_value_map_init (GValue* value) {
+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 856 "KeyValueMap.c"
+#line 846 "KeyValueMap.c"
}
-static void value_key_value_map_free_value (GValue* value) {
+static void
+value_key_value_map_free_value (GValue* value)
+{
#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"
key_value_map_unref (value->data[0].v_pointer);
-#line 865 "KeyValueMap.c"
+#line 857 "KeyValueMap.c"
}
}
-static void value_key_value_map_copy_value (const GValue* src_value, GValue* dest_value) {
+static void
+value_key_value_map_copy_value (const GValue* src_value,
+ GValue* dest_value)
+{
#line 7 "/home/jens/Source/shotwell/src/util/KeyValueMap.vala"
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 875 "KeyValueMap.c"
+#line 870 "KeyValueMap.c"
} else {
#line 7 "/home/jens/Source/shotwell/src/util/KeyValueMap.vala"
dest_value->data[0].v_pointer = NULL;
-#line 879 "KeyValueMap.c"
+#line 874 "KeyValueMap.c"
}
}
-static gpointer value_key_value_map_peek_pointer (const GValue* value) {
+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 887 "KeyValueMap.c"
+#line 884 "KeyValueMap.c"
}
-static gchar* value_key_value_map_collect_value (GValue* value, guint n_collect_values, GTypeCValue* collect_values, guint collect_flags) {
+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 894 "KeyValueMap.c"
+#line 896 "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 901 "KeyValueMap.c"
+#line 903 "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 905 "KeyValueMap.c"
+#line 907 "KeyValueMap.c"
}
#line 7 "/home/jens/Source/shotwell/src/util/KeyValueMap.vala"
value->data[0].v_pointer = key_value_map_ref (object);
-#line 909 "KeyValueMap.c"
+#line 911 "KeyValueMap.c"
} else {
#line 7 "/home/jens/Source/shotwell/src/util/KeyValueMap.vala"
value->data[0].v_pointer = NULL;
-#line 913 "KeyValueMap.c"
+#line 915 "KeyValueMap.c"
}
#line 7 "/home/jens/Source/shotwell/src/util/KeyValueMap.vala"
return NULL;
-#line 917 "KeyValueMap.c"
+#line 919 "KeyValueMap.c"
}
-static gchar* value_key_value_map_lcopy_value (const GValue* value, guint n_collect_values, GTypeCValue* collect_values, guint collect_flags) {
+static gchar*
+value_key_value_map_lcopy_value (const GValue* value,
+ guint n_collect_values,
+ GTypeCValue* collect_values,
+ guint collect_flags)
+{
KeyValueMap ** object_p;
object_p = collect_values[0].v_pointer;
#line 7 "/home/jens/Source/shotwell/src/util/KeyValueMap.vala"
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 928 "KeyValueMap.c"
+#line 935 "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 934 "KeyValueMap.c"
+#line 941 "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 938 "KeyValueMap.c"
+#line 945 "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 942 "KeyValueMap.c"
+#line 949 "KeyValueMap.c"
}
#line 7 "/home/jens/Source/shotwell/src/util/KeyValueMap.vala"
return NULL;
-#line 946 "KeyValueMap.c"
+#line 953 "KeyValueMap.c"
}
-GParamSpec* param_spec_key_value_map (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags) {
+GParamSpec*
+param_spec_key_value_map (const gchar* name,
+ const gchar* nick,
+ const gchar* blurb,
+ GType object_type,
+ GParamFlags flags)
+{
ParamSpecKeyValueMap* spec;
#line 7 "/home/jens/Source/shotwell/src/util/KeyValueMap.vala"
g_return_val_if_fail (g_type_is_a (object_type, TYPE_KEY_VALUE_MAP), NULL);
@@ -956,20 +969,25 @@ 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 960 "KeyValueMap.c"
+#line 973 "KeyValueMap.c"
}
-gpointer value_get_key_value_map (const GValue* value) {
+gpointer
+value_get_key_value_map (const GValue* value)
+{
#line 7 "/home/jens/Source/shotwell/src/util/KeyValueMap.vala"
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 969 "KeyValueMap.c"
+#line 984 "KeyValueMap.c"
}
-void value_set_key_value_map (GValue* value, gpointer v_object) {
+void
+value_set_key_value_map (GValue* value,
+ gpointer v_object)
+{
KeyValueMap * old;
#line 7 "/home/jens/Source/shotwell/src/util/KeyValueMap.vala"
g_return_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, TYPE_KEY_VALUE_MAP));
@@ -985,22 +1003,25 @@ 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 989 "KeyValueMap.c"
+#line 1007 "KeyValueMap.c"
} else {
#line 7 "/home/jens/Source/shotwell/src/util/KeyValueMap.vala"
value->data[0].v_pointer = NULL;
-#line 993 "KeyValueMap.c"
+#line 1011 "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 999 "KeyValueMap.c"
+#line 1017 "KeyValueMap.c"
}
}
-void value_take_key_value_map (GValue* value, gpointer v_object) {
+void
+value_take_key_value_map (GValue* value,
+ gpointer v_object)
+{
KeyValueMap * old;
#line 7 "/home/jens/Source/shotwell/src/util/KeyValueMap.vala"
g_return_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, TYPE_KEY_VALUE_MAP));
@@ -1014,33 +1035,37 @@ 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 1018 "KeyValueMap.c"
+#line 1039 "KeyValueMap.c"
} else {
#line 7 "/home/jens/Source/shotwell/src/util/KeyValueMap.vala"
value->data[0].v_pointer = NULL;
-#line 1022 "KeyValueMap.c"
+#line 1043 "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 1028 "KeyValueMap.c"
+#line 1049 "KeyValueMap.c"
}
}
-static void key_value_map_class_init (KeyValueMapClass * klass) {
+static void
+key_value_map_class_init (KeyValueMapClass * klass)
+{
#line 7 "/home/jens/Source/shotwell/src/util/KeyValueMap.vala"
key_value_map_parent_class = g_type_class_peek_parent (klass);
#line 7 "/home/jens/Source/shotwell/src/util/KeyValueMap.vala"
((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 1040 "KeyValueMap.c"
+#line 1063 "KeyValueMap.c"
}
-static void key_value_map_instance_init (KeyValueMap * self) {
+static void
+key_value_map_instance_init (KeyValueMap * self)
+{
GeeHashMap* _tmp0_;
#line 7 "/home/jens/Source/shotwell/src/util/KeyValueMap.vala"
self->priv = KEY_VALUE_MAP_GET_PRIVATE (self);
@@ -1050,11 +1075,13 @@ 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 1054 "KeyValueMap.c"
+#line 1079 "KeyValueMap.c"
}
-static void key_value_map_finalize (KeyValueMap * obj) {
+static void
+key_value_map_finalize (KeyValueMap * obj)
+{
KeyValueMap * self;
#line 7 "/home/jens/Source/shotwell/src/util/KeyValueMap.vala"
self = G_TYPE_CHECK_INSTANCE_CAST (obj, TYPE_KEY_VALUE_MAP, KeyValueMap);
@@ -1064,11 +1091,13 @@ 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 1068 "KeyValueMap.c"
+#line 1095 "KeyValueMap.c"
}
-GType key_value_map_get_type (void) {
+GType
+key_value_map_get_type (void)
+{
static volatile gsize key_value_map_type_id__volatile = 0;
if (g_once_init_enter (&key_value_map_type_id__volatile)) {
static const GTypeValueTable g_define_type_value_table = { value_key_value_map_init, value_key_value_map_free_value, value_key_value_map_copy_value, value_key_value_map_peek_pointer, "p", value_key_value_map_collect_value, "p", value_key_value_map_lcopy_value };
@@ -1082,18 +1111,22 @@ GType key_value_map_get_type (void) {
}
-gpointer key_value_map_ref (gpointer instance) {
+gpointer
+key_value_map_ref (gpointer instance)
+{
KeyValueMap * self;
self = instance;
#line 7 "/home/jens/Source/shotwell/src/util/KeyValueMap.vala"
g_atomic_int_inc (&self->ref_count);
#line 7 "/home/jens/Source/shotwell/src/util/KeyValueMap.vala"
return instance;
-#line 1093 "KeyValueMap.c"
+#line 1124 "KeyValueMap.c"
}
-void key_value_map_unref (gpointer instance) {
+void
+key_value_map_unref (gpointer instance)
+{
KeyValueMap * self;
self = instance;
#line 7 "/home/jens/Source/shotwell/src/util/KeyValueMap.vala"
@@ -1102,7 +1135,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 1106 "KeyValueMap.c"
+#line 1139 "KeyValueMap.c"
}
}
diff --git a/src/util/Util.c b/src/util/Util.c
index 45f48d9..3a44398 100644
--- a/src/util/Util.c
+++ b/src/util/Util.c
@@ -1,4 +1,4 @@
-/* Util.c generated by valac 0.36.6, the Vala compiler
+/* Util.c generated by valac 0.40.4, the Vala compiler
* generated from Util.vala, do not modify */
/* Copyright 2016 Software Freedom Conservancy Inc.
@@ -7,6 +7,7 @@
* (version 2.1 or later). See the COPYING file in this distribution.
*/
+
#include <glib.h>
#include <glib-object.h>
#include <stdlib.h>
@@ -20,11 +21,15 @@ void util_init (GError** error);
void util_terminate (void);
-void util_init (GError** error) {
+void
+util_init (GError** error)
+{
}
-void util_terminate (void) {
+void
+util_terminate (void)
+{
}
diff --git a/src/util/file.c b/src/util/file.c
index 2afe738..ccb75a9 100644
--- a/src/util/file.c
+++ b/src/util/file.c
@@ -1,4 +1,4 @@
-/* file.c generated by valac 0.36.6, the Vala compiler
+/* file.c generated by valac 0.40.4, the Vala compiler
* generated from file.vala, do not modify */
/* Copyright 2016 Software Freedom Conservancy Inc.
@@ -12,6 +12,7 @@
/**/
/* This function is thread-safe.*/
+
#include <glib.h>
#include <glib-object.h>
#include <gio/gio.h>
@@ -27,105 +28,125 @@
typedef gboolean (*ProgressMonitor) (guint64 current, guint64 total, gboolean do_event_loop, void* user_data);
-gboolean claim_file (GFile* file, GError** error);
-GFile* generate_unique_file (GFile* dir, const gchar* basename, gboolean* collision, GError** error);
-void disassemble_filename (const gchar* basename, gchar* * name, gchar* * ext);
-glong find_last_offset (const gchar* str, gchar c);
-guint64 query_total_file_size (GFile* file_or_dir, GCancellable* cancellable, GError** error);
-void delete_all_files (GFile* dir, GeeSet* exceptions, ProgressMonitor monitor, void* monitor_target, guint64 file_count, GCancellable* cancellable, GError** error);
-time_t query_file_modified (GFile* file, GError** error);
+gboolean claim_file (GFile* file,
+ GError** error);
+GFile* generate_unique_file (GFile* dir,
+ const gchar* basename,
+ gboolean* collision,
+ GError** error);
+void disassemble_filename (const gchar* basename,
+ gchar* * name,
+ gchar* * ext);
+glong find_last_offset (const gchar* str,
+ gchar c);
+guint64 query_total_file_size (GFile* file_or_dir,
+ GCancellable* cancellable,
+ GError** error);
+void delete_all_files (GFile* dir,
+ GeeSet* exceptions,
+ ProgressMonitor monitor,
+ void* monitor_target,
+ guint64 file_count,
+ GCancellable* cancellable,
+ GError** error);
+time_t query_file_modified (GFile* file,
+ GError** error);
gboolean query_is_directory (GFile* file);
-gboolean query_is_directory_empty (GFile* dir, GError** error);
+gboolean query_is_directory_empty (GFile* dir,
+ GError** error);
gchar* get_display_pathname (GFile* file);
gchar* strip_pretty_path (const gchar* path);
gchar* get_file_info_id (GFileInfo* info);
-void skip_uint64 (GInputStream* input, guint64 skip_amount, GError** error);
-guint64 count_files_in_directory (GFile* dir, GError** error);
-gboolean file_equal (GFile* a, GFile* b);
+void skip_uint64 (GInputStream* input,
+ guint64 skip_amount,
+ GError** error);
+guint64 count_files_in_directory (GFile* dir,
+ GError** error);
+gboolean file_equal (GFile* a,
+ GFile* b);
guint file_hash (GFile* file);
-static gpointer _g_error_copy0 (gpointer self) {
+static gpointer
+_g_error_copy0 (gpointer self)
+{
#line 23 "/home/jens/Source/shotwell/src/util/file.vala"
return self ? g_error_copy (self) : NULL;
-#line 52 "file.c"
+#line 76 "file.c"
}
-gboolean claim_file (GFile* file, GError** error) {
+gboolean
+claim_file (GFile* file,
+ GError** error)
+{
gboolean result = FALSE;
- gboolean _tmp11_ = FALSE;
+ gboolean _tmp9_ = FALSE;
GError * _inner_error_ = NULL;
#line 12 "/home/jens/Source/shotwell/src/util/file.vala"
g_return_val_if_fail (G_IS_FILE (file), FALSE);
-#line 62 "file.c"
+#line 89 "file.c"
{
- GFile* _tmp0_;
+ GFileOutputStream* _tmp0_;
GFileOutputStream* _tmp1_;
- GFileOutputStream* _tmp2_;
-#line 14 "/home/jens/Source/shotwell/src/util/file.vala"
- _tmp0_ = file;
#line 14 "/home/jens/Source/shotwell/src/util/file.vala"
- _tmp1_ = g_file_create (_tmp0_, G_FILE_CREATE_NONE, NULL, &_inner_error_);
+ _tmp0_ = g_file_create (file, G_FILE_CREATE_NONE, NULL, &_inner_error_);
#line 14 "/home/jens/Source/shotwell/src/util/file.vala"
- _tmp2_ = _tmp1_;
+ _tmp1_ = _tmp0_;
#line 14 "/home/jens/Source/shotwell/src/util/file.vala"
- _g_object_unref0 (_tmp2_);
+ _g_object_unref0 (_tmp1_);
#line 14 "/home/jens/Source/shotwell/src/util/file.vala"
if (G_UNLIKELY (_inner_error_ != NULL)) {
-#line 77 "file.c"
+#line 101 "file.c"
goto __catch0_g_error;
}
#line 17 "/home/jens/Source/shotwell/src/util/file.vala"
result = TRUE;
#line 17 "/home/jens/Source/shotwell/src/util/file.vala"
return result;
-#line 84 "file.c"
+#line 108 "file.c"
}
goto __finally0;
__catch0_g_error:
{
GError* err = NULL;
- GError* _tmp3_;
+ GError* _tmp2_;
#line 13 "/home/jens/Source/shotwell/src/util/file.vala"
err = _inner_error_;
#line 13 "/home/jens/Source/shotwell/src/util/file.vala"
_inner_error_ = NULL;
#line 20 "/home/jens/Source/shotwell/src/util/file.vala"
- _tmp3_ = err;
+ _tmp2_ = err;
#line 20 "/home/jens/Source/shotwell/src/util/file.vala"
- if (!g_error_matches (_tmp3_, G_IO_ERROR, G_IO_ERROR_EXISTS)) {
-#line 99 "file.c"
- GFile* _tmp4_;
- gchar* _tmp5_;
- gchar* _tmp6_;
+ if (!g_error_matches (_tmp2_, G_IO_ERROR, G_IO_ERROR_EXISTS)) {
+#line 123 "file.c"
+ gchar* _tmp3_;
+ gchar* _tmp4_;
+ GError* _tmp5_;
+ const gchar* _tmp6_;
GError* _tmp7_;
- const gchar* _tmp8_;
- GError* _tmp9_;
- GError* _tmp10_;
-#line 21 "/home/jens/Source/shotwell/src/util/file.vala"
- _tmp4_ = file;
+ GError* _tmp8_;
#line 21 "/home/jens/Source/shotwell/src/util/file.vala"
- _tmp5_ = g_file_get_path (_tmp4_);
+ _tmp3_ = g_file_get_path (file);
#line 21 "/home/jens/Source/shotwell/src/util/file.vala"
- _tmp6_ = _tmp5_;
+ _tmp4_ = _tmp3_;
#line 21 "/home/jens/Source/shotwell/src/util/file.vala"
- _tmp7_ = err;
+ _tmp5_ = err;
#line 21 "/home/jens/Source/shotwell/src/util/file.vala"
- _tmp8_ = _tmp7_->message;
+ _tmp6_ = _tmp5_->message;
#line 21 "/home/jens/Source/shotwell/src/util/file.vala"
- g_warning ("file.vala:21: claim_file %s: %s", _tmp6_, _tmp8_);
+ g_warning ("file.vala:21: claim_file %s: %s", _tmp4_, _tmp6_);
#line 21 "/home/jens/Source/shotwell/src/util/file.vala"
- _g_free0 (_tmp6_);
+ _g_free0 (_tmp4_);
#line 23 "/home/jens/Source/shotwell/src/util/file.vala"
- _tmp9_ = err;
+ _tmp7_ = err;
#line 23 "/home/jens/Source/shotwell/src/util/file.vala"
- _tmp10_ = _g_error_copy0 (_tmp9_);
+ _tmp8_ = _g_error_copy0 (_tmp7_);
#line 23 "/home/jens/Source/shotwell/src/util/file.vala"
- _inner_error_ = _tmp10_;
+ _inner_error_ = _tmp8_;
#line 23 "/home/jens/Source/shotwell/src/util/file.vala"
_g_error_free0 (err);
-#line 129 "file.c"
+#line 150 "file.c"
goto __finally0;
}
#line 26 "/home/jens/Source/shotwell/src/util/file.vala"
@@ -134,55 +155,48 @@ gboolean claim_file (GFile* file, GError** error) {
_g_error_free0 (err);
#line 26 "/home/jens/Source/shotwell/src/util/file.vala"
return result;
-#line 138 "file.c"
+#line 159 "file.c"
}
__finally0:
#line 13 "/home/jens/Source/shotwell/src/util/file.vala"
g_propagate_error (error, _inner_error_);
#line 13 "/home/jens/Source/shotwell/src/util/file.vala"
- return _tmp11_;
-#line 145 "file.c"
+ return _tmp9_;
+#line 166 "file.c"
}
-GFile* generate_unique_file (GFile* dir, const gchar* basename, gboolean* collision, GError** error) {
+GFile*
+generate_unique_file (GFile* dir,
+ const gchar* basename,
+ gboolean* collision,
+ GError** error)
+{
gboolean _vala_collision = FALSE;
GFile* result = NULL;
GFile* file = NULL;
GFile* _tmp0_;
- const gchar* _tmp1_;
+ gboolean _tmp1_ = FALSE;
GFile* _tmp2_;
- gboolean _tmp3_ = FALSE;
- GFile* _tmp4_;
- gboolean _tmp5_;
gchar* name = NULL;
gchar* ext = NULL;
- const gchar* _tmp6_;
- gchar* _tmp7_ = NULL;
- gchar* _tmp8_ = NULL;
- GFile* _tmp28_;
- gchar* _tmp29_;
- gchar* _tmp30_;
- const gchar* _tmp31_;
+ gchar* _tmp3_ = NULL;
+ gchar* _tmp4_ = NULL;
+ gchar* _tmp22_;
+ gchar* _tmp23_;
GError * _inner_error_ = NULL;
#line 36 "/home/jens/Source/shotwell/src/util/file.vala"
g_return_val_if_fail (G_IS_FILE (dir), NULL);
#line 36 "/home/jens/Source/shotwell/src/util/file.vala"
g_return_val_if_fail (basename != NULL, NULL);
#line 38 "/home/jens/Source/shotwell/src/util/file.vala"
- _tmp0_ = dir;
+ _tmp0_ = g_file_get_child (dir, basename);
#line 38 "/home/jens/Source/shotwell/src/util/file.vala"
- _tmp1_ = basename;
-#line 38 "/home/jens/Source/shotwell/src/util/file.vala"
- _tmp2_ = g_file_get_child (_tmp0_, _tmp1_);
-#line 38 "/home/jens/Source/shotwell/src/util/file.vala"
- file = _tmp2_;
+ file = _tmp0_;
#line 39 "/home/jens/Source/shotwell/src/util/file.vala"
- _tmp4_ = file;
+ _tmp2_ = file;
#line 39 "/home/jens/Source/shotwell/src/util/file.vala"
- _tmp5_ = claim_file (_tmp4_, &_inner_error_);
-#line 39 "/home/jens/Source/shotwell/src/util/file.vala"
- _tmp3_ = _tmp5_;
+ _tmp1_ = claim_file (_tmp2_, &_inner_error_);
#line 39 "/home/jens/Source/shotwell/src/util/file.vala"
if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 39 "/home/jens/Source/shotwell/src/util/file.vala"
@@ -191,10 +205,10 @@ GFile* generate_unique_file (GFile* dir, const gchar* basename, gboolean* collis
_g_object_unref0 (file);
#line 39 "/home/jens/Source/shotwell/src/util/file.vala"
return NULL;
-#line 195 "file.c"
+#line 209 "file.c"
}
#line 39 "/home/jens/Source/shotwell/src/util/file.vala"
- if (_tmp3_) {
+ if (_tmp1_) {
#line 40 "/home/jens/Source/shotwell/src/util/file.vala"
_vala_collision = FALSE;
#line 42 "/home/jens/Source/shotwell/src/util/file.vala"
@@ -203,128 +217,120 @@ GFile* generate_unique_file (GFile* dir, const gchar* basename, gboolean* collis
if (collision) {
#line 42 "/home/jens/Source/shotwell/src/util/file.vala"
*collision = _vala_collision;
-#line 207 "file.c"
+#line 221 "file.c"
}
#line 42 "/home/jens/Source/shotwell/src/util/file.vala"
return result;
-#line 211 "file.c"
+#line 225 "file.c"
}
#line 46 "/home/jens/Source/shotwell/src/util/file.vala"
_vala_collision = TRUE;
#line 49 "/home/jens/Source/shotwell/src/util/file.vala"
- _tmp6_ = basename;
-#line 49 "/home/jens/Source/shotwell/src/util/file.vala"
- disassemble_filename (_tmp6_, &_tmp7_, &_tmp8_);
+ disassemble_filename (basename, &_tmp3_, &_tmp4_);
#line 49 "/home/jens/Source/shotwell/src/util/file.vala"
_g_free0 (name);
#line 49 "/home/jens/Source/shotwell/src/util/file.vala"
- name = _tmp7_;
+ name = _tmp3_;
#line 49 "/home/jens/Source/shotwell/src/util/file.vala"
_g_free0 (ext);
#line 49 "/home/jens/Source/shotwell/src/util/file.vala"
- ext = _tmp8_;
-#line 227 "file.c"
+ ext = _tmp4_;
+#line 239 "file.c"
{
gint ctr = 0;
#line 52 "/home/jens/Source/shotwell/src/util/file.vala"
ctr = 1;
-#line 232 "file.c"
+#line 244 "file.c"
{
- gboolean _tmp9_ = FALSE;
+ gboolean _tmp5_ = FALSE;
#line 52 "/home/jens/Source/shotwell/src/util/file.vala"
- _tmp9_ = TRUE;
+ _tmp5_ = TRUE;
#line 52 "/home/jens/Source/shotwell/src/util/file.vala"
while (TRUE) {
-#line 239 "file.c"
- gint _tmp11_;
- gchar* _tmp12_ = NULL;
- const gchar* _tmp13_;
+#line 251 "file.c"
+ gint _tmp7_;
+ gchar* _tmp8_ = NULL;
+ const gchar* _tmp9_;
gchar* new_name = NULL;
- gchar* _tmp21_;
- GFile* _tmp22_;
- const gchar* _tmp23_;
- GFile* _tmp24_;
- gboolean _tmp25_ = FALSE;
- GFile* _tmp26_;
- gboolean _tmp27_;
+ gchar* _tmp17_;
+ const gchar* _tmp18_;
+ GFile* _tmp19_;
+ gboolean _tmp20_ = FALSE;
+ GFile* _tmp21_;
#line 52 "/home/jens/Source/shotwell/src/util/file.vala"
- if (!_tmp9_) {
-#line 253 "file.c"
- gint _tmp10_;
+ if (!_tmp5_) {
+#line 263 "file.c"
+ gint _tmp6_;
#line 52 "/home/jens/Source/shotwell/src/util/file.vala"
- _tmp10_ = ctr;
+ _tmp6_ = ctr;
#line 52 "/home/jens/Source/shotwell/src/util/file.vala"
- ctr = _tmp10_ + 1;
-#line 259 "file.c"
+ ctr = _tmp6_ + 1;
+#line 269 "file.c"
}
#line 52 "/home/jens/Source/shotwell/src/util/file.vala"
- _tmp9_ = FALSE;
+ _tmp5_ = FALSE;
#line 52 "/home/jens/Source/shotwell/src/util/file.vala"
- _tmp11_ = ctr;
+ _tmp7_ = ctr;
#line 52 "/home/jens/Source/shotwell/src/util/file.vala"
- if (!(_tmp11_ < G_MAXINT)) {
+ if (!(_tmp7_ < G_MAXINT)) {
#line 52 "/home/jens/Source/shotwell/src/util/file.vala"
break;
-#line 269 "file.c"
+#line 279 "file.c"
}
#line 53 "/home/jens/Source/shotwell/src/util/file.vala"
- _tmp13_ = ext;
+ _tmp9_ = ext;
#line 53 "/home/jens/Source/shotwell/src/util/file.vala"
- if (_tmp13_ != NULL) {
-#line 275 "file.c"
- const gchar* _tmp14_;
- gint _tmp15_;
- const gchar* _tmp16_;
- gchar* _tmp17_;
+ if (_tmp9_ != NULL) {
+#line 285 "file.c"
+ const gchar* _tmp10_;
+ gint _tmp11_;
+ const gchar* _tmp12_;
+ gchar* _tmp13_;
#line 53 "/home/jens/Source/shotwell/src/util/file.vala"
- _tmp14_ = name;
+ _tmp10_ = name;
#line 53 "/home/jens/Source/shotwell/src/util/file.vala"
- _tmp15_ = ctr;
+ _tmp11_ = ctr;
#line 53 "/home/jens/Source/shotwell/src/util/file.vala"
- _tmp16_ = ext;
+ _tmp12_ = ext;
#line 53 "/home/jens/Source/shotwell/src/util/file.vala"
- _tmp17_ = g_strdup_printf ("%s_%d.%s", _tmp14_, _tmp15_, _tmp16_);
+ _tmp13_ = g_strdup_printf ("%s_%d.%s", _tmp10_, _tmp11_, _tmp12_);
#line 53 "/home/jens/Source/shotwell/src/util/file.vala"
- _g_free0 (_tmp12_);
+ _g_free0 (_tmp8_);
#line 53 "/home/jens/Source/shotwell/src/util/file.vala"
- _tmp12_ = _tmp17_;
-#line 292 "file.c"
+ _tmp8_ = _tmp13_;
+#line 302 "file.c"
} else {
- const gchar* _tmp18_;
- gint _tmp19_;
- gchar* _tmp20_;
+ const gchar* _tmp14_;
+ gint _tmp15_;
+ gchar* _tmp16_;
#line 53 "/home/jens/Source/shotwell/src/util/file.vala"
- _tmp18_ = name;
+ _tmp14_ = name;
#line 53 "/home/jens/Source/shotwell/src/util/file.vala"
- _tmp19_ = ctr;
+ _tmp15_ = ctr;
#line 53 "/home/jens/Source/shotwell/src/util/file.vala"
- _tmp20_ = g_strdup_printf ("%s_%d", _tmp18_, _tmp19_);
+ _tmp16_ = g_strdup_printf ("%s_%d", _tmp14_, _tmp15_);
#line 53 "/home/jens/Source/shotwell/src/util/file.vala"
- _g_free0 (_tmp12_);
+ _g_free0 (_tmp8_);
#line 53 "/home/jens/Source/shotwell/src/util/file.vala"
- _tmp12_ = _tmp20_;
-#line 307 "file.c"
+ _tmp8_ = _tmp16_;
+#line 317 "file.c"
}
#line 53 "/home/jens/Source/shotwell/src/util/file.vala"
- _tmp21_ = g_strdup (_tmp12_);
+ _tmp17_ = g_strdup (_tmp8_);
#line 53 "/home/jens/Source/shotwell/src/util/file.vala"
- new_name = _tmp21_;
-#line 55 "/home/jens/Source/shotwell/src/util/file.vala"
- _tmp22_ = dir;
+ new_name = _tmp17_;
#line 55 "/home/jens/Source/shotwell/src/util/file.vala"
- _tmp23_ = new_name;
+ _tmp18_ = new_name;
#line 55 "/home/jens/Source/shotwell/src/util/file.vala"
- _tmp24_ = g_file_get_child (_tmp22_, _tmp23_);
+ _tmp19_ = g_file_get_child (dir, _tmp18_);
#line 55 "/home/jens/Source/shotwell/src/util/file.vala"
_g_object_unref0 (file);
#line 55 "/home/jens/Source/shotwell/src/util/file.vala"
- file = _tmp24_;
-#line 56 "/home/jens/Source/shotwell/src/util/file.vala"
- _tmp26_ = file;
+ file = _tmp19_;
#line 56 "/home/jens/Source/shotwell/src/util/file.vala"
- _tmp27_ = claim_file (_tmp26_, &_inner_error_);
+ _tmp21_ = file;
#line 56 "/home/jens/Source/shotwell/src/util/file.vala"
- _tmp25_ = _tmp27_;
+ _tmp20_ = claim_file (_tmp21_, &_inner_error_);
#line 56 "/home/jens/Source/shotwell/src/util/file.vala"
if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 56 "/home/jens/Source/shotwell/src/util/file.vala"
@@ -332,7 +338,7 @@ GFile* generate_unique_file (GFile* dir, const gchar* basename, gboolean* collis
#line 56 "/home/jens/Source/shotwell/src/util/file.vala"
_g_free0 (new_name);
#line 56 "/home/jens/Source/shotwell/src/util/file.vala"
- _g_free0 (_tmp12_);
+ _g_free0 (_tmp8_);
#line 56 "/home/jens/Source/shotwell/src/util/file.vala"
_g_free0 (ext);
#line 56 "/home/jens/Source/shotwell/src/util/file.vala"
@@ -341,16 +347,16 @@ GFile* generate_unique_file (GFile* dir, const gchar* basename, gboolean* collis
_g_object_unref0 (file);
#line 56 "/home/jens/Source/shotwell/src/util/file.vala"
return NULL;
-#line 345 "file.c"
+#line 351 "file.c"
}
#line 56 "/home/jens/Source/shotwell/src/util/file.vala"
- if (_tmp25_) {
+ if (_tmp20_) {
#line 57 "/home/jens/Source/shotwell/src/util/file.vala"
result = file;
#line 57 "/home/jens/Source/shotwell/src/util/file.vala"
_g_free0 (new_name);
#line 57 "/home/jens/Source/shotwell/src/util/file.vala"
- _g_free0 (_tmp12_);
+ _g_free0 (_tmp8_);
#line 57 "/home/jens/Source/shotwell/src/util/file.vala"
_g_free0 (ext);
#line 57 "/home/jens/Source/shotwell/src/util/file.vala"
@@ -359,32 +365,28 @@ GFile* generate_unique_file (GFile* dir, const gchar* basename, gboolean* collis
if (collision) {
#line 57 "/home/jens/Source/shotwell/src/util/file.vala"
*collision = _vala_collision;
-#line 363 "file.c"
+#line 369 "file.c"
}
#line 57 "/home/jens/Source/shotwell/src/util/file.vala"
return result;
-#line 367 "file.c"
+#line 373 "file.c"
}
#line 52 "/home/jens/Source/shotwell/src/util/file.vala"
_g_free0 (new_name);
#line 52 "/home/jens/Source/shotwell/src/util/file.vala"
- _g_free0 (_tmp12_);
-#line 373 "file.c"
+ _g_free0 (_tmp8_);
+#line 379 "file.c"
}
}
}
#line 60 "/home/jens/Source/shotwell/src/util/file.vala"
- _tmp28_ = dir;
-#line 60 "/home/jens/Source/shotwell/src/util/file.vala"
- _tmp29_ = g_file_get_path (_tmp28_);
+ _tmp22_ = g_file_get_path (dir);
#line 60 "/home/jens/Source/shotwell/src/util/file.vala"
- _tmp30_ = _tmp29_;
+ _tmp23_ = _tmp22_;
#line 60 "/home/jens/Source/shotwell/src/util/file.vala"
- _tmp31_ = basename;
+ g_warning ("file.vala:60: generate_unique_filename %s for %s: unable to claim file", _tmp23_, basename);
#line 60 "/home/jens/Source/shotwell/src/util/file.vala"
- g_warning ("file.vala:60: generate_unique_filename %s for %s: unable to claim file", _tmp30_, _tmp31_);
-#line 60 "/home/jens/Source/shotwell/src/util/file.vala"
- _g_free0 (_tmp30_);
+ _g_free0 (_tmp23_);
#line 62 "/home/jens/Source/shotwell/src/util/file.vala"
result = NULL;
#line 62 "/home/jens/Source/shotwell/src/util/file.vala"
@@ -397,275 +399,213 @@ GFile* generate_unique_file (GFile* dir, const gchar* basename, gboolean* collis
if (collision) {
#line 62 "/home/jens/Source/shotwell/src/util/file.vala"
*collision = _vala_collision;
-#line 401 "file.c"
+#line 403 "file.c"
}
#line 62 "/home/jens/Source/shotwell/src/util/file.vala"
return result;
-#line 405 "file.c"
+#line 407 "file.c"
}
-static glong string_strnlen (gchar* str, glong maxlen) {
+static glong
+string_strnlen (gchar* str,
+ glong maxlen)
+{
glong result = 0L;
gchar* end = NULL;
gchar* _tmp0_;
- glong _tmp1_;
- gchar* _tmp2_;
- gchar* _tmp3_;
-#line 1322 "/usr/share/vala-0.36/vapi/glib-2.0.vapi"
- _tmp0_ = str;
-#line 1322 "/usr/share/vala-0.36/vapi/glib-2.0.vapi"
- _tmp1_ = maxlen;
-#line 1322 "/usr/share/vala-0.36/vapi/glib-2.0.vapi"
- _tmp2_ = memchr (_tmp0_, 0, (gsize) _tmp1_);
-#line 1322 "/usr/share/vala-0.36/vapi/glib-2.0.vapi"
- end = _tmp2_;
-#line 1323 "/usr/share/vala-0.36/vapi/glib-2.0.vapi"
- _tmp3_ = end;
-#line 1323 "/usr/share/vala-0.36/vapi/glib-2.0.vapi"
- if (_tmp3_ == NULL) {
-#line 428 "file.c"
- glong _tmp4_;
-#line 1324 "/usr/share/vala-0.36/vapi/glib-2.0.vapi"
- _tmp4_ = maxlen;
-#line 1324 "/usr/share/vala-0.36/vapi/glib-2.0.vapi"
- result = _tmp4_;
-#line 1324 "/usr/share/vala-0.36/vapi/glib-2.0.vapi"
+ gchar* _tmp1_;
+#line 1336 "/usr/share/vala-0.40/vapi/glib-2.0.vapi"
+ _tmp0_ = memchr (str, 0, (gsize) maxlen);
+#line 1336 "/usr/share/vala-0.40/vapi/glib-2.0.vapi"
+ end = _tmp0_;
+#line 1337 "/usr/share/vala-0.40/vapi/glib-2.0.vapi"
+ _tmp1_ = end;
+#line 1337 "/usr/share/vala-0.40/vapi/glib-2.0.vapi"
+ if (_tmp1_ == NULL) {
+#line 1338 "/usr/share/vala-0.40/vapi/glib-2.0.vapi"
+ result = maxlen;
+#line 1338 "/usr/share/vala-0.40/vapi/glib-2.0.vapi"
return result;
-#line 436 "file.c"
+#line 431 "file.c"
} else {
- gchar* _tmp5_;
- gchar* _tmp6_;
-#line 1326 "/usr/share/vala-0.36/vapi/glib-2.0.vapi"
- _tmp5_ = end;
-#line 1326 "/usr/share/vala-0.36/vapi/glib-2.0.vapi"
- _tmp6_ = str;
-#line 1326 "/usr/share/vala-0.36/vapi/glib-2.0.vapi"
- result = (glong) (_tmp5_ - _tmp6_);
-#line 1326 "/usr/share/vala-0.36/vapi/glib-2.0.vapi"
+ gchar* _tmp2_;
+#line 1340 "/usr/share/vala-0.40/vapi/glib-2.0.vapi"
+ _tmp2_ = end;
+#line 1340 "/usr/share/vala-0.40/vapi/glib-2.0.vapi"
+ result = (glong) (_tmp2_ - str);
+#line 1340 "/usr/share/vala-0.40/vapi/glib-2.0.vapi"
return result;
-#line 448 "file.c"
+#line 440 "file.c"
}
}
-static gchar* string_substring (const gchar* self, glong offset, glong len) {
+static gchar*
+string_substring (const gchar* self,
+ glong offset,
+ glong len)
+{
gchar* result = NULL;
glong string_length = 0L;
gboolean _tmp0_ = FALSE;
- glong _tmp1_;
- glong _tmp8_;
- glong _tmp14_;
- glong _tmp17_;
- glong _tmp18_;
- glong _tmp19_;
- glong _tmp20_;
- glong _tmp21_;
- gchar* _tmp22_;
-#line 1333 "/usr/share/vala-0.36/vapi/glib-2.0.vapi"
+ glong _tmp6_;
+ gchar* _tmp7_;
+#line 1347 "/usr/share/vala-0.40/vapi/glib-2.0.vapi"
g_return_val_if_fail (self != NULL, NULL);
-#line 1335 "/usr/share/vala-0.36/vapi/glib-2.0.vapi"
- _tmp1_ = offset;
-#line 1335 "/usr/share/vala-0.36/vapi/glib-2.0.vapi"
- if (_tmp1_ >= ((glong) 0)) {
-#line 472 "file.c"
- glong _tmp2_;
-#line 1335 "/usr/share/vala-0.36/vapi/glib-2.0.vapi"
- _tmp2_ = len;
-#line 1335 "/usr/share/vala-0.36/vapi/glib-2.0.vapi"
- _tmp0_ = _tmp2_ >= ((glong) 0);
-#line 478 "file.c"
+#line 1349 "/usr/share/vala-0.40/vapi/glib-2.0.vapi"
+ if (offset >= ((glong) 0)) {
+#line 1349 "/usr/share/vala-0.40/vapi/glib-2.0.vapi"
+ _tmp0_ = len >= ((glong) 0);
+#line 461 "file.c"
} else {
-#line 1335 "/usr/share/vala-0.36/vapi/glib-2.0.vapi"
+#line 1349 "/usr/share/vala-0.40/vapi/glib-2.0.vapi"
_tmp0_ = FALSE;
-#line 482 "file.c"
+#line 465 "file.c"
}
-#line 1335 "/usr/share/vala-0.36/vapi/glib-2.0.vapi"
+#line 1349 "/usr/share/vala-0.40/vapi/glib-2.0.vapi"
if (_tmp0_) {
-#line 486 "file.c"
- glong _tmp3_;
- glong _tmp4_;
- glong _tmp5_;
-#line 1337 "/usr/share/vala-0.36/vapi/glib-2.0.vapi"
- _tmp3_ = offset;
-#line 1337 "/usr/share/vala-0.36/vapi/glib-2.0.vapi"
- _tmp4_ = len;
-#line 1337 "/usr/share/vala-0.36/vapi/glib-2.0.vapi"
- _tmp5_ = string_strnlen ((gchar*) self, _tmp3_ + _tmp4_);
-#line 1337 "/usr/share/vala-0.36/vapi/glib-2.0.vapi"
- string_length = _tmp5_;
-#line 498 "file.c"
+#line 1351 "/usr/share/vala-0.40/vapi/glib-2.0.vapi"
+ string_length = string_strnlen ((gchar*) self, offset + len);
+#line 471 "file.c"
} else {
- gint _tmp6_;
- gint _tmp7_;
-#line 1339 "/usr/share/vala-0.36/vapi/glib-2.0.vapi"
- _tmp6_ = strlen (self);
-#line 1339 "/usr/share/vala-0.36/vapi/glib-2.0.vapi"
- _tmp7_ = _tmp6_;
-#line 1339 "/usr/share/vala-0.36/vapi/glib-2.0.vapi"
- string_length = (glong) _tmp7_;
-#line 508 "file.c"
+ gint _tmp1_;
+ gint _tmp2_;
+#line 1353 "/usr/share/vala-0.40/vapi/glib-2.0.vapi"
+ _tmp1_ = strlen (self);
+#line 1353 "/usr/share/vala-0.40/vapi/glib-2.0.vapi"
+ _tmp2_ = _tmp1_;
+#line 1353 "/usr/share/vala-0.40/vapi/glib-2.0.vapi"
+ string_length = (glong) _tmp2_;
+#line 481 "file.c"
}
-#line 1342 "/usr/share/vala-0.36/vapi/glib-2.0.vapi"
- _tmp8_ = offset;
-#line 1342 "/usr/share/vala-0.36/vapi/glib-2.0.vapi"
- if (_tmp8_ < ((glong) 0)) {
-#line 514 "file.c"
- glong _tmp9_;
- glong _tmp10_;
- glong _tmp11_;
-#line 1343 "/usr/share/vala-0.36/vapi/glib-2.0.vapi"
- _tmp9_ = string_length;
-#line 1343 "/usr/share/vala-0.36/vapi/glib-2.0.vapi"
- _tmp10_ = offset;
-#line 1343 "/usr/share/vala-0.36/vapi/glib-2.0.vapi"
- offset = _tmp9_ + _tmp10_;
-#line 1344 "/usr/share/vala-0.36/vapi/glib-2.0.vapi"
- _tmp11_ = offset;
-#line 1344 "/usr/share/vala-0.36/vapi/glib-2.0.vapi"
- g_return_val_if_fail (_tmp11_ >= ((glong) 0), NULL);
-#line 528 "file.c"
+#line 1356 "/usr/share/vala-0.40/vapi/glib-2.0.vapi"
+ if (offset < ((glong) 0)) {
+#line 485 "file.c"
+ glong _tmp3_;
+#line 1357 "/usr/share/vala-0.40/vapi/glib-2.0.vapi"
+ _tmp3_ = string_length;
+#line 1357 "/usr/share/vala-0.40/vapi/glib-2.0.vapi"
+ offset = _tmp3_ + offset;
+#line 1358 "/usr/share/vala-0.40/vapi/glib-2.0.vapi"
+ g_return_val_if_fail (offset >= ((glong) 0), NULL);
+#line 493 "file.c"
} else {
- glong _tmp12_;
- glong _tmp13_;
-#line 1346 "/usr/share/vala-0.36/vapi/glib-2.0.vapi"
- _tmp12_ = offset;
-#line 1346 "/usr/share/vala-0.36/vapi/glib-2.0.vapi"
- _tmp13_ = string_length;
-#line 1346 "/usr/share/vala-0.36/vapi/glib-2.0.vapi"
- g_return_val_if_fail (_tmp12_ <= _tmp13_, NULL);
-#line 538 "file.c"
+ glong _tmp4_;
+#line 1360 "/usr/share/vala-0.40/vapi/glib-2.0.vapi"
+ _tmp4_ = string_length;
+#line 1360 "/usr/share/vala-0.40/vapi/glib-2.0.vapi"
+ g_return_val_if_fail (offset <= _tmp4_, NULL);
+#line 500 "file.c"
}
-#line 1348 "/usr/share/vala-0.36/vapi/glib-2.0.vapi"
- _tmp14_ = len;
-#line 1348 "/usr/share/vala-0.36/vapi/glib-2.0.vapi"
- if (_tmp14_ < ((glong) 0)) {
-#line 544 "file.c"
- glong _tmp15_;
- glong _tmp16_;
-#line 1349 "/usr/share/vala-0.36/vapi/glib-2.0.vapi"
- _tmp15_ = string_length;
-#line 1349 "/usr/share/vala-0.36/vapi/glib-2.0.vapi"
- _tmp16_ = offset;
-#line 1349 "/usr/share/vala-0.36/vapi/glib-2.0.vapi"
- len = _tmp15_ - _tmp16_;
-#line 553 "file.c"
+#line 1362 "/usr/share/vala-0.40/vapi/glib-2.0.vapi"
+ if (len < ((glong) 0)) {
+#line 504 "file.c"
+ glong _tmp5_;
+#line 1363 "/usr/share/vala-0.40/vapi/glib-2.0.vapi"
+ _tmp5_ = string_length;
+#line 1363 "/usr/share/vala-0.40/vapi/glib-2.0.vapi"
+ len = _tmp5_ - offset;
+#line 510 "file.c"
}
-#line 1351 "/usr/share/vala-0.36/vapi/glib-2.0.vapi"
- _tmp17_ = offset;
-#line 1351 "/usr/share/vala-0.36/vapi/glib-2.0.vapi"
- _tmp18_ = len;
-#line 1351 "/usr/share/vala-0.36/vapi/glib-2.0.vapi"
- _tmp19_ = string_length;
-#line 1351 "/usr/share/vala-0.36/vapi/glib-2.0.vapi"
- g_return_val_if_fail ((_tmp17_ + _tmp18_) <= _tmp19_, NULL);
-#line 1352 "/usr/share/vala-0.36/vapi/glib-2.0.vapi"
- _tmp20_ = offset;
-#line 1352 "/usr/share/vala-0.36/vapi/glib-2.0.vapi"
- _tmp21_ = len;
-#line 1352 "/usr/share/vala-0.36/vapi/glib-2.0.vapi"
- _tmp22_ = g_strndup (((gchar*) self) + _tmp20_, (gsize) _tmp21_);
-#line 1352 "/usr/share/vala-0.36/vapi/glib-2.0.vapi"
- result = _tmp22_;
-#line 1352 "/usr/share/vala-0.36/vapi/glib-2.0.vapi"
+#line 1365 "/usr/share/vala-0.40/vapi/glib-2.0.vapi"
+ _tmp6_ = string_length;
+#line 1365 "/usr/share/vala-0.40/vapi/glib-2.0.vapi"
+ g_return_val_if_fail ((offset + len) <= _tmp6_, NULL);
+#line 1366 "/usr/share/vala-0.40/vapi/glib-2.0.vapi"
+ _tmp7_ = g_strndup (((gchar*) self) + offset, (gsize) len);
+#line 1366 "/usr/share/vala-0.40/vapi/glib-2.0.vapi"
+ result = _tmp7_;
+#line 1366 "/usr/share/vala-0.40/vapi/glib-2.0.vapi"
return result;
-#line 573 "file.c"
+#line 522 "file.c"
}
-void disassemble_filename (const gchar* basename, gchar* * name, gchar* * ext) {
+void
+disassemble_filename (const gchar* basename,
+ gchar* * name,
+ gchar* * ext)
+{
gchar* _vala_name = NULL;
gchar* _vala_ext = NULL;
glong offset = 0L;
- const gchar* _tmp0_;
- glong _tmp1_;
- glong _tmp2_;
+ glong _tmp0_;
#line 65 "/home/jens/Source/shotwell/src/util/file.vala"
g_return_if_fail (basename != NULL);
#line 66 "/home/jens/Source/shotwell/src/util/file.vala"
- _tmp0_ = basename;
-#line 66 "/home/jens/Source/shotwell/src/util/file.vala"
- _tmp1_ = find_last_offset (_tmp0_, '.');
-#line 66 "/home/jens/Source/shotwell/src/util/file.vala"
- offset = _tmp1_;
+ offset = find_last_offset (basename, '.');
#line 67 "/home/jens/Source/shotwell/src/util/file.vala"
- _tmp2_ = offset;
+ _tmp0_ = offset;
#line 67 "/home/jens/Source/shotwell/src/util/file.vala"
- if (_tmp2_ <= ((glong) 0)) {
-#line 596 "file.c"
- const gchar* _tmp3_;
- gchar* _tmp4_;
+ if (_tmp0_ <= ((glong) 0)) {
+#line 543 "file.c"
+ gchar* _tmp1_;
#line 68 "/home/jens/Source/shotwell/src/util/file.vala"
- _tmp3_ = basename;
-#line 68 "/home/jens/Source/shotwell/src/util/file.vala"
- _tmp4_ = g_strdup (_tmp3_);
+ _tmp1_ = g_strdup (basename);
#line 68 "/home/jens/Source/shotwell/src/util/file.vala"
_g_free0 (_vala_name);
#line 68 "/home/jens/Source/shotwell/src/util/file.vala"
- _vala_name = _tmp4_;
+ _vala_name = _tmp1_;
#line 69 "/home/jens/Source/shotwell/src/util/file.vala"
_g_free0 (_vala_ext);
#line 69 "/home/jens/Source/shotwell/src/util/file.vala"
_vala_ext = NULL;
-#line 611 "file.c"
+#line 555 "file.c"
} else {
- const gchar* _tmp5_;
- glong _tmp6_;
- gchar* _tmp7_;
- const gchar* _tmp8_;
- glong _tmp9_;
- gchar* _tmp10_;
-#line 71 "/home/jens/Source/shotwell/src/util/file.vala"
- _tmp5_ = basename;
+ glong _tmp2_;
+ gchar* _tmp3_;
+ glong _tmp4_;
+ gchar* _tmp5_;
#line 71 "/home/jens/Source/shotwell/src/util/file.vala"
- _tmp6_ = offset;
+ _tmp2_ = offset;
#line 71 "/home/jens/Source/shotwell/src/util/file.vala"
- _tmp7_ = string_substring (_tmp5_, (glong) 0, _tmp6_);
+ _tmp3_ = string_substring (basename, (glong) 0, _tmp2_);
#line 71 "/home/jens/Source/shotwell/src/util/file.vala"
_g_free0 (_vala_name);
#line 71 "/home/jens/Source/shotwell/src/util/file.vala"
- _vala_name = _tmp7_;
-#line 72 "/home/jens/Source/shotwell/src/util/file.vala"
- _tmp8_ = basename;
+ _vala_name = _tmp3_;
#line 72 "/home/jens/Source/shotwell/src/util/file.vala"
- _tmp9_ = offset;
+ _tmp4_ = offset;
#line 72 "/home/jens/Source/shotwell/src/util/file.vala"
- _tmp10_ = string_substring (_tmp8_, _tmp9_ + 1, (glong) -1);
+ _tmp5_ = string_substring (basename, _tmp4_ + 1, (glong) -1);
#line 72 "/home/jens/Source/shotwell/src/util/file.vala"
_g_free0 (_vala_ext);
#line 72 "/home/jens/Source/shotwell/src/util/file.vala"
- _vala_ext = _tmp10_;
-#line 639 "file.c"
+ _vala_ext = _tmp5_;
+#line 577 "file.c"
}
#line 65 "/home/jens/Source/shotwell/src/util/file.vala"
if (name) {
#line 65 "/home/jens/Source/shotwell/src/util/file.vala"
*name = _vala_name;
-#line 645 "file.c"
+#line 583 "file.c"
} else {
#line 65 "/home/jens/Source/shotwell/src/util/file.vala"
_g_free0 (_vala_name);
-#line 649 "file.c"
+#line 587 "file.c"
}
#line 65 "/home/jens/Source/shotwell/src/util/file.vala"
if (ext) {
#line 65 "/home/jens/Source/shotwell/src/util/file.vala"
*ext = _vala_ext;
-#line 655 "file.c"
+#line 593 "file.c"
} else {
#line 65 "/home/jens/Source/shotwell/src/util/file.vala"
_g_free0 (_vala_ext);
-#line 659 "file.c"
+#line 597 "file.c"
}
}
-guint64 query_total_file_size (GFile* file_or_dir, GCancellable* cancellable, GError** error) {
+guint64
+query_total_file_size (GFile* file_or_dir,
+ GCancellable* cancellable,
+ GError** error)
+{
guint64 result = 0ULL;
GFileType type = 0;
- GFile* _tmp0_;
- GFileType _tmp1_;
- GFileType _tmp2_;
+ GFileType _tmp0_;
GFileEnumerator* enumerator = NULL;
guint64 total_bytes = 0ULL;
GFileInfo* info = NULL;
@@ -675,99 +615,85 @@ guint64 query_total_file_size (GFile* file_or_dir, GCancellable* cancellable, GE
#line 77 "/home/jens/Source/shotwell/src/util/file.vala"
g_return_val_if_fail ((cancellable == NULL) || G_IS_CANCELLABLE (cancellable), 0ULL);
#line 78 "/home/jens/Source/shotwell/src/util/file.vala"
- _tmp0_ = file_or_dir;
-#line 78 "/home/jens/Source/shotwell/src/util/file.vala"
- _tmp1_ = g_file_query_file_type (_tmp0_, G_FILE_QUERY_INFO_NOFOLLOW_SYMLINKS, NULL);
-#line 78 "/home/jens/Source/shotwell/src/util/file.vala"
- type = _tmp1_;
+ type = g_file_query_file_type (file_or_dir, G_FILE_QUERY_INFO_NOFOLLOW_SYMLINKS, NULL);
#line 79 "/home/jens/Source/shotwell/src/util/file.vala"
- _tmp2_ = type;
+ _tmp0_ = type;
#line 79 "/home/jens/Source/shotwell/src/util/file.vala"
- if (_tmp2_ == G_FILE_TYPE_REGULAR) {
-#line 688 "file.c"
+ if (_tmp0_ == G_FILE_TYPE_REGULAR) {
+#line 624 "file.c"
GFileInfo* info = NULL;
- GFileInfo* _tmp17_;
- gint64 _tmp18_;
+ GFileInfo* _tmp12_;
#line 80 "/home/jens/Source/shotwell/src/util/file.vala"
info = NULL;
-#line 694 "file.c"
+#line 629 "file.c"
{
- GFileInfo* _tmp3_ = NULL;
- GFile* _tmp4_;
- GCancellable* _tmp5_;
- GFileInfo* _tmp6_;
- GFileInfo* _tmp7_;
-#line 82 "/home/jens/Source/shotwell/src/util/file.vala"
- _tmp4_ = file_or_dir;
+ GFileInfo* _tmp1_ = NULL;
+ GFileInfo* _tmp2_;
+ GFileInfo* _tmp3_;
#line 82 "/home/jens/Source/shotwell/src/util/file.vala"
- _tmp5_ = cancellable;
+ _tmp2_ = g_file_query_info (file_or_dir, G_FILE_ATTRIBUTE_STANDARD_SIZE, G_FILE_QUERY_INFO_NOFOLLOW_SYMLINKS, cancellable, &_inner_error_);
#line 82 "/home/jens/Source/shotwell/src/util/file.vala"
- _tmp6_ = g_file_query_info (_tmp4_, G_FILE_ATTRIBUTE_STANDARD_SIZE, G_FILE_QUERY_INFO_NOFOLLOW_SYMLINKS, _tmp5_, &_inner_error_);
-#line 82 "/home/jens/Source/shotwell/src/util/file.vala"
- _tmp3_ = _tmp6_;
+ _tmp1_ = _tmp2_;
#line 82 "/home/jens/Source/shotwell/src/util/file.vala"
if (G_UNLIKELY (_inner_error_ != NULL)) {
-#line 711 "file.c"
+#line 640 "file.c"
goto __catch1_g_error;
}
#line 82 "/home/jens/Source/shotwell/src/util/file.vala"
- _tmp7_ = _tmp3_;
+ _tmp3_ = _tmp1_;
#line 82 "/home/jens/Source/shotwell/src/util/file.vala"
- _tmp3_ = NULL;
+ _tmp1_ = NULL;
#line 82 "/home/jens/Source/shotwell/src/util/file.vala"
_g_object_unref0 (info);
#line 82 "/home/jens/Source/shotwell/src/util/file.vala"
- info = _tmp7_;
+ info = _tmp3_;
#line 81 "/home/jens/Source/shotwell/src/util/file.vala"
- _g_object_unref0 (_tmp3_);
-#line 724 "file.c"
+ _g_object_unref0 (_tmp1_);
+#line 653 "file.c"
}
goto __finally1;
__catch1_g_error:
{
GError* err = NULL;
- GError* _tmp8_;
- GFile* _tmp11_;
- gchar* _tmp12_;
- gchar* _tmp13_;
- GError* _tmp14_;
- const gchar* _tmp15_;
+ GError* _tmp4_;
+ gchar* _tmp7_;
+ gchar* _tmp8_;
+ GError* _tmp9_;
+ const gchar* _tmp10_;
#line 81 "/home/jens/Source/shotwell/src/util/file.vala"
err = _inner_error_;
#line 81 "/home/jens/Source/shotwell/src/util/file.vala"
_inner_error_ = NULL;
#line 85 "/home/jens/Source/shotwell/src/util/file.vala"
- _tmp8_ = err;
+ _tmp4_ = err;
#line 85 "/home/jens/Source/shotwell/src/util/file.vala"
- if (g_error_matches (_tmp8_, G_IO_ERROR, G_IO_ERROR_CANCELLED)) {
-#line 744 "file.c"
- GError* _tmp9_;
- GError* _tmp10_;
+ if (g_error_matches (_tmp4_, G_IO_ERROR, G_IO_ERROR_CANCELLED)) {
+#line 672 "file.c"
+ GError* _tmp5_;
+ GError* _tmp6_;
#line 86 "/home/jens/Source/shotwell/src/util/file.vala"
- _tmp9_ = err;
+ _tmp5_ = err;
#line 86 "/home/jens/Source/shotwell/src/util/file.vala"
- _tmp10_ = _g_error_copy0 (_tmp9_);
+ _tmp6_ = _g_error_copy0 (_tmp5_);
#line 86 "/home/jens/Source/shotwell/src/util/file.vala"
- _inner_error_ = _tmp10_;
+ _inner_error_ = _tmp6_;
#line 86 "/home/jens/Source/shotwell/src/util/file.vala"
_g_error_free0 (err);
-#line 755 "file.c"
+#line 683 "file.c"
goto __finally1;
}
#line 88 "/home/jens/Source/shotwell/src/util/file.vala"
- _tmp11_ = file_or_dir;
-#line 88 "/home/jens/Source/shotwell/src/util/file.vala"
- _tmp12_ = g_file_get_path (_tmp11_);
+ _tmp7_ = g_file_get_path (file_or_dir);
#line 88 "/home/jens/Source/shotwell/src/util/file.vala"
- _tmp13_ = _tmp12_;
+ _tmp8_ = _tmp7_;
#line 88 "/home/jens/Source/shotwell/src/util/file.vala"
- _tmp14_ = err;
+ _tmp9_ = err;
#line 88 "/home/jens/Source/shotwell/src/util/file.vala"
- _tmp15_ = _tmp14_->message;
+ _tmp10_ = _tmp9_->message;
#line 88 "/home/jens/Source/shotwell/src/util/file.vala"
- g_debug ("file.vala:88: Unable to query filesize for %s: %s", _tmp13_, _tmp15_);
+ g_debug ("file.vala:88: Unable to query filesize for %s: %s", _tmp8_, _tmp10_);
#line 88 "/home/jens/Source/shotwell/src/util/file.vala"
- _g_free0 (_tmp13_);
+ _g_free0 (_tmp8_);
#line 90 "/home/jens/Source/shotwell/src/util/file.vala"
result = (guint64) 0;
#line 90 "/home/jens/Source/shotwell/src/util/file.vala"
@@ -776,120 +702,112 @@ guint64 query_total_file_size (GFile* file_or_dir, GCancellable* cancellable, GE
_g_object_unref0 (info);
#line 90 "/home/jens/Source/shotwell/src/util/file.vala"
return result;
-#line 780 "file.c"
+#line 706 "file.c"
}
__finally1:
#line 81 "/home/jens/Source/shotwell/src/util/file.vala"
if (G_UNLIKELY (_inner_error_ != NULL)) {
-#line 785 "file.c"
- guint64 _tmp16_ = 0ULL;
+#line 711 "file.c"
+ guint64 _tmp11_ = 0ULL;
#line 81 "/home/jens/Source/shotwell/src/util/file.vala"
g_propagate_error (error, _inner_error_);
#line 81 "/home/jens/Source/shotwell/src/util/file.vala"
_g_object_unref0 (info);
#line 81 "/home/jens/Source/shotwell/src/util/file.vala"
- return _tmp16_;
-#line 793 "file.c"
+ return _tmp11_;
+#line 719 "file.c"
}
#line 93 "/home/jens/Source/shotwell/src/util/file.vala"
- _tmp17_ = info;
-#line 93 "/home/jens/Source/shotwell/src/util/file.vala"
- _tmp18_ = g_file_info_get_size (_tmp17_);
+ _tmp12_ = info;
#line 93 "/home/jens/Source/shotwell/src/util/file.vala"
- result = (guint64) _tmp18_;
+ result = (guint64) g_file_info_get_size (_tmp12_);
#line 93 "/home/jens/Source/shotwell/src/util/file.vala"
_g_object_unref0 (info);
#line 93 "/home/jens/Source/shotwell/src/util/file.vala"
return result;
-#line 805 "file.c"
+#line 729 "file.c"
} else {
- GFileType _tmp19_;
+ GFileType _tmp13_;
#line 94 "/home/jens/Source/shotwell/src/util/file.vala"
- _tmp19_ = type;
+ _tmp13_ = type;
#line 94 "/home/jens/Source/shotwell/src/util/file.vala"
- if (_tmp19_ != G_FILE_TYPE_DIRECTORY) {
+ if (_tmp13_ != G_FILE_TYPE_DIRECTORY) {
#line 95 "/home/jens/Source/shotwell/src/util/file.vala"
result = (guint64) 0;
#line 95 "/home/jens/Source/shotwell/src/util/file.vala"
return result;
-#line 816 "file.c"
+#line 740 "file.c"
}
}
{
- GFileEnumerator* _tmp20_ = NULL;
- GFile* _tmp21_;
- GCancellable* _tmp22_;
- GFileEnumerator* _tmp23_;
- GFileEnumerator* _tmp24_;
- GFileEnumerator* _tmp25_;
-#line 100 "/home/jens/Source/shotwell/src/util/file.vala"
- _tmp21_ = file_or_dir;
+ GFileEnumerator* _tmp14_ = NULL;
+ GFileEnumerator* _tmp15_;
+ GFileEnumerator* _tmp16_;
+ GFileEnumerator* _tmp17_;
#line 100 "/home/jens/Source/shotwell/src/util/file.vala"
- _tmp22_ = cancellable;
+ _tmp15_ = g_file_enumerate_children (file_or_dir, G_FILE_ATTRIBUTE_STANDARD_NAME, G_FILE_QUERY_INFO_NOFOLLOW_SYMLINKS, cancellable, &_inner_error_);
#line 100 "/home/jens/Source/shotwell/src/util/file.vala"
- _tmp23_ = g_file_enumerate_children (_tmp21_, G_FILE_ATTRIBUTE_STANDARD_NAME, G_FILE_QUERY_INFO_NOFOLLOW_SYMLINKS, _tmp22_, &_inner_error_);
-#line 100 "/home/jens/Source/shotwell/src/util/file.vala"
- _tmp20_ = _tmp23_;
+ _tmp14_ = _tmp15_;
#line 100 "/home/jens/Source/shotwell/src/util/file.vala"
if (G_UNLIKELY (_inner_error_ != NULL)) {
-#line 836 "file.c"
+#line 754 "file.c"
goto __catch2_g_error;
}
#line 100 "/home/jens/Source/shotwell/src/util/file.vala"
- _tmp24_ = _tmp20_;
+ _tmp16_ = _tmp14_;
#line 100 "/home/jens/Source/shotwell/src/util/file.vala"
- _tmp20_ = NULL;
+ _tmp14_ = NULL;
#line 100 "/home/jens/Source/shotwell/src/util/file.vala"
_g_object_unref0 (enumerator);
#line 100 "/home/jens/Source/shotwell/src/util/file.vala"
- enumerator = _tmp24_;
+ enumerator = _tmp16_;
#line 102 "/home/jens/Source/shotwell/src/util/file.vala"
- _tmp25_ = enumerator;
+ _tmp17_ = enumerator;
#line 102 "/home/jens/Source/shotwell/src/util/file.vala"
- if (_tmp25_ == NULL) {
+ if (_tmp17_ == NULL) {
#line 103 "/home/jens/Source/shotwell/src/util/file.vala"
result = (guint64) 0;
#line 103 "/home/jens/Source/shotwell/src/util/file.vala"
- _g_object_unref0 (_tmp20_);
+ _g_object_unref0 (_tmp14_);
#line 103 "/home/jens/Source/shotwell/src/util/file.vala"
_g_object_unref0 (enumerator);
#line 103 "/home/jens/Source/shotwell/src/util/file.vala"
return result;
-#line 859 "file.c"
+#line 777 "file.c"
}
#line 99 "/home/jens/Source/shotwell/src/util/file.vala"
- _g_object_unref0 (_tmp20_);
-#line 863 "file.c"
+ _g_object_unref0 (_tmp14_);
+#line 781 "file.c"
}
goto __finally2;
__catch2_g_error:
{
GError* err = NULL;
- gboolean _tmp26_ = FALSE;
- GError* _tmp27_;
- GError* _tmp29_;
- GError* _tmp30_;
+ gboolean _tmp18_ = FALSE;
+ GError* _tmp19_;
+ GError* _tmp21_;
+ GError* _tmp22_;
#line 99 "/home/jens/Source/shotwell/src/util/file.vala"
err = _inner_error_;
#line 99 "/home/jens/Source/shotwell/src/util/file.vala"
_inner_error_ = NULL;
#line 106 "/home/jens/Source/shotwell/src/util/file.vala"
- _tmp27_ = err;
+ _tmp19_ = err;
#line 106 "/home/jens/Source/shotwell/src/util/file.vala"
- if (g_error_matches (_tmp27_, G_FILE_ERROR, G_FILE_ERROR_PERM)) {
+ if (g_error_matches (_tmp19_, G_FILE_ERROR, G_FILE_ERROR_PERM)) {
#line 106 "/home/jens/Source/shotwell/src/util/file.vala"
- _tmp26_ = TRUE;
-#line 883 "file.c"
+ _tmp18_ = TRUE;
+#line 801 "file.c"
} else {
- GError* _tmp28_;
+ GError* _tmp20_;
#line 106 "/home/jens/Source/shotwell/src/util/file.vala"
- _tmp28_ = err;
+ _tmp20_ = err;
#line 106 "/home/jens/Source/shotwell/src/util/file.vala"
- _tmp26_ = g_error_matches (_tmp28_, G_IO_ERROR, G_IO_ERROR_PERMISSION_DENIED);
-#line 890 "file.c"
+ _tmp18_ = g_error_matches (_tmp20_, G_IO_ERROR, G_IO_ERROR_PERMISSION_DENIED);
+#line 808 "file.c"
}
#line 106 "/home/jens/Source/shotwell/src/util/file.vala"
- if (_tmp26_) {
+ if (_tmp18_) {
#line 107 "/home/jens/Source/shotwell/src/util/file.vala"
result = (guint64) 0;
#line 107 "/home/jens/Source/shotwell/src/util/file.vala"
@@ -898,31 +816,31 @@ guint64 query_total_file_size (GFile* file_or_dir, GCancellable* cancellable, GE
_g_object_unref0 (enumerator);
#line 107 "/home/jens/Source/shotwell/src/util/file.vala"
return result;
-#line 902 "file.c"
+#line 820 "file.c"
}
#line 109 "/home/jens/Source/shotwell/src/util/file.vala"
- _tmp29_ = err;
+ _tmp21_ = err;
#line 109 "/home/jens/Source/shotwell/src/util/file.vala"
- _tmp30_ = _g_error_copy0 (_tmp29_);
+ _tmp22_ = _g_error_copy0 (_tmp21_);
#line 109 "/home/jens/Source/shotwell/src/util/file.vala"
- _inner_error_ = _tmp30_;
+ _inner_error_ = _tmp22_;
#line 109 "/home/jens/Source/shotwell/src/util/file.vala"
_g_error_free0 (err);
-#line 912 "file.c"
+#line 830 "file.c"
goto __finally2;
}
__finally2:
#line 99 "/home/jens/Source/shotwell/src/util/file.vala"
if (G_UNLIKELY (_inner_error_ != NULL)) {
-#line 918 "file.c"
- guint64 _tmp31_ = 0ULL;
+#line 836 "file.c"
+ guint64 _tmp23_ = 0ULL;
#line 99 "/home/jens/Source/shotwell/src/util/file.vala"
g_propagate_error (error, _inner_error_);
#line 99 "/home/jens/Source/shotwell/src/util/file.vala"
_g_object_unref0 (enumerator);
#line 99 "/home/jens/Source/shotwell/src/util/file.vala"
- return _tmp31_;
-#line 926 "file.c"
+ return _tmp23_;
+#line 844 "file.c"
}
#line 112 "/home/jens/Source/shotwell/src/util/file.vala"
total_bytes = (guint64) 0;
@@ -930,35 +848,29 @@ guint64 query_total_file_size (GFile* file_or_dir, GCancellable* cancellable, GE
info = NULL;
#line 115 "/home/jens/Source/shotwell/src/util/file.vala"
while (TRUE) {
-#line 934 "file.c"
- GFileInfo* _tmp32_ = NULL;
- GFileEnumerator* _tmp33_;
- GCancellable* _tmp34_;
- GFileInfo* _tmp35_;
- GFileInfo* _tmp37_;
- GFileInfo* _tmp38_;
- guint64 _tmp39_ = 0ULL;
- GFile* _tmp40_;
- GFileInfo* _tmp41_;
- const gchar* _tmp42_;
- GFile* _tmp43_;
- GFile* _tmp44_;
- GCancellable* _tmp45_;
- guint64 _tmp46_;
- guint64 _tmp47_;
- guint64 _tmp49_;
-#line 115 "/home/jens/Source/shotwell/src/util/file.vala"
- _tmp33_ = enumerator;
+#line 852 "file.c"
+ GFileInfo* _tmp24_ = NULL;
+ GFileEnumerator* _tmp25_;
+ GFileInfo* _tmp26_;
+ GFileInfo* _tmp28_;
+ GFileInfo* _tmp29_;
+ guint64 _tmp30_ = 0ULL;
+ GFileInfo* _tmp31_;
+ const gchar* _tmp32_;
+ GFile* _tmp33_;
+ GFile* _tmp34_;
+ guint64 _tmp35_;
+ guint64 _tmp37_;
#line 115 "/home/jens/Source/shotwell/src/util/file.vala"
- _tmp34_ = cancellable;
+ _tmp25_ = enumerator;
#line 115 "/home/jens/Source/shotwell/src/util/file.vala"
- _tmp35_ = g_file_enumerator_next_file (_tmp33_, _tmp34_, &_inner_error_);
+ _tmp26_ = g_file_enumerator_next_file (_tmp25_, cancellable, &_inner_error_);
#line 115 "/home/jens/Source/shotwell/src/util/file.vala"
- _tmp32_ = _tmp35_;
+ _tmp24_ = _tmp26_;
#line 115 "/home/jens/Source/shotwell/src/util/file.vala"
if (G_UNLIKELY (_inner_error_ != NULL)) {
-#line 961 "file.c"
- guint64 _tmp36_ = 0ULL;
+#line 873 "file.c"
+ guint64 _tmp27_ = 0ULL;
#line 115 "/home/jens/Source/shotwell/src/util/file.vala"
g_propagate_error (error, _inner_error_);
#line 115 "/home/jens/Source/shotwell/src/util/file.vala"
@@ -966,70 +878,64 @@ guint64 query_total_file_size (GFile* file_or_dir, GCancellable* cancellable, GE
#line 115 "/home/jens/Source/shotwell/src/util/file.vala"
_g_object_unref0 (enumerator);
#line 115 "/home/jens/Source/shotwell/src/util/file.vala"
- return _tmp36_;
-#line 971 "file.c"
+ return _tmp27_;
+#line 883 "file.c"
}
#line 115 "/home/jens/Source/shotwell/src/util/file.vala"
- _tmp37_ = _tmp32_;
+ _tmp28_ = _tmp24_;
#line 115 "/home/jens/Source/shotwell/src/util/file.vala"
- _tmp32_ = NULL;
+ _tmp24_ = NULL;
#line 115 "/home/jens/Source/shotwell/src/util/file.vala"
_g_object_unref0 (info);
#line 115 "/home/jens/Source/shotwell/src/util/file.vala"
- info = _tmp37_;
+ info = _tmp28_;
#line 115 "/home/jens/Source/shotwell/src/util/file.vala"
- _tmp38_ = info;
+ _tmp29_ = info;
#line 115 "/home/jens/Source/shotwell/src/util/file.vala"
- if (!(_tmp38_ != NULL)) {
+ if (!(_tmp29_ != NULL)) {
#line 115 "/home/jens/Source/shotwell/src/util/file.vala"
- _g_object_unref0 (_tmp32_);
+ _g_object_unref0 (_tmp24_);
#line 115 "/home/jens/Source/shotwell/src/util/file.vala"
break;
-#line 989 "file.c"
+#line 901 "file.c"
}
#line 116 "/home/jens/Source/shotwell/src/util/file.vala"
- _tmp40_ = file_or_dir;
-#line 116 "/home/jens/Source/shotwell/src/util/file.vala"
- _tmp41_ = info;
+ _tmp31_ = info;
#line 116 "/home/jens/Source/shotwell/src/util/file.vala"
- _tmp42_ = g_file_info_get_name (_tmp41_);
+ _tmp32_ = g_file_info_get_name (_tmp31_);
#line 116 "/home/jens/Source/shotwell/src/util/file.vala"
- _tmp43_ = g_file_get_child (_tmp40_, _tmp42_);
+ _tmp33_ = g_file_get_child (file_or_dir, _tmp32_);
#line 116 "/home/jens/Source/shotwell/src/util/file.vala"
- _tmp44_ = _tmp43_;
+ _tmp34_ = _tmp33_;
#line 116 "/home/jens/Source/shotwell/src/util/file.vala"
- _tmp45_ = cancellable;
+ _tmp35_ = query_total_file_size (_tmp34_, cancellable, &_inner_error_);
#line 116 "/home/jens/Source/shotwell/src/util/file.vala"
- _tmp46_ = query_total_file_size (_tmp44_, _tmp45_, &_inner_error_);
+ _g_object_unref0 (_tmp34_);
#line 116 "/home/jens/Source/shotwell/src/util/file.vala"
- _tmp47_ = _tmp46_;
-#line 116 "/home/jens/Source/shotwell/src/util/file.vala"
- _g_object_unref0 (_tmp44_);
-#line 116 "/home/jens/Source/shotwell/src/util/file.vala"
- _tmp39_ = _tmp47_;
+ _tmp30_ = _tmp35_;
#line 116 "/home/jens/Source/shotwell/src/util/file.vala"
if (G_UNLIKELY (_inner_error_ != NULL)) {
-#line 1013 "file.c"
- guint64 _tmp48_ = 0ULL;
+#line 919 "file.c"
+ guint64 _tmp36_ = 0ULL;
#line 116 "/home/jens/Source/shotwell/src/util/file.vala"
g_propagate_error (error, _inner_error_);
#line 116 "/home/jens/Source/shotwell/src/util/file.vala"
- _g_object_unref0 (_tmp32_);
+ _g_object_unref0 (_tmp24_);
#line 116 "/home/jens/Source/shotwell/src/util/file.vala"
_g_object_unref0 (info);
#line 116 "/home/jens/Source/shotwell/src/util/file.vala"
_g_object_unref0 (enumerator);
#line 116 "/home/jens/Source/shotwell/src/util/file.vala"
- return _tmp48_;
-#line 1025 "file.c"
+ return _tmp36_;
+#line 931 "file.c"
}
#line 116 "/home/jens/Source/shotwell/src/util/file.vala"
- _tmp49_ = total_bytes;
+ _tmp37_ = total_bytes;
#line 116 "/home/jens/Source/shotwell/src/util/file.vala"
- total_bytes = _tmp49_ + _tmp39_;
+ total_bytes = _tmp37_ + _tmp30_;
#line 115 "/home/jens/Source/shotwell/src/util/file.vala"
- _g_object_unref0 (_tmp32_);
-#line 1033 "file.c"
+ _g_object_unref0 (_tmp24_);
+#line 939 "file.c"
}
#line 118 "/home/jens/Source/shotwell/src/util/file.vala"
result = total_bytes;
@@ -1039,19 +945,23 @@ guint64 query_total_file_size (GFile* file_or_dir, GCancellable* cancellable, GE
_g_object_unref0 (enumerator);
#line 118 "/home/jens/Source/shotwell/src/util/file.vala"
return result;
-#line 1043 "file.c"
+#line 949 "file.c"
}
-void delete_all_files (GFile* dir, GeeSet* exceptions, ProgressMonitor monitor, void* monitor_target, guint64 file_count, GCancellable* cancellable, GError** error) {
+void
+delete_all_files (GFile* dir,
+ GeeSet* exceptions,
+ ProgressMonitor monitor,
+ void* monitor_target,
+ guint64 file_count,
+ GCancellable* cancellable,
+ GError** error)
+{
GFileType type = 0;
- GFile* _tmp0_;
- GFileType _tmp1_;
- GFileType _tmp2_;
+ GFileType _tmp0_;
GFileEnumerator* enumerator = NULL;
- GFile* _tmp10_;
- GCancellable* _tmp11_;
- GFileEnumerator* _tmp12_;
+ GFileEnumerator* _tmp7_;
GFileInfo* info = NULL;
guint64 i = 0ULL;
GError * _inner_error_ = NULL;
@@ -1062,64 +972,53 @@ void delete_all_files (GFile* dir, GeeSet* exceptions, ProgressMonitor monitor,
#line 125 "/home/jens/Source/shotwell/src/util/file.vala"
g_return_if_fail ((cancellable == NULL) || G_IS_CANCELLABLE (cancellable));
#line 127 "/home/jens/Source/shotwell/src/util/file.vala"
- _tmp0_ = dir;
-#line 127 "/home/jens/Source/shotwell/src/util/file.vala"
- _tmp1_ = g_file_query_file_type (_tmp0_, G_FILE_QUERY_INFO_NOFOLLOW_SYMLINKS, NULL);
-#line 127 "/home/jens/Source/shotwell/src/util/file.vala"
- type = _tmp1_;
+ type = g_file_query_file_type (dir, G_FILE_QUERY_INFO_NOFOLLOW_SYMLINKS, NULL);
#line 128 "/home/jens/Source/shotwell/src/util/file.vala"
- _tmp2_ = type;
+ _tmp0_ = type;
#line 128 "/home/jens/Source/shotwell/src/util/file.vala"
- if (_tmp2_ != G_FILE_TYPE_DIRECTORY) {
-#line 1075 "file.c"
- GFile* _tmp3_;
+ if (_tmp0_ != G_FILE_TYPE_DIRECTORY) {
+#line 981 "file.c"
+ gchar* _tmp1_;
+ gchar* _tmp2_;
+ gchar* _tmp3_;
gchar* _tmp4_;
- gchar* _tmp5_;
- gchar* _tmp6_;
- gchar* _tmp7_;
- GError* _tmp8_;
- GError* _tmp9_;
-#line 129 "/home/jens/Source/shotwell/src/util/file.vala"
- _tmp3_ = dir;
+ GError* _tmp5_;
+ GError* _tmp6_;
#line 129 "/home/jens/Source/shotwell/src/util/file.vala"
- _tmp4_ = g_file_get_path (_tmp3_);
+ _tmp1_ = g_file_get_path (dir);
#line 129 "/home/jens/Source/shotwell/src/util/file.vala"
- _tmp5_ = _tmp4_;
+ _tmp2_ = _tmp1_;
#line 129 "/home/jens/Source/shotwell/src/util/file.vala"
- _tmp6_ = g_strdup_printf ("%s is not a directory", _tmp5_);
+ _tmp3_ = g_strdup_printf ("%s is not a directory", _tmp2_);
#line 129 "/home/jens/Source/shotwell/src/util/file.vala"
- _tmp7_ = _tmp6_;
+ _tmp4_ = _tmp3_;
#line 129 "/home/jens/Source/shotwell/src/util/file.vala"
- _tmp8_ = g_error_new_literal (G_IO_ERROR, G_IO_ERROR_NOT_DIRECTORY, _tmp7_);
+ _tmp5_ = g_error_new_literal (G_IO_ERROR, G_IO_ERROR_NOT_DIRECTORY, _tmp4_);
#line 129 "/home/jens/Source/shotwell/src/util/file.vala"
- _tmp9_ = _tmp8_;
+ _tmp6_ = _tmp5_;
#line 129 "/home/jens/Source/shotwell/src/util/file.vala"
- _g_free0 (_tmp7_);
+ _g_free0 (_tmp4_);
#line 129 "/home/jens/Source/shotwell/src/util/file.vala"
- _g_free0 (_tmp5_);
+ _g_free0 (_tmp2_);
#line 129 "/home/jens/Source/shotwell/src/util/file.vala"
- _inner_error_ = _tmp9_;
+ _inner_error_ = _tmp6_;
#line 129 "/home/jens/Source/shotwell/src/util/file.vala"
g_propagate_error (error, _inner_error_);
#line 129 "/home/jens/Source/shotwell/src/util/file.vala"
return;
-#line 1107 "file.c"
+#line 1010 "file.c"
}
#line 131 "/home/jens/Source/shotwell/src/util/file.vala"
- _tmp10_ = dir;
-#line 131 "/home/jens/Source/shotwell/src/util/file.vala"
- _tmp11_ = cancellable;
+ _tmp7_ = g_file_enumerate_children (dir, "standard::name,standard::type", G_FILE_QUERY_INFO_NOFOLLOW_SYMLINKS, cancellable, &_inner_error_);
#line 131 "/home/jens/Source/shotwell/src/util/file.vala"
- _tmp12_ = g_file_enumerate_children (_tmp10_, "standard::name,standard::type", G_FILE_QUERY_INFO_NOFOLLOW_SYMLINKS, _tmp11_, &_inner_error_);
-#line 131 "/home/jens/Source/shotwell/src/util/file.vala"
- enumerator = _tmp12_;
+ enumerator = _tmp7_;
#line 131 "/home/jens/Source/shotwell/src/util/file.vala"
if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 131 "/home/jens/Source/shotwell/src/util/file.vala"
g_propagate_error (error, _inner_error_);
#line 131 "/home/jens/Source/shotwell/src/util/file.vala"
return;
-#line 1123 "file.c"
+#line 1022 "file.c"
}
#line 133 "/home/jens/Source/shotwell/src/util/file.vala"
info = NULL;
@@ -1127,33 +1026,25 @@ void delete_all_files (GFile* dir, GeeSet* exceptions, ProgressMonitor monitor,
i = (guint64) 0;
#line 135 "/home/jens/Source/shotwell/src/util/file.vala"
while (TRUE) {
-#line 1131 "file.c"
- GFileInfo* _tmp13_ = NULL;
- GFileEnumerator* _tmp14_;
- GCancellable* _tmp15_;
- GFileInfo* _tmp16_;
- GFileInfo* _tmp17_;
- GFileInfo* _tmp18_;
- GFileInfo* _tmp19_;
- GFileType _tmp20_;
- gboolean _tmp21_ = FALSE;
- GeeSet* _tmp22_;
+#line 1030 "file.c"
+ GFileInfo* _tmp8_ = NULL;
+ GFileEnumerator* _tmp9_;
+ GFileInfo* _tmp10_;
+ GFileInfo* _tmp11_;
+ GFileInfo* _tmp12_;
+ GFileInfo* _tmp13_;
+ gboolean _tmp14_ = FALSE;
GFile* file = NULL;
- GFile* _tmp27_;
- GFileInfo* _tmp28_;
- const gchar* _tmp29_;
- GFile* _tmp30_;
- gboolean _tmp38_ = FALSE;
- ProgressMonitor _tmp39_;
- void* _tmp39__target;
-#line 135 "/home/jens/Source/shotwell/src/util/file.vala"
- _tmp14_ = enumerator;
+ GFileInfo* _tmp17_;
+ const gchar* _tmp18_;
+ GFile* _tmp19_;
+ gboolean _tmp26_ = FALSE;
#line 135 "/home/jens/Source/shotwell/src/util/file.vala"
- _tmp15_ = cancellable;
+ _tmp9_ = enumerator;
#line 135 "/home/jens/Source/shotwell/src/util/file.vala"
- _tmp16_ = g_file_enumerator_next_file (_tmp14_, _tmp15_, &_inner_error_);
+ _tmp10_ = g_file_enumerator_next_file (_tmp9_, cancellable, &_inner_error_);
#line 135 "/home/jens/Source/shotwell/src/util/file.vala"
- _tmp13_ = _tmp16_;
+ _tmp8_ = _tmp10_;
#line 135 "/home/jens/Source/shotwell/src/util/file.vala"
if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 135 "/home/jens/Source/shotwell/src/util/file.vala"
@@ -1164,94 +1055,79 @@ void delete_all_files (GFile* dir, GeeSet* exceptions, ProgressMonitor monitor,
_g_object_unref0 (enumerator);
#line 135 "/home/jens/Source/shotwell/src/util/file.vala"
return;
-#line 1168 "file.c"
+#line 1059 "file.c"
}
#line 135 "/home/jens/Source/shotwell/src/util/file.vala"
- _tmp17_ = _tmp13_;
+ _tmp11_ = _tmp8_;
#line 135 "/home/jens/Source/shotwell/src/util/file.vala"
- _tmp13_ = NULL;
+ _tmp8_ = NULL;
#line 135 "/home/jens/Source/shotwell/src/util/file.vala"
_g_object_unref0 (info);
#line 135 "/home/jens/Source/shotwell/src/util/file.vala"
- info = _tmp17_;
+ info = _tmp11_;
#line 135 "/home/jens/Source/shotwell/src/util/file.vala"
- _tmp18_ = info;
+ _tmp12_ = info;
#line 135 "/home/jens/Source/shotwell/src/util/file.vala"
- if (!(_tmp18_ != NULL)) {
+ if (!(_tmp12_ != NULL)) {
#line 135 "/home/jens/Source/shotwell/src/util/file.vala"
- _g_object_unref0 (_tmp13_);
+ _g_object_unref0 (_tmp8_);
#line 135 "/home/jens/Source/shotwell/src/util/file.vala"
break;
-#line 1186 "file.c"
+#line 1077 "file.c"
}
#line 136 "/home/jens/Source/shotwell/src/util/file.vala"
- _tmp19_ = info;
-#line 136 "/home/jens/Source/shotwell/src/util/file.vala"
- _tmp20_ = g_file_info_get_file_type (_tmp19_);
+ _tmp13_ = info;
#line 136 "/home/jens/Source/shotwell/src/util/file.vala"
- if (_tmp20_ != G_FILE_TYPE_REGULAR) {
+ if (g_file_info_get_file_type (_tmp13_) != G_FILE_TYPE_REGULAR) {
#line 137 "/home/jens/Source/shotwell/src/util/file.vala"
- _g_object_unref0 (_tmp13_);
+ _g_object_unref0 (_tmp8_);
#line 137 "/home/jens/Source/shotwell/src/util/file.vala"
continue;
-#line 1198 "file.c"
+#line 1087 "file.c"
}
#line 139 "/home/jens/Source/shotwell/src/util/file.vala"
- _tmp22_ = exceptions;
+ if (exceptions != NULL) {
+#line 1091 "file.c"
+ GFileInfo* _tmp15_;
+ const gchar* _tmp16_;
#line 139 "/home/jens/Source/shotwell/src/util/file.vala"
- if (_tmp22_ != NULL) {
-#line 1204 "file.c"
- GeeSet* _tmp23_;
- GFileInfo* _tmp24_;
- const gchar* _tmp25_;
- gboolean _tmp26_;
-#line 139 "/home/jens/Source/shotwell/src/util/file.vala"
- _tmp23_ = exceptions;
-#line 139 "/home/jens/Source/shotwell/src/util/file.vala"
- _tmp24_ = info;
-#line 139 "/home/jens/Source/shotwell/src/util/file.vala"
- _tmp25_ = g_file_info_get_name (_tmp24_);
+ _tmp15_ = info;
#line 139 "/home/jens/Source/shotwell/src/util/file.vala"
- _tmp26_ = gee_collection_contains (G_TYPE_CHECK_INSTANCE_CAST (_tmp23_, GEE_TYPE_COLLECTION, GeeCollection), _tmp25_);
+ _tmp16_ = g_file_info_get_name (_tmp15_);
#line 139 "/home/jens/Source/shotwell/src/util/file.vala"
- _tmp21_ = _tmp26_;
-#line 1219 "file.c"
+ _tmp14_ = gee_collection_contains (G_TYPE_CHECK_INSTANCE_CAST (exceptions, GEE_TYPE_COLLECTION, GeeCollection), _tmp16_);
+#line 1100 "file.c"
} else {
#line 139 "/home/jens/Source/shotwell/src/util/file.vala"
- _tmp21_ = FALSE;
-#line 1223 "file.c"
+ _tmp14_ = FALSE;
+#line 1104 "file.c"
}
#line 139 "/home/jens/Source/shotwell/src/util/file.vala"
- if (_tmp21_) {
+ if (_tmp14_) {
#line 140 "/home/jens/Source/shotwell/src/util/file.vala"
- _g_object_unref0 (_tmp13_);
+ _g_object_unref0 (_tmp8_);
#line 140 "/home/jens/Source/shotwell/src/util/file.vala"
continue;
-#line 1231 "file.c"
+#line 1112 "file.c"
}
#line 142 "/home/jens/Source/shotwell/src/util/file.vala"
- _tmp27_ = dir;
-#line 142 "/home/jens/Source/shotwell/src/util/file.vala"
- _tmp28_ = info;
+ _tmp17_ = info;
#line 142 "/home/jens/Source/shotwell/src/util/file.vala"
- _tmp29_ = g_file_info_get_name (_tmp28_);
+ _tmp18_ = g_file_info_get_name (_tmp17_);
#line 142 "/home/jens/Source/shotwell/src/util/file.vala"
- _tmp30_ = g_file_get_child (_tmp27_, _tmp29_);
+ _tmp19_ = g_file_get_child (dir, _tmp18_);
#line 142 "/home/jens/Source/shotwell/src/util/file.vala"
- file = _tmp30_;
-#line 1243 "file.c"
+ file = _tmp19_;
+#line 1122 "file.c"
{
- GFile* _tmp31_;
- GCancellable* _tmp32_;
-#line 144 "/home/jens/Source/shotwell/src/util/file.vala"
- _tmp31_ = file;
+ GFile* _tmp20_;
#line 144 "/home/jens/Source/shotwell/src/util/file.vala"
- _tmp32_ = cancellable;
+ _tmp20_ = file;
#line 144 "/home/jens/Source/shotwell/src/util/file.vala"
- g_file_delete (_tmp31_, _tmp32_, &_inner_error_);
+ g_file_delete (_tmp20_, cancellable, &_inner_error_);
#line 144 "/home/jens/Source/shotwell/src/util/file.vala"
if (G_UNLIKELY (_inner_error_ != NULL)) {
-#line 1255 "file.c"
+#line 1131 "file.c"
goto __catch3_g_error;
}
}
@@ -1259,32 +1135,32 @@ void delete_all_files (GFile* dir, GeeSet* exceptions, ProgressMonitor monitor,
__catch3_g_error:
{
GError* err = NULL;
- GFile* _tmp33_;
- gchar* _tmp34_;
- gchar* _tmp35_;
- GError* _tmp36_;
- const gchar* _tmp37_;
+ GFile* _tmp21_;
+ gchar* _tmp22_;
+ gchar* _tmp23_;
+ GError* _tmp24_;
+ const gchar* _tmp25_;
#line 143 "/home/jens/Source/shotwell/src/util/file.vala"
err = _inner_error_;
#line 143 "/home/jens/Source/shotwell/src/util/file.vala"
_inner_error_ = NULL;
#line 146 "/home/jens/Source/shotwell/src/util/file.vala"
- _tmp33_ = file;
+ _tmp21_ = file;
#line 146 "/home/jens/Source/shotwell/src/util/file.vala"
- _tmp34_ = g_file_get_path (_tmp33_);
+ _tmp22_ = g_file_get_path (_tmp21_);
#line 146 "/home/jens/Source/shotwell/src/util/file.vala"
- _tmp35_ = _tmp34_;
+ _tmp23_ = _tmp22_;
#line 146 "/home/jens/Source/shotwell/src/util/file.vala"
- _tmp36_ = err;
+ _tmp24_ = err;
#line 146 "/home/jens/Source/shotwell/src/util/file.vala"
- _tmp37_ = _tmp36_->message;
+ _tmp25_ = _tmp24_->message;
#line 146 "/home/jens/Source/shotwell/src/util/file.vala"
- g_warning ("file.vala:146: Unable to delete file %s: %s", _tmp35_, _tmp37_);
+ g_warning ("file.vala:146: Unable to delete file %s: %s", _tmp23_, _tmp25_);
#line 146 "/home/jens/Source/shotwell/src/util/file.vala"
- _g_free0 (_tmp35_);
+ _g_free0 (_tmp23_);
#line 143 "/home/jens/Source/shotwell/src/util/file.vala"
_g_error_free0 (err);
-#line 1288 "file.c"
+#line 1164 "file.c"
}
__finally3:
#line 143 "/home/jens/Source/shotwell/src/util/file.vala"
@@ -1294,304 +1170,273 @@ void delete_all_files (GFile* dir, GeeSet* exceptions, ProgressMonitor monitor,
#line 143 "/home/jens/Source/shotwell/src/util/file.vala"
_g_object_unref0 (file);
#line 143 "/home/jens/Source/shotwell/src/util/file.vala"
- _g_object_unref0 (_tmp13_);
+ _g_object_unref0 (_tmp8_);
#line 143 "/home/jens/Source/shotwell/src/util/file.vala"
_g_object_unref0 (info);
#line 143 "/home/jens/Source/shotwell/src/util/file.vala"
_g_object_unref0 (enumerator);
#line 143 "/home/jens/Source/shotwell/src/util/file.vala"
return;
-#line 1305 "file.c"
+#line 1181 "file.c"
}
#line 149 "/home/jens/Source/shotwell/src/util/file.vala"
- _tmp39_ = monitor;
-#line 149 "/home/jens/Source/shotwell/src/util/file.vala"
- _tmp39__target = monitor_target;
+ if (monitor != NULL) {
#line 149 "/home/jens/Source/shotwell/src/util/file.vala"
- if (_tmp39_ != NULL) {
-#line 1313 "file.c"
- guint64 _tmp40_;
-#line 149 "/home/jens/Source/shotwell/src/util/file.vala"
- _tmp40_ = file_count;
-#line 149 "/home/jens/Source/shotwell/src/util/file.vala"
- _tmp38_ = _tmp40_ > ((guint64) 0);
-#line 1319 "file.c"
+ _tmp26_ = file_count > ((guint64) 0);
+#line 1187 "file.c"
} else {
#line 149 "/home/jens/Source/shotwell/src/util/file.vala"
- _tmp38_ = FALSE;
-#line 1323 "file.c"
+ _tmp26_ = FALSE;
+#line 1191 "file.c"
}
#line 149 "/home/jens/Source/shotwell/src/util/file.vala"
- if (_tmp38_) {
-#line 1327 "file.c"
- ProgressMonitor _tmp41_;
- void* _tmp41__target;
- guint64 _tmp42_;
- guint64 _tmp43_;
- guint64 _tmp44_;
-#line 150 "/home/jens/Source/shotwell/src/util/file.vala"
- _tmp41_ = monitor;
-#line 150 "/home/jens/Source/shotwell/src/util/file.vala"
- _tmp41__target = monitor_target;
-#line 150 "/home/jens/Source/shotwell/src/util/file.vala"
- _tmp42_ = file_count;
+ if (_tmp26_) {
+#line 1195 "file.c"
+ guint64 _tmp27_;
+ guint64 _tmp28_;
#line 150 "/home/jens/Source/shotwell/src/util/file.vala"
- _tmp43_ = i;
+ _tmp27_ = i;
#line 150 "/home/jens/Source/shotwell/src/util/file.vala"
- i = _tmp43_ + 1;
+ i = _tmp27_ + 1;
#line 150 "/home/jens/Source/shotwell/src/util/file.vala"
- _tmp44_ = i;
+ _tmp28_ = i;
#line 150 "/home/jens/Source/shotwell/src/util/file.vala"
- _tmp41_ (_tmp42_, _tmp44_, TRUE, _tmp41__target);
-#line 1347 "file.c"
+ monitor (file_count, _tmp28_, TRUE, monitor_target);
+#line 1206 "file.c"
}
#line 135 "/home/jens/Source/shotwell/src/util/file.vala"
_g_object_unref0 (file);
#line 135 "/home/jens/Source/shotwell/src/util/file.vala"
- _g_object_unref0 (_tmp13_);
-#line 1353 "file.c"
+ _g_object_unref0 (_tmp8_);
+#line 1212 "file.c"
}
#line 125 "/home/jens/Source/shotwell/src/util/file.vala"
_g_object_unref0 (info);
#line 125 "/home/jens/Source/shotwell/src/util/file.vala"
_g_object_unref0 (enumerator);
-#line 1359 "file.c"
+#line 1218 "file.c"
}
-time_t query_file_modified (GFile* file, GError** error) {
+time_t
+query_file_modified (GFile* file,
+ GError** error)
+{
time_t result = 0;
GFileInfo* info = NULL;
- GFile* _tmp0_;
- GFileInfo* _tmp1_;
- GTimeVal _tmp3_ = {0};
- glong _tmp4_;
+ GFileInfo* _tmp0_;
+ GTimeVal _tmp2_ = {0};
+ glong _tmp3_;
GError * _inner_error_ = NULL;
#line 154 "/home/jens/Source/shotwell/src/util/file.vala"
g_return_val_if_fail (G_IS_FILE (file), 0);
#line 155 "/home/jens/Source/shotwell/src/util/file.vala"
- _tmp0_ = file;
-#line 155 "/home/jens/Source/shotwell/src/util/file.vala"
- _tmp1_ = g_file_query_info (_tmp0_, G_FILE_ATTRIBUTE_TIME_MODIFIED, G_FILE_QUERY_INFO_NOFOLLOW_SYMLINKS, NULL, &_inner_error_);
+ _tmp0_ = g_file_query_info (file, G_FILE_ATTRIBUTE_TIME_MODIFIED, G_FILE_QUERY_INFO_NOFOLLOW_SYMLINKS, NULL, &_inner_error_);
#line 155 "/home/jens/Source/shotwell/src/util/file.vala"
- info = _tmp1_;
+ info = _tmp0_;
#line 155 "/home/jens/Source/shotwell/src/util/file.vala"
if (G_UNLIKELY (_inner_error_ != NULL)) {
-#line 1381 "file.c"
- time_t _tmp2_ = 0;
+#line 1240 "file.c"
+ time_t _tmp1_ = 0;
#line 155 "/home/jens/Source/shotwell/src/util/file.vala"
g_propagate_error (error, _inner_error_);
#line 155 "/home/jens/Source/shotwell/src/util/file.vala"
- return _tmp2_;
-#line 1387 "file.c"
+ return _tmp1_;
+#line 1246 "file.c"
}
#line 158 "/home/jens/Source/shotwell/src/util/file.vala"
- g_file_info_get_modification_time (info, &_tmp3_);
+ g_file_info_get_modification_time (info, &_tmp2_);
#line 158 "/home/jens/Source/shotwell/src/util/file.vala"
- _tmp4_ = _tmp3_.tv_sec;
+ _tmp3_ = _tmp2_.tv_sec;
#line 158 "/home/jens/Source/shotwell/src/util/file.vala"
- result = (time_t) _tmp4_;
+ result = (time_t) _tmp3_;
#line 158 "/home/jens/Source/shotwell/src/util/file.vala"
_g_object_unref0 (info);
#line 158 "/home/jens/Source/shotwell/src/util/file.vala"
return result;
-#line 1399 "file.c"
+#line 1258 "file.c"
}
-gboolean query_is_directory (GFile* file) {
+gboolean
+query_is_directory (GFile* file)
+{
gboolean result = FALSE;
- GFile* _tmp0_;
- GFileType _tmp1_;
#line 161 "/home/jens/Source/shotwell/src/util/file.vala"
g_return_val_if_fail (G_IS_FILE (file), FALSE);
#line 162 "/home/jens/Source/shotwell/src/util/file.vala"
- _tmp0_ = file;
-#line 162 "/home/jens/Source/shotwell/src/util/file.vala"
- _tmp1_ = g_file_query_file_type (_tmp0_, G_FILE_QUERY_INFO_NOFOLLOW_SYMLINKS, NULL);
-#line 162 "/home/jens/Source/shotwell/src/util/file.vala"
- result = _tmp1_ == G_FILE_TYPE_DIRECTORY;
+ result = g_file_query_file_type (file, G_FILE_QUERY_INFO_NOFOLLOW_SYMLINKS, NULL) == G_FILE_TYPE_DIRECTORY;
#line 162 "/home/jens/Source/shotwell/src/util/file.vala"
return result;
-#line 1417 "file.c"
+#line 1272 "file.c"
}
-gboolean query_is_directory_empty (GFile* dir, GError** error) {
+gboolean
+query_is_directory_empty (GFile* dir,
+ GError** error)
+{
gboolean result = FALSE;
- GFile* _tmp0_;
- GFileType _tmp1_;
GFileEnumerator* enumerator = NULL;
- GFile* _tmp2_;
- GFileEnumerator* _tmp3_;
- GFileEnumerator* _tmp5_;
- GFileInfo* _tmp6_ = NULL;
- GFileEnumerator* _tmp7_;
- GFileInfo* _tmp8_;
+ GFileEnumerator* _tmp0_;
+ GFileEnumerator* _tmp2_;
+ GFileInfo* _tmp3_ = NULL;
+ GFileEnumerator* _tmp4_;
+ GFileInfo* _tmp5_;
GError * _inner_error_ = NULL;
#line 165 "/home/jens/Source/shotwell/src/util/file.vala"
g_return_val_if_fail (G_IS_FILE (dir), FALSE);
#line 166 "/home/jens/Source/shotwell/src/util/file.vala"
- _tmp0_ = dir;
-#line 166 "/home/jens/Source/shotwell/src/util/file.vala"
- _tmp1_ = g_file_query_file_type (_tmp0_, G_FILE_QUERY_INFO_NOFOLLOW_SYMLINKS, NULL);
-#line 166 "/home/jens/Source/shotwell/src/util/file.vala"
- if (_tmp1_ != G_FILE_TYPE_DIRECTORY) {
+ if (g_file_query_file_type (dir, G_FILE_QUERY_INFO_NOFOLLOW_SYMLINKS, NULL) != G_FILE_TYPE_DIRECTORY) {
#line 167 "/home/jens/Source/shotwell/src/util/file.vala"
result = FALSE;
#line 167 "/home/jens/Source/shotwell/src/util/file.vala"
return result;
-#line 1445 "file.c"
+#line 1296 "file.c"
}
#line 169 "/home/jens/Source/shotwell/src/util/file.vala"
- _tmp2_ = dir;
-#line 169 "/home/jens/Source/shotwell/src/util/file.vala"
- _tmp3_ = g_file_enumerate_children (_tmp2_, "standard::name", G_FILE_QUERY_INFO_NOFOLLOW_SYMLINKS, NULL, &_inner_error_);
+ _tmp0_ = g_file_enumerate_children (dir, "standard::name", G_FILE_QUERY_INFO_NOFOLLOW_SYMLINKS, NULL, &_inner_error_);
#line 169 "/home/jens/Source/shotwell/src/util/file.vala"
- enumerator = _tmp3_;
+ enumerator = _tmp0_;
#line 169 "/home/jens/Source/shotwell/src/util/file.vala"
if (G_UNLIKELY (_inner_error_ != NULL)) {
-#line 1455 "file.c"
- gboolean _tmp4_ = FALSE;
+#line 1304 "file.c"
+ gboolean _tmp1_ = FALSE;
#line 169 "/home/jens/Source/shotwell/src/util/file.vala"
g_propagate_error (error, _inner_error_);
#line 169 "/home/jens/Source/shotwell/src/util/file.vala"
- return _tmp4_;
-#line 1461 "file.c"
+ return _tmp1_;
+#line 1310 "file.c"
}
#line 171 "/home/jens/Source/shotwell/src/util/file.vala"
- _tmp5_ = enumerator;
+ _tmp2_ = enumerator;
#line 171 "/home/jens/Source/shotwell/src/util/file.vala"
- if (_tmp5_ == NULL) {
+ if (_tmp2_ == NULL) {
#line 172 "/home/jens/Source/shotwell/src/util/file.vala"
result = FALSE;
#line 172 "/home/jens/Source/shotwell/src/util/file.vala"
_g_object_unref0 (enumerator);
#line 172 "/home/jens/Source/shotwell/src/util/file.vala"
return result;
-#line 1473 "file.c"
+#line 1322 "file.c"
}
#line 174 "/home/jens/Source/shotwell/src/util/file.vala"
- _tmp7_ = enumerator;
+ _tmp4_ = enumerator;
#line 174 "/home/jens/Source/shotwell/src/util/file.vala"
- _tmp8_ = g_file_enumerator_next_file (_tmp7_, NULL, &_inner_error_);
+ _tmp5_ = g_file_enumerator_next_file (_tmp4_, NULL, &_inner_error_);
#line 174 "/home/jens/Source/shotwell/src/util/file.vala"
- _tmp6_ = _tmp8_;
+ _tmp3_ = _tmp5_;
#line 174 "/home/jens/Source/shotwell/src/util/file.vala"
if (G_UNLIKELY (_inner_error_ != NULL)) {
-#line 1483 "file.c"
- gboolean _tmp9_ = FALSE;
+#line 1332 "file.c"
+ gboolean _tmp6_ = FALSE;
#line 174 "/home/jens/Source/shotwell/src/util/file.vala"
g_propagate_error (error, _inner_error_);
#line 174 "/home/jens/Source/shotwell/src/util/file.vala"
_g_object_unref0 (enumerator);
#line 174 "/home/jens/Source/shotwell/src/util/file.vala"
- return _tmp9_;
-#line 1491 "file.c"
+ return _tmp6_;
+#line 1340 "file.c"
}
#line 174 "/home/jens/Source/shotwell/src/util/file.vala"
- result = _tmp6_ == NULL;
+ result = _tmp3_ == NULL;
#line 174 "/home/jens/Source/shotwell/src/util/file.vala"
- _g_object_unref0 (_tmp6_);
+ _g_object_unref0 (_tmp3_);
#line 174 "/home/jens/Source/shotwell/src/util/file.vala"
_g_object_unref0 (enumerator);
#line 174 "/home/jens/Source/shotwell/src/util/file.vala"
return result;
-#line 1501 "file.c"
+#line 1350 "file.c"
}
-gchar* get_display_pathname (GFile* file) {
+gchar*
+get_display_pathname (GFile* file)
+{
gchar* result = NULL;
gchar* path = NULL;
- GFile* _tmp0_;
- gchar* _tmp1_;
+ gchar* _tmp0_;
gchar* home = NULL;
- const gchar* _tmp2_;
- gchar* _tmp3_;
+ const gchar* _tmp1_;
+ gchar* _tmp2_;
+ const gchar* _tmp3_;
const gchar* _tmp4_;
- const gchar* _tmp5_;
+ const gchar* _tmp6_;
const gchar* _tmp7_;
- const gchar* _tmp8_;
- gboolean _tmp9_;
#line 177 "/home/jens/Source/shotwell/src/util/file.vala"
g_return_val_if_fail (G_IS_FILE (file), NULL);
#line 179 "/home/jens/Source/shotwell/src/util/file.vala"
- _tmp0_ = file;
-#line 179 "/home/jens/Source/shotwell/src/util/file.vala"
- _tmp1_ = g_file_get_parse_name (_tmp0_);
+ _tmp0_ = g_file_get_parse_name (file);
#line 179 "/home/jens/Source/shotwell/src/util/file.vala"
- path = _tmp1_;
+ path = _tmp0_;
#line 180 "/home/jens/Source/shotwell/src/util/file.vala"
- _tmp2_ = g_get_home_dir ();
+ _tmp1_ = g_get_home_dir ();
#line 180 "/home/jens/Source/shotwell/src/util/file.vala"
- _tmp3_ = g_strdup (_tmp2_);
+ _tmp2_ = g_strdup (_tmp1_);
#line 180 "/home/jens/Source/shotwell/src/util/file.vala"
- home = _tmp3_;
+ home = _tmp2_;
#line 182 "/home/jens/Source/shotwell/src/util/file.vala"
- _tmp4_ = path;
+ _tmp3_ = path;
#line 182 "/home/jens/Source/shotwell/src/util/file.vala"
- _tmp5_ = home;
+ _tmp4_ = home;
#line 182 "/home/jens/Source/shotwell/src/util/file.vala"
- if (g_strcmp0 (_tmp4_, _tmp5_) == 0) {
-#line 1538 "file.c"
- gchar* _tmp6_;
+ if (g_strcmp0 (_tmp3_, _tmp4_) == 0) {
+#line 1385 "file.c"
+ gchar* _tmp5_;
#line 183 "/home/jens/Source/shotwell/src/util/file.vala"
- _tmp6_ = g_strdup ("~");
+ _tmp5_ = g_strdup ("~");
#line 183 "/home/jens/Source/shotwell/src/util/file.vala"
- result = _tmp6_;
+ result = _tmp5_;
#line 183 "/home/jens/Source/shotwell/src/util/file.vala"
_g_free0 (home);
#line 183 "/home/jens/Source/shotwell/src/util/file.vala"
_g_free0 (path);
#line 183 "/home/jens/Source/shotwell/src/util/file.vala"
return result;
-#line 1550 "file.c"
+#line 1397 "file.c"
}
#line 185 "/home/jens/Source/shotwell/src/util/file.vala"
- _tmp7_ = path;
+ _tmp6_ = path;
#line 185 "/home/jens/Source/shotwell/src/util/file.vala"
- _tmp8_ = home;
+ _tmp7_ = home;
#line 185 "/home/jens/Source/shotwell/src/util/file.vala"
- _tmp9_ = g_str_has_prefix (_tmp7_, _tmp8_);
-#line 185 "/home/jens/Source/shotwell/src/util/file.vala"
- if (_tmp9_) {
-#line 1560 "file.c"
- const gchar* _tmp10_;
- const gchar* _tmp11_;
- gint _tmp12_;
- gint _tmp13_;
+ if (g_str_has_prefix (_tmp6_, _tmp7_)) {
+#line 1405 "file.c"
+ const gchar* _tmp8_;
+ const gchar* _tmp9_;
+ gint _tmp10_;
+ gint _tmp11_;
+ gchar* _tmp12_;
+ gchar* _tmp13_;
gchar* _tmp14_;
gchar* _tmp15_;
- gchar* _tmp16_;
- gchar* _tmp17_;
#line 186 "/home/jens/Source/shotwell/src/util/file.vala"
- _tmp10_ = path;
+ _tmp8_ = path;
#line 186 "/home/jens/Source/shotwell/src/util/file.vala"
- _tmp11_ = home;
+ _tmp9_ = home;
#line 186 "/home/jens/Source/shotwell/src/util/file.vala"
- _tmp12_ = strlen (_tmp11_);
+ _tmp10_ = strlen (_tmp9_);
#line 186 "/home/jens/Source/shotwell/src/util/file.vala"
- _tmp13_ = _tmp12_;
+ _tmp11_ = _tmp10_;
#line 186 "/home/jens/Source/shotwell/src/util/file.vala"
- _tmp14_ = string_substring (_tmp10_, (glong) _tmp13_, (glong) -1);
+ _tmp12_ = string_substring (_tmp8_, (glong) _tmp11_, (glong) -1);
#line 186 "/home/jens/Source/shotwell/src/util/file.vala"
- _tmp15_ = _tmp14_;
+ _tmp13_ = _tmp12_;
#line 186 "/home/jens/Source/shotwell/src/util/file.vala"
- _tmp16_ = g_strdup_printf ("~%s", _tmp15_);
+ _tmp14_ = g_strdup_printf ("~%s", _tmp13_);
#line 186 "/home/jens/Source/shotwell/src/util/file.vala"
- _tmp17_ = _tmp16_;
+ _tmp15_ = _tmp14_;
#line 186 "/home/jens/Source/shotwell/src/util/file.vala"
- _g_free0 (_tmp15_);
+ _g_free0 (_tmp13_);
#line 186 "/home/jens/Source/shotwell/src/util/file.vala"
- result = _tmp17_;
+ result = _tmp15_;
#line 186 "/home/jens/Source/shotwell/src/util/file.vala"
_g_free0 (home);
#line 186 "/home/jens/Source/shotwell/src/util/file.vala"
_g_free0 (path);
#line 186 "/home/jens/Source/shotwell/src/util/file.vala"
return result;
-#line 1595 "file.c"
+#line 1440 "file.c"
}
#line 188 "/home/jens/Source/shotwell/src/util/file.vala"
result = path;
@@ -1599,213 +1444,180 @@ gchar* get_display_pathname (GFile* file) {
_g_free0 (home);
#line 188 "/home/jens/Source/shotwell/src/util/file.vala"
return result;
-#line 1603 "file.c"
+#line 1448 "file.c"
}
-gchar* strip_pretty_path (const gchar* path) {
+gchar*
+strip_pretty_path (const gchar* path)
+{
gchar* result = NULL;
- const gchar* _tmp0_;
- gboolean _tmp1_;
- const gchar* _tmp4_;
- const gchar* _tmp5_;
- gchar* _tmp6_;
- gchar* _tmp7_;
- gchar* _tmp8_;
- gchar* _tmp9_;
+ const gchar* _tmp1_;
+ gchar* _tmp2_;
+ gchar* _tmp3_;
+ gchar* _tmp4_;
+ gchar* _tmp5_;
#line 191 "/home/jens/Source/shotwell/src/util/file.vala"
g_return_val_if_fail (path != NULL, NULL);
#line 192 "/home/jens/Source/shotwell/src/util/file.vala"
- _tmp0_ = path;
-#line 192 "/home/jens/Source/shotwell/src/util/file.vala"
- _tmp1_ = g_str_has_prefix (_tmp0_, "~");
-#line 192 "/home/jens/Source/shotwell/src/util/file.vala"
- if (!_tmp1_) {
-#line 1625 "file.c"
- const gchar* _tmp2_;
- gchar* _tmp3_;
+ if (!g_str_has_prefix (path, "~")) {
+#line 1465 "file.c"
+ gchar* _tmp0_;
#line 193 "/home/jens/Source/shotwell/src/util/file.vala"
- _tmp2_ = path;
+ _tmp0_ = g_strdup (path);
#line 193 "/home/jens/Source/shotwell/src/util/file.vala"
- _tmp3_ = g_strdup (_tmp2_);
-#line 193 "/home/jens/Source/shotwell/src/util/file.vala"
- result = _tmp3_;
+ result = _tmp0_;
#line 193 "/home/jens/Source/shotwell/src/util/file.vala"
return result;
-#line 1636 "file.c"
+#line 1473 "file.c"
}
#line 195 "/home/jens/Source/shotwell/src/util/file.vala"
- _tmp4_ = g_get_home_dir ();
-#line 195 "/home/jens/Source/shotwell/src/util/file.vala"
- _tmp5_ = path;
+ _tmp1_ = g_get_home_dir ();
#line 195 "/home/jens/Source/shotwell/src/util/file.vala"
- _tmp6_ = string_substring (_tmp5_, (glong) 1, (glong) -1);
+ _tmp2_ = string_substring (path, (glong) 1, (glong) -1);
#line 195 "/home/jens/Source/shotwell/src/util/file.vala"
- _tmp7_ = _tmp6_;
+ _tmp3_ = _tmp2_;
#line 195 "/home/jens/Source/shotwell/src/util/file.vala"
- _tmp8_ = g_strconcat (_tmp4_, _tmp7_, NULL);
+ _tmp4_ = g_strconcat (_tmp1_, _tmp3_, NULL);
#line 195 "/home/jens/Source/shotwell/src/util/file.vala"
- _tmp9_ = _tmp8_;
+ _tmp5_ = _tmp4_;
#line 195 "/home/jens/Source/shotwell/src/util/file.vala"
- _g_free0 (_tmp7_);
+ _g_free0 (_tmp3_);
#line 195 "/home/jens/Source/shotwell/src/util/file.vala"
- result = _tmp9_;
+ result = _tmp5_;
#line 195 "/home/jens/Source/shotwell/src/util/file.vala"
return result;
-#line 1656 "file.c"
+#line 1491 "file.c"
}
-gchar* get_file_info_id (GFileInfo* info) {
+gchar*
+get_file_info_id (GFileInfo* info)
+{
gchar* result = NULL;
- GFileInfo* _tmp0_;
- const gchar* _tmp1_;
- gchar* _tmp2_;
+ const gchar* _tmp0_;
+ gchar* _tmp1_;
#line 198 "/home/jens/Source/shotwell/src/util/file.vala"
g_return_val_if_fail (G_IS_FILE_INFO (info), NULL);
#line 199 "/home/jens/Source/shotwell/src/util/file.vala"
- _tmp0_ = info;
-#line 199 "/home/jens/Source/shotwell/src/util/file.vala"
- _tmp1_ = g_file_info_get_attribute_string (_tmp0_, G_FILE_ATTRIBUTE_ID_FILE);
+ _tmp0_ = g_file_info_get_attribute_string (info, G_FILE_ATTRIBUTE_ID_FILE);
#line 199 "/home/jens/Source/shotwell/src/util/file.vala"
- _tmp2_ = g_strdup (_tmp1_);
+ _tmp1_ = g_strdup (_tmp0_);
#line 199 "/home/jens/Source/shotwell/src/util/file.vala"
- result = _tmp2_;
+ result = _tmp1_;
#line 199 "/home/jens/Source/shotwell/src/util/file.vala"
return result;
-#line 1677 "file.c"
+#line 1511 "file.c"
}
-void skip_uint64 (GInputStream* input, guint64 skip_amount, GError** error) {
+void
+skip_uint64 (GInputStream* input,
+ guint64 skip_amount,
+ GError** error)
+{
GError * _inner_error_ = NULL;
#line 203 "/home/jens/Source/shotwell/src/util/file.vala"
g_return_if_fail (G_IS_INPUT_STREAM (input));
#line 204 "/home/jens/Source/shotwell/src/util/file.vala"
while (TRUE) {
-#line 1687 "file.c"
- guint64 _tmp0_;
- guint64 _tmp1_;
-#line 204 "/home/jens/Source/shotwell/src/util/file.vala"
- _tmp0_ = skip_amount;
#line 204 "/home/jens/Source/shotwell/src/util/file.vala"
- if (!(_tmp0_ > ((guint64) 0))) {
+ if (!(skip_amount > ((guint64) 0))) {
#line 204 "/home/jens/Source/shotwell/src/util/file.vala"
break;
-#line 1696 "file.c"
+#line 1529 "file.c"
}
#line 206 "/home/jens/Source/shotwell/src/util/file.vala"
- _tmp1_ = skip_amount;
-#line 206 "/home/jens/Source/shotwell/src/util/file.vala"
- if (_tmp1_ >= ((guint64) G_MAXSSIZE)) {
-#line 1702 "file.c"
- GInputStream* _tmp2_;
- guint64 _tmp3_;
-#line 207 "/home/jens/Source/shotwell/src/util/file.vala"
- _tmp2_ = input;
+ if (skip_amount >= ((guint64) G_MAXSSIZE)) {
#line 207 "/home/jens/Source/shotwell/src/util/file.vala"
- g_input_stream_skip (_tmp2_, (gsize) G_MAXSSIZE, NULL, &_inner_error_);
+ g_input_stream_skip (input, (gsize) G_MAXSSIZE, NULL, &_inner_error_);
#line 207 "/home/jens/Source/shotwell/src/util/file.vala"
if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 207 "/home/jens/Source/shotwell/src/util/file.vala"
g_propagate_error (error, _inner_error_);
#line 207 "/home/jens/Source/shotwell/src/util/file.vala"
return;
-#line 1715 "file.c"
+#line 1541 "file.c"
}
#line 208 "/home/jens/Source/shotwell/src/util/file.vala"
- _tmp3_ = skip_amount;
-#line 208 "/home/jens/Source/shotwell/src/util/file.vala"
- skip_amount = _tmp3_ - G_MAXSSIZE;
-#line 1721 "file.c"
+ skip_amount = skip_amount - G_MAXSSIZE;
+#line 1545 "file.c"
} else {
- GInputStream* _tmp4_;
- guint64 _tmp5_;
#line 210 "/home/jens/Source/shotwell/src/util/file.vala"
- _tmp4_ = input;
-#line 210 "/home/jens/Source/shotwell/src/util/file.vala"
- _tmp5_ = skip_amount;
-#line 210 "/home/jens/Source/shotwell/src/util/file.vala"
- g_input_stream_skip (_tmp4_, (gsize) _tmp5_, NULL, &_inner_error_);
+ g_input_stream_skip (input, (gsize) skip_amount, NULL, &_inner_error_);
#line 210 "/home/jens/Source/shotwell/src/util/file.vala"
if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 210 "/home/jens/Source/shotwell/src/util/file.vala"
g_propagate_error (error, _inner_error_);
#line 210 "/home/jens/Source/shotwell/src/util/file.vala"
return;
-#line 1737 "file.c"
+#line 1555 "file.c"
}
#line 211 "/home/jens/Source/shotwell/src/util/file.vala"
skip_amount = (guint64) 0;
-#line 1741 "file.c"
+#line 1559 "file.c"
}
}
}
-guint64 count_files_in_directory (GFile* dir, GError** error) {
+guint64
+count_files_in_directory (GFile* dir,
+ GError** error)
+{
guint64 result = 0ULL;
- GFile* _tmp0_;
- gboolean _tmp1_;
guint64 count = 0ULL;
GFileEnumerator* enumerator = NULL;
- GFile* _tmp2_;
- GFileEnumerator* _tmp3_;
+ GFileEnumerator* _tmp0_;
GFileInfo* info = NULL;
GError * _inner_error_ = NULL;
#line 217 "/home/jens/Source/shotwell/src/util/file.vala"
g_return_val_if_fail (G_IS_FILE (dir), 0ULL);
#line 218 "/home/jens/Source/shotwell/src/util/file.vala"
- _tmp0_ = dir;
-#line 218 "/home/jens/Source/shotwell/src/util/file.vala"
- _tmp1_ = query_is_directory (_tmp0_);
-#line 218 "/home/jens/Source/shotwell/src/util/file.vala"
- if (!_tmp1_) {
+ if (!query_is_directory (dir)) {
#line 219 "/home/jens/Source/shotwell/src/util/file.vala"
result = (guint64) 0;
#line 219 "/home/jens/Source/shotwell/src/util/file.vala"
return result;
-#line 1769 "file.c"
+#line 1583 "file.c"
}
#line 221 "/home/jens/Source/shotwell/src/util/file.vala"
count = (guint64) 0;
#line 222 "/home/jens/Source/shotwell/src/util/file.vala"
- _tmp2_ = dir;
+ _tmp0_ = g_file_enumerate_children (dir, "standard::*", G_FILE_QUERY_INFO_NOFOLLOW_SYMLINKS, NULL, &_inner_error_);
#line 222 "/home/jens/Source/shotwell/src/util/file.vala"
- _tmp3_ = g_file_enumerate_children (_tmp2_, "standard::*", G_FILE_QUERY_INFO_NOFOLLOW_SYMLINKS, NULL, &_inner_error_);
-#line 222 "/home/jens/Source/shotwell/src/util/file.vala"
- enumerator = _tmp3_;
+ enumerator = _tmp0_;
#line 222 "/home/jens/Source/shotwell/src/util/file.vala"
if (G_UNLIKELY (_inner_error_ != NULL)) {
-#line 1781 "file.c"
- guint64 _tmp4_ = 0ULL;
+#line 1593 "file.c"
+ guint64 _tmp1_ = 0ULL;
#line 222 "/home/jens/Source/shotwell/src/util/file.vala"
g_propagate_error (error, _inner_error_);
#line 222 "/home/jens/Source/shotwell/src/util/file.vala"
- return _tmp4_;
-#line 1787 "file.c"
+ return _tmp1_;
+#line 1599 "file.c"
}
#line 225 "/home/jens/Source/shotwell/src/util/file.vala"
info = NULL;
#line 226 "/home/jens/Source/shotwell/src/util/file.vala"
while (TRUE) {
-#line 1793 "file.c"
- GFileInfo* _tmp5_ = NULL;
- GFileEnumerator* _tmp6_;
+#line 1605 "file.c"
+ GFileInfo* _tmp2_ = NULL;
+ GFileEnumerator* _tmp3_;
+ GFileInfo* _tmp4_;
+ GFileInfo* _tmp6_;
GFileInfo* _tmp7_;
- GFileInfo* _tmp9_;
- GFileInfo* _tmp10_;
- guint64 _tmp11_;
+ guint64 _tmp8_;
#line 226 "/home/jens/Source/shotwell/src/util/file.vala"
- _tmp6_ = enumerator;
+ _tmp3_ = enumerator;
#line 226 "/home/jens/Source/shotwell/src/util/file.vala"
- _tmp7_ = g_file_enumerator_next_file (_tmp6_, NULL, &_inner_error_);
+ _tmp4_ = g_file_enumerator_next_file (_tmp3_, NULL, &_inner_error_);
#line 226 "/home/jens/Source/shotwell/src/util/file.vala"
- _tmp5_ = _tmp7_;
+ _tmp2_ = _tmp4_;
#line 226 "/home/jens/Source/shotwell/src/util/file.vala"
if (G_UNLIKELY (_inner_error_ != NULL)) {
-#line 1808 "file.c"
- guint64 _tmp8_ = 0ULL;
+#line 1620 "file.c"
+ guint64 _tmp5_ = 0ULL;
#line 226 "/home/jens/Source/shotwell/src/util/file.vala"
g_propagate_error (error, _inner_error_);
#line 226 "/home/jens/Source/shotwell/src/util/file.vala"
@@ -1813,34 +1625,34 @@ guint64 count_files_in_directory (GFile* dir, GError** error) {
#line 226 "/home/jens/Source/shotwell/src/util/file.vala"
_g_object_unref0 (enumerator);
#line 226 "/home/jens/Source/shotwell/src/util/file.vala"
- return _tmp8_;
-#line 1818 "file.c"
+ return _tmp5_;
+#line 1630 "file.c"
}
#line 226 "/home/jens/Source/shotwell/src/util/file.vala"
- _tmp9_ = _tmp5_;
+ _tmp6_ = _tmp2_;
#line 226 "/home/jens/Source/shotwell/src/util/file.vala"
- _tmp5_ = NULL;
+ _tmp2_ = NULL;
#line 226 "/home/jens/Source/shotwell/src/util/file.vala"
_g_object_unref0 (info);
#line 226 "/home/jens/Source/shotwell/src/util/file.vala"
- info = _tmp9_;
+ info = _tmp6_;
#line 226 "/home/jens/Source/shotwell/src/util/file.vala"
- _tmp10_ = info;
+ _tmp7_ = info;
#line 226 "/home/jens/Source/shotwell/src/util/file.vala"
- if (!(_tmp10_ != NULL)) {
+ if (!(_tmp7_ != NULL)) {
#line 226 "/home/jens/Source/shotwell/src/util/file.vala"
- _g_object_unref0 (_tmp5_);
+ _g_object_unref0 (_tmp2_);
#line 226 "/home/jens/Source/shotwell/src/util/file.vala"
break;
-#line 1836 "file.c"
+#line 1648 "file.c"
}
#line 227 "/home/jens/Source/shotwell/src/util/file.vala"
- _tmp11_ = count;
+ _tmp8_ = count;
#line 227 "/home/jens/Source/shotwell/src/util/file.vala"
- count = _tmp11_ + 1;
+ count = _tmp8_ + 1;
#line 226 "/home/jens/Source/shotwell/src/util/file.vala"
- _g_object_unref0 (_tmp5_);
-#line 1844 "file.c"
+ _g_object_unref0 (_tmp2_);
+#line 1656 "file.c"
}
#line 229 "/home/jens/Source/shotwell/src/util/file.vala"
result = count;
@@ -1850,93 +1662,71 @@ guint64 count_files_in_directory (GFile* dir, GError** error) {
_g_object_unref0 (enumerator);
#line 229 "/home/jens/Source/shotwell/src/util/file.vala"
return result;
-#line 1854 "file.c"
+#line 1666 "file.c"
}
-gboolean file_equal (GFile* a, GFile* b) {
+gboolean
+file_equal (GFile* a,
+ GFile* b)
+{
gboolean result = FALSE;
gboolean _tmp0_ = FALSE;
gboolean _tmp1_ = FALSE;
- GFile* _tmp2_;
#line 233 "/home/jens/Source/shotwell/src/util/file.vala"
g_return_val_if_fail ((a == NULL) || G_IS_FILE (a), FALSE);
#line 233 "/home/jens/Source/shotwell/src/util/file.vala"
g_return_val_if_fail ((b == NULL) || G_IS_FILE (b), FALSE);
#line 234 "/home/jens/Source/shotwell/src/util/file.vala"
- _tmp2_ = a;
-#line 234 "/home/jens/Source/shotwell/src/util/file.vala"
- if (_tmp2_ != NULL) {
-#line 1871 "file.c"
- GFile* _tmp3_;
-#line 234 "/home/jens/Source/shotwell/src/util/file.vala"
- _tmp3_ = b;
+ if (a != NULL) {
#line 234 "/home/jens/Source/shotwell/src/util/file.vala"
- _tmp1_ = _tmp3_ != NULL;
-#line 1877 "file.c"
+ _tmp1_ = b != NULL;
+#line 1685 "file.c"
} else {
#line 234 "/home/jens/Source/shotwell/src/util/file.vala"
_tmp1_ = FALSE;
-#line 1881 "file.c"
+#line 1689 "file.c"
}
#line 234 "/home/jens/Source/shotwell/src/util/file.vala"
if (_tmp1_) {
-#line 1885 "file.c"
- GFile* _tmp4_;
- GFile* _tmp5_;
- gboolean _tmp6_;
#line 234 "/home/jens/Source/shotwell/src/util/file.vala"
- _tmp4_ = a;
-#line 234 "/home/jens/Source/shotwell/src/util/file.vala"
- _tmp5_ = b;
-#line 234 "/home/jens/Source/shotwell/src/util/file.vala"
- _tmp6_ = g_file_equal (_tmp4_, _tmp5_);
-#line 234 "/home/jens/Source/shotwell/src/util/file.vala"
- _tmp0_ = _tmp6_;
-#line 1897 "file.c"
+ _tmp0_ = g_file_equal (a, b);
+#line 1695 "file.c"
} else {
#line 234 "/home/jens/Source/shotwell/src/util/file.vala"
_tmp0_ = FALSE;
-#line 1901 "file.c"
+#line 1699 "file.c"
}
#line 234 "/home/jens/Source/shotwell/src/util/file.vala"
result = _tmp0_;
#line 234 "/home/jens/Source/shotwell/src/util/file.vala"
return result;
-#line 1907 "file.c"
+#line 1705 "file.c"
}
-guint file_hash (GFile* file) {
+guint
+file_hash (GFile* file)
+{
guint result = 0U;
guint _tmp0_ = 0U;
- GFile* _tmp1_;
#line 238 "/home/jens/Source/shotwell/src/util/file.vala"
g_return_val_if_fail ((file == NULL) || G_IS_FILE (file), 0U);
#line 239 "/home/jens/Source/shotwell/src/util/file.vala"
- _tmp1_ = file;
-#line 239 "/home/jens/Source/shotwell/src/util/file.vala"
- if (_tmp1_ != NULL) {
-#line 1921 "file.c"
- GFile* _tmp2_;
- guint _tmp3_;
-#line 239 "/home/jens/Source/shotwell/src/util/file.vala"
- _tmp2_ = file;
-#line 239 "/home/jens/Source/shotwell/src/util/file.vala"
- _tmp3_ = g_file_hash (_tmp2_);
+ if (file != NULL) {
#line 239 "/home/jens/Source/shotwell/src/util/file.vala"
- _tmp0_ = _tmp3_;
-#line 1930 "file.c"
+ _tmp0_ = g_file_hash (file);
+#line 1720 "file.c"
} else {
#line 239 "/home/jens/Source/shotwell/src/util/file.vala"
_tmp0_ = (guint) 0;
-#line 1934 "file.c"
+#line 1724 "file.c"
}
#line 239 "/home/jens/Source/shotwell/src/util/file.vala"
result = _tmp0_;
#line 239 "/home/jens/Source/shotwell/src/util/file.vala"
return result;
-#line 1940 "file.c"
+#line 1730 "file.c"
}
diff --git a/src/util/image.c b/src/util/image.c
index 324464c..5f3cbd0 100644
--- a/src/util/image.c
+++ b/src/util/image.c
@@ -1,4 +1,4 @@
-/* image.c generated by valac 0.36.6, the Vala compiler
+/* image.c generated by valac 0.40.4, the Vala compiler
* generated from image.vala, do not modify */
/* Copyright 2016 Software Freedom Conservancy Inc.
@@ -8,6 +8,7 @@
*/
/* XPM */
+
#include <glib.h>
#include <glib-object.h>
#include <stdlib.h>
@@ -72,39 +73,90 @@ 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);
-void fetch_color (const gchar* spec, GdkRGBA* result);
-void set_source_color_from_string (cairo_t* ctx, const gchar* spec);
+void parse_color (const gchar* spec,
+ GdkRGBA* result);
+void fetch_color (const gchar* spec,
+ GdkRGBA* result);
+void set_source_color_from_string (cairo_t* ctx,
+ const gchar* spec);
#define MIN_SCALED_WIDTH 10
#define MIN_SCALED_HEIGHT 10
GdkPixbuf* get_placeholder_pixbuf (void);
-GdkPixbuf* scale_pixbuf (GdkPixbuf* pixbuf, gint scale, GdkInterpType interp, gboolean scale_up);
+GdkPixbuf* scale_pixbuf (GdkPixbuf* pixbuf,
+ gint scale,
+ GdkInterpType interp,
+ gboolean scale_up);
GType dimensions_get_type (void) G_GNUC_CONST;
Dimensions* dimensions_dup (const Dimensions* self);
void dimensions_free (Dimensions* self);
-void dimensions_for_pixbuf (GdkPixbuf* pixbuf, Dimensions* result);
-void dimensions_get_scaled (Dimensions *self, gint scale, gboolean scale_up, Dimensions* result);
-void dimensions_with_min (Dimensions *self, gint min_width, gint min_height, Dimensions* result);
-GdkPixbuf* resize_pixbuf (GdkPixbuf* pixbuf, Dimensions* resized, GdkInterpType interp);
+void dimensions_for_pixbuf (GdkPixbuf* pixbuf,
+ Dimensions* result);
+void dimensions_get_scaled (Dimensions *self,
+ gint scale,
+ gboolean scale_up,
+ Dimensions* result);
+void dimensions_with_min (Dimensions *self,
+ gint min_width,
+ gint min_height,
+ Dimensions* result);
+GdkPixbuf* resize_pixbuf (GdkPixbuf* pixbuf,
+ Dimensions* resized,
+ GdkInterpType interp);
#define DEGREE (G_PI / 180.0)
-void draw_rounded_corners_filled (cairo_t* ctx, Dimensions* dim, GdkPoint* origin, gdouble radius_proportion);
-void context_rounded_corners (cairo_t* cx, Dimensions* dim, GdkPoint* origin, gdouble radius_proportion);
+void draw_rounded_corners_filled (cairo_t* ctx,
+ Dimensions* dim,
+ GdkPoint* origin,
+ gdouble radius_proportion);
+void context_rounded_corners (cairo_t* cx,
+ Dimensions* dim,
+ GdkPoint* origin,
+ gdouble radius_proportion);
gint dimensions_minor_axis (Dimensions *self);
-guchar shift_color_byte (gint b, gint shift);
-void shift_colors (GdkPixbuf* pixbuf, gint red, gint green, gint blue, gint alpha);
-gboolean coord_in_rectangle (gint x, gint y, GdkRectangle* rect);
-gboolean rectangles_equal (GdkRectangle* a, GdkRectangle* b);
+guchar shift_color_byte (gint b,
+ gint shift);
+void shift_colors (GdkPixbuf* pixbuf,
+ gint red,
+ gint green,
+ gint blue,
+ gint alpha);
+gboolean coord_in_rectangle (gint x,
+ gint y,
+ GdkRectangle* rect);
+gboolean rectangles_equal (GdkRectangle* a,
+ GdkRectangle* b);
gchar* rectangle_to_string (GdkRectangle* rect);
-void clamp_rectangle (GdkRectangle* original, Dimensions* max, GdkRectangle* result);
-void scale_point (GdkPoint* p, gdouble factor, GdkPoint* result);
-void add_points (GdkPoint* p1, GdkPoint* p2, GdkPoint* result);
-void subtract_points (GdkPoint* p1, GdkPoint* p2, GdkPoint* result);
+void clamp_rectangle (GdkRectangle* original,
+ Dimensions* max,
+ GdkRectangle* result);
+void scale_point (GdkPoint* p,
+ gdouble factor,
+ GdkPoint* result);
+void add_points (GdkPoint* p1,
+ GdkPoint* p2,
+ GdkPoint* result);
+void subtract_points (GdkPoint* p1,
+ GdkPoint* p2,
+ GdkPoint* result);
void fix_cairo_pixbuf (GdkPixbuf* pixbuf);
-void compute_arb_rotated_size (gdouble src_width, gdouble src_height, gdouble angle, gdouble* dest_width, gdouble* dest_height);
+void compute_arb_rotated_size (gdouble src_width,
+ gdouble src_height,
+ gdouble angle,
+ gdouble* dest_width,
+ gdouble* dest_height);
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);
+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;
@@ -112,145 +164,150 @@ 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);
+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);
-void clamp_inside_rotated_image (Box* src, gint img_w, gint img_h, gdouble angle_deg, gboolean preserve_geom, Box* result);
-void box_get_offset (Box *self, gint xofs, gint yofs, Box* result);
-void box_init (Box *self, gint left, gint top, gint right, gint bottom);
+void clamp_inside_rotated_image (Box* src,
+ gint img_w,
+ gint img_h,
+ gdouble angle_deg,
+ gboolean preserve_geom,
+ Box* result);
+void box_get_offset (Box *self,
+ gint xofs,
+ gint yofs,
+ Box* result);
+void box_init (Box *self,
+ gint left,
+ gint top,
+ gint right,
+ gint bottom);
const gchar* fallback_image_missing[103] = {"48 48 54 1 ", " c #6A6D67", ". c #6C6E69", "X c #72746F", "o c #747672", "O c #777974", "+ c #797B77", "@ c #7C7E7A", "# c #7F817C", "$ c #81837F", "% c #848682", "& c #878984", "* c #888A86", "= c #8C8D8A", "- c #8F908C", "; c #90928E", ": c #949591", "> c #969894", ", c #999B96", "< c #9C9E9A", "1 c #9FA09C", "2 c #A1A39E", "3 c #A4A6A2", "4 c #A6A9A4", "5 c #A9ABA6", "6 c #ACADA9", "7 c #AEB1AB", "8 c #B1B2AF", "9 c #B3B4B1", "0 c #B6B9B3", "q c #B9BCB6", "w c #BDBEBA", "e c #BEC2BB", "r c #C1C4BE", "t c #C5C5C2", "y c #C6C9C3", "u c #C9CCC6", "i c #CCCDCB", "p c #CED2CA", "a c #D2D6CE", "s c #D5D5D3", "d c #D7D8D5", "f c #D9D9D6", "g c #DCDCDA", "h c #DFE0DD", "j c #E0E0DE", "k c #E4E4E2", "l c #E7E8E5", "z c #E9E9E7", "x c #EDEDEC", "c c #EFF0EE", "v c #F1F1EF", "b c #F2F2F1", "n c #FFFFFF", "m c None", "mmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmm", "mmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmm", "mmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmm", "mmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmm", "mmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmm", "mmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmm", "mmaaaaaaaaaasaisaaaaaaaaaaaaaaaaaaapppiipuuuuumm", "mannnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnym", "manbbbbbbbbbvbbvvvvxvvvbvvvvvvvvccccccxxvxvxxnym", "manbt89898888988888888888999999999999999999txnrm", "manb6======================-;;=;;;;;;;;;;=:7znrm", "manv6&%%**%*%%%%*%%****=======;==;;;;=;=;==7znem", "manv4%%%%$%%%%%%%%%%%=****=======;==-======6znwm", "manx3%%#$$$$##%#$%%%*%**==========-=--=====6znqm", "manx1$@%#$@$###%%%%=****=*===--;;----====*=5lnqm", "manx<@@@@@@@@##%$%%%%****========-==-======5kn0m", "manz<@@@+@+@@@#$%%%%%=%=%===;=:=--------=-*4kn8m", "manz>O+O+O+@@@#$$%%%%========;;=--------=*=3kn9m", "mpnl:OOOOO+@@$##%%%%%=%=====;=;;--;-----===3kn8m", "munl;OooOOO@@@#$%%%%%======;;;;;:;;;;;---==1hn7m", "munl;oXoOO+@###$%%=%=======;::;::::;;---&#+-gn7m", "mynk*XXooOO+$$#$%%%%=%===;;:;:::::;:-$#XooX-fn5m", "mynk*XXOOO@@$$$$%%=%====;::::>::;*#OXXXXXXX*dn5m", "mrnk*oOO@@@#$$$$%=====::::>>>=%@OXOooXXXooo&dn3m", "mrnj*++@$$$$**$===-;;::>>:=@Ooo@XOOoo#o#OOO=fn3m", "menj*@#$$$$$**===;;:::=%@@@@@@O@#O#Oo#o#++@;gn2m", "menj*$$$$&**===;:;=*#@@@@@@@@@@@#######o##%>gn2m", "menh*$$%**===;=*%###########%@@@###$####$%=,gn1m", "m0nj=%***=**&$$$%$$$%$$%$$$$%$$$$$$$$$$%*;:2hn<m", "m0nj****&&&$$&&$%%%%%%%%%%%%%%%%$$*$%%%*;>13gn,m", "m0ng****&&&&&&&&&&&&*%*%*%%*%******%**-:,136kz;m", "m0nh***$&&&&&&&&&&&&%**********%*$***;:,1358r7*m", "m8ng*&&&&&&&&&*$&*&&&&$=$=$=&&&&&&**=:,<11>$65mm", "m7ng*&&&&&&&&&**&&&&&&**=$-$&&&&&&*-:,1..&1wi:mm", "m7ng&&&&&&&&=$*$&&&&&***$$$$&&&***=>,1<onxsi6*mm", "m6nf*&&&&&*&$***&&&&*$*$--$-&&&%*=;,13,:ztw9%mmm", "m5nf*%&&&&&&=$=$%*&&**%*$$&&&&**=>,225;5srw%mmmm", "m4nf3*&&**&&$-$-*******%$;&&*&*->,2365+ui7$mmmmm", "m3nsfffdddsddaffssssdassgaaaassddfgjg4wu;ommmmmm", "m3nnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnvq3<$.mmmmmmm", "mm2211111,<,,,,,,>>>>:::;::;----=====@mmmmmmmmmm", "mmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmm", "mmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmm", "mmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmm", "mmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmm", "mmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmm", "mmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmm", "mmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmm"};
-gboolean is_color_parsable (const gchar* spec) {
+gboolean
+is_color_parsable (const gchar* spec)
+{
gboolean result = FALSE;
GdkRGBA color = {0};
- const gchar* _tmp0_;
- gboolean _tmp1_;
#line 117 "/home/jens/Source/shotwell/src/util/image.vala"
g_return_val_if_fail (spec != NULL, FALSE);
#line 118 "/home/jens/Source/shotwell/src/util/image.vala"
memset (&color, 0, sizeof (GdkRGBA));
#line 119 "/home/jens/Source/shotwell/src/util/image.vala"
- _tmp0_ = spec;
-#line 119 "/home/jens/Source/shotwell/src/util/image.vala"
- _tmp1_ = gdk_rgba_parse (&color, _tmp0_);
-#line 119 "/home/jens/Source/shotwell/src/util/image.vala"
- result = _tmp1_;
+ result = gdk_rgba_parse (&color, spec);
#line 119 "/home/jens/Source/shotwell/src/util/image.vala"
return result;
-#line 143 "image.c"
+#line 206 "image.c"
}
-void parse_color (const gchar* spec, GdkRGBA* result) {
- const gchar* _tmp0_;
- GdkRGBA _tmp1_ = {0};
+void
+parse_color (const gchar* spec,
+ GdkRGBA* result)
+{
+ GdkRGBA _tmp0_ = {0};
#line 122 "/home/jens/Source/shotwell/src/util/image.vala"
g_return_if_fail (spec != NULL);
#line 123 "/home/jens/Source/shotwell/src/util/image.vala"
- _tmp0_ = spec;
+ fetch_color (spec, &_tmp0_);
#line 123 "/home/jens/Source/shotwell/src/util/image.vala"
- fetch_color (_tmp0_, &_tmp1_);
-#line 123 "/home/jens/Source/shotwell/src/util/image.vala"
- *result = _tmp1_;
+ *result = _tmp0_;
#line 123 "/home/jens/Source/shotwell/src/util/image.vala"
return;
-#line 160 "image.c"
+#line 223 "image.c"
}
-void fetch_color (const gchar* spec, GdkRGBA* result) {
+void
+fetch_color (const gchar* spec,
+ GdkRGBA* result)
+{
GdkRGBA rgba = {0};
- const gchar* _tmp0_;
- gboolean _tmp1_;
#line 126 "/home/jens/Source/shotwell/src/util/image.vala"
g_return_if_fail (spec != NULL);
#line 127 "/home/jens/Source/shotwell/src/util/image.vala"
memset (&rgba, 0, sizeof (GdkRGBA));
#line 128 "/home/jens/Source/shotwell/src/util/image.vala"
- _tmp0_ = spec;
-#line 128 "/home/jens/Source/shotwell/src/util/image.vala"
- _tmp1_ = gdk_rgba_parse (&rgba, _tmp0_);
-#line 128 "/home/jens/Source/shotwell/src/util/image.vala"
- if (!_tmp1_) {
-#line 178 "image.c"
- const gchar* _tmp2_;
+ if (!gdk_rgba_parse (&rgba, spec)) {
#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 184 "image.c"
+ g_error ("image.vala:129: Can't parse color %s", spec);
+#line 240 "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 190 "image.c"
+#line 246 "image.c"
}
-void set_source_color_from_string (cairo_t* ctx, const gchar* spec) {
+void
+set_source_color_from_string (cairo_t* ctx,
+ const gchar* spec)
+{
GdkRGBA rgba = {0};
- const gchar* _tmp0_;
- GdkRGBA _tmp1_ = {0};
- cairo_t* _tmp2_;
+ GdkRGBA _tmp0_ = {0};
+ GdkRGBA _tmp1_;
+ gdouble _tmp2_;
GdkRGBA _tmp3_;
gdouble _tmp4_;
GdkRGBA _tmp5_;
gdouble _tmp6_;
GdkRGBA _tmp7_;
gdouble _tmp8_;
- GdkRGBA _tmp9_;
- gdouble _tmp10_;
#line 134 "/home/jens/Source/shotwell/src/util/image.vala"
g_return_if_fail (ctx != NULL);
#line 134 "/home/jens/Source/shotwell/src/util/image.vala"
g_return_if_fail (spec != NULL);
#line 135 "/home/jens/Source/shotwell/src/util/image.vala"
- _tmp0_ = spec;
-#line 135 "/home/jens/Source/shotwell/src/util/image.vala"
- fetch_color (_tmp0_, &_tmp1_);
+ fetch_color (spec, &_tmp0_);
#line 135 "/home/jens/Source/shotwell/src/util/image.vala"
- rgba = _tmp1_;
+ rgba = _tmp0_;
#line 136 "/home/jens/Source/shotwell/src/util/image.vala"
- _tmp2_ = ctx;
+ _tmp1_ = rgba;
+#line 136 "/home/jens/Source/shotwell/src/util/image.vala"
+ _tmp2_ = _tmp1_.red;
#line 136 "/home/jens/Source/shotwell/src/util/image.vala"
_tmp3_ = rgba;
#line 136 "/home/jens/Source/shotwell/src/util/image.vala"
- _tmp4_ = _tmp3_.red;
+ _tmp4_ = _tmp3_.green;
#line 136 "/home/jens/Source/shotwell/src/util/image.vala"
_tmp5_ = rgba;
#line 136 "/home/jens/Source/shotwell/src/util/image.vala"
- _tmp6_ = _tmp5_.green;
+ _tmp6_ = _tmp5_.blue;
#line 136 "/home/jens/Source/shotwell/src/util/image.vala"
_tmp7_ = rgba;
#line 136 "/home/jens/Source/shotwell/src/util/image.vala"
- _tmp8_ = _tmp7_.blue;
-#line 136 "/home/jens/Source/shotwell/src/util/image.vala"
- _tmp9_ = rgba;
+ _tmp8_ = _tmp7_.alpha;
#line 136 "/home/jens/Source/shotwell/src/util/image.vala"
- _tmp10_ = _tmp9_.alpha;
-#line 136 "/home/jens/Source/shotwell/src/util/image.vala"
- cairo_set_source_rgba (_tmp2_, _tmp4_, _tmp6_, _tmp8_, _tmp10_);
-#line 237 "image.c"
+ cairo_set_source_rgba (ctx, _tmp2_, _tmp4_, _tmp6_, _tmp8_);
+#line 290 "image.c"
}
-static gpointer _g_object_ref0 (gpointer self) {
+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 244 "image.c"
+#line 299 "image.c"
}
-GdkPixbuf* get_placeholder_pixbuf (void) {
+GdkPixbuf*
+get_placeholder_pixbuf (void)
+{
GdkPixbuf* result = NULL;
GdkPixbuf* pixbuf = NULL;
GError * _inner_error_ = NULL;
#line 144 "/home/jens/Source/shotwell/src/util/image.vala"
pixbuf = NULL;
-#line 254 "image.c"
+#line 311 "image.c"
{
GtkIconTheme* icon_theme = NULL;
GtkIconTheme* _tmp0_;
@@ -272,7 +329,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 276 "image.c"
+#line 333 "image.c"
goto __catch4_g_error;
}
#line 148 "/home/jens/Source/shotwell/src/util/image.vala"
@@ -287,7 +344,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 291 "image.c"
+#line 348 "image.c"
}
goto __finally4;
__catch4_g_error:
@@ -314,7 +371,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 318 "image.c"
+#line 375 "image.c"
}
__finally4:
#line 146 "/home/jens/Source/shotwell/src/util/image.vala"
@@ -327,232 +384,213 @@ GdkPixbuf* get_placeholder_pixbuf (void) {
g_clear_error (&_inner_error_);
#line 146 "/home/jens/Source/shotwell/src/util/image.vala"
return NULL;
-#line 331 "image.c"
+#line 388 "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 337 "image.c"
+#line 394 "image.c"
}
-GdkPixbuf* scale_pixbuf (GdkPixbuf* pixbuf, gint scale, GdkInterpType interp, gboolean scale_up) {
+GdkPixbuf*
+scale_pixbuf (GdkPixbuf* pixbuf,
+ gint scale,
+ GdkInterpType interp,
+ gboolean scale_up)
+{
GdkPixbuf* result = NULL;
Dimensions original = {0};
- GdkPixbuf* _tmp0_;
- Dimensions _tmp1_ = {0};
+ Dimensions _tmp0_ = {0};
Dimensions scaled = {0};
- gint _tmp2_;
- gboolean _tmp3_;
- Dimensions _tmp4_ = {0};
- gboolean _tmp5_ = FALSE;
- Dimensions _tmp6_;
- gint _tmp7_;
- Dimensions _tmp8_;
- gint _tmp9_;
- Dimensions _tmp16_ = {0};
+ Dimensions _tmp1_ = {0};
+ gboolean _tmp2_ = FALSE;
+ Dimensions _tmp3_;
+ gint _tmp4_;
+ Dimensions _tmp5_;
+ gint _tmp6_;
+ Dimensions _tmp12_ = {0};
+ Dimensions _tmp13_;
+ gint _tmp14_;
+ Dimensions _tmp15_;
+ gint _tmp16_;
GdkPixbuf* _tmp17_;
- Dimensions _tmp18_;
- gint _tmp19_;
- Dimensions _tmp20_;
- gint _tmp21_;
- GdkInterpType _tmp22_;
- GdkPixbuf* _tmp23_;
#line 158 "/home/jens/Source/shotwell/src/util/image.vala"
g_return_val_if_fail (GDK_IS_PIXBUF (pixbuf), NULL);
#line 159 "/home/jens/Source/shotwell/src/util/image.vala"
- _tmp0_ = pixbuf;
-#line 159 "/home/jens/Source/shotwell/src/util/image.vala"
- dimensions_for_pixbuf (_tmp0_, &_tmp1_);
+ dimensions_for_pixbuf (pixbuf, &_tmp0_);
#line 159 "/home/jens/Source/shotwell/src/util/image.vala"
- original = _tmp1_;
-#line 160 "/home/jens/Source/shotwell/src/util/image.vala"
- _tmp2_ = scale;
-#line 160 "/home/jens/Source/shotwell/src/util/image.vala"
- _tmp3_ = scale_up;
+ original = _tmp0_;
#line 160 "/home/jens/Source/shotwell/src/util/image.vala"
- dimensions_get_scaled (&original, _tmp2_, _tmp3_, &_tmp4_);
+ dimensions_get_scaled (&original, scale, scale_up, &_tmp1_);
#line 160 "/home/jens/Source/shotwell/src/util/image.vala"
- scaled = _tmp4_;
+ scaled = _tmp1_;
#line 161 "/home/jens/Source/shotwell/src/util/image.vala"
- _tmp6_ = original;
+ _tmp3_ = original;
#line 161 "/home/jens/Source/shotwell/src/util/image.vala"
- _tmp7_ = _tmp6_.width;
+ _tmp4_ = _tmp3_.width;
#line 161 "/home/jens/Source/shotwell/src/util/image.vala"
- _tmp8_ = scaled;
+ _tmp5_ = scaled;
#line 161 "/home/jens/Source/shotwell/src/util/image.vala"
- _tmp9_ = _tmp8_.width;
+ _tmp6_ = _tmp5_.width;
#line 161 "/home/jens/Source/shotwell/src/util/image.vala"
- if (_tmp7_ == _tmp9_) {
-#line 389 "image.c"
- Dimensions _tmp10_;
- gint _tmp11_;
- Dimensions _tmp12_;
- gint _tmp13_;
+ if (_tmp4_ == _tmp6_) {
+#line 440 "image.c"
+ Dimensions _tmp7_;
+ gint _tmp8_;
+ Dimensions _tmp9_;
+ gint _tmp10_;
#line 161 "/home/jens/Source/shotwell/src/util/image.vala"
- _tmp10_ = original;
+ _tmp7_ = original;
#line 161 "/home/jens/Source/shotwell/src/util/image.vala"
- _tmp11_ = _tmp10_.height;
+ _tmp8_ = _tmp7_.height;
#line 161 "/home/jens/Source/shotwell/src/util/image.vala"
- _tmp12_ = scaled;
+ _tmp9_ = scaled;
#line 161 "/home/jens/Source/shotwell/src/util/image.vala"
- _tmp13_ = _tmp12_.height;
+ _tmp10_ = _tmp9_.height;
#line 161 "/home/jens/Source/shotwell/src/util/image.vala"
- _tmp5_ = _tmp11_ == _tmp13_;
-#line 404 "image.c"
+ _tmp2_ = _tmp8_ == _tmp10_;
+#line 455 "image.c"
} else {
#line 161 "/home/jens/Source/shotwell/src/util/image.vala"
- _tmp5_ = FALSE;
-#line 408 "image.c"
+ _tmp2_ = FALSE;
+#line 459 "image.c"
}
#line 161 "/home/jens/Source/shotwell/src/util/image.vala"
- if (_tmp5_) {
-#line 412 "image.c"
- GdkPixbuf* _tmp14_;
- GdkPixbuf* _tmp15_;
-#line 162 "/home/jens/Source/shotwell/src/util/image.vala"
- _tmp14_ = pixbuf;
+ if (_tmp2_) {
+#line 463 "image.c"
+ GdkPixbuf* _tmp11_;
#line 162 "/home/jens/Source/shotwell/src/util/image.vala"
- _tmp15_ = _g_object_ref0 (_tmp14_);
+ _tmp11_ = _g_object_ref0 (pixbuf);
#line 162 "/home/jens/Source/shotwell/src/util/image.vala"
- result = _tmp15_;
+ result = _tmp11_;
#line 162 "/home/jens/Source/shotwell/src/util/image.vala"
return result;
-#line 423 "image.c"
+#line 471 "image.c"
}
#line 165 "/home/jens/Source/shotwell/src/util/image.vala"
- dimensions_with_min (&scaled, MIN_SCALED_WIDTH, MIN_SCALED_HEIGHT, &_tmp16_);
+ dimensions_with_min (&scaled, MIN_SCALED_WIDTH, MIN_SCALED_HEIGHT, &_tmp12_);
#line 165 "/home/jens/Source/shotwell/src/util/image.vala"
- scaled = _tmp16_;
-#line 167 "/home/jens/Source/shotwell/src/util/image.vala"
- _tmp17_ = pixbuf;
+ scaled = _tmp12_;
#line 167 "/home/jens/Source/shotwell/src/util/image.vala"
- _tmp18_ = scaled;
+ _tmp13_ = scaled;
#line 167 "/home/jens/Source/shotwell/src/util/image.vala"
- _tmp19_ = _tmp18_.width;
+ _tmp14_ = _tmp13_.width;
#line 167 "/home/jens/Source/shotwell/src/util/image.vala"
- _tmp20_ = scaled;
+ _tmp15_ = scaled;
#line 167 "/home/jens/Source/shotwell/src/util/image.vala"
- _tmp21_ = _tmp20_.height;
-#line 167 "/home/jens/Source/shotwell/src/util/image.vala"
- _tmp22_ = interp;
+ _tmp16_ = _tmp15_.height;
#line 167 "/home/jens/Source/shotwell/src/util/image.vala"
- _tmp23_ = gdk_pixbuf_scale_simple (_tmp17_, _tmp19_, _tmp21_, _tmp22_);
+ _tmp17_ = gdk_pixbuf_scale_simple (pixbuf, _tmp14_, _tmp16_, interp);
#line 167 "/home/jens/Source/shotwell/src/util/image.vala"
- result = _tmp23_;
+ result = _tmp17_;
#line 167 "/home/jens/Source/shotwell/src/util/image.vala"
return result;
-#line 447 "image.c"
+#line 491 "image.c"
}
-GdkPixbuf* resize_pixbuf (GdkPixbuf* pixbuf, Dimensions* resized, GdkInterpType interp) {
+GdkPixbuf*
+resize_pixbuf (GdkPixbuf* pixbuf,
+ Dimensions* resized,
+ GdkInterpType interp)
+{
GdkPixbuf* result = NULL;
Dimensions original = {0};
- GdkPixbuf* _tmp0_;
- Dimensions _tmp1_ = {0};
- gboolean _tmp2_ = FALSE;
- Dimensions _tmp3_;
- gint _tmp4_;
- Dimensions _tmp5_;
- gint _tmp6_;
- Dimensions _tmp13_ = {0};
- GdkPixbuf* _tmp14_;
- Dimensions _tmp15_;
- gint _tmp16_;
- Dimensions _tmp17_;
- gint _tmp18_;
- GdkInterpType _tmp19_;
- GdkPixbuf* _tmp20_;
+ Dimensions _tmp0_ = {0};
+ gboolean _tmp1_ = FALSE;
+ Dimensions _tmp2_;
+ gint _tmp3_;
+ Dimensions _tmp4_;
+ gint _tmp5_;
+ Dimensions _tmp11_ = {0};
+ Dimensions _tmp12_;
+ gint _tmp13_;
+ Dimensions _tmp14_;
+ gint _tmp15_;
+ GdkPixbuf* _tmp16_;
#line 170 "/home/jens/Source/shotwell/src/util/image.vala"
g_return_val_if_fail (GDK_IS_PIXBUF (pixbuf), NULL);
#line 170 "/home/jens/Source/shotwell/src/util/image.vala"
g_return_val_if_fail (resized != NULL, NULL);
#line 171 "/home/jens/Source/shotwell/src/util/image.vala"
- _tmp0_ = pixbuf;
+ dimensions_for_pixbuf (pixbuf, &_tmp0_);
#line 171 "/home/jens/Source/shotwell/src/util/image.vala"
- dimensions_for_pixbuf (_tmp0_, &_tmp1_);
-#line 171 "/home/jens/Source/shotwell/src/util/image.vala"
- original = _tmp1_;
+ original = _tmp0_;
#line 172 "/home/jens/Source/shotwell/src/util/image.vala"
- _tmp3_ = original;
+ _tmp2_ = original;
#line 172 "/home/jens/Source/shotwell/src/util/image.vala"
- _tmp4_ = _tmp3_.width;
+ _tmp3_ = _tmp2_.width;
#line 172 "/home/jens/Source/shotwell/src/util/image.vala"
- _tmp5_ = *resized;
+ _tmp4_ = *resized;
#line 172 "/home/jens/Source/shotwell/src/util/image.vala"
- _tmp6_ = _tmp5_.width;
+ _tmp5_ = _tmp4_.width;
#line 172 "/home/jens/Source/shotwell/src/util/image.vala"
- if (_tmp4_ == _tmp6_) {
-#line 489 "image.c"
- Dimensions _tmp7_;
- gint _tmp8_;
- Dimensions _tmp9_;
- gint _tmp10_;
+ if (_tmp3_ == _tmp5_) {
+#line 532 "image.c"
+ Dimensions _tmp6_;
+ gint _tmp7_;
+ Dimensions _tmp8_;
+ gint _tmp9_;
#line 172 "/home/jens/Source/shotwell/src/util/image.vala"
- _tmp7_ = original;
+ _tmp6_ = original;
#line 172 "/home/jens/Source/shotwell/src/util/image.vala"
- _tmp8_ = _tmp7_.height;
+ _tmp7_ = _tmp6_.height;
#line 172 "/home/jens/Source/shotwell/src/util/image.vala"
- _tmp9_ = *resized;
+ _tmp8_ = *resized;
#line 172 "/home/jens/Source/shotwell/src/util/image.vala"
- _tmp10_ = _tmp9_.height;
+ _tmp9_ = _tmp8_.height;
#line 172 "/home/jens/Source/shotwell/src/util/image.vala"
- _tmp2_ = _tmp8_ == _tmp10_;
-#line 504 "image.c"
+ _tmp1_ = _tmp7_ == _tmp9_;
+#line 547 "image.c"
} else {
#line 172 "/home/jens/Source/shotwell/src/util/image.vala"
- _tmp2_ = FALSE;
-#line 508 "image.c"
+ _tmp1_ = FALSE;
+#line 551 "image.c"
}
#line 172 "/home/jens/Source/shotwell/src/util/image.vala"
- if (_tmp2_) {
-#line 512 "image.c"
- GdkPixbuf* _tmp11_;
- GdkPixbuf* _tmp12_;
-#line 173 "/home/jens/Source/shotwell/src/util/image.vala"
- _tmp11_ = pixbuf;
+ if (_tmp1_) {
+#line 555 "image.c"
+ GdkPixbuf* _tmp10_;
#line 173 "/home/jens/Source/shotwell/src/util/image.vala"
- _tmp12_ = _g_object_ref0 (_tmp11_);
+ _tmp10_ = _g_object_ref0 (pixbuf);
#line 173 "/home/jens/Source/shotwell/src/util/image.vala"
- result = _tmp12_;
+ result = _tmp10_;
#line 173 "/home/jens/Source/shotwell/src/util/image.vala"
return result;
-#line 523 "image.c"
+#line 563 "image.c"
}
#line 176 "/home/jens/Source/shotwell/src/util/image.vala"
- dimensions_with_min (resized, MIN_SCALED_WIDTH, MIN_SCALED_HEIGHT, &_tmp13_);
+ dimensions_with_min (resized, MIN_SCALED_WIDTH, MIN_SCALED_HEIGHT, &_tmp11_);
#line 176 "/home/jens/Source/shotwell/src/util/image.vala"
- *resized = _tmp13_;
+ *resized = _tmp11_;
#line 178 "/home/jens/Source/shotwell/src/util/image.vala"
- _tmp14_ = pixbuf;
+ _tmp12_ = *resized;
#line 178 "/home/jens/Source/shotwell/src/util/image.vala"
- _tmp15_ = *resized;
-#line 178 "/home/jens/Source/shotwell/src/util/image.vala"
- _tmp16_ = _tmp15_.width;
-#line 178 "/home/jens/Source/shotwell/src/util/image.vala"
- _tmp17_ = *resized;
+ _tmp13_ = _tmp12_.width;
#line 178 "/home/jens/Source/shotwell/src/util/image.vala"
- _tmp18_ = _tmp17_.height;
+ _tmp14_ = *resized;
#line 178 "/home/jens/Source/shotwell/src/util/image.vala"
- _tmp19_ = interp;
+ _tmp15_ = _tmp14_.height;
#line 178 "/home/jens/Source/shotwell/src/util/image.vala"
- _tmp20_ = gdk_pixbuf_scale_simple (_tmp14_, _tmp16_, _tmp18_, _tmp19_);
+ _tmp16_ = gdk_pixbuf_scale_simple (pixbuf, _tmp13_, _tmp15_, interp);
#line 178 "/home/jens/Source/shotwell/src/util/image.vala"
- result = _tmp20_;
+ result = _tmp16_;
#line 178 "/home/jens/Source/shotwell/src/util/image.vala"
return result;
-#line 547 "image.c"
+#line 583 "image.c"
}
-void draw_rounded_corners_filled (cairo_t* ctx, Dimensions* dim, GdkPoint* origin, gdouble radius_proportion) {
- cairo_t* _tmp0_;
- Dimensions _tmp1_;
- GdkPoint _tmp2_;
- gdouble _tmp3_;
- cairo_t* _tmp4_;
+void
+draw_rounded_corners_filled (cairo_t* ctx,
+ Dimensions* dim,
+ GdkPoint* origin,
+ gdouble radius_proportion)
+{
+ Dimensions _tmp0_;
+ GdkPoint _tmp1_;
#line 183 "/home/jens/Source/shotwell/src/util/image.vala"
g_return_if_fail (ctx != NULL);
#line 183 "/home/jens/Source/shotwell/src/util/image.vala"
@@ -560,51 +598,40 @@ void draw_rounded_corners_filled (cairo_t* ctx, Dimensions* dim, GdkPoint* origi
#line 183 "/home/jens/Source/shotwell/src/util/image.vala"
g_return_if_fail (origin != NULL);
#line 185 "/home/jens/Source/shotwell/src/util/image.vala"
- _tmp0_ = ctx;
+ _tmp0_ = *dim;
#line 185 "/home/jens/Source/shotwell/src/util/image.vala"
- _tmp1_ = *dim;
-#line 185 "/home/jens/Source/shotwell/src/util/image.vala"
- _tmp2_ = *origin;
+ _tmp1_ = *origin;
#line 185 "/home/jens/Source/shotwell/src/util/image.vala"
- _tmp3_ = radius_proportion;
-#line 185 "/home/jens/Source/shotwell/src/util/image.vala"
- context_rounded_corners (_tmp0_, &_tmp1_, &_tmp2_, _tmp3_);
-#line 186 "/home/jens/Source/shotwell/src/util/image.vala"
- _tmp4_ = ctx;
+ context_rounded_corners (ctx, &_tmp0_, &_tmp1_, radius_proportion);
#line 186 "/home/jens/Source/shotwell/src/util/image.vala"
- cairo_paint (_tmp4_);
-#line 577 "image.c"
+ cairo_paint (ctx);
+#line 609 "image.c"
}
-void context_rounded_corners (cairo_t* cx, Dimensions* dim, GdkPoint* origin, gdouble radius_proportion) {
- gdouble _tmp0_;
- gdouble _tmp1_;
+void
+context_rounded_corners (cairo_t* cx,
+ Dimensions* dim,
+ GdkPoint* origin,
+ gdouble radius_proportion)
+{
gdouble left = 0.0;
+ GdkPoint _tmp0_;
+ gint _tmp1_;
+ gdouble top = 0.0;
GdkPoint _tmp2_;
gint _tmp3_;
- gdouble top = 0.0;
+ gdouble right = 0.0;
GdkPoint _tmp4_;
gint _tmp5_;
- gdouble right = 0.0;
- GdkPoint _tmp6_;
+ Dimensions _tmp6_;
gint _tmp7_;
- Dimensions _tmp8_;
- gint _tmp9_;
gdouble bottom = 0.0;
- GdkPoint _tmp10_;
+ GdkPoint _tmp8_;
+ gint _tmp9_;
+ Dimensions _tmp10_;
gint _tmp11_;
- Dimensions _tmp12_;
- gint _tmp13_;
gdouble radius = 0.0;
- gint _tmp14_;
- gdouble _tmp15_;
- cairo_t* _tmp16_;
- cairo_t* _tmp17_;
- cairo_t* _tmp18_;
- cairo_t* _tmp19_;
- cairo_t* _tmp20_;
- cairo_t* _tmp21_;
#line 189 "/home/jens/Source/shotwell/src/util/image.vala"
g_return_if_fail (cx != NULL);
#line 189 "/home/jens/Source/shotwell/src/util/image.vala"
@@ -612,490 +639,367 @@ void context_rounded_corners (cairo_t* cx, Dimensions* dim, GdkPoint* origin, gd
#line 189 "/home/jens/Source/shotwell/src/util/image.vala"
g_return_if_fail (origin != NULL);
#line 192 "/home/jens/Source/shotwell/src/util/image.vala"
- _tmp0_ = radius_proportion;
-#line 192 "/home/jens/Source/shotwell/src/util/image.vala"
- _tmp1_ = CLAMP (_tmp0_, 2.0, 100.0);
-#line 192 "/home/jens/Source/shotwell/src/util/image.vala"
- radius_proportion = _tmp1_;
+ radius_proportion = CLAMP (radius_proportion, 2.0, 100.0);
#line 194 "/home/jens/Source/shotwell/src/util/image.vala"
- _tmp2_ = *origin;
+ _tmp0_ = *origin;
#line 194 "/home/jens/Source/shotwell/src/util/image.vala"
- _tmp3_ = _tmp2_.x;
+ _tmp1_ = _tmp0_.x;
#line 194 "/home/jens/Source/shotwell/src/util/image.vala"
- left = (gdouble) _tmp3_;
+ left = (gdouble) _tmp1_;
#line 195 "/home/jens/Source/shotwell/src/util/image.vala"
- _tmp4_ = *origin;
+ _tmp2_ = *origin;
#line 195 "/home/jens/Source/shotwell/src/util/image.vala"
- _tmp5_ = _tmp4_.y;
+ _tmp3_ = _tmp2_.y;
#line 195 "/home/jens/Source/shotwell/src/util/image.vala"
- top = (gdouble) _tmp5_;
+ top = (gdouble) _tmp3_;
#line 196 "/home/jens/Source/shotwell/src/util/image.vala"
- _tmp6_ = *origin;
+ _tmp4_ = *origin;
#line 196 "/home/jens/Source/shotwell/src/util/image.vala"
- _tmp7_ = _tmp6_.x;
+ _tmp5_ = _tmp4_.x;
#line 196 "/home/jens/Source/shotwell/src/util/image.vala"
- _tmp8_ = *dim;
+ _tmp6_ = *dim;
#line 196 "/home/jens/Source/shotwell/src/util/image.vala"
- _tmp9_ = _tmp8_.width;
+ _tmp7_ = _tmp6_.width;
#line 196 "/home/jens/Source/shotwell/src/util/image.vala"
- right = (gdouble) (_tmp7_ + _tmp9_);
+ right = (gdouble) (_tmp5_ + _tmp7_);
#line 197 "/home/jens/Source/shotwell/src/util/image.vala"
- _tmp10_ = *origin;
+ _tmp8_ = *origin;
#line 197 "/home/jens/Source/shotwell/src/util/image.vala"
- _tmp11_ = _tmp10_.y;
+ _tmp9_ = _tmp8_.y;
#line 197 "/home/jens/Source/shotwell/src/util/image.vala"
- _tmp12_ = *dim;
+ _tmp10_ = *dim;
#line 197 "/home/jens/Source/shotwell/src/util/image.vala"
- _tmp13_ = _tmp12_.height;
+ _tmp11_ = _tmp10_.height;
#line 197 "/home/jens/Source/shotwell/src/util/image.vala"
- bottom = (gdouble) (_tmp11_ + _tmp13_);
-#line 200 "/home/jens/Source/shotwell/src/util/image.vala"
- _tmp14_ = dimensions_minor_axis (dim);
+ bottom = (gdouble) (_tmp9_ + _tmp11_);
#line 200 "/home/jens/Source/shotwell/src/util/image.vala"
- _tmp15_ = radius_proportion;
-#line 200 "/home/jens/Source/shotwell/src/util/image.vala"
- radius = ((gdouble) _tmp14_) / _tmp15_;
-#line 204 "/home/jens/Source/shotwell/src/util/image.vala"
- _tmp16_ = cx;
+ radius = ((gdouble) dimensions_minor_axis (dim)) / radius_proportion;
#line 204 "/home/jens/Source/shotwell/src/util/image.vala"
- cairo_move_to (_tmp16_, left, top);
-#line 205 "/home/jens/Source/shotwell/src/util/image.vala"
- _tmp17_ = cx;
+ cairo_move_to (cx, left, top);
#line 205 "/home/jens/Source/shotwell/src/util/image.vala"
- cairo_arc (_tmp17_, right - radius, top + radius, radius, -90 * DEGREE, 0 * DEGREE);
+ cairo_arc (cx, right - radius, top + radius, radius, -90 * DEGREE, 0 * DEGREE);
#line 206 "/home/jens/Source/shotwell/src/util/image.vala"
- _tmp18_ = cx;
-#line 206 "/home/jens/Source/shotwell/src/util/image.vala"
- cairo_arc (_tmp18_, right - radius, bottom - radius, radius, 0 * DEGREE, 90 * DEGREE);
-#line 207 "/home/jens/Source/shotwell/src/util/image.vala"
- _tmp19_ = cx;
+ cairo_arc (cx, right - radius, bottom - radius, radius, 0 * DEGREE, 90 * DEGREE);
#line 207 "/home/jens/Source/shotwell/src/util/image.vala"
- cairo_arc (_tmp19_, left + radius, bottom - radius, radius, 90 * DEGREE, 180 * DEGREE);
+ cairo_arc (cx, left + radius, bottom - radius, radius, 90 * DEGREE, 180 * DEGREE);
#line 208 "/home/jens/Source/shotwell/src/util/image.vala"
- _tmp20_ = cx;
-#line 208 "/home/jens/Source/shotwell/src/util/image.vala"
- cairo_arc (_tmp20_, left + radius, top + radius, radius, 180 * DEGREE, 270 * DEGREE);
-#line 209 "/home/jens/Source/shotwell/src/util/image.vala"
- _tmp21_ = cx;
+ cairo_arc (cx, left + radius, top + radius, radius, 180 * DEGREE, 270 * DEGREE);
#line 209 "/home/jens/Source/shotwell/src/util/image.vala"
- cairo_clip (_tmp21_);
-#line 683 "image.c"
+ cairo_clip (cx);
+#line 690 "image.c"
}
-inline guchar shift_color_byte (gint b, gint shift) {
+inline guchar
+shift_color_byte (gint b,
+ gint shift)
+{
guchar result = '\0';
- gint _tmp0_;
- gint _tmp1_;
- gint _tmp2_;
#line 213 "/home/jens/Source/shotwell/src/util/image.vala"
- _tmp0_ = b;
-#line 213 "/home/jens/Source/shotwell/src/util/image.vala"
- _tmp1_ = shift;
-#line 213 "/home/jens/Source/shotwell/src/util/image.vala"
- _tmp2_ = CLAMP (_tmp0_ + _tmp1_, 0, 255);
-#line 213 "/home/jens/Source/shotwell/src/util/image.vala"
- result = (guchar) _tmp2_;
+ result = (guchar) CLAMP (b + shift, 0, 255);
#line 213 "/home/jens/Source/shotwell/src/util/image.vala"
return result;
-#line 702 "image.c"
+#line 703 "image.c"
}
-void shift_colors (GdkPixbuf* pixbuf, gint red, gint green, gint blue, gint alpha) {
+void
+shift_colors (GdkPixbuf* pixbuf,
+ gint red,
+ gint green,
+ gint blue,
+ gint alpha)
+{
gboolean _tmp0_ = FALSE;
- gint _tmp1_;
+ gboolean _tmp1_ = FALSE;
+ gboolean _tmp2_ = FALSE;
gboolean _tmp3_ = FALSE;
- gint _tmp4_;
- gboolean _tmp6_ = FALSE;
- gint _tmp7_;
- gboolean _tmp9_ = FALSE;
- gint _tmp10_;
gint width = 0;
- GdkPixbuf* _tmp12_;
- gint _tmp13_;
gint height = 0;
- GdkPixbuf* _tmp14_;
- gint _tmp15_;
gint rowstride = 0;
- GdkPixbuf* _tmp16_;
- gint _tmp17_;
gint channels = 0;
- GdkPixbuf* _tmp18_;
- gint _tmp19_;
guchar* pixels = NULL;
- GdkPixbuf* _tmp20_;
- guint8* _tmp21_;
- gint _tmp22_;
- GdkPixbuf* _tmp23_;
- GdkColorspace _tmp24_;
- GdkPixbuf* _tmp25_;
- gint _tmp26_;
+ guint8* _tmp4_;
+ gint _tmp5_;
#line 216 "/home/jens/Source/shotwell/src/util/image.vala"
g_return_if_fail (GDK_IS_PIXBUF (pixbuf));
#line 217 "/home/jens/Source/shotwell/src/util/image.vala"
- _tmp1_ = red;
-#line 217 "/home/jens/Source/shotwell/src/util/image.vala"
- if (_tmp1_ >= -255) {
-#line 741 "image.c"
- gint _tmp2_;
-#line 217 "/home/jens/Source/shotwell/src/util/image.vala"
- _tmp2_ = red;
+ if (red >= -255) {
#line 217 "/home/jens/Source/shotwell/src/util/image.vala"
- _tmp0_ = _tmp2_ <= 255;
-#line 747 "image.c"
+ _tmp0_ = red <= 255;
+#line 731 "image.c"
} else {
#line 217 "/home/jens/Source/shotwell/src/util/image.vala"
_tmp0_ = FALSE;
-#line 751 "image.c"
+#line 735 "image.c"
}
#line 217 "/home/jens/Source/shotwell/src/util/image.vala"
_vala_assert (_tmp0_, "red >= -255 && red <= 255");
#line 218 "/home/jens/Source/shotwell/src/util/image.vala"
- _tmp4_ = green;
-#line 218 "/home/jens/Source/shotwell/src/util/image.vala"
- if (_tmp4_ >= -255) {
-#line 759 "image.c"
- gint _tmp5_;
-#line 218 "/home/jens/Source/shotwell/src/util/image.vala"
- _tmp5_ = green;
+ if (green >= -255) {
#line 218 "/home/jens/Source/shotwell/src/util/image.vala"
- _tmp3_ = _tmp5_ <= 255;
-#line 765 "image.c"
+ _tmp1_ = green <= 255;
+#line 743 "image.c"
} else {
#line 218 "/home/jens/Source/shotwell/src/util/image.vala"
- _tmp3_ = FALSE;
-#line 769 "image.c"
+ _tmp1_ = FALSE;
+#line 747 "image.c"
}
#line 218 "/home/jens/Source/shotwell/src/util/image.vala"
- _vala_assert (_tmp3_, "green >= -255 && green <= 255");
+ _vala_assert (_tmp1_, "green >= -255 && green <= 255");
#line 219 "/home/jens/Source/shotwell/src/util/image.vala"
- _tmp7_ = blue;
+ if (blue >= -255) {
#line 219 "/home/jens/Source/shotwell/src/util/image.vala"
- if (_tmp7_ >= -255) {
-#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 783 "image.c"
+ _tmp2_ = blue <= 255;
+#line 755 "image.c"
} else {
#line 219 "/home/jens/Source/shotwell/src/util/image.vala"
- _tmp6_ = FALSE;
-#line 787 "image.c"
+ _tmp2_ = FALSE;
+#line 759 "image.c"
}
#line 219 "/home/jens/Source/shotwell/src/util/image.vala"
- _vala_assert (_tmp6_, "blue >= -255 && blue <= 255");
+ _vala_assert (_tmp2_, "blue >= -255 && blue <= 255");
#line 220 "/home/jens/Source/shotwell/src/util/image.vala"
- _tmp10_ = alpha;
+ if (alpha >= -255) {
#line 220 "/home/jens/Source/shotwell/src/util/image.vala"
- if (_tmp10_ >= -255) {
-#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 801 "image.c"
+ _tmp3_ = alpha <= 255;
+#line 767 "image.c"
} else {
#line 220 "/home/jens/Source/shotwell/src/util/image.vala"
- _tmp9_ = FALSE;
-#line 805 "image.c"
+ _tmp3_ = FALSE;
+#line 771 "image.c"
}
#line 220 "/home/jens/Source/shotwell/src/util/image.vala"
- _vala_assert (_tmp9_, "alpha >= -255 && alpha <= 255");
+ _vala_assert (_tmp3_, "alpha >= -255 && alpha <= 255");
#line 222 "/home/jens/Source/shotwell/src/util/image.vala"
- _tmp12_ = pixbuf;
-#line 222 "/home/jens/Source/shotwell/src/util/image.vala"
- _tmp13_ = gdk_pixbuf_get_width (_tmp12_);
-#line 222 "/home/jens/Source/shotwell/src/util/image.vala"
- width = _tmp13_;
-#line 223 "/home/jens/Source/shotwell/src/util/image.vala"
- _tmp14_ = pixbuf;
-#line 223 "/home/jens/Source/shotwell/src/util/image.vala"
- _tmp15_ = gdk_pixbuf_get_height (_tmp14_);
+ width = gdk_pixbuf_get_width (pixbuf);
#line 223 "/home/jens/Source/shotwell/src/util/image.vala"
- height = _tmp15_;
+ height = gdk_pixbuf_get_height (pixbuf);
#line 224 "/home/jens/Source/shotwell/src/util/image.vala"
- _tmp16_ = pixbuf;
-#line 224 "/home/jens/Source/shotwell/src/util/image.vala"
- _tmp17_ = gdk_pixbuf_get_rowstride (_tmp16_);
-#line 224 "/home/jens/Source/shotwell/src/util/image.vala"
- rowstride = _tmp17_;
-#line 225 "/home/jens/Source/shotwell/src/util/image.vala"
- _tmp18_ = pixbuf;
-#line 225 "/home/jens/Source/shotwell/src/util/image.vala"
- _tmp19_ = gdk_pixbuf_get_n_channels (_tmp18_);
+ rowstride = gdk_pixbuf_get_rowstride (pixbuf);
#line 225 "/home/jens/Source/shotwell/src/util/image.vala"
- channels = _tmp19_;
+ channels = gdk_pixbuf_get_n_channels (pixbuf);
#line 226 "/home/jens/Source/shotwell/src/util/image.vala"
- _tmp20_ = pixbuf;
+ _tmp4_ = gdk_pixbuf_get_pixels (pixbuf);
#line 226 "/home/jens/Source/shotwell/src/util/image.vala"
- _tmp21_ = gdk_pixbuf_get_pixels (_tmp20_);
-#line 226 "/home/jens/Source/shotwell/src/util/image.vala"
- pixels = _tmp21_;
+ pixels = _tmp4_;
#line 228 "/home/jens/Source/shotwell/src/util/image.vala"
- _tmp22_ = channels;
+ _tmp5_ = channels;
#line 228 "/home/jens/Source/shotwell/src/util/image.vala"
- _vala_assert (_tmp22_ >= 3, "channels >= 3");
-#line 229 "/home/jens/Source/shotwell/src/util/image.vala"
- _tmp23_ = pixbuf;
+ _vala_assert (_tmp5_ >= 3, "channels >= 3");
#line 229 "/home/jens/Source/shotwell/src/util/image.vala"
- _tmp24_ = gdk_pixbuf_get_colorspace (_tmp23_);
-#line 229 "/home/jens/Source/shotwell/src/util/image.vala"
- _vala_assert (_tmp24_ == GDK_COLORSPACE_RGB, "pixbuf.get_colorspace() == Gdk.Colorspace.RGB");
-#line 230 "/home/jens/Source/shotwell/src/util/image.vala"
- _tmp25_ = pixbuf;
+ _vala_assert (gdk_pixbuf_get_colorspace (pixbuf) == GDK_COLORSPACE_RGB, "pixbuf.get_colorspace() == Gdk.Colorspace.RGB");
#line 230 "/home/jens/Source/shotwell/src/util/image.vala"
- _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 855 "image.c"
+ _vala_assert (gdk_pixbuf_get_bits_per_sample (pixbuf) == 8, "pixbuf.get_bits_per_sample() == 8");
+#line 795 "image.c"
{
gint y = 0;
#line 232 "/home/jens/Source/shotwell/src/util/image.vala"
y = 0;
-#line 860 "image.c"
+#line 800 "image.c"
{
- gboolean _tmp27_ = FALSE;
+ gboolean _tmp6_ = FALSE;
#line 232 "/home/jens/Source/shotwell/src/util/image.vala"
- _tmp27_ = TRUE;
+ _tmp6_ = TRUE;
#line 232 "/home/jens/Source/shotwell/src/util/image.vala"
while (TRUE) {
-#line 867 "image.c"
- gint _tmp29_;
- gint _tmp30_;
+#line 807 "image.c"
+ gint _tmp8_;
+ gint _tmp9_;
gint y_offset = 0;
- gint _tmp31_;
- gint _tmp32_;
+ gint _tmp10_;
+ gint _tmp11_;
#line 232 "/home/jens/Source/shotwell/src/util/image.vala"
- if (!_tmp27_) {
-#line 875 "image.c"
- gint _tmp28_;
+ if (!_tmp6_) {
+#line 815 "image.c"
+ gint _tmp7_;
#line 232 "/home/jens/Source/shotwell/src/util/image.vala"
- _tmp28_ = y;
+ _tmp7_ = y;
#line 232 "/home/jens/Source/shotwell/src/util/image.vala"
- y = _tmp28_ + 1;
-#line 881 "image.c"
+ y = _tmp7_ + 1;
+#line 821 "image.c"
}
#line 232 "/home/jens/Source/shotwell/src/util/image.vala"
- _tmp27_ = FALSE;
+ _tmp6_ = FALSE;
#line 232 "/home/jens/Source/shotwell/src/util/image.vala"
- _tmp29_ = y;
+ _tmp8_ = y;
#line 232 "/home/jens/Source/shotwell/src/util/image.vala"
- _tmp30_ = height;
+ _tmp9_ = height;
#line 232 "/home/jens/Source/shotwell/src/util/image.vala"
- if (!(_tmp29_ < _tmp30_)) {
+ if (!(_tmp8_ < _tmp9_)) {
#line 232 "/home/jens/Source/shotwell/src/util/image.vala"
break;
-#line 893 "image.c"
+#line 833 "image.c"
}
#line 233 "/home/jens/Source/shotwell/src/util/image.vala"
- _tmp31_ = y;
+ _tmp10_ = y;
#line 233 "/home/jens/Source/shotwell/src/util/image.vala"
- _tmp32_ = rowstride;
+ _tmp11_ = rowstride;
#line 233 "/home/jens/Source/shotwell/src/util/image.vala"
- y_offset = _tmp31_ * _tmp32_;
-#line 901 "image.c"
+ y_offset = _tmp10_ * _tmp11_;
+#line 841 "image.c"
{
gint x = 0;
#line 235 "/home/jens/Source/shotwell/src/util/image.vala"
x = 0;
-#line 906 "image.c"
+#line 846 "image.c"
{
- gboolean _tmp33_ = FALSE;
+ gboolean _tmp12_ = FALSE;
#line 235 "/home/jens/Source/shotwell/src/util/image.vala"
- _tmp33_ = TRUE;
+ _tmp12_ = TRUE;
#line 235 "/home/jens/Source/shotwell/src/util/image.vala"
while (TRUE) {
-#line 913 "image.c"
- gint _tmp35_;
- gint _tmp36_;
+#line 853 "image.c"
+ gint _tmp14_;
+ gint _tmp15_;
gint offset = 0;
- gint _tmp37_;
- gint _tmp38_;
- gint _tmp39_;
- gint _tmp40_;
- gint _tmp49_;
- gint _tmp58_;
- gboolean _tmp67_ = FALSE;
- gint _tmp68_;
+ gint _tmp16_;
+ gint _tmp17_;
+ gint _tmp18_;
+ gboolean _tmp37_ = FALSE;
#line 235 "/home/jens/Source/shotwell/src/util/image.vala"
- if (!_tmp33_) {
-#line 927 "image.c"
- gint _tmp34_;
+ if (!_tmp12_) {
+#line 863 "image.c"
+ gint _tmp13_;
#line 235 "/home/jens/Source/shotwell/src/util/image.vala"
- _tmp34_ = x;
+ _tmp13_ = x;
#line 235 "/home/jens/Source/shotwell/src/util/image.vala"
- x = _tmp34_ + 1;
-#line 933 "image.c"
+ x = _tmp13_ + 1;
+#line 869 "image.c"
}
#line 235 "/home/jens/Source/shotwell/src/util/image.vala"
- _tmp33_ = FALSE;
+ _tmp12_ = FALSE;
#line 235 "/home/jens/Source/shotwell/src/util/image.vala"
- _tmp35_ = x;
+ _tmp14_ = x;
#line 235 "/home/jens/Source/shotwell/src/util/image.vala"
- _tmp36_ = width;
+ _tmp15_ = width;
#line 235 "/home/jens/Source/shotwell/src/util/image.vala"
- if (!(_tmp35_ < _tmp36_)) {
+ if (!(_tmp14_ < _tmp15_)) {
#line 235 "/home/jens/Source/shotwell/src/util/image.vala"
break;
-#line 945 "image.c"
+#line 881 "image.c"
}
#line 236 "/home/jens/Source/shotwell/src/util/image.vala"
- _tmp37_ = y_offset;
+ _tmp16_ = y_offset;
#line 236 "/home/jens/Source/shotwell/src/util/image.vala"
- _tmp38_ = x;
+ _tmp17_ = x;
#line 236 "/home/jens/Source/shotwell/src/util/image.vala"
- _tmp39_ = channels;
+ _tmp18_ = channels;
#line 236 "/home/jens/Source/shotwell/src/util/image.vala"
- offset = _tmp37_ + (_tmp38_ * _tmp39_);
-#line 238 "/home/jens/Source/shotwell/src/util/image.vala"
- _tmp40_ = red;
+ offset = _tmp16_ + (_tmp17_ * _tmp18_);
#line 238 "/home/jens/Source/shotwell/src/util/image.vala"
- if (_tmp40_ != 0) {
-#line 959 "image.c"
- guchar* _tmp41_;
- gint _tmp42_;
- guchar* _tmp43_;
- gint _tmp44_;
- guchar _tmp45_;
- gint _tmp46_;
- guchar _tmp47_;
- guchar _tmp48_;
-#line 239 "/home/jens/Source/shotwell/src/util/image.vala"
- _tmp41_ = pixels;
-#line 239 "/home/jens/Source/shotwell/src/util/image.vala"
- _tmp42_ = offset;
+ if (red != 0) {
+#line 893 "image.c"
+ guchar* _tmp19_;
+ gint _tmp20_;
+ guchar* _tmp21_;
+ gint _tmp22_;
+ guchar _tmp23_;
+ guchar _tmp24_;
#line 239 "/home/jens/Source/shotwell/src/util/image.vala"
- _tmp43_ = pixels;
+ _tmp19_ = pixels;
#line 239 "/home/jens/Source/shotwell/src/util/image.vala"
- _tmp44_ = offset;
+ _tmp20_ = offset;
#line 239 "/home/jens/Source/shotwell/src/util/image.vala"
- _tmp45_ = _tmp43_[_tmp44_];
+ _tmp21_ = pixels;
#line 239 "/home/jens/Source/shotwell/src/util/image.vala"
- _tmp46_ = red;
+ _tmp22_ = offset;
#line 239 "/home/jens/Source/shotwell/src/util/image.vala"
- _tmp47_ = shift_color_byte ((gint) _tmp45_, _tmp46_);
+ _tmp23_ = _tmp21_[_tmp22_];
#line 239 "/home/jens/Source/shotwell/src/util/image.vala"
- _tmp41_[_tmp42_] = _tmp47_;
+ _tmp19_[_tmp20_] = shift_color_byte ((gint) _tmp23_, red);
#line 239 "/home/jens/Source/shotwell/src/util/image.vala"
- _tmp48_ = _tmp41_[_tmp42_];
-#line 986 "image.c"
+ _tmp24_ = _tmp19_[_tmp20_];
+#line 914 "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 992 "image.c"
- guchar* _tmp50_;
- gint _tmp51_;
- guchar* _tmp52_;
- gint _tmp53_;
- guchar _tmp54_;
- gint _tmp55_;
- guchar _tmp56_;
- guchar _tmp57_;
-#line 242 "/home/jens/Source/shotwell/src/util/image.vala"
- _tmp50_ = pixels;
+ if (green != 0) {
+#line 918 "image.c"
+ guchar* _tmp25_;
+ gint _tmp26_;
+ guchar* _tmp27_;
+ gint _tmp28_;
+ guchar _tmp29_;
+ guchar _tmp30_;
#line 242 "/home/jens/Source/shotwell/src/util/image.vala"
- _tmp51_ = offset;
+ _tmp25_ = pixels;
#line 242 "/home/jens/Source/shotwell/src/util/image.vala"
- _tmp52_ = pixels;
+ _tmp26_ = offset;
#line 242 "/home/jens/Source/shotwell/src/util/image.vala"
- _tmp53_ = offset;
+ _tmp27_ = pixels;
#line 242 "/home/jens/Source/shotwell/src/util/image.vala"
- _tmp54_ = _tmp52_[_tmp53_ + 1];
+ _tmp28_ = offset;
#line 242 "/home/jens/Source/shotwell/src/util/image.vala"
- _tmp55_ = green;
+ _tmp29_ = _tmp27_[_tmp28_ + 1];
#line 242 "/home/jens/Source/shotwell/src/util/image.vala"
- _tmp56_ = shift_color_byte ((gint) _tmp54_, _tmp55_);
+ _tmp25_[_tmp26_ + 1] = shift_color_byte ((gint) _tmp29_, green);
#line 242 "/home/jens/Source/shotwell/src/util/image.vala"
- _tmp50_[_tmp51_ + 1] = _tmp56_;
-#line 242 "/home/jens/Source/shotwell/src/util/image.vala"
- _tmp57_ = _tmp50_[_tmp51_ + 1];
-#line 1019 "image.c"
+ _tmp30_ = _tmp25_[_tmp26_ + 1];
+#line 939 "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 1025 "image.c"
- guchar* _tmp59_;
- gint _tmp60_;
- guchar* _tmp61_;
- gint _tmp62_;
- guchar _tmp63_;
- gint _tmp64_;
- guchar _tmp65_;
- guchar _tmp66_;
-#line 245 "/home/jens/Source/shotwell/src/util/image.vala"
- _tmp59_ = pixels;
-#line 245 "/home/jens/Source/shotwell/src/util/image.vala"
- _tmp60_ = offset;
+ if (blue != 0) {
+#line 943 "image.c"
+ guchar* _tmp31_;
+ gint _tmp32_;
+ guchar* _tmp33_;
+ gint _tmp34_;
+ guchar _tmp35_;
+ guchar _tmp36_;
#line 245 "/home/jens/Source/shotwell/src/util/image.vala"
- _tmp61_ = pixels;
+ _tmp31_ = pixels;
#line 245 "/home/jens/Source/shotwell/src/util/image.vala"
- _tmp62_ = offset;
+ _tmp32_ = offset;
#line 245 "/home/jens/Source/shotwell/src/util/image.vala"
- _tmp63_ = _tmp61_[_tmp62_ + 2];
+ _tmp33_ = pixels;
#line 245 "/home/jens/Source/shotwell/src/util/image.vala"
- _tmp64_ = blue;
+ _tmp34_ = offset;
#line 245 "/home/jens/Source/shotwell/src/util/image.vala"
- _tmp65_ = shift_color_byte ((gint) _tmp63_, _tmp64_);
+ _tmp35_ = _tmp33_[_tmp34_ + 2];
#line 245 "/home/jens/Source/shotwell/src/util/image.vala"
- _tmp59_[_tmp60_ + 2] = _tmp65_;
+ _tmp31_[_tmp32_ + 2] = shift_color_byte ((gint) _tmp35_, blue);
#line 245 "/home/jens/Source/shotwell/src/util/image.vala"
- _tmp66_ = _tmp59_[_tmp60_ + 2];
-#line 1052 "image.c"
+ _tmp36_ = _tmp31_[_tmp32_ + 2];
+#line 964 "image.c"
}
#line 247 "/home/jens/Source/shotwell/src/util/image.vala"
- _tmp68_ = alpha;
+ if (alpha != 0) {
+#line 968 "image.c"
+ gint _tmp38_;
#line 247 "/home/jens/Source/shotwell/src/util/image.vala"
- if (_tmp68_ != 0) {
-#line 1058 "image.c"
- gint _tmp69_;
+ _tmp38_ = channels;
#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 1064 "image.c"
+ _tmp37_ = _tmp38_ >= 4;
+#line 974 "image.c"
} else {
#line 247 "/home/jens/Source/shotwell/src/util/image.vala"
- _tmp67_ = FALSE;
-#line 1068 "image.c"
+ _tmp37_ = FALSE;
+#line 978 "image.c"
}
#line 247 "/home/jens/Source/shotwell/src/util/image.vala"
- if (_tmp67_) {
-#line 1072 "image.c"
- guchar* _tmp70_;
- gint _tmp71_;
- guchar* _tmp72_;
- gint _tmp73_;
- guchar _tmp74_;
- gint _tmp75_;
- guchar _tmp76_;
- guchar _tmp77_;
-#line 248 "/home/jens/Source/shotwell/src/util/image.vala"
- _tmp70_ = pixels;
-#line 248 "/home/jens/Source/shotwell/src/util/image.vala"
- _tmp71_ = offset;
+ if (_tmp37_) {
+#line 982 "image.c"
+ guchar* _tmp39_;
+ gint _tmp40_;
+ guchar* _tmp41_;
+ gint _tmp42_;
+ guchar _tmp43_;
+ guchar _tmp44_;
#line 248 "/home/jens/Source/shotwell/src/util/image.vala"
- _tmp72_ = pixels;
+ _tmp39_ = pixels;
#line 248 "/home/jens/Source/shotwell/src/util/image.vala"
- _tmp73_ = offset;
+ _tmp40_ = offset;
#line 248 "/home/jens/Source/shotwell/src/util/image.vala"
- _tmp74_ = _tmp72_[_tmp73_ + 3];
+ _tmp41_ = pixels;
#line 248 "/home/jens/Source/shotwell/src/util/image.vala"
- _tmp75_ = alpha;
+ _tmp42_ = offset;
#line 248 "/home/jens/Source/shotwell/src/util/image.vala"
- _tmp76_ = shift_color_byte ((gint) _tmp74_, _tmp75_);
+ _tmp43_ = _tmp41_[_tmp42_ + 3];
#line 248 "/home/jens/Source/shotwell/src/util/image.vala"
- _tmp70_[_tmp71_ + 3] = _tmp76_;
+ _tmp39_[_tmp40_ + 3] = shift_color_byte ((gint) _tmp43_, alpha);
#line 248 "/home/jens/Source/shotwell/src/util/image.vala"
- _tmp77_ = _tmp70_[_tmp71_ + 3];
-#line 1099 "image.c"
+ _tmp44_ = _tmp39_[_tmp40_ + 3];
+#line 1003 "image.c"
}
}
}
@@ -1106,103 +1010,98 @@ void shift_colors (GdkPixbuf* pixbuf, gint red, gint green, gint blue, gint alph
}
-gboolean coord_in_rectangle (gint x, gint y, GdkRectangle* rect) {
+gboolean
+coord_in_rectangle (gint x,
+ gint y,
+ GdkRectangle* rect)
+{
gboolean result = FALSE;
gboolean _tmp0_ = FALSE;
gboolean _tmp1_ = FALSE;
gboolean _tmp2_ = FALSE;
- gint _tmp3_;
- GdkRectangle _tmp4_;
- gint _tmp5_;
+ GdkRectangle _tmp3_;
+ gint _tmp4_;
#line 253 "/home/jens/Source/shotwell/src/util/image.vala"
g_return_val_if_fail (rect != NULL, FALSE);
#line 254 "/home/jens/Source/shotwell/src/util/image.vala"
- _tmp3_ = x;
-#line 254 "/home/jens/Source/shotwell/src/util/image.vala"
- _tmp4_ = *rect;
+ _tmp3_ = *rect;
#line 254 "/home/jens/Source/shotwell/src/util/image.vala"
- _tmp5_ = _tmp4_.x;
+ _tmp4_ = _tmp3_.x;
#line 254 "/home/jens/Source/shotwell/src/util/image.vala"
- if (_tmp3_ >= _tmp5_) {
-#line 1128 "image.c"
+ if (x >= _tmp4_) {
+#line 1033 "image.c"
+ GdkRectangle _tmp5_;
gint _tmp6_;
GdkRectangle _tmp7_;
gint _tmp8_;
- GdkRectangle _tmp9_;
- gint _tmp10_;
-#line 254 "/home/jens/Source/shotwell/src/util/image.vala"
- _tmp6_ = x;
#line 254 "/home/jens/Source/shotwell/src/util/image.vala"
- _tmp7_ = *rect;
+ _tmp5_ = *rect;
#line 254 "/home/jens/Source/shotwell/src/util/image.vala"
- _tmp8_ = _tmp7_.x;
+ _tmp6_ = _tmp5_.x;
#line 254 "/home/jens/Source/shotwell/src/util/image.vala"
- _tmp9_ = *rect;
+ _tmp7_ = *rect;
#line 254 "/home/jens/Source/shotwell/src/util/image.vala"
- _tmp10_ = _tmp9_.width;
+ _tmp8_ = _tmp7_.width;
#line 254 "/home/jens/Source/shotwell/src/util/image.vala"
- _tmp2_ = _tmp6_ < (_tmp8_ + _tmp10_);
-#line 1146 "image.c"
+ _tmp2_ = x < (_tmp6_ + _tmp8_);
+#line 1048 "image.c"
} else {
#line 254 "/home/jens/Source/shotwell/src/util/image.vala"
_tmp2_ = FALSE;
-#line 1150 "image.c"
+#line 1052 "image.c"
}
#line 254 "/home/jens/Source/shotwell/src/util/image.vala"
if (_tmp2_) {
-#line 1154 "image.c"
- gint _tmp11_;
- GdkRectangle _tmp12_;
- gint _tmp13_;
-#line 254 "/home/jens/Source/shotwell/src/util/image.vala"
- _tmp11_ = y;
+#line 1056 "image.c"
+ GdkRectangle _tmp9_;
+ gint _tmp10_;
#line 254 "/home/jens/Source/shotwell/src/util/image.vala"
- _tmp12_ = *rect;
+ _tmp9_ = *rect;
#line 254 "/home/jens/Source/shotwell/src/util/image.vala"
- _tmp13_ = _tmp12_.y;
+ _tmp10_ = _tmp9_.y;
#line 254 "/home/jens/Source/shotwell/src/util/image.vala"
- _tmp1_ = _tmp11_ >= _tmp13_;
-#line 1166 "image.c"
+ _tmp1_ = y >= _tmp10_;
+#line 1065 "image.c"
} else {
#line 254 "/home/jens/Source/shotwell/src/util/image.vala"
_tmp1_ = FALSE;
-#line 1170 "image.c"
+#line 1069 "image.c"
}
#line 254 "/home/jens/Source/shotwell/src/util/image.vala"
if (_tmp1_) {
-#line 1174 "image.c"
+#line 1073 "image.c"
+ GdkRectangle _tmp11_;
+ gint _tmp12_;
+ GdkRectangle _tmp13_;
gint _tmp14_;
- GdkRectangle _tmp15_;
- gint _tmp16_;
- GdkRectangle _tmp17_;
- gint _tmp18_;
#line 254 "/home/jens/Source/shotwell/src/util/image.vala"
- _tmp14_ = y;
+ _tmp11_ = *rect;
#line 254 "/home/jens/Source/shotwell/src/util/image.vala"
- _tmp15_ = *rect;
+ _tmp12_ = _tmp11_.y;
#line 254 "/home/jens/Source/shotwell/src/util/image.vala"
- _tmp16_ = _tmp15_.y;
+ _tmp13_ = *rect;
#line 254 "/home/jens/Source/shotwell/src/util/image.vala"
- _tmp17_ = *rect;
+ _tmp14_ = _tmp13_.height;
#line 254 "/home/jens/Source/shotwell/src/util/image.vala"
- _tmp18_ = _tmp17_.height;
-#line 254 "/home/jens/Source/shotwell/src/util/image.vala"
- _tmp0_ = _tmp14_ <= (_tmp16_ + _tmp18_);
-#line 1192 "image.c"
+ _tmp0_ = y <= (_tmp12_ + _tmp14_);
+#line 1088 "image.c"
} else {
#line 254 "/home/jens/Source/shotwell/src/util/image.vala"
_tmp0_ = FALSE;
-#line 1196 "image.c"
+#line 1092 "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 1202 "image.c"
+#line 1098 "image.c"
}
-gboolean rectangles_equal (GdkRectangle* a, GdkRectangle* b) {
+gboolean
+rectangles_equal (GdkRectangle* a,
+ GdkRectangle* b)
+{
gboolean result = FALSE;
gboolean _tmp0_ = FALSE;
gboolean _tmp1_ = FALSE;
@@ -1225,7 +1124,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 1229 "image.c"
+#line 1128 "image.c"
GdkRectangle _tmp7_;
gint _tmp8_;
GdkRectangle _tmp9_;
@@ -1240,15 +1139,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 1244 "image.c"
+#line 1143 "image.c"
} else {
#line 258 "/home/jens/Source/shotwell/src/util/image.vala"
_tmp2_ = FALSE;
-#line 1248 "image.c"
+#line 1147 "image.c"
}
#line 258 "/home/jens/Source/shotwell/src/util/image.vala"
if (_tmp2_) {
-#line 1252 "image.c"
+#line 1151 "image.c"
GdkRectangle _tmp11_;
gint _tmp12_;
GdkRectangle _tmp13_;
@@ -1263,15 +1162,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 1267 "image.c"
+#line 1166 "image.c"
} else {
#line 258 "/home/jens/Source/shotwell/src/util/image.vala"
_tmp1_ = FALSE;
-#line 1271 "image.c"
+#line 1170 "image.c"
}
#line 258 "/home/jens/Source/shotwell/src/util/image.vala"
if (_tmp1_) {
-#line 1275 "image.c"
+#line 1174 "image.c"
GdkRectangle _tmp15_;
gint _tmp16_;
GdkRectangle _tmp17_;
@@ -1286,21 +1185,23 @@ gboolean rectangles_equal (GdkRectangle* a, GdkRectangle* b) {
_tmp18_ = _tmp17_.height;
#line 258 "/home/jens/Source/shotwell/src/util/image.vala"
_tmp0_ = _tmp16_ == _tmp18_;
-#line 1290 "image.c"
+#line 1189 "image.c"
} else {
#line 258 "/home/jens/Source/shotwell/src/util/image.vala"
_tmp0_ = FALSE;
-#line 1294 "image.c"
+#line 1193 "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 1300 "image.c"
+#line 1199 "image.c"
}
-gchar* rectangle_to_string (GdkRectangle* rect) {
+gchar*
+rectangle_to_string (GdkRectangle* rect)
+{
gchar* result = NULL;
GdkRectangle _tmp0_;
gint _tmp1_;
@@ -1335,32 +1236,32 @@ gchar* rectangle_to_string (GdkRectangle* rect) {
result = _tmp8_;
#line 262 "/home/jens/Source/shotwell/src/util/image.vala"
return result;
-#line 1339 "image.c"
+#line 1240 "image.c"
}
-void clamp_rectangle (GdkRectangle* original, Dimensions* max, GdkRectangle* result) {
+void
+clamp_rectangle (GdkRectangle* original,
+ Dimensions* max,
+ GdkRectangle* result)
+{
GdkRectangle rect = {0};
GdkRectangle _tmp0_;
gint _tmp1_;
Dimensions _tmp2_;
gint _tmp3_;
- gint _tmp4_;
- GdkRectangle _tmp5_;
- gint _tmp6_;
- Dimensions _tmp7_;
- gint _tmp8_;
+ GdkRectangle _tmp4_;
+ gint _tmp5_;
+ Dimensions _tmp6_;
+ gint _tmp7_;
+ GdkRectangle _tmp8_;
gint _tmp9_;
- GdkRectangle _tmp10_;
+ Dimensions _tmp10_;
gint _tmp11_;
- Dimensions _tmp12_;
+ GdkRectangle _tmp12_;
gint _tmp13_;
- gint _tmp14_;
- GdkRectangle _tmp15_;
- gint _tmp16_;
- Dimensions _tmp17_;
- gint _tmp18_;
- gint _tmp19_;
+ Dimensions _tmp14_;
+ gint _tmp15_;
#line 265 "/home/jens/Source/shotwell/src/util/image.vala"
g_return_if_fail (original != NULL);
#line 265 "/home/jens/Source/shotwell/src/util/image.vala"
@@ -1376,62 +1277,56 @@ void clamp_rectangle (GdkRectangle* original, Dimensions* max, GdkRectangle* res
#line 267 "/home/jens/Source/shotwell/src/util/image.vala"
_tmp3_ = _tmp2_.width;
#line 267 "/home/jens/Source/shotwell/src/util/image.vala"
- _tmp4_ = CLAMP (_tmp1_, 0, _tmp3_);
-#line 267 "/home/jens/Source/shotwell/src/util/image.vala"
- rect.x = _tmp4_;
+ rect.x = CLAMP (_tmp1_, 0, _tmp3_);
#line 268 "/home/jens/Source/shotwell/src/util/image.vala"
- _tmp5_ = *original;
+ _tmp4_ = *original;
#line 268 "/home/jens/Source/shotwell/src/util/image.vala"
- _tmp6_ = _tmp5_.y;
-#line 268 "/home/jens/Source/shotwell/src/util/image.vala"
- _tmp7_ = *max;
+ _tmp5_ = _tmp4_.y;
#line 268 "/home/jens/Source/shotwell/src/util/image.vala"
- _tmp8_ = _tmp7_.height;
+ _tmp6_ = *max;
#line 268 "/home/jens/Source/shotwell/src/util/image.vala"
- _tmp9_ = CLAMP (_tmp6_, 0, _tmp8_);
+ _tmp7_ = _tmp6_.height;
#line 268 "/home/jens/Source/shotwell/src/util/image.vala"
- rect.y = _tmp9_;
+ rect.y = CLAMP (_tmp5_, 0, _tmp7_);
#line 269 "/home/jens/Source/shotwell/src/util/image.vala"
- _tmp10_ = *original;
+ _tmp8_ = *original;
#line 269 "/home/jens/Source/shotwell/src/util/image.vala"
- _tmp11_ = _tmp10_.width;
-#line 269 "/home/jens/Source/shotwell/src/util/image.vala"
- _tmp12_ = *max;
+ _tmp9_ = _tmp8_.width;
#line 269 "/home/jens/Source/shotwell/src/util/image.vala"
- _tmp13_ = _tmp12_.width;
+ _tmp10_ = *max;
#line 269 "/home/jens/Source/shotwell/src/util/image.vala"
- _tmp14_ = CLAMP (_tmp11_, 0, _tmp13_);
+ _tmp11_ = _tmp10_.width;
#line 269 "/home/jens/Source/shotwell/src/util/image.vala"
- rect.width = _tmp14_;
-#line 270 "/home/jens/Source/shotwell/src/util/image.vala"
- _tmp15_ = *original;
+ rect.width = CLAMP (_tmp9_, 0, _tmp11_);
#line 270 "/home/jens/Source/shotwell/src/util/image.vala"
- _tmp16_ = _tmp15_.height;
+ _tmp12_ = *original;
#line 270 "/home/jens/Source/shotwell/src/util/image.vala"
- _tmp17_ = *max;
+ _tmp13_ = _tmp12_.height;
#line 270 "/home/jens/Source/shotwell/src/util/image.vala"
- _tmp18_ = _tmp17_.height;
+ _tmp14_ = *max;
#line 270 "/home/jens/Source/shotwell/src/util/image.vala"
- _tmp19_ = CLAMP (_tmp16_, 0, _tmp18_);
+ _tmp15_ = _tmp14_.height;
#line 270 "/home/jens/Source/shotwell/src/util/image.vala"
- rect.height = _tmp19_;
+ rect.height = CLAMP (_tmp13_, 0, _tmp15_);
#line 272 "/home/jens/Source/shotwell/src/util/image.vala"
*result = rect;
#line 272 "/home/jens/Source/shotwell/src/util/image.vala"
return;
-#line 1423 "image.c"
+#line 1316 "image.c"
}
-void scale_point (GdkPoint* p, gdouble factor, GdkPoint* result) {
+void
+scale_point (GdkPoint* p,
+ gdouble factor,
+ GdkPoint* result)
+{
GdkPoint _result_ = {0};
GdkPoint _tmp0_ = {0};
- gdouble _tmp1_;
- GdkPoint _tmp2_;
- gint _tmp3_;
- gdouble _tmp4_;
- GdkPoint _tmp5_;
- gint _tmp6_;
+ GdkPoint _tmp1_;
+ gint _tmp2_;
+ GdkPoint _tmp3_;
+ gint _tmp4_;
#line 275 "/home/jens/Source/shotwell/src/util/image.vala"
g_return_if_fail (p != NULL);
#line 276 "/home/jens/Source/shotwell/src/util/image.vala"
@@ -1439,30 +1334,30 @@ void scale_point (GdkPoint* p, gdouble factor, GdkPoint* result) {
#line 276 "/home/jens/Source/shotwell/src/util/image.vala"
_result_ = _tmp0_;
#line 277 "/home/jens/Source/shotwell/src/util/image.vala"
- _tmp1_ = factor;
-#line 277 "/home/jens/Source/shotwell/src/util/image.vala"
- _tmp2_ = *p;
+ _tmp1_ = *p;
#line 277 "/home/jens/Source/shotwell/src/util/image.vala"
- _tmp3_ = _tmp2_.x;
+ _tmp2_ = _tmp1_.x;
#line 277 "/home/jens/Source/shotwell/src/util/image.vala"
- _result_.x = (gint) ((_tmp1_ * _tmp3_) + 0.5);
-#line 278 "/home/jens/Source/shotwell/src/util/image.vala"
- _tmp4_ = factor;
+ _result_.x = (gint) ((factor * _tmp2_) + 0.5);
#line 278 "/home/jens/Source/shotwell/src/util/image.vala"
- _tmp5_ = *p;
+ _tmp3_ = *p;
#line 278 "/home/jens/Source/shotwell/src/util/image.vala"
- _tmp6_ = _tmp5_.y;
+ _tmp4_ = _tmp3_.y;
#line 278 "/home/jens/Source/shotwell/src/util/image.vala"
- _result_.y = (gint) ((_tmp4_ * _tmp6_) + 0.5);
+ _result_.y = (gint) ((factor * _tmp4_) + 0.5);
#line 280 "/home/jens/Source/shotwell/src/util/image.vala"
*result = _result_;
#line 280 "/home/jens/Source/shotwell/src/util/image.vala"
return;
-#line 1462 "image.c"
+#line 1353 "image.c"
}
-void add_points (GdkPoint* p1, GdkPoint* p2, GdkPoint* result) {
+void
+add_points (GdkPoint* p1,
+ GdkPoint* p2,
+ GdkPoint* result)
+{
GdkPoint _result_ = {0};
GdkPoint _tmp0_ = {0};
GdkPoint _tmp1_;
@@ -1505,11 +1400,15 @@ void add_points (GdkPoint* p1, GdkPoint* p2, GdkPoint* result) {
*result = _result_;
#line 288 "/home/jens/Source/shotwell/src/util/image.vala"
return;
-#line 1509 "image.c"
+#line 1404 "image.c"
}
-void subtract_points (GdkPoint* p1, GdkPoint* p2, GdkPoint* result) {
+void
+subtract_points (GdkPoint* p1,
+ GdkPoint* p2,
+ GdkPoint* result)
+{
GdkPoint _result_ = {0};
GdkPoint _tmp0_ = {0};
GdkPoint _tmp1_;
@@ -1552,160 +1451,150 @@ void subtract_points (GdkPoint* p1, GdkPoint* p2, GdkPoint* result) {
*result = _result_;
#line 296 "/home/jens/Source/shotwell/src/util/image.vala"
return;
-#line 1556 "image.c"
+#line 1455 "image.c"
}
-void fix_cairo_pixbuf (GdkPixbuf* pixbuf) {
+void
+fix_cairo_pixbuf (GdkPixbuf* pixbuf)
+{
guchar* gdk_pixels = NULL;
- GdkPixbuf* _tmp0_;
+ void* _tmp0_;
void* _tmp1_;
- void* _tmp2_;
#line 300 "/home/jens/Source/shotwell/src/util/image.vala"
g_return_if_fail (GDK_IS_PIXBUF (pixbuf));
#line 301 "/home/jens/Source/shotwell/src/util/image.vala"
- _tmp0_ = pixbuf;
-#line 301 "/home/jens/Source/shotwell/src/util/image.vala"
- _tmp1_ = gdk_pixbuf_get_pixels (_tmp0_);
+ _tmp0_ = gdk_pixbuf_get_pixels (pixbuf);
#line 301 "/home/jens/Source/shotwell/src/util/image.vala"
- _tmp2_ = _tmp1_;
+ _tmp1_ = _tmp0_;
#line 301 "/home/jens/Source/shotwell/src/util/image.vala"
- gdk_pixels = _tmp2_;
-#line 1575 "image.c"
+ gdk_pixels = _tmp1_;
+#line 1473 "image.c"
{
gint j = 0;
#line 302 "/home/jens/Source/shotwell/src/util/image.vala"
j = 0;
-#line 1580 "image.c"
+#line 1478 "image.c"
{
- gboolean _tmp3_ = FALSE;
+ gboolean _tmp2_ = FALSE;
#line 302 "/home/jens/Source/shotwell/src/util/image.vala"
- _tmp3_ = TRUE;
+ _tmp2_ = TRUE;
#line 302 "/home/jens/Source/shotwell/src/util/image.vala"
while (TRUE) {
-#line 1587 "image.c"
+#line 1485 "image.c"
+ gint _tmp4_;
gint _tmp5_;
- GdkPixbuf* _tmp6_;
- gint _tmp7_;
- gint _tmp8_;
+ gint _tmp6_;
guchar* p = NULL;
- guchar* _tmp9_;
+ guchar* _tmp7_;
guchar* end = NULL;
- guchar* _tmp10_;
- GdkPixbuf* _tmp11_;
- gint _tmp12_;
- gint _tmp13_;
- guchar* _tmp26_;
- GdkPixbuf* _tmp27_;
- gint _tmp28_;
- gint _tmp29_;
+ guchar* _tmp8_;
+ gint _tmp9_;
+ gint _tmp10_;
+ guchar* _tmp23_;
+ gint _tmp24_;
+ gint _tmp25_;
#line 302 "/home/jens/Source/shotwell/src/util/image.vala"
- if (!_tmp3_) {
-#line 1605 "image.c"
- gint _tmp4_;
+ if (!_tmp2_) {
+#line 1500 "image.c"
+ gint _tmp3_;
#line 302 "/home/jens/Source/shotwell/src/util/image.vala"
- _tmp4_ = j;
+ _tmp3_ = j;
#line 302 "/home/jens/Source/shotwell/src/util/image.vala"
- j = _tmp4_ + 1;
-#line 1611 "image.c"
+ j = _tmp3_ + 1;
+#line 1506 "image.c"
}
#line 302 "/home/jens/Source/shotwell/src/util/image.vala"
- _tmp3_ = FALSE;
+ _tmp2_ = FALSE;
#line 302 "/home/jens/Source/shotwell/src/util/image.vala"
- _tmp5_ = j;
+ _tmp4_ = j;
#line 302 "/home/jens/Source/shotwell/src/util/image.vala"
- _tmp6_ = pixbuf;
+ _tmp5_ = gdk_pixbuf_get_height (pixbuf);
#line 302 "/home/jens/Source/shotwell/src/util/image.vala"
- _tmp7_ = gdk_pixbuf_get_height (_tmp6_);
+ _tmp6_ = _tmp5_;
#line 302 "/home/jens/Source/shotwell/src/util/image.vala"
- _tmp8_ = _tmp7_;
-#line 302 "/home/jens/Source/shotwell/src/util/image.vala"
- if (!(_tmp5_ < _tmp8_)) {
+ if (!(_tmp4_ < _tmp6_)) {
#line 302 "/home/jens/Source/shotwell/src/util/image.vala"
break;
-#line 1627 "image.c"
+#line 1520 "image.c"
}
#line 303 "/home/jens/Source/shotwell/src/util/image.vala"
- _tmp9_ = gdk_pixels;
+ _tmp7_ = gdk_pixels;
#line 303 "/home/jens/Source/shotwell/src/util/image.vala"
- p = _tmp9_;
-#line 304 "/home/jens/Source/shotwell/src/util/image.vala"
- _tmp10_ = p;
+ p = _tmp7_;
#line 304 "/home/jens/Source/shotwell/src/util/image.vala"
- _tmp11_ = pixbuf;
+ _tmp8_ = p;
#line 304 "/home/jens/Source/shotwell/src/util/image.vala"
- _tmp12_ = gdk_pixbuf_get_width (_tmp11_);
+ _tmp9_ = gdk_pixbuf_get_width (pixbuf);
#line 304 "/home/jens/Source/shotwell/src/util/image.vala"
- _tmp13_ = _tmp12_;
+ _tmp10_ = _tmp9_;
#line 304 "/home/jens/Source/shotwell/src/util/image.vala"
- end = _tmp10_ + (4 * _tmp13_);
+ end = _tmp8_ + (4 * _tmp10_);
#line 306 "/home/jens/Source/shotwell/src/util/image.vala"
while (TRUE) {
-#line 1645 "image.c"
- guchar* _tmp14_;
- guchar* _tmp15_;
+#line 1536 "image.c"
+ guchar* _tmp11_;
+ guchar* _tmp12_;
guchar tmp = '\0';
+ guchar* _tmp13_;
+ guchar _tmp14_;
+ guchar* _tmp15_;
guchar* _tmp16_;
guchar _tmp17_;
- guchar* _tmp18_;
+ guchar _tmp18_;
guchar* _tmp19_;
guchar _tmp20_;
guchar _tmp21_;
guchar* _tmp22_;
- guchar _tmp23_;
- guchar _tmp24_;
- guchar* _tmp25_;
#line 306 "/home/jens/Source/shotwell/src/util/image.vala"
- _tmp14_ = p;
+ _tmp11_ = p;
#line 306 "/home/jens/Source/shotwell/src/util/image.vala"
- _tmp15_ = end;
+ _tmp12_ = end;
#line 306 "/home/jens/Source/shotwell/src/util/image.vala"
- if (!(_tmp14_ < _tmp15_)) {
+ if (!(_tmp11_ < _tmp12_)) {
#line 306 "/home/jens/Source/shotwell/src/util/image.vala"
break;
-#line 1667 "image.c"
+#line 1558 "image.c"
}
#line 307 "/home/jens/Source/shotwell/src/util/image.vala"
- _tmp16_ = p;
+ _tmp13_ = p;
#line 307 "/home/jens/Source/shotwell/src/util/image.vala"
- _tmp17_ = _tmp16_[0];
+ _tmp14_ = _tmp13_[0];
#line 307 "/home/jens/Source/shotwell/src/util/image.vala"
- tmp = _tmp17_;
+ tmp = _tmp14_;
#line 309 "/home/jens/Source/shotwell/src/util/image.vala"
- _tmp18_ = p;
+ _tmp15_ = p;
#line 309 "/home/jens/Source/shotwell/src/util/image.vala"
- _tmp19_ = p;
+ _tmp16_ = p;
#line 309 "/home/jens/Source/shotwell/src/util/image.vala"
- _tmp20_ = _tmp19_[2];
+ _tmp17_ = _tmp16_[2];
#line 309 "/home/jens/Source/shotwell/src/util/image.vala"
- _tmp18_[0] = _tmp20_;
+ _tmp15_[0] = _tmp17_;
#line 309 "/home/jens/Source/shotwell/src/util/image.vala"
- _tmp21_ = _tmp18_[0];
+ _tmp18_ = _tmp15_[0];
#line 310 "/home/jens/Source/shotwell/src/util/image.vala"
- _tmp22_ = p;
+ _tmp19_ = p;
#line 310 "/home/jens/Source/shotwell/src/util/image.vala"
- _tmp23_ = tmp;
+ _tmp20_ = tmp;
#line 310 "/home/jens/Source/shotwell/src/util/image.vala"
- _tmp22_[2] = _tmp23_;
+ _tmp19_[2] = _tmp20_;
#line 310 "/home/jens/Source/shotwell/src/util/image.vala"
- _tmp24_ = _tmp22_[2];
+ _tmp21_ = _tmp19_[2];
#line 317 "/home/jens/Source/shotwell/src/util/image.vala"
- _tmp25_ = p;
+ _tmp22_ = p;
#line 317 "/home/jens/Source/shotwell/src/util/image.vala"
- p = _tmp25_ + 4;
-#line 1697 "image.c"
+ p = _tmp22_ + 4;
+#line 1588 "image.c"
}
#line 320 "/home/jens/Source/shotwell/src/util/image.vala"
- _tmp26_ = gdk_pixels;
-#line 320 "/home/jens/Source/shotwell/src/util/image.vala"
- _tmp27_ = pixbuf;
+ _tmp23_ = gdk_pixels;
#line 320 "/home/jens/Source/shotwell/src/util/image.vala"
- _tmp28_ = gdk_pixbuf_get_rowstride (_tmp27_);
+ _tmp24_ = gdk_pixbuf_get_rowstride (pixbuf);
#line 320 "/home/jens/Source/shotwell/src/util/image.vala"
- _tmp29_ = _tmp28_;
+ _tmp25_ = _tmp24_;
#line 320 "/home/jens/Source/shotwell/src/util/image.vala"
- gdk_pixels = _tmp26_ + _tmp29_;
-#line 1709 "image.c"
+ gdk_pixels = _tmp23_ + _tmp25_;
+#line 1598 "image.c"
}
}
}
@@ -1722,76 +1611,34 @@ void fix_cairo_pixbuf (GdkPixbuf* pixbuf) {
* @param dest_width The width of the computed rectangle.
* @param dest_height The height of the computed rectangle.
*/
-void compute_arb_rotated_size (gdouble src_width, gdouble src_height, gdouble angle, gdouble* dest_width, gdouble* dest_height) {
+void
+compute_arb_rotated_size (gdouble src_width,
+ gdouble src_height,
+ gdouble angle,
+ gdouble* dest_width,
+ gdouble* dest_height)
+{
gdouble _vala_dest_width = 0.0;
gdouble _vala_dest_height = 0.0;
- gdouble _tmp0_;
- gdouble _tmp1_;
- gdouble _tmp2_;
- gdouble _tmp3_;
- gdouble _tmp4_;
- gdouble _tmp5_;
- gdouble _tmp6_;
- gdouble _tmp7_;
- gdouble _tmp8_;
- gdouble _tmp9_;
- gdouble _tmp10_;
- gdouble _tmp11_;
- gdouble _tmp12_;
- gdouble _tmp13_;
- gdouble _tmp14_;
- gdouble _tmp15_;
-#line 337 "/home/jens/Source/shotwell/src/util/image.vala"
- _tmp0_ = angle;
-#line 337 "/home/jens/Source/shotwell/src/util/image.vala"
- _tmp1_ = degrees_to_radians (_tmp0_);
#line 337 "/home/jens/Source/shotwell/src/util/image.vala"
- _tmp2_ = fabs (_tmp1_);
-#line 337 "/home/jens/Source/shotwell/src/util/image.vala"
- angle = _tmp2_;
-#line 338 "/home/jens/Source/shotwell/src/util/image.vala"
- _tmp3_ = angle;
+ angle = fabs (degrees_to_radians (angle));
#line 338 "/home/jens/Source/shotwell/src/util/image.vala"
- _vala_assert (_tmp3_ <= G_PI_2, "angle <= Math.PI_2");
-#line 339 "/home/jens/Source/shotwell/src/util/image.vala"
- _tmp4_ = src_width;
-#line 339 "/home/jens/Source/shotwell/src/util/image.vala"
- _tmp5_ = angle;
+ _vala_assert (angle <= G_PI_2, "angle <= Math.PI_2");
#line 339 "/home/jens/Source/shotwell/src/util/image.vala"
- _tmp6_ = cos (_tmp5_);
-#line 339 "/home/jens/Source/shotwell/src/util/image.vala"
- _tmp7_ = src_height;
-#line 339 "/home/jens/Source/shotwell/src/util/image.vala"
- _tmp8_ = angle;
-#line 339 "/home/jens/Source/shotwell/src/util/image.vala"
- _tmp9_ = sin (_tmp8_);
-#line 339 "/home/jens/Source/shotwell/src/util/image.vala"
- _vala_dest_width = (_tmp4_ * _tmp6_) + (_tmp7_ * _tmp9_);
-#line 340 "/home/jens/Source/shotwell/src/util/image.vala"
- _tmp10_ = src_height;
-#line 340 "/home/jens/Source/shotwell/src/util/image.vala"
- _tmp11_ = angle;
-#line 340 "/home/jens/Source/shotwell/src/util/image.vala"
- _tmp12_ = cos (_tmp11_);
-#line 340 "/home/jens/Source/shotwell/src/util/image.vala"
- _tmp13_ = src_width;
+ _vala_dest_width = (src_width * cos (angle)) + (src_height * sin (angle));
#line 340 "/home/jens/Source/shotwell/src/util/image.vala"
- _tmp14_ = angle;
-#line 340 "/home/jens/Source/shotwell/src/util/image.vala"
- _tmp15_ = sin (_tmp14_);
-#line 340 "/home/jens/Source/shotwell/src/util/image.vala"
- _vala_dest_height = (_tmp10_ * _tmp12_) + (_tmp13_ * _tmp15_);
+ _vala_dest_height = (src_height * cos (angle)) + (src_width * sin (angle));
#line 334 "/home/jens/Source/shotwell/src/util/image.vala"
if (dest_width) {
#line 334 "/home/jens/Source/shotwell/src/util/image.vala"
*dest_width = _vala_dest_width;
-#line 1789 "image.c"
+#line 1636 "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 1795 "image.c"
+#line 1642 "image.c"
}
}
@@ -1802,47 +1649,51 @@ void compute_arb_rotated_size (gdouble src_width, gdouble src_height, gdouble an
* @param source_pixbuf The source image that needs to be angled.
* @param angle The angle the source image should be rotated by.
*/
-GdkPixbuf* rotate_arb (GdkPixbuf* source_pixbuf, gdouble angle) {
+GdkPixbuf*
+rotate_arb (GdkPixbuf* source_pixbuf,
+ gdouble angle)
+{
GdkPixbuf* result = NULL;
- gdouble _tmp0_;
gdouble x_tmp = 0.0;
gdouble y_tmp = 0.0;
- GdkPixbuf* _tmp3_;
+ gint _tmp1_;
+ gint _tmp2_;
+ gint _tmp3_;
gint _tmp4_;
- gint _tmp5_;
- GdkPixbuf* _tmp6_;
- gint _tmp7_;
- gint _tmp8_;
- gdouble _tmp9_;
- gdouble _tmp10_ = 0.0;
- gdouble _tmp11_ = 0.0;
+ gdouble _tmp5_ = 0.0;
+ gdouble _tmp6_ = 0.0;
GdkPixbuf* dest_pixbuf = NULL;
- gdouble _tmp12_;
- gdouble _tmp13_;
- gdouble _tmp14_;
- gdouble _tmp15_;
- GdkPixbuf* _tmp16_;
- cairo_format_t _tmp17_ = 0;
- GdkPixbuf* _tmp18_;
- gboolean _tmp19_;
- gboolean _tmp20_;
+ gdouble _tmp7_;
+ gdouble _tmp8_;
+ GdkPixbuf* _tmp9_;
+ cairo_format_t _tmp10_ = 0;
+ gboolean _tmp11_;
+ gboolean _tmp12_;
cairo_surface_t* surface = NULL;
- GdkPixbuf* _tmp21_;
- void* _tmp22_;
- void* _tmp23_;
- GdkPixbuf* _tmp24_;
- gint _tmp25_;
- gint _tmp26_;
- GdkPixbuf* _tmp27_;
- gint _tmp28_;
- gint _tmp29_;
+ GdkPixbuf* _tmp13_;
+ void* _tmp14_;
+ void* _tmp15_;
+ GdkPixbuf* _tmp16_;
+ gint _tmp17_;
+ gint _tmp18_;
+ GdkPixbuf* _tmp19_;
+ gint _tmp20_;
+ gint _tmp21_;
+ GdkPixbuf* _tmp22_;
+ gint _tmp23_;
+ gint _tmp24_;
+ cairo_surface_t* _tmp25_;
+ cairo_t* context = NULL;
+ cairo_surface_t* _tmp26_;
+ cairo_t* _tmp27_;
+ cairo_t* _tmp28_;
+ cairo_t* _tmp29_;
GdkPixbuf* _tmp30_;
gint _tmp31_;
gint _tmp32_;
- cairo_surface_t* _tmp33_;
- cairo_t* context = NULL;
- cairo_surface_t* _tmp34_;
- cairo_t* _tmp35_;
+ GdkPixbuf* _tmp33_;
+ gint _tmp34_;
+ gint _tmp35_;
cairo_t* _tmp36_;
cairo_t* _tmp37_;
GdkPixbuf* _tmp38_;
@@ -1853,213 +1704,173 @@ GdkPixbuf* rotate_arb (GdkPixbuf* source_pixbuf, gdouble angle) {
gint _tmp43_;
cairo_t* _tmp44_;
cairo_t* _tmp45_;
- GdkPixbuf* _tmp46_;
+ gint _tmp46_;
gint _tmp47_;
gint _tmp48_;
- GdkPixbuf* _tmp49_;
- gint _tmp50_;
- gint _tmp51_;
- cairo_t* _tmp52_;
- gdouble _tmp53_;
- gdouble _tmp54_;
- cairo_t* _tmp55_;
- GdkPixbuf* _tmp56_;
- gint _tmp57_;
- gint _tmp58_;
- GdkPixbuf* _tmp59_;
- gint _tmp60_;
- gint _tmp61_;
- cairo_t* _tmp62_;
- GdkPixbuf* _tmp63_;
- cairo_t* _tmp64_;
- cairo_pattern_t* _tmp65_;
- cairo_t* _tmp66_;
- GdkPixbuf* _tmp67_;
+ gint _tmp49_;
+ cairo_t* _tmp50_;
+ cairo_t* _tmp51_;
+ cairo_pattern_t* _tmp52_;
+ cairo_t* _tmp53_;
+ GdkPixbuf* _tmp54_;
#line 349 "/home/jens/Source/shotwell/src/util/image.vala"
g_return_val_if_fail (GDK_IS_PIXBUF (source_pixbuf), NULL);
#line 353 "/home/jens/Source/shotwell/src/util/image.vala"
- _tmp0_ = angle;
-#line 353 "/home/jens/Source/shotwell/src/util/image.vala"
- if (_tmp0_ == 0.0) {
-#line 1885 "image.c"
- GdkPixbuf* _tmp1_;
- GdkPixbuf* _tmp2_;
-#line 354 "/home/jens/Source/shotwell/src/util/image.vala"
- _tmp1_ = source_pixbuf;
+ if (angle == 0.0) {
+#line 1721 "image.c"
+ GdkPixbuf* _tmp0_;
#line 354 "/home/jens/Source/shotwell/src/util/image.vala"
- _tmp2_ = _g_object_ref0 (_tmp1_);
+ _tmp0_ = _g_object_ref0 (source_pixbuf);
#line 354 "/home/jens/Source/shotwell/src/util/image.vala"
- result = _tmp2_;
+ result = _tmp0_;
#line 354 "/home/jens/Source/shotwell/src/util/image.vala"
return result;
-#line 1896 "image.c"
+#line 1729 "image.c"
}
#line 361 "/home/jens/Source/shotwell/src/util/image.vala"
- _tmp3_ = source_pixbuf;
-#line 361 "/home/jens/Source/shotwell/src/util/image.vala"
- _tmp4_ = gdk_pixbuf_get_width (_tmp3_);
-#line 361 "/home/jens/Source/shotwell/src/util/image.vala"
- _tmp5_ = _tmp4_;
+ _tmp1_ = gdk_pixbuf_get_width (source_pixbuf);
#line 361 "/home/jens/Source/shotwell/src/util/image.vala"
- _tmp6_ = source_pixbuf;
-#line 361 "/home/jens/Source/shotwell/src/util/image.vala"
- _tmp7_ = gdk_pixbuf_get_height (_tmp6_);
+ _tmp2_ = _tmp1_;
#line 361 "/home/jens/Source/shotwell/src/util/image.vala"
- _tmp8_ = _tmp7_;
+ _tmp3_ = gdk_pixbuf_get_height (source_pixbuf);
#line 361 "/home/jens/Source/shotwell/src/util/image.vala"
- _tmp9_ = angle;
+ _tmp4_ = _tmp3_;
#line 361 "/home/jens/Source/shotwell/src/util/image.vala"
- compute_arb_rotated_size ((gdouble) _tmp5_, (gdouble) _tmp8_, _tmp9_, &_tmp10_, &_tmp11_);
+ compute_arb_rotated_size ((gdouble) _tmp2_, (gdouble) _tmp4_, angle, &_tmp5_, &_tmp6_);
#line 361 "/home/jens/Source/shotwell/src/util/image.vala"
- x_tmp = _tmp10_;
+ x_tmp = _tmp5_;
#line 361 "/home/jens/Source/shotwell/src/util/image.vala"
- y_tmp = _tmp11_;
-#line 364 "/home/jens/Source/shotwell/src/util/image.vala"
- _tmp12_ = x_tmp;
-#line 364 "/home/jens/Source/shotwell/src/util/image.vala"
- _tmp13_ = round (_tmp12_);
+ y_tmp = _tmp6_;
#line 364 "/home/jens/Source/shotwell/src/util/image.vala"
- _tmp14_ = y_tmp;
+ _tmp7_ = x_tmp;
#line 364 "/home/jens/Source/shotwell/src/util/image.vala"
- _tmp15_ = round (_tmp14_);
+ _tmp8_ = y_tmp;
#line 364 "/home/jens/Source/shotwell/src/util/image.vala"
- _tmp16_ = gdk_pixbuf_new (GDK_COLORSPACE_RGB, TRUE, 8, (gint) _tmp13_, (gint) _tmp15_);
+ _tmp9_ = gdk_pixbuf_new (GDK_COLORSPACE_RGB, TRUE, 8, (gint) round (_tmp7_), (gint) round (_tmp8_));
#line 364 "/home/jens/Source/shotwell/src/util/image.vala"
- dest_pixbuf = _tmp16_;
+ dest_pixbuf = _tmp9_;
#line 369 "/home/jens/Source/shotwell/src/util/image.vala"
- _tmp18_ = source_pixbuf;
+ _tmp11_ = gdk_pixbuf_get_has_alpha (source_pixbuf);
#line 369 "/home/jens/Source/shotwell/src/util/image.vala"
- _tmp19_ = gdk_pixbuf_get_has_alpha (_tmp18_);
+ _tmp12_ = _tmp11_;
#line 369 "/home/jens/Source/shotwell/src/util/image.vala"
- _tmp20_ = _tmp19_;
+ if (_tmp12_) {
#line 369 "/home/jens/Source/shotwell/src/util/image.vala"
- if (_tmp20_) {
-#line 369 "/home/jens/Source/shotwell/src/util/image.vala"
- _tmp17_ = CAIRO_FORMAT_ARGB32;
-#line 1940 "image.c"
+ _tmp10_ = CAIRO_FORMAT_ARGB32;
+#line 1761 "image.c"
} else {
#line 369 "/home/jens/Source/shotwell/src/util/image.vala"
- _tmp17_ = CAIRO_FORMAT_RGB24;
-#line 1944 "image.c"
+ _tmp10_ = CAIRO_FORMAT_RGB24;
+#line 1765 "image.c"
}
#line 367 "/home/jens/Source/shotwell/src/util/image.vala"
- _tmp21_ = dest_pixbuf;
+ _tmp13_ = dest_pixbuf;
#line 367 "/home/jens/Source/shotwell/src/util/image.vala"
- _tmp22_ = gdk_pixbuf_get_pixels (_tmp21_);
+ _tmp14_ = gdk_pixbuf_get_pixels (_tmp13_);
#line 367 "/home/jens/Source/shotwell/src/util/image.vala"
- _tmp23_ = _tmp22_;
+ _tmp15_ = _tmp14_;
#line 367 "/home/jens/Source/shotwell/src/util/image.vala"
- _tmp24_ = dest_pixbuf;
+ _tmp16_ = dest_pixbuf;
#line 367 "/home/jens/Source/shotwell/src/util/image.vala"
- _tmp25_ = gdk_pixbuf_get_width (_tmp24_);
+ _tmp17_ = gdk_pixbuf_get_width (_tmp16_);
#line 367 "/home/jens/Source/shotwell/src/util/image.vala"
- _tmp26_ = _tmp25_;
+ _tmp18_ = _tmp17_;
#line 367 "/home/jens/Source/shotwell/src/util/image.vala"
- _tmp27_ = dest_pixbuf;
+ _tmp19_ = dest_pixbuf;
#line 367 "/home/jens/Source/shotwell/src/util/image.vala"
- _tmp28_ = gdk_pixbuf_get_height (_tmp27_);
+ _tmp20_ = gdk_pixbuf_get_height (_tmp19_);
#line 367 "/home/jens/Source/shotwell/src/util/image.vala"
- _tmp29_ = _tmp28_;
+ _tmp21_ = _tmp20_;
#line 367 "/home/jens/Source/shotwell/src/util/image.vala"
- _tmp30_ = dest_pixbuf;
+ _tmp22_ = dest_pixbuf;
#line 367 "/home/jens/Source/shotwell/src/util/image.vala"
- _tmp31_ = gdk_pixbuf_get_rowstride (_tmp30_);
+ _tmp23_ = gdk_pixbuf_get_rowstride (_tmp22_);
#line 367 "/home/jens/Source/shotwell/src/util/image.vala"
- _tmp32_ = _tmp31_;
+ _tmp24_ = _tmp23_;
#line 367 "/home/jens/Source/shotwell/src/util/image.vala"
- _tmp33_ = cairo_image_surface_create_for_data ((guchar*) _tmp23_, _tmp17_, _tmp26_, _tmp29_, _tmp32_);
+ _tmp25_ = cairo_image_surface_create_for_data ((guchar*) _tmp15_, _tmp10_, _tmp18_, _tmp21_, _tmp24_);
#line 367 "/home/jens/Source/shotwell/src/util/image.vala"
- surface = _tmp33_;
+ surface = _tmp25_;
#line 372 "/home/jens/Source/shotwell/src/util/image.vala"
- _tmp34_ = surface;
+ _tmp26_ = surface;
#line 372 "/home/jens/Source/shotwell/src/util/image.vala"
- _tmp35_ = cairo_create (_tmp34_);
+ _tmp27_ = cairo_create (_tmp26_);
#line 372 "/home/jens/Source/shotwell/src/util/image.vala"
- context = _tmp35_;
+ context = _tmp27_;
#line 374 "/home/jens/Source/shotwell/src/util/image.vala"
- _tmp36_ = context;
+ _tmp28_ = context;
#line 374 "/home/jens/Source/shotwell/src/util/image.vala"
- cairo_set_source_rgb (_tmp36_, (gdouble) 0, (gdouble) 0, (gdouble) 0);
+ cairo_set_source_rgb (_tmp28_, (gdouble) 0, (gdouble) 0, (gdouble) 0);
#line 375 "/home/jens/Source/shotwell/src/util/image.vala"
- _tmp37_ = context;
+ _tmp29_ = context;
#line 375 "/home/jens/Source/shotwell/src/util/image.vala"
- _tmp38_ = dest_pixbuf;
+ _tmp30_ = dest_pixbuf;
#line 375 "/home/jens/Source/shotwell/src/util/image.vala"
- _tmp39_ = gdk_pixbuf_get_width (_tmp38_);
+ _tmp31_ = gdk_pixbuf_get_width (_tmp30_);
#line 375 "/home/jens/Source/shotwell/src/util/image.vala"
- _tmp40_ = _tmp39_;
+ _tmp32_ = _tmp31_;
#line 375 "/home/jens/Source/shotwell/src/util/image.vala"
- _tmp41_ = dest_pixbuf;
+ _tmp33_ = dest_pixbuf;
#line 375 "/home/jens/Source/shotwell/src/util/image.vala"
- _tmp42_ = gdk_pixbuf_get_height (_tmp41_);
+ _tmp34_ = gdk_pixbuf_get_height (_tmp33_);
#line 375 "/home/jens/Source/shotwell/src/util/image.vala"
- _tmp43_ = _tmp42_;
+ _tmp35_ = _tmp34_;
#line 375 "/home/jens/Source/shotwell/src/util/image.vala"
- cairo_rectangle (_tmp37_, (gdouble) 0, (gdouble) 0, (gdouble) _tmp40_, (gdouble) _tmp43_);
+ cairo_rectangle (_tmp29_, (gdouble) 0, (gdouble) 0, (gdouble) _tmp32_, (gdouble) _tmp35_);
#line 376 "/home/jens/Source/shotwell/src/util/image.vala"
- _tmp44_ = context;
+ _tmp36_ = context;
#line 376 "/home/jens/Source/shotwell/src/util/image.vala"
- cairo_fill (_tmp44_);
+ cairo_fill (_tmp36_);
#line 378 "/home/jens/Source/shotwell/src/util/image.vala"
- _tmp45_ = context;
+ _tmp37_ = context;
#line 378 "/home/jens/Source/shotwell/src/util/image.vala"
- _tmp46_ = dest_pixbuf;
+ _tmp38_ = dest_pixbuf;
#line 378 "/home/jens/Source/shotwell/src/util/image.vala"
- _tmp47_ = gdk_pixbuf_get_width (_tmp46_);
+ _tmp39_ = gdk_pixbuf_get_width (_tmp38_);
#line 378 "/home/jens/Source/shotwell/src/util/image.vala"
- _tmp48_ = _tmp47_;
+ _tmp40_ = _tmp39_;
#line 378 "/home/jens/Source/shotwell/src/util/image.vala"
- _tmp49_ = dest_pixbuf;
+ _tmp41_ = dest_pixbuf;
#line 378 "/home/jens/Source/shotwell/src/util/image.vala"
- _tmp50_ = gdk_pixbuf_get_height (_tmp49_);
+ _tmp42_ = gdk_pixbuf_get_height (_tmp41_);
#line 378 "/home/jens/Source/shotwell/src/util/image.vala"
- _tmp51_ = _tmp50_;
+ _tmp43_ = _tmp42_;
#line 378 "/home/jens/Source/shotwell/src/util/image.vala"
- cairo_translate (_tmp45_, (gdouble) (_tmp48_ / 2), (gdouble) (_tmp51_ / 2));
-#line 379 "/home/jens/Source/shotwell/src/util/image.vala"
- _tmp52_ = context;
-#line 379 "/home/jens/Source/shotwell/src/util/image.vala"
- _tmp53_ = angle;
+ cairo_translate (_tmp37_, (gdouble) (_tmp40_ / 2), (gdouble) (_tmp43_ / 2));
#line 379 "/home/jens/Source/shotwell/src/util/image.vala"
- _tmp54_ = degrees_to_radians (_tmp53_);
+ _tmp44_ = context;
#line 379 "/home/jens/Source/shotwell/src/util/image.vala"
- cairo_rotate (_tmp52_, _tmp54_);
-#line 380 "/home/jens/Source/shotwell/src/util/image.vala"
- _tmp55_ = context;
+ cairo_rotate (_tmp44_, degrees_to_radians (angle));
#line 380 "/home/jens/Source/shotwell/src/util/image.vala"
- _tmp56_ = source_pixbuf;
-#line 380 "/home/jens/Source/shotwell/src/util/image.vala"
- _tmp57_ = gdk_pixbuf_get_width (_tmp56_);
+ _tmp45_ = context;
#line 380 "/home/jens/Source/shotwell/src/util/image.vala"
- _tmp58_ = _tmp57_;
+ _tmp46_ = gdk_pixbuf_get_width (source_pixbuf);
#line 380 "/home/jens/Source/shotwell/src/util/image.vala"
- _tmp59_ = source_pixbuf;
+ _tmp47_ = _tmp46_;
#line 380 "/home/jens/Source/shotwell/src/util/image.vala"
- _tmp60_ = gdk_pixbuf_get_height (_tmp59_);
+ _tmp48_ = gdk_pixbuf_get_height (source_pixbuf);
#line 380 "/home/jens/Source/shotwell/src/util/image.vala"
- _tmp61_ = _tmp60_;
+ _tmp49_ = _tmp48_;
#line 380 "/home/jens/Source/shotwell/src/util/image.vala"
- cairo_translate (_tmp55_, (gdouble) ((-_tmp58_) / 2), (gdouble) ((-_tmp61_) / 2));
+ cairo_translate (_tmp45_, (gdouble) ((-_tmp47_) / 2), (gdouble) ((-_tmp49_) / 2));
#line 382 "/home/jens/Source/shotwell/src/util/image.vala"
- _tmp62_ = context;
+ _tmp50_ = context;
#line 382 "/home/jens/Source/shotwell/src/util/image.vala"
- _tmp63_ = source_pixbuf;
-#line 382 "/home/jens/Source/shotwell/src/util/image.vala"
- gdk_cairo_set_source_pixbuf (_tmp62_, _tmp63_, (gdouble) 0, (gdouble) 0);
+ gdk_cairo_set_source_pixbuf (_tmp50_, source_pixbuf, (gdouble) 0, (gdouble) 0);
#line 383 "/home/jens/Source/shotwell/src/util/image.vala"
- _tmp64_ = context;
+ _tmp51_ = context;
#line 383 "/home/jens/Source/shotwell/src/util/image.vala"
- _tmp65_ = cairo_get_source (_tmp64_);
+ _tmp52_ = cairo_get_source (_tmp51_);
#line 383 "/home/jens/Source/shotwell/src/util/image.vala"
- cairo_pattern_set_filter (_tmp65_, CAIRO_FILTER_BEST);
+ cairo_pattern_set_filter (_tmp52_, CAIRO_FILTER_BEST);
#line 384 "/home/jens/Source/shotwell/src/util/image.vala"
- _tmp66_ = context;
+ _tmp53_ = context;
#line 384 "/home/jens/Source/shotwell/src/util/image.vala"
- cairo_paint (_tmp66_);
+ cairo_paint (_tmp53_);
#line 388 "/home/jens/Source/shotwell/src/util/image.vala"
- _tmp67_ = dest_pixbuf;
+ _tmp54_ = dest_pixbuf;
#line 388 "/home/jens/Source/shotwell/src/util/image.vala"
- fix_cairo_pixbuf (_tmp67_);
+ fix_cairo_pixbuf (_tmp54_);
#line 390 "/home/jens/Source/shotwell/src/util/image.vala"
result = dest_pixbuf;
#line 390 "/home/jens/Source/shotwell/src/util/image.vala"
@@ -2068,7 +1879,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 2072 "image.c"
+#line 1883 "image.c"
}
@@ -2085,119 +1896,95 @@ GdkPixbuf* rotate_arb (GdkPixbuf* source_pixbuf, gdouble angle) {
* @param img_h The height of the source image (unrotated).
* @param angle The angle the source image is to be rotated by to straighten it.
*/
-void rotate_point_arb (GdkPoint* source_point, gint img_w, gint img_h, gdouble angle, gboolean invert, GdkPoint* result) {
- gdouble _tmp0_;
+void
+rotate_point_arb (GdkPoint* source_point,
+ gint img_w,
+ gint img_h,
+ gdouble angle,
+ gboolean invert,
+ GdkPoint* result)
+{
gdouble dest_width = 0.0;
gdouble dest_height = 0.0;
- gint _tmp2_;
- gint _tmp3_;
- gdouble _tmp4_;
- gdouble _tmp5_ = 0.0;
- gdouble _tmp6_ = 0.0;
+ gdouble _tmp1_ = 0.0;
+ gdouble _tmp2_ = 0.0;
cairo_matrix_t matrix = {0};
- gdouble _tmp7_;
- gdouble _tmp8_;
- gdouble _tmp9_;
- gdouble _tmp10_;
- gint _tmp11_;
- gint _tmp12_;
- gboolean _tmp13_;
+ gdouble _tmp3_;
+ gdouble _tmp4_;
gdouble dest_x = 0.0;
- GdkPoint _tmp15_;
- gint _tmp16_;
+ GdkPoint _tmp5_;
+ gint _tmp6_;
gdouble dest_y = 0.0;
- GdkPoint _tmp17_;
- gint _tmp18_;
- gdouble _tmp19_;
- gdouble _tmp20_;
- GdkPoint _tmp21_ = {0};
+ GdkPoint _tmp7_;
+ gint _tmp8_;
+ gdouble _tmp9_;
+ gdouble _tmp10_;
+ GdkPoint _tmp11_ = {0};
#line 406 "/home/jens/Source/shotwell/src/util/image.vala"
g_return_if_fail (source_point != NULL);
#line 409 "/home/jens/Source/shotwell/src/util/image.vala"
- _tmp0_ = angle;
-#line 409 "/home/jens/Source/shotwell/src/util/image.vala"
- if (_tmp0_ == 0.0) {
-#line 2121 "image.c"
- GdkPoint _tmp1_;
+ if (angle == 0.0) {
+#line 1928 "image.c"
+ GdkPoint _tmp0_;
#line 411 "/home/jens/Source/shotwell/src/util/image.vala"
- _tmp1_ = *source_point;
+ _tmp0_ = *source_point;
#line 411 "/home/jens/Source/shotwell/src/util/image.vala"
- *result = _tmp1_;
+ *result = _tmp0_;
#line 411 "/home/jens/Source/shotwell/src/util/image.vala"
return;
-#line 2129 "image.c"
+#line 1936 "image.c"
}
#line 416 "/home/jens/Source/shotwell/src/util/image.vala"
- _tmp2_ = img_w;
-#line 416 "/home/jens/Source/shotwell/src/util/image.vala"
- _tmp3_ = img_h;
-#line 416 "/home/jens/Source/shotwell/src/util/image.vala"
- _tmp4_ = angle;
-#line 416 "/home/jens/Source/shotwell/src/util/image.vala"
- compute_arb_rotated_size ((gdouble) _tmp2_, (gdouble) _tmp3_, _tmp4_, &_tmp5_, &_tmp6_);
+ compute_arb_rotated_size ((gdouble) img_w, (gdouble) img_h, angle, &_tmp1_, &_tmp2_);
#line 416 "/home/jens/Source/shotwell/src/util/image.vala"
- dest_width = _tmp5_;
+ dest_width = _tmp1_;
#line 416 "/home/jens/Source/shotwell/src/util/image.vala"
- dest_height = _tmp6_;
+ dest_height = _tmp2_;
#line 418 "/home/jens/Source/shotwell/src/util/image.vala"
cairo_matrix_init_identity (&matrix);
#line 419 "/home/jens/Source/shotwell/src/util/image.vala"
- _tmp7_ = dest_width;
+ _tmp3_ = dest_width;
#line 419 "/home/jens/Source/shotwell/src/util/image.vala"
- _tmp8_ = dest_height;
+ _tmp4_ = dest_height;
#line 419 "/home/jens/Source/shotwell/src/util/image.vala"
- cairo_matrix_translate (&matrix, _tmp7_ / 2, _tmp8_ / 2);
+ cairo_matrix_translate (&matrix, _tmp3_ / 2, _tmp4_ / 2);
#line 420 "/home/jens/Source/shotwell/src/util/image.vala"
- _tmp9_ = angle;
-#line 420 "/home/jens/Source/shotwell/src/util/image.vala"
- _tmp10_ = degrees_to_radians (_tmp9_);
-#line 420 "/home/jens/Source/shotwell/src/util/image.vala"
- cairo_matrix_rotate (&matrix, _tmp10_);
-#line 421 "/home/jens/Source/shotwell/src/util/image.vala"
- _tmp11_ = img_w;
-#line 421 "/home/jens/Source/shotwell/src/util/image.vala"
- _tmp12_ = img_h;
+ cairo_matrix_rotate (&matrix, degrees_to_radians (angle));
#line 421 "/home/jens/Source/shotwell/src/util/image.vala"
- cairo_matrix_translate (&matrix, (gdouble) ((-_tmp11_) / 2), (gdouble) ((-_tmp12_) / 2));
+ cairo_matrix_translate (&matrix, (gdouble) ((-img_w) / 2), (gdouble) ((-img_h) / 2));
#line 422 "/home/jens/Source/shotwell/src/util/image.vala"
- _tmp13_ = invert;
-#line 422 "/home/jens/Source/shotwell/src/util/image.vala"
- if (_tmp13_) {
-#line 2167 "image.c"
- cairo_status_t _tmp14_;
-#line 423 "/home/jens/Source/shotwell/src/util/image.vala"
- _tmp14_ = cairo_matrix_invert (&matrix);
+ if (invert) {
#line 423 "/home/jens/Source/shotwell/src/util/image.vala"
- _vala_assert (_tmp14_ == CAIRO_STATUS_SUCCESS, "matrix.invert() == Cairo.Status.SUCCESS");
-#line 2173 "image.c"
+ _vala_assert (cairo_matrix_invert (&matrix) == CAIRO_STATUS_SUCCESS, "matrix.invert() == Cairo.Status.SUCCESS");
+#line 1960 "image.c"
}
#line 425 "/home/jens/Source/shotwell/src/util/image.vala"
- _tmp15_ = *source_point;
+ _tmp5_ = *source_point;
#line 425 "/home/jens/Source/shotwell/src/util/image.vala"
- _tmp16_ = _tmp15_.x;
+ _tmp6_ = _tmp5_.x;
#line 425 "/home/jens/Source/shotwell/src/util/image.vala"
- dest_x = (gdouble) _tmp16_;
+ dest_x = (gdouble) _tmp6_;
#line 426 "/home/jens/Source/shotwell/src/util/image.vala"
- _tmp17_ = *source_point;
+ _tmp7_ = *source_point;
#line 426 "/home/jens/Source/shotwell/src/util/image.vala"
- _tmp18_ = _tmp17_.y;
+ _tmp8_ = _tmp7_.y;
#line 426 "/home/jens/Source/shotwell/src/util/image.vala"
- dest_y = (gdouble) _tmp18_;
+ dest_y = (gdouble) _tmp8_;
#line 427 "/home/jens/Source/shotwell/src/util/image.vala"
cairo_matrix_transform_point (&matrix, &dest_x, &dest_y);
#line 429 "/home/jens/Source/shotwell/src/util/image.vala"
- _tmp19_ = dest_x;
+ _tmp9_ = dest_x;
#line 429 "/home/jens/Source/shotwell/src/util/image.vala"
- _tmp20_ = dest_y;
+ _tmp10_ = dest_y;
#line 429 "/home/jens/Source/shotwell/src/util/image.vala"
- _tmp21_.x = (gint) _tmp19_;
+ _tmp11_.x = (gint) _tmp9_;
#line 429 "/home/jens/Source/shotwell/src/util/image.vala"
- _tmp21_.y = (gint) _tmp20_;
+ _tmp11_.y = (gint) _tmp10_;
#line 429 "/home/jens/Source/shotwell/src/util/image.vala"
- *result = _tmp21_;
+ *result = _tmp11_;
#line 429 "/home/jens/Source/shotwell/src/util/image.vala"
return;
-#line 2201 "image.c"
+#line 1988 "image.c"
}
@@ -2214,40 +2001,41 @@ void rotate_point_arb (GdkPoint* source_point, gint img_w, gint img_h, gdouble a
* @param img_h The height of the source image (unrotated).
* @param angle The angle the source image is to be rotated by to straighten it.
*/
-void derotate_point_arb (GdkPoint* source_point, gint img_w, gint img_h, gdouble angle, GdkPoint* result) {
+void
+derotate_point_arb (GdkPoint* source_point,
+ gint img_w,
+ gint img_h,
+ gdouble angle,
+ GdkPoint* result)
+{
GdkPoint _tmp0_;
- gint _tmp1_;
- gint _tmp2_;
- gdouble _tmp3_;
- GdkPoint _tmp4_ = {0};
+ GdkPoint _tmp1_ = {0};
#line 445 "/home/jens/Source/shotwell/src/util/image.vala"
g_return_if_fail (source_point != NULL);
#line 446 "/home/jens/Source/shotwell/src/util/image.vala"
_tmp0_ = *source_point;
#line 446 "/home/jens/Source/shotwell/src/util/image.vala"
- _tmp1_ = img_w;
+ rotate_point_arb (&_tmp0_, img_w, img_h, angle, TRUE, &_tmp1_);
#line 446 "/home/jens/Source/shotwell/src/util/image.vala"
- _tmp2_ = img_h;
-#line 446 "/home/jens/Source/shotwell/src/util/image.vala"
- _tmp3_ = angle;
-#line 446 "/home/jens/Source/shotwell/src/util/image.vala"
- rotate_point_arb (&_tmp0_, _tmp1_, _tmp2_, _tmp3_, TRUE, &_tmp4_);
-#line 446 "/home/jens/Source/shotwell/src/util/image.vala"
- *result = _tmp4_;
+ *result = _tmp1_;
#line 446 "/home/jens/Source/shotwell/src/util/image.vala"
return;
-#line 2240 "image.c"
+#line 2024 "image.c"
}
-static gpointer _cairo_surface_reference0 (gpointer self) {
+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"
+#line 2033 "image.c"
}
-cairo_surface_t* get_background_surface (void) {
+cairo_surface_t*
+get_background_surface (void)
+{
cairo_surface_t* result = NULL;
cairo_surface_t* _tmp0_;
cairo_surface_t* _tmp31_;
@@ -2256,7 +2044,7 @@ cairo_surface_t* get_background_surface (void) {
_tmp0_ = background_surface;
#line 452 "/home/jens/Source/shotwell/src/util/image.vala"
if (_tmp0_ == NULL) {
-#line 2260 "image.c"
+#line 2048 "image.c"
gchar* color_a = NULL;
gchar* color_b = NULL;
ConfigFacade* config = NULL;
@@ -2271,7 +2059,7 @@ cairo_surface_t* get_background_surface (void) {
static GQuark _tmp6_label0 = 0;
#line 458 "/home/jens/Source/shotwell/src/util/image.vala"
static GQuark _tmp6_label1 = 0;
-#line 2275 "image.c"
+#line 2063 "image.c"
cairo_surface_t* _tmp17_;
cairo_t* ctx = NULL;
cairo_surface_t* _tmp18_;
@@ -2307,7 +2095,7 @@ cairo_surface_t* get_background_surface (void) {
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"
+#line 2099 "image.c"
default:
{
gchar* _tmp8_;
@@ -2326,13 +2114,13 @@ cairo_surface_t* get_background_surface (void) {
color_b = _tmp9_;
#line 462 "/home/jens/Source/shotwell/src/util/image.vala"
break;
-#line 2330 "image.c"
+#line 2118 "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"
+#line 2124 "image.c"
default:
{
ConfigFacade* _tmp10_;
@@ -2357,13 +2145,13 @@ cairo_surface_t* get_background_surface (void) {
color_a = _tmp13_;
#line 465 "/home/jens/Source/shotwell/src/util/image.vala"
break;
-#line 2361 "image.c"
+#line 2149 "image.c"
}
}
} else {
#line 458 "/home/jens/Source/shotwell/src/util/image.vala"
switch (0) {
-#line 2367 "image.c"
+#line 2155 "image.c"
default:
{
gchar* _tmp14_;
@@ -2385,7 +2173,7 @@ cairo_surface_t* get_background_surface (void) {
color_a = _tmp16_;
#line 468 "/home/jens/Source/shotwell/src/util/image.vala"
break;
-#line 2389 "image.c"
+#line 2177 "image.c"
}
}
}
@@ -2451,7 +2239,7 @@ cairo_surface_t* get_background_surface (void) {
_g_free0 (color_b);
#line 452 "/home/jens/Source/shotwell/src/util/image.vala"
_g_free0 (color_a);
-#line 2455 "image.c"
+#line 2243 "image.c"
}
#line 484 "/home/jens/Source/shotwell/src/util/image.vala"
_tmp31_ = background_surface;
@@ -2461,193 +2249,141 @@ cairo_surface_t* get_background_surface (void) {
result = _tmp32_;
#line 484 "/home/jens/Source/shotwell/src/util/image.vala"
return result;
-#line 2465 "image.c"
+#line 2253 "image.c"
}
-void invalidate_transparent_background (void) {
+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"
+#line 2264 "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_;
+void
+paint_pixmap_with_background (cairo_t* ctx,
+ GdkPixbuf* pixbuf,
+ gint x,
+ gint y)
+{
#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_;
+ if (gdk_pixbuf_get_has_alpha (pixbuf)) {
+#line 2280 "image.c"
+ cairo_surface_t* _tmp0_;
+ cairo_surface_t* _tmp1_;
+ cairo_pattern_t* _tmp2_;
+ gint _tmp3_;
+ gint _tmp4_;
+ gint _tmp5_;
+ gint _tmp6_;
#line 493 "/home/jens/Source/shotwell/src/util/image.vala"
- _tmp2_ = ctx;
+ _tmp0_ = get_background_surface ();
#line 493 "/home/jens/Source/shotwell/src/util/image.vala"
- _tmp3_ = get_background_surface ();
+ _tmp1_ = _tmp0_;
#line 493 "/home/jens/Source/shotwell/src/util/image.vala"
- _tmp4_ = _tmp3_;
+ cairo_set_source_surface (ctx, _tmp1_, (gdouble) 0, (gdouble) 0);
#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;
+ _cairo_surface_destroy0 (_tmp1_);
#line 494 "/home/jens/Source/shotwell/src/util/image.vala"
- _tmp6_ = cairo_get_source (_tmp5_);
+ _tmp2_ = cairo_get_source (ctx);
#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;
+ cairo_pattern_set_extend (_tmp2_, CAIRO_EXTEND_REPEAT);
#line 495 "/home/jens/Source/shotwell/src/util/image.vala"
- _tmp9_ = y;
+ _tmp3_ = gdk_pixbuf_get_width (pixbuf);
#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;
+ _tmp4_ = _tmp3_;
#line 495 "/home/jens/Source/shotwell/src/util/image.vala"
- _tmp14_ = gdk_pixbuf_get_height (_tmp13_);
+ _tmp5_ = gdk_pixbuf_get_height (pixbuf);
#line 495 "/home/jens/Source/shotwell/src/util/image.vala"
- _tmp15_ = _tmp14_;
+ _tmp6_ = _tmp5_;
#line 495 "/home/jens/Source/shotwell/src/util/image.vala"
- cairo_rectangle (_tmp7_, (gdouble) _tmp8_, (gdouble) _tmp9_, (gdouble) _tmp12_, (gdouble) _tmp15_);
+ cairo_rectangle (ctx, (gdouble) x, (gdouble) y, (gdouble) _tmp4_, (gdouble) _tmp6_);
#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"
+ cairo_fill (ctx);
+#line 2312 "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;
+ gdk_cairo_set_source_pixbuf (ctx, pixbuf, (gdouble) x, (gdouble) y);
#line 500 "/home/jens/Source/shotwell/src/util/image.vala"
- cairo_paint (_tmp21_);
-#line 2568 "image.c"
+ cairo_paint (ctx);
+#line 2318 "image.c"
}
-void clamp_inside_rotated_image (Box* src, gint img_w, gint img_h, gdouble angle_deg, gboolean preserve_geom, Box* result) {
+void
+clamp_inside_rotated_image (Box* src,
+ gint img_w,
+ gint img_h,
+ gdouble angle_deg,
+ gboolean preserve_geom,
+ Box* result)
+{
GdkPoint top_left = {0};
Box _tmp0_;
gint _tmp1_;
Box _tmp2_;
gint _tmp3_;
GdkPoint _tmp4_ = {0};
- gint _tmp5_;
- gint _tmp6_;
- gdouble _tmp7_;
- GdkPoint _tmp8_ = {0};
+ GdkPoint _tmp5_ = {0};
GdkPoint top_right = {0};
- Box _tmp9_;
- gint _tmp10_;
- Box _tmp11_;
- gint _tmp12_;
- GdkPoint _tmp13_ = {0};
- gint _tmp14_;
+ Box _tmp6_;
+ gint _tmp7_;
+ Box _tmp8_;
+ gint _tmp9_;
+ GdkPoint _tmp10_ = {0};
+ GdkPoint _tmp11_ = {0};
+ GdkPoint bottom_left = {0};
+ Box _tmp12_;
+ gint _tmp13_;
+ Box _tmp14_;
gint _tmp15_;
- gdouble _tmp16_;
+ GdkPoint _tmp16_ = {0};
GdkPoint _tmp17_ = {0};
- GdkPoint bottom_left = {0};
+ GdkPoint bottom_right = {0};
Box _tmp18_;
gint _tmp19_;
Box _tmp20_;
gint _tmp21_;
GdkPoint _tmp22_ = {0};
- gint _tmp23_;
- gint _tmp24_;
- gdouble _tmp25_;
- GdkPoint _tmp26_ = {0};
- GdkPoint bottom_right = {0};
- Box _tmp27_;
- gint _tmp28_;
- Box _tmp29_;
- gint _tmp30_;
- GdkPoint _tmp31_ = {0};
- gint _tmp32_;
- gint _tmp33_;
- gdouble _tmp34_;
- GdkPoint _tmp35_ = {0};
+ GdkPoint _tmp23_ = {0};
gdouble angle = 0.0;
- gdouble _tmp36_;
- gdouble _tmp37_;
gint top_offset = 0;
gint bottom_offset = 0;
gint left_offset = 0;
gint right_offset = 0;
gint top = 0;
+ GdkPoint _tmp24_;
+ gint _tmp25_;
+ GdkPoint _tmp26_;
+ gint _tmp27_;
+ gint _tmp28_;
+ gint bottom = 0;
+ GdkPoint _tmp31_;
+ gint _tmp32_;
+ GdkPoint _tmp33_;
+ gint _tmp34_;
+ gint _tmp35_;
+ gint left = 0;
GdkPoint _tmp38_;
gint _tmp39_;
GdkPoint _tmp40_;
gint _tmp41_;
gint _tmp42_;
- gint _tmp43_;
- gint bottom = 0;
+ gint right = 0;
+ GdkPoint _tmp45_;
+ gint _tmp46_;
GdkPoint _tmp47_;
gint _tmp48_;
- GdkPoint _tmp49_;
- gint _tmp50_;
- gint _tmp51_;
- gint _tmp52_;
- gint _tmp53_;
- gint left = 0;
- GdkPoint _tmp58_;
- gint _tmp59_;
- GdkPoint _tmp60_;
- gint _tmp61_;
- gint _tmp62_;
- gint _tmp63_;
- gint right = 0;
- GdkPoint _tmp67_;
- gint _tmp68_;
- GdkPoint _tmp69_;
- gint _tmp70_;
- gint _tmp71_;
- gint _tmp72_;
- gint _tmp73_;
- Box _tmp78_ = {0};
- gboolean _tmp79_;
+ gint _tmp49_;
+ Box _tmp52_ = {0};
#line 504 "/home/jens/Source/shotwell/src/util/image.vala"
g_return_if_fail (src != NULL);
#line 507 "/home/jens/Source/shotwell/src/util/image.vala"
@@ -2663,87 +2399,59 @@ void clamp_inside_rotated_image (Box* src, gint img_w, gint img_h, gdouble angle
#line 507 "/home/jens/Source/shotwell/src/util/image.vala"
_tmp4_.y = _tmp3_;
#line 507 "/home/jens/Source/shotwell/src/util/image.vala"
- _tmp5_ = img_w;
-#line 507 "/home/jens/Source/shotwell/src/util/image.vala"
- _tmp6_ = img_h;
-#line 507 "/home/jens/Source/shotwell/src/util/image.vala"
- _tmp7_ = angle_deg;
+ derotate_point_arb (&_tmp4_, img_w, img_h, angle_deg, &_tmp5_);
#line 507 "/home/jens/Source/shotwell/src/util/image.vala"
- derotate_point_arb (&_tmp4_, _tmp5_, _tmp6_, _tmp7_, &_tmp8_);
-#line 507 "/home/jens/Source/shotwell/src/util/image.vala"
- top_left = _tmp8_;
-#line 508 "/home/jens/Source/shotwell/src/util/image.vala"
- _tmp9_ = *src;
-#line 508 "/home/jens/Source/shotwell/src/util/image.vala"
- _tmp10_ = _tmp9_.right;
-#line 508 "/home/jens/Source/shotwell/src/util/image.vala"
- _tmp11_ = *src;
+ top_left = _tmp5_;
#line 508 "/home/jens/Source/shotwell/src/util/image.vala"
- _tmp12_ = _tmp11_.top;
+ _tmp6_ = *src;
#line 508 "/home/jens/Source/shotwell/src/util/image.vala"
- _tmp13_.x = _tmp10_;
+ _tmp7_ = _tmp6_.right;
#line 508 "/home/jens/Source/shotwell/src/util/image.vala"
- _tmp13_.y = _tmp12_;
+ _tmp8_ = *src;
#line 508 "/home/jens/Source/shotwell/src/util/image.vala"
- _tmp14_ = img_w;
+ _tmp9_ = _tmp8_.top;
#line 508 "/home/jens/Source/shotwell/src/util/image.vala"
- _tmp15_ = img_h;
+ _tmp10_.x = _tmp7_;
#line 508 "/home/jens/Source/shotwell/src/util/image.vala"
- _tmp16_ = angle_deg;
+ _tmp10_.y = _tmp9_;
#line 508 "/home/jens/Source/shotwell/src/util/image.vala"
- derotate_point_arb (&_tmp13_, _tmp14_, _tmp15_, _tmp16_, &_tmp17_);
+ derotate_point_arb (&_tmp10_, img_w, img_h, angle_deg, &_tmp11_);
#line 508 "/home/jens/Source/shotwell/src/util/image.vala"
- top_right = _tmp17_;
-#line 509 "/home/jens/Source/shotwell/src/util/image.vala"
- _tmp18_ = *src;
-#line 509 "/home/jens/Source/shotwell/src/util/image.vala"
- _tmp19_ = _tmp18_.left;
-#line 509 "/home/jens/Source/shotwell/src/util/image.vala"
- _tmp20_ = *src;
+ top_right = _tmp11_;
#line 509 "/home/jens/Source/shotwell/src/util/image.vala"
- _tmp21_ = _tmp20_.bottom;
+ _tmp12_ = *src;
#line 509 "/home/jens/Source/shotwell/src/util/image.vala"
- _tmp22_.x = _tmp19_;
+ _tmp13_ = _tmp12_.left;
#line 509 "/home/jens/Source/shotwell/src/util/image.vala"
- _tmp22_.y = _tmp21_;
+ _tmp14_ = *src;
#line 509 "/home/jens/Source/shotwell/src/util/image.vala"
- _tmp23_ = img_w;
+ _tmp15_ = _tmp14_.bottom;
#line 509 "/home/jens/Source/shotwell/src/util/image.vala"
- _tmp24_ = img_h;
+ _tmp16_.x = _tmp13_;
#line 509 "/home/jens/Source/shotwell/src/util/image.vala"
- _tmp25_ = angle_deg;
+ _tmp16_.y = _tmp15_;
#line 509 "/home/jens/Source/shotwell/src/util/image.vala"
- derotate_point_arb (&_tmp22_, _tmp23_, _tmp24_, _tmp25_, &_tmp26_);
+ derotate_point_arb (&_tmp16_, img_w, img_h, angle_deg, &_tmp17_);
#line 509 "/home/jens/Source/shotwell/src/util/image.vala"
- bottom_left = _tmp26_;
-#line 510 "/home/jens/Source/shotwell/src/util/image.vala"
- _tmp27_ = *src;
+ bottom_left = _tmp17_;
#line 510 "/home/jens/Source/shotwell/src/util/image.vala"
- _tmp28_ = _tmp27_.right;
-#line 510 "/home/jens/Source/shotwell/src/util/image.vala"
- _tmp29_ = *src;
-#line 510 "/home/jens/Source/shotwell/src/util/image.vala"
- _tmp30_ = _tmp29_.bottom;
+ _tmp18_ = *src;
#line 510 "/home/jens/Source/shotwell/src/util/image.vala"
- _tmp31_.x = _tmp28_;
+ _tmp19_ = _tmp18_.right;
#line 510 "/home/jens/Source/shotwell/src/util/image.vala"
- _tmp31_.y = _tmp30_;
+ _tmp20_ = *src;
#line 510 "/home/jens/Source/shotwell/src/util/image.vala"
- _tmp32_ = img_w;
+ _tmp21_ = _tmp20_.bottom;
#line 510 "/home/jens/Source/shotwell/src/util/image.vala"
- _tmp33_ = img_h;
+ _tmp22_.x = _tmp19_;
#line 510 "/home/jens/Source/shotwell/src/util/image.vala"
- _tmp34_ = angle_deg;
+ _tmp22_.y = _tmp21_;
#line 510 "/home/jens/Source/shotwell/src/util/image.vala"
- derotate_point_arb (&_tmp31_, _tmp32_, _tmp33_, _tmp34_, &_tmp35_);
+ derotate_point_arb (&_tmp22_, img_w, img_h, angle_deg, &_tmp23_);
#line 510 "/home/jens/Source/shotwell/src/util/image.vala"
- bottom_right = _tmp35_;
-#line 512 "/home/jens/Source/shotwell/src/util/image.vala"
- _tmp36_ = angle_deg;
+ bottom_right = _tmp23_;
#line 512 "/home/jens/Source/shotwell/src/util/image.vala"
- _tmp37_ = degrees_to_radians (_tmp36_);
-#line 512 "/home/jens/Source/shotwell/src/util/image.vala"
- angle = _tmp37_;
+ angle = degrees_to_radians (angle_deg);
#line 513 "/home/jens/Source/shotwell/src/util/image.vala"
top_offset = 0;
#line 513 "/home/jens/Source/shotwell/src/util/image.vala"
@@ -2753,204 +2461,172 @@ void clamp_inside_rotated_image (Box* src, gint img_w, gint img_h, gdouble angle
#line 513 "/home/jens/Source/shotwell/src/util/image.vala"
right_offset = 0;
#line 515 "/home/jens/Source/shotwell/src/util/image.vala"
- _tmp38_ = top_left;
-#line 515 "/home/jens/Source/shotwell/src/util/image.vala"
- _tmp39_ = _tmp38_.y;
+ _tmp24_ = top_left;
#line 515 "/home/jens/Source/shotwell/src/util/image.vala"
- _tmp40_ = top_right;
+ _tmp25_ = _tmp24_.y;
#line 515 "/home/jens/Source/shotwell/src/util/image.vala"
- _tmp41_ = _tmp40_.y;
+ _tmp26_ = top_right;
#line 515 "/home/jens/Source/shotwell/src/util/image.vala"
- _tmp42_ = MIN (_tmp39_, _tmp41_);
+ _tmp27_ = _tmp26_.y;
#line 515 "/home/jens/Source/shotwell/src/util/image.vala"
- top = _tmp42_;
+ top = MIN (_tmp25_, _tmp27_);
#line 516 "/home/jens/Source/shotwell/src/util/image.vala"
- _tmp43_ = top;
+ _tmp28_ = top;
#line 516 "/home/jens/Source/shotwell/src/util/image.vala"
- if (_tmp43_ < 0) {
-#line 2772 "image.c"
- gint _tmp44_;
- gdouble _tmp45_;
- gdouble _tmp46_;
-#line 517 "/home/jens/Source/shotwell/src/util/image.vala"
- _tmp44_ = top;
+ if (_tmp28_ < 0) {
+#line 2478 "image.c"
+ gint _tmp29_;
+ gdouble _tmp30_;
#line 517 "/home/jens/Source/shotwell/src/util/image.vala"
- _tmp45_ = angle;
+ _tmp29_ = top;
#line 517 "/home/jens/Source/shotwell/src/util/image.vala"
- _tmp46_ = cos (_tmp45_);
+ _tmp30_ = angle;
#line 517 "/home/jens/Source/shotwell/src/util/image.vala"
- top_offset = (gint) ((0 - _tmp44_) * _tmp46_);
-#line 2784 "image.c"
+ top_offset = (gint) ((0 - _tmp29_) * cos (_tmp30_));
+#line 2487 "image.c"
}
#line 519 "/home/jens/Source/shotwell/src/util/image.vala"
- _tmp47_ = bottom_left;
+ _tmp31_ = bottom_left;
#line 519 "/home/jens/Source/shotwell/src/util/image.vala"
- _tmp48_ = _tmp47_.y;
+ _tmp32_ = _tmp31_.y;
#line 519 "/home/jens/Source/shotwell/src/util/image.vala"
- _tmp49_ = bottom_right;
+ _tmp33_ = bottom_right;
#line 519 "/home/jens/Source/shotwell/src/util/image.vala"
- _tmp50_ = _tmp49_.y;
+ _tmp34_ = _tmp33_.y;
#line 519 "/home/jens/Source/shotwell/src/util/image.vala"
- _tmp51_ = MAX (_tmp48_, _tmp50_);
-#line 519 "/home/jens/Source/shotwell/src/util/image.vala"
- bottom = _tmp51_;
-#line 520 "/home/jens/Source/shotwell/src/util/image.vala"
- _tmp52_ = bottom;
+ bottom = MAX (_tmp32_, _tmp34_);
#line 520 "/home/jens/Source/shotwell/src/util/image.vala"
- _tmp53_ = img_h;
+ _tmp35_ = bottom;
#line 520 "/home/jens/Source/shotwell/src/util/image.vala"
- if (_tmp52_ > _tmp53_) {
-#line 2804 "image.c"
- gint _tmp54_;
- gint _tmp55_;
- gdouble _tmp56_;
- gdouble _tmp57_;
+ if (_tmp35_ > img_h) {
+#line 2503 "image.c"
+ gint _tmp36_;
+ gdouble _tmp37_;
#line 521 "/home/jens/Source/shotwell/src/util/image.vala"
- _tmp54_ = img_h;
+ _tmp36_ = bottom;
#line 521 "/home/jens/Source/shotwell/src/util/image.vala"
- _tmp55_ = bottom;
+ _tmp37_ = angle;
#line 521 "/home/jens/Source/shotwell/src/util/image.vala"
- _tmp56_ = angle;
-#line 521 "/home/jens/Source/shotwell/src/util/image.vala"
- _tmp57_ = cos (_tmp56_);
-#line 521 "/home/jens/Source/shotwell/src/util/image.vala"
- bottom_offset = (gint) ((_tmp54_ - _tmp55_) * _tmp57_);
-#line 2819 "image.c"
+ bottom_offset = (gint) ((img_h - _tmp36_) * cos (_tmp37_));
+#line 2512 "image.c"
}
#line 523 "/home/jens/Source/shotwell/src/util/image.vala"
- _tmp58_ = top_left;
-#line 523 "/home/jens/Source/shotwell/src/util/image.vala"
- _tmp59_ = _tmp58_.x;
+ _tmp38_ = top_left;
#line 523 "/home/jens/Source/shotwell/src/util/image.vala"
- _tmp60_ = bottom_left;
+ _tmp39_ = _tmp38_.x;
#line 523 "/home/jens/Source/shotwell/src/util/image.vala"
- _tmp61_ = _tmp60_.x;
+ _tmp40_ = bottom_left;
#line 523 "/home/jens/Source/shotwell/src/util/image.vala"
- _tmp62_ = MIN (_tmp59_, _tmp61_);
+ _tmp41_ = _tmp40_.x;
#line 523 "/home/jens/Source/shotwell/src/util/image.vala"
- left = _tmp62_;
+ left = MIN (_tmp39_, _tmp41_);
#line 524 "/home/jens/Source/shotwell/src/util/image.vala"
- _tmp63_ = left;
+ _tmp42_ = left;
#line 524 "/home/jens/Source/shotwell/src/util/image.vala"
- if (_tmp63_ < 0) {
-#line 2837 "image.c"
- gint _tmp64_;
- gdouble _tmp65_;
- gdouble _tmp66_;
+ if (_tmp42_ < 0) {
+#line 2528 "image.c"
+ gint _tmp43_;
+ gdouble _tmp44_;
#line 525 "/home/jens/Source/shotwell/src/util/image.vala"
- _tmp64_ = left;
+ _tmp43_ = left;
#line 525 "/home/jens/Source/shotwell/src/util/image.vala"
- _tmp65_ = angle;
+ _tmp44_ = angle;
#line 525 "/home/jens/Source/shotwell/src/util/image.vala"
- _tmp66_ = cos (_tmp65_);
-#line 525 "/home/jens/Source/shotwell/src/util/image.vala"
- left_offset = (gint) ((0 - _tmp64_) * _tmp66_);
-#line 2849 "image.c"
+ left_offset = (gint) ((0 - _tmp43_) * cos (_tmp44_));
+#line 2537 "image.c"
}
#line 527 "/home/jens/Source/shotwell/src/util/image.vala"
- _tmp67_ = top_right;
-#line 527 "/home/jens/Source/shotwell/src/util/image.vala"
- _tmp68_ = _tmp67_.x;
+ _tmp45_ = top_right;
#line 527 "/home/jens/Source/shotwell/src/util/image.vala"
- _tmp69_ = bottom_right;
+ _tmp46_ = _tmp45_.x;
#line 527 "/home/jens/Source/shotwell/src/util/image.vala"
- _tmp70_ = _tmp69_.x;
+ _tmp47_ = bottom_right;
#line 527 "/home/jens/Source/shotwell/src/util/image.vala"
- _tmp71_ = MAX (_tmp68_, _tmp70_);
+ _tmp48_ = _tmp47_.x;
#line 527 "/home/jens/Source/shotwell/src/util/image.vala"
- right = _tmp71_;
+ right = MAX (_tmp46_, _tmp48_);
#line 528 "/home/jens/Source/shotwell/src/util/image.vala"
- _tmp72_ = right;
+ _tmp49_ = right;
#line 528 "/home/jens/Source/shotwell/src/util/image.vala"
- _tmp73_ = img_w;
-#line 528 "/home/jens/Source/shotwell/src/util/image.vala"
- if (_tmp72_ > _tmp73_) {
-#line 2869 "image.c"
- gint _tmp74_;
- gint _tmp75_;
- gdouble _tmp76_;
- gdouble _tmp77_;
-#line 529 "/home/jens/Source/shotwell/src/util/image.vala"
- _tmp74_ = img_w;
+ if (_tmp49_ > img_w) {
+#line 2553 "image.c"
+ gint _tmp50_;
+ gdouble _tmp51_;
#line 529 "/home/jens/Source/shotwell/src/util/image.vala"
- _tmp75_ = right;
+ _tmp50_ = right;
#line 529 "/home/jens/Source/shotwell/src/util/image.vala"
- _tmp76_ = angle;
+ _tmp51_ = angle;
#line 529 "/home/jens/Source/shotwell/src/util/image.vala"
- _tmp77_ = cos (_tmp76_);
-#line 529 "/home/jens/Source/shotwell/src/util/image.vala"
- right_offset = (gint) ((_tmp74_ - _tmp75_) * _tmp77_);
-#line 2884 "image.c"
+ right_offset = (gint) ((img_w - _tmp50_) * cos (_tmp51_));
+#line 2562 "image.c"
}
#line 531 "/home/jens/Source/shotwell/src/util/image.vala"
- _tmp79_ = preserve_geom;
-#line 531 "/home/jens/Source/shotwell/src/util/image.vala"
- if (_tmp79_) {
-#line 2890 "image.c"
- gint _tmp80_;
- gint _tmp81_;
- gint _tmp82_;
- gint _tmp83_;
- Box _tmp84_ = {0};
+ if (preserve_geom) {
+#line 2566 "image.c"
+ gint _tmp53_;
+ gint _tmp54_;
+ gint _tmp55_;
+ gint _tmp56_;
+ Box _tmp57_ = {0};
#line 531 "/home/jens/Source/shotwell/src/util/image.vala"
- _tmp80_ = left_offset;
+ _tmp53_ = left_offset;
#line 531 "/home/jens/Source/shotwell/src/util/image.vala"
- _tmp81_ = right_offset;
+ _tmp54_ = right_offset;
#line 531 "/home/jens/Source/shotwell/src/util/image.vala"
- _tmp82_ = top_offset;
+ _tmp55_ = top_offset;
#line 531 "/home/jens/Source/shotwell/src/util/image.vala"
- _tmp83_ = bottom_offset;
+ _tmp56_ = bottom_offset;
#line 531 "/home/jens/Source/shotwell/src/util/image.vala"
- box_get_offset (src, _tmp80_ + _tmp81_, _tmp82_ + _tmp83_, &_tmp84_);
+ box_get_offset (src, _tmp53_ + _tmp54_, _tmp55_ + _tmp56_, &_tmp57_);
#line 531 "/home/jens/Source/shotwell/src/util/image.vala"
- _tmp78_ = _tmp84_;
-#line 2908 "image.c"
+ _tmp52_ = _tmp57_;
+#line 2584 "image.c"
} else {
- Box _tmp85_;
- gint _tmp86_;
- gint _tmp87_;
- Box _tmp88_;
- gint _tmp89_;
- gint _tmp90_;
- Box _tmp91_;
- gint _tmp92_;
- gint _tmp93_;
- Box _tmp94_;
- gint _tmp95_;
- gint _tmp96_;
+ Box _tmp58_;
+ gint _tmp59_;
+ gint _tmp60_;
+ Box _tmp61_;
+ gint _tmp62_;
+ gint _tmp63_;
+ Box _tmp64_;
+ gint _tmp65_;
+ gint _tmp66_;
+ Box _tmp67_;
+ gint _tmp68_;
+ gint _tmp69_;
#line 532 "/home/jens/Source/shotwell/src/util/image.vala"
- _tmp85_ = *src;
+ _tmp58_ = *src;
#line 532 "/home/jens/Source/shotwell/src/util/image.vala"
- _tmp86_ = _tmp85_.left;
+ _tmp59_ = _tmp58_.left;
#line 532 "/home/jens/Source/shotwell/src/util/image.vala"
- _tmp87_ = left_offset;
+ _tmp60_ = left_offset;
#line 532 "/home/jens/Source/shotwell/src/util/image.vala"
- _tmp88_ = *src;
+ _tmp61_ = *src;
#line 532 "/home/jens/Source/shotwell/src/util/image.vala"
- _tmp89_ = _tmp88_.top;
+ _tmp62_ = _tmp61_.top;
#line 532 "/home/jens/Source/shotwell/src/util/image.vala"
- _tmp90_ = top_offset;
+ _tmp63_ = top_offset;
#line 532 "/home/jens/Source/shotwell/src/util/image.vala"
- _tmp91_ = *src;
+ _tmp64_ = *src;
#line 532 "/home/jens/Source/shotwell/src/util/image.vala"
- _tmp92_ = _tmp91_.right;
+ _tmp65_ = _tmp64_.right;
#line 532 "/home/jens/Source/shotwell/src/util/image.vala"
- _tmp93_ = right_offset;
+ _tmp66_ = right_offset;
#line 532 "/home/jens/Source/shotwell/src/util/image.vala"
- _tmp94_ = *src;
+ _tmp67_ = *src;
#line 532 "/home/jens/Source/shotwell/src/util/image.vala"
- _tmp95_ = _tmp94_.bottom;
+ _tmp68_ = _tmp67_.bottom;
#line 532 "/home/jens/Source/shotwell/src/util/image.vala"
- _tmp96_ = bottom_offset;
+ _tmp69_ = bottom_offset;
#line 532 "/home/jens/Source/shotwell/src/util/image.vala"
- box_init (&_tmp78_, _tmp86_ + _tmp87_, _tmp89_ + _tmp90_, _tmp92_ + _tmp93_, _tmp95_ + _tmp96_);
-#line 2948 "image.c"
+ box_init (&_tmp52_, _tmp59_ + _tmp60_, _tmp62_ + _tmp63_, _tmp65_ + _tmp66_, _tmp68_ + _tmp69_);
+#line 2624 "image.c"
}
#line 531 "/home/jens/Source/shotwell/src/util/image.vala"
- *result = _tmp78_;
+ *result = _tmp52_;
#line 531 "/home/jens/Source/shotwell/src/util/image.vala"
return;
-#line 2954 "image.c"
+#line 2630 "image.c"
}
diff --git a/src/util/misc.c b/src/util/misc.c
index beac274..cfc0b70 100644
--- a/src/util/misc.c
+++ b/src/util/misc.c
@@ -1,4 +1,4 @@
-/* misc.c generated by valac 0.36.6, the Vala compiler
+/* misc.c generated by valac 0.40.4, the Vala compiler
* generated from misc.vala, do not modify */
/* Copyright 2016 Software Freedom Conservancy Inc.
@@ -7,6 +7,7 @@
* See the COPYING file in this distribution.
*/
+
#include <glib.h>
#include <glib-object.h>
#include <time.h>
@@ -184,44 +185,67 @@ static gpointer one_shot_scheduler_parent_class = NULL;
static gpointer op_timer_parent_class = NULL;
guint int64_hash (gint64* n);
-gboolean int64_equal (gint64* a, gint64* b);
-gint int64_compare (gint64* a, gint64* b);
-gint uint64_compare (guint64* a, guint64* b);
-gboolean bool_value_equals (GValue* a, GValue* b);
-gboolean int_value_equals (GValue* a, GValue* b);
+gboolean int64_equal (gint64* a,
+ gint64* b);
+gint int64_compare (gint64* a,
+ gint64* b);
+gint uint64_compare (guint64* a,
+ guint64* b);
+gboolean bool_value_equals (GValue* a,
+ GValue* b);
+gboolean int_value_equals (GValue* a,
+ GValue* b);
gulong timeval_to_ms (GTimeVal* time_val);
gulong now_ms (void);
gulong now_sec (void);
time_t now_time_t (void);
-gchar* md5_file (GFile* file, GError** error);
-gboolean equal_sets (GeeSet* a, GeeSet* b);
-GeeSet* intersection_of_sets (GeeSet* a, GeeSet* b, GeeSet* excluded);
+gchar* md5_file (GFile* file,
+ GError** error);
+gboolean equal_sets (GeeSet* a,
+ GeeSet* b);
+GeeSet* intersection_of_sets (GeeSet* a,
+ GeeSet* b,
+ GeeSet* excluded);
GType data_object_get_type (void) G_GNUC_CONST;
GType data_source_get_type (void) G_GNUC_CONST;
GType thumbnail_source_get_type (void) G_GNUC_CONST;
GType media_source_get_type (void) G_GNUC_CONST;
GType photo_source_get_type (void) G_GNUC_CONST;
GType photo_get_type (void) G_GNUC_CONST;
-guchar* serialize_photo_ids (GeeCollection* photos, int* result_length1);
+guchar* serialize_photo_ids (GeeCollection* photos,
+ int* result_length1);
GType photo_id_get_type (void) G_GNUC_CONST;
PhotoID* photo_id_dup (const PhotoID* self);
void photo_id_free (PhotoID* self);
-void photo_get_photo_id (Photo* self, PhotoID* result);
-GeeList* unserialize_photo_ids (guchar* serialized, gint size);
-void photo_id_init (PhotoID *self, gint64 id);
-guchar* serialize_media_sources (GeeCollection* media, int* result_length1);
+void photo_get_photo_id (Photo* self,
+ PhotoID* result);
+GeeList* unserialize_photo_ids (guchar* serialized,
+ gint size);
+void photo_id_init (PhotoID *self,
+ gint64 id);
+guchar* serialize_media_sources (GeeCollection* media,
+ int* result_length1);
gchar* data_source_get_source_id (DataSource* self);
-GeeList* unserialize_media_sources (guchar* serialized, gint size);
+GeeList* unserialize_media_sources (guchar* serialized,
+ gint size);
gpointer media_collection_registry_ref (gpointer instance);
void media_collection_registry_unref (gpointer instance);
-GParamSpec* param_spec_media_collection_registry (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags);
-void value_set_media_collection_registry (GValue* value, gpointer v_object);
-void value_take_media_collection_registry (GValue* value, gpointer v_object);
+GParamSpec* param_spec_media_collection_registry (const gchar* name,
+ const gchar* nick,
+ const gchar* blurb,
+ GType object_type,
+ GParamFlags flags);
+void value_set_media_collection_registry (GValue* value,
+ gpointer v_object);
+void value_take_media_collection_registry (GValue* value,
+ gpointer v_object);
gpointer value_get_media_collection_registry (const GValue* value);
GType media_collection_registry_get_type (void) G_GNUC_CONST;
MediaCollectionRegistry* media_collection_registry_get_instance (void);
-MediaSource* media_collection_registry_fetch_media (MediaCollectionRegistry* self, const gchar* source_id);
-gchar* format_local_datespan (struct tm* from_date, struct tm* to_date);
+MediaSource* media_collection_registry_fetch_media (MediaCollectionRegistry* self,
+ const gchar* source_id);
+gchar* format_local_datespan (struct tm* from_date,
+ struct tm* to_date);
gchar* resources_get_start_multiday_span_format_string (void);
gchar* resources_get_end_multiday_span_format_string (void);
gchar* resources_get_start_multimonth_span_format_string (void);
@@ -231,104 +255,121 @@ gchar* string_strip_leading_zeroes (const gchar* str);
gchar* format_local_date (struct tm* date);
gpointer one_shot_scheduler_ref (gpointer instance);
void one_shot_scheduler_unref (gpointer instance);
-GParamSpec* param_spec_one_shot_scheduler (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags);
-void value_set_one_shot_scheduler (GValue* value, gpointer v_object);
-void value_take_one_shot_scheduler (GValue* value, gpointer v_object);
+GParamSpec* param_spec_one_shot_scheduler (const gchar* name,
+ const gchar* nick,
+ const gchar* blurb,
+ GType object_type,
+ GParamFlags flags);
+void value_set_one_shot_scheduler (GValue* value,
+ gpointer v_object);
+void value_take_one_shot_scheduler (GValue* value,
+ gpointer v_object);
gpointer value_get_one_shot_scheduler (const GValue* value);
GType one_shot_scheduler_get_type (void) G_GNUC_CONST;
#define ONE_SHOT_SCHEDULER_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), TYPE_ONE_SHOT_SCHEDULER, OneShotSchedulerPrivate))
-enum {
- ONE_SHOT_SCHEDULER_DUMMY_PROPERTY
-};
void one_shot_scheduler_cancel (OneShotScheduler* self);
-OneShotScheduler* one_shot_scheduler_new (const gchar* name, OneShotCallback callback, void* callback_target);
-OneShotScheduler* one_shot_scheduler_construct (GType object_type, const gchar* name, OneShotCallback callback, void* callback_target);
+OneShotScheduler* one_shot_scheduler_new (const gchar* name,
+ OneShotCallback callback,
+ void* callback_target);
+OneShotScheduler* one_shot_scheduler_construct (GType object_type,
+ const gchar* name,
+ OneShotCallback callback,
+ void* callback_target);
gboolean one_shot_scheduler_is_scheduled (OneShotScheduler* self);
void one_shot_scheduler_at_idle (OneShotScheduler* self);
-void one_shot_scheduler_at_priority_idle (OneShotScheduler* self, gint priority);
+void one_shot_scheduler_at_priority_idle (OneShotScheduler* self,
+ gint priority);
static gboolean one_shot_scheduler_callback_wrapper (OneShotScheduler* self);
static gboolean _one_shot_scheduler_callback_wrapper_gsource_func (gpointer self);
-void one_shot_scheduler_after_timeout (OneShotScheduler* self, guint msec, gboolean reschedule);
-void one_shot_scheduler_priority_after_timeout (OneShotScheduler* self, gint priority, guint msec, gboolean reschedule);
+void one_shot_scheduler_after_timeout (OneShotScheduler* self,
+ guint msec,
+ gboolean reschedule);
+void one_shot_scheduler_priority_after_timeout (OneShotScheduler* self,
+ gint priority,
+ guint msec,
+ gboolean reschedule);
static void one_shot_scheduler_finalize (OneShotScheduler * obj);
gpointer op_timer_ref (gpointer instance);
void op_timer_unref (gpointer instance);
-GParamSpec* param_spec_op_timer (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags);
-void value_set_op_timer (GValue* value, gpointer v_object);
-void value_take_op_timer (GValue* value, gpointer v_object);
+GParamSpec* param_spec_op_timer (const gchar* name,
+ const gchar* nick,
+ const gchar* blurb,
+ GType object_type,
+ GParamFlags flags);
+void value_set_op_timer (GValue* value,
+ gpointer v_object);
+void value_take_op_timer (GValue* value,
+ gpointer v_object);
gpointer value_get_op_timer (const GValue* value);
GType op_timer_get_type (void) G_GNUC_CONST;
#define OP_TIMER_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), TYPE_OP_TIMER, OpTimerPrivate))
-enum {
- OP_TIMER_DUMMY_PROPERTY
-};
OpTimer* op_timer_new (const gchar* name);
-OpTimer* op_timer_construct (GType object_type, const gchar* name);
+OpTimer* op_timer_construct (GType object_type,
+ const gchar* name);
void op_timer_start (OpTimer* self);
void op_timer_stop (OpTimer* self);
gchar* op_timer_to_string (OpTimer* self);
static void op_timer_finalize (OpTimer * obj);
-guint int64_hash (gint64* n) {
+guint
+int64_hash (gint64* n)
+{
guint result = 0U;
guint8* u8 = NULL;
- gint64* _tmp0_;
guint hash = 0U;
#line 9 "/home/jens/Source/shotwell/src/util/misc.vala"
- _tmp0_ = n;
-#line 9 "/home/jens/Source/shotwell/src/util/misc.vala"
- u8 = (guint8*) _tmp0_;
+ u8 = (guint8*) n;
#line 10 "/home/jens/Source/shotwell/src/util/misc.vala"
hash = (guint) 0;
-#line 285 "misc.c"
+#line 326 "misc.c"
{
gint ctr = 0;
#line 11 "/home/jens/Source/shotwell/src/util/misc.vala"
ctr = 0;
-#line 290 "misc.c"
+#line 331 "misc.c"
{
- gboolean _tmp1_ = FALSE;
+ gboolean _tmp0_ = FALSE;
#line 11 "/home/jens/Source/shotwell/src/util/misc.vala"
- _tmp1_ = TRUE;
+ _tmp0_ = TRUE;
#line 11 "/home/jens/Source/shotwell/src/util/misc.vala"
while (TRUE) {
-#line 297 "misc.c"
- gint _tmp3_;
+#line 338 "misc.c"
+ gint _tmp2_;
+ guint _tmp3_;
guint _tmp4_;
- guint _tmp5_;
- guint8* _tmp6_;
+ guint8* _tmp5_;
#line 11 "/home/jens/Source/shotwell/src/util/misc.vala"
- if (!_tmp1_) {
-#line 304 "misc.c"
- gint _tmp2_;
+ if (!_tmp0_) {
+#line 345 "misc.c"
+ gint _tmp1_;
#line 11 "/home/jens/Source/shotwell/src/util/misc.vala"
- _tmp2_ = ctr;
+ _tmp1_ = ctr;
#line 11 "/home/jens/Source/shotwell/src/util/misc.vala"
- ctr = _tmp2_ + 1;
-#line 310 "misc.c"
+ ctr = _tmp1_ + 1;
+#line 351 "misc.c"
}
#line 11 "/home/jens/Source/shotwell/src/util/misc.vala"
- _tmp1_ = FALSE;
+ _tmp0_ = FALSE;
#line 11 "/home/jens/Source/shotwell/src/util/misc.vala"
- _tmp3_ = ctr;
+ _tmp2_ = ctr;
#line 11 "/home/jens/Source/shotwell/src/util/misc.vala"
- if (!(((gulong) _tmp3_) < (sizeof (gint64) / sizeof (guint8)))) {
+ if (!(((gulong) _tmp2_) < (sizeof (gint64) / sizeof (guint8)))) {
#line 11 "/home/jens/Source/shotwell/src/util/misc.vala"
break;
-#line 320 "misc.c"
+#line 361 "misc.c"
}
#line 12 "/home/jens/Source/shotwell/src/util/misc.vala"
- _tmp4_ = hash;
+ _tmp3_ = hash;
#line 12 "/home/jens/Source/shotwell/src/util/misc.vala"
- _tmp5_ = hash;
+ _tmp4_ = hash;
#line 12 "/home/jens/Source/shotwell/src/util/misc.vala"
- _tmp6_ = u8;
+ _tmp5_ = u8;
#line 12 "/home/jens/Source/shotwell/src/util/misc.vala"
- u8 = _tmp6_ + 1;
+ u8 = _tmp5_ + 1;
#line 12 "/home/jens/Source/shotwell/src/util/misc.vala"
- hash = ((_tmp4_ << 4) ^ (_tmp5_ >> 28)) ^ (*_tmp6_);
-#line 332 "misc.c"
+ hash = ((_tmp3_ << 4) ^ (_tmp4_ >> 28)) ^ (*_tmp5_);
+#line 373 "misc.c"
}
}
}
@@ -336,128 +377,122 @@ guint int64_hash (gint64* n) {
result = hash;
#line 15 "/home/jens/Source/shotwell/src/util/misc.vala"
return result;
-#line 340 "misc.c"
+#line 381 "misc.c"
}
-gboolean int64_equal (gint64* a, gint64* b) {
+gboolean
+int64_equal (gint64* a,
+ gint64* b)
+{
gboolean result = FALSE;
gint64* bia = NULL;
- gint64* _tmp0_;
gint64* bib = NULL;
- gint64* _tmp1_;
-#line 19 "/home/jens/Source/shotwell/src/util/misc.vala"
- _tmp0_ = a;
#line 19 "/home/jens/Source/shotwell/src/util/misc.vala"
- bia = (gint64*) _tmp0_;
+ bia = (gint64*) a;
#line 20 "/home/jens/Source/shotwell/src/util/misc.vala"
- _tmp1_ = b;
-#line 20 "/home/jens/Source/shotwell/src/util/misc.vala"
- bib = (gint64*) _tmp1_;
+ bib = (gint64*) b;
#line 22 "/home/jens/Source/shotwell/src/util/misc.vala"
result = (*bia) == (*bib);
#line 22 "/home/jens/Source/shotwell/src/util/misc.vala"
return result;
-#line 362 "misc.c"
+#line 400 "misc.c"
}
-gint int64_compare (gint64* a, gint64* b) {
+gint
+int64_compare (gint64* a,
+ gint64* b)
+{
gint result = 0;
gint64 diff = 0LL;
- gint64* _tmp0_;
- gint64* _tmp1_;
- gint64 _tmp2_;
-#line 26 "/home/jens/Source/shotwell/src/util/misc.vala"
- _tmp0_ = a;
+ gint64 _tmp0_;
#line 26 "/home/jens/Source/shotwell/src/util/misc.vala"
- _tmp1_ = b;
-#line 26 "/home/jens/Source/shotwell/src/util/misc.vala"
- diff = (*((gint64*) _tmp0_)) - (*((gint64*) _tmp1_));
+ diff = (*((gint64*) a)) - (*((gint64*) b));
#line 27 "/home/jens/Source/shotwell/src/util/misc.vala"
- _tmp2_ = diff;
+ _tmp0_ = diff;
#line 27 "/home/jens/Source/shotwell/src/util/misc.vala"
- if (_tmp2_ < ((gint64) 0)) {
+ if (_tmp0_ < ((gint64) 0)) {
#line 28 "/home/jens/Source/shotwell/src/util/misc.vala"
result = -1;
#line 28 "/home/jens/Source/shotwell/src/util/misc.vala"
return result;
-#line 386 "misc.c"
+#line 421 "misc.c"
} else {
- gint64 _tmp3_;
+ gint64 _tmp1_;
#line 29 "/home/jens/Source/shotwell/src/util/misc.vala"
- _tmp3_ = diff;
+ _tmp1_ = diff;
#line 29 "/home/jens/Source/shotwell/src/util/misc.vala"
- if (_tmp3_ > ((gint64) 0)) {
+ if (_tmp1_ > ((gint64) 0)) {
#line 30 "/home/jens/Source/shotwell/src/util/misc.vala"
result = 1;
#line 30 "/home/jens/Source/shotwell/src/util/misc.vala"
return result;
-#line 397 "misc.c"
+#line 432 "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 403 "misc.c"
+#line 438 "misc.c"
}
}
}
-gint uint64_compare (guint64* a, guint64* b) {
+gint
+uint64_compare (guint64* a,
+ guint64* b)
+{
gint result = 0;
guint64 a64 = 0ULL;
- guint64* _tmp0_;
guint64 b64 = 0ULL;
- guint64* _tmp1_;
- guint64 _tmp2_;
- guint64 _tmp3_;
-#line 36 "/home/jens/Source/shotwell/src/util/misc.vala"
- _tmp0_ = a;
+ guint64 _tmp0_;
+ guint64 _tmp1_;
#line 36 "/home/jens/Source/shotwell/src/util/misc.vala"
- a64 = *((guint64*) _tmp0_);
+ a64 = *((guint64*) a);
#line 37 "/home/jens/Source/shotwell/src/util/misc.vala"
- _tmp1_ = b;
-#line 37 "/home/jens/Source/shotwell/src/util/misc.vala"
- b64 = *((guint64*) _tmp1_);
+ b64 = *((guint64*) b);
#line 39 "/home/jens/Source/shotwell/src/util/misc.vala"
- _tmp2_ = a64;
+ _tmp0_ = a64;
#line 39 "/home/jens/Source/shotwell/src/util/misc.vala"
- _tmp3_ = b64;
+ _tmp1_ = b64;
#line 39 "/home/jens/Source/shotwell/src/util/misc.vala"
- if (_tmp2_ < _tmp3_) {
+ if (_tmp0_ < _tmp1_) {
#line 40 "/home/jens/Source/shotwell/src/util/misc.vala"
result = -1;
#line 40 "/home/jens/Source/shotwell/src/util/misc.vala"
return result;
-#line 435 "misc.c"
+#line 467 "misc.c"
} else {
- guint64 _tmp4_;
- guint64 _tmp5_;
+ guint64 _tmp2_;
+ guint64 _tmp3_;
#line 41 "/home/jens/Source/shotwell/src/util/misc.vala"
- _tmp4_ = a64;
+ _tmp2_ = a64;
#line 41 "/home/jens/Source/shotwell/src/util/misc.vala"
- _tmp5_ = b64;
+ _tmp3_ = b64;
#line 41 "/home/jens/Source/shotwell/src/util/misc.vala"
- if (_tmp4_ > _tmp5_) {
+ if (_tmp2_ > _tmp3_) {
#line 42 "/home/jens/Source/shotwell/src/util/misc.vala"
result = 1;
#line 42 "/home/jens/Source/shotwell/src/util/misc.vala"
return result;
-#line 449 "misc.c"
+#line 481 "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 455 "misc.c"
+#line 487 "misc.c"
}
}
}
-gboolean bool_value_equals (GValue* a, GValue* b) {
+gboolean
+bool_value_equals (GValue* a,
+ GValue* b)
+{
gboolean result = FALSE;
GValue _tmp0_;
GValue _tmp1_;
@@ -473,11 +508,14 @@ 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 477 "misc.c"
+#line 512 "misc.c"
}
-gboolean int_value_equals (GValue* a, GValue* b) {
+gboolean
+int_value_equals (GValue* a,
+ GValue* b)
+{
gboolean result = FALSE;
GValue _tmp0_;
GValue _tmp1_;
@@ -493,11 +531,13 @@ 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 497 "misc.c"
+#line 535 "misc.c"
}
-gulong timeval_to_ms (GTimeVal* time_val) {
+gulong
+timeval_to_ms (GTimeVal* time_val)
+{
gulong result = 0UL;
GTimeVal _tmp0_;
glong _tmp1_;
@@ -517,27 +557,28 @@ 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 521 "misc.c"
+#line 561 "misc.c"
}
-gulong now_ms (void) {
+gulong
+now_ms (void)
+{
gulong result = 0UL;
GTimeVal _tmp0_ = {0};
- gulong _tmp1_;
#line 62 "/home/jens/Source/shotwell/src/util/misc.vala"
g_get_current_time (&_tmp0_);
#line 62 "/home/jens/Source/shotwell/src/util/misc.vala"
- _tmp1_ = timeval_to_ms (&_tmp0_);
-#line 62 "/home/jens/Source/shotwell/src/util/misc.vala"
- result = _tmp1_;
+ result = timeval_to_ms (&_tmp0_);
#line 62 "/home/jens/Source/shotwell/src/util/misc.vala"
return result;
-#line 537 "misc.c"
+#line 576 "misc.c"
}
-gulong now_sec (void) {
+gulong
+now_sec (void)
+{
gulong result = 0UL;
GTimeVal time_val = {0};
GTimeVal _tmp0_;
@@ -552,24 +593,26 @@ gulong now_sec (void) {
result = (gulong) _tmp1_;
#line 68 "/home/jens/Source/shotwell/src/util/misc.vala"
return result;
-#line 556 "misc.c"
+#line 597 "misc.c"
}
-inline time_t now_time_t (void) {
+inline time_t
+now_time_t (void)
+{
time_t result = 0;
- gulong _tmp0_;
-#line 72 "/home/jens/Source/shotwell/src/util/misc.vala"
- _tmp0_ = now_sec ();
#line 72 "/home/jens/Source/shotwell/src/util/misc.vala"
- result = (time_t) _tmp0_;
+ result = (time_t) now_sec ();
#line 72 "/home/jens/Source/shotwell/src/util/misc.vala"
return result;
-#line 569 "misc.c"
+#line 609 "misc.c"
}
-gchar* md5_file (GFile* file, GError** error) {
+gchar*
+md5_file (GFile* file,
+ GError** error)
+{
gchar* result = NULL;
GChecksum* md5 = NULL;
GChecksum* _tmp0_;
@@ -578,11 +621,10 @@ gchar* md5_file (GFile* file, GError** error) {
gint buffer_length1;
gint _buffer_size_;
GFileInputStream* fins = NULL;
- GFile* _tmp2_;
- GFileInputStream* _tmp3_;
- GChecksum* _tmp18_;
- const gchar* _tmp19_;
- gchar* _tmp20_;
+ GFileInputStream* _tmp2_;
+ GChecksum* _tmp15_;
+ const gchar* _tmp16_;
+ gchar* _tmp17_;
GError * _inner_error_ = NULL;
#line 75 "/home/jens/Source/shotwell/src/util/misc.vala"
g_return_val_if_fail (G_IS_FILE (file), NULL);
@@ -599,11 +641,9 @@ gchar* md5_file (GFile* file, GError** error) {
#line 77 "/home/jens/Source/shotwell/src/util/misc.vala"
_buffer_size_ = buffer_length1;
#line 79 "/home/jens/Source/shotwell/src/util/misc.vala"
- _tmp2_ = file;
+ _tmp2_ = g_file_read (file, NULL, &_inner_error_);
#line 79 "/home/jens/Source/shotwell/src/util/misc.vala"
- _tmp3_ = g_file_read (_tmp2_, NULL, &_inner_error_);
-#line 79 "/home/jens/Source/shotwell/src/util/misc.vala"
- fins = _tmp3_;
+ fins = _tmp2_;
#line 79 "/home/jens/Source/shotwell/src/util/misc.vala"
if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 79 "/home/jens/Source/shotwell/src/util/misc.vala"
@@ -614,41 +654,38 @@ gchar* md5_file (GFile* file, GError** error) {
_g_checksum_free0 (md5);
#line 79 "/home/jens/Source/shotwell/src/util/misc.vala"
return NULL;
-#line 618 "misc.c"
+#line 658 "misc.c"
}
{
- gboolean _tmp4_ = FALSE;
+ gboolean _tmp3_ = FALSE;
#line 80 "/home/jens/Source/shotwell/src/util/misc.vala"
- _tmp4_ = TRUE;
+ _tmp3_ = TRUE;
#line 80 "/home/jens/Source/shotwell/src/util/misc.vala"
while (TRUE) {
-#line 626 "misc.c"
+#line 666 "misc.c"
gsize bytes_read = 0UL;
- GFileInputStream* _tmp5_;
- guint8* _tmp6_;
- gint _tmp6__length1;
- gssize _tmp7_;
- gsize _tmp8_;
- GChecksum* _tmp9_;
- guint8* _tmp10_;
- gint _tmp10__length1;
- gsize _tmp11_;
+ GFileInputStream* _tmp4_;
+ guint8* _tmp5_;
+ gint _tmp5__length1;
+ gsize _tmp6_;
+ GChecksum* _tmp7_;
+ guint8* _tmp8_;
+ gint _tmp8__length1;
+ gsize _tmp9_;
#line 80 "/home/jens/Source/shotwell/src/util/misc.vala"
- if (!_tmp4_) {
-#line 639 "misc.c"
+ if (!_tmp3_) {
+#line 678 "misc.c"
}
#line 80 "/home/jens/Source/shotwell/src/util/misc.vala"
- _tmp4_ = FALSE;
-#line 81 "/home/jens/Source/shotwell/src/util/misc.vala"
- _tmp5_ = fins;
+ _tmp3_ = FALSE;
#line 81 "/home/jens/Source/shotwell/src/util/misc.vala"
- _tmp6_ = buffer;
+ _tmp4_ = fins;
#line 81 "/home/jens/Source/shotwell/src/util/misc.vala"
- _tmp6__length1 = buffer_length1;
+ _tmp5_ = buffer;
#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_);
+ _tmp5__length1 = buffer_length1;
#line 81 "/home/jens/Source/shotwell/src/util/misc.vala"
- bytes_read = (gsize) _tmp7_;
+ bytes_read = (gsize) g_input_stream_read (G_TYPE_CHECK_INSTANCE_CAST (_tmp4_, g_input_stream_get_type (), GInputStream), _tmp5_, (gsize) _tmp5__length1, NULL, &_inner_error_);
#line 81 "/home/jens/Source/shotwell/src/util/misc.vala"
if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 81 "/home/jens/Source/shotwell/src/util/misc.vala"
@@ -661,38 +698,38 @@ gchar* md5_file (GFile* file, GError** error) {
_g_checksum_free0 (md5);
#line 81 "/home/jens/Source/shotwell/src/util/misc.vala"
return NULL;
-#line 665 "misc.c"
+#line 702 "misc.c"
}
#line 82 "/home/jens/Source/shotwell/src/util/misc.vala"
- _tmp8_ = bytes_read;
+ _tmp6_ = bytes_read;
#line 82 "/home/jens/Source/shotwell/src/util/misc.vala"
- if (_tmp8_ <= ((gsize) 0)) {
+ if (_tmp6_ <= ((gsize) 0)) {
#line 83 "/home/jens/Source/shotwell/src/util/misc.vala"
break;
-#line 673 "misc.c"
+#line 710 "misc.c"
}
#line 85 "/home/jens/Source/shotwell/src/util/misc.vala"
- _tmp9_ = md5;
+ _tmp7_ = md5;
#line 85 "/home/jens/Source/shotwell/src/util/misc.vala"
- _tmp10_ = buffer;
+ _tmp8_ = buffer;
#line 85 "/home/jens/Source/shotwell/src/util/misc.vala"
- _tmp10__length1 = buffer_length1;
+ _tmp8__length1 = buffer_length1;
#line 85 "/home/jens/Source/shotwell/src/util/misc.vala"
- _tmp11_ = bytes_read;
+ _tmp9_ = bytes_read;
#line 85 "/home/jens/Source/shotwell/src/util/misc.vala"
- g_checksum_update (_tmp9_, (guchar*) _tmp10_, _tmp11_);
-#line 685 "misc.c"
+ g_checksum_update (_tmp7_, (guchar*) _tmp8_, _tmp9_);
+#line 722 "misc.c"
}
}
{
- GFileInputStream* _tmp12_;
+ GFileInputStream* _tmp10_;
#line 89 "/home/jens/Source/shotwell/src/util/misc.vala"
- _tmp12_ = fins;
+ _tmp10_ = fins;
#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_);
+ g_input_stream_close (G_TYPE_CHECK_INSTANCE_CAST (_tmp10_, g_input_stream_get_type (), GInputStream), NULL, &_inner_error_);
#line 89 "/home/jens/Source/shotwell/src/util/misc.vala"
if (G_UNLIKELY (_inner_error_ != NULL)) {
-#line 696 "misc.c"
+#line 733 "misc.c"
goto __catch5_g_error;
}
}
@@ -700,32 +737,29 @@ gchar* md5_file (GFile* file, GError** error) {
__catch5_g_error:
{
GError* err = NULL;
- GFile* _tmp13_;
- gchar* _tmp14_;
- gchar* _tmp15_;
- GError* _tmp16_;
- const gchar* _tmp17_;
+ gchar* _tmp11_;
+ gchar* _tmp12_;
+ GError* _tmp13_;
+ const gchar* _tmp14_;
#line 88 "/home/jens/Source/shotwell/src/util/misc.vala"
err = _inner_error_;
#line 88 "/home/jens/Source/shotwell/src/util/misc.vala"
_inner_error_ = NULL;
#line 91 "/home/jens/Source/shotwell/src/util/misc.vala"
- _tmp13_ = file;
-#line 91 "/home/jens/Source/shotwell/src/util/misc.vala"
- _tmp14_ = g_file_get_path (_tmp13_);
+ _tmp11_ = g_file_get_path (file);
#line 91 "/home/jens/Source/shotwell/src/util/misc.vala"
- _tmp15_ = _tmp14_;
+ _tmp12_ = _tmp11_;
#line 91 "/home/jens/Source/shotwell/src/util/misc.vala"
- _tmp16_ = err;
+ _tmp13_ = err;
#line 91 "/home/jens/Source/shotwell/src/util/misc.vala"
- _tmp17_ = _tmp16_->message;
+ _tmp14_ = _tmp13_->message;
#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_);
+ g_warning ("misc.vala:91: Unable to close MD5 input stream for %s: %s", _tmp12_, _tmp14_);
#line 91 "/home/jens/Source/shotwell/src/util/misc.vala"
- _g_free0 (_tmp15_);
+ _g_free0 (_tmp12_);
#line 88 "/home/jens/Source/shotwell/src/util/misc.vala"
_g_error_free0 (err);
-#line 729 "misc.c"
+#line 763 "misc.c"
}
__finally5:
#line 88 "/home/jens/Source/shotwell/src/util/misc.vala"
@@ -740,16 +774,16 @@ gchar* md5_file (GFile* file, GError** error) {
_g_checksum_free0 (md5);
#line 88 "/home/jens/Source/shotwell/src/util/misc.vala"
return NULL;
-#line 744 "misc.c"
+#line 778 "misc.c"
}
#line 94 "/home/jens/Source/shotwell/src/util/misc.vala"
- _tmp18_ = md5;
+ _tmp15_ = md5;
#line 94 "/home/jens/Source/shotwell/src/util/misc.vala"
- _tmp19_ = g_checksum_get_string (_tmp18_);
+ _tmp16_ = g_checksum_get_string (_tmp15_);
#line 94 "/home/jens/Source/shotwell/src/util/misc.vala"
- _tmp20_ = g_strdup (_tmp19_);
+ _tmp17_ = g_strdup (_tmp16_);
#line 94 "/home/jens/Source/shotwell/src/util/misc.vala"
- result = _tmp20_;
+ result = _tmp17_;
#line 94 "/home/jens/Source/shotwell/src/util/misc.vala"
_g_object_unref0 (fins);
#line 94 "/home/jens/Source/shotwell/src/util/misc.vala"
@@ -758,67 +792,55 @@ gchar* md5_file (GFile* file, GError** error) {
_g_checksum_free0 (md5);
#line 94 "/home/jens/Source/shotwell/src/util/misc.vala"
return result;
-#line 762 "misc.c"
+#line 796 "misc.c"
}
-gboolean equal_sets (GeeSet* a, GeeSet* b) {
+gboolean
+equal_sets (GeeSet* a,
+ GeeSet* b)
+{
gboolean result = FALSE;
gboolean _tmp0_ = FALSE;
gboolean _tmp1_ = FALSE;
- GeeSet* _tmp2_;
- gboolean _tmp7_ = FALSE;
- GeeSet* _tmp8_;
- gboolean _tmp14_ = FALSE;
- gboolean _tmp15_ = FALSE;
- GeeSet* _tmp16_;
- gboolean _tmp21_ = FALSE;
- GeeSet* _tmp22_;
- GeeSet* _tmp24_;
- gint _tmp25_;
- gint _tmp26_;
- GeeSet* _tmp27_;
- gint _tmp28_;
- gint _tmp29_;
+ gboolean _tmp4_ = FALSE;
+ gboolean _tmp8_ = FALSE;
+ gboolean _tmp9_ = FALSE;
+ gboolean _tmp11_ = FALSE;
+ gint _tmp12_;
+ gint _tmp13_;
+ gint _tmp14_;
+ gint _tmp15_;
#line 98 "/home/jens/Source/shotwell/src/util/misc.vala"
g_return_val_if_fail ((a == NULL) || GEE_IS_SET (a), FALSE);
#line 98 "/home/jens/Source/shotwell/src/util/misc.vala"
g_return_val_if_fail ((b == NULL) || GEE_IS_SET (b), FALSE);
#line 99 "/home/jens/Source/shotwell/src/util/misc.vala"
- _tmp2_ = a;
-#line 99 "/home/jens/Source/shotwell/src/util/misc.vala"
- if (_tmp2_ != NULL) {
-#line 792 "misc.c"
- GeeSet* _tmp3_;
- gint _tmp4_;
- gint _tmp5_;
-#line 99 "/home/jens/Source/shotwell/src/util/misc.vala"
- _tmp3_ = a;
+ if (a != NULL) {
+#line 821 "misc.c"
+ gint _tmp2_;
+ gint _tmp3_;
#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));
+ _tmp2_ = gee_collection_get_size (G_TYPE_CHECK_INSTANCE_CAST (a, GEE_TYPE_COLLECTION, GeeCollection));
#line 99 "/home/jens/Source/shotwell/src/util/misc.vala"
- _tmp5_ = _tmp4_;
+ _tmp3_ = _tmp2_;
#line 99 "/home/jens/Source/shotwell/src/util/misc.vala"
- _tmp1_ = _tmp5_ == 0;
-#line 804 "misc.c"
+ _tmp1_ = _tmp3_ == 0;
+#line 830 "misc.c"
} else {
#line 99 "/home/jens/Source/shotwell/src/util/misc.vala"
_tmp1_ = FALSE;
-#line 808 "misc.c"
+#line 834 "misc.c"
}
#line 99 "/home/jens/Source/shotwell/src/util/misc.vala"
if (_tmp1_) {
-#line 812 "misc.c"
- GeeSet* _tmp6_;
-#line 99 "/home/jens/Source/shotwell/src/util/misc.vala"
- _tmp6_ = b;
#line 99 "/home/jens/Source/shotwell/src/util/misc.vala"
- _tmp0_ = _tmp6_ == NULL;
-#line 818 "misc.c"
+ _tmp0_ = b == NULL;
+#line 840 "misc.c"
} else {
#line 99 "/home/jens/Source/shotwell/src/util/misc.vala"
_tmp0_ = FALSE;
-#line 822 "misc.c"
+#line 844 "misc.c"
}
#line 99 "/home/jens/Source/shotwell/src/util/misc.vala"
if (_tmp0_) {
@@ -826,194 +848,151 @@ gboolean equal_sets (GeeSet* a, GeeSet* b) {
result = TRUE;
#line 100 "/home/jens/Source/shotwell/src/util/misc.vala"
return result;
-#line 830 "misc.c"
+#line 852 "misc.c"
}
#line 102 "/home/jens/Source/shotwell/src/util/misc.vala"
- _tmp8_ = a;
+ if (a == NULL) {
+#line 856 "misc.c"
+ gboolean _tmp5_ = FALSE;
#line 102 "/home/jens/Source/shotwell/src/util/misc.vala"
- if (_tmp8_ == NULL) {
-#line 836 "misc.c"
- gboolean _tmp9_ = FALSE;
- GeeSet* _tmp10_;
+ if (b != NULL) {
+#line 860 "misc.c"
+ gint _tmp6_;
+ gint _tmp7_;
#line 102 "/home/jens/Source/shotwell/src/util/misc.vala"
- _tmp10_ = b;
+ _tmp6_ = gee_collection_get_size (G_TYPE_CHECK_INSTANCE_CAST (b, GEE_TYPE_COLLECTION, GeeCollection));
#line 102 "/home/jens/Source/shotwell/src/util/misc.vala"
- if (_tmp10_ != NULL) {
-#line 843 "misc.c"
- GeeSet* _tmp11_;
- gint _tmp12_;
- gint _tmp13_;
-#line 102 "/home/jens/Source/shotwell/src/util/misc.vala"
- _tmp11_ = b;
-#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 102 "/home/jens/Source/shotwell/src/util/misc.vala"
- _tmp13_ = _tmp12_;
+ _tmp7_ = _tmp6_;
#line 102 "/home/jens/Source/shotwell/src/util/misc.vala"
- _tmp9_ = _tmp13_ == 0;
-#line 855 "misc.c"
+ _tmp5_ = _tmp7_ == 0;
+#line 869 "misc.c"
} else {
#line 102 "/home/jens/Source/shotwell/src/util/misc.vala"
- _tmp9_ = FALSE;
-#line 859 "misc.c"
+ _tmp5_ = FALSE;
+#line 873 "misc.c"
}
#line 102 "/home/jens/Source/shotwell/src/util/misc.vala"
- _tmp7_ = _tmp9_;
-#line 863 "misc.c"
+ _tmp4_ = _tmp5_;
+#line 877 "misc.c"
} else {
#line 102 "/home/jens/Source/shotwell/src/util/misc.vala"
- _tmp7_ = FALSE;
-#line 867 "misc.c"
+ _tmp4_ = FALSE;
+#line 881 "misc.c"
}
#line 102 "/home/jens/Source/shotwell/src/util/misc.vala"
- if (_tmp7_) {
+ if (_tmp4_) {
#line 103 "/home/jens/Source/shotwell/src/util/misc.vala"
result = TRUE;
#line 103 "/home/jens/Source/shotwell/src/util/misc.vala"
return result;
-#line 875 "misc.c"
+#line 889 "misc.c"
}
#line 105 "/home/jens/Source/shotwell/src/util/misc.vala"
- _tmp16_ = a;
-#line 105 "/home/jens/Source/shotwell/src/util/misc.vala"
- if (_tmp16_ == NULL) {
-#line 881 "misc.c"
- GeeSet* _tmp17_;
+ if (a == NULL) {
#line 105 "/home/jens/Source/shotwell/src/util/misc.vala"
- _tmp17_ = b;
-#line 105 "/home/jens/Source/shotwell/src/util/misc.vala"
- _tmp15_ = _tmp17_ != NULL;
-#line 887 "misc.c"
+ _tmp9_ = b != NULL;
+#line 895 "misc.c"
} else {
#line 105 "/home/jens/Source/shotwell/src/util/misc.vala"
- _tmp15_ = FALSE;
-#line 891 "misc.c"
+ _tmp9_ = FALSE;
+#line 899 "misc.c"
}
#line 105 "/home/jens/Source/shotwell/src/util/misc.vala"
- if (_tmp15_) {
-#line 105 "/home/jens/Source/shotwell/src/util/misc.vala"
- _tmp14_ = TRUE;
-#line 897 "misc.c"
- } else {
- gboolean _tmp18_ = FALSE;
- GeeSet* _tmp19_;
-#line 105 "/home/jens/Source/shotwell/src/util/misc.vala"
- _tmp19_ = a;
+ if (_tmp9_) {
#line 105 "/home/jens/Source/shotwell/src/util/misc.vala"
- if (_tmp19_ != NULL) {
+ _tmp8_ = TRUE;
#line 905 "misc.c"
- GeeSet* _tmp20_;
+ } else {
+ gboolean _tmp10_ = FALSE;
#line 105 "/home/jens/Source/shotwell/src/util/misc.vala"
- _tmp20_ = b;
+ if (a != NULL) {
#line 105 "/home/jens/Source/shotwell/src/util/misc.vala"
- _tmp18_ = _tmp20_ == NULL;
-#line 911 "misc.c"
+ _tmp10_ = b == NULL;
+#line 912 "misc.c"
} else {
#line 105 "/home/jens/Source/shotwell/src/util/misc.vala"
- _tmp18_ = FALSE;
-#line 915 "misc.c"
+ _tmp10_ = FALSE;
+#line 916 "misc.c"
}
#line 105 "/home/jens/Source/shotwell/src/util/misc.vala"
- _tmp14_ = _tmp18_;
-#line 919 "misc.c"
+ _tmp8_ = _tmp10_;
+#line 920 "misc.c"
}
#line 105 "/home/jens/Source/shotwell/src/util/misc.vala"
- if (_tmp14_) {
+ if (_tmp8_) {
#line 106 "/home/jens/Source/shotwell/src/util/misc.vala"
result = FALSE;
#line 106 "/home/jens/Source/shotwell/src/util/misc.vala"
return result;
-#line 927 "misc.c"
+#line 928 "misc.c"
}
#line 108 "/home/jens/Source/shotwell/src/util/misc.vala"
- _tmp22_ = a;
-#line 108 "/home/jens/Source/shotwell/src/util/misc.vala"
- if (_tmp22_ == NULL) {
-#line 933 "misc.c"
- GeeSet* _tmp23_;
-#line 108 "/home/jens/Source/shotwell/src/util/misc.vala"
- _tmp23_ = b;
+ if (a == NULL) {
#line 108 "/home/jens/Source/shotwell/src/util/misc.vala"
- _tmp21_ = _tmp23_ == NULL;
-#line 939 "misc.c"
+ _tmp11_ = b == NULL;
+#line 934 "misc.c"
} else {
#line 108 "/home/jens/Source/shotwell/src/util/misc.vala"
- _tmp21_ = FALSE;
-#line 943 "misc.c"
+ _tmp11_ = FALSE;
+#line 938 "misc.c"
}
#line 108 "/home/jens/Source/shotwell/src/util/misc.vala"
- if (_tmp21_) {
+ if (_tmp11_) {
#line 109 "/home/jens/Source/shotwell/src/util/misc.vala"
result = TRUE;
#line 109 "/home/jens/Source/shotwell/src/util/misc.vala"
return result;
-#line 951 "misc.c"
+#line 946 "misc.c"
}
#line 111 "/home/jens/Source/shotwell/src/util/misc.vala"
- _tmp24_ = a;
+ _tmp12_ = gee_collection_get_size (G_TYPE_CHECK_INSTANCE_CAST (a, GEE_TYPE_COLLECTION, GeeCollection));
#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 111 "/home/jens/Source/shotwell/src/util/misc.vala"
- _tmp26_ = _tmp25_;
+ _tmp13_ = _tmp12_;
#line 111 "/home/jens/Source/shotwell/src/util/misc.vala"
- _tmp27_ = b;
+ _tmp14_ = gee_collection_get_size (G_TYPE_CHECK_INSTANCE_CAST (b, GEE_TYPE_COLLECTION, GeeCollection));
#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));
+ _tmp15_ = _tmp14_;
#line 111 "/home/jens/Source/shotwell/src/util/misc.vala"
- _tmp29_ = _tmp28_;
-#line 111 "/home/jens/Source/shotwell/src/util/misc.vala"
- if (_tmp26_ != _tmp29_) {
+ if (_tmp13_ != _tmp15_) {
#line 112 "/home/jens/Source/shotwell/src/util/misc.vala"
result = FALSE;
#line 112 "/home/jens/Source/shotwell/src/util/misc.vala"
return result;
-#line 971 "misc.c"
+#line 962 "misc.c"
}
{
GeeIterator* _element_it = NULL;
- GeeSet* _tmp30_;
- GeeIterator* _tmp31_;
-#line 116 "/home/jens/Source/shotwell/src/util/misc.vala"
- _tmp30_ = a;
+ GeeIterator* _tmp16_;
#line 116 "/home/jens/Source/shotwell/src/util/misc.vala"
- _tmp31_ = gee_iterable_iterator (G_TYPE_CHECK_INSTANCE_CAST (_tmp30_, GEE_TYPE_ITERABLE, GeeIterable));
+ _tmp16_ = gee_iterable_iterator (G_TYPE_CHECK_INSTANCE_CAST (a, GEE_TYPE_ITERABLE, GeeIterable));
#line 116 "/home/jens/Source/shotwell/src/util/misc.vala"
- _element_it = _tmp31_;
+ _element_it = _tmp16_;
#line 116 "/home/jens/Source/shotwell/src/util/misc.vala"
while (TRUE) {
-#line 985 "misc.c"
- GeeIterator* _tmp32_;
- gboolean _tmp33_;
+#line 973 "misc.c"
+ GeeIterator* _tmp17_;
gchar* element = NULL;
- GeeIterator* _tmp34_;
- gpointer _tmp35_;
- GeeSet* _tmp36_;
- const gchar* _tmp37_;
- gboolean _tmp38_;
-#line 116 "/home/jens/Source/shotwell/src/util/misc.vala"
- _tmp32_ = _element_it;
+ GeeIterator* _tmp18_;
+ gpointer _tmp19_;
+ const gchar* _tmp20_;
#line 116 "/home/jens/Source/shotwell/src/util/misc.vala"
- _tmp33_ = gee_iterator_next (_tmp32_);
+ _tmp17_ = _element_it;
#line 116 "/home/jens/Source/shotwell/src/util/misc.vala"
- if (!_tmp33_) {
+ if (!gee_iterator_next (_tmp17_)) {
#line 116 "/home/jens/Source/shotwell/src/util/misc.vala"
break;
-#line 1002 "misc.c"
+#line 985 "misc.c"
}
#line 116 "/home/jens/Source/shotwell/src/util/misc.vala"
- _tmp34_ = _element_it;
+ _tmp18_ = _element_it;
#line 116 "/home/jens/Source/shotwell/src/util/misc.vala"
- _tmp35_ = gee_iterator_get (_tmp34_);
+ _tmp19_ = gee_iterator_get (_tmp18_);
#line 116 "/home/jens/Source/shotwell/src/util/misc.vala"
- element = (gchar*) _tmp35_;
-#line 117 "/home/jens/Source/shotwell/src/util/misc.vala"
- _tmp36_ = b;
+ element = (gchar*) _tmp19_;
#line 117 "/home/jens/Source/shotwell/src/util/misc.vala"
- _tmp37_ = element;
-#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_);
+ _tmp20_ = element;
#line 117 "/home/jens/Source/shotwell/src/util/misc.vala"
- if (!_tmp38_) {
+ if (!gee_collection_contains (G_TYPE_CHECK_INSTANCE_CAST (b, GEE_TYPE_COLLECTION, GeeCollection), _tmp20_)) {
#line 118 "/home/jens/Source/shotwell/src/util/misc.vala"
result = FALSE;
#line 118 "/home/jens/Source/shotwell/src/util/misc.vala"
@@ -1022,44 +1001,48 @@ gboolean equal_sets (GeeSet* a, GeeSet* b) {
_g_object_unref0 (_element_it);
#line 118 "/home/jens/Source/shotwell/src/util/misc.vala"
return result;
-#line 1026 "misc.c"
+#line 1005 "misc.c"
}
#line 116 "/home/jens/Source/shotwell/src/util/misc.vala"
_g_free0 (element);
-#line 1030 "misc.c"
+#line 1009 "misc.c"
}
#line 116 "/home/jens/Source/shotwell/src/util/misc.vala"
_g_object_unref0 (_element_it);
-#line 1034 "misc.c"
+#line 1013 "misc.c"
}
#line 121 "/home/jens/Source/shotwell/src/util/misc.vala"
result = TRUE;
#line 121 "/home/jens/Source/shotwell/src/util/misc.vala"
return result;
-#line 1040 "misc.c"
+#line 1019 "misc.c"
}
-static gpointer _g_object_ref0 (gpointer self) {
+static gpointer
+_g_object_ref0 (gpointer self)
+{
#line 157 "/home/jens/Source/shotwell/src/util/misc.vala"
return self ? g_object_ref (self) : NULL;
-#line 1047 "misc.c"
+#line 1028 "misc.c"
}
-GeeSet* intersection_of_sets (GeeSet* a, GeeSet* b, GeeSet* excluded) {
+GeeSet*
+intersection_of_sets (GeeSet* a,
+ GeeSet* b,
+ GeeSet* excluded)
+{
GeeSet* result = NULL;
gboolean _tmp0_ = FALSE;
- GeeSet* _tmp1_;
- gboolean _tmp6_ = FALSE;
- GeeSet* _tmp7_;
+ gboolean _tmp1_ = FALSE;
GeeSet* intersection = NULL;
- GeeHashSet* _tmp12_;
- GeeSet* _tmp41_ = NULL;
- GeeSet* _tmp42_;
- gint _tmp43_;
- gint _tmp44_;
- GeeSet* _tmp46_;
+ GeeHashSet* _tmp2_;
+ GeeSet* _tmp19_ = NULL;
+ GeeSet* _tmp20_;
+ gint _tmp21_;
+ gint _tmp22_;
+ GeeSet* _tmp24_;
#line 125 "/home/jens/Source/shotwell/src/util/misc.vala"
g_return_val_if_fail ((a == NULL) || GEE_IS_SET (a), NULL);
#line 125 "/home/jens/Source/shotwell/src/util/misc.vala"
@@ -1067,540 +1050,452 @@ GeeSet* intersection_of_sets (GeeSet* a, GeeSet* b, GeeSet* excluded) {
#line 125 "/home/jens/Source/shotwell/src/util/misc.vala"
g_return_val_if_fail ((excluded == NULL) || GEE_IS_SET (excluded), NULL);
#line 127 "/home/jens/Source/shotwell/src/util/misc.vala"
- _tmp1_ = a;
+ if (a != NULL) {
#line 127 "/home/jens/Source/shotwell/src/util/misc.vala"
- if (_tmp1_ != NULL) {
-#line 1074 "misc.c"
- GeeSet* _tmp2_;
-#line 127 "/home/jens/Source/shotwell/src/util/misc.vala"
- _tmp2_ = b;
-#line 127 "/home/jens/Source/shotwell/src/util/misc.vala"
- _tmp0_ = _tmp2_ == NULL;
-#line 1080 "misc.c"
+ _tmp0_ = b == NULL;
+#line 1057 "misc.c"
} else {
#line 127 "/home/jens/Source/shotwell/src/util/misc.vala"
_tmp0_ = FALSE;
-#line 1084 "misc.c"
+#line 1061 "misc.c"
}
#line 127 "/home/jens/Source/shotwell/src/util/misc.vala"
if (_tmp0_) {
-#line 1088 "misc.c"
- GeeSet* _tmp3_;
-#line 128 "/home/jens/Source/shotwell/src/util/misc.vala"
- _tmp3_ = excluded;
#line 128 "/home/jens/Source/shotwell/src/util/misc.vala"
- if (_tmp3_ != NULL) {
-#line 1094 "misc.c"
- GeeSet* _tmp4_;
- GeeSet* _tmp5_;
+ if (excluded != NULL) {
#line 129 "/home/jens/Source/shotwell/src/util/misc.vala"
- _tmp4_ = excluded;
-#line 129 "/home/jens/Source/shotwell/src/util/misc.vala"
- _tmp5_ = a;
-#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 1103 "misc.c"
+ gee_collection_add_all (G_TYPE_CHECK_INSTANCE_CAST (excluded, GEE_TYPE_COLLECTION, GeeCollection), G_TYPE_CHECK_INSTANCE_CAST (a, GEE_TYPE_COLLECTION, GeeCollection));
+#line 1069 "misc.c"
}
#line 131 "/home/jens/Source/shotwell/src/util/misc.vala"
result = NULL;
#line 131 "/home/jens/Source/shotwell/src/util/misc.vala"
return result;
-#line 1109 "misc.c"
+#line 1075 "misc.c"
}
#line 134 "/home/jens/Source/shotwell/src/util/misc.vala"
- _tmp7_ = a;
-#line 134 "/home/jens/Source/shotwell/src/util/misc.vala"
- if (_tmp7_ == NULL) {
-#line 1115 "misc.c"
- GeeSet* _tmp8_;
-#line 134 "/home/jens/Source/shotwell/src/util/misc.vala"
- _tmp8_ = b;
+ if (a == NULL) {
#line 134 "/home/jens/Source/shotwell/src/util/misc.vala"
- _tmp6_ = _tmp8_ != NULL;
-#line 1121 "misc.c"
+ _tmp1_ = b != NULL;
+#line 1081 "misc.c"
} else {
#line 134 "/home/jens/Source/shotwell/src/util/misc.vala"
- _tmp6_ = FALSE;
-#line 1125 "misc.c"
+ _tmp1_ = FALSE;
+#line 1085 "misc.c"
}
#line 134 "/home/jens/Source/shotwell/src/util/misc.vala"
- if (_tmp6_) {
-#line 1129 "misc.c"
- GeeSet* _tmp9_;
-#line 135 "/home/jens/Source/shotwell/src/util/misc.vala"
- _tmp9_ = excluded;
+ if (_tmp1_) {
#line 135 "/home/jens/Source/shotwell/src/util/misc.vala"
- if (_tmp9_ != NULL) {
-#line 1135 "misc.c"
- GeeSet* _tmp10_;
- GeeSet* _tmp11_;
-#line 136 "/home/jens/Source/shotwell/src/util/misc.vala"
- _tmp10_ = excluded;
-#line 136 "/home/jens/Source/shotwell/src/util/misc.vala"
- _tmp11_ = b;
+ if (excluded != NULL) {
#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 1144 "misc.c"
+ gee_collection_add_all (G_TYPE_CHECK_INSTANCE_CAST (excluded, GEE_TYPE_COLLECTION, GeeCollection), G_TYPE_CHECK_INSTANCE_CAST (b, GEE_TYPE_COLLECTION, GeeCollection));
+#line 1093 "misc.c"
}
#line 138 "/home/jens/Source/shotwell/src/util/misc.vala"
result = NULL;
#line 138 "/home/jens/Source/shotwell/src/util/misc.vala"
return result;
-#line 1150 "misc.c"
+#line 1099 "misc.c"
}
#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);
+ _tmp2_ = gee_hash_set_new (G_TYPE_STRING, (GBoxedCopyFunc) g_strdup, (GDestroyNotify) g_free, NULL, NULL, NULL, NULL, NULL, NULL);
#line 141 "/home/jens/Source/shotwell/src/util/misc.vala"
- intersection = G_TYPE_CHECK_INSTANCE_CAST (_tmp12_, GEE_TYPE_SET, GeeSet);
-#line 1156 "misc.c"
+ intersection = G_TYPE_CHECK_INSTANCE_CAST (_tmp2_, GEE_TYPE_SET, GeeSet);
+#line 1105 "misc.c"
{
GeeIterator* _element_it = NULL;
- GeeSet* _tmp13_;
- GeeIterator* _tmp14_;
+ GeeIterator* _tmp3_;
#line 143 "/home/jens/Source/shotwell/src/util/misc.vala"
- _tmp13_ = a;
+ _tmp3_ = gee_iterable_iterator (G_TYPE_CHECK_INSTANCE_CAST (a, GEE_TYPE_ITERABLE, GeeIterable));
#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 143 "/home/jens/Source/shotwell/src/util/misc.vala"
- _element_it = _tmp14_;
+ _element_it = _tmp3_;
#line 143 "/home/jens/Source/shotwell/src/util/misc.vala"
while (TRUE) {
-#line 1169 "misc.c"
- GeeIterator* _tmp15_;
- gboolean _tmp16_;
+#line 1115 "misc.c"
+ GeeIterator* _tmp4_;
gchar* element = NULL;
- GeeIterator* _tmp17_;
- gpointer _tmp18_;
- GeeSet* _tmp19_;
- const gchar* _tmp20_;
- gboolean _tmp21_;
-#line 143 "/home/jens/Source/shotwell/src/util/misc.vala"
- _tmp15_ = _element_it;
+ GeeIterator* _tmp5_;
+ gpointer _tmp6_;
+ const gchar* _tmp7_;
#line 143 "/home/jens/Source/shotwell/src/util/misc.vala"
- _tmp16_ = gee_iterator_next (_tmp15_);
+ _tmp4_ = _element_it;
#line 143 "/home/jens/Source/shotwell/src/util/misc.vala"
- if (!_tmp16_) {
+ if (!gee_iterator_next (_tmp4_)) {
#line 143 "/home/jens/Source/shotwell/src/util/misc.vala"
break;
-#line 1186 "misc.c"
+#line 1127 "misc.c"
}
#line 143 "/home/jens/Source/shotwell/src/util/misc.vala"
- _tmp17_ = _element_it;
+ _tmp5_ = _element_it;
#line 143 "/home/jens/Source/shotwell/src/util/misc.vala"
- _tmp18_ = gee_iterator_get (_tmp17_);
+ _tmp6_ = gee_iterator_get (_tmp5_);
#line 143 "/home/jens/Source/shotwell/src/util/misc.vala"
- element = (gchar*) _tmp18_;
-#line 144 "/home/jens/Source/shotwell/src/util/misc.vala"
- _tmp19_ = b;
-#line 144 "/home/jens/Source/shotwell/src/util/misc.vala"
- _tmp20_ = element;
+ element = (gchar*) _tmp6_;
#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_);
+ _tmp7_ = element;
#line 144 "/home/jens/Source/shotwell/src/util/misc.vala"
- if (_tmp21_) {
-#line 1202 "misc.c"
- GeeSet* _tmp22_;
- const gchar* _tmp23_;
+ if (gee_collection_contains (G_TYPE_CHECK_INSTANCE_CAST (b, GEE_TYPE_COLLECTION, GeeCollection), _tmp7_)) {
+#line 1139 "misc.c"
+ GeeSet* _tmp8_;
+ const gchar* _tmp9_;
#line 145 "/home/jens/Source/shotwell/src/util/misc.vala"
- _tmp22_ = intersection;
+ _tmp8_ = intersection;
#line 145 "/home/jens/Source/shotwell/src/util/misc.vala"
- _tmp23_ = element;
+ _tmp9_ = element;
#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 1211 "misc.c"
+ gee_collection_add (G_TYPE_CHECK_INSTANCE_CAST (_tmp8_, GEE_TYPE_COLLECTION, GeeCollection), _tmp9_);
+#line 1148 "misc.c"
} else {
- GeeSet* _tmp24_;
#line 146 "/home/jens/Source/shotwell/src/util/misc.vala"
- _tmp24_ = excluded;
-#line 146 "/home/jens/Source/shotwell/src/util/misc.vala"
- if (_tmp24_ != NULL) {
-#line 1218 "misc.c"
- GeeSet* _tmp25_;
- const gchar* _tmp26_;
-#line 147 "/home/jens/Source/shotwell/src/util/misc.vala"
- _tmp25_ = excluded;
+ if (excluded != NULL) {
+#line 1152 "misc.c"
+ const gchar* _tmp10_;
#line 147 "/home/jens/Source/shotwell/src/util/misc.vala"
- _tmp26_ = element;
+ _tmp10_ = element;
#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 1227 "misc.c"
+ gee_collection_add (G_TYPE_CHECK_INSTANCE_CAST (excluded, GEE_TYPE_COLLECTION, GeeCollection), _tmp10_);
+#line 1158 "misc.c"
}
}
#line 143 "/home/jens/Source/shotwell/src/util/misc.vala"
_g_free0 (element);
-#line 1232 "misc.c"
+#line 1163 "misc.c"
}
#line 143 "/home/jens/Source/shotwell/src/util/misc.vala"
_g_object_unref0 (_element_it);
-#line 1236 "misc.c"
+#line 1167 "misc.c"
}
{
GeeIterator* _element_it = NULL;
- GeeSet* _tmp27_;
- GeeIterator* _tmp28_;
+ GeeIterator* _tmp11_;
#line 150 "/home/jens/Source/shotwell/src/util/misc.vala"
- _tmp27_ = b;
+ _tmp11_ = gee_iterable_iterator (G_TYPE_CHECK_INSTANCE_CAST (b, GEE_TYPE_ITERABLE, GeeIterable));
#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 150 "/home/jens/Source/shotwell/src/util/misc.vala"
- _element_it = _tmp28_;
+ _element_it = _tmp11_;
#line 150 "/home/jens/Source/shotwell/src/util/misc.vala"
while (TRUE) {
-#line 1250 "misc.c"
- GeeIterator* _tmp29_;
- gboolean _tmp30_;
+#line 1178 "misc.c"
+ GeeIterator* _tmp12_;
gchar* element = NULL;
- GeeIterator* _tmp31_;
- gpointer _tmp32_;
- GeeSet* _tmp33_;
- const gchar* _tmp34_;
- gboolean _tmp35_;
-#line 150 "/home/jens/Source/shotwell/src/util/misc.vala"
- _tmp29_ = _element_it;
+ GeeIterator* _tmp13_;
+ gpointer _tmp14_;
+ const gchar* _tmp15_;
#line 150 "/home/jens/Source/shotwell/src/util/misc.vala"
- _tmp30_ = gee_iterator_next (_tmp29_);
+ _tmp12_ = _element_it;
#line 150 "/home/jens/Source/shotwell/src/util/misc.vala"
- if (!_tmp30_) {
+ if (!gee_iterator_next (_tmp12_)) {
#line 150 "/home/jens/Source/shotwell/src/util/misc.vala"
break;
-#line 1267 "misc.c"
+#line 1190 "misc.c"
}
#line 150 "/home/jens/Source/shotwell/src/util/misc.vala"
- _tmp31_ = _element_it;
+ _tmp13_ = _element_it;
#line 150 "/home/jens/Source/shotwell/src/util/misc.vala"
- _tmp32_ = gee_iterator_get (_tmp31_);
+ _tmp14_ = gee_iterator_get (_tmp13_);
#line 150 "/home/jens/Source/shotwell/src/util/misc.vala"
- element = (gchar*) _tmp32_;
+ element = (gchar*) _tmp14_;
#line 151 "/home/jens/Source/shotwell/src/util/misc.vala"
- _tmp33_ = a;
+ _tmp15_ = element;
#line 151 "/home/jens/Source/shotwell/src/util/misc.vala"
- _tmp34_ = element;
-#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 151 "/home/jens/Source/shotwell/src/util/misc.vala"
- if (_tmp35_) {
-#line 1283 "misc.c"
- GeeSet* _tmp36_;
- const gchar* _tmp37_;
+ if (gee_collection_contains (G_TYPE_CHECK_INSTANCE_CAST (a, GEE_TYPE_COLLECTION, GeeCollection), _tmp15_)) {
+#line 1202 "misc.c"
+ GeeSet* _tmp16_;
+ const gchar* _tmp17_;
#line 152 "/home/jens/Source/shotwell/src/util/misc.vala"
- _tmp36_ = intersection;
+ _tmp16_ = intersection;
#line 152 "/home/jens/Source/shotwell/src/util/misc.vala"
- _tmp37_ = element;
+ _tmp17_ = element;
#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 1292 "misc.c"
+ gee_collection_add (G_TYPE_CHECK_INSTANCE_CAST (_tmp16_, GEE_TYPE_COLLECTION, GeeCollection), _tmp17_);
+#line 1211 "misc.c"
} else {
- GeeSet* _tmp38_;
-#line 153 "/home/jens/Source/shotwell/src/util/misc.vala"
- _tmp38_ = excluded;
#line 153 "/home/jens/Source/shotwell/src/util/misc.vala"
- if (_tmp38_ != NULL) {
-#line 1299 "misc.c"
- GeeSet* _tmp39_;
- const gchar* _tmp40_;
-#line 154 "/home/jens/Source/shotwell/src/util/misc.vala"
- _tmp39_ = excluded;
+ if (excluded != NULL) {
+#line 1215 "misc.c"
+ const gchar* _tmp18_;
#line 154 "/home/jens/Source/shotwell/src/util/misc.vala"
- _tmp40_ = element;
+ _tmp18_ = element;
#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 1308 "misc.c"
+ gee_collection_add (G_TYPE_CHECK_INSTANCE_CAST (excluded, GEE_TYPE_COLLECTION, GeeCollection), _tmp18_);
+#line 1221 "misc.c"
}
}
#line 150 "/home/jens/Source/shotwell/src/util/misc.vala"
_g_free0 (element);
-#line 1313 "misc.c"
+#line 1226 "misc.c"
}
#line 150 "/home/jens/Source/shotwell/src/util/misc.vala"
_g_object_unref0 (_element_it);
-#line 1317 "misc.c"
+#line 1230 "misc.c"
}
#line 157 "/home/jens/Source/shotwell/src/util/misc.vala"
- _tmp42_ = intersection;
+ _tmp20_ = intersection;
#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));
+ _tmp21_ = gee_collection_get_size (G_TYPE_CHECK_INSTANCE_CAST (_tmp20_, GEE_TYPE_COLLECTION, GeeCollection));
#line 157 "/home/jens/Source/shotwell/src/util/misc.vala"
- _tmp44_ = _tmp43_;
+ _tmp22_ = _tmp21_;
#line 157 "/home/jens/Source/shotwell/src/util/misc.vala"
- if (_tmp44_ > 0) {
-#line 1327 "misc.c"
- GeeSet* _tmp45_;
+ if (_tmp22_ > 0) {
+#line 1240 "misc.c"
+ GeeSet* _tmp23_;
#line 157 "/home/jens/Source/shotwell/src/util/misc.vala"
- _tmp45_ = intersection;
+ _tmp23_ = intersection;
#line 157 "/home/jens/Source/shotwell/src/util/misc.vala"
- _tmp41_ = _tmp45_;
-#line 1333 "misc.c"
+ _tmp19_ = _tmp23_;
+#line 1246 "misc.c"
} else {
#line 157 "/home/jens/Source/shotwell/src/util/misc.vala"
- _tmp41_ = NULL;
-#line 1337 "misc.c"
+ _tmp19_ = NULL;
+#line 1250 "misc.c"
}
#line 157 "/home/jens/Source/shotwell/src/util/misc.vala"
- _tmp46_ = _g_object_ref0 (_tmp41_);
+ _tmp24_ = _g_object_ref0 (_tmp19_);
#line 157 "/home/jens/Source/shotwell/src/util/misc.vala"
- result = _tmp46_;
+ result = _tmp24_;
#line 157 "/home/jens/Source/shotwell/src/util/misc.vala"
_g_object_unref0 (intersection);
#line 157 "/home/jens/Source/shotwell/src/util/misc.vala"
return result;
-#line 1347 "misc.c"
+#line 1260 "misc.c"
}
-guchar* serialize_photo_ids (GeeCollection* photos, int* result_length1) {
+guchar*
+serialize_photo_ids (GeeCollection* photos,
+ int* result_length1)
+{
guchar* result = NULL;
gint64* ids = NULL;
- GeeCollection* _tmp0_;
+ gint _tmp0_;
gint _tmp1_;
- gint _tmp2_;
- gint64* _tmp3_;
+ gint64* _tmp2_;
gint ids_length1;
gint _ids_size_;
gint ctr = 0;
gsize bytes = 0UL;
- GeeCollection* _tmp16_;
- gint _tmp17_;
- gint _tmp18_;
+ gint _tmp13_;
+ gint _tmp14_;
guchar* serialized = NULL;
- guchar* _tmp19_;
+ guchar* _tmp15_;
gint serialized_length1;
gint _serialized_size_;
- gint64* _tmp20_;
- gint _tmp20__length1;
- guchar* _tmp21_;
- gint _tmp21__length1;
+ gint64* _tmp16_;
+ gint _tmp16__length1;
+ guchar* _tmp17_;
+ gint _tmp17__length1;
#line 160 "/home/jens/Source/shotwell/src/util/misc.vala"
g_return_val_if_fail (GEE_IS_COLLECTION (photos), NULL);
#line 161 "/home/jens/Source/shotwell/src/util/misc.vala"
- _tmp0_ = photos;
+ _tmp0_ = gee_collection_get_size (photos);
#line 161 "/home/jens/Source/shotwell/src/util/misc.vala"
- _tmp1_ = gee_collection_get_size (_tmp0_);
+ _tmp1_ = _tmp0_;
#line 161 "/home/jens/Source/shotwell/src/util/misc.vala"
- _tmp2_ = _tmp1_;
+ _tmp2_ = g_new0 (gint64, _tmp1_);
#line 161 "/home/jens/Source/shotwell/src/util/misc.vala"
- _tmp3_ = g_new0 (gint64, _tmp2_);
+ ids = _tmp2_;
#line 161 "/home/jens/Source/shotwell/src/util/misc.vala"
- ids = _tmp3_;
-#line 161 "/home/jens/Source/shotwell/src/util/misc.vala"
- ids_length1 = _tmp2_;
+ ids_length1 = _tmp1_;
#line 161 "/home/jens/Source/shotwell/src/util/misc.vala"
_ids_size_ = ids_length1;
#line 162 "/home/jens/Source/shotwell/src/util/misc.vala"
ctr = 0;
-#line 1391 "misc.c"
+#line 1303 "misc.c"
{
GeeIterator* _photo_it = NULL;
- GeeCollection* _tmp4_;
- GeeIterator* _tmp5_;
+ GeeIterator* _tmp3_;
#line 163 "/home/jens/Source/shotwell/src/util/misc.vala"
- _tmp4_ = photos;
+ _tmp3_ = gee_iterable_iterator (G_TYPE_CHECK_INSTANCE_CAST (photos, GEE_TYPE_ITERABLE, GeeIterable));
#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 163 "/home/jens/Source/shotwell/src/util/misc.vala"
- _photo_it = _tmp5_;
+ _photo_it = _tmp3_;
#line 163 "/home/jens/Source/shotwell/src/util/misc.vala"
while (TRUE) {
-#line 1404 "misc.c"
- GeeIterator* _tmp6_;
- gboolean _tmp7_;
+#line 1313 "misc.c"
+ GeeIterator* _tmp4_;
Photo* photo = NULL;
- GeeIterator* _tmp8_;
- gpointer _tmp9_;
- gint64* _tmp10_;
- gint _tmp10__length1;
- gint _tmp11_;
- Photo* _tmp12_;
- PhotoID _tmp13_ = {0};
- gint64 _tmp14_;
- gint64 _tmp15_;
-#line 163 "/home/jens/Source/shotwell/src/util/misc.vala"
- _tmp6_ = _photo_it;
+ GeeIterator* _tmp5_;
+ gpointer _tmp6_;
+ gint64* _tmp7_;
+ gint _tmp7__length1;
+ gint _tmp8_;
+ Photo* _tmp9_;
+ PhotoID _tmp10_ = {0};
+ gint64 _tmp11_;
+ gint64 _tmp12_;
#line 163 "/home/jens/Source/shotwell/src/util/misc.vala"
- _tmp7_ = gee_iterator_next (_tmp6_);
+ _tmp4_ = _photo_it;
#line 163 "/home/jens/Source/shotwell/src/util/misc.vala"
- if (!_tmp7_) {
+ if (!gee_iterator_next (_tmp4_)) {
#line 163 "/home/jens/Source/shotwell/src/util/misc.vala"
break;
-#line 1425 "misc.c"
+#line 1331 "misc.c"
}
#line 163 "/home/jens/Source/shotwell/src/util/misc.vala"
- _tmp8_ = _photo_it;
+ _tmp5_ = _photo_it;
#line 163 "/home/jens/Source/shotwell/src/util/misc.vala"
- _tmp9_ = gee_iterator_get (_tmp8_);
+ _tmp6_ = gee_iterator_get (_tmp5_);
#line 163 "/home/jens/Source/shotwell/src/util/misc.vala"
- photo = (Photo*) _tmp9_;
+ photo = (Photo*) _tmp6_;
#line 164 "/home/jens/Source/shotwell/src/util/misc.vala"
- _tmp10_ = ids;
+ _tmp7_ = ids;
#line 164 "/home/jens/Source/shotwell/src/util/misc.vala"
- _tmp10__length1 = ids_length1;
+ _tmp7__length1 = ids_length1;
#line 164 "/home/jens/Source/shotwell/src/util/misc.vala"
- _tmp11_ = ctr;
+ _tmp8_ = ctr;
#line 164 "/home/jens/Source/shotwell/src/util/misc.vala"
- ctr = _tmp11_ + 1;
+ ctr = _tmp8_ + 1;
#line 164 "/home/jens/Source/shotwell/src/util/misc.vala"
- _tmp12_ = photo;
+ _tmp9_ = photo;
#line 164 "/home/jens/Source/shotwell/src/util/misc.vala"
- photo_get_photo_id (_tmp12_, &_tmp13_);
+ photo_get_photo_id (_tmp9_, &_tmp10_);
#line 164 "/home/jens/Source/shotwell/src/util/misc.vala"
- _tmp14_ = _tmp13_.id;
+ _tmp11_ = _tmp10_.id;
#line 164 "/home/jens/Source/shotwell/src/util/misc.vala"
- _tmp10_[_tmp11_] = _tmp14_;
+ _tmp7_[_tmp8_] = _tmp11_;
#line 164 "/home/jens/Source/shotwell/src/util/misc.vala"
- _tmp15_ = _tmp10_[_tmp11_];
+ _tmp12_ = _tmp7_[_tmp8_];
#line 163 "/home/jens/Source/shotwell/src/util/misc.vala"
_g_object_unref0 (photo);
-#line 1453 "misc.c"
+#line 1359 "misc.c"
}
#line 163 "/home/jens/Source/shotwell/src/util/misc.vala"
_g_object_unref0 (_photo_it);
-#line 1457 "misc.c"
+#line 1363 "misc.c"
}
#line 166 "/home/jens/Source/shotwell/src/util/misc.vala"
- _tmp16_ = photos;
+ _tmp13_ = gee_collection_get_size (photos);
#line 166 "/home/jens/Source/shotwell/src/util/misc.vala"
- _tmp17_ = gee_collection_get_size (_tmp16_);
+ _tmp14_ = _tmp13_;
#line 166 "/home/jens/Source/shotwell/src/util/misc.vala"
- _tmp18_ = _tmp17_;
-#line 166 "/home/jens/Source/shotwell/src/util/misc.vala"
- bytes = (gsize) (_tmp18_ * sizeof (gint64));
+ bytes = (gsize) (_tmp14_ * sizeof (gint64));
#line 167 "/home/jens/Source/shotwell/src/util/misc.vala"
- _tmp19_ = g_new0 (guchar, bytes);
+ _tmp15_ = g_new0 (guchar, bytes);
#line 167 "/home/jens/Source/shotwell/src/util/misc.vala"
- serialized = _tmp19_;
+ serialized = _tmp15_;
#line 167 "/home/jens/Source/shotwell/src/util/misc.vala"
serialized_length1 = bytes;
#line 167 "/home/jens/Source/shotwell/src/util/misc.vala"
_serialized_size_ = serialized_length1;
#line 168 "/home/jens/Source/shotwell/src/util/misc.vala"
- _tmp20_ = ids;
+ _tmp16_ = ids;
#line 168 "/home/jens/Source/shotwell/src/util/misc.vala"
- _tmp20__length1 = ids_length1;
+ _tmp16__length1 = ids_length1;
#line 168 "/home/jens/Source/shotwell/src/util/misc.vala"
- memcpy (serialized, _tmp20_, bytes);
+ memcpy (serialized, _tmp16_, bytes);
#line 170 "/home/jens/Source/shotwell/src/util/misc.vala"
- _tmp21_ = serialized;
+ _tmp17_ = serialized;
#line 170 "/home/jens/Source/shotwell/src/util/misc.vala"
- _tmp21__length1 = serialized_length1;
+ _tmp17__length1 = serialized_length1;
#line 170 "/home/jens/Source/shotwell/src/util/misc.vala"
if (result_length1) {
#line 170 "/home/jens/Source/shotwell/src/util/misc.vala"
- *result_length1 = _tmp21__length1;
-#line 1489 "misc.c"
+ *result_length1 = _tmp17__length1;
+#line 1393 "misc.c"
}
#line 170 "/home/jens/Source/shotwell/src/util/misc.vala"
- result = _tmp21_;
+ result = _tmp17_;
#line 170 "/home/jens/Source/shotwell/src/util/misc.vala"
ids = (g_free (ids), NULL);
#line 170 "/home/jens/Source/shotwell/src/util/misc.vala"
return result;
-#line 1497 "misc.c"
+#line 1401 "misc.c"
}
-GeeList* unserialize_photo_ids (guchar* serialized, gint size) {
+GeeList*
+unserialize_photo_ids (guchar* serialized,
+ gint size)
+{
GeeList* result = NULL;
gsize count = 0UL;
- gint _tmp0_;
- gboolean _tmp1_ = FALSE;
- gsize _tmp2_;
+ gboolean _tmp0_ = FALSE;
+ gsize _tmp1_;
gint64* ids = NULL;
- gsize _tmp4_;
- gint64* _tmp5_;
+ gsize _tmp2_;
+ gint64* _tmp3_;
gint ids_length1;
gint _ids_size_;
+ gint64* _tmp4_;
+ gint _tmp4__length1;
+ GeeArrayList* list = NULL;
+ GeeArrayList* _tmp5_;
gint64* _tmp6_;
gint _tmp6__length1;
- guchar* _tmp7_;
- gint _tmp8_;
- GeeArrayList* list = NULL;
- GeeArrayList* _tmp9_;
- gint64* _tmp10_;
- gint _tmp10__length1;
#line 174 "/home/jens/Source/shotwell/src/util/misc.vala"
- _tmp0_ = size;
-#line 174 "/home/jens/Source/shotwell/src/util/misc.vala"
- count = (gsize) (_tmp0_ / sizeof (gint64));
+ count = (gsize) (size / sizeof (gint64));
#line 175 "/home/jens/Source/shotwell/src/util/misc.vala"
- _tmp2_ = count;
+ _tmp1_ = count;
#line 175 "/home/jens/Source/shotwell/src/util/misc.vala"
- if (_tmp2_ <= ((gsize) 0)) {
+ if (_tmp1_ <= ((gsize) 0)) {
#line 175 "/home/jens/Source/shotwell/src/util/misc.vala"
- _tmp1_ = TRUE;
-#line 1530 "misc.c"
+ _tmp0_ = TRUE;
+#line 1432 "misc.c"
} else {
- guchar* _tmp3_;
#line 175 "/home/jens/Source/shotwell/src/util/misc.vala"
- _tmp3_ = serialized;
-#line 175 "/home/jens/Source/shotwell/src/util/misc.vala"
- _tmp1_ = _tmp3_ == NULL;
-#line 1537 "misc.c"
+ _tmp0_ = serialized == NULL;
+#line 1436 "misc.c"
}
#line 175 "/home/jens/Source/shotwell/src/util/misc.vala"
- if (_tmp1_) {
+ if (_tmp0_) {
#line 176 "/home/jens/Source/shotwell/src/util/misc.vala"
result = NULL;
#line 176 "/home/jens/Source/shotwell/src/util/misc.vala"
return result;
-#line 1545 "misc.c"
+#line 1444 "misc.c"
}
#line 178 "/home/jens/Source/shotwell/src/util/misc.vala"
- _tmp4_ = count;
+ _tmp2_ = count;
#line 178 "/home/jens/Source/shotwell/src/util/misc.vala"
- _tmp5_ = g_new0 (gint64, _tmp4_);
+ _tmp3_ = g_new0 (gint64, _tmp2_);
#line 178 "/home/jens/Source/shotwell/src/util/misc.vala"
- ids = _tmp5_;
+ ids = _tmp3_;
#line 178 "/home/jens/Source/shotwell/src/util/misc.vala"
- ids_length1 = _tmp4_;
+ ids_length1 = _tmp2_;
#line 178 "/home/jens/Source/shotwell/src/util/misc.vala"
_ids_size_ = ids_length1;
#line 179 "/home/jens/Source/shotwell/src/util/misc.vala"
- _tmp6_ = ids;
-#line 179 "/home/jens/Source/shotwell/src/util/misc.vala"
- _tmp6__length1 = ids_length1;
+ _tmp4_ = ids;
#line 179 "/home/jens/Source/shotwell/src/util/misc.vala"
- _tmp7_ = serialized;
+ _tmp4__length1 = ids_length1;
#line 179 "/home/jens/Source/shotwell/src/util/misc.vala"
- _tmp8_ = size;
-#line 179 "/home/jens/Source/shotwell/src/util/misc.vala"
- memcpy (_tmp6_, _tmp7_, (gsize) _tmp8_);
+ memcpy (_tmp4_, serialized, (gsize) size);
#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);
+ _tmp5_ = gee_array_list_new (TYPE_PHOTO_ID, (GBoxedCopyFunc) photo_id_dup, (GDestroyNotify) photo_id_free, NULL, NULL, NULL);
#line 181 "/home/jens/Source/shotwell/src/util/misc.vala"
- list = _tmp9_;
+ list = _tmp5_;
#line 182 "/home/jens/Source/shotwell/src/util/misc.vala"
- _tmp10_ = ids;
+ _tmp6_ = ids;
#line 182 "/home/jens/Source/shotwell/src/util/misc.vala"
- _tmp10__length1 = ids_length1;
-#line 1575 "misc.c"
+ _tmp6__length1 = ids_length1;
+#line 1470 "misc.c"
{
gint64* id_collection = NULL;
gint id_collection_length1 = 0;
gint _id_collection_size_ = 0;
gint id_it = 0;
#line 182 "/home/jens/Source/shotwell/src/util/misc.vala"
- id_collection = _tmp10_;
+ id_collection = _tmp6_;
#line 182 "/home/jens/Source/shotwell/src/util/misc.vala"
- id_collection_length1 = _tmp10__length1;
+ id_collection_length1 = _tmp6__length1;
#line 182 "/home/jens/Source/shotwell/src/util/misc.vala"
- for (id_it = 0; id_it < _tmp10__length1; id_it = id_it + 1) {
-#line 1587 "misc.c"
+ for (id_it = 0; id_it < _tmp6__length1; id_it = id_it + 1) {
+#line 1482 "misc.c"
gint64 id = 0LL;
#line 182 "/home/jens/Source/shotwell/src/util/misc.vala"
id = id_collection[id_it];
-#line 1591 "misc.c"
+#line 1486 "misc.c"
{
- GeeArrayList* _tmp11_;
- gint64 _tmp12_;
- PhotoID _tmp13_ = {0};
+ GeeArrayList* _tmp7_;
+ gint64 _tmp8_;
+ PhotoID _tmp9_ = {0};
#line 183 "/home/jens/Source/shotwell/src/util/misc.vala"
- _tmp11_ = list;
+ _tmp7_ = list;
#line 183 "/home/jens/Source/shotwell/src/util/misc.vala"
- _tmp12_ = id;
+ _tmp8_ = id;
#line 183 "/home/jens/Source/shotwell/src/util/misc.vala"
- photo_id_init (&_tmp13_, _tmp12_);
+ photo_id_init (&_tmp9_, _tmp8_);
#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 1604 "misc.c"
+ gee_abstract_collection_add (G_TYPE_CHECK_INSTANCE_CAST (_tmp7_, GEE_TYPE_ABSTRACT_COLLECTION, GeeAbstractCollection), &_tmp9_);
+#line 1499 "misc.c"
}
}
}
@@ -1610,301 +1505,280 @@ GeeList* unserialize_photo_ids (guchar* serialized, gint size) {
ids = (g_free (ids), NULL);
#line 185 "/home/jens/Source/shotwell/src/util/misc.vala"
return result;
-#line 1614 "misc.c"
+#line 1509 "misc.c"
}
-guchar* serialize_media_sources (GeeCollection* media, int* result_length1) {
+guchar*
+serialize_media_sources (GeeCollection* media,
+ int* result_length1)
+{
guchar* result = NULL;
GdkAtom* atoms = NULL;
- GeeCollection* _tmp0_;
+ gint _tmp0_;
gint _tmp1_;
- gint _tmp2_;
- GdkAtom* _tmp3_;
+ GdkAtom* _tmp2_;
gint atoms_length1;
gint _atoms_size_;
gint ctr = 0;
gsize bytes = 0UL;
- GeeCollection* _tmp17_;
- gint _tmp18_;
- gint _tmp19_;
+ gint _tmp13_;
+ gint _tmp14_;
guchar* serialized = NULL;
- guchar* _tmp20_;
+ guchar* _tmp15_;
gint serialized_length1;
gint _serialized_size_;
- GdkAtom* _tmp21_;
- gint _tmp21__length1;
- guchar* _tmp22_;
- gint _tmp22__length1;
+ GdkAtom* _tmp16_;
+ gint _tmp16__length1;
+ guchar* _tmp17_;
+ gint _tmp17__length1;
#line 188 "/home/jens/Source/shotwell/src/util/misc.vala"
g_return_val_if_fail (GEE_IS_COLLECTION (media), NULL);
#line 189 "/home/jens/Source/shotwell/src/util/misc.vala"
- _tmp0_ = media;
+ _tmp0_ = gee_collection_get_size (media);
#line 189 "/home/jens/Source/shotwell/src/util/misc.vala"
- _tmp1_ = gee_collection_get_size (_tmp0_);
+ _tmp1_ = _tmp0_;
#line 189 "/home/jens/Source/shotwell/src/util/misc.vala"
- _tmp2_ = _tmp1_;
+ _tmp2_ = g_new0 (GdkAtom, _tmp1_);
#line 189 "/home/jens/Source/shotwell/src/util/misc.vala"
- _tmp3_ = g_new0 (GdkAtom, _tmp2_);
+ atoms = _tmp2_;
#line 189 "/home/jens/Source/shotwell/src/util/misc.vala"
- atoms = _tmp3_;
-#line 189 "/home/jens/Source/shotwell/src/util/misc.vala"
- atoms_length1 = _tmp2_;
+ atoms_length1 = _tmp1_;
#line 189 "/home/jens/Source/shotwell/src/util/misc.vala"
_atoms_size_ = atoms_length1;
#line 190 "/home/jens/Source/shotwell/src/util/misc.vala"
ctr = 0;
-#line 1658 "misc.c"
+#line 1552 "misc.c"
{
GeeIterator* _current_media_it = NULL;
- GeeCollection* _tmp4_;
- GeeIterator* _tmp5_;
-#line 191 "/home/jens/Source/shotwell/src/util/misc.vala"
- _tmp4_ = media;
+ GeeIterator* _tmp3_;
#line 191 "/home/jens/Source/shotwell/src/util/misc.vala"
- _tmp5_ = gee_iterable_iterator (G_TYPE_CHECK_INSTANCE_CAST (_tmp4_, GEE_TYPE_ITERABLE, GeeIterable));
+ _tmp3_ = gee_iterable_iterator (G_TYPE_CHECK_INSTANCE_CAST (media, GEE_TYPE_ITERABLE, GeeIterable));
#line 191 "/home/jens/Source/shotwell/src/util/misc.vala"
- _current_media_it = _tmp5_;
+ _current_media_it = _tmp3_;
#line 191 "/home/jens/Source/shotwell/src/util/misc.vala"
while (TRUE) {
-#line 1671 "misc.c"
- GeeIterator* _tmp6_;
- gboolean _tmp7_;
+#line 1562 "misc.c"
+ GeeIterator* _tmp4_;
MediaSource* current_media = NULL;
- GeeIterator* _tmp8_;
- gpointer _tmp9_;
- GdkAtom* _tmp10_;
- gint _tmp10__length1;
- gint _tmp11_;
- MediaSource* _tmp12_;
- gchar* _tmp13_;
- gchar* _tmp14_;
- GdkAtom _tmp15_;
- GdkAtom _tmp16_;
-#line 191 "/home/jens/Source/shotwell/src/util/misc.vala"
- _tmp6_ = _current_media_it;
+ GeeIterator* _tmp5_;
+ gpointer _tmp6_;
+ GdkAtom* _tmp7_;
+ gint _tmp7__length1;
+ gint _tmp8_;
+ MediaSource* _tmp9_;
+ gchar* _tmp10_;
+ gchar* _tmp11_;
+ GdkAtom _tmp12_;
#line 191 "/home/jens/Source/shotwell/src/util/misc.vala"
- _tmp7_ = gee_iterator_next (_tmp6_);
+ _tmp4_ = _current_media_it;
#line 191 "/home/jens/Source/shotwell/src/util/misc.vala"
- if (!_tmp7_) {
+ if (!gee_iterator_next (_tmp4_)) {
#line 191 "/home/jens/Source/shotwell/src/util/misc.vala"
break;
-#line 1693 "misc.c"
+#line 1580 "misc.c"
}
#line 191 "/home/jens/Source/shotwell/src/util/misc.vala"
- _tmp8_ = _current_media_it;
+ _tmp5_ = _current_media_it;
#line 191 "/home/jens/Source/shotwell/src/util/misc.vala"
- _tmp9_ = gee_iterator_get (_tmp8_);
+ _tmp6_ = gee_iterator_get (_tmp5_);
#line 191 "/home/jens/Source/shotwell/src/util/misc.vala"
- current_media = (MediaSource*) _tmp9_;
-#line 192 "/home/jens/Source/shotwell/src/util/misc.vala"
- _tmp10_ = atoms;
+ current_media = (MediaSource*) _tmp6_;
#line 192 "/home/jens/Source/shotwell/src/util/misc.vala"
- _tmp10__length1 = atoms_length1;
+ _tmp7_ = atoms;
#line 192 "/home/jens/Source/shotwell/src/util/misc.vala"
- _tmp11_ = ctr;
+ _tmp7__length1 = atoms_length1;
#line 192 "/home/jens/Source/shotwell/src/util/misc.vala"
- ctr = _tmp11_ + 1;
+ _tmp8_ = ctr;
#line 192 "/home/jens/Source/shotwell/src/util/misc.vala"
- _tmp12_ = current_media;
+ ctr = _tmp8_ + 1;
#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));
+ _tmp9_ = current_media;
#line 192 "/home/jens/Source/shotwell/src/util/misc.vala"
- _tmp14_ = _tmp13_;
+ _tmp10_ = data_source_get_source_id (G_TYPE_CHECK_INSTANCE_CAST (_tmp9_, TYPE_DATA_SOURCE, DataSource));
#line 192 "/home/jens/Source/shotwell/src/util/misc.vala"
- _tmp15_ = gdk_atom_intern (_tmp14_, FALSE);
+ _tmp11_ = _tmp10_;
#line 192 "/home/jens/Source/shotwell/src/util/misc.vala"
- _tmp10_[_tmp11_] = _tmp15_;
+ _tmp7_[_tmp8_] = gdk_atom_intern (_tmp11_, FALSE);
#line 192 "/home/jens/Source/shotwell/src/util/misc.vala"
- _tmp16_ = _tmp10_[_tmp11_];
+ _tmp12_ = _tmp7_[_tmp8_];
#line 192 "/home/jens/Source/shotwell/src/util/misc.vala"
- _g_free0 (_tmp14_);
+ _g_free0 (_tmp11_);
#line 191 "/home/jens/Source/shotwell/src/util/misc.vala"
_g_object_unref0 (current_media);
-#line 1725 "misc.c"
+#line 1610 "misc.c"
}
#line 191 "/home/jens/Source/shotwell/src/util/misc.vala"
_g_object_unref0 (_current_media_it);
-#line 1729 "misc.c"
+#line 1614 "misc.c"
}
#line 194 "/home/jens/Source/shotwell/src/util/misc.vala"
- _tmp17_ = media;
-#line 194 "/home/jens/Source/shotwell/src/util/misc.vala"
- _tmp18_ = gee_collection_get_size (_tmp17_);
+ _tmp13_ = gee_collection_get_size (media);
#line 194 "/home/jens/Source/shotwell/src/util/misc.vala"
- _tmp19_ = _tmp18_;
+ _tmp14_ = _tmp13_;
#line 194 "/home/jens/Source/shotwell/src/util/misc.vala"
- bytes = (gsize) (_tmp19_ * sizeof (GdkAtom));
+ bytes = (gsize) (_tmp14_ * sizeof (GdkAtom));
#line 195 "/home/jens/Source/shotwell/src/util/misc.vala"
- _tmp20_ = g_new0 (guchar, bytes);
+ _tmp15_ = g_new0 (guchar, bytes);
#line 195 "/home/jens/Source/shotwell/src/util/misc.vala"
- serialized = _tmp20_;
+ serialized = _tmp15_;
#line 195 "/home/jens/Source/shotwell/src/util/misc.vala"
serialized_length1 = bytes;
#line 195 "/home/jens/Source/shotwell/src/util/misc.vala"
_serialized_size_ = serialized_length1;
#line 196 "/home/jens/Source/shotwell/src/util/misc.vala"
- _tmp21_ = atoms;
+ _tmp16_ = atoms;
#line 196 "/home/jens/Source/shotwell/src/util/misc.vala"
- _tmp21__length1 = atoms_length1;
+ _tmp16__length1 = atoms_length1;
#line 196 "/home/jens/Source/shotwell/src/util/misc.vala"
- memcpy (serialized, _tmp21_, bytes);
+ memcpy (serialized, _tmp16_, bytes);
#line 198 "/home/jens/Source/shotwell/src/util/misc.vala"
- _tmp22_ = serialized;
+ _tmp17_ = serialized;
#line 198 "/home/jens/Source/shotwell/src/util/misc.vala"
- _tmp22__length1 = serialized_length1;
+ _tmp17__length1 = serialized_length1;
#line 198 "/home/jens/Source/shotwell/src/util/misc.vala"
if (result_length1) {
#line 198 "/home/jens/Source/shotwell/src/util/misc.vala"
- *result_length1 = _tmp22__length1;
-#line 1761 "misc.c"
+ *result_length1 = _tmp17__length1;
+#line 1644 "misc.c"
}
#line 198 "/home/jens/Source/shotwell/src/util/misc.vala"
- result = _tmp22_;
+ result = _tmp17_;
#line 198 "/home/jens/Source/shotwell/src/util/misc.vala"
atoms = (g_free (atoms), NULL);
#line 198 "/home/jens/Source/shotwell/src/util/misc.vala"
return result;
-#line 1769 "misc.c"
+#line 1652 "misc.c"
}
-GeeList* unserialize_media_sources (guchar* serialized, gint size) {
+GeeList*
+unserialize_media_sources (guchar* serialized,
+ gint size)
+{
GeeList* result = NULL;
gsize count = 0UL;
- gint _tmp0_;
- gboolean _tmp1_ = FALSE;
- gsize _tmp2_;
+ gboolean _tmp0_ = FALSE;
+ gsize _tmp1_;
GdkAtom* atoms = NULL;
- gsize _tmp4_;
- GdkAtom* _tmp5_;
+ gsize _tmp2_;
+ GdkAtom* _tmp3_;
gint atoms_length1;
gint _atoms_size_;
+ GdkAtom* _tmp4_;
+ gint _tmp4__length1;
+ GeeArrayList* list = NULL;
+ GeeArrayList* _tmp5_;
GdkAtom* _tmp6_;
gint _tmp6__length1;
- guchar* _tmp7_;
- gint _tmp8_;
- GeeArrayList* list = NULL;
- GeeArrayList* _tmp9_;
- GdkAtom* _tmp10_;
- gint _tmp10__length1;
#line 202 "/home/jens/Source/shotwell/src/util/misc.vala"
- _tmp0_ = size;
-#line 202 "/home/jens/Source/shotwell/src/util/misc.vala"
- count = (gsize) (_tmp0_ / sizeof (GdkAtom));
+ count = (gsize) (size / sizeof (GdkAtom));
#line 203 "/home/jens/Source/shotwell/src/util/misc.vala"
- _tmp2_ = count;
+ _tmp1_ = count;
#line 203 "/home/jens/Source/shotwell/src/util/misc.vala"
- if (_tmp2_ <= ((gsize) 0)) {
+ if (_tmp1_ <= ((gsize) 0)) {
#line 203 "/home/jens/Source/shotwell/src/util/misc.vala"
- _tmp1_ = TRUE;
-#line 1802 "misc.c"
+ _tmp0_ = TRUE;
+#line 1683 "misc.c"
} else {
- guchar* _tmp3_;
-#line 203 "/home/jens/Source/shotwell/src/util/misc.vala"
- _tmp3_ = serialized;
#line 203 "/home/jens/Source/shotwell/src/util/misc.vala"
- _tmp1_ = _tmp3_ == NULL;
-#line 1809 "misc.c"
+ _tmp0_ = serialized == NULL;
+#line 1687 "misc.c"
}
#line 203 "/home/jens/Source/shotwell/src/util/misc.vala"
- if (_tmp1_) {
+ if (_tmp0_) {
#line 204 "/home/jens/Source/shotwell/src/util/misc.vala"
result = NULL;
#line 204 "/home/jens/Source/shotwell/src/util/misc.vala"
return result;
-#line 1817 "misc.c"
+#line 1695 "misc.c"
}
#line 206 "/home/jens/Source/shotwell/src/util/misc.vala"
- _tmp4_ = count;
+ _tmp2_ = count;
#line 206 "/home/jens/Source/shotwell/src/util/misc.vala"
- _tmp5_ = g_new0 (GdkAtom, _tmp4_);
+ _tmp3_ = g_new0 (GdkAtom, _tmp2_);
#line 206 "/home/jens/Source/shotwell/src/util/misc.vala"
- atoms = _tmp5_;
+ atoms = _tmp3_;
#line 206 "/home/jens/Source/shotwell/src/util/misc.vala"
- atoms_length1 = _tmp4_;
+ atoms_length1 = _tmp2_;
#line 206 "/home/jens/Source/shotwell/src/util/misc.vala"
_atoms_size_ = atoms_length1;
#line 207 "/home/jens/Source/shotwell/src/util/misc.vala"
- _tmp6_ = atoms;
-#line 207 "/home/jens/Source/shotwell/src/util/misc.vala"
- _tmp6__length1 = atoms_length1;
-#line 207 "/home/jens/Source/shotwell/src/util/misc.vala"
- _tmp7_ = serialized;
+ _tmp4_ = atoms;
#line 207 "/home/jens/Source/shotwell/src/util/misc.vala"
- _tmp8_ = size;
+ _tmp4__length1 = atoms_length1;
#line 207 "/home/jens/Source/shotwell/src/util/misc.vala"
- memcpy (_tmp6_, _tmp7_, (gsize) _tmp8_);
+ memcpy (_tmp4_, serialized, (gsize) size);
#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);
+ _tmp5_ = gee_array_list_new (TYPE_MEDIA_SOURCE, (GBoxedCopyFunc) g_object_ref, (GDestroyNotify) g_object_unref, NULL, NULL, NULL);
#line 209 "/home/jens/Source/shotwell/src/util/misc.vala"
- list = _tmp9_;
+ list = _tmp5_;
#line 210 "/home/jens/Source/shotwell/src/util/misc.vala"
- _tmp10_ = atoms;
+ _tmp6_ = atoms;
#line 210 "/home/jens/Source/shotwell/src/util/misc.vala"
- _tmp10__length1 = atoms_length1;
-#line 1847 "misc.c"
+ _tmp6__length1 = atoms_length1;
+#line 1721 "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 210 "/home/jens/Source/shotwell/src/util/misc.vala"
- current_atom_collection = _tmp10_;
+ current_atom_collection = _tmp6_;
#line 210 "/home/jens/Source/shotwell/src/util/misc.vala"
- current_atom_collection_length1 = _tmp10__length1;
+ current_atom_collection_length1 = _tmp6__length1;
#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 1859 "misc.c"
+ for (current_atom_it = 0; current_atom_it < _tmp6__length1; current_atom_it = current_atom_it + 1) {
+#line 1733 "misc.c"
GdkAtom current_atom = 0U;
#line 210 "/home/jens/Source/shotwell/src/util/misc.vala"
current_atom = current_atom_collection[current_atom_it];
-#line 1863 "misc.c"
+#line 1737 "misc.c"
{
MediaSource* media = NULL;
- MediaCollectionRegistry* _tmp11_;
- MediaCollectionRegistry* _tmp12_;
- GdkAtom _tmp13_;
- gchar* _tmp14_;
- gchar* _tmp15_;
+ MediaCollectionRegistry* _tmp7_;
+ MediaCollectionRegistry* _tmp8_;
+ GdkAtom _tmp9_;
+ gchar* _tmp10_;
+ gchar* _tmp11_;
+ MediaSource* _tmp12_;
+ MediaSource* _tmp13_;
+ MediaSource* _tmp14_;
+ GeeArrayList* _tmp15_;
MediaSource* _tmp16_;
- MediaSource* _tmp17_;
- MediaSource* _tmp18_;
- GeeArrayList* _tmp19_;
- MediaSource* _tmp20_;
#line 211 "/home/jens/Source/shotwell/src/util/misc.vala"
- _tmp11_ = media_collection_registry_get_instance ();
+ _tmp7_ = media_collection_registry_get_instance ();
#line 211 "/home/jens/Source/shotwell/src/util/misc.vala"
- _tmp12_ = _tmp11_;
+ _tmp8_ = _tmp7_;
#line 211 "/home/jens/Source/shotwell/src/util/misc.vala"
- _tmp13_ = current_atom;
+ _tmp9_ = current_atom;
#line 211 "/home/jens/Source/shotwell/src/util/misc.vala"
- _tmp14_ = gdk_atom_name (_tmp13_);
+ _tmp10_ = gdk_atom_name (_tmp9_);
#line 211 "/home/jens/Source/shotwell/src/util/misc.vala"
- _tmp15_ = _tmp14_;
+ _tmp11_ = _tmp10_;
#line 211 "/home/jens/Source/shotwell/src/util/misc.vala"
- _tmp16_ = media_collection_registry_fetch_media (_tmp12_, _tmp15_);
+ _tmp12_ = media_collection_registry_fetch_media (_tmp8_, _tmp11_);
#line 211 "/home/jens/Source/shotwell/src/util/misc.vala"
- _tmp17_ = _tmp16_;
+ _tmp13_ = _tmp12_;
#line 211 "/home/jens/Source/shotwell/src/util/misc.vala"
- _g_free0 (_tmp15_);
+ _g_free0 (_tmp11_);
#line 211 "/home/jens/Source/shotwell/src/util/misc.vala"
- _media_collection_registry_unref0 (_tmp12_);
+ _media_collection_registry_unref0 (_tmp8_);
#line 211 "/home/jens/Source/shotwell/src/util/misc.vala"
- media = _tmp17_;
+ media = _tmp13_;
#line 212 "/home/jens/Source/shotwell/src/util/misc.vala"
- _tmp18_ = media;
+ _tmp14_ = media;
#line 212 "/home/jens/Source/shotwell/src/util/misc.vala"
- _vala_assert (_tmp18_ != NULL, "media != null");
+ _vala_assert (_tmp14_ != NULL, "media != null");
#line 213 "/home/jens/Source/shotwell/src/util/misc.vala"
- _tmp19_ = list;
+ _tmp15_ = list;
#line 213 "/home/jens/Source/shotwell/src/util/misc.vala"
- _tmp20_ = media;
+ _tmp16_ = media;
#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_);
+ gee_abstract_collection_add (G_TYPE_CHECK_INSTANCE_CAST (_tmp15_, GEE_TYPE_ABSTRACT_COLLECTION, GeeAbstractCollection), _tmp16_);
#line 210 "/home/jens/Source/shotwell/src/util/misc.vala"
_g_object_unref0 (media);
-#line 1908 "misc.c"
+#line 1782 "misc.c"
}
}
}
@@ -1914,11 +1788,14 @@ GeeList* unserialize_media_sources (guchar* serialized, gint size) {
atoms = (g_free (atoms), NULL);
#line 216 "/home/jens/Source/shotwell/src/util/misc.vala"
return result;
-#line 1918 "misc.c"
+#line 1792 "misc.c"
}
-static gchar* g_time_format (struct tm *self, const gchar* format) {
+static gchar*
+g_time_format (struct tm *self,
+ const gchar* format)
+{
gchar* result = NULL;
gchar* buffer = NULL;
gchar* _tmp0_;
@@ -1926,45 +1803,45 @@ static gchar* g_time_format (struct tm *self, const gchar* format) {
gint _buffer_size_;
gchar* _tmp1_;
gint _tmp1__length1;
- const gchar* _tmp2_;
+ gchar* _tmp2_;
+ gint _tmp2__length1;
gchar* _tmp3_;
- gint _tmp3__length1;
- gchar* _tmp4_;
-#line 2854 "/usr/share/vala-0.36/vapi/glib-2.0.vapi"
+#line 2874 "/usr/share/vala-0.40/vapi/glib-2.0.vapi"
g_return_val_if_fail (format != NULL, NULL);
-#line 2855 "/usr/share/vala-0.36/vapi/glib-2.0.vapi"
+#line 2875 "/usr/share/vala-0.40/vapi/glib-2.0.vapi"
_tmp0_ = g_new0 (gchar, 64);
-#line 2855 "/usr/share/vala-0.36/vapi/glib-2.0.vapi"
+#line 2875 "/usr/share/vala-0.40/vapi/glib-2.0.vapi"
buffer = _tmp0_;
-#line 2855 "/usr/share/vala-0.36/vapi/glib-2.0.vapi"
+#line 2875 "/usr/share/vala-0.40/vapi/glib-2.0.vapi"
buffer_length1 = 64;
-#line 2855 "/usr/share/vala-0.36/vapi/glib-2.0.vapi"
+#line 2875 "/usr/share/vala-0.40/vapi/glib-2.0.vapi"
_buffer_size_ = buffer_length1;
-#line 2856 "/usr/share/vala-0.36/vapi/glib-2.0.vapi"
+#line 2876 "/usr/share/vala-0.40/vapi/glib-2.0.vapi"
_tmp1_ = buffer;
-#line 2856 "/usr/share/vala-0.36/vapi/glib-2.0.vapi"
+#line 2876 "/usr/share/vala-0.40/vapi/glib-2.0.vapi"
_tmp1__length1 = buffer_length1;
-#line 2856 "/usr/share/vala-0.36/vapi/glib-2.0.vapi"
- _tmp2_ = format;
-#line 2856 "/usr/share/vala-0.36/vapi/glib-2.0.vapi"
- strftime (_tmp1_, _tmp1__length1, _tmp2_, &(*self));
-#line 2857 "/usr/share/vala-0.36/vapi/glib-2.0.vapi"
- _tmp3_ = buffer;
-#line 2857 "/usr/share/vala-0.36/vapi/glib-2.0.vapi"
- _tmp3__length1 = buffer_length1;
-#line 2857 "/usr/share/vala-0.36/vapi/glib-2.0.vapi"
- _tmp4_ = g_strdup ((const gchar*) _tmp3_);
-#line 2857 "/usr/share/vala-0.36/vapi/glib-2.0.vapi"
- result = _tmp4_;
-#line 2857 "/usr/share/vala-0.36/vapi/glib-2.0.vapi"
+#line 2876 "/usr/share/vala-0.40/vapi/glib-2.0.vapi"
+ strftime (_tmp1_, _tmp1__length1, format, &(*self));
+#line 2877 "/usr/share/vala-0.40/vapi/glib-2.0.vapi"
+ _tmp2_ = buffer;
+#line 2877 "/usr/share/vala-0.40/vapi/glib-2.0.vapi"
+ _tmp2__length1 = buffer_length1;
+#line 2877 "/usr/share/vala-0.40/vapi/glib-2.0.vapi"
+ _tmp3_ = g_strdup ((const gchar*) _tmp2_);
+#line 2877 "/usr/share/vala-0.40/vapi/glib-2.0.vapi"
+ result = _tmp3_;
+#line 2877 "/usr/share/vala-0.40/vapi/glib-2.0.vapi"
buffer = (g_free (buffer), NULL);
-#line 2857 "/usr/share/vala-0.36/vapi/glib-2.0.vapi"
+#line 2877 "/usr/share/vala-0.40/vapi/glib-2.0.vapi"
return result;
-#line 1964 "misc.c"
+#line 1838 "misc.c"
}
-gchar* format_local_datespan (struct tm* from_date, struct tm* to_date) {
+gchar*
+format_local_datespan (struct tm* from_date,
+ struct tm* to_date)
+{
gchar* result = NULL;
gchar* from_format = NULL;
gchar* to_format = NULL;
@@ -1996,7 +1873,7 @@ gchar* format_local_datespan (struct tm* from_date, struct tm* to_date) {
_tmp3_ = _tmp2_.tm_year;
#line 224 "/home/jens/Source/shotwell/src/util/misc.vala"
if (_tmp1_ == _tmp3_) {
-#line 2000 "misc.c"
+#line 1877 "misc.c"
gboolean _tmp4_ = FALSE;
struct tm _tmp5_;
gint _tmp6_;
@@ -2012,7 +1889,7 @@ gchar* format_local_datespan (struct tm* from_date, struct tm* to_date) {
_tmp8_ = _tmp7_.tm_mon;
#line 226 "/home/jens/Source/shotwell/src/util/misc.vala"
if (_tmp6_ == _tmp8_) {
-#line 2016 "misc.c"
+#line 1893 "misc.c"
struct tm _tmp9_;
gint _tmp10_;
struct tm _tmp11_;
@@ -2027,15 +1904,15 @@ gchar* format_local_datespan (struct tm* from_date, struct tm* to_date) {
_tmp12_ = _tmp11_.tm_mday;
#line 226 "/home/jens/Source/shotwell/src/util/misc.vala"
_tmp4_ = _tmp10_ == (_tmp12_ - 1);
-#line 2031 "misc.c"
+#line 1908 "misc.c"
} else {
#line 226 "/home/jens/Source/shotwell/src/util/misc.vala"
_tmp4_ = FALSE;
-#line 2035 "misc.c"
+#line 1912 "misc.c"
}
#line 226 "/home/jens/Source/shotwell/src/util/misc.vala"
if (_tmp4_) {
-#line 2039 "misc.c"
+#line 1916 "misc.c"
gchar* _tmp13_;
gchar* _tmp14_;
#line 228 "/home/jens/Source/shotwell/src/util/misc.vala"
@@ -2050,7 +1927,7 @@ gchar* format_local_datespan (struct tm* from_date, struct tm* to_date) {
_g_free0 (to_format);
#line 229 "/home/jens/Source/shotwell/src/util/misc.vala"
to_format = _tmp14_;
-#line 2054 "misc.c"
+#line 1931 "misc.c"
} else {
gchar* _tmp15_;
gchar* _tmp16_;
@@ -2066,7 +1943,7 @@ gchar* format_local_datespan (struct tm* from_date, struct tm* to_date) {
_g_free0 (to_format);
#line 234 "/home/jens/Source/shotwell/src/util/misc.vala"
to_format = _tmp16_;
-#line 2070 "misc.c"
+#line 1947 "misc.c"
}
} else {
gchar* _tmp17_;
@@ -2083,7 +1960,7 @@ gchar* format_local_datespan (struct tm* from_date, struct tm* to_date) {
_g_free0 (to_format);
#line 240 "/home/jens/Source/shotwell/src/util/misc.vala"
to_format = _tmp18_;
-#line 2087 "misc.c"
+#line 1964 "misc.c"
}
#line 243 "/home/jens/Source/shotwell/src/util/misc.vala"
_tmp19_ = from_format;
@@ -2119,11 +1996,13 @@ gchar* format_local_datespan (struct tm* from_date, struct tm* to_date) {
_g_free0 (from_format);
#line 243 "/home/jens/Source/shotwell/src/util/misc.vala"
return result;
-#line 2123 "misc.c"
+#line 2000 "misc.c"
}
-gchar* format_local_date (struct tm* date) {
+gchar*
+format_local_date (struct tm* date)
+{
gchar* result = NULL;
gchar* _tmp0_;
gchar* _tmp1_;
@@ -2153,50 +2032,52 @@ gchar* format_local_date (struct tm* date) {
result = _tmp5_;
#line 248 "/home/jens/Source/shotwell/src/util/misc.vala"
return result;
-#line 2157 "misc.c"
+#line 2036 "misc.c"
}
-OneShotScheduler* one_shot_scheduler_construct (GType object_type, const gchar* name, OneShotCallback callback, void* callback_target) {
+OneShotScheduler*
+one_shot_scheduler_construct (GType object_type,
+ const gchar* name,
+ OneShotCallback callback,
+ void* callback_target)
+{
OneShotScheduler* self = NULL;
- const gchar* _tmp0_;
- gchar* _tmp1_;
- OneShotCallback _tmp2_;
- void* _tmp2__target;
+ gchar* _tmp0_;
#line 258 "/home/jens/Source/shotwell/src/util/misc.vala"
g_return_val_if_fail (name != NULL, NULL);
#line 258 "/home/jens/Source/shotwell/src/util/misc.vala"
self = (OneShotScheduler*) g_type_create_instance (object_type);
#line 259 "/home/jens/Source/shotwell/src/util/misc.vala"
- _tmp0_ = name;
-#line 259 "/home/jens/Source/shotwell/src/util/misc.vala"
- _tmp1_ = g_strdup (_tmp0_);
+ _tmp0_ = g_strdup (name);
#line 259 "/home/jens/Source/shotwell/src/util/misc.vala"
_g_free0 (self->priv->name);
#line 259 "/home/jens/Source/shotwell/src/util/misc.vala"
- self->priv->name = _tmp1_;
+ self->priv->name = _tmp0_;
#line 260 "/home/jens/Source/shotwell/src/util/misc.vala"
- _tmp2_ = callback;
+ self->priv->callback = callback;
#line 260 "/home/jens/Source/shotwell/src/util/misc.vala"
- _tmp2__target = callback_target;
-#line 260 "/home/jens/Source/shotwell/src/util/misc.vala"
- self->priv->callback = _tmp2_;
-#line 260 "/home/jens/Source/shotwell/src/util/misc.vala"
- self->priv->callback_target = _tmp2__target;
+ self->priv->callback_target = callback_target;
#line 258 "/home/jens/Source/shotwell/src/util/misc.vala"
return self;
-#line 2189 "misc.c"
+#line 2064 "misc.c"
}
-OneShotScheduler* one_shot_scheduler_new (const gchar* name, OneShotCallback callback, void* callback_target) {
+OneShotScheduler*
+one_shot_scheduler_new (const gchar* name,
+ OneShotCallback callback,
+ void* callback_target)
+{
#line 258 "/home/jens/Source/shotwell/src/util/misc.vala"
return one_shot_scheduler_construct (TYPE_ONE_SHOT_SCHEDULER, name, callback, callback_target);
-#line 2196 "misc.c"
+#line 2075 "misc.c"
}
-gboolean one_shot_scheduler_is_scheduled (OneShotScheduler* self) {
+gboolean
+one_shot_scheduler_is_scheduled (OneShotScheduler* self)
+{
gboolean result = FALSE;
guint _tmp0_;
#line 271 "/home/jens/Source/shotwell/src/util/misc.vala"
@@ -2207,29 +2088,36 @@ gboolean one_shot_scheduler_is_scheduled (OneShotScheduler* self) {
result = _tmp0_ != ((guint) 0);
#line 272 "/home/jens/Source/shotwell/src/util/misc.vala"
return result;
-#line 2211 "misc.c"
+#line 2092 "misc.c"
}
-void one_shot_scheduler_at_idle (OneShotScheduler* self) {
+void
+one_shot_scheduler_at_idle (OneShotScheduler* self)
+{
#line 275 "/home/jens/Source/shotwell/src/util/misc.vala"
g_return_if_fail (IS_ONE_SHOT_SCHEDULER (self));
#line 276 "/home/jens/Source/shotwell/src/util/misc.vala"
one_shot_scheduler_at_priority_idle (self, G_PRIORITY_DEFAULT_IDLE);
-#line 2220 "misc.c"
+#line 2103 "misc.c"
}
-static gboolean _one_shot_scheduler_callback_wrapper_gsource_func (gpointer self) {
+static gboolean
+_one_shot_scheduler_callback_wrapper_gsource_func (gpointer self)
+{
gboolean result;
result = one_shot_scheduler_callback_wrapper ((OneShotScheduler*) self);
#line 281 "/home/jens/Source/shotwell/src/util/misc.vala"
return result;
-#line 2229 "misc.c"
+#line 2114 "misc.c"
}
-void one_shot_scheduler_at_priority_idle (OneShotScheduler* self, gint priority) {
+void
+one_shot_scheduler_at_priority_idle (OneShotScheduler* self,
+ gint priority)
+{
guint _tmp0_;
#line 279 "/home/jens/Source/shotwell/src/util/misc.vala"
g_return_if_fail (IS_ONE_SHOT_SCHEDULER (self));
@@ -2237,91 +2125,76 @@ void one_shot_scheduler_at_priority_idle (OneShotScheduler* self, gint priority)
_tmp0_ = self->priv->scheduled;
#line 280 "/home/jens/Source/shotwell/src/util/misc.vala"
if (_tmp0_ == ((guint) 0)) {
-#line 2241 "misc.c"
- gint _tmp1_;
- guint _tmp2_;
#line 281 "/home/jens/Source/shotwell/src/util/misc.vala"
- _tmp1_ = priority;
-#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 281 "/home/jens/Source/shotwell/src/util/misc.vala"
- self->priv->scheduled = _tmp2_;
-#line 2250 "misc.c"
+ self->priv->scheduled = g_idle_add_full (priority, _one_shot_scheduler_callback_wrapper_gsource_func, one_shot_scheduler_ref (self), one_shot_scheduler_unref);
+#line 2131 "misc.c"
}
}
-void one_shot_scheduler_after_timeout (OneShotScheduler* self, guint msec, gboolean reschedule) {
- guint _tmp0_;
- gboolean _tmp1_;
+void
+one_shot_scheduler_after_timeout (OneShotScheduler* self,
+ guint msec,
+ gboolean reschedule)
+{
#line 284 "/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"
- _tmp0_ = msec;
-#line 285 "/home/jens/Source/shotwell/src/util/misc.vala"
- _tmp1_ = reschedule;
-#line 285 "/home/jens/Source/shotwell/src/util/misc.vala"
- one_shot_scheduler_priority_after_timeout (self, G_PRIORITY_DEFAULT, _tmp0_, _tmp1_);
-#line 2266 "misc.c"
+ one_shot_scheduler_priority_after_timeout (self, G_PRIORITY_DEFAULT, msec, reschedule);
+#line 2145 "misc.c"
}
-void one_shot_scheduler_priority_after_timeout (OneShotScheduler* self, gint priority, guint msec, gboolean reschedule) {
+void
+one_shot_scheduler_priority_after_timeout (OneShotScheduler* self,
+ gint priority,
+ guint msec,
+ gboolean reschedule)
+{
gboolean _tmp0_ = FALSE;
guint _tmp1_;
- guint _tmp3_;
- gint _tmp5_;
- guint _tmp6_;
- guint _tmp7_;
+ guint _tmp2_;
#line 288 "/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"
_tmp1_ = self->priv->scheduled;
#line 289 "/home/jens/Source/shotwell/src/util/misc.vala"
if (_tmp1_ != ((guint) 0)) {
-#line 2283 "misc.c"
- gboolean _tmp2_;
-#line 289 "/home/jens/Source/shotwell/src/util/misc.vala"
- _tmp2_ = reschedule;
#line 289 "/home/jens/Source/shotwell/src/util/misc.vala"
- _tmp0_ = !_tmp2_;
-#line 2289 "misc.c"
+ _tmp0_ = !reschedule;
+#line 2166 "misc.c"
} else {
#line 289 "/home/jens/Source/shotwell/src/util/misc.vala"
_tmp0_ = FALSE;
-#line 2293 "misc.c"
+#line 2170 "misc.c"
}
#line 289 "/home/jens/Source/shotwell/src/util/misc.vala"
if (_tmp0_) {
#line 290 "/home/jens/Source/shotwell/src/util/misc.vala"
return;
-#line 2299 "misc.c"
+#line 2176 "misc.c"
}
#line 292 "/home/jens/Source/shotwell/src/util/misc.vala"
- _tmp3_ = self->priv->scheduled;
+ _tmp2_ = self->priv->scheduled;
#line 292 "/home/jens/Source/shotwell/src/util/misc.vala"
- if (_tmp3_ != ((guint) 0)) {
-#line 2305 "misc.c"
- guint _tmp4_;
+ if (_tmp2_ != ((guint) 0)) {
+#line 2182 "misc.c"
+ guint _tmp3_;
#line 293 "/home/jens/Source/shotwell/src/util/misc.vala"
- _tmp4_ = self->priv->scheduled;
+ _tmp3_ = self->priv->scheduled;
#line 293 "/home/jens/Source/shotwell/src/util/misc.vala"
- g_source_remove (_tmp4_);
-#line 2311 "misc.c"
+ g_source_remove (_tmp3_);
+#line 2188 "misc.c"
}
#line 295 "/home/jens/Source/shotwell/src/util/misc.vala"
- _tmp5_ = priority;
-#line 295 "/home/jens/Source/shotwell/src/util/misc.vala"
- _tmp6_ = msec;
-#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 295 "/home/jens/Source/shotwell/src/util/misc.vala"
- self->priv->scheduled = _tmp7_;
-#line 2321 "misc.c"
+ self->priv->scheduled = g_timeout_add_full (priority, msec, _one_shot_scheduler_callback_wrapper_gsource_func, one_shot_scheduler_ref (self), one_shot_scheduler_unref);
+#line 2192 "misc.c"
}
-void one_shot_scheduler_cancel (OneShotScheduler* self) {
+void
+one_shot_scheduler_cancel (OneShotScheduler* self)
+{
guint _tmp0_;
guint _tmp1_;
#line 298 "/home/jens/Source/shotwell/src/util/misc.vala"
@@ -2332,7 +2205,7 @@ void one_shot_scheduler_cancel (OneShotScheduler* self) {
if (_tmp0_ == ((guint) 0)) {
#line 300 "/home/jens/Source/shotwell/src/util/misc.vala"
return;
-#line 2336 "misc.c"
+#line 2209 "misc.c"
}
#line 302 "/home/jens/Source/shotwell/src/util/misc.vala"
_tmp1_ = self->priv->scheduled;
@@ -2340,11 +2213,13 @@ void one_shot_scheduler_cancel (OneShotScheduler* self) {
g_source_remove (_tmp1_);
#line 303 "/home/jens/Source/shotwell/src/util/misc.vala"
self->priv->scheduled = (guint) 0;
-#line 2344 "misc.c"
+#line 2217 "misc.c"
}
-static gboolean one_shot_scheduler_callback_wrapper (OneShotScheduler* self) {
+static gboolean
+one_shot_scheduler_callback_wrapper (OneShotScheduler* self)
+{
gboolean result = FALSE;
OneShotCallback _tmp0_;
void* _tmp0__target;
@@ -2362,108 +2237,133 @@ static gboolean one_shot_scheduler_callback_wrapper (OneShotScheduler* self) {
result = FALSE;
#line 310 "/home/jens/Source/shotwell/src/util/misc.vala"
return result;
-#line 2366 "misc.c"
+#line 2241 "misc.c"
}
-static void value_one_shot_scheduler_init (GValue* value) {
+static void
+value_one_shot_scheduler_init (GValue* value)
+{
#line 253 "/home/jens/Source/shotwell/src/util/misc.vala"
value->data[0].v_pointer = NULL;
-#line 2373 "misc.c"
+#line 2250 "misc.c"
}
-static void value_one_shot_scheduler_free_value (GValue* value) {
+static void
+value_one_shot_scheduler_free_value (GValue* value)
+{
#line 253 "/home/jens/Source/shotwell/src/util/misc.vala"
if (value->data[0].v_pointer) {
#line 253 "/home/jens/Source/shotwell/src/util/misc.vala"
one_shot_scheduler_unref (value->data[0].v_pointer);
-#line 2382 "misc.c"
+#line 2261 "misc.c"
}
}
-static void value_one_shot_scheduler_copy_value (const GValue* src_value, GValue* dest_value) {
+static void
+value_one_shot_scheduler_copy_value (const GValue* src_value,
+ GValue* dest_value)
+{
#line 253 "/home/jens/Source/shotwell/src/util/misc.vala"
if (src_value->data[0].v_pointer) {
#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 2392 "misc.c"
+#line 2274 "misc.c"
} else {
#line 253 "/home/jens/Source/shotwell/src/util/misc.vala"
dest_value->data[0].v_pointer = NULL;
-#line 2396 "misc.c"
+#line 2278 "misc.c"
}
}
-static gpointer value_one_shot_scheduler_peek_pointer (const GValue* value) {
+static gpointer
+value_one_shot_scheduler_peek_pointer (const GValue* value)
+{
#line 253 "/home/jens/Source/shotwell/src/util/misc.vala"
return value->data[0].v_pointer;
-#line 2404 "misc.c"
+#line 2288 "misc.c"
}
-static gchar* value_one_shot_scheduler_collect_value (GValue* value, guint n_collect_values, GTypeCValue* collect_values, guint collect_flags) {
+static gchar*
+value_one_shot_scheduler_collect_value (GValue* value,
+ guint n_collect_values,
+ GTypeCValue* collect_values,
+ guint collect_flags)
+{
#line 253 "/home/jens/Source/shotwell/src/util/misc.vala"
if (collect_values[0].v_pointer) {
-#line 2411 "misc.c"
+#line 2300 "misc.c"
OneShotScheduler * object;
object = collect_values[0].v_pointer;
#line 253 "/home/jens/Source/shotwell/src/util/misc.vala"
if (object->parent_instance.g_class == NULL) {
#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 2418 "misc.c"
+#line 2307 "misc.c"
} else if (!g_value_type_compatible (G_TYPE_FROM_INSTANCE (object), G_VALUE_TYPE (value))) {
#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 2422 "misc.c"
+#line 2311 "misc.c"
}
#line 253 "/home/jens/Source/shotwell/src/util/misc.vala"
value->data[0].v_pointer = one_shot_scheduler_ref (object);
-#line 2426 "misc.c"
+#line 2315 "misc.c"
} else {
#line 253 "/home/jens/Source/shotwell/src/util/misc.vala"
value->data[0].v_pointer = NULL;
-#line 2430 "misc.c"
+#line 2319 "misc.c"
}
#line 253 "/home/jens/Source/shotwell/src/util/misc.vala"
return NULL;
-#line 2434 "misc.c"
+#line 2323 "misc.c"
}
-static gchar* value_one_shot_scheduler_lcopy_value (const GValue* value, guint n_collect_values, GTypeCValue* collect_values, guint collect_flags) {
+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 253 "/home/jens/Source/shotwell/src/util/misc.vala"
if (!object_p) {
#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 2445 "misc.c"
+#line 2339 "misc.c"
}
#line 253 "/home/jens/Source/shotwell/src/util/misc.vala"
if (!value->data[0].v_pointer) {
#line 253 "/home/jens/Source/shotwell/src/util/misc.vala"
*object_p = NULL;
-#line 2451 "misc.c"
+#line 2345 "misc.c"
} else if (collect_flags & G_VALUE_NOCOPY_CONTENTS) {
#line 253 "/home/jens/Source/shotwell/src/util/misc.vala"
*object_p = value->data[0].v_pointer;
-#line 2455 "misc.c"
+#line 2349 "misc.c"
} else {
#line 253 "/home/jens/Source/shotwell/src/util/misc.vala"
*object_p = one_shot_scheduler_ref (value->data[0].v_pointer);
-#line 2459 "misc.c"
+#line 2353 "misc.c"
}
#line 253 "/home/jens/Source/shotwell/src/util/misc.vala"
return NULL;
-#line 2463 "misc.c"
+#line 2357 "misc.c"
}
-GParamSpec* param_spec_one_shot_scheduler (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags) {
+GParamSpec*
+param_spec_one_shot_scheduler (const gchar* name,
+ const gchar* nick,
+ const gchar* blurb,
+ GType object_type,
+ GParamFlags flags)
+{
ParamSpecOneShotScheduler* spec;
#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);
@@ -2473,20 +2373,25 @@ GParamSpec* param_spec_one_shot_scheduler (const gchar* name, const gchar* nick,
G_PARAM_SPEC (spec)->value_type = object_type;
#line 253 "/home/jens/Source/shotwell/src/util/misc.vala"
return G_PARAM_SPEC (spec);
-#line 2477 "misc.c"
+#line 2377 "misc.c"
}
-gpointer value_get_one_shot_scheduler (const GValue* value) {
+gpointer
+value_get_one_shot_scheduler (const GValue* value)
+{
#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 253 "/home/jens/Source/shotwell/src/util/misc.vala"
return value->data[0].v_pointer;
-#line 2486 "misc.c"
+#line 2388 "misc.c"
}
-void value_set_one_shot_scheduler (GValue* value, gpointer v_object) {
+void
+value_set_one_shot_scheduler (GValue* value,
+ gpointer v_object)
+{
OneShotScheduler * old;
#line 253 "/home/jens/Source/shotwell/src/util/misc.vala"
g_return_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, TYPE_ONE_SHOT_SCHEDULER));
@@ -2502,22 +2407,25 @@ void value_set_one_shot_scheduler (GValue* value, gpointer v_object) {
value->data[0].v_pointer = v_object;
#line 253 "/home/jens/Source/shotwell/src/util/misc.vala"
one_shot_scheduler_ref (value->data[0].v_pointer);
-#line 2506 "misc.c"
+#line 2411 "misc.c"
} else {
#line 253 "/home/jens/Source/shotwell/src/util/misc.vala"
value->data[0].v_pointer = NULL;
-#line 2510 "misc.c"
+#line 2415 "misc.c"
}
#line 253 "/home/jens/Source/shotwell/src/util/misc.vala"
if (old) {
#line 253 "/home/jens/Source/shotwell/src/util/misc.vala"
one_shot_scheduler_unref (old);
-#line 2516 "misc.c"
+#line 2421 "misc.c"
}
}
-void value_take_one_shot_scheduler (GValue* value, gpointer v_object) {
+void
+value_take_one_shot_scheduler (GValue* value,
+ gpointer v_object)
+{
OneShotScheduler * old;
#line 253 "/home/jens/Source/shotwell/src/util/misc.vala"
g_return_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, TYPE_ONE_SHOT_SCHEDULER));
@@ -2531,44 +2439,50 @@ void value_take_one_shot_scheduler (GValue* value, gpointer v_object) {
g_return_if_fail (g_value_type_compatible (G_TYPE_FROM_INSTANCE (v_object), G_VALUE_TYPE (value)));
#line 253 "/home/jens/Source/shotwell/src/util/misc.vala"
value->data[0].v_pointer = v_object;
-#line 2535 "misc.c"
+#line 2443 "misc.c"
} else {
#line 253 "/home/jens/Source/shotwell/src/util/misc.vala"
value->data[0].v_pointer = NULL;
-#line 2539 "misc.c"
+#line 2447 "misc.c"
}
#line 253 "/home/jens/Source/shotwell/src/util/misc.vala"
if (old) {
#line 253 "/home/jens/Source/shotwell/src/util/misc.vala"
one_shot_scheduler_unref (old);
-#line 2545 "misc.c"
+#line 2453 "misc.c"
}
}
-static void one_shot_scheduler_class_init (OneShotSchedulerClass * klass) {
+static void
+one_shot_scheduler_class_init (OneShotSchedulerClass * klass)
+{
#line 253 "/home/jens/Source/shotwell/src/util/misc.vala"
one_shot_scheduler_parent_class = g_type_class_peek_parent (klass);
#line 253 "/home/jens/Source/shotwell/src/util/misc.vala"
((OneShotSchedulerClass *) klass)->finalize = one_shot_scheduler_finalize;
#line 253 "/home/jens/Source/shotwell/src/util/misc.vala"
g_type_class_add_private (klass, sizeof (OneShotSchedulerPrivate));
-#line 2557 "misc.c"
+#line 2467 "misc.c"
}
-static void one_shot_scheduler_instance_init (OneShotScheduler * self) {
+static void
+one_shot_scheduler_instance_init (OneShotScheduler * self)
+{
#line 253 "/home/jens/Source/shotwell/src/util/misc.vala"
self->priv = ONE_SHOT_SCHEDULER_GET_PRIVATE (self);
#line 256 "/home/jens/Source/shotwell/src/util/misc.vala"
self->priv->scheduled = (guint) 0;
#line 253 "/home/jens/Source/shotwell/src/util/misc.vala"
self->ref_count = 1;
-#line 2568 "misc.c"
+#line 2480 "misc.c"
}
-static void one_shot_scheduler_finalize (OneShotScheduler * obj) {
+static void
+one_shot_scheduler_finalize (OneShotScheduler * obj)
+{
OneShotScheduler * self;
#line 253 "/home/jens/Source/shotwell/src/util/misc.vala"
self = G_TYPE_CHECK_INSTANCE_CAST (obj, TYPE_ONE_SHOT_SCHEDULER, OneShotScheduler);
@@ -2578,11 +2492,13 @@ static void one_shot_scheduler_finalize (OneShotScheduler * obj) {
one_shot_scheduler_cancel (self);
#line 254 "/home/jens/Source/shotwell/src/util/misc.vala"
_g_free0 (self->priv->name);
-#line 2582 "misc.c"
+#line 2496 "misc.c"
}
-GType one_shot_scheduler_get_type (void) {
+GType
+one_shot_scheduler_get_type (void)
+{
static volatile gsize one_shot_scheduler_type_id__volatile = 0;
if (g_once_init_enter (&one_shot_scheduler_type_id__volatile)) {
static const GTypeValueTable g_define_type_value_table = { value_one_shot_scheduler_init, value_one_shot_scheduler_free_value, value_one_shot_scheduler_copy_value, value_one_shot_scheduler_peek_pointer, "p", value_one_shot_scheduler_collect_value, "p", value_one_shot_scheduler_lcopy_value };
@@ -2596,18 +2512,22 @@ GType one_shot_scheduler_get_type (void) {
}
-gpointer one_shot_scheduler_ref (gpointer instance) {
+gpointer
+one_shot_scheduler_ref (gpointer instance)
+{
OneShotScheduler * self;
self = instance;
#line 253 "/home/jens/Source/shotwell/src/util/misc.vala"
g_atomic_int_inc (&self->ref_count);
#line 253 "/home/jens/Source/shotwell/src/util/misc.vala"
return instance;
-#line 2607 "misc.c"
+#line 2525 "misc.c"
}
-void one_shot_scheduler_unref (gpointer instance) {
+void
+one_shot_scheduler_unref (gpointer instance)
+{
OneShotScheduler * self;
self = instance;
#line 253 "/home/jens/Source/shotwell/src/util/misc.vala"
@@ -2616,41 +2536,45 @@ void one_shot_scheduler_unref (gpointer instance) {
ONE_SHOT_SCHEDULER_GET_CLASS (self)->finalize (self);
#line 253 "/home/jens/Source/shotwell/src/util/misc.vala"
g_type_free_instance ((GTypeInstance *) self);
-#line 2620 "misc.c"
+#line 2540 "misc.c"
}
}
-OpTimer* op_timer_construct (GType object_type, const gchar* name) {
+OpTimer*
+op_timer_construct (GType object_type,
+ const gchar* name)
+{
OpTimer* self = NULL;
- const gchar* _tmp0_;
- gchar* _tmp1_;
+ gchar* _tmp0_;
#line 322 "/home/jens/Source/shotwell/src/util/misc.vala"
g_return_val_if_fail (name != NULL, NULL);
#line 322 "/home/jens/Source/shotwell/src/util/misc.vala"
self = (OpTimer*) g_type_create_instance (object_type);
#line 323 "/home/jens/Source/shotwell/src/util/misc.vala"
- _tmp0_ = name;
-#line 323 "/home/jens/Source/shotwell/src/util/misc.vala"
- _tmp1_ = g_strdup (_tmp0_);
+ _tmp0_ = g_strdup (name);
#line 323 "/home/jens/Source/shotwell/src/util/misc.vala"
_g_free0 (self->priv->name);
#line 323 "/home/jens/Source/shotwell/src/util/misc.vala"
- self->priv->name = _tmp1_;
+ self->priv->name = _tmp0_;
#line 322 "/home/jens/Source/shotwell/src/util/misc.vala"
return self;
-#line 2643 "misc.c"
+#line 2563 "misc.c"
}
-OpTimer* op_timer_new (const gchar* name) {
+OpTimer*
+op_timer_new (const gchar* name)
+{
#line 322 "/home/jens/Source/shotwell/src/util/misc.vala"
return op_timer_construct (TYPE_OP_TIMER, name);
-#line 2650 "misc.c"
+#line 2572 "misc.c"
}
-void op_timer_start (OpTimer* self) {
+void
+op_timer_start (OpTimer* self)
+{
GTimer* _tmp0_;
#line 326 "/home/jens/Source/shotwell/src/util/misc.vala"
g_return_if_fail (IS_OP_TIMER (self));
@@ -2658,11 +2582,13 @@ void op_timer_start (OpTimer* self) {
_tmp0_ = self->priv->timer;
#line 327 "/home/jens/Source/shotwell/src/util/misc.vala"
g_timer_start (_tmp0_);
-#line 2662 "misc.c"
+#line 2586 "misc.c"
}
-void op_timer_stop (OpTimer* self) {
+void
+op_timer_stop (OpTimer* self)
+{
gdouble time = 0.0;
GTimer* _tmp0_;
gdouble _tmp1_;
@@ -2693,13 +2619,13 @@ void op_timer_stop (OpTimer* self) {
_tmp5_ = self->priv->shortest;
#line 335 "/home/jens/Source/shotwell/src/util/misc.vala"
if (_tmp4_ < _tmp5_) {
-#line 2697 "misc.c"
+#line 2623 "misc.c"
gdouble _tmp6_;
#line 336 "/home/jens/Source/shotwell/src/util/misc.vala"
_tmp6_ = time;
#line 336 "/home/jens/Source/shotwell/src/util/misc.vala"
self->priv->shortest = _tmp6_;
-#line 2703 "misc.c"
+#line 2629 "misc.c"
}
#line 338 "/home/jens/Source/shotwell/src/util/misc.vala"
_tmp7_ = time;
@@ -2707,23 +2633,25 @@ void op_timer_stop (OpTimer* self) {
_tmp8_ = self->priv->longest;
#line 338 "/home/jens/Source/shotwell/src/util/misc.vala"
if (_tmp7_ > _tmp8_) {
-#line 2711 "misc.c"
+#line 2637 "misc.c"
gdouble _tmp9_;
#line 339 "/home/jens/Source/shotwell/src/util/misc.vala"
_tmp9_ = time;
#line 339 "/home/jens/Source/shotwell/src/util/misc.vala"
self->priv->longest = _tmp9_;
-#line 2717 "misc.c"
+#line 2643 "misc.c"
}
#line 341 "/home/jens/Source/shotwell/src/util/misc.vala"
_tmp10_ = self->priv->count;
#line 341 "/home/jens/Source/shotwell/src/util/misc.vala"
self->priv->count = _tmp10_ + 1;
-#line 2723 "misc.c"
+#line 2649 "misc.c"
}
-gchar* op_timer_to_string (OpTimer* self) {
+gchar*
+op_timer_to_string (OpTimer* self)
+{
gchar* result = NULL;
glong _tmp0_;
#line 344 "/home/jens/Source/shotwell/src/util/misc.vala"
@@ -2732,7 +2660,7 @@ gchar* op_timer_to_string (OpTimer* self) {
_tmp0_ = self->priv->count;
#line 345 "/home/jens/Source/shotwell/src/util/misc.vala"
if (_tmp0_ > ((glong) 0)) {
-#line 2736 "misc.c"
+#line 2664 "misc.c"
const gchar* _tmp1_;
glong _tmp2_;
gdouble _tmp3_;
@@ -2761,7 +2689,7 @@ gchar* op_timer_to_string (OpTimer* self) {
result = _tmp8_;
#line 346 "/home/jens/Source/shotwell/src/util/misc.vala"
return result;
-#line 2765 "misc.c"
+#line 2693 "misc.c"
} else {
const gchar* _tmp9_;
gchar* _tmp10_;
@@ -2773,109 +2701,134 @@ gchar* op_timer_to_string (OpTimer* self) {
result = _tmp10_;
#line 349 "/home/jens/Source/shotwell/src/util/misc.vala"
return result;
-#line 2777 "misc.c"
+#line 2705 "misc.c"
}
}
-static void value_op_timer_init (GValue* value) {
+static void
+value_op_timer_init (GValue* value)
+{
#line 314 "/home/jens/Source/shotwell/src/util/misc.vala"
value->data[0].v_pointer = NULL;
-#line 2785 "misc.c"
+#line 2715 "misc.c"
}
-static void value_op_timer_free_value (GValue* value) {
+static void
+value_op_timer_free_value (GValue* value)
+{
#line 314 "/home/jens/Source/shotwell/src/util/misc.vala"
if (value->data[0].v_pointer) {
#line 314 "/home/jens/Source/shotwell/src/util/misc.vala"
op_timer_unref (value->data[0].v_pointer);
-#line 2794 "misc.c"
+#line 2726 "misc.c"
}
}
-static void value_op_timer_copy_value (const GValue* src_value, GValue* dest_value) {
+static void
+value_op_timer_copy_value (const GValue* src_value,
+ GValue* dest_value)
+{
#line 314 "/home/jens/Source/shotwell/src/util/misc.vala"
if (src_value->data[0].v_pointer) {
#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 2804 "misc.c"
+#line 2739 "misc.c"
} else {
#line 314 "/home/jens/Source/shotwell/src/util/misc.vala"
dest_value->data[0].v_pointer = NULL;
-#line 2808 "misc.c"
+#line 2743 "misc.c"
}
}
-static gpointer value_op_timer_peek_pointer (const GValue* value) {
+static gpointer
+value_op_timer_peek_pointer (const GValue* value)
+{
#line 314 "/home/jens/Source/shotwell/src/util/misc.vala"
return value->data[0].v_pointer;
-#line 2816 "misc.c"
+#line 2753 "misc.c"
}
-static gchar* value_op_timer_collect_value (GValue* value, guint n_collect_values, GTypeCValue* collect_values, guint collect_flags) {
+static gchar*
+value_op_timer_collect_value (GValue* value,
+ guint n_collect_values,
+ GTypeCValue* collect_values,
+ guint collect_flags)
+{
#line 314 "/home/jens/Source/shotwell/src/util/misc.vala"
if (collect_values[0].v_pointer) {
-#line 2823 "misc.c"
+#line 2765 "misc.c"
OpTimer * object;
object = collect_values[0].v_pointer;
#line 314 "/home/jens/Source/shotwell/src/util/misc.vala"
if (object->parent_instance.g_class == NULL) {
#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 2830 "misc.c"
+#line 2772 "misc.c"
} else if (!g_value_type_compatible (G_TYPE_FROM_INSTANCE (object), G_VALUE_TYPE (value))) {
#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 2834 "misc.c"
+#line 2776 "misc.c"
}
#line 314 "/home/jens/Source/shotwell/src/util/misc.vala"
value->data[0].v_pointer = op_timer_ref (object);
-#line 2838 "misc.c"
+#line 2780 "misc.c"
} else {
#line 314 "/home/jens/Source/shotwell/src/util/misc.vala"
value->data[0].v_pointer = NULL;
-#line 2842 "misc.c"
+#line 2784 "misc.c"
}
#line 314 "/home/jens/Source/shotwell/src/util/misc.vala"
return NULL;
-#line 2846 "misc.c"
+#line 2788 "misc.c"
}
-static gchar* value_op_timer_lcopy_value (const GValue* value, guint n_collect_values, GTypeCValue* collect_values, guint collect_flags) {
+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 314 "/home/jens/Source/shotwell/src/util/misc.vala"
if (!object_p) {
#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 2857 "misc.c"
+#line 2804 "misc.c"
}
#line 314 "/home/jens/Source/shotwell/src/util/misc.vala"
if (!value->data[0].v_pointer) {
#line 314 "/home/jens/Source/shotwell/src/util/misc.vala"
*object_p = NULL;
-#line 2863 "misc.c"
+#line 2810 "misc.c"
} else if (collect_flags & G_VALUE_NOCOPY_CONTENTS) {
#line 314 "/home/jens/Source/shotwell/src/util/misc.vala"
*object_p = value->data[0].v_pointer;
-#line 2867 "misc.c"
+#line 2814 "misc.c"
} else {
#line 314 "/home/jens/Source/shotwell/src/util/misc.vala"
*object_p = op_timer_ref (value->data[0].v_pointer);
-#line 2871 "misc.c"
+#line 2818 "misc.c"
}
#line 314 "/home/jens/Source/shotwell/src/util/misc.vala"
return NULL;
-#line 2875 "misc.c"
+#line 2822 "misc.c"
}
-GParamSpec* param_spec_op_timer (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags) {
+GParamSpec*
+param_spec_op_timer (const gchar* name,
+ const gchar* nick,
+ const gchar* blurb,
+ GType object_type,
+ GParamFlags flags)
+{
ParamSpecOpTimer* spec;
#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);
@@ -2885,20 +2838,25 @@ GParamSpec* param_spec_op_timer (const gchar* name, const gchar* nick, const gch
G_PARAM_SPEC (spec)->value_type = object_type;
#line 314 "/home/jens/Source/shotwell/src/util/misc.vala"
return G_PARAM_SPEC (spec);
-#line 2889 "misc.c"
+#line 2842 "misc.c"
}
-gpointer value_get_op_timer (const GValue* value) {
+gpointer
+value_get_op_timer (const GValue* value)
+{
#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 314 "/home/jens/Source/shotwell/src/util/misc.vala"
return value->data[0].v_pointer;
-#line 2898 "misc.c"
+#line 2853 "misc.c"
}
-void value_set_op_timer (GValue* value, gpointer v_object) {
+void
+value_set_op_timer (GValue* value,
+ gpointer v_object)
+{
OpTimer * old;
#line 314 "/home/jens/Source/shotwell/src/util/misc.vala"
g_return_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, TYPE_OP_TIMER));
@@ -2914,22 +2872,25 @@ void value_set_op_timer (GValue* value, gpointer v_object) {
value->data[0].v_pointer = v_object;
#line 314 "/home/jens/Source/shotwell/src/util/misc.vala"
op_timer_ref (value->data[0].v_pointer);
-#line 2918 "misc.c"
+#line 2876 "misc.c"
} else {
#line 314 "/home/jens/Source/shotwell/src/util/misc.vala"
value->data[0].v_pointer = NULL;
-#line 2922 "misc.c"
+#line 2880 "misc.c"
}
#line 314 "/home/jens/Source/shotwell/src/util/misc.vala"
if (old) {
#line 314 "/home/jens/Source/shotwell/src/util/misc.vala"
op_timer_unref (old);
-#line 2928 "misc.c"
+#line 2886 "misc.c"
}
}
-void value_take_op_timer (GValue* value, gpointer v_object) {
+void
+value_take_op_timer (GValue* value,
+ gpointer v_object)
+{
OpTimer * old;
#line 314 "/home/jens/Source/shotwell/src/util/misc.vala"
g_return_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, TYPE_OP_TIMER));
@@ -2943,33 +2904,37 @@ void value_take_op_timer (GValue* value, gpointer v_object) {
g_return_if_fail (g_value_type_compatible (G_TYPE_FROM_INSTANCE (v_object), G_VALUE_TYPE (value)));
#line 314 "/home/jens/Source/shotwell/src/util/misc.vala"
value->data[0].v_pointer = v_object;
-#line 2947 "misc.c"
+#line 2908 "misc.c"
} else {
#line 314 "/home/jens/Source/shotwell/src/util/misc.vala"
value->data[0].v_pointer = NULL;
-#line 2951 "misc.c"
+#line 2912 "misc.c"
}
#line 314 "/home/jens/Source/shotwell/src/util/misc.vala"
if (old) {
#line 314 "/home/jens/Source/shotwell/src/util/misc.vala"
op_timer_unref (old);
-#line 2957 "misc.c"
+#line 2918 "misc.c"
}
}
-static void op_timer_class_init (OpTimerClass * klass) {
+static void
+op_timer_class_init (OpTimerClass * klass)
+{
#line 314 "/home/jens/Source/shotwell/src/util/misc.vala"
op_timer_parent_class = g_type_class_peek_parent (klass);
#line 314 "/home/jens/Source/shotwell/src/util/misc.vala"
((OpTimerClass *) klass)->finalize = op_timer_finalize;
#line 314 "/home/jens/Source/shotwell/src/util/misc.vala"
g_type_class_add_private (klass, sizeof (OpTimerPrivate));
-#line 2969 "misc.c"
+#line 2932 "misc.c"
}
-static void op_timer_instance_init (OpTimer * self) {
+static void
+op_timer_instance_init (OpTimer * self)
+{
GTimer* _tmp0_;
#line 314 "/home/jens/Source/shotwell/src/util/misc.vala"
self->priv = OP_TIMER_GET_PRIVATE (self);
@@ -2987,11 +2952,13 @@ static void op_timer_instance_init (OpTimer * self) {
self->priv->longest = DBL_MIN;
#line 314 "/home/jens/Source/shotwell/src/util/misc.vala"
self->ref_count = 1;
-#line 2991 "misc.c"
+#line 2956 "misc.c"
}
-static void op_timer_finalize (OpTimer * obj) {
+static void
+op_timer_finalize (OpTimer * obj)
+{
OpTimer * self;
#line 314 "/home/jens/Source/shotwell/src/util/misc.vala"
self = G_TYPE_CHECK_INSTANCE_CAST (obj, TYPE_OP_TIMER, OpTimer);
@@ -3001,11 +2968,13 @@ static void op_timer_finalize (OpTimer * obj) {
_g_free0 (self->priv->name);
#line 316 "/home/jens/Source/shotwell/src/util/misc.vala"
_g_timer_destroy0 (self->priv->timer);
-#line 3005 "misc.c"
+#line 2972 "misc.c"
}
-GType op_timer_get_type (void) {
+GType
+op_timer_get_type (void)
+{
static volatile gsize op_timer_type_id__volatile = 0;
if (g_once_init_enter (&op_timer_type_id__volatile)) {
static const GTypeValueTable g_define_type_value_table = { value_op_timer_init, value_op_timer_free_value, value_op_timer_copy_value, value_op_timer_peek_pointer, "p", value_op_timer_collect_value, "p", value_op_timer_lcopy_value };
@@ -3019,18 +2988,22 @@ GType op_timer_get_type (void) {
}
-gpointer op_timer_ref (gpointer instance) {
+gpointer
+op_timer_ref (gpointer instance)
+{
OpTimer * self;
self = instance;
#line 314 "/home/jens/Source/shotwell/src/util/misc.vala"
g_atomic_int_inc (&self->ref_count);
#line 314 "/home/jens/Source/shotwell/src/util/misc.vala"
return instance;
-#line 3030 "misc.c"
+#line 3001 "misc.c"
}
-void op_timer_unref (gpointer instance) {
+void
+op_timer_unref (gpointer instance)
+{
OpTimer * self;
self = instance;
#line 314 "/home/jens/Source/shotwell/src/util/misc.vala"
@@ -3039,7 +3012,7 @@ void op_timer_unref (gpointer instance) {
OP_TIMER_GET_CLASS (self)->finalize (self);
#line 314 "/home/jens/Source/shotwell/src/util/misc.vala"
g_type_free_instance ((GTypeInstance *) self);
-#line 3043 "misc.c"
+#line 3016 "misc.c"
}
}
diff --git a/src/util/string.c b/src/util/string.c
index 642e9fa..0b503fb 100644
--- a/src/util/string.c
+++ b/src/util/string.c
@@ -1,4 +1,4 @@
-/* string.c generated by valac 0.36.6, the Vala compiler
+/* string.c generated by valac 0.40.4, the Vala compiler
* generated from string.vala, do not modify */
/* Copyright 2016 Software Freedom Conservancy Inc.
@@ -7,6 +7,7 @@
* (version 2.1 or later). See the COPYING file in this distribution.
*/
+
#include <glib.h>
#include <glib-object.h>
#include <stdlib.h>
@@ -30,288 +31,291 @@ typedef enum {
-gint64 g_ascii_strtoll (const gchar* str, gchar** endptr, guint num_base);
+gint64 g_ascii_strtoll (const gchar* str,
+ gchar** endptr,
+ guint num_base);
#define DEFAULT_USER_TEXT_INPUT_LENGTH 1024
gboolean is_string_empty (const gchar* s);
-gint utf8_cs_compare (void* a, void* b);
-gint utf8_ci_compare (void* a, void* b);
-gchar* uchar_array_to_string (guchar* data, int data_length1, gint length);
-guchar* string_to_uchar_array (const gchar* str, int* result_length1);
-static void _vala_array_add1 (guchar* * array, int* length, int* size, guchar value);
+gint utf8_cs_compare (void* a,
+ void* b);
+gint utf8_ci_compare (void* a,
+ void* b);
+gchar* uchar_array_to_string (guchar* data,
+ int data_length1,
+ gint length);
+guchar* string_to_uchar_array (const gchar* str,
+ int* result_length1);
+static void _vala_array_add1 (guchar* * array,
+ int* length,
+ int* size,
+ guchar value);
gchar* guarded_markup_escape_text (const gchar* plain);
-glong find_last_offset (const gchar* str, gchar c);
-gboolean is_in_ci_array (const gchar* str, gchar** strings, int strings_length1);
+glong find_last_offset (const gchar* str,
+ gchar c);
+gboolean is_in_ci_array (const gchar* str,
+ gchar** strings,
+ int strings_length1);
GType prepare_input_text_options_get_type (void) G_GNUC_CONST;
gchar* guess_convert (const gchar* text);
-gchar* prepare_input_text (const gchar* text, PrepareInputTextOptions options, gint dest_length);
-gint64 parse_int64 (const gchar* str, gint num_base);
-gboolean string_contains_char (const gchar* haystack, gunichar needle);
-gboolean string_contains_str (const gchar* haystack, const gchar* needle);
-gchar* string_sliced_at (const gchar* str, gint index);
-gchar* string_sliced_at_first_str (const gchar* haystack, const gchar* needle, gint start_index);
-gchar* string_sliced_at_last_str (const gchar* haystack, const gchar* needle, gint start_index);
-gchar* string_sliced_at_first_char (const gchar* haystack, gunichar ch, gint start_index);
-gchar* string_sliced_at_last_char (const gchar* haystack, gunichar ch, gint start_index);
+gchar* prepare_input_text (const gchar* text,
+ PrepareInputTextOptions options,
+ gint dest_length);
+gint64 parse_int64 (const gchar* str,
+ gint num_base);
+gboolean string_contains_char (const gchar* haystack,
+ gunichar needle);
+gboolean string_contains_str (const gchar* haystack,
+ const gchar* needle);
+gchar* string_sliced_at (const gchar* str,
+ gint index);
+gchar* string_sliced_at_first_str (const gchar* haystack,
+ const gchar* needle,
+ gint start_index);
+gchar* string_sliced_at_last_str (const gchar* haystack,
+ const gchar* needle,
+ gint start_index);
+gchar* string_sliced_at_first_char (const gchar* haystack,
+ gunichar ch,
+ gint start_index);
+gchar* string_sliced_at_last_char (const gchar* haystack,
+ gunichar ch,
+ gint start_index);
gchar* string_strip_leading_zeroes (const gchar* str);
gchar* string_remove_diacritics (const gchar* istring);
gchar* string_to_hex_string (const gchar* str);
guint string_collated_hash (void* ptr);
guint string_precollated_hash (void* ptr);
-gint string_collated_compare (void* a, void* b);
-gint string_precollated_compare (const gchar* astr, const gchar* akey, const gchar* bstr, const gchar* bkey);
-gboolean string_collated_equals (void* a, void* b);
-gboolean string_precollated_equals (const gchar* astr, const gchar* akey, const gchar* bstr, const gchar* bkey);
-
-
-static gchar string_get (const gchar* self, glong index) {
+gint string_collated_compare (void* a,
+ void* b);
+gint string_precollated_compare (const gchar* astr,
+ const gchar* akey,
+ const gchar* bstr,
+ const gchar* bkey);
+gboolean string_collated_equals (void* a,
+ void* b);
+gboolean string_precollated_equals (const gchar* astr,
+ const gchar* akey,
+ const gchar* bstr,
+ const gchar* bkey);
+
+
+static gchar
+string_get (const gchar* self,
+ glong index)
+{
gchar result = '\0';
- glong _tmp0_;
- gchar _tmp1_;
-#line 1110 "/usr/share/vala-0.36/vapi/glib-2.0.vapi"
+ gchar _tmp0_;
+#line 1124 "/usr/share/vala-0.40/vapi/glib-2.0.vapi"
g_return_val_if_fail (self != NULL, '\0');
-#line 1111 "/usr/share/vala-0.36/vapi/glib-2.0.vapi"
- _tmp0_ = index;
-#line 1111 "/usr/share/vala-0.36/vapi/glib-2.0.vapi"
- _tmp1_ = ((gchar*) self)[_tmp0_];
-#line 1111 "/usr/share/vala-0.36/vapi/glib-2.0.vapi"
- result = _tmp1_;
-#line 1111 "/usr/share/vala-0.36/vapi/glib-2.0.vapi"
+#line 1125 "/usr/share/vala-0.40/vapi/glib-2.0.vapi"
+ _tmp0_ = ((gchar*) self)[index];
+#line 1125 "/usr/share/vala-0.40/vapi/glib-2.0.vapi"
+ result = _tmp0_;
+#line 1125 "/usr/share/vala-0.40/vapi/glib-2.0.vapi"
return result;
-#line 81 "string.c"
+#line 117 "string.c"
}
-inline gboolean is_string_empty (const gchar* s) {
+inline gboolean
+is_string_empty (const gchar* s)
+{
gboolean result = FALSE;
gboolean _tmp0_ = FALSE;
- const gchar* _tmp1_;
#line 12 "/home/jens/Source/shotwell/src/util/string.vala"
- _tmp1_ = s;
-#line 12 "/home/jens/Source/shotwell/src/util/string.vala"
- if (_tmp1_ == NULL) {
+ if (s == NULL) {
#line 12 "/home/jens/Source/shotwell/src/util/string.vala"
_tmp0_ = TRUE;
-#line 95 "string.c"
+#line 130 "string.c"
} else {
- const gchar* _tmp2_;
- gchar _tmp3_;
-#line 12 "/home/jens/Source/shotwell/src/util/string.vala"
- _tmp2_ = s;
#line 12 "/home/jens/Source/shotwell/src/util/string.vala"
- _tmp3_ = string_get (_tmp2_, (glong) 0);
-#line 12 "/home/jens/Source/shotwell/src/util/string.vala"
- _tmp0_ = _tmp3_ == '\0';
-#line 105 "string.c"
+ _tmp0_ = string_get (s, (glong) 0) == '\0';
+#line 134 "string.c"
}
#line 12 "/home/jens/Source/shotwell/src/util/string.vala"
result = _tmp0_;
#line 12 "/home/jens/Source/shotwell/src/util/string.vala"
return result;
-#line 111 "string.c"
+#line 140 "string.c"
}
-gint utf8_cs_compare (void* a, void* b) {
+gint
+utf8_cs_compare (void* a,
+ void* b)
+{
gint result = 0;
- void* _tmp0_;
- void* _tmp1_;
- gint _tmp2_;
-#line 17 "/home/jens/Source/shotwell/src/util/string.vala"
- _tmp0_ = a;
#line 17 "/home/jens/Source/shotwell/src/util/string.vala"
- _tmp1_ = b;
-#line 17 "/home/jens/Source/shotwell/src/util/string.vala"
- _tmp2_ = g_utf8_collate ((const gchar*) _tmp0_, (const gchar*) _tmp1_);
-#line 17 "/home/jens/Source/shotwell/src/util/string.vala"
- result = _tmp2_;
+ result = g_utf8_collate ((const gchar*) a, (const gchar*) b);
#line 17 "/home/jens/Source/shotwell/src/util/string.vala"
return result;
-#line 130 "string.c"
+#line 153 "string.c"
}
-gint utf8_ci_compare (void* a, void* b) {
+gint
+utf8_ci_compare (void* a,
+ void* b)
+{
gint result = 0;
- void* _tmp0_;
+ gchar* _tmp0_;
gchar* _tmp1_;
gchar* _tmp2_;
- void* _tmp3_;
- gchar* _tmp4_;
- gchar* _tmp5_;
- gint _tmp6_;
- gint _tmp7_;
-#line 22 "/home/jens/Source/shotwell/src/util/string.vala"
- _tmp0_ = a;
-#line 22 "/home/jens/Source/shotwell/src/util/string.vala"
- _tmp1_ = g_utf8_strdown ((const gchar*) _tmp0_, (gssize) -1);
-#line 22 "/home/jens/Source/shotwell/src/util/string.vala"
- _tmp2_ = _tmp1_;
+ gchar* _tmp3_;
+ gint _tmp4_;
#line 22 "/home/jens/Source/shotwell/src/util/string.vala"
- _tmp3_ = b;
+ _tmp0_ = g_utf8_strdown ((const gchar*) a, (gssize) -1);
#line 22 "/home/jens/Source/shotwell/src/util/string.vala"
- _tmp4_ = g_utf8_strdown ((const gchar*) _tmp3_, (gssize) -1);
+ _tmp1_ = _tmp0_;
#line 22 "/home/jens/Source/shotwell/src/util/string.vala"
- _tmp5_ = _tmp4_;
+ _tmp2_ = g_utf8_strdown ((const gchar*) b, (gssize) -1);
#line 22 "/home/jens/Source/shotwell/src/util/string.vala"
- _tmp6_ = g_utf8_collate (_tmp2_, _tmp5_);
+ _tmp3_ = _tmp2_;
#line 22 "/home/jens/Source/shotwell/src/util/string.vala"
- _tmp7_ = _tmp6_;
+ _tmp4_ = g_utf8_collate (_tmp1_, _tmp3_);
#line 22 "/home/jens/Source/shotwell/src/util/string.vala"
- _g_free0 (_tmp5_);
+ _g_free0 (_tmp3_);
#line 22 "/home/jens/Source/shotwell/src/util/string.vala"
- _g_free0 (_tmp2_);
+ _g_free0 (_tmp1_);
#line 22 "/home/jens/Source/shotwell/src/util/string.vala"
- result = _tmp7_;
+ result = _tmp4_;
#line 22 "/home/jens/Source/shotwell/src/util/string.vala"
return result;
-#line 168 "string.c"
+#line 185 "string.c"
}
-gchar* uchar_array_to_string (guchar* data, int data_length1, gint length) {
+gchar*
+uchar_array_to_string (guchar* data,
+ int data_length1,
+ gint length)
+{
gchar* result = NULL;
- gint _tmp0_;
GString* builder = NULL;
- GString* _tmp2_;
- GString* _tmp14_;
- const gchar* _tmp15_;
- gchar* _tmp16_;
-#line 27 "/home/jens/Source/shotwell/src/util/string.vala"
- _tmp0_ = length;
+ GString* _tmp0_;
+ GString* _tmp9_;
+ const gchar* _tmp10_;
+ gchar* _tmp11_;
#line 27 "/home/jens/Source/shotwell/src/util/string.vala"
- if (_tmp0_ < 0) {
-#line 184 "string.c"
- guchar* _tmp1_;
- gint _tmp1__length1;
-#line 28 "/home/jens/Source/shotwell/src/util/string.vala"
- _tmp1_ = data;
-#line 28 "/home/jens/Source/shotwell/src/util/string.vala"
- _tmp1__length1 = data_length1;
+ if (length < 0) {
#line 28 "/home/jens/Source/shotwell/src/util/string.vala"
- length = _tmp1__length1;
-#line 193 "string.c"
+ length = data_length1;
+#line 204 "string.c"
}
#line 30 "/home/jens/Source/shotwell/src/util/string.vala"
- _tmp2_ = g_string_new ("");
+ _tmp0_ = g_string_new ("");
#line 30 "/home/jens/Source/shotwell/src/util/string.vala"
- builder = _tmp2_;
-#line 199 "string.c"
+ builder = _tmp0_;
+#line 210 "string.c"
{
gint ctr = 0;
#line 31 "/home/jens/Source/shotwell/src/util/string.vala"
ctr = 0;
-#line 204 "string.c"
+#line 215 "string.c"
{
- gboolean _tmp3_ = FALSE;
+ gboolean _tmp1_ = FALSE;
#line 31 "/home/jens/Source/shotwell/src/util/string.vala"
- _tmp3_ = TRUE;
+ _tmp1_ = TRUE;
#line 31 "/home/jens/Source/shotwell/src/util/string.vala"
while (TRUE) {
-#line 211 "string.c"
- gint _tmp5_;
- gint _tmp6_;
- guchar* _tmp7_;
- gint _tmp7__length1;
- gint _tmp8_;
- guchar _tmp9_;
+#line 222 "string.c"
+ gint _tmp3_;
+ gint _tmp4_;
+ guchar _tmp5_;
#line 31 "/home/jens/Source/shotwell/src/util/string.vala"
- if (!_tmp3_) {
-#line 220 "string.c"
- gint _tmp4_;
+ if (!_tmp1_) {
+#line 228 "string.c"
+ gint _tmp2_;
#line 31 "/home/jens/Source/shotwell/src/util/string.vala"
- _tmp4_ = ctr;
+ _tmp2_ = ctr;
#line 31 "/home/jens/Source/shotwell/src/util/string.vala"
- ctr = _tmp4_ + 1;
-#line 226 "string.c"
+ ctr = _tmp2_ + 1;
+#line 234 "string.c"
}
#line 31 "/home/jens/Source/shotwell/src/util/string.vala"
- _tmp3_ = FALSE;
-#line 31 "/home/jens/Source/shotwell/src/util/string.vala"
- _tmp5_ = ctr;
+ _tmp1_ = FALSE;
#line 31 "/home/jens/Source/shotwell/src/util/string.vala"
- _tmp6_ = length;
+ _tmp3_ = ctr;
#line 31 "/home/jens/Source/shotwell/src/util/string.vala"
- if (!(_tmp5_ < _tmp6_)) {
+ if (!(_tmp3_ < length)) {
#line 31 "/home/jens/Source/shotwell/src/util/string.vala"
break;
-#line 238 "string.c"
+#line 244 "string.c"
}
#line 32 "/home/jens/Source/shotwell/src/util/string.vala"
- _tmp7_ = data;
-#line 32 "/home/jens/Source/shotwell/src/util/string.vala"
- _tmp7__length1 = data_length1;
+ _tmp4_ = ctr;
#line 32 "/home/jens/Source/shotwell/src/util/string.vala"
- _tmp8_ = ctr;
+ _tmp5_ = data[_tmp4_];
#line 32 "/home/jens/Source/shotwell/src/util/string.vala"
- _tmp9_ = _tmp7_[_tmp8_];
-#line 32 "/home/jens/Source/shotwell/src/util/string.vala"
- if (_tmp9_ != ((guchar) '\0')) {
-#line 250 "string.c"
- GString* _tmp10_;
- guchar* _tmp11_;
- gint _tmp11__length1;
- gint _tmp12_;
- guchar _tmp13_;
-#line 33 "/home/jens/Source/shotwell/src/util/string.vala"
- _tmp10_ = builder;
-#line 33 "/home/jens/Source/shotwell/src/util/string.vala"
- _tmp11_ = data;
+ if (_tmp5_ != ((guchar) '\0')) {
+#line 252 "string.c"
+ GString* _tmp6_;
+ gint _tmp7_;
+ guchar _tmp8_;
#line 33 "/home/jens/Source/shotwell/src/util/string.vala"
- _tmp11__length1 = data_length1;
+ _tmp6_ = builder;
#line 33 "/home/jens/Source/shotwell/src/util/string.vala"
- _tmp12_ = ctr;
+ _tmp7_ = ctr;
#line 33 "/home/jens/Source/shotwell/src/util/string.vala"
- _tmp13_ = _tmp11_[_tmp12_];
+ _tmp8_ = data[_tmp7_];
#line 33 "/home/jens/Source/shotwell/src/util/string.vala"
- g_string_append_c (_tmp10_, (gchar) _tmp13_);
-#line 268 "string.c"
+ g_string_append_c (_tmp6_, (gchar) _tmp8_);
+#line 264 "string.c"
} else {
#line 35 "/home/jens/Source/shotwell/src/util/string.vala"
break;
-#line 272 "string.c"
+#line 268 "string.c"
}
}
}
}
#line 38 "/home/jens/Source/shotwell/src/util/string.vala"
- _tmp14_ = builder;
+ _tmp9_ = builder;
#line 38 "/home/jens/Source/shotwell/src/util/string.vala"
- _tmp15_ = _tmp14_->str;
+ _tmp10_ = _tmp9_->str;
#line 38 "/home/jens/Source/shotwell/src/util/string.vala"
- _tmp16_ = g_strdup (_tmp15_);
+ _tmp11_ = g_strdup (_tmp10_);
#line 38 "/home/jens/Source/shotwell/src/util/string.vala"
- result = _tmp16_;
+ result = _tmp11_;
#line 38 "/home/jens/Source/shotwell/src/util/string.vala"
_g_string_free0 (builder);
#line 38 "/home/jens/Source/shotwell/src/util/string.vala"
return result;
-#line 289 "string.c"
+#line 285 "string.c"
}
-static void _vala_array_add1 (guchar* * array, int* length, int* size, guchar value) {
+static void
+_vala_array_add1 (guchar* * array,
+ int* length,
+ int* size,
+ guchar value)
+{
#line 45 "/home/jens/Source/shotwell/src/util/string.vala"
if ((*length) == (*size)) {
#line 45 "/home/jens/Source/shotwell/src/util/string.vala"
*size = (*size) ? (2 * (*size)) : 4;
#line 45 "/home/jens/Source/shotwell/src/util/string.vala"
*array = g_renew (guchar, *array, *size);
-#line 300 "string.c"
+#line 301 "string.c"
}
#line 45 "/home/jens/Source/shotwell/src/util/string.vala"
(*array)[(*length)++] = value;
-#line 304 "string.c"
+#line 305 "string.c"
}
-guchar* string_to_uchar_array (const gchar* str, int* result_length1) {
+guchar*
+string_to_uchar_array (const gchar* str,
+ int* result_length1)
+{
guchar* result = NULL;
guchar* data = NULL;
guchar* _tmp0_;
gint data_length1;
gint _data_size_;
- guchar* _tmp11_;
- gint _tmp11__length1;
+ guchar* _tmp8_;
+ gint _tmp8__length1;
#line 42 "/home/jens/Source/shotwell/src/util/string.vala"
g_return_val_if_fail (str != NULL, NULL);
#line 43 "/home/jens/Source/shotwell/src/util/string.vala"
@@ -322,257 +326,224 @@ guchar* string_to_uchar_array (const gchar* str, int* result_length1) {
data_length1 = 0;
#line 43 "/home/jens/Source/shotwell/src/util/string.vala"
_data_size_ = data_length1;
-#line 326 "string.c"
+#line 330 "string.c"
{
gint ctr = 0;
#line 44 "/home/jens/Source/shotwell/src/util/string.vala"
ctr = 0;
-#line 331 "string.c"
+#line 335 "string.c"
{
gboolean _tmp1_ = FALSE;
#line 44 "/home/jens/Source/shotwell/src/util/string.vala"
_tmp1_ = TRUE;
#line 44 "/home/jens/Source/shotwell/src/util/string.vala"
while (TRUE) {
-#line 338 "string.c"
+#line 342 "string.c"
gint _tmp3_;
- const gchar* _tmp4_;
+ gint _tmp4_;
gint _tmp5_;
- gint _tmp6_;
- guchar* _tmp7_;
- gint _tmp7__length1;
- const gchar* _tmp8_;
- gint _tmp9_;
- gchar _tmp10_;
+ guchar* _tmp6_;
+ gint _tmp6__length1;
+ gint _tmp7_;
#line 44 "/home/jens/Source/shotwell/src/util/string.vala"
if (!_tmp1_) {
-#line 350 "string.c"
+#line 351 "string.c"
gint _tmp2_;
#line 44 "/home/jens/Source/shotwell/src/util/string.vala"
_tmp2_ = ctr;
#line 44 "/home/jens/Source/shotwell/src/util/string.vala"
ctr = _tmp2_ + 1;
-#line 356 "string.c"
+#line 357 "string.c"
}
#line 44 "/home/jens/Source/shotwell/src/util/string.vala"
_tmp1_ = FALSE;
#line 44 "/home/jens/Source/shotwell/src/util/string.vala"
_tmp3_ = ctr;
#line 44 "/home/jens/Source/shotwell/src/util/string.vala"
- _tmp4_ = str;
-#line 44 "/home/jens/Source/shotwell/src/util/string.vala"
- _tmp5_ = strlen (_tmp4_);
+ _tmp4_ = strlen (str);
#line 44 "/home/jens/Source/shotwell/src/util/string.vala"
- _tmp6_ = _tmp5_;
+ _tmp5_ = _tmp4_;
#line 44 "/home/jens/Source/shotwell/src/util/string.vala"
- if (!(_tmp3_ < _tmp6_)) {
+ if (!(_tmp3_ < _tmp5_)) {
#line 44 "/home/jens/Source/shotwell/src/util/string.vala"
break;
-#line 372 "string.c"
+#line 371 "string.c"
}
#line 45 "/home/jens/Source/shotwell/src/util/string.vala"
- _tmp7_ = data;
-#line 45 "/home/jens/Source/shotwell/src/util/string.vala"
- _tmp7__length1 = data_length1;
+ _tmp6_ = data;
#line 45 "/home/jens/Source/shotwell/src/util/string.vala"
- _tmp8_ = str;
+ _tmp6__length1 = data_length1;
#line 45 "/home/jens/Source/shotwell/src/util/string.vala"
- _tmp9_ = ctr;
+ _tmp7_ = ctr;
#line 45 "/home/jens/Source/shotwell/src/util/string.vala"
- _tmp10_ = string_get (_tmp8_, (glong) _tmp9_);
-#line 45 "/home/jens/Source/shotwell/src/util/string.vala"
- _vala_array_add1 (&data, &data_length1, &_data_size_, (guchar) _tmp10_);
-#line 386 "string.c"
+ _vala_array_add1 (&data, &data_length1, &_data_size_, (guchar) string_get (str, (glong) _tmp7_));
+#line 381 "string.c"
}
}
}
#line 47 "/home/jens/Source/shotwell/src/util/string.vala"
- _tmp11_ = data;
+ _tmp8_ = data;
#line 47 "/home/jens/Source/shotwell/src/util/string.vala"
- _tmp11__length1 = data_length1;
+ _tmp8__length1 = data_length1;
#line 47 "/home/jens/Source/shotwell/src/util/string.vala"
if (result_length1) {
#line 47 "/home/jens/Source/shotwell/src/util/string.vala"
- *result_length1 = _tmp11__length1;
-#line 398 "string.c"
+ *result_length1 = _tmp8__length1;
+#line 393 "string.c"
}
#line 47 "/home/jens/Source/shotwell/src/util/string.vala"
- result = _tmp11_;
+ result = _tmp8_;
#line 47 "/home/jens/Source/shotwell/src/util/string.vala"
return result;
-#line 404 "string.c"
+#line 399 "string.c"
}
-inline gchar* guarded_markup_escape_text (const gchar* plain) {
+inline gchar*
+guarded_markup_escape_text (const gchar* plain)
+{
gchar* result = NULL;
gchar* _tmp0_ = NULL;
gboolean _tmp1_ = FALSE;
- const gchar* _tmp2_;
- gboolean _tmp3_;
#line 58 "/home/jens/Source/shotwell/src/util/string.vala"
- _tmp2_ = plain;
+ if (!is_string_empty (plain)) {
+#line 411 "string.c"
+ gboolean _tmp2_;
#line 58 "/home/jens/Source/shotwell/src/util/string.vala"
- _tmp3_ = is_string_empty (_tmp2_);
+ _tmp2_ = g_utf8_validate (plain, (gssize) -1, NULL);
#line 58 "/home/jens/Source/shotwell/src/util/string.vala"
- if (!_tmp3_) {
-#line 420 "string.c"
- const gchar* _tmp4_;
- gboolean _tmp5_;
-#line 58 "/home/jens/Source/shotwell/src/util/string.vala"
- _tmp4_ = plain;
-#line 58 "/home/jens/Source/shotwell/src/util/string.vala"
- _tmp5_ = g_utf8_validate (_tmp4_, (gssize) -1, NULL);
-#line 58 "/home/jens/Source/shotwell/src/util/string.vala"
- _tmp1_ = _tmp5_;
-#line 429 "string.c"
+ _tmp1_ = _tmp2_;
+#line 417 "string.c"
} else {
#line 58 "/home/jens/Source/shotwell/src/util/string.vala"
_tmp1_ = FALSE;
-#line 433 "string.c"
+#line 421 "string.c"
}
#line 58 "/home/jens/Source/shotwell/src/util/string.vala"
if (_tmp1_) {
-#line 437 "string.c"
- const gchar* _tmp6_;
- gchar* _tmp7_;
-#line 58 "/home/jens/Source/shotwell/src/util/string.vala"
- _tmp6_ = plain;
+#line 425 "string.c"
+ gchar* _tmp3_;
#line 58 "/home/jens/Source/shotwell/src/util/string.vala"
- _tmp7_ = g_markup_escape_text (_tmp6_, (gssize) -1);
+ _tmp3_ = g_markup_escape_text (plain, (gssize) -1);
#line 58 "/home/jens/Source/shotwell/src/util/string.vala"
_g_free0 (_tmp0_);
#line 58 "/home/jens/Source/shotwell/src/util/string.vala"
- _tmp0_ = _tmp7_;
-#line 448 "string.c"
+ _tmp0_ = _tmp3_;
+#line 433 "string.c"
} else {
- gchar* _tmp8_;
+ gchar* _tmp4_;
#line 58 "/home/jens/Source/shotwell/src/util/string.vala"
- _tmp8_ = g_strdup ("");
+ _tmp4_ = g_strdup ("");
#line 58 "/home/jens/Source/shotwell/src/util/string.vala"
_g_free0 (_tmp0_);
#line 58 "/home/jens/Source/shotwell/src/util/string.vala"
- _tmp0_ = _tmp8_;
-#line 457 "string.c"
+ _tmp0_ = _tmp4_;
+#line 442 "string.c"
}
#line 58 "/home/jens/Source/shotwell/src/util/string.vala"
result = _tmp0_;
#line 58 "/home/jens/Source/shotwell/src/util/string.vala"
return result;
-#line 463 "string.c"
+#line 448 "string.c"
}
-glong find_last_offset (const gchar* str, gchar c) {
+glong
+find_last_offset (const gchar* str,
+ gchar c)
+{
glong result = 0L;
glong offset = 0L;
- const gchar* _tmp0_;
+ gint _tmp0_;
gint _tmp1_;
- gint _tmp2_;
#line 61 "/home/jens/Source/shotwell/src/util/string.vala"
g_return_val_if_fail (str != NULL, 0L);
#line 62 "/home/jens/Source/shotwell/src/util/string.vala"
- _tmp0_ = str;
-#line 62 "/home/jens/Source/shotwell/src/util/string.vala"
- _tmp1_ = strlen (_tmp0_);
+ _tmp0_ = strlen (str);
#line 62 "/home/jens/Source/shotwell/src/util/string.vala"
- _tmp2_ = _tmp1_;
+ _tmp1_ = _tmp0_;
#line 62 "/home/jens/Source/shotwell/src/util/string.vala"
- offset = (glong) _tmp2_;
+ offset = (glong) _tmp1_;
#line 63 "/home/jens/Source/shotwell/src/util/string.vala"
while (TRUE) {
-#line 485 "string.c"
+#line 470 "string.c"
+ glong _tmp2_;
glong _tmp3_;
glong _tmp4_;
- const gchar* _tmp5_;
- glong _tmp6_;
- gchar _tmp7_;
- gchar _tmp8_;
#line 63 "/home/jens/Source/shotwell/src/util/string.vala"
- _tmp3_ = offset;
+ _tmp2_ = offset;
#line 63 "/home/jens/Source/shotwell/src/util/string.vala"
- offset = _tmp3_ - 1;
+ offset = _tmp2_ - 1;
#line 63 "/home/jens/Source/shotwell/src/util/string.vala"
- _tmp4_ = offset;
+ _tmp3_ = offset;
#line 63 "/home/jens/Source/shotwell/src/util/string.vala"
- if (!(_tmp4_ >= ((glong) 0))) {
+ if (!(_tmp3_ >= ((glong) 0))) {
#line 63 "/home/jens/Source/shotwell/src/util/string.vala"
break;
-#line 502 "string.c"
+#line 484 "string.c"
}
#line 64 "/home/jens/Source/shotwell/src/util/string.vala"
- _tmp5_ = str;
-#line 64 "/home/jens/Source/shotwell/src/util/string.vala"
- _tmp6_ = offset;
-#line 64 "/home/jens/Source/shotwell/src/util/string.vala"
- _tmp7_ = string_get (_tmp5_, _tmp6_);
-#line 64 "/home/jens/Source/shotwell/src/util/string.vala"
- _tmp8_ = c;
+ _tmp4_ = offset;
#line 64 "/home/jens/Source/shotwell/src/util/string.vala"
- if (_tmp7_ == _tmp8_) {
+ if (string_get (str, _tmp4_) == c) {
#line 65 "/home/jens/Source/shotwell/src/util/string.vala"
result = offset;
#line 65 "/home/jens/Source/shotwell/src/util/string.vala"
return result;
-#line 518 "string.c"
+#line 494 "string.c"
}
}
#line 68 "/home/jens/Source/shotwell/src/util/string.vala"
result = (glong) -1;
#line 68 "/home/jens/Source/shotwell/src/util/string.vala"
return result;
-#line 525 "string.c"
+#line 501 "string.c"
}
-gboolean is_in_ci_array (const gchar* str, gchar** strings, int strings_length1) {
+gboolean
+is_in_ci_array (const gchar* str,
+ gchar** strings,
+ int strings_length1)
+{
gboolean result = FALSE;
gchar* strdown = NULL;
- const gchar* _tmp0_;
- gchar* _tmp1_;
- gchar** _tmp2_;
- gint _tmp2__length1;
+ gchar* _tmp0_;
#line 73 "/home/jens/Source/shotwell/src/util/string.vala"
g_return_val_if_fail (str != NULL, FALSE);
#line 74 "/home/jens/Source/shotwell/src/util/string.vala"
- _tmp0_ = str;
-#line 74 "/home/jens/Source/shotwell/src/util/string.vala"
- _tmp1_ = g_utf8_strdown (_tmp0_, (gssize) -1);
+ _tmp0_ = g_utf8_strdown (str, (gssize) -1);
#line 74 "/home/jens/Source/shotwell/src/util/string.vala"
- strdown = _tmp1_;
-#line 75 "/home/jens/Source/shotwell/src/util/string.vala"
- _tmp2_ = strings;
-#line 75 "/home/jens/Source/shotwell/src/util/string.vala"
- _tmp2__length1 = strings_length1;
-#line 548 "string.c"
+ strdown = _tmp0_;
+#line 519 "string.c"
{
gchar** str_element_collection = NULL;
gint str_element_collection_length1 = 0;
gint _str_element_collection_size_ = 0;
gint str_element_it = 0;
#line 75 "/home/jens/Source/shotwell/src/util/string.vala"
- str_element_collection = _tmp2_;
+ str_element_collection = strings;
#line 75 "/home/jens/Source/shotwell/src/util/string.vala"
- str_element_collection_length1 = _tmp2__length1;
+ str_element_collection_length1 = strings_length1;
#line 75 "/home/jens/Source/shotwell/src/util/string.vala"
- for (str_element_it = 0; str_element_it < _tmp2__length1; str_element_it = str_element_it + 1) {
-#line 560 "string.c"
- gchar* _tmp3_;
+ for (str_element_it = 0; str_element_it < strings_length1; str_element_it = str_element_it + 1) {
+#line 531 "string.c"
+ gchar* _tmp1_;
gchar* str_element = NULL;
#line 75 "/home/jens/Source/shotwell/src/util/string.vala"
- _tmp3_ = g_strdup (str_element_collection[str_element_it]);
+ _tmp1_ = g_strdup (str_element_collection[str_element_it]);
#line 75 "/home/jens/Source/shotwell/src/util/string.vala"
- str_element = _tmp3_;
-#line 567 "string.c"
+ str_element = _tmp1_;
+#line 538 "string.c"
{
- const gchar* _tmp4_;
- const gchar* _tmp5_;
+ const gchar* _tmp2_;
+ const gchar* _tmp3_;
#line 76 "/home/jens/Source/shotwell/src/util/string.vala"
- _tmp4_ = strdown;
+ _tmp2_ = strdown;
#line 76 "/home/jens/Source/shotwell/src/util/string.vala"
- _tmp5_ = str_element;
+ _tmp3_ = str_element;
#line 76 "/home/jens/Source/shotwell/src/util/string.vala"
- if (g_strcmp0 (_tmp4_, _tmp5_) == 0) {
+ if (g_strcmp0 (_tmp2_, _tmp3_) == 0) {
#line 77 "/home/jens/Source/shotwell/src/util/string.vala"
result = TRUE;
#line 77 "/home/jens/Source/shotwell/src/util/string.vala"
@@ -581,11 +552,11 @@ gboolean is_in_ci_array (const gchar* str, gchar** strings, int strings_length1)
_g_free0 (strdown);
#line 77 "/home/jens/Source/shotwell/src/util/string.vala"
return result;
-#line 585 "string.c"
+#line 556 "string.c"
}
#line 75 "/home/jens/Source/shotwell/src/util/string.vala"
_g_free0 (str_element);
-#line 589 "string.c"
+#line 560 "string.c"
}
}
}
@@ -595,11 +566,13 @@ gboolean is_in_ci_array (const gchar* str, gchar** strings, int strings_length1)
_g_free0 (strdown);
#line 80 "/home/jens/Source/shotwell/src/util/string.vala"
return result;
-#line 599 "string.c"
+#line 570 "string.c"
}
-GType prepare_input_text_options_get_type (void) {
+GType
+prepare_input_text_options_get_type (void)
+{
static volatile gsize prepare_input_text_options_type_id__volatile = 0;
if (g_once_init_enter (&prepare_input_text_options_type_id__volatile)) {
static const GFlagsValue values[] = {{PREPARE_INPUT_TEXT_OPTIONS_EMPTY_IS_NULL, "PREPARE_INPUT_TEXT_OPTIONS_EMPTY_IS_NULL", "empty-is-null"}, {PREPARE_INPUT_TEXT_OPTIONS_VALIDATE, "PREPARE_INPUT_TEXT_OPTIONS_VALIDATE", "validate"}, {PREPARE_INPUT_TEXT_OPTIONS_INVALID_IS_NULL, "PREPARE_INPUT_TEXT_OPTIONS_INVALID_IS_NULL", "invalid-is-null"}, {PREPARE_INPUT_TEXT_OPTIONS_STRIP, "PREPARE_INPUT_TEXT_OPTIONS_STRIP", "strip"}, {PREPARE_INPUT_TEXT_OPTIONS_STRIP_CRLF, "PREPARE_INPUT_TEXT_OPTIONS_STRIP_CRLF", "strip-crlf"}, {PREPARE_INPUT_TEXT_OPTIONS_NORMALIZE, "PREPARE_INPUT_TEXT_OPTIONS_NORMALIZE", "normalize"}, {PREPARE_INPUT_TEXT_OPTIONS_DEFAULT, "PREPARE_INPUT_TEXT_OPTIONS_DEFAULT", "default"}, {0, NULL, NULL}};
@@ -611,17 +584,18 @@ GType prepare_input_text_options_get_type (void) {
}
-gchar* guess_convert (const gchar* text) {
+gchar*
+guess_convert (const gchar* text)
+{
gchar* result = NULL;
gchar* output = NULL;
gsize bytes_read = 0UL;
const gchar* charset = NULL;
const gchar* _tmp0_ = NULL;
gboolean _tmp1_;
- gsize _tmp30_;
- const gchar* _tmp31_;
- gint _tmp32_;
- gint _tmp33_;
+ gsize _tmp23_;
+ gint _tmp24_;
+ gint _tmp25_;
GError * _inner_error_ = NULL;
#line 94 "/home/jens/Source/shotwell/src/util/string.vala"
g_return_val_if_fail (text != NULL, NULL);
@@ -640,84 +614,69 @@ gchar* guess_convert (const gchar* text) {
charset = _tmp0_;
#line 101 "/home/jens/Source/shotwell/src/util/string.vala"
if (!_tmp1_) {
-#line 643 "string.c"
- const gchar* _tmp2_;
- const gchar* _tmp3_;
- gint _tmp4_;
- gint _tmp5_;
- gsize _tmp6_ = 0UL;
- gchar* _tmp7_;
- gsize _tmp8_;
- const gchar* _tmp9_;
- gint _tmp10_;
- gint _tmp11_;
-#line 102 "/home/jens/Source/shotwell/src/util/string.vala"
- _tmp2_ = text;
-#line 102 "/home/jens/Source/shotwell/src/util/string.vala"
- _tmp3_ = text;
+#line 617 "string.c"
+ gint _tmp2_;
+ gint _tmp3_;
+ gsize _tmp4_ = 0UL;
+ gchar* _tmp5_;
+ gsize _tmp6_;
+ gint _tmp7_;
+ gint _tmp8_;
#line 102 "/home/jens/Source/shotwell/src/util/string.vala"
- _tmp4_ = strlen (_tmp3_);
+ _tmp2_ = strlen (text);
#line 102 "/home/jens/Source/shotwell/src/util/string.vala"
- _tmp5_ = _tmp4_;
+ _tmp3_ = _tmp2_;
#line 102 "/home/jens/Source/shotwell/src/util/string.vala"
- _tmp7_ = g_locale_to_utf8 (_tmp2_, (gssize) _tmp5_, &_tmp6_, NULL, NULL);
+ _tmp5_ = g_locale_to_utf8 (text, (gssize) _tmp3_, &_tmp4_, NULL, NULL);
#line 102 "/home/jens/Source/shotwell/src/util/string.vala"
- bytes_read = _tmp6_;
+ bytes_read = _tmp4_;
#line 102 "/home/jens/Source/shotwell/src/util/string.vala"
_g_free0 (output);
#line 102 "/home/jens/Source/shotwell/src/util/string.vala"
- output = _tmp7_;
-#line 103 "/home/jens/Source/shotwell/src/util/string.vala"
- _tmp8_ = bytes_read;
+ output = _tmp5_;
#line 103 "/home/jens/Source/shotwell/src/util/string.vala"
- _tmp9_ = text;
+ _tmp6_ = bytes_read;
#line 103 "/home/jens/Source/shotwell/src/util/string.vala"
- _tmp10_ = strlen (_tmp9_);
+ _tmp7_ = strlen (text);
#line 103 "/home/jens/Source/shotwell/src/util/string.vala"
- _tmp11_ = _tmp10_;
+ _tmp8_ = _tmp7_;
#line 103 "/home/jens/Source/shotwell/src/util/string.vala"
- if (_tmp8_ == ((gsize) _tmp11_)) {
-#line 680 "string.c"
- const gchar* _tmp12_;
+ if (_tmp6_ == ((gsize) _tmp8_)) {
+#line 645 "string.c"
+ const gchar* _tmp9_;
#line 104 "/home/jens/Source/shotwell/src/util/string.vala"
- _tmp12_ = charset;
+ _tmp9_ = charset;
#line 104 "/home/jens/Source/shotwell/src/util/string.vala"
- g_debug ("string.vala:104: CONVERT: Locale is not UTF-8, convert from %s", _tmp12_);
+ g_debug ("string.vala:104: CONVERT: Locale is not UTF-8, convert from %s", _tmp9_);
#line 105 "/home/jens/Source/shotwell/src/util/string.vala"
result = output;
#line 105 "/home/jens/Source/shotwell/src/util/string.vala"
return result;
-#line 690 "string.c"
+#line 655 "string.c"
}
}
{
- gchar* _tmp13_ = NULL;
- const gchar* _tmp14_;
- const gchar* _tmp15_;
- gint _tmp16_;
- gint _tmp17_;
- gsize _tmp18_ = 0UL;
- gchar* _tmp19_;
- gchar* _tmp20_;
-#line 110 "/home/jens/Source/shotwell/src/util/string.vala"
- _tmp14_ = text;
-#line 110 "/home/jens/Source/shotwell/src/util/string.vala"
- _tmp15_ = text;
+ gchar* _tmp10_ = NULL;
+ gint _tmp11_;
+ gint _tmp12_;
+ gsize _tmp13_ = 0UL;
+ gchar* _tmp14_;
+ gchar* _tmp15_;
#line 110 "/home/jens/Source/shotwell/src/util/string.vala"
- _tmp16_ = strlen (_tmp15_);
+ _tmp11_ = strlen (text);
#line 110 "/home/jens/Source/shotwell/src/util/string.vala"
- _tmp17_ = _tmp16_;
+ _tmp12_ = _tmp11_;
#line 110 "/home/jens/Source/shotwell/src/util/string.vala"
- _tmp19_ = g_convert (_tmp14_, (gssize) _tmp17_, "UTF-8", "WINDOWS-1252", &_tmp18_, NULL, &_inner_error_);
+ _tmp14_ = g_convert (text, (gssize) _tmp12_, "UTF-8", "WINDOWS-1252", &_tmp13_, NULL, &_inner_error_);
#line 110 "/home/jens/Source/shotwell/src/util/string.vala"
- bytes_read = _tmp18_;
+ bytes_read = _tmp13_;
#line 110 "/home/jens/Source/shotwell/src/util/string.vala"
- _tmp13_ = _tmp19_;
+ _tmp10_ = _tmp14_;
#line 110 "/home/jens/Source/shotwell/src/util/string.vala"
if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 110 "/home/jens/Source/shotwell/src/util/string.vala"
if (_inner_error_->domain == G_CONVERT_ERROR) {
-#line 720 "string.c"
+#line 679 "string.c"
goto __catch6_g_convert_error;
}
#line 110 "/home/jens/Source/shotwell/src/util/string.vala"
@@ -728,77 +687,71 @@ gchar* guess_convert (const gchar* text) {
g_clear_error (&_inner_error_);
#line 110 "/home/jens/Source/shotwell/src/util/string.vala"
return NULL;
-#line 731 "string.c"
+#line 690 "string.c"
}
#line 110 "/home/jens/Source/shotwell/src/util/string.vala"
- _tmp20_ = _tmp13_;
+ _tmp15_ = _tmp10_;
#line 110 "/home/jens/Source/shotwell/src/util/string.vala"
- _tmp13_ = NULL;
+ _tmp10_ = NULL;
#line 110 "/home/jens/Source/shotwell/src/util/string.vala"
_g_free0 (output);
#line 110 "/home/jens/Source/shotwell/src/util/string.vala"
- output = _tmp20_;
+ output = _tmp15_;
#line 111 "/home/jens/Source/shotwell/src/util/string.vala"
charset = "WINDOWS-1252";
#line 109 "/home/jens/Source/shotwell/src/util/string.vala"
- _g_free0 (_tmp13_);
-#line 745 "string.c"
+ _g_free0 (_tmp10_);
+#line 704 "string.c"
}
goto __finally6;
__catch6_g_convert_error:
{
GError* _error_ = NULL;
- GError* _tmp21_;
+ GError* _tmp16_;
#line 109 "/home/jens/Source/shotwell/src/util/string.vala"
_error_ = _inner_error_;
#line 109 "/home/jens/Source/shotwell/src/util/string.vala"
_inner_error_ = NULL;
#line 113 "/home/jens/Source/shotwell/src/util/string.vala"
- _tmp21_ = _error_;
+ _tmp16_ = _error_;
#line 113 "/home/jens/Source/shotwell/src/util/string.vala"
- if (g_error_matches (_tmp21_, G_CONVERT_ERROR, G_CONVERT_ERROR_NO_CONVERSION)) {
-#line 760 "string.c"
+ if (g_error_matches (_tmp16_, G_CONVERT_ERROR, G_CONVERT_ERROR_NO_CONVERSION)) {
+#line 719 "string.c"
{
- gchar* _tmp22_ = NULL;
- const gchar* _tmp23_;
- const gchar* _tmp24_;
- gint _tmp25_;
- gint _tmp26_;
- gsize _tmp27_ = 0UL;
- gchar* _tmp28_;
- gchar* _tmp29_;
-#line 115 "/home/jens/Source/shotwell/src/util/string.vala"
- _tmp23_ = text;
+ gchar* _tmp17_ = NULL;
+ gint _tmp18_;
+ gint _tmp19_;
+ gsize _tmp20_ = 0UL;
+ gchar* _tmp21_;
+ gchar* _tmp22_;
#line 115 "/home/jens/Source/shotwell/src/util/string.vala"
- _tmp24_ = text;
+ _tmp18_ = strlen (text);
#line 115 "/home/jens/Source/shotwell/src/util/string.vala"
- _tmp25_ = strlen (_tmp24_);
+ _tmp19_ = _tmp18_;
#line 115 "/home/jens/Source/shotwell/src/util/string.vala"
- _tmp26_ = _tmp25_;
+ _tmp21_ = g_convert (text, (gssize) _tmp19_, "UTF-8", "ISO-8859-1", &_tmp20_, NULL, &_inner_error_);
#line 115 "/home/jens/Source/shotwell/src/util/string.vala"
- _tmp28_ = g_convert (_tmp23_, (gssize) _tmp26_, "UTF-8", "ISO-8859-1", &_tmp27_, NULL, &_inner_error_);
+ bytes_read = _tmp20_;
#line 115 "/home/jens/Source/shotwell/src/util/string.vala"
- bytes_read = _tmp27_;
-#line 115 "/home/jens/Source/shotwell/src/util/string.vala"
- _tmp22_ = _tmp28_;
+ _tmp17_ = _tmp21_;
#line 115 "/home/jens/Source/shotwell/src/util/string.vala"
if (G_UNLIKELY (_inner_error_ != NULL)) {
-#line 786 "string.c"
+#line 739 "string.c"
goto __catch7_g_error;
}
#line 115 "/home/jens/Source/shotwell/src/util/string.vala"
- _tmp29_ = _tmp22_;
+ _tmp22_ = _tmp17_;
#line 115 "/home/jens/Source/shotwell/src/util/string.vala"
- _tmp22_ = NULL;
+ _tmp17_ = NULL;
#line 115 "/home/jens/Source/shotwell/src/util/string.vala"
_g_free0 (output);
#line 115 "/home/jens/Source/shotwell/src/util/string.vala"
- output = _tmp29_;
+ output = _tmp22_;
#line 116 "/home/jens/Source/shotwell/src/util/string.vala"
charset = "ISO-8859-1";
#line 114 "/home/jens/Source/shotwell/src/util/string.vala"
- _g_free0 (_tmp22_);
-#line 801 "string.c"
+ _g_free0 (_tmp17_);
+#line 754 "string.c"
}
goto __finally7;
__catch7_g_error:
@@ -810,7 +763,7 @@ gchar* guess_convert (const gchar* text) {
_inner_error_ = NULL;
#line 114 "/home/jens/Source/shotwell/src/util/string.vala"
_g_error_free0 (_error_);
-#line 813 "string.c"
+#line 766 "string.c"
}
__finally7:
#line 114 "/home/jens/Source/shotwell/src/util/string.vala"
@@ -827,12 +780,12 @@ gchar* guess_convert (const gchar* text) {
g_clear_error (&_inner_error_);
#line 114 "/home/jens/Source/shotwell/src/util/string.vala"
return NULL;
-#line 830 "string.c"
+#line 783 "string.c"
}
}
#line 109 "/home/jens/Source/shotwell/src/util/string.vala"
_g_error_free0 (_error_);
-#line 835 "string.c"
+#line 788 "string.c"
}
__finally6:
#line 109 "/home/jens/Source/shotwell/src/util/string.vala"
@@ -845,29 +798,27 @@ gchar* guess_convert (const gchar* text) {
g_clear_error (&_inner_error_);
#line 109 "/home/jens/Source/shotwell/src/util/string.vala"
return NULL;
-#line 848 "string.c"
+#line 801 "string.c"
}
#line 121 "/home/jens/Source/shotwell/src/util/string.vala"
- _tmp30_ = bytes_read;
+ _tmp23_ = bytes_read;
#line 121 "/home/jens/Source/shotwell/src/util/string.vala"
- _tmp31_ = text;
+ _tmp24_ = strlen (text);
#line 121 "/home/jens/Source/shotwell/src/util/string.vala"
- _tmp32_ = strlen (_tmp31_);
+ _tmp25_ = _tmp24_;
#line 121 "/home/jens/Source/shotwell/src/util/string.vala"
- _tmp33_ = _tmp32_;
-#line 121 "/home/jens/Source/shotwell/src/util/string.vala"
- if (_tmp30_ == ((gsize) _tmp33_)) {
-#line 860 "string.c"
- const gchar* _tmp34_;
+ if (_tmp23_ == ((gsize) _tmp25_)) {
+#line 811 "string.c"
+ const gchar* _tmp26_;
#line 122 "/home/jens/Source/shotwell/src/util/string.vala"
- _tmp34_ = charset;
+ _tmp26_ = charset;
#line 122 "/home/jens/Source/shotwell/src/util/string.vala"
- g_debug ("string.vala:122: CONVERT: Guessed conversion from %s", _tmp34_);
+ g_debug ("string.vala:122: CONVERT: Guessed conversion from %s", _tmp26_);
#line 124 "/home/jens/Source/shotwell/src/util/string.vala"
result = output;
#line 124 "/home/jens/Source/shotwell/src/util/string.vala"
return result;
-#line 870 "string.c"
+#line 821 "string.c"
}
#line 127 "/home/jens/Source/shotwell/src/util/string.vala"
result = NULL;
@@ -875,826 +826,679 @@ gchar* guess_convert (const gchar* text) {
_g_free0 (output);
#line 127 "/home/jens/Source/shotwell/src/util/string.vala"
return result;
-#line 878 "string.c"
+#line 829 "string.c"
}
-static gchar* string_strip (const gchar* self) {
+static gchar*
+string_strip (const gchar* self)
+{
gchar* result = NULL;
gchar* _result_ = NULL;
gchar* _tmp0_;
const gchar* _tmp1_;
-#line 1234 "/usr/share/vala-0.36/vapi/glib-2.0.vapi"
+#line 1248 "/usr/share/vala-0.40/vapi/glib-2.0.vapi"
g_return_val_if_fail (self != NULL, NULL);
-#line 1235 "/usr/share/vala-0.36/vapi/glib-2.0.vapi"
+#line 1249 "/usr/share/vala-0.40/vapi/glib-2.0.vapi"
_tmp0_ = g_strdup (self);
-#line 1235 "/usr/share/vala-0.36/vapi/glib-2.0.vapi"
+#line 1249 "/usr/share/vala-0.40/vapi/glib-2.0.vapi"
_result_ = _tmp0_;
-#line 1236 "/usr/share/vala-0.36/vapi/glib-2.0.vapi"
+#line 1250 "/usr/share/vala-0.40/vapi/glib-2.0.vapi"
_tmp1_ = _result_;
-#line 1236 "/usr/share/vala-0.36/vapi/glib-2.0.vapi"
+#line 1250 "/usr/share/vala-0.40/vapi/glib-2.0.vapi"
g_strstrip (_tmp1_);
-#line 1237 "/usr/share/vala-0.36/vapi/glib-2.0.vapi"
+#line 1251 "/usr/share/vala-0.40/vapi/glib-2.0.vapi"
result = _result_;
-#line 1237 "/usr/share/vala-0.36/vapi/glib-2.0.vapi"
+#line 1251 "/usr/share/vala-0.40/vapi/glib-2.0.vapi"
return result;
-#line 901 "string.c"
+#line 854 "string.c"
}
-static gchar* string_delimit (const gchar* self, const gchar* delimiters, gchar new_delimiter) {
+static gchar*
+string_delimit (const gchar* self,
+ const gchar* delimiters,
+ gchar new_delimiter)
+{
gchar* result = NULL;
gchar* _result_ = NULL;
gchar* _tmp0_;
const gchar* _tmp1_;
- const gchar* _tmp2_;
- gchar _tmp3_;
-#line 1242 "/usr/share/vala-0.36/vapi/glib-2.0.vapi"
+#line 1256 "/usr/share/vala-0.40/vapi/glib-2.0.vapi"
g_return_val_if_fail (self != NULL, NULL);
-#line 1242 "/usr/share/vala-0.36/vapi/glib-2.0.vapi"
+#line 1256 "/usr/share/vala-0.40/vapi/glib-2.0.vapi"
g_return_val_if_fail (delimiters != NULL, NULL);
-#line 1243 "/usr/share/vala-0.36/vapi/glib-2.0.vapi"
+#line 1257 "/usr/share/vala-0.40/vapi/glib-2.0.vapi"
_tmp0_ = g_strdup (self);
-#line 1243 "/usr/share/vala-0.36/vapi/glib-2.0.vapi"
+#line 1257 "/usr/share/vala-0.40/vapi/glib-2.0.vapi"
_result_ = _tmp0_;
-#line 1244 "/usr/share/vala-0.36/vapi/glib-2.0.vapi"
+#line 1258 "/usr/share/vala-0.40/vapi/glib-2.0.vapi"
_tmp1_ = _result_;
-#line 1244 "/usr/share/vala-0.36/vapi/glib-2.0.vapi"
- _tmp2_ = delimiters;
-#line 1244 "/usr/share/vala-0.36/vapi/glib-2.0.vapi"
- _tmp3_ = new_delimiter;
-#line 1244 "/usr/share/vala-0.36/vapi/glib-2.0.vapi"
- g_strdelimit (_tmp1_, _tmp2_, _tmp3_);
-#line 1245 "/usr/share/vala-0.36/vapi/glib-2.0.vapi"
+#line 1258 "/usr/share/vala-0.40/vapi/glib-2.0.vapi"
+ g_strdelimit (_tmp1_, delimiters, new_delimiter);
+#line 1259 "/usr/share/vala-0.40/vapi/glib-2.0.vapi"
result = _result_;
-#line 1245 "/usr/share/vala-0.36/vapi/glib-2.0.vapi"
+#line 1259 "/usr/share/vala-0.40/vapi/glib-2.0.vapi"
return result;
-#line 932 "string.c"
+#line 883 "string.c"
}
-gchar* prepare_input_text (const gchar* text, PrepareInputTextOptions options, gint dest_length) {
+gchar*
+prepare_input_text (const gchar* text,
+ PrepareInputTextOptions options,
+ gint dest_length)
+{
gchar* result = NULL;
- const gchar* _tmp0_;
gchar* prepped = NULL;
- const gchar* _tmp1_;
- gchar* _tmp2_;
- PrepareInputTextOptions _tmp3_;
- PrepareInputTextOptions _tmp12_;
- PrepareInputTextOptions _tmp15_;
- PrepareInputTextOptions _tmp18_;
- gboolean _tmp21_ = FALSE;
- PrepareInputTextOptions _tmp22_;
- gint _tmp25_;
-#line 131 "/home/jens/Source/shotwell/src/util/string.vala"
- _tmp0_ = text;
+ gchar* _tmp0_;
+ gboolean _tmp12_ = FALSE;
#line 131 "/home/jens/Source/shotwell/src/util/string.vala"
- if (_tmp0_ == NULL) {
+ if (text == NULL) {
#line 132 "/home/jens/Source/shotwell/src/util/string.vala"
result = NULL;
#line 132 "/home/jens/Source/shotwell/src/util/string.vala"
return result;
-#line 957 "string.c"
+#line 902 "string.c"
}
#line 134 "/home/jens/Source/shotwell/src/util/string.vala"
- _tmp1_ = text;
-#line 134 "/home/jens/Source/shotwell/src/util/string.vala"
- _tmp2_ = g_strdup (_tmp1_);
+ _tmp0_ = g_strdup (text);
#line 134 "/home/jens/Source/shotwell/src/util/string.vala"
- prepped = _tmp2_;
-#line 135 "/home/jens/Source/shotwell/src/util/string.vala"
- _tmp3_ = options;
+ prepped = _tmp0_;
#line 135 "/home/jens/Source/shotwell/src/util/string.vala"
- if ((_tmp3_ & PREPARE_INPUT_TEXT_OPTIONS_VALIDATE) == PREPARE_INPUT_TEXT_OPTIONS_VALIDATE) {
-#line 969 "string.c"
- const gchar* _tmp4_;
- gboolean _tmp5_;
-#line 136 "/home/jens/Source/shotwell/src/util/string.vala"
- _tmp4_ = text;
+ if ((options & PREPARE_INPUT_TEXT_OPTIONS_VALIDATE) == PREPARE_INPUT_TEXT_OPTIONS_VALIDATE) {
+#line 910 "string.c"
+ gboolean _tmp1_;
#line 136 "/home/jens/Source/shotwell/src/util/string.vala"
- _tmp5_ = g_utf8_validate (_tmp4_, (gssize) -1, NULL);
+ _tmp1_ = g_utf8_validate (text, (gssize) -1, NULL);
#line 136 "/home/jens/Source/shotwell/src/util/string.vala"
- if (!_tmp5_) {
-#line 978 "string.c"
- const gchar* _tmp6_;
- gchar* _tmp7_;
- const gchar* _tmp8_;
+ if (!_tmp1_) {
+#line 916 "string.c"
+ gchar* _tmp2_;
+ const gchar* _tmp3_;
#line 137 "/home/jens/Source/shotwell/src/util/string.vala"
- _tmp6_ = text;
-#line 137 "/home/jens/Source/shotwell/src/util/string.vala"
- _tmp7_ = guess_convert (_tmp6_);
+ _tmp2_ = guess_convert (text);
#line 137 "/home/jens/Source/shotwell/src/util/string.vala"
_g_free0 (prepped);
#line 137 "/home/jens/Source/shotwell/src/util/string.vala"
- prepped = _tmp7_;
+ prepped = _tmp2_;
#line 139 "/home/jens/Source/shotwell/src/util/string.vala"
- _tmp8_ = prepped;
+ _tmp3_ = prepped;
#line 139 "/home/jens/Source/shotwell/src/util/string.vala"
- if (_tmp8_ == NULL) {
-#line 994 "string.c"
- const gchar* _tmp9_ = NULL;
- PrepareInputTextOptions _tmp10_;
- gchar* _tmp11_;
-#line 140 "/home/jens/Source/shotwell/src/util/string.vala"
- _tmp10_ = options;
+ if (_tmp3_ == NULL) {
+#line 929 "string.c"
+ const gchar* _tmp4_ = NULL;
+ gchar* _tmp5_;
#line 140 "/home/jens/Source/shotwell/src/util/string.vala"
- if ((_tmp10_ & PREPARE_INPUT_TEXT_OPTIONS_INVALID_IS_NULL) != 0) {
+ if ((options & PREPARE_INPUT_TEXT_OPTIONS_INVALID_IS_NULL) != 0) {
#line 140 "/home/jens/Source/shotwell/src/util/string.vala"
- _tmp9_ = NULL;
-#line 1004 "string.c"
+ _tmp4_ = NULL;
+#line 936 "string.c"
} else {
#line 140 "/home/jens/Source/shotwell/src/util/string.vala"
- _tmp9_ = "";
-#line 1008 "string.c"
+ _tmp4_ = "";
+#line 940 "string.c"
}
#line 140 "/home/jens/Source/shotwell/src/util/string.vala"
- _tmp11_ = g_strdup (_tmp9_);
+ _tmp5_ = g_strdup (_tmp4_);
#line 140 "/home/jens/Source/shotwell/src/util/string.vala"
- result = _tmp11_;
+ result = _tmp5_;
#line 140 "/home/jens/Source/shotwell/src/util/string.vala"
_g_free0 (prepped);
#line 140 "/home/jens/Source/shotwell/src/util/string.vala"
return result;
-#line 1018 "string.c"
+#line 950 "string.c"
}
}
}
#line 149 "/home/jens/Source/shotwell/src/util/string.vala"
- _tmp12_ = options;
-#line 149 "/home/jens/Source/shotwell/src/util/string.vala"
- if ((_tmp12_ & PREPARE_INPUT_TEXT_OPTIONS_NORMALIZE) != 0) {
-#line 1026 "string.c"
- const gchar* _tmp13_;
- gchar* _tmp14_;
+ if ((options & PREPARE_INPUT_TEXT_OPTIONS_NORMALIZE) != 0) {
+#line 956 "string.c"
+ const gchar* _tmp6_;
+ gchar* _tmp7_;
#line 150 "/home/jens/Source/shotwell/src/util/string.vala"
- _tmp13_ = prepped;
+ _tmp6_ = prepped;
#line 150 "/home/jens/Source/shotwell/src/util/string.vala"
- _tmp14_ = g_utf8_normalize (_tmp13_, (gssize) -1, G_NORMALIZE_NFC);
+ _tmp7_ = g_utf8_normalize (_tmp6_, (gssize) -1, G_NORMALIZE_NFC);
#line 150 "/home/jens/Source/shotwell/src/util/string.vala"
_g_free0 (prepped);
#line 150 "/home/jens/Source/shotwell/src/util/string.vala"
- prepped = _tmp14_;
-#line 1037 "string.c"
+ prepped = _tmp7_;
+#line 967 "string.c"
}
#line 152 "/home/jens/Source/shotwell/src/util/string.vala"
- _tmp15_ = options;
-#line 152 "/home/jens/Source/shotwell/src/util/string.vala"
- if ((_tmp15_ & PREPARE_INPUT_TEXT_OPTIONS_STRIP) != 0) {
-#line 1043 "string.c"
- const gchar* _tmp16_;
- gchar* _tmp17_;
+ if ((options & PREPARE_INPUT_TEXT_OPTIONS_STRIP) != 0) {
+#line 971 "string.c"
+ const gchar* _tmp8_;
+ gchar* _tmp9_;
#line 153 "/home/jens/Source/shotwell/src/util/string.vala"
- _tmp16_ = prepped;
+ _tmp8_ = prepped;
#line 153 "/home/jens/Source/shotwell/src/util/string.vala"
- _tmp17_ = string_strip (_tmp16_);
+ _tmp9_ = string_strip (_tmp8_);
#line 153 "/home/jens/Source/shotwell/src/util/string.vala"
_g_free0 (prepped);
#line 153 "/home/jens/Source/shotwell/src/util/string.vala"
- prepped = _tmp17_;
-#line 1054 "string.c"
+ prepped = _tmp9_;
+#line 982 "string.c"
}
#line 157 "/home/jens/Source/shotwell/src/util/string.vala"
- _tmp18_ = options;
-#line 157 "/home/jens/Source/shotwell/src/util/string.vala"
- if ((_tmp18_ & PREPARE_INPUT_TEXT_OPTIONS_STRIP_CRLF) != 0) {
-#line 1060 "string.c"
- const gchar* _tmp19_;
- gchar* _tmp20_;
+ if ((options & PREPARE_INPUT_TEXT_OPTIONS_STRIP_CRLF) != 0) {
+#line 986 "string.c"
+ const gchar* _tmp10_;
+ gchar* _tmp11_;
#line 158 "/home/jens/Source/shotwell/src/util/string.vala"
- _tmp19_ = prepped;
+ _tmp10_ = prepped;
#line 158 "/home/jens/Source/shotwell/src/util/string.vala"
- _tmp20_ = string_delimit (_tmp19_, "\n\r", ' ');
+ _tmp11_ = string_delimit (_tmp10_, "\n\r", ' ');
#line 158 "/home/jens/Source/shotwell/src/util/string.vala"
_g_free0 (prepped);
#line 158 "/home/jens/Source/shotwell/src/util/string.vala"
- prepped = _tmp20_;
-#line 1071 "string.c"
+ prepped = _tmp11_;
+#line 997 "string.c"
}
#line 160 "/home/jens/Source/shotwell/src/util/string.vala"
- _tmp22_ = options;
-#line 160 "/home/jens/Source/shotwell/src/util/string.vala"
- if ((_tmp22_ & PREPARE_INPUT_TEXT_OPTIONS_EMPTY_IS_NULL) != 0) {
-#line 1077 "string.c"
- const gchar* _tmp23_;
- gboolean _tmp24_;
-#line 160 "/home/jens/Source/shotwell/src/util/string.vala"
- _tmp23_ = prepped;
+ if ((options & PREPARE_INPUT_TEXT_OPTIONS_EMPTY_IS_NULL) != 0) {
+#line 1001 "string.c"
+ const gchar* _tmp13_;
#line 160 "/home/jens/Source/shotwell/src/util/string.vala"
- _tmp24_ = is_string_empty (_tmp23_);
+ _tmp13_ = prepped;
#line 160 "/home/jens/Source/shotwell/src/util/string.vala"
- _tmp21_ = _tmp24_;
-#line 1086 "string.c"
+ _tmp12_ = is_string_empty (_tmp13_);
+#line 1007 "string.c"
} else {
#line 160 "/home/jens/Source/shotwell/src/util/string.vala"
- _tmp21_ = FALSE;
-#line 1090 "string.c"
+ _tmp12_ = FALSE;
+#line 1011 "string.c"
}
#line 160 "/home/jens/Source/shotwell/src/util/string.vala"
- if (_tmp21_) {
+ if (_tmp12_) {
#line 161 "/home/jens/Source/shotwell/src/util/string.vala"
result = NULL;
#line 161 "/home/jens/Source/shotwell/src/util/string.vala"
_g_free0 (prepped);
#line 161 "/home/jens/Source/shotwell/src/util/string.vala"
return result;
-#line 1100 "string.c"
+#line 1021 "string.c"
}
#line 166 "/home/jens/Source/shotwell/src/util/string.vala"
- _tmp25_ = dest_length;
-#line 166 "/home/jens/Source/shotwell/src/util/string.vala"
- if (_tmp25_ >= 0) {
-#line 1106 "string.c"
+ if (dest_length >= 0) {
+#line 1025 "string.c"
GString* sb = NULL;
- const gchar* _tmp26_;
- GString* _tmp27_;
- GString* _tmp28_;
- gint _tmp29_;
- GString* _tmp30_;
- const gchar* _tmp31_;
- gchar* _tmp32_;
+ const gchar* _tmp14_;
+ GString* _tmp15_;
+ GString* _tmp16_;
+ GString* _tmp17_;
+ const gchar* _tmp18_;
+ gchar* _tmp19_;
#line 167 "/home/jens/Source/shotwell/src/util/string.vala"
- _tmp26_ = prepped;
+ _tmp14_ = prepped;
#line 167 "/home/jens/Source/shotwell/src/util/string.vala"
- _tmp27_ = g_string_new (_tmp26_);
+ _tmp15_ = g_string_new (_tmp14_);
#line 167 "/home/jens/Source/shotwell/src/util/string.vala"
- sb = _tmp27_;
+ sb = _tmp15_;
#line 168 "/home/jens/Source/shotwell/src/util/string.vala"
- _tmp28_ = sb;
+ _tmp16_ = sb;
#line 168 "/home/jens/Source/shotwell/src/util/string.vala"
- _tmp29_ = dest_length;
-#line 168 "/home/jens/Source/shotwell/src/util/string.vala"
- g_string_truncate (_tmp28_, (gsize) _tmp29_);
+ g_string_truncate (_tmp16_, (gsize) dest_length);
#line 169 "/home/jens/Source/shotwell/src/util/string.vala"
- _tmp30_ = sb;
+ _tmp17_ = sb;
#line 169 "/home/jens/Source/shotwell/src/util/string.vala"
- _tmp31_ = _tmp30_->str;
+ _tmp18_ = _tmp17_->str;
#line 169 "/home/jens/Source/shotwell/src/util/string.vala"
- _tmp32_ = g_strdup (_tmp31_);
+ _tmp19_ = g_strdup (_tmp18_);
#line 169 "/home/jens/Source/shotwell/src/util/string.vala"
- result = _tmp32_;
+ result = _tmp19_;
#line 169 "/home/jens/Source/shotwell/src/util/string.vala"
_g_string_free0 (sb);
#line 169 "/home/jens/Source/shotwell/src/util/string.vala"
_g_free0 (prepped);
#line 169 "/home/jens/Source/shotwell/src/util/string.vala"
return result;
-#line 1141 "string.c"
+#line 1057 "string.c"
}
#line 173 "/home/jens/Source/shotwell/src/util/string.vala"
result = prepped;
#line 173 "/home/jens/Source/shotwell/src/util/string.vala"
return result;
-#line 1147 "string.c"
+#line 1063 "string.c"
}
-gint64 parse_int64 (const gchar* str, gint num_base) {
+gint64
+parse_int64 (const gchar* str,
+ gint num_base)
+{
gint64 result = 0LL;
- const gchar* _tmp0_;
- gint _tmp1_;
- gint64 _tmp2_;
+ gint64 _tmp0_;
#line 176 "/home/jens/Source/shotwell/src/util/string.vala"
g_return_val_if_fail (str != NULL, 0LL);
#line 177 "/home/jens/Source/shotwell/src/util/string.vala"
- _tmp0_ = str;
-#line 177 "/home/jens/Source/shotwell/src/util/string.vala"
- _tmp1_ = num_base;
+ _tmp0_ = g_ascii_strtoll (str, NULL, (guint) num_base);
#line 177 "/home/jens/Source/shotwell/src/util/string.vala"
- _tmp2_ = g_ascii_strtoll (_tmp0_, NULL, (guint) _tmp1_);
-#line 177 "/home/jens/Source/shotwell/src/util/string.vala"
- result = _tmp2_;
+ result = _tmp0_;
#line 177 "/home/jens/Source/shotwell/src/util/string.vala"
return result;
-#line 1168 "string.c"
+#line 1081 "string.c"
}
-static gint string_index_of_char (const gchar* self, gunichar c, gint start_index) {
+static gint
+string_index_of_char (const gchar* self,
+ gunichar c,
+ gint start_index)
+{
gint result = 0;
gchar* _result_ = NULL;
- gint _tmp0_;
- gunichar _tmp1_;
- gchar* _tmp2_;
- gchar* _tmp3_;
-#line 1031 "/usr/share/vala-0.36/vapi/glib-2.0.vapi"
+ gchar* _tmp0_;
+ gchar* _tmp1_;
+#line 1045 "/usr/share/vala-0.40/vapi/glib-2.0.vapi"
g_return_val_if_fail (self != NULL, 0);
-#line 1032 "/usr/share/vala-0.36/vapi/glib-2.0.vapi"
- _tmp0_ = start_index;
-#line 1032 "/usr/share/vala-0.36/vapi/glib-2.0.vapi"
- _tmp1_ = c;
-#line 1032 "/usr/share/vala-0.36/vapi/glib-2.0.vapi"
- _tmp2_ = g_utf8_strchr (((gchar*) self) + _tmp0_, (gssize) -1, _tmp1_);
-#line 1032 "/usr/share/vala-0.36/vapi/glib-2.0.vapi"
- _result_ = _tmp2_;
-#line 1034 "/usr/share/vala-0.36/vapi/glib-2.0.vapi"
- _tmp3_ = _result_;
-#line 1034 "/usr/share/vala-0.36/vapi/glib-2.0.vapi"
- if (_tmp3_ != NULL) {
-#line 1193 "string.c"
- gchar* _tmp4_;
-#line 1035 "/usr/share/vala-0.36/vapi/glib-2.0.vapi"
- _tmp4_ = _result_;
-#line 1035 "/usr/share/vala-0.36/vapi/glib-2.0.vapi"
- result = (gint) (_tmp4_ - ((gchar*) self));
-#line 1035 "/usr/share/vala-0.36/vapi/glib-2.0.vapi"
+#line 1046 "/usr/share/vala-0.40/vapi/glib-2.0.vapi"
+ _tmp0_ = g_utf8_strchr (((gchar*) self) + start_index, (gssize) -1, c);
+#line 1046 "/usr/share/vala-0.40/vapi/glib-2.0.vapi"
+ _result_ = _tmp0_;
+#line 1048 "/usr/share/vala-0.40/vapi/glib-2.0.vapi"
+ _tmp1_ = _result_;
+#line 1048 "/usr/share/vala-0.40/vapi/glib-2.0.vapi"
+ if (_tmp1_ != NULL) {
+#line 1104 "string.c"
+ gchar* _tmp2_;
+#line 1049 "/usr/share/vala-0.40/vapi/glib-2.0.vapi"
+ _tmp2_ = _result_;
+#line 1049 "/usr/share/vala-0.40/vapi/glib-2.0.vapi"
+ result = (gint) (_tmp2_ - ((gchar*) self));
+#line 1049 "/usr/share/vala-0.40/vapi/glib-2.0.vapi"
return result;
-#line 1201 "string.c"
+#line 1112 "string.c"
} else {
-#line 1037 "/usr/share/vala-0.36/vapi/glib-2.0.vapi"
+#line 1051 "/usr/share/vala-0.40/vapi/glib-2.0.vapi"
result = -1;
-#line 1037 "/usr/share/vala-0.36/vapi/glib-2.0.vapi"
+#line 1051 "/usr/share/vala-0.40/vapi/glib-2.0.vapi"
return result;
-#line 1207 "string.c"
+#line 1118 "string.c"
}
}
-inline gboolean string_contains_char (const gchar* haystack, gunichar needle) {
+inline gboolean
+string_contains_char (const gchar* haystack,
+ gunichar needle)
+{
gboolean result = FALSE;
- const gchar* _tmp0_;
- gunichar _tmp1_;
- gint _tmp2_;
#line 182 "/home/jens/Source/shotwell/src/util/string.vala"
g_return_val_if_fail (haystack != NULL, FALSE);
#line 183 "/home/jens/Source/shotwell/src/util/string.vala"
- _tmp0_ = haystack;
-#line 183 "/home/jens/Source/shotwell/src/util/string.vala"
- _tmp1_ = needle;
-#line 183 "/home/jens/Source/shotwell/src/util/string.vala"
- _tmp2_ = string_index_of_char (_tmp0_, _tmp1_, 0);
-#line 183 "/home/jens/Source/shotwell/src/util/string.vala"
- result = _tmp2_ >= 0;
+ result = string_index_of_char (haystack, needle, 0) >= 0;
#line 183 "/home/jens/Source/shotwell/src/util/string.vala"
return result;
-#line 1229 "string.c"
+#line 1134 "string.c"
}
-static gint string_index_of (const gchar* self, const gchar* needle, gint start_index) {
+static gint
+string_index_of (const gchar* self,
+ const gchar* needle,
+ gint start_index)
+{
gint result = 0;
gchar* _result_ = NULL;
- gint _tmp0_;
- const gchar* _tmp1_;
- gchar* _tmp2_;
- gchar* _tmp3_;
-#line 1011 "/usr/share/vala-0.36/vapi/glib-2.0.vapi"
+ gchar* _tmp0_;
+ gchar* _tmp1_;
+#line 1025 "/usr/share/vala-0.40/vapi/glib-2.0.vapi"
g_return_val_if_fail (self != NULL, 0);
-#line 1011 "/usr/share/vala-0.36/vapi/glib-2.0.vapi"
+#line 1025 "/usr/share/vala-0.40/vapi/glib-2.0.vapi"
g_return_val_if_fail (needle != NULL, 0);
-#line 1012 "/usr/share/vala-0.36/vapi/glib-2.0.vapi"
- _tmp0_ = start_index;
-#line 1012 "/usr/share/vala-0.36/vapi/glib-2.0.vapi"
- _tmp1_ = needle;
-#line 1012 "/usr/share/vala-0.36/vapi/glib-2.0.vapi"
- _tmp2_ = strstr (((gchar*) self) + _tmp0_, (gchar*) _tmp1_);
-#line 1012 "/usr/share/vala-0.36/vapi/glib-2.0.vapi"
- _result_ = _tmp2_;
-#line 1014 "/usr/share/vala-0.36/vapi/glib-2.0.vapi"
- _tmp3_ = _result_;
-#line 1014 "/usr/share/vala-0.36/vapi/glib-2.0.vapi"
- if (_tmp3_ != NULL) {
-#line 1256 "string.c"
- gchar* _tmp4_;
-#line 1015 "/usr/share/vala-0.36/vapi/glib-2.0.vapi"
- _tmp4_ = _result_;
-#line 1015 "/usr/share/vala-0.36/vapi/glib-2.0.vapi"
- result = (gint) (_tmp4_ - ((gchar*) self));
-#line 1015 "/usr/share/vala-0.36/vapi/glib-2.0.vapi"
+#line 1026 "/usr/share/vala-0.40/vapi/glib-2.0.vapi"
+ _tmp0_ = strstr (((gchar*) self) + start_index, (gchar*) needle);
+#line 1026 "/usr/share/vala-0.40/vapi/glib-2.0.vapi"
+ _result_ = _tmp0_;
+#line 1028 "/usr/share/vala-0.40/vapi/glib-2.0.vapi"
+ _tmp1_ = _result_;
+#line 1028 "/usr/share/vala-0.40/vapi/glib-2.0.vapi"
+ if (_tmp1_ != NULL) {
+#line 1159 "string.c"
+ gchar* _tmp2_;
+#line 1029 "/usr/share/vala-0.40/vapi/glib-2.0.vapi"
+ _tmp2_ = _result_;
+#line 1029 "/usr/share/vala-0.40/vapi/glib-2.0.vapi"
+ result = (gint) (_tmp2_ - ((gchar*) self));
+#line 1029 "/usr/share/vala-0.40/vapi/glib-2.0.vapi"
return result;
-#line 1264 "string.c"
+#line 1167 "string.c"
} else {
-#line 1017 "/usr/share/vala-0.36/vapi/glib-2.0.vapi"
+#line 1031 "/usr/share/vala-0.40/vapi/glib-2.0.vapi"
result = -1;
-#line 1017 "/usr/share/vala-0.36/vapi/glib-2.0.vapi"
+#line 1031 "/usr/share/vala-0.40/vapi/glib-2.0.vapi"
return result;
-#line 1270 "string.c"
+#line 1173 "string.c"
}
}
-inline gboolean string_contains_str (const gchar* haystack, const gchar* needle) {
+inline gboolean
+string_contains_str (const gchar* haystack,
+ const gchar* needle)
+{
gboolean result = FALSE;
- const gchar* _tmp0_;
- const gchar* _tmp1_;
- gint _tmp2_;
#line 186 "/home/jens/Source/shotwell/src/util/string.vala"
g_return_val_if_fail (haystack != NULL, FALSE);
#line 186 "/home/jens/Source/shotwell/src/util/string.vala"
g_return_val_if_fail (needle != NULL, FALSE);
#line 187 "/home/jens/Source/shotwell/src/util/string.vala"
- _tmp0_ = haystack;
-#line 187 "/home/jens/Source/shotwell/src/util/string.vala"
- _tmp1_ = needle;
-#line 187 "/home/jens/Source/shotwell/src/util/string.vala"
- _tmp2_ = string_index_of (_tmp0_, _tmp1_, 0);
-#line 187 "/home/jens/Source/shotwell/src/util/string.vala"
- result = _tmp2_ >= 0;
+ result = string_index_of (haystack, needle, 0) >= 0;
#line 187 "/home/jens/Source/shotwell/src/util/string.vala"
return result;
-#line 1294 "string.c"
+#line 1191 "string.c"
}
-static gchar* string_slice (const gchar* self, glong start, glong end) {
+static gchar*
+string_slice (const gchar* self,
+ glong start,
+ glong end)
+{
gchar* result = NULL;
glong string_length = 0L;
gint _tmp0_;
gint _tmp1_;
- glong _tmp2_;
- glong _tmp5_;
- gboolean _tmp8_ = FALSE;
- glong _tmp9_;
- gboolean _tmp12_ = FALSE;
- glong _tmp13_;
- glong _tmp16_;
- glong _tmp17_;
- glong _tmp18_;
- glong _tmp19_;
- glong _tmp20_;
- gchar* _tmp21_;
-#line 1355 "/usr/share/vala-0.36/vapi/glib-2.0.vapi"
+ gboolean _tmp4_ = FALSE;
+ gboolean _tmp6_ = FALSE;
+ gchar* _tmp8_;
+#line 1369 "/usr/share/vala-0.40/vapi/glib-2.0.vapi"
g_return_val_if_fail (self != NULL, NULL);
-#line 1356 "/usr/share/vala-0.36/vapi/glib-2.0.vapi"
+#line 1370 "/usr/share/vala-0.40/vapi/glib-2.0.vapi"
_tmp0_ = strlen (self);
-#line 1356 "/usr/share/vala-0.36/vapi/glib-2.0.vapi"
+#line 1370 "/usr/share/vala-0.40/vapi/glib-2.0.vapi"
_tmp1_ = _tmp0_;
-#line 1356 "/usr/share/vala-0.36/vapi/glib-2.0.vapi"
+#line 1370 "/usr/share/vala-0.40/vapi/glib-2.0.vapi"
string_length = (glong) _tmp1_;
-#line 1357 "/usr/share/vala-0.36/vapi/glib-2.0.vapi"
- _tmp2_ = start;
-#line 1357 "/usr/share/vala-0.36/vapi/glib-2.0.vapi"
- if (_tmp2_ < ((glong) 0)) {
-#line 1327 "string.c"
+#line 1371 "/usr/share/vala-0.40/vapi/glib-2.0.vapi"
+ if (start < ((glong) 0)) {
+#line 1217 "string.c"
+ glong _tmp2_;
+#line 1372 "/usr/share/vala-0.40/vapi/glib-2.0.vapi"
+ _tmp2_ = string_length;
+#line 1372 "/usr/share/vala-0.40/vapi/glib-2.0.vapi"
+ start = _tmp2_ + start;
+#line 1223 "string.c"
+ }
+#line 1374 "/usr/share/vala-0.40/vapi/glib-2.0.vapi"
+ if (end < ((glong) 0)) {
+#line 1227 "string.c"
glong _tmp3_;
- glong _tmp4_;
-#line 1358 "/usr/share/vala-0.36/vapi/glib-2.0.vapi"
+#line 1375 "/usr/share/vala-0.40/vapi/glib-2.0.vapi"
_tmp3_ = string_length;
-#line 1358 "/usr/share/vala-0.36/vapi/glib-2.0.vapi"
- _tmp4_ = start;
-#line 1358 "/usr/share/vala-0.36/vapi/glib-2.0.vapi"
- start = _tmp3_ + _tmp4_;
-#line 1336 "string.c"
- }
-#line 1360 "/usr/share/vala-0.36/vapi/glib-2.0.vapi"
- _tmp5_ = end;
-#line 1360 "/usr/share/vala-0.36/vapi/glib-2.0.vapi"
- if (_tmp5_ < ((glong) 0)) {
-#line 1342 "string.c"
- glong _tmp6_;
- glong _tmp7_;
-#line 1361 "/usr/share/vala-0.36/vapi/glib-2.0.vapi"
- _tmp6_ = string_length;
-#line 1361 "/usr/share/vala-0.36/vapi/glib-2.0.vapi"
- _tmp7_ = end;
-#line 1361 "/usr/share/vala-0.36/vapi/glib-2.0.vapi"
- end = _tmp6_ + _tmp7_;
-#line 1351 "string.c"
+#line 1375 "/usr/share/vala-0.40/vapi/glib-2.0.vapi"
+ end = _tmp3_ + end;
+#line 1233 "string.c"
}
-#line 1363 "/usr/share/vala-0.36/vapi/glib-2.0.vapi"
- _tmp9_ = start;
-#line 1363 "/usr/share/vala-0.36/vapi/glib-2.0.vapi"
- if (_tmp9_ >= ((glong) 0)) {
-#line 1357 "string.c"
- glong _tmp10_;
- glong _tmp11_;
-#line 1363 "/usr/share/vala-0.36/vapi/glib-2.0.vapi"
- _tmp10_ = start;
-#line 1363 "/usr/share/vala-0.36/vapi/glib-2.0.vapi"
- _tmp11_ = string_length;
-#line 1363 "/usr/share/vala-0.36/vapi/glib-2.0.vapi"
- _tmp8_ = _tmp10_ <= _tmp11_;
-#line 1366 "string.c"
+#line 1377 "/usr/share/vala-0.40/vapi/glib-2.0.vapi"
+ if (start >= ((glong) 0)) {
+#line 1237 "string.c"
+ glong _tmp5_;
+#line 1377 "/usr/share/vala-0.40/vapi/glib-2.0.vapi"
+ _tmp5_ = string_length;
+#line 1377 "/usr/share/vala-0.40/vapi/glib-2.0.vapi"
+ _tmp4_ = start <= _tmp5_;
+#line 1243 "string.c"
} else {
-#line 1363 "/usr/share/vala-0.36/vapi/glib-2.0.vapi"
- _tmp8_ = FALSE;
-#line 1370 "string.c"
+#line 1377 "/usr/share/vala-0.40/vapi/glib-2.0.vapi"
+ _tmp4_ = FALSE;
+#line 1247 "string.c"
}
-#line 1363 "/usr/share/vala-0.36/vapi/glib-2.0.vapi"
- g_return_val_if_fail (_tmp8_, NULL);
-#line 1364 "/usr/share/vala-0.36/vapi/glib-2.0.vapi"
- _tmp13_ = end;
-#line 1364 "/usr/share/vala-0.36/vapi/glib-2.0.vapi"
- if (_tmp13_ >= ((glong) 0)) {
-#line 1378 "string.c"
- glong _tmp14_;
- glong _tmp15_;
-#line 1364 "/usr/share/vala-0.36/vapi/glib-2.0.vapi"
- _tmp14_ = end;
-#line 1364 "/usr/share/vala-0.36/vapi/glib-2.0.vapi"
- _tmp15_ = string_length;
-#line 1364 "/usr/share/vala-0.36/vapi/glib-2.0.vapi"
- _tmp12_ = _tmp14_ <= _tmp15_;
-#line 1387 "string.c"
+#line 1377 "/usr/share/vala-0.40/vapi/glib-2.0.vapi"
+ g_return_val_if_fail (_tmp4_, NULL);
+#line 1378 "/usr/share/vala-0.40/vapi/glib-2.0.vapi"
+ if (end >= ((glong) 0)) {
+#line 1253 "string.c"
+ glong _tmp7_;
+#line 1378 "/usr/share/vala-0.40/vapi/glib-2.0.vapi"
+ _tmp7_ = string_length;
+#line 1378 "/usr/share/vala-0.40/vapi/glib-2.0.vapi"
+ _tmp6_ = end <= _tmp7_;
+#line 1259 "string.c"
} else {
-#line 1364 "/usr/share/vala-0.36/vapi/glib-2.0.vapi"
- _tmp12_ = FALSE;
-#line 1391 "string.c"
+#line 1378 "/usr/share/vala-0.40/vapi/glib-2.0.vapi"
+ _tmp6_ = FALSE;
+#line 1263 "string.c"
}
-#line 1364 "/usr/share/vala-0.36/vapi/glib-2.0.vapi"
- g_return_val_if_fail (_tmp12_, NULL);
-#line 1365 "/usr/share/vala-0.36/vapi/glib-2.0.vapi"
- _tmp16_ = start;
-#line 1365 "/usr/share/vala-0.36/vapi/glib-2.0.vapi"
- _tmp17_ = end;
-#line 1365 "/usr/share/vala-0.36/vapi/glib-2.0.vapi"
- g_return_val_if_fail (_tmp16_ <= _tmp17_, NULL);
-#line 1366 "/usr/share/vala-0.36/vapi/glib-2.0.vapi"
- _tmp18_ = start;
-#line 1366 "/usr/share/vala-0.36/vapi/glib-2.0.vapi"
- _tmp19_ = end;
-#line 1366 "/usr/share/vala-0.36/vapi/glib-2.0.vapi"
- _tmp20_ = start;
-#line 1366 "/usr/share/vala-0.36/vapi/glib-2.0.vapi"
- _tmp21_ = g_strndup (((gchar*) self) + _tmp18_, (gsize) (_tmp19_ - _tmp20_));
-#line 1366 "/usr/share/vala-0.36/vapi/glib-2.0.vapi"
- result = _tmp21_;
-#line 1366 "/usr/share/vala-0.36/vapi/glib-2.0.vapi"
+#line 1378 "/usr/share/vala-0.40/vapi/glib-2.0.vapi"
+ g_return_val_if_fail (_tmp6_, NULL);
+#line 1379 "/usr/share/vala-0.40/vapi/glib-2.0.vapi"
+ g_return_val_if_fail (start <= end, NULL);
+#line 1380 "/usr/share/vala-0.40/vapi/glib-2.0.vapi"
+ _tmp8_ = g_strndup (((gchar*) self) + start, (gsize) (end - start));
+#line 1380 "/usr/share/vala-0.40/vapi/glib-2.0.vapi"
+ result = _tmp8_;
+#line 1380 "/usr/share/vala-0.40/vapi/glib-2.0.vapi"
return result;
-#line 1413 "string.c"
+#line 1275 "string.c"
}
-inline gchar* string_sliced_at (const gchar* str, gint index) {
+inline gchar*
+string_sliced_at (const gchar* str,
+ gint index)
+{
gchar* result = NULL;
gchar* _tmp0_ = NULL;
- gint _tmp1_;
#line 190 "/home/jens/Source/shotwell/src/util/string.vala"
g_return_val_if_fail (str != NULL, NULL);
#line 191 "/home/jens/Source/shotwell/src/util/string.vala"
- _tmp1_ = index;
-#line 191 "/home/jens/Source/shotwell/src/util/string.vala"
- if (_tmp1_ >= 0) {
-#line 1427 "string.c"
- const gchar* _tmp2_;
- gint _tmp3_;
- const gchar* _tmp4_;
- gint _tmp5_;
- gint _tmp6_;
- gchar* _tmp7_;
-#line 191 "/home/jens/Source/shotwell/src/util/string.vala"
- _tmp2_ = str;
-#line 191 "/home/jens/Source/shotwell/src/util/string.vala"
- _tmp3_ = index;
-#line 191 "/home/jens/Source/shotwell/src/util/string.vala"
- _tmp4_ = str;
+ if (index >= 0) {
+#line 1289 "string.c"
+ gint _tmp1_;
+ gint _tmp2_;
+ gchar* _tmp3_;
#line 191 "/home/jens/Source/shotwell/src/util/string.vala"
- _tmp5_ = strlen (_tmp4_);
+ _tmp1_ = strlen (str);
#line 191 "/home/jens/Source/shotwell/src/util/string.vala"
- _tmp6_ = _tmp5_;
+ _tmp2_ = _tmp1_;
#line 191 "/home/jens/Source/shotwell/src/util/string.vala"
- _tmp7_ = string_slice (_tmp2_, (glong) _tmp3_, (glong) _tmp6_);
+ _tmp3_ = string_slice (str, (glong) index, (glong) _tmp2_);
#line 191 "/home/jens/Source/shotwell/src/util/string.vala"
_g_free0 (_tmp0_);
#line 191 "/home/jens/Source/shotwell/src/util/string.vala"
- _tmp0_ = _tmp7_;
-#line 1450 "string.c"
+ _tmp0_ = _tmp3_;
+#line 1303 "string.c"
} else {
#line 191 "/home/jens/Source/shotwell/src/util/string.vala"
_g_free0 (_tmp0_);
#line 191 "/home/jens/Source/shotwell/src/util/string.vala"
_tmp0_ = NULL;
-#line 1456 "string.c"
+#line 1309 "string.c"
}
#line 191 "/home/jens/Source/shotwell/src/util/string.vala"
result = _tmp0_;
#line 191 "/home/jens/Source/shotwell/src/util/string.vala"
return result;
-#line 1462 "string.c"
+#line 1315 "string.c"
}
-inline gchar* string_sliced_at_first_str (const gchar* haystack, const gchar* needle, gint start_index) {
+inline gchar*
+string_sliced_at_first_str (const gchar* haystack,
+ const gchar* needle,
+ gint start_index)
+{
gchar* result = NULL;
- const gchar* _tmp0_;
- const gchar* _tmp1_;
- const gchar* _tmp2_;
- gint _tmp3_;
- gint _tmp4_;
- gchar* _tmp5_;
+ gchar* _tmp0_;
#line 194 "/home/jens/Source/shotwell/src/util/string.vala"
g_return_val_if_fail (haystack != NULL, NULL);
#line 194 "/home/jens/Source/shotwell/src/util/string.vala"
g_return_val_if_fail (needle != NULL, NULL);
#line 195 "/home/jens/Source/shotwell/src/util/string.vala"
- _tmp0_ = haystack;
-#line 195 "/home/jens/Source/shotwell/src/util/string.vala"
- _tmp1_ = haystack;
-#line 195 "/home/jens/Source/shotwell/src/util/string.vala"
- _tmp2_ = needle;
-#line 195 "/home/jens/Source/shotwell/src/util/string.vala"
- _tmp3_ = start_index;
-#line 195 "/home/jens/Source/shotwell/src/util/string.vala"
- _tmp4_ = string_index_of (_tmp1_, _tmp2_, _tmp3_);
-#line 195 "/home/jens/Source/shotwell/src/util/string.vala"
- _tmp5_ = string_sliced_at (_tmp0_, _tmp4_);
+ _tmp0_ = string_sliced_at (haystack, string_index_of (haystack, needle, start_index));
#line 195 "/home/jens/Source/shotwell/src/util/string.vala"
- result = _tmp5_;
+ result = _tmp0_;
#line 195 "/home/jens/Source/shotwell/src/util/string.vala"
return result;
-#line 1494 "string.c"
+#line 1336 "string.c"
}
-static gint string_last_index_of (const gchar* self, const gchar* needle, gint start_index) {
+static gint
+string_last_index_of (const gchar* self,
+ const gchar* needle,
+ gint start_index)
+{
gint result = 0;
gchar* _result_ = NULL;
- gint _tmp0_;
- const gchar* _tmp1_;
- gchar* _tmp2_;
- gchar* _tmp3_;
-#line 1021 "/usr/share/vala-0.36/vapi/glib-2.0.vapi"
+ gchar* _tmp0_;
+ gchar* _tmp1_;
+#line 1035 "/usr/share/vala-0.40/vapi/glib-2.0.vapi"
g_return_val_if_fail (self != NULL, 0);
-#line 1021 "/usr/share/vala-0.36/vapi/glib-2.0.vapi"
+#line 1035 "/usr/share/vala-0.40/vapi/glib-2.0.vapi"
g_return_val_if_fail (needle != NULL, 0);
-#line 1022 "/usr/share/vala-0.36/vapi/glib-2.0.vapi"
- _tmp0_ = start_index;
-#line 1022 "/usr/share/vala-0.36/vapi/glib-2.0.vapi"
- _tmp1_ = needle;
-#line 1022 "/usr/share/vala-0.36/vapi/glib-2.0.vapi"
- _tmp2_ = g_strrstr (((gchar*) self) + _tmp0_, (gchar*) _tmp1_);
-#line 1022 "/usr/share/vala-0.36/vapi/glib-2.0.vapi"
- _result_ = _tmp2_;
-#line 1024 "/usr/share/vala-0.36/vapi/glib-2.0.vapi"
- _tmp3_ = _result_;
-#line 1024 "/usr/share/vala-0.36/vapi/glib-2.0.vapi"
- if (_tmp3_ != NULL) {
-#line 1521 "string.c"
- gchar* _tmp4_;
-#line 1025 "/usr/share/vala-0.36/vapi/glib-2.0.vapi"
- _tmp4_ = _result_;
-#line 1025 "/usr/share/vala-0.36/vapi/glib-2.0.vapi"
- result = (gint) (_tmp4_ - ((gchar*) self));
-#line 1025 "/usr/share/vala-0.36/vapi/glib-2.0.vapi"
+#line 1036 "/usr/share/vala-0.40/vapi/glib-2.0.vapi"
+ _tmp0_ = g_strrstr (((gchar*) self) + start_index, (gchar*) needle);
+#line 1036 "/usr/share/vala-0.40/vapi/glib-2.0.vapi"
+ _result_ = _tmp0_;
+#line 1038 "/usr/share/vala-0.40/vapi/glib-2.0.vapi"
+ _tmp1_ = _result_;
+#line 1038 "/usr/share/vala-0.40/vapi/glib-2.0.vapi"
+ if (_tmp1_ != NULL) {
+#line 1361 "string.c"
+ gchar* _tmp2_;
+#line 1039 "/usr/share/vala-0.40/vapi/glib-2.0.vapi"
+ _tmp2_ = _result_;
+#line 1039 "/usr/share/vala-0.40/vapi/glib-2.0.vapi"
+ result = (gint) (_tmp2_ - ((gchar*) self));
+#line 1039 "/usr/share/vala-0.40/vapi/glib-2.0.vapi"
return result;
-#line 1529 "string.c"
+#line 1369 "string.c"
} else {
-#line 1027 "/usr/share/vala-0.36/vapi/glib-2.0.vapi"
+#line 1041 "/usr/share/vala-0.40/vapi/glib-2.0.vapi"
result = -1;
-#line 1027 "/usr/share/vala-0.36/vapi/glib-2.0.vapi"
+#line 1041 "/usr/share/vala-0.40/vapi/glib-2.0.vapi"
return result;
-#line 1535 "string.c"
+#line 1375 "string.c"
}
}
-inline gchar* string_sliced_at_last_str (const gchar* haystack, const gchar* needle, gint start_index) {
+inline gchar*
+string_sliced_at_last_str (const gchar* haystack,
+ const gchar* needle,
+ gint start_index)
+{
gchar* result = NULL;
- const gchar* _tmp0_;
- const gchar* _tmp1_;
- const gchar* _tmp2_;
- gint _tmp3_;
- gint _tmp4_;
- gchar* _tmp5_;
+ gchar* _tmp0_;
#line 198 "/home/jens/Source/shotwell/src/util/string.vala"
g_return_val_if_fail (haystack != NULL, NULL);
#line 198 "/home/jens/Source/shotwell/src/util/string.vala"
g_return_val_if_fail (needle != NULL, NULL);
#line 199 "/home/jens/Source/shotwell/src/util/string.vala"
- _tmp0_ = haystack;
-#line 199 "/home/jens/Source/shotwell/src/util/string.vala"
- _tmp1_ = haystack;
+ _tmp0_ = string_sliced_at (haystack, string_last_index_of (haystack, needle, start_index));
#line 199 "/home/jens/Source/shotwell/src/util/string.vala"
- _tmp2_ = needle;
-#line 199 "/home/jens/Source/shotwell/src/util/string.vala"
- _tmp3_ = start_index;
-#line 199 "/home/jens/Source/shotwell/src/util/string.vala"
- _tmp4_ = string_last_index_of (_tmp1_, _tmp2_, _tmp3_);
-#line 199 "/home/jens/Source/shotwell/src/util/string.vala"
- _tmp5_ = string_sliced_at (_tmp0_, _tmp4_);
-#line 199 "/home/jens/Source/shotwell/src/util/string.vala"
- result = _tmp5_;
+ result = _tmp0_;
#line 199 "/home/jens/Source/shotwell/src/util/string.vala"
return result;
-#line 1568 "string.c"
+#line 1397 "string.c"
}
-inline gchar* string_sliced_at_first_char (const gchar* haystack, gunichar ch, gint start_index) {
+inline gchar*
+string_sliced_at_first_char (const gchar* haystack,
+ gunichar ch,
+ gint start_index)
+{
gchar* result = NULL;
- const gchar* _tmp0_;
- const gchar* _tmp1_;
- gunichar _tmp2_;
- gint _tmp3_;
- gint _tmp4_;
- gchar* _tmp5_;
+ gchar* _tmp0_;
#line 202 "/home/jens/Source/shotwell/src/util/string.vala"
g_return_val_if_fail (haystack != NULL, NULL);
#line 203 "/home/jens/Source/shotwell/src/util/string.vala"
- _tmp0_ = haystack;
-#line 203 "/home/jens/Source/shotwell/src/util/string.vala"
- _tmp1_ = haystack;
-#line 203 "/home/jens/Source/shotwell/src/util/string.vala"
- _tmp2_ = ch;
+ _tmp0_ = string_sliced_at (haystack, string_index_of_char (haystack, ch, start_index));
#line 203 "/home/jens/Source/shotwell/src/util/string.vala"
- _tmp3_ = start_index;
-#line 203 "/home/jens/Source/shotwell/src/util/string.vala"
- _tmp4_ = string_index_of_char (_tmp1_, _tmp2_, _tmp3_);
-#line 203 "/home/jens/Source/shotwell/src/util/string.vala"
- _tmp5_ = string_sliced_at (_tmp0_, _tmp4_);
-#line 203 "/home/jens/Source/shotwell/src/util/string.vala"
- result = _tmp5_;
+ result = _tmp0_;
#line 203 "/home/jens/Source/shotwell/src/util/string.vala"
return result;
-#line 1598 "string.c"
+#line 1416 "string.c"
}
-static gint string_last_index_of_char (const gchar* self, gunichar c, gint start_index) {
+static gint
+string_last_index_of_char (const gchar* self,
+ gunichar c,
+ gint start_index)
+{
gint result = 0;
gchar* _result_ = NULL;
- gint _tmp0_;
- gunichar _tmp1_;
- gchar* _tmp2_;
- gchar* _tmp3_;
-#line 1041 "/usr/share/vala-0.36/vapi/glib-2.0.vapi"
+ gchar* _tmp0_;
+ gchar* _tmp1_;
+#line 1055 "/usr/share/vala-0.40/vapi/glib-2.0.vapi"
g_return_val_if_fail (self != NULL, 0);
-#line 1042 "/usr/share/vala-0.36/vapi/glib-2.0.vapi"
- _tmp0_ = start_index;
-#line 1042 "/usr/share/vala-0.36/vapi/glib-2.0.vapi"
- _tmp1_ = c;
-#line 1042 "/usr/share/vala-0.36/vapi/glib-2.0.vapi"
- _tmp2_ = g_utf8_strrchr (((gchar*) self) + _tmp0_, (gssize) -1, _tmp1_);
-#line 1042 "/usr/share/vala-0.36/vapi/glib-2.0.vapi"
- _result_ = _tmp2_;
-#line 1044 "/usr/share/vala-0.36/vapi/glib-2.0.vapi"
- _tmp3_ = _result_;
-#line 1044 "/usr/share/vala-0.36/vapi/glib-2.0.vapi"
- if (_tmp3_ != NULL) {
-#line 1623 "string.c"
- gchar* _tmp4_;
-#line 1045 "/usr/share/vala-0.36/vapi/glib-2.0.vapi"
- _tmp4_ = _result_;
-#line 1045 "/usr/share/vala-0.36/vapi/glib-2.0.vapi"
- result = (gint) (_tmp4_ - ((gchar*) self));
-#line 1045 "/usr/share/vala-0.36/vapi/glib-2.0.vapi"
+#line 1056 "/usr/share/vala-0.40/vapi/glib-2.0.vapi"
+ _tmp0_ = g_utf8_strrchr (((gchar*) self) + start_index, (gssize) -1, c);
+#line 1056 "/usr/share/vala-0.40/vapi/glib-2.0.vapi"
+ _result_ = _tmp0_;
+#line 1058 "/usr/share/vala-0.40/vapi/glib-2.0.vapi"
+ _tmp1_ = _result_;
+#line 1058 "/usr/share/vala-0.40/vapi/glib-2.0.vapi"
+ if (_tmp1_ != NULL) {
+#line 1439 "string.c"
+ gchar* _tmp2_;
+#line 1059 "/usr/share/vala-0.40/vapi/glib-2.0.vapi"
+ _tmp2_ = _result_;
+#line 1059 "/usr/share/vala-0.40/vapi/glib-2.0.vapi"
+ result = (gint) (_tmp2_ - ((gchar*) self));
+#line 1059 "/usr/share/vala-0.40/vapi/glib-2.0.vapi"
return result;
-#line 1631 "string.c"
+#line 1447 "string.c"
} else {
-#line 1047 "/usr/share/vala-0.36/vapi/glib-2.0.vapi"
+#line 1061 "/usr/share/vala-0.40/vapi/glib-2.0.vapi"
result = -1;
-#line 1047 "/usr/share/vala-0.36/vapi/glib-2.0.vapi"
+#line 1061 "/usr/share/vala-0.40/vapi/glib-2.0.vapi"
return result;
-#line 1637 "string.c"
+#line 1453 "string.c"
}
}
-inline gchar* string_sliced_at_last_char (const gchar* haystack, gunichar ch, gint start_index) {
+inline gchar*
+string_sliced_at_last_char (const gchar* haystack,
+ gunichar ch,
+ gint start_index)
+{
gchar* result = NULL;
- const gchar* _tmp0_;
- const gchar* _tmp1_;
- gunichar _tmp2_;
- gint _tmp3_;
- gint _tmp4_;
- gchar* _tmp5_;
+ gchar* _tmp0_;
#line 206 "/home/jens/Source/shotwell/src/util/string.vala"
g_return_val_if_fail (haystack != NULL, NULL);
#line 207 "/home/jens/Source/shotwell/src/util/string.vala"
- _tmp0_ = haystack;
+ _tmp0_ = string_sliced_at (haystack, string_last_index_of_char (haystack, ch, start_index));
#line 207 "/home/jens/Source/shotwell/src/util/string.vala"
- _tmp1_ = haystack;
-#line 207 "/home/jens/Source/shotwell/src/util/string.vala"
- _tmp2_ = ch;
-#line 207 "/home/jens/Source/shotwell/src/util/string.vala"
- _tmp3_ = start_index;
-#line 207 "/home/jens/Source/shotwell/src/util/string.vala"
- _tmp4_ = string_last_index_of_char (_tmp1_, _tmp2_, _tmp3_);
-#line 207 "/home/jens/Source/shotwell/src/util/string.vala"
- _tmp5_ = string_sliced_at (_tmp0_, _tmp4_);
-#line 207 "/home/jens/Source/shotwell/src/util/string.vala"
- result = _tmp5_;
+ result = _tmp0_;
#line 207 "/home/jens/Source/shotwell/src/util/string.vala"
return result;
-#line 1668 "string.c"
+#line 1473 "string.c"
}
-static gunichar string_get_char (const gchar* self, glong index) {
+static gunichar
+string_get_char (const gchar* self,
+ glong index)
+{
gunichar result = 0U;
- glong _tmp0_;
- gunichar _tmp1_;
-#line 1140 "/usr/share/vala-0.36/vapi/glib-2.0.vapi"
+#line 1154 "/usr/share/vala-0.40/vapi/glib-2.0.vapi"
g_return_val_if_fail (self != NULL, 0U);
-#line 1141 "/usr/share/vala-0.36/vapi/glib-2.0.vapi"
- _tmp0_ = index;
-#line 1141 "/usr/share/vala-0.36/vapi/glib-2.0.vapi"
- _tmp1_ = g_utf8_get_char (((gchar*) self) + _tmp0_);
-#line 1141 "/usr/share/vala-0.36/vapi/glib-2.0.vapi"
- result = _tmp1_;
-#line 1141 "/usr/share/vala-0.36/vapi/glib-2.0.vapi"
+#line 1155 "/usr/share/vala-0.40/vapi/glib-2.0.vapi"
+ result = g_utf8_get_char (((gchar*) self) + index);
+#line 1155 "/usr/share/vala-0.40/vapi/glib-2.0.vapi"
return result;
-#line 1686 "string.c"
+#line 1488 "string.c"
}
-gchar* string_strip_leading_zeroes (const gchar* str) {
+gchar*
+string_strip_leading_zeroes (const gchar* str)
+{
gchar* result = NULL;
GString* stripped = NULL;
GString* _tmp0_;
gboolean prev_is_space = FALSE;
- GString* _tmp16_;
- const gchar* _tmp17_;
- gchar* _tmp18_;
+ GString* _tmp12_;
+ const gchar* _tmp13_;
+ gchar* _tmp14_;
#line 211 "/home/jens/Source/shotwell/src/util/string.vala"
g_return_val_if_fail (str != NULL, NULL);
#line 212 "/home/jens/Source/shotwell/src/util/string.vala"
@@ -1703,184 +1507,169 @@ gchar* string_strip_leading_zeroes (const gchar* str) {
stripped = _tmp0_;
#line 213 "/home/jens/Source/shotwell/src/util/string.vala"
prev_is_space = TRUE;
-#line 1706 "string.c"
+#line 1510 "string.c"
{
const gchar* iter = NULL;
- const gchar* _tmp1_;
-#line 214 "/home/jens/Source/shotwell/src/util/string.vala"
- _tmp1_ = str;
#line 214 "/home/jens/Source/shotwell/src/util/string.vala"
- iter = _tmp1_;
-#line 1714 "string.c"
+ iter = str;
+#line 1515 "string.c"
{
- gboolean _tmp2_ = FALSE;
+ gboolean _tmp1_ = FALSE;
#line 214 "/home/jens/Source/shotwell/src/util/string.vala"
- _tmp2_ = TRUE;
+ _tmp1_ = TRUE;
#line 214 "/home/jens/Source/shotwell/src/util/string.vala"
while (TRUE) {
-#line 1721 "string.c"
- const gchar* _tmp5_;
- gunichar _tmp6_;
+#line 1522 "string.c"
+ const gchar* _tmp4_;
gunichar ch = 0U;
- const gchar* _tmp7_;
- gunichar _tmp8_;
- gboolean _tmp9_ = FALSE;
- gboolean _tmp10_;
+ const gchar* _tmp5_;
+ gboolean _tmp6_ = FALSE;
+ gboolean _tmp7_;
#line 214 "/home/jens/Source/shotwell/src/util/string.vala"
- if (!_tmp2_) {
-#line 1731 "string.c"
+ if (!_tmp1_) {
+#line 1530 "string.c"
+ const gchar* _tmp2_;
const gchar* _tmp3_;
- const gchar* _tmp4_;
#line 214 "/home/jens/Source/shotwell/src/util/string.vala"
- _tmp3_ = iter;
+ _tmp2_ = iter;
#line 214 "/home/jens/Source/shotwell/src/util/string.vala"
- _tmp4_ = g_utf8_next_char (_tmp3_);
+ _tmp3_ = g_utf8_next_char (_tmp2_);
#line 214 "/home/jens/Source/shotwell/src/util/string.vala"
- iter = _tmp4_;
-#line 1740 "string.c"
+ iter = _tmp3_;
+#line 1539 "string.c"
}
#line 214 "/home/jens/Source/shotwell/src/util/string.vala"
- _tmp2_ = FALSE;
-#line 214 "/home/jens/Source/shotwell/src/util/string.vala"
- _tmp5_ = iter;
+ _tmp1_ = FALSE;
#line 214 "/home/jens/Source/shotwell/src/util/string.vala"
- _tmp6_ = string_get_char (_tmp5_, (glong) 0);
+ _tmp4_ = iter;
#line 214 "/home/jens/Source/shotwell/src/util/string.vala"
- if (!(_tmp6_ != ((gunichar) 0))) {
+ if (!(string_get_char (_tmp4_, (glong) 0) != ((gunichar) 0))) {
#line 214 "/home/jens/Source/shotwell/src/util/string.vala"
break;
-#line 1752 "string.c"
+#line 1549 "string.c"
}
#line 215 "/home/jens/Source/shotwell/src/util/string.vala"
- _tmp7_ = iter;
-#line 215 "/home/jens/Source/shotwell/src/util/string.vala"
- _tmp8_ = string_get_char (_tmp7_, (glong) 0);
+ _tmp5_ = iter;
#line 215 "/home/jens/Source/shotwell/src/util/string.vala"
- ch = _tmp8_;
+ ch = string_get_char (_tmp5_, (glong) 0);
#line 217 "/home/jens/Source/shotwell/src/util/string.vala"
- _tmp10_ = prev_is_space;
+ _tmp7_ = prev_is_space;
#line 217 "/home/jens/Source/shotwell/src/util/string.vala"
- if (!_tmp10_) {
+ if (!_tmp7_) {
#line 217 "/home/jens/Source/shotwell/src/util/string.vala"
- _tmp9_ = TRUE;
-#line 1766 "string.c"
+ _tmp6_ = TRUE;
+#line 1561 "string.c"
} else {
- gunichar _tmp11_;
+ gunichar _tmp8_;
#line 217 "/home/jens/Source/shotwell/src/util/string.vala"
- _tmp11_ = ch;
+ _tmp8_ = ch;
#line 217 "/home/jens/Source/shotwell/src/util/string.vala"
- _tmp9_ = _tmp11_ != ((gunichar) '0');
-#line 1773 "string.c"
+ _tmp6_ = _tmp8_ != ((gunichar) '0');
+#line 1568 "string.c"
}
#line 217 "/home/jens/Source/shotwell/src/util/string.vala"
- if (_tmp9_) {
-#line 1777 "string.c"
- GString* _tmp12_;
- gunichar _tmp13_;
- gunichar _tmp14_;
- gboolean _tmp15_;
+ if (_tmp6_) {
+#line 1572 "string.c"
+ GString* _tmp9_;
+ gunichar _tmp10_;
+ gunichar _tmp11_;
#line 218 "/home/jens/Source/shotwell/src/util/string.vala"
- _tmp12_ = stripped;
+ _tmp9_ = stripped;
#line 218 "/home/jens/Source/shotwell/src/util/string.vala"
- _tmp13_ = ch;
+ _tmp10_ = ch;
#line 218 "/home/jens/Source/shotwell/src/util/string.vala"
- g_string_append_unichar (_tmp12_, _tmp13_);
-#line 219 "/home/jens/Source/shotwell/src/util/string.vala"
- _tmp14_ = ch;
+ g_string_append_unichar (_tmp9_, _tmp10_);
#line 219 "/home/jens/Source/shotwell/src/util/string.vala"
- _tmp15_ = g_unichar_isspace (_tmp14_);
+ _tmp11_ = ch;
#line 219 "/home/jens/Source/shotwell/src/util/string.vala"
- prev_is_space = _tmp15_;
-#line 1794 "string.c"
+ prev_is_space = g_unichar_isspace (_tmp11_);
+#line 1586 "string.c"
}
}
}
}
#line 223 "/home/jens/Source/shotwell/src/util/string.vala"
- _tmp16_ = stripped;
+ _tmp12_ = stripped;
#line 223 "/home/jens/Source/shotwell/src/util/string.vala"
- _tmp17_ = _tmp16_->str;
+ _tmp13_ = _tmp12_->str;
#line 223 "/home/jens/Source/shotwell/src/util/string.vala"
- _tmp18_ = g_strdup (_tmp17_);
+ _tmp14_ = g_strdup (_tmp13_);
#line 223 "/home/jens/Source/shotwell/src/util/string.vala"
- result = _tmp18_;
+ result = _tmp14_;
#line 223 "/home/jens/Source/shotwell/src/util/string.vala"
_g_string_free0 (stripped);
#line 223 "/home/jens/Source/shotwell/src/util/string.vala"
return result;
-#line 1811 "string.c"
+#line 1603 "string.c"
}
-static gboolean string_get_next_char (const gchar* self, gint* index, gunichar* c) {
+static gboolean
+string_get_next_char (const gchar* self,
+ gint* index,
+ gunichar* c)
+{
gunichar _vala_c = 0U;
gboolean result = FALSE;
- gint _tmp0_;
- gunichar _tmp1_;
- gunichar _tmp2_;
-#line 1129 "/usr/share/vala-0.36/vapi/glib-2.0.vapi"
+ gunichar _tmp0_;
+#line 1143 "/usr/share/vala-0.40/vapi/glib-2.0.vapi"
g_return_val_if_fail (self != NULL, FALSE);
-#line 1130 "/usr/share/vala-0.36/vapi/glib-2.0.vapi"
- _tmp0_ = *index;
-#line 1130 "/usr/share/vala-0.36/vapi/glib-2.0.vapi"
- _tmp1_ = g_utf8_get_char (((gchar*) self) + _tmp0_);
-#line 1130 "/usr/share/vala-0.36/vapi/glib-2.0.vapi"
- _vala_c = _tmp1_;
-#line 1131 "/usr/share/vala-0.36/vapi/glib-2.0.vapi"
- _tmp2_ = _vala_c;
-#line 1131 "/usr/share/vala-0.36/vapi/glib-2.0.vapi"
- if (_tmp2_ != ((gunichar) 0)) {
-#line 1833 "string.c"
- gint _tmp3_;
- gchar* _tmp4_;
-#line 1132 "/usr/share/vala-0.36/vapi/glib-2.0.vapi"
- _tmp3_ = *index;
-#line 1132 "/usr/share/vala-0.36/vapi/glib-2.0.vapi"
- _tmp4_ = g_utf8_next_char (((gchar*) self) + _tmp3_);
-#line 1132 "/usr/share/vala-0.36/vapi/glib-2.0.vapi"
- *index = (gint) (_tmp4_ - ((gchar*) self));
-#line 1133 "/usr/share/vala-0.36/vapi/glib-2.0.vapi"
+#line 1144 "/usr/share/vala-0.40/vapi/glib-2.0.vapi"
+ _vala_c = g_utf8_get_char (((gchar*) self) + (*index));
+#line 1145 "/usr/share/vala-0.40/vapi/glib-2.0.vapi"
+ _tmp0_ = _vala_c;
+#line 1145 "/usr/share/vala-0.40/vapi/glib-2.0.vapi"
+ if (_tmp0_ != ((gunichar) 0)) {
+#line 1623 "string.c"
+ gchar* _tmp1_;
+#line 1146 "/usr/share/vala-0.40/vapi/glib-2.0.vapi"
+ _tmp1_ = g_utf8_next_char (((gchar*) self) + (*index));
+#line 1146 "/usr/share/vala-0.40/vapi/glib-2.0.vapi"
+ *index = (gint) (_tmp1_ - ((gchar*) self));
+#line 1147 "/usr/share/vala-0.40/vapi/glib-2.0.vapi"
result = TRUE;
-#line 1133 "/usr/share/vala-0.36/vapi/glib-2.0.vapi"
+#line 1147 "/usr/share/vala-0.40/vapi/glib-2.0.vapi"
if (c) {
-#line 1133 "/usr/share/vala-0.36/vapi/glib-2.0.vapi"
+#line 1147 "/usr/share/vala-0.40/vapi/glib-2.0.vapi"
*c = _vala_c;
-#line 1848 "string.c"
+#line 1635 "string.c"
}
-#line 1133 "/usr/share/vala-0.36/vapi/glib-2.0.vapi"
+#line 1147 "/usr/share/vala-0.40/vapi/glib-2.0.vapi"
return result;
-#line 1852 "string.c"
+#line 1639 "string.c"
} else {
-#line 1135 "/usr/share/vala-0.36/vapi/glib-2.0.vapi"
+#line 1149 "/usr/share/vala-0.40/vapi/glib-2.0.vapi"
result = FALSE;
-#line 1135 "/usr/share/vala-0.36/vapi/glib-2.0.vapi"
+#line 1149 "/usr/share/vala-0.40/vapi/glib-2.0.vapi"
if (c) {
-#line 1135 "/usr/share/vala-0.36/vapi/glib-2.0.vapi"
+#line 1149 "/usr/share/vala-0.40/vapi/glib-2.0.vapi"
*c = _vala_c;
-#line 1860 "string.c"
+#line 1647 "string.c"
}
-#line 1135 "/usr/share/vala-0.36/vapi/glib-2.0.vapi"
+#line 1149 "/usr/share/vala-0.40/vapi/glib-2.0.vapi"
return result;
-#line 1864 "string.c"
+#line 1651 "string.c"
}
-#line 1129 "/usr/share/vala-0.36/vapi/glib-2.0.vapi"
+#line 1143 "/usr/share/vala-0.40/vapi/glib-2.0.vapi"
if (c) {
-#line 1129 "/usr/share/vala-0.36/vapi/glib-2.0.vapi"
+#line 1143 "/usr/share/vala-0.40/vapi/glib-2.0.vapi"
*c = _vala_c;
-#line 1870 "string.c"
+#line 1657 "string.c"
}
}
-gchar* string_remove_diacritics (const gchar* istring) {
+gchar*
+string_remove_diacritics (const gchar* istring)
+{
gchar* result = NULL;
GString* builder = NULL;
GString* _tmp0_;
gunichar ch = 0U;
gint i = 0;
- GString* _tmp11_;
- const gchar* _tmp12_;
- gchar* _tmp13_;
+ GString* _tmp9_;
+ const gchar* _tmp10_;
+ gchar* _tmp11_;
#line 226 "/home/jens/Source/shotwell/src/util/string.vala"
g_return_val_if_fail (istring != NULL, NULL);
#line 227 "/home/jens/Source/shotwell/src/util/string.vala"
@@ -1891,43 +1680,37 @@ gchar* string_remove_diacritics (const gchar* istring) {
i = 0;
#line 230 "/home/jens/Source/shotwell/src/util/string.vala"
while (TRUE) {
-#line 1894 "string.c"
- const gchar* _tmp1_;
+#line 1683 "string.c"
+ gchar* _tmp1_;
gchar* _tmp2_;
- gchar* _tmp3_;
- gunichar _tmp4_ = 0U;
+ gunichar _tmp3_ = 0U;
+ gboolean _tmp4_;
gboolean _tmp5_;
- gboolean _tmp6_;
- gunichar _tmp7_;
- GUnicodeType _tmp8_;
- GString* _tmp9_;
- gunichar _tmp10_;
-#line 230 "/home/jens/Source/shotwell/src/util/string.vala"
- _tmp1_ = istring;
+ gunichar _tmp6_;
+ GString* _tmp7_;
+ gunichar _tmp8_;
#line 230 "/home/jens/Source/shotwell/src/util/string.vala"
- _tmp2_ = g_utf8_normalize (_tmp1_, (gssize) -1, G_NORMALIZE_DEFAULT);
+ _tmp1_ = g_utf8_normalize (istring, (gssize) -1, G_NORMALIZE_DEFAULT);
#line 230 "/home/jens/Source/shotwell/src/util/string.vala"
- _tmp3_ = _tmp2_;
+ _tmp2_ = _tmp1_;
#line 230 "/home/jens/Source/shotwell/src/util/string.vala"
- _tmp5_ = string_get_next_char (_tmp3_, &i, &_tmp4_);
+ _tmp4_ = string_get_next_char (_tmp2_, &i, &_tmp3_);
#line 230 "/home/jens/Source/shotwell/src/util/string.vala"
- ch = _tmp4_;
+ ch = _tmp3_;
#line 230 "/home/jens/Source/shotwell/src/util/string.vala"
- _tmp6_ = !_tmp5_;
+ _tmp5_ = !_tmp4_;
#line 230 "/home/jens/Source/shotwell/src/util/string.vala"
- _g_free0 (_tmp3_);
+ _g_free0 (_tmp2_);
#line 230 "/home/jens/Source/shotwell/src/util/string.vala"
- if (_tmp6_) {
+ if (_tmp5_) {
#line 230 "/home/jens/Source/shotwell/src/util/string.vala"
break;
-#line 1923 "string.c"
+#line 1708 "string.c"
}
#line 231 "/home/jens/Source/shotwell/src/util/string.vala"
- _tmp7_ = ch;
-#line 231 "/home/jens/Source/shotwell/src/util/string.vala"
- _tmp8_ = g_unichar_type (_tmp7_);
+ _tmp6_ = ch;
#line 231 "/home/jens/Source/shotwell/src/util/string.vala"
- switch (_tmp8_) {
+ switch (g_unichar_type (_tmp6_)) {
#line 231 "/home/jens/Source/shotwell/src/util/string.vala"
case G_UNICODE_CONTROL:
#line 231 "/home/jens/Source/shotwell/src/util/string.vala"
@@ -1940,50 +1723,51 @@ gchar* string_remove_diacritics (const gchar* istring) {
case G_UNICODE_COMBINING_MARK:
#line 231 "/home/jens/Source/shotwell/src/util/string.vala"
case G_UNICODE_ENCLOSING_MARK:
-#line 1943 "string.c"
+#line 1726 "string.c"
{
#line 239 "/home/jens/Source/shotwell/src/util/string.vala"
continue;
-#line 1947 "string.c"
+#line 1730 "string.c"
}
default:
#line 231 "/home/jens/Source/shotwell/src/util/string.vala"
break;
-#line 1952 "string.c"
+#line 1735 "string.c"
}
#line 241 "/home/jens/Source/shotwell/src/util/string.vala"
- _tmp9_ = builder;
+ _tmp7_ = builder;
#line 241 "/home/jens/Source/shotwell/src/util/string.vala"
- _tmp10_ = ch;
+ _tmp8_ = ch;
#line 241 "/home/jens/Source/shotwell/src/util/string.vala"
- g_string_append_unichar (_tmp9_, _tmp10_);
-#line 1960 "string.c"
+ g_string_append_unichar (_tmp7_, _tmp8_);
+#line 1743 "string.c"
}
#line 243 "/home/jens/Source/shotwell/src/util/string.vala"
- _tmp11_ = builder;
+ _tmp9_ = builder;
#line 243 "/home/jens/Source/shotwell/src/util/string.vala"
- _tmp12_ = _tmp11_->str;
+ _tmp10_ = _tmp9_->str;
#line 243 "/home/jens/Source/shotwell/src/util/string.vala"
- _tmp13_ = g_strdup (_tmp12_);
+ _tmp11_ = g_strdup (_tmp10_);
#line 243 "/home/jens/Source/shotwell/src/util/string.vala"
- result = _tmp13_;
+ result = _tmp11_;
#line 243 "/home/jens/Source/shotwell/src/util/string.vala"
_g_string_free0 (builder);
#line 243 "/home/jens/Source/shotwell/src/util/string.vala"
return result;
-#line 1974 "string.c"
+#line 1757 "string.c"
}
-gchar* string_to_hex_string (const gchar* str) {
+gchar*
+string_to_hex_string (const gchar* str)
+{
gchar* result = NULL;
GString* builder = NULL;
GString* _tmp0_;
guint8* data = NULL;
- const gchar* _tmp1_;
- GString* _tmp7_;
- const gchar* _tmp8_;
- gchar* _tmp9_;
+ GString* _tmp6_;
+ const gchar* _tmp7_;
+ gchar* _tmp8_;
#line 246 "/home/jens/Source/shotwell/src/util/string.vala"
g_return_val_if_fail (str != NULL, NULL);
#line 247 "/home/jens/Source/shotwell/src/util/string.vala"
@@ -1991,203 +1775,186 @@ gchar* string_to_hex_string (const gchar* str) {
#line 247 "/home/jens/Source/shotwell/src/util/string.vala"
builder = _tmp0_;
#line 249 "/home/jens/Source/shotwell/src/util/string.vala"
- _tmp1_ = str;
-#line 249 "/home/jens/Source/shotwell/src/util/string.vala"
- data = (guint8*) _tmp1_;
+ data = (guint8*) str;
#line 250 "/home/jens/Source/shotwell/src/util/string.vala"
while (TRUE) {
-#line 1999 "string.c"
- guint8* _tmp2_;
- const gchar* _tmp3_ = NULL;
- guint8* _tmp4_;
- GString* _tmp5_;
- guint8* _tmp6_;
+#line 1781 "string.c"
+ guint8* _tmp1_;
+ const gchar* _tmp2_ = NULL;
+ guint8* _tmp3_;
+ GString* _tmp4_;
+ guint8* _tmp5_;
#line 250 "/home/jens/Source/shotwell/src/util/string.vala"
- _tmp2_ = data;
+ _tmp1_ = data;
#line 250 "/home/jens/Source/shotwell/src/util/string.vala"
- if (!(((gint) (*_tmp2_)) != 0)) {
+ if (!(((gint) (*_tmp1_)) != 0)) {
#line 250 "/home/jens/Source/shotwell/src/util/string.vala"
break;
-#line 2011 "string.c"
+#line 1793 "string.c"
}
#line 251 "/home/jens/Source/shotwell/src/util/string.vala"
- _tmp4_ = data;
+ _tmp3_ = data;
#line 251 "/home/jens/Source/shotwell/src/util/string.vala"
- if (((gint) (*_tmp4_)) != 0) {
+ if (((gint) (*_tmp3_)) != 0) {
#line 251 "/home/jens/Source/shotwell/src/util/string.vala"
- _tmp3_ = " ";
-#line 2019 "string.c"
+ _tmp2_ = " ";
+#line 1801 "string.c"
} else {
#line 251 "/home/jens/Source/shotwell/src/util/string.vala"
- _tmp3_ = "";
-#line 2023 "string.c"
+ _tmp2_ = "";
+#line 1805 "string.c"
}
#line 251 "/home/jens/Source/shotwell/src/util/string.vala"
- _tmp5_ = builder;
+ _tmp4_ = builder;
#line 251 "/home/jens/Source/shotwell/src/util/string.vala"
- _tmp6_ = data;
+ _tmp5_ = data;
#line 251 "/home/jens/Source/shotwell/src/util/string.vala"
- data = _tmp6_ + 1;
+ data = _tmp5_ + 1;
#line 251 "/home/jens/Source/shotwell/src/util/string.vala"
- g_string_append_printf (_tmp5_, "%02Xh%s", (guint) (*_tmp6_), _tmp3_);
-#line 2033 "string.c"
+ g_string_append_printf (_tmp4_, "%02Xh%s", (guint) (*_tmp5_), _tmp2_);
+#line 1815 "string.c"
}
#line 253 "/home/jens/Source/shotwell/src/util/string.vala"
- _tmp7_ = builder;
+ _tmp6_ = builder;
#line 253 "/home/jens/Source/shotwell/src/util/string.vala"
- _tmp8_ = _tmp7_->str;
+ _tmp7_ = _tmp6_->str;
#line 253 "/home/jens/Source/shotwell/src/util/string.vala"
- _tmp9_ = g_strdup (_tmp8_);
+ _tmp8_ = g_strdup (_tmp7_);
#line 253 "/home/jens/Source/shotwell/src/util/string.vala"
- result = _tmp9_;
+ result = _tmp8_;
#line 253 "/home/jens/Source/shotwell/src/util/string.vala"
_g_string_free0 (builder);
#line 253 "/home/jens/Source/shotwell/src/util/string.vala"
return result;
-#line 2047 "string.c"
+#line 1829 "string.c"
}
-guint string_collated_hash (void* ptr) {
+guint
+string_collated_hash (void* ptr)
+{
guint result = 0U;
gchar* str = NULL;
- void* _tmp0_;
- gchar* _tmp1_;
- GHashFunc _tmp2_;
+ gchar* _tmp0_;
+ GHashFunc _tmp1_;
+ gchar* _tmp2_;
gchar* _tmp3_;
- gchar* _tmp4_;
- guint _tmp5_;
- guint _tmp6_;
-#line 273 "/home/jens/Source/shotwell/src/util/string.vala"
- _tmp0_ = ptr;
+ guint _tmp4_;
#line 273 "/home/jens/Source/shotwell/src/util/string.vala"
- _tmp1_ = g_strdup ((const gchar*) _tmp0_);
+ _tmp0_ = g_strdup ((const gchar*) ptr);
#line 273 "/home/jens/Source/shotwell/src/util/string.vala"
- str = _tmp1_;
+ str = _tmp0_;
#line 275 "/home/jens/Source/shotwell/src/util/string.vala"
- _tmp2_ = g_str_hash;
+ _tmp1_ = g_str_hash;
#line 275 "/home/jens/Source/shotwell/src/util/string.vala"
- _tmp3_ = g_utf8_collate_key (str, (gssize) -1);
+ _tmp2_ = g_utf8_collate_key (str, (gssize) -1);
#line 275 "/home/jens/Source/shotwell/src/util/string.vala"
- _tmp4_ = _tmp3_;
+ _tmp3_ = _tmp2_;
#line 275 "/home/jens/Source/shotwell/src/util/string.vala"
- _tmp5_ = _tmp2_ (_tmp4_);
+ _tmp4_ = _tmp1_ (_tmp3_);
#line 275 "/home/jens/Source/shotwell/src/util/string.vala"
- _tmp6_ = _tmp5_;
+ _g_free0 (_tmp3_);
#line 275 "/home/jens/Source/shotwell/src/util/string.vala"
- _g_free0 (_tmp4_);
-#line 275 "/home/jens/Source/shotwell/src/util/string.vala"
- result = _tmp6_;
+ result = _tmp4_;
#line 275 "/home/jens/Source/shotwell/src/util/string.vala"
_g_free0 (str);
#line 275 "/home/jens/Source/shotwell/src/util/string.vala"
return result;
-#line 2085 "string.c"
+#line 1863 "string.c"
}
-guint string_precollated_hash (void* ptr) {
+guint
+string_precollated_hash (void* ptr)
+{
guint result = 0U;
GHashFunc _tmp0_;
- void* _tmp1_;
- guint _tmp2_;
#line 280 "/home/jens/Source/shotwell/src/util/string.vala"
_tmp0_ = g_str_hash;
#line 280 "/home/jens/Source/shotwell/src/util/string.vala"
- _tmp1_ = ptr;
-#line 280 "/home/jens/Source/shotwell/src/util/string.vala"
- _tmp2_ = _tmp0_ ((const gchar*) _tmp1_);
-#line 280 "/home/jens/Source/shotwell/src/util/string.vala"
- result = _tmp2_;
+ result = _tmp0_ ((const gchar*) ptr);
#line 280 "/home/jens/Source/shotwell/src/util/string.vala"
return result;
-#line 2104 "string.c"
+#line 1878 "string.c"
}
-gint string_collated_compare (void* a, void* b) {
+gint
+string_collated_compare (void* a,
+ void* b)
+{
gint result = 0;
gchar* astr = NULL;
- void* _tmp0_;
- gchar* _tmp1_;
+ gchar* _tmp0_;
gchar* bstr = NULL;
- void* _tmp2_;
- gchar* _tmp3_;
+ gchar* _tmp1_;
gint _result_ = 0;
- const gchar* _tmp4_;
- const gchar* _tmp5_;
- gint _tmp6_;
- gint _tmp7_ = 0;
- gint _tmp8_;
-#line 285 "/home/jens/Source/shotwell/src/util/string.vala"
- _tmp0_ = a;
+ const gchar* _tmp2_;
+ const gchar* _tmp3_;
+ gint _tmp4_ = 0;
+ gint _tmp5_;
#line 285 "/home/jens/Source/shotwell/src/util/string.vala"
- _tmp1_ = g_strdup ((const gchar*) _tmp0_);
+ _tmp0_ = g_strdup ((const gchar*) a);
#line 285 "/home/jens/Source/shotwell/src/util/string.vala"
- astr = _tmp1_;
+ astr = _tmp0_;
#line 286 "/home/jens/Source/shotwell/src/util/string.vala"
- _tmp2_ = b;
+ _tmp1_ = g_strdup ((const gchar*) b);
#line 286 "/home/jens/Source/shotwell/src/util/string.vala"
- _tmp3_ = g_strdup ((const gchar*) _tmp2_);
-#line 286 "/home/jens/Source/shotwell/src/util/string.vala"
- bstr = _tmp3_;
-#line 288 "/home/jens/Source/shotwell/src/util/string.vala"
- _tmp4_ = astr;
+ bstr = _tmp1_;
#line 288 "/home/jens/Source/shotwell/src/util/string.vala"
- _tmp5_ = bstr;
+ _tmp2_ = astr;
#line 288 "/home/jens/Source/shotwell/src/util/string.vala"
- _tmp6_ = g_utf8_collate (_tmp4_, _tmp5_);
+ _tmp3_ = bstr;
#line 288 "/home/jens/Source/shotwell/src/util/string.vala"
- _result_ = _tmp6_;
+ _result_ = g_utf8_collate (_tmp2_, _tmp3_);
#line 290 "/home/jens/Source/shotwell/src/util/string.vala"
- _tmp8_ = _result_;
+ _tmp5_ = _result_;
#line 290 "/home/jens/Source/shotwell/src/util/string.vala"
- if (_tmp8_ != 0) {
-#line 2146 "string.c"
- gint _tmp9_;
+ if (_tmp5_ != 0) {
+#line 1914 "string.c"
+ gint _tmp6_;
#line 290 "/home/jens/Source/shotwell/src/util/string.vala"
- _tmp9_ = _result_;
+ _tmp6_ = _result_;
#line 290 "/home/jens/Source/shotwell/src/util/string.vala"
- _tmp7_ = _tmp9_;
-#line 2152 "string.c"
+ _tmp4_ = _tmp6_;
+#line 1920 "string.c"
} else {
- GCompareFunc _tmp10_;
- const gchar* _tmp11_;
- const gchar* _tmp12_;
- gint _tmp13_;
-#line 290 "/home/jens/Source/shotwell/src/util/string.vala"
- _tmp10_ = g_strcmp0;
+ GCompareFunc _tmp7_;
+ const gchar* _tmp8_;
+ const gchar* _tmp9_;
#line 290 "/home/jens/Source/shotwell/src/util/string.vala"
- _tmp11_ = astr;
+ _tmp7_ = g_strcmp0;
#line 290 "/home/jens/Source/shotwell/src/util/string.vala"
- _tmp12_ = bstr;
+ _tmp8_ = astr;
#line 290 "/home/jens/Source/shotwell/src/util/string.vala"
- _tmp13_ = _tmp10_ (_tmp11_, _tmp12_);
+ _tmp9_ = bstr;
#line 290 "/home/jens/Source/shotwell/src/util/string.vala"
- _tmp7_ = _tmp13_;
-#line 2168 "string.c"
+ _tmp4_ = _tmp7_ (_tmp8_, _tmp9_);
+#line 1933 "string.c"
}
#line 290 "/home/jens/Source/shotwell/src/util/string.vala"
- result = _tmp7_;
+ result = _tmp4_;
#line 290 "/home/jens/Source/shotwell/src/util/string.vala"
_g_free0 (bstr);
#line 290 "/home/jens/Source/shotwell/src/util/string.vala"
_g_free0 (astr);
#line 290 "/home/jens/Source/shotwell/src/util/string.vala"
return result;
-#line 2178 "string.c"
+#line 1943 "string.c"
}
-gint string_precollated_compare (const gchar* astr, const gchar* akey, const gchar* bstr, const gchar* bkey) {
+gint
+string_precollated_compare (const gchar* astr,
+ const gchar* akey,
+ const gchar* bstr,
+ const gchar* bkey)
+{
gint result = 0;
gint _result_ = 0;
GCompareFunc _tmp0_;
- const gchar* _tmp1_;
- const gchar* _tmp2_;
- gint _tmp3_;
- gint _tmp4_ = 0;
- gint _tmp5_;
+ gint _tmp1_ = 0;
+ gint _tmp2_;
#line 294 "/home/jens/Source/shotwell/src/util/string.vala"
g_return_val_if_fail (astr != NULL, 0);
#line 294 "/home/jens/Source/shotwell/src/util/string.vala"
@@ -2199,75 +1966,54 @@ gint string_precollated_compare (const gchar* astr, const gchar* akey, const gch
#line 295 "/home/jens/Source/shotwell/src/util/string.vala"
_tmp0_ = g_strcmp0;
#line 295 "/home/jens/Source/shotwell/src/util/string.vala"
- _tmp1_ = akey;
-#line 295 "/home/jens/Source/shotwell/src/util/string.vala"
- _tmp2_ = bkey;
-#line 295 "/home/jens/Source/shotwell/src/util/string.vala"
- _tmp3_ = _tmp0_ (_tmp1_, _tmp2_);
-#line 295 "/home/jens/Source/shotwell/src/util/string.vala"
- _result_ = _tmp3_;
+ _result_ = _tmp0_ (akey, bkey);
#line 297 "/home/jens/Source/shotwell/src/util/string.vala"
- _tmp5_ = _result_;
+ _tmp2_ = _result_;
#line 297 "/home/jens/Source/shotwell/src/util/string.vala"
- if (_tmp5_ != 0) {
-#line 2213 "string.c"
- gint _tmp6_;
+ if (_tmp2_ != 0) {
+#line 1974 "string.c"
+ gint _tmp3_;
#line 297 "/home/jens/Source/shotwell/src/util/string.vala"
- _tmp6_ = _result_;
+ _tmp3_ = _result_;
#line 297 "/home/jens/Source/shotwell/src/util/string.vala"
- _tmp4_ = _tmp6_;
-#line 2219 "string.c"
+ _tmp1_ = _tmp3_;
+#line 1980 "string.c"
} else {
- GCompareFunc _tmp7_;
- const gchar* _tmp8_;
- const gchar* _tmp9_;
- gint _tmp10_;
-#line 297 "/home/jens/Source/shotwell/src/util/string.vala"
- _tmp7_ = g_strcmp0;
+ GCompareFunc _tmp4_;
#line 297 "/home/jens/Source/shotwell/src/util/string.vala"
- _tmp8_ = astr;
-#line 297 "/home/jens/Source/shotwell/src/util/string.vala"
- _tmp9_ = bstr;
+ _tmp4_ = g_strcmp0;
#line 297 "/home/jens/Source/shotwell/src/util/string.vala"
- _tmp10_ = _tmp7_ (_tmp8_, _tmp9_);
-#line 297 "/home/jens/Source/shotwell/src/util/string.vala"
- _tmp4_ = _tmp10_;
-#line 2235 "string.c"
+ _tmp1_ = _tmp4_ (astr, bstr);
+#line 1987 "string.c"
}
#line 297 "/home/jens/Source/shotwell/src/util/string.vala"
- result = _tmp4_;
+ result = _tmp1_;
#line 297 "/home/jens/Source/shotwell/src/util/string.vala"
return result;
-#line 2241 "string.c"
+#line 1993 "string.c"
}
-gboolean string_collated_equals (void* a, void* b) {
+gboolean
+string_collated_equals (void* a,
+ void* b)
+{
gboolean result = FALSE;
- void* _tmp0_;
- void* _tmp1_;
- gint _tmp2_;
-#line 302 "/home/jens/Source/shotwell/src/util/string.vala"
- _tmp0_ = a;
#line 302 "/home/jens/Source/shotwell/src/util/string.vala"
- _tmp1_ = b;
-#line 302 "/home/jens/Source/shotwell/src/util/string.vala"
- _tmp2_ = string_collated_compare (_tmp0_, _tmp1_);
-#line 302 "/home/jens/Source/shotwell/src/util/string.vala"
- result = _tmp2_ == 0;
+ result = string_collated_compare (a, b) == 0;
#line 302 "/home/jens/Source/shotwell/src/util/string.vala"
return result;
-#line 2260 "string.c"
+#line 2006 "string.c"
}
-gboolean string_precollated_equals (const gchar* astr, const gchar* akey, const gchar* bstr, const gchar* bkey) {
+gboolean
+string_precollated_equals (const gchar* astr,
+ const gchar* akey,
+ const gchar* bstr,
+ const gchar* bkey)
+{
gboolean result = FALSE;
- const gchar* _tmp0_;
- const gchar* _tmp1_;
- const gchar* _tmp2_;
- const gchar* _tmp3_;
- gint _tmp4_;
#line 306 "/home/jens/Source/shotwell/src/util/string.vala"
g_return_val_if_fail (astr != NULL, FALSE);
#line 306 "/home/jens/Source/shotwell/src/util/string.vala"
@@ -2277,20 +2023,10 @@ gboolean string_precollated_equals (const gchar* astr, const gchar* akey, const
#line 306 "/home/jens/Source/shotwell/src/util/string.vala"
g_return_val_if_fail (bkey != NULL, FALSE);
#line 307 "/home/jens/Source/shotwell/src/util/string.vala"
- _tmp0_ = astr;
-#line 307 "/home/jens/Source/shotwell/src/util/string.vala"
- _tmp1_ = akey;
-#line 307 "/home/jens/Source/shotwell/src/util/string.vala"
- _tmp2_ = bstr;
-#line 307 "/home/jens/Source/shotwell/src/util/string.vala"
- _tmp3_ = bkey;
-#line 307 "/home/jens/Source/shotwell/src/util/string.vala"
- _tmp4_ = string_precollated_compare (_tmp0_, _tmp1_, _tmp2_, _tmp3_);
-#line 307 "/home/jens/Source/shotwell/src/util/string.vala"
- result = _tmp4_ == 0;
+ result = string_precollated_compare (astr, akey, bstr, bkey) == 0;
#line 307 "/home/jens/Source/shotwell/src/util/string.vala"
return result;
-#line 2293 "string.c"
+#line 2029 "string.c"
}
diff --git a/src/util/system.c b/src/util/system.c
index 3075260..958256c 100644
--- a/src/util/system.c
+++ b/src/util/system.c
@@ -1,4 +1,4 @@
-/* system.c generated by valac 0.36.6, the Vala compiler
+/* system.c generated by valac 0.40.4, the Vala compiler
* generated from system.vala, do not modify */
/* Copyright 2016 Software Freedom Conservancy Inc.
@@ -8,6 +8,7 @@
*/
/* Return the directory in which Shotwell is installed, or null if uninstalled.*/
+
#include <glib.h>
#include <glib-object.h>
#include <gio/gio.h>
@@ -25,77 +26,73 @@
GFile* get_sys_install_dir (GFile* exec_dir);
#define RESOURCES_PREFIX _PREFIX
gchar* get_nautilus_install_location (void);
-void sys_show_uri (GdkScreen* screen, const gchar* uri, GError** error);
-void show_file_in_nautilus (const gchar* filename, GError** error);
+void sys_show_uri (GdkScreen* screen,
+ const gchar* uri,
+ GError** error);
+void show_file_in_nautilus (const gchar* filename,
+ GError** error);
-GFile* get_sys_install_dir (GFile* exec_dir) {
+GFile*
+get_sys_install_dir (GFile* exec_dir)
+{
GFile* result = NULL;
GFile* child = NULL;
GFile* _tmp0_;
GFile* _tmp1_;
- GFile* _tmp2_;
+ gchar* _tmp2_;
gchar* _tmp3_;
- gchar* _tmp4_;
- gboolean _tmp5_;
- gboolean _tmp6_;
+ gboolean _tmp4_;
#line 8 "/home/jens/Source/shotwell/src/util/system.vala"
g_return_val_if_fail (G_IS_FILE (exec_dir), NULL);
#line 10 "/home/jens/Source/shotwell/src/util/system.vala"
- _tmp0_ = exec_dir;
+ _tmp0_ = g_file_get_child (exec_dir, "ui");
#line 10 "/home/jens/Source/shotwell/src/util/system.vala"
- _tmp1_ = g_file_get_child (_tmp0_, "ui");
-#line 10 "/home/jens/Source/shotwell/src/util/system.vala"
- child = _tmp1_;
-#line 12 "/home/jens/Source/shotwell/src/util/system.vala"
- _tmp2_ = child;
+ child = _tmp0_;
#line 12 "/home/jens/Source/shotwell/src/util/system.vala"
- _tmp3_ = g_file_get_path (_tmp2_);
+ _tmp1_ = child;
#line 12 "/home/jens/Source/shotwell/src/util/system.vala"
- _tmp4_ = _tmp3_;
+ _tmp2_ = g_file_get_path (_tmp1_);
#line 12 "/home/jens/Source/shotwell/src/util/system.vala"
- _tmp5_ = g_file_test (_tmp4_, G_FILE_TEST_IS_DIR | G_FILE_TEST_EXISTS);
+ _tmp3_ = _tmp2_;
#line 12 "/home/jens/Source/shotwell/src/util/system.vala"
- _tmp6_ = !_tmp5_;
+ _tmp4_ = !g_file_test (_tmp3_, G_FILE_TEST_IS_DIR | G_FILE_TEST_EXISTS);
#line 12 "/home/jens/Source/shotwell/src/util/system.vala"
- _g_free0 (_tmp4_);
+ _g_free0 (_tmp3_);
#line 12 "/home/jens/Source/shotwell/src/util/system.vala"
- if (_tmp6_) {
+ if (_tmp4_) {
#line 65 "system.c"
- GFile* _tmp7_;
- gchar* _tmp8_;
- gchar* _tmp9_;
- gboolean _tmp10_;
- GFile* _tmp11_;
-#line 14 "/home/jens/Source/shotwell/src/util/system.vala"
- _tmp7_ = exec_dir;
+ gchar* _tmp5_;
+ gchar* _tmp6_;
+ gboolean _tmp7_;
+ GFile* _tmp8_;
#line 14 "/home/jens/Source/shotwell/src/util/system.vala"
- _tmp8_ = g_file_get_basename (_tmp7_);
+ _tmp5_ = g_file_get_basename (exec_dir);
#line 14 "/home/jens/Source/shotwell/src/util/system.vala"
- _tmp9_ = _tmp8_;
+ _tmp6_ = _tmp5_;
#line 14 "/home/jens/Source/shotwell/src/util/system.vala"
- _tmp10_ = g_strcmp0 (_tmp9_, "src") == 0;
+ _tmp7_ = g_strcmp0 (_tmp6_, "src") == 0;
#line 14 "/home/jens/Source/shotwell/src/util/system.vala"
- _g_free0 (_tmp9_);
+ _g_free0 (_tmp6_);
#line 14 "/home/jens/Source/shotwell/src/util/system.vala"
- if (_tmp10_) {
+ if (_tmp7_) {
#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 86 "system.c"
}
#line 18 "/home/jens/Source/shotwell/src/util/system.vala"
- _tmp11_ = g_file_new_for_path (RESOURCES_PREFIX);
+ _tmp8_ = g_file_new_for_path (RESOURCES_PREFIX);
#line 18 "/home/jens/Source/shotwell/src/util/system.vala"
- result = _tmp11_;
+ result = _tmp8_;
#line 18 "/home/jens/Source/shotwell/src/util/system.vala"
_g_object_unref0 (child);
#line 18 "/home/jens/Source/shotwell/src/util/system.vala"
return result;
-#line 99 "system.c"
+#line 96 "system.c"
}
#line 21 "/home/jens/Source/shotwell/src/util/system.vala"
result = NULL;
@@ -103,11 +100,13 @@ GFile* get_sys_install_dir (GFile* exec_dir) {
_g_object_unref0 (child);
#line 21 "/home/jens/Source/shotwell/src/util/system.vala"
return result;
-#line 107 "system.c"
+#line 104 "system.c"
}
-gchar* get_nautilus_install_location (void) {
+gchar*
+get_nautilus_install_location (void)
+{
gchar* result = NULL;
gchar* _tmp0_;
#line 25 "/home/jens/Source/shotwell/src/util/system.vala"
@@ -116,43 +115,43 @@ gchar* get_nautilus_install_location (void) {
result = _tmp0_;
#line 25 "/home/jens/Source/shotwell/src/util/system.vala"
return result;
-#line 120 "system.c"
+#line 119 "system.c"
}
-void sys_show_uri (GdkScreen* screen, const gchar* uri, GError** error) {
- GdkScreen* _tmp0_;
- const gchar* _tmp1_;
+void
+sys_show_uri (GdkScreen* screen,
+ const gchar* uri,
+ GError** error)
+{
GError * _inner_error_ = NULL;
#line 28 "/home/jens/Source/shotwell/src/util/system.vala"
g_return_if_fail (GDK_IS_SCREEN (screen));
#line 28 "/home/jens/Source/shotwell/src/util/system.vala"
g_return_if_fail (uri != NULL);
#line 29 "/home/jens/Source/shotwell/src/util/system.vala"
- _tmp0_ = screen;
-#line 29 "/home/jens/Source/shotwell/src/util/system.vala"
- _tmp1_ = uri;
-#line 29 "/home/jens/Source/shotwell/src/util/system.vala"
- gtk_show_uri (_tmp0_, _tmp1_, (guint32) GDK_CURRENT_TIME, &_inner_error_);
+ gtk_show_uri (screen, uri, (guint32) GDK_CURRENT_TIME, &_inner_error_);
#line 29 "/home/jens/Source/shotwell/src/util/system.vala"
if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 29 "/home/jens/Source/shotwell/src/util/system.vala"
g_propagate_error (error, _inner_error_);
#line 29 "/home/jens/Source/shotwell/src/util/system.vala"
return;
-#line 144 "system.c"
+#line 141 "system.c"
}
}
-void show_file_in_nautilus (const gchar* filename, GError** error) {
+void
+show_file_in_nautilus (const gchar* filename,
+ GError** error)
+{
gchar* _tmp0_;
gchar* _tmp1_;
gchar* _tmp2_;
gchar* _tmp3_;
- const gchar* _tmp4_;
+ gchar* _tmp4_;
gchar* _tmp5_;
- gchar* _tmp6_;
GError * _inner_error_ = NULL;
#line 32 "/home/jens/Source/shotwell/src/util/system.vala"
g_return_if_fail (filename != NULL);
@@ -165,15 +164,13 @@ void show_file_in_nautilus (const gchar* filename, GError** error) {
#line 33 "/home/jens/Source/shotwell/src/util/system.vala"
_tmp3_ = _tmp2_;
#line 33 "/home/jens/Source/shotwell/src/util/system.vala"
- _tmp4_ = filename;
-#line 33 "/home/jens/Source/shotwell/src/util/system.vala"
- _tmp5_ = g_strconcat (_tmp3_, _tmp4_, NULL);
+ _tmp4_ = g_strconcat (_tmp3_, filename, NULL);
#line 33 "/home/jens/Source/shotwell/src/util/system.vala"
- _tmp6_ = _tmp5_;
+ _tmp5_ = _tmp4_;
#line 33 "/home/jens/Source/shotwell/src/util/system.vala"
- g_spawn_command_line_async (_tmp6_, &_inner_error_);
+ g_spawn_command_line_async (_tmp5_, &_inner_error_);
#line 33 "/home/jens/Source/shotwell/src/util/system.vala"
- _g_free0 (_tmp6_);
+ _g_free0 (_tmp5_);
#line 33 "/home/jens/Source/shotwell/src/util/system.vala"
_g_free0 (_tmp3_);
#line 33 "/home/jens/Source/shotwell/src/util/system.vala"
@@ -184,7 +181,7 @@ void show_file_in_nautilus (const gchar* filename, GError** error) {
g_propagate_error (error, _inner_error_);
#line 33 "/home/jens/Source/shotwell/src/util/system.vala"
return;
-#line 188 "system.c"
+#line 185 "system.c"
}
}
diff --git a/src/util/ui.c b/src/util/ui.c
index 8a7e0d7..98f35de 100644
--- a/src/util/ui.c
+++ b/src/util/ui.c
@@ -1,4 +1,4 @@
-/* ui.c generated by valac 0.36.6, the Vala compiler
+/* ui.c generated by valac 0.40.4, the Vala compiler
* generated from ui.vala, do not modify */
/* Copyright 2016 Software Freedom Conservancy Inc.
@@ -7,6 +7,7 @@
* (version 2.1 or later). See the COPYING file in this distribution.
*/
+
#include <glib.h>
#include <glib-object.h>
#include "shotwell-plugin-dev-1.0.h"
@@ -48,12 +49,18 @@ GType direction_get_type (void) G_GNUC_CONST;
SpitTransitionsDirection direction_to_transition_direction (Direction self);
const gchar* direction_to_string (Direction self);
void spin_event_loop (void);
-AdjustmentRelation get_adjustment_relation (GtkAdjustment* adjustment, gint value);
-void get_adjustment_page (GtkAdjustment* hadj, GtkAdjustment* vadj, GdkRectangle* result);
-gboolean has_only_key_modifier (GdkModifierType field, GdkModifierType mask);
-
-
-GType adjustment_relation_get_type (void) {
+AdjustmentRelation get_adjustment_relation (GtkAdjustment* adjustment,
+ gint value);
+void get_adjustment_page (GtkAdjustment* hadj,
+ GtkAdjustment* vadj,
+ GdkRectangle* result);
+gboolean has_only_key_modifier (GdkModifierType field,
+ GdkModifierType mask);
+
+
+GType
+adjustment_relation_get_type (void)
+{
static volatile gsize adjustment_relation_type_id__volatile = 0;
if (g_once_init_enter (&adjustment_relation_type_id__volatile)) {
static const GEnumValue values[] = {{ADJUSTMENT_RELATION_BELOW, "ADJUSTMENT_RELATION_BELOW", "below"}, {ADJUSTMENT_RELATION_IN_RANGE, "ADJUSTMENT_RELATION_IN_RANGE", "in-range"}, {ADJUSTMENT_RELATION_ABOVE, "ADJUSTMENT_RELATION_ABOVE", "above"}, {0, NULL, NULL}};
@@ -65,7 +72,9 @@ GType adjustment_relation_get_type (void) {
}
-GType compass_point_get_type (void) {
+GType
+compass_point_get_type (void)
+{
static volatile gsize compass_point_type_id__volatile = 0;
if (g_once_init_enter (&compass_point_type_id__volatile)) {
static const GEnumValue values[] = {{COMPASS_POINT_NORTH, "COMPASS_POINT_NORTH", "north"}, {COMPASS_POINT_SOUTH, "COMPASS_POINT_SOUTH", "south"}, {COMPASS_POINT_EAST, "COMPASS_POINT_EAST", "east"}, {COMPASS_POINT_WEST, "COMPASS_POINT_WEST", "west"}, {0, NULL, NULL}};
@@ -77,29 +86,31 @@ GType compass_point_get_type (void) {
}
-SpitTransitionsDirection direction_to_transition_direction (Direction self) {
+SpitTransitionsDirection
+direction_to_transition_direction (Direction self)
+{
SpitTransitionsDirection result = 0;
#line 25 "/home/jens/Source/shotwell/src/util/ui.vala"
switch (self) {
#line 25 "/home/jens/Source/shotwell/src/util/ui.vala"
case DIRECTION_FORWARD:
-#line 87 "ui.c"
+#line 98 "ui.c"
{
#line 27 "/home/jens/Source/shotwell/src/util/ui.vala"
result = SPIT_TRANSITIONS_DIRECTION_FORWARD;
#line 27 "/home/jens/Source/shotwell/src/util/ui.vala"
return result;
-#line 93 "ui.c"
+#line 104 "ui.c"
}
#line 25 "/home/jens/Source/shotwell/src/util/ui.vala"
case DIRECTION_BACKWARD:
-#line 97 "ui.c"
+#line 108 "ui.c"
{
#line 30 "/home/jens/Source/shotwell/src/util/ui.vala"
result = SPIT_TRANSITIONS_DIRECTION_BACKWARD;
#line 30 "/home/jens/Source/shotwell/src/util/ui.vala"
return result;
-#line 103 "ui.c"
+#line 114 "ui.c"
}
default:
{
@@ -108,13 +119,15 @@ SpitTransitionsDirection direction_to_transition_direction (Direction self) {
_tmp0_ = g_enum_get_value (g_type_class_ref (TYPE_DIRECTION), self);
#line 33 "/home/jens/Source/shotwell/src/util/ui.vala"
g_error ("ui.vala:33: Unknown Direction %s", (_tmp0_ != NULL) ? _tmp0_->value_name : NULL);
-#line 112 "ui.c"
+#line 123 "ui.c"
}
}
}
-GType direction_get_type (void) {
+GType
+direction_get_type (void)
+{
static volatile gsize direction_type_id__volatile = 0;
if (g_once_init_enter (&direction_type_id__volatile)) {
static const GEnumValue values[] = {{DIRECTION_FORWARD, "DIRECTION_FORWARD", "forward"}, {DIRECTION_BACKWARD, "DIRECTION_BACKWARD", "backward"}, {0, NULL, NULL}};
@@ -126,90 +139,63 @@ GType direction_get_type (void) {
}
-void spin_event_loop (void) {
+void
+spin_event_loop (void)
+{
#line 39 "/home/jens/Source/shotwell/src/util/ui.vala"
while (TRUE) {
-#line 133 "ui.c"
- gboolean _tmp0_;
#line 39 "/home/jens/Source/shotwell/src/util/ui.vala"
- _tmp0_ = gtk_events_pending ();
-#line 39 "/home/jens/Source/shotwell/src/util/ui.vala"
- if (!_tmp0_) {
+ if (!gtk_events_pending ()) {
#line 39 "/home/jens/Source/shotwell/src/util/ui.vala"
break;
-#line 141 "ui.c"
+#line 152 "ui.c"
}
#line 40 "/home/jens/Source/shotwell/src/util/ui.vala"
gtk_main_iteration ();
-#line 145 "ui.c"
+#line 156 "ui.c"
}
}
-AdjustmentRelation get_adjustment_relation (GtkAdjustment* adjustment, gint value) {
+AdjustmentRelation
+get_adjustment_relation (GtkAdjustment* adjustment,
+ gint value)
+{
AdjustmentRelation result = 0;
- gint _tmp0_;
- GtkAdjustment* _tmp1_;
- gdouble _tmp2_;
#line 43 "/home/jens/Source/shotwell/src/util/ui.vala"
g_return_val_if_fail (GTK_IS_ADJUSTMENT (adjustment), 0);
#line 44 "/home/jens/Source/shotwell/src/util/ui.vala"
- _tmp0_ = value;
-#line 44 "/home/jens/Source/shotwell/src/util/ui.vala"
- _tmp1_ = adjustment;
-#line 44 "/home/jens/Source/shotwell/src/util/ui.vala"
- _tmp2_ = gtk_adjustment_get_value (_tmp1_);
-#line 44 "/home/jens/Source/shotwell/src/util/ui.vala"
- if (_tmp0_ < ((gint) _tmp2_)) {
+ if (value < ((gint) gtk_adjustment_get_value (adjustment))) {
#line 45 "/home/jens/Source/shotwell/src/util/ui.vala"
result = ADJUSTMENT_RELATION_BELOW;
#line 45 "/home/jens/Source/shotwell/src/util/ui.vala"
return result;
-#line 169 "ui.c"
+#line 174 "ui.c"
} else {
- gint _tmp3_;
- GtkAdjustment* _tmp4_;
- gdouble _tmp5_;
- GtkAdjustment* _tmp6_;
- gdouble _tmp7_;
-#line 46 "/home/jens/Source/shotwell/src/util/ui.vala"
- _tmp3_ = value;
-#line 46 "/home/jens/Source/shotwell/src/util/ui.vala"
- _tmp4_ = adjustment;
-#line 46 "/home/jens/Source/shotwell/src/util/ui.vala"
- _tmp5_ = gtk_adjustment_get_value (_tmp4_);
-#line 46 "/home/jens/Source/shotwell/src/util/ui.vala"
- _tmp6_ = adjustment;
#line 46 "/home/jens/Source/shotwell/src/util/ui.vala"
- _tmp7_ = gtk_adjustment_get_page_size (_tmp6_);
-#line 46 "/home/jens/Source/shotwell/src/util/ui.vala"
- if (_tmp3_ > ((gint) (_tmp5_ + _tmp7_))) {
+ if (value > ((gint) (gtk_adjustment_get_value (adjustment) + gtk_adjustment_get_page_size (adjustment)))) {
#line 47 "/home/jens/Source/shotwell/src/util/ui.vala"
result = ADJUSTMENT_RELATION_ABOVE;
#line 47 "/home/jens/Source/shotwell/src/util/ui.vala"
return result;
-#line 192 "ui.c"
+#line 182 "ui.c"
} else {
#line 49 "/home/jens/Source/shotwell/src/util/ui.vala"
result = ADJUSTMENT_RELATION_IN_RANGE;
#line 49 "/home/jens/Source/shotwell/src/util/ui.vala"
return result;
-#line 198 "ui.c"
+#line 188 "ui.c"
}
}
}
-void get_adjustment_page (GtkAdjustment* hadj, GtkAdjustment* vadj, GdkRectangle* result) {
+void
+get_adjustment_page (GtkAdjustment* hadj,
+ GtkAdjustment* vadj,
+ GdkRectangle* result)
+{
GdkRectangle rect = {0};
- GtkAdjustment* _tmp0_;
- gdouble _tmp1_;
- GtkAdjustment* _tmp2_;
- gdouble _tmp3_;
- GtkAdjustment* _tmp4_;
- gdouble _tmp5_;
- GtkAdjustment* _tmp6_;
- gdouble _tmp7_;
#line 52 "/home/jens/Source/shotwell/src/util/ui.vala"
g_return_if_fail (GTK_IS_ADJUSTMENT (hadj));
#line 52 "/home/jens/Source/shotwell/src/util/ui.vala"
@@ -217,50 +203,31 @@ void get_adjustment_page (GtkAdjustment* hadj, GtkAdjustment* vadj, GdkRectangle
#line 53 "/home/jens/Source/shotwell/src/util/ui.vala"
memset (&rect, 0, sizeof (GdkRectangle));
#line 54 "/home/jens/Source/shotwell/src/util/ui.vala"
- _tmp0_ = hadj;
-#line 54 "/home/jens/Source/shotwell/src/util/ui.vala"
- _tmp1_ = gtk_adjustment_get_value (_tmp0_);
-#line 54 "/home/jens/Source/shotwell/src/util/ui.vala"
- rect.x = (gint) _tmp1_;
+ rect.x = (gint) gtk_adjustment_get_value (hadj);
#line 55 "/home/jens/Source/shotwell/src/util/ui.vala"
- _tmp2_ = vadj;
-#line 55 "/home/jens/Source/shotwell/src/util/ui.vala"
- _tmp3_ = gtk_adjustment_get_value (_tmp2_);
-#line 55 "/home/jens/Source/shotwell/src/util/ui.vala"
- rect.y = (gint) _tmp3_;
-#line 56 "/home/jens/Source/shotwell/src/util/ui.vala"
- _tmp4_ = hadj;
+ rect.y = (gint) gtk_adjustment_get_value (vadj);
#line 56 "/home/jens/Source/shotwell/src/util/ui.vala"
- _tmp5_ = gtk_adjustment_get_page_size (_tmp4_);
-#line 56 "/home/jens/Source/shotwell/src/util/ui.vala"
- rect.width = (gint) _tmp5_;
-#line 57 "/home/jens/Source/shotwell/src/util/ui.vala"
- _tmp6_ = vadj;
-#line 57 "/home/jens/Source/shotwell/src/util/ui.vala"
- _tmp7_ = gtk_adjustment_get_page_size (_tmp6_);
+ rect.width = (gint) gtk_adjustment_get_page_size (hadj);
#line 57 "/home/jens/Source/shotwell/src/util/ui.vala"
- rect.height = (gint) _tmp7_;
+ rect.height = (gint) gtk_adjustment_get_page_size (vadj);
#line 59 "/home/jens/Source/shotwell/src/util/ui.vala"
*result = rect;
#line 59 "/home/jens/Source/shotwell/src/util/ui.vala"
return;
-#line 248 "ui.c"
+#line 218 "ui.c"
}
-gboolean has_only_key_modifier (GdkModifierType field, GdkModifierType mask) {
+gboolean
+has_only_key_modifier (GdkModifierType field,
+ GdkModifierType mask)
+{
gboolean result = FALSE;
- GdkModifierType _tmp0_;
- GdkModifierType _tmp1_;
-#line 77 "/home/jens/Source/shotwell/src/util/ui.vala"
- _tmp0_ = field;
-#line 77 "/home/jens/Source/shotwell/src/util/ui.vala"
- _tmp1_ = mask;
#line 77 "/home/jens/Source/shotwell/src/util/ui.vala"
- result = (_tmp0_ & ((((((((GDK_SHIFT_MASK | GDK_CONTROL_MASK) | GDK_MOD1_MASK) | GDK_MOD3_MASK) | GDK_MOD4_MASK) | GDK_MOD5_MASK) | GDK_SUPER_MASK) | GDK_HYPER_MASK) | GDK_META_MASK)) == _tmp1_;
+ result = (field & ((((((((GDK_SHIFT_MASK | GDK_CONTROL_MASK) | GDK_MOD1_MASK) | GDK_MOD3_MASK) | GDK_MOD4_MASK) | GDK_MOD5_MASK) | GDK_SUPER_MASK) | GDK_HYPER_MASK) | GDK_META_MASK)) == mask;
#line 77 "/home/jens/Source/shotwell/src/util/ui.vala"
return result;
-#line 264 "ui.c"
+#line 231 "ui.c"
}