diff --git a/clients/plastik/plastikclient.cpp b/clients/plastik/plastikclient.cpp index d764be6787..3a351d3453 100644 --- a/clients/plastik/plastikclient.cpp +++ b/clients/plastik/plastikclient.cpp @@ -79,6 +79,9 @@ PlastikClient::~PlastikClient() void PlastikClient::init() { + connect(this, SIGNAL(keepAboveChanged(bool) ), SLOT(keepAboveChange(bool) ) ); + connect(this, SIGNAL(keepBelowChanged(bool) ), SLOT(keepBelowChange(bool) ) ); + s_titleHeight = isTool() ? PlastikHandler::titleHeightTool() : PlastikHandler::titleHeight(); @@ -816,8 +819,16 @@ void PlastikClient::slotShade() void PlastikClient::slotKeepAbove() { - bool above = !keepAbove(); - setKeepAbove( above ); + setKeepAbove(!keepAbove() ); +} + +void PlastikClient::slotKeepBelow() +{ + setKeepBelow(!keepBelow() ); +} + +void PlastikClient::keepAboveChange(bool above) +{ if (m_button[AboveButton]) { m_button[AboveButton]->setOn(above); @@ -830,11 +841,9 @@ void PlastikClient::slotKeepAbove() m_button[BelowButton]->setTipText( i18n("Keep below others") ); } } - -void PlastikClient::slotKeepBelow() + +void PlastikClient::keepBelowChange(bool below) { - bool below = !keepBelow(); - setKeepBelow( below ); if (m_button[BelowButton]) { m_button[BelowButton]->setOn(below); diff --git a/clients/plastik/plastikclient.h b/clients/plastik/plastikclient.h index eb5318444f..adb64721de 100644 --- a/clients/plastik/plastikclient.h +++ b/clients/plastik/plastikclient.h @@ -73,6 +73,8 @@ protected: virtual Position mousePosition(const QPoint &point) const; private slots: + void keepAboveChange(bool above); + void keepBelowChange(bool below); void slotMaximize(); void slotShade(); void slotKeepAbove();