diff --git a/useractions.cpp b/useractions.cpp index 5cc23e5860..521253aaac 100644 --- a/useractions.cpp +++ b/useractions.cpp @@ -124,25 +124,6 @@ QMenu* Workspace::clientPopup() action->setIcon(KIcon("preferences-system-windows-actions")); action->setData(Options::ApplicationRulesOp); - trans_popup = 0; - if (compositing()) { - trans_popup = new QMenu(popup); - trans_popup->setFont(KGlobalSettings::menuFont()); - connect(trans_popup, SIGNAL(triggered(QAction*)), this, SLOT(setPopupClientOpacity(QAction*))); - trans_popup_group = new QActionGroup(trans_popup); - const int levels[] = { 100, 90, 75, 50, 25, 10 }; - for (unsigned int i = 0; - i < sizeof(levels) / sizeof(levels[ 0 ]); - ++i) { - action = trans_popup->addAction(QString::number(levels[ i ]) + "%"); - action->setActionGroup(trans_popup_group); - action->setCheckable(true); - action->setData(levels[ i ]); - } - action = popup->addMenu(trans_popup); - action->setText(i18n("&Opacity")); - } - mMoveOpAction = popup->addAction(i18n("&Move")); mMoveOpAction->setIcon(KIcon("transform-move")); kaction = qobject_cast(keys->action("Window Move")); @@ -246,14 +227,6 @@ void Workspace::discardPopup() add_tabs_popup = NULL; } -void Workspace::setPopupClientOpacity(QAction* action) -{ - if (active_popup_client == NULL) - return; - int level = action->data().toInt(); - active_popup_client->setOpacity(level / 100.0); -} - void Workspace::slotIncreaseWindowOpacity() { if (!active_client) { @@ -335,15 +308,6 @@ void Workspace::clientPopupAboutToShow() mRemoveTabGroup->setVisible(tabGroupSize > 1); mCloseGroup->setVisible(tabGroupSize > 1); } - - if (trans_popup != NULL) { - foreach (QAction * action, trans_popup->actions()) { - if (action->data().toInt() == qRound(active_popup_client->opacity() * 100)) - action->setChecked(true); - else - action->setChecked(false); - } - } } void Workspace::initSwitchToTab() @@ -462,7 +426,7 @@ void Workspace::initDesktopPopup() QAction *action = desk_popup->menuAction(); // set it as the first item - popup->insertAction(trans_popup ? trans_popup->menuAction() : mMoveOpAction, action); + popup->insertAction(mMoveOpAction, action); action->setText(i18n("To &Desktop")); } @@ -485,7 +449,7 @@ void Workspace::initActivityPopup() QAction *action = activity_popup->menuAction(); // set it as the first item - popup->insertAction(trans_popup ? trans_popup->menuAction() : mMoveOpAction, action); + popup->insertAction(mMoveOpAction, action); action->setText(i18n("Ac&tivities")); //FIXME is that a good string? } diff --git a/workspace.cpp b/workspace.cpp index 9aa259c16f..cf91480051 100644 --- a/workspace.cpp +++ b/workspace.cpp @@ -136,7 +136,6 @@ Workspace::Workspace(bool restore) #endif , popup(0) , advanced_popup(0) - , trans_popup(0) , desk_popup(0) , activity_popup(0) , add_tabs_popup(0) diff --git a/workspace.h b/workspace.h index 72635d06ce..09edd9e3d8 100644 --- a/workspace.h +++ b/workspace.h @@ -653,7 +653,6 @@ private slots: void writeWindowRules(); void slotBlockShortcuts(int data); void slotReloadConfig(); - void setPopupClientOpacity(QAction* action); void setupCompositing(); void finishCompositing(); void fallbackToXRenderCompositing(); @@ -816,8 +815,6 @@ private: QMenu* popup; QMenu* advanced_popup; - QMenu* trans_popup; - QActionGroup* trans_popup_group; QMenu* desk_popup; QMenu* activity_popup; QMenu* add_tabs_popup; // Menu to add the group to other group