data: Generate dash/app-grid defaults from text files

Defining default apps as serialized GVariants isn't very human-friendly,
which likely contributes to the fact that the lists are in parts horribly
outdated (Books! Cheese! Screenshot! gedit!).

Instead, generate the lists at build time from simple text files, which
should be much easier to update.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3632>
This commit is contained in:
Florian Müllner
2025-02-07 15:01:48 +01:00
committed by Marge Bot
parent 33354c718f
commit 38c6293f4f
10 changed files with 106 additions and 43 deletions

View File

@ -20,3 +20,5 @@ export const LIBMUTTER_API_VERSION = '@LIBMUTTER_API_VERSION@';
export const HAVE_BLUETOOTH = pkg.checkSymbol('GnomeBluetooth', '3.0',
'Client.default_adapter_state');
export const UTILITIES_FOLDER_APPS = @UTILS_FOLDER_APPS@;

View File

@ -5,6 +5,10 @@ jsconf.set('GETTEXT_PACKAGE', meson.project_name())
jsconf.set('LIBMUTTER_API_VERSION', mutter_api_version)
jsconf.set10('HAVE_NETWORKMANAGER', have_networkmanager)
jsconf.set10('HAVE_PORTAL_HELPER', have_portal_helper)
jsconf.set('UTILS_FOLDER_APPS', run_command(
generate_app_list, '../../data/default-apps/utilities-folder.txt',
check: true,
).stdout())
jsconf.set('datadir', datadir)
jsconf.set('libexecdir', libexecdir)

View File

@ -24,6 +24,8 @@ import * as SystemActions from '../misc/systemActions.js';
import * as Main from './main.js';
import {UTILITIES_FOLDER_APPS} from '../misc/config.js';
const MENU_POPUP_TIMEOUT = 600;
const POPDOWN_DIALOG_TIMEOUT = 500;
@ -59,25 +61,7 @@ const DIALOG_SHADE_HIGHLIGHT = new Cogl.Color({red: 0, green: 0, blue: 0, alpha:
const DEFAULT_FOLDERS = {
'Utilities': {
name: 'X-GNOME-Shell-Utilities.directory',
apps: [
// Sorted by name as shown in menus, not filename
'nm-connection-editor.desktop', // Advanced Network Configuration
'org.gnome.DejaDup.desktop', // Backups
'org.gnome.Characters.desktop', // Characters
'org.gnome.Connections.desktop', // Connections
'org.gnome.DiskUtility.desktop', // Disks
'org.gnome.baobab.desktop', // Disk Usage Analyzer
'org.gnome.Evince.desktop', // Document Viewer
'org.gnome.FileRoller.desktop', // File Roller
'org.gnome.font-viewer.desktop', // Fonts
'org.gnome.Loupe.desktop', // Image Viewer
'org.gnome.Logs.desktop', // Logs
'org.freedesktop.MalcontentControl.desktop', // Parental Controls
'org.gnome.seahorse.Application.desktop', // Passwords and Keys
'org.freedesktop.GnomeAbrt.desktop', // Problem Reporting
'org.gnome.tweaks.desktop', // Tweaks
'org.gnome.Usage.desktop', // Usage
],
apps: UTILITIES_FOLDER_APPS,
},
'YaST': {
name: 'suse-yast.directory',