SVN_SILENT Renamed tilingMode to tilingEnabled to better convey its boolean-ness

svn path=/trunk/KDE/kdebase/workspace/; revision=1123140
This commit is contained in:
Nikhil Marathe 2010-05-05 12:09:49 +00:00
parent 70c9e98c41
commit a2a7891789
7 changed files with 29 additions and 29 deletions

View file

@ -260,7 +260,7 @@ void Workspace::setActiveClient( Client* c, allowed_t )
if( effects )
static_cast<EffectsHandlerImpl*>(effects)->windowActivated( active_client ? active_client->effectWindow() : NULL );
if( tilingMode() )
if( tilingEnabled() )
notifyWindowActivated( active_client );
--set_active_client_recursion;
}

View file

@ -2816,7 +2816,7 @@ void Client::finishMoveResize( bool cancel )
leaveMoveResize();
if( workspace()->tilingMode() )
if( workspace()->tilingEnabled() )
{
if( wasResize )
workspace()->notifyWindowResizeDone( this, moveResizeGeom, initialMoveResizeGeom, cancel );
@ -3045,7 +3045,7 @@ void Client::handleMoveResize( int x, int y, int x_root, int y_root )
if( isResize())
{
// query layout for supported resize mode
if( workspace()->tilingMode() )
if( workspace()->tilingEnabled() )
{
mode = workspace()->supportedTilingResizeMode( this, mode );
}
@ -3085,7 +3085,7 @@ void Client::handleMoveResize( int x, int y, int x_root, int y_root )
case PositionCenter:
// exception for tiling
// Center means no resizing allowed
if( workspace()->tilingMode() )
if( workspace()->tilingEnabled() )
{
finishMoveResize( false );
buttonDown = false;
@ -3308,7 +3308,7 @@ void Client::performMoveResize()
}
else
{
if( !workspace()->tilingMode() )
if( !workspace()->tilingEnabled() )
setGeometry( moveResizeGeom );
positionGeometryTip();
}

8
sm.cpp
View file

@ -85,11 +85,11 @@ void Workspace::storeSession( KConfig* config, SMSavePhase phase )
if( phase == SMSavePhase2 || phase == SMSavePhase2Full )
{
cg.writeEntry( "tiling", tilingMode() );
if( tilingMode() )
cg.writeEntry( "tiling", tilingEnabled() );
if( tilingEnabled() )
{
kDebug(1212) << "Tiling was ON";
setTilingMode( false );
setTilingEnabled( false );
}
}
@ -180,7 +180,7 @@ void Workspace::loadSessionInfo()
session.clear();
KConfigGroup cg(kapp->sessionConfig(), "Session");
setTilingMode( cg.readEntry( "tiling", false ) );
setTilingEnabled( cg.readEntry( "tiling", false ) );
int count = cg.readEntry( "count",0 );
int active_client = cg.readEntry( "active",0 );

View file

@ -35,17 +35,17 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
namespace KWin
{
bool Workspace::tilingMode() const
bool Workspace::tilingEnabled() const
{
return tilingMode_;
return tilingEnabled_;
}
void Workspace::setTilingMode( bool tiling )
void Workspace::setTilingEnabled( bool tiling )
{
if( tilingMode() == tiling ) return;
tilingMode_ = tiling;
if( tilingEnabled() == tiling ) return;
tilingEnabled_ = tiling;
if( tilingMode_ )
if( tilingEnabled_ )
{
tilingLayouts.resize( numberOfDesktops() + 1 );
foreach( Client *c, stackingOrder() )
@ -62,15 +62,15 @@ void Workspace::setTilingMode( bool tiling )
void Workspace::slotToggleTiling()
{
if ( tilingMode() )
if ( tilingEnabled() )
{
setTilingMode( false );
setTilingEnabled( false );
QString message = i18n( "Tiling Disabled" );
KNotification::event( "tilingdisabled", message, QPixmap(), NULL, KNotification::CloseOnTimeout, KComponentData( "kwin" ) );
}
else
{
setTilingMode( true );
setTilingEnabled( true );
QString message = i18n( "Tiling Enabled" );
KNotification::event( "tilingenabled", message, QPixmap(), NULL, KNotification::CloseOnTimeout, KComponentData( "kwin" ) );
}
@ -84,7 +84,7 @@ void Workspace::createTile( Client *c )
if( c->desktop() < 0 || c->desktop() >= tilingLayouts.size() ) return;
kDebug(1212) << "Now tiling " << c->caption();
if( !tilingMode() || !tileable(c) )
if( !tilingEnabled() || !tileable(c) )
return;
Tile *t = new Tile( c, clientArea( PlacementArea, c ) );
@ -144,7 +144,7 @@ void Workspace::belowCursor()
Tile* Workspace::getNiceTile() const
{
if( !tilingMode() ) return NULL;
if( !tilingEnabled() ) return NULL;
if( !tilingLayouts.value( activeClient()->desktop() ) ) return NULL;
return tilingLayouts[ activeClient()->desktop() ]->findTile( activeClient() );

View file

@ -668,7 +668,7 @@ void Workspace::performWindowOperation( Client* c, Options::WindowOperation op )
if ( !c )
return;
if( tilingMode()
if( tilingEnabled()
&& ( op == Options::MaximizeOp
|| op == Options::HMaximizeOp
|| op == Options::VMaximizeOp

View file

@ -96,7 +96,7 @@ Workspace::Workspace( bool restore )
, desktopGrid_( new int[2] )
, currentDesktop_( 0 )
, desktopLayoutDynamicity_( false )
, tilingMode_( false )
, tilingEnabled_( false )
// Unsorted
, active_popup( NULL )
, active_popup_client( NULL )
@ -473,7 +473,7 @@ void Workspace::init()
CopyFromParent, CopyFromParent, CopyFromParent, CWOverrideRedirect, &attr );
// Enable/disable tiling
setTilingMode( options->tilingOn );
setTilingEnabled( options->tilingOn );
// SELI TODO: This won't work with unreasonable focus policies,
// and maybe in rare cases also if the selected client doesn't
@ -660,7 +660,7 @@ void Workspace::removeClient( Client* c, allowed_t )
tab_box->nextPrev( true );
Q_ASSERT( clients.contains( c ) || desktops.contains( c ));
if( tilingMode() && tilingLayouts.value(c->desktop()) )
if( tilingEnabled() && tilingLayouts.value(c->desktop()) )
{
removeTile( c );
}
@ -1151,7 +1151,7 @@ void Workspace::slotReconfigure()
discardUsedWindowRules( *it, false );
}
setTilingMode( options->tilingOn );
setTilingEnabled( options->tilingOn );
// just so that we reset windows in the right manner, 'activate' the current active window
notifyWindowActivated( activeClient() );
rootInfo->setSupported( NET::WM2FrameOverlap, mgr->factory()->supports( AbilityExtendIntoClientArea ) );
@ -1421,7 +1421,7 @@ bool Workspace::setCurrentDesktop( int new_desktop )
{
int old_desktop = movingClient->desktop();
movingClient->setDesktop( new_desktop );
if( tilingMode() )
if( tilingEnabled() )
{
notifyWindowDesktopChanged( movingClient, old_desktop );
}

View file

@ -174,8 +174,8 @@ class Workspace : public QObject, public KDecorationDefines
//-------------------------------------------------
// Tiling
public:
bool tilingMode() const;
void setTilingMode( bool tiling );
bool tilingEnabled() const;
void setTilingEnabled( bool tiling );
void updateAllTiles();
void notifyWindowResize( Client *c, const QRect &moveResizeGeom, const QRect &orig );
void notifyWindowMove( Client *c, const QRect &moveResizeGeom, const QRect &orig );
@ -305,7 +305,7 @@ class Workspace : public QObject, public KDecorationDefines
int currentDesktop_;
bool desktopLayoutDynamicity_;
bool tilingMode_;
bool tilingEnabled_;
QVector<TilingLayout *> tilingLayouts;
//-------------------------------------------------