diff options
author | lukefromdc <[email protected]> | 2023-06-19 17:31:40 -0400 |
---|---|---|
committer | raveit65 <[email protected]> | 2023-07-17 02:47:28 +0200 |
commit | 6133a03263321ab85fae9299968a8f069b3dfad5 (patch) | |
tree | 3c30161fa82a4f60ffb68a30239df87571ab3e72 | |
parent | ed185133fa170ee018dfa25e1010b1fcf4238c78 (diff) | |
download | mate-applets-6133a03263321ab85fae9299968a8f069b3dfad5.tar.bz2 mate-applets-6133a03263321ab85fae9299968a8f069b3dfad5.tar.xz |
multiload: port to in-process for wayland
*Fully functional on both x11 and wayland
-rw-r--r-- | multiload/data/Makefile.am | 16 | ||||
-rw-r--r-- | multiload/data/org.mate.applets.MultiLoadApplet.mate-panel-applet.desktop.in.in | 4 | ||||
-rw-r--r-- | multiload/data/org.mate.panel.applet.MultiLoadAppletFactory.service.in | 3 | ||||
-rw-r--r-- | multiload/src/Makefile.am | 17 | ||||
-rw-r--r-- | multiload/src/main.c | 4 |
5 files changed, 18 insertions, 26 deletions
diff --git a/multiload/data/Makefile.am b/multiload/data/Makefile.am index 0f1f9723..c98d4ff5 100644 --- a/multiload/data/Makefile.am +++ b/multiload/data/Makefile.am @@ -1,3 +1,7 @@ +NULL = + +APPLET_LOCATION = $(libdir)/mate-applets/libmate-multiload-applet.so + multiload_gschema_in_files = org.mate.panel.applet.multiload.gschema.xml.in gsettings_SCHEMAS = $(multiload_gschema_in_files:.xml.in=.xml) @GSETTINGS_RULES@ @@ -9,32 +13,22 @@ applet_DATA = $(applet_in_files:.mate-panel-applet.desktop.in=.mate-panel $(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.MultiLoadAppletFactory.service.in -service_DATA = $(service_in_files:.service.in=.service) - -org.mate.panel.applet.MultiLoadAppletFactory.service: $(service_in_files) - $(AM_V_GEN)sed \ - -e "s|\@LIBEXECDIR\@|$(libexecdir)|" \ - $< > $@ CLEANFILES = \ $(applet_DATA) \ $(applet_in_files) \ - $(service_DATA) \ $(gsettings_SCHEMAS) \ *.gschema.valid EXTRA_DIST = \ $(applet_in_in_files) \ - $(service_in_files) \ $(multiload_gschema_in_files) \ multiload-applet-menu.xml \ multiload-resources.gresource.xml \ diff --git a/multiload/data/org.mate.applets.MultiLoadApplet.mate-panel-applet.desktop.in.in b/multiload/data/org.mate.applets.MultiLoadApplet.mate-panel-applet.desktop.in.in index 3eacb2fb..7ce492c2 100644 --- a/multiload/data/org.mate.applets.MultiLoadApplet.mate-panel-applet.desktop.in.in +++ b/multiload/data/org.mate.applets.MultiLoadApplet.mate-panel-applet.desktop.in.in @@ -1,6 +1,7 @@ [Applet Factory] Id=MultiLoadAppletFactory -Location=@LIBEXECDIR@/mate-multiload-applet +Location=@APPLET_LOCATION@ +InProcess=true Name=MultiLoad Applet Factory Description=Factory for creating the load applet. @@ -10,6 +11,7 @@ Description=A system load indicator # Translators: Do NOT translate or transliterate this text (this is an icon file name)! Icon=utilities-system-monitor MateComponentId=OAFIID:MATE_MultiLoadApplet +Platforms=X11;Wayland; X-MATE-Bugzilla-Bugzilla=MATE X-MATE-Bugzilla-Product=mate-applets X-MATE-Bugzilla-Component=multiload diff --git a/multiload/data/org.mate.panel.applet.MultiLoadAppletFactory.service.in b/multiload/data/org.mate.panel.applet.MultiLoadAppletFactory.service.in deleted file mode 100644 index d4c7da3c..00000000 --- a/multiload/data/org.mate.panel.applet.MultiLoadAppletFactory.service.in +++ /dev/null @@ -1,3 +0,0 @@ -[D-BUS Service] -Name=org.mate.panel.applet.MultiLoadAppletFactory -Exec=@LIBEXECDIR@/mate-multiload-applet diff --git a/multiload/src/Makefile.am b/multiload/src/Makefile.am index 670f1c50..6efa6796 100644 --- a/multiload/src/Makefile.am +++ b/multiload/src/Makefile.am @@ -1,5 +1,8 @@ NULL = +mate_multiload_applet_libdir= $(pkglibdir) +mate_multiload_applet_lib_LTLIBRARIES=libmate-multiload-applet.la + AM_CPPFLAGS = \ -I$(srcdir) \ -DMULTILOAD_RESOURCE_PATH=\""/org/mate/mate-applets/multiload/"\" \ @@ -8,11 +11,7 @@ AM_CPPFLAGS = \ $(GIO_CFLAGS) \ ${WARN_CFLAGS} -libexec_PROGRAMS = mate-multiload-applet - -BUILT_SOURCES = multiload-resources.c multiload-resources.h -nodist_mate_multiload_applet_SOURCES = $(BUILT_SOURCES) -mate_multiload_applet_SOURCES = \ +libmate_multiload_applet_la_SOURCES = \ global.h \ linux-proc.h \ load-graph.h \ @@ -22,9 +21,12 @@ mate_multiload_applet_SOURCES = \ properties.c \ netspeed.c netspeed.h \ autoscaler.c \ - autoscaler.h + autoscaler.h \ + multiload-resources.c \ + multiload-resources.h \ + $(NULL) -mate_multiload_applet_LDADD = \ +libmate_multiload_applet_la_LIBADD = \ $(MATE_APPLETS4_LIBS) \ $(GTOP_APPLETS_LIBS) \ $(GIO_LIBS) \ @@ -37,7 +39,6 @@ multiload-resources.h: $(srcdir)/../data/multiload-resources.gresource.xml $(she $(AM_V_GEN)$(GLIB_COMPILE_RESOURCES) --target=$@ --sourcedir=$(srcdir)/../data --generate --c-name multiload $< CLEANFILES = \ - $(BUILT_SOURCES) \ $(NULL) -include $(top_srcdir)/git.mk diff --git a/multiload/src/main.c b/multiload/src/main.c index a80d9145..80d365cd 100644 --- a/multiload/src/main.c +++ b/multiload/src/main.c @@ -495,8 +495,6 @@ multiload_applet_new(MatePanelApplet *applet, const gchar *iid, gpointer data) ma->prop_dialog = NULL; ma->last_clicked = 0; - g_set_application_name (_("System Monitor")); - gtk_window_set_default_icon_name ("utilities-system-monitor"); ma->settings = mate_panel_applet_settings_new (applet, "org.mate.panel.applet.multiload"); @@ -575,7 +573,7 @@ multiload_factory (MatePanelApplet *applet, return retval; } -MATE_PANEL_APPLET_OUT_PROCESS_FACTORY ("MultiLoadAppletFactory", +MATE_PANEL_APPLET_IN_PROCESS_FACTORY ("MultiLoadAppletFactory", PANEL_TYPE_APPLET, "multiload", multiload_factory, |