diff options
author | lukefromdc <[email protected]> | 2023-07-11 21:28:01 -0400 |
---|---|---|
committer | raveit65 <[email protected]> | 2023-07-17 02:47:28 +0200 |
commit | 08bb8398e0d218daaefdfe95c44940e370802508 (patch) | |
tree | 0c567b638dd31d831141a2ca4ef355a406883e08 /mateweather | |
parent | f94afff3bd198dca2412a75053e122c55b4b48dd (diff) | |
download | mate-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 'mateweather')
-rw-r--r-- | mateweather/data/Makefile.am | 24 | ||||
-rw-r--r-- | mateweather/data/org.mate.applets.MateWeatherApplet.mate-panel-applet.desktop.in.in | 2 | ||||
-rw-r--r-- | mateweather/data/org.mate.panel.applet.MateWeatherAppletFactory.service.in | 3 | ||||
-rw-r--r-- | mateweather/src/Makefile.am | 42 | ||||
-rw-r--r-- | mateweather/src/main.c | 2 | ||||
-rw-r--r-- | mateweather/src/mateweather-applet.c | 4 |
6 files changed, 58 insertions, 19 deletions
diff --git a/mateweather/data/Makefile.am b/mateweather/data/Makefile.am index a6bf5ceb..d200608b 100644 --- a/mateweather/data/Makefile.am +++ b/mateweather/data/Makefile.am @@ -1,29 +1,47 @@ -APPLET_LOCATION = $(libdir)/mate-applets/libmateweather-applet.so +applet_in_files = org.mate.applets.MateWeatherApplet.mate-panel-applet.desktop.in +service_in_files = org.mate.panel.applet.MateWeatherAppletFactory.service.in + +if ENABLE_IN_PROCESS +APPLET_LOCATION = $(pkglibdir)/libmateweather-applet.so +else !ENABLE_IN_PROCESS +APPLET_LOCATION = $(libexecdir)/mateweather-applet +endif !ENABLE_IN_PROCESS appletdir = $(datadir)/mate-panel/applets -applet_in_files = org.mate.applets.MateWeatherApplet.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 $@ +if !ENABLE_IN_PROCESS +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 CLEANFILES = \ $(applet_DATA) \ - $(applet_in_files) + $(applet_in_files) \ + $(service_DATA) \ + $(NULL) EXTRA_DIST = \ mateweather-applet-menu.xml \ mateweather-dialog.ui \ mateweather-resources.gresource.xml \ $(applet_in_files:=.in) \ + $(service_in_files) \ $(ui_DATA) -include $(top_srcdir)/git.mk diff --git a/mateweather/data/org.mate.applets.MateWeatherApplet.mate-panel-applet.desktop.in.in b/mateweather/data/org.mate.applets.MateWeatherApplet.mate-panel-applet.desktop.in.in index 99b4dff4..959d019a 100644 --- a/mateweather/data/org.mate.applets.MateWeatherApplet.mate-panel-applet.desktop.in.in +++ b/mateweather/data/org.mate.applets.MateWeatherApplet.mate-panel-applet.desktop.in.in @@ -1,6 +1,6 @@ [Applet Factory] Id=MateWeatherAppletFactory -InProcess=true +InProcess=@APPLET_IN_PROCESS@ Location=@APPLET_LOCATION@ Name=Mateweather Applet Factory Description=Factory for creating the weather applet. diff --git a/mateweather/data/org.mate.panel.applet.MateWeatherAppletFactory.service.in b/mateweather/data/org.mate.panel.applet.MateWeatherAppletFactory.service.in new file mode 100644 index 00000000..493a544c --- /dev/null +++ b/mateweather/data/org.mate.panel.applet.MateWeatherAppletFactory.service.in @@ -0,0 +1,3 @@ +[D-BUS Service] +Name=org.mate.panel.applet.MateWeatherAppletFactory +Exec=@APPLET_LOCATION@ diff --git a/mateweather/src/Makefile.am b/mateweather/src/Makefile.am index d032a98f..e30affd6 100644 --- a/mateweather/src/Makefile.am +++ b/mateweather/src/Makefile.am @@ -1,8 +1,5 @@ NULL = -mateweather_applet_libdir= $(pkglibdir) -mateweather_applet_lib_LTLIBRARIES=libmateweather-applet.la - AM_CPPFLAGS = \ -I$(srcdir) \ -I$(top_srcdir) \ @@ -12,24 +9,41 @@ AM_CPPFLAGS = \ $(LIBMATEWEATHER_CFLAGS) \ ${WARN_CFLAGS} -libmateweather_applet_la_SOURCES = \ - mateweather.h \ - main.c \ - mateweather-about.c mateweather-about.h \ - mateweather-pref.c mateweather-pref.h \ - mateweather-dialog.c mateweather-dialog.h \ - mateweather-applet.c mateweather-applet.h \ - mateweather-resources.c \ - mateweather-resources.h \ +BUILT_SOURCES = \ + mateweather-resources.c \ + mateweather-resources.h \ + $(NULL) +APPLET_SOURCES = \ + mateweather.h \ + main.c \ + mateweather-about.c mateweather-about.h \ + mateweather-pref.c mateweather-pref.h \ + mateweather-dialog.c mateweather-dialog.h \ + mateweather-applet.c mateweather-applet.h \ $(NULL) -libmateweather_applet_la_LIBADD = \ +APPLET_LIBS = \ $(LIBNOTIFY_LIBS) \ $(MATE_APPLETS4_LIBS) \ $(MATE_LIBS2_LIBS) \ - $(LIBMATEWEATHER_LIBS) \ + $(LIBMATEWEATHER_LIBS) \ $(NULL) +if ENABLE_IN_PROCESS +pkglib_LTLIBRARIES = libmateweather-applet.la +nodist_libmateweather_applet_la_SOURCES = $(BUILT_SOURCES) +libmateweather_applet_la_SOURCES = $(APPLET_SOURCES) +libmateweather_applet_la_CFLAGS = $(AM_CFLAGS) +libmateweather_applet_la_LDFLAGS = -module -avoid-version +libmateweather_applet_la_LIBADD = $(APPLET_LIBS) +else !ENABLE_IN_PROCESS +libexec_PROGRAMS = mateweather-applet +nodist_mateweather_applet_SOURCES = $(BUILT_SOURCES) +mateweather_applet_SOURCES = $(APPLET_SOURCES) +mateweather_applet_CFLAGS = $(AM_CFLAGS) +mateweather_applet_LDADD = $(APPLET_LIBS) +endif !ENABLE_IN_PROCESS + mateweather-resources.c: ../data/mateweather-resources.gresource.xml $(shell $(GLIB_COMPILE_RESOURCES) --sourcedir=$(srcdir)/../data/ --generate-dependencies $(srcdir)/../data/mateweather-resources.gresource.xml) $(AM_V_GEN)$(GLIB_COMPILE_RESOURCES) --target=$@ --sourcedir=$(srcdir)/../data/ --generate --c-name mateweather $< diff --git a/mateweather/src/main.c b/mateweather/src/main.c index af128dea..e16ef9e0 100644 --- a/mateweather/src/main.c +++ b/mateweather/src/main.c @@ -54,4 +54,4 @@ static gboolean mateweather_applet_factory(MatePanelApplet* applet, const gchar* return retval; } -MATE_PANEL_APPLET_IN_PROCESS_FACTORY("MateWeatherAppletFactory", PANEL_TYPE_APPLET, "mateweather", mateweather_applet_factory, NULL) +PANEL_APPLET_FACTORY("MateWeatherAppletFactory", PANEL_TYPE_APPLET, "mateweather", mateweather_applet_factory, NULL) diff --git a/mateweather/src/mateweather-applet.c b/mateweather/src/mateweather-applet.c index 48bc7dbe..efb2c308 100644 --- a/mateweather/src/mateweather-applet.c +++ b/mateweather/src/mateweather-applet.c @@ -341,6 +341,10 @@ void mateweather_applet_create (MateWeatherApplet *gw_applet) mate_panel_applet_set_flags (gw_applet->applet, MATE_PANEL_APPLET_EXPAND_MINOR); +#ifndef ENABLE_IN_PROCESS + g_set_application_name (_("Weather Report")); +#endif + gtk_window_set_default_icon_name ("weather-storm"); g_signal_connect (gw_applet->applet, "change-orient", |