diff --git a/useractions.cpp b/useractions.cpp index a16ebb0698..eed0e1f3e3 100644 --- a/useractions.cpp +++ b/useractions.cpp @@ -109,8 +109,6 @@ QMenu* Workspace::clientPopup() action = popup->addMenu( advanced_popup ); action->setText( i18n("Ad&vanced") ); - desk_popup_index = popup->actions().count(); - if (options->useTranslucency){ trans_popup = new QMenu( popup ); trans_popup->setFont(KGlobalSettings::menuFont()); @@ -249,9 +247,9 @@ void Workspace::initDesktopPopup() connect( desk_popup, SIGNAL( aboutToShow() ), this, SLOT( desktopPopupAboutToShow() ) ); - QAction *action = popup->addMenu( desk_popup ); + QAction *action = desk_popup->menuAction(); + popup->insertAction(mMoveOpAction, action); action->setText( i18n("To &Desktop") ); - action->setData( desk_popup_index ); } /*! diff --git a/workspace.cpp b/workspace.cpp index 648aac7ea8..111a0ce543 100644 --- a/workspace.cpp +++ b/workspace.cpp @@ -101,7 +101,6 @@ Workspace::Workspace( bool restore ) advanced_popup (0), trans_popup (0), desk_popup (0), - desk_popup_index (0), keys (0), client_keys ( NULL ), // client_keys_dialog ( NULL ), diff --git a/workspace.h b/workspace.h index 971c0cf5c8..139dd92e70 100644 --- a/workspace.h +++ b/workspace.h @@ -623,7 +623,6 @@ class Workspace : public QObject, public KDecorationDefines QMenu *advanced_popup; QMenu *trans_popup; QMenu *desk_popup; - int desk_popup_index; void modalActionsSwitch( bool enabled );