[gnome-builder] app: load a few dependent types



commit 845ea3abaecfa865f82ebf0904a808ad1ee5ce55
Author: Christian Hergert <chergert redhat com>
Date:   Sat Jun 17 23:43:58 2017 -0700

    app: load a few dependent types
    
    We want to ensure we've loaded specific versions so that we don't have to
    deal with annoying messages in python modules.

 libide/application/ide-application-plugins.c |    9 ++++-----
 1 files changed, 4 insertions(+), 5 deletions(-)
---
diff --git a/libide/application/ide-application-plugins.c b/libide/application/ide-application-plugins.c
index 1d4d7b3..843fed6 100644
--- a/libide/application/ide-application-plugins.c
+++ b/libide/application/ide-application-plugins.c
@@ -151,11 +151,10 @@ ide_application_discover_plugins (IdeApplication *self)
       peas_engine_prepend_search_path (engine, plugins_dir, plugins_dir);
     }
 
-  g_irepository_require (NULL, "Ide", "1.0", 0, &error);
-  if (error != NULL)
-    {
-      g_warning ("Cannot enable Python 3 plugins: %s", error->message);
-    }
+  if (!g_irepository_require (NULL, "Ide", "1.0", 0, &error) ||
+      !g_irepository_require (NULL, "Gtk", "3.0", 0, &error) ||
+      !g_irepository_require (NULL, "Dazzle", "1.0", 0, &error))
+    g_warning ("Cannot enable Python 3 plugins: %s", error->message);
   else
     {
       /* Avoid spamming stderr with Ide import tracebacks */


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