[gnome-builder] plugins: blacklist build-tools plugin



commit 9b1b4b318d1d914605cc5a578524c88a4f45191d
Author: Christian Hergert <chergert redhat com>
Date:   Wed Feb 15 23:13:27 2017 -0800

    plugins: blacklist build-tools plugin
    
    This was moved to buildui inside of libide, and so is no longer necessary.
    Ensure that a lingering plugin file does not result in it being loaded.

 libide/application/ide-application-plugins.c |   14 ++++++++++++++
 1 files changed, 14 insertions(+), 0 deletions(-)
---
diff --git a/libide/application/ide-application-plugins.c b/libide/application/ide-application-plugins.c
index df52059..16ed3c7 100644
--- a/libide/application/ide-application-plugins.c
+++ b/libide/application/ide-application-plugins.c
@@ -28,13 +28,27 @@
 #include "application/ide-application-private.h"
 #include "theming/ide-css-provider.h"
 
+static const gchar *blacklisted_plugins[] = {
+  "build-tools", /* Renamed to buildui */
+};
+
 static gboolean
 ide_application_can_load_plugin (IdeApplication *self,
                                  PeasPluginInfo *plugin_info)
 {
+  const gchar *module_name;
+
   g_assert (IDE_IS_APPLICATION (self));
   g_assert (plugin_info != NULL);
 
+  module_name = peas_plugin_info_get_module_name (plugin_info);
+
+  for (guint i = 0; i < G_N_ELEMENTS (blacklisted_plugins); i++)
+    {
+      if (g_strcmp0 (module_name, blacklisted_plugins[i]) == 0)
+        return FALSE;
+    }
+
   if (self->mode == IDE_APPLICATION_MODE_WORKER)
     {
       if (self->worker != plugin_info)


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