[gnome-photos] thumbnailer: Register the GEGL-related resources
- From: Debarshi Ray <debarshir src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-photos] thumbnailer: Register the GEGL-related resources
- Date: Mon, 27 Feb 2017 23:51:49 +0000 (UTC)
commit 9fe04c488458c804b883433fcf27f6e16d589a70
Author: Debarshi Ray <debarshir gnome org>
Date: Tue Feb 28 00:44:48 2017 +0100
thumbnailer: Register the GEGL-related resources
Otherwise, the thumbnailer won't be able to use
photos:insta-hefe-vignette.
https://bugzilla.gnome.org/show_bug.cgi?id=690255
src/Makefile.am | 2 ++
src/photos-thumbnailer.c | 9 +++++++++
2 files changed, 11 insertions(+), 0 deletions(-)
---
diff --git a/src/Makefile.am b/src/Makefile.am
index 20eb1d4..82c7cad 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -278,6 +278,8 @@ gnome_photos_SOURCES = \
$(NULL)
gnome_photos_thumbnailer_built_sources = \
+ photos-resources-gegl.c \
+ photos-resources-gegl.h \
photos-thumbnailer-dbus.c \
photos-thumbnailer-dbus.h \
photos-enums.c \
diff --git a/src/photos-thumbnailer.c b/src/photos-thumbnailer.c
index 5265fc0..74d9246 100644
--- a/src/photos-thumbnailer.c
+++ b/src/photos-thumbnailer.c
@@ -32,6 +32,7 @@
#include "photos-gegl.h"
#include "photos-pipeline.h"
#include "photos-pixbuf.h"
+#include "photos-resources-gegl.h"
#include "photos-thumbnailer.h"
#include "photos-thumbnailer-dbus.h"
@@ -41,6 +42,7 @@ struct _PhotosThumbnailer
GApplication parent_instance;
GDBusConnection *connection;
GHashTable *cancellables;
+ GResource *resource_gegl;
PhotosThumbnailerDBus *skeleton;
gchar *address;
};
@@ -750,9 +752,15 @@ photos_thumbnailer_shutdown (GApplication *application)
static void
photos_thumbnailer_startup (GApplication *application)
{
+ PhotosThumbnailer *self = PHOTOS_THUMBNAILER (application);
+
G_APPLICATION_CLASS (photos_thumbnailer_parent_class)->startup (application);
gegl_init (NULL, NULL);
+
+ self->resource_gegl = photos_gegl_get_resource ();
+ g_resources_register (self->resource_gegl);
+
photos_debug (PHOTOS_DEBUG_THUMBNAILER, "Thumbnailer ready");
}
@@ -765,6 +773,7 @@ photos_thumbnailer_dispose (GObject *object)
g_clear_object (&self->connection);
g_clear_object (&self->skeleton);
g_clear_pointer (&self->cancellables, (GDestroyNotify) g_hash_table_unref);
+ g_clear_pointer (&self->resource_gegl, (GDestroyNotify) g_resources_unregister);
G_OBJECT_CLASS (photos_thumbnailer_parent_class)->dispose (object);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]