From c0ad2c2229fb7a43e0803764294d2985de5905dd Mon Sep 17 00:00:00 2001
From: Alexander Golubev <fatzer2@gmail.com>
Date: Fri, 27 Mar 2026 14:26:06 +0300
Subject: [minor] Some whitespace fixups

---
 kcontrol/background/bgdialog.cpp  |  74 +++---
 kcontrol/background/bgmonitor.cpp |  38 +--
 kcontrol/background/bgmonitor.h   |  22 +-
 kcontrol/background/bgrender.cpp  | 510 +++++++++++++++++++-------------------
 kcontrol/background/bgrender.h    |  12 +-
 kcontrol/background/main.cpp      |  14 +-
 kcontrol/tdm/background.cpp       |   6 +-
 kdesktop/kdiconview.cpp           | 390 ++++++++++++++---------------
 8 files changed, 533 insertions(+), 533 deletions(-)

diff --git a/kcontrol/background/bgdialog.cpp b/kcontrol/background/bgdialog.cpp
index c3531c07f..250c6cafa 100644
--- a/kcontrol/background/bgdialog.cpp
+++ b/kcontrol/background/bgdialog.cpp
@@ -71,23 +71,23 @@ BGDialog::BGDialog(TQWidget* parent, TDEConfig* _config, bool _multidesktop)
    m_pDirs = TDEGlobal::dirs();
    m_multidesktop = _multidesktop;
    m_previewUpdates = true;
-   
+
    TWinModule *m_twin;
    m_twin = new TWinModule(this);
    m_curDesk = m_twin->currentDesktop();
    TQSize s(m_twin->numberOfViewports(m_twin->currentDesktop()));
    m_useViewports = s.width() * s.height() > 1;
-   
+
    m_numDesks = m_multidesktop ? KWin::numberOfDesktops() : 1;
    m_numViewports = s.width() * s.height();
    m_numScreens = TQApplication::desktop()->numScreens();
-   
+
    TQCString multiHead = getenv("TDE_MULTIHEAD");
-   if (multiHead.lower() == "true") 
+   if (multiHead.lower() == "true")
    {
       m_numScreens = 1;
    }
-   
+
    TQPoint vx(m_twin->currentViewport(m_twin->currentDesktop()));
    int t_eViewport = (vx.x() * vx.y());
    if (t_eViewport < 1) {
@@ -98,11 +98,11 @@ BGDialog::BGDialog(TQWidget* parent, TDEConfig* _config, bool _multidesktop)
    m_desk = m_multidesktop ? KWin::currentDesktop() : 1;
    m_desk = m_multidesktop ? (m_useViewports ? (((m_desk - 1) * m_numViewports) + t_eViewport) : m_desk) : m_desk;
    m_numDesks = m_multidesktop ? (m_useViewports ? (m_numDesks * m_numViewports) : m_numDesks) : m_numDesks;
-   
+
    m_screen = TQApplication::desktop()->screenNumber(this);
    if (m_screen >= (int)m_numScreens)
       m_screen = m_numScreens-1;
-   
+
    m_eDesk = m_pGlobals->commonDeskBackground() ? 0 : m_desk;
    getEScreen();
    m_copyAllDesktops = true;
@@ -121,7 +121,7 @@ BGDialog::BGDialog(TQWidget* parent, TDEConfig* _config, bool _multidesktop)
       m_screen = 0;
       m_eScreen = 0;
    }
-   
+
    connect(m_buttonIdentifyScreens, TQ_SIGNAL(clicked()), TQ_SLOT(slotIdentifyScreens()));
 
    // preview monitor
@@ -131,7 +131,7 @@ BGDialog::BGDialog(TQWidget* parent, TDEConfig* _config, bool _multidesktop)
    {
        // desktop
        connect(m_comboDesktop, TQ_SIGNAL(activated(int)),
-	       TQ_SLOT(slotSelectDesk(int)));
+               TQ_SLOT(slotSelectDesk(int)));
    }
    if (m_numScreens > 1)
    {
@@ -185,26 +185,26 @@ BGDialog::BGDialog(TQWidget* parent, TDEConfig* _config, bool _multidesktop)
 
    // renderers
    m_renderer.resize(m_numDesks+1);
-   
+
    if (m_numScreens > 1)
    {
       for (unsigned i = 0; i < m_numDesks+1; ++i)
       {
          m_renderer[i].resize(m_numScreens+2);
          m_renderer[i].setAutoDelete(true);
-         
+
          int eDesk = i>0 ? i-1 : 0;
-         
+
          // Setup the merged-screen renderer
          KBackgroundRenderer * r = new KBackgroundRenderer(eDesk, 0, false, _config);
          m_renderer[i].insert( 0, r );
          connect( r, TQ_SIGNAL(imageDone(int,int)), TQ_SLOT(slotPreviewDone(int,int)) );
-         
+
          // Setup the common-screen renderer
          r = new KBackgroundRenderer(eDesk, 0, true, _config);
          m_renderer[i].insert( 1, r );
          connect( r, TQ_SIGNAL(imageDone(int,int)), TQ_SLOT(slotPreviewDone(int,int)) );
-         
+
          // Setup the remaining renderers for each screen
          for (unsigned j=0; j < m_numScreens; ++j )
          {
@@ -221,7 +221,7 @@ BGDialog::BGDialog(TQWidget* parent, TDEConfig* _config, bool _multidesktop)
          m_renderer[i].resize(1);
          m_renderer[i].setAutoDelete(true);
       }
-      
+
       // set up the common desktop renderer
       KBackgroundRenderer * r = new KBackgroundRenderer(0, 0, false, _config);
       m_renderer[0].insert(0, r);
@@ -305,7 +305,7 @@ void BGDialog::getEScreen()
       m_eScreen = m_pGlobals->commonScreenBackground() ? 1 : m_screen+2;
    else
       m_eScreen = 0;
-   
+
    if ( m_numScreens == 1 )
       m_eScreen = 0;
    else if ( m_eScreen > int(m_numScreens+1) )
@@ -341,7 +341,7 @@ void BGDialog::load( bool useDefaults )
    m_pGlobals->readSettings();
    m_eDesk = m_pGlobals->commonDeskBackground() ? 0 : m_desk;
    getEScreen();
-   
+
    for (unsigned desk = 0; desk < m_renderer.size(); ++desk)
    {
       unsigned eDesk = desk>0 ? desk-1 : 0;
@@ -351,7 +351,7 @@ void BGDialog::load( bool useDefaults )
          m_renderer[desk][screen]->load( eDesk, eScreen, (screen>0), useDefaults );
       }
    }
-   
+
    m_copyAllDesktops = true;
    m_copyAllScreens = true;
 
@@ -374,28 +374,28 @@ void BGDialog::load( bool useDefaults )
 void BGDialog::save()
 {
    m_pGlobals->writeSettings();
-   
+
    // write out the common desktop or the "Desktop 1" settings
    // depending on which are the real settings
    // they both share Desktop[0] in the config file
    // similar for screen...
-   
+
    for (unsigned desk = 0; desk < m_renderer.size(); ++desk)
    {
       if (desk == 0 && !m_pGlobals->commonDeskBackground())
          continue;
-      
+
       if (desk == 1 && m_pGlobals->commonDeskBackground())
          continue;
-      
+
       for (unsigned screen = 0; screen < m_renderer[desk].size(); ++screen)
       {
          if (screen == 1 && !m_pGlobals->commonScreenBackground())
             continue;
-         
+
          if (screen == 2 && m_pGlobals->commonScreenBackground())
             continue;
-         
+
          m_renderer[desk][screen]->writeSettings();
       }
    }
@@ -405,7 +405,7 @@ void BGDialog::save()
 
 void BGDialog::defaults()
 {
-	load( true );
+   load( true );
    eRenderer()->setWallpaper( eRenderer()->wallpaper() );
 }
 
@@ -474,7 +474,7 @@ void BGDialog::initUI()
          }
       }
    }
-   
+
    // Screens
    for (unsigned i = 0; i < m_numScreens; ++i)
       m_comboScreen->insertItem( i18n("Screen %1").arg(TQString::number(i+1)) );
@@ -541,7 +541,7 @@ void BGDialog::loadWallpaperFilesList() {
 
       int slash = (*it).findRev('/') + 1;
       TQString directory = (*it).left(slash);
-      
+
       TQString imageCaption = fileConfig.readEntry("Name");
       TQString fileName = fileConfig.readEntry("File");
 
@@ -549,7 +549,7 @@ void BGDialog::loadWallpaperFilesList() {
          hiddenfiles.append(directory + fileName);
          continue;
       }
-      
+
       if (imageCaption.isEmpty())
       {
          imageCaption = fileName;
@@ -571,8 +571,8 @@ void BGDialog::loadWallpaperFilesList() {
       canLoadScaleable = true;
 #endif
       if ( fileConfig.readEntry("ImageType") == "pixmap" || canLoadScaleable ) {
-	      papers[lrs] = qMakePair(rs, directory + fileName);
-	      files.append(directory + fileName);
+         papers[lrs] = qMakePair(rs, directory + fileName);
+         files.append(directory + fileName);
       }
    }
 
@@ -671,7 +671,7 @@ void BGDialog::slotWallpaperSelection()
    KImageFilePreview* previewWidget = new KImageFilePreview(&dlg);
    dlg.setPreviewWidget(previewWidget);
 
-   TQStringList mimeTypes = KImageIO::mimeTypes( KImageIO::Reading ); 
+   TQStringList mimeTypes = KImageIO::mimeTypes( KImageIO::Reading );
 #ifdef HAVE_LIBART
    mimeTypes += "image/svg+xml";
 #endif
@@ -843,7 +843,7 @@ void BGDialog::updateUI()
 void BGDialog::slotPreviewDone(int desk_done, int screen_done)
 {
    int currentDesk = (m_eDesk > 0) ? m_eDesk-1 : 0;
-   
+
    if ( desk_done != currentDesk )
       return;
 
@@ -1136,17 +1136,17 @@ void BGDialog::slotSelectScreen(int screen)
          }
       }
    }
-   
+
    if (screen == m_eScreen )
    {
       return; // Nothing to do
    }
 
    m_copyAllScreens = false;
-   
+
    bool drawBackgroundPerScreen = screen > 0;
    bool commonScreenBackground = screen < 2;
-   
+
    // Update drawBackgroundPerScreen
    if (m_eDesk == 0)
    {
@@ -1157,9 +1157,9 @@ void BGDialog::slotSelectScreen(int screen)
    {
       m_pGlobals->setDrawBackgroundPerScreen(m_eDesk-1, drawBackgroundPerScreen);
    }
-   
+
    m_pGlobals->setCommonScreenBackground(commonScreenBackground);
-   
+
    if (screen < 2)
       emit changed(true);
    else
diff --git a/kcontrol/background/bgmonitor.cpp b/kcontrol/background/bgmonitor.cpp
index ac826a1ff..fac987d9a 100644
--- a/kcontrol/background/bgmonitor.cpp
+++ b/kcontrol/background/bgmonitor.cpp
@@ -5,16 +5,16 @@
    Copyright (C) 2002 Laurent Montel <montell@club-internet.fr>
    Copyright (C) 2003 Waldo Bastian <bastian@kde.org>
    Copyright (C) 2005 David Saxton <david@bluehaze.org>
-  
+
    This program is free software; you can redistribute it and/or
-   modify it under the terms of the GNU General Public License 
+   modify it under the terms of the GNU General Public License
    version 2 as published by the Free Software Foundation.
-   
+
    This library is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
    Library General Public License for more details.
-   
+
    You should have received a copy of the GNU Library General Public License
    along with this library; see the file COPYING.LIB.  If not, write to
    the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
@@ -41,15 +41,15 @@ BGMonitorArrangement::BGMonitorArrangement(TQWidget *parent, const char *name)
     : TQWidget(parent, name)
 {
     m_pBGMonitor.resize( TQApplication::desktop()->numScreens(), 0l );
-    
+
     for (int screen = 0; screen < TQApplication::desktop()->numScreens(); ++screen)
     {
         BGMonitorLabel * label = new BGMonitorLabel(this);
         m_pBGMonitor[screen] = label;
-        
+
         connect( label->monitor(), TQ_SIGNAL(imageDropped(const TQString &)), this, TQ_SIGNAL(imageDropped(const TQString &)) );
     }
-    
+
     parent->setFixedSize(200, 186);
     setFixedSize(200, 186);
     updateArrangement();
@@ -92,37 +92,37 @@ void BGMonitorArrangement::updateArrangement()
     // value. The expanded value is used for setting the size of the monitor
     // image that contains the preview of the background. The monitor image
     // will set the background preview back to the normal value.
-    
+
     TQRect overallGeometry;
     for (int screen = 0; screen < TQApplication::desktop()->numScreens(); ++screen)
         overallGeometry |= TQApplication::desktop()->screenGeometry(screen);
-    
+
     TQRect expandedOverallGeometry = expandToPreview(overallGeometry);
-    
+
     double scale = TQMIN(
                 double(width()) / double(expandedOverallGeometry.width()),
                 double(height()) / double(expandedOverallGeometry.height())
                        );
-    
+
     m_combinedPreviewSize = overallGeometry.size() * scale;
-    
+
     m_maxPreviewSize = TQSize(0,0);
     int previousMax = 0;
-    
+
     for (int screen = 0; screen < TQApplication::desktop()->numScreens(); ++screen)
     {
         TQPoint topLeft = (TQApplication::desktop()->screenGeometry(screen).topLeft() - overallGeometry.topLeft()) * scale;
         TQPoint expandedTopLeft = expandToPreview(topLeft);
-        
+
         TQSize previewSize = TQApplication::desktop()->screenGeometry(screen).size() * scale;
         TQSize expandedPreviewSize = expandToPreview(previewSize);
-        
+
         if ( (previewSize.width() * previewSize.height()) > previousMax )
         {
             previousMax = previewSize.width() * previewSize.height();
             m_maxPreviewSize = previewSize;
         }
-        
+
         m_pBGMonitor[screen]->setPreviewPosition( TQRect( topLeft, previewSize ) );
         m_pBGMonitor[screen]->setGeometry( TQRect( expandedTopLeft, expandedPreviewSize ) );
         m_pBGMonitor[screen]->updateMonitorGeometry();
@@ -142,7 +142,7 @@ void BGMonitorArrangement::setPixmap( const KPixmap & pm )
     for (unsigned screen = 0; screen < m_pBGMonitor.size(); ++screen)
     {
         TQRect position = m_pBGMonitor[screen]->previewPosition();
-        
+
         TQPixmap monitorPixmap( position.size(), pm.depth() );
         copyBlt( &monitorPixmap, 0, 0, &pm, position.x(), position.y(), position.width(), position.height() );
         m_pBGMonitor[screen]->monitor()->setPixmap(monitorPixmap);
@@ -160,7 +160,7 @@ BGMonitorLabel::BGMonitorLabel(TQWidget *parent, const char *name)
     setScaledContents(true);
     setPixmap( TQPixmap( locate("data",  "kcontrol/pics/monitor.png") ) );
     m_pBGMonitor = new BGMonitor(this);
-    
+
     TQWhatsThis::add( this, i18n("This picture of a monitor contains a preview of what the current settings will look like on your desktop.") );
 }
 
@@ -169,7 +169,7 @@ void BGMonitorLabel::updateMonitorGeometry()
 {
     double scaleX = double(width()) / double(sizeHint().width());
     double scaleY = double(height()) / double(sizeHint().height());
-    
+
     kdDebug() << k_funcinfo << " Setting geometry to " << TQRect( int(23*scaleX), int(14*scaleY), int(151*scaleX), int(115*scaleY) ) << endl;
     m_pBGMonitor->setGeometry( int(23*scaleX), int(14*scaleY), int(151*scaleX), int(115*scaleY) );
 }
diff --git a/kcontrol/background/bgmonitor.h b/kcontrol/background/bgmonitor.h
index 95608261b..054154cef 100644
--- a/kcontrol/background/bgmonitor.h
+++ b/kcontrol/background/bgmonitor.h
@@ -5,16 +5,16 @@
    Copyright (C) 2002 Laurent Montel <montell@club-internet.fr>
    Copyright (C) 2003 Waldo Bastian <bastian@kde.org>
    Copyright (C) 2005 David Saxton <david@bluehaze.org>
-  
+
    This program is free software; you can redistribute it and/or
-   modify it under the terms of the GNU General Public License 
+   modify it under the terms of the GNU General Public License
    version 2 as published by the Free Software Foundation.
-   
+
    This library is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
    Library General Public License for more details.
-   
+
    You should have received a copy of the GNU Library General Public License
    along with this library; see the file COPYING.LIB.  If not, write to
    the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
@@ -41,7 +41,7 @@ class BGMonitorArrangement : public TQWidget
     TQ_OBJECT
 public:
     BGMonitorArrangement(TQWidget *parent, const char *name=0L);
-    
+
     /**
      * Splits up the pixmap according to monitor geometries and sets each
      * BGMonitor pixmap accordingly.
@@ -50,19 +50,19 @@ public:
     TQSize combinedPreviewSize() const { return m_combinedPreviewSize; }
     TQSize maxPreviewSize() const { return m_maxPreviewSize; }
     unsigned numMonitors() const { return m_pBGMonitor.size(); }
-    
+
     BGMonitor * monitor( unsigned screen ) const;
     void updateArrangement();
 
 signals:
     void imageDropped(const TQString &);
-    
+
 protected:
     virtual void resizeEvent( TQResizeEvent * );
     TQRect expandToPreview( TQRect r ) const;
     TQSize expandToPreview( TQSize s ) const;
     TQPoint expandToPreview( TQPoint p ) const;
-    
+
     TQValueVector<BGMonitorLabel*> m_pBGMonitor;
     TQSize m_combinedPreviewSize;
     TQSize m_maxPreviewSize;
@@ -75,13 +75,13 @@ class BGMonitorLabel : public TQLabel
 {
 public:
     BGMonitorLabel(TQWidget *parent, const char *name=0L);
-    
+
     BGMonitor * monitor() const { return m_pBGMonitor; }
     void updateMonitorGeometry();
-    
+
     void setPreviewPosition( TQRect r ) { m_previewPosition = r; }
     TQRect previewPosition() const { return m_previewPosition; }
-    
+
 protected:
     virtual void resizeEvent( TQResizeEvent * );
     BGMonitor * m_pBGMonitor;
diff --git a/kcontrol/background/bgrender.cpp b/kcontrol/background/bgrender.cpp
index 522065711..9ec5a31fa 100644
--- a/kcontrol/background/bgrender.cpp
+++ b/kcontrol/background/bgrender.cpp
@@ -102,8 +102,8 @@ void KBackgroundRenderer::tile(TQImage& dest, TQRect rect, const TQImage& src)
     int sw = src.width(), sh = src.height();
 
     for (y=offy; y<offy+h; y++)
-	for (x=offx; x<offx+w; x++)
-	    dest.setPixel(x, y, src.pixel(x%sw, y%sh));
+        for (x=offx; x<offx+w; x++)
+            dest.setPixel(x, y, src.pixel(x%sw, y%sh));
 }
 
 
@@ -123,7 +123,7 @@ TQString KBackgroundRenderer::buildCommand()
         cmd = command();
 
     if (cmd.isEmpty())
-	return TQString();
+        return TQString();
 
     while ((pos = cmd.find('%', pos)) != -1) {
 
@@ -177,8 +177,8 @@ int KBackgroundRenderer::doBackground(bool quit)
       bgmode= Flat;
 
     if (quit) {
-	if (bgmode == Program && m_pProc)
-	    m_pProc->kill();
+        if (bgmode == Program && m_pProc)
+            m_pProc->kill();
         return Done;
     }
 
@@ -201,7 +201,7 @@ int KBackgroundRenderer::doBackground(bool quit)
 
     case Flat:
         // this can be tiled correctly without problems
-	m_Background.create( tileWidth, tileHeight, 32);
+        m_Background.create( tileWidth, tileHeight, 32);
         m_Background.fill(colorA().rgb());
         break;
 
@@ -213,18 +213,18 @@ int KBackgroundRenderer::doBackground(bool quit)
         if (file.isEmpty())
             break;
 
-	m_Background.load(file);
-	if (m_Background.isNull())
-	    break;
-	int w = m_Background.width();
-	int h = m_Background.height();
-	if ((w > m_Size.width()) || (h > m_Size.height())) {
-	    w = TQMIN(w, m_Size.width());
-	    h = TQMIN(h, m_Size.height());
-	    m_Background = m_Background.copy(0, 0, w, h);
-	}
-	KImageEffect::flatten(m_Background, colorA(), colorB(), 0);
-	break;
+        m_Background.load(file);
+        if (m_Background.isNull())
+            break;
+        int w = m_Background.width();
+        int h = m_Background.height();
+        if ((w > m_Size.width()) || (h > m_Size.height())) {
+            w = TQMIN(w, m_Size.width());
+            h = TQMIN(h, m_Size.height());
+            m_Background = m_Background.copy(0, 0, w, h);
+        }
+        KImageEffect::flatten(m_Background, colorA(), colorB(), 0);
+        break;
     }
     case Program:
         if (m_State & BackgroundStarted)
@@ -232,9 +232,9 @@ int KBackgroundRenderer::doBackground(bool quit)
         m_State |= BackgroundStarted;
         createTempFile();
 
-	file = buildCommand();
-	if (file.isEmpty())
-	    break;
+        file = buildCommand();
+        if (file.isEmpty())
+            break;
 
         delete m_pProc;
         m_pProc = new KShellProcess;
@@ -247,37 +247,37 @@ int KBackgroundRenderer::doBackground(bool quit)
 
     case HorizontalGradient:
     {
-	TQSize size = m_Size;
+        TQSize size = m_Size;
         // on <16bpp displays the gradient sucks when tiled because of dithering
         if( canTile())
-	    size.setHeight( tileHeight );
-	m_Background = KImageEffect::gradient(size, colorA(), colorB(),
-		KImageEffect::HorizontalGradient, 0);
+            size.setHeight( tileHeight );
+        m_Background = KImageEffect::gradient(size, colorA(), colorB(),
+                       KImageEffect::HorizontalGradient, 0);
         break;
     }
     case VerticalGradient:
     {
-	TQSize size = m_Size;
+        TQSize size = m_Size;
         // on <16bpp displays the gradient sucks when tiled because of dithering
         if( canTile())
-	    size.setWidth( tileWidth );
+            size.setWidth( tileWidth );
         m_Background = KImageEffect::gradient(size, colorA(), colorB(),
-		KImageEffect::VerticalGradient, 0);
+                       KImageEffect::VerticalGradient, 0);
         break;
     }
     case PyramidGradient:
         m_Background = KImageEffect::gradient(m_Size, colorA(), colorB(),
-		KImageEffect::PyramidGradient, 0);
+                       KImageEffect::PyramidGradient, 0);
         break;
 
     case PipeCrossGradient:
         m_Background = KImageEffect::gradient(m_Size, colorA(), colorB(),
-		KImageEffect::PipeCrossGradient, 0);
+                       KImageEffect::PipeCrossGradient, 0);
         break;
 
     case EllipticGradient:
         m_Background = KImageEffect::gradient(m_Size, colorA(), colorB(),
-		KImageEffect::EllipticGradient, 0);
+                       KImageEffect::EllipticGradient, 0);
         break;
     }
 
@@ -302,190 +302,190 @@ int KBackgroundRenderer::doWallpaper(bool quit)
     m_Wallpaper = TQImage();
     if (wpmode != NoWallpaper) {
 wp_load:
-	if (currentWallpaper().isEmpty()) {
-	    wpmode = NoWallpaper;
-	    goto wp_out;
-	}
-	TQString file = m_pDirs->findResource("wallpaper", currentWallpaper());
-	if (file.isEmpty()) {
-	    wpmode = NoWallpaper;
-	    goto wp_out;
-	}
+        if (currentWallpaper().isEmpty()) {
+            wpmode = NoWallpaper;
+            goto wp_out;
+        }
+        TQString file = m_pDirs->findResource("wallpaper", currentWallpaper());
+        if (file.isEmpty()) {
+            wpmode = NoWallpaper;
+            goto wp_out;
+        }
 
         // _Don't_ use KMimeType, as it relies on tdesycoca which we really
         // don't want in krootimage (tdm context).
         //if ( KMimeType::findByPath( file )->is( "image/svg+xml" ) ) {
         if (file.endsWith(".svg") || file.endsWith(".svgz")) {
 #ifdef HAVE_LIBART
-	    // Special stuff for SVG icons
-	    KSVGIconEngine* svgEngine = new KSVGIconEngine();
-
-	    //FIXME
-	    //ksvgiconloader doesn't seem to let us find out the
-	    //ratio of width to height so for the most part we just
-	    //assume it's a square
-	    int svgWidth;
-	    int svgHeight;
-	    switch (wpmode)
-	    {
-	        case Centred:
-	        case CentredAutoFit:
-		    svgHeight = (int)(m_Size.height() * 0.8);
-		    svgWidth = svgHeight;
-	            break;
-	        case Tiled:
-	        case CenterTiled:
-		    svgHeight = (int)(m_Size.height() * 0.5);
-		    svgWidth = svgHeight;
-	            break;
-	        case Scaled:
-		    svgHeight = m_Size.height();
-		    svgWidth = m_Size.width();
-	            break;
-	        case CentredMaxpect:
-		case ScaleAndCrop:
-	        case TiledMaxpect:
-		    svgHeight = m_Size.height();
-		    svgWidth = svgHeight;
-	            break;
-	        case NoWallpaper:
-	        default:
-	            kdWarning() << k_funcinfo << "unknown diagram type" << endl;
-		    svgHeight = m_Size.height();
-		    svgWidth = svgHeight;
-		    break;
-	    }
-	    //FIXME hack due to strangeness with
-	    //background control modules
-	    if ( svgHeight < 200 ) {
-		svgHeight *= 6;
-	        svgWidth *= 6;
-	    }
-
-	    if (svgEngine->load(svgWidth, svgHeight, file )) {
-		TQImage *image = svgEngine->image();
-		m_Wallpaper = *image;
-		delete image;
-	    } else {
-		kdWarning() << "failed to load SVG file " << file << endl;
-	    }
-
-	    delete svgEngine;
+            // Special stuff for SVG icons
+            KSVGIconEngine* svgEngine = new KSVGIconEngine();
+
+            //FIXME
+            //ksvgiconloader doesn't seem to let us find out the
+            //ratio of width to height so for the most part we just
+            //assume it's a square
+            int svgWidth;
+            int svgHeight;
+            switch (wpmode)
+            {
+                case Centred:
+                case CentredAutoFit:
+                    svgHeight = (int)(m_Size.height() * 0.8);
+                    svgWidth = svgHeight;
+                    break;
+                case Tiled:
+                case CenterTiled:
+                    svgHeight = (int)(m_Size.height() * 0.5);
+                    svgWidth = svgHeight;
+                    break;
+                case Scaled:
+                    svgHeight = m_Size.height();
+                    svgWidth = m_Size.width();
+                    break;
+                case CentredMaxpect:
+                case ScaleAndCrop:
+                case TiledMaxpect:
+                    svgHeight = m_Size.height();
+                    svgWidth = svgHeight;
+                    break;
+                case NoWallpaper:
+                default:
+                    kdWarning() << k_funcinfo << "unknown diagram type" << endl;
+                    svgHeight = m_Size.height();
+                    svgWidth = svgHeight;
+                    break;
+            }
+            //FIXME hack due to strangeness with
+            //background control modules
+            if ( svgHeight < 200 ) {
+                svgHeight *= 6;
+                svgWidth *= 6;
+            }
+
+            if (svgEngine->load(svgWidth, svgHeight, file )) {
+                TQImage *image = svgEngine->image();
+                m_Wallpaper = *image;
+                delete image;
+            } else {
+                kdWarning() << "failed to load SVG file " << file << endl;
+            }
+
+            delete svgEngine;
 #else //not libart
-	    kdWarning() << k_funcinfo
-			<< "tried to load SVG file but libart not installed" << endl;
+            kdWarning() << k_funcinfo
+                        << "tried to load SVG file but libart not installed" << endl;
 #endif
-	} else {
-	    m_Wallpaper.load(file);
-	}
-	if (m_Wallpaper.isNull()) {
+        } else {
+            m_Wallpaper.load(file);
+        }
+        if (m_Wallpaper.isNull()) {
             if (discardCurrentWallpaper())
                goto wp_load;
-	    wpmode = NoWallpaper;
-	    goto wp_out;
-	}
-	m_Wallpaper = m_Wallpaper.convertDepth(32, TQt::DiffuseAlphaDither);
-
-	// If we're previewing, scale the wallpaper down to make the preview
-	// look more like the real desktop.
-	if (m_bPreview) {
-	    int xs = m_Wallpaper.width() * m_Size.width() / m_rSize.width();
-	    int ys = m_Wallpaper.height() * m_Size.height() / m_rSize.height();
-	    if ((xs < 1) || (ys < 1))
-	    {
-	       xs = ys = 1;
-	    }
-	    if( m_Wallpaper.size() != TQSize( xs, ys ))
-		m_Wallpaper = m_Wallpaper.smoothScale(xs, ys);
-	}
-
-	// HACK: Use KFileMetaInfo only when we're attached to DCOP.
-	// KFileMetaInfo needs tdesycoca and so on, but this code is
-	// used also in krootimage (which in turn is used by tdm).
-	if( tdeApp->dcopClient()->isAttached()) {
-	    KFileMetaInfo metaInfo(file);
-	    if (metaInfo.isValid() && metaInfo.item("Orientation").isValid()) {
-		switch (metaInfo.item("Orientation").string().toInt()) {
-		    case 2:
-			// Flipped horizontally
-			m_Wallpaper = m_Wallpaper.mirror(true, false);
-			break;
-		    case 3:
-			// Rotated 180 degrees
-			m_Wallpaper = KImageEffect::rotate(m_Wallpaper, KImageEffect::Rotate180);
-			break;
-		    case 4:
-			// Flipped vertically
-			m_Wallpaper = m_Wallpaper.mirror(false, true);
-			break;
-		    case 5:
-			// Rotated 90 degrees & flipped horizontally
-			m_Wallpaper = KImageEffect::rotate(m_Wallpaper, KImageEffect::Rotate90).mirror(true, false);
-			break;
-		    case 6:
-			// Rotated 90 degrees
-			m_Wallpaper = KImageEffect::rotate(m_Wallpaper, KImageEffect::Rotate90);
-			break;
-		    case 7:
-			// Rotated 90 degrees & flipped vertically
-			m_Wallpaper = KImageEffect::rotate(m_Wallpaper, KImageEffect::Rotate90).mirror(false, true);
-			break;
-		    case 8:
-			// Rotated 270 degrees
-			m_Wallpaper = KImageEffect::rotate(m_Wallpaper, KImageEffect::Rotate270);
-			break;
-		    case 1:
-		    default:
-			// Normal or invalid orientation
-			break;
-		}
-	    }
-	}
+            wpmode = NoWallpaper;
+            goto wp_out;
+        }
+        m_Wallpaper = m_Wallpaper.convertDepth(32, TQt::DiffuseAlphaDither);
+
+        // If we're previewing, scale the wallpaper down to make the preview
+        // look more like the real desktop.
+        if (m_bPreview) {
+            int xs = m_Wallpaper.width() * m_Size.width() / m_rSize.width();
+            int ys = m_Wallpaper.height() * m_Size.height() / m_rSize.height();
+            if ((xs < 1) || (ys < 1))
+            {
+               xs = ys = 1;
+            }
+            if( m_Wallpaper.size() != TQSize( xs, ys ))
+                m_Wallpaper = m_Wallpaper.smoothScale(xs, ys);
+        }
+
+        // HACK: Use KFileMetaInfo only when we're attached to DCOP.
+        // KFileMetaInfo needs tdesycoca and so on, but this code is
+        // used also in krootimage (which in turn is used by tdm).
+        if( tdeApp->dcopClient()->isAttached()) {
+            KFileMetaInfo metaInfo(file);
+            if (metaInfo.isValid() && metaInfo.item("Orientation").isValid()) {
+                switch (metaInfo.item("Orientation").string().toInt()) {
+                    case 2:
+                        // Flipped horizontally
+                        m_Wallpaper = m_Wallpaper.mirror(true, false);
+                        break;
+                    case 3:
+                        // Rotated 180 degrees
+                        m_Wallpaper = KImageEffect::rotate(m_Wallpaper, KImageEffect::Rotate180);
+                        break;
+                    case 4:
+                        // Flipped vertically
+                        m_Wallpaper = m_Wallpaper.mirror(false, true);
+                        break;
+                    case 5:
+                        // Rotated 90 degrees & flipped horizontally
+                        m_Wallpaper = KImageEffect::rotate(m_Wallpaper, KImageEffect::Rotate90).mirror(true, false);
+                        break;
+                    case 6:
+                        // Rotated 90 degrees
+                        m_Wallpaper = KImageEffect::rotate(m_Wallpaper, KImageEffect::Rotate90);
+                        break;
+                    case 7:
+                        // Rotated 90 degrees & flipped vertically
+                        m_Wallpaper = KImageEffect::rotate(m_Wallpaper, KImageEffect::Rotate90).mirror(false, true);
+                        break;
+                    case 8:
+                        // Rotated 270 degrees
+                        m_Wallpaper = KImageEffect::rotate(m_Wallpaper, KImageEffect::Rotate270);
+                        break;
+                    case 1:
+                    default:
+                        // Normal or invalid orientation
+                        break;
+                }
+            }
+        }
     }
 wp_out:
 
     if (m_Background.isNull()) {
-	m_Background.create(8, 8, 32);
-	m_Background.fill(colorA().rgb());
+        m_Background.create(8, 8, 32);
+        m_Background.fill(colorA().rgb());
     }
 
     int retval = Done;
 
-    int w = m_Size.width();	// desktop width/height
+    int w = m_Size.width();         // desktop width/height
     int h = m_Size.height();
 
-    int ww = m_Wallpaper.width();	// wallpaper width/height
+    int ww = m_Wallpaper.width();   // wallpaper width/height
     int wh = m_Wallpaper.height();
 
-    m_WallpaperRect = TQRect();	// to be filled destination rectangle; may exceed desktop!
+    m_WallpaperRect = TQRect();     // to be filled destination rectangle; may exceed desktop!
 
     switch (wpmode)
     {
-	case NoWallpaper:
-	    break;
-	case Centred:
-	    m_WallpaperRect.setRect((w - ww) / 2, (h - wh) / 2, ww, wh);
-	    break;
-	case Tiled:
-	    m_WallpaperRect.setRect(0, 0, w, h);
-	    break;
-	case CenterTiled:
-	    m_WallpaperRect.setCoords(-ww + ((w - ww) / 2) % ww, -wh + ((h - wh) / 2) % wh, w-1, h-1);
-	    break;
-	case Scaled:
-	    ww = w;
-	    wh = h;
-	    if( m_WallpaperRect.size() != TQSize( w, h ))
-		m_Wallpaper = m_Wallpaper.smoothScale( w, h );
-	    m_WallpaperRect.setRect(0, 0, w, h);
-	    break;
+        case NoWallpaper:
+            break;
+        case Centred:
+            m_WallpaperRect.setRect((w - ww) / 2, (h - wh) / 2, ww, wh);
+            break;
+        case Tiled:
+            m_WallpaperRect.setRect(0, 0, w, h);
+            break;
+        case CenterTiled:
+            m_WallpaperRect.setCoords(-ww + ((w - ww) / 2) % ww, -wh + ((h - wh) / 2) % wh, w-1, h-1);
+            break;
+        case Scaled:
+            ww = w;
+            wh = h;
+            if( m_WallpaperRect.size() != TQSize( w, h ))
+                m_Wallpaper = m_Wallpaper.smoothScale( w, h );
+            m_WallpaperRect.setRect(0, 0, w, h);
+            break;
         case CentredAutoFit:
             if( ww <= w && wh <= h ) {
-    	        m_WallpaperRect.setRect((w - ww) / 2, (h - wh) / 2, ww, wh); // like Centred
-	        break;
+                m_WallpaperRect.setRect((w - ww) / 2, (h - wh) / 2, ww, wh); // like Centred
+                break;
             }
             // fall through
-	case CentredMaxpect:
+        case CentredMaxpect:
             {
               double sx = (double) w / ww;
               double sy = (double) h / wh;
@@ -496,12 +496,12 @@ wp_out:
                   wh = (int)(sx * wh);
                   ww = w;
               }
-	      if( m_WallpaperRect.size() != TQSize( ww, wh ))
+              if( m_WallpaperRect.size() != TQSize( ww, wh ))
                   m_Wallpaper = m_Wallpaper.smoothScale(ww, wh);
-	      m_WallpaperRect.setRect((w - ww) / 2, (h - wh) / 2, ww, wh);
-	      break;
+              m_WallpaperRect.setRect((w - ww) / 2, (h - wh) / 2, ww, wh);
+              break;
             }
-	case TiledMaxpect:
+        case TiledMaxpect:
             {
               double sx = (double) w / ww;
               double sy = (double) h / wh;
@@ -514,26 +514,26 @@ wp_out:
               }
               if( m_WallpaperRect.size() != TQSize( ww, wh ))
                   m_Wallpaper = m_Wallpaper.smoothScale(ww, wh);
-	      m_WallpaperRect.setRect(0, 0, w, h);
-	      break;
+              m_WallpaperRect.setRect(0, 0, w, h);
+              break;
             }
-	 case ScaleAndCrop:
+         case ScaleAndCrop:
             {
               double sx = (double) w / ww;
               double sy = (double) h / wh;
               if (sx > sy) {
-	      	  //Case 1: x needs bigger scaling. Lets increase x and leave part of y offscreen
+                  //Case 1: x needs bigger scaling. Lets increase x and leave part of y offscreen
                   ww = w;
-		  wh=(int)(sx * wh);
+                  wh=(int)(sx * wh);
               } else {
-	          //Case 2: y needs bigger scaling. Lets increase y and leave part of x offscreen
+                  //Case 2: y needs bigger scaling. Lets increase y and leave part of x offscreen
                   wh = h;
                   ww = (int)(sy*ww);
               }
               if( m_WallpaperRect.size() != TQSize( ww, wh ))
                   m_Wallpaper = m_Wallpaper.smoothScale(ww, wh);
-	      m_WallpaperRect.setRect((w - ww) / 2, (h - wh) / 2,w, h);
-	      break;
+              m_WallpaperRect.setRect((w - ww) / 2, (h - wh) / 2,w, h);
+              break;
             }
     }
 
@@ -610,10 +610,10 @@ void KBackgroundRenderer::fastWallpaperBlend()
         int ww = m_Wallpaper.width();
         int wh = m_Wallpaper.height();
         for (int y = m_WallpaperRect.top(); y < m_WallpaperRect.bottom(); y += wh) {
-	    for (int x = m_WallpaperRect.left(); x < m_WallpaperRect.right(); x += ww) {
-		bitBlt( &m_Pixmap, x, y, &wp_pixmap, 0, 0, ww, wh );
-	    }
-	}
+            for (int x = m_WallpaperRect.left(); x < m_WallpaperRect.right(); x += ww) {
+                bitBlt( &m_Pixmap, x, y, &wp_pixmap, 0, 0, ww, wh );
+            }
+        }
     }
 }
 
@@ -621,18 +621,18 @@ void KBackgroundRenderer::fastWallpaperBlend()
 void KBackgroundRenderer::fullWallpaperBlend()
 {
     m_Pixmap = TQPixmap();
-    int w = m_Size.width();	// desktop width/height
+    int w = m_Size.width();     // desktop width/height
     int h = m_Size.height();
     // copy background to m_pImage
     if (m_Background.size() == m_Size) {
-	m_Image = m_Background.copy();
+        m_Image = m_Background.copy();
 
-	if (m_Image.depth() < 32)
-	    m_Image = m_Image.convertDepth(32, TQt::DiffuseAlphaDither);
+        if (m_Image.depth() < 32)
+            m_Image = m_Image.convertDepth(32, TQt::DiffuseAlphaDither);
 
     } else {
-	m_Image.create(w, h, 32);
-	tile(m_Image, TQRect(0, 0, w, h), m_Background);
+        m_Image.create(w, h, 32);
+        tile(m_Image, TQRect(0, 0, w, h), m_Background);
     }
 
     // blend wallpaper to destination rectangle of m_pImage
@@ -644,11 +644,11 @@ void KBackgroundRenderer::fullWallpaperBlend()
         int ww = m_Wallpaper.width();
         int wh = m_Wallpaper.height();
         for (int y = m_WallpaperRect.top(); y < m_WallpaperRect.bottom(); y += wh) {
-	    for (int x = m_WallpaperRect.left(); x < m_WallpaperRect.right(); x += ww) {
-		blend(m_Image, TQRect(x, y, ww, wh), m_Wallpaper,
-			TQPoint(-TQMIN(x, 0), -TQMIN(y, 0)), blendFactor);
-	    }
-	}
+            for (int x = m_WallpaperRect.left(); x < m_WallpaperRect.right(); x += ww) {
+                blend(m_Image, TQRect(x, y, ww, wh), m_Wallpaper,
+                        TQPoint(-TQMIN(x, 0), -TQMIN(y, 0)), blendFactor);
+            }
+        }
     }
 
 
@@ -658,58 +658,58 @@ void KBackgroundRenderer::fullWallpaperBlend()
 
       switch( blendMode() ) {
       case HorizontalBlending:
-	KImageEffect::blend( m_Image, m_Background,
-			     KImageEffect::HorizontalGradient,
-			     bal, 100 );
-	break;
+        KImageEffect::blend( m_Image, m_Background,
+                             KImageEffect::HorizontalGradient,
+                             bal, 100 );
+        break;
 
       case VerticalBlending:
-	KImageEffect::blend( m_Image, m_Background,
-			     KImageEffect::VerticalGradient,
-			     100, bal );
-	break;
+        KImageEffect::blend( m_Image, m_Background,
+                             KImageEffect::VerticalGradient,
+                             100, bal );
+        break;
 
       case PyramidBlending:
-	KImageEffect::blend( m_Image, m_Background,
-			     KImageEffect::PyramidGradient,
-			     bal, bal );
-	break;
+        KImageEffect::blend( m_Image, m_Background,
+                             KImageEffect::PyramidGradient,
+                             bal, bal );
+        break;
 
       case PipeCrossBlending:
-	KImageEffect::blend( m_Image, m_Background,
-			     KImageEffect::PipeCrossGradient,
-			     bal, bal );
-	break;
+        KImageEffect::blend( m_Image, m_Background,
+                             KImageEffect::PipeCrossGradient,
+                             bal, bal );
+        break;
 
       case EllipticBlending:
-	KImageEffect::blend( m_Image, m_Background,
-			     KImageEffect::EllipticGradient,
-			     bal, bal );
-	break;
+        KImageEffect::blend( m_Image, m_Background,
+                             KImageEffect::EllipticGradient,
+                             bal, bal );
+        break;
 
       case IntensityBlending:
-	KImageEffect::modulate( m_Image, m_Background, reverseBlending(),
-		    KImageEffect::Intensity, bal, KImageEffect::All );
-	break;
+        KImageEffect::modulate( m_Image, m_Background, reverseBlending(),
+                                KImageEffect::Intensity, bal, KImageEffect::All );
+        break;
 
       case SaturateBlending:
-	KImageEffect::modulate( m_Image, m_Background, reverseBlending(),
-		    KImageEffect::Saturation, bal, KImageEffect::Gray );
-	break;
+        KImageEffect::modulate( m_Image, m_Background, reverseBlending(),
+                                KImageEffect::Saturation, bal, KImageEffect::Gray );
+        break;
 
       case ContrastBlending:
-	KImageEffect::modulate( m_Image, m_Background, reverseBlending(),
-		    KImageEffect::Contrast, bal, KImageEffect::All );
-	break;
+        KImageEffect::modulate( m_Image, m_Background, reverseBlending(),
+                                KImageEffect::Contrast, bal, KImageEffect::All );
+        break;
 
       case HueShiftBlending:
-	KImageEffect::modulate( m_Image, m_Background, reverseBlending(),
-		    KImageEffect::HueShift, bal, KImageEffect::Gray );
-	break;
+        KImageEffect::modulate( m_Image, m_Background, reverseBlending(),
+                                KImageEffect::HueShift, bal, KImageEffect::Gray );
+        break;
 
       case FlatBlending:
         // Already handled
-	break;
+        break;
       }
     }
 }
@@ -724,13 +724,13 @@ void KBackgroundRenderer::blend(TQImage& dst, TQRect dr, const TQImage& src, TQP
     dr &= dst.rect();
 
     for (y = 0; y < dr.height(); y++) {
-	if (dst.scanLine(dr.y() + y) && src.scanLine(soffs.y() + y)) {
-	    TQRgb *b, *d;
-	    for (x = 0; x < dr.width(); x++) {
-		b = reinterpret_cast<TQRgb*>(dst.scanLine(dr.y() + y)
-			+ (dr.x() + x) * sizeof(TQRgb));
+        if (dst.scanLine(dr.y() + y) && src.scanLine(soffs.y() + y)) {
+            TQRgb *b, *d;
+            for (x = 0; x < dr.width(); x++) {
+                b = reinterpret_cast<TQRgb*>(dst.scanLine(dr.y() + y)
+                                             + (dr.x() + x) * sizeof(TQRgb));
                 d = reinterpret_cast<TQRgb*>(const_cast<TQImage&>(src).scanLine(soffs.y() + y)
-			+ (soffs.x() + x) * sizeof(TQRgb));
+                                             + (soffs.x() + x) * sizeof(TQRgb));
                 a = (tqAlpha(*d) * blendFactor) / 100;
                 *b = tqRgb(tqRed(*b) - (((tqRed(*b) - tqRed(*d)) * a) >> 8),
                           tqGreen(*b) - (((tqGreen(*b) - tqGreen(*d)) * a) >> 8),
@@ -813,8 +813,8 @@ void KBackgroundRenderer::render()
     if (!(m_State & BackgroundDone)) {
         ret = doBackground();
         if (ret != Wait)
-	    m_pTimer->start(0, true);
-	return;
+            m_pTimer->start(0, true);
+        return;
     }
 
     // No async wallpaper
@@ -869,7 +869,7 @@ void KBackgroundRenderer::setBusyCursor(bool isBusy) {
 void KBackgroundRenderer::stop()
 {
     if (!(m_State & Rendering))
-	return;
+        return;
 
     doBackground(true);
     doWallpaper(true);
diff --git a/kcontrol/background/bgrender.h b/kcontrol/background/bgrender.h
index f9042dd56..83f47f576 100644
--- a/kcontrol/background/bgrender.h
+++ b/kcontrol/background/bgrender.h
@@ -36,8 +36,8 @@ class KCrossBGRender;
  * the monitor in kcmdisplay.
  */
 class KBackgroundRenderer:
-	public TQObject,
-	public KBackgroundSettings
+    public TQObject,
+    public KBackgroundSettings
 {
     TQ_OBJECT
 
@@ -65,7 +65,7 @@ public slots:
 signals:
     void imageDone(int desk, int screen);
     void programFailure(int desk, int exitstatus); //Guaranteed either programFailure or 
-    void programSuccess(int desk);                //programSuccess is emitted after imageDone
+    void programSuccess(int desk);                 //programSuccess is emitted after imageDone
 
 private slots:
     void slotBackgroundDone(TDEProcess *);
@@ -75,9 +75,9 @@ private slots:
 private:
     enum { Error, Wait, WaitUpdate, Done };
     enum { Rendering = 1, InitCheck = 2,
-	BackgroundStarted = 4, BackgroundDone = 8,
-	WallpaperStarted = 0x10, WallpaperDone = 0x20,
-	AllDone = 0x40 };
+           BackgroundStarted = 4, BackgroundDone = 8,
+           WallpaperStarted = 0x10, WallpaperDone = 0x20,
+           AllDone = 0x40 };
 
     TQString buildCommand();
     void createTempFile();
diff --git a/kcontrol/background/main.cpp b/kcontrol/background/main.cpp
index 23478b5e1..f65b414f6 100644
--- a/kcontrol/background/main.cpp
+++ b/kcontrol/background/main.cpp
@@ -46,12 +46,12 @@ KBackground::KBackground(TQWidget *parent, const char *name, const TQStringList
 {
     int screen_number = 0;
     if (tqt_xdisplay())
-	screen_number = DefaultScreen(tqt_xdisplay());
+        screen_number = DefaultScreen(tqt_xdisplay());
     TQCString configname;
     if (screen_number == 0)
-	configname = "kdesktoprc";
+        configname = "kdesktoprc";
     else
-	configname.sprintf("kdesktop-screen-%drc", screen_number);
+        configname.sprintf("kdesktop-screen-%drc", screen_number);
     m_pConfig = new TDEConfig(configname, false, false);
 
     TQVBoxLayout *layout = new TQVBoxLayout(this);
@@ -102,16 +102,16 @@ void KBackground::save()
     // reconfigure kdesktop. kdesktop will notify all clients
     DCOPClient *client = tdeApp->dcopClient();
     if (!client->isAttached())
-	client->attach();
+        client->attach();
 
     int screen_number = 0;
     if (tqt_xdisplay())
-	screen_number = DefaultScreen(tqt_xdisplay());
+        screen_number = DefaultScreen(tqt_xdisplay());
     TQCString appname;
     if (screen_number == 0)
-	appname = "kdesktop";
+        appname = "kdesktop";
     else
-	appname.sprintf("kdesktop-screen-%d", screen_number);
+        appname.sprintf("kdesktop-screen-%d", screen_number);
 
     client->send(appname, "KBackgroundIface", "configure()", TQString(""));
 }
diff --git a/kcontrol/tdm/background.cpp b/kcontrol/tdm/background.cpp
index efeb6b088..005be75d8 100644
--- a/kcontrol/tdm/background.cpp
+++ b/kcontrol/tdm/background.cpp
@@ -47,9 +47,9 @@ KBackground::KBackground(TQWidget *parent, const char *name)
     m_pCBEnable = new TQCheckBox( i18n("E&nable background"), this );
     TQWhatsThis::add( m_pCBEnable,
              i18n("If this is checked, TDM will use the settings below for the background."
-		" If it is disabled, you have to look after the background yourself."
-		" This is done by running some program (possibly xsetroot) in the script"
-		" specified in the Setup= option in tdmrc (usually Xsetup).") );
+                  " If it is disabled, you have to look after the background yourself."
+                  " This is done by running some program (possibly xsetroot) in the script"
+                  " specified in the Setup= option in tdmrc (usually Xsetup).") );
     config->setGroup( "X-*-Greeter" );
     m_simpleConf=new TDESimpleConfig(config->readEntry( "BackgroundCfg",KDE_CONFDIR "/tdm/backgroundrc" ) );
     m_background = new BGDialog( this, m_simpleConf, false );
diff --git a/kdesktop/kdiconview.cpp b/kdesktop/kdiconview.cpp
index 70f1010b7..8a20b59f1 100644
--- a/kdesktop/kdiconview.cpp
+++ b/kdesktop/kdiconview.cpp
@@ -386,34 +386,34 @@ void KDIconView::start()
 
 void KDIconView::configureMedia()
 {
-	kdDebug(1204) << "***********KDIconView::configureMedia() " <<endl;
-	m_dirLister->setMimeExcludeFilter(m_excludedMedia);
-	m_dirLister->emitChanges();
-	updateContents();
-	if (m_enableMedia) {
-		for (KURL::List::Iterator it1=m_mergeDirs.begin();it1!=m_mergeDirs.end();++it1) {
-			if ((*it1).url()=="media:/") {
-				return;
-			}
-		}
-		m_mergeDirs.append(KURL("media:/"));
-		m_dirLister->openURL(KURL("media:/"), true);
-	}
-	else {
-		for (KURL::List::Iterator it2=m_mergeDirs.begin();it2!=m_mergeDirs.end();++it2) {
-			if ((*it2).url()=="media:/") {
-				delete m_dirLister;
-				m_dirLister=0;
-				start();
-				if (m_mergeDirs.contains(*it2)) {
-					m_mergeDirs.remove(*it2);
-					m_dirLister->stop("media");
-				}
-				return;
-			}
-		}
-		return;
-	}
+    kdDebug(1204) << "***********KDIconView::configureMedia() " <<endl;
+    m_dirLister->setMimeExcludeFilter(m_excludedMedia);
+    m_dirLister->emitChanges();
+    updateContents();
+    if (m_enableMedia) {
+        for (KURL::List::Iterator it1=m_mergeDirs.begin();it1!=m_mergeDirs.end();++it1) {
+            if ((*it1).url()=="media:/") {
+                return;
+            }
+        }
+        m_mergeDirs.append(KURL("media:/"));
+        m_dirLister->openURL(KURL("media:/"), true);
+    }
+    else {
+        for (KURL::List::Iterator it2=m_mergeDirs.begin();it2!=m_mergeDirs.end();++it2) {
+            if ((*it2).url()=="media:/") {
+                delete m_dirLister;
+                m_dirLister=0;
+                start();
+                if (m_mergeDirs.contains(*it2)) {
+                    m_mergeDirs.remove(*it2);
+                    m_dirLister->stop("media");
+                }
+                return;
+            }
+        }
+        return;
+    }
 }
 
 void KDIconView::createActions()
@@ -810,10 +810,10 @@ void KDIconView::fillMediaListView()
     TQString excludedMedia=g_pConfig->readEntry("exclude","media/hdd_mounted,media/hdd_unmounted,media/floppy_unmounted,media/cdrom_unmounted,media/floppy5_unmounted");
     for (; it2 != mimetypes.end(); ++it2) {
        if ( ((*it2)->name().startsWith("media/")) )
-	{
-    	    bool ok=excludedMedia.contains((*it2)->name())==0;
-		new DesktopBehaviorMediaItem (mMediaListView, (*it2)->comment(), (*it2)->name(),ok);
-        }
+       {
+           bool ok=excludedMedia.contains((*it2)->name())==0;
+           new DesktopBehaviorMediaItem (mMediaListView, (*it2)->comment(), (*it2)->name(),ok);
+       }
     }
     delete g_pConfig;
 }
@@ -824,10 +824,10 @@ void KDIconView::saveMediaListView()
     g_pConfig->setGroup( "Media" );
     TQStringList exclude;
     for (DesktopBehaviorMediaItem *it=static_cast<DesktopBehaviorMediaItem *>(mMediaListView->firstChild());
-     	it; it=static_cast<DesktopBehaviorMediaItem *>(it->nextSibling()))
-    	{
-		if (!it->isOn()) exclude << it->mimeType();
-	    }
+         it; it=static_cast<DesktopBehaviorMediaItem *>(it->nextSibling()))
+    {
+        if (!it->isOn()) exclude << it->mimeType();
+    }
     g_pConfig->writeEntry("exclude",exclude);
     g_pConfig->sync();
 
@@ -897,13 +897,13 @@ bool KDIconView::deleteGlobalDesktopFiles()
         }
 
         // Ignore these special files
-        // Name			URL					Type		OnlyShowIn
-        // My Documents		XDG_DOCUMENTS_DIR 	Application	TDE;
-        // My Computer		media:/					Link		TDE;
-        // My Network Places	remote:/				Link		TDE;
-        // Printers		[exec] kjobviewer --all --show %i %m	Application	TDE;
-        // Trash		trash:/					Link		TDE;
-        // Web Browser		kfmclient openBrowser %u		Application	TDE;
+        // Name                 URL                                     Type            OnlyShowIn
+        // My Documents         XDG_DOCUMENTS_DIR       Application     TDE;
+        // My Computer          media:/                                 Link            TDE;
+        // My Network Places    remote:/                                Link            TDE;
+        // Printers             [exec] kjobviewer --all --show %i %m    Application     TDE;
+        // Trash                trash:/                                 Link            TDE;
+        // Web Browser          kfmclient openBrowser %u                Application     TDE;
 
         if ( isDesktopFile(fItem) ) {
             TDESimpleConfig cfg( fItem->url().path(), true );
@@ -1346,7 +1346,7 @@ void KDIconView::slotRefreshItems( const KFileItemList & entries )
                 break;
             }
         }
-	if ( !found )
+        if ( !found )
             kdDebug(1204) << "Item not found: " << rit.current()->url().url() << endl;
     }
     if ( bNeedPreviewJob && previewSettings().count() )
@@ -1772,73 +1772,73 @@ void KDIconView::viewportWheelEvent( TQWheelEvent * e )
 
 void KDIconView::updateWorkArea( const TQRect &wr )
 {
-	m_gotIconsArea = true;  // now we have it!
-
-	if (( iconArea() == wr ) && (m_needDesktopAlign == false)) {
-		// nothing changed; avoid repaint/saveIconPosition ...
-		return;
-	}
-
-	TQRect oldArea = iconArea();
-	setIconArea( wr );
-
-	kdDebug(1204) << "KDIconView::updateWorkArea wr: " << wr.x() << "," << wr.y() << " " << wr.width() << "x" << wr.height() << endl;
-	kdDebug(1204) << "  oldArea:                     " << oldArea.x() << "," << oldArea.y() << " " << oldArea.width() << "x" << oldArea.height() << endl;
-
-	bool needRepaint = false;
-	TQIconViewItem* item;
-	int dx, dy;
-
-	dx = wr.left() - oldArea.left();
-	dy = wr.top() - oldArea.top();
-
-	if ( dx != 0 || dy != 0 ) {
-		if ( (dx > 0) || (dy > 0) ) {
-			// the iconArea was shifted right/down; less space now
-			for ( item = firstItem(); item; item = item->nextItem() ) {
-				// check if there is any item inside the now unavailable area
-				// If so, we have to move _all_ items
-				// If not, we don't have to move any item (avoids bug:117868)
-				if ( (item->x() < wr.x()) || (item->y() < wr.y()) ) {
-					needRepaint = true;
-					break;
-				}
-			}
-		}
-		else {
-			// the iconArea was shifted left/up; more space now - use it
-			needRepaint = true;
-		}
-
-		if ( needRepaint ) {
-			for ( item = firstItem(); item; item = item->nextItem() ) {
-				item->moveBy( dx, dy );
-			}
-		}
-	}
-
-	for ( item = firstItem(); item; item = item->nextItem() ) {
-		TQRect r( item->rect() );
-		int dx = 0, dy = 0;
-		if ( r.bottom() > wr.bottom() ) {
-			dy = wr.bottom() - r.bottom() - 1;
-		}
-		if ( r.right() > wr.right() ) {
-			dx = wr.right() - r.right() - 1;
-		}
-		if ( dx != 0 || dy != 0 ) {
-			needRepaint = true;
-			item->moveBy( dx, dy );
-		}
-	}
-	if ( needRepaint ) {
-		viewport()->repaint( false );
-		repaint( false );
-		saveIconPositions();
-	}
-
-	m_needDesktopAlign = false;
-	lineupIcons();
+    m_gotIconsArea = true;  // now we have it!
+
+    if (( iconArea() == wr ) && (m_needDesktopAlign == false)) {
+        // nothing changed; avoid repaint/saveIconPosition ...
+        return;
+    }
+
+    TQRect oldArea = iconArea();
+    setIconArea( wr );
+
+    kdDebug(1204) << "KDIconView::updateWorkArea wr: " << wr.x() << "," << wr.y() << " " << wr.width() << "x" << wr.height() << endl;
+    kdDebug(1204) << "  oldArea:                     " << oldArea.x() << "," << oldArea.y() << " " << oldArea.width() << "x" << oldArea.height() << endl;
+
+    bool needRepaint = false;
+    TQIconViewItem* item;
+    int dx, dy;
+
+    dx = wr.left() - oldArea.left();
+    dy = wr.top() - oldArea.top();
+
+    if ( dx != 0 || dy != 0 ) {
+        if ( (dx > 0) || (dy > 0) ) {
+            // the iconArea was shifted right/down; less space now
+            for ( item = firstItem(); item; item = item->nextItem() ) {
+                // check if there is any item inside the now unavailable area
+                // If so, we have to move _all_ items
+                // If not, we don't have to move any item (avoids bug:117868)
+                if ( (item->x() < wr.x()) || (item->y() < wr.y()) ) {
+                    needRepaint = true;
+                    break;
+                }
+            }
+        }
+        else {
+            // the iconArea was shifted left/up; more space now - use it
+            needRepaint = true;
+        }
+
+        if ( needRepaint ) {
+            for ( item = firstItem(); item; item = item->nextItem() ) {
+                item->moveBy( dx, dy );
+            }
+        }
+    }
+
+    for ( item = firstItem(); item; item = item->nextItem() ) {
+        TQRect r( item->rect() );
+        int dx = 0, dy = 0;
+        if ( r.bottom() > wr.bottom() ) {
+            dy = wr.bottom() - r.bottom() - 1;
+        }
+        if ( r.right() > wr.right() ) {
+            dx = wr.right() - r.right() - 1;
+        }
+        if ( dx != 0 || dy != 0 ) {
+            needRepaint = true;
+            item->moveBy( dx, dy );
+        }
+    }
+    if ( needRepaint ) {
+        viewport()->repaint( false );
+        repaint( false );
+        saveIconPositions();
+    }
+
+    m_needDesktopAlign = false;
+    lineupIcons();
 }
 
 void KDIconView::setupSortKeys()
@@ -1900,51 +1900,51 @@ void KDIconView::setupSortKeys()
 
 bool KDIconView::isFreePosition( const TQIconViewItem *item, const TQRect &currentIconArea ) const
 {
-	TQRect r = item->rect();
-	TQRect area = currentIconArea;
-	if (area.isNull()) area = iconArea();
+    TQRect r = item->rect();
+    TQRect area = currentIconArea;
+    if (area.isNull()) area = iconArea();
 
-	// If the proposed item rect is not contained by the desktop, by definition the item position is not free!
-	if (!area.contains(r, false)) {
-		return false;
-	}
+    // If the proposed item rect is not contained by the desktop, by definition the item position is not free!
+    if (!area.contains(r, false)) {
+        return false;
+    }
 
-	TQIconViewItem *it = firstItem();
-	for (; it; it = it->nextItem() ) {
-		if ( !it->rect().isValid() || it == item ) {
-			continue;
-		}
+    TQIconViewItem *it = firstItem();
+    for (; it; it = it->nextItem() ) {
+        if ( !it->rect().isValid() || it == item ) {
+            continue;
+        }
 
-		if ( it->intersects( r ) ) {
-			return false;
-		}
-	}
+        if ( it->intersects( r ) ) {
+            return false;
+        }
+    }
 
-	return true;
+    return true;
 }
 
 bool KDIconView::isFreePosition( const TQIconViewItem *item, const TQRect& rect, const TQRect& currentIconArea) const
 {
-	TQRect area = currentIconArea;
-	if (area.isNull()) area = iconArea();
+    TQRect area = currentIconArea;
+    if (area.isNull()) area = iconArea();
 
-	// If the proposed item rect is not contained by the desktop, by definition the item position is not free!
-	if (!area.contains(rect, false)) {
-		return false;
-	}
+    // If the proposed item rect is not contained by the desktop, by definition the item position is not free!
+    if (!area.contains(rect, false)) {
+        return false;
+    }
 
-	TQIconViewItem *it = firstItem();
-	for (; it; it = it->nextItem() ) {
-		if ( !rect.isValid() || it == item ) {
-			continue;
-		}
+    TQIconViewItem *it = firstItem();
+    for (; it; it = it->nextItem() ) {
+        if ( !rect.isValid() || it == item ) {
+            continue;
+        }
 
-		if ( it->intersects( rect ) ) {
-			return false;
-		}
-	}
+        if ( it->intersects( rect ) ) {
+            return false;
+        }
+    }
 
-	return true;
+    return true;
 }
 
 void KDIconView::setLastIconPosition( const TQPoint &_pos )
@@ -1954,54 +1954,54 @@ void KDIconView::setLastIconPosition( const TQPoint &_pos )
 
 void KDIconView::moveToFreePosition(TQIconViewItem *item, const TQRect &currentIconArea)
 {
-	bool success = false;
-	// It may be that a file has been renamed. In this case,
-	// m_lastDeletedIconPos is the position to use for this "apparently new" item.
-	// (We rely on deleteItem being now emitted before newItems).
-	if ( !m_lastDeletedIconPos.isNull() ) {
-		// Problem is: I'd like to compare those two file's attributes
-		// (size, creation time, modification time... etc.) but since renaming
-		// is done by kpropsdlg, all of those can have changed (and creation time
-		// is different since the new file is a copy!)
-		kdDebug(1214) << "Moving " << item->text() << " to position of last deleted icon." << endl;
-		item->move( m_lastDeletedIconPos );
-		m_lastDeletedIconPos = TQPoint();
-		return;
-	}
-
-	//try to find a free place to put the item, honouring the m_bVertAlign property
-	TQRect rect=item->rect();
-	if (m_bVertAlign) {
-		kdDebug(1214)<<"moveToFreePosition for vertical alignment"<<endl;
-
-		rect.moveTopLeft(TQPoint(currentIconArea.x()+spacing(),currentIconArea.y()+spacing()));
-		do {
-			success=false;
-			while (rect.bottom()<(currentIconArea.y()+currentIconArea.height())) {
-				if (!isFreePosition(item,rect,currentIconArea)) {
-					rect.moveBy(0,rect.height()+spacing());
-				}
-				else {
-					success=true;
-					break;
-				}
-			}
-
-			if (!success) {
-				rect.moveTopLeft(TQPoint(rect.right()+spacing(),spacing()));
-			}
-			else {
-				break;
-			}
-		} while (item->rect().right()<(currentIconArea.x()+currentIconArea.width()));
-
-		if (success) {
-			item->move(rect.x(),rect.y());
-		}
-		else {
-			item->move(width()-spacing()-item->rect().width(),height()-spacing()-item->rect().height());
-		}
-	}
+    bool success = false;
+    // It may be that a file has been renamed. In this case,
+    // m_lastDeletedIconPos is the position to use for this "apparently new" item.
+    // (We rely on deleteItem being now emitted before newItems).
+    if ( !m_lastDeletedIconPos.isNull() ) {
+        // Problem is: I'd like to compare those two file's attributes
+        // (size, creation time, modification time... etc.) but since renaming
+        // is done by kpropsdlg, all of those can have changed (and creation time
+        // is different since the new file is a copy!)
+        kdDebug(1214) << "Moving " << item->text() << " to position of last deleted icon." << endl;
+        item->move( m_lastDeletedIconPos );
+        m_lastDeletedIconPos = TQPoint();
+        return;
+    }
+
+    //try to find a free place to put the item, honouring the m_bVertAlign property
+    TQRect rect=item->rect();
+    if (m_bVertAlign) {
+        kdDebug(1214)<<"moveToFreePosition for vertical alignment"<<endl;
+
+        rect.moveTopLeft(TQPoint(currentIconArea.x()+spacing(),currentIconArea.y()+spacing()));
+        do {
+            success=false;
+            while (rect.bottom()<(currentIconArea.y()+currentIconArea.height())) {
+                if (!isFreePosition(item,rect,currentIconArea)) {
+                    rect.moveBy(0,rect.height()+spacing());
+                }
+                else {
+                    success=true;
+                    break;
+                }
+            }
+
+            if (!success) {
+                rect.moveTopLeft(TQPoint(rect.right()+spacing(),spacing()));
+            }
+            else {
+                break;
+            }
+        } while (item->rect().right()<(currentIconArea.x()+currentIconArea.width()));
+
+        if (success) {
+            item->move(rect.x(),rect.y());
+        }
+        else {
+            item->move(width()-spacing()-item->rect().width(),height()-spacing()-item->rect().height());
+        }
+    }
 }
 
 
@@ -2130,9 +2130,9 @@ void KDIconView::saveIconPositions()
 
 void KDIconView::update( const TQString &_url )
 {
-	if (m_dirLister) {
-		m_dirLister->updateDirectory( _url );
-	}
+    if (m_dirLister) {
+        m_dirLister->updateDirectory( _url );
+    }
 }
 
 
-- 
cgit v1.2.3

