summaryrefslogtreecommitdiff
path: root/drivemount/src
diff options
context:
space:
mode:
authorlukefromdc <[email protected]>2023-07-11 21:28:01 -0400
committerraveit65 <[email protected]>2023-07-17 02:47:28 +0200
commit08bb8398e0d218daaefdfe95c44940e370802508 (patch)
tree0c567b638dd31d831141a2ca4ef355a406883e08 /drivemount/src
parentf94afff3bd198dca2412a75053e122c55b4b48dd (diff)
downloadmate-applets-08bb8398e0d218daaefdfe95c44940e370802508.tar.bz2
mate-applets-08bb8398e0d218daaefdfe95c44940e370802508.tar.xz
Allow building all applets in or out of process
*Use --enable-in-process selector for in-process builds *Accessx-status: mark as incompatable with wayland *Accessx-status: Fix in-process runtime warning *Stickynote, Geyes: style fixes
Diffstat (limited to 'drivemount/src')
-rw-r--r--drivemount/src/Makefile.am30
-rw-r--r--drivemount/src/drivemount.c13
2 files changed, 30 insertions, 13 deletions
diff --git a/drivemount/src/Makefile.am b/drivemount/src/Makefile.am
index a5b60c1e..a887b1e5 100644
--- a/drivemount/src/Makefile.am
+++ b/drivemount/src/Makefile.am
@@ -1,8 +1,5 @@
NULL =
-mate_drivemount_applet_libdir= $(pkglibdir)
-mate_drivemount_applet_lib_LTLIBRARIES=libmate-drivemount-applet.la
-
AM_CPPFLAGS = \
-I. \
-I$(srcdir) \
@@ -11,18 +8,34 @@ AM_CPPFLAGS = \
$(MATE_APPLETS4_CFLAGS) \
$(NULL)
-libmate_drivemount_applet_la_SOURCES = \
+BUILT_SOURCES = \
+ drivemount-resources.c \
+ drivemount-resources.h \
+ $(NULL)
+APPLET_SOURCES = \
drivemount.c \
drive-list.c \
drive-list.h \
drive-button.c \
drive-button.h \
- drivemount-resources.c \
- drivemount-resources.h \
$(NULL)
-libmate_drivemount_applet_la_LIBADD = \
- $(MATE_APPLETS4_LIBS)
+APPLET_LIBS = $(MATE_APPLETS4_LIBS)
+
+if ENABLE_IN_PROCESS
+pkglib_LTLIBRARIES = libmate-drivemount-applet.la
+nodist_libmate_drivemount_applet_la_SOURCES = $(BUILT_SOURCES)
+libmate_drivemount_applet_la_SOURCES = $(APPLET_SOURCES)
+libmate_drivemount_applet_la_CFLAGS = $(AM_CFLAGS)
+libmate_drivemount_applet_la_LDFLAGS = -module -avoid-version
+libmate_drivemount_applet_la_LIBADD = $(APPLET_LIBS)
+else !ENABLE_IN_PROCESS
+libexec_PROGRAMS = mate-drivemount-applet
+nodist_mate_drivemount_applet_SOURCES = $(BUILT_SOURCES)
+mate_drivemount_applet_SOURCES = $(APPLET_SOURCES)
+mate_drivemount_applet_CFLAGS = $(AM_CFLAGS)
+mate_drivemount_applet_LDADD = $(APPLET_LIBS)
+endif !ENABLE_IN_PROCESS
drivemount-resources.c: ../data/drivemount-resources.gresource.xml $(shell $(GLIB_COMPILE_RESOURCES) --sourcedir=$(srcdir)/../data/ --generate-dependencies $(srcdir)/../data/drivemount-resources.gresource.xml)
$(AM_V_GEN)$(GLIB_COMPILE_RESOURCES) --target=$@ --sourcedir=$(srcdir)/../data/ --generate --c-name drivemount $<
@@ -31,6 +44,7 @@ drivemount-resources.h: ../data/drivemount-resources.gresource.xml $(shell $(GLI
$(AM_V_GEN)$(GLIB_COMPILE_RESOURCES) --target=$@ --sourcedir=$(srcdir)/../data/ --generate --c-name drivemount $<
CLEANFILES = \
+ $(BUILT_SOURCES) \
$(NULL)
-include $(top_srcdir)/git.mk
diff --git a/drivemount/src/drivemount.c b/drivemount/src/drivemount.c
index 6b10f9fa..408c7645 100644
--- a/drivemount/src/drivemount.c
+++ b/drivemount/src/drivemount.c
@@ -179,6 +179,10 @@ applet_factory (MatePanelApplet *applet,
GtkActionGroup *action_group;
if (!strcmp (iid, drivemount_iid)) {
+#ifndef ENABLE_IN_PROCESS
+ g_set_application_name (_("Disk Mounter"));
+#endif
+
gtk_window_set_default_icon_name ("media-floppy");
mate_panel_applet_set_flags (applet, MATE_PANEL_APPLET_EXPAND_MINOR);
@@ -221,8 +225,7 @@ applet_factory (MatePanelApplet *applet,
return ret;
}
-MATE_PANEL_APPLET_IN_PROCESS_FACTORY (factory_iid,
- PANEL_TYPE_APPLET,
- "Drive-Mount-Applet",
- applet_factory, NULL)
-
+PANEL_APPLET_FACTORY (factory_iid,
+ PANEL_TYPE_APPLET,
+ "Drive-Mount-Applet",
+ applet_factory, NULL)