[gnome-applets/wip/segeiger/in-process: 9/25] drivemount: switch to in-process applet



commit b71652b77aa2e0b8ee149ef39822130bb950bf41
Author: Sebastian Geiger <sbastig gmx net>
Date:   Thu Sep 8 11:29:32 2016 +0200

    drivemount: switch to in-process applet

 drivemount/Makefile.am                             |   13 +++----------
 ...ome.applets.DriveMountApplet.panel-applet.in.in |    3 ++-
 ...panel.applet.DriveMountAppletFactory.service.in |    3 ---
 drivemount/src/Makefile.am                         |   15 ++++++++++-----
 drivemount/src/drivemount.c                        |    7 ++++---
 5 files changed, 19 insertions(+), 22 deletions(-)
---
diff --git a/drivemount/Makefile.am b/drivemount/Makefile.am
index 717ef5a..23ff099 100644
--- a/drivemount/Makefile.am
+++ b/drivemount/Makefile.am
@@ -2,27 +2,20 @@ NULL =
 
 SUBDIRS = help src
 
+APPLET_LOCATION = $(pkglibdir)/$(LIBPANEL_APPLET_API_VERSION)/libdrive-mount-applet.so
+
 appletdir       = $(LIBPANEL_APPLET_DIR)
 applet_in_files = org.gnome.applets.DriveMountApplet.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.DriveMountAppletFactory.service.in
-service_DATA     = $(service_in_files:.service.in=.service)
-
-org.gnome.panel.applet.DriveMountAppletFactory.service: $(service_in_files)
-       $(AM_V_GEN)sed \
-            -e "s|\@LIBEXECDIR\@|$(libexecdir)|" \
-            $< > $@
-
 uidir = $(pkgdatadir)/ui
 ui_DATA = drivemount-applet-menu.xml
 
diff --git a/drivemount/org.gnome.applets.DriveMountApplet.panel-applet.in.in 
b/drivemount/org.gnome.applets.DriveMountApplet.panel-applet.in.in
index aaa2afd..74052fe 100644
--- a/drivemount/org.gnome.applets.DriveMountApplet.panel-applet.in.in
+++ b/drivemount/org.gnome.applets.DriveMountApplet.panel-applet.in.in
@@ -1,6 +1,7 @@
 [Applet Factory]
 Id=DriveMountAppletFactory
-Location=@LIBEXECDIR@/drivemount_applet2
+InProcess=true
+Location=@APPLET_LOCATION@
 _Name=Drive Mount Applet Factory
 _Description=Factory for drive mount applet
 
diff --git a/drivemount/src/Makefile.am b/drivemount/src/Makefile.am
index 44e6b14..ad1f837 100644
--- a/drivemount/src/Makefile.am
+++ b/drivemount/src/Makefile.am
@@ -2,20 +2,24 @@ NULL =
 
 uidir = $(pkgdatadir)/ui
 
-libexec_PROGRAMS = drivemount_applet2
+drivemount_applet_libdir = $(pkglibdir)/$(LIBPANEL_APPLET_API_VERSION)
+drivemount_applet_lib_LTLIBRARIES = libdrive-mount-applet.la
 
-drivemount_applet2_CFLAGS = \
+libdrive_mount_applet_la_CPPFLAGS = \
        -I. \
        -I$(srcdir) \
        -DDRIVEMOUNT_MENU_UI_DIR=\""$(uidir)"\" \
        -DGNOMELOCALEDIR=\""$(localedir)"\" \
+       $(NULL)
+
+libdrive_mount_applet_la_CFLAGS = \
        $(GNOME_APPLETS_CFLAGS) \
        $(GIO_UNIX_CFLAGS) \
        $(WARN_CFLAGS) \
        $(AM_CFLAGS) \
        $(NULL)
 
-drivemount_applet2_SOURCES = \
+libdrive_mount_applet_la_SOURCES = \
        drivemount.c \
        drive-list.c \
        drive-list.h \
@@ -23,12 +27,13 @@ drivemount_applet2_SOURCES = \
        drive-button.h \
        $(NULL)
 
-drivemount_applet2_LDFLAGS = \
+libdrive_mount_applet_la_LDFLAGS = \
+       -avoid-version \
        $(WARN_LDFLAGS) \
        $(AM_LDFLAGS) \
        $(NULL)
 
-drivemount_applet2_LDADD = \
+libdrive_mount_applet_la_LIBADD = \
        $(GNOME_APPLETS_LIBS) \
        $(GIO_UNIX_LIBS) \
        $(NULL)
diff --git a/drivemount/src/drivemount.c b/drivemount/src/drivemount.c
index 47286ac..cb2cf6a 100644
--- a/drivemount/src/drivemount.c
+++ b/drivemount/src/drivemount.c
@@ -197,6 +197,7 @@ applet_factory (PanelApplet *applet,
     return ret;
 }
 
-PANEL_APPLET_OUT_PROCESS_FACTORY (factory_iid,
-                                 PANEL_TYPE_APPLET,
-                                 applet_factory, NULL)
+PANEL_APPLET_IN_PROCESS_FACTORY (factory_iid,
+                                 PANEL_TYPE_APPLET,
+                                 applet_factory,
+                                 NULL)


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