[gnome-applets/wip/segeiger/in-process: 6/10] brightness: 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/10] brightness: switch to in-process applet
- Date: Sun, 11 Sep 2016 15:06:41 +0000 (UTC)
commit fcdb1c5da98dd61cc898e45840907fd41a7b3456
Author: Sebastian Geiger <sbastig gmx net>
Date: Sun Sep 11 13:54:57 2016 +0200
brightness: switch to in-process applet
brightness/Makefile.am | 20 ++++++++------------
.../org.gnome.BrightnessApplet.panel-applet.in.in | 3 ++-
...panel.applet.BrightnessAppletFactory.service.in | 3 ---
brightness/src/Makefile.am | 15 ++++++++++-----
brightness/src/brightness-applet.c | 11 ++++-------
5 files changed, 24 insertions(+), 28 deletions(-)
---
diff --git a/brightness/Makefile.am b/brightness/Makefile.am
index 0dcc0f3..beb5e61 100644
--- a/brightness/Makefile.am
+++ b/brightness/Makefile.am
@@ -2,36 +2,32 @@ NULL =
SUBDIRS = icons src
+APPLET_LOCATION = $(pkglibdir)/$(LIBPANEL_APPLET_API_VERSION)/libbrightness-applet.so
+
appletdir = $(LIBPANEL_APPLET_DIR)
applet_in_files = org.gnome.BrightnessApplet.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.BrightnessAppletFactory.service.in
-service_DATA = $(service_in_files:.service.in=.service)
-
-org.gnome.panel.applet.BrightnessAppletFactory.service: $(service_in_files)
- $(AM_V_GEN)sed \
- -e "s|\@LIBEXECDIR\@|$(libexecdir)|" \
- $< > $@
-
uidir = $(pkgdatadir)/ui
ui_DATA = brightness-applet-menu.xml
-CLEANFILES = $(applet_DATA) $(applet_DATA).in $(service_DATA)
+CLEANFILES = \
+ $(applet_DATA) \
+ $(applet_DATA).in \
+ $(NULL)
EXTRA_DIST = \
org.gnome.BrightnessApplet.panel-applet.in.in \
org.gnome.SettingsDaemon.Power.Screen.xml \
$(ui_DATA) \
- $(service_in_files)
+ $(NULL)
-include $(top_srcdir)/git.mk
diff --git a/brightness/org.gnome.BrightnessApplet.panel-applet.in.in
b/brightness/org.gnome.BrightnessApplet.panel-applet.in.in
index 22b1608..b5c45cf 100644
--- a/brightness/org.gnome.BrightnessApplet.panel-applet.in.in
+++ b/brightness/org.gnome.BrightnessApplet.panel-applet.in.in
@@ -1,6 +1,7 @@
[Applet Factory]
Id=BrightnessAppletFactory
-Location=@LIBEXECDIR@/gnome-brightness-applet
+InProcess=true
+Location=@APPLET_LOCATION@
Name=Brightness Applet Factory
Description=Factory for Brightness Applet
diff --git a/brightness/src/Makefile.am b/brightness/src/Makefile.am
index 03d3bed..08c91f5 100644
--- a/brightness/src/Makefile.am
+++ b/brightness/src/Makefile.am
@@ -2,30 +2,35 @@ NULL =
uidir = $(pkgdatadir)/ui
-libexec_PROGRAMS=gnome-brightness-applet
+brightness_applet_libdir = $(pkglibdir)/$(LIBPANEL_APPLET_API_VERSION)
+brightness_applet_lib_LTLIBRARIES = libbrightness-applet.la
-gnome_brightness_applet_CFLAGS = \
+libbrightness_applet_la_CPPFLAGS = \
-I. \
-I$(srcdir) \
-DBRIGHTNESS_MENU_UI_DIR=\""$(uidir)"\" \
-DGNOMELOCALEDIR=\""$(localedir)"\" \
-DPKG_DATA_DIR=\""$(pkgdatadir)"\" \
+ $(NULL)
+
+libbrightness_applet_la_CFLAGS = \
$(GNOME_APPLETS_CFLAGS) \
$(WARN_CFLAGS) \
$(AM_CFLAGS) \
$(NULL)
-gnome_brightness_applet_SOURCES = \
+libbrightness_applet_la_SOURCES = \
$(BUILT_SOURCES) \
brightness-applet.c \
$(NULL)
-gnome_brightness_applet_LDFLAGS = \
+libbrightness_applet_la_LDFLAGS = \
+ -avoid-version \
$(WARN_LDFLAGS) \
$(AM_LDFLAGS) \
$(NULL)
-gnome_brightness_applet_LDADD = \
+libbrightness_applet_la_LIBADD = \
$(GNOME_APPLETS_LIBS) \
$(NULL)
diff --git a/brightness/src/brightness-applet.c b/brightness/src/brightness-applet.c
index f8754c5..65b8234 100644
--- a/brightness/src/brightness-applet.c
+++ b/brightness/src/brightness-applet.c
@@ -883,10 +883,7 @@ gpm_applet_cb (PanelApplet *_applet, const gchar *iid, gpointer data)
/**
* this generates a main with a applet factory
**/
-PANEL_APPLET_OUT_PROCESS_FACTORY
- (/* the factory iid */
- GPM_BRIGHTNESS_APPLET_FACTORY_ID,
- /* generates brighness applets instead of regular gnome applets */
- GPM_TYPE_BRIGHTNESS_APPLET,
- /* our callback (with no user data) */
- gpm_applet_cb, NULL);
+PANEL_APPLET_IN_PROCESS_FACTORY (GPM_BRIGHTNESS_APPLET_FACTORY_ID,
+ GPM_TYPE_BRIGHTNESS_APPLET,
+ gpm_applet_cb,
+ NULL);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]