summaryrefslogtreecommitdiff
path: root/tumbler
diff options
context:
space:
mode:
authorGaël Bonithon <gael@xfce.org>2021-12-22 19:15:55 +0100
committerGaël Bonithon <gael@xfce.org>2021-12-22 19:20:25 +0100
commitf0bc4cc996c8363d92180c9f60d9e6f1ad1cf7b2 (patch)
tree86ad4b110ba34f7e86eaa6453aea3c6321db21dd /tumbler
parent9bd5c1084f3014ed059b8726b0df77d1b2957c94 (diff)
downloadtumbler-f0bc4cc996c8363d92180c9f60d9e6f1ad1cf7b2.tar.gz
Fix mistake in previous commit
I took the exception for the rule: let's hope this time it's good.
Diffstat (limited to 'tumbler')
-rw-r--r--tumbler/tumbler-util.c7
-rw-r--r--tumbler/tumbler-util.h2
2 files changed, 6 insertions, 3 deletions
diff --git a/tumbler/tumbler-util.c b/tumbler/tumbler-util.c
index 046b42e..9d6fad0 100644
--- a/tumbler/tumbler-util.c
+++ b/tumbler/tumbler-util.c
@@ -173,16 +173,19 @@ void
tumbler_util_size_prepared (GdkPixbufLoader *loader,
gint source_width,
gint source_height,
- TumblerThumbnailFlavor *flavor)
+ TumblerThumbnail *thumbnail)
{
+ TumblerThumbnailFlavor *flavor;
gdouble hratio, wratio;
gint dest_width, dest_height;
g_return_if_fail (GDK_IS_PIXBUF_LOADER (loader));
- g_return_if_fail (TUMBLER_IS_THUMBNAIL_FLAVOR (flavor));
+ g_return_if_fail (TUMBLER_IS_THUMBNAIL (thumbnail));
/* get the destination size */
+ flavor = tumbler_thumbnail_get_flavor (thumbnail);
tumbler_thumbnail_flavor_get_size (flavor, &dest_width, &dest_height);
+ g_object_unref (flavor);
if (source_width <= dest_width && source_height <= dest_height)
{
diff --git a/tumbler/tumbler-util.h b/tumbler/tumbler-util.h
index c55245d..be030cc 100644
--- a/tumbler/tumbler-util.h
+++ b/tumbler/tumbler-util.h
@@ -37,7 +37,7 @@ gboolean tumbler_util_guess_is_sparse (TumblerFileInfo *info);
void tumbler_util_size_prepared (GdkPixbufLoader *loader,
gint source_width,
gint source_height,
- TumblerThumbnailFlavor *flavor);
+ TumblerThumbnail *thumbnail);
GdkPixbuf *tumbler_util_scale_pixbuf (GdkPixbuf *source,
gint dest_width,