summaryrefslogtreecommitdiff
path: root/src/ThumbnailCache.c
diff options
context:
space:
mode:
authorJörg Frings-Fürst <debian@jff-webhosting.net>2018-06-25 20:57:00 +0200
committerJörg Frings-Fürst <debian@jff-webhosting.net>2018-06-25 20:57:00 +0200
commita9bafe967a7a664c43dec4aeb64a6f6e0f284e05 (patch)
tree653c43a63b70c47278367ad2a4e92640a6669b44 /src/ThumbnailCache.c
parent55778740c211992cc86ea87588ab62c6750f36d1 (diff)
parentab841afa5cb39058d9ab2cebb67cfe6369443f6e (diff)
Update upstream source from tag 'upstream/0.28.3'
Update to upstream version '0.28.3' with Debian dir 828a38627ed9287d7cf2466fb15ebdea073742b7
Diffstat (limited to 'src/ThumbnailCache.c')
-rw-r--r--src/ThumbnailCache.c3271
1 files changed, 1647 insertions, 1624 deletions
diff --git a/src/ThumbnailCache.c b/src/ThumbnailCache.c
index 1d4933c..8b17e03 100644
--- a/src/ThumbnailCache.c
+++ b/src/ThumbnailCache.c
@@ -1,4 +1,4 @@
-/* ThumbnailCache.c generated by valac 0.36.6, the Vala compiler
+/* ThumbnailCache.c generated by valac 0.40.4, the Vala compiler
* generated from ThumbnailCache.vala, do not modify */
/* Copyright 2016 Software Freedom Conservancy Inc.
@@ -7,6 +7,7 @@
* See the COPYING file in this distribution.
*/
+
#include <glib.h>
#include <glib-object.h>
#include <gee.h>
@@ -54,6 +55,11 @@ typedef struct _ThumbnailCachePrivate ThumbnailCachePrivate;
typedef struct _ThumbnailCacheImageData ThumbnailCacheImageData;
typedef struct _ThumbnailCacheImageDataClass ThumbnailCacheImageDataClass;
+enum {
+ THUMBNAIL_CACHE_0_PROPERTY,
+ THUMBNAIL_CACHE_NUM_PROPERTIES
+};
+static GParamSpec* thumbnail_cache_properties[THUMBNAIL_CACHE_NUM_PROPERTIES];
#define TYPE_SCALING (scaling_get_type ())
@@ -457,35 +463,45 @@ static gpointer thumbnail_cache_async_fetch_job_parent_class = NULL;
gpointer thumbnails_ref (gpointer instance);
void thumbnails_unref (gpointer instance);
-GParamSpec* param_spec_thumbnails (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags);
-void value_set_thumbnails (GValue* value, gpointer v_object);
-void value_take_thumbnails (GValue* value, gpointer v_object);
+GParamSpec* param_spec_thumbnails (const gchar* name,
+ const gchar* nick,
+ const gchar* blurb,
+ GType object_type,
+ GParamFlags flags);
+void value_set_thumbnails (GValue* value,
+ gpointer v_object);
+void value_take_thumbnails (GValue* value,
+ gpointer v_object);
gpointer value_get_thumbnails (const GValue* value);
GType thumbnails_get_type (void) G_GNUC_CONST;
GType thumbnail_cache_size_get_type (void) G_GNUC_CONST;
#define THUMBNAILS_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), TYPE_THUMBNAILS, ThumbnailsPrivate))
-enum {
- THUMBNAILS_DUMMY_PROPERTY
-};
Thumbnails* thumbnails_new (void);
Thumbnails* thumbnails_construct (GType object_type);
-void thumbnails_set (Thumbnails* self, ThumbnailCacheSize size, GdkPixbuf* pixbuf);
-void thumbnails_remove (Thumbnails* self, ThumbnailCacheSize size);
-GdkPixbuf* thumbnails_get (Thumbnails* self, ThumbnailCacheSize size);
+void thumbnails_set (Thumbnails* self,
+ ThumbnailCacheSize size,
+ GdkPixbuf* pixbuf);
+void thumbnails_remove (Thumbnails* self,
+ ThumbnailCacheSize size);
+GdkPixbuf* thumbnails_get (Thumbnails* self,
+ ThumbnailCacheSize size);
static void thumbnails_finalize (Thumbnails * obj);
GType thumbnail_cache_get_type (void) G_GNUC_CONST;
GType jpeg_quality_get_type (void) G_GNUC_CONST;
static gpointer thumbnail_cache_image_data_ref (gpointer instance);
static void thumbnail_cache_image_data_unref (gpointer instance);
-static GParamSpec* thumbnail_cache_param_spec_image_data (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags) G_GNUC_UNUSED;
-static void thumbnail_cache_value_set_image_data (GValue* value, gpointer v_object) G_GNUC_UNUSED;
-static void thumbnail_cache_value_take_image_data (GValue* value, gpointer v_object) G_GNUC_UNUSED;
+static GParamSpec* thumbnail_cache_param_spec_image_data (const gchar* name,
+ const gchar* nick,
+ const gchar* blurb,
+ GType object_type,
+ GParamFlags flags) G_GNUC_UNUSED;
+static void thumbnail_cache_value_set_image_data (GValue* value,
+ gpointer v_object) G_GNUC_UNUSED;
+static void thumbnail_cache_value_take_image_data (GValue* value,
+ gpointer v_object) G_GNUC_UNUSED;
static gpointer thumbnail_cache_value_get_image_data (const GValue* value) G_GNUC_UNUSED;
static GType thumbnail_cache_image_data_get_type (void) G_GNUC_CONST G_GNUC_UNUSED;
#define THUMBNAIL_CACHE_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), TYPE_THUMBNAIL_CACHE, ThumbnailCachePrivate))
-enum {
- THUMBNAIL_CACHE_DUMMY_PROPERTY
-};
gint thumbnail_cache_size_get_scale (ThumbnailCacheSize self);
GType scaling_get_type (void) G_GNUC_CONST;
GType scale_constraint_get_type (void) G_GNUC_CONST;
@@ -494,21 +510,36 @@ Dimensions* dimensions_dup (const Dimensions* self);
void dimensions_free (Dimensions* self);
Scaling* scaling_dup (const Scaling* self);
void scaling_free (Scaling* self);
-void thumbnail_cache_size_get_scaling (ThumbnailCacheSize self, Scaling* result);
-void scaling_for_best_fit (gint pixels, gboolean scale_up, Scaling* result);
+void thumbnail_cache_size_get_scaling (ThumbnailCacheSize self,
+ Scaling* result);
+void scaling_for_best_fit (gint pixels,
+ gboolean scale_up,
+ Scaling* result);
ThumbnailCacheSize thumbnail_cache_size_get_best_size (gint scale);
gpointer workers_ref (gpointer instance);
void workers_unref (gpointer instance);
-GParamSpec* param_spec_workers (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags);
-void value_set_workers (GValue* value, gpointer v_object);
-void value_take_workers (GValue* value, gpointer v_object);
+GParamSpec* param_spec_workers (const gchar* name,
+ const gchar* nick,
+ const gchar* blurb,
+ GType object_type,
+ GParamFlags flags);
+void value_set_workers (GValue* value,
+ gpointer v_object);
+void value_take_workers (GValue* value,
+ gpointer v_object);
gpointer value_get_workers (const GValue* value);
GType workers_get_type (void) G_GNUC_CONST;
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 THUMBNAIL_CACHE_DEFAULT_INTERP GDK_INTERP_HYPER
@@ -516,154 +547,315 @@ GType one_shot_scheduler_get_type (void) G_GNUC_CONST;
#define THUMBNAIL_CACHE_MAX_INMEMORY_DATA_SIZE (512 * 1024)
#define THUMBNAIL_CACHE_MAX_BIG_CACHED_BYTES ((gulong) ((40 * 1024) * 1024))
#define THUMBNAIL_CACHE_MAX_MEDIUM_CACHED_BYTES ((gulong) ((30 * 1024) * 1024))
-static ThumbnailCache* thumbnail_cache_new (ThumbnailCacheSize size, gulong max_cached_bytes, GdkInterpType interp, JpegQuality quality);
-static ThumbnailCache* thumbnail_cache_construct (GType object_type, ThumbnailCacheSize size, gulong max_cached_bytes, GdkInterpType interp, JpegQuality quality);
-GFile* app_dirs_get_cache_subdir (const gchar* name, const gchar* subname);
+static ThumbnailCache* thumbnail_cache_new (ThumbnailCacheSize size,
+ gulong max_cached_bytes,
+ GdkInterpType interp,
+ JpegQuality quality);
+static ThumbnailCache* thumbnail_cache_construct (GType object_type,
+ ThumbnailCacheSize size,
+ gulong max_cached_bytes,
+ GdkInterpType interp,
+ JpegQuality quality);
+GFile* app_dirs_get_cache_subdir (const gchar* name,
+ const gchar* subname);
void thumbnail_cache_init (void);
static void thumbnail_cache_report_cycle (void);
static void _thumbnail_cache_report_cycle_one_shot_callback (gpointer 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);
-guint workers_threads_per_cpu (gint per, gint max);
-Workers* workers_new (guint max_threads, gboolean exclusive);
-Workers* workers_construct (GType object_type, guint max_threads, gboolean exclusive);
+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);
+guint workers_threads_per_cpu (gint per,
+ gint max);
+Workers* workers_new (guint max_threads,
+ gboolean exclusive);
+Workers* workers_construct (GType object_type,
+ guint max_threads,
+ gboolean exclusive);
void thumbnail_cache_terminate (void);
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;
-void thumbnail_cache_import_from_source (ThumbnailSource* source, gboolean force, GError** error);
+void thumbnail_cache_import_from_source (ThumbnailSource* source,
+ gboolean force,
+ GError** error);
gchar* data_object_to_string (DataObject* self);
-static void _thumbnail_cache_import_from_source (ThumbnailCache* self, ThumbnailSource* source, gboolean force, GError** error);
-void thumbnail_cache_import_thumbnails (ThumbnailSource* source, Thumbnails* thumbnails, gboolean force, GError** error);
-static void _thumbnail_cache_import_thumbnail (ThumbnailCache* self, ThumbnailSource* source, GdkPixbuf* scaled, gboolean force, GError** error);
-void thumbnail_cache_duplicate (ThumbnailSource* src_source, ThumbnailSource* dest_source);
-static void _thumbnail_cache_duplicate (ThumbnailCache* self, ThumbnailSource* src_source, ThumbnailSource* dest_source);
+static void _thumbnail_cache_import_from_source (ThumbnailCache* self,
+ ThumbnailSource* source,
+ gboolean force,
+ GError** error);
+void thumbnail_cache_import_thumbnails (ThumbnailSource* source,
+ Thumbnails* thumbnails,
+ gboolean force,
+ GError** error);
+static void _thumbnail_cache_import_thumbnail (ThumbnailCache* self,
+ ThumbnailSource* source,
+ GdkPixbuf* scaled,
+ gboolean force,
+ GError** error);
+void thumbnail_cache_duplicate (ThumbnailSource* src_source,
+ ThumbnailSource* dest_source);
+static void _thumbnail_cache_duplicate (ThumbnailCache* self,
+ ThumbnailSource* src_source,
+ ThumbnailSource* dest_source);
void thumbnail_cache_remove (ThumbnailSource* source);
-static void _thumbnail_cache_remove (ThumbnailCache* self, ThumbnailSource* source);
+static void _thumbnail_cache_remove (ThumbnailCache* self,
+ ThumbnailSource* source);
static ThumbnailCache* thumbnail_cache_get_best_cache (gint scale);
static ThumbnailCache* thumbnail_cache_get_cache_for (ThumbnailCacheSize size);
-GdkPixbuf* thumbnail_cache_fetch (ThumbnailSource* source, gint scale, GError** error);
-static GdkPixbuf* _thumbnail_cache_fetch (ThumbnailCache* self, ThumbnailSource* source, GError** error);
-void thumbnail_cache_fetch_async (ThumbnailSource* source, gint scale, ThumbnailCacheAsyncFetchCallback callback, void* callback_target, GCancellable* cancellable);
+GdkPixbuf* thumbnail_cache_fetch (ThumbnailSource* source,
+ gint scale,
+ GError** error);
+static GdkPixbuf* _thumbnail_cache_fetch (ThumbnailCache* self,
+ ThumbnailSource* source,
+ GError** error);
+void thumbnail_cache_fetch_async (ThumbnailSource* source,
+ gint scale,
+ ThumbnailCacheAsyncFetchCallback callback,
+ void* callback_target,
+ GCancellable* cancellable);
GType photo_file_format_get_type (void) G_GNUC_CONST;
-static void _thumbnail_cache_fetch_async (ThumbnailCache* self, ThumbnailSource* source, PhotoFileFormat format, Dimensions* dim, GdkInterpType interp, ThumbnailCacheAsyncFetchCallback callback, void* callback_target, GCancellable* cancellable);
+static void _thumbnail_cache_fetch_async (ThumbnailCache* self,
+ ThumbnailSource* source,
+ PhotoFileFormat format,
+ Dimensions* dim,
+ GdkInterpType interp,
+ ThumbnailCacheAsyncFetchCallback callback,
+ void* callback_target,
+ GCancellable* cancellable);
PhotoFileFormat thumbnail_source_get_preferred_thumbnail_format (ThumbnailSource* self);
-void dimensions_init (Dimensions *self, gint width, gint height);
-void thumbnail_cache_fetch_async_scaled (ThumbnailSource* source, gint scale, Dimensions* dim, GdkInterpType interp, ThumbnailCacheAsyncFetchCallback callback, void* callback_target, GCancellable* cancellable);
-void thumbnail_cache_replace (ThumbnailSource* source, ThumbnailCacheSize size, GdkPixbuf* replacement, GError** error);
-static void _thumbnail_cache_replace (ThumbnailCache* self, ThumbnailSource* source, GdkPixbuf* original, GError** error);
+void dimensions_init (Dimensions *self,
+ gint width,
+ gint height);
+void thumbnail_cache_fetch_async_scaled (ThumbnailSource* source,
+ gint scale,
+ Dimensions* dim,
+ GdkInterpType interp,
+ ThumbnailCacheAsyncFetchCallback callback,
+ void* callback_target,
+ GCancellable* cancellable);
+void thumbnail_cache_replace (ThumbnailSource* source,
+ ThumbnailCacheSize size,
+ GdkPixbuf* replacement,
+ GError** error);
+static void _thumbnail_cache_replace (ThumbnailCache* self,
+ ThumbnailSource* source,
+ GdkPixbuf* original,
+ GError** error);
gboolean thumbnail_cache_exists (ThumbnailSource* source);
-static gboolean _thumbnail_cache_exists (ThumbnailCache* self, ThumbnailSource* source);
+static gboolean _thumbnail_cache_exists (ThumbnailCache* self,
+ ThumbnailSource* source);
GType rotation_get_type (void) G_GNUC_CONST;
-void thumbnail_cache_rotate (ThumbnailSource* source, Rotation rotation, GError** error);
-GdkPixbuf* rotation_perform (Rotation self, GdkPixbuf* pixbuf);
+void thumbnail_cache_rotate (ThumbnailSource* source,
+ Rotation rotation,
+ GError** error);
+GdkPixbuf* rotation_perform (Rotation self,
+ GdkPixbuf* pixbuf);
gpointer photo_file_adapter_ref (gpointer instance);
void photo_file_adapter_unref (gpointer instance);
-GParamSpec* param_spec_photo_file_adapter (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags);
-void value_set_photo_file_adapter (GValue* value, gpointer v_object);
-void value_take_photo_file_adapter (GValue* value, gpointer v_object);
+GParamSpec* param_spec_photo_file_adapter (const gchar* name,
+ const gchar* nick,
+ const gchar* blurb,
+ GType object_type,
+ GParamFlags flags);
+void value_set_photo_file_adapter (GValue* value,
+ gpointer v_object);
+void value_take_photo_file_adapter (GValue* value,
+ gpointer v_object);
gpointer value_get_photo_file_adapter (const GValue* value);
GType photo_file_adapter_get_type (void) G_GNUC_CONST;
GType photo_file_reader_get_type (void) G_GNUC_CONST;
GType orientation_get_type (void) G_GNUC_CONST;
-void thumbnail_cache_generate_for_photo (Thumbnails* thumbnails, PhotoFileReader* reader, Orientation orientation, Dimensions* original_dim, GError** error);
-void scaling_get_scaled_dimensions (Scaling *self, Dimensions* original, Dimensions* result);
-GdkPixbuf* photo_file_reader_scaled_read (PhotoFileReader* self, Dimensions* full, Dimensions* scaled, GError** error);
-GdkPixbuf* photo_file_reader_unscaled_read (PhotoFileReader* self, GError** error);
-GdkPixbuf* orientation_rotate_pixbuf (Orientation self, GdkPixbuf* pixbuf);
-void dimensions_for_pixbuf (GdkPixbuf* pixbuf, Dimensions* result);
-void thumbnail_cache_generate_for_video_frame (Thumbnails* thumbnails, GdkPixbuf* preview_frame);
-GdkPixbuf* scaling_perform_on_pixbuf (Scaling *self, GdkPixbuf* pixbuf, GdkInterpType interp, gboolean scale_up);
+void thumbnail_cache_generate_for_photo (Thumbnails* thumbnails,
+ PhotoFileReader* reader,
+ Orientation orientation,
+ Dimensions* original_dim,
+ GError** error);
+void scaling_get_scaled_dimensions (Scaling *self,
+ Dimensions* original,
+ Dimensions* result);
+GdkPixbuf* photo_file_reader_scaled_read (PhotoFileReader* self,
+ Dimensions* full,
+ Dimensions* scaled,
+ GError** error);
+GdkPixbuf* photo_file_reader_unscaled_read (PhotoFileReader* self,
+ GError** error);
+GdkPixbuf* orientation_rotate_pixbuf (Orientation self,
+ GdkPixbuf* pixbuf);
+void dimensions_for_pixbuf (GdkPixbuf* pixbuf,
+ Dimensions* result);
+void thumbnail_cache_generate_for_video_frame (Thumbnails* thumbnails,
+ GdkPixbuf* preview_frame);
+GdkPixbuf* scaling_perform_on_pixbuf (Scaling *self,
+ GdkPixbuf* pixbuf,
+ GdkInterpType interp,
+ gboolean scale_up);
static void thumbnail_cache_schedule_debug (void);
-static GdkPixbuf* thumbnail_cache_fetch_from_memory (ThumbnailCache* self, const gchar* thumbnail_name);
+static GdkPixbuf* thumbnail_cache_fetch_from_memory (ThumbnailCache* self,
+ const gchar* thumbnail_name);
gchar* data_source_get_source_id (DataSource* self);
-static GdkPixbuf* thumbnail_cache_read_pixbuf (ThumbnailCache* self, const gchar* thumbnail_name, PhotoFileFormat format, GError** error);
-static void thumbnail_cache_store_in_memory (ThumbnailCache* self, const gchar* thumbnail_name, GdkPixbuf* thumbnail);
+static GdkPixbuf* thumbnail_cache_read_pixbuf (ThumbnailCache* self,
+ const gchar* thumbnail_name,
+ PhotoFileFormat format,
+ GError** error);
+static void thumbnail_cache_store_in_memory (ThumbnailCache* self,
+ const gchar* thumbnail_name,
+ GdkPixbuf* thumbnail);
gboolean dimensions_has_area (Dimensions *self);
-gboolean dimensions_equals (Dimensions *self, Dimensions* dim);
+gboolean dimensions_equals (Dimensions *self,
+ Dimensions* dim);
gpointer background_job_ref (gpointer instance);
void background_job_unref (gpointer instance);
-GParamSpec* param_spec_background_job (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags);
-void value_set_background_job (GValue* value, gpointer v_object);
-void value_take_background_job (GValue* value, gpointer v_object);
+GParamSpec* param_spec_background_job (const gchar* name,
+ const gchar* nick,
+ const gchar* blurb,
+ GType object_type,
+ GParamFlags flags);
+void value_set_background_job (GValue* value,
+ gpointer v_object);
+void value_take_background_job (GValue* value,
+ gpointer v_object);
gpointer value_get_background_job (const GValue* value);
GType background_job_get_type (void) G_GNUC_CONST;
-void workers_enqueue (Workers* self, BackgroundJob* job);
-static ThumbnailCacheAsyncFetchJob* thumbnail_cache_async_fetch_job_new (ThumbnailCache* cache, const gchar* thumbnail_name, ThumbnailSource* source, GdkPixbuf* prefetched, Dimensions* dim, GdkInterpType interp, ThumbnailCacheAsyncFetchCallback callback, void* callback_target, GCancellable* cancellable);
-static ThumbnailCacheAsyncFetchJob* thumbnail_cache_async_fetch_job_construct (GType object_type, ThumbnailCache* cache, const gchar* thumbnail_name, ThumbnailSource* source, GdkPixbuf* prefetched, Dimensions* dim, GdkInterpType interp, ThumbnailCacheAsyncFetchCallback callback, void* callback_target, GCancellable* cancellable);
+void workers_enqueue (Workers* self,
+ BackgroundJob* job);
+static ThumbnailCacheAsyncFetchJob* thumbnail_cache_async_fetch_job_new (ThumbnailCache* cache,
+ const gchar* thumbnail_name,
+ ThumbnailSource* source,
+ GdkPixbuf* prefetched,
+ Dimensions* dim,
+ GdkInterpType interp,
+ ThumbnailCacheAsyncFetchCallback callback,
+ void* callback_target,
+ GCancellable* cancellable);
+static ThumbnailCacheAsyncFetchJob* thumbnail_cache_async_fetch_job_construct (GType object_type,
+ ThumbnailCache* cache,
+ const gchar* thumbnail_name,
+ ThumbnailSource* source,
+ GdkPixbuf* prefetched,
+ Dimensions* dim,
+ GdkInterpType interp,
+ ThumbnailCacheAsyncFetchCallback callback,
+ void* callback_target,
+ GCancellable* cancellable);
static GType thumbnail_cache_async_fetch_job_get_type (void) G_GNUC_CONST G_GNUC_UNUSED;
static void thumbnail_cache_async_fetch_completion_callback (BackgroundJob* background_job);
GType background_job_job_priority_get_type (void) G_GNUC_CONST;
-static GFile* thumbnail_cache_get_source_cached_file (ThumbnailCache* self, ThumbnailSource* source);
+static GFile* thumbnail_cache_get_source_cached_file (ThumbnailCache* self,
+ ThumbnailSource* source);
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;
GType library_photo_get_type (void) G_GNUC_CONST;
-GdkPixbuf* photo_source_get_pixbuf (PhotoSource* self, Scaling* scaling, GError** error);
-static void thumbnail_cache_save_thumbnail (ThumbnailCache* self, GFile* file, GdkPixbuf* pixbuf, ThumbnailSource* source, GError** error);
-gboolean dimensions_approx_scaled (Dimensions *self, gint scale, gint fudge);
-static GFile* thumbnail_cache_get_cached_file (ThumbnailCache* self, const gchar* thumbnail_name, PhotoFileFormat thumbnail_format);
+GdkPixbuf* photo_source_get_pixbuf (PhotoSource* self,
+ Scaling* scaling,
+ GError** error);
+static void thumbnail_cache_save_thumbnail (ThumbnailCache* self,
+ GFile* file,
+ GdkPixbuf* pixbuf,
+ ThumbnailSource* source,
+ GError** error);
+gboolean dimensions_approx_scaled (Dimensions *self,
+ gint scale,
+ gint fudge);
+static GFile* thumbnail_cache_get_cached_file (ThumbnailCache* self,
+ const gchar* thumbnail_name,
+ PhotoFileFormat thumbnail_format);
gchar* thumbnail_source_get_representative_id (ThumbnailSource* self);
void app_window_panic (const gchar* msg);
-static gboolean thumbnail_cache_remove_from_memory (ThumbnailCache* self, const gchar* thumbnail_name);
-GdkPixbuf* scale_pixbuf (GdkPixbuf* pixbuf, gint scale, GdkInterpType interp, gboolean scale_up);
-PhotoFileReader* photo_file_format_create_reader (PhotoFileFormat self, const gchar* filepath);
-gchar* photo_file_format_get_default_basename (PhotoFileFormat self, const gchar* name);
+static gboolean thumbnail_cache_remove_from_memory (ThumbnailCache* self,
+ const gchar* thumbnail_name);
+GdkPixbuf* scale_pixbuf (GdkPixbuf* pixbuf,
+ gint scale,
+ GdkInterpType interp,
+ gboolean scale_up);
+PhotoFileReader* photo_file_format_create_reader (PhotoFileFormat self,
+ const gchar* filepath);
+gchar* photo_file_format_get_default_basename (PhotoFileFormat self,
+ const gchar* name);
static ThumbnailCacheImageData* thumbnail_cache_image_data_new (GdkPixbuf* pixbuf);
-static ThumbnailCacheImageData* thumbnail_cache_image_data_construct (GType object_type, GdkPixbuf* pixbuf);
+static ThumbnailCacheImageData* thumbnail_cache_image_data_construct (GType object_type,
+ GdkPixbuf* pixbuf);
GType photo_file_writer_get_type (void) G_GNUC_CONST;
GQuark photo_format_error_quark (void);
-PhotoFileWriter* photo_file_format_create_writer (PhotoFileFormat self, const gchar* filepath, GError** error);
-void photo_file_writer_write (PhotoFileWriter* self, GdkPixbuf* pixbuf, JpegQuality quality, GError** error);
-enum {
- THUMBNAIL_CACHE_IMAGE_DATA_DUMMY_PROPERTY
-};
+PhotoFileWriter* photo_file_format_create_writer (PhotoFileFormat self,
+ const gchar* filepath,
+ GError** error);
+void photo_file_writer_write (PhotoFileWriter* self,
+ GdkPixbuf* pixbuf,
+ JpegQuality quality,
+ GError** error);
static void thumbnail_cache_image_data_finalize (ThumbnailCacheImageData * obj);
-enum {
- THUMBNAIL_CACHE_ASYNC_FETCH_JOB_DUMMY_PROPERTY
-};
-static void _thumbnail_cache_async_fetch_completion_callback_completion_callback (BackgroundJob* job, gpointer self);
+static void _thumbnail_cache_async_fetch_completion_callback_completion_callback (BackgroundJob* job,
+ gpointer self);
gpointer abstract_semaphore_ref (gpointer instance);
void abstract_semaphore_unref (gpointer instance);
-GParamSpec* param_spec_abstract_semaphore (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags);
-void value_set_abstract_semaphore (GValue* value, gpointer v_object);
-void value_take_abstract_semaphore (GValue* value, gpointer v_object);
+GParamSpec* param_spec_abstract_semaphore (const gchar* name,
+ const gchar* nick,
+ const gchar* blurb,
+ GType object_type,
+ GParamFlags flags);
+void value_set_abstract_semaphore (GValue* value,
+ gpointer v_object);
+void value_take_abstract_semaphore (GValue* value,
+ gpointer v_object);
gpointer value_get_abstract_semaphore (const GValue* value);
GType abstract_semaphore_get_type (void) G_GNUC_CONST;
-BackgroundJob* background_job_construct (GType object_type, GObject* owner, CompletionCallback callback, void* callback_target, GCancellable* cancellable, CancellationCallback cancellation, void* cancellation_target, AbstractSemaphore* completion_semaphore);
+BackgroundJob* background_job_construct (GType object_type,
+ GObject* owner,
+ CompletionCallback callback,
+ void* callback_target,
+ GCancellable* cancellable,
+ CancellationCallback cancellation,
+ void* cancellation_target,
+ AbstractSemaphore* completion_semaphore);
static BackgroundJobJobPriority thumbnail_cache_async_fetch_job_real_get_priority (BackgroundJob* base);
static void thumbnail_cache_async_fetch_job_real_execute (BackgroundJob* base);
gboolean background_job_is_cancelled (BackgroundJob* self);
-GdkPixbuf* resize_pixbuf (GdkPixbuf* pixbuf, Dimensions* resized, GdkInterpType interp);
-static void thumbnail_cache_async_fetch_job_generate_thumbnail (ThumbnailCacheAsyncFetchJob* self, GError** error);
+GdkPixbuf* resize_pixbuf (GdkPixbuf* pixbuf,
+ Dimensions* resized,
+ GdkInterpType interp);
+static void thumbnail_cache_async_fetch_job_generate_thumbnail (ThumbnailCacheAsyncFetchJob* self,
+ GError** error);
GType video_source_get_type (void) G_GNUC_CONST;
GType video_get_type (void) G_GNUC_CONST;
-GdkPixbuf* thumbnail_source_create_thumbnail (ThumbnailSource* self, gint scale, GError** error);
+GdkPixbuf* thumbnail_source_create_thumbnail (ThumbnailSource* self,
+ gint scale,
+ GError** error);
static void thumbnail_cache_async_fetch_job_finalize (BackgroundJob * obj);
static void thumbnail_cache_finalize (GObject * obj);
-Thumbnails* thumbnails_construct (GType object_type) {
+Thumbnails*
+thumbnails_construct (GType object_type)
+{
Thumbnails* self = NULL;
#line 11 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
self = (Thumbnails*) g_type_create_instance (object_type);
#line 11 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
return self;
-#line 653 "ThumbnailCache.c"
+#line 841 "ThumbnailCache.c"
}
-Thumbnails* thumbnails_new (void) {
+Thumbnails*
+thumbnails_new (void)
+{
#line 11 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
return thumbnails_construct (TYPE_THUMBNAILS);
-#line 660 "ThumbnailCache.c"
+#line 850 "ThumbnailCache.c"
}
-void thumbnails_set (Thumbnails* self, ThumbnailCacheSize size, GdkPixbuf* pixbuf) {
+void
+thumbnails_set (Thumbnails* self,
+ ThumbnailCacheSize size,
+ GdkPixbuf* pixbuf)
+{
GeeHashMap* _tmp0_;
- ThumbnailCacheSize _tmp1_;
- GdkPixbuf* _tmp2_;
#line 14 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
g_return_if_fail (IS_THUMBNAILS (self));
#line 14 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
@@ -671,149 +863,170 @@ void thumbnails_set (Thumbnails* self, ThumbnailCacheSize size, GdkPixbuf* pixbu
#line 15 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
_tmp0_ = self->priv->map;
#line 15 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
- _tmp1_ = size;
-#line 15 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
- _tmp2_ = pixbuf;
-#line 15 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
- gee_abstract_map_set (G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, GEE_TYPE_ABSTRACT_MAP, GeeAbstractMap), (gpointer) ((gintptr) _tmp1_), _tmp2_);
-#line 680 "ThumbnailCache.c"
+ gee_abstract_map_set (G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, GEE_TYPE_ABSTRACT_MAP, GeeAbstractMap), (gpointer) ((gintptr) size), pixbuf);
+#line 868 "ThumbnailCache.c"
}
-void thumbnails_remove (Thumbnails* self, ThumbnailCacheSize size) {
+void
+thumbnails_remove (Thumbnails* self,
+ ThumbnailCacheSize size)
+{
GeeHashMap* _tmp0_;
- ThumbnailCacheSize _tmp1_;
#line 18 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
g_return_if_fail (IS_THUMBNAILS (self));
#line 19 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
_tmp0_ = self->priv->map;
#line 19 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
- _tmp1_ = size;
-#line 19 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
- gee_abstract_map_unset (G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, GEE_TYPE_ABSTRACT_MAP, GeeAbstractMap), (gpointer) ((gintptr) _tmp1_), NULL);
-#line 695 "ThumbnailCache.c"
+ gee_abstract_map_unset (G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, GEE_TYPE_ABSTRACT_MAP, GeeAbstractMap), (gpointer) ((gintptr) size), NULL);
+#line 883 "ThumbnailCache.c"
}
-GdkPixbuf* thumbnails_get (Thumbnails* self, ThumbnailCacheSize size) {
+GdkPixbuf*
+thumbnails_get (Thumbnails* self,
+ ThumbnailCacheSize size)
+{
GdkPixbuf* result = NULL;
GeeHashMap* _tmp0_;
- ThumbnailCacheSize _tmp1_;
- gpointer _tmp2_;
+ gpointer _tmp1_;
#line 22 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
g_return_val_if_fail (IS_THUMBNAILS (self), NULL);
#line 23 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
_tmp0_ = self->priv->map;
#line 23 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
- _tmp1_ = size;
+ _tmp1_ = gee_abstract_map_get (G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, GEE_TYPE_ABSTRACT_MAP, GeeAbstractMap), (gpointer) ((gintptr) size));
#line 23 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
- _tmp2_ = gee_abstract_map_get (G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, GEE_TYPE_ABSTRACT_MAP, GeeAbstractMap), (gpointer) ((gintptr) _tmp1_));
-#line 23 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
- result = (GdkPixbuf*) _tmp2_;
+ result = (GdkPixbuf*) _tmp1_;
#line 23 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
return result;
-#line 716 "ThumbnailCache.c"
+#line 904 "ThumbnailCache.c"
}
-static void value_thumbnails_init (GValue* value) {
+static void
+value_thumbnails_init (GValue* value)
+{
#line 7 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
value->data[0].v_pointer = NULL;
-#line 723 "ThumbnailCache.c"
+#line 913 "ThumbnailCache.c"
}
-static void value_thumbnails_free_value (GValue* value) {
+static void
+value_thumbnails_free_value (GValue* value)
+{
#line 7 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
if (value->data[0].v_pointer) {
#line 7 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
thumbnails_unref (value->data[0].v_pointer);
-#line 732 "ThumbnailCache.c"
+#line 924 "ThumbnailCache.c"
}
}
-static void value_thumbnails_copy_value (const GValue* src_value, GValue* dest_value) {
+static void
+value_thumbnails_copy_value (const GValue* src_value,
+ GValue* dest_value)
+{
#line 7 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
if (src_value->data[0].v_pointer) {
#line 7 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
dest_value->data[0].v_pointer = thumbnails_ref (src_value->data[0].v_pointer);
-#line 742 "ThumbnailCache.c"
+#line 937 "ThumbnailCache.c"
} else {
#line 7 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
dest_value->data[0].v_pointer = NULL;
-#line 746 "ThumbnailCache.c"
+#line 941 "ThumbnailCache.c"
}
}
-static gpointer value_thumbnails_peek_pointer (const GValue* value) {
+static gpointer
+value_thumbnails_peek_pointer (const GValue* value)
+{
#line 7 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
return value->data[0].v_pointer;
-#line 754 "ThumbnailCache.c"
+#line 951 "ThumbnailCache.c"
}
-static gchar* value_thumbnails_collect_value (GValue* value, guint n_collect_values, GTypeCValue* collect_values, guint collect_flags) {
+static gchar*
+value_thumbnails_collect_value (GValue* value,
+ guint n_collect_values,
+ GTypeCValue* collect_values,
+ guint collect_flags)
+{
#line 7 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
if (collect_values[0].v_pointer) {
-#line 761 "ThumbnailCache.c"
+#line 963 "ThumbnailCache.c"
Thumbnails * object;
object = collect_values[0].v_pointer;
#line 7 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
if (object->parent_instance.g_class == NULL) {
#line 7 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
return g_strconcat ("invalid unclassed object pointer for value type `", G_VALUE_TYPE_NAME (value), "'", NULL);
-#line 768 "ThumbnailCache.c"
+#line 970 "ThumbnailCache.c"
} else if (!g_value_type_compatible (G_TYPE_FROM_INSTANCE (object), G_VALUE_TYPE (value))) {
#line 7 "/home/jens/Source/shotwell/src/ThumbnailCache.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 772 "ThumbnailCache.c"
+#line 974 "ThumbnailCache.c"
}
#line 7 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
value->data[0].v_pointer = thumbnails_ref (object);
-#line 776 "ThumbnailCache.c"
+#line 978 "ThumbnailCache.c"
} else {
#line 7 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
value->data[0].v_pointer = NULL;
-#line 780 "ThumbnailCache.c"
+#line 982 "ThumbnailCache.c"
}
#line 7 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
return NULL;
-#line 784 "ThumbnailCache.c"
+#line 986 "ThumbnailCache.c"
}
-static gchar* value_thumbnails_lcopy_value (const GValue* value, guint n_collect_values, GTypeCValue* collect_values, guint collect_flags) {
+static gchar*
+value_thumbnails_lcopy_value (const GValue* value,
+ guint n_collect_values,
+ GTypeCValue* collect_values,
+ guint collect_flags)
+{
Thumbnails ** object_p;
object_p = collect_values[0].v_pointer;
#line 7 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
if (!object_p) {
#line 7 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
return g_strdup_printf ("value location for `%s' passed as NULL", G_VALUE_TYPE_NAME (value));
-#line 795 "ThumbnailCache.c"
+#line 1002 "ThumbnailCache.c"
}
#line 7 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
if (!value->data[0].v_pointer) {
#line 7 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
*object_p = NULL;
-#line 801 "ThumbnailCache.c"
+#line 1008 "ThumbnailCache.c"
} else if (collect_flags & G_VALUE_NOCOPY_CONTENTS) {
#line 7 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
*object_p = value->data[0].v_pointer;
-#line 805 "ThumbnailCache.c"
+#line 1012 "ThumbnailCache.c"
} else {
#line 7 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
*object_p = thumbnails_ref (value->data[0].v_pointer);
-#line 809 "ThumbnailCache.c"
+#line 1016 "ThumbnailCache.c"
}
#line 7 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
return NULL;
-#line 813 "ThumbnailCache.c"
+#line 1020 "ThumbnailCache.c"
}
-GParamSpec* param_spec_thumbnails (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags) {
+GParamSpec*
+param_spec_thumbnails (const gchar* name,
+ const gchar* nick,
+ const gchar* blurb,
+ GType object_type,
+ GParamFlags flags)
+{
ParamSpecThumbnails* spec;
#line 7 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
g_return_val_if_fail (g_type_is_a (object_type, TYPE_THUMBNAILS), NULL);
@@ -823,20 +1036,25 @@ GParamSpec* param_spec_thumbnails (const gchar* name, const gchar* nick, const g
G_PARAM_SPEC (spec)->value_type = object_type;
#line 7 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
return G_PARAM_SPEC (spec);
-#line 827 "ThumbnailCache.c"
+#line 1040 "ThumbnailCache.c"
}
-gpointer value_get_thumbnails (const GValue* value) {
+gpointer
+value_get_thumbnails (const GValue* value)
+{
#line 7 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
g_return_val_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, TYPE_THUMBNAILS), NULL);
#line 7 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
return value->data[0].v_pointer;
-#line 836 "ThumbnailCache.c"
+#line 1051 "ThumbnailCache.c"
}
-void value_set_thumbnails (GValue* value, gpointer v_object) {
+void
+value_set_thumbnails (GValue* value,
+ gpointer v_object)
+{
Thumbnails * old;
#line 7 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
g_return_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, TYPE_THUMBNAILS));
@@ -852,22 +1070,25 @@ void value_set_thumbnails (GValue* value, gpointer v_object) {
value->data[0].v_pointer = v_object;
#line 7 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
thumbnails_ref (value->data[0].v_pointer);
-#line 856 "ThumbnailCache.c"
+#line 1074 "ThumbnailCache.c"
} else {
#line 7 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
value->data[0].v_pointer = NULL;
-#line 860 "ThumbnailCache.c"
+#line 1078 "ThumbnailCache.c"
}
#line 7 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
if (old) {
#line 7 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
thumbnails_unref (old);
-#line 866 "ThumbnailCache.c"
+#line 1084 "ThumbnailCache.c"
}
}
-void value_take_thumbnails (GValue* value, gpointer v_object) {
+void
+value_take_thumbnails (GValue* value,
+ gpointer v_object)
+{
Thumbnails * old;
#line 7 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
g_return_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, TYPE_THUMBNAILS));
@@ -881,33 +1102,37 @@ void value_take_thumbnails (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/ThumbnailCache.vala"
value->data[0].v_pointer = v_object;
-#line 885 "ThumbnailCache.c"
+#line 1106 "ThumbnailCache.c"
} else {
#line 7 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
value->data[0].v_pointer = NULL;
-#line 889 "ThumbnailCache.c"
+#line 1110 "ThumbnailCache.c"
}
#line 7 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
if (old) {
#line 7 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
thumbnails_unref (old);
-#line 895 "ThumbnailCache.c"
+#line 1116 "ThumbnailCache.c"
}
}
-static void thumbnails_class_init (ThumbnailsClass * klass) {
+static void
+thumbnails_class_init (ThumbnailsClass * klass)
+{
#line 7 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
thumbnails_parent_class = g_type_class_peek_parent (klass);
#line 7 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
((ThumbnailsClass *) klass)->finalize = thumbnails_finalize;
#line 7 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
g_type_class_add_private (klass, sizeof (ThumbnailsPrivate));
-#line 907 "ThumbnailCache.c"
+#line 1130 "ThumbnailCache.c"
}
-static void thumbnails_instance_init (Thumbnails * self) {
+static void
+thumbnails_instance_init (Thumbnails * self)
+{
GeeHashMap* _tmp0_;
#line 7 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
self->priv = THUMBNAILS_GET_PRIVATE (self);
@@ -917,11 +1142,13 @@ static void thumbnails_instance_init (Thumbnails * self) {
self->priv->map = _tmp0_;
#line 7 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
self->ref_count = 1;
-#line 921 "ThumbnailCache.c"
+#line 1146 "ThumbnailCache.c"
}
-static void thumbnails_finalize (Thumbnails * obj) {
+static void
+thumbnails_finalize (Thumbnails * obj)
+{
Thumbnails * self;
#line 7 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
self = G_TYPE_CHECK_INSTANCE_CAST (obj, TYPE_THUMBNAILS, Thumbnails);
@@ -929,11 +1156,13 @@ static void thumbnails_finalize (Thumbnails * obj) {
g_signal_handlers_destroy (self);
#line 8 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
_g_object_unref0 (self->priv->map);
-#line 933 "ThumbnailCache.c"
+#line 1160 "ThumbnailCache.c"
}
-GType thumbnails_get_type (void) {
+GType
+thumbnails_get_type (void)
+{
static volatile gsize thumbnails_type_id__volatile = 0;
if (g_once_init_enter (&thumbnails_type_id__volatile)) {
static const GTypeValueTable g_define_type_value_table = { value_thumbnails_init, value_thumbnails_free_value, value_thumbnails_copy_value, value_thumbnails_peek_pointer, "p", value_thumbnails_collect_value, "p", value_thumbnails_lcopy_value };
@@ -947,18 +1176,22 @@ GType thumbnails_get_type (void) {
}
-gpointer thumbnails_ref (gpointer instance) {
+gpointer
+thumbnails_ref (gpointer instance)
+{
Thumbnails * self;
self = instance;
#line 7 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
g_atomic_int_inc (&self->ref_count);
#line 7 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
return instance;
-#line 958 "ThumbnailCache.c"
+#line 1189 "ThumbnailCache.c"
}
-void thumbnails_unref (gpointer instance) {
+void
+thumbnails_unref (gpointer instance)
+{
Thumbnails * self;
self = instance;
#line 7 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
@@ -967,64 +1200,64 @@ void thumbnails_unref (gpointer instance) {
THUMBNAILS_GET_CLASS (self)->finalize (self);
#line 7 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
g_type_free_instance ((GTypeInstance *) self);
-#line 971 "ThumbnailCache.c"
+#line 1204 "ThumbnailCache.c"
}
}
-gint thumbnail_cache_size_get_scale (ThumbnailCacheSize self) {
+gint
+thumbnail_cache_size_get_scale (ThumbnailCacheSize self)
+{
gint result = 0;
#line 42 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
result = (gint) self;
#line 42 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
return result;
-#line 982 "ThumbnailCache.c"
+#line 1217 "ThumbnailCache.c"
}
-void thumbnail_cache_size_get_scaling (ThumbnailCacheSize self, Scaling* result) {
- gint _tmp0_;
- Scaling _tmp1_ = {0};
-#line 46 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
- _tmp0_ = thumbnail_cache_size_get_scale (self);
+void
+thumbnail_cache_size_get_scaling (ThumbnailCacheSize self,
+ Scaling* result)
+{
+ Scaling _tmp0_ = {0};
#line 46 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
- scaling_for_best_fit (_tmp0_, TRUE, &_tmp1_);
+ scaling_for_best_fit (thumbnail_cache_size_get_scale (self), TRUE, &_tmp0_);
#line 46 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
- *result = _tmp1_;
+ *result = _tmp0_;
#line 46 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
return;
-#line 997 "ThumbnailCache.c"
+#line 1232 "ThumbnailCache.c"
}
-ThumbnailCacheSize thumbnail_cache_size_get_best_size (gint scale) {
+ThumbnailCacheSize
+thumbnail_cache_size_get_best_size (gint scale)
+{
ThumbnailCacheSize result = 0;
ThumbnailCacheSize _tmp0_ = 0;
- gint _tmp1_;
- gint _tmp2_;
#line 50 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
- _tmp1_ = scale;
-#line 50 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
- _tmp2_ = thumbnail_cache_size_get_scale (THUMBNAIL_CACHE_SIZE_MEDIUM);
-#line 50 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
- if (_tmp1_ <= _tmp2_) {
+ if (scale <= thumbnail_cache_size_get_scale (THUMBNAIL_CACHE_SIZE_MEDIUM)) {
#line 50 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
_tmp0_ = THUMBNAIL_CACHE_SIZE_MEDIUM;
-#line 1014 "ThumbnailCache.c"
+#line 1245 "ThumbnailCache.c"
} else {
#line 50 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
_tmp0_ = THUMBNAIL_CACHE_SIZE_BIG;
-#line 1018 "ThumbnailCache.c"
+#line 1249 "ThumbnailCache.c"
}
#line 50 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
result = _tmp0_;
#line 50 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
return result;
-#line 1024 "ThumbnailCache.c"
+#line 1255 "ThumbnailCache.c"
}
-GType thumbnail_cache_size_get_type (void) {
+GType
+thumbnail_cache_size_get_type (void)
+{
static volatile gsize thumbnail_cache_size_type_id__volatile = 0;
if (g_once_init_enter (&thumbnail_cache_size_type_id__volatile)) {
static const GEnumValue values[] = {{THUMBNAIL_CACHE_SIZE_LARGEST, "THUMBNAIL_CACHE_SIZE_LARGEST", "largest"}, {THUMBNAIL_CACHE_SIZE_BIG, "THUMBNAIL_CACHE_SIZE_BIG", "big"}, {THUMBNAIL_CACHE_SIZE_MEDIUM, "THUMBNAIL_CACHE_SIZE_MEDIUM", "medium"}, {THUMBNAIL_CACHE_SIZE_SMALLEST, "THUMBNAIL_CACHE_SIZE_SMALLEST", "smallest"}, {0, NULL, NULL}};
@@ -1036,77 +1269,73 @@ GType thumbnail_cache_size_get_type (void) {
}
-static ThumbnailCache* thumbnail_cache_construct (GType object_type, ThumbnailCacheSize size, gulong max_cached_bytes, GdkInterpType interp, JpegQuality quality) {
+static ThumbnailCache*
+thumbnail_cache_construct (GType object_type,
+ ThumbnailCacheSize size,
+ gulong max_cached_bytes,
+ GdkInterpType interp,
+ JpegQuality quality)
+{
ThumbnailCache * self = NULL;
- ThumbnailCacheSize _tmp0_;
- gint _tmp1_;
- gchar* _tmp2_;
- gchar* _tmp3_;
- GFile* _tmp4_;
- ThumbnailCacheSize _tmp5_;
- gulong _tmp6_;
- GdkInterpType _tmp7_;
- JpegQuality _tmp8_;
+ gchar* _tmp0_;
+ gchar* _tmp1_;
+ GFile* _tmp2_;
#line 190 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
self = (ThumbnailCache*) g_object_new (object_type, NULL);
#line 192 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
- _tmp0_ = size;
-#line 192 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
- _tmp1_ = thumbnail_cache_size_get_scale (_tmp0_);
+ _tmp0_ = g_strdup_printf ("thumbs%d", thumbnail_cache_size_get_scale (size));
#line 192 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
- _tmp2_ = g_strdup_printf ("thumbs%d", _tmp1_);
+ _tmp1_ = _tmp0_;
#line 192 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
- _tmp3_ = _tmp2_;
-#line 192 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
- _tmp4_ = app_dirs_get_cache_subdir ("thumbs", _tmp3_);
+ _tmp2_ = app_dirs_get_cache_subdir ("thumbs", _tmp1_);
#line 192 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
_g_object_unref0 (self->priv->cache_dir);
#line 192 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
- self->priv->cache_dir = _tmp4_;
+ self->priv->cache_dir = _tmp2_;
#line 192 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
- _g_free0 (_tmp3_);
-#line 193 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
- _tmp5_ = size;
+ _g_free0 (_tmp1_);
#line 193 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
- self->priv->size = _tmp5_;
-#line 194 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
- _tmp6_ = max_cached_bytes;
+ self->priv->size = size;
#line 194 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
- self->priv->max_cached_bytes = _tmp6_;
+ self->priv->max_cached_bytes = max_cached_bytes;
#line 195 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
- _tmp7_ = interp;
-#line 195 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
- self->priv->interp = _tmp7_;
-#line 196 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
- _tmp8_ = quality;
+ self->priv->interp = interp;
#line 196 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
- self->priv->quality = _tmp8_;
+ self->priv->quality = quality;
#line 190 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
return self;
-#line 1087 "ThumbnailCache.c"
+#line 1308 "ThumbnailCache.c"
}
-static ThumbnailCache* thumbnail_cache_new (ThumbnailCacheSize size, gulong max_cached_bytes, GdkInterpType interp, JpegQuality quality) {
+static ThumbnailCache*
+thumbnail_cache_new (ThumbnailCacheSize size,
+ gulong max_cached_bytes,
+ GdkInterpType interp,
+ JpegQuality quality)
+{
#line 190 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
return thumbnail_cache_construct (TYPE_THUMBNAIL_CACHE, size, max_cached_bytes, interp, quality);
-#line 1094 "ThumbnailCache.c"
+#line 1320 "ThumbnailCache.c"
}
-static void _thumbnail_cache_report_cycle_one_shot_callback (gpointer self) {
+static void
+_thumbnail_cache_report_cycle_one_shot_callback (gpointer self)
+{
#line 201 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
thumbnail_cache_report_cycle ();
-#line 1101 "ThumbnailCache.c"
+#line 1329 "ThumbnailCache.c"
}
-void thumbnail_cache_init (void) {
+void
+thumbnail_cache_init (void)
+{
OneShotScheduler* _tmp0_;
- guint _tmp1_;
- Workers* _tmp2_;
+ Workers* _tmp1_;
+ ThumbnailCache* _tmp2_;
ThumbnailCache* _tmp3_;
- ThumbnailCache* _tmp4_;
#line 201 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
_tmp0_ = one_shot_scheduler_new ("ThumbnailCache cycle reporter", _thumbnail_cache_report_cycle_one_shot_callback, NULL);
#line 201 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
@@ -1114,104 +1343,92 @@ void thumbnail_cache_init (void) {
#line 201 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
thumbnail_cache_debug_scheduler = _tmp0_;
#line 202 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
- _tmp1_ = workers_threads_per_cpu (1, -1);
-#line 202 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
- _tmp2_ = workers_new (_tmp1_, TRUE);
+ _tmp1_ = workers_new (workers_threads_per_cpu (1, -1), TRUE);
#line 202 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
_workers_unref0 (thumbnail_cache_fetch_workers);
#line 202 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
- thumbnail_cache_fetch_workers = _tmp2_;
+ thumbnail_cache_fetch_workers = _tmp1_;
#line 204 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
- _tmp3_ = thumbnail_cache_new (THUMBNAIL_CACHE_SIZE_BIG, THUMBNAIL_CACHE_MAX_BIG_CACHED_BYTES, THUMBNAIL_CACHE_DEFAULT_INTERP, THUMBNAIL_CACHE_DEFAULT_QUALITY);
+ _tmp2_ = thumbnail_cache_new (THUMBNAIL_CACHE_SIZE_BIG, THUMBNAIL_CACHE_MAX_BIG_CACHED_BYTES, THUMBNAIL_CACHE_DEFAULT_INTERP, THUMBNAIL_CACHE_DEFAULT_QUALITY);
#line 204 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
_g_object_unref0 (thumbnail_cache_big);
#line 204 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
- thumbnail_cache_big = _tmp3_;
+ thumbnail_cache_big = _tmp2_;
#line 205 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
- _tmp4_ = thumbnail_cache_new (THUMBNAIL_CACHE_SIZE_MEDIUM, THUMBNAIL_CACHE_MAX_MEDIUM_CACHED_BYTES, THUMBNAIL_CACHE_DEFAULT_INTERP, THUMBNAIL_CACHE_DEFAULT_QUALITY);
+ _tmp3_ = thumbnail_cache_new (THUMBNAIL_CACHE_SIZE_MEDIUM, THUMBNAIL_CACHE_MAX_MEDIUM_CACHED_BYTES, THUMBNAIL_CACHE_DEFAULT_INTERP, THUMBNAIL_CACHE_DEFAULT_QUALITY);
#line 205 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
_g_object_unref0 (thumbnail_cache_medium);
#line 205 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
- thumbnail_cache_medium = _tmp4_;
-#line 1137 "ThumbnailCache.c"
+ thumbnail_cache_medium = _tmp3_;
+#line 1364 "ThumbnailCache.c"
}
-void thumbnail_cache_terminate (void) {
+void
+thumbnail_cache_terminate (void)
+{
}
-void thumbnail_cache_import_from_source (ThumbnailSource* source, gboolean force, GError** error) {
- ThumbnailSource* _tmp0_;
+void
+thumbnail_cache_import_from_source (ThumbnailSource* source,
+ gboolean force,
+ GError** error)
+{
+ gchar* _tmp0_;
gchar* _tmp1_;
- gchar* _tmp2_;
+ ThumbnailCache* _tmp2_;
ThumbnailCache* _tmp3_;
- ThumbnailSource* _tmp4_;
- gboolean _tmp5_;
- ThumbnailCache* _tmp6_;
- ThumbnailSource* _tmp7_;
- gboolean _tmp8_;
GError * _inner_error_ = NULL;
#line 211 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
g_return_if_fail (IS_THUMBNAIL_SOURCE (source));
#line 213 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
- _tmp0_ = source;
+ _tmp0_ = data_object_to_string (G_TYPE_CHECK_INSTANCE_CAST (source, TYPE_DATA_OBJECT, DataObject));
#line 213 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
- _tmp1_ = data_object_to_string (G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, TYPE_DATA_OBJECT, DataObject));
-#line 213 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
- _tmp2_ = _tmp1_;
+ _tmp1_ = _tmp0_;
#line 213 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
- g_debug ("ThumbnailCache.vala:213: import from source: %s", _tmp2_);
+ g_debug ("ThumbnailCache.vala:213: import from source: %s", _tmp1_);
#line 213 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
- _g_free0 (_tmp2_);
-#line 214 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
- _tmp3_ = thumbnail_cache_big;
+ _g_free0 (_tmp1_);
#line 214 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
- _tmp4_ = source;
+ _tmp2_ = thumbnail_cache_big;
#line 214 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
- _tmp5_ = force;
-#line 214 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
- _thumbnail_cache_import_from_source (_tmp3_, _tmp4_, _tmp5_, &_inner_error_);
+ _thumbnail_cache_import_from_source (_tmp2_, source, force, &_inner_error_);
#line 214 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 214 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
g_propagate_error (error, _inner_error_);
#line 214 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
return;
-#line 1182 "ThumbnailCache.c"
+#line 1404 "ThumbnailCache.c"
}
#line 215 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
- _tmp6_ = thumbnail_cache_medium;
-#line 215 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
- _tmp7_ = source;
-#line 215 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
- _tmp8_ = force;
+ _tmp3_ = thumbnail_cache_medium;
#line 215 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
- _thumbnail_cache_import_from_source (_tmp6_, _tmp7_, _tmp8_, &_inner_error_);
+ _thumbnail_cache_import_from_source (_tmp3_, source, force, &_inner_error_);
#line 215 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 215 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
g_propagate_error (error, _inner_error_);
#line 215 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
return;
-#line 1198 "ThumbnailCache.c"
+#line 1416 "ThumbnailCache.c"
}
}
-void thumbnail_cache_import_thumbnails (ThumbnailSource* source, Thumbnails* thumbnails, gboolean force, GError** error) {
+void
+thumbnail_cache_import_thumbnails (ThumbnailSource* source,
+ Thumbnails* thumbnails,
+ gboolean force,
+ GError** error)
+{
ThumbnailCache* _tmp0_;
- ThumbnailSource* _tmp1_;
- Thumbnails* _tmp2_;
- GdkPixbuf* _tmp3_;
+ GdkPixbuf* _tmp1_;
+ GdkPixbuf* _tmp2_;
+ ThumbnailCache* _tmp3_;
GdkPixbuf* _tmp4_;
- gboolean _tmp5_;
- ThumbnailCache* _tmp6_;
- ThumbnailSource* _tmp7_;
- Thumbnails* _tmp8_;
- GdkPixbuf* _tmp9_;
- GdkPixbuf* _tmp10_;
- gboolean _tmp11_;
+ GdkPixbuf* _tmp5_;
GError * _inner_error_ = NULL;
#line 218 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
g_return_if_fail (IS_THUMBNAIL_SOURCE (source));
@@ -1220,61 +1437,48 @@ void thumbnail_cache_import_thumbnails (ThumbnailSource* source, Thumbnails* thu
#line 220 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
_tmp0_ = thumbnail_cache_big;
#line 220 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
- _tmp1_ = source;
-#line 220 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
- _tmp2_ = thumbnails;
-#line 220 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
- _tmp3_ = thumbnails_get (_tmp2_, THUMBNAIL_CACHE_SIZE_BIG);
-#line 220 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
- _tmp4_ = _tmp3_;
+ _tmp1_ = thumbnails_get (thumbnails, THUMBNAIL_CACHE_SIZE_BIG);
#line 220 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
- _tmp5_ = force;
+ _tmp2_ = _tmp1_;
#line 220 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
- _thumbnail_cache_import_thumbnail (_tmp0_, _tmp1_, _tmp4_, _tmp5_, &_inner_error_);
+ _thumbnail_cache_import_thumbnail (_tmp0_, source, _tmp2_, force, &_inner_error_);
#line 220 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
- _g_object_unref0 (_tmp4_);
+ _g_object_unref0 (_tmp2_);
#line 220 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 220 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
g_propagate_error (error, _inner_error_);
#line 220 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
return;
-#line 1243 "ThumbnailCache.c"
+#line 1454 "ThumbnailCache.c"
}
#line 221 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
- _tmp6_ = thumbnail_cache_medium;
-#line 221 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
- _tmp7_ = source;
-#line 221 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
- _tmp8_ = thumbnails;
-#line 221 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
- _tmp9_ = thumbnails_get (_tmp8_, THUMBNAIL_CACHE_SIZE_MEDIUM);
+ _tmp3_ = thumbnail_cache_medium;
#line 221 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
- _tmp10_ = _tmp9_;
+ _tmp4_ = thumbnails_get (thumbnails, THUMBNAIL_CACHE_SIZE_MEDIUM);
#line 221 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
- _tmp11_ = force;
+ _tmp5_ = _tmp4_;
#line 221 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
- _thumbnail_cache_import_thumbnail (_tmp6_, _tmp7_, _tmp10_, _tmp11_, &_inner_error_);
+ _thumbnail_cache_import_thumbnail (_tmp3_, source, _tmp5_, force, &_inner_error_);
#line 221 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
- _g_object_unref0 (_tmp10_);
+ _g_object_unref0 (_tmp5_);
#line 221 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 221 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
g_propagate_error (error, _inner_error_);
#line 221 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
return;
-#line 1267 "ThumbnailCache.c"
+#line 1472 "ThumbnailCache.c"
}
}
-void thumbnail_cache_duplicate (ThumbnailSource* src_source, ThumbnailSource* dest_source) {
+void
+thumbnail_cache_duplicate (ThumbnailSource* src_source,
+ ThumbnailSource* dest_source)
+{
ThumbnailCache* _tmp0_;
- ThumbnailSource* _tmp1_;
- ThumbnailSource* _tmp2_;
- ThumbnailCache* _tmp3_;
- ThumbnailSource* _tmp4_;
- ThumbnailSource* _tmp5_;
+ ThumbnailCache* _tmp1_;
#line 224 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
g_return_if_fail (IS_THUMBNAIL_SOURCE (src_source));
#line 224 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
@@ -1282,263 +1486,225 @@ void thumbnail_cache_duplicate (ThumbnailSource* src_source, ThumbnailSource* de
#line 225 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
_tmp0_ = thumbnail_cache_big;
#line 225 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
- _tmp1_ = src_source;
-#line 225 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
- _tmp2_ = dest_source;
-#line 225 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
- _thumbnail_cache_duplicate (_tmp0_, _tmp1_, _tmp2_);
-#line 226 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
- _tmp3_ = thumbnail_cache_medium;
-#line 226 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
- _tmp4_ = src_source;
+ _thumbnail_cache_duplicate (_tmp0_, src_source, dest_source);
#line 226 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
- _tmp5_ = dest_source;
+ _tmp1_ = thumbnail_cache_medium;
#line 226 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
- _thumbnail_cache_duplicate (_tmp3_, _tmp4_, _tmp5_);
-#line 1299 "ThumbnailCache.c"
+ _thumbnail_cache_duplicate (_tmp1_, src_source, dest_source);
+#line 1495 "ThumbnailCache.c"
}
-void thumbnail_cache_remove (ThumbnailSource* source) {
+void
+thumbnail_cache_remove (ThumbnailSource* source)
+{
ThumbnailCache* _tmp0_;
- ThumbnailSource* _tmp1_;
- ThumbnailCache* _tmp2_;
- ThumbnailSource* _tmp3_;
+ ThumbnailCache* _tmp1_;
#line 229 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
g_return_if_fail (IS_THUMBNAIL_SOURCE (source));
#line 230 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
_tmp0_ = thumbnail_cache_big;
#line 230 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
- _tmp1_ = source;
-#line 230 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
- _thumbnail_cache_remove (_tmp0_, _tmp1_);
-#line 231 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
- _tmp2_ = thumbnail_cache_medium;
+ _thumbnail_cache_remove (_tmp0_, source);
#line 231 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
- _tmp3_ = source;
+ _tmp1_ = thumbnail_cache_medium;
#line 231 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
- _thumbnail_cache_remove (_tmp2_, _tmp3_);
-#line 1322 "ThumbnailCache.c"
+ _thumbnail_cache_remove (_tmp1_, source);
+#line 1514 "ThumbnailCache.c"
}
-static gpointer _g_object_ref0 (gpointer self) {
+static gpointer
+_g_object_ref0 (gpointer self)
+{
#line 237 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
return self ? g_object_ref (self) : NULL;
-#line 1329 "ThumbnailCache.c"
+#line 1523 "ThumbnailCache.c"
}
-static ThumbnailCache* thumbnail_cache_get_best_cache (gint scale) {
+static ThumbnailCache*
+thumbnail_cache_get_best_cache (gint scale)
+{
ThumbnailCache* result = NULL;
ThumbnailCacheSize size = 0;
- gint _tmp0_;
- ThumbnailCacheSize _tmp1_;
- ThumbnailCacheSize _tmp2_;
-#line 235 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
- _tmp0_ = scale;
-#line 235 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
- _tmp1_ = thumbnail_cache_size_get_best_size (_tmp0_);
+ ThumbnailCacheSize _tmp0_;
#line 235 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
- size = _tmp1_;
+ size = thumbnail_cache_size_get_best_size (scale);
#line 236 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
- _tmp2_ = size;
+ _tmp0_ = size;
#line 236 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
- if (_tmp2_ == THUMBNAIL_CACHE_SIZE_BIG) {
-#line 1349 "ThumbnailCache.c"
- ThumbnailCache* _tmp3_;
- ThumbnailCache* _tmp4_;
+ if (_tmp0_ == THUMBNAIL_CACHE_SIZE_BIG) {
+#line 1539 "ThumbnailCache.c"
+ ThumbnailCache* _tmp1_;
+ ThumbnailCache* _tmp2_;
#line 237 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
- _tmp3_ = thumbnail_cache_big;
+ _tmp1_ = thumbnail_cache_big;
#line 237 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
- _tmp4_ = _g_object_ref0 (_tmp3_);
+ _tmp2_ = _g_object_ref0 (_tmp1_);
#line 237 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
- result = _tmp4_;
+ result = _tmp2_;
#line 237 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
return result;
-#line 1360 "ThumbnailCache.c"
+#line 1550 "ThumbnailCache.c"
} else {
- ThumbnailCacheSize _tmp5_;
- ThumbnailCache* _tmp6_;
- ThumbnailCache* _tmp7_;
+ ThumbnailCacheSize _tmp3_;
+ ThumbnailCache* _tmp4_;
+ ThumbnailCache* _tmp5_;
#line 239 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
- _tmp5_ = size;
+ _tmp3_ = size;
#line 239 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
- _vala_assert (_tmp5_ == THUMBNAIL_CACHE_SIZE_MEDIUM, "size == Size.MEDIUM");
+ _vala_assert (_tmp3_ == THUMBNAIL_CACHE_SIZE_MEDIUM, "size == Size.MEDIUM");
#line 241 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
- _tmp6_ = thumbnail_cache_medium;
+ _tmp4_ = thumbnail_cache_medium;
#line 241 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
- _tmp7_ = _g_object_ref0 (_tmp6_);
+ _tmp5_ = _g_object_ref0 (_tmp4_);
#line 241 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
- result = _tmp7_;
+ result = _tmp5_;
#line 241 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
return result;
-#line 1377 "ThumbnailCache.c"
+#line 1567 "ThumbnailCache.c"
}
}
-static ThumbnailCache* thumbnail_cache_get_cache_for (ThumbnailCacheSize size) {
+static ThumbnailCache*
+thumbnail_cache_get_cache_for (ThumbnailCacheSize size)
+{
ThumbnailCache* result = NULL;
- ThumbnailCacheSize _tmp0_;
-#line 246 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
- _tmp0_ = size;
#line 246 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
- switch (_tmp0_) {
+ switch (size) {
#line 246 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
case THUMBNAIL_CACHE_SIZE_BIG:
-#line 1391 "ThumbnailCache.c"
+#line 1580 "ThumbnailCache.c"
{
+ ThumbnailCache* _tmp0_;
ThumbnailCache* _tmp1_;
- ThumbnailCache* _tmp2_;
#line 248 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
- _tmp1_ = thumbnail_cache_big;
+ _tmp0_ = thumbnail_cache_big;
#line 248 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
- _tmp2_ = _g_object_ref0 (_tmp1_);
+ _tmp1_ = _g_object_ref0 (_tmp0_);
#line 248 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
- result = _tmp2_;
+ result = _tmp1_;
#line 248 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
return result;
-#line 1403 "ThumbnailCache.c"
+#line 1592 "ThumbnailCache.c"
}
#line 246 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
case THUMBNAIL_CACHE_SIZE_MEDIUM:
-#line 1407 "ThumbnailCache.c"
+#line 1596 "ThumbnailCache.c"
{
+ ThumbnailCache* _tmp2_;
ThumbnailCache* _tmp3_;
- ThumbnailCache* _tmp4_;
#line 251 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
- _tmp3_ = thumbnail_cache_medium;
+ _tmp2_ = thumbnail_cache_medium;
#line 251 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
- _tmp4_ = _g_object_ref0 (_tmp3_);
+ _tmp3_ = _g_object_ref0 (_tmp2_);
#line 251 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
- result = _tmp4_;
+ result = _tmp3_;
#line 251 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
return result;
-#line 1419 "ThumbnailCache.c"
+#line 1608 "ThumbnailCache.c"
}
default:
{
- ThumbnailCacheSize _tmp5_;
- gint _tmp6_;
-#line 254 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
- _tmp5_ = size;
-#line 254 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
- _tmp6_ = thumbnail_cache_size_get_scale (_tmp5_);
#line 254 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
- g_error ("ThumbnailCache.vala:254: Unknown thumbnail size %d", _tmp6_);
-#line 1431 "ThumbnailCache.c"
+ g_error ("ThumbnailCache.vala:254: Unknown thumbnail size %d", thumbnail_cache_size_get_scale (size));
+#line 1614 "ThumbnailCache.c"
}
}
}
-GdkPixbuf* thumbnail_cache_fetch (ThumbnailSource* source, gint scale, GError** error) {
+GdkPixbuf*
+thumbnail_cache_fetch (ThumbnailSource* source,
+ gint scale,
+ GError** error)
+{
GdkPixbuf* result = NULL;
GdkPixbuf* _tmp0_ = NULL;
- gint _tmp1_;
+ ThumbnailCache* _tmp1_;
ThumbnailCache* _tmp2_;
- ThumbnailCache* _tmp3_;
- ThumbnailSource* _tmp4_;
+ GdkPixbuf* _tmp3_;
+ GdkPixbuf* _tmp4_;
GdkPixbuf* _tmp5_;
- GdkPixbuf* _tmp6_;
- GdkPixbuf* _tmp7_;
GError * _inner_error_ = NULL;
#line 258 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
g_return_val_if_fail (IS_THUMBNAIL_SOURCE (source), NULL);
#line 259 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
- _tmp1_ = scale;
-#line 259 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
- _tmp2_ = thumbnail_cache_get_best_cache (_tmp1_);
-#line 259 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
- _tmp3_ = _tmp2_;
+ _tmp1_ = thumbnail_cache_get_best_cache (scale);
#line 259 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
- _tmp4_ = source;
+ _tmp2_ = _tmp1_;
#line 259 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
- _tmp5_ = _thumbnail_cache_fetch (_tmp3_, _tmp4_, &_inner_error_);
+ _tmp3_ = _thumbnail_cache_fetch (_tmp2_, source, &_inner_error_);
#line 259 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
- _tmp6_ = _tmp5_;
+ _tmp4_ = _tmp3_;
#line 259 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
- _g_object_unref0 (_tmp3_);
+ _g_object_unref0 (_tmp2_);
#line 259 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
- _tmp0_ = _tmp6_;
+ _tmp0_ = _tmp4_;
#line 259 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 259 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
g_propagate_error (error, _inner_error_);
#line 259 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
return NULL;
-#line 1472 "ThumbnailCache.c"
+#line 1653 "ThumbnailCache.c"
}
#line 259 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
- _tmp7_ = _tmp0_;
+ _tmp5_ = _tmp0_;
#line 259 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
_tmp0_ = NULL;
#line 259 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
- result = _tmp7_;
+ result = _tmp5_;
#line 259 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
_g_object_unref0 (_tmp0_);
#line 259 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
return result;
-#line 1484 "ThumbnailCache.c"
+#line 1665 "ThumbnailCache.c"
}
-void thumbnail_cache_fetch_async (ThumbnailSource* source, gint scale, ThumbnailCacheAsyncFetchCallback callback, void* callback_target, GCancellable* cancellable) {
- gint _tmp0_;
+void
+thumbnail_cache_fetch_async (ThumbnailSource* source,
+ gint scale,
+ ThumbnailCacheAsyncFetchCallback callback,
+ void* callback_target,
+ GCancellable* cancellable)
+{
+ ThumbnailCache* _tmp0_;
ThumbnailCache* _tmp1_;
- ThumbnailCache* _tmp2_;
- ThumbnailSource* _tmp3_;
- ThumbnailSource* _tmp4_;
- PhotoFileFormat _tmp5_;
- Dimensions _tmp6_ = {0};
- ThumbnailCacheAsyncFetchCallback _tmp7_;
- void* _tmp7__target;
- GCancellable* _tmp8_;
+ Dimensions _tmp2_ = {0};
#line 262 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
g_return_if_fail (IS_THUMBNAIL_SOURCE (source));
#line 262 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
g_return_if_fail ((cancellable == NULL) || G_IS_CANCELLABLE (cancellable));
#line 264 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
- _tmp0_ = scale;
-#line 264 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
- _tmp1_ = thumbnail_cache_get_best_cache (_tmp0_);
-#line 264 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
- _tmp2_ = _tmp1_;
-#line 264 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
- _tmp3_ = source;
-#line 264 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
- _tmp4_ = source;
-#line 264 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
- _tmp5_ = thumbnail_source_get_preferred_thumbnail_format (_tmp4_);
-#line 264 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
- dimensions_init (&_tmp6_, 0, 0);
+ _tmp0_ = thumbnail_cache_get_best_cache (scale);
#line 264 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
- _tmp7_ = callback;
+ _tmp1_ = _tmp0_;
#line 264 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
- _tmp7__target = callback_target;
+ dimensions_init (&_tmp2_, 0, 0);
#line 264 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
- _tmp8_ = cancellable;
+ _thumbnail_cache_fetch_async (_tmp1_, source, thumbnail_source_get_preferred_thumbnail_format (source), &_tmp2_, THUMBNAIL_CACHE_DEFAULT_INTERP, callback, callback_target, cancellable);
#line 264 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
- _thumbnail_cache_fetch_async (_tmp2_, _tmp3_, _tmp5_, &_tmp6_, THUMBNAIL_CACHE_DEFAULT_INTERP, _tmp7_, _tmp7__target, _tmp8_);
-#line 264 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
- _g_object_unref0 (_tmp2_);
-#line 1527 "ThumbnailCache.c"
+ _g_object_unref0 (_tmp1_);
+#line 1693 "ThumbnailCache.c"
}
-void thumbnail_cache_fetch_async_scaled (ThumbnailSource* source, gint scale, Dimensions* dim, GdkInterpType interp, ThumbnailCacheAsyncFetchCallback callback, void* callback_target, GCancellable* cancellable) {
- gint _tmp0_;
+void
+thumbnail_cache_fetch_async_scaled (ThumbnailSource* source,
+ gint scale,
+ Dimensions* dim,
+ GdkInterpType interp,
+ ThumbnailCacheAsyncFetchCallback callback,
+ void* callback_target,
+ GCancellable* cancellable)
+{
+ ThumbnailCache* _tmp0_;
ThumbnailCache* _tmp1_;
- ThumbnailCache* _tmp2_;
- ThumbnailSource* _tmp3_;
- ThumbnailSource* _tmp4_;
- PhotoFileFormat _tmp5_;
- Dimensions _tmp6_;
- GdkInterpType _tmp7_;
- ThumbnailCacheAsyncFetchCallback _tmp8_;
- void* _tmp8__target;
- GCancellable* _tmp9_;
+ Dimensions _tmp2_;
#line 268 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
g_return_if_fail (IS_THUMBNAIL_SOURCE (source));
#line 268 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
@@ -1546,114 +1712,88 @@ void thumbnail_cache_fetch_async_scaled (ThumbnailSource* source, gint scale, Di
#line 268 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
g_return_if_fail ((cancellable == NULL) || G_IS_CANCELLABLE (cancellable));
#line 270 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
- _tmp0_ = scale;
-#line 270 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
- _tmp1_ = thumbnail_cache_get_best_cache (_tmp0_);
-#line 270 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
- _tmp2_ = _tmp1_;
-#line 270 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
- _tmp3_ = source;
-#line 270 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
- _tmp4_ = source;
-#line 270 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
- _tmp5_ = thumbnail_source_get_preferred_thumbnail_format (_tmp4_);
-#line 270 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
- _tmp6_ = *dim;
-#line 270 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
- _tmp7_ = interp;
+ _tmp0_ = thumbnail_cache_get_best_cache (scale);
#line 270 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
- _tmp8_ = callback;
+ _tmp1_ = _tmp0_;
#line 270 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
- _tmp8__target = callback_target;
+ _tmp2_ = *dim;
#line 270 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
- _tmp9_ = cancellable;
+ _thumbnail_cache_fetch_async (_tmp1_, source, thumbnail_source_get_preferred_thumbnail_format (source), &_tmp2_, interp, callback, callback_target, cancellable);
#line 270 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
- _thumbnail_cache_fetch_async (_tmp2_, _tmp3_, _tmp5_, &_tmp6_, _tmp7_, _tmp8_, _tmp8__target, _tmp9_);
-#line 270 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
- _g_object_unref0 (_tmp2_);
-#line 1575 "ThumbnailCache.c"
+ _g_object_unref0 (_tmp1_);
+#line 1725 "ThumbnailCache.c"
}
-void thumbnail_cache_replace (ThumbnailSource* source, ThumbnailCacheSize size, GdkPixbuf* replacement, GError** error) {
- ThumbnailCacheSize _tmp0_;
+void
+thumbnail_cache_replace (ThumbnailSource* source,
+ ThumbnailCacheSize size,
+ GdkPixbuf* replacement,
+ GError** error)
+{
+ ThumbnailCache* _tmp0_;
ThumbnailCache* _tmp1_;
- ThumbnailCache* _tmp2_;
- ThumbnailSource* _tmp3_;
- GdkPixbuf* _tmp4_;
GError * _inner_error_ = NULL;
#line 274 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
g_return_if_fail (IS_THUMBNAIL_SOURCE (source));
#line 274 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
g_return_if_fail (GDK_IS_PIXBUF (replacement));
#line 276 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
- _tmp0_ = size;
+ _tmp0_ = thumbnail_cache_get_cache_for (size);
#line 276 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
- _tmp1_ = thumbnail_cache_get_cache_for (_tmp0_);
-#line 276 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
- _tmp2_ = _tmp1_;
+ _tmp1_ = _tmp0_;
#line 276 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
- _tmp3_ = source;
+ _thumbnail_cache_replace (_tmp1_, source, replacement, &_inner_error_);
#line 276 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
- _tmp4_ = replacement;
-#line 276 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
- _thumbnail_cache_replace (_tmp2_, _tmp3_, _tmp4_, &_inner_error_);
-#line 276 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
- _g_object_unref0 (_tmp2_);
+ _g_object_unref0 (_tmp1_);
#line 276 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 276 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
g_propagate_error (error, _inner_error_);
#line 276 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
return;
-#line 1610 "ThumbnailCache.c"
+#line 1756 "ThumbnailCache.c"
}
}
-gboolean thumbnail_cache_exists (ThumbnailSource* source) {
+gboolean
+thumbnail_cache_exists (ThumbnailSource* source)
+{
gboolean result = FALSE;
gboolean _tmp0_ = FALSE;
ThumbnailCache* _tmp1_;
- ThumbnailSource* _tmp2_;
- gboolean _tmp3_;
#line 279 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
g_return_val_if_fail (IS_THUMBNAIL_SOURCE (source), FALSE);
#line 280 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
_tmp1_ = thumbnail_cache_big;
#line 280 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
- _tmp2_ = source;
+ if (_thumbnail_cache_exists (_tmp1_, source)) {
+#line 1773 "ThumbnailCache.c"
+ ThumbnailCache* _tmp2_;
#line 280 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
- _tmp3_ = _thumbnail_cache_exists (_tmp1_, _tmp2_);
+ _tmp2_ = thumbnail_cache_medium;
#line 280 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
- if (_tmp3_) {
-#line 1631 "ThumbnailCache.c"
- ThumbnailCache* _tmp4_;
- ThumbnailSource* _tmp5_;
- gboolean _tmp6_;
-#line 280 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
- _tmp4_ = thumbnail_cache_medium;
-#line 280 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
- _tmp5_ = source;
-#line 280 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
- _tmp6_ = _thumbnail_cache_exists (_tmp4_, _tmp5_);
-#line 280 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
- _tmp0_ = _tmp6_;
-#line 1643 "ThumbnailCache.c"
+ _tmp0_ = _thumbnail_cache_exists (_tmp2_, source);
+#line 1779 "ThumbnailCache.c"
} else {
#line 280 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
_tmp0_ = FALSE;
-#line 1647 "ThumbnailCache.c"
+#line 1783 "ThumbnailCache.c"
}
#line 280 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
result = _tmp0_;
#line 280 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
return result;
-#line 1653 "ThumbnailCache.c"
+#line 1789 "ThumbnailCache.c"
}
-void thumbnail_cache_rotate (ThumbnailSource* source, Rotation rotation, GError** error) {
+void
+thumbnail_cache_rotate (ThumbnailSource* source,
+ Rotation rotation,
+ GError** error)
+{
ThumbnailCacheSize* _tmp0_;
gint _tmp0__length1;
GError * _inner_error_ = NULL;
@@ -1663,7 +1803,7 @@ void thumbnail_cache_rotate (ThumbnailSource* source, Rotation rotation, GError*
_tmp0_ = thumbnail_cache_ALL_SIZES;
#line 284 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
_tmp0__length1 = thumbnail_cache_ALL_SIZES_length1;
-#line 1667 "ThumbnailCache.c"
+#line 1807 "ThumbnailCache.c"
{
ThumbnailCacheSize* size_collection = NULL;
gint size_collection_length1 = 0;
@@ -1675,56 +1815,47 @@ void thumbnail_cache_rotate (ThumbnailSource* source, Rotation rotation, GError*
size_collection_length1 = _tmp0__length1;
#line 284 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
for (size_it = 0; size_it < _tmp0__length1; size_it = size_it + 1) {
-#line 1679 "ThumbnailCache.c"
+#line 1819 "ThumbnailCache.c"
ThumbnailCacheSize size = 0;
#line 284 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
size = size_collection[size_it];
-#line 1683 "ThumbnailCache.c"
+#line 1823 "ThumbnailCache.c"
{
GdkPixbuf* thumbnail = NULL;
- ThumbnailSource* _tmp1_;
- ThumbnailCacheSize _tmp2_;
+ ThumbnailCacheSize _tmp1_;
+ GdkPixbuf* _tmp2_;
GdkPixbuf* _tmp3_;
- Rotation _tmp4_;
- GdkPixbuf* _tmp5_;
+ GdkPixbuf* _tmp4_;
+ ThumbnailCacheSize _tmp5_;
GdkPixbuf* _tmp6_;
- ThumbnailSource* _tmp7_;
- ThumbnailCacheSize _tmp8_;
- GdkPixbuf* _tmp9_;
-#line 285 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
- _tmp1_ = source;
#line 285 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
- _tmp2_ = size;
+ _tmp1_ = size;
#line 285 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
- _tmp3_ = thumbnail_cache_fetch (_tmp1_, (gint) _tmp2_, &_inner_error_);
+ _tmp2_ = thumbnail_cache_fetch (source, (gint) _tmp1_, &_inner_error_);
#line 285 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
- thumbnail = _tmp3_;
+ thumbnail = _tmp2_;
#line 285 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 285 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
g_propagate_error (error, _inner_error_);
#line 285 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
return;
-#line 1709 "ThumbnailCache.c"
+#line 1844 "ThumbnailCache.c"
}
#line 286 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
- _tmp4_ = rotation;
-#line 286 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
- _tmp5_ = thumbnail;
+ _tmp3_ = thumbnail;
#line 286 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
- _tmp6_ = rotation_perform (_tmp4_, _tmp5_);
+ _tmp4_ = rotation_perform (rotation, _tmp3_);
#line 286 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
_g_object_unref0 (thumbnail);
#line 286 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
- thumbnail = _tmp6_;
+ thumbnail = _tmp4_;
#line 287 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
- _tmp7_ = source;
+ _tmp5_ = size;
#line 287 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
- _tmp8_ = size;
+ _tmp6_ = thumbnail;
#line 287 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
- _tmp9_ = thumbnail;
-#line 287 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
- thumbnail_cache_replace (_tmp7_, _tmp8_, _tmp9_, &_inner_error_);
+ thumbnail_cache_replace (source, _tmp5_, _tmp6_, &_inner_error_);
#line 287 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 287 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
@@ -1733,18 +1864,24 @@ void thumbnail_cache_rotate (ThumbnailSource* source, Rotation rotation, GError*
_g_object_unref0 (thumbnail);
#line 287 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
return;
-#line 1737 "ThumbnailCache.c"
+#line 1868 "ThumbnailCache.c"
}
#line 284 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
_g_object_unref0 (thumbnail);
-#line 1741 "ThumbnailCache.c"
+#line 1872 "ThumbnailCache.c"
}
}
}
}
-void thumbnail_cache_generate_for_photo (Thumbnails* thumbnails, PhotoFileReader* reader, Orientation orientation, Dimensions* original_dim, GError** error) {
+void
+thumbnail_cache_generate_for_photo (Thumbnails* thumbnails,
+ PhotoFileReader* reader,
+ Orientation orientation,
+ Dimensions* original_dim,
+ GError** error)
+{
ThumbnailCacheSize max_size = 0;
Dimensions dim = {0};
ThumbnailCacheSize _tmp0_;
@@ -1752,14 +1889,13 @@ void thumbnail_cache_generate_for_photo (Thumbnails* thumbnails, PhotoFileReader
Dimensions _tmp2_;
Dimensions _tmp3_ = {0};
GdkPixbuf* largest_thumbnail = NULL;
- Orientation _tmp14_;
- GdkPixbuf* _tmp15_;
- GdkPixbuf* _tmp16_;
+ GdkPixbuf* _tmp12_;
+ GdkPixbuf* _tmp13_;
Dimensions largest_thumb_dimensions = {0};
- GdkPixbuf* _tmp17_;
- Dimensions _tmp18_ = {0};
- ThumbnailCacheSize* _tmp19_;
- gint _tmp19__length1;
+ GdkPixbuf* _tmp14_;
+ Dimensions _tmp15_ = {0};
+ ThumbnailCacheSize* _tmp16_;
+ gint _tmp16__length1;
GError * _inner_error_ = NULL;
#line 293 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
g_return_if_fail (IS_THUMBNAILS (thumbnails));
@@ -1781,79 +1917,73 @@ void thumbnail_cache_generate_for_photo (Thumbnails* thumbnails, PhotoFileReader
dim = _tmp3_;
#line 298 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
largest_thumbnail = NULL;
-#line 1785 "ThumbnailCache.c"
+#line 1921 "ThumbnailCache.c"
{
GdkPixbuf* _tmp4_ = NULL;
- PhotoFileReader* _tmp5_;
+ Dimensions _tmp5_;
Dimensions _tmp6_;
- Dimensions _tmp7_;
+ GdkPixbuf* _tmp7_;
GdkPixbuf* _tmp8_;
- GdkPixbuf* _tmp9_;
-#line 300 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
- _tmp5_ = reader;
#line 300 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
- _tmp6_ = *original_dim;
+ _tmp5_ = *original_dim;
#line 300 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
- _tmp7_ = dim;
+ _tmp6_ = dim;
#line 300 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
- _tmp8_ = photo_file_reader_scaled_read (_tmp5_, &_tmp6_, &_tmp7_, &_inner_error_);
+ _tmp7_ = photo_file_reader_scaled_read (reader, &_tmp5_, &_tmp6_, &_inner_error_);
#line 300 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
- _tmp4_ = _tmp8_;
+ _tmp4_ = _tmp7_;
#line 300 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
if (G_UNLIKELY (_inner_error_ != NULL)) {
-#line 1805 "ThumbnailCache.c"
+#line 1938 "ThumbnailCache.c"
goto __catch248_g_error;
}
#line 300 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
- _tmp9_ = _tmp4_;
+ _tmp8_ = _tmp4_;
#line 300 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
_tmp4_ = NULL;
#line 300 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
_g_object_unref0 (largest_thumbnail);
#line 300 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
- largest_thumbnail = _tmp9_;
+ largest_thumbnail = _tmp8_;
#line 299 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
_g_object_unref0 (_tmp4_);
-#line 1818 "ThumbnailCache.c"
+#line 1951 "ThumbnailCache.c"
}
goto __finally248;
__catch248_g_error:
{
GError* err = NULL;
- GdkPixbuf* _tmp10_ = NULL;
- PhotoFileReader* _tmp11_;
- GdkPixbuf* _tmp12_;
- GdkPixbuf* _tmp13_;
+ GdkPixbuf* _tmp9_ = NULL;
+ GdkPixbuf* _tmp10_;
+ GdkPixbuf* _tmp11_;
#line 299 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
err = _inner_error_;
#line 299 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
_inner_error_ = NULL;
#line 305 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
- _tmp11_ = reader;
+ _tmp10_ = photo_file_reader_unscaled_read (reader, &_inner_error_);
#line 305 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
- _tmp12_ = photo_file_reader_unscaled_read (_tmp11_, &_inner_error_);
-#line 305 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
- _tmp10_ = _tmp12_;
+ _tmp9_ = _tmp10_;
#line 305 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 305 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
_g_error_free0 (err);
-#line 1842 "ThumbnailCache.c"
+#line 1972 "ThumbnailCache.c"
goto __finally248;
}
#line 305 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
- _tmp13_ = _tmp10_;
+ _tmp11_ = _tmp9_;
#line 305 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
- _tmp10_ = NULL;
+ _tmp9_ = NULL;
#line 305 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
_g_object_unref0 (largest_thumbnail);
#line 305 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
- largest_thumbnail = _tmp13_;
+ largest_thumbnail = _tmp11_;
#line 299 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
- _g_object_unref0 (_tmp10_);
+ _g_object_unref0 (_tmp9_);
#line 299 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
_g_error_free0 (err);
-#line 1857 "ThumbnailCache.c"
+#line 1987 "ThumbnailCache.c"
}
__finally248:
#line 299 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
@@ -1864,102 +1994,100 @@ void thumbnail_cache_generate_for_photo (Thumbnails* thumbnails, PhotoFileReader
_g_object_unref0 (largest_thumbnail);
#line 299 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
return;
-#line 1868 "ThumbnailCache.c"
+#line 1998 "ThumbnailCache.c"
}
#line 307 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
- _tmp14_ = orientation;
+ _tmp12_ = largest_thumbnail;
#line 307 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
- _tmp15_ = largest_thumbnail;
-#line 307 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
- _tmp16_ = orientation_rotate_pixbuf (_tmp14_, _tmp15_);
+ _tmp13_ = orientation_rotate_pixbuf (orientation, _tmp12_);
#line 307 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
_g_object_unref0 (largest_thumbnail);
#line 307 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
- largest_thumbnail = _tmp16_;
+ largest_thumbnail = _tmp13_;
#line 308 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
- _tmp17_ = largest_thumbnail;
+ _tmp14_ = largest_thumbnail;
#line 308 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
- dimensions_for_pixbuf (_tmp17_, &_tmp18_);
+ dimensions_for_pixbuf (_tmp14_, &_tmp15_);
#line 308 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
- largest_thumb_dimensions = _tmp18_;
+ largest_thumb_dimensions = _tmp15_;
#line 310 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
- _tmp19_ = thumbnail_cache_ALL_SIZES;
+ _tmp16_ = thumbnail_cache_ALL_SIZES;
#line 310 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
- _tmp19__length1 = thumbnail_cache_ALL_SIZES_length1;
-#line 1890 "ThumbnailCache.c"
+ _tmp16__length1 = thumbnail_cache_ALL_SIZES_length1;
+#line 2018 "ThumbnailCache.c"
{
ThumbnailCacheSize* size_collection = NULL;
gint size_collection_length1 = 0;
gint _size_collection_size_ = 0;
gint size_it = 0;
#line 310 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
- size_collection = _tmp19_;
+ size_collection = _tmp16_;
#line 310 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
- size_collection_length1 = _tmp19__length1;
+ size_collection_length1 = _tmp16__length1;
#line 310 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
- for (size_it = 0; size_it < _tmp19__length1; size_it = size_it + 1) {
-#line 1902 "ThumbnailCache.c"
+ for (size_it = 0; size_it < _tmp16__length1; size_it = size_it + 1) {
+#line 2030 "ThumbnailCache.c"
ThumbnailCacheSize size = 0;
#line 310 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
size = size_collection[size_it];
-#line 1906 "ThumbnailCache.c"
+#line 2034 "ThumbnailCache.c"
{
- ThumbnailCacheSize _tmp20_;
- Scaling _tmp21_ = {0};
- Dimensions _tmp22_;
- Dimensions _tmp23_ = {0};
- Thumbnails* _tmp24_;
- ThumbnailCacheSize _tmp25_;
- GdkPixbuf* _tmp26_;
- Dimensions _tmp27_;
- gint _tmp28_;
- Dimensions _tmp29_;
- gint _tmp30_;
- GdkPixbuf* _tmp31_;
- GdkPixbuf* _tmp32_;
+ ThumbnailCacheSize _tmp17_;
+ Scaling _tmp18_ = {0};
+ Dimensions _tmp19_;
+ Dimensions _tmp20_ = {0};
+ ThumbnailCacheSize _tmp21_;
+ GdkPixbuf* _tmp22_;
+ Dimensions _tmp23_;
+ gint _tmp24_;
+ Dimensions _tmp25_;
+ gint _tmp26_;
+ GdkPixbuf* _tmp27_;
+ GdkPixbuf* _tmp28_;
#line 311 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
- _tmp20_ = size;
+ _tmp17_ = size;
#line 311 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
- thumbnail_cache_size_get_scaling (_tmp20_, &_tmp21_);
+ thumbnail_cache_size_get_scaling (_tmp17_, &_tmp18_);
#line 311 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
- _tmp22_ = largest_thumb_dimensions;
+ _tmp19_ = largest_thumb_dimensions;
#line 311 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
- scaling_get_scaled_dimensions (&_tmp21_, &_tmp22_, &_tmp23_);
+ scaling_get_scaled_dimensions (&_tmp18_, &_tmp19_, &_tmp20_);
#line 311 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
- dim = _tmp23_;
-#line 312 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
- _tmp24_ = thumbnails;
+ dim = _tmp20_;
#line 312 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
- _tmp25_ = size;
+ _tmp21_ = size;
#line 312 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
- _tmp26_ = largest_thumbnail;
+ _tmp22_ = largest_thumbnail;
#line 312 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
- _tmp27_ = dim;
+ _tmp23_ = dim;
#line 312 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
- _tmp28_ = _tmp27_.width;
+ _tmp24_ = _tmp23_.width;
#line 312 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
- _tmp29_ = dim;
+ _tmp25_ = dim;
#line 312 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
- _tmp30_ = _tmp29_.height;
+ _tmp26_ = _tmp25_.height;
#line 312 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
- _tmp31_ = gdk_pixbuf_scale_simple (_tmp26_, _tmp28_, _tmp30_, GDK_INTERP_HYPER);
+ _tmp27_ = gdk_pixbuf_scale_simple (_tmp22_, _tmp24_, _tmp26_, GDK_INTERP_HYPER);
#line 312 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
- _tmp32_ = _tmp31_;
+ _tmp28_ = _tmp27_;
#line 312 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
- thumbnails_set (_tmp24_, _tmp25_, _tmp32_);
+ thumbnails_set (thumbnails, _tmp21_, _tmp28_);
#line 312 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
- _g_object_unref0 (_tmp32_);
-#line 1953 "ThumbnailCache.c"
+ _g_object_unref0 (_tmp28_);
+#line 2078 "ThumbnailCache.c"
}
}
}
#line 293 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
_g_object_unref0 (largest_thumbnail);
-#line 1959 "ThumbnailCache.c"
+#line 2084 "ThumbnailCache.c"
}
-void thumbnail_cache_generate_for_video_frame (Thumbnails* thumbnails, GdkPixbuf* preview_frame) {
+void
+thumbnail_cache_generate_for_video_frame (Thumbnails* thumbnails,
+ GdkPixbuf* preview_frame)
+{
ThumbnailCacheSize* _tmp0_;
gint _tmp0__length1;
#line 316 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
@@ -1970,7 +2098,7 @@ void thumbnail_cache_generate_for_video_frame (Thumbnails* thumbnails, GdkPixbuf
_tmp0_ = thumbnail_cache_ALL_SIZES;
#line 317 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
_tmp0__length1 = thumbnail_cache_ALL_SIZES_length1;
-#line 1974 "ThumbnailCache.c"
+#line 2102 "ThumbnailCache.c"
{
ThumbnailCacheSize* size_collection = NULL;
gint size_collection_length1 = 0;
@@ -1982,21 +2110,19 @@ void thumbnail_cache_generate_for_video_frame (Thumbnails* thumbnails, GdkPixbuf
size_collection_length1 = _tmp0__length1;
#line 317 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
for (size_it = 0; size_it < _tmp0__length1; size_it = size_it + 1) {
-#line 1986 "ThumbnailCache.c"
+#line 2114 "ThumbnailCache.c"
ThumbnailCacheSize size = 0;
#line 317 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
size = size_collection[size_it];
-#line 1990 "ThumbnailCache.c"
+#line 2118 "ThumbnailCache.c"
{
Scaling current_scaling = {0};
ThumbnailCacheSize _tmp1_;
Scaling _tmp2_ = {0};
GdkPixbuf* current_thumbnail = NULL;
GdkPixbuf* _tmp3_;
- GdkPixbuf* _tmp4_;
- Thumbnails* _tmp5_;
- ThumbnailCacheSize _tmp6_;
- GdkPixbuf* _tmp7_;
+ ThumbnailCacheSize _tmp4_;
+ GdkPixbuf* _tmp5_;
#line 318 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
_tmp1_ = size;
#line 318 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
@@ -2004,106 +2130,97 @@ void thumbnail_cache_generate_for_video_frame (Thumbnails* thumbnails, GdkPixbuf
#line 318 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
current_scaling = _tmp2_;
#line 319 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
- _tmp3_ = preview_frame;
+ _tmp3_ = scaling_perform_on_pixbuf (&current_scaling, preview_frame, GDK_INTERP_HYPER, TRUE);
#line 319 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
- _tmp4_ = scaling_perform_on_pixbuf (&current_scaling, _tmp3_, GDK_INTERP_HYPER, TRUE);
-#line 319 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
- current_thumbnail = _tmp4_;
-#line 321 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
- _tmp5_ = thumbnails;
+ current_thumbnail = _tmp3_;
#line 321 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
- _tmp6_ = size;
+ _tmp4_ = size;
#line 321 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
- _tmp7_ = current_thumbnail;
+ _tmp5_ = current_thumbnail;
#line 321 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
- thumbnails_set (_tmp5_, _tmp6_, _tmp7_);
+ thumbnails_set (thumbnails, _tmp4_, _tmp5_);
#line 317 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
_g_object_unref0 (current_thumbnail);
-#line 2023 "ThumbnailCache.c"
+#line 2145 "ThumbnailCache.c"
}
}
}
}
-static void thumbnail_cache_schedule_debug (void) {
+static void
+thumbnail_cache_schedule_debug (void)
+{
}
-static void thumbnail_cache_report_cycle (void) {
+static void
+thumbnail_cache_report_cycle (void)
+{
}
-static GdkPixbuf* _thumbnail_cache_fetch (ThumbnailCache* self, ThumbnailSource* source, GError** error) {
+static GdkPixbuf*
+_thumbnail_cache_fetch (ThumbnailCache* self,
+ ThumbnailSource* source,
+ GError** error)
+{
GdkPixbuf* result = NULL;
GdkPixbuf* pixbuf = NULL;
- ThumbnailSource* _tmp0_;
+ gchar* _tmp0_;
gchar* _tmp1_;
- gchar* _tmp2_;
+ GdkPixbuf* _tmp2_;
GdkPixbuf* _tmp3_;
GdkPixbuf* _tmp4_;
- GdkPixbuf* _tmp5_;
- GdkPixbuf* _tmp6_ = NULL;
- ThumbnailSource* _tmp7_;
- gchar* _tmp8_;
- gchar* _tmp9_;
- ThumbnailSource* _tmp10_;
- PhotoFileFormat _tmp11_;
- GdkPixbuf* _tmp12_;
- GdkPixbuf* _tmp13_;
+ GdkPixbuf* _tmp5_ = NULL;
+ gchar* _tmp6_;
+ gchar* _tmp7_;
+ GdkPixbuf* _tmp8_;
+ GdkPixbuf* _tmp9_;
+ GdkPixbuf* _tmp10_;
+ gint _tmp11_;
+ gchar* _tmp12_;
+ gchar* _tmp13_;
GdkPixbuf* _tmp14_;
- gint _tmp15_;
- ThumbnailSource* _tmp16_;
- gchar* _tmp17_;
- gchar* _tmp18_;
- GdkPixbuf* _tmp19_;
GError * _inner_error_ = NULL;
#line 371 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
g_return_val_if_fail (IS_THUMBNAIL_CACHE (self), NULL);
#line 371 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
g_return_val_if_fail (IS_THUMBNAIL_SOURCE (source), NULL);
#line 373 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
- _tmp0_ = source;
+ _tmp0_ = data_source_get_source_id (G_TYPE_CHECK_INSTANCE_CAST (source, TYPE_DATA_SOURCE, DataSource));
#line 373 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
- _tmp1_ = data_source_get_source_id (G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, TYPE_DATA_SOURCE, DataSource));
+ _tmp1_ = _tmp0_;
#line 373 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
- _tmp2_ = _tmp1_;
-#line 373 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
- _tmp3_ = thumbnail_cache_fetch_from_memory (self, _tmp2_);
+ _tmp2_ = thumbnail_cache_fetch_from_memory (self, _tmp1_);
#line 373 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
- _tmp4_ = _tmp3_;
+ _tmp3_ = _tmp2_;
#line 373 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
- _g_free0 (_tmp2_);
+ _g_free0 (_tmp1_);
#line 373 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
- pixbuf = _tmp4_;
+ pixbuf = _tmp3_;
#line 374 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
- _tmp5_ = pixbuf;
+ _tmp4_ = pixbuf;
#line 374 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
- if (_tmp5_ != NULL) {
+ if (_tmp4_ != NULL) {
#line 375 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
result = pixbuf;
#line 375 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
return result;
-#line 2088 "ThumbnailCache.c"
+#line 2211 "ThumbnailCache.c"
}
#line 377 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
- _tmp7_ = source;
-#line 377 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
- _tmp8_ = data_source_get_source_id (G_TYPE_CHECK_INSTANCE_CAST (_tmp7_, TYPE_DATA_SOURCE, DataSource));
+ _tmp6_ = data_source_get_source_id (G_TYPE_CHECK_INSTANCE_CAST (source, TYPE_DATA_SOURCE, DataSource));
#line 377 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
- _tmp9_ = _tmp8_;
-#line 377 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
- _tmp10_ = source;
-#line 377 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
- _tmp11_ = thumbnail_source_get_preferred_thumbnail_format (_tmp10_);
+ _tmp7_ = _tmp6_;
#line 377 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
- _tmp12_ = thumbnail_cache_read_pixbuf (self, _tmp9_, _tmp11_, &_inner_error_);
+ _tmp8_ = thumbnail_cache_read_pixbuf (self, _tmp7_, thumbnail_source_get_preferred_thumbnail_format (source), &_inner_error_);
#line 377 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
- _tmp13_ = _tmp12_;
+ _tmp9_ = _tmp8_;
#line 377 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
- _g_free0 (_tmp9_);
+ _g_free0 (_tmp7_);
#line 377 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
- _tmp6_ = _tmp13_;
+ _tmp5_ = _tmp9_;
#line 377 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 377 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
@@ -2112,64 +2229,65 @@ static GdkPixbuf* _thumbnail_cache_fetch (ThumbnailCache* self, ThumbnailSource*
_g_object_unref0 (pixbuf);
#line 377 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
return NULL;
-#line 2116 "ThumbnailCache.c"
+#line 2233 "ThumbnailCache.c"
}
#line 377 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
- _tmp14_ = _tmp6_;
+ _tmp10_ = _tmp5_;
#line 377 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
- _tmp6_ = NULL;
+ _tmp5_ = NULL;
#line 377 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
_g_object_unref0 (pixbuf);
#line 377 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
- pixbuf = _tmp14_;
+ pixbuf = _tmp10_;
#line 379 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
- _tmp15_ = thumbnail_cache_cycle_fetched_thumbnails;
+ _tmp11_ = thumbnail_cache_cycle_fetched_thumbnails;
#line 379 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
- thumbnail_cache_cycle_fetched_thumbnails = _tmp15_ + 1;
+ thumbnail_cache_cycle_fetched_thumbnails = _tmp11_ + 1;
#line 380 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
thumbnail_cache_schedule_debug ();
#line 383 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
- _tmp16_ = source;
+ _tmp12_ = data_source_get_source_id (G_TYPE_CHECK_INSTANCE_CAST (source, TYPE_DATA_SOURCE, DataSource));
#line 383 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
- _tmp17_ = data_source_get_source_id (G_TYPE_CHECK_INSTANCE_CAST (_tmp16_, TYPE_DATA_SOURCE, DataSource));
-#line 383 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
- _tmp18_ = _tmp17_;
+ _tmp13_ = _tmp12_;
#line 383 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
- _tmp19_ = pixbuf;
+ _tmp14_ = pixbuf;
#line 383 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
- thumbnail_cache_store_in_memory (self, _tmp18_, _tmp19_);
+ thumbnail_cache_store_in_memory (self, _tmp13_, _tmp14_);
#line 383 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
- _g_free0 (_tmp18_);
+ _g_free0 (_tmp13_);
#line 385 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
result = pixbuf;
#line 385 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
- _g_object_unref0 (_tmp6_);
+ _g_object_unref0 (_tmp5_);
#line 385 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
return result;
-#line 2150 "ThumbnailCache.c"
+#line 2265 "ThumbnailCache.c"
}
-static void _thumbnail_cache_fetch_async (ThumbnailCache* self, ThumbnailSource* source, PhotoFileFormat format, Dimensions* dim, GdkInterpType interp, ThumbnailCacheAsyncFetchCallback callback, void* callback_target, GCancellable* cancellable) {
+static void
+_thumbnail_cache_fetch_async (ThumbnailCache* self,
+ ThumbnailSource* source,
+ PhotoFileFormat format,
+ Dimensions* dim,
+ GdkInterpType interp,
+ ThumbnailCacheAsyncFetchCallback callback,
+ void* callback_target,
+ GCancellable* cancellable)
+{
gchar* thumbnail_name = NULL;
- ThumbnailSource* _tmp0_;
- gchar* _tmp1_;
+ gchar* _tmp0_;
GdkPixbuf* pixbuf = NULL;
- const gchar* _tmp2_;
- GdkPixbuf* _tmp3_;
- gboolean _tmp4_ = FALSE;
- GdkPixbuf* _tmp5_;
- Workers* _tmp17_;
- const gchar* _tmp18_;
- ThumbnailSource* _tmp19_;
- GdkPixbuf* _tmp20_;
- Dimensions _tmp21_;
- GdkInterpType _tmp22_;
- ThumbnailCacheAsyncFetchCallback _tmp23_;
- void* _tmp23__target;
- GCancellable* _tmp24_;
- ThumbnailCacheAsyncFetchJob* _tmp25_;
- ThumbnailCacheAsyncFetchJob* _tmp26_;
+ const gchar* _tmp1_;
+ GdkPixbuf* _tmp2_;
+ gboolean _tmp3_ = FALSE;
+ GdkPixbuf* _tmp4_;
+ Workers* _tmp12_;
+ const gchar* _tmp13_;
+ GdkPixbuf* _tmp14_;
+ Dimensions _tmp15_;
+ ThumbnailCacheAsyncFetchJob* _tmp16_;
+ ThumbnailCacheAsyncFetchJob* _tmp17_;
#line 388 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
g_return_if_fail (IS_THUMBNAIL_CACHE (self));
#line 388 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
@@ -2179,217 +2297,193 @@ static void _thumbnail_cache_fetch_async (ThumbnailCache* self, ThumbnailSource*
#line 388 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
g_return_if_fail ((cancellable == NULL) || G_IS_CANCELLABLE (cancellable));
#line 391 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
- _tmp0_ = source;
+ _tmp0_ = data_source_get_source_id (G_TYPE_CHECK_INSTANCE_CAST (source, TYPE_DATA_SOURCE, DataSource));
#line 391 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
- _tmp1_ = data_source_get_source_id (G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, TYPE_DATA_SOURCE, DataSource));
-#line 391 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
- thumbnail_name = _tmp1_;
+ thumbnail_name = _tmp0_;
#line 392 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
- _tmp2_ = thumbnail_name;
+ _tmp1_ = thumbnail_name;
#line 392 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
- _tmp3_ = thumbnail_cache_fetch_from_memory (self, _tmp2_);
+ _tmp2_ = thumbnail_cache_fetch_from_memory (self, _tmp1_);
#line 392 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
- pixbuf = _tmp3_;
-#line 393 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
- _tmp5_ = pixbuf;
+ pixbuf = _tmp2_;
#line 393 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
- if (_tmp5_ != NULL) {
-#line 2198 "ThumbnailCache.c"
- gboolean _tmp6_ = FALSE;
- gboolean _tmp7_;
+ _tmp4_ = pixbuf;
#line 393 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
- _tmp7_ = dimensions_has_area (dim);
+ if (_tmp4_ != NULL) {
+#line 2314 "ThumbnailCache.c"
+ gboolean _tmp5_ = FALSE;
#line 393 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
- if (!_tmp7_) {
+ if (!dimensions_has_area (dim)) {
#line 393 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
- _tmp6_ = TRUE;
-#line 2207 "ThumbnailCache.c"
+ _tmp5_ = TRUE;
+#line 2320 "ThumbnailCache.c"
} else {
- GdkPixbuf* _tmp8_;
- Dimensions _tmp9_ = {0};
- Dimensions _tmp10_;
- gboolean _tmp11_;
-#line 393 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
- _tmp8_ = pixbuf;
+ GdkPixbuf* _tmp6_;
+ Dimensions _tmp7_ = {0};
+ Dimensions _tmp8_;
#line 393 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
- dimensions_for_pixbuf (_tmp8_, &_tmp9_);
+ _tmp6_ = pixbuf;
#line 393 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
- _tmp10_ = *dim;
+ dimensions_for_pixbuf (_tmp6_, &_tmp7_);
#line 393 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
- _tmp11_ = dimensions_equals (&_tmp9_, &_tmp10_);
+ _tmp8_ = *dim;
#line 393 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
- _tmp6_ = _tmp11_;
-#line 2223 "ThumbnailCache.c"
+ _tmp5_ = dimensions_equals (&_tmp7_, &_tmp8_);
+#line 2333 "ThumbnailCache.c"
}
#line 393 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
- _tmp4_ = _tmp6_;
-#line 2227 "ThumbnailCache.c"
+ _tmp3_ = _tmp5_;
+#line 2337 "ThumbnailCache.c"
} else {
#line 393 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
- _tmp4_ = FALSE;
-#line 2231 "ThumbnailCache.c"
+ _tmp3_ = FALSE;
+#line 2341 "ThumbnailCache.c"
}
#line 393 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
- if (_tmp4_) {
-#line 2235 "ThumbnailCache.c"
- ThumbnailCacheAsyncFetchCallback _tmp12_;
- void* _tmp12__target;
- GdkPixbuf* _tmp13_;
- GdkPixbuf* _tmp14_;
- Dimensions _tmp15_;
- GdkInterpType _tmp16_;
-#line 396 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
- _tmp12_ = callback;
-#line 396 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
- _tmp12__target = callback_target;
-#line 396 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
- _tmp13_ = pixbuf;
+ if (_tmp3_) {
+#line 2345 "ThumbnailCache.c"
+ GdkPixbuf* _tmp9_;
+ GdkPixbuf* _tmp10_;
+ Dimensions _tmp11_;
#line 396 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
- _tmp14_ = pixbuf;
+ _tmp9_ = pixbuf;
#line 396 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
- _tmp15_ = *dim;
+ _tmp10_ = pixbuf;
#line 396 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
- _tmp16_ = interp;
+ _tmp11_ = *dim;
#line 396 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
- _tmp12_ (_tmp13_, _tmp14_, &_tmp15_, _tmp16_, NULL, _tmp12__target);
+ callback (_tmp9_, _tmp10_, &_tmp11_, interp, NULL, callback_target);
#line 398 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
_g_object_unref0 (pixbuf);
#line 398 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
_g_free0 (thumbnail_name);
#line 398 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
return;
-#line 2262 "ThumbnailCache.c"
+#line 2363 "ThumbnailCache.c"
}
#line 411 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
- _tmp17_ = thumbnail_cache_fetch_workers;
-#line 411 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
- _tmp18_ = thumbnail_name;
-#line 411 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
- _tmp19_ = source;
-#line 411 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
- _tmp20_ = pixbuf;
-#line 411 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
- _tmp21_ = *dim;
+ _tmp12_ = thumbnail_cache_fetch_workers;
#line 411 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
- _tmp22_ = interp;
+ _tmp13_ = thumbnail_name;
#line 411 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
- _tmp23_ = callback;
+ _tmp14_ = pixbuf;
#line 411 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
- _tmp23__target = callback_target;
+ _tmp15_ = *dim;
#line 411 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
- _tmp24_ = cancellable;
+ _tmp16_ = thumbnail_cache_async_fetch_job_new (self, _tmp13_, source, _tmp14_, &_tmp15_, interp, callback, callback_target, cancellable);
#line 411 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
- _tmp25_ = thumbnail_cache_async_fetch_job_new (self, _tmp18_, _tmp19_, _tmp20_, &_tmp21_, _tmp22_, _tmp23_, _tmp23__target, _tmp24_);
+ _tmp17_ = _tmp16_;
#line 411 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
- _tmp26_ = _tmp25_;
+ workers_enqueue (_tmp12_, G_TYPE_CHECK_INSTANCE_CAST (_tmp17_, TYPE_BACKGROUND_JOB, BackgroundJob));
#line 411 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
- workers_enqueue (_tmp17_, G_TYPE_CHECK_INSTANCE_CAST (_tmp26_, TYPE_BACKGROUND_JOB, BackgroundJob));
-#line 411 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
- _background_job_unref0 (_tmp26_);
+ _background_job_unref0 (_tmp17_);
#line 388 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
_g_object_unref0 (pixbuf);
#line 388 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
_g_free0 (thumbnail_name);
-#line 2294 "ThumbnailCache.c"
+#line 2385 "ThumbnailCache.c"
}
-static gpointer _background_job_ref0 (gpointer self) {
+static gpointer
+_background_job_ref0 (gpointer self)
+{
#line 417 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
return self ? background_job_ref (self) : NULL;
-#line 2301 "ThumbnailCache.c"
+#line 2394 "ThumbnailCache.c"
}
-static gpointer _g_error_copy0 (gpointer self) {
+static gpointer
+_g_error_copy0 (gpointer self)
+{
#line 425 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
return self ? g_error_copy (self) : NULL;
-#line 2308 "ThumbnailCache.c"
+#line 2403 "ThumbnailCache.c"
}
-static void thumbnail_cache_async_fetch_completion_callback (BackgroundJob* background_job) {
+static void
+thumbnail_cache_async_fetch_completion_callback (BackgroundJob* background_job)
+{
ThumbnailCacheAsyncFetchJob* job = NULL;
- BackgroundJob* _tmp0_;
- ThumbnailCacheAsyncFetchJob* _tmp1_;
- gboolean _tmp2_ = FALSE;
- ThumbnailCacheAsyncFetchJob* _tmp3_;
- gboolean _tmp4_;
- ThumbnailCacheAsyncFetchJob* _tmp17_;
- GdkPixbuf* _tmp18_;
- ThumbnailCacheAsyncFetchJob* _tmp29_;
- ThumbnailCacheAsyncFetchCallback _tmp30_;
- void* _tmp30__target;
- ThumbnailCacheAsyncFetchJob* _tmp31_;
- GdkPixbuf* _tmp32_;
- ThumbnailCacheAsyncFetchJob* _tmp33_;
- GdkPixbuf* _tmp34_;
- ThumbnailCacheAsyncFetchJob* _tmp35_;
- Dimensions _tmp36_;
- ThumbnailCacheAsyncFetchJob* _tmp37_;
- GdkInterpType _tmp38_;
- ThumbnailCacheAsyncFetchJob* _tmp39_;
- GError* _tmp40_;
+ ThumbnailCacheAsyncFetchJob* _tmp0_;
+ gboolean _tmp1_ = FALSE;
+ ThumbnailCacheAsyncFetchJob* _tmp2_;
+ gboolean _tmp3_;
+ ThumbnailCacheAsyncFetchJob* _tmp16_;
+ GdkPixbuf* _tmp17_;
+ ThumbnailCacheAsyncFetchJob* _tmp28_;
+ ThumbnailCacheAsyncFetchCallback _tmp29_;
+ void* _tmp29__target;
+ ThumbnailCacheAsyncFetchJob* _tmp30_;
+ GdkPixbuf* _tmp31_;
+ ThumbnailCacheAsyncFetchJob* _tmp32_;
+ GdkPixbuf* _tmp33_;
+ ThumbnailCacheAsyncFetchJob* _tmp34_;
+ Dimensions _tmp35_;
+ ThumbnailCacheAsyncFetchJob* _tmp36_;
+ GdkInterpType _tmp37_;
+ ThumbnailCacheAsyncFetchJob* _tmp38_;
+ GError* _tmp39_;
GError * _inner_error_ = NULL;
#line 416 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
g_return_if_fail (IS_BACKGROUND_JOB (background_job));
#line 417 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
- _tmp0_ = background_job;
+ _tmp0_ = _background_job_ref0 (G_TYPE_CHECK_INSTANCE_CAST (background_job, THUMBNAIL_CACHE_TYPE_ASYNC_FETCH_JOB, ThumbnailCacheAsyncFetchJob));
#line 417 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
- _tmp1_ = _background_job_ref0 (G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, THUMBNAIL_CACHE_TYPE_ASYNC_FETCH_JOB, ThumbnailCacheAsyncFetchJob));
-#line 417 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
- job = _tmp1_;
+ job = _tmp0_;
#line 421 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
- _tmp3_ = job;
+ _tmp2_ = job;
#line 421 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
- _tmp4_ = _tmp3_->replace;
+ _tmp3_ = _tmp2_->replace;
#line 421 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
- if (_tmp4_) {
-#line 2349 "ThumbnailCache.c"
- ThumbnailCacheAsyncFetchJob* _tmp5_;
- GdkPixbuf* _tmp6_;
+ if (_tmp3_) {
+#line 2443 "ThumbnailCache.c"
+ ThumbnailCacheAsyncFetchJob* _tmp4_;
+ GdkPixbuf* _tmp5_;
#line 421 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
- _tmp5_ = job;
+ _tmp4_ = job;
#line 421 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
- _tmp6_ = _tmp5_->unscaled;
+ _tmp5_ = _tmp4_->unscaled;
#line 421 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
- _tmp2_ = _tmp6_ != NULL;
-#line 2358 "ThumbnailCache.c"
+ _tmp1_ = _tmp5_ != NULL;
+#line 2452 "ThumbnailCache.c"
} else {
#line 421 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
- _tmp2_ = FALSE;
-#line 2362 "ThumbnailCache.c"
+ _tmp1_ = FALSE;
+#line 2456 "ThumbnailCache.c"
}
#line 421 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
- if (_tmp2_) {
-#line 2366 "ThumbnailCache.c"
+ if (_tmp1_) {
+#line 2460 "ThumbnailCache.c"
{
- ThumbnailCacheAsyncFetchJob* _tmp7_;
- ThumbnailSource* _tmp8_;
- ThumbnailCacheAsyncFetchJob* _tmp9_;
- ThumbnailCache* _tmp10_;
- ThumbnailCacheSize _tmp11_;
- ThumbnailCacheAsyncFetchJob* _tmp12_;
- GdkPixbuf* _tmp13_;
+ ThumbnailCacheAsyncFetchJob* _tmp6_;
+ ThumbnailSource* _tmp7_;
+ ThumbnailCacheAsyncFetchJob* _tmp8_;
+ ThumbnailCache* _tmp9_;
+ ThumbnailCacheSize _tmp10_;
+ ThumbnailCacheAsyncFetchJob* _tmp11_;
+ GdkPixbuf* _tmp12_;
#line 423 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
- _tmp7_ = job;
+ _tmp6_ = job;
#line 423 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
- _tmp8_ = _tmp7_->source;
+ _tmp7_ = _tmp6_->source;
#line 423 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
- _tmp9_ = job;
+ _tmp8_ = job;
#line 423 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
- _tmp10_ = _tmp9_->cache;
+ _tmp9_ = _tmp8_->cache;
#line 423 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
- _tmp11_ = _tmp10_->priv->size;
+ _tmp10_ = _tmp9_->priv->size;
#line 423 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
- _tmp12_ = job;
+ _tmp11_ = job;
#line 423 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
- _tmp13_ = _tmp12_->unscaled;
+ _tmp12_ = _tmp11_->unscaled;
#line 423 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
- thumbnail_cache_replace (_tmp8_, _tmp11_, _tmp13_, &_inner_error_);
+ thumbnail_cache_replace (_tmp7_, _tmp10_, _tmp12_, &_inner_error_);
#line 423 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
if (G_UNLIKELY (_inner_error_ != NULL)) {
-#line 2393 "ThumbnailCache.c"
+#line 2487 "ThumbnailCache.c"
goto __catch249_g_error;
}
}
@@ -2397,26 +2491,26 @@ static void thumbnail_cache_async_fetch_completion_callback (BackgroundJob* back
__catch249_g_error:
{
GError* err = NULL;
- ThumbnailCacheAsyncFetchJob* _tmp14_;
+ ThumbnailCacheAsyncFetchJob* _tmp13_;
+ GError* _tmp14_;
GError* _tmp15_;
- GError* _tmp16_;
#line 422 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
err = _inner_error_;
#line 422 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
_inner_error_ = NULL;
#line 425 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
- _tmp14_ = job;
+ _tmp13_ = job;
#line 425 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
- _tmp15_ = err;
+ _tmp14_ = err;
#line 425 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
- _tmp16_ = _g_error_copy0 (_tmp15_);
+ _tmp15_ = _g_error_copy0 (_tmp14_);
#line 425 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
- _g_error_free0 (_tmp14_->err);
+ _g_error_free0 (_tmp13_->err);
#line 425 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
- _tmp14_->err = _tmp16_;
+ _tmp13_->err = _tmp15_;
#line 422 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
_g_error_free0 (err);
-#line 2420 "ThumbnailCache.c"
+#line 2514 "ThumbnailCache.c"
}
__finally249:
#line 422 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
@@ -2429,170 +2523,152 @@ static void thumbnail_cache_async_fetch_completion_callback (BackgroundJob* back
g_clear_error (&_inner_error_);
#line 422 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
return;
-#line 2433 "ThumbnailCache.c"
+#line 2527 "ThumbnailCache.c"
}
}
#line 429 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
- _tmp17_ = job;
+ _tmp16_ = job;
#line 429 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
- _tmp18_ = _tmp17_->unscaled;
+ _tmp17_ = _tmp16_->unscaled;
#line 429 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
- if (_tmp18_ != NULL) {
-#line 2442 "ThumbnailCache.c"
- ThumbnailCacheAsyncFetchJob* _tmp19_;
- gboolean _tmp20_;
+ if (_tmp17_ != NULL) {
+#line 2536 "ThumbnailCache.c"
+ ThumbnailCacheAsyncFetchJob* _tmp18_;
+ gboolean _tmp19_;
#line 430 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
- _tmp19_ = job;
+ _tmp18_ = job;
#line 430 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
- _tmp20_ = _tmp19_->fetched;
+ _tmp19_ = _tmp18_->fetched;
#line 430 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
- if (_tmp20_) {
-#line 2451 "ThumbnailCache.c"
- ThumbnailCacheAsyncFetchJob* _tmp21_;
- ThumbnailCache* _tmp22_;
- ThumbnailCacheAsyncFetchJob* _tmp23_;
- const gchar* _tmp24_;
- ThumbnailCacheAsyncFetchJob* _tmp25_;
- GdkPixbuf* _tmp26_;
- gint _tmp27_;
+ if (_tmp19_) {
+#line 2545 "ThumbnailCache.c"
+ ThumbnailCacheAsyncFetchJob* _tmp20_;
+ ThumbnailCache* _tmp21_;
+ ThumbnailCacheAsyncFetchJob* _tmp22_;
+ const gchar* _tmp23_;
+ ThumbnailCacheAsyncFetchJob* _tmp24_;
+ GdkPixbuf* _tmp25_;
+ gint _tmp26_;
#line 432 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
- _tmp21_ = job;
+ _tmp20_ = job;
#line 432 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
- _tmp22_ = _tmp21_->cache;
+ _tmp21_ = _tmp20_->cache;
#line 432 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
- _tmp23_ = job;
+ _tmp22_ = job;
#line 432 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
- _tmp24_ = _tmp23_->thumbnail_name;
+ _tmp23_ = _tmp22_->thumbnail_name;
#line 432 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
- _tmp25_ = job;
+ _tmp24_ = job;
#line 432 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
- _tmp26_ = _tmp25_->unscaled;
+ _tmp25_ = _tmp24_->unscaled;
#line 432 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
- thumbnail_cache_store_in_memory (_tmp22_, _tmp24_, _tmp26_);
+ thumbnail_cache_store_in_memory (_tmp21_, _tmp23_, _tmp25_);
#line 434 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
- _tmp27_ = thumbnail_cache_cycle_async_fetched_thumbnails;
+ _tmp26_ = thumbnail_cache_cycle_async_fetched_thumbnails;
#line 434 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
- thumbnail_cache_cycle_async_fetched_thumbnails = _tmp27_ + 1;
+ thumbnail_cache_cycle_async_fetched_thumbnails = _tmp26_ + 1;
#line 435 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
thumbnail_cache_schedule_debug ();
-#line 2479 "ThumbnailCache.c"
+#line 2573 "ThumbnailCache.c"
} else {
- gint _tmp28_;
+ gint _tmp27_;
#line 437 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
- _tmp28_ = thumbnail_cache_cycle_async_resized_thumbnails;
+ _tmp27_ = thumbnail_cache_cycle_async_resized_thumbnails;
#line 437 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
- thumbnail_cache_cycle_async_resized_thumbnails = _tmp28_ + 1;
+ thumbnail_cache_cycle_async_resized_thumbnails = _tmp27_ + 1;
#line 438 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
thumbnail_cache_schedule_debug ();
-#line 2488 "ThumbnailCache.c"
+#line 2582 "ThumbnailCache.c"
}
}
#line 442 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
- _tmp29_ = job;
+ _tmp28_ = job;
#line 442 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
- _tmp30_ = _tmp29_->callback;
+ _tmp29_ = _tmp28_->callback;
#line 442 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
- _tmp30__target = _tmp29_->callback_target;
+ _tmp29__target = _tmp28_->callback_target;
#line 442 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
- _tmp31_ = job;
+ _tmp30_ = job;
#line 442 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
- _tmp32_ = _tmp31_->scaled;
+ _tmp31_ = _tmp30_->scaled;
#line 442 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
- _tmp33_ = job;
+ _tmp32_ = job;
#line 442 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
- _tmp34_ = _tmp33_->unscaled;
+ _tmp33_ = _tmp32_->unscaled;
#line 442 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
- _tmp35_ = job;
+ _tmp34_ = job;
#line 442 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
- _tmp36_ = _tmp35_->dim;
+ _tmp35_ = _tmp34_->dim;
#line 442 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
- _tmp37_ = job;
+ _tmp36_ = job;
#line 442 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
- _tmp38_ = _tmp37_->interp;
+ _tmp37_ = _tmp36_->interp;
#line 442 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
- _tmp39_ = job;
+ _tmp38_ = job;
#line 442 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
- _tmp40_ = _tmp39_->err;
+ _tmp39_ = _tmp38_->err;
#line 442 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
- _tmp30_ (_tmp32_, _tmp34_, &_tmp36_, _tmp38_, _tmp40_, _tmp30__target);
+ _tmp29_ (_tmp31_, _tmp33_, &_tmp35_, _tmp37_, _tmp39_, _tmp29__target);
#line 416 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
_background_job_unref0 (job);
-#line 2521 "ThumbnailCache.c"
+#line 2615 "ThumbnailCache.c"
}
-static void _thumbnail_cache_import_from_source (ThumbnailCache* self, ThumbnailSource* source, gboolean force, GError** error) {
+static void
+_thumbnail_cache_import_from_source (ThumbnailCache* self,
+ ThumbnailSource* source,
+ gboolean force,
+ GError** error)
+{
GFile* file = NULL;
- ThumbnailSource* _tmp0_;
- GFile* _tmp1_;
- gboolean _tmp2_;
+ GFile* _tmp0_;
LibraryPhoto* photo = NULL;
- ThumbnailSource* _tmp6_;
- LibraryPhoto* _tmp7_;
- GdkPixbuf* _tmp8_ = NULL;
- LibraryPhoto* _tmp9_;
- ThumbnailCacheSize _tmp10_;
- gint _tmp11_;
- Scaling _tmp12_ = {0};
- GdkPixbuf* _tmp13_;
- GFile* _tmp14_;
- ThumbnailSource* _tmp15_;
+ LibraryPhoto* _tmp1_;
+ GdkPixbuf* _tmp2_ = NULL;
+ LibraryPhoto* _tmp3_;
+ ThumbnailCacheSize _tmp4_;
+ Scaling _tmp5_ = {0};
+ GdkPixbuf* _tmp6_;
+ GFile* _tmp7_;
GError * _inner_error_ = NULL;
#line 445 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
g_return_if_fail (IS_THUMBNAIL_CACHE (self));
#line 445 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
g_return_if_fail (IS_THUMBNAIL_SOURCE (source));
#line 447 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
- _tmp0_ = source;
+ _tmp0_ = thumbnail_cache_get_source_cached_file (self, source);
#line 447 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
- _tmp1_ = thumbnail_cache_get_source_cached_file (self, _tmp0_);
-#line 447 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
- file = _tmp1_;
-#line 451 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
- _tmp2_ = force;
+ file = _tmp0_;
#line 451 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
- if (!_tmp2_) {
-#line 2556 "ThumbnailCache.c"
- ThumbnailSource* _tmp3_;
- gboolean _tmp4_;
-#line 452 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
- _tmp3_ = source;
-#line 452 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
- _tmp4_ = _thumbnail_cache_exists (self, _tmp3_);
+ if (!force) {
#line 452 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
- if (_tmp4_) {
+ if (_thumbnail_cache_exists (self, source)) {
#line 453 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
_g_object_unref0 (file);
#line 453 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
return;
-#line 2569 "ThumbnailCache.c"
+#line 2652 "ThumbnailCache.c"
}
} else {
- ThumbnailSource* _tmp5_;
#line 456 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
- _tmp5_ = source;
-#line 456 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
- _thumbnail_cache_remove (self, _tmp5_);
-#line 2577 "ThumbnailCache.c"
+ _thumbnail_cache_remove (self, source);
+#line 2657 "ThumbnailCache.c"
}
#line 459 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
- _tmp6_ = source;
-#line 459 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
- _tmp7_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_CAST (_tmp6_, TYPE_LIBRARY_PHOTO, LibraryPhoto));
+ _tmp1_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_CAST (source, TYPE_LIBRARY_PHOTO, LibraryPhoto));
#line 459 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
- photo = _tmp7_;
-#line 460 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
- _tmp9_ = photo;
+ photo = _tmp1_;
#line 460 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
- _tmp10_ = self->priv->size;
+ _tmp3_ = photo;
#line 460 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
- _tmp11_ = thumbnail_cache_size_get_scale (_tmp10_);
+ _tmp4_ = self->priv->size;
#line 460 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
- scaling_for_best_fit (_tmp11_, TRUE, &_tmp12_);
+ scaling_for_best_fit (thumbnail_cache_size_get_scale (_tmp4_), TRUE, &_tmp5_);
#line 460 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
- _tmp13_ = photo_source_get_pixbuf (G_TYPE_CHECK_INSTANCE_CAST (_tmp9_, TYPE_PHOTO_SOURCE, PhotoSource), &_tmp12_, &_inner_error_);
+ _tmp6_ = photo_source_get_pixbuf (G_TYPE_CHECK_INSTANCE_CAST (_tmp3_, TYPE_PHOTO_SOURCE, PhotoSource), &_tmp5_, &_inner_error_);
#line 460 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
- _tmp8_ = _tmp13_;
+ _tmp2_ = _tmp6_;
#line 460 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 460 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
@@ -2603,51 +2679,47 @@ static void _thumbnail_cache_import_from_source (ThumbnailCache* self, Thumbnail
_g_object_unref0 (file);
#line 460 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
return;
-#line 2607 "ThumbnailCache.c"
+#line 2683 "ThumbnailCache.c"
}
#line 460 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
- _tmp14_ = file;
+ _tmp7_ = file;
#line 460 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
- _tmp15_ = source;
-#line 460 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
- thumbnail_cache_save_thumbnail (self, _tmp14_, _tmp8_, _tmp15_, &_inner_error_);
+ thumbnail_cache_save_thumbnail (self, _tmp7_, _tmp2_, source, &_inner_error_);
#line 460 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 460 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
g_propagate_error (error, _inner_error_);
#line 460 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
- _g_object_unref0 (_tmp8_);
+ _g_object_unref0 (_tmp2_);
#line 460 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
_g_object_unref0 (photo);
#line 460 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
_g_object_unref0 (file);
#line 460 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
return;
-#line 2627 "ThumbnailCache.c"
+#line 2701 "ThumbnailCache.c"
}
#line 445 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
- _g_object_unref0 (_tmp8_);
+ _g_object_unref0 (_tmp2_);
#line 445 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
_g_object_unref0 (photo);
#line 445 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
_g_object_unref0 (file);
-#line 2635 "ThumbnailCache.c"
+#line 2709 "ThumbnailCache.c"
}
-static void _thumbnail_cache_import_thumbnail (ThumbnailCache* self, ThumbnailSource* source, GdkPixbuf* scaled, gboolean force, GError** error) {
- GdkPixbuf* _tmp0_;
- GdkPixbuf* _tmp1_;
- Dimensions _tmp2_ = {0};
- ThumbnailCacheSize _tmp3_;
- gint _tmp4_;
- gboolean _tmp5_;
- gboolean _tmp6_;
- ThumbnailSource* _tmp10_;
- GFile* _tmp11_;
- GFile* _tmp12_;
- GdkPixbuf* _tmp13_;
- ThumbnailSource* _tmp14_;
+static void
+_thumbnail_cache_import_thumbnail (ThumbnailCache* self,
+ ThumbnailSource* source,
+ GdkPixbuf* scaled,
+ gboolean force,
+ GError** error)
+{
+ Dimensions _tmp0_ = {0};
+ ThumbnailCacheSize _tmp1_;
+ GFile* _tmp2_;
+ GFile* _tmp3_;
GError * _inner_error_ = NULL;
#line 466 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
g_return_if_fail (IS_THUMBNAIL_CACHE (self));
@@ -2656,83 +2728,57 @@ static void _thumbnail_cache_import_thumbnail (ThumbnailCache* self, ThumbnailSo
#line 466 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
g_return_if_fail ((scaled == NULL) || GDK_IS_PIXBUF (scaled));
#line 468 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
- _tmp0_ = scaled;
-#line 468 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
- _vala_assert (_tmp0_ != NULL, "scaled != null");
-#line 469 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
- _tmp1_ = scaled;
+ _vala_assert (scaled != NULL, "scaled != null");
#line 469 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
- dimensions_for_pixbuf (_tmp1_, &_tmp2_);
-#line 469 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
- _tmp3_ = self->priv->size;
+ dimensions_for_pixbuf (scaled, &_tmp0_);
#line 469 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
- _tmp4_ = thumbnail_cache_size_get_scale (_tmp3_);
+ _tmp1_ = self->priv->size;
#line 469 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
- _tmp5_ = dimensions_approx_scaled (&_tmp2_, _tmp4_, 1);
-#line 469 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
- _vala_assert (_tmp5_, "Dimensions.for_pixbuf(scaled).approx_scaled(size.get_scale())");
-#line 473 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
- _tmp6_ = force;
+ _vala_assert (dimensions_approx_scaled (&_tmp0_, thumbnail_cache_size_get_scale (_tmp1_), 1), "Dimensions.for_pixbuf(scaled).approx_scaled(size.get_scale())");
#line 473 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
- if (!_tmp6_) {
-#line 2679 "ThumbnailCache.c"
- ThumbnailSource* _tmp7_;
- gboolean _tmp8_;
-#line 474 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
- _tmp7_ = source;
-#line 474 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
- _tmp8_ = _thumbnail_cache_exists (self, _tmp7_);
+ if (!force) {
#line 474 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
- if (_tmp8_) {
+ if (_thumbnail_cache_exists (self, source)) {
#line 475 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
return;
-#line 2690 "ThumbnailCache.c"
+#line 2745 "ThumbnailCache.c"
}
} else {
- ThumbnailSource* _tmp9_;
#line 478 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
- _tmp9_ = source;
-#line 478 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
- _thumbnail_cache_remove (self, _tmp9_);
-#line 2698 "ThumbnailCache.c"
+ _thumbnail_cache_remove (self, source);
+#line 2750 "ThumbnailCache.c"
}
#line 481 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
- _tmp10_ = source;
-#line 481 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
- _tmp11_ = thumbnail_cache_get_source_cached_file (self, _tmp10_);
-#line 481 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
- _tmp12_ = _tmp11_;
+ _tmp2_ = thumbnail_cache_get_source_cached_file (self, source);
#line 481 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
- _tmp13_ = scaled;
-#line 481 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
- _tmp14_ = source;
+ _tmp3_ = _tmp2_;
#line 481 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
- thumbnail_cache_save_thumbnail (self, _tmp12_, _tmp13_, _tmp14_, &_inner_error_);
+ thumbnail_cache_save_thumbnail (self, _tmp3_, scaled, source, &_inner_error_);
#line 481 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
- _g_object_unref0 (_tmp12_);
+ _g_object_unref0 (_tmp3_);
#line 481 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 481 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
g_propagate_error (error, _inner_error_);
#line 481 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
return;
-#line 2720 "ThumbnailCache.c"
+#line 2766 "ThumbnailCache.c"
}
}
-static void _thumbnail_cache_duplicate (ThumbnailCache* self, ThumbnailSource* src_source, ThumbnailSource* dest_source) {
+static void
+_thumbnail_cache_duplicate (ThumbnailCache* self,
+ ThumbnailSource* src_source,
+ ThumbnailSource* dest_source)
+{
GFile* src_file = NULL;
- ThumbnailSource* _tmp0_;
- GFile* _tmp1_;
+ GFile* _tmp0_;
GFile* dest_file = NULL;
- ThumbnailSource* _tmp2_;
- gchar* _tmp3_;
- gchar* _tmp4_;
- ThumbnailSource* _tmp5_;
- PhotoFileFormat _tmp6_;
- GFile* _tmp7_;
- GFile* _tmp8_;
+ gchar* _tmp1_;
+ gchar* _tmp2_;
+ GFile* _tmp3_;
+ GFile* _tmp4_;
GError * _inner_error_ = NULL;
#line 488 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
g_return_if_fail (IS_THUMBNAIL_CACHE (self));
@@ -2741,36 +2787,28 @@ static void _thumbnail_cache_duplicate (ThumbnailCache* self, ThumbnailSource* s
#line 488 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
g_return_if_fail (IS_THUMBNAIL_SOURCE (dest_source));
#line 489 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
- _tmp0_ = src_source;
+ _tmp0_ = thumbnail_cache_get_source_cached_file (self, src_source);
#line 489 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
- _tmp1_ = thumbnail_cache_get_source_cached_file (self, _tmp0_);
-#line 489 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
- src_file = _tmp1_;
-#line 490 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
- _tmp2_ = dest_source;
-#line 490 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
- _tmp3_ = thumbnail_source_get_representative_id (_tmp2_);
-#line 490 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
- _tmp4_ = _tmp3_;
+ src_file = _tmp0_;
#line 490 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
- _tmp5_ = src_source;
+ _tmp1_ = thumbnail_source_get_representative_id (dest_source);
#line 490 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
- _tmp6_ = thumbnail_source_get_preferred_thumbnail_format (_tmp5_);
+ _tmp2_ = _tmp1_;
#line 490 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
- _tmp7_ = thumbnail_cache_get_cached_file (self, _tmp4_, _tmp6_);
+ _tmp3_ = thumbnail_cache_get_cached_file (self, _tmp2_, thumbnail_source_get_preferred_thumbnail_format (src_source));
#line 490 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
- _tmp8_ = _tmp7_;
+ _tmp4_ = _tmp3_;
#line 490 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
- _g_free0 (_tmp4_);
+ _g_free0 (_tmp2_);
#line 490 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
- dest_file = _tmp8_;
-#line 2768 "ThumbnailCache.c"
+ dest_file = _tmp4_;
+#line 2806 "ThumbnailCache.c"
{
#line 494 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
g_file_copy (src_file, dest_file, G_FILE_COPY_ALL_METADATA | G_FILE_COPY_OVERWRITE, NULL, NULL, NULL, &_inner_error_);
#line 494 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
if (G_UNLIKELY (_inner_error_ != NULL)) {
-#line 2774 "ThumbnailCache.c"
+#line 2812 "ThumbnailCache.c"
goto __catch250_g_error;
}
}
@@ -2778,29 +2816,29 @@ static void _thumbnail_cache_duplicate (ThumbnailCache* self, ThumbnailSource* s
__catch250_g_error:
{
GError* err = NULL;
- GError* _tmp9_;
- const gchar* _tmp10_;
- gchar* _tmp11_;
- gchar* _tmp12_;
+ GError* _tmp5_;
+ const gchar* _tmp6_;
+ gchar* _tmp7_;
+ gchar* _tmp8_;
#line 493 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
err = _inner_error_;
#line 493 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
_inner_error_ = NULL;
#line 496 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
- _tmp9_ = err;
+ _tmp5_ = err;
#line 496 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
- _tmp10_ = _tmp9_->message;
+ _tmp6_ = _tmp5_->message;
#line 496 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
- _tmp11_ = g_strdup_printf ("%s", _tmp10_);
+ _tmp7_ = g_strdup_printf ("%s", _tmp6_);
#line 496 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
- _tmp12_ = _tmp11_;
+ _tmp8_ = _tmp7_;
#line 496 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
- app_window_panic (_tmp12_);
+ app_window_panic (_tmp8_);
#line 496 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
- _g_free0 (_tmp12_);
+ _g_free0 (_tmp8_);
#line 493 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
_g_error_free0 (err);
-#line 2804 "ThumbnailCache.c"
+#line 2842 "ThumbnailCache.c"
}
__finally250:
#line 493 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
@@ -2815,33 +2853,32 @@ static void _thumbnail_cache_duplicate (ThumbnailCache* self, ThumbnailSource* s
g_clear_error (&_inner_error_);
#line 493 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
return;
-#line 2819 "ThumbnailCache.c"
+#line 2857 "ThumbnailCache.c"
}
#line 488 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
_g_object_unref0 (dest_file);
#line 488 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
_g_object_unref0 (src_file);
-#line 2825 "ThumbnailCache.c"
+#line 2863 "ThumbnailCache.c"
}
-static void _thumbnail_cache_replace (ThumbnailCache* self, ThumbnailSource* source, GdkPixbuf* original, GError** error) {
+static void
+_thumbnail_cache_replace (ThumbnailCache* self,
+ ThumbnailSource* source,
+ GdkPixbuf* original,
+ GError** error)
+{
GFile* file = NULL;
- ThumbnailSource* _tmp0_;
- GFile* _tmp1_;
- ThumbnailSource* _tmp2_;
- gchar* _tmp3_;
- gchar* _tmp4_;
+ GFile* _tmp0_;
+ gchar* _tmp1_;
+ gchar* _tmp2_;
GdkPixbuf* scaled = NULL;
+ ThumbnailCacheSize _tmp3_;
+ GdkInterpType _tmp4_;
GdkPixbuf* _tmp5_;
- ThumbnailCacheSize _tmp6_;
- gint _tmp7_;
- GdkInterpType _tmp8_;
- GdkPixbuf* _tmp9_;
- ThumbnailSource* _tmp10_;
- ThumbnailSource* _tmp11_;
- gchar* _tmp12_;
- gchar* _tmp13_;
+ gchar* _tmp6_;
+ gchar* _tmp7_;
GError * _inner_error_ = NULL;
#line 502 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
g_return_if_fail (IS_THUMBNAIL_CACHE (self));
@@ -2850,37 +2887,27 @@ static void _thumbnail_cache_replace (ThumbnailCache* self, ThumbnailSource* sou
#line 502 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
g_return_if_fail (GDK_IS_PIXBUF (original));
#line 503 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
- _tmp0_ = source;
-#line 503 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
- _tmp1_ = thumbnail_cache_get_source_cached_file (self, _tmp0_);
+ _tmp0_ = thumbnail_cache_get_source_cached_file (self, source);
#line 503 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
- file = _tmp1_;
+ file = _tmp0_;
#line 506 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
- _tmp2_ = source;
+ _tmp1_ = data_source_get_source_id (G_TYPE_CHECK_INSTANCE_CAST (source, TYPE_DATA_SOURCE, DataSource));
#line 506 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
- _tmp3_ = data_source_get_source_id (G_TYPE_CHECK_INSTANCE_CAST (_tmp2_, TYPE_DATA_SOURCE, DataSource));
-#line 506 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
- _tmp4_ = _tmp3_;
+ _tmp2_ = _tmp1_;
#line 506 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
- thumbnail_cache_remove_from_memory (self, _tmp4_);
+ thumbnail_cache_remove_from_memory (self, _tmp2_);
#line 506 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
- _g_free0 (_tmp4_);
-#line 509 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
- _tmp5_ = original;
-#line 509 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
- _tmp6_ = self->priv->size;
+ _g_free0 (_tmp2_);
#line 509 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
- _tmp7_ = thumbnail_cache_size_get_scale (_tmp6_);
+ _tmp3_ = self->priv->size;
#line 509 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
- _tmp8_ = self->priv->interp;
+ _tmp4_ = self->priv->interp;
#line 509 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
- _tmp9_ = scale_pixbuf (_tmp5_, _tmp7_, _tmp8_, TRUE);
+ _tmp5_ = scale_pixbuf (original, thumbnail_cache_size_get_scale (_tmp3_), _tmp4_, TRUE);
#line 509 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
- scaled = _tmp9_;
+ scaled = _tmp5_;
#line 512 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
- _tmp10_ = source;
-#line 512 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
- thumbnail_cache_save_thumbnail (self, file, scaled, _tmp10_, &_inner_error_);
+ thumbnail_cache_save_thumbnail (self, file, scaled, source, &_inner_error_);
#line 512 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 512 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
@@ -2891,61 +2918,56 @@ static void _thumbnail_cache_replace (ThumbnailCache* self, ThumbnailSource* sou
_g_object_unref0 (file);
#line 512 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
return;
-#line 2895 "ThumbnailCache.c"
+#line 2922 "ThumbnailCache.c"
}
#line 518 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
- _tmp11_ = source;
-#line 518 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
- _tmp12_ = data_source_get_source_id (G_TYPE_CHECK_INSTANCE_CAST (_tmp11_, TYPE_DATA_SOURCE, DataSource));
+ _tmp6_ = data_source_get_source_id (G_TYPE_CHECK_INSTANCE_CAST (source, TYPE_DATA_SOURCE, DataSource));
#line 518 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
- _tmp13_ = _tmp12_;
+ _tmp7_ = _tmp6_;
#line 518 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
- thumbnail_cache_store_in_memory (self, _tmp13_, scaled);
+ thumbnail_cache_store_in_memory (self, _tmp7_, scaled);
#line 518 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
- _g_free0 (_tmp13_);
+ _g_free0 (_tmp7_);
#line 502 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
_g_object_unref0 (scaled);
#line 502 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
_g_object_unref0 (file);
-#line 2911 "ThumbnailCache.c"
+#line 2936 "ThumbnailCache.c"
}
-static void _thumbnail_cache_remove (ThumbnailCache* self, ThumbnailSource* source) {
+static void
+_thumbnail_cache_remove (ThumbnailCache* self,
+ ThumbnailSource* source)
+{
GFile* file = NULL;
- ThumbnailSource* _tmp0_;
- GFile* _tmp1_;
- ThumbnailSource* _tmp2_;
- gchar* _tmp3_;
- gchar* _tmp4_;
+ GFile* _tmp0_;
+ gchar* _tmp1_;
+ gchar* _tmp2_;
GError * _inner_error_ = NULL;
#line 521 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
g_return_if_fail (IS_THUMBNAIL_CACHE (self));
#line 521 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
g_return_if_fail (IS_THUMBNAIL_SOURCE (source));
#line 522 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
- _tmp0_ = source;
+ _tmp0_ = thumbnail_cache_get_source_cached_file (self, source);
#line 522 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
- _tmp1_ = thumbnail_cache_get_source_cached_file (self, _tmp0_);
-#line 522 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
- file = _tmp1_;
-#line 525 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
- _tmp2_ = source;
+ file = _tmp0_;
#line 525 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
- _tmp3_ = data_source_get_source_id (G_TYPE_CHECK_INSTANCE_CAST (_tmp2_, TYPE_DATA_SOURCE, DataSource));
+ _tmp1_ = data_source_get_source_id (G_TYPE_CHECK_INSTANCE_CAST (source, TYPE_DATA_SOURCE, DataSource));
#line 525 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
- _tmp4_ = _tmp3_;
+ _tmp2_ = _tmp1_;
#line 525 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
- thumbnail_cache_remove_from_memory (self, _tmp4_);
+ thumbnail_cache_remove_from_memory (self, _tmp2_);
#line 525 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
- _g_free0 (_tmp4_);
-#line 2943 "ThumbnailCache.c"
+ _g_free0 (_tmp2_);
+#line 2965 "ThumbnailCache.c"
{
#line 529 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
g_file_delete (file, NULL, &_inner_error_);
#line 529 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
if (G_UNLIKELY (_inner_error_ != NULL)) {
-#line 2949 "ThumbnailCache.c"
+#line 2971 "ThumbnailCache.c"
goto __catch251_g_error;
}
}
@@ -2959,7 +2981,7 @@ static void _thumbnail_cache_remove (ThumbnailCache* self, ThumbnailSource* sour
_inner_error_ = NULL;
#line 528 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
_g_error_free0 (err);
-#line 2963 "ThumbnailCache.c"
+#line 2985 "ThumbnailCache.c"
}
__finally251:
#line 528 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
@@ -2972,163 +2994,152 @@ static void _thumbnail_cache_remove (ThumbnailCache* self, ThumbnailSource* sour
g_clear_error (&_inner_error_);
#line 528 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
return;
-#line 2976 "ThumbnailCache.c"
+#line 2998 "ThumbnailCache.c"
}
#line 521 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
_g_object_unref0 (file);
-#line 2980 "ThumbnailCache.c"
+#line 3002 "ThumbnailCache.c"
}
-static gboolean _thumbnail_cache_exists (ThumbnailCache* self, ThumbnailSource* source) {
+static gboolean
+_thumbnail_cache_exists (ThumbnailCache* self,
+ ThumbnailSource* source)
+{
gboolean result = FALSE;
- ThumbnailSource* _tmp0_;
+ GFile* _tmp0_;
GFile* _tmp1_;
- GFile* _tmp2_;
- gboolean _tmp3_;
- gboolean _tmp4_;
+ gboolean _tmp2_;
#line 535 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
g_return_val_if_fail (IS_THUMBNAIL_CACHE (self), FALSE);
#line 535 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
g_return_val_if_fail (IS_THUMBNAIL_SOURCE (source), FALSE);
#line 536 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
- _tmp0_ = source;
+ _tmp0_ = thumbnail_cache_get_source_cached_file (self, source);
#line 536 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
- _tmp1_ = thumbnail_cache_get_source_cached_file (self, _tmp0_);
+ _tmp1_ = _tmp0_;
#line 536 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
- _tmp2_ = _tmp1_;
+ _tmp2_ = g_file_query_exists (_tmp1_, NULL);
#line 536 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
- _tmp3_ = g_file_query_exists (_tmp2_, NULL);
+ _g_object_unref0 (_tmp1_);
#line 536 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
- _tmp4_ = _tmp3_;
-#line 536 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
- _g_object_unref0 (_tmp2_);
-#line 536 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
- result = _tmp4_;
+ result = _tmp2_;
#line 536 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
return result;
-#line 3011 "ThumbnailCache.c"
+#line 3030 "ThumbnailCache.c"
}
-static GdkPixbuf* thumbnail_cache_read_pixbuf (ThumbnailCache* self, const gchar* thumbnail_name, PhotoFileFormat format, GError** error) {
+static GdkPixbuf*
+thumbnail_cache_read_pixbuf (ThumbnailCache* self,
+ const gchar* thumbnail_name,
+ PhotoFileFormat format,
+ GError** error)
+{
GdkPixbuf* result = NULL;
GdkPixbuf* _tmp0_ = NULL;
- PhotoFileFormat _tmp1_;
- const gchar* _tmp2_;
- PhotoFileFormat _tmp3_;
- GFile* _tmp4_;
- GFile* _tmp5_;
- gchar* _tmp6_;
- gchar* _tmp7_;
- PhotoFileReader* _tmp8_;
- PhotoFileReader* _tmp9_;
- GdkPixbuf* _tmp10_;
- GdkPixbuf* _tmp11_;
- GdkPixbuf* _tmp12_;
+ GFile* _tmp1_;
+ GFile* _tmp2_;
+ gchar* _tmp3_;
+ gchar* _tmp4_;
+ PhotoFileReader* _tmp5_;
+ PhotoFileReader* _tmp6_;
+ GdkPixbuf* _tmp7_;
+ GdkPixbuf* _tmp8_;
+ GdkPixbuf* _tmp9_;
GError * _inner_error_ = NULL;
#line 540 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
g_return_val_if_fail (IS_THUMBNAIL_CACHE (self), NULL);
#line 540 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
g_return_val_if_fail (thumbnail_name != NULL, NULL);
#line 541 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
- _tmp1_ = format;
-#line 541 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
- _tmp2_ = thumbnail_name;
+ _tmp1_ = thumbnail_cache_get_cached_file (self, thumbnail_name, format);
#line 541 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
- _tmp3_ = format;
-#line 541 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
- _tmp4_ = thumbnail_cache_get_cached_file (self, _tmp2_, _tmp3_);
-#line 541 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
- _tmp5_ = _tmp4_;
+ _tmp2_ = _tmp1_;
#line 541 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
- _tmp6_ = g_file_get_path (_tmp5_);
+ _tmp3_ = g_file_get_path (_tmp2_);
#line 541 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
- _tmp7_ = _tmp6_;
+ _tmp4_ = _tmp3_;
#line 541 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
- _tmp8_ = photo_file_format_create_reader (_tmp1_, _tmp7_);
+ _tmp5_ = photo_file_format_create_reader (format, _tmp4_);
#line 541 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
- _tmp9_ = _tmp8_;
+ _tmp6_ = _tmp5_;
#line 541 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
- _tmp10_ = photo_file_reader_unscaled_read (_tmp9_, &_inner_error_);
+ _tmp7_ = photo_file_reader_unscaled_read (_tmp6_, &_inner_error_);
#line 541 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
- _tmp11_ = _tmp10_;
+ _tmp8_ = _tmp7_;
#line 541 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
- _photo_file_adapter_unref0 (_tmp9_);
+ _photo_file_adapter_unref0 (_tmp6_);
#line 541 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
- _g_free0 (_tmp7_);
+ _g_free0 (_tmp4_);
#line 541 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
- _g_object_unref0 (_tmp5_);
+ _g_object_unref0 (_tmp2_);
#line 541 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
- _tmp0_ = _tmp11_;
+ _tmp0_ = _tmp8_;
#line 541 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 541 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
g_propagate_error (error, _inner_error_);
#line 541 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
return NULL;
-#line 3071 "ThumbnailCache.c"
+#line 3086 "ThumbnailCache.c"
}
#line 541 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
- _tmp12_ = _tmp0_;
+ _tmp9_ = _tmp0_;
#line 541 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
_tmp0_ = NULL;
#line 541 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
- result = _tmp12_;
+ result = _tmp9_;
#line 541 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
_g_object_unref0 (_tmp0_);
#line 541 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
return result;
-#line 3083 "ThumbnailCache.c"
+#line 3098 "ThumbnailCache.c"
}
-static GFile* thumbnail_cache_get_source_cached_file (ThumbnailCache* self, ThumbnailSource* source) {
+static GFile*
+thumbnail_cache_get_source_cached_file (ThumbnailCache* self,
+ ThumbnailSource* source)
+{
GFile* result = NULL;
- ThumbnailSource* _tmp0_;
+ gchar* _tmp0_;
gchar* _tmp1_;
- gchar* _tmp2_;
- ThumbnailSource* _tmp3_;
- PhotoFileFormat _tmp4_;
- GFile* _tmp5_;
- GFile* _tmp6_;
+ GFile* _tmp2_;
+ GFile* _tmp3_;
#line 545 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
g_return_val_if_fail (IS_THUMBNAIL_CACHE (self), NULL);
#line 545 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
g_return_val_if_fail (IS_THUMBNAIL_SOURCE (source), NULL);
#line 546 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
- _tmp0_ = source;
+ _tmp0_ = thumbnail_source_get_representative_id (source);
#line 546 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
- _tmp1_ = thumbnail_source_get_representative_id (_tmp0_);
+ _tmp1_ = _tmp0_;
#line 546 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
- _tmp2_ = _tmp1_;
-#line 546 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
- _tmp3_ = source;
-#line 546 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
- _tmp4_ = thumbnail_source_get_preferred_thumbnail_format (_tmp3_);
-#line 546 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
- _tmp5_ = thumbnail_cache_get_cached_file (self, _tmp2_, _tmp4_);
+ _tmp2_ = thumbnail_cache_get_cached_file (self, _tmp1_, thumbnail_source_get_preferred_thumbnail_format (source));
#line 546 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
- _tmp6_ = _tmp5_;
+ _tmp3_ = _tmp2_;
#line 546 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
- _g_free0 (_tmp2_);
+ _g_free0 (_tmp1_);
#line 546 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
- result = _tmp6_;
+ result = _tmp3_;
#line 546 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
return result;
-#line 3120 "ThumbnailCache.c"
+#line 3129 "ThumbnailCache.c"
}
-static GFile* thumbnail_cache_get_cached_file (ThumbnailCache* self, const gchar* thumbnail_name, PhotoFileFormat thumbnail_format) {
+static GFile*
+thumbnail_cache_get_cached_file (ThumbnailCache* self,
+ const gchar* thumbnail_name,
+ PhotoFileFormat thumbnail_format)
+{
GFile* result = NULL;
GFile* _tmp0_;
- PhotoFileFormat _tmp1_;
- const gchar* _tmp2_;
- gchar* _tmp3_;
- gchar* _tmp4_;
- GFile* _tmp5_;
- GFile* _tmp6_;
+ gchar* _tmp1_;
+ gchar* _tmp2_;
+ GFile* _tmp3_;
+ GFile* _tmp4_;
#line 550 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
g_return_val_if_fail (IS_THUMBNAIL_CACHE (self), NULL);
#line 550 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
@@ -3136,36 +3147,34 @@ static GFile* thumbnail_cache_get_cached_file (ThumbnailCache* self, const gchar
#line 551 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
_tmp0_ = self->priv->cache_dir;
#line 551 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
- _tmp1_ = thumbnail_format;
+ _tmp1_ = photo_file_format_get_default_basename (thumbnail_format, thumbnail_name);
#line 551 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
- _tmp2_ = thumbnail_name;
+ _tmp2_ = _tmp1_;
#line 551 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
- _tmp3_ = photo_file_format_get_default_basename (_tmp1_, _tmp2_);
+ _tmp3_ = g_file_get_child (_tmp0_, _tmp2_);
#line 551 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
_tmp4_ = _tmp3_;
#line 551 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
- _tmp5_ = g_file_get_child (_tmp0_, _tmp4_);
-#line 551 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
- _tmp6_ = _tmp5_;
-#line 551 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
- _g_free0 (_tmp4_);
+ _g_free0 (_tmp2_);
#line 551 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
- result = _tmp6_;
+ result = _tmp4_;
#line 551 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
return result;
-#line 3157 "ThumbnailCache.c"
+#line 3164 "ThumbnailCache.c"
}
-static GdkPixbuf* thumbnail_cache_fetch_from_memory (ThumbnailCache* self, const gchar* thumbnail_name) {
+static GdkPixbuf*
+thumbnail_cache_fetch_from_memory (ThumbnailCache* self,
+ const gchar* thumbnail_name)
+{
GdkPixbuf* result = NULL;
ThumbnailCacheImageData* data = NULL;
GeeHashMap* _tmp0_;
- const gchar* _tmp1_;
- gpointer _tmp2_;
- GdkPixbuf* _tmp3_ = NULL;
- ThumbnailCacheImageData* _tmp4_;
- GdkPixbuf* _tmp7_;
+ gpointer _tmp1_;
+ GdkPixbuf* _tmp2_ = NULL;
+ ThumbnailCacheImageData* _tmp3_;
+ GdkPixbuf* _tmp6_;
#line 554 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
g_return_val_if_fail (IS_THUMBNAIL_CACHE (self), NULL);
#line 554 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
@@ -3173,58 +3182,56 @@ static GdkPixbuf* thumbnail_cache_fetch_from_memory (ThumbnailCache* self, const
#line 555 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
_tmp0_ = self->priv->cache_map;
#line 555 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
- _tmp1_ = thumbnail_name;
-#line 555 "/home/jens/Source/shotwell/src/ThumbnailCache.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), thumbnail_name);
#line 555 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
- data = (ThumbnailCacheImageData*) _tmp2_;
+ data = (ThumbnailCacheImageData*) _tmp1_;
#line 557 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
- _tmp4_ = data;
+ _tmp3_ = data;
#line 557 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
- if (_tmp4_ != NULL) {
-#line 3186 "ThumbnailCache.c"
- ThumbnailCacheImageData* _tmp5_;
- GdkPixbuf* _tmp6_;
+ if (_tmp3_ != NULL) {
+#line 3193 "ThumbnailCache.c"
+ ThumbnailCacheImageData* _tmp4_;
+ GdkPixbuf* _tmp5_;
#line 557 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
- _tmp5_ = data;
+ _tmp4_ = data;
#line 557 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
- _tmp6_ = _tmp5_->pixbuf;
+ _tmp5_ = _tmp4_->pixbuf;
#line 557 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
- _tmp3_ = _tmp6_;
-#line 3195 "ThumbnailCache.c"
+ _tmp2_ = _tmp5_;
+#line 3202 "ThumbnailCache.c"
} else {
#line 557 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
- _tmp3_ = NULL;
-#line 3199 "ThumbnailCache.c"
+ _tmp2_ = NULL;
+#line 3206 "ThumbnailCache.c"
}
#line 557 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
- _tmp7_ = _g_object_ref0 (_tmp3_);
+ _tmp6_ = _g_object_ref0 (_tmp2_);
#line 557 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
- result = _tmp7_;
+ result = _tmp6_;
#line 557 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
_thumbnail_cache_image_data_unref0 (data);
#line 557 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
return result;
-#line 3209 "ThumbnailCache.c"
+#line 3216 "ThumbnailCache.c"
}
-static void thumbnail_cache_store_in_memory (ThumbnailCache* self, const gchar* thumbnail_name, GdkPixbuf* thumbnail) {
+static void
+thumbnail_cache_store_in_memory (ThumbnailCache* self,
+ const gchar* thumbnail_name,
+ GdkPixbuf* thumbnail)
+{
gulong _tmp0_;
- const gchar* _tmp1_;
ThumbnailCacheImageData* data = NULL;
- GdkPixbuf* _tmp2_;
- ThumbnailCacheImageData* _tmp3_;
- ThumbnailCacheImageData* _tmp4_;
- gulong _tmp5_;
- GeeHashMap* _tmp7_;
- const gchar* _tmp8_;
- ThumbnailCacheImageData* _tmp9_;
- GeeArrayList* _tmp10_;
- const gchar* _tmp11_;
- gulong _tmp12_;
- ThumbnailCacheImageData* _tmp13_;
- gulong _tmp14_;
+ ThumbnailCacheImageData* _tmp1_;
+ ThumbnailCacheImageData* _tmp2_;
+ gulong _tmp3_;
+ GeeHashMap* _tmp4_;
+ ThumbnailCacheImageData* _tmp5_;
+ GeeArrayList* _tmp6_;
+ gulong _tmp7_;
+ ThumbnailCacheImageData* _tmp8_;
+ gulong _tmp9_;
#line 560 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
g_return_if_fail (IS_THUMBNAIL_CACHE (self));
#line 560 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
@@ -3237,214 +3244,201 @@ static void thumbnail_cache_store_in_memory (ThumbnailCache* self, const gchar*
if (_tmp0_ <= ((gulong) 0)) {
#line 562 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
return;
-#line 3241 "ThumbnailCache.c"
+#line 3248 "ThumbnailCache.c"
}
#line 564 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
- _tmp1_ = thumbnail_name;
-#line 564 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
- thumbnail_cache_remove_from_memory (self, _tmp1_);
-#line 566 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
- _tmp2_ = thumbnail;
+ thumbnail_cache_remove_from_memory (self, thumbnail_name);
#line 566 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
- _tmp3_ = thumbnail_cache_image_data_new (_tmp2_);
+ _tmp1_ = thumbnail_cache_image_data_new (thumbnail);
#line 566 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
- data = _tmp3_;
+ data = _tmp1_;
#line 569 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
- _tmp4_ = data;
+ _tmp2_ = data;
#line 569 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
- _tmp5_ = _tmp4_->bytes;
+ _tmp3_ = _tmp2_->bytes;
#line 569 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
- if (_tmp5_ > ((gulong) THUMBNAIL_CACHE_MAX_INMEMORY_DATA_SIZE)) {
-#line 3259 "ThumbnailCache.c"
- const gchar* _tmp6_;
-#line 570 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
- _tmp6_ = thumbnail_name;
+ if (_tmp3_ > ((gulong) THUMBNAIL_CACHE_MAX_INMEMORY_DATA_SIZE)) {
#line 570 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
g_debug ("ThumbnailCache.vala:570: Persistent thumbnail [%s] too large to cache " \
-"in memory", _tmp6_);
+"in memory", thumbnail_name);
#line 572 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
_thumbnail_cache_image_data_unref0 (data);
#line 572 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
return;
-#line 3269 "ThumbnailCache.c"
+#line 3268 "ThumbnailCache.c"
}
#line 575 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
- _tmp7_ = self->priv->cache_map;
+ _tmp4_ = self->priv->cache_map;
#line 575 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
- _tmp8_ = thumbnail_name;
-#line 575 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
- _tmp9_ = data;
+ _tmp5_ = data;
#line 575 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
- gee_abstract_map_set (G_TYPE_CHECK_INSTANCE_CAST (_tmp7_, GEE_TYPE_ABSTRACT_MAP, GeeAbstractMap), _tmp8_, _tmp9_);
+ gee_abstract_map_set (G_TYPE_CHECK_INSTANCE_CAST (_tmp4_, GEE_TYPE_ABSTRACT_MAP, GeeAbstractMap), thumbnail_name, _tmp5_);
#line 576 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
- _tmp10_ = self->priv->cache_lru;
+ _tmp6_ = self->priv->cache_lru;
#line 576 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
- _tmp11_ = thumbnail_name;
-#line 576 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
- gee_abstract_list_insert (G_TYPE_CHECK_INSTANCE_CAST (_tmp10_, GEE_TYPE_ABSTRACT_LIST, GeeAbstractList), 0, _tmp11_);
+ gee_abstract_list_insert (G_TYPE_CHECK_INSTANCE_CAST (_tmp6_, GEE_TYPE_ABSTRACT_LIST, GeeAbstractList), 0, thumbnail_name);
#line 578 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
- _tmp12_ = self->priv->cached_bytes;
+ _tmp7_ = self->priv->cached_bytes;
#line 578 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
- _tmp13_ = data;
+ _tmp8_ = data;
#line 578 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
- _tmp14_ = _tmp13_->bytes;
+ _tmp9_ = _tmp8_->bytes;
#line 578 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
- self->priv->cached_bytes = _tmp12_ + _tmp14_;
+ self->priv->cached_bytes = _tmp7_ + _tmp9_;
#line 581 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
while (TRUE) {
-#line 3295 "ThumbnailCache.c"
- gulong _tmp15_;
- gulong _tmp16_;
- GeeArrayList* _tmp17_;
- gint _tmp18_;
- gint _tmp19_;
+#line 3290 "ThumbnailCache.c"
+ gulong _tmp10_;
+ gulong _tmp11_;
+ GeeArrayList* _tmp12_;
+ gint _tmp13_;
+ gint _tmp14_;
gint index = 0;
- GeeArrayList* _tmp20_;
- gint _tmp21_;
- gint _tmp22_;
+ GeeArrayList* _tmp15_;
+ gint _tmp16_;
+ gint _tmp17_;
gchar* victim_name = NULL;
- GeeArrayList* _tmp23_;
- gint _tmp24_;
- gpointer _tmp25_;
- GeeArrayList* _tmp26_;
- gint _tmp27_;
- gpointer _tmp28_;
- gchar* _tmp29_;
- GeeHashMap* _tmp30_;
- const gchar* _tmp31_;
- gpointer _tmp32_;
- gint _tmp33_;
+ GeeArrayList* _tmp18_;
+ gint _tmp19_;
+ gpointer _tmp20_;
+ GeeArrayList* _tmp21_;
+ gint _tmp22_;
+ gpointer _tmp23_;
+ gchar* _tmp24_;
+ GeeHashMap* _tmp25_;
+ const gchar* _tmp26_;
+ gpointer _tmp27_;
+ gint _tmp28_;
gboolean removed = FALSE;
- GeeHashMap* _tmp34_;
- const gchar* _tmp35_;
- gboolean _tmp36_;
- gboolean _tmp37_;
- ThumbnailCacheImageData* _tmp38_;
- gulong _tmp39_;
- gulong _tmp40_;
- gulong _tmp41_;
- ThumbnailCacheImageData* _tmp42_;
- gulong _tmp43_;
+ GeeHashMap* _tmp29_;
+ const gchar* _tmp30_;
+ gboolean _tmp31_;
+ gboolean _tmp32_;
+ ThumbnailCacheImageData* _tmp33_;
+ gulong _tmp34_;
+ gulong _tmp35_;
+ gulong _tmp36_;
+ ThumbnailCacheImageData* _tmp37_;
+ gulong _tmp38_;
#line 581 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
- _tmp15_ = self->priv->cached_bytes;
+ _tmp10_ = self->priv->cached_bytes;
#line 581 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
- _tmp16_ = self->priv->max_cached_bytes;
+ _tmp11_ = self->priv->max_cached_bytes;
#line 581 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
- if (!(_tmp15_ > _tmp16_)) {
+ if (!(_tmp10_ > _tmp11_)) {
#line 581 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
break;
-#line 3336 "ThumbnailCache.c"
+#line 3331 "ThumbnailCache.c"
}
#line 582 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
- _tmp17_ = self->priv->cache_lru;
+ _tmp12_ = self->priv->cache_lru;
#line 582 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
- _tmp18_ = gee_abstract_collection_get_size (G_TYPE_CHECK_INSTANCE_CAST (_tmp17_, GEE_TYPE_ABSTRACT_COLLECTION, GeeAbstractCollection));
+ _tmp13_ = gee_abstract_collection_get_size (G_TYPE_CHECK_INSTANCE_CAST (_tmp12_, GEE_TYPE_ABSTRACT_COLLECTION, GeeAbstractCollection));
#line 582 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
- _tmp19_ = _tmp18_;
+ _tmp14_ = _tmp13_;
#line 582 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
- _vala_assert (_tmp19_ > 0, "cache_lru.size > 0");
+ _vala_assert (_tmp14_ > 0, "cache_lru.size > 0");
#line 583 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
- _tmp20_ = self->priv->cache_lru;
+ _tmp15_ = self->priv->cache_lru;
#line 583 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
- _tmp21_ = gee_abstract_collection_get_size (G_TYPE_CHECK_INSTANCE_CAST (_tmp20_, GEE_TYPE_ABSTRACT_COLLECTION, GeeAbstractCollection));
+ _tmp16_ = gee_abstract_collection_get_size (G_TYPE_CHECK_INSTANCE_CAST (_tmp15_, GEE_TYPE_ABSTRACT_COLLECTION, GeeAbstractCollection));
#line 583 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
- _tmp22_ = _tmp21_;
+ _tmp17_ = _tmp16_;
#line 583 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
- index = _tmp22_ - 1;
+ index = _tmp17_ - 1;
#line 585 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
- _tmp23_ = self->priv->cache_lru;
+ _tmp18_ = self->priv->cache_lru;
#line 585 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
- _tmp24_ = index;
+ _tmp19_ = index;
#line 585 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
- _tmp25_ = gee_abstract_list_get (G_TYPE_CHECK_INSTANCE_CAST (_tmp23_, GEE_TYPE_ABSTRACT_LIST, GeeAbstractList), _tmp24_);
+ _tmp20_ = gee_abstract_list_get (G_TYPE_CHECK_INSTANCE_CAST (_tmp18_, GEE_TYPE_ABSTRACT_LIST, GeeAbstractList), _tmp19_);
#line 585 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
- victim_name = (gchar*) _tmp25_;
+ victim_name = (gchar*) _tmp20_;
#line 586 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
- _tmp26_ = self->priv->cache_lru;
+ _tmp21_ = self->priv->cache_lru;
#line 586 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
- _tmp27_ = index;
+ _tmp22_ = index;
#line 586 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
- _tmp28_ = gee_abstract_list_remove_at (G_TYPE_CHECK_INSTANCE_CAST (_tmp26_, GEE_TYPE_ABSTRACT_LIST, GeeAbstractList), _tmp27_);
+ _tmp23_ = gee_abstract_list_remove_at (G_TYPE_CHECK_INSTANCE_CAST (_tmp21_, GEE_TYPE_ABSTRACT_LIST, GeeAbstractList), _tmp22_);
#line 586 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
- _tmp29_ = (gchar*) _tmp28_;
+ _tmp24_ = (gchar*) _tmp23_;
#line 586 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
- _g_free0 (_tmp29_);
+ _g_free0 (_tmp24_);
#line 588 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
- _tmp30_ = self->priv->cache_map;
+ _tmp25_ = self->priv->cache_map;
#line 588 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
- _tmp31_ = victim_name;
+ _tmp26_ = victim_name;
#line 588 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
- _tmp32_ = gee_abstract_map_get (G_TYPE_CHECK_INSTANCE_CAST (_tmp30_, GEE_TYPE_ABSTRACT_MAP, GeeAbstractMap), _tmp31_);
+ _tmp27_ = gee_abstract_map_get (G_TYPE_CHECK_INSTANCE_CAST (_tmp25_, GEE_TYPE_ABSTRACT_MAP, GeeAbstractMap), _tmp26_);
#line 588 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
_thumbnail_cache_image_data_unref0 (data);
#line 588 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
- data = (ThumbnailCacheImageData*) _tmp32_;
+ data = (ThumbnailCacheImageData*) _tmp27_;
#line 590 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
- _tmp33_ = thumbnail_cache_cycle_overflow_thumbnails;
+ _tmp28_ = thumbnail_cache_cycle_overflow_thumbnails;
#line 590 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
- thumbnail_cache_cycle_overflow_thumbnails = _tmp33_ + 1;
+ thumbnail_cache_cycle_overflow_thumbnails = _tmp28_ + 1;
#line 591 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
thumbnail_cache_schedule_debug ();
#line 593 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
- _tmp34_ = self->priv->cache_map;
+ _tmp29_ = self->priv->cache_map;
#line 593 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
- _tmp35_ = victim_name;
+ _tmp30_ = victim_name;
#line 593 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
- _tmp36_ = gee_abstract_map_unset (G_TYPE_CHECK_INSTANCE_CAST (_tmp34_, GEE_TYPE_ABSTRACT_MAP, GeeAbstractMap), _tmp35_, NULL);
+ _tmp31_ = gee_abstract_map_unset (G_TYPE_CHECK_INSTANCE_CAST (_tmp29_, GEE_TYPE_ABSTRACT_MAP, GeeAbstractMap), _tmp30_, NULL);
#line 593 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
- removed = _tmp36_;
+ removed = _tmp31_;
#line 594 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
- _tmp37_ = removed;
+ _tmp32_ = removed;
#line 594 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
- _vala_assert (_tmp37_, "removed");
+ _vala_assert (_tmp32_, "removed");
#line 596 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
- _tmp38_ = data;
+ _tmp33_ = data;
#line 596 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
- _tmp39_ = _tmp38_->bytes;
+ _tmp34_ = _tmp33_->bytes;
#line 596 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
- _tmp40_ = self->priv->cached_bytes;
+ _tmp35_ = self->priv->cached_bytes;
#line 596 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
- _vala_assert (_tmp39_ <= _tmp40_, "data.bytes <= cached_bytes");
+ _vala_assert (_tmp34_ <= _tmp35_, "data.bytes <= cached_bytes");
#line 597 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
- _tmp41_ = self->priv->cached_bytes;
+ _tmp36_ = self->priv->cached_bytes;
#line 597 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
- _tmp42_ = data;
+ _tmp37_ = data;
#line 597 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
- _tmp43_ = _tmp42_->bytes;
+ _tmp38_ = _tmp37_->bytes;
#line 597 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
- self->priv->cached_bytes = _tmp41_ - _tmp43_;
+ self->priv->cached_bytes = _tmp36_ - _tmp38_;
#line 581 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
_g_free0 (victim_name);
-#line 3418 "ThumbnailCache.c"
+#line 3413 "ThumbnailCache.c"
}
#line 560 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
_thumbnail_cache_image_data_unref0 (data);
-#line 3422 "ThumbnailCache.c"
+#line 3417 "ThumbnailCache.c"
}
-static gboolean thumbnail_cache_remove_from_memory (ThumbnailCache* self, const gchar* thumbnail_name) {
+static gboolean
+thumbnail_cache_remove_from_memory (ThumbnailCache* self,
+ const gchar* thumbnail_name)
+{
gboolean result = FALSE;
ThumbnailCacheImageData* data = NULL;
GeeHashMap* _tmp0_;
- const gchar* _tmp1_;
- gpointer _tmp2_;
- ThumbnailCacheImageData* _tmp3_;
- gulong _tmp4_;
- ThumbnailCacheImageData* _tmp5_;
+ gpointer _tmp1_;
+ ThumbnailCacheImageData* _tmp2_;
+ gulong _tmp3_;
+ ThumbnailCacheImageData* _tmp4_;
+ gulong _tmp5_;
gulong _tmp6_;
- gulong _tmp7_;
- ThumbnailCacheImageData* _tmp8_;
- gulong _tmp9_;
+ ThumbnailCacheImageData* _tmp7_;
+ gulong _tmp8_;
gboolean removed = FALSE;
- GeeHashMap* _tmp10_;
- const gchar* _tmp11_;
- gboolean _tmp12_;
+ GeeHashMap* _tmp9_;
+ gboolean _tmp10_;
+ gboolean _tmp11_;
+ GeeArrayList* _tmp12_;
gboolean _tmp13_;
- GeeArrayList* _tmp14_;
- const gchar* _tmp15_;
- gboolean _tmp16_;
- gboolean _tmp17_;
#line 601 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
g_return_val_if_fail (IS_THUMBNAIL_CACHE (self), FALSE);
#line 601 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
@@ -3452,83 +3446,77 @@ static gboolean thumbnail_cache_remove_from_memory (ThumbnailCache* self, const
#line 602 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
_tmp0_ = self->priv->cache_map;
#line 602 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
- _tmp1_ = thumbnail_name;
-#line 602 "/home/jens/Source/shotwell/src/ThumbnailCache.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), thumbnail_name);
#line 602 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
- data = (ThumbnailCacheImageData*) _tmp2_;
+ data = (ThumbnailCacheImageData*) _tmp1_;
#line 603 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
- _tmp3_ = data;
+ _tmp2_ = data;
#line 603 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
- if (_tmp3_ == NULL) {
+ if (_tmp2_ == NULL) {
#line 604 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
result = FALSE;
#line 604 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
_thumbnail_cache_image_data_unref0 (data);
#line 604 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
return result;
-#line 3470 "ThumbnailCache.c"
+#line 3462 "ThumbnailCache.c"
}
#line 606 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
- _tmp4_ = self->priv->cached_bytes;
+ _tmp3_ = self->priv->cached_bytes;
#line 606 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
- _tmp5_ = data;
+ _tmp4_ = data;
#line 606 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
- _tmp6_ = _tmp5_->bytes;
+ _tmp5_ = _tmp4_->bytes;
#line 606 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
- _vala_assert (_tmp4_ >= _tmp6_, "cached_bytes >= data.bytes");
+ _vala_assert (_tmp3_ >= _tmp5_, "cached_bytes >= data.bytes");
#line 607 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
- _tmp7_ = self->priv->cached_bytes;
+ _tmp6_ = self->priv->cached_bytes;
#line 607 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
- _tmp8_ = data;
+ _tmp7_ = data;
#line 607 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
- _tmp9_ = _tmp8_->bytes;
+ _tmp8_ = _tmp7_->bytes;
#line 607 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
- self->priv->cached_bytes = _tmp7_ - _tmp9_;
-#line 610 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
- _tmp10_ = self->priv->cache_map;
+ self->priv->cached_bytes = _tmp6_ - _tmp8_;
#line 610 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
- _tmp11_ = thumbnail_name;
+ _tmp9_ = self->priv->cache_map;
#line 610 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
- _tmp12_ = gee_abstract_map_unset (G_TYPE_CHECK_INSTANCE_CAST (_tmp10_, GEE_TYPE_ABSTRACT_MAP, GeeAbstractMap), _tmp11_, NULL);
+ _tmp10_ = gee_abstract_map_unset (G_TYPE_CHECK_INSTANCE_CAST (_tmp9_, GEE_TYPE_ABSTRACT_MAP, GeeAbstractMap), thumbnail_name, NULL);
#line 610 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
- removed = _tmp12_;
+ removed = _tmp10_;
#line 611 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
- _tmp13_ = removed;
+ _tmp11_ = removed;
#line 611 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
- _vala_assert (_tmp13_, "removed");
-#line 614 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
- _tmp14_ = self->priv->cache_lru;
+ _vala_assert (_tmp11_, "removed");
#line 614 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
- _tmp15_ = thumbnail_name;
+ _tmp12_ = self->priv->cache_lru;
#line 614 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
- _tmp16_ = gee_abstract_collection_remove (G_TYPE_CHECK_INSTANCE_CAST (_tmp14_, GEE_TYPE_ABSTRACT_COLLECTION, GeeAbstractCollection), _tmp15_);
-#line 614 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
- removed = _tmp16_;
+ removed = gee_abstract_collection_remove (G_TYPE_CHECK_INSTANCE_CAST (_tmp12_, GEE_TYPE_ABSTRACT_COLLECTION, GeeAbstractCollection), thumbnail_name);
#line 615 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
- _tmp17_ = removed;
+ _tmp13_ = removed;
#line 615 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
- _vala_assert (_tmp17_, "removed");
+ _vala_assert (_tmp13_, "removed");
#line 617 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
result = TRUE;
#line 617 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
_thumbnail_cache_image_data_unref0 (data);
#line 617 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
return result;
-#line 3518 "ThumbnailCache.c"
+#line 3504 "ThumbnailCache.c"
}
-static void thumbnail_cache_save_thumbnail (ThumbnailCache* self, GFile* file, GdkPixbuf* pixbuf, ThumbnailSource* source, GError** error) {
+static void
+thumbnail_cache_save_thumbnail (ThumbnailCache* self,
+ GFile* file,
+ GdkPixbuf* pixbuf,
+ ThumbnailSource* source,
+ GError** error)
+{
PhotoFileWriter* _tmp0_ = NULL;
- ThumbnailSource* _tmp1_;
- PhotoFileFormat _tmp2_;
- GFile* _tmp3_;
- gchar* _tmp4_;
- gchar* _tmp5_;
- PhotoFileWriter* _tmp6_;
- PhotoFileWriter* _tmp7_;
- GdkPixbuf* _tmp8_;
+ gchar* _tmp1_;
+ gchar* _tmp2_;
+ PhotoFileWriter* _tmp3_;
+ PhotoFileWriter* _tmp4_;
GError * _inner_error_ = NULL;
#line 620 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
g_return_if_fail (IS_THUMBNAIL_CACHE (self));
@@ -3539,35 +3527,27 @@ static void thumbnail_cache_save_thumbnail (ThumbnailCache* self, GFile* file, G
#line 620 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
g_return_if_fail (IS_THUMBNAIL_SOURCE (source));
#line 621 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
- _tmp1_ = source;
+ _tmp1_ = g_file_get_path (file);
#line 621 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
- _tmp2_ = thumbnail_source_get_preferred_thumbnail_format (_tmp1_);
-#line 621 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
- _tmp3_ = file;
-#line 621 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
- _tmp4_ = g_file_get_path (_tmp3_);
-#line 621 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
- _tmp5_ = _tmp4_;
+ _tmp2_ = _tmp1_;
#line 621 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
- _tmp6_ = photo_file_format_create_writer (_tmp2_, _tmp5_, &_inner_error_);
+ _tmp3_ = photo_file_format_create_writer (thumbnail_source_get_preferred_thumbnail_format (source), _tmp2_, &_inner_error_);
#line 621 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
- _tmp7_ = _tmp6_;
+ _tmp4_ = _tmp3_;
#line 621 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
- _g_free0 (_tmp5_);
+ _g_free0 (_tmp2_);
#line 621 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
- _tmp0_ = _tmp7_;
+ _tmp0_ = _tmp4_;
#line 621 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 621 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
g_propagate_error (error, _inner_error_);
#line 621 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
return;
-#line 3565 "ThumbnailCache.c"
+#line 3547 "ThumbnailCache.c"
}
#line 621 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
- _tmp8_ = pixbuf;
-#line 621 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
- photo_file_writer_write (_tmp0_, _tmp8_, THUMBNAIL_CACHE_DEFAULT_QUALITY, &_inner_error_);
+ photo_file_writer_write (_tmp0_, pixbuf, THUMBNAIL_CACHE_DEFAULT_QUALITY, &_inner_error_);
#line 621 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 621 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
@@ -3576,155 +3556,170 @@ static void thumbnail_cache_save_thumbnail (ThumbnailCache* self, GFile* file, G
_photo_file_adapter_unref0 (_tmp0_);
#line 621 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
return;
-#line 3579 "ThumbnailCache.c"
+#line 3559 "ThumbnailCache.c"
}
#line 620 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
_photo_file_adapter_unref0 (_tmp0_);
-#line 3583 "ThumbnailCache.c"
+#line 3563 "ThumbnailCache.c"
}
-static ThumbnailCacheImageData* thumbnail_cache_image_data_construct (GType object_type, GdkPixbuf* pixbuf) {
+static ThumbnailCacheImageData*
+thumbnail_cache_image_data_construct (GType object_type,
+ GdkPixbuf* pixbuf)
+{
ThumbnailCacheImageData* self = NULL;
GdkPixbuf* _tmp0_;
- GdkPixbuf* _tmp1_;
- GdkPixbuf* _tmp2_;
- gint _tmp3_;
- GdkPixbuf* _tmp4_;
- gint _tmp5_;
#line 63 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
g_return_val_if_fail (GDK_IS_PIXBUF (pixbuf), NULL);
#line 63 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
self = (ThumbnailCacheImageData*) g_type_create_instance (object_type);
#line 64 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
- _tmp0_ = pixbuf;
-#line 64 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
- _tmp1_ = _g_object_ref0 (_tmp0_);
+ _tmp0_ = _g_object_ref0 (pixbuf);
#line 64 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
_g_object_unref0 (self->pixbuf);
#line 64 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
- self->pixbuf = _tmp1_;
+ self->pixbuf = _tmp0_;
#line 68 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
- _tmp2_ = pixbuf;
-#line 68 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
- _tmp3_ = gdk_pixbuf_get_rowstride (_tmp2_);
-#line 68 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
- _tmp4_ = pixbuf;
-#line 68 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
- _tmp5_ = gdk_pixbuf_get_height (_tmp4_);
-#line 68 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
- self->bytes = ((gulong) _tmp3_) * ((gulong) _tmp5_);
+ self->bytes = ((gulong) gdk_pixbuf_get_rowstride (pixbuf)) * ((gulong) gdk_pixbuf_get_height (pixbuf));
#line 63 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
return self;
-#line 3619 "ThumbnailCache.c"
+#line 3587 "ThumbnailCache.c"
}
-static ThumbnailCacheImageData* thumbnail_cache_image_data_new (GdkPixbuf* pixbuf) {
+static ThumbnailCacheImageData*
+thumbnail_cache_image_data_new (GdkPixbuf* pixbuf)
+{
#line 63 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
return thumbnail_cache_image_data_construct (THUMBNAIL_CACHE_TYPE_IMAGE_DATA, pixbuf);
-#line 3626 "ThumbnailCache.c"
+#line 3596 "ThumbnailCache.c"
}
-static void thumbnail_cache_value_image_data_init (GValue* value) {
+static void
+thumbnail_cache_value_image_data_init (GValue* value)
+{
#line 59 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
value->data[0].v_pointer = NULL;
-#line 3633 "ThumbnailCache.c"
+#line 3605 "ThumbnailCache.c"
}
-static void thumbnail_cache_value_image_data_free_value (GValue* value) {
+static void
+thumbnail_cache_value_image_data_free_value (GValue* value)
+{
#line 59 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
if (value->data[0].v_pointer) {
#line 59 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
thumbnail_cache_image_data_unref (value->data[0].v_pointer);
-#line 3642 "ThumbnailCache.c"
+#line 3616 "ThumbnailCache.c"
}
}
-static void thumbnail_cache_value_image_data_copy_value (const GValue* src_value, GValue* dest_value) {
+static void
+thumbnail_cache_value_image_data_copy_value (const GValue* src_value,
+ GValue* dest_value)
+{
#line 59 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
if (src_value->data[0].v_pointer) {
#line 59 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
dest_value->data[0].v_pointer = thumbnail_cache_image_data_ref (src_value->data[0].v_pointer);
-#line 3652 "ThumbnailCache.c"
+#line 3629 "ThumbnailCache.c"
} else {
#line 59 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
dest_value->data[0].v_pointer = NULL;
-#line 3656 "ThumbnailCache.c"
+#line 3633 "ThumbnailCache.c"
}
}
-static gpointer thumbnail_cache_value_image_data_peek_pointer (const GValue* value) {
+static gpointer
+thumbnail_cache_value_image_data_peek_pointer (const GValue* value)
+{
#line 59 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
return value->data[0].v_pointer;
-#line 3664 "ThumbnailCache.c"
+#line 3643 "ThumbnailCache.c"
}
-static gchar* thumbnail_cache_value_image_data_collect_value (GValue* value, guint n_collect_values, GTypeCValue* collect_values, guint collect_flags) {
+static gchar*
+thumbnail_cache_value_image_data_collect_value (GValue* value,
+ guint n_collect_values,
+ GTypeCValue* collect_values,
+ guint collect_flags)
+{
#line 59 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
if (collect_values[0].v_pointer) {
-#line 3671 "ThumbnailCache.c"
+#line 3655 "ThumbnailCache.c"
ThumbnailCacheImageData * object;
object = collect_values[0].v_pointer;
#line 59 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
if (object->parent_instance.g_class == NULL) {
#line 59 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
return g_strconcat ("invalid unclassed object pointer for value type `", G_VALUE_TYPE_NAME (value), "'", NULL);
-#line 3678 "ThumbnailCache.c"
+#line 3662 "ThumbnailCache.c"
} else if (!g_value_type_compatible (G_TYPE_FROM_INSTANCE (object), G_VALUE_TYPE (value))) {
#line 59 "/home/jens/Source/shotwell/src/ThumbnailCache.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 3682 "ThumbnailCache.c"
+#line 3666 "ThumbnailCache.c"
}
#line 59 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
value->data[0].v_pointer = thumbnail_cache_image_data_ref (object);
-#line 3686 "ThumbnailCache.c"
+#line 3670 "ThumbnailCache.c"
} else {
#line 59 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
value->data[0].v_pointer = NULL;
-#line 3690 "ThumbnailCache.c"
+#line 3674 "ThumbnailCache.c"
}
#line 59 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
return NULL;
-#line 3694 "ThumbnailCache.c"
+#line 3678 "ThumbnailCache.c"
}
-static gchar* thumbnail_cache_value_image_data_lcopy_value (const GValue* value, guint n_collect_values, GTypeCValue* collect_values, guint collect_flags) {
+static gchar*
+thumbnail_cache_value_image_data_lcopy_value (const GValue* value,
+ guint n_collect_values,
+ GTypeCValue* collect_values,
+ guint collect_flags)
+{
ThumbnailCacheImageData ** object_p;
object_p = collect_values[0].v_pointer;
#line 59 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
if (!object_p) {
#line 59 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
return g_strdup_printf ("value location for `%s' passed as NULL", G_VALUE_TYPE_NAME (value));
-#line 3705 "ThumbnailCache.c"
+#line 3694 "ThumbnailCache.c"
}
#line 59 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
if (!value->data[0].v_pointer) {
#line 59 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
*object_p = NULL;
-#line 3711 "ThumbnailCache.c"
+#line 3700 "ThumbnailCache.c"
} else if (collect_flags & G_VALUE_NOCOPY_CONTENTS) {
#line 59 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
*object_p = value->data[0].v_pointer;
-#line 3715 "ThumbnailCache.c"
+#line 3704 "ThumbnailCache.c"
} else {
#line 59 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
*object_p = thumbnail_cache_image_data_ref (value->data[0].v_pointer);
-#line 3719 "ThumbnailCache.c"
+#line 3708 "ThumbnailCache.c"
}
#line 59 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
return NULL;
-#line 3723 "ThumbnailCache.c"
+#line 3712 "ThumbnailCache.c"
}
-static GParamSpec* thumbnail_cache_param_spec_image_data (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags) {
+static GParamSpec*
+thumbnail_cache_param_spec_image_data (const gchar* name,
+ const gchar* nick,
+ const gchar* blurb,
+ GType object_type,
+ GParamFlags flags)
+{
ThumbnailCacheParamSpecImageData* spec;
#line 59 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
g_return_val_if_fail (g_type_is_a (object_type, THUMBNAIL_CACHE_TYPE_IMAGE_DATA), NULL);
@@ -3734,20 +3729,25 @@ static GParamSpec* thumbnail_cache_param_spec_image_data (const gchar* name, con
G_PARAM_SPEC (spec)->value_type = object_type;
#line 59 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
return G_PARAM_SPEC (spec);
-#line 3737 "ThumbnailCache.c"
+#line 3732 "ThumbnailCache.c"
}
-static gpointer thumbnail_cache_value_get_image_data (const GValue* value) {
+static gpointer
+thumbnail_cache_value_get_image_data (const GValue* value)
+{
#line 59 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
g_return_val_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, THUMBNAIL_CACHE_TYPE_IMAGE_DATA), NULL);
#line 59 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
return value->data[0].v_pointer;
-#line 3746 "ThumbnailCache.c"
+#line 3743 "ThumbnailCache.c"
}
-static void thumbnail_cache_value_set_image_data (GValue* value, gpointer v_object) {
+static void
+thumbnail_cache_value_set_image_data (GValue* value,
+ gpointer v_object)
+{
ThumbnailCacheImageData * old;
#line 59 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
g_return_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, THUMBNAIL_CACHE_TYPE_IMAGE_DATA));
@@ -3778,7 +3778,10 @@ static void thumbnail_cache_value_set_image_data (GValue* value, gpointer v_obje
}
-static void thumbnail_cache_value_take_image_data (GValue* value, gpointer v_object) {
+static void
+thumbnail_cache_value_take_image_data (GValue* value,
+ gpointer v_object)
+{
ThumbnailCacheImageData * old;
#line 59 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
g_return_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, THUMBNAIL_CACHE_TYPE_IMAGE_DATA));
@@ -3792,38 +3795,44 @@ static void thumbnail_cache_value_take_image_data (GValue* value, gpointer v_obj
g_return_if_fail (g_value_type_compatible (G_TYPE_FROM_INSTANCE (v_object), G_VALUE_TYPE (value)));
#line 59 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
value->data[0].v_pointer = v_object;
-#line 3795 "ThumbnailCache.c"
+#line 3798 "ThumbnailCache.c"
} else {
#line 59 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
value->data[0].v_pointer = NULL;
-#line 3799 "ThumbnailCache.c"
+#line 3802 "ThumbnailCache.c"
}
#line 59 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
if (old) {
#line 59 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
thumbnail_cache_image_data_unref (old);
-#line 3805 "ThumbnailCache.c"
+#line 3808 "ThumbnailCache.c"
}
}
-static void thumbnail_cache_image_data_class_init (ThumbnailCacheImageDataClass * klass) {
+static void
+thumbnail_cache_image_data_class_init (ThumbnailCacheImageDataClass * klass)
+{
#line 59 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
thumbnail_cache_image_data_parent_class = g_type_class_peek_parent (klass);
#line 59 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
((ThumbnailCacheImageDataClass *) klass)->finalize = thumbnail_cache_image_data_finalize;
-#line 3815 "ThumbnailCache.c"
+#line 3820 "ThumbnailCache.c"
}
-static void thumbnail_cache_image_data_instance_init (ThumbnailCacheImageData * self) {
+static void
+thumbnail_cache_image_data_instance_init (ThumbnailCacheImageData * self)
+{
#line 59 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
self->ref_count = 1;
-#line 3822 "ThumbnailCache.c"
+#line 3829 "ThumbnailCache.c"
}
-static void thumbnail_cache_image_data_finalize (ThumbnailCacheImageData * obj) {
+static void
+thumbnail_cache_image_data_finalize (ThumbnailCacheImageData * obj)
+{
ThumbnailCacheImageData * self;
gulong _tmp0_;
gulong _tmp1_;
@@ -3841,11 +3850,13 @@ static void thumbnail_cache_image_data_finalize (ThumbnailCacheImageData * obj)
thumbnail_cache_schedule_debug ();
#line 60 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
_g_object_unref0 (self->pixbuf);
-#line 3844 "ThumbnailCache.c"
+#line 3853 "ThumbnailCache.c"
}
-static GType thumbnail_cache_image_data_get_type (void) {
+static GType
+thumbnail_cache_image_data_get_type (void)
+{
static volatile gsize thumbnail_cache_image_data_type_id__volatile = 0;
if (g_once_init_enter (&thumbnail_cache_image_data_type_id__volatile)) {
static const GTypeValueTable g_define_type_value_table = { thumbnail_cache_value_image_data_init, thumbnail_cache_value_image_data_free_value, thumbnail_cache_value_image_data_copy_value, thumbnail_cache_value_image_data_peek_pointer, "p", thumbnail_cache_value_image_data_collect_value, "p", thumbnail_cache_value_image_data_lcopy_value };
@@ -3859,18 +3870,22 @@ static GType thumbnail_cache_image_data_get_type (void) {
}
-static gpointer thumbnail_cache_image_data_ref (gpointer instance) {
+static gpointer
+thumbnail_cache_image_data_ref (gpointer instance)
+{
ThumbnailCacheImageData * self;
self = instance;
#line 59 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
g_atomic_int_inc (&self->ref_count);
#line 59 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
return instance;
-#line 3869 "ThumbnailCache.c"
+#line 3882 "ThumbnailCache.c"
}
-static void thumbnail_cache_image_data_unref (gpointer instance) {
+static void
+thumbnail_cache_image_data_unref (gpointer instance)
+{
ThumbnailCacheImageData * self;
self = instance;
#line 59 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
@@ -3879,36 +3894,39 @@ static void thumbnail_cache_image_data_unref (gpointer instance) {
THUMBNAIL_CACHE_IMAGE_DATA_GET_CLASS (self)->finalize (self);
#line 59 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
g_type_free_instance ((GTypeInstance *) self);
-#line 3882 "ThumbnailCache.c"
+#line 3897 "ThumbnailCache.c"
}
}
-static void _thumbnail_cache_async_fetch_completion_callback_completion_callback (BackgroundJob* job, gpointer self) {
+static void
+_thumbnail_cache_async_fetch_completion_callback_completion_callback (BackgroundJob* job,
+ gpointer self)
+{
#line 94 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
thumbnail_cache_async_fetch_completion_callback (job);
-#line 3890 "ThumbnailCache.c"
+#line 3908 "ThumbnailCache.c"
}
-static ThumbnailCacheAsyncFetchJob* thumbnail_cache_async_fetch_job_construct (GType object_type, ThumbnailCache* cache, const gchar* thumbnail_name, ThumbnailSource* source, GdkPixbuf* prefetched, Dimensions* dim, GdkInterpType interp, ThumbnailCacheAsyncFetchCallback callback, void* callback_target, GCancellable* cancellable) {
+static ThumbnailCacheAsyncFetchJob*
+thumbnail_cache_async_fetch_job_construct (GType object_type,
+ ThumbnailCache* cache,
+ const gchar* thumbnail_name,
+ ThumbnailSource* source,
+ GdkPixbuf* prefetched,
+ Dimensions* dim,
+ GdkInterpType interp,
+ ThumbnailCacheAsyncFetchCallback callback,
+ void* callback_target,
+ GCancellable* cancellable)
+{
ThumbnailCacheAsyncFetchJob* self = NULL;
ThumbnailCache* _tmp0_;
- GCancellable* _tmp1_;
- ThumbnailCache* _tmp2_;
- ThumbnailCache* _tmp3_;
- const gchar* _tmp4_;
- gchar* _tmp5_;
- ThumbnailSource* _tmp6_;
- ThumbnailSource* _tmp7_;
- ThumbnailSource* _tmp8_;
- PhotoFileFormat _tmp9_;
- GdkPixbuf* _tmp10_;
- GdkPixbuf* _tmp11_;
- Dimensions _tmp12_;
- GdkInterpType _tmp13_;
- ThumbnailCacheAsyncFetchCallback _tmp14_;
- void* _tmp14__target;
+ gchar* _tmp1_;
+ ThumbnailSource* _tmp2_;
+ GdkPixbuf* _tmp3_;
+ Dimensions _tmp4_;
#line 91 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
g_return_val_if_fail (IS_THUMBNAIL_CACHE (cache), NULL);
#line 91 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
@@ -3922,79 +3940,69 @@ static ThumbnailCacheAsyncFetchJob* thumbnail_cache_async_fetch_job_construct (G
#line 91 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
g_return_val_if_fail ((cancellable == NULL) || G_IS_CANCELLABLE (cancellable), NULL);
#line 94 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
- _tmp0_ = cache;
-#line 94 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
- _tmp1_ = cancellable;
-#line 94 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
- self = (ThumbnailCacheAsyncFetchJob*) background_job_construct (object_type, G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, G_TYPE_OBJECT, GObject), _thumbnail_cache_async_fetch_completion_callback_completion_callback, NULL, _tmp1_, NULL, NULL, NULL);
+ self = (ThumbnailCacheAsyncFetchJob*) background_job_construct (object_type, G_TYPE_CHECK_INSTANCE_CAST (cache, G_TYPE_OBJECT, GObject), _thumbnail_cache_async_fetch_completion_callback_completion_callback, NULL, cancellable, NULL, NULL, NULL);
#line 96 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
- _tmp2_ = cache;
-#line 96 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
- _tmp3_ = _g_object_ref0 (_tmp2_);
+ _tmp0_ = _g_object_ref0 (cache);
#line 96 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
_g_object_unref0 (self->cache);
#line 96 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
- self->cache = _tmp3_;
-#line 97 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
- _tmp4_ = thumbnail_name;
+ self->cache = _tmp0_;
#line 97 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
- _tmp5_ = g_strdup (_tmp4_);
+ _tmp1_ = g_strdup (thumbnail_name);
#line 97 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
_g_free0 (self->thumbnail_name);
#line 97 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
- self->thumbnail_name = _tmp5_;
+ self->thumbnail_name = _tmp1_;
#line 98 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
- _tmp6_ = source;
-#line 98 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
- _tmp7_ = _g_object_ref0 (_tmp6_);
+ _tmp2_ = _g_object_ref0 (source);
#line 98 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
_g_object_unref0 (self->source);
#line 98 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
- self->source = _tmp7_;
-#line 99 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
- _tmp8_ = source;
+ self->source = _tmp2_;
#line 99 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
- _tmp9_ = thumbnail_source_get_preferred_thumbnail_format (_tmp8_);
-#line 99 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
- self->source_format = _tmp9_;
-#line 100 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
- _tmp10_ = prefetched;
+ self->source_format = thumbnail_source_get_preferred_thumbnail_format (source);
#line 100 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
- _tmp11_ = _g_object_ref0 (_tmp10_);
+ _tmp3_ = _g_object_ref0 (prefetched);
#line 100 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
_g_object_unref0 (self->unscaled);
#line 100 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
- self->unscaled = _tmp11_;
+ self->unscaled = _tmp3_;
#line 101 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
- _tmp12_ = *dim;
+ _tmp4_ = *dim;
#line 101 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
- self->dim = _tmp12_;
-#line 102 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
- _tmp13_ = interp;
+ self->dim = _tmp4_;
#line 102 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
- self->interp = _tmp13_;
-#line 103 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
- _tmp14_ = callback;
-#line 103 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
- _tmp14__target = callback_target;
+ self->interp = interp;
#line 103 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
- self->callback = _tmp14_;
+ self->callback = callback;
#line 103 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
- self->callback_target = _tmp14__target;
+ self->callback_target = callback_target;
#line 91 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
return self;
-#line 3986 "ThumbnailCache.c"
+#line 3982 "ThumbnailCache.c"
}
-static ThumbnailCacheAsyncFetchJob* thumbnail_cache_async_fetch_job_new (ThumbnailCache* cache, const gchar* thumbnail_name, ThumbnailSource* source, GdkPixbuf* prefetched, Dimensions* dim, GdkInterpType interp, ThumbnailCacheAsyncFetchCallback callback, void* callback_target, GCancellable* cancellable) {
+static ThumbnailCacheAsyncFetchJob*
+thumbnail_cache_async_fetch_job_new (ThumbnailCache* cache,
+ const gchar* thumbnail_name,
+ ThumbnailSource* source,
+ GdkPixbuf* prefetched,
+ Dimensions* dim,
+ GdkInterpType interp,
+ ThumbnailCacheAsyncFetchCallback callback,
+ void* callback_target,
+ GCancellable* cancellable)
+{
#line 91 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
return thumbnail_cache_async_fetch_job_construct (THUMBNAIL_CACHE_TYPE_ASYNC_FETCH_JOB, cache, thumbnail_name, source, prefetched, dim, interp, callback, callback_target, cancellable);
-#line 3993 "ThumbnailCache.c"
+#line 3999 "ThumbnailCache.c"
}
-static BackgroundJobJobPriority thumbnail_cache_async_fetch_job_real_get_priority (BackgroundJob* base) {
+static BackgroundJobJobPriority
+thumbnail_cache_async_fetch_job_real_get_priority (BackgroundJob* base)
+{
ThumbnailCacheAsyncFetchJob * self;
BackgroundJobJobPriority result = 0;
GdkInterpType _tmp0_;
@@ -4008,48 +4016,48 @@ static BackgroundJobJobPriority thumbnail_cache_async_fetch_job_real_get_priorit
case GDK_INTERP_NEAREST:
#line 109 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
case GDK_INTERP_TILES:
-#line 4011 "ThumbnailCache.c"
+#line 4019 "ThumbnailCache.c"
{
#line 112 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
result = BACKGROUND_JOB_JOB_PRIORITY_HIGH;
#line 112 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
return result;
-#line 4017 "ThumbnailCache.c"
+#line 4025 "ThumbnailCache.c"
}
default:
#line 109 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
case GDK_INTERP_BILINEAR:
#line 109 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
case GDK_INTERP_HYPER:
-#line 4024 "ThumbnailCache.c"
+#line 4032 "ThumbnailCache.c"
{
#line 117 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
result = BACKGROUND_JOB_JOB_PRIORITY_NORMAL;
#line 117 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
return result;
-#line 4030 "ThumbnailCache.c"
+#line 4038 "ThumbnailCache.c"
}
}
}
-static void thumbnail_cache_async_fetch_job_real_execute (BackgroundJob* base) {
+static void
+thumbnail_cache_async_fetch_job_real_execute (BackgroundJob* base)
+{
ThumbnailCacheAsyncFetchJob * self;
GError * _inner_error_ = NULL;
#line 121 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
self = G_TYPE_CHECK_INSTANCE_CAST (base, THUMBNAIL_CACHE_TYPE_ASYNC_FETCH_JOB, ThumbnailCacheAsyncFetchJob);
-#line 4041 "ThumbnailCache.c"
+#line 4051 "ThumbnailCache.c"
{
GdkPixbuf* _tmp0_;
- gboolean _tmp7_;
- GdkPixbuf* _tmp8_ = NULL;
- gboolean _tmp9_;
- GdkPixbuf* _tmp16_;
+ GdkPixbuf* _tmp7_ = NULL;
+ GdkPixbuf* _tmp14_;
#line 124 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
_tmp0_ = self->unscaled;
#line 124 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
if (_tmp0_ == NULL) {
-#line 4052 "ThumbnailCache.c"
+#line 4060 "ThumbnailCache.c"
GdkPixbuf* _tmp1_ = NULL;
ThumbnailCache* _tmp2_;
const gchar* _tmp3_;
@@ -4068,7 +4076,7 @@ static void thumbnail_cache_async_fetch_job_real_execute (BackgroundJob* base) {
_tmp1_ = _tmp5_;
#line 125 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
if (G_UNLIKELY (_inner_error_ != NULL)) {
-#line 4071 "ThumbnailCache.c"
+#line 4079 "ThumbnailCache.c"
goto __catch252_g_error;
}
#line 125 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
@@ -4083,81 +4091,77 @@ static void thumbnail_cache_async_fetch_job_real_execute (BackgroundJob* base) {
self->fetched = TRUE;
#line 124 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
_g_object_unref0 (_tmp1_);
-#line 4086 "ThumbnailCache.c"
+#line 4094 "ThumbnailCache.c"
}
#line 129 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
- _tmp7_ = background_job_is_cancelled (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_BACKGROUND_JOB, BackgroundJob));
-#line 129 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
- if (_tmp7_) {
+ if (background_job_is_cancelled (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_BACKGROUND_JOB, BackgroundJob))) {
#line 130 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
return;
-#line 4094 "ThumbnailCache.c"
+#line 4100 "ThumbnailCache.c"
}
#line 133 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
- _tmp9_ = dimensions_has_area (&self->dim);
-#line 133 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
- if (_tmp9_) {
-#line 4100 "ThumbnailCache.c"
- GdkPixbuf* _tmp10_;
- Dimensions _tmp11_;
- GdkInterpType _tmp12_;
- GdkPixbuf* _tmp13_;
+ if (dimensions_has_area (&self->dim)) {
+#line 4104 "ThumbnailCache.c"
+ GdkPixbuf* _tmp8_;
+ Dimensions _tmp9_;
+ GdkInterpType _tmp10_;
+ GdkPixbuf* _tmp11_;
#line 133 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
- _tmp10_ = self->unscaled;
+ _tmp8_ = self->unscaled;
#line 133 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
- _tmp11_ = self->dim;
+ _tmp9_ = self->dim;
#line 133 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
- _tmp12_ = self->interp;
+ _tmp10_ = self->interp;
#line 133 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
- _tmp13_ = resize_pixbuf (_tmp10_, &_tmp11_, _tmp12_);
+ _tmp11_ = resize_pixbuf (_tmp8_, &_tmp9_, _tmp10_);
#line 133 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
- _g_object_unref0 (_tmp8_);
+ _g_object_unref0 (_tmp7_);
#line 133 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
- _tmp8_ = _tmp13_;
-#line 4117 "ThumbnailCache.c"
+ _tmp7_ = _tmp11_;
+#line 4121 "ThumbnailCache.c"
} else {
- GdkPixbuf* _tmp14_;
- GdkPixbuf* _tmp15_;
+ GdkPixbuf* _tmp12_;
+ GdkPixbuf* _tmp13_;
#line 133 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
- _tmp14_ = self->unscaled;
+ _tmp12_ = self->unscaled;
#line 133 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
- _tmp15_ = _g_object_ref0 (_tmp14_);
+ _tmp13_ = _g_object_ref0 (_tmp12_);
#line 133 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
- _g_object_unref0 (_tmp8_);
+ _g_object_unref0 (_tmp7_);
#line 133 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
- _tmp8_ = _tmp15_;
-#line 4129 "ThumbnailCache.c"
+ _tmp7_ = _tmp13_;
+#line 4133 "ThumbnailCache.c"
}
#line 133 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
- _tmp16_ = _g_object_ref0 (_tmp8_);
+ _tmp14_ = _g_object_ref0 (_tmp7_);
#line 133 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
_g_object_unref0 (self->scaled);
#line 133 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
- self->scaled = _tmp16_;
+ self->scaled = _tmp14_;
#line 122 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
- _g_object_unref0 (_tmp8_);
-#line 4139 "ThumbnailCache.c"
+ _g_object_unref0 (_tmp7_);
+#line 4143 "ThumbnailCache.c"
}
goto __finally252;
__catch252_g_error:
{
GError* err = NULL;
- GError* _tmp17_;
+ GError* _tmp15_;
#line 122 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
err = _inner_error_;
#line 122 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
_inner_error_ = NULL;
#line 135 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
- _tmp17_ = err;
+ _tmp15_ = err;
#line 135 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
- if (_tmp17_->domain == G_FILE_ERROR) {
-#line 4154 "ThumbnailCache.c"
+ if (_tmp15_->domain == G_FILE_ERROR) {
+#line 4158 "ThumbnailCache.c"
{
#line 137 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
thumbnail_cache_async_fetch_job_generate_thumbnail (self, &_inner_error_);
#line 137 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
if (G_UNLIKELY (_inner_error_ != NULL)) {
-#line 4160 "ThumbnailCache.c"
+#line 4164 "ThumbnailCache.c"
goto __catch253_g_error;
}
}
@@ -4165,23 +4169,23 @@ static void thumbnail_cache_async_fetch_job_real_execute (BackgroundJob* base) {
__catch253_g_error:
{
GError* generr = NULL;
- GError* _tmp18_;
- GError* _tmp19_;
+ GError* _tmp16_;
+ GError* _tmp17_;
#line 136 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
generr = _inner_error_;
#line 136 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
_inner_error_ = NULL;
#line 140 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
- _tmp18_ = generr;
+ _tmp16_ = generr;
#line 140 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
- _tmp19_ = _g_error_copy0 (_tmp18_);
+ _tmp17_ = _g_error_copy0 (_tmp16_);
#line 140 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
_g_error_free0 (err);
#line 140 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
- err = _tmp19_;
+ err = _tmp17_;
#line 136 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
_g_error_free0 (generr);
-#line 4184 "ThumbnailCache.c"
+#line 4188 "ThumbnailCache.c"
}
__finally253:
#line 136 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
@@ -4196,24 +4200,24 @@ static void thumbnail_cache_async_fetch_job_real_execute (BackgroundJob* base) {
g_clear_error (&_inner_error_);
#line 136 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
return;
-#line 4199 "ThumbnailCache.c"
+#line 4203 "ThumbnailCache.c"
}
} else {
- GError* _tmp20_;
- GError* _tmp21_;
+ GError* _tmp18_;
+ GError* _tmp19_;
#line 144 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
- _tmp20_ = err;
+ _tmp18_ = err;
#line 144 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
- _tmp21_ = _g_error_copy0 (_tmp20_);
+ _tmp19_ = _g_error_copy0 (_tmp18_);
#line 144 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
_g_error_free0 (self->err);
#line 144 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
- self->err = _tmp21_;
-#line 4212 "ThumbnailCache.c"
+ self->err = _tmp19_;
+#line 4216 "ThumbnailCache.c"
}
#line 122 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
_g_error_free0 (err);
-#line 4216 "ThumbnailCache.c"
+#line 4220 "ThumbnailCache.c"
}
__finally252:
#line 122 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
@@ -4224,12 +4228,15 @@ static void thumbnail_cache_async_fetch_job_real_execute (BackgroundJob* base) {
g_clear_error (&_inner_error_);
#line 122 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
return;
-#line 4227 "ThumbnailCache.c"
+#line 4231 "ThumbnailCache.c"
}
}
-static void thumbnail_cache_async_fetch_job_generate_thumbnail (ThumbnailCacheAsyncFetchJob* self, GError** error) {
+static void
+thumbnail_cache_async_fetch_job_generate_thumbnail (ThumbnailCacheAsyncFetchJob* self,
+ GError** error)
+{
Photo* photo = NULL;
ThumbnailSource* _tmp0_;
Photo* _tmp1_;
@@ -4248,7 +4255,7 @@ static void thumbnail_cache_async_fetch_job_generate_thumbnail (ThumbnailCacheAs
_tmp2_ = photo;
#line 151 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
if (_tmp2_ != NULL) {
-#line 4251 "ThumbnailCache.c"
+#line 4258 "ThumbnailCache.c"
GdkPixbuf* _tmp3_ = NULL;
Photo* _tmp4_;
Dimensions _tmp5_;
@@ -4276,7 +4283,7 @@ static void thumbnail_cache_async_fetch_job_generate_thumbnail (ThumbnailCacheAs
_g_object_unref0 (photo);
#line 152 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
return;
-#line 4279 "ThumbnailCache.c"
+#line 4286 "ThumbnailCache.c"
}
#line 152 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
_tmp9_ = _tmp3_;
@@ -4288,7 +4295,7 @@ static void thumbnail_cache_async_fetch_job_generate_thumbnail (ThumbnailCacheAs
self->unscaled = _tmp9_;
#line 151 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
_g_object_unref0 (_tmp3_);
-#line 4291 "ThumbnailCache.c"
+#line 4298 "ThumbnailCache.c"
} else {
Video* video = NULL;
ThumbnailSource* _tmp10_;
@@ -4304,7 +4311,7 @@ static void thumbnail_cache_async_fetch_job_generate_thumbnail (ThumbnailCacheAs
_tmp12_ = video;
#line 155 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
if (_tmp12_ != NULL) {
-#line 4307 "ThumbnailCache.c"
+#line 4314 "ThumbnailCache.c"
GdkPixbuf* _tmp13_ = NULL;
Video* _tmp14_;
Dimensions _tmp15_;
@@ -4331,7 +4338,7 @@ static void thumbnail_cache_async_fetch_job_generate_thumbnail (ThumbnailCacheAs
_g_object_unref0 (photo);
#line 156 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
return;
-#line 4334 "ThumbnailCache.c"
+#line 4341 "ThumbnailCache.c"
}
#line 156 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
_tmp18_ = _tmp13_;
@@ -4343,17 +4350,17 @@ static void thumbnail_cache_async_fetch_job_generate_thumbnail (ThumbnailCacheAs
self->unscaled = _tmp18_;
#line 155 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
_g_object_unref0 (_tmp13_);
-#line 4346 "ThumbnailCache.c"
+#line 4353 "ThumbnailCache.c"
}
#line 151 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
_g_object_unref0 (video);
-#line 4350 "ThumbnailCache.c"
+#line 4357 "ThumbnailCache.c"
}
#line 159 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
_tmp19_ = self->unscaled;
#line 159 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
if (_tmp19_ != NULL) {
-#line 4356 "ThumbnailCache.c"
+#line 4363 "ThumbnailCache.c"
GdkPixbuf* _tmp20_;
Dimensions _tmp21_;
GdkInterpType _tmp22_;
@@ -4372,15 +4379,17 @@ static void thumbnail_cache_async_fetch_job_generate_thumbnail (ThumbnailCacheAs
self->scaled = _tmp23_;
#line 161 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
self->replace = TRUE;
-#line 4375 "ThumbnailCache.c"
+#line 4382 "ThumbnailCache.c"
}
#line 149 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
_g_object_unref0 (photo);
-#line 4379 "ThumbnailCache.c"
+#line 4386 "ThumbnailCache.c"
}
-static void thumbnail_cache_async_fetch_job_class_init (ThumbnailCacheAsyncFetchJobClass * klass) {
+static void
+thumbnail_cache_async_fetch_job_class_init (ThumbnailCacheAsyncFetchJobClass * klass)
+{
#line 77 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
thumbnail_cache_async_fetch_job_parent_class = g_type_class_peek_parent (klass);
#line 77 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
@@ -4389,11 +4398,13 @@ static void thumbnail_cache_async_fetch_job_class_init (ThumbnailCacheAsyncFetch
((BackgroundJobClass *) klass)->get_priority = (BackgroundJobJobPriority (*) (BackgroundJob *)) thumbnail_cache_async_fetch_job_real_get_priority;
#line 77 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
((BackgroundJobClass *) klass)->execute = (void (*) (BackgroundJob *)) thumbnail_cache_async_fetch_job_real_execute;
-#line 4392 "ThumbnailCache.c"
+#line 4401 "ThumbnailCache.c"
}
-static void thumbnail_cache_async_fetch_job_instance_init (ThumbnailCacheAsyncFetchJob * self) {
+static void
+thumbnail_cache_async_fetch_job_instance_init (ThumbnailCacheAsyncFetchJob * self)
+{
#line 86 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
self->scaled = NULL;
#line 87 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
@@ -4402,11 +4413,13 @@ static void thumbnail_cache_async_fetch_job_instance_init (ThumbnailCacheAsyncFe
self->fetched = FALSE;
#line 89 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
self->replace = FALSE;
-#line 4405 "ThumbnailCache.c"
+#line 4416 "ThumbnailCache.c"
}
-static void thumbnail_cache_async_fetch_job_finalize (BackgroundJob * obj) {
+static void
+thumbnail_cache_async_fetch_job_finalize (BackgroundJob * obj)
+{
ThumbnailCacheAsyncFetchJob * self;
#line 77 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
self = G_TYPE_CHECK_INSTANCE_CAST (obj, THUMBNAIL_CACHE_TYPE_ASYNC_FETCH_JOB, ThumbnailCacheAsyncFetchJob);
@@ -4424,11 +4437,13 @@ static void thumbnail_cache_async_fetch_job_finalize (BackgroundJob * obj) {
_g_error_free0 (self->err);
#line 77 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
BACKGROUND_JOB_CLASS (thumbnail_cache_async_fetch_job_parent_class)->finalize (obj);
-#line 4427 "ThumbnailCache.c"
+#line 4440 "ThumbnailCache.c"
}
-static GType thumbnail_cache_async_fetch_job_get_type (void) {
+static GType
+thumbnail_cache_async_fetch_job_get_type (void)
+{
static volatile gsize thumbnail_cache_async_fetch_job_type_id__volatile = 0;
if (g_once_init_enter (&thumbnail_cache_async_fetch_job_type_id__volatile)) {
static const GTypeInfo g_define_type_info = { sizeof (ThumbnailCacheAsyncFetchJobClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) thumbnail_cache_async_fetch_job_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (ThumbnailCacheAsyncFetchJob), 0, (GInstanceInitFunc) thumbnail_cache_async_fetch_job_instance_init, NULL };
@@ -4440,7 +4455,9 @@ static GType thumbnail_cache_async_fetch_job_get_type (void) {
}
-static void thumbnail_cache_class_init (ThumbnailCacheClass * klass) {
+static void
+thumbnail_cache_class_init (ThumbnailCacheClass * klass)
+{
ThumbnailCacheSize* _tmp0_;
#line 27 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
thumbnail_cache_parent_class = g_type_class_peek_parent (klass);
@@ -4458,11 +4475,13 @@ static void thumbnail_cache_class_init (ThumbnailCacheClass * klass) {
thumbnail_cache_ALL_SIZES = _tmp0_;
#line 54 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
thumbnail_cache_ALL_SIZES_length1 = 2;
-#line 4461 "ThumbnailCache.c"
+#line 4478 "ThumbnailCache.c"
}
-static void thumbnail_cache_instance_init (ThumbnailCache * self) {
+static void
+thumbnail_cache_instance_init (ThumbnailCache * self)
+{
GeeHashMap* _tmp0_;
GeeArrayList* _tmp1_;
#line 27 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
@@ -4477,11 +4496,13 @@ static void thumbnail_cache_instance_init (ThumbnailCache * self) {
self->priv->cache_lru = _tmp1_;
#line 188 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
self->priv->cached_bytes = (gulong) 0;
-#line 4480 "ThumbnailCache.c"
+#line 4499 "ThumbnailCache.c"
}
-static void thumbnail_cache_finalize (GObject * obj) {
+static void
+thumbnail_cache_finalize (GObject * obj)
+{
ThumbnailCache * self;
#line 27 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
self = G_TYPE_CHECK_INSTANCE_CAST (obj, TYPE_THUMBNAIL_CACHE, ThumbnailCache);
@@ -4493,11 +4514,13 @@ static void thumbnail_cache_finalize (GObject * obj) {
_g_object_unref0 (self->priv->cache_lru);
#line 27 "/home/jens/Source/shotwell/src/ThumbnailCache.vala"
G_OBJECT_CLASS (thumbnail_cache_parent_class)->finalize (obj);
-#line 4496 "ThumbnailCache.c"
+#line 4517 "ThumbnailCache.c"
}
-GType thumbnail_cache_get_type (void) {
+GType
+thumbnail_cache_get_type (void)
+{
static volatile gsize thumbnail_cache_type_id__volatile = 0;
if (g_once_init_enter (&thumbnail_cache_type_id__volatile)) {
static const GTypeInfo g_define_type_info = { sizeof (ThumbnailCacheClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) thumbnail_cache_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (ThumbnailCache), 0, (GInstanceInitFunc) thumbnail_cache_instance_init, NULL };