[gnome-applets/wip/segeiger/in-process: 6/6] trash: 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] trash: switch to in-process applet
- Date: Thu, 28 Jul 2016 23:11:36 +0000 (UTC)
commit 8fe7fb61ad9364c532ab8eb53da9804a6448b019
Author: Sebastian Geiger <sbastig gmx net>
Date: Fri Jul 29 00:31:41 2016 +0200
trash: switch to in-process applet
trash/Makefile.am | 16 ++------
...rg.gnome.applets.TrashApplet.panel-applet.in.in | 3 +-
...nome.panel.applet.TrashAppletFactory.service.in | 3 --
trash/src/Makefile.am | 36 +++++++++++--------
trash/src/trash-applet.c | 2 +-
5 files changed, 28 insertions(+), 32 deletions(-)
---
diff --git a/trash/Makefile.am b/trash/Makefile.am
index b63ce26..b8c1d6a 100644
--- a/trash/Makefile.am
+++ b/trash/Makefile.am
@@ -6,28 +6,20 @@ appletdir = $(LIBPANEL_APPLET_DIR)
applet_in_files = org.gnome.applets.TrashApplet.panel-applet.in
applet_DATA = $(applet_in_files:.panel-applet.in=.panel-applet)
+APPLET_LOCATION=$(pkglibdir)/$(LIBPANEL_APPLET_API_VERSION)/libtrash-applet.so
+
$(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.TrashAppletFactory.service.in
-service_DATA = $(service_in_files:.service.in=.service)
-
-org.gnome.panel.applet.TrashAppletFactory.service: $(service_in_files)
- $(AM_V_GEN)sed \
- -e "s|\@LIBEXECDIR\@|$(libexecdir)|" \
- $< > $@
-
EXTRA_DIST = \
org.gnome.applets.TrashApplet.panel-applet.in.in \
- $(service_in_files) \
$(NULL)
-CLEANFILES = $(applet_DATA) $(applet_DATA).in $(service_DATA)
+CLEANFILES = $(applet_DATA) $(applet_DATA).in
-include $(top_srcdir)/git.mk
diff --git a/trash/org.gnome.applets.TrashApplet.panel-applet.in.in
b/trash/org.gnome.applets.TrashApplet.panel-applet.in.in
index b57bfba..7fa2ef7 100644
--- a/trash/org.gnome.applets.TrashApplet.panel-applet.in.in
+++ b/trash/org.gnome.applets.TrashApplet.panel-applet.in.in
@@ -1,6 +1,7 @@
[Applet Factory]
Id=TrashAppletFactory
-Location=@LIBEXECDIR@/trashapplet
+Location=@APPLET_LOCATION@
+InProcess=true
Name=Trash Applet Factory
Description=Trash Applet Factory
diff --git a/trash/src/Makefile.am b/trash/src/Makefile.am
index 0baf701..3363dd7 100644
--- a/trash/src/Makefile.am
+++ b/trash/src/Makefile.am
@@ -1,17 +1,34 @@
NULL =
-trashapplet_CPPFLAGS = \
+trash_libdir=${pkglibdir}/${LIBPANEL_APPLET_API_VERSION}
+trash_lib_LTLIBRARIES=libtrash-applet.la
+
+libtrash_applet_la_CFLAGS = \
-DGNOMELOCALEDIR=\""$(localedir)"\" \
+ -I$(top_builddir) \
-I$(top_srcdir) \
- $(GNOME_APPLETS_CFLAGS) \
+ $(GNOME_APPLETS_CFLAGS) \
$(GIO_CFLAGS) \
+ $(GCC_CFLAGS) \
$(WARN_CFLAGS) \
$(AM_CFLAGS) \
$(NULL)
-libexec_PROGRAMS = trashapplet
+libtrash_applet_la_LDFLAGS = \
+ -module -avoid-version \
+ $(WARN_LDFLAGS) \
+ $(AM_LDFLAGS) \
+ $(NULL)
+
+libtrash_applet_la_LIBADD = \
+ $(GNOME_APPLETS_LIBS) \
+ $(GIO_LIBS) \
+ $(X_LIBS) \
+ $(WARN_LDFLAGS) \
+ $(AM_LDFLAGS) \
+ $(NULL)
-trashapplet_SOURCES = \
+libtrash_applet_la_SOURCES = \
trash-applet.c \
trash-applet.h \
trash-empty.h \
@@ -20,17 +37,6 @@ trashapplet_SOURCES = \
trash-resources.h \
$(NULL)
-trashapplet_LDFLAGS = \
- $(WARN_LDFLAGS) \
- $(AM_LDFLAGS) \
- $(NULL)
-
-trashapplet_LDADD = \
- $(GNOME_APPLETS_LIBS) \
- $(GIO_LIBS) \
- $(X_LIBS) \
- $(NULL)
-
trash-resources.c: trash-resources.gresource.xml $(shell $(GLIB_COMPILE_RESOURCES) --sourcedir=$(srcdir)
--generate-dependencies $(srcdir)/trash-resources.gresource.xml)
$(AM_V_GEN)$(GLIB_COMPILE_RESOURCES) --target=$@ --sourcedir=$(srcdir) --generate --c-name trash $<
diff --git a/trash/src/trash-applet.c b/trash/src/trash-applet.c
index 9a0d4f2..110943c 100644
--- a/trash/src/trash-applet.c
+++ b/trash/src/trash-applet.c
@@ -631,7 +631,7 @@ trash_applet_factory (PanelApplet *applet,
return retval;
}
-PANEL_APPLET_OUT_PROCESS_FACTORY ("TrashAppletFactory",
+PANEL_APPLET_IN_PROCESS_FACTORY ("TrashAppletFactory",
TRASH_TYPE_APPLET,
trash_applet_factory,
NULL)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]