From ed185133fa170ee018dfa25e1010b1fcf4238c78 Mon Sep 17 00:00:00 2001 From: lukefromdc Date: Mon, 19 Jun 2023 16:51:54 -0400 Subject: mate-weather-applet: port to in-process for wayland support --- mateweather/data/Makefile.am | 15 ++++----------- ...ateWeatherApplet.mate-panel-applet.desktop.in.in | 4 +++- ...panel.applet.MateWeatherAppletFactory.service.in | 3 --- mateweather/src/Makefile.am | 21 +++++++++++++-------- mateweather/src/main.c | 2 +- mateweather/src/mateweather-applet.c | 2 -- 6 files changed, 21 insertions(+), 26 deletions(-) delete mode 100644 mateweather/data/org.mate.panel.applet.MateWeatherAppletFactory.service.in diff --git a/mateweather/data/Makefile.am b/mateweather/data/Makefile.am index 4dfe4884..a6bf5ceb 100644 --- a/mateweather/data/Makefile.am +++ b/mateweather/data/Makefile.am @@ -1,36 +1,29 @@ +APPLET_LOCATION = $(libdir)/mate-applets/libmateweather-applet.so + 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|\@LIBEXECDIR\@|$(libexecdir)|" \ + -e "s|\@APPLET_LOCATION\@|$(APPLET_LOCATION)|" \ -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 $@ -servicedir = $(datadir)/dbus-1/services -service_in_files = org.mate.panel.applet.MateWeatherAppletFactory.service.in -service_DATA = $(service_in_files:.service.in=.service) -org.mate.panel.applet.MateWeatherAppletFactory.service: $(service_in_files) - $(AM_V_GEN)sed \ - -e "s|\@LIBEXECDIR\@|$(libexecdir)|" \ - $< > $@ CLEANFILES = \ $(applet_DATA) \ - $(applet_in_files) \ - $(service_DATA) + $(applet_in_files) 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 03d2b621..99b4dff4 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,7 @@ [Applet Factory] Id=MateWeatherAppletFactory -Location=@LIBEXECDIR@/mateweather-applet +InProcess=true +Location=@APPLET_LOCATION@ Name=Mateweather Applet Factory Description=Factory for creating the weather applet. @@ -10,6 +11,7 @@ Description=Monitor the current weather conditions, and forecasts # Translators: Do NOT translate or transliterate this text (this is an icon file name)! Icon=weather-storm MateComponentId=OAFIID:MATE_MateWeatherApplet +Platforms=X11;Wayland; X-MATE-Bugzilla-Bugzilla=MATE X-MATE-Bugzilla-Product=mate-applets X-MATE-Bugzilla-Component=mateweather diff --git a/mateweather/data/org.mate.panel.applet.MateWeatherAppletFactory.service.in b/mateweather/data/org.mate.panel.applet.MateWeatherAppletFactory.service.in deleted file mode 100644 index e1d0174a..00000000 --- a/mateweather/data/org.mate.panel.applet.MateWeatherAppletFactory.service.in +++ /dev/null @@ -1,3 +0,0 @@ -[D-BUS Service] -Name=org.mate.panel.applet.MateWeatherAppletFactory -Exec=@LIBEXECDIR@/mateweather-applet diff --git a/mateweather/src/Makefile.am b/mateweather/src/Makefile.am index b01bc226..d032a98f 100644 --- a/mateweather/src/Makefile.am +++ b/mateweather/src/Makefile.am @@ -1,3 +1,8 @@ +NULL = + +mateweather_applet_libdir= $(pkglibdir) +mateweather_applet_lib_LTLIBRARIES=libmateweather-applet.la + AM_CPPFLAGS = \ -I$(srcdir) \ -I$(top_srcdir) \ @@ -7,23 +12,23 @@ AM_CPPFLAGS = \ $(LIBMATEWEATHER_CFLAGS) \ ${WARN_CFLAGS} -libexec_PROGRAMS = mateweather-applet - -BUILT_SOURCES = mateweather-resources.c mateweather-resources.h -nodist_mateweather_applet_SOURCES = $(BUILT_SOURCES) -mateweather_applet_SOURCES = \ +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-applet.c mateweather-applet.h \ + mateweather-resources.c \ + mateweather-resources.h \ + $(NULL) -mateweather_applet_LDADD = \ +libmateweather_applet_la_LIBADD = \ $(LIBNOTIFY_LIBS) \ $(MATE_APPLETS4_LIBS) \ $(MATE_LIBS2_LIBS) \ - $(LIBMATEWEATHER_LIBS) + $(LIBMATEWEATHER_LIBS) \ + $(NULL) 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 f472fa23..af128dea 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_OUT_PROCESS_FACTORY("MateWeatherAppletFactory", PANEL_TYPE_APPLET, "mateweather", mateweather_applet_factory, NULL) +MATE_PANEL_APPLET_IN_PROCESS_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 4000b692..48bc7dbe 100644 --- a/mateweather/src/mateweather-applet.c +++ b/mateweather/src/mateweather-applet.c @@ -341,8 +341,6 @@ void mateweather_applet_create (MateWeatherApplet *gw_applet) mate_panel_applet_set_flags (gw_applet->applet, MATE_PANEL_APPLET_EXPAND_MINOR); - g_set_application_name (_("Weather Report")); - gtk_window_set_default_icon_name ("weather-storm"); g_signal_connect (gw_applet->applet, "change-orient", -- cgit v1.2.1