summaryrefslogtreecommitdiff
path: root/charpick
diff options
context:
space:
mode:
Diffstat (limited to 'charpick')
-rw-r--r--charpick/Makefile.am54
-rw-r--r--charpick/charpick.c14
-rw-r--r--charpick/org.mate.applets.CharpickerApplet.mate-panel-applet.desktop.in.in2
-rw-r--r--charpick/org.mate.panel.applet.CharpickerAppletFactory.service.in2
4 files changed, 53 insertions, 19 deletions
diff --git a/charpick/Makefile.am b/charpick/Makefile.am
index a9665974..000b3463 100644
--- a/charpick/Makefile.am
+++ b/charpick/Makefile.am
@@ -1,11 +1,10 @@
NULL =
-APPLET_LOCATION = $(libdir)/mate-applets/libmate-charpick-applet.so
-
SUBDIRS = help
-mate_charpick_applet_libdir= $(pkglibdir)
-mate_charpick_applet_lib_LTLIBRARIES=libmate-charpick-applet.la
+applet_in_files = org.mate.applets.CharpickerApplet.mate-panel-applet.desktop.in
+service_in_files = org.mate.panel.applet.CharpickerAppletFactory.service.in
+gschema_in_files = org.mate.panel.applet.charpick.gschema.xml.in
AM_CPPFLAGS = \
-I. \
@@ -16,19 +15,48 @@ AM_CPPFLAGS = \
$(GUCHARMAP_CFLAGS) \
$(NULL)
-libmate_charpick_applet_la_SOURCES = \
+BUILT_SOURCES = \
+ charpick-resources.c \
+ charpick-resources.h \
+ $(NULL)
+APPLET_SOURCES = \
charpick.c \
charpick.h \
properties.c \
- charpick-resources.c \
- charpick-resources.h \
$(NULL)
-libmate_charpick_applet_la_LIBADD = \
+APPLET_LIBS = \
$(MATE_APPLETS4_LIBS) \
$(GUCHARMAP_LIBS) \
$(NULL)
+if ENABLE_IN_PROCESS
+APPLET_LOCATION = $(pkglibdir)/libmate-charpick-applet.so
+
+pkglib_LTLIBRARIES = libmate-charpick-applet.la
+nodist_libmate_charpick_applet_la_SOURCES = $(BUILT_SOURCES)
+libmate_charpick_applet_la_SOURCES = $(APPLET_SOURCES)
+libmate_charpick_applet_la_CFLAGS = $(AM_CFLAGS)
+libmate_charpick_applet_la_LDFLAGS = -module -avoid-version
+libmate_charpick_applet_la_LIBADD = $(APPLET_LIBS)
+else !ENABLE_IN_PROCESS
+APPLET_LOCATION = $(libexecdir)/mate-charpick-applet
+
+libexec_PROGRAMS = mate-charpick-applet
+nodist_mate_charpick_applet_SOURCES = $(BUILT_SOURCES)
+mate_charpick_applet_SOURCES = $(APPLET_SOURCES)
+mate_charpick_applet_CFLAGS = $(AM_CFLAGS)
+mate_charpick_applet_LDADD = $(APPLET_LIBS)
+
+servicedir = $(datadir)/dbus-1/services
+service_DATA = $(service_in_files:.service.in=.service)
+
+$(service_DATA): $(service_in_files) Makefile
+ $(AM_V_GEN)sed \
+ -e "s|\@APPLET_LOCATION\@|$(APPLET_LOCATION)|" \
+ $< > $@
+endif !ENABLE_IN_PROCESS
+
charpick-resources.c: charpick-resources.gresource.xml $(shell $(GLIB_COMPILE_RESOURCES) --sourcedir=$(srcdir) --generate-dependencies $(srcdir)/charpick-resources.gresource.xml)
$(AM_V_GEN)$(GLIB_COMPILE_RESOURCES) --target=$@ --sourcedir=$(srcdir) --generate --c-name charpick $<
@@ -36,32 +64,34 @@ charpick-resources.h: charpick-resources.gresource.xml $(shell $(GLIB_COMPILE_RE
$(AM_V_GEN)$(GLIB_COMPILE_RESOURCES) --target=$@ --sourcedir=$(srcdir) --generate --c-name charpick $<
appletdir = $(datadir)/mate-panel/applets
-applet_in_files = org.mate.applets.CharpickerApplet.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 Makefile
$(AM_V_GEN)sed \
-e "s|\@APPLET_LOCATION\@|$(APPLET_LOCATION)|" \
+ -e "s|\@APPLET_IN_PROCESS\@|$(APPLET_IN_PROCESS)|" \
-e "s|\@VERSION\@|$(PACKAGE_VERSION)|" \
$< > $@
$(applet_DATA): $(applet_in_files) Makefile
$(AM_V_GEN) $(MSGFMT) --desktop --keyword=Name --keyword=Description --template $< -d $(top_srcdir)/po -o $@
-charpick_gschema_in_files = org.mate.panel.applet.charpick.gschema.xml.in
-gsettings_SCHEMAS = $(charpick_gschema_in_files:.xml.in=.xml)
+gsettings_SCHEMAS = $(gschema_in_files:.xml.in=.xml)
@GSETTINGS_RULES@
CLEANFILES = \
$(applet_DATA) \
$(applet_in_files) \
+ $(service_DATA) \
$(gsettings_SCHEMAS) \
+ $(BUILT_SOURCES) \
*.gschema.valid \
$(NULL)
EXTRA_DIST = \
$(applet_in_files).in \
- $(charpick_gschema_in_files) \
+ $(service_in_files) \
+ $(gschema_in_files) \
charpick-applet-menu.xml \
charpick-resources.gresource.xml \
$(NULL)
diff --git a/charpick/charpick.c b/charpick/charpick.c
index 952cfd23..932c6919 100644
--- a/charpick/charpick.c
+++ b/charpick/charpick.c
@@ -764,6 +764,10 @@ charpicker_applet_fill (MatePanelApplet *applet)
gchar *string;
GtkActionGroup *action_group;
+#ifndef ENABLE_IN_PROCESS
+ g_set_application_name (_("Character Palette"));
+#endif
+
gtk_window_set_default_icon_name ("accessories-character-map");
mate_panel_applet_set_flags (applet, MATE_PANEL_APPLET_EXPAND_MINOR);
@@ -870,9 +874,9 @@ charpicker_applet_factory (MatePanelApplet *applet,
return retval;
}
-MATE_PANEL_APPLET_IN_PROCESS_FACTORY ("CharpickerAppletFactory",
- PANEL_TYPE_APPLET,
- "char-palette",
- charpicker_applet_factory,
- NULL)
+PANEL_APPLET_FACTORY ("CharpickerAppletFactory",
+ PANEL_TYPE_APPLET,
+ "char-palette",
+ charpicker_applet_factory,
+ NULL)
diff --git a/charpick/org.mate.applets.CharpickerApplet.mate-panel-applet.desktop.in.in b/charpick/org.mate.applets.CharpickerApplet.mate-panel-applet.desktop.in.in
index 97febf6f..d8713c17 100644
--- a/charpick/org.mate.applets.CharpickerApplet.mate-panel-applet.desktop.in.in
+++ b/charpick/org.mate.applets.CharpickerApplet.mate-panel-applet.desktop.in.in
@@ -1,7 +1,7 @@
[Applet Factory]
Id=CharpickerAppletFactory
Location=@APPLET_LOCATION@
-InProcess=true
+InProcess=@APPLET_IN_PROCESS@
Name=Charpicker Applet Factory
Description=Charpicker Applet Factory
diff --git a/charpick/org.mate.panel.applet.CharpickerAppletFactory.service.in b/charpick/org.mate.panel.applet.CharpickerAppletFactory.service.in
index 531430b2..417b1bd4 100644
--- a/charpick/org.mate.panel.applet.CharpickerAppletFactory.service.in
+++ b/charpick/org.mate.panel.applet.CharpickerAppletFactory.service.in
@@ -1,3 +1,3 @@
[D-BUS Service]
Name=org.mate.panel.applet.CharpickerAppletFactory
-Exec=@LIBEXECDIR@/mate-charpick-applet
+Exec=@APPLET_LOCATION@