From d785377044f6bafd927722e1c03175e854870b75 Mon Sep 17 00:00:00 2001 From: rbuj Date: Sun, 7 Aug 2022 09:28:01 +0200 Subject: cpufreq: Add data dir --- configure.ac | 3 +- cpufreq/Makefile.am | 47 +--- cpufreq/cpufreq-applet-menu.xml | 4 - cpufreq/cpufreq-preferences.ui | 292 --------------------- cpufreq/cpufreq-resources.gresource.xml | 7 - cpufreq/data/Makefile.am | 46 ++++ cpufreq/data/cpufreq-applet-menu.xml | 4 + cpufreq/data/cpufreq-preferences.ui | 292 +++++++++++++++++++++ cpufreq/data/cpufreq-resources.gresource.xml | 7 + ...s.CPUFreqApplet.mate-panel-applet.desktop.in.in | 16 ++ ...te.panel.applet.CPUFreqAppletFactory.service.in | 3 + .../org.mate.panel.applet.cpufreq.gschema.xml.in | 20 ++ ...s.CPUFreqApplet.mate-panel-applet.desktop.in.in | 16 -- ...te.panel.applet.CPUFreqAppletFactory.service.in | 3 - .../org.mate.panel.applet.cpufreq.gschema.xml.in | 20 -- cpufreq/src/Makefile.am | 8 +- po/POTFILES.in | 6 +- 17 files changed, 398 insertions(+), 396 deletions(-) delete mode 100644 cpufreq/cpufreq-applet-menu.xml delete mode 100644 cpufreq/cpufreq-preferences.ui delete mode 100644 cpufreq/cpufreq-resources.gresource.xml create mode 100644 cpufreq/data/Makefile.am create mode 100644 cpufreq/data/cpufreq-applet-menu.xml create mode 100644 cpufreq/data/cpufreq-preferences.ui create mode 100644 cpufreq/data/cpufreq-resources.gresource.xml create mode 100644 cpufreq/data/org.mate.applets.CPUFreqApplet.mate-panel-applet.desktop.in.in create mode 100644 cpufreq/data/org.mate.panel.applet.CPUFreqAppletFactory.service.in create mode 100644 cpufreq/data/org.mate.panel.applet.cpufreq.gschema.xml.in delete mode 100644 cpufreq/org.mate.applets.CPUFreqApplet.mate-panel-applet.desktop.in.in delete mode 100644 cpufreq/org.mate.panel.applet.CPUFreqAppletFactory.service.in delete mode 100644 cpufreq/org.mate.panel.applet.cpufreq.gschema.xml.in diff --git a/configure.ac b/configure.ac index 3c9e7b46..a53924cc 100644 --- a/configure.ac +++ b/configure.ac @@ -598,8 +598,9 @@ trashapplet/data/Makefile trashapplet/src/Makefile trashapplet/docs/Makefile cpufreq/Makefile +cpufreq/data/Makefile +cpufreq/data/org.mate.panel.applet.cpufreq.gschema.xml cpufreq/src/Makefile -cpufreq/org.mate.panel.applet.cpufreq.gschema.xml cpufreq/src/cpufreq-selector/Makefile cpufreq/pixmaps/Makefile cpufreq/help/Makefile diff --git a/cpufreq/Makefile.am b/cpufreq/Makefile.am index 8fb1386f..1fe1e1c9 100644 --- a/cpufreq/Makefile.am +++ b/cpufreq/Makefile.am @@ -1,48 +1,3 @@ -NULL = - -SUBDIRS = help pixmaps src - -cpufreq_gschema_in_files = org.mate.panel.applet.cpufreq.gschema.xml.in -gsettings_SCHEMAS = $(cpufreq_gschema_in_files:.xml.in=.xml) -@GSETTINGS_RULES@ - -appletdir = $(datadir)/mate-panel/applets -applet_in_files = org.mate.applets.CPUFreqApplet.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|\@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.CPUFreqAppletFactory.service.in -service_DATA = $(service_in_files:.service.in=.service) - -org.mate.panel.applet.CPUFreqAppletFactory.service: $(service_in_files) - $(AM_V_GEN)sed \ - -e "s|\@LIBEXECDIR\@|$(libexecdir)|" \ - $< > $@ - -CLEANFILES = \ - $(applet_DATA) \ - $(applet_in_files) \ - $(service_DATA) \ - $(gsettings_SCHEMAS) \ - *.gschema.valid \ - $(NULL) - -EXTRA_DIST = \ - $(applet_in_files).in \ - $(service_in_files) \ - $(cpufreq_gschema_in_files) \ - cpufreq-applet-menu.xml \ - cpufreq-preferences.ui \ - cpufreq-resources.gresource.xml \ - $(NULL) +SUBDIRS = help pixmaps data src -include $(top_srcdir)/git.mk diff --git a/cpufreq/cpufreq-applet-menu.xml b/cpufreq/cpufreq-applet-menu.xml deleted file mode 100644 index 98375818..00000000 --- a/cpufreq/cpufreq-applet-menu.xml +++ /dev/null @@ -1,4 +0,0 @@ - - - - diff --git a/cpufreq/cpufreq-preferences.ui b/cpufreq/cpufreq-preferences.ui deleted file mode 100644 index f155f73e..00000000 --- a/cpufreq/cpufreq-preferences.ui +++ /dev/null @@ -1,292 +0,0 @@ - - - - - - True - False - window-close - - - True - False - help-browser - - - False - 5 - CPU Frequency Monitor Preferences - dialog - - - False - vertical - 2 - - - False - end - - - _Help - True - True - True - help_img - True - True - - - True - True - 0 - - - - - _Close - True - True - True - close_img - True - True - - - True - True - 1 - - - - - False - False - 0 - - - - - True - False - 5 - vertical - 18 - - - True - False - 0 - none - - - True - False - 12 - - - True - False - 6 - 12 - - - True - False - start - _Monitored CPU: - True - prefs_cpu_number - 0 - - - False - False - 0 - - - - - True - False - - - True - True - 1 - - - - - - - - - True - False - Monitor Settings - - - - - - - - False - True - 0 - - - - - True - False - 0 - none - - - True - False - 12 - - - True - False - vertical - 6 - - - True - False - 6 - 12 - - - True - False - start - _Appearance: - True - prefs_show_mode - 0 - - - False - True - 0 - - - - - True - False - - - True - True - 1 - - - - - False - True - 0 - - - - - Show CPU frequency as _frequency - True - True - False - start - True - True - True - - - False - True - 1 - - - - - Show frequency _units - True - True - False - start - 18 - True - True - - - False - True - 2 - - - - - Show CPU frequency as _percentage - True - True - False - start - True - True - prefs_show_freq - - - False - True - 3 - - - - - - - - - True - False - Display Settings - - - - - - - - False - True - 1 - - - - - False - True - 1 - - - - - - button2 - button1 - - - - - - - - - - - - diff --git a/cpufreq/cpufreq-resources.gresource.xml b/cpufreq/cpufreq-resources.gresource.xml deleted file mode 100644 index 6ae8945a..00000000 --- a/cpufreq/cpufreq-resources.gresource.xml +++ /dev/null @@ -1,7 +0,0 @@ - - - - cpufreq-applet-menu.xml - cpufreq-preferences.ui - - diff --git a/cpufreq/data/Makefile.am b/cpufreq/data/Makefile.am new file mode 100644 index 00000000..b08d6345 --- /dev/null +++ b/cpufreq/data/Makefile.am @@ -0,0 +1,46 @@ +NULL = + +cpufreq_gschema_in_files = org.mate.panel.applet.cpufreq.gschema.xml.in +gsettings_SCHEMAS = $(cpufreq_gschema_in_files:.xml.in=.xml) +@GSETTINGS_RULES@ + +appletdir = $(datadir)/mate-panel/applets +applet_in_files = org.mate.applets.CPUFreqApplet.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|\@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.CPUFreqAppletFactory.service.in +service_DATA = $(service_in_files:.service.in=.service) + +org.mate.panel.applet.CPUFreqAppletFactory.service: $(service_in_files) + $(AM_V_GEN)sed \ + -e "s|\@LIBEXECDIR\@|$(libexecdir)|" \ + $< > $@ + +CLEANFILES = \ + $(applet_DATA) \ + $(applet_in_files) \ + $(service_DATA) \ + $(gsettings_SCHEMAS) \ + *.gschema.valid \ + $(NULL) + +EXTRA_DIST = \ + $(applet_in_files).in \ + $(service_in_files) \ + $(cpufreq_gschema_in_files) \ + cpufreq-applet-menu.xml \ + cpufreq-preferences.ui \ + cpufreq-resources.gresource.xml \ + $(NULL) + +-include $(top_srcdir)/git.mk diff --git a/cpufreq/data/cpufreq-applet-menu.xml b/cpufreq/data/cpufreq-applet-menu.xml new file mode 100644 index 00000000..98375818 --- /dev/null +++ b/cpufreq/data/cpufreq-applet-menu.xml @@ -0,0 +1,4 @@ + + + + diff --git a/cpufreq/data/cpufreq-preferences.ui b/cpufreq/data/cpufreq-preferences.ui new file mode 100644 index 00000000..f155f73e --- /dev/null +++ b/cpufreq/data/cpufreq-preferences.ui @@ -0,0 +1,292 @@ + + + + + + True + False + window-close + + + True + False + help-browser + + + False + 5 + CPU Frequency Monitor Preferences + dialog + + + False + vertical + 2 + + + False + end + + + _Help + True + True + True + help_img + True + True + + + True + True + 0 + + + + + _Close + True + True + True + close_img + True + True + + + True + True + 1 + + + + + False + False + 0 + + + + + True + False + 5 + vertical + 18 + + + True + False + 0 + none + + + True + False + 12 + + + True + False + 6 + 12 + + + True + False + start + _Monitored CPU: + True + prefs_cpu_number + 0 + + + False + False + 0 + + + + + True + False + + + True + True + 1 + + + + + + + + + True + False + Monitor Settings + + + + + + + + False + True + 0 + + + + + True + False + 0 + none + + + True + False + 12 + + + True + False + vertical + 6 + + + True + False + 6 + 12 + + + True + False + start + _Appearance: + True + prefs_show_mode + 0 + + + False + True + 0 + + + + + True + False + + + True + True + 1 + + + + + False + True + 0 + + + + + Show CPU frequency as _frequency + True + True + False + start + True + True + True + + + False + True + 1 + + + + + Show frequency _units + True + True + False + start + 18 + True + True + + + False + True + 2 + + + + + Show CPU frequency as _percentage + True + True + False + start + True + True + prefs_show_freq + + + False + True + 3 + + + + + + + + + True + False + Display Settings + + + + + + + + False + True + 1 + + + + + False + True + 1 + + + + + + button2 + button1 + + + + + + + + + + + + diff --git a/cpufreq/data/cpufreq-resources.gresource.xml b/cpufreq/data/cpufreq-resources.gresource.xml new file mode 100644 index 00000000..6ae8945a --- /dev/null +++ b/cpufreq/data/cpufreq-resources.gresource.xml @@ -0,0 +1,7 @@ + + + + cpufreq-applet-menu.xml + cpufreq-preferences.ui + + diff --git a/cpufreq/data/org.mate.applets.CPUFreqApplet.mate-panel-applet.desktop.in.in b/cpufreq/data/org.mate.applets.CPUFreqApplet.mate-panel-applet.desktop.in.in new file mode 100644 index 00000000..168c6317 --- /dev/null +++ b/cpufreq/data/org.mate.applets.CPUFreqApplet.mate-panel-applet.desktop.in.in @@ -0,0 +1,16 @@ +[Applet Factory] +Id=CPUFreqAppletFactory +Location=@LIBEXECDIR@/mate-cpufreq-applet +Name=CPU Frequency Scaling Monitor +Description=Monitor the CPU Frequency Scaling + +[CPUFreqApplet] +Name=CPU Frequency Scaling Monitor +Description=Monitor the CPU Frequency Scaling +# Translators: Do NOT translate or transliterate this text (this is an icon file name)! +Icon=mate-cpu-frequency-applet +MateComponentId=OAFIID:MATE_CPUFreqApplet +X-MATE-Bugzilla-Bugzilla=MATE +X-MATE-Bugzilla-Product=mate-applets +X-MATE-Bugzilla-Component=cpufreq +X-MATE-Bugzilla-Version=@VERSION@ diff --git a/cpufreq/data/org.mate.panel.applet.CPUFreqAppletFactory.service.in b/cpufreq/data/org.mate.panel.applet.CPUFreqAppletFactory.service.in new file mode 100644 index 00000000..a04c672b --- /dev/null +++ b/cpufreq/data/org.mate.panel.applet.CPUFreqAppletFactory.service.in @@ -0,0 +1,3 @@ +[D-BUS Service] +Name=org.mate.panel.applet.CPUFreqAppletFactory +Exec=@LIBEXECDIR@/mate-cpufreq-applet diff --git a/cpufreq/data/org.mate.panel.applet.cpufreq.gschema.xml.in b/cpufreq/data/org.mate.panel.applet.cpufreq.gschema.xml.in new file mode 100644 index 00000000..694a75f7 --- /dev/null +++ b/cpufreq/data/org.mate.panel.applet.cpufreq.gschema.xml.in @@ -0,0 +1,20 @@ + + + + + 0 + CPU to Monitor + Set the CPU to monitor. In a single processor system you don't have to change it. + + + 2 + Mode to show CPU usage + A 0 value means to show the applet in graphic mode (pixmap only), 1 to show the applet in text mode (not to show the pixmap) and 2 to show the applet in graphic and text mode. + + + 1 + The type of text to display (if the text is enabled). + A 0 value means to show CPU frequency, 1 to show frequency and units, and 2 to show percentage instead of frequency. + + + diff --git a/cpufreq/org.mate.applets.CPUFreqApplet.mate-panel-applet.desktop.in.in b/cpufreq/org.mate.applets.CPUFreqApplet.mate-panel-applet.desktop.in.in deleted file mode 100644 index 168c6317..00000000 --- a/cpufreq/org.mate.applets.CPUFreqApplet.mate-panel-applet.desktop.in.in +++ /dev/null @@ -1,16 +0,0 @@ -[Applet Factory] -Id=CPUFreqAppletFactory -Location=@LIBEXECDIR@/mate-cpufreq-applet -Name=CPU Frequency Scaling Monitor -Description=Monitor the CPU Frequency Scaling - -[CPUFreqApplet] -Name=CPU Frequency Scaling Monitor -Description=Monitor the CPU Frequency Scaling -# Translators: Do NOT translate or transliterate this text (this is an icon file name)! -Icon=mate-cpu-frequency-applet -MateComponentId=OAFIID:MATE_CPUFreqApplet -X-MATE-Bugzilla-Bugzilla=MATE -X-MATE-Bugzilla-Product=mate-applets -X-MATE-Bugzilla-Component=cpufreq -X-MATE-Bugzilla-Version=@VERSION@ diff --git a/cpufreq/org.mate.panel.applet.CPUFreqAppletFactory.service.in b/cpufreq/org.mate.panel.applet.CPUFreqAppletFactory.service.in deleted file mode 100644 index a04c672b..00000000 --- a/cpufreq/org.mate.panel.applet.CPUFreqAppletFactory.service.in +++ /dev/null @@ -1,3 +0,0 @@ -[D-BUS Service] -Name=org.mate.panel.applet.CPUFreqAppletFactory -Exec=@LIBEXECDIR@/mate-cpufreq-applet diff --git a/cpufreq/org.mate.panel.applet.cpufreq.gschema.xml.in b/cpufreq/org.mate.panel.applet.cpufreq.gschema.xml.in deleted file mode 100644 index 694a75f7..00000000 --- a/cpufreq/org.mate.panel.applet.cpufreq.gschema.xml.in +++ /dev/null @@ -1,20 +0,0 @@ - - - - - 0 - CPU to Monitor - Set the CPU to monitor. In a single processor system you don't have to change it. - - - 2 - Mode to show CPU usage - A 0 value means to show the applet in graphic mode (pixmap only), 1 to show the applet in text mode (not to show the pixmap) and 2 to show the applet in graphic and text mode. - - - 1 - The type of text to display (if the text is enabled). - A 0 value means to show CPU frequency, 1 to show frequency and units, and 2 to show percentage instead of frequency. - - - diff --git a/cpufreq/src/Makefile.am b/cpufreq/src/Makefile.am index e7b42722..86b18674 100644 --- a/cpufreq/src/Makefile.am +++ b/cpufreq/src/Makefile.am @@ -44,11 +44,11 @@ mate_cpufreq_applet_LDADD = \ $(MATE_APPLETS4_LIBS) \ $(LIBCPUFREQ_LIBS) -cpufreq-resources.c: $(top_srcdir)/cpufreq/cpufreq-resources.gresource.xml $(shell $(GLIB_COMPILE_RESOURCES) --sourcedir=$(top_srcdir)/cpufreq --generate-dependencies $(top_srcdir)/cpufreq/cpufreq-resources.gresource.xml) - $(AM_V_GEN)$(GLIB_COMPILE_RESOURCES) --target=$@ --sourcedir=$(top_srcdir)/cpufreq --generate --c-name cpufreq $< +cpufreq-resources.c: $(top_srcdir)/cpufreq/data/cpufreq-resources.gresource.xml $(shell $(GLIB_COMPILE_RESOURCES) --sourcedir=$(top_srcdir)/cpufreq/data --generate-dependencies $(top_srcdir)/cpufreq/data/cpufreq-resources.gresource.xml) + $(AM_V_GEN)$(GLIB_COMPILE_RESOURCES) --target=$@ --sourcedir=$(top_srcdir)/cpufreq/data --generate --c-name cpufreq $< -cpufreq-resources.h: $(top_srcdir)/cpufreq/cpufreq-resources.gresource.xml $(shell $(GLIB_COMPILE_RESOURCES) --sourcedir=$(top_srcdir)/cpufreq --generate-dependencies $(top_srcdir)/cpufreq/cpufreq-resources.gresource.xml) - $(AM_V_GEN)$(GLIB_COMPILE_RESOURCES) --target=$@ --sourcedir=$(top_srcdir)/cpufreq --generate --c-name cpufreq $< +cpufreq-resources.h: $(top_srcdir)/cpufreq/data/cpufreq-resources.gresource.xml $(shell $(GLIB_COMPILE_RESOURCES) --sourcedir=$(top_srcdir)/cpufreq/data --generate-dependencies $(top_srcdir)/cpufreq/data/cpufreq-resources.gresource.xml) + $(AM_V_GEN)$(GLIB_COMPILE_RESOURCES) --target=$@ --sourcedir=$(top_srcdir)/cpufreq/data --generate --c-name cpufreq $< CLEANFILES = \ $(BUILT_SOURCES) diff --git a/po/POTFILES.in b/po/POTFILES.in index 4c1e044e..1855a52d 100644 --- a/po/POTFILES.in +++ b/po/POTFILES.in @@ -17,9 +17,9 @@ command/data/command-preferences.ui command/data/org.mate.applets.CommandApplet.mate-panel-applet.desktop.in.in command/data/org.mate.panel.applet.command.gschema.xml.in command/src/command.c -cpufreq/cpufreq-preferences.ui -cpufreq/org.mate.applets.CPUFreqApplet.mate-panel-applet.desktop.in.in -cpufreq/org.mate.panel.applet.cpufreq.gschema.xml.in +cpufreq/data/cpufreq-preferences.ui +cpufreq/data/org.mate.applets.CPUFreqApplet.mate-panel-applet.desktop.in.in +cpufreq/data/org.mate.panel.applet.cpufreq.gschema.xml.in cpufreq/src/cpufreq-applet.c cpufreq/src/cpufreq-prefs.c cpufreq/src/cpufreq-monitor-cpuinfo.c -- cgit v1.2.1