[gnome-panel] separator: convert into a module
- From: Alberts Muktupāvels <muktupavels src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-panel] separator: convert into a module
- Date: Mon, 31 Jul 2017 15:14:56 +0000 (UTC)
commit a3f69309e62f3ea79bf8599fc72a04f2ff697661
Author: Alberts Muktupāvels <alberts muktupavels gmail com>
Date: Mon Jul 31 12:31:04 2017 +0300
separator: convert into a module
configure.ac | 2 +-
modules/Makefile.am | 1 +
modules/builtin/Makefile.am | 2 -
modules/builtin/gp-builtin.c | 2 -
modules/builtin/separator/separator-module.h | 29 --------------------
modules/{builtin => }/separator/Makefile.am | 15 +++++-----
modules/{builtin => }/separator/separator-applet.c | 0
modules/{builtin => }/separator/separator-applet.h | 0
modules/{builtin => }/separator/separator-module.c | 24 +++++++++++-----
po/POTFILES.in | 2 +-
10 files changed, 27 insertions(+), 50 deletions(-)
---
diff --git a/configure.ac b/configure.ac
index 87be589..a2525e7 100644
--- a/configure.ac
+++ b/configure.ac
@@ -284,7 +284,6 @@ AC_CONFIG_FILES([
modules/Makefile
modules/builtin/Makefile
- modules/builtin/separator/Makefile
modules/external/Makefile
modules/external/clock/Makefile
modules/external/clock/pixmaps/Makefile
@@ -292,6 +291,7 @@ AC_CONFIG_FILES([
modules/external/notification-area/Makefile
modules/external/status-notifier/Makefile
modules/external/wncklet/Makefile
+ modules/separator/Makefile
po/Makefile.in
])
diff --git a/modules/Makefile.am b/modules/Makefile.am
index 8a311df..36ee8f8 100644
--- a/modules/Makefile.am
+++ b/modules/Makefile.am
@@ -3,6 +3,7 @@ NULL =
SUBDIRS = \
builtin \
external \
+ separator \
$(NULL)
-include $(top_srcdir)/git.mk
diff --git a/modules/builtin/Makefile.am b/modules/builtin/Makefile.am
index edfa45d..f4da6b5 100644
--- a/modules/builtin/Makefile.am
+++ b/modules/builtin/Makefile.am
@@ -1,7 +1,6 @@
NULL =
SUBDIRS = \
- separator \
$(NULL)
noinst_LTLIBRARIES = libbuiltin.la
@@ -31,7 +30,6 @@ libbuiltin_la_LDFLAGS = \
libbuiltin_la_LIBADD = \
$(top_builddir)/libgnome-panel/libgnome-panel.la \
- $(top_builddir)/modules/builtin/separator/libseparator.la \
$(LIBGNOME_PANEL_LIBS) \
$(BUILTIN_LIBS) \
$(NULL)
diff --git a/modules/builtin/gp-builtin.c b/modules/builtin/gp-builtin.c
index 97af82e..e239903 100644
--- a/modules/builtin/gp-builtin.c
+++ b/modules/builtin/gp-builtin.c
@@ -18,10 +18,8 @@
#include "config.h"
#include "gp-builtin.h"
-#include "separator/separator-module.h"
const GpModuleVTable *builtin[] =
{
- &separator_vtable,
NULL
};
diff --git a/modules/builtin/separator/Makefile.am b/modules/separator/Makefile.am
similarity index 67%
rename from modules/builtin/separator/Makefile.am
rename to modules/separator/Makefile.am
index fd9c8ba..682ec91 100644
--- a/modules/builtin/separator/Makefile.am
+++ b/modules/separator/Makefile.am
@@ -1,8 +1,9 @@
NULL =
-noinst_LTLIBRARIES = libseparator.la
+separator_libdir = $(libdir)/gnome-panel/modules
+separator_lib_LTLIBRARIES = separator.la
-libseparator_la_CPPFLAGS = \
+separator_la_CPPFLAGS = \
-DLOCALEDIR=\""$(localedir)"\" \
-DG_LOG_DOMAIN=\""separator"\" \
-DG_LOG_USE_STRUCTURED=1 \
@@ -10,27 +11,27 @@ libseparator_la_CPPFLAGS = \
$(AM_CPPFLAGS) \
$(NULL)
-libseparator_la_CFLAGS = \
+separator_la_CFLAGS = \
$(LIBGNOME_PANEL_CFLAGS) \
$(SEPARATOR_CFLAGS) \
$(WARN_CFLAGS) \
$(AM_CFLAGS) \
$(NULL)
-libseparator_la_SOURCES = \
+separator_la_SOURCES = \
separator-applet.c \
separator-applet.h \
separator-module.c \
- separator-module.h \
$(NULL)
-libseparator_la_LIBADD = \
+separator_la_LIBADD = \
$(top_builddir)/libgnome-panel/libgnome-panel.la \
$(LIBGNOME_PANEL_LIBS) \
$(SEPARATOR_LIBS) \
$(NULL)
-libseparator_la_LDFLAGS = \
+separator_la_LDFLAGS = \
+ -module -avoid-version \
$(WARN_LDFLAGS) \
$(AM_LDFLAGS) \
$(NULL)
diff --git a/modules/builtin/separator/separator-applet.c b/modules/separator/separator-applet.c
similarity index 100%
rename from modules/builtin/separator/separator-applet.c
rename to modules/separator/separator-applet.c
diff --git a/modules/builtin/separator/separator-applet.h b/modules/separator/separator-applet.h
similarity index 100%
rename from modules/builtin/separator/separator-applet.h
rename to modules/separator/separator-applet.h
diff --git a/modules/builtin/separator/separator-module.c b/modules/separator/separator-module.c
similarity index 85%
rename from modules/builtin/separator/separator-module.c
rename to modules/separator/separator-module.c
index d0cc15d..576b149 100644
--- a/modules/builtin/separator/separator-module.c
+++ b/modules/separator/separator-module.c
@@ -21,7 +21,6 @@
#include <libgnome-panel/gp-module.h>
#include "separator-applet.h"
-#include "separator-module.h"
static GpModuleInfo *
separator_get_module_info (void)
@@ -62,11 +61,20 @@ separator_get_applet_from_iid (const gchar *iid)
return NULL;
}
-const GpModuleVTable separator_vtable =
+guint32
+gp_module_get_abi_version (void)
{
- separator_get_module_info,
- separator_get_applet_info,
- separator_get_applet_type,
- separator_get_applet_from_iid,
- NULL
-};
+ return GP_MODULE_ABI_VERSION;
+}
+
+void
+gp_module_get_vtable (GpModuleVTable *vtable)
+{
+ *vtable = (GpModuleVTable) {
+ separator_get_module_info,
+ separator_get_applet_info,
+ separator_get_applet_type,
+ separator_get_applet_from_iid,
+ NULL
+ };
+}
diff --git a/po/POTFILES.in b/po/POTFILES.in
index 1c7110c..c42d071 100644
--- a/po/POTFILES.in
+++ b/po/POTFILES.in
@@ -45,7 +45,6 @@ gnome-panel/panel-stock-icons.c
gnome-panel/panel-toplevel.c
gnome-panel/panel-util.c
libpanel-applet/panel-applet.c
-modules/builtin/separator/separator-module.c
modules/external/clock/calendar-client.c
modules/external/clock/calendar-window.c
modules/external/clock/clock-applet.c
@@ -73,3 +72,4 @@ modules/external/wncklet/wncklet-module.c
modules/external/wncklet/workspace-switcher.c
modules/external/wncklet/workspace-switcher-menu.ui
modules/external/wncklet/workspace-switcher.ui
+modules/separator/separator-module.c
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]