From 66b0ee3c4daf5892db836879cd092ed22dc62c8d Mon Sep 17 00:00:00 2001 From: "Torrance, Douglas" Date: Thu, 17 Feb 2022 21:57:17 +0000 Subject: [PATCH] Add WPrefs to XDG desktop menu We include a desktop entry file for WPrefs so that it will be included in XDG-compatible menus. See the specifications at: https://specifications.freedesktop.org/menu-spec/menu-spec-latest.html https://specifications.freedesktop.org/desktop-entry-spec/desktop-entry-spec-latest.html --- .gitignore | 2 ++ WPrefs.app/Makefile.am | 13 ++++++++++++- WPrefs.app/WPrefs.desktop.in | 9 +++++++++ 3 files changed, 23 insertions(+), 1 deletion(-) create mode 100644 WPrefs.app/WPrefs.desktop.in diff --git a/.gitignore b/.gitignore index 96eb11ce..c471628b 100644 --- a/.gitignore +++ b/.gitignore @@ -120,6 +120,8 @@ WindowMaker/Defaults/WMWindowAttributes WindowMaker/Defaults/WindowMaker WindowMaker/IconSets/Default.iconset +WPrefs.app/WPrefs.desktop + # These files are generated by the i18n process /po/WindowMaker.pot /po/*.mo diff --git a/WPrefs.app/Makefile.am b/WPrefs.app/Makefile.am index f6927050..2d81b4e1 100644 --- a/WPrefs.app/Makefile.am +++ b/WPrefs.app/Makefile.am @@ -10,9 +10,20 @@ wpdatadir = @wprefs_datadir@ wpdata_DATA = WPrefs.tiff WPrefs.xpm +applicationsdir = @datadir@/applications + +applications_DATA = WPrefs.desktop + +WPrefs.desktop: WPrefs.desktop.in + $(AM_V_GEN)sed -e "s:#wprefs_bindir#:${wprefs_bindir}:" \ + -e "s:#wprefs_datadir#:${wprefs_datadir}:" $< > $@ + EXTRA_DIST = $(wpdata_DATA) \ KeyboardSettings.c \ - Themes.c + Themes.c \ + WPrefs.desktop.in + +DISTCLEANFILES = WPrefs.desktop WPrefs_SOURCES = \ main.c \ diff --git a/WPrefs.app/WPrefs.desktop.in b/WPrefs.app/WPrefs.desktop.in new file mode 100644 index 00000000..25ec5823 --- /dev/null +++ b/WPrefs.app/WPrefs.desktop.in @@ -0,0 +1,9 @@ +[Desktop Entry] +Version=1.5 +Type=Application +Name=WPrefs +Comment=Window Maker Preferences +TryExec=#wprefs_bindir#/WPrefs +Exec=WPrefs +Icon=#wprefs_datadir#/WPrefs.xpm +Categories=Settings;DesktopSettings;