[gnome-panel] action-button: new empty module for action buttons



commit 79687591d4e5406c4d96d2e53db97f2e0b02c429
Author: Alberts Muktupāvels <alberts muktupavels gmail com>
Date:   Thu Apr 16 00:13:41 2020 +0300

    action-button: new empty module for action buttons

 configure.ac                                    |  6 ++++
 modules/Makefile.am                             |  1 +
 modules/action-button/Makefile.am               | 37 +++++++++++++++++++++++++
 modules/action-button/gp-action-button-module.c | 34 +++++++++++++++++++++++
 po/POTFILES.in                                  |  1 +
 5 files changed, 79 insertions(+)
---
diff --git a/configure.ac b/configure.ac
index 5bc68929a..204c09c78 100644
--- a/configure.ac
+++ b/configure.ac
@@ -150,6 +150,11 @@ PKG_CHECK_MODULES([LIBGNOME_PANEL], [
   gtk+-3.0 >= $GTK_REQUIRED
 ])
 
+PKG_CHECK_MODULES([ACTION_BUTTON], [
+  gio-unix-2.0 >= $GLIB_REQUIRED
+  gtk+-3.0 >= $GTK_REQUIRED
+])
+
 PKG_CHECK_MODULES(FISH, gtk+-3.0 >= $GTK_REQUIRED cairo >= $CAIRO_REQUIRED)
 AC_SUBST(FISH_CFLAGS)
 AC_SUBST(FISH_LIBS)
@@ -282,6 +287,7 @@ AC_CONFIG_FILES([
   man/Makefile
 
   modules/Makefile
+  modules/action-button/Makefile
   modules/clock/Makefile
   modules/clock/pixmaps/Makefile
   modules/fish/Makefile
diff --git a/modules/Makefile.am b/modules/Makefile.am
index ef377e340..ee1ae0bf6 100644
--- a/modules/Makefile.am
+++ b/modules/Makefile.am
@@ -1,6 +1,7 @@
 NULL =
 
 SUBDIRS = \
+       action-button \
        clock \
        fish \
        launcher \
diff --git a/modules/action-button/Makefile.am b/modules/action-button/Makefile.am
new file mode 100644
index 000000000..2f66b6c7e
--- /dev/null
+++ b/modules/action-button/Makefile.am
@@ -0,0 +1,37 @@
+NULL =
+
+action_button_libdir = $(libdir)/gnome-panel/modules
+action_button_lib_LTLIBRARIES = org.gnome.gnome-panel.action-button.la
+
+org_gnome_gnome_panel_action_button_la_CPPFLAGS = \
+       -DLOCALEDIR=\""$(localedir)"\" \
+       -DG_LOG_DOMAIN=\""action-button"\" \
+       -DG_LOG_USE_STRUCTURED=1 \
+       -I$(top_srcdir) \
+       $(AM_CPPFLAGS) \
+       $(NULL)
+
+org_gnome_gnome_panel_action_button_la_CFLAGS = \
+       $(LIBGNOME_PANEL_CFLAGS) \
+       $(ACTION_BUTTON_CFLAGS) \
+       $(WARN_CFLAGS) \
+       $(AM_CFLAGS) \
+       $(NULL)
+
+org_gnome_gnome_panel_action_button_la_SOURCES = \
+       gp-action-button-module.c \
+       $(NULL)
+
+org_gnome_gnome_panel_action_button_la_LIBADD = \
+       $(top_builddir)/libgnome-panel/libgnome-panel.la \
+       $(LIBGNOME_PANEL_LIBS) \
+       $(ACTION_BUTTON_LIBS) \
+       $(NULL)
+
+org_gnome_gnome_panel_action_button_la_LDFLAGS = \
+       -module -avoid-version \
+       $(WARN_LDFLAGS) \
+       $(AM_LDFLAGS) \
+       $(NULL)
+
+-include $(top_srcdir)/git.mk
diff --git a/modules/action-button/gp-action-button-module.c b/modules/action-button/gp-action-button-module.c
new file mode 100644
index 000000000..c44dc2dad
--- /dev/null
+++ b/modules/action-button/gp-action-button-module.c
@@ -0,0 +1,34 @@
+/*
+ * Copyright (C) 2020 Alberts Muktupāvels
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include "config.h"
+
+#include <glib/gi18n-lib.h>
+#include <libgnome-panel/gp-module.h>
+
+void
+gp_module_load (GpModule *module)
+{
+  bindtextdomain (GETTEXT_PACKAGE, LOCALEDIR);
+  bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8");
+  gp_module_set_gettext_domain (module, GETTEXT_PACKAGE);
+
+  gp_module_set_abi_version (module, GP_MODULE_ABI_VERSION);
+
+  gp_module_set_id (module, "org.gnome.gnome-panel.action-button");
+  gp_module_set_version (module, PACKAGE_VERSION);
+}
diff --git a/po/POTFILES.in b/po/POTFILES.in
index 3d23da159..68573d77d 100644
--- a/po/POTFILES.in
+++ b/po/POTFILES.in
@@ -33,6 +33,7 @@ gnome-panel/panel-toplevel.c
 gnome-panel/panel-util.c
 libgnome-panel/gp-initial-setup-dialog.c
 libgnome-panel/gp-module.c
+modules/action-button/gp-action-button-module.c
 modules/clock/calendar-client.c
 modules/clock/calendar-window.c
 modules/clock/clock-applet.c


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