[gnome-applets] modem-lights: switch to in-process applet
- From: Sebastian Geiger <segeiger src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-applets] modem-lights: switch to in-process applet
- Date: Tue, 13 Sep 2016 14:37:28 +0000 (UTC)
commit b39ca6a088fe1e911c6298222dfe2833c2fd453d
Author: Sebastian Geiger <sbastig gmx net>
Date: Wed Sep 7 13:11:02 2016 +0200
modem-lights: switch to in-process applet
modem-lights/Makefile.am | 13 +++----------
...rg.gnome.applets.ModemApplet.panel-applet.in.in | 3 ++-
...nome.panel.applet.ModemAppletFactory.service.in | 3 ---
modem-lights/src/Makefile.am | 15 ++++++++++-----
modem-lights/src/modem-applet.c | 8 ++++----
5 files changed, 19 insertions(+), 23 deletions(-)
---
diff --git a/modem-lights/Makefile.am b/modem-lights/Makefile.am
index 329c1d8..7570569 100644
--- a/modem-lights/Makefile.am
+++ b/modem-lights/Makefile.am
@@ -5,27 +5,20 @@ SUBDIRS = src
uidir = $(pkgdatadir)/ui
ui_DATA = modem-applet-menu.xml
+APPLET_LOCATION=$(pkglibdir)/$(LIBPANEL_APPLET_API_VERSION)/libmodem-lights-applet.so
+
appletdir = $(LIBPANEL_APPLET_DIR)
applet_in_files = org.gnome.applets.ModemApplet.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.ModemAppletFactory.service.in
-service_DATA = $(service_in_files:.service.in=.service)
-
-org.gnome.panel.applet.ModemAppletFactory.service: $(service_in_files)
- $(AM_V_GEN)sed \
- -e "s|\@LIBEXECDIR\@|$(libexecdir)|" \
- $< > $@
-
CLEANFILES = $(applet_DATA) $(applet_DATA).in $(service_DATA)
builderdir = $(pkgdatadir)/builder
diff --git a/modem-lights/org.gnome.applets.ModemApplet.panel-applet.in.in
b/modem-lights/org.gnome.applets.ModemApplet.panel-applet.in.in
index 32694b2..959f6a1 100644
--- a/modem-lights/org.gnome.applets.ModemApplet.panel-applet.in.in
+++ b/modem-lights/org.gnome.applets.ModemApplet.panel-applet.in.in
@@ -1,6 +1,7 @@
[Applet Factory]
Id=ModemAppletFactory
-Location=@LIBEXECDIR@/modem_applet
+InProcess=true
+Location=@APPLET_LOCATION@
Name=Modem Factory
Description=Modem Applet Factory
diff --git a/modem-lights/src/Makefile.am b/modem-lights/src/Makefile.am
index aa31ed0..38b62a0 100644
--- a/modem-lights/src/Makefile.am
+++ b/modem-lights/src/Makefile.am
@@ -2,31 +2,36 @@ NULL =
uidir = $(pkgdatadir)/ui
-libexec_PROGRAMS = modem_applet
+modem_lights_appletlibdir = $(pkglibdir)/$(LIBPANEL_APPLET_API_VERSION)
+modem_lights_appletlib_LTLIBRARIES = libmodem-lights-applet.la
-modem_applet_CFLAGS = \
+libmodem_lights_applet_la_CPPFLAGS = \
-I. \
-I$(srcdir) \
-DMODEM_MENU_UI_DIR=\""$(uidir)"\" \
-DGNOMELOCALEDIR=\""$(localedir)"\" \
-DGTK_BUILDERDIR=\""$(pkgdatadir)/builder"\" \
+ $(NULL)
+
+libmodem_lights_applet_la_CFLAGS = \
$(GNOME_APPLETS_CFLAGS) \
$(XML2_CFLAGS) \
$(WARN_CFLAGS) \
$(AM_CFLAGS) \
$(NULL)
-modem_applet_SOURCES = \
+libmodem_lights_applet_la_SOURCES = \
modem-applet.c \
modem-applet.h \
$(NULL)
-modem_applet_LDFLAGS = \
+libmodem_lights_applet_la_LDFLAGS = \
+ -avoid-version \
$(WARN_LDFLAGS) \
$(AM_LDFLAGS) \
$(NULL)
-modem_applet_LDADD = \
+libmodem_lights_applet_la_LIBADD = \
$(GNOME_APPLETS_LIBS) \
$(MODEMLIGHTS_LIBS) \
$(XML2_LIBS) \
diff --git a/modem-lights/src/modem-applet.c b/modem-lights/src/modem-applet.c
index 640f53c..c462fed 100644
--- a/modem-lights/src/modem-applet.c
+++ b/modem-lights/src/modem-applet.c
@@ -1047,7 +1047,7 @@ modem_applet_factory (PanelApplet *applet,
return retval;
}
-PANEL_APPLET_OUT_PROCESS_FACTORY ("ModemAppletFactory",
- TYPE_MODEM_APPLET,
- modem_applet_factory,
- NULL)
+PANEL_APPLET_IN_PROCESS_FACTORY ("ModemAppletFactory",
+ TYPE_MODEM_APPLET,
+ modem_applet_factory,
+ NULL)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]