[gnome-panel] modules: remove builtin library



commit fd8cb428229afee241b9a7dffef9d92333a043ff
Author: Alberts Muktupāvels <alberts muktupavels gmail com>
Date:   Mon Jul 31 12:38:27 2017 +0300

    modules: remove builtin library

 configure.ac                                       |    5 ---
 gnome-panel/libpanel-applet-private/Makefile.am    |    1 -
 .../libpanel-applet-private/gp-applet-manager.c    |   24 -------------
 .../libpanel-applet-private/gp-module-private.h    |    2 -
 gnome-panel/libpanel-applet-private/gp-module.c    |   22 ------------
 modules/Makefile.am                                |    1 -
 modules/builtin/Makefile.am                        |   37 --------------------
 modules/builtin/gp-builtin.c                       |   25 -------------
 modules/builtin/gp-builtin.h                       |   29 ---------------
 9 files changed, 0 insertions(+), 146 deletions(-)
---
diff --git a/configure.ac b/configure.ac
index a2525e7..45ce086 100644
--- a/configure.ac
+++ b/configure.ac
@@ -151,10 +151,6 @@ PKG_CHECK_MODULES([LIBPANEL_APPLET], [
   x11
 ])
 
-PKG_CHECK_MODULES([BUILTIN], [
-  gio-2.0 >= $GLIB_REQUIRED
-])
-
 PKG_CHECK_MODULES(FISH, gtk+-3.0 >= $GTK_REQUIRED cairo >= $CAIRO_REQUIRED)
 AC_SUBST(FISH_CFLAGS)
 AC_SUBST(FISH_LIBS)
@@ -283,7 +279,6 @@ AC_CONFIG_FILES([
   man/Makefile
 
   modules/Makefile
-  modules/builtin/Makefile
   modules/external/Makefile
   modules/external/clock/Makefile
   modules/external/clock/pixmaps/Makefile
diff --git a/gnome-panel/libpanel-applet-private/Makefile.am b/gnome-panel/libpanel-applet-private/Makefile.am
index 0e94745..af39f36 100644
--- a/gnome-panel/libpanel-applet-private/Makefile.am
+++ b/gnome-panel/libpanel-applet-private/Makefile.am
@@ -36,7 +36,6 @@ libpanel_applet_private_la_SOURCES =  \
 
 libpanel_applet_private_la_LIBADD = \
        $(top_builddir)/libgnome-panel/libgnome-panel.la \
-       $(top_builddir)/modules/builtin/libbuiltin.la \
        $(NULL)
 
 libpanel_applet_private_la_LDFLAGS = \
diff --git a/gnome-panel/libpanel-applet-private/gp-applet-manager.c 
b/gnome-panel/libpanel-applet-private/gp-applet-manager.c
index 7117d7f..8afbddc 100644
--- a/gnome-panel/libpanel-applet-private/gp-applet-manager.c
+++ b/gnome-panel/libpanel-applet-private/gp-applet-manager.c
@@ -23,7 +23,6 @@
 #include "gp-applet-manager.h"
 #include "gp-module-private.h"
 #include "libgnome-panel/gp-applet-info-private.h"
-#include "modules/builtin/gp-builtin.h"
 
 struct _GpAppletManager
 {
@@ -74,28 +73,6 @@ get_applet_infos (GpAppletManager *manager,
 }
 
 static void
-load_builtin_modules (GpAppletManager *manager)
-{
-  guint i;
-
-  for (i = 0; builtin[i] != NULL; i++)
-    {
-      GpModule *module;
-      const gchar *id;
-
-      module = gp_module_new_from_vtable (builtin[i]);
-
-      if (module == NULL)
-        continue;
-
-      id = gp_module_get_id (module);
-
-      g_hash_table_insert (manager->modules, g_strdup (id), module);
-      get_applet_infos (manager, id, module);
-    }
-}
-
-static void
 load_external_modules (GpAppletManager *manager)
 {
   GDir *dir;
@@ -362,6 +339,5 @@ gp_applet_manager_init (GpAppletManager *manager)
   manager->infos = g_hash_table_new_full (g_str_hash, g_str_equal,
                                           g_free, applet_info_free);
 
-  load_builtin_modules (manager);
   load_external_modules (manager);
 }
diff --git a/gnome-panel/libpanel-applet-private/gp-module-private.h 
b/gnome-panel/libpanel-applet-private/gp-module-private.h
index aff2377..77370e4 100644
--- a/gnome-panel/libpanel-applet-private/gp-module-private.h
+++ b/gnome-panel/libpanel-applet-private/gp-module-private.h
@@ -38,8 +38,6 @@ GQuark gp_module_error_quark (void);
 
 GpModule            *gp_module_new_from_path       (const gchar           *path);
 
-GpModule            *gp_module_new_from_vtable     (const GpModuleVTable  *vtable);
-
 const gchar         *gp_module_get_id              (GpModule              *module);
 
 const gchar * const *gp_module_get_applets         (GpModule              *module);
diff --git a/gnome-panel/libpanel-applet-private/gp-module.c b/gnome-panel/libpanel-applet-private/gp-module.c
index 4268d9b..c6b8001 100644
--- a/gnome-panel/libpanel-applet-private/gp-module.c
+++ b/gnome-panel/libpanel-applet-private/gp-module.c
@@ -38,8 +38,6 @@ struct _GpModule
 {
   GObject         parent;
 
-  gboolean        builtin;
-
   gchar          *path;
   GModule        *library;
 
@@ -255,7 +253,6 @@ gp_module_new_from_path (const gchar *path)
   g_return_val_if_fail (path != NULL && *path != '\0', NULL);
 
   module = g_object_new (GP_TYPE_MODULE, NULL);
-  module->builtin = FALSE;
 
   flags = G_MODULE_BIND_LAZY | G_MODULE_BIND_LOCAL;
 
@@ -325,25 +322,6 @@ gp_module_new_from_path (const gchar *path)
   return module;
 }
 
-GpModule *
-gp_module_new_from_vtable (const GpModuleVTable *vtable)
-{
-  GpModule *module;
-
-  module = g_object_new (GP_TYPE_MODULE, NULL);
-  module->builtin = TRUE;
-
-  module->vtable = *vtable;
-
-  if (!load_module_info (module))
-    {
-      g_object_unref (module);
-      return NULL;
-    }
-
-  return module;
-}
-
 const gchar *
 gp_module_get_id (GpModule *module)
 {
diff --git a/modules/Makefile.am b/modules/Makefile.am
index 36ee8f8..ceec5ae 100644
--- a/modules/Makefile.am
+++ b/modules/Makefile.am
@@ -1,7 +1,6 @@
 NULL =
 
 SUBDIRS = \
-       builtin \
        external \
        separator \
        $(NULL)


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