diff --git a/tiling.cpp b/tiling.cpp index 37d6c716e6..07411f3a8d 100644 --- a/tiling.cpp +++ b/tiling.cpp @@ -98,7 +98,7 @@ void Workspace::createTile( Client *c ) if( !tilingLayouts.value(c->desktop()) ) { - tilingLayouts[c->desktop()] = TilingLayoutFactory::createLayout( TilingLayoutFactory::DefaultL, this ); + tilingLayouts[c->desktop()] = TilingLayoutFactory::createLayout( TilingLayoutFactory::DefaultLayout, this ); } tilingLayouts[c->desktop()]->addTile( t ); tilingLayouts[c->desktop()]->commit(); @@ -224,7 +224,7 @@ void Workspace::notifyWindowDesktopChanged( Client *c, int old_desktop ) // TODO: copied from createTile(), move this into separate method? if( !tilingLayouts.value( c->desktop() ) ) { - tilingLayouts[c->desktop()] = TilingLayoutFactory::createLayout( TilingLayoutFactory::DefaultL, this ); + tilingLayouts[c->desktop()] = TilingLayoutFactory::createLayout( TilingLayoutFactory::DefaultLayout, this ); } if( t ) diff --git a/tilinglayoutfactory.cpp b/tilinglayoutfactory.cpp index 0716a4c0fb..5422ecf0e9 100644 --- a/tilinglayoutfactory.cpp +++ b/tilinglayoutfactory.cpp @@ -35,10 +35,10 @@ along with this program. If not, see . // w is the workspace pointer #define ADD_LAYOUT( lay ) \ - case lay##L:\ + case lay##Layout:\ kDebug(1212) << #lay;\ layout = new lay( w );\ - layout->setLayoutType( lay##L );\ + layout->setLayoutType( lay##Layout );\ Notify::raise( Notify::TilingLayoutChanged, \ i18n( "Layout changed to %1", i18n(#lay) ) ); \ break @@ -48,13 +48,13 @@ namespace KWin TilingLayout* TilingLayoutFactory::createLayout( int type, Workspace *w ) { - Q_ASSERT( type != First && type != Last ); + Q_ASSERT( type != FirstLayout && type != LastLayout ); TilingLayout *layout; /* For new layouts, make a case entry here */ switch( type ) { - case DefaultL: // NOTE: fall through makes first layout default + case DefaultLayout: // NOTE: fall through makes first layout default layout = createLayout( indexToLayoutIndex( options->tilingLayout ), w ); break; @@ -78,18 +78,18 @@ TilingLayout* TilingLayoutFactory::cycleLayout( TilingLayout *curr, bool next ) { type++; - if( type >= Last ) - type = First + 1; + if( type >= LastLayout ) + type = FirstLayout + 1; } else { type--; - if( type <= First ) - type = Last - 1; + if( type <= FirstLayout ) + type = LastLayout - 1; } - QList tiles = curr->tiles(); //root->flatten(); + QList tiles = curr->tiles(); TilingLayout *l = createLayout( type, curr->workspace() ); @@ -115,11 +115,11 @@ TilingLayout* TilingLayoutFactory::cycleLayout( TilingLayout *curr, bool next ) */ int TilingLayoutFactory::indexToLayoutIndex( int index ) { - int layout = DefaultL + index + 1; - if( layout >= Last ) - layout = DefaultL + 1; - if( layout <= First ) - layout = Last - 1; + int layout = DefaultLayout + index + 1; + if( layout >= LastLayout ) + layout = DefaultLayout + 1; + if( layout <= FirstLayout ) + layout = LastLayout - 1; return layout; } } // end namespace diff --git a/tilinglayoutfactory.h b/tilinglayoutfactory.h index c4a8b8376a..e73e3b6fcc 100644 --- a/tilinglayoutfactory.h +++ b/tilinglayoutfactory.h @@ -34,16 +34,16 @@ class TilingLayoutFactory * Remember to suffix an L for now */ enum Layouts { - First, // special, do not modify/move - DefaultL, + FirstLayout, // special, do not modify/move + DefaultLayout, /* Actual layouts */ - SpiralL, - ColumnsL, - FloatingL, + SpiralLayout, + ColumnsLayout, + FloatingLayout, /* Put your layout above this line ^^^ */ - Last // special, do not modify/move + LastLayout // special, do not modify/move }; static TilingLayout* createLayout( int type, Workspace * );