summaryrefslogtreecommitdiff
path: root/applets
diff options
context:
space:
mode:
Diffstat (limited to 'applets')
-rw-r--r--applets/brightness/Makefile.am28
-rw-r--r--applets/brightness/brightness-applet.c16
-rw-r--r--applets/brightness/meson.build80
-rw-r--r--applets/brightness/org.mate.BrightnessApplet.mate-panel-applet.desktop.in.in4
-rw-r--r--applets/inhibit/Makefile.am28
-rw-r--r--applets/inhibit/inhibit-applet.c14
-rw-r--r--applets/inhibit/meson.build80
-rw-r--r--applets/inhibit/org.mate.InhibitApplet.mate-panel-applet.desktop.in.in4
-rw-r--r--applets/power-profiles/Makefile.am30
-rw-r--r--applets/power-profiles/meson.build80
-rw-r--r--applets/power-profiles/org.mate.PowerProfilesApplet.mate-panel-applet.desktop.in.in4
-rw-r--r--applets/power-profiles/power-profiles-applet.c14
12 files changed, 275 insertions, 107 deletions
diff --git a/applets/brightness/Makefile.am b/applets/brightness/Makefile.am
index 710223a..f962bb3 100644
--- a/applets/brightness/Makefile.am
+++ b/applets/brightness/Makefile.am
@@ -24,17 +24,34 @@ AM_CPPFLAGS = \
$(WARN_CFLAGS) \
$(NULL)
-libexec_PROGRAMS=mate-brightness-applet
+if APPLETS_INPROCESS
+APPLET_IN_PROCESS = true
+APPLET_LOCATION = $(libdir)/$(PACKAGE)/libmate-brightness-applet.so
-mate_brightness_applet_SOURCES = \
+pkglib_LTLIBRARIES = libmate-brightness-applet.la
+libmate_brightness_applet_la_SOURCES = \
brightness-applet.c \
gpm-common.c \
gpm-common.h
+libmate_brightness_applet_la_LDFLAGS = -module -avoid-version
+libmate_brightness_applet_la_LIBADD = \
+ $(DBUS_LIBS) \
+ $(CAIRO_LIBS) \
+ $(PANEL_LIBS)
+else
+APPLET_IN_PROCESS = false
+APPLET_LOCATION = $(libexecdir)/mate-brightness-applet
+libexec_PROGRAMS = mate-brightness-applet
+mate_brightness_applet_SOURCES = \
+ brightness-applet.c \
+ gpm-common.c \
+ gpm-common.h
mate_brightness_applet_LDADD = \
$(DBUS_LIBS) \
$(CAIRO_LIBS) \
$(PANEL_LIBS)
+endif
appletdir = $(datadir)/mate-panel/applets
applet_in_files = org.mate.BrightnessApplet.mate-panel-applet.desktop.in
@@ -43,12 +60,14 @@ applet_DATA = $(applet_in_files:.mate-panel-applet.desktop.in=.mate-panel-ap
$(applet_DATA): $(applet_in_files)
$(AM_V_GEN) $(MSGFMT) --desktop --keyword=Name --keyword=Description --template $< -d $(top_srcdir)/po -o $@
-$(applet_in_files): $(applet_in_files).in
+$(applet_in_files): $(applet_in_files).in Makefile
$(AM_V_GEN) sed \
- -e "s|\@LIBEXECDIR\@|$(libexecdir)|" \
+ -e "s|\@APPLET_LOCATION\@|$(APPLET_LOCATION)|" \
+ -e "s|\@APPLET_IN_PROCESS\@|$(APPLET_IN_PROCESS)|" \
-e "s|\@VERSION\@|$(PACKAGE_VERSION)|" \
$< > $@
+if !APPLETS_INPROCESS
servicedir = $(datadir)/dbus-1/services
service_in_files = org.mate.panel.applet.BrightnessAppletFactory.service.in
service_DATA = $(service_in_files:.service.in=.service)
@@ -57,6 +76,7 @@ org.mate.panel.applet.BrightnessAppletFactory.service: $(service_in_files)
$(AM_V_GEN)sed \
-e "s|\@LIBEXECDIR\@|$(libexecdir)|" \
$< > $@
+endif
uidir = $(datadir)/mate-power-manager/ui
ui_DATA = brightness-applet-menu.xml
diff --git a/applets/brightness/brightness-applet.c b/applets/brightness/brightness-applet.c
index ff8f1ef..73242bc 100644
--- a/applets/brightness/brightness-applet.c
+++ b/applets/brightness/brightness-applet.c
@@ -1105,12 +1105,24 @@ gpm_applet_cb (MatePanelApplet *_applet, const gchar *iid, gpointer data)
/**
* this generates a main with a applet factory
**/
+#ifdef APPLETS_INPROCESS
+MATE_PANEL_APPLET_IN_PROCESS_FACTORY
+ (/* the factory iid */
+ GPM_BRIGHTNESS_APPLET_FACTORY_ID,
+ /* generates brightness applets instead of regular mate applets */
+ GPM_TYPE_BRIGHTNESS_APPLET,
+ /* the applet name */
+ "BrightnessApplet",
+ /* our callback (with no user data) */
+ gpm_applet_cb, NULL)
+#else
MATE_PANEL_APPLET_OUT_PROCESS_FACTORY
(/* the factory iid */
GPM_BRIGHTNESS_APPLET_FACTORY_ID,
- /* generates brighness applets instead of regular mate applets */
+ /* generates brightness applets instead of regular mate applets */
GPM_TYPE_BRIGHTNESS_APPLET,
/* the applet name */
"BrightnessApplet",
/* our callback (with no user data) */
- gpm_applet_cb, NULL);
+ gpm_applet_cb, NULL)
+#endif
diff --git a/applets/brightness/meson.build b/applets/brightness/meson.build
index a2a7c59..896eef2 100644
--- a/applets/brightness/meson.build
+++ b/applets/brightness/meson.build
@@ -15,39 +15,63 @@ cflags = [
'-DEGG_CONSOLE="GPM_CONSOLE"'
]
-executable('mate-brightness-applet',
- sources: source_files,
- dependencies : [
- gtk,
- glib,
- cairo,
- notify,
- dbus,
- dbusglib,
- matepanel
- ],
- include_directories : config_inc,
- c_args : cflags,
- install : true,
- install_dir: mateexecdir,
-)
-
-# .service files
+if enable_applets_inprocess
+ shared_library('mate-brightness-applet',
+ sources: source_files,
+ dependencies : [
+ gtk,
+ glib,
+ cairo,
+ notify,
+ dbus,
+ dbusglib,
+ matepanel
+ ],
+ include_directories : config_inc,
+ c_args : cflags,
+ install : true,
+ install_dir: join_paths(get_option('libdir'), meson.project_name()),
+ )
+else
+ executable('mate-brightness-applet',
+ sources: source_files,
+ dependencies : [
+ gtk,
+ glib,
+ cairo,
+ notify,
+ dbus,
+ dbusglib,
+ matepanel
+ ],
+ include_directories : config_inc,
+ c_args : cflags,
+ install : true,
+ install_dir: mateexecdir,
+ )
-service_data = configuration_data()
-service_data.set('LIBEXECDIR', join_paths(prefix, get_option('libexecdir')))
+ # .service files
+ service_data = configuration_data()
+ service_data.set('LIBEXECDIR', join_paths(prefix, get_option('libexecdir')))
-configure_file(
- input : 'org.mate.panel.applet.BrightnessAppletFactory.service.in',
- output : 'org.mate.panel.applet.BrightnessAppletFactory.service',
- configuration : service_data,
- install : true,
- install_dir : join_paths(matedatadir, 'dbus-1/services')
-)
+ configure_file(
+ input : 'org.mate.panel.applet.BrightnessAppletFactory.service.in',
+ output : 'org.mate.panel.applet.BrightnessAppletFactory.service',
+ configuration : service_data,
+ install : true,
+ install_dir : join_paths(matedatadir, 'dbus-1/services')
+ )
+endif
desktop_data = configuration_data()
desktop_data.set('VERSION', meson.project_version())
-desktop_data.set('LIBEXECDIR', join_paths(prefix, get_option('libexecdir')))
+if enable_applets_inprocess
+ desktop_data.set('APPLET_IN_PROCESS', 'true')
+ desktop_data.set('APPLET_LOCATION', join_paths(prefix, get_option('libdir'), meson.project_name(), 'libmate-brightness-applet.so'))
+else
+ desktop_data.set('APPLET_IN_PROCESS', 'false')
+ desktop_data.set('APPLET_LOCATION', join_paths(prefix, get_option('libexecdir'), 'mate-brightness-applet'))
+endif
desktop_in_file = configure_file(
input : 'org.mate.BrightnessApplet.mate-panel-applet.desktop.in.in',
output : 'org.mate.BrightnessApplet.mate-panel-applet.desktop.in',
diff --git a/applets/brightness/org.mate.BrightnessApplet.mate-panel-applet.desktop.in.in b/applets/brightness/org.mate.BrightnessApplet.mate-panel-applet.desktop.in.in
index c7c39e2..1b7b929 100644
--- a/applets/brightness/org.mate.BrightnessApplet.mate-panel-applet.desktop.in.in
+++ b/applets/brightness/org.mate.BrightnessApplet.mate-panel-applet.desktop.in.in
@@ -1,6 +1,7 @@
[Applet Factory]
Id=BrightnessAppletFactory
-Location=@LIBEXECDIR@/mate-brightness-applet
+InProcess=@APPLET_IN_PROCESS@
+Location=@APPLET_LOCATION@
Name=Brightness Applet Factory
Description=Factory for Brightness Applet
@@ -10,7 +11,6 @@ Description=Adjusts Laptop panel brightness
# Translators: Do NOT translate or transliterate this text (this is an icon file name)!
Icon=mate-brightness-applet
MateComponentId=OAFIID:MATE_BrightnessApplet
-Platforms=X11;
X-MATE-Bugzilla-Bugzilla=MATE
X-MATE-Bugzilla-Product=mate-power-manager
X-MATE-Bugzilla-Component=applets
diff --git a/applets/inhibit/Makefile.am b/applets/inhibit/Makefile.am
index 42c395b..0bcbd91 100644
--- a/applets/inhibit/Makefile.am
+++ b/applets/inhibit/Makefile.am
@@ -24,31 +24,50 @@ AM_CPPFLAGS = \
$(WARN_CFLAGS) \
$(NULL)
-libexec_PROGRAMS=mate-inhibit-applet
+if APPLETS_INPROCESS
+APPLET_IN_PROCESS = true
+APPLET_LOCATION = $(libdir)/$(PACKAGE)/libmate-inhibit-applet.so
-mate_inhibit_applet_SOURCES = \
+pkglib_LTLIBRARIES = libmate-inhibit-applet.la
+libmate_inhibit_applet_la_SOURCES = \
inhibit-applet.c \
gpm-common.c \
gpm-common.h
+libmate_inhibit_applet_la_LDFLAGS = -module -avoid-version
+libmate_inhibit_applet_la_LIBADD = \
+ $(DBUS_LIBS) \
+ $(CAIRO_LIBS) \
+ $(PANEL_LIBS)
+else
+APPLET_IN_PROCESS = false
+APPLET_LOCATION = $(libexecdir)/mate-inhibit-applet
+libexec_PROGRAMS = mate-inhibit-applet
+mate_inhibit_applet_SOURCES = \
+ inhibit-applet.c \
+ gpm-common.c \
+ gpm-common.h
mate_inhibit_applet_LDADD = \
$(DBUS_LIBS) \
$(CAIRO_LIBS) \
$(PANEL_LIBS)
+endif
appletdir = $(datadir)/mate-panel/applets
applet_in_files = org.mate.InhibitApplet.mate-panel-applet.desktop.in
applet_DATA = $(applet_in_files:.mate-panel-applet.desktop.in=.mate-panel-applet)
-$(applet_in_files): $(applet_in_files).in
+$(applet_in_files): $(applet_in_files).in Makefile
$(AM_V_GEN) sed \
- -e "s|\@LIBEXECDIR\@|$(libexecdir)|" \
+ -e "s|\@APPLET_LOCATION\@|$(APPLET_LOCATION)|" \
+ -e "s|\@APPLET_IN_PROCESS\@|$(APPLET_IN_PROCESS)|" \
-e "s|\@VERSION\@|$(PACKAGE_VERSION)|" \
$< > $@
$(applet_DATA): $(applet_in_files)
$(AM_V_GEN) $(MSGFMT) --desktop --keyword=Name --keyword=Description --template $< -d $(top_srcdir)/po -o $@
+if !APPLETS_INPROCESS
servicedir = $(datadir)/dbus-1/services
service_in_files = org.mate.panel.applet.InhibitAppletFactory.service.in
service_DATA = $(service_in_files:.service.in=.service)
@@ -57,6 +76,7 @@ org.mate.panel.applet.InhibitAppletFactory.service: $(service_in_files)
$(AM_V_GEN)sed \
-e "s|\@LIBEXECDIR\@|$(libexecdir)|" \
$< > $@
+endif
uidir = $(datadir)/mate-power-manager/ui
ui_DATA = inhibit-applet-menu.xml
diff --git a/applets/inhibit/inhibit-applet.c b/applets/inhibit/inhibit-applet.c
index 02f1862..74ddd6e 100644
--- a/applets/inhibit/inhibit-applet.c
+++ b/applets/inhibit/inhibit-applet.c
@@ -528,12 +528,24 @@ gpm_applet_cb (MatePanelApplet *_applet, const gchar *iid, gpointer data)
/**
* this generates a main with a applet factory
**/
+#ifdef APPLETS_INPROCESS
+MATE_PANEL_APPLET_IN_PROCESS_FACTORY
+ (/* the factory iid */
+ GPM_INHIBIT_APPLET_FACTORY_ID,
+ /* generates inhibit applets instead of regular mate applets */
+ GPM_TYPE_INHIBIT_APPLET,
+ /* the applet name */
+ "InhibitApplet",
+ /* our callback (with no user data) */
+ gpm_applet_cb, NULL)
+#else
MATE_PANEL_APPLET_OUT_PROCESS_FACTORY
(/* the factory iid */
GPM_INHIBIT_APPLET_FACTORY_ID,
- /* generates brighness applets instead of regular mate applets */
+ /* generates inhibit applets instead of regular mate applets */
GPM_TYPE_INHIBIT_APPLET,
/* the applet name */
"InhibitApplet",
/* our callback (with no user data) */
gpm_applet_cb, NULL)
+#endif
diff --git a/applets/inhibit/meson.build b/applets/inhibit/meson.build
index f161d3c..98dfbc1 100644
--- a/applets/inhibit/meson.build
+++ b/applets/inhibit/meson.build
@@ -15,39 +15,63 @@ cflags = [
'-DEGG_CONSOLE="GPM_CONSOLE"'
]
-executable('mate-inhibit-applet',
- sources: source_files,
- dependencies : [
- gtk,
- glib,
- cairo,
- notify,
- dbus,
- dbusglib,
- matepanel
- ],
- include_directories : config_inc,
- c_args : cflags,
- install : true,
- install_dir: mateexecdir,
-)
-
-# .service files
+if enable_applets_inprocess
+ shared_library('mate-inhibit-applet',
+ sources: source_files,
+ dependencies : [
+ gtk,
+ glib,
+ cairo,
+ notify,
+ dbus,
+ dbusglib,
+ matepanel
+ ],
+ include_directories : config_inc,
+ c_args : cflags,
+ install : true,
+ install_dir: join_paths(get_option('libdir'), meson.project_name()),
+ )
+else
+ executable('mate-inhibit-applet',
+ sources: source_files,
+ dependencies : [
+ gtk,
+ glib,
+ cairo,
+ notify,
+ dbus,
+ dbusglib,
+ matepanel
+ ],
+ include_directories : config_inc,
+ c_args : cflags,
+ install : true,
+ install_dir: mateexecdir,
+ )
-service_data = configuration_data()
-service_data.set('LIBEXECDIR', join_paths(prefix, get_option('libexecdir')))
+ # .service files
+ service_data = configuration_data()
+ service_data.set('LIBEXECDIR', join_paths(prefix, get_option('libexecdir')))
-configure_file(
- input : 'org.mate.panel.applet.InhibitAppletFactory.service.in',
- output : 'org.mate.panel.applet.InhibitAppletFactory.service',
- configuration : service_data,
- install : true,
- install_dir : join_paths(matedatadir, 'dbus-1/services')
-)
+ configure_file(
+ input : 'org.mate.panel.applet.InhibitAppletFactory.service.in',
+ output : 'org.mate.panel.applet.InhibitAppletFactory.service',
+ configuration : service_data,
+ install : true,
+ install_dir : join_paths(matedatadir, 'dbus-1/services')
+ )
+endif
desktop_data = configuration_data()
desktop_data.set('VERSION', meson.project_version())
-desktop_data.set('LIBEXECDIR', join_paths(prefix, get_option('libexecdir')))
+if enable_applets_inprocess
+ desktop_data.set('APPLET_IN_PROCESS', 'true')
+ desktop_data.set('APPLET_LOCATION', join_paths(prefix, get_option('libdir'), meson.project_name(), 'libmate-inhibit-applet.so'))
+else
+ desktop_data.set('APPLET_IN_PROCESS', 'false')
+ desktop_data.set('APPLET_LOCATION', join_paths(prefix, get_option('libexecdir'), 'mate-inhibit-applet'))
+endif
desktop_in_file = configure_file(
input : 'org.mate.InhibitApplet.mate-panel-applet.desktop.in.in',
output : 'org.mate.InhibitApplet.mate-panel-applet.desktop.in',
diff --git a/applets/inhibit/org.mate.InhibitApplet.mate-panel-applet.desktop.in.in b/applets/inhibit/org.mate.InhibitApplet.mate-panel-applet.desktop.in.in
index dbf3988..25738ef 100644
--- a/applets/inhibit/org.mate.InhibitApplet.mate-panel-applet.desktop.in.in
+++ b/applets/inhibit/org.mate.InhibitApplet.mate-panel-applet.desktop.in.in
@@ -1,6 +1,7 @@
[Applet Factory]
Id=InhibitAppletFactory
-Location=@LIBEXECDIR@/mate-inhibit-applet
+InProcess=@APPLET_IN_PROCESS@
+Location=@APPLET_LOCATION@
Name=Inhibit Applet Factory
Description=Factory for Inhibit Applet
@@ -10,7 +11,6 @@ Description=Allows user to inhibit automatic power saving
# Translators: Do NOT translate or transliterate this text (this is an icon file name)!
Icon=mate-inhibit-applet
MateComponentId=OAFIID:MATE_InhibitApplet
-Platforms=X11;
X-MATE-Bugzilla-Bugzilla=MATE
X-MATE-Bugzilla-Product=mate-power-manager
X-MATE-Bugzilla-Component=applets
diff --git a/applets/power-profiles/Makefile.am b/applets/power-profiles/Makefile.am
index 40fc70d..c56a817 100644
--- a/applets/power-profiles/Makefile.am
+++ b/applets/power-profiles/Makefile.am
@@ -24,17 +24,34 @@ AM_CPPFLAGS = \
$(WARN_CFLAGS) \
$(NULL)
-libexec_PROGRAMS=mate-power-profiles-applet
+if APPLETS_INPROCESS
+APPLET_IN_PROCESS = true
+APPLET_LOCATION = $(libdir)/$(PACKAGE)/libmate-power-profiles-applet.so
-mate_power_profiles_applet_SOURCES = \
+pkglib_LTLIBRARIES = libmate-power-profiles-applet.la
+libmate_power_profiles_applet_la_SOURCES = \
power-profiles-applet.c \
gpm-common.c \
gpm-common.h
+libmate_power_profiles_applet_la_LDFLAGS = -module -avoid-version
+libmate_power_profiles_applet_la_LIBADD = \
+ $(DBUS_LIBS) \
+ $(CAIRO_LIBS) \
+ $(PANEL_LIBS)
+else
+APPLET_IN_PROCESS = false
+APPLET_LOCATION = $(libexecdir)/mate-power-profiles-applet
-mate_power_profiles_applet_LDADD = \
+libexec_PROGRAMS = mate-power-profiles-applet
+mate_power_profiles_applet_SOURCES = \
+ power-profiles-applet.c \
+ gpm-common.c \
+ gpm-common.h
+mate_power_profiles_applet_LDADD = \
$(DBUS_LIBS) \
$(CAIRO_LIBS) \
$(PANEL_LIBS)
+endif
appletdir = $(datadir)/mate-panel/applets
applet_in_files = org.mate.PowerProfilesApplet.mate-panel-applet.desktop.in
@@ -43,12 +60,14 @@ applet_DATA = $(applet_in_files:.mate-panel-applet.desktop.in=.mate-panel-ap
$(applet_DATA): $(applet_in_files)
$(AM_V_GEN) $(MSGFMT) --desktop --keyword=Name --keyword=Description --template $< -d $(top_srcdir)/po -o $@
-$(applet_in_files): $(applet_in_files).in
+$(applet_in_files): $(applet_in_files).in Makefile
$(AM_V_GEN) sed \
- -e "s|\@LIBEXECDIR\@|$(libexecdir)|" \
+ -e "s|\@APPLET_LOCATION\@|$(APPLET_LOCATION)|" \
+ -e "s|\@APPLET_IN_PROCESS\@|$(APPLET_IN_PROCESS)|" \
-e "s|\@VERSION\@|$(PACKAGE_VERSION)|" \
$< > $@
+if !APPLETS_INPROCESS
servicedir = $(datadir)/dbus-1/services
service_in_files = org.mate.panel.applet.PowerProfilesAppletFactory.service.in
service_DATA = $(service_in_files:.service.in=.service)
@@ -57,6 +76,7 @@ org.mate.panel.applet.PowerProfilesAppletFactory.service: $(service_in_files)
$(AM_V_GEN)sed \
-e "s|\@LIBEXECDIR\@|$(libexecdir)|" \
$< > $@
+endif
uidir = $(datadir)/mate-power-manager/ui
ui_DATA = power-profiles-applet-menu.xml
diff --git a/applets/power-profiles/meson.build b/applets/power-profiles/meson.build
index eef807d..1d16402 100644
--- a/applets/power-profiles/meson.build
+++ b/applets/power-profiles/meson.build
@@ -15,39 +15,63 @@ cflags = [
'-DEGG_CONSOLE="GPM_CONSOLE"'
]
-executable('mate-power-profiles-applet',
- sources: source_files,
- dependencies : [
- gtk,
- glib,
- cairo,
- notify,
- dbus,
- dbusglib,
- matepanel
- ],
- include_directories : config_inc,
- c_args : cflags,
- install : true,
- install_dir: mateexecdir,
-)
-
-# .service files
+if enable_applets_inprocess
+ shared_library('mate-power-profiles-applet',
+ sources: source_files,
+ dependencies : [
+ gtk,
+ glib,
+ cairo,
+ notify,
+ dbus,
+ dbusglib,
+ matepanel
+ ],
+ include_directories : config_inc,
+ c_args : cflags,
+ install : true,
+ install_dir: join_paths(get_option('libdir'), meson.project_name()),
+ )
+else
+ executable('mate-power-profiles-applet',
+ sources: source_files,
+ dependencies : [
+ gtk,
+ glib,
+ cairo,
+ notify,
+ dbus,
+ dbusglib,
+ matepanel
+ ],
+ include_directories : config_inc,
+ c_args : cflags,
+ install : true,
+ install_dir: mateexecdir,
+ )
-service_data = configuration_data()
-service_data.set('LIBEXECDIR', join_paths(prefix, get_option('libexecdir')))
+ # .service files
+ service_data = configuration_data()
+ service_data.set('LIBEXECDIR', join_paths(prefix, get_option('libexecdir')))
-configure_file(
- input : 'org.mate.panel.applet.PowerProfilesAppletFactory.service.in',
- output : 'org.mate.panel.applet.PowerProfilesAppletFactory.service',
- configuration : service_data,
- install : true,
- install_dir : join_paths(matedatadir, 'dbus-1/services')
-)
+ configure_file(
+ input : 'org.mate.panel.applet.PowerProfilesAppletFactory.service.in',
+ output : 'org.mate.panel.applet.PowerProfilesAppletFactory.service',
+ configuration : service_data,
+ install : true,
+ install_dir : join_paths(matedatadir, 'dbus-1/services')
+ )
+endif
desktop_data = configuration_data()
desktop_data.set('VERSION', meson.project_version())
-desktop_data.set('LIBEXECDIR', join_paths(prefix, get_option('libexecdir')))
+if enable_applets_inprocess
+ desktop_data.set('APPLET_IN_PROCESS', 'true')
+ desktop_data.set('APPLET_LOCATION', join_paths(prefix, get_option('libdir'), meson.project_name(), 'libmate-power-profiles-applet.so'))
+else
+ desktop_data.set('APPLET_IN_PROCESS', 'false')
+ desktop_data.set('APPLET_LOCATION', join_paths(prefix, get_option('libexecdir'), 'mate-power-profiles-applet'))
+endif
desktop_in_file = configure_file(
input : 'org.mate.PowerProfilesApplet.mate-panel-applet.desktop.in.in',
output : 'org.mate.PowerProfilesApplet.mate-panel-applet.desktop.in',
diff --git a/applets/power-profiles/org.mate.PowerProfilesApplet.mate-panel-applet.desktop.in.in b/applets/power-profiles/org.mate.PowerProfilesApplet.mate-panel-applet.desktop.in.in
index 0f9b8e3..b922fb7 100644
--- a/applets/power-profiles/org.mate.PowerProfilesApplet.mate-panel-applet.desktop.in.in
+++ b/applets/power-profiles/org.mate.PowerProfilesApplet.mate-panel-applet.desktop.in.in
@@ -1,6 +1,7 @@
[Applet Factory]
Id=PowerProfilesAppletFactory
-Location=@LIBEXECDIR@/mate-power-profiles-applet
+InProcess=@APPLET_IN_PROCESS@
+Location=@APPLET_LOCATION@
Name=Power Profiles Applet Factory
Description=Factory for Power Profiles Applet
@@ -10,7 +11,6 @@ Description=Adjusts system power profiles
# Translators: Do NOT translate or transliterate this text (this is an icon file name)!
Icon=mate-power-profiles-applet
MateComponentId=OAFIID:MATE_PowerProfilesApplet
-Platforms=X11;
X-MATE-Bugzilla-Bugzilla=MATE
X-MATE-Bugzilla-Product=mate-power-manager
X-MATE-Bugzilla-Component=applets
diff --git a/applets/power-profiles/power-profiles-applet.c b/applets/power-profiles/power-profiles-applet.c
index 87e2758..7b3c06d 100644
--- a/applets/power-profiles/power-profiles-applet.c
+++ b/applets/power-profiles/power-profiles-applet.c
@@ -681,12 +681,24 @@ gpm_applet_cb (MatePanelApplet *_applet, const gchar *iid, gpointer data)
/**
* this generates a main with a applet factory
**/
+#ifdef APPLETS_INPROCESS
+MATE_PANEL_APPLET_IN_PROCESS_FACTORY
+ (/* the factory iid */
+ GPM_POWER_PROFILES_APPLET_FACTORY_ID,
+ /* generates power profiles applets instead of regular mate applets */
+ GPM_TYPE_POWER_PROFILES_APPLET,
+ /* the applet name */
+ "PowerProfilesApplet",
+ /* our callback (with no user data) */
+ gpm_applet_cb, NULL)
+#else
MATE_PANEL_APPLET_OUT_PROCESS_FACTORY
(/* the factory iid */
GPM_POWER_PROFILES_APPLET_FACTORY_ID,
- /* generates brighness applets instead of regular mate applets */
+ /* generates power profiles applets instead of regular mate applets */
GPM_TYPE_POWER_PROFILES_APPLET,
/* the applet name */
"PowerProfilesApplet",
/* our callback (with no user data) */
gpm_applet_cb, NULL)
+#endif