[gnome-applets] stickynotes: switch to in-process applet



commit a02d4db98a3e766a5478089438a6631959078e3e
Author: Sebastian Geiger <sbastig gmx net>
Date:   Sun Aug 21 15:21:26 2016 +0200

    stickynotes: switch to in-process applet

 stickynotes/Makefile.am                            |   30 ++++++++-----------
 ...me.applets.StickyNotesApplet.panel-applet.in.in |    3 +-
 ...anel.applet.StickyNotesAppletFactory.service.in |    3 --
 stickynotes/src/Makefile.am                        |   22 ++++++++------
 stickynotes/src/stickynotes_applet.c               |    6 ++-
 5 files changed, 32 insertions(+), 32 deletions(-)
---
diff --git a/stickynotes/Makefile.am b/stickynotes/Makefile.am
index 7527d2c..05a2de8 100644
--- a/stickynotes/Makefile.am
+++ b/stickynotes/Makefile.am
@@ -2,6 +2,8 @@ NULL =
 
 SUBDIRS = help pixmaps src
 
+APPLET_LOCATION=$(pkglibdir)/$(LIBPANEL_APPLET_API_VERSION)/libsticky-notes-applet.so
+
 ui_files = stickynotes-applet-menu.xml \
        stickynotes-note-menu.xml
 builder_files = stickynotes-note.ui \
@@ -10,7 +12,6 @@ builder_files = stickynotes-note.ui \
        stickynotes-preferences.ui \
        stickynotes-properties.ui
 applet_in_files = org.gnome.applets.StickyNotesApplet.panel-applet.in
-service_in_files = org.gnome.panel.applet.StickyNotesAppletFactory.service.in
 gsettings_schemas_in_in = org.gnome.gnome-applets.stickynotes.gschema.xml.in.in
 
 if BUILD_STICKYNOTES_APPLET
@@ -36,33 +37,28 @@ 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_DATA = $(service_in_files:.service.in=.service)
-
-org.gnome.panel.applet.StickyNotesAppletFactory.service: $(service_in_files)
-       $(AM_V_GEN)sed \
-            -e "s|\@LIBEXECDIR\@|$(libexecdir)|" \
-            $< > $@
-
-CLEANFILES = $(applet_DATA) $(applet_DATA).in $(service_DATA) \
+CLEANFILES = \
+       $(applet_DATA) \
+       $(applet_DATA).in \
        $(gsettings_SCHEMAS_in) \
        $(gsettings_SCHEMAS) \
-       *.gschema.valid
+       *.gschema.valid \
+       $(NULL)
 
 endif
 
 EXTRA_DIST = \
        $(gsettings_schemas_in_in) \
-            $(builder_files) \
-            $(ui_files) \
-            $(schemas_in_files) \
-             $(service_in_files) \
-            org.gnome.applets.StickyNotesApplet.panel-applet.in.in
+       $(builder_files) \
+       $(ui_files) \
+       $(schemas_in_files) \
+       org.gnome.applets.StickyNotesApplet.panel-applet.in.in \
+       $(NULL)
 
 -include $(top_srcdir)/git.mk
diff --git a/stickynotes/org.gnome.applets.StickyNotesApplet.panel-applet.in.in 
b/stickynotes/org.gnome.applets.StickyNotesApplet.panel-applet.in.in
index 3908767..838bda7 100644
--- a/stickynotes/org.gnome.applets.StickyNotesApplet.panel-applet.in.in
+++ b/stickynotes/org.gnome.applets.StickyNotesApplet.panel-applet.in.in
@@ -1,6 +1,7 @@
 [Applet Factory]
 Id=StickyNotesAppletFactory
-Location=@LIBEXECDIR@/stickynotes_applet
+InProcess=true
+Location=@APPLET_LOCATION@
 _Name=Sticky Notes Applet Factory
 _Description=Sticky Notes Applet Factory
 
diff --git a/stickynotes/src/Makefile.am b/stickynotes/src/Makefile.am
index b38268e..0315274 100644
--- a/stickynotes/src/Makefile.am
+++ b/stickynotes/src/Makefile.am
@@ -2,15 +2,19 @@ NULL =
 
 if BUILD_STICKYNOTES_APPLET
 
-libexec_PROGRAMS = stickynotes_applet
+stickynotes_applet_libdir = $(pkglibdir)/$(LIBPANEL_APPLET_API_VERSION)
+stickynotes_applet_lib_LTLIBRARIES = libsticky-notes-applet.la
 
-stickynotes_applet_CFLAGS = \
-       -DSTICKYNOTES_MENU_UI_DIR=\""$(uidir)"\" \
-       -DGNOMELOCALEDIR=\""$(localedir)"\" \
-       -DGTK_BUILDERDIR=\""$(pkgdatadir)/builder"\" \
-       -DPKG_DATA_DIR=\""$(pkgdatadir)"\" \
+libsticky_notes_applet_la_CPPFLAGS = \
        -I. \
        -I$(srcdir) \
+       -DGNOMELOCALEDIR=\""$(localedir)"\" \
+       -DPKG_DATA_DIR=\""$(pkgdatadir)"\" \
+       -DSTICKYNOTES_MENU_UI_DIR=\""$(uidir)"\" \
+       -DGTK_BUILDERDIR=\""$(pkgdatadir)/builder"\" \
+       $(NULL)
+
+libsticky_notes_applet_la_CFLAGS = \
        $(GNOME_APPLETS_CFLAGS) \
        $(LIBWNCK_CFLAGS) \
        $(XML2_CFLAGS) \
@@ -18,7 +22,7 @@ stickynotes_applet_CFLAGS = \
        $(AM_CFLAGS) \
        $(NULL)
 
-stickynotes_applet_SOURCES = \
+libsticky_notes_applet_la_SOURCES = \
        gsettings.h \
        stickynotes.c \
        stickynotes.h \
@@ -32,12 +36,12 @@ stickynotes_applet_SOURCES = \
        util.h \
        $(NULL)
 
-stickynotes_applet_LDFLAGS = \
+libsticky_notes_applet_la_LDFLAGS = \
        $(WARN_LDFLAGS) \
        $(AM_LDFLAGS) \
        $(NULL)
 
-stickynotes_applet_LDADD = \
+libsticky_notes_applet_la_LIBADD = \
        $(GNOME_APPLETS_LIBS) \
        $(LIBWNCK_LIBS) \
        $(X_LIBS) \
diff --git a/stickynotes/src/stickynotes_applet.c b/stickynotes/src/stickynotes_applet.c
index 1d81b95..7872e81 100644
--- a/stickynotes/src/stickynotes_applet.c
+++ b/stickynotes/src/stickynotes_applet.c
@@ -59,8 +59,10 @@ static gboolean stickynotes_applet_factory(PanelApplet *panel_applet, const gcha
 }
 
 /* Sticky Notes applet factory */
-PANEL_APPLET_OUT_PROCESS_FACTORY("StickyNotesAppletFactory", PANEL_TYPE_APPLET,
-                                stickynotes_applet_factory, NULL)
+PANEL_APPLET_IN_PROCESS_FACTORY("StickyNotesAppletFactory",
+                                PANEL_TYPE_APPLET,
+                                stickynotes_applet_factory,
+                                NULL)
 
 /* colorshift a pixbuf */
 static void


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