[gnome-photos/wip/flickr: 10/14] application: Initialize Grilo
- From: Debarshi Ray <debarshir src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-photos/wip/flickr: 10/14] application: Initialize Grilo
- Date: Sat, 6 Jul 2013 12:31:18 +0000 (UTC)
commit f14cb7f16c3430265710f9a429d386727bc285fa
Author: Debarshi Ray <debarshir gnome org>
Date: Tue Jul 2 18:10:28 2013 +0200
application: Initialize Grilo
We will need it for downloading thumbnails for Flickr items.
Fixes: https://bugzilla.gnome.org/697675
configure.ac | 3 +++
src/Makefile.am | 2 ++
src/photos-application.c | 12 ++++++++++++
3 files changed, 17 insertions(+), 0 deletions(-)
---
diff --git a/configure.ac b/configure.ac
index 3723b58..a33e1f9 100644
--- a/configure.ac
+++ b/configure.ac
@@ -27,6 +27,7 @@ GLIB_GSETTINGS
EXEMPI_MIN_VERSION=1.99.5
GLIB_MIN_VERSION=2.35.1
GOA_MIN_VERSION=3.8.0
+GRILO_MIN_VERSION=0.2.6
GTK_MIN_VERSION=3.9.4
LIBEXIF_MIN_VERSION=0.6.14
LIBRSVG_MIN_VERSION=2.26.0
@@ -92,6 +93,8 @@ AC_DEFINE([GNOME_DESKTOP_USE_UNSTABLE_API], [], [We are aware that GNOME_DESKTOP
PKG_CHECK_MODULES(GOA, [goa-1.0 >= $GOA_MIN_VERSION])
AC_DEFINE([GOA_API_IS_SUBJECT_TO_CHANGE], [], [We are aware that GOA's API can change])
+PKG_CHECK_MODULES(GRILO, [grilo-0.2 >= $GRILO_MIN_VERSION])
+
PKG_CHECK_MODULES(GTK, [gtk+-3.0 >= $GTK_MIN_VERSION])
AC_DEFINE([HAVE_GTK3], [], [We want gegl-gtk to use the GTK+ 3.x code path])
diff --git a/src/Makefile.am b/src/Makefile.am
index d0f8ef7..6243a14 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -221,6 +221,7 @@ AM_CPPFLAGS = \
$(GLIB_CFLAGS) \
$(GNOME_DESKTOP_CFLAGS) \
$(GOA_CFLAGS) \
+ $(GRILO_CFLAGS) \
$(GTK_CFLAGS) \
$(GTK_UNIX_PRINT_CFLAGS) \
$(LCMS_CFLAGS) \
@@ -242,6 +243,7 @@ gnome_photos_LDADD = \
$(GLIB_LIBS) \
$(GNOME_DESKTOP_LIBS) \
$(GOA_LIBS) \
+ $(GRILO_LIBS) \
$(GTK_LIBS) \
$(GTK_UNIX_PRINT_LIBS) \
$(LCMS_LIBS) \
diff --git a/src/photos-application.c b/src/photos-application.c
index 567966e..79f3807 100644
--- a/src/photos-application.c
+++ b/src/photos-application.c
@@ -29,6 +29,7 @@
#include <gio/gio.h>
#include <glib.h>
#include <glib/gi18n.h>
+#include <grilo.h>
#include <libgnome-desktop/gnome-bg.h>
#include "eog-debug.h"
@@ -233,8 +234,10 @@ photos_application_startup (GApplication *application)
{
PhotosApplication *self = PHOTOS_APPLICATION (application);
PhotosApplicationPrivate *priv = self->priv;
+ GError *error;
GMenu *menu;
GSimpleAction *action;
+ GrlRegistry *registry;
GtkBuilder *builder;
GtkSettings *settings;
GVariant *state;
@@ -244,6 +247,15 @@ photos_application_startup (GApplication *application)
gegl_init (NULL, NULL);
+ grl_init (NULL, NULL);
+ registry = grl_registry_get_default ();
+ error = NULL;
+ if (!grl_registry_load_plugin_by_id (registry, "grl-flickr", &error))
+ {
+ g_warning ("Unable to load Grilo's Flickr plugin: %s", error->message);
+ g_error_free (error);
+ }
+
priv->settings = g_settings_new ("org.gnome.desktop.background");
priv->resource = photos_get_resource ();
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]