[gnome-applets/wip/segeiger/in-process: 7/9] cpufreq: 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: 7/9] cpufreq: switch to in-process applet
- Date: Thu, 8 Sep 2016 10:15:08 +0000 (UTC)
commit 2c46d46daaafea630d3967fcc1620c9cf2451084
Author: Sebastian Geiger <sbastig gmx net>
Date: Thu Sep 8 11:57:48 2016 +0200
cpufreq: switch to in-process applet
cpufreq/Makefile.am | 13 +---
....gnome.applets.CPUFreqApplet.panel-applet.in.in | 3 +-
...me.panel.applet.CPUFreqAppletFactory.service.in | 3 -
cpufreq/src/Makefile.am | 79 ++++++++++++-------
cpufreq/src/cpufreq-applet.c | 8 +-
5 files changed, 59 insertions(+), 47 deletions(-)
---
diff --git a/cpufreq/Makefile.am b/cpufreq/Makefile.am
index c4d426d..f557684 100644
--- a/cpufreq/Makefile.am
+++ b/cpufreq/Makefile.am
@@ -16,27 +16,20 @@ gsettings_SCHEMAS = $(gsettings_schemas_in:.xml.in=.xml)
@GSETTINGS_RULES@
+APPLET_LOCATION = $(pkglibdir)/$(LIBPANEL_APPLET_API_VERSION)/libcpu-frequency-applet.so
+
appletdir = $(LIBPANEL_APPLET_DIR)
applet_in_files = org.gnome.applets.CPUFreqApplet.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.CPUFreqAppletFactory.service.in
-service_DATA = $(service_in_files:.service.in=.service)
-
-org.gnome.panel.applet.CPUFreqAppletFactory.service: $(service_in_files)
- $(AM_V_GEN)sed \
- -e "s|\@LIBEXECDIR\@|$(libexecdir)|" \
- $< > $@
-
builderdir = $(pkgdatadir)/builder
builder_DATA = cpufreq-preferences.ui
diff --git a/cpufreq/org.gnome.applets.CPUFreqApplet.panel-applet.in.in
b/cpufreq/org.gnome.applets.CPUFreqApplet.panel-applet.in.in
index a2d8d36..b6c0364 100644
--- a/cpufreq/org.gnome.applets.CPUFreqApplet.panel-applet.in.in
+++ b/cpufreq/org.gnome.applets.CPUFreqApplet.panel-applet.in.in
@@ -1,6 +1,7 @@
[Applet Factory]
Id=CPUFreqAppletFactory
-Location=@LIBEXECDIR@/cpufreq-applet
+InProcess=true
+Location=@APPLET_LOCATION@
_Name=CPU Frequency Scaling Monitor
_Description=Monitor the CPU Frequency Scaling
diff --git a/cpufreq/src/Makefile.am b/cpufreq/src/Makefile.am
index cf4ae3e..fbaf12d 100644
--- a/cpufreq/src/Makefile.am
+++ b/cpufreq/src/Makefile.am
@@ -6,46 +6,67 @@ endif
SUBDIRS = $(selector_SUBDIR)
-cpufreq_applet_CFLAGS = \
- -DCPUFREQ_MENU_UI_DIR=\""$(pkgdatadir)/ui"\" \
+cpu_frequency_applet_libdir = $(pkglibdir)/$(LIBPANEL_APPLET_API_VERSION)
+cpu_frequency_applet_lib_LTLIBRARIES = libcpu-frequency-applet.la
+
+libcpu_frequency_applet_la_CPPFLAGS = \
+ -DCPUFREQ_MENU_UI_DIR=\""$(pkgdatadir)/ui"\" \
-DGNOMELOCALEDIR=\""$(localedir)"\" \
-DCPUFREQ_PIXMAPS_DIR=\""$(pkgdatadir)/cpufreq-applet/pixmaps"\" \
-DGTK_BUILDERDIR=\""$(pkgdatadir)/builder"\" \
- $(GNOME_APPLETS_CFLAGS) \
- $(LIBGLADE_CFLAGS) \
+ $(NULL)
+
+libcpu_frequency_applet_la_CFLAGS = \
+ $(GNOME_APPLETS_CFLAGS) \
+ $(LIBGLADE_CFLAGS) \
$(DBUS_CFLAGS) \
$(WARN_CFLAGS) \
$(AM_CFLAGS) \
$(NULL)
-libexec_PROGRAMS = cpufreq-applet
-
-if HAVE_LIBCPUFREQ
-cpufreq_files=cpufreq-monitor-libcpufreq.c cpufreq-monitor-libcpufreq.h
-endif
+libcpu_frequency_applet_la_SOURCES = \
+ cpufreq-applet.c \
+ cpufreq-applet.h \
+ cpufreq-utils.c \
+ cpufreq-utils.h \
+ cpufreq-prefs.c \
+ cpufreq-prefs.h \
+ cpufreq-selector.c \
+ cpufreq-selector.h \
+ cpufreq-popup.c \
+ cpufreq-popup.h \
+ cpufreq-monitor.c \
+ cpufreq-monitor.h \
+ cpufreq-monitor-factory.c \
+ cpufreq-monitor-factory.h \
+ cpufreq-monitor-procfs.c \
+ cpufreq-monitor-procfs.h \
+ cpufreq-monitor-sysfs.c \
+ cpufreq-monitor-sysfs.h \
+ cpufreq-monitor-cpuinfo.c \
+ cpufreq-monitor-cpuinfo.h \
+ $(cpufreq_files) \
+ $(NULL)
-cpufreq_applet_SOURCES = \
- cpufreq-applet.c cpufreq-applet.h \
- cpufreq-utils.c cpufreq-utils.h \
- cpufreq-prefs.c cpufreq-prefs.h \
- cpufreq-selector.c cpufreq-selector.h \
- cpufreq-popup.c cpufreq-popup.h \
- cpufreq-monitor.c cpufreq-monitor.h \
- cpufreq-monitor-factory.c cpufreq-monitor-factory.h \
- cpufreq-monitor-procfs.c cpufreq-monitor-procfs.h \
- cpufreq-monitor-sysfs.c cpufreq-monitor-sysfs.h \
- $(cpufreq_files) \
- cpufreq-monitor-cpuinfo.c cpufreq-monitor-cpuinfo.h
-
-cpufreq_applet_LDADD = \
- $(GNOME_APPLETS_LIBS) \
- $(LIBGLADE_LIBS) \
- $(LIBCPUFREQ_LIBS) \
- $(DBUS_LIBS)
-
-cpufreq_applet_LDFLAGS = \
+libcpu_frequency_applet_la_LDFLAGS = \
+ -avoid-version \
$(WARN_LDFLAGS) \
$(AM_LDFLAGS) \
$(NULL)
+libcpu_frequency_applet_la_LIBADD = \
+ $(GNOME_APPLETS_LIBS) \
+ $(LIBGLADE_LIBS) \
+ $(LIBCPUFREQ_LIBS) \
+ $(NULL)
+
+if HAVE_LIBCPUFREQ
+
+cpufreq_files = \
+ cpufreq-monitor-libcpufreq.c \
+ cpufreq-monitor-libcpufreq.h \
+ $(NULL)
+
+endif
+
-include $(top_srcdir)/git.mk
diff --git a/cpufreq/src/cpufreq-applet.c b/cpufreq/src/cpufreq-applet.c
index e7824bf..86100f1 100644
--- a/cpufreq/src/cpufreq-applet.c
+++ b/cpufreq/src/cpufreq-applet.c
@@ -1019,7 +1019,7 @@ cpufreq_applet_factory (CPUFreqApplet *applet, const gchar *iid, gpointer gdata)
return retval;
}
-PANEL_APPLET_OUT_PROCESS_FACTORY ("CPUFreqAppletFactory",
- CPUFREQ_TYPE_APPLET,
- (PanelAppletFactoryCallback) cpufreq_applet_factory,
- NULL)
+PANEL_APPLET_IN_PROCESS_FACTORY ("CPUFreqAppletFactory",
+ CPUFREQ_TYPE_APPLET,
+ (PanelAppletFactoryCallback) cpufreq_applet_factory,
+ NULL)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]