[gnome-applets/wip/segeiger/in-process: 7/25] geyes: switch to in-process applet



commit 91a2a0ed326302f927382c74870044a6a85eb5a7
Author: Sebastian Geiger <sbastig gmx net>
Date:   Thu Sep 8 10:54:55 2016 +0200

    geyes: switch to in-process applet

 geyes/Makefile.am                                  |   13 +++----------
 ...rg.gnome.applets.GeyesApplet.panel-applet.in.in |    3 ++-
 ...nome.panel.applet.GeyesAppletFactory.service.in |    3 ---
 geyes/src/Makefile.am                              |   19 ++++++++++++-------
 geyes/src/geyes.c                                  |    8 ++++----
 5 files changed, 21 insertions(+), 25 deletions(-)
---
diff --git a/geyes/Makefile.am b/geyes/Makefile.am
index df21681..a3c3b58 100644
--- a/geyes/Makefile.am
+++ b/geyes/Makefile.am
@@ -2,27 +2,20 @@ NULL =
 
 SUBDIRS = help themes src
 
+APPLET_LOCATION = $(pkglibdir)/$(LIBPANEL_APPLET_API_VERSION)/libgeyes-applet.so
+
 appletdir       = $(LIBPANEL_APPLET_DIR)
 applet_in_files = org.gnome.applets.GeyesApplet.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.GeyesAppletFactory.service.in
-service_DATA     = $(service_in_files:.service.in=.service)
-
-org.gnome.panel.applet.GeyesAppletFactory.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/geyes/org.gnome.applets.GeyesApplet.panel-applet.in.in 
b/geyes/org.gnome.applets.GeyesApplet.panel-applet.in.in
index 7be9850..92d2f3f 100644
--- a/geyes/org.gnome.applets.GeyesApplet.panel-applet.in.in
+++ b/geyes/org.gnome.applets.GeyesApplet.panel-applet.in.in
@@ -1,6 +1,7 @@
 [Applet Factory]
 Id=GeyesAppletFactory
-Location=@LIBEXECDIR@/geyes_applet2
+InProcess=true
+Location=@APPLET_LOCATION@
 _Name=Geyes Applet Factory
 _Description=Geyes Applet Factory
 
diff --git a/geyes/src/Makefile.am b/geyes/src/Makefile.am
index d8c5d12..05cb765 100644
--- a/geyes/src/Makefile.am
+++ b/geyes/src/Makefile.am
@@ -2,9 +2,10 @@ NULL =
 
 uidir = $(pkgdatadir)/ui
 
-libexec_PROGRAMS = geyes_applet2
+geyes_appletlibdir = $(pkglibdir)/$(LIBPANEL_APPLET_API_VERSION)
+geyes_appletlib_LTLIBRARIES = libgeyes-applet.la
 
-geyes_applet2_CFLAGS = \
+libgeyes_applet_la_CPPFLAGS = \
        -I. \
        -I$(srcdir) \
        $(GNOME_APPLETS_CFLAGS) \
@@ -12,23 +13,27 @@ geyes_applet2_CFLAGS = \
        -DGEYES_THEMES_DIR=\""$(pkgdatadir)/geyes/"\" \
        -DGEYES_MENU_UI_DIR=\""$(uidir)"\" \
        -DGNOMELOCALEDIR=\""$(localedir)"\" \
+       $(NULL)
+
+libgeyes_applet_la_CFLAGS = \
        $(WARN_CFLAGS) \
        $(AM_CFLAGS) \
        $(NULL)
 
-geyes_applet2_SOURCES = \
+libgeyes_applet_la_SOURCES = \
        geyes.c \
-       themes.c \
        geyes.h \
+       themes.c \
        $(NULL)
 
-geyes_applet2_LDFLAGS = \
+libgeyes_applet_la_LDFLAGS = \
+       -avoid-version \
        $(WARN_LDFLAGS) \
        $(AM_LDFLAGS) \
        $(NULL)
 
-geyes_applet2_LDADD = \
-       $(GNOME_APPLETS_LIBS) \
+libgeyes_applet_la_LIBADD = \
+       $(GNOME_APPLETS_LIBS)\
        $(LIBM) \
        $(NULL)
 
diff --git a/geyes/src/geyes.c b/geyes/src/geyes.c
index 31dbee8..e5a9165 100644
--- a/geyes/src/geyes.c
+++ b/geyes/src/geyes.c
@@ -445,7 +445,7 @@ geyes_applet_factory (PanelApplet *applet,
        return retval;
 }
 
-PANEL_APPLET_OUT_PROCESS_FACTORY ("GeyesAppletFactory",
-                                 PANEL_TYPE_APPLET,
-                                 geyes_applet_factory,
-                                 NULL)
+PANEL_APPLET_IN_PROCESS_FACTORY ("GeyesAppletFactory",
+                                 PANEL_TYPE_APPLET,
+                                 geyes_applet_factory,
+                                 NULL)


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]