summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGaël Bonithon <gael@xfce.org>2021-12-29 16:08:18 +0100
committerGaël Bonithon <gael@xfce.org>2021-12-29 16:09:59 +0100
commit5affdb5ccdba711ada11f4cde7d7acc840b5a4be (patch)
tree3850b0aa94e1d3ee577d08f2f6096c1d21acc92e
parent7fdab65f7a2144a7cae4d49bea13cea3644dfc3c (diff)
downloadtumbler-5affdb5ccdba711ada11f4cde7d7acc840b5a4be.tar.gz
Add support for thumbnail size x-large and xx-large
Closes #51.
-rw-r--r--docs/reference/tumbler/tumbler-sections.txt2
-rw-r--r--plugins/xdg-cache/xdg-cache-cache.c6
-rw-r--r--tumbler/tumbler-thumbnail-flavor.c18
-rw-r--r--tumbler/tumbler-thumbnail-flavor.h2
4 files changed, 28 insertions, 0 deletions
diff --git a/docs/reference/tumbler/tumbler-sections.txt b/docs/reference/tumbler/tumbler-sections.txt
index ac7ba1c..8ac324a 100644
--- a/docs/reference/tumbler/tumbler-sections.txt
+++ b/docs/reference/tumbler/tumbler-sections.txt
@@ -202,6 +202,8 @@ tumbler_thumbnail_get_type
tumbler_thumbnail_flavor_new
tumbler_thumbnail_flavor_new_normal
tumbler_thumbnail_flavor_new_large
+tumbler_thumbnail_flavor_new_x_large
+tumbler_thumbnail_flavor_new_xx_large
tumbler_thumbnail_flavor_get_name
tumbler_thumbnail_flavor_get_size
<SUBSECTION Standard>
diff --git a/plugins/xdg-cache/xdg-cache-cache.c b/plugins/xdg-cache/xdg-cache-cache.c
index f32c1f5..8528cd4 100644
--- a/plugins/xdg-cache/xdg-cache-cache.c
+++ b/plugins/xdg-cache/xdg-cache-cache.c
@@ -138,6 +138,12 @@ xdg_cache_cache_init (XDGCacheCache *cache)
flavor = tumbler_thumbnail_flavor_new_large ();
cache->flavors = g_list_prepend (cache->flavors, flavor);
+
+ flavor = tumbler_thumbnail_flavor_new_x_large ();
+ cache->flavors = g_list_prepend (cache->flavors, flavor);
+
+ flavor = tumbler_thumbnail_flavor_new_xx_large ();
+ cache->flavors = g_list_prepend (cache->flavors, flavor);
}
diff --git a/tumbler/tumbler-thumbnail-flavor.c b/tumbler/tumbler-thumbnail-flavor.c
index 0d09dad..7f1594a 100644
--- a/tumbler/tumbler-thumbnail-flavor.c
+++ b/tumbler/tumbler-thumbnail-flavor.c
@@ -216,6 +216,24 @@ tumbler_thumbnail_flavor_new_large (void)
+TumblerThumbnailFlavor *
+tumbler_thumbnail_flavor_new_x_large (void)
+{
+ return g_object_new (TUMBLER_TYPE_THUMBNAIL_FLAVOR, "name", "x-large",
+ "width", 512, "height", 512, NULL);
+}
+
+
+
+TumblerThumbnailFlavor *
+tumbler_thumbnail_flavor_new_xx_large (void)
+{
+ return g_object_new (TUMBLER_TYPE_THUMBNAIL_FLAVOR, "name", "xx-large",
+ "width", 1024, "height", 1024, NULL);
+}
+
+
+
const gchar *
tumbler_thumbnail_flavor_get_name (TumblerThumbnailFlavor *flavor)
{
diff --git a/tumbler/tumbler-thumbnail-flavor.h b/tumbler/tumbler-thumbnail-flavor.h
index c5fae97..80d0019 100644
--- a/tumbler/tumbler-thumbnail-flavor.h
+++ b/tumbler/tumbler-thumbnail-flavor.h
@@ -47,6 +47,8 @@ TumblerThumbnailFlavor *tumbler_thumbnail_flavor_new (const gchar
gint height) G_GNUC_MALLOC G_GNUC_WARN_UNUSED_RESULT;
TumblerThumbnailFlavor *tumbler_thumbnail_flavor_new_normal (void) G_GNUC_MALLOC G_GNUC_WARN_UNUSED_RESULT;
TumblerThumbnailFlavor *tumbler_thumbnail_flavor_new_large (void) G_GNUC_MALLOC G_GNUC_WARN_UNUSED_RESULT;
+TumblerThumbnailFlavor *tumbler_thumbnail_flavor_new_x_large (void) G_GNUC_MALLOC G_GNUC_WARN_UNUSED_RESULT;
+TumblerThumbnailFlavor *tumbler_thumbnail_flavor_new_xx_large (void) G_GNUC_MALLOC G_GNUC_WARN_UNUSED_RESULT;
const gchar *tumbler_thumbnail_flavor_get_name (TumblerThumbnailFlavor *flavor);
void tumbler_thumbnail_flavor_get_size (TumblerThumbnailFlavor *flavor,
gint *width,