mirror of
https://invent.kde.org/marcoa/shift-shell.git
synced 2026-04-26 14:23:09 +00:00
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).
This commit is contained in:
parent
4cd1dfaf04
commit
47a886988f
2 changed files with 8 additions and 0 deletions
|
|
@ -16,6 +16,10 @@ FolioApplication::FolioApplication(HomeScreen *parent, KService::Ptr service)
|
||||||
, m_icon{service->icon()}
|
, m_icon{service->icon()}
|
||||||
, m_storageId{service->storageId()}
|
, m_storageId{service->storageId()}
|
||||||
{
|
{
|
||||||
|
if (service->property<bool>(QStringLiteral("X-KDE-PlasmaMobile-UseGenericName"))) {
|
||||||
|
m_name = service->genericName();
|
||||||
|
}
|
||||||
|
|
||||||
auto windows = WindowListener::instance()->windowsFromStorageId(m_storageId);
|
auto windows = WindowListener::instance()->windowsFromStorageId(m_storageId);
|
||||||
if (windows.empty()) {
|
if (windows.empty()) {
|
||||||
m_window = nullptr;
|
m_window = nullptr;
|
||||||
|
|
|
||||||
|
|
@ -15,6 +15,10 @@ Application::Application(QObject *parent, KService::Ptr service)
|
||||||
, m_icon{service->icon()}
|
, m_icon{service->icon()}
|
||||||
, m_storageId{service->storageId()}
|
, m_storageId{service->storageId()}
|
||||||
{
|
{
|
||||||
|
if (service->property<bool>(QStringLiteral("X-KDE-PlasmaMobile-UseGenericName"))) {
|
||||||
|
m_name = service->genericName();
|
||||||
|
}
|
||||||
|
|
||||||
auto windows = WindowListener::instance()->windowsFromStorageId(m_storageId);
|
auto windows = WindowListener::instance()->windowsFromStorageId(m_storageId);
|
||||||
if (windows.empty()) {
|
if (windows.empty()) {
|
||||||
m_window = nullptr;
|
m_window = nullptr;
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue