From 47a886988f46ad16fb73d3159a86689c77a5c4b1 Mon Sep 17 00:00:00 2001 From: Devin Lin Date: Tue, 17 Jun 2025 14:04:25 -0400 Subject: [PATCH] homescreen: Use generic app name when X-KDE-PlasmaMobile-UseGenericName is set in a .desktop file This commit adds support for using the generic app name when the "X-KDE-PlasmaMobile-UseGenericName" .desktop key is set. This allows us to have applications that we consider "system apps" to have a generic name, without needing to change the "Name" tag itself when used in other desktop environments (ex. Plasma Desktop). --- containments/homescreens/folio/folioapplication.cpp | 4 ++++ containments/homescreens/halcyon/plugin/application.cpp | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/containments/homescreens/folio/folioapplication.cpp b/containments/homescreens/folio/folioapplication.cpp index 40c3ccbf..6a12d49f 100644 --- a/containments/homescreens/folio/folioapplication.cpp +++ b/containments/homescreens/folio/folioapplication.cpp @@ -16,6 +16,10 @@ FolioApplication::FolioApplication(HomeScreen *parent, KService::Ptr service) , m_icon{service->icon()} , m_storageId{service->storageId()} { + if (service->property(QStringLiteral("X-KDE-PlasmaMobile-UseGenericName"))) { + m_name = service->genericName(); + } + auto windows = WindowListener::instance()->windowsFromStorageId(m_storageId); if (windows.empty()) { m_window = nullptr; diff --git a/containments/homescreens/halcyon/plugin/application.cpp b/containments/homescreens/halcyon/plugin/application.cpp index c5da9679..794816a9 100644 --- a/containments/homescreens/halcyon/plugin/application.cpp +++ b/containments/homescreens/halcyon/plugin/application.cpp @@ -15,6 +15,10 @@ Application::Application(QObject *parent, KService::Ptr service) , m_icon{service->icon()} , m_storageId{service->storageId()} { + if (service->property(QStringLiteral("X-KDE-PlasmaMobile-UseGenericName"))) { + m_name = service->genericName(); + } + auto windows = WindowListener::instance()->windowsFromStorageId(m_storageId); if (windows.empty()) { m_window = nullptr;