summaryrefslogtreecommitdiff
path: root/src/util
diff options
context:
space:
mode:
Diffstat (limited to 'src/util')
-rw-r--r--src/util/KeyValueMap.c979
-rw-r--r--src/util/Util.c11
-rw-r--r--src/util/file.c1666
-rw-r--r--src/util/image.c2839
-rw-r--r--src/util/image.vala53
-rw-r--r--src/util/misc.c3397
-rw-r--r--src/util/misc.vala9
-rw-r--r--src/util/string.c2168
-rw-r--r--src/util/system.c173
-rw-r--r--src/util/system.vala5
-rw-r--r--src/util/ui.c151
11 files changed, 5476 insertions, 5975 deletions
diff --git a/src/util/KeyValueMap.c b/src/util/KeyValueMap.c
index ff453c2..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,79 +64,109 @@ 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_;
-#line 11 "/home/jens/Source/shotwell/src/util/KeyValueMap.vala"
- g_return_val_if_fail (group != NULL, NULL);
+ 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 115 "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 122 "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_;
KeyValueMap* _tmp1_;
-#line 15 "/home/jens/Source/shotwell/src/util/KeyValueMap.vala"
- g_return_val_if_fail (IS_KEY_VALUE_MAP (self), NULL);
#line 16 "/home/jens/Source/shotwell/src/util/KeyValueMap.vala"
_tmp0_ = self->priv->group;
#line 16 "/home/jens/Source/shotwell/src/util/KeyValueMap.vala"
_tmp1_ = key_value_map_new (_tmp0_);
#line 16 "/home/jens/Source/shotwell/src/util/KeyValueMap.vala"
clone = _tmp1_;
-#line 139 "KeyValueMap.c"
+#line 170 "KeyValueMap.c"
{
GeeIterator* _key_it = NULL;
GeeHashMap* _tmp2_;
@@ -162,75 +193,72 @@ KeyValueMap* key_value_map_copy (KeyValueMap* self) {
_key_it = _tmp7_;
#line 17 "/home/jens/Source/shotwell/src/util/KeyValueMap.vala"
while (TRUE) {
-#line 166 "KeyValueMap.c"
+#line 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 187 "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 215 "KeyValueMap.c"
+#line 243 "KeyValueMap.c"
}
#line 17 "/home/jens/Source/shotwell/src/util/KeyValueMap.vala"
_g_object_unref0 (_key_it);
-#line 219 "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 225 "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_;
-#line 23 "/home/jens/Source/shotwell/src/util/KeyValueMap.vala"
- g_return_val_if_fail (IS_KEY_VALUE_MAP (self), NULL);
#line 24 "/home/jens/Source/shotwell/src/util/KeyValueMap.vala"
_tmp0_ = self->priv->group;
#line 24 "/home/jens/Source/shotwell/src/util/KeyValueMap.vala"
@@ -239,17 +267,17 @@ gchar* key_value_map_get_group (KeyValueMap* self) {
result = _tmp1_;
#line 24 "/home/jens/Source/shotwell/src/util/KeyValueMap.vala"
return result;
-#line 243 "KeyValueMap.c"
+#line 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_;
GeeSet* _tmp2_;
-#line 27 "/home/jens/Source/shotwell/src/util/KeyValueMap.vala"
- g_return_val_if_fail (IS_KEY_VALUE_MAP (self), NULL);
#line 28 "/home/jens/Source/shotwell/src/util/KeyValueMap.vala"
_tmp0_ = self->priv->map;
#line 28 "/home/jens/Source/shotwell/src/util/KeyValueMap.vala"
@@ -260,94 +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 264 "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 31 "/home/jens/Source/shotwell/src/util/KeyValueMap.vala"
- g_return_val_if_fail (IS_KEY_VALUE_MAP (self), FALSE);
-#line 31 "/home/jens/Source/shotwell/src/util/KeyValueMap.vala"
- g_return_val_if_fail (key != NULL, FALSE);
#line 32 "/home/jens/Source/shotwell/src/util/KeyValueMap.vala"
_tmp0_ = self->priv->map;
#line 32 "/home/jens/Source/shotwell/src/util/KeyValueMap.vala"
- _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 287 "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 35 "/home/jens/Source/shotwell/src/util/KeyValueMap.vala"
- g_return_if_fail (IS_KEY_VALUE_MAP (self));
-#line 35 "/home/jens/Source/shotwell/src/util/KeyValueMap.vala"
- g_return_if_fail (key != NULL);
-#line 35 "/home/jens/Source/shotwell/src/util/KeyValueMap.vala"
- g_return_if_fail (value != NULL);
-#line 36 "/home/jens/Source/shotwell/src/util/KeyValueMap.vala"
- _tmp0_ = key;
+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;
-#line 38 "/home/jens/Source/shotwell/src/util/KeyValueMap.vala"
- _tmp2_ = key;
+ _vala_assert (key != NULL, "key != null");
#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 314 "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 41 "/home/jens/Source/shotwell/src/util/KeyValueMap.vala"
- g_return_if_fail (IS_KEY_VALUE_MAP (self));
-#line 41 "/home/jens/Source/shotwell/src/util/KeyValueMap.vala"
- g_return_if_fail (key != NULL);
-#line 42 "/home/jens/Source/shotwell/src/util/KeyValueMap.vala"
- _tmp0_ = key;
+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 347 "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_;
@@ -355,668 +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 377 "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 47 "/home/jens/Source/shotwell/src/util/KeyValueMap.vala"
- g_return_if_fail (IS_KEY_VALUE_MAP (self));
-#line 47 "/home/jens/Source/shotwell/src/util/KeyValueMap.vala"
- g_return_if_fail (key != NULL);
-#line 48 "/home/jens/Source/shotwell/src/util/KeyValueMap.vala"
- _tmp0_ = key;
+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 410 "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 53 "/home/jens/Source/shotwell/src/util/KeyValueMap.vala"
- g_return_if_fail (IS_KEY_VALUE_MAP (self));
-#line 53 "/home/jens/Source/shotwell/src/util/KeyValueMap.vala"
- g_return_if_fail (key != NULL);
-#line 54 "/home/jens/Source/shotwell/src/util/KeyValueMap.vala"
- _tmp0_ = key;
+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 443 "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 451 "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 459 "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 468 "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 59 "/home/jens/Source/shotwell/src/util/KeyValueMap.vala"
- g_return_if_fail (IS_KEY_VALUE_MAP (self));
-#line 59 "/home/jens/Source/shotwell/src/util/KeyValueMap.vala"
- g_return_if_fail (key != NULL);
-#line 60 "/home/jens/Source/shotwell/src/util/KeyValueMap.vala"
- _tmp0_ = key;
+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");
+ _vala_assert (key != 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;
-#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 502 "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_;
-#line 65 "/home/jens/Source/shotwell/src/util/KeyValueMap.vala"
- g_return_val_if_fail (IS_KEY_VALUE_MAP (self), NULL);
-#line 65 "/home/jens/Source/shotwell/src/util/KeyValueMap.vala"
- g_return_val_if_fail (key != NULL, NULL);
+ 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;
+ _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"
- _tmp2_ = gee_abstract_map_get (G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, GEE_TYPE_ABSTRACT_MAP, GeeAbstractMap), _tmp1_);
-#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 531 "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 537 "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 544 "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 554 "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_;
-#line 71 "/home/jens/Source/shotwell/src/util/KeyValueMap.vala"
- g_return_val_if_fail (IS_KEY_VALUE_MAP (self), 0);
-#line 71 "/home/jens/Source/shotwell/src/util/KeyValueMap.vala"
- g_return_val_if_fail (key != NULL, 0);
+ 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;
+ _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"
- _tmp2_ = gee_abstract_map_get (G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, GEE_TYPE_ABSTRACT_MAP, GeeAbstractMap), _tmp1_);
-#line 72 "/home/jens/Source/shotwell/src/util/KeyValueMap.vala"
- value = (gchar*) _tmp2_;
-#line 74 "/home/jens/Source/shotwell/src/util/KeyValueMap.vala"
- _tmp4_ = value;
+ value = (gchar*) _tmp1_;
#line 74 "/home/jens/Source/shotwell/src/util/KeyValueMap.vala"
- if (_tmp4_ != NULL) {
-#line 582 "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 591 "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 598 "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 606 "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 877 "/usr/share/vala-0.36/vapi/glib-2.0.vapi"
- g_return_val_if_fail (str != NULL, 0.0);
-#line 878 "/usr/share/vala-0.36/vapi/glib-2.0.vapi"
- _tmp0_ = str;
-#line 878 "/usr/share/vala-0.36/vapi/glib-2.0.vapi"
- _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 624 "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_;
-#line 77 "/home/jens/Source/shotwell/src/util/KeyValueMap.vala"
- g_return_val_if_fail (IS_KEY_VALUE_MAP (self), 0.0);
-#line 77 "/home/jens/Source/shotwell/src/util/KeyValueMap.vala"
- g_return_val_if_fail (key != NULL, 0.0);
+ 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_;
-#line 80 "/home/jens/Source/shotwell/src/util/KeyValueMap.vala"
- _tmp4_ = value;
+ value = (gchar*) _tmp1_;
#line 80 "/home/jens/Source/shotwell/src/util/KeyValueMap.vala"
- if (_tmp4_ != NULL) {
-#line 652 "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 661 "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 668 "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 676 "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_;
-#line 83 "/home/jens/Source/shotwell/src/util/KeyValueMap.vala"
- g_return_val_if_fail (IS_KEY_VALUE_MAP (self), 0.0F);
-#line 83 "/home/jens/Source/shotwell/src/util/KeyValueMap.vala"
- g_return_val_if_fail (key != NULL, 0.0F);
+ 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_;
-#line 86 "/home/jens/Source/shotwell/src/util/KeyValueMap.vala"
- _tmp4_ = value;
+ value = (gchar*) _tmp1_;
#line 86 "/home/jens/Source/shotwell/src/util/KeyValueMap.vala"
- if (_tmp4_ != NULL) {
-#line 704 "KeyValueMap.c"
- const gchar* _tmp5_;
- gdouble _tmp6_;
+ _tmp3_ = value;
#line 86 "/home/jens/Source/shotwell/src/util/KeyValueMap.vala"
- _tmp5_ = value;
+ if (_tmp3_ != NULL) {
+#line 652 "KeyValueMap.c"
+ 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 713 "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 720 "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 728 "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 44 "/usr/share/vala-0.36/vapi/glib-2.0.vapi"
- g_return_val_if_fail (str != NULL, FALSE);
-#line 45 "/usr/share/vala-0.36/vapi/glib-2.0.vapi"
- _tmp0_ = str;
-#line 45 "/usr/share/vala-0.36/vapi/glib-2.0.vapi"
- 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 745 "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 751 "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_;
-#line 89 "/home/jens/Source/shotwell/src/util/KeyValueMap.vala"
- g_return_val_if_fail (IS_KEY_VALUE_MAP (self), FALSE);
-#line 89 "/home/jens/Source/shotwell/src/util/KeyValueMap.vala"
- g_return_val_if_fail (key != NULL, FALSE);
+ 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;
-#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_);
+ _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"
- value = (gchar*) _tmp2_;
+ value = (gchar*) _tmp1_;
#line 92 "/home/jens/Source/shotwell/src/util/KeyValueMap.vala"
- _tmp4_ = value;
-#line 92 "/home/jens/Source/shotwell/src/util/KeyValueMap.vala"
- if (_tmp4_ != NULL) {
-#line 780 "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 789 "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 796 "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 804 "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_;
-#line 100 "/home/jens/Source/shotwell/src/util/KeyValueMap.vala"
- g_return_if_fail (IS_KEY_VALUE_MAP (self));
-#line 100 "/home/jens/Source/shotwell/src/util/KeyValueMap.vala"
- g_return_if_fail (key != NULL);
-#line 100 "/home/jens/Source/shotwell/src/util/KeyValueMap.vala"
- g_return_if_fail (def != NULL);
+ 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;
+ _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"
- _tmp2_ = gee_abstract_map_get (G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, GEE_TYPE_ABSTRACT_MAP, GeeAbstractMap), _tmp1_);
-#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 832 "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 842 "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_;
-#line 107 "/home/jens/Source/shotwell/src/util/KeyValueMap.vala"
- _tmp6_ = value;
+ _result_ = _tmp4_;
#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 864 "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 875 "KeyValueMap.c"
+#line 798 "KeyValueMap.c"
}
}
#line 100 "/home/jens/Source/shotwell/src/util/KeyValueMap.vala"
_g_free0 (value);
-#line 880 "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 114 "/home/jens/Source/shotwell/src/util/KeyValueMap.vala"
- g_return_if_fail (IS_KEY_VALUE_MAP (self));
-#line 114 "/home/jens/Source/shotwell/src/util/KeyValueMap.vala"
- g_return_if_fail (key != NULL);
-#line 114 "/home/jens/Source/shotwell/src/util/KeyValueMap.vala"
- g_return_if_fail (point != NULL);
#line 115 "/home/jens/Source/shotwell/src/util/KeyValueMap.vala"
_tmp0_ = self->priv->map;
#line 115 "/home/jens/Source/shotwell/src/util/KeyValueMap.vala"
- _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 919 "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 926 "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 935 "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 945 "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 949 "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 957 "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 964 "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 971 "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 975 "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 979 "KeyValueMap.c"
+#line 911 "KeyValueMap.c"
} else {
#line 7 "/home/jens/Source/shotwell/src/util/KeyValueMap.vala"
value->data[0].v_pointer = NULL;
-#line 983 "KeyValueMap.c"
+#line 915 "KeyValueMap.c"
}
#line 7 "/home/jens/Source/shotwell/src/util/KeyValueMap.vala"
return NULL;
-#line 987 "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 998 "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 1004 "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 1008 "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 1012 "KeyValueMap.c"
+#line 949 "KeyValueMap.c"
}
#line 7 "/home/jens/Source/shotwell/src/util/KeyValueMap.vala"
return NULL;
-#line 1016 "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);
@@ -1026,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 1030 "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 1039 "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));
@@ -1055,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 1059 "KeyValueMap.c"
+#line 1007 "KeyValueMap.c"
} else {
#line 7 "/home/jens/Source/shotwell/src/util/KeyValueMap.vala"
value->data[0].v_pointer = NULL;
-#line 1063 "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 1069 "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));
@@ -1084,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 1088 "KeyValueMap.c"
+#line 1039 "KeyValueMap.c"
} else {
#line 7 "/home/jens/Source/shotwell/src/util/KeyValueMap.vala"
value->data[0].v_pointer = NULL;
-#line 1092 "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 1098 "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 1110 "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);
@@ -1120,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 1124 "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);
@@ -1134,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 1138 "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 };
@@ -1152,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 1163 "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"
@@ -1172,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 1176 "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 d103a3f..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>
@@ -27,6 +28,27 @@ typedef struct _Dimensions Dimensions;
#define _cairo_destroy0(var) ((var == NULL) ? NULL : (var = (cairo_destroy (var), NULL)))
#define _cairo_surface_destroy0(var) ((var == NULL) ? NULL : (var = (cairo_surface_destroy (var), NULL)))
+#define TYPE_CONFIGURATION_FACADE (configuration_facade_get_type ())
+#define CONFIGURATION_FACADE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_CONFIGURATION_FACADE, ConfigurationFacade))
+#define CONFIGURATION_FACADE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_CONFIGURATION_FACADE, ConfigurationFacadeClass))
+#define IS_CONFIGURATION_FACADE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_CONFIGURATION_FACADE))
+#define IS_CONFIGURATION_FACADE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_CONFIGURATION_FACADE))
+#define CONFIGURATION_FACADE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_CONFIGURATION_FACADE, ConfigurationFacadeClass))
+
+typedef struct _ConfigurationFacade ConfigurationFacade;
+typedef struct _ConfigurationFacadeClass ConfigurationFacadeClass;
+
+#define CONFIG_TYPE_FACADE (config_facade_get_type ())
+#define CONFIG_FACADE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), CONFIG_TYPE_FACADE, ConfigFacade))
+#define CONFIG_FACADE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), CONFIG_TYPE_FACADE, ConfigFacadeClass))
+#define CONFIG_IS_FACADE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), CONFIG_TYPE_FACADE))
+#define CONFIG_IS_FACADE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), CONFIG_TYPE_FACADE))
+#define CONFIG_FACADE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), CONFIG_TYPE_FACADE, ConfigFacadeClass))
+
+typedef struct _ConfigFacade ConfigFacade;
+typedef struct _ConfigFacadeClass ConfigFacadeClass;
+#define _g_free0(var) (var = (g_free (var), NULL))
+
#define TYPE_BOX (box_get_type ())
typedef struct _Box Box;
#define _vala_assert(expr, msg) if G_LIKELY (expr) ; else g_assertion_message_expr (G_LOG_DOMAIN, __FILE__, __LINE__, G_STRFUNC, msg);
@@ -47,179 +69,245 @@ struct _Box {
};
+extern cairo_surface_t* background_surface;
+cairo_surface_t* background_surface = NULL;
gboolean is_color_parsable (const gchar* spec);
-void parse_color (const gchar* spec, GdkRGBA* result);
-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;
+ConfigFacade* config_facade_get_instance (void);
+gchar* configuration_facade_get_transparent_background_type (ConfigurationFacade* self);
+gchar* configuration_facade_get_transparent_background_color (ConfigurationFacade* self);
+void invalidate_transparent_background (void);
+void paint_pixmap_with_background (cairo_t* ctx,
+ GdkPixbuf* pixbuf,
+ gint x,
+ gint y);
GType box_get_type (void) G_GNUC_CONST;
Box* box_dup (const Box* self);
void box_free (Box* self);
-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 112 "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 129 "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 147 "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 153 "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 159 "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"
+ _tmp1_ = rgba;
#line 136 "/home/jens/Source/shotwell/src/util/image.vala"
- _tmp2_ = ctx;
+ _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;
-#line 136 "/home/jens/Source/shotwell/src/util/image.vala"
- _tmp10_ = _tmp9_.alpha;
+ _tmp8_ = _tmp7_.alpha;
#line 136 "/home/jens/Source/shotwell/src/util/image.vala"
- cairo_set_source_rgba (_tmp2_, _tmp4_, _tmp6_, _tmp8_, _tmp10_);
-#line 206 "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 213 "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 223 "image.c"
+#line 311 "image.c"
{
GtkIconTheme* icon_theme = NULL;
GtkIconTheme* _tmp0_;
@@ -241,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 245 "image.c"
+#line 333 "image.c"
goto __catch4_g_error;
}
#line 148 "/home/jens/Source/shotwell/src/util/image.vala"
@@ -256,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 260 "image.c"
+#line 348 "image.c"
}
goto __finally4;
__catch4_g_error:
@@ -283,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 287 "image.c"
+#line 375 "image.c"
}
__finally4:
#line 146 "/home/jens/Source/shotwell/src/util/image.vala"
@@ -296,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 300 "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 306 "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_;
+ original = _tmp0_;
#line 160 "/home/jens/Source/shotwell/src/util/image.vala"
- _tmp2_ = scale;
+ dimensions_get_scaled (&original, scale, scale_up, &_tmp1_);
#line 160 "/home/jens/Source/shotwell/src/util/image.vala"
- _tmp3_ = scale_up;
-#line 160 "/home/jens/Source/shotwell/src/util/image.vala"
- dimensions_get_scaled (&original, _tmp2_, _tmp3_, &_tmp4_);
-#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 358 "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 373 "image.c"
+ _tmp2_ = _tmp8_ == _tmp10_;
+#line 455 "image.c"
} else {
#line 161 "/home/jens/Source/shotwell/src/util/image.vala"
- _tmp5_ = FALSE;
-#line 377 "image.c"
+ _tmp2_ = FALSE;
+#line 459 "image.c"
}
#line 161 "/home/jens/Source/shotwell/src/util/image.vala"
- if (_tmp5_) {
-#line 381 "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 392 "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_;
+ scaled = _tmp12_;
#line 167 "/home/jens/Source/shotwell/src/util/image.vala"
- _tmp17_ = pixbuf;
+ _tmp13_ = scaled;
#line 167 "/home/jens/Source/shotwell/src/util/image.vala"
- _tmp18_ = scaled;
+ _tmp14_ = _tmp13_.width;
#line 167 "/home/jens/Source/shotwell/src/util/image.vala"
- _tmp19_ = _tmp18_.width;
+ _tmp15_ = scaled;
#line 167 "/home/jens/Source/shotwell/src/util/image.vala"
- _tmp20_ = 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 416 "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;
-#line 171 "/home/jens/Source/shotwell/src/util/image.vala"
- dimensions_for_pixbuf (_tmp0_, &_tmp1_);
+ dimensions_for_pixbuf (pixbuf, &_tmp0_);
#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 458 "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 473 "image.c"
+ _tmp1_ = _tmp7_ == _tmp9_;
+#line 547 "image.c"
} else {
#line 172 "/home/jens/Source/shotwell/src/util/image.vala"
- _tmp2_ = FALSE;
-#line 477 "image.c"
+ _tmp1_ = FALSE;
+#line 551 "image.c"
}
#line 172 "/home/jens/Source/shotwell/src/util/image.vala"
- if (_tmp2_) {
-#line 481 "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 492 "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_;
-#line 178 "/home/jens/Source/shotwell/src/util/image.vala"
- _tmp14_ = pixbuf;
+ *resized = _tmp11_;
#line 178 "/home/jens/Source/shotwell/src/util/image.vala"
- _tmp15_ = *resized;
+ _tmp12_ = *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 516 "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"
@@ -529,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 546 "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"
@@ -581,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);
-#line 200 "/home/jens/Source/shotwell/src/util/image.vala"
- _tmp15_ = radius_proportion;
+ bottom = (gdouble) (_tmp9_ + _tmp11_);
#line 200 "/home/jens/Source/shotwell/src/util/image.vala"
- radius = ((gdouble) _tmp14_) / _tmp15_;
+ radius = ((gdouble) dimensions_minor_axis (dim)) / radius_proportion;
#line 204 "/home/jens/Source/shotwell/src/util/image.vala"
- _tmp16_ = cx;
-#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);
-#line 206 "/home/jens/Source/shotwell/src/util/image.vala"
- _tmp18_ = cx;
+ cairo_arc (cx, right - radius, top + radius, radius, -90 * DEGREE, 0 * DEGREE);
#line 206 "/home/jens/Source/shotwell/src/util/image.vala"
- cairo_arc (_tmp18_, right - radius, bottom - radius, radius, 0 * DEGREE, 90 * DEGREE);
+ cairo_arc (cx, right - radius, bottom - radius, radius, 0 * DEGREE, 90 * DEGREE);
#line 207 "/home/jens/Source/shotwell/src/util/image.vala"
- _tmp19_ = cx;
-#line 207 "/home/jens/Source/shotwell/src/util/image.vala"
- cairo_arc (_tmp19_, left + radius, bottom - radius, radius, 90 * DEGREE, 180 * DEGREE);
-#line 208 "/home/jens/Source/shotwell/src/util/image.vala"
- _tmp20_ = cx;
+ cairo_arc (cx, left + radius, bottom - radius, radius, 90 * DEGREE, 180 * DEGREE);
#line 208 "/home/jens/Source/shotwell/src/util/image.vala"
- cairo_arc (_tmp20_, left + radius, top + radius, radius, 180 * DEGREE, 270 * DEGREE);
+ cairo_arc (cx, left + radius, top + radius, radius, 180 * DEGREE, 270 * DEGREE);
#line 209 "/home/jens/Source/shotwell/src/util/image.vala"
- _tmp21_ = cx;
-#line 209 "/home/jens/Source/shotwell/src/util/image.vala"
- cairo_clip (_tmp21_);
-#line 652 "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 671 "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 710 "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 716 "image.c"
+ _tmp0_ = red <= 255;
+#line 731 "image.c"
} else {
#line 217 "/home/jens/Source/shotwell/src/util/image.vala"
_tmp0_ = FALSE;
-#line 720 "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;
+ if (green >= -255) {
#line 218 "/home/jens/Source/shotwell/src/util/image.vala"
- if (_tmp4_ >= -255) {
-#line 728 "image.c"
- gint _tmp5_;
-#line 218 "/home/jens/Source/shotwell/src/util/image.vala"
- _tmp5_ = green;
-#line 218 "/home/jens/Source/shotwell/src/util/image.vala"
- _tmp3_ = _tmp5_ <= 255;
-#line 734 "image.c"
+ _tmp1_ = green <= 255;
+#line 743 "image.c"
} else {
#line 218 "/home/jens/Source/shotwell/src/util/image.vala"
- _tmp3_ = FALSE;
-#line 738 "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 746 "image.c"
- gint _tmp8_;
-#line 219 "/home/jens/Source/shotwell/src/util/image.vala"
- _tmp8_ = blue;
-#line 219 "/home/jens/Source/shotwell/src/util/image.vala"
- _tmp6_ = _tmp8_ <= 255;
-#line 752 "image.c"
+ _tmp2_ = blue <= 255;
+#line 755 "image.c"
} else {
#line 219 "/home/jens/Source/shotwell/src/util/image.vala"
- _tmp6_ = FALSE;
-#line 756 "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");
-#line 220 "/home/jens/Source/shotwell/src/util/image.vala"
- _tmp10_ = alpha;
+ _vala_assert (_tmp2_, "blue >= -255 && blue <= 255");
#line 220 "/home/jens/Source/shotwell/src/util/image.vala"
- if (_tmp10_ >= -255) {
-#line 764 "image.c"
- gint _tmp11_;
+ if (alpha >= -255) {
#line 220 "/home/jens/Source/shotwell/src/util/image.vala"
- _tmp11_ = alpha;
-#line 220 "/home/jens/Source/shotwell/src/util/image.vala"
- _tmp9_ = _tmp11_ <= 255;
-#line 770 "image.c"
+ _tmp3_ = alpha <= 255;
+#line 767 "image.c"
} else {
#line 220 "/home/jens/Source/shotwell/src/util/image.vala"
- _tmp9_ = FALSE;
-#line 774 "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");
-#line 222 "/home/jens/Source/shotwell/src/util/image.vala"
- _tmp12_ = pixbuf;
+ _vala_assert (_tmp3_, "alpha >= -255 && alpha <= 255");
#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;
+ width = gdk_pixbuf_get_width (pixbuf);
#line 223 "/home/jens/Source/shotwell/src/util/image.vala"
- _tmp15_ = gdk_pixbuf_get_height (_tmp14_);
-#line 223 "/home/jens/Source/shotwell/src/util/image.vala"
- height = _tmp15_;
-#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_);
+ height = gdk_pixbuf_get_height (pixbuf);
#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;
-#line 229 "/home/jens/Source/shotwell/src/util/image.vala"
- _tmp24_ = gdk_pixbuf_get_colorspace (_tmp23_);
+ _vala_assert (_tmp5_ >= 3, "channels >= 3");
#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;
-#line 230 "/home/jens/Source/shotwell/src/util/image.vala"
- _tmp26_ = gdk_pixbuf_get_bits_per_sample (_tmp25_);
+ _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"
- _vala_assert (_tmp26_ == 8, "pixbuf.get_bits_per_sample() == 8");
-#line 824 "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 829 "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 836 "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 844 "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 850 "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 862 "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 870 "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 875 "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 882 "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 896 "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 902 "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 914 "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_);
+ offset = _tmp16_ + (_tmp17_ * _tmp18_);
#line 238 "/home/jens/Source/shotwell/src/util/image.vala"
- _tmp40_ = red;
-#line 238 "/home/jens/Source/shotwell/src/util/image.vala"
- if (_tmp40_ != 0) {
-#line 928 "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 955 "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 961 "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;
-#line 242 "/home/jens/Source/shotwell/src/util/image.vala"
- _tmp51_ = offset;
+ 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"
- _tmp52_ = pixels;
+ _tmp25_ = pixels;
#line 242 "/home/jens/Source/shotwell/src/util/image.vala"
- _tmp53_ = offset;
+ _tmp26_ = offset;
#line 242 "/home/jens/Source/shotwell/src/util/image.vala"
- _tmp54_ = _tmp52_[_tmp53_ + 1];
+ _tmp27_ = pixels;
#line 242 "/home/jens/Source/shotwell/src/util/image.vala"
- _tmp55_ = green;
+ _tmp28_ = offset;
#line 242 "/home/jens/Source/shotwell/src/util/image.vala"
- _tmp56_ = shift_color_byte ((gint) _tmp54_, _tmp55_);
+ _tmp29_ = _tmp27_[_tmp28_ + 1];
#line 242 "/home/jens/Source/shotwell/src/util/image.vala"
- _tmp50_[_tmp51_ + 1] = _tmp56_;
+ _tmp25_[_tmp26_ + 1] = shift_color_byte ((gint) _tmp29_, green);
#line 242 "/home/jens/Source/shotwell/src/util/image.vala"
- _tmp57_ = _tmp50_[_tmp51_ + 1];
-#line 988 "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 994 "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 1021 "image.c"
+ _tmp36_ = _tmp31_[_tmp32_ + 2];
+#line 964 "image.c"
}
#line 247 "/home/jens/Source/shotwell/src/util/image.vala"
- _tmp68_ = alpha;
-#line 247 "/home/jens/Source/shotwell/src/util/image.vala"
- if (_tmp68_ != 0) {
-#line 1027 "image.c"
- gint _tmp69_;
+ if (alpha != 0) {
+#line 968 "image.c"
+ gint _tmp38_;
#line 247 "/home/jens/Source/shotwell/src/util/image.vala"
- _tmp69_ = channels;
+ _tmp38_ = channels;
#line 247 "/home/jens/Source/shotwell/src/util/image.vala"
- _tmp67_ = _tmp69_ >= 4;
-#line 1033 "image.c"
+ _tmp37_ = _tmp38_ >= 4;
+#line 974 "image.c"
} else {
#line 247 "/home/jens/Source/shotwell/src/util/image.vala"
- _tmp67_ = FALSE;
-#line 1037 "image.c"
+ _tmp37_ = FALSE;
+#line 978 "image.c"
}
#line 247 "/home/jens/Source/shotwell/src/util/image.vala"
- if (_tmp67_) {
-#line 1041 "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 1068 "image.c"
+ _tmp44_ = _tmp39_[_tmp40_ + 3];
+#line 1003 "image.c"
}
}
}
@@ -1075,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;
+ _tmp3_ = *rect;
#line 254 "/home/jens/Source/shotwell/src/util/image.vala"
- _tmp4_ = *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 1097 "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;
+ _tmp5_ = *rect;
#line 254 "/home/jens/Source/shotwell/src/util/image.vala"
- _tmp7_ = *rect;
+ _tmp6_ = _tmp5_.x;
#line 254 "/home/jens/Source/shotwell/src/util/image.vala"
- _tmp8_ = _tmp7_.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 1115 "image.c"
+ _tmp2_ = x < (_tmp6_ + _tmp8_);
+#line 1048 "image.c"
} else {
#line 254 "/home/jens/Source/shotwell/src/util/image.vala"
_tmp2_ = FALSE;
-#line 1119 "image.c"
+#line 1052 "image.c"
}
#line 254 "/home/jens/Source/shotwell/src/util/image.vala"
if (_tmp2_) {
-#line 1123 "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 1135 "image.c"
+ _tmp1_ = y >= _tmp10_;
+#line 1065 "image.c"
} else {
#line 254 "/home/jens/Source/shotwell/src/util/image.vala"
_tmp1_ = FALSE;
-#line 1139 "image.c"
+#line 1069 "image.c"
}
#line 254 "/home/jens/Source/shotwell/src/util/image.vala"
if (_tmp1_) {
-#line 1143 "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 1161 "image.c"
+ _tmp0_ = y <= (_tmp12_ + _tmp14_);
+#line 1088 "image.c"
} else {
#line 254 "/home/jens/Source/shotwell/src/util/image.vala"
_tmp0_ = FALSE;
-#line 1165 "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 1171 "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;
@@ -1194,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 1198 "image.c"
+#line 1128 "image.c"
GdkRectangle _tmp7_;
gint _tmp8_;
GdkRectangle _tmp9_;
@@ -1209,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 1213 "image.c"
+#line 1143 "image.c"
} else {
#line 258 "/home/jens/Source/shotwell/src/util/image.vala"
_tmp2_ = FALSE;
-#line 1217 "image.c"
+#line 1147 "image.c"
}
#line 258 "/home/jens/Source/shotwell/src/util/image.vala"
if (_tmp2_) {
-#line 1221 "image.c"
+#line 1151 "image.c"
GdkRectangle _tmp11_;
gint _tmp12_;
GdkRectangle _tmp13_;
@@ -1232,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 1236 "image.c"
+#line 1166 "image.c"
} else {
#line 258 "/home/jens/Source/shotwell/src/util/image.vala"
_tmp1_ = FALSE;
-#line 1240 "image.c"
+#line 1170 "image.c"
}
#line 258 "/home/jens/Source/shotwell/src/util/image.vala"
if (_tmp1_) {
-#line 1244 "image.c"
+#line 1174 "image.c"
GdkRectangle _tmp15_;
gint _tmp16_;
GdkRectangle _tmp17_;
@@ -1255,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 1259 "image.c"
+#line 1189 "image.c"
} else {
#line 258 "/home/jens/Source/shotwell/src/util/image.vala"
_tmp0_ = FALSE;
-#line 1263 "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 1269 "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_;
@@ -1304,32 +1236,32 @@ gchar* rectangle_to_string (GdkRectangle* rect) {
result = _tmp8_;
#line 262 "/home/jens/Source/shotwell/src/util/image.vala"
return result;
-#line 1308 "image.c"
+#line 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"
@@ -1345,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_;
-#line 269 "/home/jens/Source/shotwell/src/util/image.vala"
- _tmp10_ = *original;
+ rect.y = CLAMP (_tmp5_, 0, _tmp7_);
#line 269 "/home/jens/Source/shotwell/src/util/image.vala"
- _tmp11_ = _tmp10_.width;
+ _tmp8_ = *original;
#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 1392 "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"
@@ -1408,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 1431 "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_;
@@ -1474,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 1478 "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_;
@@ -1521,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 1525 "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 1544 "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 1549 "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 1556 "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 1574 "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 1580 "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 1596 "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 1614 "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 1636 "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 1666 "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 1678 "image.c"
+ gdk_pixels = _tmp23_ + _tmp25_;
+#line 1598 "image.c"
}
}
}
@@ -1691,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;
+ _vala_dest_width = (src_width * cos (angle)) + (src_height * sin (angle));
#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;
-#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 1758 "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 1764 "image.c"
+#line 1642 "image.c"
}
}
@@ -1771,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_;
@@ -1822,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 1854 "image.c"
- GdkPixbuf* _tmp1_;
- GdkPixbuf* _tmp2_;
+ if (angle == 0.0) {
+#line 1721 "image.c"
+ GdkPixbuf* _tmp0_;
#line 354 "/home/jens/Source/shotwell/src/util/image.vala"
- _tmp1_ = source_pixbuf;
+ _tmp0_ = _g_object_ref0 (source_pixbuf);
#line 354 "/home/jens/Source/shotwell/src/util/image.vala"
- _tmp2_ = _g_object_ref0 (_tmp1_);
-#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 1865 "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_;
+ y_tmp = _tmp6_;
#line 364 "/home/jens/Source/shotwell/src/util/image.vala"
- _tmp12_ = x_tmp;
+ _tmp7_ = x_tmp;
#line 364 "/home/jens/Source/shotwell/src/util/image.vala"
- _tmp13_ = round (_tmp12_);
+ _tmp8_ = y_tmp;
#line 364 "/home/jens/Source/shotwell/src/util/image.vala"
- _tmp14_ = y_tmp;
+ _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"
- _tmp15_ = round (_tmp14_);
-#line 364 "/home/jens/Source/shotwell/src/util/image.vala"
- _tmp16_ = gdk_pixbuf_new (GDK_COLORSPACE_RGB, TRUE, 8, (gint) _tmp13_, (gint) _tmp15_);
-#line 364 "/home/jens/Source/shotwell/src/util/image.vala"
- dest_pixbuf = _tmp16_;
-#line 369 "/home/jens/Source/shotwell/src/util/image.vala"
- _tmp18_ = source_pixbuf;
+ dest_pixbuf = _tmp9_;
#line 369 "/home/jens/Source/shotwell/src/util/image.vala"
- _tmp19_ = gdk_pixbuf_get_has_alpha (_tmp18_);
+ _tmp11_ = gdk_pixbuf_get_has_alpha (source_pixbuf);
#line 369 "/home/jens/Source/shotwell/src/util/image.vala"
- _tmp20_ = _tmp19_;
+ _tmp12_ = _tmp11_;
#line 369 "/home/jens/Source/shotwell/src/util/image.vala"
- if (_tmp20_) {
+ if (_tmp12_) {
#line 369 "/home/jens/Source/shotwell/src/util/image.vala"
- _tmp17_ = CAIRO_FORMAT_ARGB32;
-#line 1909 "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 1913 "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));
+ cairo_translate (_tmp37_, (gdouble) (_tmp40_ / 2), (gdouble) (_tmp43_ / 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;
-#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;
-#line 380 "/home/jens/Source/shotwell/src/util/image.vala"
- _tmp56_ = source_pixbuf;
+ cairo_rotate (_tmp44_, degrees_to_radians (angle));
#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));
-#line 382 "/home/jens/Source/shotwell/src/util/image.vala"
- _tmp62_ = context;
+ cairo_translate (_tmp45_, (gdouble) ((-_tmp47_) / 2), (gdouble) ((-_tmp49_) / 2));
#line 382 "/home/jens/Source/shotwell/src/util/image.vala"
- _tmp63_ = source_pixbuf;
+ _tmp50_ = context;
#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"
@@ -2037,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 2041 "image.c"
+#line 1883 "image.c"
}
@@ -2054,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 2090 "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 2098 "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;
+ compute_arb_rotated_size ((gdouble) img_w, (gdouble) img_h, angle, &_tmp1_, &_tmp2_);
#line 416 "/home/jens/Source/shotwell/src/util/image.vala"
- _tmp4_ = angle;
+ dest_width = _tmp1_;
#line 416 "/home/jens/Source/shotwell/src/util/image.vala"
- compute_arb_rotated_size ((gdouble) _tmp2_, (gdouble) _tmp3_, _tmp4_, &_tmp5_, &_tmp6_);
-#line 416 "/home/jens/Source/shotwell/src/util/image.vala"
- dest_width = _tmp5_;
-#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);
-#line 420 "/home/jens/Source/shotwell/src/util/image.vala"
- _tmp9_ = angle;
+ cairo_matrix_translate (&matrix, _tmp3_ / 2, _tmp4_ / 2);
#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;
+ cairo_matrix_rotate (&matrix, degrees_to_radians (angle));
#line 421 "/home/jens/Source/shotwell/src/util/image.vala"
- _tmp12_ = img_h;
-#line 421 "/home/jens/Source/shotwell/src/util/image.vala"
- cairo_matrix_translate (&matrix, (gdouble) ((-_tmp11_) / 2), (gdouble) ((-_tmp12_) / 2));
-#line 422 "/home/jens/Source/shotwell/src/util/image.vala"
- _tmp13_ = invert;
+ cairo_matrix_translate (&matrix, (gdouble) ((-img_w) / 2), (gdouble) ((-img_h) / 2));
#line 422 "/home/jens/Source/shotwell/src/util/image.vala"
- if (_tmp13_) {
-#line 2136 "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 2142 "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 2170 "image.c"
+#line 1988 "image.c"
}
@@ -2183,415 +2001,632 @@ 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;
-#line 446 "/home/jens/Source/shotwell/src/util/image.vala"
- _tmp2_ = img_h;
+ rotate_point_arb (&_tmp0_, img_w, img_h, angle, TRUE, &_tmp1_);
#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 2209 "image.c"
+#line 2024 "image.c"
+}
+
+
+static gpointer
+_cairo_surface_reference0 (gpointer self)
+{
+#line 484 "/home/jens/Source/shotwell/src/util/image.vala"
+ return self ? cairo_surface_reference (self) : NULL;
+#line 2033 "image.c"
}
-void clamp_inside_rotated_image (Box* src, gint img_w, gint img_h, gdouble angle_deg, gboolean preserve_geom, Box* result) {
+cairo_surface_t*
+get_background_surface (void)
+{
+ cairo_surface_t* result = NULL;
+ cairo_surface_t* _tmp0_;
+ cairo_surface_t* _tmp31_;
+ cairo_surface_t* _tmp32_;
+#line 452 "/home/jens/Source/shotwell/src/util/image.vala"
+ _tmp0_ = background_surface;
+#line 452 "/home/jens/Source/shotwell/src/util/image.vala"
+ if (_tmp0_ == NULL) {
+#line 2048 "image.c"
+ gchar* color_a = NULL;
+ gchar* color_b = NULL;
+ ConfigFacade* config = NULL;
+ ConfigFacade* _tmp1_;
+ gchar* type = NULL;
+ ConfigFacade* _tmp2_;
+ gchar* _tmp3_;
+ const gchar* _tmp4_;
+ const gchar* _tmp5_;
+ GQuark _tmp7_ = 0U;
+#line 458 "/home/jens/Source/shotwell/src/util/image.vala"
+ static GQuark _tmp6_label0 = 0;
+#line 458 "/home/jens/Source/shotwell/src/util/image.vala"
+ static GQuark _tmp6_label1 = 0;
+#line 2063 "image.c"
+ cairo_surface_t* _tmp17_;
+ cairo_t* ctx = NULL;
+ cairo_surface_t* _tmp18_;
+ cairo_t* _tmp19_;
+ cairo_t* _tmp20_;
+ cairo_t* _tmp21_;
+ const gchar* _tmp22_;
+ cairo_t* _tmp23_;
+ cairo_t* _tmp24_;
+ cairo_t* _tmp25_;
+ cairo_t* _tmp26_;
+ const gchar* _tmp27_;
+ cairo_t* _tmp28_;
+ cairo_t* _tmp29_;
+ cairo_t* _tmp30_;
+#line 455 "/home/jens/Source/shotwell/src/util/image.vala"
+ _tmp1_ = config_facade_get_instance ();
+#line 455 "/home/jens/Source/shotwell/src/util/image.vala"
+ config = _tmp1_;
+#line 457 "/home/jens/Source/shotwell/src/util/image.vala"
+ _tmp2_ = config;
+#line 457 "/home/jens/Source/shotwell/src/util/image.vala"
+ _tmp3_ = configuration_facade_get_transparent_background_type (G_TYPE_CHECK_INSTANCE_CAST (_tmp2_, TYPE_CONFIGURATION_FACADE, ConfigurationFacade));
+#line 457 "/home/jens/Source/shotwell/src/util/image.vala"
+ type = _tmp3_;
+#line 458 "/home/jens/Source/shotwell/src/util/image.vala"
+ _tmp4_ = type;
+#line 458 "/home/jens/Source/shotwell/src/util/image.vala"
+ _tmp5_ = _tmp4_;
+#line 458 "/home/jens/Source/shotwell/src/util/image.vala"
+ _tmp7_ = (NULL == _tmp5_) ? 0 : g_quark_from_string (_tmp5_);
+#line 458 "/home/jens/Source/shotwell/src/util/image.vala"
+ if (_tmp7_ == ((0 != _tmp6_label0) ? _tmp6_label0 : (_tmp6_label0 = g_quark_from_static_string ("checkered")))) {
+#line 458 "/home/jens/Source/shotwell/src/util/image.vala"
+ switch (0) {
+#line 2099 "image.c"
+ default:
+ {
+ gchar* _tmp8_;
+ gchar* _tmp9_;
+#line 460 "/home/jens/Source/shotwell/src/util/image.vala"
+ _tmp8_ = g_strdup ("#808080");
+#line 460 "/home/jens/Source/shotwell/src/util/image.vala"
+ _g_free0 (color_a);
+#line 460 "/home/jens/Source/shotwell/src/util/image.vala"
+ color_a = _tmp8_;
+#line 461 "/home/jens/Source/shotwell/src/util/image.vala"
+ _tmp9_ = g_strdup ("#ccc");
+#line 461 "/home/jens/Source/shotwell/src/util/image.vala"
+ _g_free0 (color_b);
+#line 461 "/home/jens/Source/shotwell/src/util/image.vala"
+ color_b = _tmp9_;
+#line 462 "/home/jens/Source/shotwell/src/util/image.vala"
+ break;
+#line 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 2124 "image.c"
+ default:
+ {
+ ConfigFacade* _tmp10_;
+ gchar* _tmp11_;
+ const gchar* _tmp12_;
+ gchar* _tmp13_;
+#line 464 "/home/jens/Source/shotwell/src/util/image.vala"
+ _tmp10_ = config;
+#line 464 "/home/jens/Source/shotwell/src/util/image.vala"
+ _tmp11_ = configuration_facade_get_transparent_background_color (G_TYPE_CHECK_INSTANCE_CAST (_tmp10_, TYPE_CONFIGURATION_FACADE, ConfigurationFacade));
+#line 464 "/home/jens/Source/shotwell/src/util/image.vala"
+ _g_free0 (color_b);
+#line 464 "/home/jens/Source/shotwell/src/util/image.vala"
+ color_b = _tmp11_;
+#line 464 "/home/jens/Source/shotwell/src/util/image.vala"
+ _tmp12_ = color_b;
+#line 464 "/home/jens/Source/shotwell/src/util/image.vala"
+ _tmp13_ = g_strdup (_tmp12_);
+#line 464 "/home/jens/Source/shotwell/src/util/image.vala"
+ _g_free0 (color_a);
+#line 464 "/home/jens/Source/shotwell/src/util/image.vala"
+ color_a = _tmp13_;
+#line 465 "/home/jens/Source/shotwell/src/util/image.vala"
+ break;
+#line 2149 "image.c"
+ }
+ }
+ } else {
+#line 458 "/home/jens/Source/shotwell/src/util/image.vala"
+ switch (0) {
+#line 2155 "image.c"
+ default:
+ {
+ gchar* _tmp14_;
+ const gchar* _tmp15_;
+ gchar* _tmp16_;
+#line 467 "/home/jens/Source/shotwell/src/util/image.vala"
+ _tmp14_ = g_strdup ("#000");
+#line 467 "/home/jens/Source/shotwell/src/util/image.vala"
+ _g_free0 (color_b);
+#line 467 "/home/jens/Source/shotwell/src/util/image.vala"
+ color_b = _tmp14_;
+#line 467 "/home/jens/Source/shotwell/src/util/image.vala"
+ _tmp15_ = color_b;
+#line 467 "/home/jens/Source/shotwell/src/util/image.vala"
+ _tmp16_ = g_strdup (_tmp15_);
+#line 467 "/home/jens/Source/shotwell/src/util/image.vala"
+ _g_free0 (color_a);
+#line 467 "/home/jens/Source/shotwell/src/util/image.vala"
+ color_a = _tmp16_;
+#line 468 "/home/jens/Source/shotwell/src/util/image.vala"
+ break;
+#line 2177 "image.c"
+ }
+ }
+ }
+#line 471 "/home/jens/Source/shotwell/src/util/image.vala"
+ _tmp17_ = cairo_image_surface_create (CAIRO_FORMAT_RGB24, 16, 16);
+#line 471 "/home/jens/Source/shotwell/src/util/image.vala"
+ _cairo_surface_destroy0 (background_surface);
+#line 471 "/home/jens/Source/shotwell/src/util/image.vala"
+ background_surface = _tmp17_;
+#line 472 "/home/jens/Source/shotwell/src/util/image.vala"
+ _tmp18_ = background_surface;
+#line 472 "/home/jens/Source/shotwell/src/util/image.vala"
+ _tmp19_ = cairo_create (_tmp18_);
+#line 472 "/home/jens/Source/shotwell/src/util/image.vala"
+ ctx = _tmp19_;
+#line 473 "/home/jens/Source/shotwell/src/util/image.vala"
+ _tmp20_ = ctx;
+#line 473 "/home/jens/Source/shotwell/src/util/image.vala"
+ cairo_set_operator (_tmp20_, CAIRO_OPERATOR_SOURCE);
+#line 474 "/home/jens/Source/shotwell/src/util/image.vala"
+ _tmp21_ = ctx;
+#line 474 "/home/jens/Source/shotwell/src/util/image.vala"
+ _tmp22_ = color_a;
+#line 474 "/home/jens/Source/shotwell/src/util/image.vala"
+ set_source_color_from_string (_tmp21_, _tmp22_);
+#line 475 "/home/jens/Source/shotwell/src/util/image.vala"
+ _tmp23_ = ctx;
+#line 475 "/home/jens/Source/shotwell/src/util/image.vala"
+ cairo_rectangle (_tmp23_, (gdouble) 0, (gdouble) 0, (gdouble) 8, (gdouble) 8);
+#line 476 "/home/jens/Source/shotwell/src/util/image.vala"
+ _tmp24_ = ctx;
+#line 476 "/home/jens/Source/shotwell/src/util/image.vala"
+ cairo_rectangle (_tmp24_, (gdouble) 8, (gdouble) 8, (gdouble) 8, (gdouble) 8);
+#line 477 "/home/jens/Source/shotwell/src/util/image.vala"
+ _tmp25_ = ctx;
+#line 477 "/home/jens/Source/shotwell/src/util/image.vala"
+ cairo_fill (_tmp25_);
+#line 478 "/home/jens/Source/shotwell/src/util/image.vala"
+ _tmp26_ = ctx;
+#line 478 "/home/jens/Source/shotwell/src/util/image.vala"
+ _tmp27_ = color_b;
+#line 478 "/home/jens/Source/shotwell/src/util/image.vala"
+ set_source_color_from_string (_tmp26_, _tmp27_);
+#line 479 "/home/jens/Source/shotwell/src/util/image.vala"
+ _tmp28_ = ctx;
+#line 479 "/home/jens/Source/shotwell/src/util/image.vala"
+ cairo_rectangle (_tmp28_, (gdouble) 0, (gdouble) 8, (gdouble) 8, (gdouble) 8);
+#line 480 "/home/jens/Source/shotwell/src/util/image.vala"
+ _tmp29_ = ctx;
+#line 480 "/home/jens/Source/shotwell/src/util/image.vala"
+ cairo_rectangle (_tmp29_, (gdouble) 8, (gdouble) 0, (gdouble) 8, (gdouble) 8);
+#line 481 "/home/jens/Source/shotwell/src/util/image.vala"
+ _tmp30_ = ctx;
+#line 481 "/home/jens/Source/shotwell/src/util/image.vala"
+ cairo_fill (_tmp30_);
+#line 452 "/home/jens/Source/shotwell/src/util/image.vala"
+ _cairo_destroy0 (ctx);
+#line 452 "/home/jens/Source/shotwell/src/util/image.vala"
+ _g_free0 (type);
+#line 452 "/home/jens/Source/shotwell/src/util/image.vala"
+ _g_object_unref0 (config);
+#line 452 "/home/jens/Source/shotwell/src/util/image.vala"
+ _g_free0 (color_b);
+#line 452 "/home/jens/Source/shotwell/src/util/image.vala"
+ _g_free0 (color_a);
+#line 2243 "image.c"
+ }
+#line 484 "/home/jens/Source/shotwell/src/util/image.vala"
+ _tmp31_ = background_surface;
+#line 484 "/home/jens/Source/shotwell/src/util/image.vala"
+ _tmp32_ = _cairo_surface_reference0 (_tmp31_);
+#line 484 "/home/jens/Source/shotwell/src/util/image.vala"
+ result = _tmp32_;
+#line 484 "/home/jens/Source/shotwell/src/util/image.vala"
+ return result;
+#line 2253 "image.c"
+}
+
+
+void
+invalidate_transparent_background (void)
+{
+#line 488 "/home/jens/Source/shotwell/src/util/image.vala"
+ _cairo_surface_destroy0 (background_surface);
+#line 488 "/home/jens/Source/shotwell/src/util/image.vala"
+ background_surface = NULL;
+#line 2264 "image.c"
+}
+
+
+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"
+ 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"
+ _tmp0_ = get_background_surface ();
+#line 493 "/home/jens/Source/shotwell/src/util/image.vala"
+ _tmp1_ = _tmp0_;
+#line 493 "/home/jens/Source/shotwell/src/util/image.vala"
+ cairo_set_source_surface (ctx, _tmp1_, (gdouble) 0, (gdouble) 0);
+#line 493 "/home/jens/Source/shotwell/src/util/image.vala"
+ _cairo_surface_destroy0 (_tmp1_);
+#line 494 "/home/jens/Source/shotwell/src/util/image.vala"
+ _tmp2_ = cairo_get_source (ctx);
+#line 494 "/home/jens/Source/shotwell/src/util/image.vala"
+ cairo_pattern_set_extend (_tmp2_, CAIRO_EXTEND_REPEAT);
+#line 495 "/home/jens/Source/shotwell/src/util/image.vala"
+ _tmp3_ = gdk_pixbuf_get_width (pixbuf);
+#line 495 "/home/jens/Source/shotwell/src/util/image.vala"
+ _tmp4_ = _tmp3_;
+#line 495 "/home/jens/Source/shotwell/src/util/image.vala"
+ _tmp5_ = gdk_pixbuf_get_height (pixbuf);
+#line 495 "/home/jens/Source/shotwell/src/util/image.vala"
+ _tmp6_ = _tmp5_;
+#line 495 "/home/jens/Source/shotwell/src/util/image.vala"
+ cairo_rectangle (ctx, (gdouble) x, (gdouble) y, (gdouble) _tmp4_, (gdouble) _tmp6_);
+#line 496 "/home/jens/Source/shotwell/src/util/image.vala"
+ cairo_fill (ctx);
+#line 2312 "image.c"
+ }
+#line 499 "/home/jens/Source/shotwell/src/util/image.vala"
+ gdk_cairo_set_source_pixbuf (ctx, pixbuf, (gdouble) x, (gdouble) y);
+#line 500 "/home/jens/Source/shotwell/src/util/image.vala"
+ 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)
+{
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_;
-#line 451 "/home/jens/Source/shotwell/src/util/image.vala"
+ gint _tmp49_;
+ Box _tmp52_ = {0};
+#line 504 "/home/jens/Source/shotwell/src/util/image.vala"
g_return_if_fail (src != NULL);
-#line 454 "/home/jens/Source/shotwell/src/util/image.vala"
+#line 507 "/home/jens/Source/shotwell/src/util/image.vala"
_tmp0_ = *src;
-#line 454 "/home/jens/Source/shotwell/src/util/image.vala"
+#line 507 "/home/jens/Source/shotwell/src/util/image.vala"
_tmp1_ = _tmp0_.left;
-#line 454 "/home/jens/Source/shotwell/src/util/image.vala"
+#line 507 "/home/jens/Source/shotwell/src/util/image.vala"
_tmp2_ = *src;
-#line 454 "/home/jens/Source/shotwell/src/util/image.vala"
+#line 507 "/home/jens/Source/shotwell/src/util/image.vala"
_tmp3_ = _tmp2_.top;
-#line 454 "/home/jens/Source/shotwell/src/util/image.vala"
+#line 507 "/home/jens/Source/shotwell/src/util/image.vala"
_tmp4_.x = _tmp1_;
-#line 454 "/home/jens/Source/shotwell/src/util/image.vala"
+#line 507 "/home/jens/Source/shotwell/src/util/image.vala"
_tmp4_.y = _tmp3_;
-#line 454 "/home/jens/Source/shotwell/src/util/image.vala"
- _tmp5_ = img_w;
-#line 454 "/home/jens/Source/shotwell/src/util/image.vala"
- _tmp6_ = img_h;
-#line 454 "/home/jens/Source/shotwell/src/util/image.vala"
- _tmp7_ = angle_deg;
-#line 454 "/home/jens/Source/shotwell/src/util/image.vala"
- derotate_point_arb (&_tmp4_, _tmp5_, _tmp6_, _tmp7_, &_tmp8_);
-#line 454 "/home/jens/Source/shotwell/src/util/image.vala"
- top_left = _tmp8_;
-#line 455 "/home/jens/Source/shotwell/src/util/image.vala"
- _tmp9_ = *src;
-#line 455 "/home/jens/Source/shotwell/src/util/image.vala"
- _tmp10_ = _tmp9_.right;
-#line 455 "/home/jens/Source/shotwell/src/util/image.vala"
- _tmp11_ = *src;
-#line 455 "/home/jens/Source/shotwell/src/util/image.vala"
- _tmp12_ = _tmp11_.top;
-#line 455 "/home/jens/Source/shotwell/src/util/image.vala"
- _tmp13_.x = _tmp10_;
-#line 455 "/home/jens/Source/shotwell/src/util/image.vala"
- _tmp13_.y = _tmp12_;
-#line 455 "/home/jens/Source/shotwell/src/util/image.vala"
- _tmp14_ = img_w;
-#line 455 "/home/jens/Source/shotwell/src/util/image.vala"
- _tmp15_ = img_h;
-#line 455 "/home/jens/Source/shotwell/src/util/image.vala"
- _tmp16_ = angle_deg;
-#line 455 "/home/jens/Source/shotwell/src/util/image.vala"
- derotate_point_arb (&_tmp13_, _tmp14_, _tmp15_, _tmp16_, &_tmp17_);
-#line 455 "/home/jens/Source/shotwell/src/util/image.vala"
- top_right = _tmp17_;
-#line 456 "/home/jens/Source/shotwell/src/util/image.vala"
+#line 507 "/home/jens/Source/shotwell/src/util/image.vala"
+ derotate_point_arb (&_tmp4_, img_w, img_h, angle_deg, &_tmp5_);
+#line 507 "/home/jens/Source/shotwell/src/util/image.vala"
+ top_left = _tmp5_;
+#line 508 "/home/jens/Source/shotwell/src/util/image.vala"
+ _tmp6_ = *src;
+#line 508 "/home/jens/Source/shotwell/src/util/image.vala"
+ _tmp7_ = _tmp6_.right;
+#line 508 "/home/jens/Source/shotwell/src/util/image.vala"
+ _tmp8_ = *src;
+#line 508 "/home/jens/Source/shotwell/src/util/image.vala"
+ _tmp9_ = _tmp8_.top;
+#line 508 "/home/jens/Source/shotwell/src/util/image.vala"
+ _tmp10_.x = _tmp7_;
+#line 508 "/home/jens/Source/shotwell/src/util/image.vala"
+ _tmp10_.y = _tmp9_;
+#line 508 "/home/jens/Source/shotwell/src/util/image.vala"
+ derotate_point_arb (&_tmp10_, img_w, img_h, angle_deg, &_tmp11_);
+#line 508 "/home/jens/Source/shotwell/src/util/image.vala"
+ top_right = _tmp11_;
+#line 509 "/home/jens/Source/shotwell/src/util/image.vala"
+ _tmp12_ = *src;
+#line 509 "/home/jens/Source/shotwell/src/util/image.vala"
+ _tmp13_ = _tmp12_.left;
+#line 509 "/home/jens/Source/shotwell/src/util/image.vala"
+ _tmp14_ = *src;
+#line 509 "/home/jens/Source/shotwell/src/util/image.vala"
+ _tmp15_ = _tmp14_.bottom;
+#line 509 "/home/jens/Source/shotwell/src/util/image.vala"
+ _tmp16_.x = _tmp13_;
+#line 509 "/home/jens/Source/shotwell/src/util/image.vala"
+ _tmp16_.y = _tmp15_;
+#line 509 "/home/jens/Source/shotwell/src/util/image.vala"
+ derotate_point_arb (&_tmp16_, img_w, img_h, angle_deg, &_tmp17_);
+#line 509 "/home/jens/Source/shotwell/src/util/image.vala"
+ bottom_left = _tmp17_;
+#line 510 "/home/jens/Source/shotwell/src/util/image.vala"
_tmp18_ = *src;
-#line 456 "/home/jens/Source/shotwell/src/util/image.vala"
- _tmp19_ = _tmp18_.left;
-#line 456 "/home/jens/Source/shotwell/src/util/image.vala"
+#line 510 "/home/jens/Source/shotwell/src/util/image.vala"
+ _tmp19_ = _tmp18_.right;
+#line 510 "/home/jens/Source/shotwell/src/util/image.vala"
_tmp20_ = *src;
-#line 456 "/home/jens/Source/shotwell/src/util/image.vala"
+#line 510 "/home/jens/Source/shotwell/src/util/image.vala"
_tmp21_ = _tmp20_.bottom;
-#line 456 "/home/jens/Source/shotwell/src/util/image.vala"
+#line 510 "/home/jens/Source/shotwell/src/util/image.vala"
_tmp22_.x = _tmp19_;
-#line 456 "/home/jens/Source/shotwell/src/util/image.vala"
+#line 510 "/home/jens/Source/shotwell/src/util/image.vala"
_tmp22_.y = _tmp21_;
-#line 456 "/home/jens/Source/shotwell/src/util/image.vala"
- _tmp23_ = img_w;
-#line 456 "/home/jens/Source/shotwell/src/util/image.vala"
- _tmp24_ = img_h;
-#line 456 "/home/jens/Source/shotwell/src/util/image.vala"
- _tmp25_ = angle_deg;
-#line 456 "/home/jens/Source/shotwell/src/util/image.vala"
- derotate_point_arb (&_tmp22_, _tmp23_, _tmp24_, _tmp25_, &_tmp26_);
-#line 456 "/home/jens/Source/shotwell/src/util/image.vala"
- bottom_left = _tmp26_;
-#line 457 "/home/jens/Source/shotwell/src/util/image.vala"
- _tmp27_ = *src;
-#line 457 "/home/jens/Source/shotwell/src/util/image.vala"
- _tmp28_ = _tmp27_.right;
-#line 457 "/home/jens/Source/shotwell/src/util/image.vala"
- _tmp29_ = *src;
-#line 457 "/home/jens/Source/shotwell/src/util/image.vala"
- _tmp30_ = _tmp29_.bottom;
-#line 457 "/home/jens/Source/shotwell/src/util/image.vala"
- _tmp31_.x = _tmp28_;
-#line 457 "/home/jens/Source/shotwell/src/util/image.vala"
- _tmp31_.y = _tmp30_;
-#line 457 "/home/jens/Source/shotwell/src/util/image.vala"
- _tmp32_ = img_w;
-#line 457 "/home/jens/Source/shotwell/src/util/image.vala"
- _tmp33_ = img_h;
-#line 457 "/home/jens/Source/shotwell/src/util/image.vala"
- _tmp34_ = angle_deg;
-#line 457 "/home/jens/Source/shotwell/src/util/image.vala"
- derotate_point_arb (&_tmp31_, _tmp32_, _tmp33_, _tmp34_, &_tmp35_);
-#line 457 "/home/jens/Source/shotwell/src/util/image.vala"
- bottom_right = _tmp35_;
-#line 459 "/home/jens/Source/shotwell/src/util/image.vala"
- _tmp36_ = angle_deg;
-#line 459 "/home/jens/Source/shotwell/src/util/image.vala"
- _tmp37_ = degrees_to_radians (_tmp36_);
-#line 459 "/home/jens/Source/shotwell/src/util/image.vala"
- angle = _tmp37_;
-#line 460 "/home/jens/Source/shotwell/src/util/image.vala"
+#line 510 "/home/jens/Source/shotwell/src/util/image.vala"
+ derotate_point_arb (&_tmp22_, img_w, img_h, angle_deg, &_tmp23_);
+#line 510 "/home/jens/Source/shotwell/src/util/image.vala"
+ bottom_right = _tmp23_;
+#line 512 "/home/jens/Source/shotwell/src/util/image.vala"
+ angle = degrees_to_radians (angle_deg);
+#line 513 "/home/jens/Source/shotwell/src/util/image.vala"
top_offset = 0;
-#line 460 "/home/jens/Source/shotwell/src/util/image.vala"
+#line 513 "/home/jens/Source/shotwell/src/util/image.vala"
bottom_offset = 0;
-#line 460 "/home/jens/Source/shotwell/src/util/image.vala"
+#line 513 "/home/jens/Source/shotwell/src/util/image.vala"
left_offset = 0;
-#line 460 "/home/jens/Source/shotwell/src/util/image.vala"
+#line 513 "/home/jens/Source/shotwell/src/util/image.vala"
right_offset = 0;
-#line 462 "/home/jens/Source/shotwell/src/util/image.vala"
- _tmp38_ = top_left;
-#line 462 "/home/jens/Source/shotwell/src/util/image.vala"
- _tmp39_ = _tmp38_.y;
-#line 462 "/home/jens/Source/shotwell/src/util/image.vala"
- _tmp40_ = top_right;
-#line 462 "/home/jens/Source/shotwell/src/util/image.vala"
- _tmp41_ = _tmp40_.y;
-#line 462 "/home/jens/Source/shotwell/src/util/image.vala"
- _tmp42_ = MIN (_tmp39_, _tmp41_);
-#line 462 "/home/jens/Source/shotwell/src/util/image.vala"
- top = _tmp42_;
-#line 463 "/home/jens/Source/shotwell/src/util/image.vala"
- _tmp43_ = top;
-#line 463 "/home/jens/Source/shotwell/src/util/image.vala"
- if (_tmp43_ < 0) {
-#line 2413 "image.c"
- gint _tmp44_;
- gdouble _tmp45_;
- gdouble _tmp46_;
-#line 464 "/home/jens/Source/shotwell/src/util/image.vala"
- _tmp44_ = top;
-#line 464 "/home/jens/Source/shotwell/src/util/image.vala"
- _tmp45_ = angle;
-#line 464 "/home/jens/Source/shotwell/src/util/image.vala"
- _tmp46_ = cos (_tmp45_);
-#line 464 "/home/jens/Source/shotwell/src/util/image.vala"
- top_offset = (gint) ((0 - _tmp44_) * _tmp46_);
-#line 2425 "image.c"
+#line 515 "/home/jens/Source/shotwell/src/util/image.vala"
+ _tmp24_ = top_left;
+#line 515 "/home/jens/Source/shotwell/src/util/image.vala"
+ _tmp25_ = _tmp24_.y;
+#line 515 "/home/jens/Source/shotwell/src/util/image.vala"
+ _tmp26_ = top_right;
+#line 515 "/home/jens/Source/shotwell/src/util/image.vala"
+ _tmp27_ = _tmp26_.y;
+#line 515 "/home/jens/Source/shotwell/src/util/image.vala"
+ top = MIN (_tmp25_, _tmp27_);
+#line 516 "/home/jens/Source/shotwell/src/util/image.vala"
+ _tmp28_ = top;
+#line 516 "/home/jens/Source/shotwell/src/util/image.vala"
+ if (_tmp28_ < 0) {
+#line 2478 "image.c"
+ gint _tmp29_;
+ gdouble _tmp30_;
+#line 517 "/home/jens/Source/shotwell/src/util/image.vala"
+ _tmp29_ = top;
+#line 517 "/home/jens/Source/shotwell/src/util/image.vala"
+ _tmp30_ = angle;
+#line 517 "/home/jens/Source/shotwell/src/util/image.vala"
+ top_offset = (gint) ((0 - _tmp29_) * cos (_tmp30_));
+#line 2487 "image.c"
}
-#line 466 "/home/jens/Source/shotwell/src/util/image.vala"
- _tmp47_ = bottom_left;
-#line 466 "/home/jens/Source/shotwell/src/util/image.vala"
- _tmp48_ = _tmp47_.y;
-#line 466 "/home/jens/Source/shotwell/src/util/image.vala"
- _tmp49_ = bottom_right;
-#line 466 "/home/jens/Source/shotwell/src/util/image.vala"
- _tmp50_ = _tmp49_.y;
-#line 466 "/home/jens/Source/shotwell/src/util/image.vala"
- _tmp51_ = MAX (_tmp48_, _tmp50_);
-#line 466 "/home/jens/Source/shotwell/src/util/image.vala"
- bottom = _tmp51_;
-#line 467 "/home/jens/Source/shotwell/src/util/image.vala"
- _tmp52_ = bottom;
-#line 467 "/home/jens/Source/shotwell/src/util/image.vala"
- _tmp53_ = img_h;
-#line 467 "/home/jens/Source/shotwell/src/util/image.vala"
- if (_tmp52_ > _tmp53_) {
-#line 2445 "image.c"
- gint _tmp54_;
- gint _tmp55_;
- gdouble _tmp56_;
- gdouble _tmp57_;
-#line 468 "/home/jens/Source/shotwell/src/util/image.vala"
- _tmp54_ = img_h;
-#line 468 "/home/jens/Source/shotwell/src/util/image.vala"
- _tmp55_ = bottom;
-#line 468 "/home/jens/Source/shotwell/src/util/image.vala"
- _tmp56_ = angle;
-#line 468 "/home/jens/Source/shotwell/src/util/image.vala"
- _tmp57_ = cos (_tmp56_);
-#line 468 "/home/jens/Source/shotwell/src/util/image.vala"
- bottom_offset = (gint) ((_tmp54_ - _tmp55_) * _tmp57_);
-#line 2460 "image.c"
+#line 519 "/home/jens/Source/shotwell/src/util/image.vala"
+ _tmp31_ = bottom_left;
+#line 519 "/home/jens/Source/shotwell/src/util/image.vala"
+ _tmp32_ = _tmp31_.y;
+#line 519 "/home/jens/Source/shotwell/src/util/image.vala"
+ _tmp33_ = bottom_right;
+#line 519 "/home/jens/Source/shotwell/src/util/image.vala"
+ _tmp34_ = _tmp33_.y;
+#line 519 "/home/jens/Source/shotwell/src/util/image.vala"
+ bottom = MAX (_tmp32_, _tmp34_);
+#line 520 "/home/jens/Source/shotwell/src/util/image.vala"
+ _tmp35_ = bottom;
+#line 520 "/home/jens/Source/shotwell/src/util/image.vala"
+ if (_tmp35_ > img_h) {
+#line 2503 "image.c"
+ gint _tmp36_;
+ gdouble _tmp37_;
+#line 521 "/home/jens/Source/shotwell/src/util/image.vala"
+ _tmp36_ = bottom;
+#line 521 "/home/jens/Source/shotwell/src/util/image.vala"
+ _tmp37_ = angle;
+#line 521 "/home/jens/Source/shotwell/src/util/image.vala"
+ bottom_offset = (gint) ((img_h - _tmp36_) * cos (_tmp37_));
+#line 2512 "image.c"
}
-#line 470 "/home/jens/Source/shotwell/src/util/image.vala"
- _tmp58_ = top_left;
-#line 470 "/home/jens/Source/shotwell/src/util/image.vala"
- _tmp59_ = _tmp58_.x;
-#line 470 "/home/jens/Source/shotwell/src/util/image.vala"
- _tmp60_ = bottom_left;
-#line 470 "/home/jens/Source/shotwell/src/util/image.vala"
- _tmp61_ = _tmp60_.x;
-#line 470 "/home/jens/Source/shotwell/src/util/image.vala"
- _tmp62_ = MIN (_tmp59_, _tmp61_);
-#line 470 "/home/jens/Source/shotwell/src/util/image.vala"
- left = _tmp62_;
-#line 471 "/home/jens/Source/shotwell/src/util/image.vala"
- _tmp63_ = left;
-#line 471 "/home/jens/Source/shotwell/src/util/image.vala"
- if (_tmp63_ < 0) {
-#line 2478 "image.c"
- gint _tmp64_;
- gdouble _tmp65_;
- gdouble _tmp66_;
-#line 472 "/home/jens/Source/shotwell/src/util/image.vala"
- _tmp64_ = left;
-#line 472 "/home/jens/Source/shotwell/src/util/image.vala"
- _tmp65_ = angle;
-#line 472 "/home/jens/Source/shotwell/src/util/image.vala"
- _tmp66_ = cos (_tmp65_);
-#line 472 "/home/jens/Source/shotwell/src/util/image.vala"
- left_offset = (gint) ((0 - _tmp64_) * _tmp66_);
-#line 2490 "image.c"
+#line 523 "/home/jens/Source/shotwell/src/util/image.vala"
+ _tmp38_ = top_left;
+#line 523 "/home/jens/Source/shotwell/src/util/image.vala"
+ _tmp39_ = _tmp38_.x;
+#line 523 "/home/jens/Source/shotwell/src/util/image.vala"
+ _tmp40_ = bottom_left;
+#line 523 "/home/jens/Source/shotwell/src/util/image.vala"
+ _tmp41_ = _tmp40_.x;
+#line 523 "/home/jens/Source/shotwell/src/util/image.vala"
+ left = MIN (_tmp39_, _tmp41_);
+#line 524 "/home/jens/Source/shotwell/src/util/image.vala"
+ _tmp42_ = left;
+#line 524 "/home/jens/Source/shotwell/src/util/image.vala"
+ if (_tmp42_ < 0) {
+#line 2528 "image.c"
+ gint _tmp43_;
+ gdouble _tmp44_;
+#line 525 "/home/jens/Source/shotwell/src/util/image.vala"
+ _tmp43_ = left;
+#line 525 "/home/jens/Source/shotwell/src/util/image.vala"
+ _tmp44_ = angle;
+#line 525 "/home/jens/Source/shotwell/src/util/image.vala"
+ left_offset = (gint) ((0 - _tmp43_) * cos (_tmp44_));
+#line 2537 "image.c"
}
-#line 474 "/home/jens/Source/shotwell/src/util/image.vala"
- _tmp67_ = top_right;
-#line 474 "/home/jens/Source/shotwell/src/util/image.vala"
- _tmp68_ = _tmp67_.x;
-#line 474 "/home/jens/Source/shotwell/src/util/image.vala"
- _tmp69_ = bottom_right;
-#line 474 "/home/jens/Source/shotwell/src/util/image.vala"
- _tmp70_ = _tmp69_.x;
-#line 474 "/home/jens/Source/shotwell/src/util/image.vala"
- _tmp71_ = MAX (_tmp68_, _tmp70_);
-#line 474 "/home/jens/Source/shotwell/src/util/image.vala"
- right = _tmp71_;
-#line 475 "/home/jens/Source/shotwell/src/util/image.vala"
- _tmp72_ = right;
-#line 475 "/home/jens/Source/shotwell/src/util/image.vala"
- _tmp73_ = img_w;
-#line 475 "/home/jens/Source/shotwell/src/util/image.vala"
- if (_tmp72_ > _tmp73_) {
-#line 2510 "image.c"
- gint _tmp74_;
- gint _tmp75_;
- gdouble _tmp76_;
- gdouble _tmp77_;
-#line 476 "/home/jens/Source/shotwell/src/util/image.vala"
- _tmp74_ = img_w;
-#line 476 "/home/jens/Source/shotwell/src/util/image.vala"
- _tmp75_ = right;
-#line 476 "/home/jens/Source/shotwell/src/util/image.vala"
- _tmp76_ = angle;
-#line 476 "/home/jens/Source/shotwell/src/util/image.vala"
- _tmp77_ = cos (_tmp76_);
-#line 476 "/home/jens/Source/shotwell/src/util/image.vala"
- right_offset = (gint) ((_tmp74_ - _tmp75_) * _tmp77_);
-#line 2525 "image.c"
+#line 527 "/home/jens/Source/shotwell/src/util/image.vala"
+ _tmp45_ = top_right;
+#line 527 "/home/jens/Source/shotwell/src/util/image.vala"
+ _tmp46_ = _tmp45_.x;
+#line 527 "/home/jens/Source/shotwell/src/util/image.vala"
+ _tmp47_ = bottom_right;
+#line 527 "/home/jens/Source/shotwell/src/util/image.vala"
+ _tmp48_ = _tmp47_.x;
+#line 527 "/home/jens/Source/shotwell/src/util/image.vala"
+ right = MAX (_tmp46_, _tmp48_);
+#line 528 "/home/jens/Source/shotwell/src/util/image.vala"
+ _tmp49_ = right;
+#line 528 "/home/jens/Source/shotwell/src/util/image.vala"
+ if (_tmp49_ > img_w) {
+#line 2553 "image.c"
+ gint _tmp50_;
+ gdouble _tmp51_;
+#line 529 "/home/jens/Source/shotwell/src/util/image.vala"
+ _tmp50_ = right;
+#line 529 "/home/jens/Source/shotwell/src/util/image.vala"
+ _tmp51_ = angle;
+#line 529 "/home/jens/Source/shotwell/src/util/image.vala"
+ right_offset = (gint) ((img_w - _tmp50_) * cos (_tmp51_));
+#line 2562 "image.c"
}
-#line 478 "/home/jens/Source/shotwell/src/util/image.vala"
- _tmp79_ = preserve_geom;
-#line 478 "/home/jens/Source/shotwell/src/util/image.vala"
- if (_tmp79_) {
-#line 2531 "image.c"
- gint _tmp80_;
- gint _tmp81_;
- gint _tmp82_;
- gint _tmp83_;
- Box _tmp84_ = {0};
-#line 478 "/home/jens/Source/shotwell/src/util/image.vala"
- _tmp80_ = left_offset;
-#line 478 "/home/jens/Source/shotwell/src/util/image.vala"
- _tmp81_ = right_offset;
-#line 478 "/home/jens/Source/shotwell/src/util/image.vala"
- _tmp82_ = top_offset;
-#line 478 "/home/jens/Source/shotwell/src/util/image.vala"
- _tmp83_ = bottom_offset;
-#line 478 "/home/jens/Source/shotwell/src/util/image.vala"
- box_get_offset (src, _tmp80_ + _tmp81_, _tmp82_ + _tmp83_, &_tmp84_);
-#line 478 "/home/jens/Source/shotwell/src/util/image.vala"
- _tmp78_ = _tmp84_;
-#line 2549 "image.c"
+#line 531 "/home/jens/Source/shotwell/src/util/image.vala"
+ 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"
+ _tmp53_ = left_offset;
+#line 531 "/home/jens/Source/shotwell/src/util/image.vala"
+ _tmp54_ = right_offset;
+#line 531 "/home/jens/Source/shotwell/src/util/image.vala"
+ _tmp55_ = top_offset;
+#line 531 "/home/jens/Source/shotwell/src/util/image.vala"
+ _tmp56_ = bottom_offset;
+#line 531 "/home/jens/Source/shotwell/src/util/image.vala"
+ box_get_offset (src, _tmp53_ + _tmp54_, _tmp55_ + _tmp56_, &_tmp57_);
+#line 531 "/home/jens/Source/shotwell/src/util/image.vala"
+ _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_;
-#line 479 "/home/jens/Source/shotwell/src/util/image.vala"
- _tmp85_ = *src;
-#line 479 "/home/jens/Source/shotwell/src/util/image.vala"
- _tmp86_ = _tmp85_.left;
-#line 479 "/home/jens/Source/shotwell/src/util/image.vala"
- _tmp87_ = left_offset;
-#line 479 "/home/jens/Source/shotwell/src/util/image.vala"
- _tmp88_ = *src;
-#line 479 "/home/jens/Source/shotwell/src/util/image.vala"
- _tmp89_ = _tmp88_.top;
-#line 479 "/home/jens/Source/shotwell/src/util/image.vala"
- _tmp90_ = top_offset;
-#line 479 "/home/jens/Source/shotwell/src/util/image.vala"
- _tmp91_ = *src;
-#line 479 "/home/jens/Source/shotwell/src/util/image.vala"
- _tmp92_ = _tmp91_.right;
-#line 479 "/home/jens/Source/shotwell/src/util/image.vala"
- _tmp93_ = right_offset;
-#line 479 "/home/jens/Source/shotwell/src/util/image.vala"
- _tmp94_ = *src;
-#line 479 "/home/jens/Source/shotwell/src/util/image.vala"
- _tmp95_ = _tmp94_.bottom;
-#line 479 "/home/jens/Source/shotwell/src/util/image.vala"
- _tmp96_ = bottom_offset;
-#line 479 "/home/jens/Source/shotwell/src/util/image.vala"
- box_init (&_tmp78_, _tmp86_ + _tmp87_, _tmp89_ + _tmp90_, _tmp92_ + _tmp93_, _tmp95_ + _tmp96_);
-#line 2589 "image.c"
+ 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"
+ _tmp58_ = *src;
+#line 532 "/home/jens/Source/shotwell/src/util/image.vala"
+ _tmp59_ = _tmp58_.left;
+#line 532 "/home/jens/Source/shotwell/src/util/image.vala"
+ _tmp60_ = left_offset;
+#line 532 "/home/jens/Source/shotwell/src/util/image.vala"
+ _tmp61_ = *src;
+#line 532 "/home/jens/Source/shotwell/src/util/image.vala"
+ _tmp62_ = _tmp61_.top;
+#line 532 "/home/jens/Source/shotwell/src/util/image.vala"
+ _tmp63_ = top_offset;
+#line 532 "/home/jens/Source/shotwell/src/util/image.vala"
+ _tmp64_ = *src;
+#line 532 "/home/jens/Source/shotwell/src/util/image.vala"
+ _tmp65_ = _tmp64_.right;
+#line 532 "/home/jens/Source/shotwell/src/util/image.vala"
+ _tmp66_ = right_offset;
+#line 532 "/home/jens/Source/shotwell/src/util/image.vala"
+ _tmp67_ = *src;
+#line 532 "/home/jens/Source/shotwell/src/util/image.vala"
+ _tmp68_ = _tmp67_.bottom;
+#line 532 "/home/jens/Source/shotwell/src/util/image.vala"
+ _tmp69_ = bottom_offset;
+#line 532 "/home/jens/Source/shotwell/src/util/image.vala"
+ box_init (&_tmp52_, _tmp59_ + _tmp60_, _tmp62_ + _tmp63_, _tmp65_ + _tmp66_, _tmp68_ + _tmp69_);
+#line 2624 "image.c"
}
-#line 478 "/home/jens/Source/shotwell/src/util/image.vala"
- *result = _tmp78_;
-#line 478 "/home/jens/Source/shotwell/src/util/image.vala"
+#line 531 "/home/jens/Source/shotwell/src/util/image.vala"
+ *result = _tmp52_;
+#line 531 "/home/jens/Source/shotwell/src/util/image.vala"
return;
-#line 2595 "image.c"
+#line 2630 "image.c"
}
diff --git a/src/util/image.vala b/src/util/image.vala
index 4adafae..f8646e2 100644
--- a/src/util/image.vala
+++ b/src/util/image.vala
@@ -446,6 +446,59 @@ Gdk.Point derotate_point_arb(Gdk.Point source_point, int img_w, int img_h, doubl
return rotate_point_arb(source_point, img_w, img_h, angle, true);
}
+private static Cairo.Surface background_surface = null;
+
+private Cairo.Surface get_background_surface() {
+ if (background_surface == null) {
+ string color_a;
+ string color_b;
+ var config = Config.Facade.get_instance();
+
+ var type = config.get_transparent_background_type();
+ switch (type) {
+ case "checkered":
+ color_a = "#808080";
+ color_b = "#ccc";
+ break;
+ case "solid":
+ color_a = color_b = config.get_transparent_background_color();
+ break;
+ default:
+ color_a = color_b = "#000";
+ break;
+ }
+
+ background_surface = new Cairo.ImageSurface(Cairo.Format.RGB24, 16, 16);
+ var ctx = new Cairo.Context(background_surface);
+ ctx.set_operator(Cairo.Operator.SOURCE);
+ set_source_color_from_string(ctx, color_a);
+ ctx.rectangle(0,0,8,8);
+ ctx.rectangle(8,8,8,8);
+ ctx.fill();
+ set_source_color_from_string(ctx, color_b);
+ ctx.rectangle(0,8,8,8);
+ ctx.rectangle(8,0,8,8);
+ ctx.fill();
+ }
+
+ return background_surface;
+}
+
+public void invalidate_transparent_background() {
+ background_surface = null;
+}
+
+public void paint_pixmap_with_background (Cairo.Context ctx, Gdk.Pixbuf pixbuf, int x, int y) {
+ if (pixbuf.get_has_alpha()) {
+ ctx.set_source_surface(get_background_surface(), 0, 0);
+ ctx.get_source().set_extend(Cairo.Extend.REPEAT);
+ ctx.rectangle(x, y, pixbuf.width, pixbuf.height);
+ ctx.fill();
+ }
+
+ Gdk.cairo_set_source_pixbuf(ctx, pixbuf, x, y);
+ ctx.paint();
+}
// Force an axially-aligned box to be inside a rotated rectangle.
Box clamp_inside_rotated_image(Box src, int img_w, int img_h, double angle_deg,
diff --git a/src/util/misc.c b/src/util/misc.c
index 98b6719..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,12 +7,13 @@
* See the COPYING file in this distribution.
*/
+
#include <glib.h>
#include <glib-object.h>
#include <time.h>
+#include <gio/gio.h>
#include <stdlib.h>
#include <string.h>
-#include <gio/gio.h>
#include <gee.h>
#include <gdk/gdk.h>
#include <float.h>
@@ -184,45 +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_binary (guint8* buffer, gsize length);
-gchar* md5_file (GFile* file, GError** error);
-gboolean equal_sets (GeeSet* a, GeeSet* b);
-GeeSet* intersection_of_sets (GeeSet* a, GeeSet* b, GeeSet* excluded);
+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);
@@ -232,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 286 "misc.c"
+#line 326 "misc.c"
{
gint ctr = 0;
#line 11 "/home/jens/Source/shotwell/src/util/misc.vala"
ctr = 0;
-#line 291 "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 298 "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 305 "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 311 "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 321 "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 333 "misc.c"
+ hash = ((_tmp3_ << 4) ^ (_tmp4_ >> 28)) ^ (*_tmp5_);
+#line 373 "misc.c"
}
}
}
@@ -337,128 +377,122 @@ guint int64_hash (gint64* n) {
result = hash;
#line 15 "/home/jens/Source/shotwell/src/util/misc.vala"
return result;
-#line 341 "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 363 "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 387 "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 398 "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 404 "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_);
-#line 37 "/home/jens/Source/shotwell/src/util/misc.vala"
- _tmp1_ = b;
+ a64 = *((guint64*) a);
#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 436 "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 450 "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 456 "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_;
@@ -474,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 478 "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_;
@@ -494,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 498 "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_;
@@ -518,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 522 "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 538 "misc.c"
+#line 576 "misc.c"
}
-gulong now_sec (void) {
+gulong
+now_sec (void)
+{
gulong result = 0UL;
GTimeVal time_val = {0};
GTimeVal _tmp0_;
@@ -553,61 +593,26 @@ gulong now_sec (void) {
result = (gulong) _tmp1_;
#line 68 "/home/jens/Source/shotwell/src/util/misc.vala"
return result;
-#line 557 "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 570 "misc.c"
-}
-
-
-gchar* md5_binary (guint8* buffer, gsize length) {
- gchar* result = NULL;
- gsize _tmp0_;
- GChecksum* md5 = NULL;
- GChecksum* _tmp1_;
- guint8* _tmp2_;
- gsize _tmp3_;
- const gchar* _tmp4_;
- gchar* _tmp5_;
-#line 76 "/home/jens/Source/shotwell/src/util/misc.vala"
- _tmp0_ = length;
-#line 76 "/home/jens/Source/shotwell/src/util/misc.vala"
- _vala_assert (_tmp0_ != ((gsize) 0), "length != 0");
-#line 78 "/home/jens/Source/shotwell/src/util/misc.vala"
- _tmp1_ = g_checksum_new (G_CHECKSUM_MD5);
-#line 78 "/home/jens/Source/shotwell/src/util/misc.vala"
- md5 = _tmp1_;
-#line 79 "/home/jens/Source/shotwell/src/util/misc.vala"
- _tmp2_ = buffer;
-#line 79 "/home/jens/Source/shotwell/src/util/misc.vala"
- _tmp3_ = length;
-#line 79 "/home/jens/Source/shotwell/src/util/misc.vala"
- g_checksum_update (md5, (guchar*) _tmp2_, _tmp3_);
-#line 81 "/home/jens/Source/shotwell/src/util/misc.vala"
- _tmp4_ = g_checksum_get_string (md5);
-#line 81 "/home/jens/Source/shotwell/src/util/misc.vala"
- _tmp5_ = g_strdup (_tmp4_);
-#line 81 "/home/jens/Source/shotwell/src/util/misc.vala"
- result = _tmp5_;
-#line 81 "/home/jens/Source/shotwell/src/util/misc.vala"
- _g_checksum_free0 (md5);
-#line 81 "/home/jens/Source/shotwell/src/util/misc.vala"
- return result;
-#line 607 "misc.c"
+#line 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_;
@@ -616,121 +621,115 @@ 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 84 "/home/jens/Source/shotwell/src/util/misc.vala"
+#line 75 "/home/jens/Source/shotwell/src/util/misc.vala"
g_return_val_if_fail (G_IS_FILE (file), NULL);
-#line 85 "/home/jens/Source/shotwell/src/util/misc.vala"
+#line 76 "/home/jens/Source/shotwell/src/util/misc.vala"
_tmp0_ = g_checksum_new (G_CHECKSUM_MD5);
-#line 85 "/home/jens/Source/shotwell/src/util/misc.vala"
+#line 76 "/home/jens/Source/shotwell/src/util/misc.vala"
md5 = _tmp0_;
-#line 86 "/home/jens/Source/shotwell/src/util/misc.vala"
+#line 77 "/home/jens/Source/shotwell/src/util/misc.vala"
_tmp1_ = g_new0 (guint8, 64 * 1024);
-#line 86 "/home/jens/Source/shotwell/src/util/misc.vala"
+#line 77 "/home/jens/Source/shotwell/src/util/misc.vala"
buffer = _tmp1_;
-#line 86 "/home/jens/Source/shotwell/src/util/misc.vala"
+#line 77 "/home/jens/Source/shotwell/src/util/misc.vala"
buffer_length1 = 64 * 1024;
-#line 86 "/home/jens/Source/shotwell/src/util/misc.vala"
+#line 77 "/home/jens/Source/shotwell/src/util/misc.vala"
_buffer_size_ = buffer_length1;
-#line 88 "/home/jens/Source/shotwell/src/util/misc.vala"
- _tmp2_ = file;
-#line 88 "/home/jens/Source/shotwell/src/util/misc.vala"
- _tmp3_ = g_file_read (_tmp2_, NULL, &_inner_error_);
-#line 88 "/home/jens/Source/shotwell/src/util/misc.vala"
- fins = _tmp3_;
-#line 88 "/home/jens/Source/shotwell/src/util/misc.vala"
+#line 79 "/home/jens/Source/shotwell/src/util/misc.vala"
+ _tmp2_ = g_file_read (file, NULL, &_inner_error_);
+#line 79 "/home/jens/Source/shotwell/src/util/misc.vala"
+ fins = _tmp2_;
+#line 79 "/home/jens/Source/shotwell/src/util/misc.vala"
if (G_UNLIKELY (_inner_error_ != NULL)) {
-#line 88 "/home/jens/Source/shotwell/src/util/misc.vala"
+#line 79 "/home/jens/Source/shotwell/src/util/misc.vala"
g_propagate_error (error, _inner_error_);
-#line 88 "/home/jens/Source/shotwell/src/util/misc.vala"
+#line 79 "/home/jens/Source/shotwell/src/util/misc.vala"
buffer = (g_free (buffer), NULL);
-#line 88 "/home/jens/Source/shotwell/src/util/misc.vala"
+#line 79 "/home/jens/Source/shotwell/src/util/misc.vala"
_g_checksum_free0 (md5);
-#line 88 "/home/jens/Source/shotwell/src/util/misc.vala"
+#line 79 "/home/jens/Source/shotwell/src/util/misc.vala"
return NULL;
-#line 656 "misc.c"
+#line 658 "misc.c"
}
{
- gboolean _tmp4_ = FALSE;
-#line 89 "/home/jens/Source/shotwell/src/util/misc.vala"
- _tmp4_ = TRUE;
-#line 89 "/home/jens/Source/shotwell/src/util/misc.vala"
+ gboolean _tmp3_ = FALSE;
+#line 80 "/home/jens/Source/shotwell/src/util/misc.vala"
+ _tmp3_ = TRUE;
+#line 80 "/home/jens/Source/shotwell/src/util/misc.vala"
while (TRUE) {
-#line 664 "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_;
-#line 89 "/home/jens/Source/shotwell/src/util/misc.vala"
- if (!_tmp4_) {
-#line 677 "misc.c"
+ 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 (!_tmp3_) {
+#line 678 "misc.c"
}
-#line 89 "/home/jens/Source/shotwell/src/util/misc.vala"
- _tmp4_ = FALSE;
-#line 90 "/home/jens/Source/shotwell/src/util/misc.vala"
- _tmp5_ = fins;
-#line 90 "/home/jens/Source/shotwell/src/util/misc.vala"
- _tmp6_ = buffer;
-#line 90 "/home/jens/Source/shotwell/src/util/misc.vala"
- _tmp6__length1 = buffer_length1;
-#line 90 "/home/jens/Source/shotwell/src/util/misc.vala"
- _tmp7_ = g_input_stream_read (G_TYPE_CHECK_INSTANCE_CAST (_tmp5_, g_input_stream_get_type (), GInputStream), _tmp6_, (gsize) _tmp6__length1, NULL, &_inner_error_);
-#line 90 "/home/jens/Source/shotwell/src/util/misc.vala"
- bytes_read = (gsize) _tmp7_;
-#line 90 "/home/jens/Source/shotwell/src/util/misc.vala"
+#line 80 "/home/jens/Source/shotwell/src/util/misc.vala"
+ _tmp3_ = FALSE;
+#line 81 "/home/jens/Source/shotwell/src/util/misc.vala"
+ _tmp4_ = fins;
+#line 81 "/home/jens/Source/shotwell/src/util/misc.vala"
+ _tmp5_ = buffer;
+#line 81 "/home/jens/Source/shotwell/src/util/misc.vala"
+ _tmp5__length1 = buffer_length1;
+#line 81 "/home/jens/Source/shotwell/src/util/misc.vala"
+ 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 90 "/home/jens/Source/shotwell/src/util/misc.vala"
+#line 81 "/home/jens/Source/shotwell/src/util/misc.vala"
g_propagate_error (error, _inner_error_);
-#line 90 "/home/jens/Source/shotwell/src/util/misc.vala"
+#line 81 "/home/jens/Source/shotwell/src/util/misc.vala"
_g_object_unref0 (fins);
-#line 90 "/home/jens/Source/shotwell/src/util/misc.vala"
+#line 81 "/home/jens/Source/shotwell/src/util/misc.vala"
buffer = (g_free (buffer), NULL);
-#line 90 "/home/jens/Source/shotwell/src/util/misc.vala"
+#line 81 "/home/jens/Source/shotwell/src/util/misc.vala"
_g_checksum_free0 (md5);
-#line 90 "/home/jens/Source/shotwell/src/util/misc.vala"
+#line 81 "/home/jens/Source/shotwell/src/util/misc.vala"
return NULL;
-#line 703 "misc.c"
+#line 702 "misc.c"
}
-#line 91 "/home/jens/Source/shotwell/src/util/misc.vala"
- _tmp8_ = bytes_read;
-#line 91 "/home/jens/Source/shotwell/src/util/misc.vala"
- if (_tmp8_ <= ((gsize) 0)) {
-#line 92 "/home/jens/Source/shotwell/src/util/misc.vala"
+#line 82 "/home/jens/Source/shotwell/src/util/misc.vala"
+ _tmp6_ = bytes_read;
+#line 82 "/home/jens/Source/shotwell/src/util/misc.vala"
+ if (_tmp6_ <= ((gsize) 0)) {
+#line 83 "/home/jens/Source/shotwell/src/util/misc.vala"
break;
-#line 711 "misc.c"
+#line 710 "misc.c"
}
-#line 94 "/home/jens/Source/shotwell/src/util/misc.vala"
- _tmp9_ = md5;
-#line 94 "/home/jens/Source/shotwell/src/util/misc.vala"
- _tmp10_ = buffer;
-#line 94 "/home/jens/Source/shotwell/src/util/misc.vala"
- _tmp10__length1 = buffer_length1;
-#line 94 "/home/jens/Source/shotwell/src/util/misc.vala"
- _tmp11_ = bytes_read;
-#line 94 "/home/jens/Source/shotwell/src/util/misc.vala"
- g_checksum_update (_tmp9_, (guchar*) _tmp10_, _tmp11_);
-#line 723 "misc.c"
+#line 85 "/home/jens/Source/shotwell/src/util/misc.vala"
+ _tmp7_ = md5;
+#line 85 "/home/jens/Source/shotwell/src/util/misc.vala"
+ _tmp8_ = buffer;
+#line 85 "/home/jens/Source/shotwell/src/util/misc.vala"
+ _tmp8__length1 = buffer_length1;
+#line 85 "/home/jens/Source/shotwell/src/util/misc.vala"
+ _tmp9_ = bytes_read;
+#line 85 "/home/jens/Source/shotwell/src/util/misc.vala"
+ g_checksum_update (_tmp7_, (guchar*) _tmp8_, _tmp9_);
+#line 722 "misc.c"
}
}
{
- GFileInputStream* _tmp12_;
-#line 98 "/home/jens/Source/shotwell/src/util/misc.vala"
- _tmp12_ = fins;
-#line 98 "/home/jens/Source/shotwell/src/util/misc.vala"
- g_input_stream_close (G_TYPE_CHECK_INSTANCE_CAST (_tmp12_, g_input_stream_get_type (), GInputStream), NULL, &_inner_error_);
-#line 98 "/home/jens/Source/shotwell/src/util/misc.vala"
+ GFileInputStream* _tmp10_;
+#line 89 "/home/jens/Source/shotwell/src/util/misc.vala"
+ _tmp10_ = fins;
+#line 89 "/home/jens/Source/shotwell/src/util/misc.vala"
+ 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 734 "misc.c"
+#line 733 "misc.c"
goto __catch5_g_error;
}
}
@@ -738,1225 +737,1065 @@ gchar* md5_file (GFile* file, GError** error) {
__catch5_g_error:
{
GError* err = NULL;
- GFile* _tmp13_;
- gchar* _tmp14_;
- gchar* _tmp15_;
- GError* _tmp16_;
- const gchar* _tmp17_;
-#line 97 "/home/jens/Source/shotwell/src/util/misc.vala"
+ gchar* _tmp11_;
+ gchar* _tmp12_;
+ GError* _tmp13_;
+ const gchar* _tmp14_;
+#line 88 "/home/jens/Source/shotwell/src/util/misc.vala"
err = _inner_error_;
-#line 97 "/home/jens/Source/shotwell/src/util/misc.vala"
+#line 88 "/home/jens/Source/shotwell/src/util/misc.vala"
_inner_error_ = NULL;
-#line 100 "/home/jens/Source/shotwell/src/util/misc.vala"
- _tmp13_ = file;
-#line 100 "/home/jens/Source/shotwell/src/util/misc.vala"
- _tmp14_ = g_file_get_path (_tmp13_);
-#line 100 "/home/jens/Source/shotwell/src/util/misc.vala"
- _tmp15_ = _tmp14_;
-#line 100 "/home/jens/Source/shotwell/src/util/misc.vala"
- _tmp16_ = err;
-#line 100 "/home/jens/Source/shotwell/src/util/misc.vala"
- _tmp17_ = _tmp16_->message;
-#line 100 "/home/jens/Source/shotwell/src/util/misc.vala"
- g_warning ("misc.vala:100: Unable to close MD5 input stream for %s: %s", _tmp15_, _tmp17_);
-#line 100 "/home/jens/Source/shotwell/src/util/misc.vala"
- _g_free0 (_tmp15_);
-#line 97 "/home/jens/Source/shotwell/src/util/misc.vala"
+#line 91 "/home/jens/Source/shotwell/src/util/misc.vala"
+ _tmp11_ = g_file_get_path (file);
+#line 91 "/home/jens/Source/shotwell/src/util/misc.vala"
+ _tmp12_ = _tmp11_;
+#line 91 "/home/jens/Source/shotwell/src/util/misc.vala"
+ _tmp13_ = err;
+#line 91 "/home/jens/Source/shotwell/src/util/misc.vala"
+ _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", _tmp12_, _tmp14_);
+#line 91 "/home/jens/Source/shotwell/src/util/misc.vala"
+ _g_free0 (_tmp12_);
+#line 88 "/home/jens/Source/shotwell/src/util/misc.vala"
_g_error_free0 (err);
-#line 767 "misc.c"
+#line 763 "misc.c"
}
__finally5:
-#line 97 "/home/jens/Source/shotwell/src/util/misc.vala"
+#line 88 "/home/jens/Source/shotwell/src/util/misc.vala"
if (G_UNLIKELY (_inner_error_ != NULL)) {
-#line 97 "/home/jens/Source/shotwell/src/util/misc.vala"
+#line 88 "/home/jens/Source/shotwell/src/util/misc.vala"
g_propagate_error (error, _inner_error_);
-#line 97 "/home/jens/Source/shotwell/src/util/misc.vala"
+#line 88 "/home/jens/Source/shotwell/src/util/misc.vala"
_g_object_unref0 (fins);
-#line 97 "/home/jens/Source/shotwell/src/util/misc.vala"
+#line 88 "/home/jens/Source/shotwell/src/util/misc.vala"
buffer = (g_free (buffer), NULL);
-#line 97 "/home/jens/Source/shotwell/src/util/misc.vala"
+#line 88 "/home/jens/Source/shotwell/src/util/misc.vala"
_g_checksum_free0 (md5);
-#line 97 "/home/jens/Source/shotwell/src/util/misc.vala"
+#line 88 "/home/jens/Source/shotwell/src/util/misc.vala"
return NULL;
-#line 782 "misc.c"
+#line 778 "misc.c"
}
-#line 103 "/home/jens/Source/shotwell/src/util/misc.vala"
- _tmp18_ = md5;
-#line 103 "/home/jens/Source/shotwell/src/util/misc.vala"
- _tmp19_ = g_checksum_get_string (_tmp18_);
-#line 103 "/home/jens/Source/shotwell/src/util/misc.vala"
- _tmp20_ = g_strdup (_tmp19_);
-#line 103 "/home/jens/Source/shotwell/src/util/misc.vala"
- result = _tmp20_;
-#line 103 "/home/jens/Source/shotwell/src/util/misc.vala"
+#line 94 "/home/jens/Source/shotwell/src/util/misc.vala"
+ _tmp15_ = md5;
+#line 94 "/home/jens/Source/shotwell/src/util/misc.vala"
+ _tmp16_ = g_checksum_get_string (_tmp15_);
+#line 94 "/home/jens/Source/shotwell/src/util/misc.vala"
+ _tmp17_ = g_strdup (_tmp16_);
+#line 94 "/home/jens/Source/shotwell/src/util/misc.vala"
+ result = _tmp17_;
+#line 94 "/home/jens/Source/shotwell/src/util/misc.vala"
_g_object_unref0 (fins);
-#line 103 "/home/jens/Source/shotwell/src/util/misc.vala"
+#line 94 "/home/jens/Source/shotwell/src/util/misc.vala"
buffer = (g_free (buffer), NULL);
-#line 103 "/home/jens/Source/shotwell/src/util/misc.vala"
+#line 94 "/home/jens/Source/shotwell/src/util/misc.vala"
_g_checksum_free0 (md5);
-#line 103 "/home/jens/Source/shotwell/src/util/misc.vala"
+#line 94 "/home/jens/Source/shotwell/src/util/misc.vala"
return result;
-#line 800 "misc.c"
+#line 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_;
-#line 107 "/home/jens/Source/shotwell/src/util/misc.vala"
+ 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 107 "/home/jens/Source/shotwell/src/util/misc.vala"
+#line 98 "/home/jens/Source/shotwell/src/util/misc.vala"
g_return_val_if_fail ((b == NULL) || GEE_IS_SET (b), FALSE);
-#line 108 "/home/jens/Source/shotwell/src/util/misc.vala"
- _tmp2_ = a;
-#line 108 "/home/jens/Source/shotwell/src/util/misc.vala"
- if (_tmp2_ != NULL) {
+#line 99 "/home/jens/Source/shotwell/src/util/misc.vala"
+ if (a != NULL) {
+#line 821 "misc.c"
+ gint _tmp2_;
+ gint _tmp3_;
+#line 99 "/home/jens/Source/shotwell/src/util/misc.vala"
+ _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"
+ _tmp3_ = _tmp2_;
+#line 99 "/home/jens/Source/shotwell/src/util/misc.vala"
+ _tmp1_ = _tmp3_ == 0;
#line 830 "misc.c"
- GeeSet* _tmp3_;
- gint _tmp4_;
- gint _tmp5_;
-#line 108 "/home/jens/Source/shotwell/src/util/misc.vala"
- _tmp3_ = a;
-#line 108 "/home/jens/Source/shotwell/src/util/misc.vala"
- _tmp4_ = gee_collection_get_size (G_TYPE_CHECK_INSTANCE_CAST (_tmp3_, GEE_TYPE_COLLECTION, GeeCollection));
-#line 108 "/home/jens/Source/shotwell/src/util/misc.vala"
- _tmp5_ = _tmp4_;
-#line 108 "/home/jens/Source/shotwell/src/util/misc.vala"
- _tmp1_ = _tmp5_ == 0;
-#line 842 "misc.c"
} else {
-#line 108 "/home/jens/Source/shotwell/src/util/misc.vala"
+#line 99 "/home/jens/Source/shotwell/src/util/misc.vala"
_tmp1_ = FALSE;
-#line 846 "misc.c"
+#line 834 "misc.c"
}
-#line 108 "/home/jens/Source/shotwell/src/util/misc.vala"
+#line 99 "/home/jens/Source/shotwell/src/util/misc.vala"
if (_tmp1_) {
-#line 850 "misc.c"
- GeeSet* _tmp6_;
-#line 108 "/home/jens/Source/shotwell/src/util/misc.vala"
- _tmp6_ = b;
-#line 108 "/home/jens/Source/shotwell/src/util/misc.vala"
- _tmp0_ = _tmp6_ == NULL;
-#line 856 "misc.c"
+#line 99 "/home/jens/Source/shotwell/src/util/misc.vala"
+ _tmp0_ = b == NULL;
+#line 840 "misc.c"
} else {
-#line 108 "/home/jens/Source/shotwell/src/util/misc.vala"
+#line 99 "/home/jens/Source/shotwell/src/util/misc.vala"
_tmp0_ = FALSE;
-#line 860 "misc.c"
+#line 844 "misc.c"
}
-#line 108 "/home/jens/Source/shotwell/src/util/misc.vala"
+#line 99 "/home/jens/Source/shotwell/src/util/misc.vala"
if (_tmp0_) {
-#line 109 "/home/jens/Source/shotwell/src/util/misc.vala"
+#line 100 "/home/jens/Source/shotwell/src/util/misc.vala"
result = TRUE;
-#line 109 "/home/jens/Source/shotwell/src/util/misc.vala"
+#line 100 "/home/jens/Source/shotwell/src/util/misc.vala"
return result;
-#line 868 "misc.c"
+#line 852 "misc.c"
}
-#line 111 "/home/jens/Source/shotwell/src/util/misc.vala"
- _tmp8_ = a;
-#line 111 "/home/jens/Source/shotwell/src/util/misc.vala"
- if (_tmp8_ == NULL) {
-#line 874 "misc.c"
- gboolean _tmp9_ = FALSE;
- GeeSet* _tmp10_;
-#line 111 "/home/jens/Source/shotwell/src/util/misc.vala"
- _tmp10_ = b;
-#line 111 "/home/jens/Source/shotwell/src/util/misc.vala"
- if (_tmp10_ != NULL) {
-#line 881 "misc.c"
- GeeSet* _tmp11_;
- gint _tmp12_;
- gint _tmp13_;
-#line 111 "/home/jens/Source/shotwell/src/util/misc.vala"
- _tmp11_ = b;
-#line 111 "/home/jens/Source/shotwell/src/util/misc.vala"
- _tmp12_ = gee_collection_get_size (G_TYPE_CHECK_INSTANCE_CAST (_tmp11_, GEE_TYPE_COLLECTION, GeeCollection));
-#line 111 "/home/jens/Source/shotwell/src/util/misc.vala"
- _tmp13_ = _tmp12_;
-#line 111 "/home/jens/Source/shotwell/src/util/misc.vala"
- _tmp9_ = _tmp13_ == 0;
-#line 893 "misc.c"
+#line 102 "/home/jens/Source/shotwell/src/util/misc.vala"
+ if (a == NULL) {
+#line 856 "misc.c"
+ gboolean _tmp5_ = FALSE;
+#line 102 "/home/jens/Source/shotwell/src/util/misc.vala"
+ if (b != NULL) {
+#line 860 "misc.c"
+ gint _tmp6_;
+ gint _tmp7_;
+#line 102 "/home/jens/Source/shotwell/src/util/misc.vala"
+ _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"
+ _tmp7_ = _tmp6_;
+#line 102 "/home/jens/Source/shotwell/src/util/misc.vala"
+ _tmp5_ = _tmp7_ == 0;
+#line 869 "misc.c"
} else {
-#line 111 "/home/jens/Source/shotwell/src/util/misc.vala"
- _tmp9_ = FALSE;
-#line 897 "misc.c"
+#line 102 "/home/jens/Source/shotwell/src/util/misc.vala"
+ _tmp5_ = FALSE;
+#line 873 "misc.c"
}
-#line 111 "/home/jens/Source/shotwell/src/util/misc.vala"
- _tmp7_ = _tmp9_;
-#line 901 "misc.c"
+#line 102 "/home/jens/Source/shotwell/src/util/misc.vala"
+ _tmp4_ = _tmp5_;
+#line 877 "misc.c"
} else {
-#line 111 "/home/jens/Source/shotwell/src/util/misc.vala"
- _tmp7_ = FALSE;
-#line 905 "misc.c"
+#line 102 "/home/jens/Source/shotwell/src/util/misc.vala"
+ _tmp4_ = FALSE;
+#line 881 "misc.c"
}
-#line 111 "/home/jens/Source/shotwell/src/util/misc.vala"
- if (_tmp7_) {
-#line 112 "/home/jens/Source/shotwell/src/util/misc.vala"
+#line 102 "/home/jens/Source/shotwell/src/util/misc.vala"
+ if (_tmp4_) {
+#line 103 "/home/jens/Source/shotwell/src/util/misc.vala"
result = TRUE;
-#line 112 "/home/jens/Source/shotwell/src/util/misc.vala"
+#line 103 "/home/jens/Source/shotwell/src/util/misc.vala"
return result;
-#line 913 "misc.c"
- }
-#line 114 "/home/jens/Source/shotwell/src/util/misc.vala"
- _tmp16_ = a;
-#line 114 "/home/jens/Source/shotwell/src/util/misc.vala"
- if (_tmp16_ == NULL) {
-#line 919 "misc.c"
- GeeSet* _tmp17_;
-#line 114 "/home/jens/Source/shotwell/src/util/misc.vala"
- _tmp17_ = b;
-#line 114 "/home/jens/Source/shotwell/src/util/misc.vala"
- _tmp15_ = _tmp17_ != NULL;
-#line 925 "misc.c"
+#line 889 "misc.c"
+ }
+#line 105 "/home/jens/Source/shotwell/src/util/misc.vala"
+ if (a == NULL) {
+#line 105 "/home/jens/Source/shotwell/src/util/misc.vala"
+ _tmp9_ = b != NULL;
+#line 895 "misc.c"
} else {
-#line 114 "/home/jens/Source/shotwell/src/util/misc.vala"
- _tmp15_ = FALSE;
-#line 929 "misc.c"
- }
-#line 114 "/home/jens/Source/shotwell/src/util/misc.vala"
- if (_tmp15_) {
-#line 114 "/home/jens/Source/shotwell/src/util/misc.vala"
- _tmp14_ = TRUE;
-#line 935 "misc.c"
+#line 105 "/home/jens/Source/shotwell/src/util/misc.vala"
+ _tmp9_ = FALSE;
+#line 899 "misc.c"
+ }
+#line 105 "/home/jens/Source/shotwell/src/util/misc.vala"
+ if (_tmp9_) {
+#line 105 "/home/jens/Source/shotwell/src/util/misc.vala"
+ _tmp8_ = TRUE;
+#line 905 "misc.c"
} else {
- gboolean _tmp18_ = FALSE;
- GeeSet* _tmp19_;
-#line 114 "/home/jens/Source/shotwell/src/util/misc.vala"
- _tmp19_ = a;
-#line 114 "/home/jens/Source/shotwell/src/util/misc.vala"
- if (_tmp19_ != NULL) {
-#line 943 "misc.c"
- GeeSet* _tmp20_;
-#line 114 "/home/jens/Source/shotwell/src/util/misc.vala"
- _tmp20_ = b;
-#line 114 "/home/jens/Source/shotwell/src/util/misc.vala"
- _tmp18_ = _tmp20_ == NULL;
-#line 949 "misc.c"
+ gboolean _tmp10_ = FALSE;
+#line 105 "/home/jens/Source/shotwell/src/util/misc.vala"
+ if (a != NULL) {
+#line 105 "/home/jens/Source/shotwell/src/util/misc.vala"
+ _tmp10_ = b == NULL;
+#line 912 "misc.c"
} else {
-#line 114 "/home/jens/Source/shotwell/src/util/misc.vala"
- _tmp18_ = FALSE;
-#line 953 "misc.c"
+#line 105 "/home/jens/Source/shotwell/src/util/misc.vala"
+ _tmp10_ = FALSE;
+#line 916 "misc.c"
}
-#line 114 "/home/jens/Source/shotwell/src/util/misc.vala"
- _tmp14_ = _tmp18_;
-#line 957 "misc.c"
+#line 105 "/home/jens/Source/shotwell/src/util/misc.vala"
+ _tmp8_ = _tmp10_;
+#line 920 "misc.c"
}
-#line 114 "/home/jens/Source/shotwell/src/util/misc.vala"
- if (_tmp14_) {
-#line 115 "/home/jens/Source/shotwell/src/util/misc.vala"
+#line 105 "/home/jens/Source/shotwell/src/util/misc.vala"
+ if (_tmp8_) {
+#line 106 "/home/jens/Source/shotwell/src/util/misc.vala"
result = FALSE;
-#line 115 "/home/jens/Source/shotwell/src/util/misc.vala"
+#line 106 "/home/jens/Source/shotwell/src/util/misc.vala"
return result;
-#line 965 "misc.c"
+#line 928 "misc.c"
}
-#line 117 "/home/jens/Source/shotwell/src/util/misc.vala"
- _tmp22_ = a;
-#line 117 "/home/jens/Source/shotwell/src/util/misc.vala"
- if (_tmp22_ == NULL) {
-#line 971 "misc.c"
- GeeSet* _tmp23_;
-#line 117 "/home/jens/Source/shotwell/src/util/misc.vala"
- _tmp23_ = b;
-#line 117 "/home/jens/Source/shotwell/src/util/misc.vala"
- _tmp21_ = _tmp23_ == NULL;
-#line 977 "misc.c"
+#line 108 "/home/jens/Source/shotwell/src/util/misc.vala"
+ if (a == NULL) {
+#line 108 "/home/jens/Source/shotwell/src/util/misc.vala"
+ _tmp11_ = b == NULL;
+#line 934 "misc.c"
} else {
-#line 117 "/home/jens/Source/shotwell/src/util/misc.vala"
- _tmp21_ = FALSE;
-#line 981 "misc.c"
+#line 108 "/home/jens/Source/shotwell/src/util/misc.vala"
+ _tmp11_ = FALSE;
+#line 938 "misc.c"
}
-#line 117 "/home/jens/Source/shotwell/src/util/misc.vala"
- if (_tmp21_) {
-#line 118 "/home/jens/Source/shotwell/src/util/misc.vala"
+#line 108 "/home/jens/Source/shotwell/src/util/misc.vala"
+ if (_tmp11_) {
+#line 109 "/home/jens/Source/shotwell/src/util/misc.vala"
result = TRUE;
-#line 118 "/home/jens/Source/shotwell/src/util/misc.vala"
+#line 109 "/home/jens/Source/shotwell/src/util/misc.vala"
return result;
-#line 989 "misc.c"
+#line 946 "misc.c"
}
-#line 120 "/home/jens/Source/shotwell/src/util/misc.vala"
- _tmp24_ = a;
-#line 120 "/home/jens/Source/shotwell/src/util/misc.vala"
- _tmp25_ = gee_collection_get_size (G_TYPE_CHECK_INSTANCE_CAST (_tmp24_, GEE_TYPE_COLLECTION, GeeCollection));
-#line 120 "/home/jens/Source/shotwell/src/util/misc.vala"
- _tmp26_ = _tmp25_;
-#line 120 "/home/jens/Source/shotwell/src/util/misc.vala"
- _tmp27_ = b;
-#line 120 "/home/jens/Source/shotwell/src/util/misc.vala"
- _tmp28_ = gee_collection_get_size (G_TYPE_CHECK_INSTANCE_CAST (_tmp27_, GEE_TYPE_COLLECTION, GeeCollection));
-#line 120 "/home/jens/Source/shotwell/src/util/misc.vala"
- _tmp29_ = _tmp28_;
-#line 120 "/home/jens/Source/shotwell/src/util/misc.vala"
- if (_tmp26_ != _tmp29_) {
-#line 121 "/home/jens/Source/shotwell/src/util/misc.vala"
+#line 111 "/home/jens/Source/shotwell/src/util/misc.vala"
+ _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"
+ _tmp13_ = _tmp12_;
+#line 111 "/home/jens/Source/shotwell/src/util/misc.vala"
+ _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"
+ _tmp15_ = _tmp14_;
+#line 111 "/home/jens/Source/shotwell/src/util/misc.vala"
+ if (_tmp13_ != _tmp15_) {
+#line 112 "/home/jens/Source/shotwell/src/util/misc.vala"
result = FALSE;
-#line 121 "/home/jens/Source/shotwell/src/util/misc.vala"
+#line 112 "/home/jens/Source/shotwell/src/util/misc.vala"
return result;
-#line 1009 "misc.c"
+#line 962 "misc.c"
}
{
GeeIterator* _element_it = NULL;
- GeeSet* _tmp30_;
- GeeIterator* _tmp31_;
-#line 125 "/home/jens/Source/shotwell/src/util/misc.vala"
- _tmp30_ = a;
-#line 125 "/home/jens/Source/shotwell/src/util/misc.vala"
- _tmp31_ = gee_iterable_iterator (G_TYPE_CHECK_INSTANCE_CAST (_tmp30_, GEE_TYPE_ITERABLE, GeeIterable));
-#line 125 "/home/jens/Source/shotwell/src/util/misc.vala"
- _element_it = _tmp31_;
-#line 125 "/home/jens/Source/shotwell/src/util/misc.vala"
+ GeeIterator* _tmp16_;
+#line 116 "/home/jens/Source/shotwell/src/util/misc.vala"
+ _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 = _tmp16_;
+#line 116 "/home/jens/Source/shotwell/src/util/misc.vala"
while (TRUE) {
-#line 1023 "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 125 "/home/jens/Source/shotwell/src/util/misc.vala"
- _tmp32_ = _element_it;
-#line 125 "/home/jens/Source/shotwell/src/util/misc.vala"
- _tmp33_ = gee_iterator_next (_tmp32_);
-#line 125 "/home/jens/Source/shotwell/src/util/misc.vala"
- if (!_tmp33_) {
-#line 125 "/home/jens/Source/shotwell/src/util/misc.vala"
+ GeeIterator* _tmp18_;
+ gpointer _tmp19_;
+ const gchar* _tmp20_;
+#line 116 "/home/jens/Source/shotwell/src/util/misc.vala"
+ _tmp17_ = _element_it;
+#line 116 "/home/jens/Source/shotwell/src/util/misc.vala"
+ if (!gee_iterator_next (_tmp17_)) {
+#line 116 "/home/jens/Source/shotwell/src/util/misc.vala"
break;
-#line 1040 "misc.c"
+#line 985 "misc.c"
}
-#line 125 "/home/jens/Source/shotwell/src/util/misc.vala"
- _tmp34_ = _element_it;
-#line 125 "/home/jens/Source/shotwell/src/util/misc.vala"
- _tmp35_ = gee_iterator_get (_tmp34_);
-#line 125 "/home/jens/Source/shotwell/src/util/misc.vala"
- element = (gchar*) _tmp35_;
-#line 126 "/home/jens/Source/shotwell/src/util/misc.vala"
- _tmp36_ = b;
-#line 126 "/home/jens/Source/shotwell/src/util/misc.vala"
- _tmp37_ = element;
-#line 126 "/home/jens/Source/shotwell/src/util/misc.vala"
- _tmp38_ = gee_collection_contains (G_TYPE_CHECK_INSTANCE_CAST (_tmp36_, GEE_TYPE_COLLECTION, GeeCollection), _tmp37_);
-#line 126 "/home/jens/Source/shotwell/src/util/misc.vala"
- if (!_tmp38_) {
-#line 127 "/home/jens/Source/shotwell/src/util/misc.vala"
+#line 116 "/home/jens/Source/shotwell/src/util/misc.vala"
+ _tmp18_ = _element_it;
+#line 116 "/home/jens/Source/shotwell/src/util/misc.vala"
+ _tmp19_ = gee_iterator_get (_tmp18_);
+#line 116 "/home/jens/Source/shotwell/src/util/misc.vala"
+ element = (gchar*) _tmp19_;
+#line 117 "/home/jens/Source/shotwell/src/util/misc.vala"
+ _tmp20_ = element;
+#line 117 "/home/jens/Source/shotwell/src/util/misc.vala"
+ 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 127 "/home/jens/Source/shotwell/src/util/misc.vala"
+#line 118 "/home/jens/Source/shotwell/src/util/misc.vala"
_g_free0 (element);
-#line 127 "/home/jens/Source/shotwell/src/util/misc.vala"
+#line 118 "/home/jens/Source/shotwell/src/util/misc.vala"
_g_object_unref0 (_element_it);
-#line 127 "/home/jens/Source/shotwell/src/util/misc.vala"
+#line 118 "/home/jens/Source/shotwell/src/util/misc.vala"
return result;
-#line 1064 "misc.c"
+#line 1005 "misc.c"
}
-#line 125 "/home/jens/Source/shotwell/src/util/misc.vala"
+#line 116 "/home/jens/Source/shotwell/src/util/misc.vala"
_g_free0 (element);
-#line 1068 "misc.c"
+#line 1009 "misc.c"
}
-#line 125 "/home/jens/Source/shotwell/src/util/misc.vala"
+#line 116 "/home/jens/Source/shotwell/src/util/misc.vala"
_g_object_unref0 (_element_it);
-#line 1072 "misc.c"
+#line 1013 "misc.c"
}
-#line 130 "/home/jens/Source/shotwell/src/util/misc.vala"
+#line 121 "/home/jens/Source/shotwell/src/util/misc.vala"
result = TRUE;
-#line 130 "/home/jens/Source/shotwell/src/util/misc.vala"
+#line 121 "/home/jens/Source/shotwell/src/util/misc.vala"
return result;
-#line 1078 "misc.c"
+#line 1019 "misc.c"
}
-static gpointer _g_object_ref0 (gpointer self) {
-#line 166 "/home/jens/Source/shotwell/src/util/misc.vala"
+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 1085 "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_;
-#line 134 "/home/jens/Source/shotwell/src/util/misc.vala"
+ 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 134 "/home/jens/Source/shotwell/src/util/misc.vala"
+#line 125 "/home/jens/Source/shotwell/src/util/misc.vala"
g_return_val_if_fail ((b == NULL) || GEE_IS_SET (b), NULL);
-#line 134 "/home/jens/Source/shotwell/src/util/misc.vala"
+#line 125 "/home/jens/Source/shotwell/src/util/misc.vala"
g_return_val_if_fail ((excluded == NULL) || GEE_IS_SET (excluded), NULL);
-#line 136 "/home/jens/Source/shotwell/src/util/misc.vala"
- _tmp1_ = a;
-#line 136 "/home/jens/Source/shotwell/src/util/misc.vala"
- if (_tmp1_ != NULL) {
-#line 1112 "misc.c"
- GeeSet* _tmp2_;
-#line 136 "/home/jens/Source/shotwell/src/util/misc.vala"
- _tmp2_ = b;
-#line 136 "/home/jens/Source/shotwell/src/util/misc.vala"
- _tmp0_ = _tmp2_ == NULL;
-#line 1118 "misc.c"
+#line 127 "/home/jens/Source/shotwell/src/util/misc.vala"
+ if (a != NULL) {
+#line 127 "/home/jens/Source/shotwell/src/util/misc.vala"
+ _tmp0_ = b == NULL;
+#line 1057 "misc.c"
} else {
-#line 136 "/home/jens/Source/shotwell/src/util/misc.vala"
+#line 127 "/home/jens/Source/shotwell/src/util/misc.vala"
_tmp0_ = FALSE;
-#line 1122 "misc.c"
+#line 1061 "misc.c"
}
-#line 136 "/home/jens/Source/shotwell/src/util/misc.vala"
+#line 127 "/home/jens/Source/shotwell/src/util/misc.vala"
if (_tmp0_) {
-#line 1126 "misc.c"
- GeeSet* _tmp3_;
-#line 137 "/home/jens/Source/shotwell/src/util/misc.vala"
- _tmp3_ = excluded;
-#line 137 "/home/jens/Source/shotwell/src/util/misc.vala"
- if (_tmp3_ != NULL) {
-#line 1132 "misc.c"
- GeeSet* _tmp4_;
- GeeSet* _tmp5_;
-#line 138 "/home/jens/Source/shotwell/src/util/misc.vala"
- _tmp4_ = excluded;
-#line 138 "/home/jens/Source/shotwell/src/util/misc.vala"
- _tmp5_ = a;
-#line 138 "/home/jens/Source/shotwell/src/util/misc.vala"
- gee_collection_add_all (G_TYPE_CHECK_INSTANCE_CAST (_tmp4_, GEE_TYPE_COLLECTION, GeeCollection), G_TYPE_CHECK_INSTANCE_CAST (_tmp5_, GEE_TYPE_COLLECTION, GeeCollection));
-#line 1141 "misc.c"
+#line 128 "/home/jens/Source/shotwell/src/util/misc.vala"
+ if (excluded != NULL) {
+#line 129 "/home/jens/Source/shotwell/src/util/misc.vala"
+ 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 140 "/home/jens/Source/shotwell/src/util/misc.vala"
+#line 131 "/home/jens/Source/shotwell/src/util/misc.vala"
result = NULL;
-#line 140 "/home/jens/Source/shotwell/src/util/misc.vala"
+#line 131 "/home/jens/Source/shotwell/src/util/misc.vala"
return result;
-#line 1147 "misc.c"
+#line 1075 "misc.c"
}
-#line 143 "/home/jens/Source/shotwell/src/util/misc.vala"
- _tmp7_ = a;
-#line 143 "/home/jens/Source/shotwell/src/util/misc.vala"
- if (_tmp7_ == NULL) {
-#line 1153 "misc.c"
- GeeSet* _tmp8_;
-#line 143 "/home/jens/Source/shotwell/src/util/misc.vala"
- _tmp8_ = b;
-#line 143 "/home/jens/Source/shotwell/src/util/misc.vala"
- _tmp6_ = _tmp8_ != NULL;
-#line 1159 "misc.c"
+#line 134 "/home/jens/Source/shotwell/src/util/misc.vala"
+ if (a == NULL) {
+#line 134 "/home/jens/Source/shotwell/src/util/misc.vala"
+ _tmp1_ = b != NULL;
+#line 1081 "misc.c"
} else {
-#line 143 "/home/jens/Source/shotwell/src/util/misc.vala"
- _tmp6_ = FALSE;
-#line 1163 "misc.c"
+#line 134 "/home/jens/Source/shotwell/src/util/misc.vala"
+ _tmp1_ = FALSE;
+#line 1085 "misc.c"
}
-#line 143 "/home/jens/Source/shotwell/src/util/misc.vala"
- if (_tmp6_) {
-#line 1167 "misc.c"
- GeeSet* _tmp9_;
-#line 144 "/home/jens/Source/shotwell/src/util/misc.vala"
- _tmp9_ = excluded;
-#line 144 "/home/jens/Source/shotwell/src/util/misc.vala"
- if (_tmp9_ != NULL) {
-#line 1173 "misc.c"
- GeeSet* _tmp10_;
- GeeSet* _tmp11_;
-#line 145 "/home/jens/Source/shotwell/src/util/misc.vala"
- _tmp10_ = excluded;
-#line 145 "/home/jens/Source/shotwell/src/util/misc.vala"
- _tmp11_ = b;
-#line 145 "/home/jens/Source/shotwell/src/util/misc.vala"
- gee_collection_add_all (G_TYPE_CHECK_INSTANCE_CAST (_tmp10_, GEE_TYPE_COLLECTION, GeeCollection), G_TYPE_CHECK_INSTANCE_CAST (_tmp11_, GEE_TYPE_COLLECTION, GeeCollection));
-#line 1182 "misc.c"
+#line 134 "/home/jens/Source/shotwell/src/util/misc.vala"
+ if (_tmp1_) {
+#line 135 "/home/jens/Source/shotwell/src/util/misc.vala"
+ if (excluded != NULL) {
+#line 136 "/home/jens/Source/shotwell/src/util/misc.vala"
+ 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 147 "/home/jens/Source/shotwell/src/util/misc.vala"
+#line 138 "/home/jens/Source/shotwell/src/util/misc.vala"
result = NULL;
-#line 147 "/home/jens/Source/shotwell/src/util/misc.vala"
+#line 138 "/home/jens/Source/shotwell/src/util/misc.vala"
return result;
-#line 1188 "misc.c"
+#line 1099 "misc.c"
}
-#line 150 "/home/jens/Source/shotwell/src/util/misc.vala"
- _tmp12_ = gee_hash_set_new (G_TYPE_STRING, (GBoxedCopyFunc) g_strdup, (GDestroyNotify) g_free, NULL, NULL, NULL, NULL, NULL, NULL);
-#line 150 "/home/jens/Source/shotwell/src/util/misc.vala"
- intersection = G_TYPE_CHECK_INSTANCE_CAST (_tmp12_, GEE_TYPE_SET, GeeSet);
-#line 1194 "misc.c"
+#line 141 "/home/jens/Source/shotwell/src/util/misc.vala"
+ _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 (_tmp2_, GEE_TYPE_SET, GeeSet);
+#line 1105 "misc.c"
{
GeeIterator* _element_it = NULL;
- GeeSet* _tmp13_;
- GeeIterator* _tmp14_;
-#line 152 "/home/jens/Source/shotwell/src/util/misc.vala"
- _tmp13_ = a;
-#line 152 "/home/jens/Source/shotwell/src/util/misc.vala"
- _tmp14_ = gee_iterable_iterator (G_TYPE_CHECK_INSTANCE_CAST (_tmp13_, GEE_TYPE_ITERABLE, GeeIterable));
-#line 152 "/home/jens/Source/shotwell/src/util/misc.vala"
- _element_it = _tmp14_;
-#line 152 "/home/jens/Source/shotwell/src/util/misc.vala"
+ GeeIterator* _tmp3_;
+#line 143 "/home/jens/Source/shotwell/src/util/misc.vala"
+ _tmp3_ = gee_iterable_iterator (G_TYPE_CHECK_INSTANCE_CAST (a, GEE_TYPE_ITERABLE, GeeIterable));
+#line 143 "/home/jens/Source/shotwell/src/util/misc.vala"
+ _element_it = _tmp3_;
+#line 143 "/home/jens/Source/shotwell/src/util/misc.vala"
while (TRUE) {
-#line 1207 "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 152 "/home/jens/Source/shotwell/src/util/misc.vala"
- _tmp15_ = _element_it;
-#line 152 "/home/jens/Source/shotwell/src/util/misc.vala"
- _tmp16_ = gee_iterator_next (_tmp15_);
-#line 152 "/home/jens/Source/shotwell/src/util/misc.vala"
- if (!_tmp16_) {
-#line 152 "/home/jens/Source/shotwell/src/util/misc.vala"
+ GeeIterator* _tmp5_;
+ gpointer _tmp6_;
+ const gchar* _tmp7_;
+#line 143 "/home/jens/Source/shotwell/src/util/misc.vala"
+ _tmp4_ = _element_it;
+#line 143 "/home/jens/Source/shotwell/src/util/misc.vala"
+ if (!gee_iterator_next (_tmp4_)) {
+#line 143 "/home/jens/Source/shotwell/src/util/misc.vala"
break;
-#line 1224 "misc.c"
+#line 1127 "misc.c"
}
-#line 152 "/home/jens/Source/shotwell/src/util/misc.vala"
- _tmp17_ = _element_it;
-#line 152 "/home/jens/Source/shotwell/src/util/misc.vala"
- _tmp18_ = gee_iterator_get (_tmp17_);
-#line 152 "/home/jens/Source/shotwell/src/util/misc.vala"
- element = (gchar*) _tmp18_;
-#line 153 "/home/jens/Source/shotwell/src/util/misc.vala"
- _tmp19_ = b;
-#line 153 "/home/jens/Source/shotwell/src/util/misc.vala"
- _tmp20_ = element;
-#line 153 "/home/jens/Source/shotwell/src/util/misc.vala"
- _tmp21_ = gee_collection_contains (G_TYPE_CHECK_INSTANCE_CAST (_tmp19_, GEE_TYPE_COLLECTION, GeeCollection), _tmp20_);
-#line 153 "/home/jens/Source/shotwell/src/util/misc.vala"
- if (_tmp21_) {
-#line 1240 "misc.c"
- GeeSet* _tmp22_;
- const gchar* _tmp23_;
-#line 154 "/home/jens/Source/shotwell/src/util/misc.vala"
- _tmp22_ = intersection;
-#line 154 "/home/jens/Source/shotwell/src/util/misc.vala"
- _tmp23_ = element;
-#line 154 "/home/jens/Source/shotwell/src/util/misc.vala"
- gee_collection_add (G_TYPE_CHECK_INSTANCE_CAST (_tmp22_, GEE_TYPE_COLLECTION, GeeCollection), _tmp23_);
-#line 1249 "misc.c"
+#line 143 "/home/jens/Source/shotwell/src/util/misc.vala"
+ _tmp5_ = _element_it;
+#line 143 "/home/jens/Source/shotwell/src/util/misc.vala"
+ _tmp6_ = gee_iterator_get (_tmp5_);
+#line 143 "/home/jens/Source/shotwell/src/util/misc.vala"
+ element = (gchar*) _tmp6_;
+#line 144 "/home/jens/Source/shotwell/src/util/misc.vala"
+ _tmp7_ = element;
+#line 144 "/home/jens/Source/shotwell/src/util/misc.vala"
+ 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"
+ _tmp8_ = intersection;
+#line 145 "/home/jens/Source/shotwell/src/util/misc.vala"
+ _tmp9_ = element;
+#line 145 "/home/jens/Source/shotwell/src/util/misc.vala"
+ gee_collection_add (G_TYPE_CHECK_INSTANCE_CAST (_tmp8_, GEE_TYPE_COLLECTION, GeeCollection), _tmp9_);
+#line 1148 "misc.c"
} else {
- GeeSet* _tmp24_;
-#line 155 "/home/jens/Source/shotwell/src/util/misc.vala"
- _tmp24_ = excluded;
-#line 155 "/home/jens/Source/shotwell/src/util/misc.vala"
- if (_tmp24_ != NULL) {
-#line 1256 "misc.c"
- GeeSet* _tmp25_;
- const gchar* _tmp26_;
-#line 156 "/home/jens/Source/shotwell/src/util/misc.vala"
- _tmp25_ = excluded;
-#line 156 "/home/jens/Source/shotwell/src/util/misc.vala"
- _tmp26_ = element;
-#line 156 "/home/jens/Source/shotwell/src/util/misc.vala"
- gee_collection_add (G_TYPE_CHECK_INSTANCE_CAST (_tmp25_, GEE_TYPE_COLLECTION, GeeCollection), _tmp26_);
-#line 1265 "misc.c"
+#line 146 "/home/jens/Source/shotwell/src/util/misc.vala"
+ if (excluded != NULL) {
+#line 1152 "misc.c"
+ const gchar* _tmp10_;
+#line 147 "/home/jens/Source/shotwell/src/util/misc.vala"
+ _tmp10_ = element;
+#line 147 "/home/jens/Source/shotwell/src/util/misc.vala"
+ gee_collection_add (G_TYPE_CHECK_INSTANCE_CAST (excluded, GEE_TYPE_COLLECTION, GeeCollection), _tmp10_);
+#line 1158 "misc.c"
}
}
-#line 152 "/home/jens/Source/shotwell/src/util/misc.vala"
+#line 143 "/home/jens/Source/shotwell/src/util/misc.vala"
_g_free0 (element);
-#line 1270 "misc.c"
+#line 1163 "misc.c"
}
-#line 152 "/home/jens/Source/shotwell/src/util/misc.vala"
+#line 143 "/home/jens/Source/shotwell/src/util/misc.vala"
_g_object_unref0 (_element_it);
-#line 1274 "misc.c"
+#line 1167 "misc.c"
}
{
GeeIterator* _element_it = NULL;
- GeeSet* _tmp27_;
- GeeIterator* _tmp28_;
-#line 159 "/home/jens/Source/shotwell/src/util/misc.vala"
- _tmp27_ = b;
-#line 159 "/home/jens/Source/shotwell/src/util/misc.vala"
- _tmp28_ = gee_iterable_iterator (G_TYPE_CHECK_INSTANCE_CAST (_tmp27_, GEE_TYPE_ITERABLE, GeeIterable));
-#line 159 "/home/jens/Source/shotwell/src/util/misc.vala"
- _element_it = _tmp28_;
-#line 159 "/home/jens/Source/shotwell/src/util/misc.vala"
+ GeeIterator* _tmp11_;
+#line 150 "/home/jens/Source/shotwell/src/util/misc.vala"
+ _tmp11_ = gee_iterable_iterator (G_TYPE_CHECK_INSTANCE_CAST (b, GEE_TYPE_ITERABLE, GeeIterable));
+#line 150 "/home/jens/Source/shotwell/src/util/misc.vala"
+ _element_it = _tmp11_;
+#line 150 "/home/jens/Source/shotwell/src/util/misc.vala"
while (TRUE) {
-#line 1288 "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 159 "/home/jens/Source/shotwell/src/util/misc.vala"
- _tmp29_ = _element_it;
-#line 159 "/home/jens/Source/shotwell/src/util/misc.vala"
- _tmp30_ = gee_iterator_next (_tmp29_);
-#line 159 "/home/jens/Source/shotwell/src/util/misc.vala"
- if (!_tmp30_) {
-#line 159 "/home/jens/Source/shotwell/src/util/misc.vala"
+ GeeIterator* _tmp13_;
+ gpointer _tmp14_;
+ const gchar* _tmp15_;
+#line 150 "/home/jens/Source/shotwell/src/util/misc.vala"
+ _tmp12_ = _element_it;
+#line 150 "/home/jens/Source/shotwell/src/util/misc.vala"
+ if (!gee_iterator_next (_tmp12_)) {
+#line 150 "/home/jens/Source/shotwell/src/util/misc.vala"
break;
-#line 1305 "misc.c"
+#line 1190 "misc.c"
}
-#line 159 "/home/jens/Source/shotwell/src/util/misc.vala"
- _tmp31_ = _element_it;
-#line 159 "/home/jens/Source/shotwell/src/util/misc.vala"
- _tmp32_ = gee_iterator_get (_tmp31_);
-#line 159 "/home/jens/Source/shotwell/src/util/misc.vala"
- element = (gchar*) _tmp32_;
-#line 160 "/home/jens/Source/shotwell/src/util/misc.vala"
- _tmp33_ = a;
-#line 160 "/home/jens/Source/shotwell/src/util/misc.vala"
- _tmp34_ = element;
-#line 160 "/home/jens/Source/shotwell/src/util/misc.vala"
- _tmp35_ = gee_collection_contains (G_TYPE_CHECK_INSTANCE_CAST (_tmp33_, GEE_TYPE_COLLECTION, GeeCollection), _tmp34_);
-#line 160 "/home/jens/Source/shotwell/src/util/misc.vala"
- if (_tmp35_) {
-#line 1321 "misc.c"
- GeeSet* _tmp36_;
- const gchar* _tmp37_;
-#line 161 "/home/jens/Source/shotwell/src/util/misc.vala"
- _tmp36_ = intersection;
-#line 161 "/home/jens/Source/shotwell/src/util/misc.vala"
- _tmp37_ = element;
-#line 161 "/home/jens/Source/shotwell/src/util/misc.vala"
- gee_collection_add (G_TYPE_CHECK_INSTANCE_CAST (_tmp36_, GEE_TYPE_COLLECTION, GeeCollection), _tmp37_);
-#line 1330 "misc.c"
+#line 150 "/home/jens/Source/shotwell/src/util/misc.vala"
+ _tmp13_ = _element_it;
+#line 150 "/home/jens/Source/shotwell/src/util/misc.vala"
+ _tmp14_ = gee_iterator_get (_tmp13_);
+#line 150 "/home/jens/Source/shotwell/src/util/misc.vala"
+ element = (gchar*) _tmp14_;
+#line 151 "/home/jens/Source/shotwell/src/util/misc.vala"
+ _tmp15_ = element;
+#line 151 "/home/jens/Source/shotwell/src/util/misc.vala"
+ 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"
+ _tmp16_ = intersection;
+#line 152 "/home/jens/Source/shotwell/src/util/misc.vala"
+ _tmp17_ = element;
+#line 152 "/home/jens/Source/shotwell/src/util/misc.vala"
+ gee_collection_add (G_TYPE_CHECK_INSTANCE_CAST (_tmp16_, GEE_TYPE_COLLECTION, GeeCollection), _tmp17_);
+#line 1211 "misc.c"
} else {
- GeeSet* _tmp38_;
-#line 162 "/home/jens/Source/shotwell/src/util/misc.vala"
- _tmp38_ = excluded;
-#line 162 "/home/jens/Source/shotwell/src/util/misc.vala"
- if (_tmp38_ != NULL) {
-#line 1337 "misc.c"
- GeeSet* _tmp39_;
- const gchar* _tmp40_;
-#line 163 "/home/jens/Source/shotwell/src/util/misc.vala"
- _tmp39_ = excluded;
-#line 163 "/home/jens/Source/shotwell/src/util/misc.vala"
- _tmp40_ = element;
-#line 163 "/home/jens/Source/shotwell/src/util/misc.vala"
- gee_collection_add (G_TYPE_CHECK_INSTANCE_CAST (_tmp39_, GEE_TYPE_COLLECTION, GeeCollection), _tmp40_);
-#line 1346 "misc.c"
+#line 153 "/home/jens/Source/shotwell/src/util/misc.vala"
+ if (excluded != NULL) {
+#line 1215 "misc.c"
+ const gchar* _tmp18_;
+#line 154 "/home/jens/Source/shotwell/src/util/misc.vala"
+ _tmp18_ = element;
+#line 154 "/home/jens/Source/shotwell/src/util/misc.vala"
+ gee_collection_add (G_TYPE_CHECK_INSTANCE_CAST (excluded, GEE_TYPE_COLLECTION, GeeCollection), _tmp18_);
+#line 1221 "misc.c"
}
}
-#line 159 "/home/jens/Source/shotwell/src/util/misc.vala"
+#line 150 "/home/jens/Source/shotwell/src/util/misc.vala"
_g_free0 (element);
-#line 1351 "misc.c"
+#line 1226 "misc.c"
}
-#line 159 "/home/jens/Source/shotwell/src/util/misc.vala"
+#line 150 "/home/jens/Source/shotwell/src/util/misc.vala"
_g_object_unref0 (_element_it);
-#line 1355 "misc.c"
- }
-#line 166 "/home/jens/Source/shotwell/src/util/misc.vala"
- _tmp42_ = intersection;
-#line 166 "/home/jens/Source/shotwell/src/util/misc.vala"
- _tmp43_ = gee_collection_get_size (G_TYPE_CHECK_INSTANCE_CAST (_tmp42_, GEE_TYPE_COLLECTION, GeeCollection));
-#line 166 "/home/jens/Source/shotwell/src/util/misc.vala"
- _tmp44_ = _tmp43_;
-#line 166 "/home/jens/Source/shotwell/src/util/misc.vala"
- if (_tmp44_ > 0) {
-#line 1365 "misc.c"
- GeeSet* _tmp45_;
-#line 166 "/home/jens/Source/shotwell/src/util/misc.vala"
- _tmp45_ = intersection;
-#line 166 "/home/jens/Source/shotwell/src/util/misc.vala"
- _tmp41_ = _tmp45_;
-#line 1371 "misc.c"
+#line 1230 "misc.c"
+ }
+#line 157 "/home/jens/Source/shotwell/src/util/misc.vala"
+ _tmp20_ = intersection;
+#line 157 "/home/jens/Source/shotwell/src/util/misc.vala"
+ _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"
+ _tmp22_ = _tmp21_;
+#line 157 "/home/jens/Source/shotwell/src/util/misc.vala"
+ if (_tmp22_ > 0) {
+#line 1240 "misc.c"
+ GeeSet* _tmp23_;
+#line 157 "/home/jens/Source/shotwell/src/util/misc.vala"
+ _tmp23_ = intersection;
+#line 157 "/home/jens/Source/shotwell/src/util/misc.vala"
+ _tmp19_ = _tmp23_;
+#line 1246 "misc.c"
} else {
-#line 166 "/home/jens/Source/shotwell/src/util/misc.vala"
- _tmp41_ = NULL;
-#line 1375 "misc.c"
- }
-#line 166 "/home/jens/Source/shotwell/src/util/misc.vala"
- _tmp46_ = _g_object_ref0 (_tmp41_);
-#line 166 "/home/jens/Source/shotwell/src/util/misc.vala"
- result = _tmp46_;
-#line 166 "/home/jens/Source/shotwell/src/util/misc.vala"
+#line 157 "/home/jens/Source/shotwell/src/util/misc.vala"
+ _tmp19_ = NULL;
+#line 1250 "misc.c"
+ }
+#line 157 "/home/jens/Source/shotwell/src/util/misc.vala"
+ _tmp24_ = _g_object_ref0 (_tmp19_);
+#line 157 "/home/jens/Source/shotwell/src/util/misc.vala"
+ result = _tmp24_;
+#line 157 "/home/jens/Source/shotwell/src/util/misc.vala"
_g_object_unref0 (intersection);
-#line 166 "/home/jens/Source/shotwell/src/util/misc.vala"
+#line 157 "/home/jens/Source/shotwell/src/util/misc.vala"
return result;
-#line 1385 "misc.c"
+#line 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;
-#line 169 "/home/jens/Source/shotwell/src/util/misc.vala"
+ 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 170 "/home/jens/Source/shotwell/src/util/misc.vala"
- _tmp0_ = photos;
-#line 170 "/home/jens/Source/shotwell/src/util/misc.vala"
- _tmp1_ = gee_collection_get_size (_tmp0_);
-#line 170 "/home/jens/Source/shotwell/src/util/misc.vala"
- _tmp2_ = _tmp1_;
-#line 170 "/home/jens/Source/shotwell/src/util/misc.vala"
- _tmp3_ = g_new0 (gint64, _tmp2_);
-#line 170 "/home/jens/Source/shotwell/src/util/misc.vala"
- ids = _tmp3_;
-#line 170 "/home/jens/Source/shotwell/src/util/misc.vala"
- ids_length1 = _tmp2_;
-#line 170 "/home/jens/Source/shotwell/src/util/misc.vala"
+#line 161 "/home/jens/Source/shotwell/src/util/misc.vala"
+ _tmp0_ = gee_collection_get_size (photos);
+#line 161 "/home/jens/Source/shotwell/src/util/misc.vala"
+ _tmp1_ = _tmp0_;
+#line 161 "/home/jens/Source/shotwell/src/util/misc.vala"
+ _tmp2_ = g_new0 (gint64, _tmp1_);
+#line 161 "/home/jens/Source/shotwell/src/util/misc.vala"
+ ids = _tmp2_;
+#line 161 "/home/jens/Source/shotwell/src/util/misc.vala"
+ ids_length1 = _tmp1_;
+#line 161 "/home/jens/Source/shotwell/src/util/misc.vala"
_ids_size_ = ids_length1;
-#line 171 "/home/jens/Source/shotwell/src/util/misc.vala"
+#line 162 "/home/jens/Source/shotwell/src/util/misc.vala"
ctr = 0;
-#line 1429 "misc.c"
+#line 1303 "misc.c"
{
GeeIterator* _photo_it = NULL;
- GeeCollection* _tmp4_;
- GeeIterator* _tmp5_;
-#line 172 "/home/jens/Source/shotwell/src/util/misc.vala"
- _tmp4_ = photos;
-#line 172 "/home/jens/Source/shotwell/src/util/misc.vala"
- _tmp5_ = gee_iterable_iterator (G_TYPE_CHECK_INSTANCE_CAST (_tmp4_, GEE_TYPE_ITERABLE, GeeIterable));
-#line 172 "/home/jens/Source/shotwell/src/util/misc.vala"
- _photo_it = _tmp5_;
-#line 172 "/home/jens/Source/shotwell/src/util/misc.vala"
+ GeeIterator* _tmp3_;
+#line 163 "/home/jens/Source/shotwell/src/util/misc.vala"
+ _tmp3_ = gee_iterable_iterator (G_TYPE_CHECK_INSTANCE_CAST (photos, GEE_TYPE_ITERABLE, GeeIterable));
+#line 163 "/home/jens/Source/shotwell/src/util/misc.vala"
+ _photo_it = _tmp3_;
+#line 163 "/home/jens/Source/shotwell/src/util/misc.vala"
while (TRUE) {
-#line 1442 "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 172 "/home/jens/Source/shotwell/src/util/misc.vala"
- _tmp6_ = _photo_it;
-#line 172 "/home/jens/Source/shotwell/src/util/misc.vala"
- _tmp7_ = gee_iterator_next (_tmp6_);
-#line 172 "/home/jens/Source/shotwell/src/util/misc.vala"
- if (!_tmp7_) {
-#line 172 "/home/jens/Source/shotwell/src/util/misc.vala"
+ 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"
+ _tmp4_ = _photo_it;
+#line 163 "/home/jens/Source/shotwell/src/util/misc.vala"
+ if (!gee_iterator_next (_tmp4_)) {
+#line 163 "/home/jens/Source/shotwell/src/util/misc.vala"
break;
-#line 1463 "misc.c"
+#line 1331 "misc.c"
}
-#line 172 "/home/jens/Source/shotwell/src/util/misc.vala"
- _tmp8_ = _photo_it;
-#line 172 "/home/jens/Source/shotwell/src/util/misc.vala"
- _tmp9_ = gee_iterator_get (_tmp8_);
-#line 172 "/home/jens/Source/shotwell/src/util/misc.vala"
- photo = (Photo*) _tmp9_;
-#line 173 "/home/jens/Source/shotwell/src/util/misc.vala"
- _tmp10_ = ids;
-#line 173 "/home/jens/Source/shotwell/src/util/misc.vala"
- _tmp10__length1 = ids_length1;
-#line 173 "/home/jens/Source/shotwell/src/util/misc.vala"
- _tmp11_ = ctr;
-#line 173 "/home/jens/Source/shotwell/src/util/misc.vala"
- ctr = _tmp11_ + 1;
-#line 173 "/home/jens/Source/shotwell/src/util/misc.vala"
- _tmp12_ = photo;
-#line 173 "/home/jens/Source/shotwell/src/util/misc.vala"
- photo_get_photo_id (_tmp12_, &_tmp13_);
-#line 173 "/home/jens/Source/shotwell/src/util/misc.vala"
- _tmp14_ = _tmp13_.id;
-#line 173 "/home/jens/Source/shotwell/src/util/misc.vala"
- _tmp10_[_tmp11_] = _tmp14_;
-#line 173 "/home/jens/Source/shotwell/src/util/misc.vala"
- _tmp15_ = _tmp10_[_tmp11_];
-#line 172 "/home/jens/Source/shotwell/src/util/misc.vala"
+#line 163 "/home/jens/Source/shotwell/src/util/misc.vala"
+ _tmp5_ = _photo_it;
+#line 163 "/home/jens/Source/shotwell/src/util/misc.vala"
+ _tmp6_ = gee_iterator_get (_tmp5_);
+#line 163 "/home/jens/Source/shotwell/src/util/misc.vala"
+ photo = (Photo*) _tmp6_;
+#line 164 "/home/jens/Source/shotwell/src/util/misc.vala"
+ _tmp7_ = ids;
+#line 164 "/home/jens/Source/shotwell/src/util/misc.vala"
+ _tmp7__length1 = ids_length1;
+#line 164 "/home/jens/Source/shotwell/src/util/misc.vala"
+ _tmp8_ = ctr;
+#line 164 "/home/jens/Source/shotwell/src/util/misc.vala"
+ ctr = _tmp8_ + 1;
+#line 164 "/home/jens/Source/shotwell/src/util/misc.vala"
+ _tmp9_ = photo;
+#line 164 "/home/jens/Source/shotwell/src/util/misc.vala"
+ photo_get_photo_id (_tmp9_, &_tmp10_);
+#line 164 "/home/jens/Source/shotwell/src/util/misc.vala"
+ _tmp11_ = _tmp10_.id;
+#line 164 "/home/jens/Source/shotwell/src/util/misc.vala"
+ _tmp7_[_tmp8_] = _tmp11_;
+#line 164 "/home/jens/Source/shotwell/src/util/misc.vala"
+ _tmp12_ = _tmp7_[_tmp8_];
+#line 163 "/home/jens/Source/shotwell/src/util/misc.vala"
_g_object_unref0 (photo);
-#line 1491 "misc.c"
+#line 1359 "misc.c"
}
-#line 172 "/home/jens/Source/shotwell/src/util/misc.vala"
+#line 163 "/home/jens/Source/shotwell/src/util/misc.vala"
_g_object_unref0 (_photo_it);
-#line 1495 "misc.c"
+#line 1363 "misc.c"
}
-#line 175 "/home/jens/Source/shotwell/src/util/misc.vala"
- _tmp16_ = photos;
-#line 175 "/home/jens/Source/shotwell/src/util/misc.vala"
- _tmp17_ = gee_collection_get_size (_tmp16_);
-#line 175 "/home/jens/Source/shotwell/src/util/misc.vala"
- _tmp18_ = _tmp17_;
-#line 175 "/home/jens/Source/shotwell/src/util/misc.vala"
- bytes = (gsize) (_tmp18_ * sizeof (gint64));
-#line 176 "/home/jens/Source/shotwell/src/util/misc.vala"
- _tmp19_ = g_new0 (guchar, bytes);
-#line 176 "/home/jens/Source/shotwell/src/util/misc.vala"
- serialized = _tmp19_;
-#line 176 "/home/jens/Source/shotwell/src/util/misc.vala"
+#line 166 "/home/jens/Source/shotwell/src/util/misc.vala"
+ _tmp13_ = gee_collection_get_size (photos);
+#line 166 "/home/jens/Source/shotwell/src/util/misc.vala"
+ _tmp14_ = _tmp13_;
+#line 166 "/home/jens/Source/shotwell/src/util/misc.vala"
+ bytes = (gsize) (_tmp14_ * sizeof (gint64));
+#line 167 "/home/jens/Source/shotwell/src/util/misc.vala"
+ _tmp15_ = g_new0 (guchar, bytes);
+#line 167 "/home/jens/Source/shotwell/src/util/misc.vala"
+ serialized = _tmp15_;
+#line 167 "/home/jens/Source/shotwell/src/util/misc.vala"
serialized_length1 = bytes;
-#line 176 "/home/jens/Source/shotwell/src/util/misc.vala"
+#line 167 "/home/jens/Source/shotwell/src/util/misc.vala"
_serialized_size_ = serialized_length1;
-#line 177 "/home/jens/Source/shotwell/src/util/misc.vala"
- _tmp20_ = ids;
-#line 177 "/home/jens/Source/shotwell/src/util/misc.vala"
- _tmp20__length1 = ids_length1;
-#line 177 "/home/jens/Source/shotwell/src/util/misc.vala"
- memcpy (serialized, _tmp20_, bytes);
-#line 179 "/home/jens/Source/shotwell/src/util/misc.vala"
- _tmp21_ = serialized;
-#line 179 "/home/jens/Source/shotwell/src/util/misc.vala"
- _tmp21__length1 = serialized_length1;
-#line 179 "/home/jens/Source/shotwell/src/util/misc.vala"
+#line 168 "/home/jens/Source/shotwell/src/util/misc.vala"
+ _tmp16_ = ids;
+#line 168 "/home/jens/Source/shotwell/src/util/misc.vala"
+ _tmp16__length1 = ids_length1;
+#line 168 "/home/jens/Source/shotwell/src/util/misc.vala"
+ memcpy (serialized, _tmp16_, bytes);
+#line 170 "/home/jens/Source/shotwell/src/util/misc.vala"
+ _tmp17_ = serialized;
+#line 170 "/home/jens/Source/shotwell/src/util/misc.vala"
+ _tmp17__length1 = serialized_length1;
+#line 170 "/home/jens/Source/shotwell/src/util/misc.vala"
if (result_length1) {
-#line 179 "/home/jens/Source/shotwell/src/util/misc.vala"
- *result_length1 = _tmp21__length1;
-#line 1527 "misc.c"
+#line 170 "/home/jens/Source/shotwell/src/util/misc.vala"
+ *result_length1 = _tmp17__length1;
+#line 1393 "misc.c"
}
-#line 179 "/home/jens/Source/shotwell/src/util/misc.vala"
- result = _tmp21_;
-#line 179 "/home/jens/Source/shotwell/src/util/misc.vala"
+#line 170 "/home/jens/Source/shotwell/src/util/misc.vala"
+ result = _tmp17_;
+#line 170 "/home/jens/Source/shotwell/src/util/misc.vala"
ids = (g_free (ids), NULL);
-#line 179 "/home/jens/Source/shotwell/src/util/misc.vala"
+#line 170 "/home/jens/Source/shotwell/src/util/misc.vala"
return result;
-#line 1535 "misc.c"
+#line 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 183 "/home/jens/Source/shotwell/src/util/misc.vala"
- _tmp0_ = size;
-#line 183 "/home/jens/Source/shotwell/src/util/misc.vala"
- count = (gsize) (_tmp0_ / sizeof (gint64));
-#line 184 "/home/jens/Source/shotwell/src/util/misc.vala"
- _tmp2_ = count;
-#line 184 "/home/jens/Source/shotwell/src/util/misc.vala"
- if (_tmp2_ <= ((gsize) 0)) {
-#line 184 "/home/jens/Source/shotwell/src/util/misc.vala"
- _tmp1_ = TRUE;
-#line 1568 "misc.c"
+#line 174 "/home/jens/Source/shotwell/src/util/misc.vala"
+ count = (gsize) (size / sizeof (gint64));
+#line 175 "/home/jens/Source/shotwell/src/util/misc.vala"
+ _tmp1_ = count;
+#line 175 "/home/jens/Source/shotwell/src/util/misc.vala"
+ if (_tmp1_ <= ((gsize) 0)) {
+#line 175 "/home/jens/Source/shotwell/src/util/misc.vala"
+ _tmp0_ = TRUE;
+#line 1432 "misc.c"
} else {
- guchar* _tmp3_;
-#line 184 "/home/jens/Source/shotwell/src/util/misc.vala"
- _tmp3_ = serialized;
-#line 184 "/home/jens/Source/shotwell/src/util/misc.vala"
- _tmp1_ = _tmp3_ == NULL;
-#line 1575 "misc.c"
- }
-#line 184 "/home/jens/Source/shotwell/src/util/misc.vala"
- if (_tmp1_) {
-#line 185 "/home/jens/Source/shotwell/src/util/misc.vala"
+#line 175 "/home/jens/Source/shotwell/src/util/misc.vala"
+ _tmp0_ = serialized == NULL;
+#line 1436 "misc.c"
+ }
+#line 175 "/home/jens/Source/shotwell/src/util/misc.vala"
+ if (_tmp0_) {
+#line 176 "/home/jens/Source/shotwell/src/util/misc.vala"
result = NULL;
-#line 185 "/home/jens/Source/shotwell/src/util/misc.vala"
+#line 176 "/home/jens/Source/shotwell/src/util/misc.vala"
return result;
-#line 1583 "misc.c"
- }
-#line 187 "/home/jens/Source/shotwell/src/util/misc.vala"
- _tmp4_ = count;
-#line 187 "/home/jens/Source/shotwell/src/util/misc.vala"
- _tmp5_ = g_new0 (gint64, _tmp4_);
-#line 187 "/home/jens/Source/shotwell/src/util/misc.vala"
- ids = _tmp5_;
-#line 187 "/home/jens/Source/shotwell/src/util/misc.vala"
- ids_length1 = _tmp4_;
-#line 187 "/home/jens/Source/shotwell/src/util/misc.vala"
+#line 1444 "misc.c"
+ }
+#line 178 "/home/jens/Source/shotwell/src/util/misc.vala"
+ _tmp2_ = count;
+#line 178 "/home/jens/Source/shotwell/src/util/misc.vala"
+ _tmp3_ = g_new0 (gint64, _tmp2_);
+#line 178 "/home/jens/Source/shotwell/src/util/misc.vala"
+ ids = _tmp3_;
+#line 178 "/home/jens/Source/shotwell/src/util/misc.vala"
+ ids_length1 = _tmp2_;
+#line 178 "/home/jens/Source/shotwell/src/util/misc.vala"
_ids_size_ = ids_length1;
-#line 188 "/home/jens/Source/shotwell/src/util/misc.vala"
+#line 179 "/home/jens/Source/shotwell/src/util/misc.vala"
+ _tmp4_ = ids;
+#line 179 "/home/jens/Source/shotwell/src/util/misc.vala"
+ _tmp4__length1 = ids_length1;
+#line 179 "/home/jens/Source/shotwell/src/util/misc.vala"
+ memcpy (_tmp4_, serialized, (gsize) size);
+#line 181 "/home/jens/Source/shotwell/src/util/misc.vala"
+ _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 = _tmp5_;
+#line 182 "/home/jens/Source/shotwell/src/util/misc.vala"
_tmp6_ = ids;
-#line 188 "/home/jens/Source/shotwell/src/util/misc.vala"
+#line 182 "/home/jens/Source/shotwell/src/util/misc.vala"
_tmp6__length1 = ids_length1;
-#line 188 "/home/jens/Source/shotwell/src/util/misc.vala"
- _tmp7_ = serialized;
-#line 188 "/home/jens/Source/shotwell/src/util/misc.vala"
- _tmp8_ = size;
-#line 188 "/home/jens/Source/shotwell/src/util/misc.vala"
- memcpy (_tmp6_, _tmp7_, (gsize) _tmp8_);
-#line 190 "/home/jens/Source/shotwell/src/util/misc.vala"
- _tmp9_ = gee_array_list_new (TYPE_PHOTO_ID, (GBoxedCopyFunc) photo_id_dup, (GDestroyNotify) photo_id_free, NULL, NULL, NULL);
-#line 190 "/home/jens/Source/shotwell/src/util/misc.vala"
- list = _tmp9_;
-#line 191 "/home/jens/Source/shotwell/src/util/misc.vala"
- _tmp10_ = ids;
-#line 191 "/home/jens/Source/shotwell/src/util/misc.vala"
- _tmp10__length1 = ids_length1;
-#line 1613 "misc.c"
+#line 1470 "misc.c"
{
gint64* id_collection = NULL;
gint id_collection_length1 = 0;
gint _id_collection_size_ = 0;
gint id_it = 0;
-#line 191 "/home/jens/Source/shotwell/src/util/misc.vala"
- id_collection = _tmp10_;
-#line 191 "/home/jens/Source/shotwell/src/util/misc.vala"
- id_collection_length1 = _tmp10__length1;
-#line 191 "/home/jens/Source/shotwell/src/util/misc.vala"
- for (id_it = 0; id_it < _tmp10__length1; id_it = id_it + 1) {
-#line 1625 "misc.c"
+#line 182 "/home/jens/Source/shotwell/src/util/misc.vala"
+ id_collection = _tmp6_;
+#line 182 "/home/jens/Source/shotwell/src/util/misc.vala"
+ id_collection_length1 = _tmp6__length1;
+#line 182 "/home/jens/Source/shotwell/src/util/misc.vala"
+ for (id_it = 0; id_it < _tmp6__length1; id_it = id_it + 1) {
+#line 1482 "misc.c"
gint64 id = 0LL;
-#line 191 "/home/jens/Source/shotwell/src/util/misc.vala"
+#line 182 "/home/jens/Source/shotwell/src/util/misc.vala"
id = id_collection[id_it];
-#line 1629 "misc.c"
+#line 1486 "misc.c"
{
- GeeArrayList* _tmp11_;
- gint64 _tmp12_;
- PhotoID _tmp13_ = {0};
-#line 192 "/home/jens/Source/shotwell/src/util/misc.vala"
- _tmp11_ = list;
-#line 192 "/home/jens/Source/shotwell/src/util/misc.vala"
- _tmp12_ = id;
-#line 192 "/home/jens/Source/shotwell/src/util/misc.vala"
- photo_id_init (&_tmp13_, _tmp12_);
-#line 192 "/home/jens/Source/shotwell/src/util/misc.vala"
- gee_abstract_collection_add (G_TYPE_CHECK_INSTANCE_CAST (_tmp11_, GEE_TYPE_ABSTRACT_COLLECTION, GeeAbstractCollection), &_tmp13_);
-#line 1642 "misc.c"
+ GeeArrayList* _tmp7_;
+ gint64 _tmp8_;
+ PhotoID _tmp9_ = {0};
+#line 183 "/home/jens/Source/shotwell/src/util/misc.vala"
+ _tmp7_ = list;
+#line 183 "/home/jens/Source/shotwell/src/util/misc.vala"
+ _tmp8_ = id;
+#line 183 "/home/jens/Source/shotwell/src/util/misc.vala"
+ photo_id_init (&_tmp9_, _tmp8_);
+#line 183 "/home/jens/Source/shotwell/src/util/misc.vala"
+ gee_abstract_collection_add (G_TYPE_CHECK_INSTANCE_CAST (_tmp7_, GEE_TYPE_ABSTRACT_COLLECTION, GeeAbstractCollection), &_tmp9_);
+#line 1499 "misc.c"
}
}
}
-#line 194 "/home/jens/Source/shotwell/src/util/misc.vala"
+#line 185 "/home/jens/Source/shotwell/src/util/misc.vala"
result = G_TYPE_CHECK_INSTANCE_CAST (list, GEE_TYPE_LIST, GeeList);
-#line 194 "/home/jens/Source/shotwell/src/util/misc.vala"
+#line 185 "/home/jens/Source/shotwell/src/util/misc.vala"
ids = (g_free (ids), NULL);
-#line 194 "/home/jens/Source/shotwell/src/util/misc.vala"
+#line 185 "/home/jens/Source/shotwell/src/util/misc.vala"
return result;
-#line 1652 "misc.c"
+#line 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;
-#line 197 "/home/jens/Source/shotwell/src/util/misc.vala"
+ 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 198 "/home/jens/Source/shotwell/src/util/misc.vala"
- _tmp0_ = media;
-#line 198 "/home/jens/Source/shotwell/src/util/misc.vala"
- _tmp1_ = gee_collection_get_size (_tmp0_);
-#line 198 "/home/jens/Source/shotwell/src/util/misc.vala"
- _tmp2_ = _tmp1_;
-#line 198 "/home/jens/Source/shotwell/src/util/misc.vala"
- _tmp3_ = g_new0 (GdkAtom, _tmp2_);
-#line 198 "/home/jens/Source/shotwell/src/util/misc.vala"
- atoms = _tmp3_;
-#line 198 "/home/jens/Source/shotwell/src/util/misc.vala"
- atoms_length1 = _tmp2_;
-#line 198 "/home/jens/Source/shotwell/src/util/misc.vala"
+#line 189 "/home/jens/Source/shotwell/src/util/misc.vala"
+ _tmp0_ = gee_collection_get_size (media);
+#line 189 "/home/jens/Source/shotwell/src/util/misc.vala"
+ _tmp1_ = _tmp0_;
+#line 189 "/home/jens/Source/shotwell/src/util/misc.vala"
+ _tmp2_ = g_new0 (GdkAtom, _tmp1_);
+#line 189 "/home/jens/Source/shotwell/src/util/misc.vala"
+ atoms = _tmp2_;
+#line 189 "/home/jens/Source/shotwell/src/util/misc.vala"
+ atoms_length1 = _tmp1_;
+#line 189 "/home/jens/Source/shotwell/src/util/misc.vala"
_atoms_size_ = atoms_length1;
-#line 199 "/home/jens/Source/shotwell/src/util/misc.vala"
+#line 190 "/home/jens/Source/shotwell/src/util/misc.vala"
ctr = 0;
-#line 1696 "misc.c"
+#line 1552 "misc.c"
{
GeeIterator* _current_media_it = NULL;
- GeeCollection* _tmp4_;
- GeeIterator* _tmp5_;
-#line 200 "/home/jens/Source/shotwell/src/util/misc.vala"
- _tmp4_ = media;
-#line 200 "/home/jens/Source/shotwell/src/util/misc.vala"
- _tmp5_ = gee_iterable_iterator (G_TYPE_CHECK_INSTANCE_CAST (_tmp4_, GEE_TYPE_ITERABLE, GeeIterable));
-#line 200 "/home/jens/Source/shotwell/src/util/misc.vala"
- _current_media_it = _tmp5_;
-#line 200 "/home/jens/Source/shotwell/src/util/misc.vala"
+ GeeIterator* _tmp3_;
+#line 191 "/home/jens/Source/shotwell/src/util/misc.vala"
+ _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 = _tmp3_;
+#line 191 "/home/jens/Source/shotwell/src/util/misc.vala"
while (TRUE) {
-#line 1709 "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 200 "/home/jens/Source/shotwell/src/util/misc.vala"
- _tmp6_ = _current_media_it;
-#line 200 "/home/jens/Source/shotwell/src/util/misc.vala"
- _tmp7_ = gee_iterator_next (_tmp6_);
-#line 200 "/home/jens/Source/shotwell/src/util/misc.vala"
- if (!_tmp7_) {
-#line 200 "/home/jens/Source/shotwell/src/util/misc.vala"
+ 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"
+ _tmp4_ = _current_media_it;
+#line 191 "/home/jens/Source/shotwell/src/util/misc.vala"
+ if (!gee_iterator_next (_tmp4_)) {
+#line 191 "/home/jens/Source/shotwell/src/util/misc.vala"
break;
-#line 1731 "misc.c"
+#line 1580 "misc.c"
}
-#line 200 "/home/jens/Source/shotwell/src/util/misc.vala"
- _tmp8_ = _current_media_it;
-#line 200 "/home/jens/Source/shotwell/src/util/misc.vala"
- _tmp9_ = gee_iterator_get (_tmp8_);
-#line 200 "/home/jens/Source/shotwell/src/util/misc.vala"
- current_media = (MediaSource*) _tmp9_;
-#line 201 "/home/jens/Source/shotwell/src/util/misc.vala"
- _tmp10_ = atoms;
-#line 201 "/home/jens/Source/shotwell/src/util/misc.vala"
- _tmp10__length1 = atoms_length1;
-#line 201 "/home/jens/Source/shotwell/src/util/misc.vala"
- _tmp11_ = ctr;
-#line 201 "/home/jens/Source/shotwell/src/util/misc.vala"
- ctr = _tmp11_ + 1;
-#line 201 "/home/jens/Source/shotwell/src/util/misc.vala"
- _tmp12_ = current_media;
-#line 201 "/home/jens/Source/shotwell/src/util/misc.vala"
- _tmp13_ = data_source_get_source_id (G_TYPE_CHECK_INSTANCE_CAST (_tmp12_, TYPE_DATA_SOURCE, DataSource));
-#line 201 "/home/jens/Source/shotwell/src/util/misc.vala"
- _tmp14_ = _tmp13_;
-#line 201 "/home/jens/Source/shotwell/src/util/misc.vala"
- _tmp15_ = gdk_atom_intern (_tmp14_, FALSE);
-#line 201 "/home/jens/Source/shotwell/src/util/misc.vala"
- _tmp10_[_tmp11_] = _tmp15_;
-#line 201 "/home/jens/Source/shotwell/src/util/misc.vala"
- _tmp16_ = _tmp10_[_tmp11_];
-#line 201 "/home/jens/Source/shotwell/src/util/misc.vala"
- _g_free0 (_tmp14_);
-#line 200 "/home/jens/Source/shotwell/src/util/misc.vala"
+#line 191 "/home/jens/Source/shotwell/src/util/misc.vala"
+ _tmp5_ = _current_media_it;
+#line 191 "/home/jens/Source/shotwell/src/util/misc.vala"
+ _tmp6_ = gee_iterator_get (_tmp5_);
+#line 191 "/home/jens/Source/shotwell/src/util/misc.vala"
+ current_media = (MediaSource*) _tmp6_;
+#line 192 "/home/jens/Source/shotwell/src/util/misc.vala"
+ _tmp7_ = atoms;
+#line 192 "/home/jens/Source/shotwell/src/util/misc.vala"
+ _tmp7__length1 = atoms_length1;
+#line 192 "/home/jens/Source/shotwell/src/util/misc.vala"
+ _tmp8_ = ctr;
+#line 192 "/home/jens/Source/shotwell/src/util/misc.vala"
+ ctr = _tmp8_ + 1;
+#line 192 "/home/jens/Source/shotwell/src/util/misc.vala"
+ _tmp9_ = current_media;
+#line 192 "/home/jens/Source/shotwell/src/util/misc.vala"
+ _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"
+ _tmp11_ = _tmp10_;
+#line 192 "/home/jens/Source/shotwell/src/util/misc.vala"
+ _tmp7_[_tmp8_] = gdk_atom_intern (_tmp11_, FALSE);
+#line 192 "/home/jens/Source/shotwell/src/util/misc.vala"
+ _tmp12_ = _tmp7_[_tmp8_];
+#line 192 "/home/jens/Source/shotwell/src/util/misc.vala"
+ _g_free0 (_tmp11_);
+#line 191 "/home/jens/Source/shotwell/src/util/misc.vala"
_g_object_unref0 (current_media);
-#line 1763 "misc.c"
+#line 1610 "misc.c"
}
-#line 200 "/home/jens/Source/shotwell/src/util/misc.vala"
+#line 191 "/home/jens/Source/shotwell/src/util/misc.vala"
_g_object_unref0 (_current_media_it);
-#line 1767 "misc.c"
+#line 1614 "misc.c"
}
-#line 203 "/home/jens/Source/shotwell/src/util/misc.vala"
- _tmp17_ = media;
-#line 203 "/home/jens/Source/shotwell/src/util/misc.vala"
- _tmp18_ = gee_collection_get_size (_tmp17_);
-#line 203 "/home/jens/Source/shotwell/src/util/misc.vala"
- _tmp19_ = _tmp18_;
-#line 203 "/home/jens/Source/shotwell/src/util/misc.vala"
- bytes = (gsize) (_tmp19_ * sizeof (GdkAtom));
-#line 204 "/home/jens/Source/shotwell/src/util/misc.vala"
- _tmp20_ = g_new0 (guchar, bytes);
-#line 204 "/home/jens/Source/shotwell/src/util/misc.vala"
- serialized = _tmp20_;
-#line 204 "/home/jens/Source/shotwell/src/util/misc.vala"
+#line 194 "/home/jens/Source/shotwell/src/util/misc.vala"
+ _tmp13_ = gee_collection_get_size (media);
+#line 194 "/home/jens/Source/shotwell/src/util/misc.vala"
+ _tmp14_ = _tmp13_;
+#line 194 "/home/jens/Source/shotwell/src/util/misc.vala"
+ bytes = (gsize) (_tmp14_ * sizeof (GdkAtom));
+#line 195 "/home/jens/Source/shotwell/src/util/misc.vala"
+ _tmp15_ = g_new0 (guchar, bytes);
+#line 195 "/home/jens/Source/shotwell/src/util/misc.vala"
+ serialized = _tmp15_;
+#line 195 "/home/jens/Source/shotwell/src/util/misc.vala"
serialized_length1 = bytes;
-#line 204 "/home/jens/Source/shotwell/src/util/misc.vala"
+#line 195 "/home/jens/Source/shotwell/src/util/misc.vala"
_serialized_size_ = serialized_length1;
-#line 205 "/home/jens/Source/shotwell/src/util/misc.vala"
- _tmp21_ = atoms;
-#line 205 "/home/jens/Source/shotwell/src/util/misc.vala"
- _tmp21__length1 = atoms_length1;
-#line 205 "/home/jens/Source/shotwell/src/util/misc.vala"
- memcpy (serialized, _tmp21_, bytes);
-#line 207 "/home/jens/Source/shotwell/src/util/misc.vala"
- _tmp22_ = serialized;
-#line 207 "/home/jens/Source/shotwell/src/util/misc.vala"
- _tmp22__length1 = serialized_length1;
-#line 207 "/home/jens/Source/shotwell/src/util/misc.vala"
+#line 196 "/home/jens/Source/shotwell/src/util/misc.vala"
+ _tmp16_ = atoms;
+#line 196 "/home/jens/Source/shotwell/src/util/misc.vala"
+ _tmp16__length1 = atoms_length1;
+#line 196 "/home/jens/Source/shotwell/src/util/misc.vala"
+ memcpy (serialized, _tmp16_, bytes);
+#line 198 "/home/jens/Source/shotwell/src/util/misc.vala"
+ _tmp17_ = serialized;
+#line 198 "/home/jens/Source/shotwell/src/util/misc.vala"
+ _tmp17__length1 = serialized_length1;
+#line 198 "/home/jens/Source/shotwell/src/util/misc.vala"
if (result_length1) {
-#line 207 "/home/jens/Source/shotwell/src/util/misc.vala"
- *result_length1 = _tmp22__length1;
-#line 1799 "misc.c"
+#line 198 "/home/jens/Source/shotwell/src/util/misc.vala"
+ *result_length1 = _tmp17__length1;
+#line 1644 "misc.c"
}
-#line 207 "/home/jens/Source/shotwell/src/util/misc.vala"
- result = _tmp22_;
-#line 207 "/home/jens/Source/shotwell/src/util/misc.vala"
+#line 198 "/home/jens/Source/shotwell/src/util/misc.vala"
+ result = _tmp17_;
+#line 198 "/home/jens/Source/shotwell/src/util/misc.vala"
atoms = (g_free (atoms), NULL);
-#line 207 "/home/jens/Source/shotwell/src/util/misc.vala"
+#line 198 "/home/jens/Source/shotwell/src/util/misc.vala"
return result;
-#line 1807 "misc.c"
+#line 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 211 "/home/jens/Source/shotwell/src/util/misc.vala"
- _tmp0_ = size;
-#line 211 "/home/jens/Source/shotwell/src/util/misc.vala"
- count = (gsize) (_tmp0_ / sizeof (GdkAtom));
-#line 212 "/home/jens/Source/shotwell/src/util/misc.vala"
- _tmp2_ = count;
-#line 212 "/home/jens/Source/shotwell/src/util/misc.vala"
- if (_tmp2_ <= ((gsize) 0)) {
-#line 212 "/home/jens/Source/shotwell/src/util/misc.vala"
- _tmp1_ = TRUE;
-#line 1840 "misc.c"
+#line 202 "/home/jens/Source/shotwell/src/util/misc.vala"
+ count = (gsize) (size / sizeof (GdkAtom));
+#line 203 "/home/jens/Source/shotwell/src/util/misc.vala"
+ _tmp1_ = count;
+#line 203 "/home/jens/Source/shotwell/src/util/misc.vala"
+ if (_tmp1_ <= ((gsize) 0)) {
+#line 203 "/home/jens/Source/shotwell/src/util/misc.vala"
+ _tmp0_ = TRUE;
+#line 1683 "misc.c"
} else {
- guchar* _tmp3_;
-#line 212 "/home/jens/Source/shotwell/src/util/misc.vala"
- _tmp3_ = serialized;
-#line 212 "/home/jens/Source/shotwell/src/util/misc.vala"
- _tmp1_ = _tmp3_ == NULL;
-#line 1847 "misc.c"
+#line 203 "/home/jens/Source/shotwell/src/util/misc.vala"
+ _tmp0_ = serialized == NULL;
+#line 1687 "misc.c"
}
-#line 212 "/home/jens/Source/shotwell/src/util/misc.vala"
- if (_tmp1_) {
-#line 213 "/home/jens/Source/shotwell/src/util/misc.vala"
+#line 203 "/home/jens/Source/shotwell/src/util/misc.vala"
+ if (_tmp0_) {
+#line 204 "/home/jens/Source/shotwell/src/util/misc.vala"
result = NULL;
-#line 213 "/home/jens/Source/shotwell/src/util/misc.vala"
+#line 204 "/home/jens/Source/shotwell/src/util/misc.vala"
return result;
-#line 1855 "misc.c"
- }
-#line 215 "/home/jens/Source/shotwell/src/util/misc.vala"
- _tmp4_ = count;
-#line 215 "/home/jens/Source/shotwell/src/util/misc.vala"
- _tmp5_ = g_new0 (GdkAtom, _tmp4_);
-#line 215 "/home/jens/Source/shotwell/src/util/misc.vala"
- atoms = _tmp5_;
-#line 215 "/home/jens/Source/shotwell/src/util/misc.vala"
- atoms_length1 = _tmp4_;
-#line 215 "/home/jens/Source/shotwell/src/util/misc.vala"
+#line 1695 "misc.c"
+ }
+#line 206 "/home/jens/Source/shotwell/src/util/misc.vala"
+ _tmp2_ = count;
+#line 206 "/home/jens/Source/shotwell/src/util/misc.vala"
+ _tmp3_ = g_new0 (GdkAtom, _tmp2_);
+#line 206 "/home/jens/Source/shotwell/src/util/misc.vala"
+ atoms = _tmp3_;
+#line 206 "/home/jens/Source/shotwell/src/util/misc.vala"
+ atoms_length1 = _tmp2_;
+#line 206 "/home/jens/Source/shotwell/src/util/misc.vala"
_atoms_size_ = atoms_length1;
-#line 216 "/home/jens/Source/shotwell/src/util/misc.vala"
+#line 207 "/home/jens/Source/shotwell/src/util/misc.vala"
+ _tmp4_ = atoms;
+#line 207 "/home/jens/Source/shotwell/src/util/misc.vala"
+ _tmp4__length1 = atoms_length1;
+#line 207 "/home/jens/Source/shotwell/src/util/misc.vala"
+ memcpy (_tmp4_, serialized, (gsize) size);
+#line 209 "/home/jens/Source/shotwell/src/util/misc.vala"
+ _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 = _tmp5_;
+#line 210 "/home/jens/Source/shotwell/src/util/misc.vala"
_tmp6_ = atoms;
-#line 216 "/home/jens/Source/shotwell/src/util/misc.vala"
+#line 210 "/home/jens/Source/shotwell/src/util/misc.vala"
_tmp6__length1 = atoms_length1;
-#line 216 "/home/jens/Source/shotwell/src/util/misc.vala"
- _tmp7_ = serialized;
-#line 216 "/home/jens/Source/shotwell/src/util/misc.vala"
- _tmp8_ = size;
-#line 216 "/home/jens/Source/shotwell/src/util/misc.vala"
- memcpy (_tmp6_, _tmp7_, (gsize) _tmp8_);
-#line 218 "/home/jens/Source/shotwell/src/util/misc.vala"
- _tmp9_ = gee_array_list_new (TYPE_MEDIA_SOURCE, (GBoxedCopyFunc) g_object_ref, (GDestroyNotify) g_object_unref, NULL, NULL, NULL);
-#line 218 "/home/jens/Source/shotwell/src/util/misc.vala"
- list = _tmp9_;
-#line 219 "/home/jens/Source/shotwell/src/util/misc.vala"
- _tmp10_ = atoms;
-#line 219 "/home/jens/Source/shotwell/src/util/misc.vala"
- _tmp10__length1 = atoms_length1;
-#line 1885 "misc.c"
+#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 219 "/home/jens/Source/shotwell/src/util/misc.vala"
- current_atom_collection = _tmp10_;
-#line 219 "/home/jens/Source/shotwell/src/util/misc.vala"
- current_atom_collection_length1 = _tmp10__length1;
-#line 219 "/home/jens/Source/shotwell/src/util/misc.vala"
- for (current_atom_it = 0; current_atom_it < _tmp10__length1; current_atom_it = current_atom_it + 1) {
-#line 1897 "misc.c"
+#line 210 "/home/jens/Source/shotwell/src/util/misc.vala"
+ current_atom_collection = _tmp6_;
+#line 210 "/home/jens/Source/shotwell/src/util/misc.vala"
+ current_atom_collection_length1 = _tmp6__length1;
+#line 210 "/home/jens/Source/shotwell/src/util/misc.vala"
+ 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 219 "/home/jens/Source/shotwell/src/util/misc.vala"
+#line 210 "/home/jens/Source/shotwell/src/util/misc.vala"
current_atom = current_atom_collection[current_atom_it];
-#line 1901 "misc.c"
+#line 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 220 "/home/jens/Source/shotwell/src/util/misc.vala"
- _tmp11_ = media_collection_registry_get_instance ();
-#line 220 "/home/jens/Source/shotwell/src/util/misc.vala"
- _tmp12_ = _tmp11_;
-#line 220 "/home/jens/Source/shotwell/src/util/misc.vala"
- _tmp13_ = current_atom;
-#line 220 "/home/jens/Source/shotwell/src/util/misc.vala"
- _tmp14_ = gdk_atom_name (_tmp13_);
-#line 220 "/home/jens/Source/shotwell/src/util/misc.vala"
- _tmp15_ = _tmp14_;
-#line 220 "/home/jens/Source/shotwell/src/util/misc.vala"
- _tmp16_ = media_collection_registry_fetch_media (_tmp12_, _tmp15_);
-#line 220 "/home/jens/Source/shotwell/src/util/misc.vala"
- _tmp17_ = _tmp16_;
-#line 220 "/home/jens/Source/shotwell/src/util/misc.vala"
- _g_free0 (_tmp15_);
-#line 220 "/home/jens/Source/shotwell/src/util/misc.vala"
- _media_collection_registry_unref0 (_tmp12_);
-#line 220 "/home/jens/Source/shotwell/src/util/misc.vala"
- media = _tmp17_;
-#line 221 "/home/jens/Source/shotwell/src/util/misc.vala"
- _tmp18_ = media;
-#line 221 "/home/jens/Source/shotwell/src/util/misc.vala"
- _vala_assert (_tmp18_ != NULL, "media != null");
-#line 222 "/home/jens/Source/shotwell/src/util/misc.vala"
- _tmp19_ = list;
-#line 222 "/home/jens/Source/shotwell/src/util/misc.vala"
- _tmp20_ = media;
-#line 222 "/home/jens/Source/shotwell/src/util/misc.vala"
- gee_abstract_collection_add (G_TYPE_CHECK_INSTANCE_CAST (_tmp19_, GEE_TYPE_ABSTRACT_COLLECTION, GeeAbstractCollection), _tmp20_);
-#line 219 "/home/jens/Source/shotwell/src/util/misc.vala"
+#line 211 "/home/jens/Source/shotwell/src/util/misc.vala"
+ _tmp7_ = media_collection_registry_get_instance ();
+#line 211 "/home/jens/Source/shotwell/src/util/misc.vala"
+ _tmp8_ = _tmp7_;
+#line 211 "/home/jens/Source/shotwell/src/util/misc.vala"
+ _tmp9_ = current_atom;
+#line 211 "/home/jens/Source/shotwell/src/util/misc.vala"
+ _tmp10_ = gdk_atom_name (_tmp9_);
+#line 211 "/home/jens/Source/shotwell/src/util/misc.vala"
+ _tmp11_ = _tmp10_;
+#line 211 "/home/jens/Source/shotwell/src/util/misc.vala"
+ _tmp12_ = media_collection_registry_fetch_media (_tmp8_, _tmp11_);
+#line 211 "/home/jens/Source/shotwell/src/util/misc.vala"
+ _tmp13_ = _tmp12_;
+#line 211 "/home/jens/Source/shotwell/src/util/misc.vala"
+ _g_free0 (_tmp11_);
+#line 211 "/home/jens/Source/shotwell/src/util/misc.vala"
+ _media_collection_registry_unref0 (_tmp8_);
+#line 211 "/home/jens/Source/shotwell/src/util/misc.vala"
+ media = _tmp13_;
+#line 212 "/home/jens/Source/shotwell/src/util/misc.vala"
+ _tmp14_ = media;
+#line 212 "/home/jens/Source/shotwell/src/util/misc.vala"
+ _vala_assert (_tmp14_ != NULL, "media != null");
+#line 213 "/home/jens/Source/shotwell/src/util/misc.vala"
+ _tmp15_ = list;
+#line 213 "/home/jens/Source/shotwell/src/util/misc.vala"
+ _tmp16_ = media;
+#line 213 "/home/jens/Source/shotwell/src/util/misc.vala"
+ 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 1946 "misc.c"
+#line 1782 "misc.c"
}
}
}
-#line 225 "/home/jens/Source/shotwell/src/util/misc.vala"
+#line 216 "/home/jens/Source/shotwell/src/util/misc.vala"
result = G_TYPE_CHECK_INSTANCE_CAST (list, GEE_TYPE_LIST, GeeList);
-#line 225 "/home/jens/Source/shotwell/src/util/misc.vala"
+#line 216 "/home/jens/Source/shotwell/src/util/misc.vala"
atoms = (g_free (atoms), NULL);
-#line 225 "/home/jens/Source/shotwell/src/util/misc.vala"
+#line 216 "/home/jens/Source/shotwell/src/util/misc.vala"
return result;
-#line 1956 "misc.c"
+#line 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_;
@@ -1964,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 2002 "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;
@@ -2020,148 +1859,150 @@ gchar* format_local_datespan (struct tm* from_date, struct tm* to_date) {
gchar* _tmp26_;
gchar* _tmp27_;
gchar* _tmp28_;
-#line 228 "/home/jens/Source/shotwell/src/util/misc.vala"
+#line 219 "/home/jens/Source/shotwell/src/util/misc.vala"
g_return_val_if_fail (from_date != NULL, NULL);
-#line 228 "/home/jens/Source/shotwell/src/util/misc.vala"
+#line 219 "/home/jens/Source/shotwell/src/util/misc.vala"
g_return_val_if_fail (to_date != NULL, NULL);
-#line 233 "/home/jens/Source/shotwell/src/util/misc.vala"
+#line 224 "/home/jens/Source/shotwell/src/util/misc.vala"
_tmp0_ = *from_date;
-#line 233 "/home/jens/Source/shotwell/src/util/misc.vala"
+#line 224 "/home/jens/Source/shotwell/src/util/misc.vala"
_tmp1_ = _tmp0_.tm_year;
-#line 233 "/home/jens/Source/shotwell/src/util/misc.vala"
+#line 224 "/home/jens/Source/shotwell/src/util/misc.vala"
_tmp2_ = *to_date;
-#line 233 "/home/jens/Source/shotwell/src/util/misc.vala"
+#line 224 "/home/jens/Source/shotwell/src/util/misc.vala"
_tmp3_ = _tmp2_.tm_year;
-#line 233 "/home/jens/Source/shotwell/src/util/misc.vala"
+#line 224 "/home/jens/Source/shotwell/src/util/misc.vala"
if (_tmp1_ == _tmp3_) {
-#line 2038 "misc.c"
+#line 1877 "misc.c"
gboolean _tmp4_ = FALSE;
struct tm _tmp5_;
gint _tmp6_;
struct tm _tmp7_;
gint _tmp8_;
-#line 235 "/home/jens/Source/shotwell/src/util/misc.vala"
+#line 226 "/home/jens/Source/shotwell/src/util/misc.vala"
_tmp5_ = *from_date;
-#line 235 "/home/jens/Source/shotwell/src/util/misc.vala"
+#line 226 "/home/jens/Source/shotwell/src/util/misc.vala"
_tmp6_ = _tmp5_.tm_mon;
-#line 235 "/home/jens/Source/shotwell/src/util/misc.vala"
+#line 226 "/home/jens/Source/shotwell/src/util/misc.vala"
_tmp7_ = *to_date;
-#line 235 "/home/jens/Source/shotwell/src/util/misc.vala"
+#line 226 "/home/jens/Source/shotwell/src/util/misc.vala"
_tmp8_ = _tmp7_.tm_mon;
-#line 235 "/home/jens/Source/shotwell/src/util/misc.vala"
+#line 226 "/home/jens/Source/shotwell/src/util/misc.vala"
if (_tmp6_ == _tmp8_) {
-#line 2054 "misc.c"
+#line 1893 "misc.c"
struct tm _tmp9_;
gint _tmp10_;
struct tm _tmp11_;
gint _tmp12_;
-#line 235 "/home/jens/Source/shotwell/src/util/misc.vala"
+#line 226 "/home/jens/Source/shotwell/src/util/misc.vala"
_tmp9_ = *from_date;
-#line 235 "/home/jens/Source/shotwell/src/util/misc.vala"
+#line 226 "/home/jens/Source/shotwell/src/util/misc.vala"
_tmp10_ = _tmp9_.tm_mday;
-#line 235 "/home/jens/Source/shotwell/src/util/misc.vala"
+#line 226 "/home/jens/Source/shotwell/src/util/misc.vala"
_tmp11_ = *to_date;
-#line 235 "/home/jens/Source/shotwell/src/util/misc.vala"
+#line 226 "/home/jens/Source/shotwell/src/util/misc.vala"
_tmp12_ = _tmp11_.tm_mday;
-#line 235 "/home/jens/Source/shotwell/src/util/misc.vala"
+#line 226 "/home/jens/Source/shotwell/src/util/misc.vala"
_tmp4_ = _tmp10_ == (_tmp12_ - 1);
-#line 2069 "misc.c"
+#line 1908 "misc.c"
} else {
-#line 235 "/home/jens/Source/shotwell/src/util/misc.vala"
+#line 226 "/home/jens/Source/shotwell/src/util/misc.vala"
_tmp4_ = FALSE;
-#line 2073 "misc.c"
+#line 1912 "misc.c"
}
-#line 235 "/home/jens/Source/shotwell/src/util/misc.vala"
+#line 226 "/home/jens/Source/shotwell/src/util/misc.vala"
if (_tmp4_) {
-#line 2077 "misc.c"
+#line 1916 "misc.c"
gchar* _tmp13_;
gchar* _tmp14_;
-#line 237 "/home/jens/Source/shotwell/src/util/misc.vala"
+#line 228 "/home/jens/Source/shotwell/src/util/misc.vala"
_tmp13_ = resources_get_start_multiday_span_format_string ();
-#line 237 "/home/jens/Source/shotwell/src/util/misc.vala"
+#line 228 "/home/jens/Source/shotwell/src/util/misc.vala"
_g_free0 (from_format);
-#line 237 "/home/jens/Source/shotwell/src/util/misc.vala"
+#line 228 "/home/jens/Source/shotwell/src/util/misc.vala"
from_format = _tmp13_;
-#line 238 "/home/jens/Source/shotwell/src/util/misc.vala"
+#line 229 "/home/jens/Source/shotwell/src/util/misc.vala"
_tmp14_ = resources_get_end_multiday_span_format_string ();
-#line 238 "/home/jens/Source/shotwell/src/util/misc.vala"
+#line 229 "/home/jens/Source/shotwell/src/util/misc.vala"
_g_free0 (to_format);
-#line 238 "/home/jens/Source/shotwell/src/util/misc.vala"
+#line 229 "/home/jens/Source/shotwell/src/util/misc.vala"
to_format = _tmp14_;
-#line 2092 "misc.c"
+#line 1931 "misc.c"
} else {
gchar* _tmp15_;
gchar* _tmp16_;
-#line 242 "/home/jens/Source/shotwell/src/util/misc.vala"
+#line 233 "/home/jens/Source/shotwell/src/util/misc.vala"
_tmp15_ = resources_get_start_multimonth_span_format_string ();
-#line 242 "/home/jens/Source/shotwell/src/util/misc.vala"
+#line 233 "/home/jens/Source/shotwell/src/util/misc.vala"
_g_free0 (from_format);
-#line 242 "/home/jens/Source/shotwell/src/util/misc.vala"
+#line 233 "/home/jens/Source/shotwell/src/util/misc.vala"
from_format = _tmp15_;
-#line 243 "/home/jens/Source/shotwell/src/util/misc.vala"
+#line 234 "/home/jens/Source/shotwell/src/util/misc.vala"
_tmp16_ = resources_get_end_multimonth_span_format_string ();
-#line 243 "/home/jens/Source/shotwell/src/util/misc.vala"
+#line 234 "/home/jens/Source/shotwell/src/util/misc.vala"
_g_free0 (to_format);
-#line 243 "/home/jens/Source/shotwell/src/util/misc.vala"
+#line 234 "/home/jens/Source/shotwell/src/util/misc.vala"
to_format = _tmp16_;
-#line 2108 "misc.c"
+#line 1947 "misc.c"
}
} else {
gchar* _tmp17_;
gchar* _tmp18_;
-#line 248 "/home/jens/Source/shotwell/src/util/misc.vala"
+#line 239 "/home/jens/Source/shotwell/src/util/misc.vala"
_tmp17_ = resources_get_long_date_format_string ();
-#line 248 "/home/jens/Source/shotwell/src/util/misc.vala"
+#line 239 "/home/jens/Source/shotwell/src/util/misc.vala"
_g_free0 (from_format);
-#line 248 "/home/jens/Source/shotwell/src/util/misc.vala"
+#line 239 "/home/jens/Source/shotwell/src/util/misc.vala"
from_format = _tmp17_;
-#line 249 "/home/jens/Source/shotwell/src/util/misc.vala"
+#line 240 "/home/jens/Source/shotwell/src/util/misc.vala"
_tmp18_ = resources_get_long_date_format_string ();
-#line 249 "/home/jens/Source/shotwell/src/util/misc.vala"
+#line 240 "/home/jens/Source/shotwell/src/util/misc.vala"
_g_free0 (to_format);
-#line 249 "/home/jens/Source/shotwell/src/util/misc.vala"
+#line 240 "/home/jens/Source/shotwell/src/util/misc.vala"
to_format = _tmp18_;
-#line 2125 "misc.c"
+#line 1964 "misc.c"
}
-#line 252 "/home/jens/Source/shotwell/src/util/misc.vala"
+#line 243 "/home/jens/Source/shotwell/src/util/misc.vala"
_tmp19_ = from_format;
-#line 252 "/home/jens/Source/shotwell/src/util/misc.vala"
+#line 243 "/home/jens/Source/shotwell/src/util/misc.vala"
_tmp20_ = g_time_format (from_date, _tmp19_);
-#line 252 "/home/jens/Source/shotwell/src/util/misc.vala"
+#line 243 "/home/jens/Source/shotwell/src/util/misc.vala"
_tmp21_ = _tmp20_;
-#line 252 "/home/jens/Source/shotwell/src/util/misc.vala"
+#line 243 "/home/jens/Source/shotwell/src/util/misc.vala"
_tmp22_ = to_format;
-#line 252 "/home/jens/Source/shotwell/src/util/misc.vala"
+#line 243 "/home/jens/Source/shotwell/src/util/misc.vala"
_tmp23_ = g_time_format (to_date, _tmp22_);
-#line 252 "/home/jens/Source/shotwell/src/util/misc.vala"
+#line 243 "/home/jens/Source/shotwell/src/util/misc.vala"
_tmp24_ = _tmp23_;
-#line 252 "/home/jens/Source/shotwell/src/util/misc.vala"
+#line 243 "/home/jens/Source/shotwell/src/util/misc.vala"
_tmp25_ = g_strdup_printf ("%s - %s", _tmp21_, _tmp24_);
-#line 252 "/home/jens/Source/shotwell/src/util/misc.vala"
+#line 243 "/home/jens/Source/shotwell/src/util/misc.vala"
_tmp26_ = _tmp25_;
-#line 252 "/home/jens/Source/shotwell/src/util/misc.vala"
+#line 243 "/home/jens/Source/shotwell/src/util/misc.vala"
_tmp27_ = string_strip_leading_zeroes (_tmp26_);
-#line 252 "/home/jens/Source/shotwell/src/util/misc.vala"
+#line 243 "/home/jens/Source/shotwell/src/util/misc.vala"
_tmp28_ = _tmp27_;
-#line 252 "/home/jens/Source/shotwell/src/util/misc.vala"
+#line 243 "/home/jens/Source/shotwell/src/util/misc.vala"
_g_free0 (_tmp26_);
-#line 252 "/home/jens/Source/shotwell/src/util/misc.vala"
+#line 243 "/home/jens/Source/shotwell/src/util/misc.vala"
_g_free0 (_tmp24_);
-#line 252 "/home/jens/Source/shotwell/src/util/misc.vala"
+#line 243 "/home/jens/Source/shotwell/src/util/misc.vala"
_g_free0 (_tmp21_);
-#line 252 "/home/jens/Source/shotwell/src/util/misc.vala"
+#line 243 "/home/jens/Source/shotwell/src/util/misc.vala"
result = _tmp28_;
-#line 252 "/home/jens/Source/shotwell/src/util/misc.vala"
+#line 243 "/home/jens/Source/shotwell/src/util/misc.vala"
_g_free0 (to_format);
-#line 252 "/home/jens/Source/shotwell/src/util/misc.vala"
+#line 243 "/home/jens/Source/shotwell/src/util/misc.vala"
_g_free0 (from_format);
-#line 252 "/home/jens/Source/shotwell/src/util/misc.vala"
+#line 243 "/home/jens/Source/shotwell/src/util/misc.vala"
return result;
-#line 2161 "misc.c"
+#line 2000 "misc.c"
}
-gchar* format_local_date (struct tm* date) {
+gchar*
+format_local_date (struct tm* date)
+{
gchar* result = NULL;
gchar* _tmp0_;
gchar* _tmp1_;
@@ -2169,458 +2010,495 @@ gchar* format_local_date (struct tm* date) {
gchar* _tmp3_;
gchar* _tmp4_;
gchar* _tmp5_;
-#line 256 "/home/jens/Source/shotwell/src/util/misc.vala"
+#line 247 "/home/jens/Source/shotwell/src/util/misc.vala"
g_return_val_if_fail (date != NULL, NULL);
-#line 257 "/home/jens/Source/shotwell/src/util/misc.vala"
+#line 248 "/home/jens/Source/shotwell/src/util/misc.vala"
_tmp0_ = resources_get_long_date_format_string ();
-#line 257 "/home/jens/Source/shotwell/src/util/misc.vala"
+#line 248 "/home/jens/Source/shotwell/src/util/misc.vala"
_tmp1_ = _tmp0_;
-#line 257 "/home/jens/Source/shotwell/src/util/misc.vala"
+#line 248 "/home/jens/Source/shotwell/src/util/misc.vala"
_tmp2_ = g_time_format (date, _tmp1_);
-#line 257 "/home/jens/Source/shotwell/src/util/misc.vala"
+#line 248 "/home/jens/Source/shotwell/src/util/misc.vala"
_tmp3_ = _tmp2_;
-#line 257 "/home/jens/Source/shotwell/src/util/misc.vala"
+#line 248 "/home/jens/Source/shotwell/src/util/misc.vala"
_tmp4_ = string_strip_leading_zeroes (_tmp3_);
-#line 257 "/home/jens/Source/shotwell/src/util/misc.vala"
+#line 248 "/home/jens/Source/shotwell/src/util/misc.vala"
_tmp5_ = _tmp4_;
-#line 257 "/home/jens/Source/shotwell/src/util/misc.vala"
+#line 248 "/home/jens/Source/shotwell/src/util/misc.vala"
_g_free0 (_tmp3_);
-#line 257 "/home/jens/Source/shotwell/src/util/misc.vala"
+#line 248 "/home/jens/Source/shotwell/src/util/misc.vala"
_g_free0 (_tmp1_);
-#line 257 "/home/jens/Source/shotwell/src/util/misc.vala"
+#line 248 "/home/jens/Source/shotwell/src/util/misc.vala"
result = _tmp5_;
-#line 257 "/home/jens/Source/shotwell/src/util/misc.vala"
+#line 248 "/home/jens/Source/shotwell/src/util/misc.vala"
return result;
-#line 2195 "misc.c"
+#line 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;
-#line 267 "/home/jens/Source/shotwell/src/util/misc.vala"
+ gchar* _tmp0_;
+#line 258 "/home/jens/Source/shotwell/src/util/misc.vala"
g_return_val_if_fail (name != NULL, NULL);
-#line 267 "/home/jens/Source/shotwell/src/util/misc.vala"
+#line 258 "/home/jens/Source/shotwell/src/util/misc.vala"
self = (OneShotScheduler*) g_type_create_instance (object_type);
-#line 268 "/home/jens/Source/shotwell/src/util/misc.vala"
- _tmp0_ = name;
-#line 268 "/home/jens/Source/shotwell/src/util/misc.vala"
- _tmp1_ = g_strdup (_tmp0_);
-#line 268 "/home/jens/Source/shotwell/src/util/misc.vala"
+#line 259 "/home/jens/Source/shotwell/src/util/misc.vala"
+ _tmp0_ = g_strdup (name);
+#line 259 "/home/jens/Source/shotwell/src/util/misc.vala"
_g_free0 (self->priv->name);
-#line 268 "/home/jens/Source/shotwell/src/util/misc.vala"
- self->priv->name = _tmp1_;
-#line 269 "/home/jens/Source/shotwell/src/util/misc.vala"
- _tmp2_ = callback;
-#line 269 "/home/jens/Source/shotwell/src/util/misc.vala"
- _tmp2__target = callback_target;
-#line 269 "/home/jens/Source/shotwell/src/util/misc.vala"
- self->priv->callback = _tmp2_;
-#line 269 "/home/jens/Source/shotwell/src/util/misc.vala"
- self->priv->callback_target = _tmp2__target;
-#line 267 "/home/jens/Source/shotwell/src/util/misc.vala"
+#line 259 "/home/jens/Source/shotwell/src/util/misc.vala"
+ self->priv->name = _tmp0_;
+#line 260 "/home/jens/Source/shotwell/src/util/misc.vala"
+ self->priv->callback = callback;
+#line 260 "/home/jens/Source/shotwell/src/util/misc.vala"
+ self->priv->callback_target = callback_target;
+#line 258 "/home/jens/Source/shotwell/src/util/misc.vala"
return self;
-#line 2227 "misc.c"
+#line 2064 "misc.c"
}
-OneShotScheduler* one_shot_scheduler_new (const gchar* name, OneShotCallback callback, void* callback_target) {
-#line 267 "/home/jens/Source/shotwell/src/util/misc.vala"
+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 2234 "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 280 "/home/jens/Source/shotwell/src/util/misc.vala"
+#line 271 "/home/jens/Source/shotwell/src/util/misc.vala"
g_return_val_if_fail (IS_ONE_SHOT_SCHEDULER (self), FALSE);
-#line 281 "/home/jens/Source/shotwell/src/util/misc.vala"
+#line 272 "/home/jens/Source/shotwell/src/util/misc.vala"
_tmp0_ = self->priv->scheduled;
-#line 281 "/home/jens/Source/shotwell/src/util/misc.vala"
+#line 272 "/home/jens/Source/shotwell/src/util/misc.vala"
result = _tmp0_ != ((guint) 0);
-#line 281 "/home/jens/Source/shotwell/src/util/misc.vala"
+#line 272 "/home/jens/Source/shotwell/src/util/misc.vala"
return result;
-#line 2249 "misc.c"
+#line 2092 "misc.c"
}
-void one_shot_scheduler_at_idle (OneShotScheduler* self) {
-#line 284 "/home/jens/Source/shotwell/src/util/misc.vala"
+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 285 "/home/jens/Source/shotwell/src/util/misc.vala"
+#line 276 "/home/jens/Source/shotwell/src/util/misc.vala"
one_shot_scheduler_at_priority_idle (self, G_PRIORITY_DEFAULT_IDLE);
-#line 2258 "misc.c"
+#line 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 290 "/home/jens/Source/shotwell/src/util/misc.vala"
+#line 281 "/home/jens/Source/shotwell/src/util/misc.vala"
return result;
-#line 2267 "misc.c"
+#line 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 288 "/home/jens/Source/shotwell/src/util/misc.vala"
+#line 279 "/home/jens/Source/shotwell/src/util/misc.vala"
g_return_if_fail (IS_ONE_SHOT_SCHEDULER (self));
-#line 289 "/home/jens/Source/shotwell/src/util/misc.vala"
+#line 280 "/home/jens/Source/shotwell/src/util/misc.vala"
_tmp0_ = self->priv->scheduled;
-#line 289 "/home/jens/Source/shotwell/src/util/misc.vala"
+#line 280 "/home/jens/Source/shotwell/src/util/misc.vala"
if (_tmp0_ == ((guint) 0)) {
-#line 2279 "misc.c"
- gint _tmp1_;
- guint _tmp2_;
-#line 290 "/home/jens/Source/shotwell/src/util/misc.vala"
- _tmp1_ = priority;
-#line 290 "/home/jens/Source/shotwell/src/util/misc.vala"
- _tmp2_ = g_idle_add_full (_tmp1_, _one_shot_scheduler_callback_wrapper_gsource_func, one_shot_scheduler_ref (self), one_shot_scheduler_unref);
-#line 290 "/home/jens/Source/shotwell/src/util/misc.vala"
- self->priv->scheduled = _tmp2_;
-#line 2288 "misc.c"
+#line 281 "/home/jens/Source/shotwell/src/util/misc.vala"
+ 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_;
-#line 293 "/home/jens/Source/shotwell/src/util/misc.vala"
+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 294 "/home/jens/Source/shotwell/src/util/misc.vala"
- _tmp0_ = msec;
-#line 294 "/home/jens/Source/shotwell/src/util/misc.vala"
- _tmp1_ = reschedule;
-#line 294 "/home/jens/Source/shotwell/src/util/misc.vala"
- one_shot_scheduler_priority_after_timeout (self, G_PRIORITY_DEFAULT, _tmp0_, _tmp1_);
-#line 2304 "misc.c"
+#line 285 "/home/jens/Source/shotwell/src/util/misc.vala"
+ 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_;
-#line 297 "/home/jens/Source/shotwell/src/util/misc.vala"
+ guint _tmp2_;
+#line 288 "/home/jens/Source/shotwell/src/util/misc.vala"
g_return_if_fail (IS_ONE_SHOT_SCHEDULER (self));
-#line 298 "/home/jens/Source/shotwell/src/util/misc.vala"
+#line 289 "/home/jens/Source/shotwell/src/util/misc.vala"
_tmp1_ = self->priv->scheduled;
-#line 298 "/home/jens/Source/shotwell/src/util/misc.vala"
+#line 289 "/home/jens/Source/shotwell/src/util/misc.vala"
if (_tmp1_ != ((guint) 0)) {
-#line 2321 "misc.c"
- gboolean _tmp2_;
-#line 298 "/home/jens/Source/shotwell/src/util/misc.vala"
- _tmp2_ = reschedule;
-#line 298 "/home/jens/Source/shotwell/src/util/misc.vala"
- _tmp0_ = !_tmp2_;
-#line 2327 "misc.c"
+#line 289 "/home/jens/Source/shotwell/src/util/misc.vala"
+ _tmp0_ = !reschedule;
+#line 2166 "misc.c"
} else {
-#line 298 "/home/jens/Source/shotwell/src/util/misc.vala"
+#line 289 "/home/jens/Source/shotwell/src/util/misc.vala"
_tmp0_ = FALSE;
-#line 2331 "misc.c"
+#line 2170 "misc.c"
}
-#line 298 "/home/jens/Source/shotwell/src/util/misc.vala"
+#line 289 "/home/jens/Source/shotwell/src/util/misc.vala"
if (_tmp0_) {
-#line 299 "/home/jens/Source/shotwell/src/util/misc.vala"
+#line 290 "/home/jens/Source/shotwell/src/util/misc.vala"
return;
-#line 2337 "misc.c"
- }
-#line 301 "/home/jens/Source/shotwell/src/util/misc.vala"
- _tmp3_ = self->priv->scheduled;
-#line 301 "/home/jens/Source/shotwell/src/util/misc.vala"
- if (_tmp3_ != ((guint) 0)) {
-#line 2343 "misc.c"
- guint _tmp4_;
-#line 302 "/home/jens/Source/shotwell/src/util/misc.vala"
- _tmp4_ = self->priv->scheduled;
-#line 302 "/home/jens/Source/shotwell/src/util/misc.vala"
- g_source_remove (_tmp4_);
-#line 2349 "misc.c"
+#line 2176 "misc.c"
+ }
+#line 292 "/home/jens/Source/shotwell/src/util/misc.vala"
+ _tmp2_ = self->priv->scheduled;
+#line 292 "/home/jens/Source/shotwell/src/util/misc.vala"
+ if (_tmp2_ != ((guint) 0)) {
+#line 2182 "misc.c"
+ guint _tmp3_;
+#line 293 "/home/jens/Source/shotwell/src/util/misc.vala"
+ _tmp3_ = self->priv->scheduled;
+#line 293 "/home/jens/Source/shotwell/src/util/misc.vala"
+ g_source_remove (_tmp3_);
+#line 2188 "misc.c"
}
-#line 304 "/home/jens/Source/shotwell/src/util/misc.vala"
- _tmp5_ = priority;
-#line 304 "/home/jens/Source/shotwell/src/util/misc.vala"
- _tmp6_ = msec;
-#line 304 "/home/jens/Source/shotwell/src/util/misc.vala"
- _tmp7_ = g_timeout_add_full (_tmp5_, _tmp6_, _one_shot_scheduler_callback_wrapper_gsource_func, one_shot_scheduler_ref (self), one_shot_scheduler_unref);
-#line 304 "/home/jens/Source/shotwell/src/util/misc.vala"
- self->priv->scheduled = _tmp7_;
-#line 2359 "misc.c"
+#line 295 "/home/jens/Source/shotwell/src/util/misc.vala"
+ 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 307 "/home/jens/Source/shotwell/src/util/misc.vala"
+#line 298 "/home/jens/Source/shotwell/src/util/misc.vala"
g_return_if_fail (IS_ONE_SHOT_SCHEDULER (self));
-#line 308 "/home/jens/Source/shotwell/src/util/misc.vala"
+#line 299 "/home/jens/Source/shotwell/src/util/misc.vala"
_tmp0_ = self->priv->scheduled;
-#line 308 "/home/jens/Source/shotwell/src/util/misc.vala"
+#line 299 "/home/jens/Source/shotwell/src/util/misc.vala"
if (_tmp0_ == ((guint) 0)) {
-#line 309 "/home/jens/Source/shotwell/src/util/misc.vala"
+#line 300 "/home/jens/Source/shotwell/src/util/misc.vala"
return;
-#line 2374 "misc.c"
+#line 2209 "misc.c"
}
-#line 311 "/home/jens/Source/shotwell/src/util/misc.vala"
+#line 302 "/home/jens/Source/shotwell/src/util/misc.vala"
_tmp1_ = self->priv->scheduled;
-#line 311 "/home/jens/Source/shotwell/src/util/misc.vala"
+#line 302 "/home/jens/Source/shotwell/src/util/misc.vala"
g_source_remove (_tmp1_);
-#line 312 "/home/jens/Source/shotwell/src/util/misc.vala"
+#line 303 "/home/jens/Source/shotwell/src/util/misc.vala"
self->priv->scheduled = (guint) 0;
-#line 2382 "misc.c"
+#line 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;
-#line 315 "/home/jens/Source/shotwell/src/util/misc.vala"
+#line 306 "/home/jens/Source/shotwell/src/util/misc.vala"
g_return_val_if_fail (IS_ONE_SHOT_SCHEDULER (self), FALSE);
-#line 316 "/home/jens/Source/shotwell/src/util/misc.vala"
+#line 307 "/home/jens/Source/shotwell/src/util/misc.vala"
self->priv->scheduled = (guint) 0;
-#line 317 "/home/jens/Source/shotwell/src/util/misc.vala"
+#line 308 "/home/jens/Source/shotwell/src/util/misc.vala"
_tmp0_ = self->priv->callback;
-#line 317 "/home/jens/Source/shotwell/src/util/misc.vala"
+#line 308 "/home/jens/Source/shotwell/src/util/misc.vala"
_tmp0__target = self->priv->callback_target;
-#line 317 "/home/jens/Source/shotwell/src/util/misc.vala"
+#line 308 "/home/jens/Source/shotwell/src/util/misc.vala"
_tmp0_ (_tmp0__target);
-#line 319 "/home/jens/Source/shotwell/src/util/misc.vala"
+#line 310 "/home/jens/Source/shotwell/src/util/misc.vala"
result = FALSE;
-#line 319 "/home/jens/Source/shotwell/src/util/misc.vala"
+#line 310 "/home/jens/Source/shotwell/src/util/misc.vala"
return result;
-#line 2404 "misc.c"
+#line 2241 "misc.c"
}
-static void value_one_shot_scheduler_init (GValue* value) {
-#line 262 "/home/jens/Source/shotwell/src/util/misc.vala"
+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 2411 "misc.c"
+#line 2250 "misc.c"
}
-static void value_one_shot_scheduler_free_value (GValue* value) {
-#line 262 "/home/jens/Source/shotwell/src/util/misc.vala"
+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 262 "/home/jens/Source/shotwell/src/util/misc.vala"
+#line 253 "/home/jens/Source/shotwell/src/util/misc.vala"
one_shot_scheduler_unref (value->data[0].v_pointer);
-#line 2420 "misc.c"
+#line 2261 "misc.c"
}
}
-static void value_one_shot_scheduler_copy_value (const GValue* src_value, GValue* dest_value) {
-#line 262 "/home/jens/Source/shotwell/src/util/misc.vala"
+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 262 "/home/jens/Source/shotwell/src/util/misc.vala"
+#line 253 "/home/jens/Source/shotwell/src/util/misc.vala"
dest_value->data[0].v_pointer = one_shot_scheduler_ref (src_value->data[0].v_pointer);
-#line 2430 "misc.c"
+#line 2274 "misc.c"
} else {
-#line 262 "/home/jens/Source/shotwell/src/util/misc.vala"
+#line 253 "/home/jens/Source/shotwell/src/util/misc.vala"
dest_value->data[0].v_pointer = NULL;
-#line 2434 "misc.c"
+#line 2278 "misc.c"
}
}
-static gpointer value_one_shot_scheduler_peek_pointer (const GValue* value) {
-#line 262 "/home/jens/Source/shotwell/src/util/misc.vala"
+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 2442 "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) {
-#line 262 "/home/jens/Source/shotwell/src/util/misc.vala"
+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 2449 "misc.c"
+#line 2300 "misc.c"
OneShotScheduler * object;
object = collect_values[0].v_pointer;
-#line 262 "/home/jens/Source/shotwell/src/util/misc.vala"
+#line 253 "/home/jens/Source/shotwell/src/util/misc.vala"
if (object->parent_instance.g_class == NULL) {
-#line 262 "/home/jens/Source/shotwell/src/util/misc.vala"
+#line 253 "/home/jens/Source/shotwell/src/util/misc.vala"
return g_strconcat ("invalid unclassed object pointer for value type `", G_VALUE_TYPE_NAME (value), "'", NULL);
-#line 2456 "misc.c"
+#line 2307 "misc.c"
} else if (!g_value_type_compatible (G_TYPE_FROM_INSTANCE (object), G_VALUE_TYPE (value))) {
-#line 262 "/home/jens/Source/shotwell/src/util/misc.vala"
+#line 253 "/home/jens/Source/shotwell/src/util/misc.vala"
return g_strconcat ("invalid object type `", g_type_name (G_TYPE_FROM_INSTANCE (object)), "' for value type `", G_VALUE_TYPE_NAME (value), "'", NULL);
-#line 2460 "misc.c"
+#line 2311 "misc.c"
}
-#line 262 "/home/jens/Source/shotwell/src/util/misc.vala"
+#line 253 "/home/jens/Source/shotwell/src/util/misc.vala"
value->data[0].v_pointer = one_shot_scheduler_ref (object);
-#line 2464 "misc.c"
+#line 2315 "misc.c"
} else {
-#line 262 "/home/jens/Source/shotwell/src/util/misc.vala"
+#line 253 "/home/jens/Source/shotwell/src/util/misc.vala"
value->data[0].v_pointer = NULL;
-#line 2468 "misc.c"
+#line 2319 "misc.c"
}
-#line 262 "/home/jens/Source/shotwell/src/util/misc.vala"
+#line 253 "/home/jens/Source/shotwell/src/util/misc.vala"
return NULL;
-#line 2472 "misc.c"
+#line 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 262 "/home/jens/Source/shotwell/src/util/misc.vala"
+#line 253 "/home/jens/Source/shotwell/src/util/misc.vala"
if (!object_p) {
-#line 262 "/home/jens/Source/shotwell/src/util/misc.vala"
+#line 253 "/home/jens/Source/shotwell/src/util/misc.vala"
return g_strdup_printf ("value location for `%s' passed as NULL", G_VALUE_TYPE_NAME (value));
-#line 2483 "misc.c"
+#line 2339 "misc.c"
}
-#line 262 "/home/jens/Source/shotwell/src/util/misc.vala"
+#line 253 "/home/jens/Source/shotwell/src/util/misc.vala"
if (!value->data[0].v_pointer) {
-#line 262 "/home/jens/Source/shotwell/src/util/misc.vala"
+#line 253 "/home/jens/Source/shotwell/src/util/misc.vala"
*object_p = NULL;
-#line 2489 "misc.c"
+#line 2345 "misc.c"
} else if (collect_flags & G_VALUE_NOCOPY_CONTENTS) {
-#line 262 "/home/jens/Source/shotwell/src/util/misc.vala"
+#line 253 "/home/jens/Source/shotwell/src/util/misc.vala"
*object_p = value->data[0].v_pointer;
-#line 2493 "misc.c"
+#line 2349 "misc.c"
} else {
-#line 262 "/home/jens/Source/shotwell/src/util/misc.vala"
+#line 253 "/home/jens/Source/shotwell/src/util/misc.vala"
*object_p = one_shot_scheduler_ref (value->data[0].v_pointer);
-#line 2497 "misc.c"
+#line 2353 "misc.c"
}
-#line 262 "/home/jens/Source/shotwell/src/util/misc.vala"
+#line 253 "/home/jens/Source/shotwell/src/util/misc.vala"
return NULL;
-#line 2501 "misc.c"
+#line 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 262 "/home/jens/Source/shotwell/src/util/misc.vala"
+#line 253 "/home/jens/Source/shotwell/src/util/misc.vala"
g_return_val_if_fail (g_type_is_a (object_type, TYPE_ONE_SHOT_SCHEDULER), NULL);
-#line 262 "/home/jens/Source/shotwell/src/util/misc.vala"
+#line 253 "/home/jens/Source/shotwell/src/util/misc.vala"
spec = g_param_spec_internal (G_TYPE_PARAM_OBJECT, name, nick, blurb, flags);
-#line 262 "/home/jens/Source/shotwell/src/util/misc.vala"
+#line 253 "/home/jens/Source/shotwell/src/util/misc.vala"
G_PARAM_SPEC (spec)->value_type = object_type;
-#line 262 "/home/jens/Source/shotwell/src/util/misc.vala"
+#line 253 "/home/jens/Source/shotwell/src/util/misc.vala"
return G_PARAM_SPEC (spec);
-#line 2515 "misc.c"
+#line 2377 "misc.c"
}
-gpointer value_get_one_shot_scheduler (const GValue* value) {
-#line 262 "/home/jens/Source/shotwell/src/util/misc.vala"
+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 262 "/home/jens/Source/shotwell/src/util/misc.vala"
+#line 253 "/home/jens/Source/shotwell/src/util/misc.vala"
return value->data[0].v_pointer;
-#line 2524 "misc.c"
+#line 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 262 "/home/jens/Source/shotwell/src/util/misc.vala"
+#line 253 "/home/jens/Source/shotwell/src/util/misc.vala"
g_return_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, TYPE_ONE_SHOT_SCHEDULER));
-#line 262 "/home/jens/Source/shotwell/src/util/misc.vala"
+#line 253 "/home/jens/Source/shotwell/src/util/misc.vala"
old = value->data[0].v_pointer;
-#line 262 "/home/jens/Source/shotwell/src/util/misc.vala"
+#line 253 "/home/jens/Source/shotwell/src/util/misc.vala"
if (v_object) {
-#line 262 "/home/jens/Source/shotwell/src/util/misc.vala"
+#line 253 "/home/jens/Source/shotwell/src/util/misc.vala"
g_return_if_fail (G_TYPE_CHECK_INSTANCE_TYPE (v_object, TYPE_ONE_SHOT_SCHEDULER));
-#line 262 "/home/jens/Source/shotwell/src/util/misc.vala"
+#line 253 "/home/jens/Source/shotwell/src/util/misc.vala"
g_return_if_fail (g_value_type_compatible (G_TYPE_FROM_INSTANCE (v_object), G_VALUE_TYPE (value)));
-#line 262 "/home/jens/Source/shotwell/src/util/misc.vala"
+#line 253 "/home/jens/Source/shotwell/src/util/misc.vala"
value->data[0].v_pointer = v_object;
-#line 262 "/home/jens/Source/shotwell/src/util/misc.vala"
+#line 253 "/home/jens/Source/shotwell/src/util/misc.vala"
one_shot_scheduler_ref (value->data[0].v_pointer);
-#line 2544 "misc.c"
+#line 2411 "misc.c"
} else {
-#line 262 "/home/jens/Source/shotwell/src/util/misc.vala"
+#line 253 "/home/jens/Source/shotwell/src/util/misc.vala"
value->data[0].v_pointer = NULL;
-#line 2548 "misc.c"
+#line 2415 "misc.c"
}
-#line 262 "/home/jens/Source/shotwell/src/util/misc.vala"
+#line 253 "/home/jens/Source/shotwell/src/util/misc.vala"
if (old) {
-#line 262 "/home/jens/Source/shotwell/src/util/misc.vala"
+#line 253 "/home/jens/Source/shotwell/src/util/misc.vala"
one_shot_scheduler_unref (old);
-#line 2554 "misc.c"
+#line 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 262 "/home/jens/Source/shotwell/src/util/misc.vala"
+#line 253 "/home/jens/Source/shotwell/src/util/misc.vala"
g_return_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, TYPE_ONE_SHOT_SCHEDULER));
-#line 262 "/home/jens/Source/shotwell/src/util/misc.vala"
+#line 253 "/home/jens/Source/shotwell/src/util/misc.vala"
old = value->data[0].v_pointer;
-#line 262 "/home/jens/Source/shotwell/src/util/misc.vala"
+#line 253 "/home/jens/Source/shotwell/src/util/misc.vala"
if (v_object) {
-#line 262 "/home/jens/Source/shotwell/src/util/misc.vala"
+#line 253 "/home/jens/Source/shotwell/src/util/misc.vala"
g_return_if_fail (G_TYPE_CHECK_INSTANCE_TYPE (v_object, TYPE_ONE_SHOT_SCHEDULER));
-#line 262 "/home/jens/Source/shotwell/src/util/misc.vala"
+#line 253 "/home/jens/Source/shotwell/src/util/misc.vala"
g_return_if_fail (g_value_type_compatible (G_TYPE_FROM_INSTANCE (v_object), G_VALUE_TYPE (value)));
-#line 262 "/home/jens/Source/shotwell/src/util/misc.vala"
+#line 253 "/home/jens/Source/shotwell/src/util/misc.vala"
value->data[0].v_pointer = v_object;
-#line 2573 "misc.c"
+#line 2443 "misc.c"
} else {
-#line 262 "/home/jens/Source/shotwell/src/util/misc.vala"
+#line 253 "/home/jens/Source/shotwell/src/util/misc.vala"
value->data[0].v_pointer = NULL;
-#line 2577 "misc.c"
+#line 2447 "misc.c"
}
-#line 262 "/home/jens/Source/shotwell/src/util/misc.vala"
+#line 253 "/home/jens/Source/shotwell/src/util/misc.vala"
if (old) {
-#line 262 "/home/jens/Source/shotwell/src/util/misc.vala"
+#line 253 "/home/jens/Source/shotwell/src/util/misc.vala"
one_shot_scheduler_unref (old);
-#line 2583 "misc.c"
+#line 2453 "misc.c"
}
}
-static void one_shot_scheduler_class_init (OneShotSchedulerClass * klass) {
-#line 262 "/home/jens/Source/shotwell/src/util/misc.vala"
+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 262 "/home/jens/Source/shotwell/src/util/misc.vala"
+#line 253 "/home/jens/Source/shotwell/src/util/misc.vala"
((OneShotSchedulerClass *) klass)->finalize = one_shot_scheduler_finalize;
-#line 262 "/home/jens/Source/shotwell/src/util/misc.vala"
+#line 253 "/home/jens/Source/shotwell/src/util/misc.vala"
g_type_class_add_private (klass, sizeof (OneShotSchedulerPrivate));
-#line 2595 "misc.c"
+#line 2467 "misc.c"
}
-static void one_shot_scheduler_instance_init (OneShotScheduler * self) {
-#line 262 "/home/jens/Source/shotwell/src/util/misc.vala"
+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 265 "/home/jens/Source/shotwell/src/util/misc.vala"
+#line 256 "/home/jens/Source/shotwell/src/util/misc.vala"
self->priv->scheduled = (guint) 0;
-#line 262 "/home/jens/Source/shotwell/src/util/misc.vala"
+#line 253 "/home/jens/Source/shotwell/src/util/misc.vala"
self->ref_count = 1;
-#line 2606 "misc.c"
+#line 2480 "misc.c"
}
-static void one_shot_scheduler_finalize (OneShotScheduler * obj) {
+static void
+one_shot_scheduler_finalize (OneShotScheduler * obj)
+{
OneShotScheduler * self;
-#line 262 "/home/jens/Source/shotwell/src/util/misc.vala"
+#line 253 "/home/jens/Source/shotwell/src/util/misc.vala"
self = G_TYPE_CHECK_INSTANCE_CAST (obj, TYPE_ONE_SHOT_SCHEDULER, OneShotScheduler);
-#line 262 "/home/jens/Source/shotwell/src/util/misc.vala"
+#line 253 "/home/jens/Source/shotwell/src/util/misc.vala"
g_signal_handlers_destroy (self);
-#line 277 "/home/jens/Source/shotwell/src/util/misc.vala"
+#line 268 "/home/jens/Source/shotwell/src/util/misc.vala"
one_shot_scheduler_cancel (self);
-#line 263 "/home/jens/Source/shotwell/src/util/misc.vala"
+#line 254 "/home/jens/Source/shotwell/src/util/misc.vala"
_g_free0 (self->priv->name);
-#line 2620 "misc.c"
+#line 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 };
@@ -2634,73 +2512,83 @@ 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 262 "/home/jens/Source/shotwell/src/util/misc.vala"
+#line 253 "/home/jens/Source/shotwell/src/util/misc.vala"
g_atomic_int_inc (&self->ref_count);
-#line 262 "/home/jens/Source/shotwell/src/util/misc.vala"
+#line 253 "/home/jens/Source/shotwell/src/util/misc.vala"
return instance;
-#line 2645 "misc.c"
+#line 2525 "misc.c"
}
-void one_shot_scheduler_unref (gpointer instance) {
+void
+one_shot_scheduler_unref (gpointer instance)
+{
OneShotScheduler * self;
self = instance;
-#line 262 "/home/jens/Source/shotwell/src/util/misc.vala"
+#line 253 "/home/jens/Source/shotwell/src/util/misc.vala"
if (g_atomic_int_dec_and_test (&self->ref_count)) {
-#line 262 "/home/jens/Source/shotwell/src/util/misc.vala"
+#line 253 "/home/jens/Source/shotwell/src/util/misc.vala"
ONE_SHOT_SCHEDULER_GET_CLASS (self)->finalize (self);
-#line 262 "/home/jens/Source/shotwell/src/util/misc.vala"
+#line 253 "/home/jens/Source/shotwell/src/util/misc.vala"
g_type_free_instance ((GTypeInstance *) self);
-#line 2658 "misc.c"
+#line 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_;
-#line 331 "/home/jens/Source/shotwell/src/util/misc.vala"
+ gchar* _tmp0_;
+#line 322 "/home/jens/Source/shotwell/src/util/misc.vala"
g_return_val_if_fail (name != NULL, NULL);
-#line 331 "/home/jens/Source/shotwell/src/util/misc.vala"
+#line 322 "/home/jens/Source/shotwell/src/util/misc.vala"
self = (OpTimer*) g_type_create_instance (object_type);
-#line 332 "/home/jens/Source/shotwell/src/util/misc.vala"
- _tmp0_ = name;
-#line 332 "/home/jens/Source/shotwell/src/util/misc.vala"
- _tmp1_ = g_strdup (_tmp0_);
-#line 332 "/home/jens/Source/shotwell/src/util/misc.vala"
+#line 323 "/home/jens/Source/shotwell/src/util/misc.vala"
+ _tmp0_ = g_strdup (name);
+#line 323 "/home/jens/Source/shotwell/src/util/misc.vala"
_g_free0 (self->priv->name);
-#line 332 "/home/jens/Source/shotwell/src/util/misc.vala"
- self->priv->name = _tmp1_;
-#line 331 "/home/jens/Source/shotwell/src/util/misc.vala"
+#line 323 "/home/jens/Source/shotwell/src/util/misc.vala"
+ self->priv->name = _tmp0_;
+#line 322 "/home/jens/Source/shotwell/src/util/misc.vala"
return self;
-#line 2681 "misc.c"
+#line 2563 "misc.c"
}
-OpTimer* op_timer_new (const gchar* name) {
-#line 331 "/home/jens/Source/shotwell/src/util/misc.vala"
+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 2688 "misc.c"
+#line 2572 "misc.c"
}
-void op_timer_start (OpTimer* self) {
+void
+op_timer_start (OpTimer* self)
+{
GTimer* _tmp0_;
-#line 335 "/home/jens/Source/shotwell/src/util/misc.vala"
+#line 326 "/home/jens/Source/shotwell/src/util/misc.vala"
g_return_if_fail (IS_OP_TIMER (self));
-#line 336 "/home/jens/Source/shotwell/src/util/misc.vala"
+#line 327 "/home/jens/Source/shotwell/src/util/misc.vala"
_tmp0_ = self->priv->timer;
-#line 336 "/home/jens/Source/shotwell/src/util/misc.vala"
+#line 327 "/home/jens/Source/shotwell/src/util/misc.vala"
g_timer_start (_tmp0_);
-#line 2700 "misc.c"
+#line 2586 "misc.c"
}
-void op_timer_stop (OpTimer* self) {
+void
+op_timer_stop (OpTimer* self)
+{
gdouble time = 0.0;
GTimer* _tmp0_;
gdouble _tmp1_;
@@ -2711,66 +2599,68 @@ void op_timer_stop (OpTimer* self) {
gdouble _tmp7_;
gdouble _tmp8_;
glong _tmp10_;
-#line 339 "/home/jens/Source/shotwell/src/util/misc.vala"
+#line 330 "/home/jens/Source/shotwell/src/util/misc.vala"
g_return_if_fail (IS_OP_TIMER (self));
-#line 340 "/home/jens/Source/shotwell/src/util/misc.vala"
+#line 331 "/home/jens/Source/shotwell/src/util/misc.vala"
_tmp0_ = self->priv->timer;
-#line 340 "/home/jens/Source/shotwell/src/util/misc.vala"
+#line 331 "/home/jens/Source/shotwell/src/util/misc.vala"
_tmp1_ = g_timer_elapsed (_tmp0_, NULL);
-#line 340 "/home/jens/Source/shotwell/src/util/misc.vala"
+#line 331 "/home/jens/Source/shotwell/src/util/misc.vala"
time = _tmp1_;
-#line 342 "/home/jens/Source/shotwell/src/util/misc.vala"
+#line 333 "/home/jens/Source/shotwell/src/util/misc.vala"
_tmp2_ = self->priv->elapsed;
-#line 342 "/home/jens/Source/shotwell/src/util/misc.vala"
+#line 333 "/home/jens/Source/shotwell/src/util/misc.vala"
_tmp3_ = time;
-#line 342 "/home/jens/Source/shotwell/src/util/misc.vala"
+#line 333 "/home/jens/Source/shotwell/src/util/misc.vala"
self->priv->elapsed = _tmp2_ + _tmp3_;
-#line 344 "/home/jens/Source/shotwell/src/util/misc.vala"
+#line 335 "/home/jens/Source/shotwell/src/util/misc.vala"
_tmp4_ = time;
-#line 344 "/home/jens/Source/shotwell/src/util/misc.vala"
+#line 335 "/home/jens/Source/shotwell/src/util/misc.vala"
_tmp5_ = self->priv->shortest;
-#line 344 "/home/jens/Source/shotwell/src/util/misc.vala"
+#line 335 "/home/jens/Source/shotwell/src/util/misc.vala"
if (_tmp4_ < _tmp5_) {
-#line 2735 "misc.c"
+#line 2623 "misc.c"
gdouble _tmp6_;
-#line 345 "/home/jens/Source/shotwell/src/util/misc.vala"
+#line 336 "/home/jens/Source/shotwell/src/util/misc.vala"
_tmp6_ = time;
-#line 345 "/home/jens/Source/shotwell/src/util/misc.vala"
+#line 336 "/home/jens/Source/shotwell/src/util/misc.vala"
self->priv->shortest = _tmp6_;
-#line 2741 "misc.c"
+#line 2629 "misc.c"
}
-#line 347 "/home/jens/Source/shotwell/src/util/misc.vala"
+#line 338 "/home/jens/Source/shotwell/src/util/misc.vala"
_tmp7_ = time;
-#line 347 "/home/jens/Source/shotwell/src/util/misc.vala"
+#line 338 "/home/jens/Source/shotwell/src/util/misc.vala"
_tmp8_ = self->priv->longest;
-#line 347 "/home/jens/Source/shotwell/src/util/misc.vala"
+#line 338 "/home/jens/Source/shotwell/src/util/misc.vala"
if (_tmp7_ > _tmp8_) {
-#line 2749 "misc.c"
+#line 2637 "misc.c"
gdouble _tmp9_;
-#line 348 "/home/jens/Source/shotwell/src/util/misc.vala"
+#line 339 "/home/jens/Source/shotwell/src/util/misc.vala"
_tmp9_ = time;
-#line 348 "/home/jens/Source/shotwell/src/util/misc.vala"
+#line 339 "/home/jens/Source/shotwell/src/util/misc.vala"
self->priv->longest = _tmp9_;
-#line 2755 "misc.c"
+#line 2643 "misc.c"
}
-#line 350 "/home/jens/Source/shotwell/src/util/misc.vala"
+#line 341 "/home/jens/Source/shotwell/src/util/misc.vala"
_tmp10_ = self->priv->count;
-#line 350 "/home/jens/Source/shotwell/src/util/misc.vala"
+#line 341 "/home/jens/Source/shotwell/src/util/misc.vala"
self->priv->count = _tmp10_ + 1;
-#line 2761 "misc.c"
+#line 2649 "misc.c"
}
-gchar* op_timer_to_string (OpTimer* self) {
+gchar*
+op_timer_to_string (OpTimer* self)
+{
gchar* result = NULL;
glong _tmp0_;
-#line 353 "/home/jens/Source/shotwell/src/util/misc.vala"
+#line 344 "/home/jens/Source/shotwell/src/util/misc.vala"
g_return_val_if_fail (IS_OP_TIMER (self), NULL);
-#line 354 "/home/jens/Source/shotwell/src/util/misc.vala"
+#line 345 "/home/jens/Source/shotwell/src/util/misc.vala"
_tmp0_ = self->priv->count;
-#line 354 "/home/jens/Source/shotwell/src/util/misc.vala"
+#line 345 "/home/jens/Source/shotwell/src/util/misc.vala"
if (_tmp0_ > ((glong) 0)) {
-#line 2774 "misc.c"
+#line 2664 "misc.c"
const gchar* _tmp1_;
glong _tmp2_;
gdouble _tmp3_;
@@ -2779,271 +2669,312 @@ gchar* op_timer_to_string (OpTimer* self) {
glong _tmp6_;
gdouble _tmp7_;
gchar* _tmp8_;
-#line 355 "/home/jens/Source/shotwell/src/util/misc.vala"
+#line 346 "/home/jens/Source/shotwell/src/util/misc.vala"
_tmp1_ = self->priv->name;
-#line 355 "/home/jens/Source/shotwell/src/util/misc.vala"
+#line 346 "/home/jens/Source/shotwell/src/util/misc.vala"
_tmp2_ = self->priv->count;
-#line 355 "/home/jens/Source/shotwell/src/util/misc.vala"
+#line 346 "/home/jens/Source/shotwell/src/util/misc.vala"
_tmp3_ = self->priv->elapsed;
-#line 355 "/home/jens/Source/shotwell/src/util/misc.vala"
+#line 346 "/home/jens/Source/shotwell/src/util/misc.vala"
_tmp4_ = self->priv->shortest;
-#line 355 "/home/jens/Source/shotwell/src/util/misc.vala"
+#line 346 "/home/jens/Source/shotwell/src/util/misc.vala"
_tmp5_ = self->priv->elapsed;
-#line 355 "/home/jens/Source/shotwell/src/util/misc.vala"
+#line 346 "/home/jens/Source/shotwell/src/util/misc.vala"
_tmp6_ = self->priv->count;
-#line 355 "/home/jens/Source/shotwell/src/util/misc.vala"
+#line 346 "/home/jens/Source/shotwell/src/util/misc.vala"
_tmp7_ = self->priv->longest;
-#line 355 "/home/jens/Source/shotwell/src/util/misc.vala"
+#line 346 "/home/jens/Source/shotwell/src/util/misc.vala"
_tmp8_ = g_strdup_printf ("%s: count=%ld elapsed=%.03lfs min/avg/max=%.03lf/%.03lf/%.03lf", _tmp1_, _tmp2_, _tmp3_, _tmp4_, _tmp5_ / ((gdouble) _tmp6_), _tmp7_);
-#line 355 "/home/jens/Source/shotwell/src/util/misc.vala"
+#line 346 "/home/jens/Source/shotwell/src/util/misc.vala"
result = _tmp8_;
-#line 355 "/home/jens/Source/shotwell/src/util/misc.vala"
+#line 346 "/home/jens/Source/shotwell/src/util/misc.vala"
return result;
-#line 2803 "misc.c"
+#line 2693 "misc.c"
} else {
const gchar* _tmp9_;
gchar* _tmp10_;
-#line 358 "/home/jens/Source/shotwell/src/util/misc.vala"
+#line 349 "/home/jens/Source/shotwell/src/util/misc.vala"
_tmp9_ = self->priv->name;
-#line 358 "/home/jens/Source/shotwell/src/util/misc.vala"
+#line 349 "/home/jens/Source/shotwell/src/util/misc.vala"
_tmp10_ = g_strdup_printf ("%s: no operations", _tmp9_);
-#line 358 "/home/jens/Source/shotwell/src/util/misc.vala"
+#line 349 "/home/jens/Source/shotwell/src/util/misc.vala"
result = _tmp10_;
-#line 358 "/home/jens/Source/shotwell/src/util/misc.vala"
+#line 349 "/home/jens/Source/shotwell/src/util/misc.vala"
return result;
-#line 2815 "misc.c"
+#line 2705 "misc.c"
}
}
-static void value_op_timer_init (GValue* value) {
-#line 323 "/home/jens/Source/shotwell/src/util/misc.vala"
+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 2823 "misc.c"
+#line 2715 "misc.c"
}
-static void value_op_timer_free_value (GValue* value) {
-#line 323 "/home/jens/Source/shotwell/src/util/misc.vala"
+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 323 "/home/jens/Source/shotwell/src/util/misc.vala"
+#line 314 "/home/jens/Source/shotwell/src/util/misc.vala"
op_timer_unref (value->data[0].v_pointer);
-#line 2832 "misc.c"
+#line 2726 "misc.c"
}
}
-static void value_op_timer_copy_value (const GValue* src_value, GValue* dest_value) {
-#line 323 "/home/jens/Source/shotwell/src/util/misc.vala"
+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 323 "/home/jens/Source/shotwell/src/util/misc.vala"
+#line 314 "/home/jens/Source/shotwell/src/util/misc.vala"
dest_value->data[0].v_pointer = op_timer_ref (src_value->data[0].v_pointer);
-#line 2842 "misc.c"
+#line 2739 "misc.c"
} else {
-#line 323 "/home/jens/Source/shotwell/src/util/misc.vala"
+#line 314 "/home/jens/Source/shotwell/src/util/misc.vala"
dest_value->data[0].v_pointer = NULL;
-#line 2846 "misc.c"
+#line 2743 "misc.c"
}
}
-static gpointer value_op_timer_peek_pointer (const GValue* value) {
-#line 323 "/home/jens/Source/shotwell/src/util/misc.vala"
+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 2854 "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) {
-#line 323 "/home/jens/Source/shotwell/src/util/misc.vala"
+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 2861 "misc.c"
+#line 2765 "misc.c"
OpTimer * object;
object = collect_values[0].v_pointer;
-#line 323 "/home/jens/Source/shotwell/src/util/misc.vala"
+#line 314 "/home/jens/Source/shotwell/src/util/misc.vala"
if (object->parent_instance.g_class == NULL) {
-#line 323 "/home/jens/Source/shotwell/src/util/misc.vala"
+#line 314 "/home/jens/Source/shotwell/src/util/misc.vala"
return g_strconcat ("invalid unclassed object pointer for value type `", G_VALUE_TYPE_NAME (value), "'", NULL);
-#line 2868 "misc.c"
+#line 2772 "misc.c"
} else if (!g_value_type_compatible (G_TYPE_FROM_INSTANCE (object), G_VALUE_TYPE (value))) {
-#line 323 "/home/jens/Source/shotwell/src/util/misc.vala"
+#line 314 "/home/jens/Source/shotwell/src/util/misc.vala"
return g_strconcat ("invalid object type `", g_type_name (G_TYPE_FROM_INSTANCE (object)), "' for value type `", G_VALUE_TYPE_NAME (value), "'", NULL);
-#line 2872 "misc.c"
+#line 2776 "misc.c"
}
-#line 323 "/home/jens/Source/shotwell/src/util/misc.vala"
+#line 314 "/home/jens/Source/shotwell/src/util/misc.vala"
value->data[0].v_pointer = op_timer_ref (object);
-#line 2876 "misc.c"
+#line 2780 "misc.c"
} else {
-#line 323 "/home/jens/Source/shotwell/src/util/misc.vala"
+#line 314 "/home/jens/Source/shotwell/src/util/misc.vala"
value->data[0].v_pointer = NULL;
-#line 2880 "misc.c"
+#line 2784 "misc.c"
}
-#line 323 "/home/jens/Source/shotwell/src/util/misc.vala"
+#line 314 "/home/jens/Source/shotwell/src/util/misc.vala"
return NULL;
-#line 2884 "misc.c"
+#line 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 323 "/home/jens/Source/shotwell/src/util/misc.vala"
+#line 314 "/home/jens/Source/shotwell/src/util/misc.vala"
if (!object_p) {
-#line 323 "/home/jens/Source/shotwell/src/util/misc.vala"
+#line 314 "/home/jens/Source/shotwell/src/util/misc.vala"
return g_strdup_printf ("value location for `%s' passed as NULL", G_VALUE_TYPE_NAME (value));
-#line 2895 "misc.c"
+#line 2804 "misc.c"
}
-#line 323 "/home/jens/Source/shotwell/src/util/misc.vala"
+#line 314 "/home/jens/Source/shotwell/src/util/misc.vala"
if (!value->data[0].v_pointer) {
-#line 323 "/home/jens/Source/shotwell/src/util/misc.vala"
+#line 314 "/home/jens/Source/shotwell/src/util/misc.vala"
*object_p = NULL;
-#line 2901 "misc.c"
+#line 2810 "misc.c"
} else if (collect_flags & G_VALUE_NOCOPY_CONTENTS) {
-#line 323 "/home/jens/Source/shotwell/src/util/misc.vala"
+#line 314 "/home/jens/Source/shotwell/src/util/misc.vala"
*object_p = value->data[0].v_pointer;
-#line 2905 "misc.c"
+#line 2814 "misc.c"
} else {
-#line 323 "/home/jens/Source/shotwell/src/util/misc.vala"
+#line 314 "/home/jens/Source/shotwell/src/util/misc.vala"
*object_p = op_timer_ref (value->data[0].v_pointer);
-#line 2909 "misc.c"
+#line 2818 "misc.c"
}
-#line 323 "/home/jens/Source/shotwell/src/util/misc.vala"
+#line 314 "/home/jens/Source/shotwell/src/util/misc.vala"
return NULL;
-#line 2913 "misc.c"
+#line 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 323 "/home/jens/Source/shotwell/src/util/misc.vala"
+#line 314 "/home/jens/Source/shotwell/src/util/misc.vala"
g_return_val_if_fail (g_type_is_a (object_type, TYPE_OP_TIMER), NULL);
-#line 323 "/home/jens/Source/shotwell/src/util/misc.vala"
+#line 314 "/home/jens/Source/shotwell/src/util/misc.vala"
spec = g_param_spec_internal (G_TYPE_PARAM_OBJECT, name, nick, blurb, flags);
-#line 323 "/home/jens/Source/shotwell/src/util/misc.vala"
+#line 314 "/home/jens/Source/shotwell/src/util/misc.vala"
G_PARAM_SPEC (spec)->value_type = object_type;
-#line 323 "/home/jens/Source/shotwell/src/util/misc.vala"
+#line 314 "/home/jens/Source/shotwell/src/util/misc.vala"
return G_PARAM_SPEC (spec);
-#line 2927 "misc.c"
+#line 2842 "misc.c"
}
-gpointer value_get_op_timer (const GValue* value) {
-#line 323 "/home/jens/Source/shotwell/src/util/misc.vala"
+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 323 "/home/jens/Source/shotwell/src/util/misc.vala"
+#line 314 "/home/jens/Source/shotwell/src/util/misc.vala"
return value->data[0].v_pointer;
-#line 2936 "misc.c"
+#line 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 323 "/home/jens/Source/shotwell/src/util/misc.vala"
+#line 314 "/home/jens/Source/shotwell/src/util/misc.vala"
g_return_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, TYPE_OP_TIMER));
-#line 323 "/home/jens/Source/shotwell/src/util/misc.vala"
+#line 314 "/home/jens/Source/shotwell/src/util/misc.vala"
old = value->data[0].v_pointer;
-#line 323 "/home/jens/Source/shotwell/src/util/misc.vala"
+#line 314 "/home/jens/Source/shotwell/src/util/misc.vala"
if (v_object) {
-#line 323 "/home/jens/Source/shotwell/src/util/misc.vala"
+#line 314 "/home/jens/Source/shotwell/src/util/misc.vala"
g_return_if_fail (G_TYPE_CHECK_INSTANCE_TYPE (v_object, TYPE_OP_TIMER));
-#line 323 "/home/jens/Source/shotwell/src/util/misc.vala"
+#line 314 "/home/jens/Source/shotwell/src/util/misc.vala"
g_return_if_fail (g_value_type_compatible (G_TYPE_FROM_INSTANCE (v_object), G_VALUE_TYPE (value)));
-#line 323 "/home/jens/Source/shotwell/src/util/misc.vala"
+#line 314 "/home/jens/Source/shotwell/src/util/misc.vala"
value->data[0].v_pointer = v_object;
-#line 323 "/home/jens/Source/shotwell/src/util/misc.vala"
+#line 314 "/home/jens/Source/shotwell/src/util/misc.vala"
op_timer_ref (value->data[0].v_pointer);
-#line 2956 "misc.c"
+#line 2876 "misc.c"
} else {
-#line 323 "/home/jens/Source/shotwell/src/util/misc.vala"
+#line 314 "/home/jens/Source/shotwell/src/util/misc.vala"
value->data[0].v_pointer = NULL;
-#line 2960 "misc.c"
+#line 2880 "misc.c"
}
-#line 323 "/home/jens/Source/shotwell/src/util/misc.vala"
+#line 314 "/home/jens/Source/shotwell/src/util/misc.vala"
if (old) {
-#line 323 "/home/jens/Source/shotwell/src/util/misc.vala"
+#line 314 "/home/jens/Source/shotwell/src/util/misc.vala"
op_timer_unref (old);
-#line 2966 "misc.c"
+#line 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 323 "/home/jens/Source/shotwell/src/util/misc.vala"
+#line 314 "/home/jens/Source/shotwell/src/util/misc.vala"
g_return_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, TYPE_OP_TIMER));
-#line 323 "/home/jens/Source/shotwell/src/util/misc.vala"
+#line 314 "/home/jens/Source/shotwell/src/util/misc.vala"
old = value->data[0].v_pointer;
-#line 323 "/home/jens/Source/shotwell/src/util/misc.vala"
+#line 314 "/home/jens/Source/shotwell/src/util/misc.vala"
if (v_object) {
-#line 323 "/home/jens/Source/shotwell/src/util/misc.vala"
+#line 314 "/home/jens/Source/shotwell/src/util/misc.vala"
g_return_if_fail (G_TYPE_CHECK_INSTANCE_TYPE (v_object, TYPE_OP_TIMER));
-#line 323 "/home/jens/Source/shotwell/src/util/misc.vala"
+#line 314 "/home/jens/Source/shotwell/src/util/misc.vala"
g_return_if_fail (g_value_type_compatible (G_TYPE_FROM_INSTANCE (v_object), G_VALUE_TYPE (value)));
-#line 323 "/home/jens/Source/shotwell/src/util/misc.vala"
+#line 314 "/home/jens/Source/shotwell/src/util/misc.vala"
value->data[0].v_pointer = v_object;
-#line 2985 "misc.c"
+#line 2908 "misc.c"
} else {
-#line 323 "/home/jens/Source/shotwell/src/util/misc.vala"
+#line 314 "/home/jens/Source/shotwell/src/util/misc.vala"
value->data[0].v_pointer = NULL;
-#line 2989 "misc.c"
+#line 2912 "misc.c"
}
-#line 323 "/home/jens/Source/shotwell/src/util/misc.vala"
+#line 314 "/home/jens/Source/shotwell/src/util/misc.vala"
if (old) {
-#line 323 "/home/jens/Source/shotwell/src/util/misc.vala"
+#line 314 "/home/jens/Source/shotwell/src/util/misc.vala"
op_timer_unref (old);
-#line 2995 "misc.c"
+#line 2918 "misc.c"
}
}
-static void op_timer_class_init (OpTimerClass * klass) {
-#line 323 "/home/jens/Source/shotwell/src/util/misc.vala"
+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 323 "/home/jens/Source/shotwell/src/util/misc.vala"
+#line 314 "/home/jens/Source/shotwell/src/util/misc.vala"
((OpTimerClass *) klass)->finalize = op_timer_finalize;
-#line 323 "/home/jens/Source/shotwell/src/util/misc.vala"
+#line 314 "/home/jens/Source/shotwell/src/util/misc.vala"
g_type_class_add_private (klass, sizeof (OpTimerPrivate));
-#line 3007 "misc.c"
+#line 2932 "misc.c"
}
-static void op_timer_instance_init (OpTimer * self) {
+static void
+op_timer_instance_init (OpTimer * self)
+{
GTimer* _tmp0_;
-#line 323 "/home/jens/Source/shotwell/src/util/misc.vala"
+#line 314 "/home/jens/Source/shotwell/src/util/misc.vala"
self->priv = OP_TIMER_GET_PRIVATE (self);
-#line 325 "/home/jens/Source/shotwell/src/util/misc.vala"
+#line 316 "/home/jens/Source/shotwell/src/util/misc.vala"
_tmp0_ = g_timer_new ();
-#line 325 "/home/jens/Source/shotwell/src/util/misc.vala"
+#line 316 "/home/jens/Source/shotwell/src/util/misc.vala"
self->priv->timer = _tmp0_;
-#line 326 "/home/jens/Source/shotwell/src/util/misc.vala"
+#line 317 "/home/jens/Source/shotwell/src/util/misc.vala"
self->priv->count = (glong) 0;
-#line 327 "/home/jens/Source/shotwell/src/util/misc.vala"
+#line 318 "/home/jens/Source/shotwell/src/util/misc.vala"
self->priv->elapsed = (gdouble) 0;
-#line 328 "/home/jens/Source/shotwell/src/util/misc.vala"
+#line 319 "/home/jens/Source/shotwell/src/util/misc.vala"
self->priv->shortest = DBL_MAX;
-#line 329 "/home/jens/Source/shotwell/src/util/misc.vala"
+#line 320 "/home/jens/Source/shotwell/src/util/misc.vala"
self->priv->longest = DBL_MIN;
-#line 323 "/home/jens/Source/shotwell/src/util/misc.vala"
+#line 314 "/home/jens/Source/shotwell/src/util/misc.vala"
self->ref_count = 1;
-#line 3029 "misc.c"
+#line 2956 "misc.c"
}
-static void op_timer_finalize (OpTimer * obj) {
+static void
+op_timer_finalize (OpTimer * obj)
+{
OpTimer * self;
-#line 323 "/home/jens/Source/shotwell/src/util/misc.vala"
+#line 314 "/home/jens/Source/shotwell/src/util/misc.vala"
self = G_TYPE_CHECK_INSTANCE_CAST (obj, TYPE_OP_TIMER, OpTimer);
-#line 323 "/home/jens/Source/shotwell/src/util/misc.vala"
+#line 314 "/home/jens/Source/shotwell/src/util/misc.vala"
g_signal_handlers_destroy (self);
-#line 324 "/home/jens/Source/shotwell/src/util/misc.vala"
+#line 315 "/home/jens/Source/shotwell/src/util/misc.vala"
_g_free0 (self->priv->name);
-#line 325 "/home/jens/Source/shotwell/src/util/misc.vala"
+#line 316 "/home/jens/Source/shotwell/src/util/misc.vala"
_g_timer_destroy0 (self->priv->timer);
-#line 3043 "misc.c"
+#line 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 };
@@ -3057,27 +2988,31 @@ GType op_timer_get_type (void) {
}
-gpointer op_timer_ref (gpointer instance) {
+gpointer
+op_timer_ref (gpointer instance)
+{
OpTimer * self;
self = instance;
-#line 323 "/home/jens/Source/shotwell/src/util/misc.vala"
+#line 314 "/home/jens/Source/shotwell/src/util/misc.vala"
g_atomic_int_inc (&self->ref_count);
-#line 323 "/home/jens/Source/shotwell/src/util/misc.vala"
+#line 314 "/home/jens/Source/shotwell/src/util/misc.vala"
return instance;
-#line 3068 "misc.c"
+#line 3001 "misc.c"
}
-void op_timer_unref (gpointer instance) {
+void
+op_timer_unref (gpointer instance)
+{
OpTimer * self;
self = instance;
-#line 323 "/home/jens/Source/shotwell/src/util/misc.vala"
+#line 314 "/home/jens/Source/shotwell/src/util/misc.vala"
if (g_atomic_int_dec_and_test (&self->ref_count)) {
-#line 323 "/home/jens/Source/shotwell/src/util/misc.vala"
+#line 314 "/home/jens/Source/shotwell/src/util/misc.vala"
OP_TIMER_GET_CLASS (self)->finalize (self);
-#line 323 "/home/jens/Source/shotwell/src/util/misc.vala"
+#line 314 "/home/jens/Source/shotwell/src/util/misc.vala"
g_type_free_instance ((GTypeInstance *) self);
-#line 3081 "misc.c"
+#line 3016 "misc.c"
}
}
diff --git a/src/util/misc.vala b/src/util/misc.vala
index cbc6dfa..6111ea3 100644
--- a/src/util/misc.vala
+++ b/src/util/misc.vala
@@ -72,15 +72,6 @@ public inline time_t now_time_t() {
return (time_t) now_sec();
}
-public string md5_binary(uint8 *buffer, size_t length) {
- assert(length != 0);
-
- Checksum md5 = new Checksum(ChecksumType.MD5);
- md5.update((uchar []) buffer, length);
-
- return md5.get_string();
-}
-
public string md5_file(File file) throws Error {
Checksum md5 = new Checksum(ChecksumType.MD5);
uint8[] buffer = new uint8[64 * 1024];
diff --git a/src/util/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 d099120..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,142 +26,162 @@
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;
-#line 10 "/home/jens/Source/shotwell/src/util/system.vala"
- _tmp1_ = g_file_get_child (_tmp0_, "ui");
+ _tmp0_ = g_file_get_child (exec_dir, "ui");
#line 10 "/home/jens/Source/shotwell/src/util/system.vala"
- child = _tmp1_;
+ child = _tmp0_;
#line 12 "/home/jens/Source/shotwell/src/util/system.vala"
- _tmp2_ = child;
+ _tmp1_ = child;
#line 12 "/home/jens/Source/shotwell/src/util/system.vala"
- _tmp3_ = g_file_get_path (_tmp2_);
+ _tmp2_ = g_file_get_path (_tmp1_);
#line 12 "/home/jens/Source/shotwell/src/util/system.vala"
- _tmp4_ = _tmp3_;
-#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_;
-#line 13 "/home/jens/Source/shotwell/src/util/system.vala"
- _tmp7_ = g_file_new_for_path (RESOURCES_PREFIX);
-#line 13 "/home/jens/Source/shotwell/src/util/system.vala"
- result = _tmp7_;
-#line 13 "/home/jens/Source/shotwell/src/util/system.vala"
+ gchar* _tmp5_;
+ gchar* _tmp6_;
+ gboolean _tmp7_;
+ GFile* _tmp8_;
+#line 14 "/home/jens/Source/shotwell/src/util/system.vala"
+ _tmp5_ = g_file_get_basename (exec_dir);
+#line 14 "/home/jens/Source/shotwell/src/util/system.vala"
+ _tmp6_ = _tmp5_;
+#line 14 "/home/jens/Source/shotwell/src/util/system.vala"
+ _tmp7_ = g_strcmp0 (_tmp6_, "src") == 0;
+#line 14 "/home/jens/Source/shotwell/src/util/system.vala"
+ _g_free0 (_tmp6_);
+#line 14 "/home/jens/Source/shotwell/src/util/system.vala"
+ 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 86 "system.c"
+ }
+#line 18 "/home/jens/Source/shotwell/src/util/system.vala"
+ _tmp8_ = g_file_new_for_path (RESOURCES_PREFIX);
+#line 18 "/home/jens/Source/shotwell/src/util/system.vala"
+ result = _tmp8_;
+#line 18 "/home/jens/Source/shotwell/src/util/system.vala"
_g_object_unref0 (child);
-#line 13 "/home/jens/Source/shotwell/src/util/system.vala"
+#line 18 "/home/jens/Source/shotwell/src/util/system.vala"
return result;
-#line 75 "system.c"
+#line 96 "system.c"
}
-#line 16 "/home/jens/Source/shotwell/src/util/system.vala"
+#line 21 "/home/jens/Source/shotwell/src/util/system.vala"
result = NULL;
-#line 16 "/home/jens/Source/shotwell/src/util/system.vala"
+#line 21 "/home/jens/Source/shotwell/src/util/system.vala"
_g_object_unref0 (child);
-#line 16 "/home/jens/Source/shotwell/src/util/system.vala"
+#line 21 "/home/jens/Source/shotwell/src/util/system.vala"
return result;
-#line 83 "system.c"
+#line 104 "system.c"
}
-gchar* get_nautilus_install_location (void) {
+gchar*
+get_nautilus_install_location (void)
+{
gchar* result = NULL;
gchar* _tmp0_;
-#line 20 "/home/jens/Source/shotwell/src/util/system.vala"
+#line 25 "/home/jens/Source/shotwell/src/util/system.vala"
_tmp0_ = g_find_program_in_path ("nautilus");
-#line 20 "/home/jens/Source/shotwell/src/util/system.vala"
+#line 25 "/home/jens/Source/shotwell/src/util/system.vala"
result = _tmp0_;
-#line 20 "/home/jens/Source/shotwell/src/util/system.vala"
+#line 25 "/home/jens/Source/shotwell/src/util/system.vala"
return result;
-#line 96 "system.c"
+#line 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 23 "/home/jens/Source/shotwell/src/util/system.vala"
+#line 28 "/home/jens/Source/shotwell/src/util/system.vala"
g_return_if_fail (GDK_IS_SCREEN (screen));
-#line 23 "/home/jens/Source/shotwell/src/util/system.vala"
+#line 28 "/home/jens/Source/shotwell/src/util/system.vala"
g_return_if_fail (uri != NULL);
-#line 24 "/home/jens/Source/shotwell/src/util/system.vala"
- _tmp0_ = screen;
-#line 24 "/home/jens/Source/shotwell/src/util/system.vala"
- _tmp1_ = uri;
-#line 24 "/home/jens/Source/shotwell/src/util/system.vala"
- gtk_show_uri (_tmp0_, _tmp1_, (guint32) GDK_CURRENT_TIME, &_inner_error_);
-#line 24 "/home/jens/Source/shotwell/src/util/system.vala"
+#line 29 "/home/jens/Source/shotwell/src/util/system.vala"
+ 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 24 "/home/jens/Source/shotwell/src/util/system.vala"
+#line 29 "/home/jens/Source/shotwell/src/util/system.vala"
g_propagate_error (error, _inner_error_);
-#line 24 "/home/jens/Source/shotwell/src/util/system.vala"
+#line 29 "/home/jens/Source/shotwell/src/util/system.vala"
return;
-#line 120 "system.c"
+#line 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 27 "/home/jens/Source/shotwell/src/util/system.vala"
+#line 32 "/home/jens/Source/shotwell/src/util/system.vala"
g_return_if_fail (filename != NULL);
-#line 28 "/home/jens/Source/shotwell/src/util/system.vala"
+#line 33 "/home/jens/Source/shotwell/src/util/system.vala"
_tmp0_ = get_nautilus_install_location ();
-#line 28 "/home/jens/Source/shotwell/src/util/system.vala"
+#line 33 "/home/jens/Source/shotwell/src/util/system.vala"
_tmp1_ = _tmp0_;
-#line 28 "/home/jens/Source/shotwell/src/util/system.vala"
+#line 33 "/home/jens/Source/shotwell/src/util/system.vala"
_tmp2_ = g_strconcat (_tmp1_, " ", NULL);
-#line 28 "/home/jens/Source/shotwell/src/util/system.vala"
+#line 33 "/home/jens/Source/shotwell/src/util/system.vala"
_tmp3_ = _tmp2_;
-#line 28 "/home/jens/Source/shotwell/src/util/system.vala"
- _tmp4_ = filename;
-#line 28 "/home/jens/Source/shotwell/src/util/system.vala"
- _tmp5_ = g_strconcat (_tmp3_, _tmp4_, NULL);
-#line 28 "/home/jens/Source/shotwell/src/util/system.vala"
- _tmp6_ = _tmp5_;
-#line 28 "/home/jens/Source/shotwell/src/util/system.vala"
- g_spawn_command_line_async (_tmp6_, &_inner_error_);
-#line 28 "/home/jens/Source/shotwell/src/util/system.vala"
- _g_free0 (_tmp6_);
-#line 28 "/home/jens/Source/shotwell/src/util/system.vala"
+#line 33 "/home/jens/Source/shotwell/src/util/system.vala"
+ _tmp4_ = g_strconcat (_tmp3_, filename, NULL);
+#line 33 "/home/jens/Source/shotwell/src/util/system.vala"
+ _tmp5_ = _tmp4_;
+#line 33 "/home/jens/Source/shotwell/src/util/system.vala"
+ g_spawn_command_line_async (_tmp5_, &_inner_error_);
+#line 33 "/home/jens/Source/shotwell/src/util/system.vala"
+ _g_free0 (_tmp5_);
+#line 33 "/home/jens/Source/shotwell/src/util/system.vala"
_g_free0 (_tmp3_);
-#line 28 "/home/jens/Source/shotwell/src/util/system.vala"
+#line 33 "/home/jens/Source/shotwell/src/util/system.vala"
_g_free0 (_tmp1_);
-#line 28 "/home/jens/Source/shotwell/src/util/system.vala"
+#line 33 "/home/jens/Source/shotwell/src/util/system.vala"
if (G_UNLIKELY (_inner_error_ != NULL)) {
-#line 28 "/home/jens/Source/shotwell/src/util/system.vala"
+#line 33 "/home/jens/Source/shotwell/src/util/system.vala"
g_propagate_error (error, _inner_error_);
-#line 28 "/home/jens/Source/shotwell/src/util/system.vala"
+#line 33 "/home/jens/Source/shotwell/src/util/system.vala"
return;
-#line 164 "system.c"
+#line 185 "system.c"
}
}
diff --git a/src/util/system.vala b/src/util/system.vala
index f2436e4..38abf1e 100644
--- a/src/util/system.vala
+++ b/src/util/system.vala
@@ -10,6 +10,11 @@ File? get_sys_install_dir(File exec_dir) {
File child = exec_dir.get_child("ui");
if (!FileUtils.test(child.get_path(), FileTest.IS_DIR | FileTest.EXISTS)) {
+ // If not, let's see if we are in "src" dir - meson out-of-tree build
+ if (exec_dir.get_basename() == "src") {
+ return null;
+ }
+
return File.new_for_path(Resources.PREFIX);
}
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"
}