From 152faae6f90cd28487f68787952ff49d65bab392 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pablo=20Correa=20G=C3=B3mez?= Date: Wed, 23 Oct 2024 17:35:21 +0200 Subject: [PATCH] data: Add X-GNOME-Shell-Utilities.directory file to allow showing real name Instead of having the name of the directory be X-GNOME-Utilities. This also allows translating the name to the user's language. The name is chose to be different to X-GNOME-Utilities from GNOME Menus. In the process, also remove the categories. The menu definition from gnome-menus is not used, and it's not a category that apps list themselves, so it's completely unused anyway. Part-of: --- data/X-GNOME-Shell-Utilities.directory.desktop.in | 3 +++ data/meson.build | 9 +++++++++ js/ui/appDisplay.js | 6 +++--- po/POTFILES.in | 1 + 4 files changed, 16 insertions(+), 3 deletions(-) create mode 100644 data/X-GNOME-Shell-Utilities.directory.desktop.in diff --git a/data/X-GNOME-Shell-Utilities.directory.desktop.in b/data/X-GNOME-Shell-Utilities.directory.desktop.in new file mode 100644 index 000000000..980a27c09 --- /dev/null +++ b/data/X-GNOME-Shell-Utilities.directory.desktop.in @@ -0,0 +1,3 @@ +[Desktop Entry] +Name=Utilities +Type=Directory diff --git a/data/meson.build b/data/meson.build index ed13b6bae..87787bfdc 100644 --- a/data/meson.build +++ b/data/meson.build @@ -32,6 +32,15 @@ foreach desktop_file : desktop_files ) endforeach +i18n.merge_file( + input: 'X-GNOME-Shell-Utilities.directory.desktop.in', + output: '@BASENAME@', + po_dir: po_dir, + install: true, + install_dir: join_paths(datadir, 'desktop-directories'), + type: 'desktop', +) + serviceconf = configuration_data() serviceconf.set('libexecdir', libexecdir) foreach service_file : service_files diff --git a/js/ui/appDisplay.js b/js/ui/appDisplay.js index 3b554bfe0..f1f446562 100644 --- a/js/ui/appDisplay.js +++ b/js/ui/appDisplay.js @@ -58,8 +58,7 @@ const DIALOG_SHADE_HIGHLIGHT = new Cogl.Color({red: 0, green: 0, blue: 0, alpha: const DEFAULT_FOLDERS = { 'Utilities': { - name: 'X-GNOME-Utilities.directory', - categories: ['X-GNOME-Utilities'], + name: 'X-GNOME-Shell-Utilities.directory', apps: [ 'gnome-abrt.desktop', 'gnome-system-log.desktop', @@ -1446,7 +1445,8 @@ class AppDisplay extends BaseAppView { }); child.set_string('name', name); child.set_boolean('translate', true); - child.set_strv('categories', categories); + if (categories) + child.set_strv('categories', categories); if (apps) child.set_strv('apps', apps); } diff --git a/po/POTFILES.in b/po/POTFILES.in index 0a9aa2f8d..f4853514b 100644 --- a/po/POTFILES.in +++ b/po/POTFILES.in @@ -7,6 +7,7 @@ data/org.gnome.Shell.desktop.in.in data/org.gnome.shell.gschema.xml.in data/org.gnome.Shell.Extensions.desktop.in.in data/org.gnome.Shell.PortalHelper.desktop.in.in +data/X-GNOME-Shell-Utilities.directory.desktop.in js/dbusServices/extensions/ui/extension-error-page.ui js/gdm/authPrompt.js js/gdm/loginDialog.js