From 0bd65de375ac3973824e258c174b65a7a679543f Mon Sep 17 00:00:00 2001 From: Xaver Hugl Date: Tue, 20 Feb 2024 17:22:05 +0100 Subject: [PATCH] useractions: remove legacy virtual desktop number from the menu In almost all cases it's duplicated in the name, and if the user manually changes the name, the custom name should be shown without additional numbers CCBUG: 481576 --- src/useractions.cpp | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/src/useractions.cpp b/src/useractions.cpp index ca738818ea..622c454de2 100644 --- a/src/useractions.cpp +++ b/src/useractions.cpp @@ -494,17 +494,9 @@ void UserActionsMenu::desktopPopupAboutToShow() m_desktopMenu->addSeparator(); - const uint BASE = 10; - const auto desktops = vds->desktops(); for (VirtualDesktop *desktop : desktops) { - const uint legacyId = desktop->x11DesktopNumber(); - - QString basic_name(QStringLiteral("%1 %2")); - if (legacyId < BASE) { - basic_name.prepend(QLatin1Char('&')); - } - action = m_desktopMenu->addAction(basic_name.arg(legacyId).arg(desktop->name().replace(QLatin1Char('&'), QStringLiteral("&&")))); + action = m_desktopMenu->addAction(QStringLiteral("%1").arg(desktop->name().replace(QLatin1Char('&'), QStringLiteral("&&")))); connect(action, &QAction::triggered, this, [this, desktop]() { if (m_window) { workspace()->sendWindowToDesktops(m_window, {desktop}, false);