[gnome-photos] application: Adapt to Grilo 0.3.0 API changes



commit aeff0aeb2c43d2fd728fdb42d86a568c4e66a21c
Author: Debarshi Ray <debarshir gnome org>
Date:   Wed Dec 16 12:38:23 2015 +0100

    application: Adapt to Grilo 0.3.0 API changes
    
    https://bugzilla.gnome.org/show_bug.cgi?id=759521

 src/photos-application.c |   14 ++++++++++++--
 1 files changed, 12 insertions(+), 2 deletions(-)
---
diff --git a/src/photos-application.c b/src/photos-application.c
index c79c729..61a2cf1 100644
--- a/src/photos-application.c
+++ b/src/photos-application.c
@@ -1167,12 +1167,22 @@ photos_application_startup (GApplication *application)
 
   grl_init (NULL, NULL);
   registry = grl_registry_get_default ();
+
   error = NULL;
-  if (!grl_registry_load_plugin_by_id (registry, "grl-flickr", &error))
+  if (!grl_registry_load_all_plugins (registry, FALSE, &error))
     {
-      g_warning ("Unable to load Grilo's Flickr plugin: %s", error->message);
+      g_warning ("Unable to load Grilo plugins: %s", error->message);
       g_error_free (error);
     }
+  else
+    {
+      error = NULL;
+      if (!grl_registry_activate_plugin_by_id (registry, "grl-flickr", &error))
+        {
+          g_warning ("Unable to activate Grilo's Flickr plugin: %s", error->message);
+          g_error_free (error);
+        }
+    }
 
   priv->create_window_cancellable = g_cancellable_new ();
   priv->refresh_miner_ids = g_hash_table_new (g_direct_hash, g_direct_equal);


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]