Use an ActionGroup for Move To Desktop entries

Virtual Desktops are mutual exclusive, so an ActionGroup
is better suited.

REVIEW: 104378
This commit is contained in:
Martin Gräßlin 2012-03-23 08:11:55 +01:00
parent 8837cc8681
commit 6fa9d35322

View file

@ -458,9 +458,11 @@ void Workspace::desktopPopupAboutToShow()
return;
desk_popup->clear();
QActionGroup *group = new QActionGroup(desk_popup);
QAction *action = desk_popup->addAction(i18n("&All Desktops"));
action->setData(0);
action->setCheckable(true);
group->addAction(action);
if (active_popup_client && active_popup_client->isOnAllDesktops())
action->setChecked(true);
@ -475,6 +477,7 @@ void Workspace::desktopPopupAboutToShow()
action = desk_popup->addAction(basic_name.arg(i).arg(desktopName(i).replace('&', "&&")));
action->setData(i);
action->setCheckable(true);
group->addAction(action);
if (active_popup_client &&
!active_popup_client->isOnAllDesktops() && active_popup_client->desktop() == i)