[gnome-applets/wip/segeiger/in-process: 2/10] command: switch to in-process applet
- From: Sebastian Geiger <segeiger src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-applets/wip/segeiger/in-process: 2/10] command: switch to in-process applet
- Date: Sun, 11 Sep 2016 15:06:21 +0000 (UTC)
commit b66949843cc31e7e0993fa23d67367178efcf564
Author: Sebastian Geiger <sbastig gmx net>
Date: Thu Sep 8 12:06:42 2016 +0200
command: switch to in-process applet
command/Makefile.am | 13 +++----------
....gnome.applets.CommandApplet.panel-applet.in.in | 3 ++-
...me.panel.applet.CommandAppletFactory.service.in | 3 ---
command/src/Makefile.am | 15 ++++++++++-----
command/src/command.c | 8 ++++----
5 files changed, 19 insertions(+), 23 deletions(-)
---
diff --git a/command/Makefile.am b/command/Makefile.am
index 6259568..3af6467 100644
--- a/command/Makefile.am
+++ b/command/Makefile.am
@@ -2,27 +2,20 @@ NULL =
SUBDIRS = src
+APPLET_LOCATION = $(pkglibdir)/$(LIBPANEL_APPLET_API_VERSION)/libcommand-applet.so
+
appletdir = $(LIBPANEL_APPLET_DIR)
applet_in_files = org.gnome.applets.CommandApplet.panel-applet.in
applet_DATA = $(applet_in_files:.panel-applet.in=.panel-applet)
$(applet_in_files): $(applet_in_files).in Makefile
$(AM_V_GEN)sed \
- -e "s|\@LIBEXECDIR\@|$(libexecdir)|" \
+ -e "s|\@APPLET_LOCATION\@|$(APPLET_LOCATION)|" \
-e "s|\@VERSION\@|$(PACKAGE_VERSION)|" \
$< > $@
%.panel-applet: %.panel-applet.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*po) ; $(INTLTOOL_MERGE)
$(top_srcdir)/po $< $@ -d -u -c $(top_builddir)/po/.intltool-merge-cache
-servicedir = $(datadir)/dbus-1/services
-service_in_files = org.gnome.panel.applet.CommandAppletFactory.service.in
-service_DATA = $(service_in_files:.service.in=.service)
-
-org.gnome.panel.applet.CommandAppletFactory.service: $(service_in_files)
- $(AM_V_GEN)sed \
- -e "s|\@LIBEXECDIR\@|$(libexecdir)|" \
- $< > $@
-
gsettings_schemas_in_in = \
org.gnome.gnome-applets.command.gschema.xml.in.in
diff --git a/command/org.gnome.applets.CommandApplet.panel-applet.in.in
b/command/org.gnome.applets.CommandApplet.panel-applet.in.in
index 5058c9f..a90710c 100644
--- a/command/org.gnome.applets.CommandApplet.panel-applet.in.in
+++ b/command/org.gnome.applets.CommandApplet.panel-applet.in.in
@@ -1,6 +1,7 @@
[Applet Factory]
Id=CommandAppletFactory
-Location=@LIBEXECDIR@/command-applet
+InProcess=true
+Location=@APPLET_LOCATION@
_Name=Command Factory
_Description=Command Factory
diff --git a/command/src/Makefile.am b/command/src/Makefile.am
index 35b7d90..2ef9b99 100644
--- a/command/src/Makefile.am
+++ b/command/src/Makefile.am
@@ -1,27 +1,32 @@
NULL =
-libexec_PROGRAMS = command-applet
+command_applet_libdir = $(pkglibdir)/$(LIBPANEL_APPLET_API_VERSION)
+command_applet_lib_LTLIBRARIES = libcommand-applet.la
-command_applet_CFLAGS = \
+libcommand_applet_la_CPPFLAGS = \
-I. \
-I$(srcdir) \
-DGNOMELOCALEDIR=\""$(localedir)"\" \
-DPKG_DATA_DIR=\""$(pkgdatadir)"\" \
+ $(NULL)
+
+libcommand_applet_la_CFLAGS = \
$(GNOME_APPLETS_CFLAGS) \
$(WARN_CFLAGS) \
$(AM_CFLAGS) \
$(NULL)
-command_applet_SOURCES = \
+libcommand_applet_la_SOURCES = \
command.c \
$(NULL)
-command_applet_LDFLAGS = \
+libcommand_applet_la_LDFLAGS = \
+ -avoid-version \
$(WARN_LDFLAGS) \
$(AM_LDFLAGS) \
$(NULL)
-command_applet_LDADD = \
+libcommand_applet_la_LIBADD = \
$(GNOME_APPLETS_LIBS) \
$(NULL)
diff --git a/command/src/command.c b/command/src/command.c
index 0a3d183..6a5b78a 100644
--- a/command/src/command.c
+++ b/command/src/command.c
@@ -402,7 +402,7 @@ command_factory (PanelApplet* applet, const char* iid, gpointer data)
}
/* needed by gnome-panel applet library */
-PANEL_APPLET_OUT_PROCESS_FACTORY("CommandAppletFactory",
- PANEL_TYPE_APPLET,
- command_factory,
- NULL)
+PANEL_APPLET_IN_PROCESS_FACTORY("CommandAppletFactory",
+ PANEL_TYPE_APPLET,
+ command_factory,
+ NULL)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]