Add "show desktop" to screen edges.

FEATURE: 195359

svn path=/trunk/KDE/kdebase/workspace/; revision=988839
This commit is contained in:
Martin Gräßlin 2009-06-28 20:32:50 +00:00
parent 494c3a98be
commit 369910865a
4 changed files with 10 additions and 0 deletions

View file

@ -170,6 +170,7 @@ void KWinScreenEdgesConfig::monitorInit()
{
monitorAddItem( i18n( "No Action" ));
monitorAddItem( i18n( "Show Dashboard" ));
monitorAddItem( i18n( "Show Desktop" ));
// Search the effect names
KServiceTypeTrader* trader = KServiceTypeTrader::self();
@ -298,6 +299,8 @@ void KWinScreenEdgesConfig::monitorSaveAction( int edge, const QString& configNa
int item = m_ui->monitor->selectedEdgeItem( edge );
if( item == 1 ) // Plasma dashboard
config.writeEntry( configName, "Dashboard" );
else if( item == 2 )
config.writeEntry( configName, "ShowDesktop" );
else // Anything else
config.writeEntry( configName, "None" );
}

View file

@ -80,6 +80,7 @@ enum ElectricBorderAction
{
ElectricActionNone, // No special action, not set, desktop switch or an effect
ElectricActionDashboard, // Launch the Plasma dashboard
ElectricActionShowDesktop, // Show desktop or restore
ELECTRIC_ACTION_COUNT
};

View file

@ -263,6 +263,7 @@ ElectricBorderAction Options::electricBorderAction( const QString& name )
{
QString lowerName = name.toLower();
if( lowerName == "dashboard" ) return ElectricActionDashboard;
else if( lowerName == "showdesktop" ) return ElectricActionShowDesktop;
return ElectricActionNone;
}

View file

@ -2174,6 +2174,11 @@ void Workspace::checkElectricBorder(const QPoint& pos, Time now)
plasmaApp.call( "toggleDashboard" );
}
break;
case ElectricActionShowDesktop:
{
setShowingDesktop( !showingDesktop() );
break;
}
case ElectricActionNone: // Either desktop switching or an effect
default:
{