[gnome-applets/wip/segeiger/in-process: 1/5] battstat: 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: 1/5] battstat: switch to in-process applet
- Date: Sun, 11 Sep 2016 15:25:41 +0000 (UTC)
commit c86e09bc196e16f34e02e2dcb49907ce07cdc4d8
Author: Sebastian Geiger <sbastig gmx net>
Date: Sun Sep 11 17:05:30 2016 +0200
battstat: switch to in-process applet
battstat/Makefile.am | 13 ++--------
...gnome.applets.BattstatApplet.panel-applet.in.in | 3 +-
...e.panel.applet.BattstatAppletFactory.service.in | 3 --
battstat/src/Makefile.am | 23 ++++++++++++-------
battstat/src/battstat_applet.c | 10 +++-----
5 files changed, 23 insertions(+), 29 deletions(-)
---
diff --git a/battstat/Makefile.am b/battstat/Makefile.am
index 03b2ddf..9e3711c 100644
--- a/battstat/Makefile.am
+++ b/battstat/Makefile.am
@@ -22,27 +22,20 @@ gsettings_SCHEMAS = $(gsettings_schemas_in:.xml.in=.xml)
@GSETTINGS_RULES@
+APPLET_LOCATION = $(pkglibdir)/$(LIBPANEL_APPLET_API_VERSION)/libbattery-status-applet.so
+
appletdir = $(LIBPANEL_APPLET_DIR)
applet_in_files = org.gnome.applets.BattstatApplet.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.BattstatAppletFactory.service.in
-service_DATA = $(service_in_files:.service.in=.service)
-
-org.gnome.panel.applet.BattstatAppletFactory.service: $(service_in_files)
- $(AM_V_GEN)sed \
- -e "s|\@LIBEXECDIR\@|$(libexecdir)|" \
- $< > $@
-
CLEANFILES = $(applet_DATA) $(applet_DATA).in $(service_DATA) \
$(gsettings_SCHEMAS_in) \
$(gsettings_SCHEMAS) \
diff --git a/battstat/org.gnome.applets.BattstatApplet.panel-applet.in.in
b/battstat/org.gnome.applets.BattstatApplet.panel-applet.in.in
index 2842c6e..fa1d285 100644
--- a/battstat/org.gnome.applets.BattstatApplet.panel-applet.in.in
+++ b/battstat/org.gnome.applets.BattstatApplet.panel-applet.in.in
@@ -1,6 +1,7 @@
[Applet Factory]
Id=BattstatAppletFactory
-Location=@LIBEXECDIR@/battstat-applet-2
+InProcess=true
+Location=@APPLET_LOCATION@
_Name=Battstat Factory
_Description=Battstat Factory
diff --git a/battstat/src/Makefile.am b/battstat/src/Makefile.am
index e50364b..d1a0958 100644
--- a/battstat/src/Makefile.am
+++ b/battstat/src/Makefile.am
@@ -20,23 +20,27 @@ APMDIR =
APMINC =
endif
-libexec_PROGRAMS = battstat-applet-2
+battery_status_applet_libdir = $(pkglibdir)/$(LIBPANEL_APPLET_API_VERSION)
+battery_status_applet_lib_LTLIBRARIES = libbattery-status-applet.la
-battstat_applet_2_CFLAGS = \
+libbattery_status_applet_la_CPPFLAGS = \
+ -DG_LOG_DOMAIN=\"battstat_applet\" \
+ -DBATTSTAT_MENU_UI_DIR=\""$(uidir)"\" \
+ -DGNOMELOCALEDIR=\""$(localedir)"\" \
+ -DGTK_BUILDERDIR=\""$(pkgdatadir)/builder"\" \
+ $(NULL)
+
+libbattery_status_applet_la_CFLAGS = \
$(GNOME_APPLETS_CFLAGS) \
$(LIBNOTIFY_CFLAGS) \
$(UPOWER_CFLAGS) \
$(APMINC) \
$(ACPIINC) \
- -DG_LOG_DOMAIN=\"battstat_applet\" \
- -DBATTSTAT_MENU_UI_DIR=\""$(uidir)"\" \
- -DGNOMELOCALEDIR=\""$(localedir)"\" \
- -DGTK_BUILDERDIR=\""$(pkgdatadir)/builder"\" \
$(WARN_CFLAGS) \
$(AM_CFLAGS) \
$(NULL)
-battstat_applet_2_SOURCES = \
+libbattery_status_applet_la_SOURCES = \
battstat.h \
pixmaps.h \
properties.c \
@@ -50,12 +54,13 @@ battstat_applet_2_SOURCES = \
battstat-upower.h \
$(NULL)
-battstat_applet_2_LDFLAGS = \
+libbattery_status_applet_la_LDFLAGS = \
+ -avoid-version \
$(WARN_LDFLAGS) \
$(AM_LDFLAGS) \
$(NULL)
-battstat_applet_2_LDADD = \
+libbattery_status_applet_la_LIBADD = \
$(GNOME_APPLETS_LIBS) \
$(LIBNOTIFY_LIBS) \
$(UPOWER_LIBS) \
diff --git a/battstat/src/battstat_applet.c b/battstat/src/battstat_applet.c
index 715435d..ca42606 100644
--- a/battstat/src/battstat_applet.c
+++ b/battstat/src/battstat_applet.c
@@ -1638,9 +1638,7 @@ battstat_applet_factory (PanelApplet *applet,
}
-PANEL_APPLET_OUT_PROCESS_FACTORY ("BattstatAppletFactory",
- PANEL_TYPE_APPLET,
- battstat_applet_factory,
- NULL)
-
-
+PANEL_APPLET_IN_PROCESS_FACTORY ("BattstatAppletFactory",
+ PANEL_TYPE_APPLET,
+ battstat_applet_factory,
+ NULL)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]