[gnome-applets/wip/segeiger/in-process: 6/6] netspeed: 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: 6/6] netspeed: switch to in-process applet
- Date: Wed, 7 Sep 2016 09:25:40 +0000 (UTC)
commit d0e9b3674a6c28320917c5004eacc43c76db749c
Author: Sebastian Geiger <sbastig gmx net>
Date: Wed Sep 7 09:44:27 2016 +0200
netspeed: switch to in-process applet
netspeed/data/Makefile.am | 23 ++++-------
.../org.gnome.panel.Netspeed.panel-applet.in.in | 3 +-
...e.panel.applet.NetspeedAppletFactory.service.in | 3 -
netspeed/src/Makefile.am | 41 +++++++++++--------
netspeed/src/netspeed.c | 8 ++--
5 files changed, 39 insertions(+), 39 deletions(-)
---
diff --git a/netspeed/data/Makefile.am b/netspeed/data/Makefile.am
index d53dd22..9453414 100644
--- a/netspeed/data/Makefile.am
+++ b/netspeed/data/Makefile.am
@@ -1,24 +1,19 @@
+NULL =
+
+APPLET_LOCATION=$(pkglibdir)/$(LIBPANEL_APPLET_API_VERSION)/libnet-speed-applet.so
+
appletdir = $(LIBPANEL_APPLET_DIR)
applet_in_files = org.gnome.panel.Netspeed.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.NetspeedAppletFactory.service.in
-service_DATA = $(service_in_files:.service.in=.service)
-
-org.gnome.panel.applet.NetspeedAppletFactory.service: $(service_in_files)
- $(AM_V_GEN)sed \
- -e "s|\@LIBEXECDIR\@|$(libexecdir)|" \
- $< > $@
-
uidir = $(pkgdatadir)/ui
ui_DATA = netspeed-menu.xml
@@ -37,16 +32,16 @@ gsettings_SCHEMAS = $(gsettings_schemas_in:.xml.in=.xml)
EXTRA_DIST = \
org.gnome.panel.Netspeed.panel-applet.in.in \
$(gsettings_schemas_in_in) \
- $(service_in_files) \
- $(ui_DATA)
+ $(ui_DATA) \
+ $(NULL)
CLEANFILES = \
$(applet_DATA) \
$(applet_DATA).in \
- $(service_DATA) \
$(gsettings_SCHEMAS_in) \
$(gsettings_SCHEMAS) \
- *.gschema.valid
+ *.gschema.valid \
+ $(NULL)
-include $(top_srcdir)/git.mk
diff --git a/netspeed/data/org.gnome.panel.Netspeed.panel-applet.in.in
b/netspeed/data/org.gnome.panel.Netspeed.panel-applet.in.in
index 4864b37..b0995c2 100644
--- a/netspeed/data/org.gnome.panel.Netspeed.panel-applet.in.in
+++ b/netspeed/data/org.gnome.panel.Netspeed.panel-applet.in.in
@@ -1,6 +1,7 @@
[Applet Factory]
Id=NetspeedAppletFactory
-Location=@LIBEXECDIR@/netspeed_applet2
+InProcess=true
+Location=@APPLET_LOCATION@
_Name=Netspeed Applet Factory
_Description=Netspeed Applet
diff --git a/netspeed/src/Makefile.am b/netspeed/src/Makefile.am
index 6a3eb25..d2c7f26 100644
--- a/netspeed/src/Makefile.am
+++ b/netspeed/src/Makefile.am
@@ -2,37 +2,44 @@ NULL =
uidir = $(pkgdatadir)/ui
-netspeed_applet2_CFLAGS = \
+netspeed_applet_libdir = $(pkglibdir)/$(LIBPANEL_APPLET_API_VERSION)
+netspeed_applet_lib_LTLIBRARIES = libnet-speed-applet.la
+
+libnet_speed_applet_la_CPPFLAGS = \
-DGNOMELOCALEDIR=\""$(localedir)"\" \
-DNETSPEED_MENU_UI_DIR=\""$(uidir)"\" \
-I$(top_srcdir) \
-I$(includedir) \
+ $(NULL)
+
+libnet_speed_applet_la_CFLAGS = \
$(GNOME_APPLETS_CFLAGS) \
$(GTOP_APPLETS_CFLAGS) \
$(WARN_CFLAGS) \
$(AM_CFLAGS) \
$(NULL)
-libexec_PROGRAMS = netspeed_applet2
-
-netspeed_applet2_SOURCES = \
- backend.h \
- backend.c \
- label.h \
- label.c \
- netspeed.h \
- netspeed.c \
- preferences.h \
- preferences.c
+libnet_speed_applet_la_SOURCES = \
+ backend.h \
+ backend.c \
+ label.h \
+ label.c \
+ netspeed.h \
+ netspeed.c \
+ preferences.h \
+ preferences.c \
+ $(NULL)
-netspeed_applet2_LDFLAGS = \
+libnet_speed_applet_la_LDFLAGS = \
+ -avoid-version \
$(WARN_LDFLAGS) \
$(AM_LDFLAGS) \
$(NULL)
-netspeed_applet2_LDADD = \
- $(GNOME_APPLETS_LIBS) \
- $(GTOP_APPLETS_LIBS) \
- $(IWLIB)
+libnet_speed_applet_la_LIBADD = \
+ $(GNOME_APPLETS_LIBS) \
+ $(GTOP_APPLETS_LIBS) \
+ $(IWLIB) \
+ $(NULL)
-include $(top_srcdir)/git.mk
diff --git a/netspeed/src/netspeed.c b/netspeed/src/netspeed.c
index de23e16..2e83f43 100644
--- a/netspeed/src/netspeed.c
+++ b/netspeed/src/netspeed.c
@@ -1594,7 +1594,7 @@ netspeed_applet_get_auto_device_name (void)
return g_strdup ("lo");
}
-PANEL_APPLET_OUT_PROCESS_FACTORY ("NetspeedAppletFactory",
- NETSPEED_TYPE_APPLET,
- netspeed_applet_factory,
- NULL)
+PANEL_APPLET_IN_PROCESS_FACTORY ("NetspeedAppletFactory",
+ NETSPEED_TYPE_APPLET,
+ netspeed_applet_factory,
+ NULL)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]