Replace tabs with spaces using 'expand -t 4' command
authorunc0rr
Sat, 06 Mar 2010 10:59:20 +0000
changeset 2948 3f21a9dc93d0
parent 2947 803b277e4894
child 2949 d137a9da7701
Replace tabs with spaces using 'expand -t 4' command
QTfrontend/AutoUpdater.h
QTfrontend/CocoaInitializer.h
QTfrontend/InstallController.h
QTfrontend/KB.h
QTfrontend/M3InstallController.h
QTfrontend/M3Panel.h
QTfrontend/NSWorkspace_RBAdditions.h
QTfrontend/SDLs.cpp
QTfrontend/SDLs.h
QTfrontend/SparkleAutoUpdater.h
QTfrontend/SquareLabel.cpp
QTfrontend/SquareLabel.h
QTfrontend/about.cpp
QTfrontend/about.h
QTfrontend/ammoSchemeModel.cpp
QTfrontend/ammoSchemeModel.h
QTfrontend/bgwidget.cpp
QTfrontend/bgwidget.h
QTfrontend/binds.cpp
QTfrontend/binds.h
QTfrontend/chatwidget.cpp
QTfrontend/fpsedit.cpp
QTfrontend/fpsedit.h
QTfrontend/frameTeam.cpp
QTfrontend/game.cpp
QTfrontend/game.h
QTfrontend/gamecfgwidget.cpp
QTfrontend/gamecfgwidget.h
QTfrontend/gameuiconfig.cpp
QTfrontend/gameuiconfig.h
QTfrontend/hats.cpp
QTfrontend/hats.h
QTfrontend/hwform.cpp
QTfrontend/hwform.h
QTfrontend/hwmap.cpp
QTfrontend/igbox.cpp
QTfrontend/igbox.h
QTfrontend/input_ip.cpp
QTfrontend/input_ip.h
QTfrontend/main.cpp
QTfrontend/mapContainer.cpp
QTfrontend/misc.h
QTfrontend/namegen.cpp
QTfrontend/namegen.h
QTfrontend/netregister.h
QTfrontend/netserver.cpp
QTfrontend/netserver.h
QTfrontend/netserverslist.cpp
QTfrontend/netserverslist.h
QTfrontend/netudpwidget.cpp
QTfrontend/netudpwidget.h
QTfrontend/newnetclient.cpp
QTfrontend/pages.cpp
QTfrontend/pages.h
QTfrontend/playrecordpage.cpp
QTfrontend/playrecordpage.h
QTfrontend/predefteams.h
QTfrontend/proto.cpp
QTfrontend/proto.h
QTfrontend/sdlkeys.h
QTfrontend/selectWeapon.cpp
QTfrontend/statsPage.cpp
QTfrontend/statsPage.h
QTfrontend/tcpBase.cpp
QTfrontend/team.cpp
QTfrontend/team.h
QTfrontend/teamselect.cpp
QTfrontend/teamselhelper.cpp
QTfrontend/togglebutton.cpp
QTfrontend/togglebutton.h
QTfrontend/ui_hwform.cpp
QTfrontend/ui_hwform.h
QTfrontend/vertScrollArea.cpp
QTfrontend/vertScrollArea.h
QTfrontend/xfire.cpp
QTfrontend/xfire.h
gameServer/Actions.hs
gameServer/ServerCore.hs
gameServer/stresstest.hs
gameServer/stresstest2.hs
hedgewars/CCHandlers.inc
hedgewars/GSHandlers.inc
hedgewars/HHHandlers.inc
hedgewars/LuaPas.pas
hedgewars/PascalExports.pas
hedgewars/SDLh.pas
hedgewars/hwengine.pas
hedgewars/uAI.pas
hedgewars/uAIAmmoTests.pas
hedgewars/uAIMisc.pas
hedgewars/uAmmos.pas
hedgewars/uChat.pas
hedgewars/uCollisions.pas
hedgewars/uConsole.pas
hedgewars/uConsts.pas
hedgewars/uFloat.pas
hedgewars/uGame.pas
hedgewars/uGears.pas
hedgewars/uIO.pas
hedgewars/uKeys.pas
hedgewars/uLand.pas
hedgewars/uLandGraphics.pas
hedgewars/uLandObjects.pas
hedgewars/uLandTexture.pas
hedgewars/uLocale.pas
hedgewars/uMisc.pas
hedgewars/uRandom.pas
hedgewars/uScript.pas
hedgewars/uSound.pas
hedgewars/uStats.pas
hedgewars/uStore.pas
hedgewars/uTeams.pas
hedgewars/uTriggers.pas
hedgewars/uVisualGears.pas
hedgewars/uWorld.pas
--- a/QTfrontend/AutoUpdater.h	Sat Mar 06 10:54:24 2010 +0000
+++ b/QTfrontend/AutoUpdater.h	Sat Mar 06 10:59:20 2010 +0000
@@ -7,10 +7,10 @@
 
 class AutoUpdater
 {
-	public:
-		virtual ~AutoUpdater();
+    public:
+        virtual ~AutoUpdater();
 
-		virtual void checkForUpdates() = 0;
+        virtual void checkForUpdates() = 0;
 };
 
 #endif
--- a/QTfrontend/CocoaInitializer.h	Sat Mar 06 10:54:24 2010 +0000
+++ b/QTfrontend/CocoaInitializer.h	Sat Mar 06 10:59:20 2010 +0000
@@ -7,13 +7,13 @@
 
 class CocoaInitializer
 {
-	public:
-		CocoaInitializer();
-		~CocoaInitializer();
+    public:
+        CocoaInitializer();
+        ~CocoaInitializer();
 
-	private:
-		class Private;
-		Private* d;
+    private:
+        class Private;
+        Private* d;
                 Private* c;
 };
 
--- a/QTfrontend/InstallController.h	Sat Mar 06 10:54:24 2010 +0000
+++ b/QTfrontend/InstallController.h	Sat Mar 06 10:59:20 2010 +0000
@@ -12,10 +12,10 @@
 
 class InstallController
         {
-	public:
-		virtual ~InstallController();
+    public:
+        virtual ~InstallController();
                 
-		virtual void showInstallController() = 0;
+        virtual void showInstallController() = 0;
         };
 
 #endif
\ No newline at end of file
--- a/QTfrontend/KB.h	Sat Mar 06 10:54:24 2010 +0000
+++ b/QTfrontend/KB.h	Sat Mar 06 10:59:20 2010 +0000
@@ -25,10 +25,10 @@
 
 const QString KBMessages[KBmsgsCount] =
 {
-	QT_TRANSLATE_NOOP("KB", "SDL_ttf returned error while rendering text, "
-							"most propably it is related to the bug "
-							"in freetype2. It's recommended to update your "
-							"freetype lib.")
+    QT_TRANSLATE_NOOP("KB", "SDL_ttf returned error while rendering text, "
+                            "most propably it is related to the bug "
+                            "in freetype2. It's recommended to update your "
+                            "freetype lib.")
 };
 
 #endif // KB_H
--- a/QTfrontend/M3InstallController.h	Sat Mar 06 10:54:24 2010 +0000
+++ b/QTfrontend/M3InstallController.h	Sat Mar 06 10:59:20 2010 +0000
@@ -43,7 +43,7 @@
 
 
 @interface M3InstallController : NSObject {
-	NSAlert *alert;
+    NSAlert *alert;
 }
 
 - (void)displayInstaller;
--- a/QTfrontend/M3Panel.h	Sat Mar 06 10:54:24 2010 +0000
+++ b/QTfrontend/M3Panel.h	Sat Mar 06 10:59:20 2010 +0000
@@ -14,15 +14,15 @@
 
 class M3Panel : public InstallController
         {
-	public:
-		M3Panel(void);
-		~M3Panel();
+    public:
+        M3Panel(void);
+        ~M3Panel();
                 
-		void showInstallController();
+        void showInstallController();
                 
-	private:
-		class Private;
-		Private* c;
+    private:
+        class Private;
+        Private* c;
         };
 
 #endif
--- a/QTfrontend/NSWorkspace_RBAdditions.h	Sat Mar 06 10:54:24 2010 +0000
+++ b/QTfrontend/NSWorkspace_RBAdditions.h	Sat Mar 06 10:59:20 2010 +0000
@@ -24,11 +24,11 @@
 //- NSWorkspace_RBfstypename: will always be present.Shows the filesystem type (usually "hfs"), from statfs.
 //- NSWorkspace_RBmntonname: will always be present. Shows the volume mount point.
 //- NSWorkspace_RBmntfromname: will always be present. Shows the BSD device path for local volumes; info for
-//		remote volumes depends on the filesystem type.
+//      remote volumes depends on the filesystem type.
 //- NSWorkspace_RBconnectiontype: should always be present for local volumes. Shows the connection type ("SATA", "USB", etc.).
 //- NSWorkspace_RBpartitionscheme: should always be present for local volumes. Shows the partition scheme.
 //- NSWorkspace_RBdeviceinfo: should always be present for local volumes. Shows some information about the
-//		physical device; varies widely.
+//      physical device; varies widely.
 //- NSWorkspace_RBimagefilepath: should be present for disk images only. Shows the path of the disk image file.
 //- NSWorkspace_RBserverURL: should be present for remote volumes only. Shows the server URL.
 
--- a/QTfrontend/SDLs.cpp	Sat Mar 06 10:54:24 2010 +0000
+++ b/QTfrontend/SDLs.cpp	Sat Mar 06 10:59:20 2010 +0000
@@ -34,152 +34,152 @@
 SDLInteraction::SDLInteraction()
 {
 
-	SDL_Init(SDL_INIT_VIDEO | SDL_INIT_JOYSTICK);
-	
-	musicInitialized = 0;
-	music = NULL;
-	if(SDL_NumJoysticks())
-		addGameControllerKeys();
-	SDL_QuitSubSystem(SDL_INIT_JOYSTICK);
+    SDL_Init(SDL_INIT_VIDEO | SDL_INIT_JOYSTICK);
+    
+    musicInitialized = 0;
+    music = NULL;
+    if(SDL_NumJoysticks())
+        addGameControllerKeys();
+    SDL_QuitSubSystem(SDL_INIT_JOYSTICK);
 }
 
 SDLInteraction::~SDLInteraction()
 {
-	if (musicInitialized == 1) {
-		if (music != NULL)
-			Mix_FreeMusic(music);
-		Mix_CloseAudio();
-	}
-	SDL_Quit();
+    if (musicInitialized == 1) {
+        if (music != NULL)
+            Mix_FreeMusic(music);
+        Mix_CloseAudio();
+    }
+    SDL_Quit();
 }
 
 QStringList SDLInteraction::getResolutions() const
 {
-	QStringList result;
+    QStringList result;
 
-	SDL_Rect **modes;
+    SDL_Rect **modes;
 
-	modes = SDL_ListModes(NULL, SDL_FULLSCREEN);
+    modes = SDL_ListModes(NULL, SDL_FULLSCREEN);
 
-	if((modes == (SDL_Rect **)0) || (modes == (SDL_Rect **)-1))
-	{
-		result << "640x480";
-	} else
-	{
-		for(int i = 0; modes[i]; ++i)
-			if ((modes[i]->w >= 640) && (modes[i]->h >= 480))
-				result << QString("%1x%2").arg(modes[i]->w).arg(modes[i]->h);
-	}
+    if((modes == (SDL_Rect **)0) || (modes == (SDL_Rect **)-1))
+    {
+        result << "640x480";
+    } else
+    {
+        for(int i = 0; modes[i]; ++i)
+            if ((modes[i]->w >= 640) && (modes[i]->h >= 480))
+                result << QString("%1x%2").arg(modes[i]->w).arg(modes[i]->h);
+    }
 
-	return result;
+    return result;
 }
 
 void SDLInteraction::addGameControllerKeys() const
 {
-	QStringList result;
+    QStringList result;
 
-	int i = 0;
-	while(i < 1024 && sdlkeys[i][1][0] != '\0')
-		i++;
+    int i = 0;
+    while(i < 1024 && sdlkeys[i][1][0] != '\0')
+        i++;
 
-	// Iterate through all game controllers
-	for(int jid = 0; jid < SDL_NumJoysticks(); jid++)
-	{
-		SDL_Joystick* joy = SDL_JoystickOpen(jid);
-		
-		// Retrieve the game controller's name and strip "Controller (...)" that's added by some drivers (English only)
-		QString joyname = QString(SDL_JoystickName(jid)).replace(QRegExp("^Controller \\((.*)\\)$"), "\\1");
+    // Iterate through all game controllers
+    for(int jid = 0; jid < SDL_NumJoysticks(); jid++)
+    {
+        SDL_Joystick* joy = SDL_JoystickOpen(jid);
+        
+        // Retrieve the game controller's name and strip "Controller (...)" that's added by some drivers (English only)
+        QString joyname = QString(SDL_JoystickName(jid)).replace(QRegExp("^Controller \\((.*)\\)$"), "\\1");
 
-		// Connected Xbox 360 controller? Use specific button names then
-		// Might be interesting to add 'named' buttons for the most often used gamepads
-		bool isxb = joyname.contains("Xbox 360");
+        // Connected Xbox 360 controller? Use specific button names then
+        // Might be interesting to add 'named' buttons for the most often used gamepads
+        bool isxb = joyname.contains("Xbox 360");
 
-		// This part of the string won't change for multiple keys/hats, so keep it
-		QString prefix = QString("%1 (%2): ").arg(joyname).arg(jid + 1);
+        // This part of the string won't change for multiple keys/hats, so keep it
+        QString prefix = QString("%1 (%2): ").arg(joyname).arg(jid + 1);
 
-		// Register entries for missing axes not assigned to sticks of this joystick/gamepad
-		for(int aid = 0; aid < SDL_JoystickNumAxes(joy) && i < 1021; aid++)
-		{
-			// Again store the part of the string not changing for multiple uses
-			QString axis = prefix + QApplication::translate("binds (keys)", "Axis") + QString(" %1 ").arg(aid + 1);
-			
-			// Entry for "Axis Up"
-			sprintf(sdlkeys[i][0], "j%da%du", jid, aid);
-			sprintf(sdlkeys[i++][1], "%s", ((isxb && aid < 5) ? (prefix + QApplication::translate("binds (keys)", xbox360axes[aid * 2])) : axis + QApplication::translate("binds (keys)", "(Up)")).toStdString().c_str());
+        // Register entries for missing axes not assigned to sticks of this joystick/gamepad
+        for(int aid = 0; aid < SDL_JoystickNumAxes(joy) && i < 1021; aid++)
+        {
+            // Again store the part of the string not changing for multiple uses
+            QString axis = prefix + QApplication::translate("binds (keys)", "Axis") + QString(" %1 ").arg(aid + 1);
+            
+            // Entry for "Axis Up"
+            sprintf(sdlkeys[i][0], "j%da%du", jid, aid);
+            sprintf(sdlkeys[i++][1], "%s", ((isxb && aid < 5) ? (prefix + QApplication::translate("binds (keys)", xbox360axes[aid * 2])) : axis + QApplication::translate("binds (keys)", "(Up)")).toStdString().c_str());
 
-			// Entry for "Axis Down"
-			sprintf(sdlkeys[i][0], "j%da%dd", jid, aid);
-			sprintf(sdlkeys[i++][1], "%s", ((isxb && aid < 5) ? (prefix + QApplication::translate("binds (keys)", xbox360axes[aid * 2 + 1])) : axis + QApplication::translate("binds (keys)", "(Down)")).toStdString().c_str());
-		}
+            // Entry for "Axis Down"
+            sprintf(sdlkeys[i][0], "j%da%dd", jid, aid);
+            sprintf(sdlkeys[i++][1], "%s", ((isxb && aid < 5) ? (prefix + QApplication::translate("binds (keys)", xbox360axes[aid * 2 + 1])) : axis + QApplication::translate("binds (keys)", "(Down)")).toStdString().c_str());
+        }
 
-		// Register entries for all coolie hats of this joystick/gamepad
-		for(int hid = 0; hid < SDL_JoystickNumHats(joy) && i < 1019; hid++)
-		{
-			// Again store the part of the string not changing for multiple uses
-			QString hat = prefix + (isxb ? (QApplication::translate("binds (keys)", xb360dpad) + QString(" ")) : QApplication::translate("binds (keys)", "Hat") + QString(" %1 ").arg(hid + 1));
+        // Register entries for all coolie hats of this joystick/gamepad
+        for(int hid = 0; hid < SDL_JoystickNumHats(joy) && i < 1019; hid++)
+        {
+            // Again store the part of the string not changing for multiple uses
+            QString hat = prefix + (isxb ? (QApplication::translate("binds (keys)", xb360dpad) + QString(" ")) : QApplication::translate("binds (keys)", "Hat") + QString(" %1 ").arg(hid + 1));
 
-			// Entry for "Hat Up"
-			sprintf(sdlkeys[i][0], "j%dh%du", jid, hid);			
-			sprintf(sdlkeys[i++][1], "%s", (hat + QApplication::translate("binds (keys)", "(Up)")).toStdString().c_str());
+            // Entry for "Hat Up"
+            sprintf(sdlkeys[i][0], "j%dh%du", jid, hid);            
+            sprintf(sdlkeys[i++][1], "%s", (hat + QApplication::translate("binds (keys)", "(Up)")).toStdString().c_str());
 
-			// Entry for "Hat Down"
-			sprintf(sdlkeys[i][0], "j%dh%dd", jid, hid);			
-			sprintf(sdlkeys[i++][1], "%s", (hat + QApplication::translate("binds (keys)", "(Down)")).toStdString().c_str());
+            // Entry for "Hat Down"
+            sprintf(sdlkeys[i][0], "j%dh%dd", jid, hid);            
+            sprintf(sdlkeys[i++][1], "%s", (hat + QApplication::translate("binds (keys)", "(Down)")).toStdString().c_str());
 
-			// Entry for "Hat Left"
-			sprintf(sdlkeys[i][0], "j%dh%dl", jid, hid);			
-			sprintf(sdlkeys[i++][1], "%s", (hat + QApplication::translate("binds (keys)", "(Left)")).toStdString().c_str());
+            // Entry for "Hat Left"
+            sprintf(sdlkeys[i][0], "j%dh%dl", jid, hid);            
+            sprintf(sdlkeys[i++][1], "%s", (hat + QApplication::translate("binds (keys)", "(Left)")).toStdString().c_str());
 
-			// Entry for "Hat Right"
-			sprintf(sdlkeys[i][0], "j%dh%dr", jid, hid);			
-			sprintf(sdlkeys[i++][1], "%s", (hat + QApplication::translate("binds (keys)", "(Right)")).toStdString().c_str());
-		}
-		
-		// Register entries for all buttons of this joystick/gamepad
-		for(int bid = 0; bid < SDL_JoystickNumButtons(joy) && i < 1022; bid++)
-		{
-			// Buttons
-			sprintf(sdlkeys[i][0], "j%db%d", jid, bid);			
-			sprintf(sdlkeys[i++][1], "%s", (prefix + ((isxb && bid < 10) ? (QApplication::translate("binds (keys)", xb360buttons[bid]) + QString(" ")) : QApplication::translate("binds (keys)", "Button") + QString(" %1").arg(bid + 1))).toStdString().c_str());
-		}
-		// Close the game controller as we no longer need it
-		SDL_JoystickClose(joy);
-	}
-	
-	// Terminate the list
-	sdlkeys[i][0][0] = '\0';
-	sdlkeys[i][1][0] = '\0';
+            // Entry for "Hat Right"
+            sprintf(sdlkeys[i][0], "j%dh%dr", jid, hid);            
+            sprintf(sdlkeys[i++][1], "%s", (hat + QApplication::translate("binds (keys)", "(Right)")).toStdString().c_str());
+        }
+        
+        // Register entries for all buttons of this joystick/gamepad
+        for(int bid = 0; bid < SDL_JoystickNumButtons(joy) && i < 1022; bid++)
+        {
+            // Buttons
+            sprintf(sdlkeys[i][0], "j%db%d", jid, bid);         
+            sprintf(sdlkeys[i++][1], "%s", (prefix + ((isxb && bid < 10) ? (QApplication::translate("binds (keys)", xb360buttons[bid]) + QString(" ")) : QApplication::translate("binds (keys)", "Button") + QString(" %1").arg(bid + 1))).toStdString().c_str());
+        }
+        // Close the game controller as we no longer need it
+        SDL_JoystickClose(joy);
+    }
+    
+    // Terminate the list
+    sdlkeys[i][0][0] = '\0';
+    sdlkeys[i][1][0] = '\0';
 }
 
 void SDLInteraction::SDLMusicInit()
 {
-	if (musicInitialized == 0) {
-		SDL_Init(SDL_INIT_AUDIO);
-		Mix_OpenAudio(44100, MIX_DEFAULT_FORMAT, 2, 1024);
-		musicInitialized = 1;
-	}
+    if (musicInitialized == 0) {
+        SDL_Init(SDL_INIT_AUDIO);
+        Mix_OpenAudio(44100, MIX_DEFAULT_FORMAT, 2, 1024);
+        musicInitialized = 1;
+    }
 }
 
 
 void SDLInteraction::StartMusic()
 {
-	SDLMusicInit();
+    SDLMusicInit();
 
-	if (music == NULL) {
-		music = Mix_LoadMUS((datadir->absolutePath() + "/Music/main theme.ogg").toLocal8Bit().constData());
-	
-	}
-	Mix_VolumeMusic(MIX_MAX_VOLUME - 28);
-	Mix_FadeInMusic(music, -1, 1750);
+    if (music == NULL) {
+        music = Mix_LoadMUS((datadir->absolutePath() + "/Music/main theme.ogg").toLocal8Bit().constData());
+    
+    }
+    Mix_VolumeMusic(MIX_MAX_VOLUME - 28);
+    Mix_FadeInMusic(music, -1, 1750);
 }
 
 void SDLInteraction::StopMusic()
 {
-	if (music != NULL) {
-		// fade out music to finish 0,5 seconds from now
-		while(!Mix_FadeOutMusic(1000) && Mix_PlayingMusic()) {
-			SDL_Delay(100);
-		}
-	}
+    if (music != NULL) {
+        // fade out music to finish 0,5 seconds from now
+        while(!Mix_FadeOutMusic(1000) && Mix_PlayingMusic()) {
+            SDL_Delay(100);
+        }
+    }
 }
 
--- a/QTfrontend/SDLs.h	Sat Mar 06 10:54:24 2010 +0000
+++ b/QTfrontend/SDLs.h	Sat Mar 06 10:59:20 2010 +0000
@@ -28,20 +28,20 @@
 
 class SDLInteraction : public QObject
 {
-	Q_OBJECT
+    Q_OBJECT
 
 private:
-	Mix_Music *music;
-	int musicInitialized;	
+    Mix_Music *music;
+    int musicInitialized;   
 
 public:
-	SDLInteraction();
-	~SDLInteraction();
-	QStringList getResolutions() const;
-	void addGameControllerKeys() const;
-	void StartMusic();
-	void StopMusic();
-	void SDLMusicInit();	
+    SDLInteraction();
+    ~SDLInteraction();
+    QStringList getResolutions() const;
+    void addGameControllerKeys() const;
+    void StartMusic();
+    void StopMusic();
+    void SDLMusicInit();    
 };
 
 
--- a/QTfrontend/SparkleAutoUpdater.h	Sat Mar 06 10:54:24 2010 +0000
+++ b/QTfrontend/SparkleAutoUpdater.h	Sat Mar 06 10:59:20 2010 +0000
@@ -11,15 +11,15 @@
 
 class SparkleAutoUpdater : public AutoUpdater
 {
-	public:
-		SparkleAutoUpdater(const QString& url);
-		~SparkleAutoUpdater();
+    public:
+        SparkleAutoUpdater(const QString& url);
+        ~SparkleAutoUpdater();
 
-		void checkForUpdates();
+        void checkForUpdates();
 
-	private:
-		class Private;
-		Private* d;
+    private:
+        class Private;
+        Private* d;
 };
 
 #endif
--- a/QTfrontend/SquareLabel.cpp	Sat Mar 06 10:54:24 2010 +0000
+++ b/QTfrontend/SquareLabel.cpp	Sat Mar 06 10:59:20 2010 +0000
@@ -22,27 +22,27 @@
 #include "hwform.h"
 
 SquareLabel::SquareLabel(QWidget * parent) :
-	QWidget(parent)
+    QWidget(parent)
 {
     if(frontendEffects) setAttribute(Qt::WA_PaintOnScreen, true);
 }
 
 void SquareLabel::paintEvent(QPaintEvent * event)
 {
-	QPainter painter(this);
-	int pixsize;
-	if (width() > height()) {
-		pixsize = height();
-		painter.translate((width() - pixsize) / 2, 0);
-	} else {
-		pixsize = width();
-		painter.translate(0, (height() - pixsize) / 2);
-	}
-	painter.drawPixmap(0, 0, pixsize, pixsize, pixmap.scaled(pixsize, pixsize, Qt::KeepAspectRatio));
+    QPainter painter(this);
+    int pixsize;
+    if (width() > height()) {
+        pixsize = height();
+        painter.translate((width() - pixsize) / 2, 0);
+    } else {
+        pixsize = width();
+        painter.translate(0, (height() - pixsize) / 2);
+    }
+    painter.drawPixmap(0, 0, pixsize, pixsize, pixmap.scaled(pixsize, pixsize, Qt::KeepAspectRatio));
 }
 
 void SquareLabel::setPixmap(const QPixmap & pixmap)
 {
-	this->pixmap = pixmap;
-	repaint();
+    this->pixmap = pixmap;
+    repaint();
 }
--- a/QTfrontend/SquareLabel.h	Sat Mar 06 10:54:24 2010 +0000
+++ b/QTfrontend/SquareLabel.h	Sat Mar 06 10:59:20 2010 +0000
@@ -24,17 +24,17 @@
 
 class SquareLabel : public QWidget
 {
-	Q_OBJECT
+    Q_OBJECT
 
 public:
-	SquareLabel(QWidget * parent = 0);
+    SquareLabel(QWidget * parent = 0);
 
-	void setPixmap(const QPixmap & pixmap);
+    void setPixmap(const QPixmap & pixmap);
 protected:
-	virtual void paintEvent(QPaintEvent * event);
+    virtual void paintEvent(QPaintEvent * event);
 
 private:
-	QPixmap pixmap;
+    QPixmap pixmap;
 
 };
 
--- a/QTfrontend/about.cpp	Sat Mar 06 10:54:24 2010 +0000
+++ b/QTfrontend/about.cpp	Sat Mar 06 10:59:20 2010 +0000
@@ -25,7 +25,7 @@
 About::About(QWidget * parent) :
   QWidget(parent)
 {
-	QGridLayout *mainLayout = new QGridLayout(this);
+    QGridLayout *mainLayout = new QGridLayout(this);
         QLabel *imageLabel = new QLabel;
         QImage image(":/res/Hedgehog.png");
 
@@ -38,97 +38,97 @@
         imageLabel->setMaximumHeight(300);
         mainLayout->addWidget(imageLabel, 0, 0, 2, 1);
 
-	QLabel *lbl1 = new QLabel(this);
+    QLabel *lbl1 = new QLabel(this);
 
-	lbl1->setOpenExternalLinks(true);
-	lbl1->setText(
+    lbl1->setOpenExternalLinks(true);
+    lbl1->setText(
             "<style type=\"text/css\">"
             "a { color: #ffcc00; }"
 //            "a:hover { color: yellow; }"
             "</style>"
-			"<div align=\"center\"><h1>Hedgewars</h1>"
-			"<h3>" + QLabel::tr("Version") + " " + *cVersionString + "</h3>"
-			"<p><a href=\"http://www.hedgewars.org/\">http://www.hedgewars.org/</a></p><br>" +
-			QLabel::tr("This program is distributed under the GNU General Public License") +
-			"</div>"
-			);
-	lbl1->setWordWrap(true);
-	mainLayout->addWidget(lbl1, 0, 1);
+            "<div align=\"center\"><h1>Hedgewars</h1>"
+            "<h3>" + QLabel::tr("Version") + " " + *cVersionString + "</h3>"
+            "<p><a href=\"http://www.hedgewars.org/\">http://www.hedgewars.org/</a></p><br>" +
+            QLabel::tr("This program is distributed under the GNU General Public License") +
+            "</div>"
+            );
+    lbl1->setWordWrap(true);
+    mainLayout->addWidget(lbl1, 0, 1);
 
-	QTextBrowser *lbl2 = new QTextBrowser(this);
+    QTextBrowser *lbl2 = new QTextBrowser(this);
 
-	lbl2->setOpenExternalLinks(true);
-	lbl2->setText(
+    lbl2->setOpenExternalLinks(true);
+    lbl2->setText(
             "<style type=\"text/css\">"
             "a { color: #ffcc00; }"
 //            "a:hover { color: yellow; }"
             "</style>" +
             QString("<h2>") +
-			QLabel::tr("Developers:") +
-			"</h2><p>"
-			"Engine, frontend, net server: Andrey Korotaev &lt;<a href=\"mailto:unC0Rr@gmail.com\">unC0Rr@gmail.com</a>&gt;<br>"
-			"Many frontend improvements: Igor Ulyanov &lt;<a href=\"mailto:disinbox@gmail.com\">disinbox@gmail.com</a>&gt;<br>"
-			"Many engine and frontend improvements: Derek Pomery &lt;<a href=\"mailto:nemo@m8y.org\">nemo@m8y.org</a>&gt;<br>"
-			"Drill rocket, Ballgun, RC Plane weapons: Martin Boze &lt;<a href=\"mailto:afffect@gmail.com\">afffect@gmail.com</a>&gt;<br>"
-			"Mine number and time game settings: David A. Cuadrado &lt;<a href=\"mailto:krawek@gmail.com\">krawek@gmail.com</a>&gt;<br>"
-			"Frontend improvements: Martin Minarik &lt;<a href=\"mailto:ttsmj@pokec.sk\">ttsmj@pokec.sk</a>&gt;<br>"
-			"Frontend improvements: Kristian Lehmann &lt;<a href=\"mailto:email@thexception.net\">email@thexception.net</a>&gt;<br>"
-			"Mac OS X port, OpenAL wrapper library: Vittorio Giovara &lt;<a href=\"mailto:vittorio.giovara@gmail.com\">vittorio.giovara@gmail.com</a>&gt;<br>"
-			"Gamepad support and additional effects: Mario Liebisch &lt;<a href=\"mailto:mario.liebisch@googlemail.com\">mario.liebisch@googlemail.com</a>&gt;"
-			"</p><h2>" +
+            QLabel::tr("Developers:") +
+            "</h2><p>"
+            "Engine, frontend, net server: Andrey Korotaev &lt;<a href=\"mailto:unC0Rr@gmail.com\">unC0Rr@gmail.com</a>&gt;<br>"
+            "Many frontend improvements: Igor Ulyanov &lt;<a href=\"mailto:disinbox@gmail.com\">disinbox@gmail.com</a>&gt;<br>"
+            "Many engine and frontend improvements: Derek Pomery &lt;<a href=\"mailto:nemo@m8y.org\">nemo@m8y.org</a>&gt;<br>"
+            "Drill rocket, Ballgun, RC Plane weapons: Martin Boze &lt;<a href=\"mailto:afffect@gmail.com\">afffect@gmail.com</a>&gt;<br>"
+            "Mine number and time game settings: David A. Cuadrado &lt;<a href=\"mailto:krawek@gmail.com\">krawek@gmail.com</a>&gt;<br>"
+            "Frontend improvements: Martin Minarik &lt;<a href=\"mailto:ttsmj@pokec.sk\">ttsmj@pokec.sk</a>&gt;<br>"
+            "Frontend improvements: Kristian Lehmann &lt;<a href=\"mailto:email@thexception.net\">email@thexception.net</a>&gt;<br>"
+            "Mac OS X port, OpenAL wrapper library: Vittorio Giovara &lt;<a href=\"mailto:vittorio.giovara@gmail.com\">vittorio.giovara@gmail.com</a>&gt;<br>"
+            "Gamepad support and additional effects: Mario Liebisch &lt;<a href=\"mailto:mario.liebisch@googlemail.com\">mario.liebisch@googlemail.com</a>&gt;"
+            "</p><h2>" +
 
-			QLabel::tr("Art:") + "</h2>"
-			+ QString::fromUtf8(
-			"<p>Finn Brice &lt;<a href=\"mailto:tiyuri@gmail.com\">tiyuri@gmail.com</a>&gt;"
-			"<br>"
-			"Joshua Frese &lt;<a href=\"mailto:joshfrese@gmail.com\">joshfrese@gmail.com</a>&gt;"
-			"<br>"
-			"Stanko Tadić &lt;<a href=\"mailto:stanko@mfhinc.net\">stanko@mfhinc.net</a>&gt;"
-			"<br>"
-			"Julien Koesten &lt;<a href=\"mailto:julienkoesten@aol.com\">julienkoesten@aol.com</a>&gt;"
-			"<br>"
-			"Joshua O'Sullivan &lt;<a href=\"mailto:battysausage@hotmail.co.uk\">battysausage@hotmail.co.uk</a>&gt;"
-			"<br>"
-			"Nils Lück &lt;<a href=\"mailto:nils.luck.design@gmail.com\">nils.luck.design@gmail.com</a>&gt;"
-			"<br>"
-			"Hats: Trey Perry &lt;<a href=\"mailto:tx.perry.j@gmail.com\">tx.perry.j@gmail.com</a>&gt;"
-			"</p><h2>") +
-			QLabel::tr("Sounds:") + "</h2>"
-			"Hedgehogs voice: Stephen Alexander &lt;<a href=\"mailto:ArmagonNo1@gmail.com\">ArmagonNo1@gmail.com</a>&gt;"
-			"<br>"
-			"Finn Brice &lt;<a href=\"mailto:tiyuri@gmail.com\">tiyuri@gmail.com</a>&gt;"
-			"<br>"
-			"Jonatan Nilsson &lt;<a href=\"mailto:jonatanfan@gmail.com\">jonatanfan@gmail.com</a>&gt;"
-			"<br>"
-			"Daniel Martin &lt;<a href=\"mailto:elhombresinremedio@gmail.com\">elhombresinremedio@gmail.com</a>&gt;"
-			"</p><h2>" +
+            QLabel::tr("Art:") + "</h2>"
+            + QString::fromUtf8(
+            "<p>Finn Brice &lt;<a href=\"mailto:tiyuri@gmail.com\">tiyuri@gmail.com</a>&gt;"
+            "<br>"
+            "Joshua Frese &lt;<a href=\"mailto:joshfrese@gmail.com\">joshfrese@gmail.com</a>&gt;"
+            "<br>"
+            "Stanko Tadić &lt;<a href=\"mailto:stanko@mfhinc.net\">stanko@mfhinc.net</a>&gt;"
+            "<br>"
+            "Julien Koesten &lt;<a href=\"mailto:julienkoesten@aol.com\">julienkoesten@aol.com</a>&gt;"
+            "<br>"
+            "Joshua O'Sullivan &lt;<a href=\"mailto:battysausage@hotmail.co.uk\">battysausage@hotmail.co.uk</a>&gt;"
+            "<br>"
+            "Nils Lück &lt;<a href=\"mailto:nils.luck.design@gmail.com\">nils.luck.design@gmail.com</a>&gt;"
+            "<br>"
+            "Hats: Trey Perry &lt;<a href=\"mailto:tx.perry.j@gmail.com\">tx.perry.j@gmail.com</a>&gt;"
+            "</p><h2>") +
+            QLabel::tr("Sounds:") + "</h2>"
+            "Hedgehogs voice: Stephen Alexander &lt;<a href=\"mailto:ArmagonNo1@gmail.com\">ArmagonNo1@gmail.com</a>&gt;"
+            "<br>"
+            "Finn Brice &lt;<a href=\"mailto:tiyuri@gmail.com\">tiyuri@gmail.com</a>&gt;"
+            "<br>"
+            "Jonatan Nilsson &lt;<a href=\"mailto:jonatanfan@gmail.com\">jonatanfan@gmail.com</a>&gt;"
+            "<br>"
+            "Daniel Martin &lt;<a href=\"mailto:elhombresinremedio@gmail.com\">elhombresinremedio@gmail.com</a>&gt;"
+            "</p><h2>" +
 
-			QLabel::tr("Translations:") + "</h2><p>"
-			+ QString::fromUtf8(
-			"Brazilian Portuguese: Romulo Fernandes Machado &lt;<a href=\"mailto:abra185@gmail.com\">abra185@gmail.com</a>&gt;<br>"
-			"Bulgarian: Svetoslav Stefanov<br>"
-			"Czech: Petr Řezáček &lt;<a href=\"mailto:rezacek@gmail.com\">rezacek@gmail.com</a>&gt;<br>"
-			"Chinese: Jie Luo &lt;<a href=\"mailto:lililjlj@gmail.com\">lililjlj@gmail.com</a>&gt;<br>"
-			"English: Andrey Korotaev &lt;<a href=\"mailto:unC0Rr@gmail.com\">unC0Rr@gmail.com</a>&gt;<br>"
-			"Finnish: Nina Kuisma &lt;<a href=\"mailto:ninnnu@gmail.com\">ninnnu@gmail.com</a>&gt;<br>"
-			"French: Antoine Turmel &lt;<a href=\"mailto:geekshadow@gmail.com\">geekshadow@gmail.com</a>&gt;<br>"
-			"German: Peter Hüwe &lt;<a href=\"mailto:PeterHuewe@gmx.de\">PeterHuewe@gmx.de</a>&gt;<br>"
-			"Italian: Luca Bonora &lt;<a href=\"mailto:bonora.luca@gmail.com\">bonora.luca@gmail.com</a>&gt;<br>"
-			"Japanese: ADAM Etienne &lt;<a href=\"mailto:etienne.adam@gmail.com\">etienne.adam@gmail.com</a>&gt;<br>"
-			"Polish: Maciej Mroziński &lt;<a href=\"mailto:mynick2@o2.pl\">mynick2@o2.pl</a>&gt;, Wojciech Latkowski &lt;<a href=\"mailto:magik_15l@poczta.fm\">magik_15l@poczta.fm</a>&gt;, Maciej Górny<br>"
-			"Russian: Andrey Korotaev &lt;<a href=\"mailto:unC0Rr@gmail.com\">unC0Rr@gmail.com</a>&gt;<br>"
-			"Slovak: Jose Riha<br>"
-			"Spanish: Carlos Vives &lt;<a href=\"mailto:mail@carlosvives.es\">mail@carlosvives.es</a>&gt;<br>"
-			"Swedish: Niklas Grahn &lt;<a href=\"mailto:raewolusjoon@yaoo.com\">raewolusjoon@yaoo.com</a>&gt;<br>"
-			"Ukrainian: Eugene V. Lyubimkin &lt;<a href=\"mailto:jackyf.devel@gmail.com\">jackyf.devel@gmail.com</a>&gt;"
-			"</p><h2>") +
+            QLabel::tr("Translations:") + "</h2><p>"
+            + QString::fromUtf8(
+            "Brazilian Portuguese: Romulo Fernandes Machado &lt;<a href=\"mailto:abra185@gmail.com\">abra185@gmail.com</a>&gt;<br>"
+            "Bulgarian: Svetoslav Stefanov<br>"
+            "Czech: Petr Řezáček &lt;<a href=\"mailto:rezacek@gmail.com\">rezacek@gmail.com</a>&gt;<br>"
+            "Chinese: Jie Luo &lt;<a href=\"mailto:lililjlj@gmail.com\">lililjlj@gmail.com</a>&gt;<br>"
+            "English: Andrey Korotaev &lt;<a href=\"mailto:unC0Rr@gmail.com\">unC0Rr@gmail.com</a>&gt;<br>"
+            "Finnish: Nina Kuisma &lt;<a href=\"mailto:ninnnu@gmail.com\">ninnnu@gmail.com</a>&gt;<br>"
+            "French: Antoine Turmel &lt;<a href=\"mailto:geekshadow@gmail.com\">geekshadow@gmail.com</a>&gt;<br>"
+            "German: Peter Hüwe &lt;<a href=\"mailto:PeterHuewe@gmx.de\">PeterHuewe@gmx.de</a>&gt;<br>"
+            "Italian: Luca Bonora &lt;<a href=\"mailto:bonora.luca@gmail.com\">bonora.luca@gmail.com</a>&gt;<br>"
+            "Japanese: ADAM Etienne &lt;<a href=\"mailto:etienne.adam@gmail.com\">etienne.adam@gmail.com</a>&gt;<br>"
+            "Polish: Maciej Mroziński &lt;<a href=\"mailto:mynick2@o2.pl\">mynick2@o2.pl</a>&gt;, Wojciech Latkowski &lt;<a href=\"mailto:magik_15l@poczta.fm\">magik_15l@poczta.fm</a>&gt;, Maciej Górny<br>"
+            "Russian: Andrey Korotaev &lt;<a href=\"mailto:unC0Rr@gmail.com\">unC0Rr@gmail.com</a>&gt;<br>"
+            "Slovak: Jose Riha<br>"
+            "Spanish: Carlos Vives &lt;<a href=\"mailto:mail@carlosvives.es\">mail@carlosvives.es</a>&gt;<br>"
+            "Swedish: Niklas Grahn &lt;<a href=\"mailto:raewolusjoon@yaoo.com\">raewolusjoon@yaoo.com</a>&gt;<br>"
+            "Ukrainian: Eugene V. Lyubimkin &lt;<a href=\"mailto:jackyf.devel@gmail.com\">jackyf.devel@gmail.com</a>&gt;"
+            "</p><h2>") +
 
-			QLabel::tr("Special thanks:") + "</h2><p>"
-			"Aleksey Andreev &lt;<a href=\"mailto:blaknayabr@gmail.com\">blaknayabr@gmail.com</a>&gt;<br>"
-			"Aleksander Rudalev &lt;<a href=\"mailto:alexv@pomorsu.ru\">alexv@pomorsu.ru</a>&gt;<br>"
-			"Natasha Stafeeva &lt;<a href=\"mailto:layout@pisem.net\">layout@pisem.net</a>&gt;<br>"
-			"Adam Higerd (aka ahigerd at FreeNode)"
-			"</p>"
-			);
-	mainLayout->addWidget(lbl2, 1, 1);
+            QLabel::tr("Special thanks:") + "</h2><p>"
+            "Aleksey Andreev &lt;<a href=\"mailto:blaknayabr@gmail.com\">blaknayabr@gmail.com</a>&gt;<br>"
+            "Aleksander Rudalev &lt;<a href=\"mailto:alexv@pomorsu.ru\">alexv@pomorsu.ru</a>&gt;<br>"
+            "Natasha Stafeeva &lt;<a href=\"mailto:layout@pisem.net\">layout@pisem.net</a>&gt;<br>"
+            "Adam Higerd (aka ahigerd at FreeNode)"
+            "</p>"
+            );
+    mainLayout->addWidget(lbl2, 1, 1);
 }
--- a/QTfrontend/about.h	Sat Mar 06 10:54:24 2010 +0000
+++ b/QTfrontend/about.h	Sat Mar 06 10:59:20 2010 +0000
@@ -24,10 +24,10 @@
 
 class About : public QWidget
 {
-	Q_OBJECT
+    Q_OBJECT
 
 public:
-	About(QWidget * parent = 0);
+    About(QWidget * parent = 0);
 };
 
 #endif // _ABOUT_H
--- a/QTfrontend/ammoSchemeModel.cpp	Sat Mar 06 10:54:24 2010 +0000
+++ b/QTfrontend/ammoSchemeModel.cpp	Sat Mar 06 10:59:20 2010 +0000
@@ -23,370 +23,370 @@
 #include "hwconsts.h"
 
 QList<QVariant> defaultScheme = QList<QVariant>()
-		<< QVariant("Default")     // name           0
-		<< QVariant(false)         // fortsmode      1
-		<< QVariant(false)         // team divide    2
-		<< QVariant(false)         // solid land     3
-		<< QVariant(false)         // border         4
-		<< QVariant(false)         // low gravity    5
-		<< QVariant(false)         // laser sight    6
-		<< QVariant(false)         // invulnerable   7
-		<< QVariant(true)          // add mines      8
-		<< QVariant(false)         // vampiric       9
-		<< QVariant(false)         // karma          10
-		<< QVariant(false)         // artillery      11
-		<< QVariant(true)          // random order   12
-		<< QVariant(false)         // king           13
-		<< QVariant(false)         // place hog      14
-		<< QVariant(false)         // shared ammo    15
-		<< QVariant(false)		   //disable girders 16
-		<< QVariant(100)           // damage modfier 17
-		<< QVariant(45)            // turn time      18
-		<< QVariant(100)           // init health    19
-		<< QVariant(15)            // sudden death   20
-		<< QVariant(5)             // case prob      21
-		<< QVariant(3)             //  mines time    22
-		<< QVariant(4)             //  landadds      23
-		<< QVariant(0)             // mine dud pct   24
-		<< QVariant(2)             // explosives     25
-		;
+        << QVariant("Default")     // name           0
+        << QVariant(false)         // fortsmode      1
+        << QVariant(false)         // team divide    2
+        << QVariant(false)         // solid land     3
+        << QVariant(false)         // border         4
+        << QVariant(false)         // low gravity    5
+        << QVariant(false)         // laser sight    6
+        << QVariant(false)         // invulnerable   7
+        << QVariant(true)          // add mines      8
+        << QVariant(false)         // vampiric       9
+        << QVariant(false)         // karma          10
+        << QVariant(false)         // artillery      11
+        << QVariant(true)          // random order   12
+        << QVariant(false)         // king           13
+        << QVariant(false)         // place hog      14
+        << QVariant(false)         // shared ammo    15
+        << QVariant(false)         //disable girders 16
+        << QVariant(100)           // damage modfier 17
+        << QVariant(45)            // turn time      18
+        << QVariant(100)           // init health    19
+        << QVariant(15)            // sudden death   20
+        << QVariant(5)             // case prob      21
+        << QVariant(3)             //  mines time    22
+        << QVariant(4)             //  landadds      23
+        << QVariant(0)             // mine dud pct   24
+        << QVariant(2)             // explosives     25
+        ;
 
 AmmoSchemeModel::AmmoSchemeModel(QObject* parent, const QString & fileName) :
-	QAbstractTableModel(parent),
-	numberOfDefaultSchemes(4),
-	fileConfig(fileName, QSettings::IniFormat)
+    QAbstractTableModel(parent),
+    numberOfDefaultSchemes(4),
+    fileConfig(fileName, QSettings::IniFormat)
 {
-	QStringList predefSchemesNames;
-	predefSchemesNames
-		<< "Default"
-		<< "Pro mode"
-		<< "Shoppa"
-		<< "Basketball"
-		<< "Minefield";
+    QStringList predefSchemesNames;
+    predefSchemesNames
+        << "Default"
+        << "Pro mode"
+        << "Shoppa"
+        << "Basketball"
+        << "Minefield";
 
-	spNames = QStringList()
-		<< "name"             //  0
-		<< "fortsmode"        //  1
-		<< "divteams"         //  2
-		<< "solidland"        //  3
-		<< "border"           //  4
-		<< "lowgrav"          //  5
-		<< "laser"            //  6
-		<< "invulnerability"  //  7
-		<< "mines"            //  8
-		<< "vampiric"         //  9
-		<< "karma"            // 10
-		<< "artillery"        // 11
-		<< "randomorder"      // 12
-		<< "king"             // 13
-		<< "placehog"         // 14
-		<< "sharedammo"       // 15
-		<< "disablegirders"	  // 16
-		<< "damagefactor"     // 17
-		<< "turntime"         // 18
-		<< "health"           // 19
-		<< "suddendeath"      // 20
-		<< "caseprobability"  // 21
-		<< "minestime"        // 22
-		<< "landadds"         // 23
-		<< "minedudpct"       // 24
-		<< "explosives"       // 25
-		;
+    spNames = QStringList()
+        << "name"             //  0
+        << "fortsmode"        //  1
+        << "divteams"         //  2
+        << "solidland"        //  3
+        << "border"           //  4
+        << "lowgrav"          //  5
+        << "laser"            //  6
+        << "invulnerability"  //  7
+        << "mines"            //  8
+        << "vampiric"         //  9
+        << "karma"            // 10
+        << "artillery"        // 11
+        << "randomorder"      // 12
+        << "king"             // 13
+        << "placehog"         // 14
+        << "sharedammo"       // 15
+        << "disablegirders"   // 16
+        << "damagefactor"     // 17
+        << "turntime"         // 18
+        << "health"           // 19
+        << "suddendeath"      // 20
+        << "caseprobability"  // 21
+        << "minestime"        // 22
+        << "landadds"         // 23
+        << "minedudpct"       // 24
+        << "explosives"       // 25
+        ;
 
-	QList<QVariant> proMode;
-	proMode
-		<< predefSchemesNames[1]   // name           0
-		<< QVariant(false)         // fortsmode      1
-		<< QVariant(false)         // team divide    2
-		<< QVariant(false)         // solid land     3
-		<< QVariant(false)         // border         4
-		<< QVariant(false)         // low gravity    5
-		<< QVariant(false)         // laser sight    6
-		<< QVariant(false)         // invulnerable   7
-		<< QVariant(false)         // add mines      8
-		<< QVariant(false)         // vampiric       9
-		<< QVariant(false)         // karma          10
-		<< QVariant(false)         // artillery      11
-		<< QVariant(true)          // random order   12
-		<< QVariant(false)         // king           13
-		<< QVariant(false)         // place hog      14
-		<< QVariant(true)          // shared ammo    15
-		<< QVariant(false)		   //disable girders 16
-		<< QVariant(100)           // damage modfier 17
-		<< QVariant(15)            // turn time      18
-		<< QVariant(100)           // init health    19
-		<< QVariant(15)            // sudden death   20
-		<< QVariant(0)             // case prob      21
-		<< QVariant(3)             //  mines time    22
-		<< QVariant(4)             //  landadds      23
-		<< QVariant(0)             // mine dud pct   24
-		<< QVariant(2)             // explosives     25
-		;
+    QList<QVariant> proMode;
+    proMode
+        << predefSchemesNames[1]   // name           0
+        << QVariant(false)         // fortsmode      1
+        << QVariant(false)         // team divide    2
+        << QVariant(false)         // solid land     3
+        << QVariant(false)         // border         4
+        << QVariant(false)         // low gravity    5
+        << QVariant(false)         // laser sight    6
+        << QVariant(false)         // invulnerable   7
+        << QVariant(false)         // add mines      8
+        << QVariant(false)         // vampiric       9
+        << QVariant(false)         // karma          10
+        << QVariant(false)         // artillery      11
+        << QVariant(true)          // random order   12
+        << QVariant(false)         // king           13
+        << QVariant(false)         // place hog      14
+        << QVariant(true)          // shared ammo    15
+        << QVariant(false)         //disable girders 16
+        << QVariant(100)           // damage modfier 17
+        << QVariant(15)            // turn time      18
+        << QVariant(100)           // init health    19
+        << QVariant(15)            // sudden death   20
+        << QVariant(0)             // case prob      21
+        << QVariant(3)             //  mines time    22
+        << QVariant(4)             //  landadds      23
+        << QVariant(0)             // mine dud pct   24
+        << QVariant(2)             // explosives     25
+        ;
 
-	QList<QVariant> shoppa;
-	shoppa
-		<< predefSchemesNames[2]   // name           0
-		<< QVariant(false)         // fortsmode      1
-		<< QVariant(false)         // team divide    2
-		<< QVariant(true)          // solid land     3
-		<< QVariant(true)          // border         4
-		<< QVariant(false)         // low gravity    5
-		<< QVariant(false)         // laser sight    6
-		<< QVariant(false)         // invulnerable   7
-		<< QVariant(false)         // add mines      8
-		<< QVariant(false)         // vampiric       9
-		<< QVariant(false)         // karma          10
-		<< QVariant(false)         // artillery      11
-		<< QVariant(true)          // random order   12
-		<< QVariant(false)         // king           13
-		<< QVariant(false)         // place hog      14
-		<< QVariant(true)          // shared ammo    15
-		<< QVariant(true)		   //disable girders 16
-		<< QVariant(100)           // damage modfier 17
-		<< QVariant(30)            // turn time      18
-		<< QVariant(100)           // init health    19
-		<< QVariant(50)            // sudden death   20
-		<< QVariant(1)             // case prob      21
-		<< QVariant(3)             //  mines time    22
-		<< QVariant(4)             //  landadds      23
-		<< QVariant(0)             // mine dud pct   24
-		<< QVariant(0)             // explosives     25
-		;
+    QList<QVariant> shoppa;
+    shoppa
+        << predefSchemesNames[2]   // name           0
+        << QVariant(false)         // fortsmode      1
+        << QVariant(false)         // team divide    2
+        << QVariant(true)          // solid land     3
+        << QVariant(true)          // border         4
+        << QVariant(false)         // low gravity    5
+        << QVariant(false)         // laser sight    6
+        << QVariant(false)         // invulnerable   7
+        << QVariant(false)         // add mines      8
+        << QVariant(false)         // vampiric       9
+        << QVariant(false)         // karma          10
+        << QVariant(false)         // artillery      11
+        << QVariant(true)          // random order   12
+        << QVariant(false)         // king           13
+        << QVariant(false)         // place hog      14
+        << QVariant(true)          // shared ammo    15
+        << QVariant(true)          //disable girders 16
+        << QVariant(100)           // damage modfier 17
+        << QVariant(30)            // turn time      18
+        << QVariant(100)           // init health    19
+        << QVariant(50)            // sudden death   20
+        << QVariant(1)             // case prob      21
+        << QVariant(3)             //  mines time    22
+        << QVariant(4)             //  landadds      23
+        << QVariant(0)             // mine dud pct   24
+        << QVariant(0)             // explosives     25
+        ;
 
-	QList<QVariant> basketball;
-	basketball
-		<< predefSchemesNames[3]   // name           0
-		<< QVariant(false)         // fortsmode      1
-		<< QVariant(false)         // team divide    2
-		<< QVariant(true)          // solid land     3
-		<< QVariant(true)          // border         4
-		<< QVariant(true)          // low gravity    5
-		<< QVariant(false)         // laser sight    6
-		<< QVariant(true)          // invulnerable   7
-		<< QVariant(false)         // add mines      8
-		<< QVariant(false)         // vampiric       9
-		<< QVariant(false)         // karma          10
-		<< QVariant(false)         // artillery      11
-		<< QVariant(true)          // random order   12
-		<< QVariant(false)         // king           13
-		<< QVariant(false)         // place hog      14
-		<< QVariant(true)          // shared ammo    15
-		<< QVariant(true)		   //disable girders 16
-		<< QVariant(100)           // damage modfier 17
-		<< QVariant(30)            // turn time      18
-		<< QVariant(100)           // init health    19
-		<< QVariant(15)            // sudden death   20
-		<< QVariant(0)             // case prob      21
-		<< QVariant(3)             //  mines time    22
-		<< QVariant(4)             //  landadds      23
-		<< QVariant(0)             // mine dud pct   24
-		<< QVariant(0)             // explosives     25
-		;
+    QList<QVariant> basketball;
+    basketball
+        << predefSchemesNames[3]   // name           0
+        << QVariant(false)         // fortsmode      1
+        << QVariant(false)         // team divide    2
+        << QVariant(true)          // solid land     3
+        << QVariant(true)          // border         4
+        << QVariant(true)          // low gravity    5
+        << QVariant(false)         // laser sight    6
+        << QVariant(true)          // invulnerable   7
+        << QVariant(false)         // add mines      8
+        << QVariant(false)         // vampiric       9
+        << QVariant(false)         // karma          10
+        << QVariant(false)         // artillery      11
+        << QVariant(true)          // random order   12
+        << QVariant(false)         // king           13
+        << QVariant(false)         // place hog      14
+        << QVariant(true)          // shared ammo    15
+        << QVariant(true)          //disable girders 16
+        << QVariant(100)           // damage modfier 17
+        << QVariant(30)            // turn time      18
+        << QVariant(100)           // init health    19
+        << QVariant(15)            // sudden death   20
+        << QVariant(0)             // case prob      21
+        << QVariant(3)             //  mines time    22
+        << QVariant(4)             //  landadds      23
+        << QVariant(0)             // mine dud pct   24
+        << QVariant(0)             // explosives     25
+        ;
 
-	QList<QVariant> minefield;
-	minefield
-		<< predefSchemesNames[4]   // name           0
-		<< QVariant(false)         // fortsmode      1
-		<< QVariant(false)         // team divide    2
-		<< QVariant(false)         // solid land     3
-		<< QVariant(false)         // border         4
-		<< QVariant(false)         // low gravity    5
-		<< QVariant(false)         // laser sight    6
-		<< QVariant(false)         // invulnerable   7
-		<< QVariant(true)          // add mines      8
-		<< QVariant(false)         // vampiric       9
-		<< QVariant(false)         // karma          10
-		<< QVariant(false)         // artillery      11
-		<< QVariant(true)          // random order   12
-		<< QVariant(false)         // king           13
-		<< QVariant(false)         // place hog      14
-		<< QVariant(true)          // shared ammo    15
-		<< QVariant(true)		   //disable girders 16
-		<< QVariant(150)           // damage modfier 17
-		<< QVariant(30)            // turn time      18
-		<< QVariant(50)            // init health    19
-		<< QVariant(15)            // sudden death   20
-		<< QVariant(0)             // case prob      21
-		<< QVariant(0)             //  mines time    22
-		<< QVariant(80)            //  landadds      23
-		<< QVariant(0)             // mine dud pct   24
-		<< QVariant(0)             // explosives     25
-		;
+    QList<QVariant> minefield;
+    minefield
+        << predefSchemesNames[4]   // name           0
+        << QVariant(false)         // fortsmode      1
+        << QVariant(false)         // team divide    2
+        << QVariant(false)         // solid land     3
+        << QVariant(false)         // border         4
+        << QVariant(false)         // low gravity    5
+        << QVariant(false)         // laser sight    6
+        << QVariant(false)         // invulnerable   7
+        << QVariant(true)          // add mines      8
+        << QVariant(false)         // vampiric       9
+        << QVariant(false)         // karma          10
+        << QVariant(false)         // artillery      11
+        << QVariant(true)          // random order   12
+        << QVariant(false)         // king           13
+        << QVariant(false)         // place hog      14
+        << QVariant(true)          // shared ammo    15
+        << QVariant(true)          //disable girders 16
+        << QVariant(150)           // damage modfier 17
+        << QVariant(30)            // turn time      18
+        << QVariant(50)            // init health    19
+        << QVariant(15)            // sudden death   20
+        << QVariant(0)             // case prob      21
+        << QVariant(0)             //  mines time    22
+        << QVariant(80)            //  landadds      23
+        << QVariant(0)             // mine dud pct   24
+        << QVariant(0)             // explosives     25
+        ;
 
-	schemes.append(defaultScheme);
-	schemes.append(proMode);
-	schemes.append(shoppa);
-	schemes.append(basketball);
-	schemes.append(minefield);
+    schemes.append(defaultScheme);
+    schemes.append(proMode);
+    schemes.append(shoppa);
+    schemes.append(basketball);
+    schemes.append(minefield);
 
 
-	int size = fileConfig.beginReadArray("schemes");
-	for (int i = 0; i < size; ++i) {
-		fileConfig.setArrayIndex(i);
+    int size = fileConfig.beginReadArray("schemes");
+    for (int i = 0; i < size; ++i) {
+        fileConfig.setArrayIndex(i);
 
-		if (!predefSchemesNames.contains(fileConfig.value(spNames[0]).toString()))
-		{
-			QList<QVariant> scheme;
+        if (!predefSchemesNames.contains(fileConfig.value(spNames[0]).toString()))
+        {
+            QList<QVariant> scheme;
 
-			for (int k = 0; k < spNames.size(); ++k)
-				scheme << fileConfig.value(spNames[k], defaultScheme[k]);
+            for (int k = 0; k < spNames.size(); ++k)
+                scheme << fileConfig.value(spNames[k], defaultScheme[k]);
 
-			schemes.append(scheme);
-		}
-	}
-	fileConfig.endArray();
+            schemes.append(scheme);
+        }
+    }
+    fileConfig.endArray();
 }
 
 QVariant AmmoSchemeModel::headerData(int section, Qt::Orientation orientation, int role) const
 {
-	return QVariant();
+    return QVariant();
 }
 
 int AmmoSchemeModel::rowCount(const QModelIndex &parent) const
 {
-	if (parent.isValid())
-		return 0;
-	else
-		return schemes.size();
+    if (parent.isValid())
+        return 0;
+    else
+        return schemes.size();
 }
 
 int AmmoSchemeModel::columnCount(const QModelIndex & parent) const
 {
-	if (parent.isValid())
-		return 0;
-	else
-		return defaultScheme.size();
+    if (parent.isValid())
+        return 0;
+    else
+        return defaultScheme.size();
 }
 
 Qt::ItemFlags AmmoSchemeModel::flags(const QModelIndex & index) const
 {
-	return
-		Qt::ItemIsEnabled
-		| Qt::ItemIsSelectable
-		| Qt::ItemIsEditable;
+    return
+        Qt::ItemIsEnabled
+        | Qt::ItemIsSelectable
+        | Qt::ItemIsEditable;
 }
 
 bool AmmoSchemeModel::setData(const QModelIndex & index, const QVariant & value, int role)
 {
-	if (!index.isValid() || index.row() < numberOfDefaultSchemes
-		|| index.row() >= schemes.size()
-		|| index.column() >= defaultScheme.size()
-		|| role != Qt::EditRole)
-		return false;
+    if (!index.isValid() || index.row() < numberOfDefaultSchemes
+        || index.row() >= schemes.size()
+        || index.column() >= defaultScheme.size()
+        || role != Qt::EditRole)
+        return false;
 
-	schemes[index.row()][index.column()] = value;
+    schemes[index.row()][index.column()] = value;
 
-	emit dataChanged(index, index);
-	return true;
+    emit dataChanged(index, index);
+    return true;
 }
 
 bool AmmoSchemeModel::insertRows(int row, int count, const QModelIndex & parent)
 {
-	beginInsertRows(parent, row, row);
+    beginInsertRows(parent, row, row);
 
-	QList<QVariant> newScheme = defaultScheme;
-	newScheme[0] = QVariant(tr("new"));
+    QList<QVariant> newScheme = defaultScheme;
+    newScheme[0] = QVariant(tr("new"));
 
-	schemes.insert(row, newScheme);
+    schemes.insert(row, newScheme);
 
-	endInsertRows();
+    endInsertRows();
 
-	return true;
+    return true;
 }
 
 bool AmmoSchemeModel::removeRows(int row, int count, const QModelIndex & parent)
 {
-	if(count != 1
-		|| row < numberOfDefaultSchemes
-		|| row >= schemes.size())
-		return false;
+    if(count != 1
+        || row < numberOfDefaultSchemes
+        || row >= schemes.size())
+        return false;
 
-	beginRemoveRows(parent, row, row);
+    beginRemoveRows(parent, row, row);
 
-	schemes.removeAt(row);
+    schemes.removeAt(row);
 
-	endRemoveRows();
+    endRemoveRows();
 
-	return true;
+    return true;
 }
 
 QVariant AmmoSchemeModel::data(const QModelIndex &index, int role) const
 {
-	if (!index.isValid() || index.row() < 0
-		|| index.row() >= schemes.size()
-		|| index.column() >= defaultScheme.size()
-		|| (role != Qt::EditRole && role != Qt::DisplayRole)
-		)
-		return QVariant();
+    if (!index.isValid() || index.row() < 0
+        || index.row() >= schemes.size()
+        || index.column() >= defaultScheme.size()
+        || (role != Qt::EditRole && role != Qt::DisplayRole)
+        )
+        return QVariant();
 
-	return schemes[index.row()][index.column()];
+    return schemes[index.row()][index.column()];
 }
 
 void AmmoSchemeModel::Save()
 {
-	fileConfig.beginWriteArray("schemes", schemes.size());
+    fileConfig.beginWriteArray("schemes", schemes.size());
 
-	for (int i = 0; i < schemes.size(); ++i) {
-		fileConfig.setArrayIndex(i);
+    for (int i = 0; i < schemes.size(); ++i) {
+        fileConfig.setArrayIndex(i);
 
-		QList<QVariant> scheme = schemes[i];
+        QList<QVariant> scheme = schemes[i];
 
-		for (int k = 0; k < scheme.size(); ++k)
-			fileConfig.setValue(spNames[k], scheme[k]);
-	}
-	fileConfig.endArray();
+        for (int k = 0; k < scheme.size(); ++k)
+            fileConfig.setValue(spNames[k], scheme[k]);
+    }
+    fileConfig.endArray();
 }
 
 
 NetAmmoSchemeModel::NetAmmoSchemeModel(QObject * parent) :
-	QAbstractTableModel(parent)
+    QAbstractTableModel(parent)
 {
-	netScheme = defaultScheme;
+    netScheme = defaultScheme;
 }
 
 QVariant NetAmmoSchemeModel::headerData(int section, Qt::Orientation orientation, int role) const
 {
-	return QVariant();
+    return QVariant();
 }
 
 int NetAmmoSchemeModel::rowCount(const QModelIndex & parent) const
 {
-	if (parent.isValid())
-		return 0;
-	else
-		return 1;
+    if (parent.isValid())
+        return 0;
+    else
+        return 1;
 }
 
 int NetAmmoSchemeModel::columnCount(const QModelIndex & parent) const
 {
-	if (parent.isValid())
-		return 0;
-	else
-		return defaultScheme.size();
+    if (parent.isValid())
+        return 0;
+    else
+        return defaultScheme.size();
 }
 
 QVariant NetAmmoSchemeModel::data(const QModelIndex &index, int role) const
 {
-	if (!index.isValid() || index.row() < 0
-		|| index.row() > 1
-		|| index.column() >= defaultScheme.size()
-		|| (role != Qt::EditRole && role != Qt::DisplayRole)
-		)
-		return QVariant();
+    if (!index.isValid() || index.row() < 0
+        || index.row() > 1
+        || index.column() >= defaultScheme.size()
+        || (role != Qt::EditRole && role != Qt::DisplayRole)
+        )
+        return QVariant();
 
-	return netScheme[index.column()];
+    return netScheme[index.column()];
 }
 
 void NetAmmoSchemeModel::setNetSchemeConfig(QStringList & cfg)
 {
-	if(cfg.size() != netScheme.size())
-	{
-		qWarning("Incorrect scheme cfg size");
-		return;
-	}
+    if(cfg.size() != netScheme.size())
+    {
+        qWarning("Incorrect scheme cfg size");
+        return;
+    }
 
-	for(int i = 0; i < cfg.size(); ++i)
-		netScheme[i] = QVariant(cfg[i]);
+    for(int i = 0; i < cfg.size(); ++i)
+        netScheme[i] = QVariant(cfg[i]);
 
-	reset();
+    reset();
 }
--- a/QTfrontend/ammoSchemeModel.h	Sat Mar 06 10:54:24 2010 +0000
+++ b/QTfrontend/ammoSchemeModel.h	Sat Mar 06 10:59:20 2010 +0000
@@ -26,54 +26,54 @@
 
 class AmmoSchemeModel : public QAbstractTableModel
 {
-	Q_OBJECT
+    Q_OBJECT
 
 public:
-	AmmoSchemeModel(QObject * parent, const QString & fileName);
+    AmmoSchemeModel(QObject * parent, const QString & fileName);
 
-	QVariant headerData(int section, Qt::Orientation orientation, int role) const;
-	int rowCount(const QModelIndex & parent) const;
-	int columnCount(const QModelIndex & parent) const;
-	Qt::ItemFlags flags(const QModelIndex & index) const;
-	bool setData(const QModelIndex & index, const QVariant & value, int role = Qt::EditRole);
-	bool insertRows(int row, int count, const QModelIndex & parent = QModelIndex());
-	bool removeRows(int row, int count, const QModelIndex & parent = QModelIndex());
-	QVariant data(const QModelIndex &index, int role) const;
+    QVariant headerData(int section, Qt::Orientation orientation, int role) const;
+    int rowCount(const QModelIndex & parent) const;
+    int columnCount(const QModelIndex & parent) const;
+    Qt::ItemFlags flags(const QModelIndex & index) const;
+    bool setData(const QModelIndex & index, const QVariant & value, int role = Qt::EditRole);
+    bool insertRows(int row, int count, const QModelIndex & parent = QModelIndex());
+    bool removeRows(int row, int count, const QModelIndex & parent = QModelIndex());
+    QVariant data(const QModelIndex &index, int role) const;
 
-	const int numberOfDefaultSchemes;
+    const int numberOfDefaultSchemes;
 
 public slots:
-	void Save();
+    void Save();
 
 signals:
-	void dataChanged(const QModelIndex & topLeft, const QModelIndex & bottomRight);
+    void dataChanged(const QModelIndex & topLeft, const QModelIndex & bottomRight);
 
 protected:
-	QList< QList<QVariant> > schemes;
+    QList< QList<QVariant> > schemes;
 
 private:
-	QSettings fileConfig;
+    QSettings fileConfig;
 
-	QStringList spNames;
+    QStringList spNames;
 };
 
 class NetAmmoSchemeModel : public QAbstractTableModel
 {
-	Q_OBJECT
+    Q_OBJECT
 
 public:
-	NetAmmoSchemeModel(QObject * parent);
+    NetAmmoSchemeModel(QObject * parent);
 
-	QVariant headerData(int section, Qt::Orientation orientation, int role) const;
-	int rowCount(const QModelIndex & parent) const;
-	int columnCount(const QModelIndex & parent) const;
-	QVariant data(const QModelIndex &index, int role) const;
+    QVariant headerData(int section, Qt::Orientation orientation, int role) const;
+    int rowCount(const QModelIndex & parent) const;
+    int columnCount(const QModelIndex & parent) const;
+    QVariant data(const QModelIndex &index, int role) const;
 
 public slots:
-	void setNetSchemeConfig(QStringList & cfg);
+    void setNetSchemeConfig(QStringList & cfg);
 
 private:
-	QList<QVariant> netScheme;
+    QList<QVariant> netScheme;
 };
 
 #endif // _AMMO_SCHEME_MODEL_INCLUDED
--- a/QTfrontend/bgwidget.cpp	Sat Mar 06 10:54:24 2010 +0000
+++ b/QTfrontend/bgwidget.cpp	Sat Mar 06 10:59:20 2010 +0000
@@ -20,9 +20,9 @@
 
 SpritePosition::SpritePosition(QWidget * parent, int sh)
 {
-	wParent = parent;
-	iSpriteHeight = sh;
-	reset();
+    wParent = parent;
+    iSpriteHeight = sh;
+    reset();
 }
 
 SpritePosition::~SpritePosition()
@@ -31,110 +31,110 @@
 
 void SpritePosition::move()
 {
-	fX += fXMov;
-	fY += fYMov;
-	iAngle += 4;
-	if (iAngle >= 360) iAngle = 0;
-	if (fY > wParent->height()) reset();
+    fX += fXMov;
+    fY += fYMov;
+    iAngle += 4;
+    if (iAngle >= 360) iAngle = 0;
+    if (fY > wParent->height()) reset();
 }
 
 void SpritePosition::reset()
 {
-	fY = -1 * iSpriteHeight;
-	fX = (qrand() % ((int)(wParent->width() * 1.5))) - wParent->width()/2;
-	fYMov = ((qrand() % 400)+300) / 100.0f;
-	fXMov = fYMov * 0.5f;
-	iAngle = qrand() % 360;
+    fY = -1 * iSpriteHeight;
+    fX = (qrand() % ((int)(wParent->width() * 1.5))) - wParent->width()/2;
+    fYMov = ((qrand() % 400)+300) / 100.0f;
+    fXMov = fYMov * 0.5f;
+    iAngle = qrand() % 360;
 }
 
 QPoint SpritePosition::pos()
 {
-	return QPoint((int)fX,(int)fY);
+    return QPoint((int)fX,(int)fY);
 }
 
 int SpritePosition::getAngle()
 {
-	return iAngle;
+    return iAngle;
 }
 
 void SpritePosition::init()
 {
-	fY = qrand() % (wParent->height() + 1);
-	fX = qrand() % (wParent->width() + 1);
+    fY = qrand() % (wParent->height() + 1);
+    fX = qrand() % (wParent->width() + 1);
 }
 
 BGWidget::BGWidget(QWidget * parent) : QWidget(parent)
 {
     setAttribute(Qt::WA_NoSystemBackground, true);
-	sprite.load(":/res/Star.png");
+    sprite.load(":/res/Star.png");
 
-	setAutoFillBackground(false);
+    setAutoFillBackground(false);
 
-	for (int i = 0; i < SPRITE_MAX; i++) spritePositions[i] = new SpritePosition(this, sprite.height());
+    for (int i = 0; i < SPRITE_MAX; i++) spritePositions[i] = new SpritePosition(this, sprite.height());
 
-	for (int i = 0; i < 360; i++)
-	{
-		rotatedSprites[i] = new QImage(sprite.width(), sprite.height(), QImage::Format_ARGB32);
-		rotatedSprites[i]->fill(0);
+    for (int i = 0; i < 360; i++)
+    {
+        rotatedSprites[i] = new QImage(sprite.width(), sprite.height(), QImage::Format_ARGB32);
+        rotatedSprites[i]->fill(0);
 
-		QPoint translate(sprite.width()/2, sprite.height()/2);
+        QPoint translate(sprite.width()/2, sprite.height()/2);
 
-		QPainter p;
-		p.begin(rotatedSprites[i]);
-	//	p.setRenderHint(QPainter::Antialiasing);
-		p.setRenderHint(QPainter::SmoothPixmapTransform);
-		p.translate(translate.x(), translate.y());
-		p.rotate(i);
-		p.translate(-1*translate.x(), -1*translate.y());
-		p.drawImage(0, 0, sprite);
-	}
+        QPainter p;
+        p.begin(rotatedSprites[i]);
+    //  p.setRenderHint(QPainter::Antialiasing);
+        p.setRenderHint(QPainter::SmoothPixmapTransform);
+        p.translate(translate.x(), translate.y());
+        p.rotate(i);
+        p.translate(-1*translate.x(), -1*translate.y());
+        p.drawImage(0, 0, sprite);
+    }
 
-	timerAnimation = new QTimer();
-	connect(timerAnimation, SIGNAL(timeout()), this, SLOT(animate()));
-	timerAnimation->setInterval(ANIMATION_INTERVAL);
+    timerAnimation = new QTimer();
+    connect(timerAnimation, SIGNAL(timeout()), this, SLOT(animate()));
+    timerAnimation->setInterval(ANIMATION_INTERVAL);
 }
 
 BGWidget::~BGWidget()
 {
-	for (int i = 0; i < SPRITE_MAX; i++) delete spritePositions[i];
-	for (int i = 0; i < 360; i++) delete rotatedSprites[i];
-	delete timerAnimation;
+    for (int i = 0; i < SPRITE_MAX; i++) delete spritePositions[i];
+    for (int i = 0; i < 360; i++) delete rotatedSprites[i];
+    delete timerAnimation;
 }
 
 void BGWidget::paintEvent(QPaintEvent *event)
 {
-	QPainter p;
-	p.begin(this);
-	//p.setRenderHint(QPainter::Antialiasing);
-	for (int i = 0; i < SPRITE_MAX; i++)
-	{
-		QPoint point = spritePositions[i]->pos();
-		p.drawImage(point.x(), point.y(), *rotatedSprites[spritePositions[i]->getAngle()]);
-	}
-	p.end();
+    QPainter p;
+    p.begin(this);
+    //p.setRenderHint(QPainter::Antialiasing);
+    for (int i = 0; i < SPRITE_MAX; i++)
+    {
+        QPoint point = spritePositions[i]->pos();
+        p.drawImage(point.x(), point.y(), *rotatedSprites[spritePositions[i]->getAngle()]);
+    }
+    p.end();
 }
 
 void BGWidget::animate()
 {
-	for (int i = 0; i < SPRITE_MAX; i++)
-	{
+    for (int i = 0; i < SPRITE_MAX; i++)
+    {
         // bottom edge of star *seems* clipped, but in fact, if I switch to just plain old repaint()/update() it is still clipped - artifact of transform?  As for 5, is arbitrary number. 4 was noticeably clipping, 5 seemed same as update() - I assume extra room is due to rotation and value really should be calculated proportional to width/height
         update(spritePositions[i]->pos().x(),spritePositions[i]->pos().y(), sprite.width()+5, sprite.height()+5);
-		spritePositions[i]->move();
-	}
+        spritePositions[i]->move();
+    }
 }
 
 void BGWidget::startAnimation()
 {
-	timerAnimation->start();
+    timerAnimation->start();
 }
 
 void BGWidget::stopAnimation()
 {
-	timerAnimation->stop();
+    timerAnimation->stop();
 }
 
 void BGWidget::init()
 {
-	for (int i = 0; i < SPRITE_MAX; i++) spritePositions[i]->init();
+    for (int i = 0; i < SPRITE_MAX; i++) spritePositions[i]->init();
 }
--- a/QTfrontend/bgwidget.h	Sat Mar 06 10:54:24 2010 +0000
+++ b/QTfrontend/bgwidget.h	Sat Mar 06 10:59:20 2010 +0000
@@ -34,42 +34,42 @@
 class SpritePosition
 {
 public:
-	SpritePosition(QWidget * parent, int sh);
-	~SpritePosition();
+    SpritePosition(QWidget * parent, int sh);
+    ~SpritePosition();
 private:
-	float fX;
-	float fY;
-	float fXMov;
-	float fYMov;
-	int iAngle;
-	QWidget * wParent;
-	int iSpriteHeight;
+    float fX;
+    float fY;
+    float fXMov;
+    float fYMov;
+    int iAngle;
+    QWidget * wParent;
+    int iSpriteHeight;
 public:
-	void move();
-	void reset();
-	QPoint pos();
-	int getAngle();
-	void init();
+    void move();
+    void reset();
+    QPoint pos();
+    int getAngle();
+    void init();
 };
 
 class BGWidget : public QWidget
 {
-	Q_OBJECT
+    Q_OBJECT
 public:
-	BGWidget(QWidget * parent);
-	~BGWidget();
-	void startAnimation();
-	void stopAnimation();
-	void init();
+    BGWidget(QWidget * parent);
+    ~BGWidget();
+    void startAnimation();
+    void stopAnimation();
+    void init();
 private:
-	QImage sprite;
-	QTimer * timerAnimation;
-	SpritePosition * spritePositions[SPRITE_MAX];
-	QImage * rotatedSprites[360];
+    QImage sprite;
+    QTimer * timerAnimation;
+    SpritePosition * spritePositions[SPRITE_MAX];
+    QImage * rotatedSprites[360];
 protected:
-	void paintEvent(QPaintEvent * event);
+    void paintEvent(QPaintEvent * event);
 private slots:
-	void animate();
+    void animate();
 };
 
 #endif // BGWIDGET_H
--- a/QTfrontend/binds.cpp	Sat Mar 06 10:54:24 2010 +0000
+++ b/QTfrontend/binds.cpp	Sat Mar 06 10:59:20 2010 +0000
@@ -20,50 +20,50 @@
 
 const BindAction cbinds[BINDS_NUMBER] =
 {
-	{"+up",	"up",	QT_TRANSLATE_NOOP("binds", "up"),	QT_TRANSLATE_NOOP("binds (categories)", "Basic controls"), QT_TRANSLATE_NOOP("binds (descriptions)", "Move your hogs and aim:")},
-	{"+left",	"left",	QT_TRANSLATE_NOOP("binds", "left"),	NULL, NULL},
-	{"+right",	"right",	QT_TRANSLATE_NOOP("binds", "right"),	NULL, NULL},
-	{"+down",	"down",	QT_TRANSLATE_NOOP("binds", "down"),	NULL, NULL},
-	{"+precise",	"left_shift",	QT_TRANSLATE_NOOP("binds", "precise aim"),	NULL, NULL},
-	{"ljump",	"return",	QT_TRANSLATE_NOOP("binds", "long jump"),	NULL, QT_TRANSLATE_NOOP("binds (descriptions)", "Traverse gaps and obstacles by jumping:")},
-	{"hjump",	"backspace",	QT_TRANSLATE_NOOP("binds", "high jump"),	NULL, NULL},
-	{"+attack",	"space",	QT_TRANSLATE_NOOP("binds", "attack"),	NULL, QT_TRANSLATE_NOOP("binds (descriptions)", "Fire your selected weapon or trigger an utility item:")},
-	{"put",	"mousel",	QT_TRANSLATE_NOOP("binds", "put"),	NULL, QT_TRANSLATE_NOOP("binds (descriptions)", "Pick a weapon or a target location under the cursor:")},
-	{"switch",	"tab",	QT_TRANSLATE_NOOP("binds", "switch"),	NULL, QT_TRANSLATE_NOOP("binds (descriptions)", "Switch your currently active hog (if possible):")},
-	{"ammomenu",	"mouser",	QT_TRANSLATE_NOOP("binds", "ammo menu"),	QT_TRANSLATE_NOOP("binds (categories)", "Weapon controls"), QT_TRANSLATE_NOOP("binds (descriptions)", "Pick a weapon or utility item:")},
-	{"slot 1",	"f1",	QT_TRANSLATE_NOOP("binds", "slot 1"),	NULL, NULL},
-	{"slot 2",	"f2",	QT_TRANSLATE_NOOP("binds", "slot 2"),	NULL, NULL},
-	{"slot 3",	"f3",	QT_TRANSLATE_NOOP("binds", "slot 3"),	NULL, NULL},
-	{"slot 4",	"f4",	QT_TRANSLATE_NOOP("binds", "slot 4"),	NULL, NULL},
-	{"slot 5",	"f5",	QT_TRANSLATE_NOOP("binds", "slot 5"),	NULL, NULL},
-	{"slot 6",	"f6",	QT_TRANSLATE_NOOP("binds", "slot 6"),	NULL, NULL},
-	{"slot 7",	"f7",	QT_TRANSLATE_NOOP("binds", "slot 7"),	NULL, NULL},
-	{"slot 8",	"f8",	QT_TRANSLATE_NOOP("binds", "slot 8"),	NULL, NULL},
-	{"slot 9",	"f9",	QT_TRANSLATE_NOOP("binds", "slot 9"),	NULL, NULL},
-	{"timer 1",	"1",	QT_TRANSLATE_NOOP("binds", "timer 1 sec"),	NULL, QT_TRANSLATE_NOOP("binds (descriptions)", "Set the timer on bombs and timed weapons:")},
-	{"timer 2",	"2",	QT_TRANSLATE_NOOP("binds", "timer 2 sec"),	NULL, NULL},
-	{"timer 3",	"3",	QT_TRANSLATE_NOOP("binds", "timer 3 sec"),	NULL, NULL},
-	{"timer 4",	"4",	QT_TRANSLATE_NOOP("binds", "timer 4 sec"),	NULL, NULL},
-	{"timer 5",	"5",	QT_TRANSLATE_NOOP("binds", "timer 5 sec"),	NULL, NULL},
-	{"findhh",	"h",	QT_TRANSLATE_NOOP("binds", "find hedgehog"),	QT_TRANSLATE_NOOP("binds (categories)", "Camera and cursor controls"), QT_TRANSLATE_NOOP("binds (descriptions)", "Move the camera to the active hog:")},
-	{"+cur_u",	"",	QT_TRANSLATE_NOOP("binds", "up"),	NULL, QT_TRANSLATE_NOOP("binds (descriptions)", "Move the cursor or camera without using the mouse:")},
-	{"+cur_l",	"",	QT_TRANSLATE_NOOP("binds", "left"),	NULL, NULL},
-	{"+cur_r",	"",	QT_TRANSLATE_NOOP("binds", "right"),	NULL, NULL},
-	{"+cur_d",	"",	QT_TRANSLATE_NOOP("binds", "down"),	NULL, NULL},
-//	{"+cur_m",	"",	QT_TRANSLATE_NOOP("binds", "movement key modifier"),	NULL, QT_TRANSLATE_NOOP("binds (descriptions)", "Specify a modifier key to move camera and cursor using your default hog movement keys:")},
-	{"zoomin",	"wheeldown",	QT_TRANSLATE_NOOP("binds", "zoom in"),	NULL, QT_TRANSLATE_NOOP("binds (descriptions)", "Modify the camera's zoom level:")},
-	{"zoomout",	"wheelup",	QT_TRANSLATE_NOOP("binds", "zoom out"),	NULL, NULL},
-	{"zoomreset",	"mousem",	QT_TRANSLATE_NOOP("binds", "reset zoom"),	NULL, NULL},
-	{"chat",	"t",	QT_TRANSLATE_NOOP("binds", "chat"),	QT_TRANSLATE_NOOP("binds (categories)", "Other"), QT_TRANSLATE_NOOP("binds (descriptions)", "Talk to your team or all participants:")},
-	{"history",	"`",	QT_TRANSLATE_NOOP("binds", "chat history"),	NULL, NULL},
-	{"pause",	"p",	QT_TRANSLATE_NOOP("binds", "pause"),	NULL, QT_TRANSLATE_NOOP("binds (descriptions)", "Pause, continue or leave your game:")},
-	{"quit",	"escape",	QT_TRANSLATE_NOOP("binds", "quit"),	NULL, NULL},
-	{"confirm",	"y",	QT_TRANSLATE_NOOP("binds", "confirmation"),	NULL, NULL},
-	{"+voldown",	"9",	QT_TRANSLATE_NOOP("binds", "volume down"),	NULL, QT_TRANSLATE_NOOP("binds (descriptions)", "Modify the game's volume while playing:")},
-	{"+volup",	"0",	QT_TRANSLATE_NOOP("binds", "volume up"),	NULL, NULL},
+    {"+up", "up",   QT_TRANSLATE_NOOP("binds", "up"),   QT_TRANSLATE_NOOP("binds (categories)", "Basic controls"), QT_TRANSLATE_NOOP("binds (descriptions)", "Move your hogs and aim:")},
+    {"+left",   "left", QT_TRANSLATE_NOOP("binds", "left"), NULL, NULL},
+    {"+right",  "right",    QT_TRANSLATE_NOOP("binds", "right"),    NULL, NULL},
+    {"+down",   "down", QT_TRANSLATE_NOOP("binds", "down"), NULL, NULL},
+    {"+precise",    "left_shift",   QT_TRANSLATE_NOOP("binds", "precise aim"),  NULL, NULL},
+    {"ljump",   "return",   QT_TRANSLATE_NOOP("binds", "long jump"),    NULL, QT_TRANSLATE_NOOP("binds (descriptions)", "Traverse gaps and obstacles by jumping:")},
+    {"hjump",   "backspace",    QT_TRANSLATE_NOOP("binds", "high jump"),    NULL, NULL},
+    {"+attack", "space",    QT_TRANSLATE_NOOP("binds", "attack"),   NULL, QT_TRANSLATE_NOOP("binds (descriptions)", "Fire your selected weapon or trigger an utility item:")},
+    {"put", "mousel",   QT_TRANSLATE_NOOP("binds", "put"),  NULL, QT_TRANSLATE_NOOP("binds (descriptions)", "Pick a weapon or a target location under the cursor:")},
+    {"switch",  "tab",  QT_TRANSLATE_NOOP("binds", "switch"),   NULL, QT_TRANSLATE_NOOP("binds (descriptions)", "Switch your currently active hog (if possible):")},
+    {"ammomenu",    "mouser",   QT_TRANSLATE_NOOP("binds", "ammo menu"),    QT_TRANSLATE_NOOP("binds (categories)", "Weapon controls"), QT_TRANSLATE_NOOP("binds (descriptions)", "Pick a weapon or utility item:")},
+    {"slot 1",  "f1",   QT_TRANSLATE_NOOP("binds", "slot 1"),   NULL, NULL},
+    {"slot 2",  "f2",   QT_TRANSLATE_NOOP("binds", "slot 2"),   NULL, NULL},
+    {"slot 3",  "f3",   QT_TRANSLATE_NOOP("binds", "slot 3"),   NULL, NULL},
+    {"slot 4",  "f4",   QT_TRANSLATE_NOOP("binds", "slot 4"),   NULL, NULL},
+    {"slot 5",  "f5",   QT_TRANSLATE_NOOP("binds", "slot 5"),   NULL, NULL},
+    {"slot 6",  "f6",   QT_TRANSLATE_NOOP("binds", "slot 6"),   NULL, NULL},
+    {"slot 7",  "f7",   QT_TRANSLATE_NOOP("binds", "slot 7"),   NULL, NULL},
+    {"slot 8",  "f8",   QT_TRANSLATE_NOOP("binds", "slot 8"),   NULL, NULL},
+    {"slot 9",  "f9",   QT_TRANSLATE_NOOP("binds", "slot 9"),   NULL, NULL},
+    {"timer 1", "1",    QT_TRANSLATE_NOOP("binds", "timer 1 sec"),  NULL, QT_TRANSLATE_NOOP("binds (descriptions)", "Set the timer on bombs and timed weapons:")},
+    {"timer 2", "2",    QT_TRANSLATE_NOOP("binds", "timer 2 sec"),  NULL, NULL},
+    {"timer 3", "3",    QT_TRANSLATE_NOOP("binds", "timer 3 sec"),  NULL, NULL},
+    {"timer 4", "4",    QT_TRANSLATE_NOOP("binds", "timer 4 sec"),  NULL, NULL},
+    {"timer 5", "5",    QT_TRANSLATE_NOOP("binds", "timer 5 sec"),  NULL, NULL},
+    {"findhh",  "h",    QT_TRANSLATE_NOOP("binds", "find hedgehog"),    QT_TRANSLATE_NOOP("binds (categories)", "Camera and cursor controls"), QT_TRANSLATE_NOOP("binds (descriptions)", "Move the camera to the active hog:")},
+    {"+cur_u",  "", QT_TRANSLATE_NOOP("binds", "up"),   NULL, QT_TRANSLATE_NOOP("binds (descriptions)", "Move the cursor or camera without using the mouse:")},
+    {"+cur_l",  "", QT_TRANSLATE_NOOP("binds", "left"), NULL, NULL},
+    {"+cur_r",  "", QT_TRANSLATE_NOOP("binds", "right"),    NULL, NULL},
+    {"+cur_d",  "", QT_TRANSLATE_NOOP("binds", "down"), NULL, NULL},
+//  {"+cur_m",  "", QT_TRANSLATE_NOOP("binds", "movement key modifier"),    NULL, QT_TRANSLATE_NOOP("binds (descriptions)", "Specify a modifier key to move camera and cursor using your default hog movement keys:")},
+    {"zoomin",  "wheeldown",    QT_TRANSLATE_NOOP("binds", "zoom in"),  NULL, QT_TRANSLATE_NOOP("binds (descriptions)", "Modify the camera's zoom level:")},
+    {"zoomout", "wheelup",  QT_TRANSLATE_NOOP("binds", "zoom out"), NULL, NULL},
+    {"zoomreset",   "mousem",   QT_TRANSLATE_NOOP("binds", "reset zoom"),   NULL, NULL},
+    {"chat",    "t",    QT_TRANSLATE_NOOP("binds", "chat"), QT_TRANSLATE_NOOP("binds (categories)", "Other"), QT_TRANSLATE_NOOP("binds (descriptions)", "Talk to your team or all participants:")},
+    {"history", "`",    QT_TRANSLATE_NOOP("binds", "chat history"), NULL, NULL},
+    {"pause",   "p",    QT_TRANSLATE_NOOP("binds", "pause"),    NULL, QT_TRANSLATE_NOOP("binds (descriptions)", "Pause, continue or leave your game:")},
+    {"quit",    "escape",   QT_TRANSLATE_NOOP("binds", "quit"), NULL, NULL},
+    {"confirm", "y",    QT_TRANSLATE_NOOP("binds", "confirmation"), NULL, NULL},
+    {"+voldown",    "9",    QT_TRANSLATE_NOOP("binds", "volume down"),  NULL, QT_TRANSLATE_NOOP("binds (descriptions)", "Modify the game's volume while playing:")},
+    {"+volup",  "0",    QT_TRANSLATE_NOOP("binds", "volume up"),    NULL, NULL},
 #ifndef _WIN32
-	{"fullscr",	"f12",	QT_TRANSLATE_NOOP("binds", "change mode"),	NULL, QT_TRANSLATE_NOOP("binds (descriptions)", "Toggle fullscreen mode:")},
+    {"fullscr", "f12",  QT_TRANSLATE_NOOP("binds", "change mode"),  NULL, QT_TRANSLATE_NOOP("binds (descriptions)", "Toggle fullscreen mode:")},
 #endif
-	{"capture",	"c",	QT_TRANSLATE_NOOP("binds", "capture"),	NULL, QT_TRANSLATE_NOOP("binds (descriptions)", "Take a screenshot:")},
-	{"rotmask",	"delete",	QT_TRANSLATE_NOOP("binds", "hedgehogs\ninfo"),	NULL, QT_TRANSLATE_NOOP("binds (descriptions)", "Toggle labels above hedgehogs:")}
+    {"capture", "c",    QT_TRANSLATE_NOOP("binds", "capture"),  NULL, QT_TRANSLATE_NOOP("binds (descriptions)", "Take a screenshot:")},
+    {"rotmask", "delete",   QT_TRANSLATE_NOOP("binds", "hedgehogs\ninfo"),  NULL, QT_TRANSLATE_NOOP("binds (descriptions)", "Toggle labels above hedgehogs:")}
 };
--- a/QTfrontend/binds.h	Sat Mar 06 10:54:24 2010 +0000
+++ b/QTfrontend/binds.h	Sat Mar 06 10:59:20 2010 +0000
@@ -29,11 +29,11 @@
 
 struct BindAction
 {
-	QString action;
-	QString strbind;
-	const char * name;
-	const char * category;
-	const char * description;
+    QString action;
+    QString strbind;
+    const char * name;
+    const char * category;
+    const char * description;
 };
 
 extern const BindAction cbinds[BINDS_NUMBER];
--- a/QTfrontend/chatwidget.cpp	Sat Mar 06 10:54:24 2010 +0000
+++ b/QTfrontend/chatwidget.cpp	Sat Mar 06 10:59:20 2010 +0000
@@ -51,192 +51,192 @@
        sound[3] = Mix_LoadWAV(QString(tmpdir.absolutePath() + "/Russian/Hello.ogg").toLocal8Bit().constData());
     }
 
-	mainLayout.setSpacing(1);
-	mainLayout.setMargin(1);
-	mainLayout.setSizeConstraint(QLayout::SetMinimumSize);
-	mainLayout.setColumnStretch(0, 75);
-	mainLayout.setColumnStretch(1, 25);
+    mainLayout.setSpacing(1);
+    mainLayout.setMargin(1);
+    mainLayout.setSizeConstraint(QLayout::SetMinimumSize);
+    mainLayout.setColumnStretch(0, 75);
+    mainLayout.setColumnStretch(1, 25);
 
-	chatEditLine = new QLineEdit(this);
-	chatEditLine->setMaxLength(300);
-	connect(chatEditLine, SIGNAL(returnPressed()), this, SLOT(returnPressed()));
+    chatEditLine = new QLineEdit(this);
+    chatEditLine->setMaxLength(300);
+    connect(chatEditLine, SIGNAL(returnPressed()), this, SLOT(returnPressed()));
 
-	mainLayout.addWidget(chatEditLine, 1, 0, 1, 2);
+    mainLayout.addWidget(chatEditLine, 1, 0, 1, 2);
 
-	chatText = new QTextBrowser(this);
-	chatText->setMinimumHeight(20);
-	chatText->setMinimumWidth(10);
-	chatText->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding);
-	chatText->setOpenExternalLinks(true);
-	mainLayout.addWidget(chatText, 0, 0);
+    chatText = new QTextBrowser(this);
+    chatText->setMinimumHeight(20);
+    chatText->setMinimumWidth(10);
+    chatText->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding);
+    chatText->setOpenExternalLinks(true);
+    mainLayout.addWidget(chatText, 0, 0);
 
-	chatNicks = new QListWidget(this);
-	chatNicks->setMinimumHeight(10);
-	chatNicks->setMinimumWidth(10);
-	chatNicks->setSortingEnabled(true);
-	chatNicks->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding);
-	chatNicks->setContextMenuPolicy(Qt::ActionsContextMenu);
-	connect(chatNicks, SIGNAL(itemDoubleClicked(QListWidgetItem *)),
-		this, SLOT(chatNickDoubleClicked(QListWidgetItem *)));
-	connect(chatNicks, SIGNAL(currentRowChanged(int)),
-		this, SLOT(chatNickSelected(int)));
+    chatNicks = new QListWidget(this);
+    chatNicks->setMinimumHeight(10);
+    chatNicks->setMinimumWidth(10);
+    chatNicks->setSortingEnabled(true);
+    chatNicks->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding);
+    chatNicks->setContextMenuPolicy(Qt::ActionsContextMenu);
+    connect(chatNicks, SIGNAL(itemDoubleClicked(QListWidgetItem *)),
+        this, SLOT(chatNickDoubleClicked(QListWidgetItem *)));
+    connect(chatNicks, SIGNAL(currentRowChanged(int)),
+        this, SLOT(chatNickSelected(int)));
 
-	mainLayout.addWidget(chatNicks, 0, 1);
+    mainLayout.addWidget(chatNicks, 0, 1);
 
-	acInfo = new QAction(QAction::tr("Info"), chatNicks);
-	connect(acInfo, SIGNAL(triggered(bool)), this, SLOT(onInfo()));
-	acKick = new QAction(QAction::tr("Kick"), chatNicks);
-	connect(acKick, SIGNAL(triggered(bool)), this, SLOT(onKick()));
-	acBan = new QAction(QAction::tr("Ban"), chatNicks);
-	connect(acBan, SIGNAL(triggered(bool)), this, SLOT(onBan()));
-	acFollow = new QAction(QAction::tr("Follow"), chatNicks);
-	connect(acFollow, SIGNAL(triggered(bool)), this, SLOT(onFollow()));
-	acIgnore = new QAction(QAction::tr("Ignore"), chatNicks);
-	connect(acIgnore, SIGNAL(triggered(bool)), this, SLOT(onIgnore()));
-	acFriend = new QAction(QAction::tr("Add friend"), chatNicks);
-	connect(acFriend, SIGNAL(triggered(bool)), this, SLOT(onFriend()));
+    acInfo = new QAction(QAction::tr("Info"), chatNicks);
+    connect(acInfo, SIGNAL(triggered(bool)), this, SLOT(onInfo()));
+    acKick = new QAction(QAction::tr("Kick"), chatNicks);
+    connect(acKick, SIGNAL(triggered(bool)), this, SLOT(onKick()));
+    acBan = new QAction(QAction::tr("Ban"), chatNicks);
+    connect(acBan, SIGNAL(triggered(bool)), this, SLOT(onBan()));
+    acFollow = new QAction(QAction::tr("Follow"), chatNicks);
+    connect(acFollow, SIGNAL(triggered(bool)), this, SLOT(onFollow()));
+    acIgnore = new QAction(QAction::tr("Ignore"), chatNicks);
+    connect(acIgnore, SIGNAL(triggered(bool)), this, SLOT(onIgnore()));
+    acFriend = new QAction(QAction::tr("Add friend"), chatNicks);
+    connect(acFriend, SIGNAL(triggered(bool)), this, SLOT(onFriend()));
 
-	chatNicks->insertAction(0, acInfo);
-	chatNicks->insertAction(0, acFollow);
-	chatNicks->insertAction(0, acIgnore);
-	chatNicks->insertAction(0, acFriend);
-	
-	showReady = false;
+    chatNicks->insertAction(0, acInfo);
+    chatNicks->insertAction(0, acFollow);
+    chatNicks->insertAction(0, acIgnore);
+    chatNicks->insertAction(0, acFriend);
+    
+    showReady = false;
 }
 
 void HWChatWidget::loadList(QStringList & list, const QString & file)
 {
-	list.clear();
-	QFile txt((cfgdir->absolutePath() + "/" + file).toLocal8Bit().constData());
-	if(!txt.open(QIODevice::ReadOnly))
-		return;
-	QTextStream stream(&txt);
-	stream.setCodec("UTF-8");
+    list.clear();
+    QFile txt((cfgdir->absolutePath() + "/" + file).toLocal8Bit().constData());
+    if(!txt.open(QIODevice::ReadOnly))
+        return;
+    QTextStream stream(&txt);
+    stream.setCodec("UTF-8");
 
-	while(!stream.atEnd())
-	{
-		QString str = stream.readLine();
-		if(str.startsWith(";") || str.length() == 0)
-			continue;
-		list << str.trimmed();
-	}
-	list.removeDuplicates();
-	txt.close();
+    while(!stream.atEnd())
+    {
+        QString str = stream.readLine();
+        if(str.startsWith(";") || str.length() == 0)
+            continue;
+        list << str.trimmed();
+    }
+    list.removeDuplicates();
+    txt.close();
 }
 
 void HWChatWidget::saveList(QStringList & list, const QString & file)
 {
-	QFile txt((cfgdir->absolutePath() + "/" + file).toLocal8Bit().constData());
-	if(!txt.open(QIODevice::WriteOnly | QIODevice::Truncate))
-		return;
-	QTextStream stream(&txt);
-	stream.setCodec("UTF-8");
+    QFile txt((cfgdir->absolutePath() + "/" + file).toLocal8Bit().constData());
+    if(!txt.open(QIODevice::WriteOnly | QIODevice::Truncate))
+        return;
+    QTextStream stream(&txt);
+    stream.setCodec("UTF-8");
 
-	stream << "; this list is used by Hedgewars - do not edit it unless you know what you're doing!" << endl;
-	for(int i = 0; i < list.size(); i++)
-		stream << list[i] << endl;
-	txt.close();
+    stream << "; this list is used by Hedgewars - do not edit it unless you know what you're doing!" << endl;
+    for(int i = 0; i < list.size(); i++)
+        stream << list[i] << endl;
+    txt.close();
 }
 
 void HWChatWidget::updateIcon(QListWidgetItem *item)
 {
-	QString nick = item->text();
+    QString nick = item->text();
 
-	if(ignoreList.contains(nick, Qt::CaseInsensitive))
-	{
-		item->setIcon(QIcon(showReady ? (item->data(Qt::UserRole).toBool() ? ":/res/chat_ignore_on" : ":/res/chat_ignore_off") : ":/res/chat_ignore.png"));
-		item->setForeground(Qt::gray);
-	}
-	else if(friendsList.contains(nick, Qt::CaseInsensitive))
-	{
-		item->setIcon(QIcon(showReady ? (item->data(Qt::UserRole).toBool() ? ":/res/chat_friend_on" : ":/res/chat_friend_off") : ":/res/chat_friend.png"));
-		item->setForeground(Qt::green);
-	}
-	else
-	{
-		item->setIcon(QIcon(showReady ? (item->data(Qt::UserRole).toBool() ? ":/res/chat_default_on" : ":/res/chat_default_off") : ":/res/chat_default.png"));
-		item->setForeground(QBrush(QColor(0xff, 0xcc, 0x00)));
-	}
+    if(ignoreList.contains(nick, Qt::CaseInsensitive))
+    {
+        item->setIcon(QIcon(showReady ? (item->data(Qt::UserRole).toBool() ? ":/res/chat_ignore_on" : ":/res/chat_ignore_off") : ":/res/chat_ignore.png"));
+        item->setForeground(Qt::gray);
+    }
+    else if(friendsList.contains(nick, Qt::CaseInsensitive))
+    {
+        item->setIcon(QIcon(showReady ? (item->data(Qt::UserRole).toBool() ? ":/res/chat_friend_on" : ":/res/chat_friend_off") : ":/res/chat_friend.png"));
+        item->setForeground(Qt::green);
+    }
+    else
+    {
+        item->setIcon(QIcon(showReady ? (item->data(Qt::UserRole).toBool() ? ":/res/chat_default_on" : ":/res/chat_default_off") : ":/res/chat_default.png"));
+        item->setForeground(QBrush(QColor(0xff, 0xcc, 0x00)));
+    }
 }
 
 void HWChatWidget::updateIcons()
 {
-	for(int i = 0; i < chatNicks->count(); i++)
-		updateIcon(chatNicks->item(i));
+    for(int i = 0; i < chatNicks->count(); i++)
+        updateIcon(chatNicks->item(i));
 }
 
 void HWChatWidget::loadLists(const QString & nick)
 {
-	loadList(ignoreList, nick.toLower() + "_ignore.txt");
-	loadList(friendsList, nick.toLower() + "_friends.txt");
-	updateIcons();
+    loadList(ignoreList, nick.toLower() + "_ignore.txt");
+    loadList(friendsList, nick.toLower() + "_friends.txt");
+    updateIcons();
 }
 
 void HWChatWidget::saveLists(const QString & nick)
 {
-	saveList(ignoreList, nick.toLower() + "_ignore.txt");
-	saveList(friendsList, nick.toLower() + "_friends.txt");
+    saveList(ignoreList, nick.toLower() + "_ignore.txt");
+    saveList(friendsList, nick.toLower() + "_friends.txt");
 }
 
 void HWChatWidget::returnPressed()
 {
-	emit chatLine(chatEditLine->text());
-	chatEditLine->clear();
+    emit chatLine(chatEditLine->text());
+    chatEditLine->clear();
 }
 
 void HWChatWidget::onChatString(const QString& str)
 {
-	if (chatStrings.size() > 250)
-		chatStrings.removeFirst();
+    if (chatStrings.size() > 250)
+        chatStrings.removeFirst();
 
-	QString formattedStr = Qt::escape(str.mid(1));
-	QStringList parts = formattedStr.split(QRegExp("\\W+"), QString::SkipEmptyParts);
+    QString formattedStr = Qt::escape(str.mid(1));
+    QStringList parts = formattedStr.split(QRegExp("\\W+"), QString::SkipEmptyParts);
 
-	if (!formattedStr.startsWith(" ***")) // don't ignore status messages
-	{
-		if (formattedStr.startsWith(" *")) // emote
-			parts[0] = parts[1];
-		if(parts.size() > 0 && ignoreList.contains(parts[0], Qt::CaseInsensitive))
-			return;
-	}
+    if (!formattedStr.startsWith(" ***")) // don't ignore status messages
+    {
+        if (formattedStr.startsWith(" *")) // emote
+            parts[0] = parts[1];
+        if(parts.size() > 0 && ignoreList.contains(parts[0], Qt::CaseInsensitive))
+            return;
+    }
 
-	QString color("");
-	bool isFriend = friendsList.contains(parts[0], Qt::CaseInsensitive);
-	
-	if (str.startsWith("\x03"))
-		color = QString("#c0c0c0");
-	else if (str.startsWith("\x02"))
-		color = QString(isFriend ? "#00ff00" : "#ff00ff");
-	else if (isFriend)
-		color = QString("#00c000");
+    QString color("");
+    bool isFriend = friendsList.contains(parts[0], Qt::CaseInsensitive);
+    
+    if (str.startsWith("\x03"))
+        color = QString("#c0c0c0");
+    else if (str.startsWith("\x02"))
+        color = QString(isFriend ? "#00ff00" : "#ff00ff");
+    else if (isFriend)
+        color = QString("#00c000");
 
-	if(color.compare("") != 0)
-		formattedStr = QString("<font color=\"%2\">%1</font>").arg(formattedStr).arg(color);
+    if(color.compare("") != 0)
+        formattedStr = QString("<font color=\"%2\">%1</font>").arg(formattedStr).arg(color);
 
-	chatStrings.append(formattedStr);
+    chatStrings.append(formattedStr);
 
-	chatText->setHtml(chatStrings.join("<br>"));
+    chatText->setHtml(chatStrings.join("<br>"));
 
-	chatText->moveCursor(QTextCursor::End);
+    chatText->moveCursor(QTextCursor::End);
 }
 
 void HWChatWidget::onServerMessage(const QString& str)
 {
-	if (chatStrings.size() > 250)
-		chatStrings.removeFirst();
+    if (chatStrings.size() > 250)
+        chatStrings.removeFirst();
 
-	chatStrings.append("<hr>" + str + "<hr>");
+    chatStrings.append("<hr>" + str + "<hr>");
 
-	chatText->setHtml(chatStrings.join("<br>"));
+    chatText->setHtml(chatStrings.join("<br>"));
 
-	chatText->moveCursor(QTextCursor::End);
+    chatText->moveCursor(QTextCursor::End);
 }
 
 void HWChatWidget::nickAdded(const QString& nick, bool notifyNick)
 {
-	QListWidgetItem * item = new QListWidgetItem(nick);
-	updateIcon(item);
-	chatNicks->addItem(item);
+    QListWidgetItem * item = new QListWidgetItem(nick);
+    updateIcon(item);
+    chatNicks->addItem(item);
 
     if(notifyNick && notify && gameSettings->value("audio/frontendsound", true).toBool()) {
        Mix_PlayChannel(-1, sound[rand()%4], 0);
@@ -245,140 +245,140 @@
 
 void HWChatWidget::nickRemoved(const QString& nick)
 {
-	QList<QListWidgetItem *> items = chatNicks->findItems(nick, Qt::MatchExactly);
-	for(QList<QListWidgetItem *>::iterator it=items.begin(); it!=items.end();) {
-		chatNicks->takeItem(chatNicks->row(*it));
-		++it;
-	}
+    QList<QListWidgetItem *> items = chatNicks->findItems(nick, Qt::MatchExactly);
+    for(QList<QListWidgetItem *>::iterator it=items.begin(); it!=items.end();) {
+        chatNicks->takeItem(chatNicks->row(*it));
+        ++it;
+    }
 }
 
 void HWChatWidget::clear()
 {
-	chatText->clear();
-	chatStrings.clear();
-	chatNicks->clear();
+    chatText->clear();
+    chatStrings.clear();
+    chatNicks->clear();
 }
 
 void HWChatWidget::onKick()
 {
-	QListWidgetItem * curritem = chatNicks->currentItem();
-	if (curritem)
-		emit kick(curritem->text());
+    QListWidgetItem * curritem = chatNicks->currentItem();
+    if (curritem)
+        emit kick(curritem->text());
 }
 
 void HWChatWidget::onBan()
 {
-	QListWidgetItem * curritem = chatNicks->currentItem();
-	if (curritem)
-		emit ban(curritem->text());
+    QListWidgetItem * curritem = chatNicks->currentItem();
+    if (curritem)
+        emit ban(curritem->text());
 }
 
 void HWChatWidget::onInfo()
 {
-	QListWidgetItem * curritem = chatNicks->currentItem();
-	if (curritem)
-		emit info(curritem->text());
+    QListWidgetItem * curritem = chatNicks->currentItem();
+    if (curritem)
+        emit info(curritem->text());
 }
 
 void HWChatWidget::onFollow()
 {
-	QListWidgetItem * curritem = chatNicks->currentItem();
-	if (curritem)
-		emit follow(curritem->text());
+    QListWidgetItem * curritem = chatNicks->currentItem();
+    if (curritem)
+        emit follow(curritem->text());
 }
 
 void HWChatWidget::onIgnore()
 {
-	QListWidgetItem * curritem = chatNicks->currentItem();
-	if(!curritem)
-		return;
+    QListWidgetItem * curritem = chatNicks->currentItem();
+    if(!curritem)
+        return;
 
-	if(ignoreList.contains(curritem->text(), Qt::CaseInsensitive)) // already on list - remove him
-	{
-		ignoreList.removeAll(curritem->text().toLower());
-		onChatString(HWChatWidget::tr("%1 *** %2 has been removed from your ignore list").arg('\x03').arg(curritem->text()));
-	}
-	else // not on list - add
-	{
-		ignoreList << curritem->text().toLower();
-		onChatString(HWChatWidget::tr("%1 *** %2 has been added to your ignore list").arg('\x03').arg(curritem->text()));
-	}
-	updateIcon(curritem); // update icon
-	chatNickSelected(0); // update context menu
+    if(ignoreList.contains(curritem->text(), Qt::CaseInsensitive)) // already on list - remove him
+    {
+        ignoreList.removeAll(curritem->text().toLower());
+        onChatString(HWChatWidget::tr("%1 *** %2 has been removed from your ignore list").arg('\x03').arg(curritem->text()));
+    }
+    else // not on list - add
+    {
+        ignoreList << curritem->text().toLower();
+        onChatString(HWChatWidget::tr("%1 *** %2 has been added to your ignore list").arg('\x03').arg(curritem->text()));
+    }
+    updateIcon(curritem); // update icon
+    chatNickSelected(0); // update context menu
 }
 
 void HWChatWidget::onFriend()
 {
-	QListWidgetItem * curritem = chatNicks->currentItem();
-	if(!curritem)
-		return;
+    QListWidgetItem * curritem = chatNicks->currentItem();
+    if(!curritem)
+        return;
 
-	if(friendsList.contains(curritem->text(), Qt::CaseInsensitive)) // already on list - remove him
-	{
-		friendsList.removeAll(curritem->text().toLower());
-		onChatString(HWChatWidget::tr("%1 *** %2 has been removed from your friends list").arg('\x03').arg(curritem->text()));
-	}
-	else // not on list - add
-	{
-		friendsList << curritem->text().toLower();
-		onChatString(HWChatWidget::tr("%1 *** %2 has been added to your friends list").arg('\x03').arg(curritem->text()));
-	}
-	updateIcon(curritem); // update icon
-	chatNickSelected(0); // update context menu
+    if(friendsList.contains(curritem->text(), Qt::CaseInsensitive)) // already on list - remove him
+    {
+        friendsList.removeAll(curritem->text().toLower());
+        onChatString(HWChatWidget::tr("%1 *** %2 has been removed from your friends list").arg('\x03').arg(curritem->text()));
+    }
+    else // not on list - add
+    {
+        friendsList << curritem->text().toLower();
+        onChatString(HWChatWidget::tr("%1 *** %2 has been added to your friends list").arg('\x03').arg(curritem->text()));
+    }
+    updateIcon(curritem); // update icon
+    chatNickSelected(0); // update context menu
 }
 
 void HWChatWidget::chatNickDoubleClicked(QListWidgetItem * item)
 {
-	if (item) onFollow();
+    if (item) onFollow();
 }
 
 void HWChatWidget::chatNickSelected(int index)
 {
-	QListWidgetItem* item = chatNicks->currentItem();
-	if (!item)
-		return;
+    QListWidgetItem* item = chatNicks->currentItem();
+    if (!item)
+        return;
 
-	// update context menu labels according to possible action
-	if(ignoreList.contains(item->text(), Qt::CaseInsensitive))
-		acIgnore->setText(QAction::tr("Unignore"));
-	else
-		acIgnore->setText(QAction::tr("Ignore"));
+    // update context menu labels according to possible action
+    if(ignoreList.contains(item->text(), Qt::CaseInsensitive))
+        acIgnore->setText(QAction::tr("Unignore"));
+    else
+        acIgnore->setText(QAction::tr("Ignore"));
 
-	if(friendsList.contains(item->text(), Qt::CaseInsensitive))
-		acFriend->setText(QAction::tr("Remove friend"));
-	else
-		acFriend->setText(QAction::tr("Add friend"));
+    if(friendsList.contains(item->text(), Qt::CaseInsensitive))
+        acFriend->setText(QAction::tr("Remove friend"));
+    else
+        acFriend->setText(QAction::tr("Add friend"));
 }
 
 void HWChatWidget::setShowReady(bool s)
 {
-	showReady = s;
+    showReady = s;
 }
 
 void HWChatWidget::setReadyStatus(const QString & nick, bool isReady)
 {
-	QList<QListWidgetItem *> items = chatNicks->findItems(nick, Qt::MatchExactly);
-	if (items.size() != 1)
-	{
-		qWarning("Bug: cannot find user in chat");
-		return;
-	}
+    QList<QListWidgetItem *> items = chatNicks->findItems(nick, Qt::MatchExactly);
+    if (items.size() != 1)
+    {
+        qWarning("Bug: cannot find user in chat");
+        return;
+    }
 
-	items[0]->setData(Qt::UserRole, isReady); // bulb status
-	updateIcon(items[0]);
+    items[0]->setData(Qt::UserRole, isReady); // bulb status
+    updateIcon(items[0]);
 
-	// ensure we're still showing the status bulbs
-	showReady = true;
+    // ensure we're still showing the status bulbs
+    showReady = true;
 }
 
 void HWChatWidget::adminAccess(bool b)
 {
-	chatNicks->removeAction(acKick);
-	chatNicks->removeAction(acBan);
+    chatNicks->removeAction(acKick);
+    chatNicks->removeAction(acBan);
 
-	if(b)
-	{
-		chatNicks->insertAction(0, acKick);
-//		chatNicks->insertAction(0, acBan);
-	}
+    if(b)
+    {
+        chatNicks->insertAction(0, acKick);
+//      chatNicks->insertAction(0, acBan);
+    }
 }
--- a/QTfrontend/fpsedit.cpp	Sat Mar 06 10:54:24 2010 +0000
+++ b/QTfrontend/fpsedit.cpp	Sat Mar 06 10:59:20 2010 +0000
@@ -19,13 +19,13 @@
 #include "fpsedit.h"
 
 FPSEdit::FPSEdit(QWidget * parent) :
-	QSpinBox(parent)
+    QSpinBox(parent)
 {
-	setRange(1, 34);
-	setValue(27);
+    setRange(1, 34);
+    setValue(27);
 }
 
 QString FPSEdit::textFromValue(int value) const
 {
-	return QString::number(1000 / (35 - value));
+    return QString::number(1000 / (35 - value));
 }
--- a/QTfrontend/fpsedit.h	Sat Mar 06 10:54:24 2010 +0000
+++ b/QTfrontend/fpsedit.h	Sat Mar 06 10:59:20 2010 +0000
@@ -23,13 +23,13 @@
 
 class FPSEdit : public QSpinBox
 {
-	Q_OBJECT
+    Q_OBJECT
 
 public:
-	FPSEdit(QWidget * parent = 0);
+    FPSEdit(QWidget * parent = 0);
 
 protected:
-	 QString textFromValue (int value) const;
+     QString textFromValue (int value) const;
 };
 
 #endif // _FPSEDIT_H
--- a/QTfrontend/frameTeam.cpp	Sat Mar 06 10:54:24 2010 +0000
+++ b/QTfrontend/frameTeam.cpp	Sat Mar 06 10:59:20 2010 +0000
@@ -27,32 +27,32 @@
 FrameTeams::FrameTeams(QWidget* parent) :
   QFrame(parent), maxHedgehogsPerGame(48), overallHedgehogs(0), mainLayout(this), nonInteractive(false)
 {
-	QPalette newPalette = palette();
-	newPalette.setColor(QPalette::Window, QColor(0x00, 0x00, 0x00));
-	setPalette(newPalette);
-	setAutoFillBackground(true);
+    QPalette newPalette = palette();
+    newPalette.setColor(QPalette::Window, QColor(0x00, 0x00, 0x00));
+    setPalette(newPalette);
+    setAutoFillBackground(true);
 
-	mainLayout.setSpacing(1);
-	mainLayout.setContentsMargins(4, 4, 4, 4);
+    mainLayout.setSpacing(1);
+    mainLayout.setContentsMargins(4, 4, 4, 4);
 
-	availableColors.push_back(*color1);
-	availableColors.push_back(*color2);
-	availableColors.push_back(*color3);
-	availableColors.push_back(*color4);
-	availableColors.push_back(*color5);
-	availableColors.push_back(*color6);
+    availableColors.push_back(*color1);
+    availableColors.push_back(*color2);
+    availableColors.push_back(*color3);
+    availableColors.push_back(*color4);
+    availableColors.push_back(*color5);
+    availableColors.push_back(*color6);
 
-	resetColors();
+    resetColors();
 }
 
 void FrameTeams::setInteractivity(bool interactive)
 {
-	nonInteractive = !interactive;
-	for(tmapTeamToWidget::iterator it=teamToWidget.begin(); it!=teamToWidget.end(); ++it) {
-		TeamShowWidget* pts = dynamic_cast<TeamShowWidget*>(it.value());
-		if(!pts) throw;
-		pts->setInteractivity(interactive);
-	}
+    nonInteractive = !interactive;
+    for(tmapTeamToWidget::iterator it=teamToWidget.begin(); it!=teamToWidget.end(); ++it) {
+        TeamShowWidget* pts = dynamic_cast<TeamShowWidget*>(it.value());
+        if(!pts) throw;
+        pts->setInteractivity(interactive);
+    }
 }
 
 void FrameTeams::resetColors()
--- a/QTfrontend/game.cpp	Sat Mar 06 10:54:24 2010 +0000
+++ b/QTfrontend/game.cpp	Sat Mar 06 10:59:20 2010 +0000
@@ -37,315 +37,315 @@
   ammostr(ammo),
   m_pTeamSelWidget(pTeamSelWidget)
 {
-	this->config = config;
-	this->gamecfg = gamecfg;
-	TeamCount = 0;
+    this->config = config;
+    this->gamecfg = gamecfg;
+    TeamCount = 0;
 }
 
 HWGame::~HWGame()
 {
-	SetGameState(gsDestroyed);
+    SetGameState(gsDestroyed);
 }
 
 void HWGame::onClientDisconnect()
 {
-	switch (gameType) {
-		case gtDemo: break;
-		case gtNet:
-			emit HaveRecord(true, demo);
-			break;
-		default:
-			if (gameState == gsInterrupted) emit HaveRecord(false, demo);
-			else if (gameState == gsFinished) emit HaveRecord(true, demo);
-	}
-	SetGameState(gsStopped);
+    switch (gameType) {
+        case gtDemo: break;
+        case gtNet:
+            emit HaveRecord(true, demo);
+            break;
+        default:
+            if (gameState == gsInterrupted) emit HaveRecord(false, demo);
+            else if (gameState == gsFinished) emit HaveRecord(true, demo);
+    }
+    SetGameState(gsStopped);
 }
 
 void HWGame::commonConfig()
 {
-	QByteArray buf;
-	QString gt;
-	switch (gameType) {
-		case gtDemo:
-			gt = "TD";
-			break;
-		case gtNet:
-			gt = "TN";
-			break;
-		default:
-			gt = "TL";
-	}
-	HWProto::addStringToBuffer(buf, gt);
+    QByteArray buf;
+    QString gt;
+    switch (gameType) {
+        case gtDemo:
+            gt = "TD";
+            break;
+        case gtNet:
+            gt = "TN";
+            break;
+        default:
+            gt = "TL";
+    }
+    HWProto::addStringToBuffer(buf, gt);
 
-	HWProto::addStringListToBuffer(buf, gamecfg->getFullConfig());
+    HWProto::addStringListToBuffer(buf, gamecfg->getFullConfig());
 
-	if (m_pTeamSelWidget)
-	{
-		QList<HWTeam> teams = m_pTeamSelWidget->getPlayingTeams();
-		for(QList<HWTeam>::iterator it = teams.begin(); it != teams.end(); ++it)
-		{
-			HWProto::addStringListToBuffer(buf,
-				(*it).TeamGameConfig(gamecfg->getInitHealth()));
-			HWProto::addStringToBuffer(buf, QString("eammstore %1").arg(ammostr));
-		}
-	}
-	RawSendIPC(buf);
+    if (m_pTeamSelWidget)
+    {
+        QList<HWTeam> teams = m_pTeamSelWidget->getPlayingTeams();
+        for(QList<HWTeam>::iterator it = teams.begin(); it != teams.end(); ++it)
+        {
+            HWProto::addStringListToBuffer(buf,
+                (*it).TeamGameConfig(gamecfg->getInitHealth()));
+            HWProto::addStringToBuffer(buf, QString("eammstore %1").arg(ammostr));
+        }
+    }
+    RawSendIPC(buf);
 }
 
 void HWGame::SendConfig()
 {
-	commonConfig();
+    commonConfig();
 }
 
 void HWGame::SendQuickConfig()
 {
-	QByteArray teamscfg;
+    QByteArray teamscfg;
 
-	HWProto::addStringToBuffer(teamscfg, "TL");
-	HWProto::addStringToBuffer(teamscfg, QString("etheme %1")
-			.arg((Themes->size() > 0) ? Themes->at(rand() % Themes->size()) : "steel"));
-	HWProto::addStringToBuffer(teamscfg, "eseed " + QUuid::createUuid().toString());
+    HWProto::addStringToBuffer(teamscfg, "TL");
+    HWProto::addStringToBuffer(teamscfg, QString("etheme %1")
+            .arg((Themes->size() > 0) ? Themes->at(rand() % Themes->size()) : "steel"));
+    HWProto::addStringToBuffer(teamscfg, "eseed " + QUuid::createUuid().toString());
 
-	HWNamegen namegen;
+    HWNamegen namegen;
 
-	HWTeam * team1;
-	team1 = new HWTeam;
-	team1->difficulty = 0;
-	team1->teamColor = *color1;
-	team1->numHedgehogs = 4;
-	namegen.TeamRandomNames(team1,TRUE);
-	HWProto::addStringListToBuffer(teamscfg,
-			team1->TeamGameConfig(100));
+    HWTeam * team1;
+    team1 = new HWTeam;
+    team1->difficulty = 0;
+    team1->teamColor = *color1;
+    team1->numHedgehogs = 4;
+    namegen.TeamRandomNames(team1,TRUE);
+    HWProto::addStringListToBuffer(teamscfg,
+            team1->TeamGameConfig(100));
 
-	HWTeam * team2;
-	team2 = new HWTeam;
-	team2->difficulty = 4;
-	team2->teamColor = *color2;
-	team2->numHedgehogs = 4;
-	namegen.TeamRandomNames(team2,TRUE);
-	HWProto::addStringListToBuffer(teamscfg,
-			team2->TeamGameConfig(100));
+    HWTeam * team2;
+    team2 = new HWTeam;
+    team2->difficulty = 4;
+    team2->teamColor = *color2;
+    team2->numHedgehogs = 4;
+    namegen.TeamRandomNames(team2,TRUE);
+    HWProto::addStringListToBuffer(teamscfg,
+            team2->TeamGameConfig(100));
 
-	HWProto::addStringToBuffer(teamscfg, "eammstore " + *cDefaultAmmoStore);
-	HWProto::addStringToBuffer(teamscfg, "eammstore " + *cDefaultAmmoStore);
-	RawSendIPC(teamscfg);
+    HWProto::addStringToBuffer(teamscfg, "eammstore " + *cDefaultAmmoStore);
+    HWProto::addStringToBuffer(teamscfg, "eammstore " + *cDefaultAmmoStore);
+    RawSendIPC(teamscfg);
 }
 
 void HWGame::SendTrainingConfig()
 {
-	QByteArray traincfg;
-	HWProto::addStringToBuffer(traincfg, "TL");
+    QByteArray traincfg;
+    HWProto::addStringToBuffer(traincfg, "TL");
 
-	HWProto::addStringToBuffer(traincfg, "escript " + datadir->absolutePath() + "/Missions/" + training + ".hwt");
+    HWProto::addStringToBuffer(traincfg, "escript " + datadir->absolutePath() + "/Missions/" + training + ".hwt");
 
-	RawSendIPC(traincfg);
+    RawSendIPC(traincfg);
 }
 
 void HWGame::SendNetConfig()
 {
-	commonConfig();
+    commonConfig();
 }
 
 void HWGame::ParseMessage(const QByteArray & msg)
 {
-	switch(msg.at(1)) {
-		case '?': {
-			SendIPC("!");
-			break;
-		}
-		case 'C': {
-			switch (gameType) {
-				case gtLocal: {
-					SendConfig();
-					break;
-				}
-				case gtQLocal: {
-					SendQuickConfig();
-					break;
-				}
-				case gtDemo: break;
-				case gtNet: {
-					SendNetConfig();
-					break;
-				}
-				case gtTraining: {
-					SendTrainingConfig();
-					break;
-				}
-			}
-			break;
-		}
-		case 'E': {
-			int size = msg.size();
-			emit ErrorMessage(QString("Last two engine messages:\n") + QString().append(msg.mid(2)).left(size - 4));
-			return;
-		}
-		case 'K': {
-			ulong kb = msg.mid(2).toULong();
-			if (kb==1) {
-			  qWarning("%s", KBMessages[kb - 1].toLocal8Bit().constData());
-			  return;
-			}
-			if (kb && kb <= KBmsgsCount)
-			{
-				emit ErrorMessage(KBMessages[kb - 1]);
-			}
-			return;
-		}
-		case 'i': {
-			emit GameStats(msg.at(2), QString::fromUtf8(msg.mid(3)));
-			break;
-		}
-		case 'Q': {
-			SetGameState(gsInterrupted);
-			break;
-		}
-		case 'q': {
-			SetGameState(gsFinished);
-			break;
-		}
-		case 's': {
-			int size = msg.size();
-			QString msgbody = QString::fromUtf8(msg.mid(2).left(size - 4));
-			emit SendChat(msgbody);
-			// FIXME: /me command doesn't work here
-			QByteArray buf;
-			HWProto::addStringToBuffer(buf, "s" + HWProto::formatChatMsg(config->netNick(), msgbody) + "\x20\x20");
-			demo.append(buf);
-			break;
-		}
-		case 'b': {
-			int size = msg.size();
-			QString msgbody = QString::fromUtf8(msg.mid(2).left(size - 4));
-			emit SendTeamMessage(msgbody);
-			break;
-		}
-		default: {
-			if (gameType == gtNet)
-			{
-				emit SendNet(msg);
-			}
-		if (msg.at(1) != 's')
-			demo.append(msg);
-		}
-	}
+    switch(msg.at(1)) {
+        case '?': {
+            SendIPC("!");
+            break;
+        }
+        case 'C': {
+            switch (gameType) {
+                case gtLocal: {
+                    SendConfig();
+                    break;
+                }
+                case gtQLocal: {
+                    SendQuickConfig();
+                    break;
+                }
+                case gtDemo: break;
+                case gtNet: {
+                    SendNetConfig();
+                    break;
+                }
+                case gtTraining: {
+                    SendTrainingConfig();
+                    break;
+                }
+            }
+            break;
+        }
+        case 'E': {
+            int size = msg.size();
+            emit ErrorMessage(QString("Last two engine messages:\n") + QString().append(msg.mid(2)).left(size - 4));
+            return;
+        }
+        case 'K': {
+            ulong kb = msg.mid(2).toULong();
+            if (kb==1) {
+              qWarning("%s", KBMessages[kb - 1].toLocal8Bit().constData());
+              return;
+            }
+            if (kb && kb <= KBmsgsCount)
+            {
+                emit ErrorMessage(KBMessages[kb - 1]);
+            }
+            return;
+        }
+        case 'i': {
+            emit GameStats(msg.at(2), QString::fromUtf8(msg.mid(3)));
+            break;
+        }
+        case 'Q': {
+            SetGameState(gsInterrupted);
+            break;
+        }
+        case 'q': {
+            SetGameState(gsFinished);
+            break;
+        }
+        case 's': {
+            int size = msg.size();
+            QString msgbody = QString::fromUtf8(msg.mid(2).left(size - 4));
+            emit SendChat(msgbody);
+            // FIXME: /me command doesn't work here
+            QByteArray buf;
+            HWProto::addStringToBuffer(buf, "s" + HWProto::formatChatMsg(config->netNick(), msgbody) + "\x20\x20");
+            demo.append(buf);
+            break;
+        }
+        case 'b': {
+            int size = msg.size();
+            QString msgbody = QString::fromUtf8(msg.mid(2).left(size - 4));
+            emit SendTeamMessage(msgbody);
+            break;
+        }
+        default: {
+            if (gameType == gtNet)
+            {
+                emit SendNet(msg);
+            }
+        if (msg.at(1) != 's')
+            demo.append(msg);
+        }
+    }
 }
 
 void HWGame::FromNet(const QByteArray & msg)
 {
-	RawSendIPC(msg);
+    RawSendIPC(msg);
 }
 
 void HWGame::FromNetChat(const QString & msg)
 {
-	QByteArray buf;
-	HWProto::addStringToBuffer(buf, 's' + msg + "\x20\x20");
-	RawSendIPC(buf);
+    QByteArray buf;
+    HWProto::addStringToBuffer(buf, 's' + msg + "\x20\x20");
+    RawSendIPC(buf);
 }
 
 void HWGame::onClientRead()
 {
-	quint8 msglen;
-	quint32 bufsize;
-	while (!readbuffer.isEmpty() && ((bufsize = readbuffer.size()) > 0) &&
-			((msglen = readbuffer.data()[0]) < bufsize))
-	{
-		QByteArray msg = readbuffer.left(msglen + 1);
-		readbuffer.remove(0, msglen + 1);
-		ParseMessage(msg);
-	}
+    quint8 msglen;
+    quint32 bufsize;
+    while (!readbuffer.isEmpty() && ((bufsize = readbuffer.size()) > 0) &&
+            ((msglen = readbuffer.data()[0]) < bufsize))
+    {
+        QByteArray msg = readbuffer.left(msglen + 1);
+        readbuffer.remove(0, msglen + 1);
+        ParseMessage(msg);
+    }
 }
 
 QStringList HWGame::setArguments()
 {
-	QStringList arguments;
-	QRect resolution = config->vid_Resolution();
-	arguments << cfgdir->absolutePath();
-	arguments << QString::number(resolution.width());
-	arguments << QString::number(resolution.height());
-	arguments << QString::number(config->bitDepth()); // bpp
-	arguments << QString("%1").arg(ipc_port);
-	arguments << (config->vid_Fullscreen() ? "1" : "0");
-	arguments << (config->isSoundEnabled() ? "1" : "0");
+    QStringList arguments;
+    QRect resolution = config->vid_Resolution();
+    arguments << cfgdir->absolutePath();
+    arguments << QString::number(resolution.width());
+    arguments << QString::number(resolution.height());
+    arguments << QString::number(config->bitDepth()); // bpp
+    arguments << QString("%1").arg(ipc_port);
+    arguments << (config->vid_Fullscreen() ? "1" : "0");
+    arguments << (config->isSoundEnabled() ? "1" : "0");
 #ifdef _WIN32
-	arguments << (config->isSoundHardware() ? "1" : "0");
+    arguments << (config->isSoundHardware() ? "1" : "0");
 #else
-	arguments << "0";
+    arguments << "0";
 #endif
-	arguments << (config->isWeaponTooltip() ? "1" : "0");
-	arguments << tr("en.txt");
-	arguments << QString::number(config->volume()); // sound volume
-	arguments << QString::number(config->timerInterval());
-	arguments << datadir->absolutePath();
-	arguments << (config->isShowFPSEnabled() ? "1" : "0");
-	arguments << (config->isAltDamageEnabled() ? "1" : "0");
-	arguments << config->netNick().toUtf8().toBase64();
-	arguments << (config->isMusicEnabled() ? "1" : "0");
-	arguments << (config->isReducedQuality() ? "1" : "0");
-	return arguments;
+    arguments << (config->isWeaponTooltip() ? "1" : "0");
+    arguments << tr("en.txt");
+    arguments << QString::number(config->volume()); // sound volume
+    arguments << QString::number(config->timerInterval());
+    arguments << datadir->absolutePath();
+    arguments << (config->isShowFPSEnabled() ? "1" : "0");
+    arguments << (config->isAltDamageEnabled() ? "1" : "0");
+    arguments << config->netNick().toUtf8().toBase64();
+    arguments << (config->isMusicEnabled() ? "1" : "0");
+    arguments << (config->isReducedQuality() ? "1" : "0");
+    return arguments;
 }
 
 void HWGame::AddTeam(const QString & teamname)
 {
-	if (TeamCount == 5) return;
-	teams[TeamCount] = teamname;
-	TeamCount++;
+    if (TeamCount == 5) return;
+    teams[TeamCount] = teamname;
+    TeamCount++;
 }
 
 void HWGame::PlayDemo(const QString & demofilename)
 {
-	gameType = gtDemo;
-	QFile demofile(demofilename);
-	if (!demofile.open(QIODevice::ReadOnly))
-	{
-		emit ErrorMessage(tr("Cannot open demofile %1").arg(demofilename));
-		return ;
-	}
+    gameType = gtDemo;
+    QFile demofile(demofilename);
+    if (!demofile.open(QIODevice::ReadOnly))
+    {
+        emit ErrorMessage(tr("Cannot open demofile %1").arg(demofilename));
+        return ;
+    }
 
-	// read demo
-	toSendBuf = demofile.readAll();
+    // read demo
+    toSendBuf = demofile.readAll();
 
-	// run engine
-	demo.clear();
-	Start();
-	SetGameState(gsStarted);
+    // run engine
+    demo.clear();
+    Start();
+    SetGameState(gsStarted);
 }
 
 void HWGame::StartNet()
 {
-	gameType = gtNet;
-	demo.clear();
-	Start();
-	SetGameState(gsStarted);
+    gameType = gtNet;
+    demo.clear();
+    Start();
+    SetGameState(gsStarted);
 }
 
 void HWGame::StartLocal()
 {
-	gameType = gtLocal;
-	demo.clear();
-	Start();
-	SetGameState(gsStarted);
+    gameType = gtLocal;
+    demo.clear();
+    Start();
+    SetGameState(gsStarted);
 }
 
 void HWGame::StartQuick()
 {
-	gameType = gtQLocal;
-	demo.clear();
-	Start();
-	SetGameState(gsStarted);
+    gameType = gtQLocal;
+    demo.clear();
+    Start();
+    SetGameState(gsStarted);
 }
 
 void HWGame::StartTraining(const QString & file)
 {
-	gameType = gtTraining;
-	training = file;
-	demo.clear();
-	Start();
-	SetGameState(gsStarted);
+    gameType = gtTraining;
+    training = file;
+    demo.clear();
+    Start();
+    SetGameState(gsStarted);
 }
 
 void HWGame::SetGameState(GameState state)
 {
-	gameState = state;
-	emit GameStateChanged(state);
+    gameState = state;
+    emit GameStateChanged(state);
 }
--- a/QTfrontend/game.h	Sat Mar 06 10:54:24 2010 +0000
+++ b/QTfrontend/game.h	Sat Mar 06 10:59:20 2010 +0000
@@ -30,71 +30,71 @@
 class TeamSelWidget;
 
 enum GameState {
-	gsNotStarted = 0,
-	gsStarted  = 1,
-	gsInterrupted = 2,
-	gsFinished = 3,
-	gsStopped = 4,
-	gsDestroyed = 5
+    gsNotStarted = 0,
+    gsStarted  = 1,
+    gsInterrupted = 2,
+    gsFinished = 3,
+    gsStopped = 4,
+    gsDestroyed = 5
 };
 
 
 class HWGame : public TCPBase
 {
-	Q_OBJECT
+    Q_OBJECT
 public:
-	HWGame(GameUIConfig * config, GameCFGWidget * gamecfg, QString ammo, TeamSelWidget* pTeamSelWidget = 0);
-	virtual ~HWGame();
-	void AddTeam(const QString & team);
-	void PlayDemo(const QString & demofilename);
-	void StartLocal();
-	void StartQuick();
-	void StartNet();
-	void StartTraining(const QString & file);
+    HWGame(GameUIConfig * config, GameCFGWidget * gamecfg, QString ammo, TeamSelWidget* pTeamSelWidget = 0);
+    virtual ~HWGame();
+    void AddTeam(const QString & team);
+    void PlayDemo(const QString & demofilename);
+    void StartLocal();
+    void StartQuick();
+    void StartNet();
+    void StartTraining(const QString & file);
 
  protected:
-	virtual QStringList setArguments();
-	virtual void onClientRead();
-	virtual void onClientDisconnect();
+    virtual QStringList setArguments();
+    virtual void onClientRead();
+    virtual void onClientDisconnect();
 
 signals:
-	void SendNet(const QByteArray & msg);
-	void SendChat(const QString & msg);
-	void SendTeamMessage(const QString & msg);
-	void GameStateChanged(GameState gameState);
-	void GameStats(char type, const QString & info);
-	void HaveRecord(bool isDemo, const QByteArray & record);
-	void ErrorMessage(const QString &);
+    void SendNet(const QByteArray & msg);
+    void SendChat(const QString & msg);
+    void SendTeamMessage(const QString & msg);
+    void GameStateChanged(GameState gameState);
+    void GameStats(char type, const QString & info);
+    void HaveRecord(bool isDemo, const QByteArray & record);
+    void ErrorMessage(const QString &);
 
 public slots:
-	void FromNet(const QByteArray & msg);
-	void FromNetChat(const QString & msg);
+    void FromNet(const QByteArray & msg);
+    void FromNetChat(const QString & msg);
 
 private:
-	enum GameType {
-		gtLocal    = 1,
-		gtQLocal   = 2,
-		gtDemo     = 3,
-		gtNet      = 4,
-		gtTraining = 5
+    enum GameType {
+        gtLocal    = 1,
+        gtQLocal   = 2,
+        gtDemo     = 3,
+        gtNet      = 4,
+        gtTraining = 5
     };
-	char msgbuf[MAXMSGCHARS];
-	QString teams[5];
-	QString ammostr;
-	int TeamCount;
-	GameUIConfig * config;
-	GameCFGWidget * gamecfg;
-	TeamSelWidget* m_pTeamSelWidget;
-	GameType gameType;
-	GameState gameState;
+    char msgbuf[MAXMSGCHARS];
+    QString teams[5];
+    QString ammostr;
+    int TeamCount;
+    GameUIConfig * config;
+    GameCFGWidget * gamecfg;
+    TeamSelWidget* m_pTeamSelWidget;
+    GameType gameType;
+    GameState gameState;
 
-	void commonConfig();
-	void SendConfig();
-	void SendQuickConfig();
-	void SendNetConfig();
-	void SendTrainingConfig();
-	void ParseMessage(const QByteArray & msg);
-	void SetGameState(GameState state);
+    void commonConfig();
+    void SendConfig();
+    void SendQuickConfig();
+    void SendNetConfig();
+    void SendTrainingConfig();
+    void ParseMessage(const QByteArray & msg);
+    void SetGameState(GameState state);
 };
 
 #endif
--- a/QTfrontend/gamecfgwidget.cpp	Sat Mar 06 10:54:24 2010 +0000
+++ b/QTfrontend/gamecfgwidget.cpp	Sat Mar 06 10:59:20 2010 +0000
@@ -34,242 +34,242 @@
 GameCFGWidget::GameCFGWidget(QWidget* parent, bool externalControl) :
   QGroupBox(parent), mainLayout(this)
 {
-	mainLayout.setMargin(0);
-//	mainLayout.setSizeConstraint(QLayout::SetMinimumSize);
+    mainLayout.setMargin(0);
+//  mainLayout.setSizeConstraint(QLayout::SetMinimumSize);
 
-	pMapContainer = new HWMapContainer(this);
-	mainLayout.addWidget(pMapContainer, 0, 0);
+    pMapContainer = new HWMapContainer(this);
+    mainLayout.addWidget(pMapContainer, 0, 0);
 
-	IconedGroupBox *GBoxOptions = new IconedGroupBox(this);
-	GBoxOptions->setSizePolicy(QSizePolicy::Minimum, QSizePolicy::Minimum);
-	mainLayout.addWidget(GBoxOptions);
+    IconedGroupBox *GBoxOptions = new IconedGroupBox(this);
+    GBoxOptions->setSizePolicy(QSizePolicy::Minimum, QSizePolicy::Minimum);
+    mainLayout.addWidget(GBoxOptions);
 
-	QGridLayout *GBoxOptionsLayout = new QGridLayout(GBoxOptions);
+    QGridLayout *GBoxOptionsLayout = new QGridLayout(GBoxOptions);
 
-	GameSchemes = new QComboBox(GBoxOptions);
-	GBoxOptionsLayout->addWidget(GameSchemes, 0, 1);
-	connect(GameSchemes, SIGNAL(currentIndexChanged(int)), this, SLOT(schemeChanged(int)));
+    GameSchemes = new QComboBox(GBoxOptions);
+    GBoxOptionsLayout->addWidget(GameSchemes, 0, 1);
+    connect(GameSchemes, SIGNAL(currentIndexChanged(int)), this, SLOT(schemeChanged(int)));
 
-	GBoxOptionsLayout->addWidget(new QLabel(QLabel::tr("Game scheme"), GBoxOptions), 0, 0);
+    GBoxOptionsLayout->addWidget(new QLabel(QLabel::tr("Game scheme"), GBoxOptions), 0, 0);
 
-	QPixmap pmEdit(":/res/edit.png");
-	
-	QPushButton * goToSchemePage = new QPushButton(GBoxOptions);
-	//goToSchemePage->setText(tr("Edit schemes"));
+    QPixmap pmEdit(":/res/edit.png");
+    
+    QPushButton * goToSchemePage = new QPushButton(GBoxOptions);
+    //goToSchemePage->setText(tr("Edit schemes"));
     goToSchemePage->setToolTip(tr("Edit schemes"));
-	goToSchemePage->setIconSize(pmEdit.size());
-	goToSchemePage->setIcon(pmEdit);
-	goToSchemePage->setMaximumWidth(pmEdit.width() + 6);
-	GBoxOptionsLayout->addWidget(goToSchemePage, 0, 2);
-	connect(goToSchemePage, SIGNAL(clicked()), this, SIGNAL(goToSchemes()));
+    goToSchemePage->setIconSize(pmEdit.size());
+    goToSchemePage->setIcon(pmEdit);
+    goToSchemePage->setMaximumWidth(pmEdit.width() + 6);
+    GBoxOptionsLayout->addWidget(goToSchemePage, 0, 2);
+    connect(goToSchemePage, SIGNAL(clicked()), this, SIGNAL(goToSchemes()));
 
-	GBoxOptionsLayout->addWidget(new QLabel(QLabel::tr("Weapons"), GBoxOptions), 1, 0);
+    GBoxOptionsLayout->addWidget(new QLabel(QLabel::tr("Weapons"), GBoxOptions), 1, 0);
 
-	WeaponsName = new QComboBox(GBoxOptions);
-	GBoxOptionsLayout->addWidget(WeaponsName, 1, 1);
+    WeaponsName = new QComboBox(GBoxOptions);
+    GBoxOptionsLayout->addWidget(WeaponsName, 1, 1);
 
-	connect(WeaponsName, SIGNAL(currentIndexChanged(int)), this, SLOT(ammoChanged(int)));
+    connect(WeaponsName, SIGNAL(currentIndexChanged(int)), this, SLOT(ammoChanged(int)));
 
-	QPushButton * goToWeaponPage = new QPushButton(GBoxOptions);
-	//goToWeaponPage->setText(tr("Edit weapons"));
+    QPushButton * goToWeaponPage = new QPushButton(GBoxOptions);
+    //goToWeaponPage->setText(tr("Edit weapons"));
     goToWeaponPage->setToolTip(tr("Edit weapons"));
-	goToWeaponPage->setIconSize(pmEdit.size());
-	goToWeaponPage->setIcon(pmEdit);
-	goToWeaponPage->setMaximumWidth(pmEdit.width() + 6);
-	GBoxOptionsLayout->addWidget(goToWeaponPage, 1, 2);
+    goToWeaponPage->setIconSize(pmEdit.size());
+    goToWeaponPage->setIcon(pmEdit);
+    goToWeaponPage->setMaximumWidth(pmEdit.width() + 6);
+    GBoxOptionsLayout->addWidget(goToWeaponPage, 1, 2);
 
-	connect(goToWeaponPage, SIGNAL(clicked()), this, SLOT(jumpToWeapons()));
+    connect(goToWeaponPage, SIGNAL(clicked()), this, SLOT(jumpToWeapons()));
 
-	connect(pMapContainer, SIGNAL(seedChanged(const QString &)), this, SLOT(seedChanged(const QString &)));
-	connect(pMapContainer, SIGNAL(mapChanged(const QString &)), this, SLOT(mapChanged(const QString &)));
-	connect(pMapContainer, SIGNAL(themeChanged(const QString &)), this, SLOT(themeChanged(const QString &)));
-	connect(pMapContainer, SIGNAL(newTemplateFilter(int)), this, SLOT(templateFilterChanged(int)));
+    connect(pMapContainer, SIGNAL(seedChanged(const QString &)), this, SLOT(seedChanged(const QString &)));
+    connect(pMapContainer, SIGNAL(mapChanged(const QString &)), this, SLOT(mapChanged(const QString &)));
+    connect(pMapContainer, SIGNAL(themeChanged(const QString &)), this, SLOT(themeChanged(const QString &)));
+    connect(pMapContainer, SIGNAL(newTemplateFilter(int)), this, SLOT(templateFilterChanged(int)));
 }
 
 void GameCFGWidget::jumpToWeapons()
 {
-	emit goToWeapons(WeaponsName->currentText());
+    emit goToWeapons(WeaponsName->currentText());
 }
 
 QVariant GameCFGWidget::schemeData(int column) const
 {
-	return GameSchemes->model()->data(GameSchemes->model()->index(GameSchemes->currentIndex(), column));
+    return GameSchemes->model()->data(GameSchemes->model()->index(GameSchemes->currentIndex(), column));
 }
 
 quint32 GameCFGWidget::getGameFlags() const
 {
-	quint32 result = 0;
+    quint32 result = 0;
 
-	if (schemeData(1).toBool())
-		result |= 0x01;
-	if (schemeData(2).toBool())
-		result |= 0x10;
-	if (schemeData(3).toBool())
-		result |= 0x04;
-	if (schemeData(4).toBool())
-		result |= 0x08;
-	if (schemeData(5).toBool())
-		result |= 0x20;
-	if (schemeData(6).toBool())
-		result |= 0x40;
-	if (schemeData(7).toBool())
-		result |= 0x80;
-	if (schemeData(8).toBool())
-		result |= 0x100;
-	if (schemeData(9).toBool())
-		result |= 0x200;
-	if (schemeData(10).toBool())
-		result |= 0x400;
-	if (schemeData(11).toBool())
-		result |= 0x800;
-	if (schemeData(12).toBool())
-		result |= 0x2000;
-	if (schemeData(13).toBool())
-		result |= 0x4000;
-	if (schemeData(14).toBool())
-		result |= 0x8000;
-	if (schemeData(15).toBool())
-		result |= 0x10000;
-	if (schemeData(16).toBool())
-		result |= 0x20000;
+    if (schemeData(1).toBool())
+        result |= 0x01;
+    if (schemeData(2).toBool())
+        result |= 0x10;
+    if (schemeData(3).toBool())
+        result |= 0x04;
+    if (schemeData(4).toBool())
+        result |= 0x08;
+    if (schemeData(5).toBool())
+        result |= 0x20;
+    if (schemeData(6).toBool())
+        result |= 0x40;
+    if (schemeData(7).toBool())
+        result |= 0x80;
+    if (schemeData(8).toBool())
+        result |= 0x100;
+    if (schemeData(9).toBool())
+        result |= 0x200;
+    if (schemeData(10).toBool())
+        result |= 0x400;
+    if (schemeData(11).toBool())
+        result |= 0x800;
+    if (schemeData(12).toBool())
+        result |= 0x2000;
+    if (schemeData(13).toBool())
+        result |= 0x4000;
+    if (schemeData(14).toBool())
+        result |= 0x8000;
+    if (schemeData(15).toBool())
+        result |= 0x10000;
+    if (schemeData(16).toBool())
+        result |= 0x20000;
 
-	return result;
+    return result;
 }
 
 quint32 GameCFGWidget::getInitHealth() const
 {
-	return schemeData(19).toInt();
+    return schemeData(19).toInt();
 }
 
 QStringList GameCFGWidget::getFullConfig() const
 {
-	QStringList sl;
-	sl.append("eseed " + pMapContainer->getCurrentSeed());
-	sl.append(QString("e$gmflags %1").arg(getGameFlags()));
-	sl.append(QString("e$damagepct %1").arg(schemeData(17).toInt()));
-	sl.append(QString("e$turntime %1").arg(schemeData(18).toInt() * 1000));
-	sl.append(QString("e$minestime %1").arg(schemeData(22).toInt() * 1000));
-	sl.append(QString("e$landadds %1").arg(schemeData(23).toInt()));
-	sl.append(QString("e$sd_turns %1").arg(schemeData(20).toInt()));
-	sl.append(QString("e$casefreq %1").arg(schemeData(21).toInt()));
-	sl.append(QString("e$minedudpct %1").arg(schemeData(24).toInt()));
-	sl.append(QString("e$explosives %1").arg(schemeData(25).toInt()));
-	sl.append(QString("e$template_filter %1").arg(pMapContainer->getTemplateFilter()));
+    QStringList sl;
+    sl.append("eseed " + pMapContainer->getCurrentSeed());
+    sl.append(QString("e$gmflags %1").arg(getGameFlags()));
+    sl.append(QString("e$damagepct %1").arg(schemeData(17).toInt()));
+    sl.append(QString("e$turntime %1").arg(schemeData(18).toInt() * 1000));
+    sl.append(QString("e$minestime %1").arg(schemeData(22).toInt() * 1000));
+    sl.append(QString("e$landadds %1").arg(schemeData(23).toInt()));
+    sl.append(QString("e$sd_turns %1").arg(schemeData(20).toInt()));
+    sl.append(QString("e$casefreq %1").arg(schemeData(21).toInt()));
+    sl.append(QString("e$minedudpct %1").arg(schemeData(24).toInt()));
+    sl.append(QString("e$explosives %1").arg(schemeData(25).toInt()));
+    sl.append(QString("e$template_filter %1").arg(pMapContainer->getTemplateFilter()));
 
-	QString currentMap = pMapContainer->getCurrentMap();
-	if (currentMap.size() > 0)
-		sl.append("emap " + currentMap);
-	sl.append("etheme " + pMapContainer->getCurrentTheme());
-	return sl;
+    QString currentMap = pMapContainer->getCurrentMap();
+    if (currentMap.size() > 0)
+        sl.append("emap " + currentMap);
+    sl.append("etheme " + pMapContainer->getCurrentTheme());
+    return sl;
 }
 
 void GameCFGWidget::setNetAmmo(const QString& name, const QString& ammo)
 {
-	bool illegal = ammo.size() != cDefaultAmmoStore->size();
-	if (illegal)
-		QMessageBox::critical(this, tr("Error"), tr("Illegal ammo scheme"));
+    bool illegal = ammo.size() != cDefaultAmmoStore->size();
+    if (illegal)
+        QMessageBox::critical(this, tr("Error"), tr("Illegal ammo scheme"));
 
-	int pos = WeaponsName->findText(name);
-	if ((pos == -1) || illegal) { // prevent from overriding schemes with bad ones
-		WeaponsName->addItem(name, ammo);
-		WeaponsName->setCurrentIndex(WeaponsName->count() - 1);
-	} else {
-		WeaponsName->setItemData(pos, ammo);
-		WeaponsName->setCurrentIndex(pos);
-	}
+    int pos = WeaponsName->findText(name);
+    if ((pos == -1) || illegal) { // prevent from overriding schemes with bad ones
+        WeaponsName->addItem(name, ammo);
+        WeaponsName->setCurrentIndex(WeaponsName->count() - 1);
+    } else {
+        WeaponsName->setItemData(pos, ammo);
+        WeaponsName->setCurrentIndex(pos);
+    }
 }
 
 void GameCFGWidget::fullNetConfig()
 {
-	ammoChanged(WeaponsName->currentIndex());
+    ammoChanged(WeaponsName->currentIndex());
 
-	seedChanged(pMapContainer->getCurrentSeed());
-	templateFilterChanged(pMapContainer->getTemplateFilter());
-	themeChanged(pMapContainer->getCurrentTheme());
+    seedChanged(pMapContainer->getCurrentSeed());
+    templateFilterChanged(pMapContainer->getTemplateFilter());
+    themeChanged(pMapContainer->getCurrentTheme());
 
-	schemeChanged(GameSchemes->currentIndex());
+    schemeChanged(GameSchemes->currentIndex());
 
-	// map must be the last
-	QString map = pMapContainer->getCurrentMap();
-	if (map.size())
-		mapChanged(map);
+    // map must be the last
+    QString map = pMapContainer->getCurrentMap();
+    if (map.size())
+        mapChanged(map);
 }
 
 void GameCFGWidget::setParam(const QString & param, const QStringList & slValue)
 {
-	if (slValue.size() == 1)
-	{
-		QString value = slValue[0];
-		if (param == "MAP") {
-			pMapContainer->setMap(value);
-			return;
-		}
-		if (param == "SEED") {
-			pMapContainer->setSeed(value);
-			return;
-		}
-		if (param == "THEME") {
-			pMapContainer->setTheme(value);
-			return;
-		}
-		if (param == "TEMPLATE") {
-			pMapContainer->setTemplateFilter(value.toUInt());
-			return;
-		}
-	}
+    if (slValue.size() == 1)
+    {
+        QString value = slValue[0];
+        if (param == "MAP") {
+            pMapContainer->setMap(value);
+            return;
+        }
+        if (param == "SEED") {
+            pMapContainer->setSeed(value);
+            return;
+        }
+        if (param == "THEME") {
+            pMapContainer->setTheme(value);
+            return;
+        }
+        if (param == "TEMPLATE") {
+            pMapContainer->setTemplateFilter(value.toUInt());
+            return;
+        }
+    }
 
-	if (slValue.size() == 2)
-	{
-		if (param == "AMMO") {
-			setNetAmmo(slValue[0], slValue[1]);
-			return;
-		}
-	}
+    if (slValue.size() == 2)
+    {
+        if (param == "AMMO") {
+            setNetAmmo(slValue[0], slValue[1]);
+            return;
+        }
+    }
 
-	qWarning("Got bad config param from net");
+    qWarning("Got bad config param from net");
 }
 
 void GameCFGWidget::ammoChanged(int index)
 {
-	if (index >= 0)
-		emit paramChanged(
-			"AMMO",
-			QStringList() << WeaponsName->itemText(index) << WeaponsName->itemData(index).toString()
-		);
+    if (index >= 0)
+        emit paramChanged(
+            "AMMO",
+            QStringList() << WeaponsName->itemText(index) << WeaponsName->itemData(index).toString()
+        );
 }
 
 void GameCFGWidget::mapChanged(const QString & value)
 {
-	emit paramChanged("MAP", QStringList(value));
+    emit paramChanged("MAP", QStringList(value));
 }
 
 void GameCFGWidget::templateFilterChanged(int value)
 {
-	emit paramChanged("TEMPLATE", QStringList(QString::number(value)));
+    emit paramChanged("TEMPLATE", QStringList(QString::number(value)));
 }
 
 void GameCFGWidget::seedChanged(const QString & value)
 {
-	emit paramChanged("SEED", QStringList(value));
+    emit paramChanged("SEED", QStringList(value));
 }
 
 void GameCFGWidget::themeChanged(const QString & value)
 {
-	emit paramChanged("THEME", QStringList(value));
+    emit paramChanged("THEME", QStringList(value));
 }
 
 void GameCFGWidget::schemeChanged(int value)
 {
-	QStringList sl;
+    QStringList sl;
 
-	int size = GameSchemes->model()->columnCount();
-	for(int i = 0; i < size; ++i)
-		sl << schemeData(i).toString();
+    int size = GameSchemes->model()->columnCount();
+    for(int i = 0; i < size; ++i)
+        sl << schemeData(i).toString();
 
-	emit paramChanged("SCHEME", sl);
+    emit paramChanged("SCHEME", sl);
 }
 
 void GameCFGWidget::resendSchemeData()
 {
-	schemeChanged(GameSchemes->currentIndex());
+    schemeChanged(GameSchemes->currentIndex());
 }
--- a/QTfrontend/gamecfgwidget.h	Sat Mar 06 10:54:24 2010 +0000
+++ b/QTfrontend/gamecfgwidget.h	Sat Mar 06 10:59:20 2010 +0000
@@ -33,46 +33,46 @@
 
 class GameCFGWidget : public QGroupBox
 {
-	Q_OBJECT
+    Q_OBJECT
 
 public:
-	GameCFGWidget(QWidget* parent, bool externalControl=false);
-	quint32 getGameFlags() const;
-	quint32 getInitHealth() const;
-	QStringList getFullConfig() const;
-	QComboBox * GameSchemes;
-	QComboBox * WeaponsName;
-	HWMapContainer* pMapContainer;
-	QTableView * tv;
+    GameCFGWidget(QWidget* parent, bool externalControl=false);
+    quint32 getGameFlags() const;
+    quint32 getInitHealth() const;
+    QStringList getFullConfig() const;
+    QComboBox * GameSchemes;
+    QComboBox * WeaponsName;
+    HWMapContainer* pMapContainer;
+    QTableView * tv;
 
 public slots:
-	void setParam(const QString & param, const QStringList & value);
-	void fullNetConfig();
-	void resendSchemeData();
+    void setParam(const QString & param, const QStringList & value);
+    void fullNetConfig();
+    void resendSchemeData();
 
 signals:
-	void paramChanged(const QString & param, const QStringList & value);
-	void goToSchemes();
-	void goToWeapons(const QString & name);
+    void paramChanged(const QString & param, const QStringList & value);
+    void goToSchemes();
+    void goToWeapons(const QString & name);
 
 private slots:
-	void ammoChanged(int index);
-	void mapChanged(const QString &);
-	void templateFilterChanged(int);
-	void seedChanged(const QString &);
-	void themeChanged(const QString &);
-	void schemeChanged(int);
-	void jumpToWeapons();
+    void ammoChanged(int index);
+    void mapChanged(const QString &);
+    void templateFilterChanged(int);
+    void seedChanged(const QString &);
+    void themeChanged(const QString &);
+    void schemeChanged(int);
+    void jumpToWeapons();
 
 private:
-	QGridLayout mainLayout;
+    QGridLayout mainLayout;
 
-	QString curNetAmmoName;
-	QString curNetAmmo;
+    QString curNetAmmoName;
+    QString curNetAmmo;
 
-	void setNetAmmo(const QString& name, const QString& ammo);
+    void setNetAmmo(const QString& name, const QString& ammo);
 
-	QVariant schemeData(int column) const;
+    QVariant schemeData(int column) const;
 };
 
 #endif // GAMECONFIGWIDGET_H
--- a/QTfrontend/gameuiconfig.cpp	Sat Mar 06 10:54:24 2010 +0000
+++ b/QTfrontend/gameuiconfig.cpp	Sat Mar 06 10:59:20 2010 +0000
@@ -30,77 +30,77 @@
 #include "fpsedit.h"
 
 GameUIConfig::GameUIConfig(HWForm * FormWidgets, const QString & fileName)
-	: QSettings(fileName, QSettings::IniFormat)
+    : QSettings(fileName, QSettings::IniFormat)
 {
-	Form = FormWidgets;
+    Form = FormWidgets;
 
-	connect(Form->ui.pageOptions->CBEnableFrontendMusic, SIGNAL(toggled(bool)), Form, SLOT(Music(bool)));
+    connect(Form->ui.pageOptions->CBEnableFrontendMusic, SIGNAL(toggled(bool)), Form, SLOT(Music(bool)));
 
-	//Form->resize(value("window/width", 640).toUInt(), value("window/height", 450).toUInt());
-	resizeToConfigValues();
+    //Form->resize(value("window/width", 640).toUInt(), value("window/height", 450).toUInt());
+    resizeToConfigValues();
 
-	Form->ui.pageOptions->WeaponTooltip->setChecked(value("misc/weaponTooltip", true).toBool());
+    Form->ui.pageOptions->WeaponTooltip->setChecked(value("misc/weaponTooltip", true).toBool());
 
-	int t = Form->ui.pageOptions->CBResolution->findText(value("video/resolution").toString());
-	Form->ui.pageOptions->CBResolution->setCurrentIndex((t < 0) ? 0 : t);
-	Form->ui.pageOptions->CBFullscreen->setChecked(value("video/fullscreen", false).toBool());
-	bool ffscr=value("video/frontendfullscreen", false).toBool();
-	Form->ui.pageOptions->CBFrontendFullscreen->setChecked(ffscr);
+    int t = Form->ui.pageOptions->CBResolution->findText(value("video/resolution").toString());
+    Form->ui.pageOptions->CBResolution->setCurrentIndex((t < 0) ? 0 : t);
+    Form->ui.pageOptions->CBFullscreen->setChecked(value("video/fullscreen", false).toBool());
+    bool ffscr=value("video/frontendfullscreen", false).toBool();
+    Form->ui.pageOptions->CBFrontendFullscreen->setChecked(ffscr);
 
-	Form->ui.pageOptions->CBReduceQuality->setChecked(value("video/reducequality", false).toBool());
-	Form->ui.pageOptions->CBFrontendEffects->setChecked(frontendEffects);
-	Form->ui.pageOptions->CBEnableSound->setChecked(value("audio/sound", true).toBool());
-	Form->ui.pageOptions->CBEnableFrontendSound->setChecked(value("audio/frontendsound", true).toBool());
+    Form->ui.pageOptions->CBReduceQuality->setChecked(value("video/reducequality", false).toBool());
+    Form->ui.pageOptions->CBFrontendEffects->setChecked(frontendEffects);
+    Form->ui.pageOptions->CBEnableSound->setChecked(value("audio/sound", true).toBool());
+    Form->ui.pageOptions->CBEnableFrontendSound->setChecked(value("audio/frontendsound", true).toBool());
 #ifdef _WIN32
-//	Form->ui.pageOptions->CBHardwareSound->setChecked(value("audio/hardware", false).toBool());
+//  Form->ui.pageOptions->CBHardwareSound->setChecked(value("audio/hardware", false).toBool());
 #endif
-	Form->ui.pageOptions->CBEnableMusic->setChecked(value("audio/music", true).toBool());
-	Form->ui.pageOptions->CBEnableFrontendMusic->setChecked(value("audio/frontendmusic", true).toBool());
-	Form->ui.pageOptions->volumeBox->setValue(value("audio/volume", 100).toUInt());
+    Form->ui.pageOptions->CBEnableMusic->setChecked(value("audio/music", true).toBool());
+    Form->ui.pageOptions->CBEnableFrontendMusic->setChecked(value("audio/frontendmusic", true).toBool());
+    Form->ui.pageOptions->volumeBox->setValue(value("audio/volume", 100).toUInt());
 
-	QString netNick = value("net/nick", "").toString();
-	if (netNick.isEmpty())
-		netNick = QInputDialog::getText(Form,
-				QObject::tr("Nickname"),
-				QObject::tr("Please enter your nickname"),
-				QLineEdit::Normal,
-				QDir::home().dirName());
+    QString netNick = value("net/nick", "").toString();
+    if (netNick.isEmpty())
+        netNick = QInputDialog::getText(Form,
+                QObject::tr("Nickname"),
+                QObject::tr("Please enter your nickname"),
+                QLineEdit::Normal,
+                QDir::home().dirName());
 
-	Form->ui.pageOptions->editNetNick->setText(netNick);
+    Form->ui.pageOptions->editNetNick->setText(netNick);
 
-	delete netHost;
-	netHost = new QString(value("net/ip", "").toString());
-	netPort = value("net/port", 46631).toUInt();
+    delete netHost;
+    netHost = new QString(value("net/ip", "").toString());
+    netPort = value("net/port", 46631).toUInt();
 
-	Form->ui.pageNetServer->leServerDescr->setText(value("net/servername", "hedgewars server").toString());
-	Form->ui.pageNetServer->sbPort->setValue(value("net/serverport", 46631).toUInt());
+    Form->ui.pageNetServer->leServerDescr->setText(value("net/servername", "hedgewars server").toString());
+    Form->ui.pageNetServer->sbPort->setValue(value("net/serverport", 46631).toUInt());
 
-	Form->ui.pageOptions->CBShowFPS->setChecked(value("fps/show", false).toBool());
-	Form->ui.pageOptions->fpsedit->setValue(value("fps/interval", 27).toUInt());
+    Form->ui.pageOptions->CBShowFPS->setChecked(value("fps/show", false).toBool());
+    Form->ui.pageOptions->fpsedit->setValue(value("fps/interval", 27).toUInt());
 
-	Form->ui.pageOptions->CBAltDamage->setChecked(value("misc/altdamage", false).toBool());
-	Form->ui.pageOptions->CBNameWithDate->setChecked(value("misc/appendTimeToRecords", false).toBool());
+    Form->ui.pageOptions->CBAltDamage->setChecked(value("misc/altdamage", false).toBool());
+    Form->ui.pageOptions->CBNameWithDate->setChecked(value("misc/appendTimeToRecords", false).toBool());
 
 #ifdef SPARKLE_ENABLED
         Form->ui.pageOptions->CBAutoUpdate->setChecked(value("misc/autoUpdate", true).toBool());
 #endif
 
-	Form->ui.pageOptions->CBLanguage->setCurrentIndex(Form->ui.pageOptions->CBLanguage->findData(value("misc/locale", "").toString()));
+    Form->ui.pageOptions->CBLanguage->setCurrentIndex(Form->ui.pageOptions->CBLanguage->findData(value("misc/locale", "").toString()));
 
-	depth = QApplication::desktop()->depth();
-	if (depth < 16) depth = 16;
-	else if (depth > 16) depth = 32;
+    depth = QApplication::desktop()->depth();
+    if (depth < 16) depth = 16;
+    else if (depth > 16) depth = 32;
 }
 
 QStringList GameUIConfig::GetTeamsList()
 {
-	QStringList teamslist = cfgdir->entryList(QStringList("*.cfg"));
-	QStringList cleanedList;
-	for (QStringList::Iterator it = teamslist.begin(); it != teamslist.end(); ++it ) {
+    QStringList teamslist = cfgdir->entryList(QStringList("*.cfg"));
+    QStringList cleanedList;
+    for (QStringList::Iterator it = teamslist.begin(); it != teamslist.end(); ++it ) {
             QString tmpTeamStr=(*it).replace(QRegExp("^(.*)\\.cfg$"), "\\1");
             cleanedList.push_back(tmpTeamStr);
-	}
-	return cleanedList;
+    }
+    return cleanedList;
 }
 
 void GameUIConfig::resizeToConfigValues()
@@ -110,46 +110,46 @@
 
 void GameUIConfig::SaveOptions()
 {
-	setValue("video/resolution", Form->ui.pageOptions->CBResolution->currentText());
-	setValue("video/fullscreen", vid_Fullscreen());
+    setValue("video/resolution", Form->ui.pageOptions->CBResolution->currentText());
+    setValue("video/fullscreen", vid_Fullscreen());
 
-	setValue("video/reducequality", isReducedQuality());
+    setValue("video/reducequality", isReducedQuality());
 
-	setValue("video/frontendeffects", isFrontendEffects());
+    setValue("video/frontendeffects", isFrontendEffects());
 
-	setValue("misc/weaponTooltip", isWeaponTooltip());
+    setValue("misc/weaponTooltip", isWeaponTooltip());
 
-	bool ffscr = isFrontendFullscreen();
-	setValue("video/frontendfullscreen", ffscr);
-	emit frontendFullscreen(ffscr);
-	if (!ffscr) {
-	  setValue("window/width", Form->width());
-	  setValue("window/height", Form->height());
-	} else {
-	  //resizeToConfigValues(); // TODO: why this has been made?
-	}
+    bool ffscr = isFrontendFullscreen();
+    setValue("video/frontendfullscreen", ffscr);
+    emit frontendFullscreen(ffscr);
+    if (!ffscr) {
+      setValue("window/width", Form->width());
+      setValue("window/height", Form->height());
+    } else {
+      //resizeToConfigValues(); // TODO: why this has been made?
+    }
 
-	setValue("audio/sound", isSoundEnabled());
-	setValue("audio/frontendsound", isFrontendSoundEnabled());
+    setValue("audio/sound", isSoundEnabled());
+    setValue("audio/frontendsound", isFrontendSoundEnabled());
 #ifdef _WIN32
-//	setValue("audio/hardware", isSoundHardware());
+//  setValue("audio/hardware", isSoundHardware());
 #endif
-	setValue("audio/music", isMusicEnabled());
-	setValue("audio/frontendmusic", isFrontendMusicEnabled());
-	setValue("audio/volume", Form->ui.pageOptions->volumeBox->value());
+    setValue("audio/music", isMusicEnabled());
+    setValue("audio/frontendmusic", isFrontendMusicEnabled());
+    setValue("audio/volume", Form->ui.pageOptions->volumeBox->value());
 
-	setValue("net/nick", netNick());
-	setValue("net/ip", *netHost);
-	setValue("net/port", netPort);
-	setValue("net/servername", Form->ui.pageNetServer->leServerDescr->text());
-	setValue("net/serverport", Form->ui.pageNetServer->sbPort->value());
+    setValue("net/nick", netNick());
+    setValue("net/ip", *netHost);
+    setValue("net/port", netPort);
+    setValue("net/servername", Form->ui.pageNetServer->leServerDescr->text());
+    setValue("net/serverport", Form->ui.pageNetServer->sbPort->value());
 
-	setValue("fps/show", isShowFPSEnabled());
-	setValue("fps/interval", Form->ui.pageOptions->fpsedit->value());
+    setValue("fps/show", isShowFPSEnabled());
+    setValue("fps/interval", Form->ui.pageOptions->fpsedit->value());
 
-	setValue("misc/altdamage", isAltDamageEnabled());
-	setValue("misc/appendTimeToRecords", appendDateTimeToRecordName());
-	setValue("misc/locale", language());
+    setValue("misc/altdamage", isAltDamageEnabled());
+    setValue("misc/appendTimeToRecords", appendDateTimeToRecordName());
+    setValue("misc/locale", language());
 
 #ifdef SPARKLE_ENABLED
         setValue("misc/autoUpdate", isAutoUpdateEnabled());
@@ -159,24 +159,24 @@
 
 QString GameUIConfig::language()
 {
-	return Form->ui.pageOptions->CBLanguage->itemData(Form->ui.pageOptions->CBLanguage->currentIndex()).toString();
+    return Form->ui.pageOptions->CBLanguage->itemData(Form->ui.pageOptions->CBLanguage->currentIndex()).toString();
 }
 
 QRect GameUIConfig::vid_Resolution()
 {
-	QRect result(0, 0, 640, 480);
-	QStringList wh = Form->ui.pageOptions->CBResolution->currentText().split('x');
-	if (wh.size() == 2)
-	{
-		result.setWidth(wh[0].toInt());
-		result.setHeight(wh[1].toInt());
-	}
-	return result;
+    QRect result(0, 0, 640, 480);
+    QStringList wh = Form->ui.pageOptions->CBResolution->currentText().split('x');
+    if (wh.size() == 2)
+    {
+        result.setWidth(wh[0].toInt());
+        result.setHeight(wh[1].toInt());
+    }
+    return result;
 }
 
 bool GameUIConfig::vid_Fullscreen()
 {
-	return Form->ui.pageOptions->CBFullscreen->isChecked();
+    return Form->ui.pageOptions->CBFullscreen->isChecked();
 }
 
 bool GameUIConfig::isReducedQuality() const
@@ -200,43 +200,43 @@
 
 bool GameUIConfig::isSoundEnabled()
 {
-	return Form->ui.pageOptions->CBEnableSound->isChecked();
+    return Form->ui.pageOptions->CBEnableSound->isChecked();
 }
 bool GameUIConfig::isFrontendSoundEnabled()
 {
-	return Form->ui.pageOptions->CBEnableFrontendSound->isChecked();
+    return Form->ui.pageOptions->CBEnableFrontendSound->isChecked();
 }
 
 #ifdef _WIN32
 bool GameUIConfig::isSoundHardware()
 {
-//	return Form->ui.pageOptions->CBHardwareSound->isChecked();
+//  return Form->ui.pageOptions->CBHardwareSound->isChecked();
 return false;
 }
 #endif
 
 bool GameUIConfig::isMusicEnabled()
 {
-	return Form->ui.pageOptions->CBEnableMusic->isChecked();
+    return Form->ui.pageOptions->CBEnableMusic->isChecked();
 }
 bool GameUIConfig::isFrontendMusicEnabled()
 {
-	return Form->ui.pageOptions->CBEnableFrontendMusic->isChecked();
+    return Form->ui.pageOptions->CBEnableFrontendMusic->isChecked();
 }
 
 bool GameUIConfig::isShowFPSEnabled()
 {
-	return Form->ui.pageOptions->CBShowFPS->isChecked();
+    return Form->ui.pageOptions->CBShowFPS->isChecked();
 }
 
 bool GameUIConfig::isAltDamageEnabled()
 {
-	return Form->ui.pageOptions->CBAltDamage->isChecked();
+    return Form->ui.pageOptions->CBAltDamage->isChecked();
 }
 
 bool GameUIConfig::appendDateTimeToRecordName()
 {
-	return Form->ui.pageOptions->CBNameWithDate->isChecked();
+    return Form->ui.pageOptions->CBNameWithDate->isChecked();
 }
 
 #ifdef SPARKLE_ENABLED
@@ -248,20 +248,20 @@
 
 quint8 GameUIConfig::timerInterval()
 {
-	return 35 - Form->ui.pageOptions->fpsedit->value();
+    return 35 - Form->ui.pageOptions->fpsedit->value();
 }
 
 quint8 GameUIConfig::bitDepth()
 {
-	return depth;
+    return depth;
 }
 
 QString GameUIConfig::netNick()
 {
-	return Form->ui.pageOptions->editNetNick->text();
+    return Form->ui.pageOptions->editNetNick->text();
 }
 
 quint8 GameUIConfig::volume()
 {
-	return Form->ui.pageOptions->volumeBox->value() * 128 / 100;
+    return Form->ui.pageOptions->volumeBox->value() * 128 / 100;
 }
--- a/QTfrontend/gameuiconfig.h	Sat Mar 06 10:54:24 2010 +0000
+++ b/QTfrontend/gameuiconfig.h	Sat Mar 06 10:59:20 2010 +0000
@@ -28,49 +28,49 @@
 
 class GameUIConfig : public QSettings
 {
-	Q_OBJECT
+    Q_OBJECT
 
 public:
-	GameUIConfig(HWForm * FormWidgets, const QString & fileName);
-	QStringList GetTeamsList();
-	QRect vid_Resolution();
-	bool vid_Fullscreen();
-	bool isSoundEnabled();
-	bool isFrontendSoundEnabled();
-	QString language();
+    GameUIConfig(HWForm * FormWidgets, const QString & fileName);
+    QStringList GetTeamsList();
+    QRect vid_Resolution();
+    bool vid_Fullscreen();
+    bool isSoundEnabled();
+    bool isFrontendSoundEnabled();
+    QString language();
 #ifdef _WIN32
-	bool isSoundHardware();
+    bool isSoundHardware();
 #endif
-	bool isMusicEnabled();
-	bool isFrontendMusicEnabled();
-	bool isShowFPSEnabled();
-	bool isAltDamageEnabled();
-	bool appendDateTimeToRecordName();
-	quint8 volume();
-	quint8 timerInterval();
-	quint8 bitDepth();
-	QString netNick();
-	bool isReducedQuality() const;
-	bool isFrontendEffects() const;
-	bool isFrontendFullscreen() const;
-	bool isWeaponTooltip() const;
-	void resizeToConfigValues();
+    bool isMusicEnabled();
+    bool isFrontendMusicEnabled();
+    bool isShowFPSEnabled();
+    bool isAltDamageEnabled();
+    bool appendDateTimeToRecordName();
+    quint8 volume();
+    quint8 timerInterval();
+    quint8 bitDepth();
+    QString netNick();
+    bool isReducedQuality() const;
+    bool isFrontendEffects() const;
+    bool isFrontendFullscreen() const;
+    bool isWeaponTooltip() const;
+    void resizeToConfigValues();
 
 #ifdef __APPLE__
 #ifdef SPARKLE_ENABLED
-	bool isAutoUpdateEnabled();
+    bool isAutoUpdateEnabled();
 #endif
 #endif
 
  signals:
-	void frontendFullscreen(bool value);
+    void frontendFullscreen(bool value);
 
 public slots:
-	void SaveOptions();
+    void SaveOptions();
 
 private:
-	HWForm * Form;
-	quint8 depth;
+    HWForm * Form;
+    quint8 depth;
 };
 
 #endif
--- a/QTfrontend/hats.cpp	Sat Mar 06 10:54:24 2010 +0000
+++ b/QTfrontend/hats.cpp	Sat Mar 06 10:59:20 2010 +0000
@@ -26,84 +26,84 @@
 HatsModel::HatsModel(QObject* parent) :
   QAbstractListModel(parent)
 {
-	QPixmap hhpix = QPixmap(datadir->absolutePath() + "/Graphics/Hedgehog/Idle.png").copy(0, 0, 32, 32);
+    QPixmap hhpix = QPixmap(datadir->absolutePath() + "/Graphics/Hedgehog/Idle.png").copy(0, 0, 32, 32);
 
-	QDir tmpdir;
-	tmpdir.cd(datadir->absolutePath());
-	tmpdir.cd("Graphics");
-	tmpdir.cd("Hats");
+    QDir tmpdir;
+    tmpdir.cd(datadir->absolutePath());
+    tmpdir.cd("Graphics");
+    tmpdir.cd("Hats");
 
-	tmpdir.setFilter(QDir::Files);
+    tmpdir.setFilter(QDir::Files);
 
 
-	QStringList hatsList = tmpdir.entryList(QStringList("*.png"));
-	for (QStringList::Iterator it = hatsList.begin(); it != hatsList.end(); ++it )
-	{
-		QString str = (*it).replace(QRegExp("^(.*)\\.png"), "\\1");
-		QPixmap pix(datadir->absolutePath() + "/Graphics/Hats/" + str + ".png");
+    QStringList hatsList = tmpdir.entryList(QStringList("*.png"));
+    for (QStringList::Iterator it = hatsList.begin(); it != hatsList.end(); ++it )
+    {
+        QString str = (*it).replace(QRegExp("^(.*)\\.png"), "\\1");
+        QPixmap pix(datadir->absolutePath() + "/Graphics/Hats/" + str + ".png");
 
-		QPixmap tmppix(32, 37);
-		tmppix.fill(QColor(Qt::transparent));
+        QPixmap tmppix(32, 37);
+        tmppix.fill(QColor(Qt::transparent));
 
-		QPainter painter(&tmppix);
-		painter.drawPixmap(QPoint(0, 5), hhpix);
-		painter.drawPixmap(QPoint(0, 0), pix.copy(0, 0, 32, 32));
-		painter.end();
+        QPainter painter(&tmppix);
+        painter.drawPixmap(QPoint(0, 5), hhpix);
+        painter.drawPixmap(QPoint(0, 0), pix.copy(0, 0, 32, 32));
+        painter.end();
 
-		hats.append(qMakePair(str, QIcon(tmppix)));
-	}
+        hats.append(qMakePair(str, QIcon(tmppix)));
+    }
     // Reserved hats
     tmpdir.cd("Reserved");
-	hatsList = tmpdir.entryList(QStringList(playerHash+"*.png"));
-	for (QStringList::Iterator it = hatsList.begin(); it != hatsList.end(); ++it )
-	{
-		QString str = (*it).replace(QRegExp("^(.*)\\.png"), "\\1");
-		QPixmap pix(datadir->absolutePath() + "/Graphics/Hats/Reserved/" + str + ".png");
+    hatsList = tmpdir.entryList(QStringList(playerHash+"*.png"));
+    for (QStringList::Iterator it = hatsList.begin(); it != hatsList.end(); ++it )
+    {
+        QString str = (*it).replace(QRegExp("^(.*)\\.png"), "\\1");
+        QPixmap pix(datadir->absolutePath() + "/Graphics/Hats/Reserved/" + str + ".png");
 
-		QPixmap tmppix(32, 37);
-		tmppix.fill(QColor(Qt::transparent));
+        QPixmap tmppix(32, 37);
+        tmppix.fill(QColor(Qt::transparent));
 
-		QPainter painter(&tmppix);
-		painter.drawPixmap(QPoint(0, 5), hhpix);
-		painter.drawPixmap(QPoint(0, 0), pix.copy(0, 0, 32, 32));
-		painter.end();
+        QPainter painter(&tmppix);
+        painter.drawPixmap(QPoint(0, 5), hhpix);
+        painter.drawPixmap(QPoint(0, 0), pix.copy(0, 0, 32, 32));
+        painter.end();
 
-		hats.append(qMakePair("Reserved "+str.remove(0,32), QIcon(tmppix)));
-	}
+        hats.append(qMakePair("Reserved "+str.remove(0,32), QIcon(tmppix)));
+    }
 }
 
 QVariant HatsModel::headerData(int section,
             Qt::Orientation orientation, int role) const
 {
-	return QVariant();
+    return QVariant();
 }
 
 int HatsModel::rowCount(const QModelIndex &parent) const
 {
-	if (parent.isValid())
-		return 0;
-	else
-		return hats.size();
+    if (parent.isValid())
+        return 0;
+    else
+        return hats.size();
 }
 
 /*int HatsModel::columnCount(const QModelIndex & parent) const
 {
-	if (parent.isValid())
-		return 0;
-	else
-		return 2;
+    if (parent.isValid())
+        return 0;
+    else
+        return 2;
 }
 */
 QVariant HatsModel::data(const QModelIndex &index,
                          int role) const
 {
-	if (!index.isValid() || index.row() < 0
-		|| index.row() >= hats.size()
-		|| (role != Qt::DisplayRole && role != Qt::DecorationRole))
-		return QVariant();
+    if (!index.isValid() || index.row() < 0
+        || index.row() >= hats.size()
+        || (role != Qt::DisplayRole && role != Qt::DecorationRole))
+        return QVariant();
 
-	if (role == Qt::DisplayRole)
-		return hats.at(index.row()).first;
-	else // role == Qt::DecorationRole
-		return hats.at(index.row()).second;
+    if (role == Qt::DisplayRole)
+        return hats.at(index.row()).first;
+    else // role == Qt::DecorationRole
+        return hats.at(index.row()).second;
 }
--- a/QTfrontend/hats.h	Sat Mar 06 10:54:24 2010 +0000
+++ b/QTfrontend/hats.h	Sat Mar 06 10:59:20 2010 +0000
@@ -27,18 +27,18 @@
 
 class HatsModel : public QAbstractListModel
 {
-	Q_OBJECT
+    Q_OBJECT
 
 public:
-	HatsModel(QObject *parent = 0);
+    HatsModel(QObject *parent = 0);
 
-	QVariant headerData(int section, Qt::Orientation orientation, int role) const;
-	int rowCount(const QModelIndex & parent) const;
-	//int columnCount(const QModelIndex & parent) const;
+    QVariant headerData(int section, Qt::Orientation orientation, int role) const;
+    int rowCount(const QModelIndex & parent) const;
+    //int columnCount(const QModelIndex & parent) const;
 
-	QVariant data(const QModelIndex &index, int role) const;
+    QVariant data(const QModelIndex &index, int role) const;
 protected:
-	QVector<QPair<QString, QIcon> > hats;
+    QVector<QPair<QString, QIcon> > hats;
 };
 
 #endif // _HATS_INCLUDED
--- a/QTfrontend/hwform.cpp	Sat Mar 06 10:54:24 2010 +0000
+++ b/QTfrontend/hwform.cpp	Sat Mar 06 10:59:20 2010 +0000
@@ -75,21 +75,21 @@
   : QMainWindow(parent), pnetserver(0), pRegisterServer(0), editedTeam(0), hwnet(0)
 {
 #ifdef USE_XFIRE
-	xfire_init();
+    xfire_init();
 #endif
     gameSettings = new QSettings(cfgdir->absolutePath() + "/hedgewars.ini", QSettings::IniFormat);
     frontendEffects = gameSettings->value("video/frontendeffects", true).toBool();
     playerHash = QString(QCryptographicHash::hash(gameSettings->value("net/nick","").toString().toLatin1(), QCryptographicHash::Md5).toHex());
 
-	ui.setupUi(this);
+    ui.setupUi(this);
 
-	CustomizePalettes();
-	
-	ui.pageOptions->CBResolution->addItems(sdli.getResolutions());
+    CustomizePalettes();
+    
+    ui.pageOptions->CBResolution->addItems(sdli.getResolutions());
 
-	config = new GameUIConfig(this, cfgdir->absolutePath() + "/hedgewars.ini");
+    config = new GameUIConfig(this, cfgdir->absolutePath() + "/hedgewars.ini");
 
-	namegen = new HWNamegen();
+    namegen = new HWNamegen();
 
 #ifdef __APPLE__
         panel = new M3Panel;
@@ -97,107 +97,107 @@
         AutoUpdater* updater;
         CocoaInitializer initializer;
         updater = new SparkleAutoUpdater(SPARKLE_APPCAST_URL);
-	if(updater && config->isAutoUpdateEnabled())
+    if(updater && config->isAutoUpdateEnabled())
             updater->checkForUpdates();
 #endif        
 #endif
 
-	UpdateTeamsLists();
-	UpdateWeapons();
+    UpdateTeamsLists();
+    UpdateWeapons();
 
-	connect(config, SIGNAL(frontendFullscreen(bool)), this, SLOT(onFrontendFullscreen(bool)));
-	onFrontendFullscreen(config->isFrontendFullscreen());
+    connect(config, SIGNAL(frontendFullscreen(bool)), this, SLOT(onFrontendFullscreen(bool)));
+    onFrontendFullscreen(config->isFrontendFullscreen());
 
-	connect(ui.pageMain->BtnSinglePlayer, SIGNAL(clicked()), this, SLOT(GoToSinglePlayer()));
-	connect(ui.pageMain->BtnSetup, SIGNAL(clicked()), this, SLOT(GoToSetup()));
-	connect(ui.pageMain->BtnNet, SIGNAL(clicked()), this, SLOT(GoToNetType()));
-	connect(ui.pageMain->BtnInfo, SIGNAL(clicked()), this, SLOT(GoToInfo()));
-	connect(ui.pageMain->BtnExit, SIGNAL(pressed()), this, SLOT(btnExitPressed()));
-	connect(ui.pageMain->BtnExit, SIGNAL(clicked()), this, SLOT(btnExitClicked()));
+    connect(ui.pageMain->BtnSinglePlayer, SIGNAL(clicked()), this, SLOT(GoToSinglePlayer()));
+    connect(ui.pageMain->BtnSetup, SIGNAL(clicked()), this, SLOT(GoToSetup()));
+    connect(ui.pageMain->BtnNet, SIGNAL(clicked()), this, SLOT(GoToNetType()));
+    connect(ui.pageMain->BtnInfo, SIGNAL(clicked()), this, SLOT(GoToInfo()));
+    connect(ui.pageMain->BtnExit, SIGNAL(pressed()), this, SLOT(btnExitPressed()));
+    connect(ui.pageMain->BtnExit, SIGNAL(clicked()), this, SLOT(btnExitClicked()));
 
-	connect(ui.pageEditTeam->BtnTeamSave, SIGNAL(clicked()), this, SLOT(TeamSave()));
-	connect(ui.pageEditTeam->BtnTeamDiscard, SIGNAL(clicked()), this, SLOT(TeamDiscard()));
+    connect(ui.pageEditTeam->BtnTeamSave, SIGNAL(clicked()), this, SLOT(TeamSave()));
+    connect(ui.pageEditTeam->BtnTeamDiscard, SIGNAL(clicked()), this, SLOT(TeamDiscard()));
 
-	connect(ui.pageEditTeam->signalMapper, SIGNAL(mapped(const int &)), this, SLOT(RandomName(const int &)));
-	connect(ui.pageEditTeam->randTeamButton, SIGNAL(clicked()), this, SLOT(RandomNames()));
+    connect(ui.pageEditTeam->signalMapper, SIGNAL(mapped(const int &)), this, SLOT(RandomName(const int &)));
+    connect(ui.pageEditTeam->randTeamButton, SIGNAL(clicked()), this, SLOT(RandomNames()));
 
-	connect(ui.pageMultiplayer->BtnBack, SIGNAL(clicked()), this, SLOT(GoBack()));
-	connect(ui.pageMultiplayer->BtnStartMPGame, SIGNAL(clicked()), this, SLOT(StartMPGame()));
-	connect(ui.pageMultiplayer->teamsSelect, SIGNAL(setEnabledGameStart(bool)),
-		ui.pageMultiplayer->BtnStartMPGame, SLOT(setEnabled(bool)));
-	connect(ui.pageMultiplayer->teamsSelect, SIGNAL(SetupClicked()), this, SLOT(IntermediateSetup()));
-	connect(ui.pageMultiplayer->gameCFG, SIGNAL(goToSchemes()), this, SLOT(GoToSchemes()));
-	connect(ui.pageMultiplayer->gameCFG, SIGNAL(goToWeapons(const QString &)), this, SLOT(GoToSelectWeaponSet(const QString &)));
+    connect(ui.pageMultiplayer->BtnBack, SIGNAL(clicked()), this, SLOT(GoBack()));
+    connect(ui.pageMultiplayer->BtnStartMPGame, SIGNAL(clicked()), this, SLOT(StartMPGame()));
+    connect(ui.pageMultiplayer->teamsSelect, SIGNAL(setEnabledGameStart(bool)),
+        ui.pageMultiplayer->BtnStartMPGame, SLOT(setEnabled(bool)));
+    connect(ui.pageMultiplayer->teamsSelect, SIGNAL(SetupClicked()), this, SLOT(IntermediateSetup()));
+    connect(ui.pageMultiplayer->gameCFG, SIGNAL(goToSchemes()), this, SLOT(GoToSchemes()));
+    connect(ui.pageMultiplayer->gameCFG, SIGNAL(goToWeapons(const QString &)), this, SLOT(GoToSelectWeaponSet(const QString &)));
 
-	connect(ui.pagePlayDemo->BtnBack, SIGNAL(clicked()), this, SLOT(GoBack()));
-	connect(ui.pagePlayDemo->BtnPlayDemo, SIGNAL(clicked()), this, SLOT(PlayDemo()));
-	connect(ui.pagePlayDemo->DemosList, SIGNAL(doubleClicked (const QModelIndex &)), this, SLOT(PlayDemo()));
+    connect(ui.pagePlayDemo->BtnBack, SIGNAL(clicked()), this, SLOT(GoBack()));
+    connect(ui.pagePlayDemo->BtnPlayDemo, SIGNAL(clicked()), this, SLOT(PlayDemo()));
+    connect(ui.pagePlayDemo->DemosList, SIGNAL(doubleClicked (const QModelIndex &)), this, SLOT(PlayDemo()));
 
-	connect(ui.pageOptions->BtnBack, SIGNAL(clicked()), this, SLOT(GoBack()));
-	connect(ui.pageOptions->BtnNewTeam, SIGNAL(clicked()), this, SLOT(NewTeam()));
-	connect(ui.pageOptions->BtnEditTeam, SIGNAL(clicked()), this, SLOT(EditTeam()));
-	connect(ui.pageOptions->BtnSaveOptions, SIGNAL(clicked()), config, SLOT(SaveOptions()));
-	connect(ui.pageOptions->BtnSaveOptions, SIGNAL(clicked()), this, SLOT(GoBack()));
+    connect(ui.pageOptions->BtnBack, SIGNAL(clicked()), this, SLOT(GoBack()));
+    connect(ui.pageOptions->BtnNewTeam, SIGNAL(clicked()), this, SLOT(NewTeam()));
+    connect(ui.pageOptions->BtnEditTeam, SIGNAL(clicked()), this, SLOT(EditTeam()));
+    connect(ui.pageOptions->BtnSaveOptions, SIGNAL(clicked()), config, SLOT(SaveOptions()));
+    connect(ui.pageOptions->BtnSaveOptions, SIGNAL(clicked()), this, SLOT(GoBack()));
 
-	connect(ui.pageOptions->WeaponEdit, SIGNAL(clicked()), this, SLOT(GoToSelectWeapon()));
-	connect(ui.pageOptions->WeaponsButt, SIGNAL(clicked()), this, SLOT(GoToSelectNewWeapon()));
-	connect(ui.pageSelectWeapon->pWeapons, SIGNAL(weaponsChanged()), this, SLOT(UpdateWeapons()));
+    connect(ui.pageOptions->WeaponEdit, SIGNAL(clicked()), this, SLOT(GoToSelectWeapon()));
+    connect(ui.pageOptions->WeaponsButt, SIGNAL(clicked()), this, SLOT(GoToSelectNewWeapon()));
+    connect(ui.pageSelectWeapon->pWeapons, SIGNAL(weaponsChanged()), this, SLOT(UpdateWeapons()));
 
-	connect(ui.pageNet->BtnBack, SIGNAL(clicked()), this, SLOT(GoBack()));
-	connect(ui.pageNet->BtnSpecifyServer, SIGNAL(clicked()), this, SLOT(NetConnect()));
-	connect(ui.pageNet->BtnNetSvrStart, SIGNAL(clicked()), this, SLOT(GoToNetServer()));
-	connect(ui.pageNet, SIGNAL(connectClicked(const QString &, quint16)), this, SLOT(NetConnectServer(const QString &, quint16)));
+    connect(ui.pageNet->BtnBack, SIGNAL(clicked()), this, SLOT(GoBack()));
+    connect(ui.pageNet->BtnSpecifyServer, SIGNAL(clicked()), this, SLOT(NetConnect()));
+    connect(ui.pageNet->BtnNetSvrStart, SIGNAL(clicked()), this, SLOT(GoToNetServer()));
+    connect(ui.pageNet, SIGNAL(connectClicked(const QString &, quint16)), this, SLOT(NetConnectServer(const QString &, quint16)));
 
-	connect(ui.pageNetServer->BtnBack, SIGNAL(clicked()), this, SLOT(GoBack()));
-	connect(ui.pageNetServer->BtnStart, SIGNAL(clicked()), this, SLOT(NetStartServer()));
+    connect(ui.pageNetServer->BtnBack, SIGNAL(clicked()), this, SLOT(GoBack()));
+    connect(ui.pageNetServer->BtnStart, SIGNAL(clicked()), this, SLOT(NetStartServer()));
 
-	connect(ui.pageNetGame->BtnBack, SIGNAL(clicked()), this, SLOT(GoBack()));
-	connect(ui.pageNetGame->pNetTeamsWidget, SIGNAL(setEnabledGameStart(bool)),
-		ui.pageNetGame->BtnGo, SLOT(setEnabled(bool)));
-	connect(ui.pageNetGame->pNetTeamsWidget, SIGNAL(setEnabledGameStart(bool)),
-		ui.pageNetGame->BtnStart, SLOT(setEnabled(bool)));
-	connect(ui.pageNetGame->pNetTeamsWidget, SIGNAL(SetupClicked()), this, SLOT(IntermediateSetup()));
-	connect(ui.pageNetGame->pGameCFG, SIGNAL(goToSchemes()), this, SLOT(GoToSchemes()));
-	connect(ui.pageNetGame->pGameCFG, SIGNAL(goToWeapons(const QString &)), this, SLOT(GoToSelectWeaponSet(const QString &)));
+    connect(ui.pageNetGame->BtnBack, SIGNAL(clicked()), this, SLOT(GoBack()));
+    connect(ui.pageNetGame->pNetTeamsWidget, SIGNAL(setEnabledGameStart(bool)),
+        ui.pageNetGame->BtnGo, SLOT(setEnabled(bool)));
+    connect(ui.pageNetGame->pNetTeamsWidget, SIGNAL(setEnabledGameStart(bool)),
+        ui.pageNetGame->BtnStart, SLOT(setEnabled(bool)));
+    connect(ui.pageNetGame->pNetTeamsWidget, SIGNAL(SetupClicked()), this, SLOT(IntermediateSetup()));
+    connect(ui.pageNetGame->pGameCFG, SIGNAL(goToSchemes()), this, SLOT(GoToSchemes()));
+    connect(ui.pageNetGame->pGameCFG, SIGNAL(goToWeapons(const QString &)), this, SLOT(GoToSelectWeaponSet(const QString &)));
 
-	connect(ui.pageRoomsList->BtnBack, SIGNAL(clicked()), this, SLOT(GoBack()));
-	connect(ui.pageRoomsList->BtnAdmin, SIGNAL(clicked()), this, SLOT(GoToAdmin()));
+    connect(ui.pageRoomsList->BtnBack, SIGNAL(clicked()), this, SLOT(GoBack()));
+    connect(ui.pageRoomsList->BtnAdmin, SIGNAL(clicked()), this, SLOT(GoToAdmin()));
 
-	connect(ui.pageInfo->BtnBack, SIGNAL(clicked()), this, SLOT(GoBack()));
+    connect(ui.pageInfo->BtnBack, SIGNAL(clicked()), this, SLOT(GoBack()));
 
-	connect(ui.pageGameStats->BtnBack, SIGNAL(clicked()), this, SLOT(GoBack()));
+    connect(ui.pageGameStats->BtnBack, SIGNAL(clicked()), this, SLOT(GoBack()));
 
-	connect(ui.pageSinglePlayer->BtnSimpleGamePage, SIGNAL(clicked()), this, SLOT(SimpleGame()));
-	connect(ui.pageSinglePlayer->BtnTrainPage, SIGNAL(clicked()), this, SLOT(GoToTraining()));
-	connect(ui.pageSinglePlayer->BtnMultiplayer, SIGNAL(clicked()), this, SLOT(GoToMultiplayer()));
-	connect(ui.pageSinglePlayer->BtnLoad, SIGNAL(clicked()), this, SLOT(GoToSaves()));
-	connect(ui.pageSinglePlayer->BtnDemos, SIGNAL(clicked()), this, SLOT(GoToDemos()));
-	connect(ui.pageSinglePlayer->BtnBack, SIGNAL(clicked()), this, SLOT(GoBack()));
+    connect(ui.pageSinglePlayer->BtnSimpleGamePage, SIGNAL(clicked()), this, SLOT(SimpleGame()));
+    connect(ui.pageSinglePlayer->BtnTrainPage, SIGNAL(clicked()), this, SLOT(GoToTraining()));
+    connect(ui.pageSinglePlayer->BtnMultiplayer, SIGNAL(clicked()), this, SLOT(GoToMultiplayer()));
+    connect(ui.pageSinglePlayer->BtnLoad, SIGNAL(clicked()), this, SLOT(GoToSaves()));
+    connect(ui.pageSinglePlayer->BtnDemos, SIGNAL(clicked()), this, SLOT(GoToDemos()));
+    connect(ui.pageSinglePlayer->BtnBack, SIGNAL(clicked()), this, SLOT(GoBack()));
 
-	connect(ui.pageTraining->BtnStartTrain, SIGNAL(clicked()), this, SLOT(StartTraining()));
-	connect(ui.pageTraining->BtnBack, SIGNAL(clicked()), this, SLOT(GoBack()));
+    connect(ui.pageTraining->BtnStartTrain, SIGNAL(clicked()), this, SLOT(StartTraining()));
+    connect(ui.pageTraining->BtnBack, SIGNAL(clicked()), this, SLOT(GoBack()));
 
-	connect(ui.pageSelectWeapon->BtnBack, SIGNAL(clicked()), this, SLOT(GoBack()));
+    connect(ui.pageSelectWeapon->BtnBack, SIGNAL(clicked()), this, SLOT(GoBack()));
 
-	connect(ui.pageSelectWeapon->BtnDelete, SIGNAL(clicked()),
-		ui.pageSelectWeapon->pWeapons, SLOT(deleteWeaponsName())); // executed first
-	connect(ui.pageSelectWeapon->pWeapons, SIGNAL(weaponsDeleted()),
-		this, SLOT(UpdateWeapons())); // executed second
-	connect(ui.pageSelectWeapon->pWeapons, SIGNAL(weaponsDeleted()),
-		this, SLOT(GoBack())); // executed third
+    connect(ui.pageSelectWeapon->BtnDelete, SIGNAL(clicked()),
+        ui.pageSelectWeapon->pWeapons, SLOT(deleteWeaponsName())); // executed first
+    connect(ui.pageSelectWeapon->pWeapons, SIGNAL(weaponsDeleted()),
+        this, SLOT(UpdateWeapons())); // executed second
+    connect(ui.pageSelectWeapon->pWeapons, SIGNAL(weaponsDeleted()),
+        this, SLOT(GoBack())); // executed third
 
-	connect(ui.pageScheme->BtnBack, SIGNAL(clicked()), this, SLOT(GoBack()));
+    connect(ui.pageScheme->BtnBack, SIGNAL(clicked()), this, SLOT(GoBack()));
 
-	connect(ui.pageAdmin->BtnBack, SIGNAL(clicked()), this, SLOT(GoBack()));
+    connect(ui.pageAdmin->BtnBack, SIGNAL(clicked()), this, SLOT(GoBack()));
 
-	connect(ui.pageNetType->BtnBack, SIGNAL(clicked()), this, SLOT(GoBack()));
-	connect(ui.pageNetType->BtnLAN, SIGNAL(clicked()), this, SLOT(GoToNet()));
-	connect(ui.pageNetType->BtnOfficialServer, SIGNAL(clicked()), this, SLOT(NetConnectOfficialServer()));
+    connect(ui.pageNetType->BtnBack, SIGNAL(clicked()), this, SLOT(GoBack()));
+    connect(ui.pageNetType->BtnLAN, SIGNAL(clicked()), this, SLOT(GoToNet()));
+    connect(ui.pageNetType->BtnOfficialServer, SIGNAL(clicked()), this, SLOT(NetConnectOfficialServer()));
 
 
-	ammoSchemeModel = new AmmoSchemeModel(this, cfgdir->absolutePath() + "/schemes.ini");
-	ui.pageScheme->setModel(ammoSchemeModel);
-	ui.pageMultiplayer->gameCFG->GameSchemes->setModel(ammoSchemeModel);
+    ammoSchemeModel = new AmmoSchemeModel(this, cfgdir->absolutePath() + "/schemes.ini");
+    ui.pageScheme->setModel(ammoSchemeModel);
+    ui.pageMultiplayer->gameCFG->GameSchemes->setModel(ammoSchemeModel);
 
     wBackground = NULL;
     if (config->isFrontendEffects()) {
@@ -208,49 +208,49 @@
        wBackground->startAnimation();
     }
 
-	PagesStack.push(ID_PAGE_MAIN);
-	GoBack();
+    PagesStack.push(ID_PAGE_MAIN);
+    GoBack();
 }
 
 #ifdef USE_XFIRE
 void HWForm::updateXfire(void)
 {
-	if(hwnet)
-	{
-		xfire_setvalue(XFIRE_SERVER, !hwnet->getHost().compare("netserver.hedgewars.org:46631") ? "Official server" : hwnet->getHost().toAscii());
-		switch(hwnet->getClientState())
-		{
-			case 1: // Connecting
-			xfire_setvalue(XFIRE_STATUS, "Connecting");
-			xfire_setvalue(XFIRE_NICKNAME, "-");
-			xfire_setvalue(XFIRE_ROOM, "-");
-			case 2: // In lobby
-			xfire_setvalue(XFIRE_STATUS, "Online");
-			xfire_setvalue(XFIRE_NICKNAME, hwnet->getNick().toAscii());
-			xfire_setvalue(XFIRE_ROOM, "In game lobby");
-			break;
-			case 3: // In room
-			xfire_setvalue(XFIRE_STATUS, "Online");
-			xfire_setvalue(XFIRE_NICKNAME, hwnet->getNick().toAscii());
-			xfire_setvalue(XFIRE_ROOM, (hwnet->getRoom() + " (waiting for players)").toAscii());
-			break;
-			case 5: // In game
-			xfire_setvalue(XFIRE_STATUS, "Online");
-			xfire_setvalue(XFIRE_NICKNAME, hwnet->getNick().toAscii());
-			xfire_setvalue(XFIRE_ROOM, (hwnet->getRoom() + " (playing or spectating)").toAscii());
-			break;
-			default:
-			break;
-		}
-	}
-	else
-	{
-		xfire_setvalue(XFIRE_STATUS, "Offline");
-		xfire_setvalue(XFIRE_NICKNAME, "-");
-		xfire_setvalue(XFIRE_ROOM, "-");
-		xfire_setvalue(XFIRE_SERVER, "-");
-	}
-	xfire_update();
+    if(hwnet)
+    {
+        xfire_setvalue(XFIRE_SERVER, !hwnet->getHost().compare("netserver.hedgewars.org:46631") ? "Official server" : hwnet->getHost().toAscii());
+        switch(hwnet->getClientState())
+        {
+            case 1: // Connecting
+            xfire_setvalue(XFIRE_STATUS, "Connecting");
+            xfire_setvalue(XFIRE_NICKNAME, "-");
+            xfire_setvalue(XFIRE_ROOM, "-");
+            case 2: // In lobby
+            xfire_setvalue(XFIRE_STATUS, "Online");
+            xfire_setvalue(XFIRE_NICKNAME, hwnet->getNick().toAscii());
+            xfire_setvalue(XFIRE_ROOM, "In game lobby");
+            break;
+            case 3: // In room
+            xfire_setvalue(XFIRE_STATUS, "Online");
+            xfire_setvalue(XFIRE_NICKNAME, hwnet->getNick().toAscii());
+            xfire_setvalue(XFIRE_ROOM, (hwnet->getRoom() + " (waiting for players)").toAscii());
+            break;
+            case 5: // In game
+            xfire_setvalue(XFIRE_STATUS, "Online");
+            xfire_setvalue(XFIRE_NICKNAME, hwnet->getNick().toAscii());
+            xfire_setvalue(XFIRE_ROOM, (hwnet->getRoom() + " (playing or spectating)").toAscii());
+            break;
+            default:
+            break;
+        }
+    }
+    else
+    {
+        xfire_setvalue(XFIRE_STATUS, "Offline");
+        xfire_setvalue(XFIRE_NICKNAME, "-");
+        xfire_setvalue(XFIRE_ROOM, "-");
+        xfire_setvalue(XFIRE_SERVER, "-");
+    }
+    xfire_update();
 }
 #endif
 
@@ -265,779 +265,779 @@
 
 void HWForm::CustomizePalettes()
 {
-	QList<QScrollBar *> allSBars = findChildren<QScrollBar *>();
-	QPalette pal = palette();
-	pal.setColor(QPalette::WindowText, QColor(0xff, 0xcc, 0x00));
-	pal.setColor(QPalette::Button, QColor(0x00, 0x35, 0x1d));
-	pal.setColor(QPalette::Base, QColor(0x00, 0x35, 0x1d));
-	pal.setColor(QPalette::Window, QColor(0x00, 0x00, 0x00));
+    QList<QScrollBar *> allSBars = findChildren<QScrollBar *>();
+    QPalette pal = palette();
+    pal.setColor(QPalette::WindowText, QColor(0xff, 0xcc, 0x00));
+    pal.setColor(QPalette::Button, QColor(0x00, 0x35, 0x1d));
+    pal.setColor(QPalette::Base, QColor(0x00, 0x35, 0x1d));
+    pal.setColor(QPalette::Window, QColor(0x00, 0x00, 0x00));
 
-	for (int i = 0; i < allSBars.size(); ++i)
-		allSBars.at(i)->setPalette(pal);
+    for (int i = 0; i < allSBars.size(); ++i)
+        allSBars.at(i)->setPalette(pal);
 }
 
 void HWForm::UpdateWeapons()
 {
-	QVector<QComboBox*> combos;
-	combos.push_back(ui.pageOptions->WeaponsName);
-	combos.push_back(ui.pageMultiplayer->gameCFG->WeaponsName);
-	combos.push_back(ui.pageNetGame->pGameCFG->WeaponsName);
+    QVector<QComboBox*> combos;
+    combos.push_back(ui.pageOptions->WeaponsName);
+    combos.push_back(ui.pageMultiplayer->gameCFG->WeaponsName);
+    combos.push_back(ui.pageNetGame->pGameCFG->WeaponsName);
 
-	QStringList names = ui.pageSelectWeapon->pWeapons->getWeaponNames();
+    QStringList names = ui.pageSelectWeapon->pWeapons->getWeaponNames();
 
-	for(QVector<QComboBox*>::iterator it = combos.begin(); it != combos.end(); ++it) {
-		(*it)->clear();
+    for(QVector<QComboBox*>::iterator it = combos.begin(); it != combos.end(); ++it) {
+        (*it)->clear();
 
-		for(int i = 0; i < names.size(); ++i)
-			(*it)->addItem(names[i], ui.pageSelectWeapon->pWeapons->getWeaponsString(names[i]));
+        for(int i = 0; i < names.size(); ++i)
+            (*it)->addItem(names[i], ui.pageSelectWeapon->pWeapons->getWeaponsString(names[i]));
 
-		int pos = (*it)->findText("Default");
-		if (pos != -1) {
-			(*it)->setCurrentIndex(pos);
-		}
-	}
+        int pos = (*it)->findText("Default");
+        if (pos != -1) {
+            (*it)->setCurrentIndex(pos);
+        }
+    }
 }
 
 void HWForm::UpdateTeamsLists(const QStringList* editable_teams)
 {
-	QStringList teamslist;
-	if(editable_teams) {
-	  teamslist =* editable_teams;
-	} else {
-	  teamslist = config->GetTeamsList();
-	}
+    QStringList teamslist;
+    if(editable_teams) {
+      teamslist =* editable_teams;
+    } else {
+      teamslist = config->GetTeamsList();
+    }
 
-	if(teamslist.empty()) {
-		HWTeam defaultTeam("DefaultTeam");
-		defaultTeam.SaveToFile();
-		teamslist.push_back("DefaultTeam");
-	}
+    if(teamslist.empty()) {
+        HWTeam defaultTeam("DefaultTeam");
+        defaultTeam.SaveToFile();
+        teamslist.push_back("DefaultTeam");
+    }
 
-	ui.pageOptions->CBTeamName->clear();
-	ui.pageOptions->CBTeamName->addItems(teamslist);
+    ui.pageOptions->CBTeamName->clear();
+    ui.pageOptions->CBTeamName->addItems(teamslist);
 }
 
 void HWForm::GoToMain()
 {
-	GoToPage(ID_PAGE_MAIN);
+    GoToPage(ID_PAGE_MAIN);
 }
 
 void HWForm::GoToSinglePlayer()
 {
-	GoToPage(ID_PAGE_SINGLEPLAYER);
+    GoToPage(ID_PAGE_SINGLEPLAYER);
 }
 
 void HWForm::GoToTraining()
 {
-	GoToPage(ID_PAGE_TRAINING);
+    GoToPage(ID_PAGE_TRAINING);
 }
 
 void HWForm::GoToSetup()
 {
-	GoToPage(ID_PAGE_SETUP);
+    GoToPage(ID_PAGE_SETUP);
 }
 
 void HWForm::GoToSelectNewWeapon()
 {
-	ui.pageSelectWeapon->pWeapons->setWeaponsName(tr("new"));
-	GoToPage(ID_PAGE_SELECTWEAPON);
+    ui.pageSelectWeapon->pWeapons->setWeaponsName(tr("new"));
+    GoToPage(ID_PAGE_SELECTWEAPON);
 }
 
 void HWForm::GoToSelectWeapon()
 {
-	ui.pageSelectWeapon->pWeapons->setWeaponsName(ui.pageOptions->WeaponsName->currentText());
-	GoToPage(ID_PAGE_SELECTWEAPON);
+    ui.pageSelectWeapon->pWeapons->setWeaponsName(ui.pageOptions->WeaponsName->currentText());
+    GoToPage(ID_PAGE_SELECTWEAPON);
 }
 
 void HWForm::GoToSelectWeaponSet(const QString & name)
 {
-	ui.pageSelectWeapon->pWeapons->setWeaponsName(name);
-	GoToPage(ID_PAGE_SELECTWEAPON);
+    ui.pageSelectWeapon->pWeapons->setWeaponsName(name);
+    GoToPage(ID_PAGE_SELECTWEAPON);
 }
 
 void HWForm::GoToInfo()
 {
-	GoToPage(ID_PAGE_INFO);
+    GoToPage(ID_PAGE_INFO);
 }
 
 void HWForm::GoToMultiplayer()
 {
-	GoToPage(ID_PAGE_MULTIPLAYER);
+    GoToPage(ID_PAGE_MULTIPLAYER);
 }
 
 void HWForm::GoToSaves()
 {
-	ui.pagePlayDemo->FillFromDir(PagePlayDemo::RT_Save);
+    ui.pagePlayDemo->FillFromDir(PagePlayDemo::RT_Save);
 
-	GoToPage(ID_PAGE_DEMOS);
+    GoToPage(ID_PAGE_DEMOS);
 }
 
 void HWForm::GoToDemos()
 {
-	ui.pagePlayDemo->FillFromDir(PagePlayDemo::RT_Demo);
+    ui.pagePlayDemo->FillFromDir(PagePlayDemo::RT_Demo);
 
-	GoToPage(ID_PAGE_DEMOS);
+    GoToPage(ID_PAGE_DEMOS);
 }
 
 void HWForm::GoToNet()
 {
-	ui.pageNet->updateServersList();
+    ui.pageNet->updateServersList();
 
-	GoToPage(ID_PAGE_NET);
+    GoToPage(ID_PAGE_NET);
 }
 
 void HWForm::GoToNetType()
 {
-	GoToPage(ID_PAGE_NETTYPE);
+    GoToPage(ID_PAGE_NETTYPE);
 }
 
 void HWForm::GoToNetServer()
 {
-	GoToPage(ID_PAGE_NETSERVER);
+    GoToPage(ID_PAGE_NETSERVER);
 }
 
 void HWForm::GoToSchemes()
 {
-	GoToPage(ID_PAGE_SCHEME);
+    GoToPage(ID_PAGE_SCHEME);
 }
 
 void HWForm::GoToAdmin()
 {
-	GoToPage(ID_PAGE_ADMIN);
+    GoToPage(ID_PAGE_ADMIN);
 }
 
 void HWForm::OnPageShown(quint8 id, quint8 lastid)
 {
 #ifdef USE_XFIRE
-	updateXfire();
+    updateXfire();
 #endif
-	if (id == ID_PAGE_MULTIPLAYER || id == ID_PAGE_NETGAME) {
-		QStringList tmNames = config->GetTeamsList();
-		TeamSelWidget* curTeamSelWidget;
+    if (id == ID_PAGE_MULTIPLAYER || id == ID_PAGE_NETGAME) {
+        QStringList tmNames = config->GetTeamsList();
+        TeamSelWidget* curTeamSelWidget;
 
-		if(id == ID_PAGE_MULTIPLAYER) {
-		  curTeamSelWidget = ui.pageMultiplayer->teamsSelect;
-		} else {
-		  curTeamSelWidget = ui.pageNetGame->pNetTeamsWidget;
-		}
+        if(id == ID_PAGE_MULTIPLAYER) {
+          curTeamSelWidget = ui.pageMultiplayer->teamsSelect;
+        } else {
+          curTeamSelWidget = ui.pageNetGame->pNetTeamsWidget;
+        }
 
-		QList<HWTeam> teamsList;
-		for(QStringList::iterator it = tmNames.begin(); it != tmNames.end(); it++) {
-		  HWTeam team(*it);
-		  team.LoadFromFile();
-		  teamsList.push_back(team);
-		}
+        QList<HWTeam> teamsList;
+        for(QStringList::iterator it = tmNames.begin(); it != tmNames.end(); it++) {
+          HWTeam team(*it);
+          team.LoadFromFile();
+          teamsList.push_back(team);
+        }
 
-		if(lastid == ID_PAGE_SETUP) { // _TEAM
-		  if (editedTeam) {
-		    curTeamSelWidget->addTeam(*editedTeam);
-		  }
-		} else if(lastid != ID_PAGE_GAMESTATS
-				&& lastid != ID_PAGE_INGAME
-				&& lastid != ID_PAGE_SCHEME
-				&& lastid != ID_PAGE_SELECTWEAPON) {
-			curTeamSelWidget->resetPlayingTeams(teamsList);
-		}
-	} else
-	if (id == ID_PAGE_GAMESTATS)
-	{
-		ui.pageGameStats->renderStats();
-	}
+        if(lastid == ID_PAGE_SETUP) { // _TEAM
+          if (editedTeam) {
+            curTeamSelWidget->addTeam(*editedTeam);
+          }
+        } else if(lastid != ID_PAGE_GAMESTATS
+                && lastid != ID_PAGE_INGAME
+                && lastid != ID_PAGE_SCHEME
+                && lastid != ID_PAGE_SELECTWEAPON) {
+            curTeamSelWidget->resetPlayingTeams(teamsList);
+        }
+    } else
+    if (id == ID_PAGE_GAMESTATS)
+    {
+        ui.pageGameStats->renderStats();
+    }
 
-	// load and save ignore/friends lists
-	if(lastid == ID_PAGE_MULTIPLAYER || lastid == ID_PAGE_NETGAME) // leaving a room
-		ui.pageNetGame->pChatWidget->saveLists(ui.pageOptions->editNetNick->text());
-	else if(lastid == ID_PAGE_ROOMSLIST) // leaving the lobby
-		ui.pageRoomsList->chatWidget->saveLists(ui.pageOptions->editNetNick->text());
-	if(id == ID_PAGE_MULTIPLAYER || id == ID_PAGE_NETGAME) // joining a room
-		ui.pageNetGame->pChatWidget->loadLists(ui.pageOptions->editNetNick->text());
-	else if(id == ID_PAGE_ROOMSLIST) // joining the lobby
-		ui.pageRoomsList->chatWidget->loadLists(ui.pageOptions->editNetNick->text());
+    // load and save ignore/friends lists
+    if(lastid == ID_PAGE_MULTIPLAYER || lastid == ID_PAGE_NETGAME) // leaving a room
+        ui.pageNetGame->pChatWidget->saveLists(ui.pageOptions->editNetNick->text());
+    else if(lastid == ID_PAGE_ROOMSLIST) // leaving the lobby
+        ui.pageRoomsList->chatWidget->saveLists(ui.pageOptions->editNetNick->text());
+    if(id == ID_PAGE_MULTIPLAYER || id == ID_PAGE_NETGAME) // joining a room
+        ui.pageNetGame->pChatWidget->loadLists(ui.pageOptions->editNetNick->text());
+    else if(id == ID_PAGE_ROOMSLIST) // joining the lobby
+        ui.pageRoomsList->chatWidget->loadLists(ui.pageOptions->editNetNick->text());
 }
 
 void HWForm::GoToPage(quint8 id)
 {
-	quint8 lastid = ui.Pages->currentIndex();
-	PagesStack.push(ui.Pages->currentIndex());
-	OnPageShown(id, lastid);
-	ui.Pages->setCurrentIndex(id);
+    quint8 lastid = ui.Pages->currentIndex();
+    PagesStack.push(ui.Pages->currentIndex());
+    OnPageShown(id, lastid);
+    ui.Pages->setCurrentIndex(id);
 }
 
 void HWForm::GoBack()
 {
-	quint8 id = PagesStack.isEmpty() ? ID_PAGE_MAIN : PagesStack.pop();
-	quint8 curid = ui.Pages->currentIndex();
-	ui.Pages->setCurrentIndex(id);
-	OnPageShown(id, curid);
+    quint8 id = PagesStack.isEmpty() ? ID_PAGE_MAIN : PagesStack.pop();
+    quint8 curid = ui.Pages->currentIndex();
+    ui.Pages->setCurrentIndex(id);
+    OnPageShown(id, curid);
 
-	if (id == ID_PAGE_CONNECTING)
-		GoBack();
-	if (id == ID_PAGE_NETSERVER)
-		GoBack();
-	if ((!hwnet) && (id == ID_PAGE_ROOMSLIST))
-		GoBack();
+    if (id == ID_PAGE_CONNECTING)
+        GoBack();
+    if (id == ID_PAGE_NETSERVER)
+        GoBack();
+    if ((!hwnet) && (id == ID_PAGE_ROOMSLIST))
+        GoBack();
 
-	if ((!hwnet) || (!hwnet->isInRoom()))
-		if (id == ID_PAGE_NETGAME || id == ID_PAGE_NETGAME)
-			GoBack();
+    if ((!hwnet) || (!hwnet->isInRoom()))
+        if (id == ID_PAGE_NETGAME || id == ID_PAGE_NETGAME)
+            GoBack();
 
-	if (curid == ID_PAGE_ROOMSLIST) NetDisconnect();
+    if (curid == ID_PAGE_ROOMSLIST) NetDisconnect();
 
-	if (curid == ID_PAGE_SCHEME)
-		ammoSchemeModel->Save();
+    if (curid == ID_PAGE_SCHEME)
+        ammoSchemeModel->Save();
 }
 
 void HWForm::btnExitPressed()
 {
-	eggTimer.start();
+    eggTimer.start();
 }
 
 void HWForm::btnExitClicked()
 {
-	if (eggTimer.elapsed() < 3000){
+    if (eggTimer.elapsed() < 3000){
 #ifdef __APPLE__
                 panel->showInstallController();
 #endif
-		close();
-	}
+        close();
+    }
         else
-	{
-		QPushButton * btn = findChild<QPushButton *>("imageButt");
-		if (btn)
-		{
-			btn->setIcon(QIcon(":/res/bonus.png"));
-		}
-	}
+    {
+        QPushButton * btn = findChild<QPushButton *>("imageButt");
+        if (btn)
+        {
+            btn->setIcon(QIcon(":/res/bonus.png"));
+        }
+    }
 }
 
 void HWForm::IntermediateSetup()
 {
-	quint8 id=ui.Pages->currentIndex();
-	TeamSelWidget* curTeamSelWidget;
+    quint8 id=ui.Pages->currentIndex();
+    TeamSelWidget* curTeamSelWidget;
 
-	if(id == ID_PAGE_MULTIPLAYER) {
-		curTeamSelWidget = ui.pageMultiplayer->teamsSelect;
-	} else {
-		curTeamSelWidget = ui.pageNetGame->pNetTeamsWidget;
-	}
+    if(id == ID_PAGE_MULTIPLAYER) {
+        curTeamSelWidget = ui.pageMultiplayer->teamsSelect;
+    } else {
+        curTeamSelWidget = ui.pageNetGame->pNetTeamsWidget;
+    }
 
-	QList<HWTeam> teams = curTeamSelWidget->getDontPlayingTeams();
-	QStringList tmnames;
-	for(QList<HWTeam>::iterator it = teams.begin(); it != teams.end(); ++it) {
-		tmnames += it->TeamName;
-	}
-	UpdateTeamsLists(&tmnames); // FIXME: still need more work if teamname is updated while configuring
+    QList<HWTeam> teams = curTeamSelWidget->getDontPlayingTeams();
+    QStringList tmnames;
+    for(QList<HWTeam>::iterator it = teams.begin(); it != teams.end(); ++it) {
+        tmnames += it->TeamName;
+    }
+    UpdateTeamsLists(&tmnames); // FIXME: still need more work if teamname is updated while configuring
 
-	GoToPage(ID_PAGE_SETUP);
+    GoToPage(ID_PAGE_SETUP);
 }
 
 void HWForm::NewTeam()
 {
-	editedTeam = new HWTeam("unnamed");
-	editedTeam->SetToPage(this);
-	GoToPage(ID_PAGE_SETUP_TEAM);
+    editedTeam = new HWTeam("unnamed");
+    editedTeam->SetToPage(this);
+    GoToPage(ID_PAGE_SETUP_TEAM);
 }
 
 void HWForm::EditTeam()
 {
-	editedTeam = new HWTeam(ui.pageOptions->CBTeamName->currentText());
-	editedTeam->LoadFromFile();
-	editedTeam->SetToPage(this);
-	GoToPage(ID_PAGE_SETUP_TEAM);
+    editedTeam = new HWTeam(ui.pageOptions->CBTeamName->currentText());
+    editedTeam->LoadFromFile();
+    editedTeam->SetToPage(this);
+    GoToPage(ID_PAGE_SETUP_TEAM);
 }
 
 void HWForm::RandomNames()
 {
-	editedTeam->GetFromPage(this);
-	namegen->TeamRandomNames(editedTeam,FALSE);
-	editedTeam->SetToPage(this);
+    editedTeam->GetFromPage(this);
+    namegen->TeamRandomNames(editedTeam,FALSE);
+    editedTeam->SetToPage(this);
 }
 
 void HWForm::RandomName(const int &i)
 {
-	editedTeam->GetFromPage(this);
-	namegen->TeamRandomName(editedTeam,i);
-	editedTeam->SetToPage(this);
+    editedTeam->GetFromPage(this);
+    namegen->TeamRandomName(editedTeam,i);
+    editedTeam->SetToPage(this);
 }
 
 void HWForm::TeamSave()
 {
-	editedTeam->GetFromPage(this);
-	editedTeam->SaveToFile();
-	delete editedTeam;
-	editedTeam=0;
-	UpdateTeamsLists();
-	GoBack();
+    editedTeam->GetFromPage(this);
+    editedTeam->SaveToFile();
+    delete editedTeam;
+    editedTeam=0;
+    UpdateTeamsLists();
+    GoBack();
 }
 
 void HWForm::TeamDiscard()
 {
-	delete editedTeam;
-	editedTeam=0;
-	GoBack();
+    delete editedTeam;
+    editedTeam=0;
+    GoBack();
 }
 
 void HWForm::SimpleGame()
 {
-	CreateGame(0, 0, *cDefaultAmmoStore);
-	game->StartQuick();
+    CreateGame(0, 0, *cDefaultAmmoStore);
+    game->StartQuick();
 }
 
 void HWForm::PlayDemo()
 {
-	QListWidgetItem * curritem = ui.pagePlayDemo->DemosList->currentItem();
-	if (!curritem)
-	{
-		QMessageBox::critical(this,
-				tr("Error"),
-				tr("Please select record from the list above"),
-				tr("OK"));
-		return ;
-	}
-	CreateGame(0, 0, 0);
-	game->PlayDemo(curritem->data(Qt::UserRole).toString());
+    QListWidgetItem * curritem = ui.pagePlayDemo->DemosList->currentItem();
+    if (!curritem)
+    {
+        QMessageBox::critical(this,
+                tr("Error"),
+                tr("Please select record from the list above"),
+                tr("OK"));
+        return ;
+    }
+    CreateGame(0, 0, 0);
+    game->PlayDemo(curritem->data(Qt::UserRole).toString());
 }
 
 void HWForm::NetConnectServer(const QString & host, quint16 port)
 {
-	_NetConnect(host, port, ui.pageOptions->editNetNick->text());
+    _NetConnect(host, port, ui.pageOptions->editNetNick->text());
 }
 
 void HWForm::NetConnectOfficialServer()
 {
-	NetConnectServer("netserver.hedgewars.org", 46631);
+    NetConnectServer("netserver.hedgewars.org", 46631);
 }
 
 void HWForm::_NetConnect(const QString & hostName, quint16 port, const QString & nick)
 {
-	if(hwnet) {
-		hwnet->Disconnect();
-		delete hwnet;
-		hwnet=0;
-	}
+    if(hwnet) {
+        hwnet->Disconnect();
+        delete hwnet;
+        hwnet=0;
+    }
 
-	ui.pageRoomsList->chatWidget->clear();
+    ui.pageRoomsList->chatWidget->clear();
 
-	hwnet = new HWNewNet(config, ui.pageNetGame->pGameCFG, ui.pageNetGame->pNetTeamsWidget);
+    hwnet = new HWNewNet(config, ui.pageNetGame->pGameCFG, ui.pageNetGame->pNetTeamsWidget);
 
-	GoToPage(ID_PAGE_CONNECTING);
+    GoToPage(ID_PAGE_CONNECTING);
 
-	connect(hwnet, SIGNAL(showMessage(const QString &)), this, SLOT(ShowErrorMessage(const QString &)), Qt::QueuedConnection);
+    connect(hwnet, SIGNAL(showMessage(const QString &)), this, SLOT(ShowErrorMessage(const QString &)), Qt::QueuedConnection);
 
-	connect(hwnet, SIGNAL(AskForRunGame()), this, SLOT(CreateNetGame()));
-	connect(hwnet, SIGNAL(Connected()), this, SLOT(NetConnected()));
-	connect(hwnet, SIGNAL(EnteredGame()), this, SLOT(NetGameEnter()));
-	connect(hwnet, SIGNAL(LeftRoom()), this, SLOT(NetLeftRoom()));
-	connect(hwnet, SIGNAL(AddNetTeam(const HWTeam&)), this, SLOT(AddNetTeam(const HWTeam&)));
-	connect(ui.pageNetGame->BtnBack, SIGNAL(clicked()), hwnet, SLOT(partRoom()));
+    connect(hwnet, SIGNAL(AskForRunGame()), this, SLOT(CreateNetGame()));
+    connect(hwnet, SIGNAL(Connected()), this, SLOT(NetConnected()));
+    connect(hwnet, SIGNAL(EnteredGame()), this, SLOT(NetGameEnter()));
+    connect(hwnet, SIGNAL(LeftRoom()), this, SLOT(NetLeftRoom()));
+    connect(hwnet, SIGNAL(AddNetTeam(const HWTeam&)), this, SLOT(AddNetTeam(const HWTeam&)));
+    connect(ui.pageNetGame->BtnBack, SIGNAL(clicked()), hwnet, SLOT(partRoom()));
 
 // rooms list page stuff
-	connect(hwnet, SIGNAL(roomsList(const QStringList&)),
-		ui.pageRoomsList, SLOT(setRoomsList(const QStringList&)));
-	connect(hwnet, SIGNAL(adminAccess(bool)),
-		ui.pageRoomsList, SLOT(setAdmin(bool)));
-	connect(hwnet, SIGNAL(adminAccess(bool)),
-		ui.pageRoomsList->chatWidget, SLOT(adminAccess(bool)));
+    connect(hwnet, SIGNAL(roomsList(const QStringList&)),
+        ui.pageRoomsList, SLOT(setRoomsList(const QStringList&)));
+    connect(hwnet, SIGNAL(adminAccess(bool)),
+        ui.pageRoomsList, SLOT(setAdmin(bool)));
+    connect(hwnet, SIGNAL(adminAccess(bool)),
+        ui.pageRoomsList->chatWidget, SLOT(adminAccess(bool)));
 
-	connect(hwnet, SIGNAL(serverMessage(const QString&)),
-		ui.pageRoomsList->chatWidget, SLOT(onServerMessage(const QString&)));
+    connect(hwnet, SIGNAL(serverMessage(const QString&)),
+        ui.pageRoomsList->chatWidget, SLOT(onServerMessage(const QString&)));
 
-	connect(ui.pageRoomsList, SIGNAL(askForCreateRoom(const QString &)),
-		hwnet, SLOT(CreateRoom(const QString&)));
-	connect(ui.pageRoomsList, SIGNAL(askForJoinRoom(const QString &)),
-		hwnet, SLOT(JoinRoom(const QString&)));
-//	connect(ui.pageRoomsList, SIGNAL(askForCreateRoom(const QString &)),
-//		this, SLOT(NetGameMaster()));
-//	connect(ui.pageRoomsList, SIGNAL(askForJoinRoom(const QString &)),
-//		this, SLOT(NetGameSlave()));
-	connect(ui.pageRoomsList, SIGNAL(askForRoomList()),
-		hwnet, SLOT(askRoomsList()));
+    connect(ui.pageRoomsList, SIGNAL(askForCreateRoom(const QString &)),
+        hwnet, SLOT(CreateRoom(const QString&)));
+    connect(ui.pageRoomsList, SIGNAL(askForJoinRoom(const QString &)),
+        hwnet, SLOT(JoinRoom(const QString&)));
+//  connect(ui.pageRoomsList, SIGNAL(askForCreateRoom(const QString &)),
+//      this, SLOT(NetGameMaster()));
+//  connect(ui.pageRoomsList, SIGNAL(askForJoinRoom(const QString &)),
+//      this, SLOT(NetGameSlave()));
+    connect(ui.pageRoomsList, SIGNAL(askForRoomList()),
+        hwnet, SLOT(askRoomsList()));
 
 // room status stuff
-	connect(hwnet, SIGNAL(roomMaster(bool)),
-		this, SLOT(NetGameChangeStatus(bool)));
+    connect(hwnet, SIGNAL(roomMaster(bool)),
+        this, SLOT(NetGameChangeStatus(bool)));
 
 // net page stuff
-	connect(hwnet, SIGNAL(chatStringFromNet(const QString&)),
-		ui.pageNetGame->pChatWidget, SLOT(onChatString(const QString&)));
-	connect(hwnet, SIGNAL(setReadyStatus(const QString &, bool)),
-		ui.pageNetGame->pChatWidget, SLOT(setReadyStatus(const QString &, bool)));
-	connect(hwnet, SIGNAL(chatStringFromMe(const QString&)),
-		ui.pageNetGame->pChatWidget, SLOT(onChatString(const QString&)));
-	connect(hwnet, SIGNAL(roomMaster(bool)),
-		ui.pageNetGame->pChatWidget, SLOT(adminAccess(bool)));
-	connect(ui.pageNetGame->pChatWidget, SIGNAL(chatLine(const QString&)),
-		hwnet, SLOT(chatLineToNet(const QString&)));
-	connect(ui.pageNetGame->BtnGo, SIGNAL(clicked()), hwnet, SLOT(ToggleReady()));
-	connect(hwnet, SIGNAL(setMyReadyStatus(bool)),
-		ui.pageNetGame, SLOT(setReadyStatus(bool)));
+    connect(hwnet, SIGNAL(chatStringFromNet(const QString&)),
+        ui.pageNetGame->pChatWidget, SLOT(onChatString(const QString&)));
+    connect(hwnet, SIGNAL(setReadyStatus(const QString &, bool)),
+        ui.pageNetGame->pChatWidget, SLOT(setReadyStatus(const QString &, bool)));
+    connect(hwnet, SIGNAL(chatStringFromMe(const QString&)),
+        ui.pageNetGame->pChatWidget, SLOT(onChatString(const QString&)));
+    connect(hwnet, SIGNAL(roomMaster(bool)),
+        ui.pageNetGame->pChatWidget, SLOT(adminAccess(bool)));
+    connect(ui.pageNetGame->pChatWidget, SIGNAL(chatLine(const QString&)),
+        hwnet, SLOT(chatLineToNet(const QString&)));
+    connect(ui.pageNetGame->BtnGo, SIGNAL(clicked()), hwnet, SLOT(ToggleReady()));
+    connect(hwnet, SIGNAL(setMyReadyStatus(bool)),
+        ui.pageNetGame, SLOT(setReadyStatus(bool)));
 
 // chat widget actions
-	connect(ui.pageNetGame->pChatWidget, SIGNAL(kick(const QString&)),
-		hwnet, SLOT(kickPlayer(const QString&)));
-	connect(ui.pageNetGame->pChatWidget, SIGNAL(ban(const QString&)),
-		hwnet, SLOT(banPlayer(const QString&)));
-	connect(ui.pageNetGame->pChatWidget, SIGNAL(info(const QString&)),
-		hwnet, SLOT(infoPlayer(const QString&)));
-	connect(ui.pageNetGame->pChatWidget, SIGNAL(follow(const QString&)),
-		hwnet, SLOT(followPlayer(const QString&)));
-	connect(ui.pageRoomsList->chatWidget, SIGNAL(kick(const QString&)),
-		hwnet, SLOT(kickPlayer(const QString&)));
-	connect(ui.pageRoomsList->chatWidget, SIGNAL(ban(const QString&)),
-		hwnet, SLOT(banPlayer(const QString&)));
-	connect(ui.pageRoomsList->chatWidget, SIGNAL(info(const QString&)),
-		hwnet, SLOT(infoPlayer(const QString&)));
-	connect(ui.pageRoomsList->chatWidget, SIGNAL(follow(const QString&)),
-		hwnet, SLOT(followPlayer(const QString&)));
+    connect(ui.pageNetGame->pChatWidget, SIGNAL(kick(const QString&)),
+        hwnet, SLOT(kickPlayer(const QString&)));
+    connect(ui.pageNetGame->pChatWidget, SIGNAL(ban(const QString&)),
+        hwnet, SLOT(banPlayer(const QString&)));
+    connect(ui.pageNetGame->pChatWidget, SIGNAL(info(const QString&)),
+        hwnet, SLOT(infoPlayer(const QString&)));
+    connect(ui.pageNetGame->pChatWidget, SIGNAL(follow(const QString&)),
+        hwnet, SLOT(followPlayer(const QString&)));
+    connect(ui.pageRoomsList->chatWidget, SIGNAL(kick(const QString&)),
+        hwnet, SLOT(kickPlayer(const QString&)));
+    connect(ui.pageRoomsList->chatWidget, SIGNAL(ban(const QString&)),
+        hwnet, SLOT(banPlayer(const QString&)));
+    connect(ui.pageRoomsList->chatWidget, SIGNAL(info(const QString&)),
+        hwnet, SLOT(infoPlayer(const QString&)));
+    connect(ui.pageRoomsList->chatWidget, SIGNAL(follow(const QString&)),
+        hwnet, SLOT(followPlayer(const QString&)));
 
 // chatting
-	connect(ui.pageRoomsList->chatWidget, SIGNAL(chatLine(const QString&)),
-		hwnet, SLOT(chatLineToLobby(const QString&)));
-	connect(hwnet, SIGNAL(chatStringLobby(const QString&)),
-		ui.pageRoomsList->chatWidget, SLOT(onChatString(const QString&)));
-	connect(hwnet, SIGNAL(chatStringFromMeLobby(const QString&)),
-		ui.pageRoomsList->chatWidget, SLOT(onChatString(const QString&)));
+    connect(ui.pageRoomsList->chatWidget, SIGNAL(chatLine(const QString&)),
+        hwnet, SLOT(chatLineToLobby(const QString&)));
+    connect(hwnet, SIGNAL(chatStringLobby(const QString&)),
+        ui.pageRoomsList->chatWidget, SLOT(onChatString(const QString&)));
+    connect(hwnet, SIGNAL(chatStringFromMeLobby(const QString&)),
+        ui.pageRoomsList->chatWidget, SLOT(onChatString(const QString&)));
 
 // nick list stuff
-	connect(hwnet, SIGNAL(nickAdded(const QString&, bool)),
-		ui.pageNetGame->pChatWidget, SLOT(nickAdded(const QString&, bool)));
-	connect(hwnet, SIGNAL(nickRemoved(const QString&)),
-		ui.pageNetGame->pChatWidget, SLOT(nickRemoved(const QString&)));
-	connect(hwnet, SIGNAL(nickAddedLobby(const QString&, bool)),
-		ui.pageRoomsList->chatWidget, SLOT(nickAdded(const QString&, bool)));
-	connect(hwnet, SIGNAL(nickRemovedLobby(const QString&)),
-		ui.pageRoomsList->chatWidget, SLOT(nickRemoved(const QString&)));
+    connect(hwnet, SIGNAL(nickAdded(const QString&, bool)),
+        ui.pageNetGame->pChatWidget, SLOT(nickAdded(const QString&, bool)));
+    connect(hwnet, SIGNAL(nickRemoved(const QString&)),
+        ui.pageNetGame->pChatWidget, SLOT(nickRemoved(const QString&)));
+    connect(hwnet, SIGNAL(nickAddedLobby(const QString&, bool)),
+        ui.pageRoomsList->chatWidget, SLOT(nickAdded(const QString&, bool)));
+    connect(hwnet, SIGNAL(nickRemovedLobby(const QString&)),
+        ui.pageRoomsList->chatWidget, SLOT(nickRemoved(const QString&)));
 
 // teams selecting stuff
-	connect(ui.pageNetGame->pNetTeamsWidget, SIGNAL(hhogsNumChanged(const HWTeam&)),
-		hwnet, SLOT(onHedgehogsNumChanged(const HWTeam&)));
-	connect(ui.pageNetGame->pNetTeamsWidget, SIGNAL(teamColorChanged(const HWTeam&)),
-		hwnet, SLOT(onTeamColorChanged(const HWTeam&)));
-	connect(ui.pageNetGame->pNetTeamsWidget, SIGNAL(teamWillPlay(HWTeam)), hwnet, SLOT(AddTeam(HWTeam)));
-	connect(ui.pageNetGame->pNetTeamsWidget, SIGNAL(acceptRequested(HWTeam)), hwnet, SLOT(AddTeam(HWTeam)));
-	connect(ui.pageNetGame->pNetTeamsWidget, SIGNAL(teamNotPlaying(const HWTeam&)), hwnet, SLOT(RemoveTeam(const HWTeam&)));
-	connect(hwnet, SIGNAL(hhnumChanged(const HWTeam&)),
-		ui.pageNetGame->pNetTeamsWidget, SLOT(changeHHNum(const HWTeam&)));
-	connect(hwnet, SIGNAL(teamColorChanged(const HWTeam&)),
-		ui.pageNetGame->pNetTeamsWidget, SLOT(changeTeamColor(const HWTeam&)));
+    connect(ui.pageNetGame->pNetTeamsWidget, SIGNAL(hhogsNumChanged(const HWTeam&)),
+        hwnet, SLOT(onHedgehogsNumChanged(const HWTeam&)));
+    connect(ui.pageNetGame->pNetTeamsWidget, SIGNAL(teamColorChanged(const HWTeam&)),
+        hwnet, SLOT(onTeamColorChanged(const HWTeam&)));
+    connect(ui.pageNetGame->pNetTeamsWidget, SIGNAL(teamWillPlay(HWTeam)), hwnet, SLOT(AddTeam(HWTeam)));
+    connect(ui.pageNetGame->pNetTeamsWidget, SIGNAL(acceptRequested(HWTeam)), hwnet, SLOT(AddTeam(HWTeam)));
+    connect(ui.pageNetGame->pNetTeamsWidget, SIGNAL(teamNotPlaying(const HWTeam&)), hwnet, SLOT(RemoveTeam(const HWTeam&)));
+    connect(hwnet, SIGNAL(hhnumChanged(const HWTeam&)),
+        ui.pageNetGame->pNetTeamsWidget, SLOT(changeHHNum(const HWTeam&)));
+    connect(hwnet, SIGNAL(teamColorChanged(const HWTeam&)),
+        ui.pageNetGame->pNetTeamsWidget, SLOT(changeTeamColor(const HWTeam&)));
 
 // admin stuff
-	connect(hwnet, SIGNAL(serverMessage(const QString&)), ui.pageAdmin, SLOT(serverMessage(const QString &)));
-	connect(ui.pageAdmin, SIGNAL(setServerMessage(const QString&)), hwnet, SLOT(newServerMessage(const QString &)));
-	connect(ui.pageAdmin->pbClearAccountsCache, SIGNAL(clicked()), hwnet, SLOT(clearAccountsCache()));
+    connect(hwnet, SIGNAL(serverMessage(const QString&)), ui.pageAdmin, SLOT(serverMessage(const QString &)));
+    connect(ui.pageAdmin, SIGNAL(setServerMessage(const QString&)), hwnet, SLOT(newServerMessage(const QString &)));
+    connect(ui.pageAdmin->pbClearAccountsCache, SIGNAL(clicked()), hwnet, SLOT(clearAccountsCache()));
 
 // disconnect
-	connect(hwnet, SIGNAL(Disconnected()), this, SLOT(ForcedDisconnect()), Qt::QueuedConnection);
+    connect(hwnet, SIGNAL(Disconnected()), this, SLOT(ForcedDisconnect()), Qt::QueuedConnection);
 
-	hwnet->Connect(hostName, port, nick);
+    hwnet->Connect(hostName, port, nick);
 }
 
 void HWForm::NetConnect()
 {
-	HWHostPortDialog * hpd = new HWHostPortDialog(this);
-	hpd->leHost->setText(*netHost);
-	hpd->sbPort->setValue(netPort);
+    HWHostPortDialog * hpd = new HWHostPortDialog(this);
+    hpd->leHost->setText(*netHost);
+    hpd->sbPort->setValue(netPort);
 
-	if (hpd->exec() == QDialog::Accepted)
-	{
-		config->SaveOptions();
-		delete netHost;
-		netHost = new QString(hpd->leHost->text());
-		netPort = hpd->sbPort->value();
-		NetConnectServer(*netHost, netPort);
-	}
+    if (hpd->exec() == QDialog::Accepted)
+    {
+        config->SaveOptions();
+        delete netHost;
+        netHost = new QString(hpd->leHost->text());
+        netPort = hpd->sbPort->value();
+        NetConnectServer(*netHost, netPort);
+    }
 }
 
 void HWForm::NetStartServer()
 {
-	config->SaveOptions();
+    config->SaveOptions();
 
-	pnetserver = new HWNetServer;
-	if(!pnetserver->StartServer(ui.pageNetServer->sbPort->value()))
-	{
-		QMessageBox::critical(0, tr("Error"),
-				tr("Unable to start the server"));
-		delete pnetserver;
-		pnetserver = 0;
-		return;
-	}
+    pnetserver = new HWNetServer;
+    if(!pnetserver->StartServer(ui.pageNetServer->sbPort->value()))
+    {
+        QMessageBox::critical(0, tr("Error"),
+                tr("Unable to start the server"));
+        delete pnetserver;
+        pnetserver = 0;
+        return;
+    }
 
-	QTimer::singleShot(250, this, SLOT(AsyncNetServerStart()));
+    QTimer::singleShot(250, this, SLOT(AsyncNetServerStart()));
 
-	pRegisterServer = new HWNetUdpServer(0,
-			ui.pageNetServer->leServerDescr->text(),
-			ui.pageNetServer->sbPort->value());
+    pRegisterServer = new HWNetUdpServer(0,
+            ui.pageNetServer->leServerDescr->text(),
+            ui.pageNetServer->sbPort->value());
 }
 
 void HWForm::AsyncNetServerStart()
 {
-	NetConnectServer("localhost", pnetserver->getRunningPort());
+    NetConnectServer("localhost", pnetserver->getRunningPort());
 }
 
 void HWForm::NetDisconnect()
 {
-	//qDebug("NetDisconnect");
-	if(hwnet) {
-		hwnet->Disconnect();
-		delete hwnet;
-		hwnet = 0;
-	}
-	if(pnetserver) {
-		if (pRegisterServer)
-		{
-			pRegisterServer->unregister();
-			pRegisterServer = 0;
-		}
+    //qDebug("NetDisconnect");
+    if(hwnet) {
+        hwnet->Disconnect();
+        delete hwnet;
+        hwnet = 0;
+    }
+    if(pnetserver) {
+        if (pRegisterServer)
+        {
+            pRegisterServer->unregister();
+            pRegisterServer = 0;
+        }
 
-		pnetserver->StopServer();
-		delete pnetserver;
-		pnetserver = 0;
-	}
+        pnetserver->StopServer();
+        delete pnetserver;
+        pnetserver = 0;
+    }
 }
 
 void HWForm::ForcedDisconnect()
 {
-	if(pnetserver) return; // we have server - let it care of all things
-	if (hwnet) {
-		hwnet->deleteLater();
-		hwnet = 0;
-		QMessageBox::warning(this, QMessageBox::tr("Network"),
-				QMessageBox::tr("Connection to server is lost"));
+    if(pnetserver) return; // we have server - let it care of all things
+    if (hwnet) {
+        hwnet->deleteLater();
+        hwnet = 0;
+        QMessageBox::warning(this, QMessageBox::tr("Network"),
+                QMessageBox::tr("Connection to server is lost"));
 
-	}
-	if (ui.Pages->currentIndex() != ID_PAGE_NET) GoBack();
+    }
+    if (ui.Pages->currentIndex() != ID_PAGE_NET) GoBack();
 }
 
 void HWForm::NetConnected()
 {
-	GoToPage(ID_PAGE_ROOMSLIST);
+    GoToPage(ID_PAGE_ROOMSLIST);
 }
 
 void HWForm::NetGameEnter()
 {
-	ui.pageNetGame->pChatWidget->clear();
-	GoToPage(ID_PAGE_NETGAME);
+    ui.pageNetGame->pChatWidget->clear();
+    GoToPage(ID_PAGE_NETGAME);
 }
 
 void HWForm::AddNetTeam(const HWTeam& team)
 {
-	ui.pageNetGame->pNetTeamsWidget->addTeam(team);
+    ui.pageNetGame->pNetTeamsWidget->addTeam(team);
 }
 
 void HWForm::StartMPGame()
 {
-	QString ammo;
-	ammo = ui.pageMultiplayer->gameCFG->WeaponsName->itemData(
-		ui.pageMultiplayer->gameCFG->WeaponsName->currentIndex()
-		).toString();
+    QString ammo;
+    ammo = ui.pageMultiplayer->gameCFG->WeaponsName->itemData(
+        ui.pageMultiplayer->gameCFG->WeaponsName->currentIndex()
+        ).toString();
 
-	CreateGame(ui.pageMultiplayer->gameCFG, ui.pageMultiplayer->teamsSelect, ammo);
+    CreateGame(ui.pageMultiplayer->gameCFG, ui.pageMultiplayer->teamsSelect, ammo);
 
-	game->StartLocal();
+    game->StartLocal();
 }
 
 void HWForm::GameStateChanged(GameState gameState)
 {
-	switch(gameState) {
-		case gsStarted: {
-			Music(false);
-			if (wBackground) wBackground->stopAnimation();
-			GoToPage(ID_PAGE_INGAME);
-			ui.pageGameStats->clear();
-			if (pRegisterServer)
-			{
-				pRegisterServer->unregister();
-				pRegisterServer = 0;
-			}
-			//setVisible(false);
-			setFocusPolicy(Qt::NoFocus);
-			break;
-		}
-		case gsFinished: {
-			//setVisible(true);
-			setFocusPolicy(Qt::StrongFocus);
-			GoBack();
-			Music(ui.pageOptions->CBEnableFrontendMusic->isChecked());
-			if (wBackground) wBackground->startAnimation();
-			GoToPage(ID_PAGE_GAMESTATS);
-			if (hwnet) hwnet->gameFinished();
-			break;
-		}
-		default: {
-			//setVisible(true);
-			setFocusPolicy(Qt::StrongFocus);
-			quint8 id = ui.Pages->currentIndex();
-			if (id == ID_PAGE_INGAME) {
-				GoBack();
-				Music(ui.pageOptions->CBEnableFrontendMusic->isChecked());
-				if (wBackground) wBackground->startAnimation();
-				if (hwnet) hwnet->gameFinished();
-			}
-		};
-	}
+    switch(gameState) {
+        case gsStarted: {
+            Music(false);
+            if (wBackground) wBackground->stopAnimation();
+            GoToPage(ID_PAGE_INGAME);
+            ui.pageGameStats->clear();
+            if (pRegisterServer)
+            {
+                pRegisterServer->unregister();
+                pRegisterServer = 0;
+            }
+            //setVisible(false);
+            setFocusPolicy(Qt::NoFocus);
+            break;
+        }
+        case gsFinished: {
+            //setVisible(true);
+            setFocusPolicy(Qt::StrongFocus);
+            GoBack();
+            Music(ui.pageOptions->CBEnableFrontendMusic->isChecked());
+            if (wBackground) wBackground->startAnimation();
+            GoToPage(ID_PAGE_GAMESTATS);
+            if (hwnet) hwnet->gameFinished();
+            break;
+        }
+        default: {
+            //setVisible(true);
+            setFocusPolicy(Qt::StrongFocus);
+            quint8 id = ui.Pages->currentIndex();
+            if (id == ID_PAGE_INGAME) {
+                GoBack();
+                Music(ui.pageOptions->CBEnableFrontendMusic->isChecked());
+                if (wBackground) wBackground->startAnimation();
+                if (hwnet) hwnet->gameFinished();
+            }
+        };
+    }
 }
 
 void HWForm::CreateGame(GameCFGWidget * gamecfg, TeamSelWidget* pTeamSelWidget, QString ammo)
 {
-	game = new HWGame(config, gamecfg, ammo, pTeamSelWidget);
-	connect(game, SIGNAL(GameStateChanged(GameState)), this, SLOT(GameStateChanged(GameState)));
-	connect(game, SIGNAL(GameStats(char, const QString &)), ui.pageGameStats, SLOT(GameStats(char, const QString &)));
-	connect(game, SIGNAL(ErrorMessage(const QString &)), this, SLOT(ShowErrorMessage(const QString &)), Qt::QueuedConnection);
-	connect(game, SIGNAL(HaveRecord(bool, const QByteArray &)), this, SLOT(GetRecord(bool, const QByteArray &)));
+    game = new HWGame(config, gamecfg, ammo, pTeamSelWidget);
+    connect(game, SIGNAL(GameStateChanged(GameState)), this, SLOT(GameStateChanged(GameState)));
+    connect(game, SIGNAL(GameStats(char, const QString &)), ui.pageGameStats, SLOT(GameStats(char, const QString &)));
+    connect(game, SIGNAL(ErrorMessage(const QString &)), this, SLOT(ShowErrorMessage(const QString &)), Qt::QueuedConnection);
+    connect(game, SIGNAL(HaveRecord(bool, const QByteArray &)), this, SLOT(GetRecord(bool, const QByteArray &)));
 }
 
 void HWForm::ShowErrorMessage(const QString & msg)
 {
-	QMessageBox::warning(this,
-			"Hedgewars",
-			msg);
+    QMessageBox::warning(this,
+            "Hedgewars",
+            msg);
 }
 
 void HWForm::GetRecord(bool isDemo, const QByteArray & record)
 {
-	QString filename;
-	QByteArray demo = record;
-	QString recordFileName =
-			config->appendDateTimeToRecordName() ?
-				QDateTime::currentDateTime().toString("yyyy-MM-dd_hh-mm") :
-				"LastRound";
+    QString filename;
+    QByteArray demo = record;
+    QString recordFileName =
+            config->appendDateTimeToRecordName() ?
+                QDateTime::currentDateTime().toString("yyyy-MM-dd_hh-mm") :
+                "LastRound";
 
-	if (isDemo)
-	{
-		demo.replace(QByteArray("\x02TL"), QByteArray("\x02TD"));
-		demo.replace(QByteArray("\x02TN"), QByteArray("\x02TD"));
-		demo.replace(QByteArray("\x02TS"), QByteArray("\x02TD"));
-		filename = cfgdir->absolutePath() + "/Demos/" + recordFileName + "." + *cProtoVer + ".hwd";
-	} else
-	{
-		demo.replace(QByteArray("\x02TL"), QByteArray("\x02TS"));
-		demo.replace(QByteArray("\x02TN"), QByteArray("\x02TS"));
-		filename = cfgdir->absolutePath() + "/Saves/" + recordFileName + "." + *cProtoVer + ".hws";
-	}
+    if (isDemo)
+    {
+        demo.replace(QByteArray("\x02TL"), QByteArray("\x02TD"));
+        demo.replace(QByteArray("\x02TN"), QByteArray("\x02TD"));
+        demo.replace(QByteArray("\x02TS"), QByteArray("\x02TD"));
+        filename = cfgdir->absolutePath() + "/Demos/" + recordFileName + "." + *cProtoVer + ".hwd";
+    } else
+    {
+        demo.replace(QByteArray("\x02TL"), QByteArray("\x02TS"));
+        demo.replace(QByteArray("\x02TN"), QByteArray("\x02TS"));
+        filename = cfgdir->absolutePath() + "/Saves/" + recordFileName + "." + *cProtoVer + ".hws";
+    }
 
 
-	QFile demofile(filename);
-	if (!demofile.open(QIODevice::WriteOnly))
-	{
-		ShowErrorMessage(tr("Cannot save record to file %1").arg(filename));
-		return ;
-	}
-	demofile.write(demo.constData(), demo.size());
-	demofile.close();
+    QFile demofile(filename);
+    if (!demofile.open(QIODevice::WriteOnly))
+    {
+        ShowErrorMessage(tr("Cannot save record to file %1").arg(filename));
+        return ;
+    }
+    demofile.write(demo.constData(), demo.size());
+    demofile.close();
 }
 
 void HWForm::StartTraining()
 {
-	CreateGame(0, 0, 0);
+    CreateGame(0, 0, 0);
 
-	game->StartTraining(ui.pageTraining->CBSelect->currentText());
+    game->StartTraining(ui.pageTraining->CBSelect->currentText());
 }
 
 void HWForm::CreateNetGame()
 {
-	QString ammo;
-	ammo = ui.pageNetGame->pGameCFG->WeaponsName->itemData(
-			ui.pageNetGame->pGameCFG->WeaponsName->currentIndex()
-			).toString();
+    QString ammo;
+    ammo = ui.pageNetGame->pGameCFG->WeaponsName->itemData(
+            ui.pageNetGame->pGameCFG->WeaponsName->currentIndex()
+            ).toString();
 
-	CreateGame(ui.pageNetGame->pGameCFG, ui.pageNetGame->pNetTeamsWidget, ammo);
+    CreateGame(ui.pageNetGame->pGameCFG, ui.pageNetGame->pNetTeamsWidget, ammo);
 
-	connect(game, SIGNAL(SendNet(const QByteArray &)), hwnet, SLOT(SendNet(const QByteArray &)));
-	connect(game, SIGNAL(SendChat(const QString &)), hwnet, SLOT(chatLineToNet(const QString &)));
-	connect(game, SIGNAL(SendTeamMessage(const QString &)), hwnet, SLOT(SendTeamMessage(const QString &)));
-	connect(hwnet, SIGNAL(FromNet(const QByteArray &)), game, SLOT(FromNet(const QByteArray &)));
-	connect(hwnet, SIGNAL(chatStringFromNet(const QString &)), game, SLOT(FromNetChat(const QString &)));
+    connect(game, SIGNAL(SendNet(const QByteArray &)), hwnet, SLOT(SendNet(const QByteArray &)));
+    connect(game, SIGNAL(SendChat(const QString &)), hwnet, SLOT(chatLineToNet(const QString &)));
+    connect(game, SIGNAL(SendTeamMessage(const QString &)), hwnet, SLOT(SendTeamMessage(const QString &)));
+    connect(hwnet, SIGNAL(FromNet(const QByteArray &)), game, SLOT(FromNet(const QByteArray &)));
+    connect(hwnet, SIGNAL(chatStringFromNet(const QString &)), game, SLOT(FromNetChat(const QString &)));
 
-	game->StartNet();
+    game->StartNet();
 }
 
 void HWForm::closeEvent(QCloseEvent *event)
 {
 #ifdef USE_XFIRE
-	xfire_free();
+    xfire_free();
 #endif
-	config->SaveOptions();
-	event->accept();
+    config->SaveOptions();
+    event->accept();
 }
 
 void HWForm::Music(bool checked)
 {
-	if (checked)
-		sdli.StartMusic();
-	else
-		sdli.StopMusic();
+    if (checked)
+        sdli.StartMusic();
+    else
+        sdli.StopMusic();
 }
 
 void HWForm::NetGameChangeStatus(bool isMaster)
 {
-	if (isMaster)
-		NetGameMaster();
-	else
-		NetGameSlave();
+    if (isMaster)
+        NetGameMaster();
+    else
+        NetGameSlave();
 }
 
 void HWForm::NetGameMaster()
 {
-	ui.pageNetGame->setMasterMode(true);
-	ui.pageNetGame->restrictJoins->setChecked(false);
-	ui.pageNetGame->restrictTeamAdds->setChecked(false);
-	ui.pageNetGame->pGameCFG->GameSchemes->setModel(ammoSchemeModel);
-	ui.pageNetGame->pGameCFG->setEnabled(true);
-	ui.pageNetGame->pNetTeamsWidget->setInteractivity(true);
+    ui.pageNetGame->setMasterMode(true);
+    ui.pageNetGame->restrictJoins->setChecked(false);
+    ui.pageNetGame->restrictTeamAdds->setChecked(false);
+    ui.pageNetGame->pGameCFG->GameSchemes->setModel(ammoSchemeModel);
+    ui.pageNetGame->pGameCFG->setEnabled(true);
+    ui.pageNetGame->pNetTeamsWidget->setInteractivity(true);
 
-	if (hwnet)
-	{
-		// disconnect connections first to ensure their inexistance and not to connect twice
-		ui.pageNetGame->BtnStart->disconnect(hwnet);
-		ui.pageNetGame->restrictJoins->disconnect(hwnet);
-		ui.pageNetGame->restrictTeamAdds->disconnect(hwnet);
-		connect(ui.pageNetGame->BtnStart, SIGNAL(clicked()), hwnet, SLOT(startGame()));
-		connect(ui.pageNetGame->restrictJoins, SIGNAL(triggered()), hwnet, SLOT(toggleRestrictJoins()));
-		connect(ui.pageNetGame->restrictTeamAdds, SIGNAL(triggered()), hwnet, SLOT(toggleRestrictTeamAdds()));
-		connect(ui.pageNetGame->pGameCFG->GameSchemes->model(),
-				SIGNAL(dataChanged(const QModelIndex &, const QModelIndex &)),
-				ui.pageNetGame->pGameCFG,
-				SLOT(resendSchemeData())
-				);
-	}
+    if (hwnet)
+    {
+        // disconnect connections first to ensure their inexistance and not to connect twice
+        ui.pageNetGame->BtnStart->disconnect(hwnet);
+        ui.pageNetGame->restrictJoins->disconnect(hwnet);
+        ui.pageNetGame->restrictTeamAdds->disconnect(hwnet);
+        connect(ui.pageNetGame->BtnStart, SIGNAL(clicked()), hwnet, SLOT(startGame()));
+        connect(ui.pageNetGame->restrictJoins, SIGNAL(triggered()), hwnet, SLOT(toggleRestrictJoins()));
+        connect(ui.pageNetGame->restrictTeamAdds, SIGNAL(triggered()), hwnet, SLOT(toggleRestrictTeamAdds()));
+        connect(ui.pageNetGame->pGameCFG->GameSchemes->model(),
+                SIGNAL(dataChanged(const QModelIndex &, const QModelIndex &)),
+                ui.pageNetGame->pGameCFG,
+                SLOT(resendSchemeData())
+                );
+    }
 }
 
 void HWForm::NetGameSlave()
 {
-	ui.pageNetGame->pGameCFG->setEnabled(false);
-	ui.pageNetGame->pNetTeamsWidget->setInteractivity(false);
+    ui.pageNetGame->pGameCFG->setEnabled(false);
+    ui.pageNetGame->pNetTeamsWidget->setInteractivity(false);
 
-	if (hwnet)
-	{
-		NetAmmoSchemeModel * netAmmo = new NetAmmoSchemeModel(hwnet);
-		connect(hwnet, SIGNAL(netSchemeConfig(QStringList &)), netAmmo, SLOT(setNetSchemeConfig(QStringList &)));
-		ui.pageNetGame->pGameCFG->GameSchemes->setModel(netAmmo);
+    if (hwnet)
+    {
+        NetAmmoSchemeModel * netAmmo = new NetAmmoSchemeModel(hwnet);
+        connect(hwnet, SIGNAL(netSchemeConfig(QStringList &)), netAmmo, SLOT(setNetSchemeConfig(QStringList &)));
+        ui.pageNetGame->pGameCFG->GameSchemes->setModel(netAmmo);
 
-		ui.pageNetGame->pGameCFG->GameSchemes->view()->disconnect(hwnet);
-		connect(hwnet, SIGNAL(netSchemeConfig(QStringList &)),
-				this, SLOT(selectFirstNetScheme()));
-	}
+        ui.pageNetGame->pGameCFG->GameSchemes->view()->disconnect(hwnet);
+        connect(hwnet, SIGNAL(netSchemeConfig(QStringList &)),
+                this, SLOT(selectFirstNetScheme()));
+    }
 
-	ui.pageNetGame->setMasterMode(false);
+    ui.pageNetGame->setMasterMode(false);
 }
 
 void HWForm::selectFirstNetScheme()
 {
-	ui.pageNetGame->pGameCFG->GameSchemes->setCurrentIndex(0);
+    ui.pageNetGame->pGameCFG->GameSchemes->setCurrentIndex(0);
 }
 
 void HWForm::NetLeftRoom()
 {
-	if (ui.Pages->currentIndex() == ID_PAGE_NETGAME)
-		GoBack();
-	else
-		qWarning("Left room while not in room");
+    if (ui.Pages->currentIndex() == ID_PAGE_NETGAME)
+        GoBack();
+    else
+        qWarning("Left room while not in room");
 }
 
 void HWForm::resizeEvent(QResizeEvent * event)
 {
-	int w = event->size().width();
-	int h = event->size().height();
+    int w = event->size().width();
+    int h = event->size().height();
     if (wBackground) {
         wBackground->setFixedSize(w, h);
         wBackground->move(0, 0);
--- a/QTfrontend/hwform.h	Sat Mar 06 10:54:24 2010 +0000
+++ b/QTfrontend/hwform.h	Sat Mar 06 10:59:20 2010 +0000
@@ -48,118 +48,118 @@
 
 class HWForm : public QMainWindow
 {
-	Q_OBJECT
+    Q_OBJECT
 
 public:
-	HWForm(QWidget *parent = 0);
-	Ui_HWForm ui;
-	SDLInteraction sdli;
-	GameUIConfig * config;
+    HWForm(QWidget *parent = 0);
+    Ui_HWForm ui;
+    SDLInteraction sdli;
+    GameUIConfig * config;
     QSettings * gameSettings; // Same file GameUIConfig points to but without the baggage.  Needs sync() calls if you want to get GameUIConfig changes though
-	void updateXfire();
+    void updateXfire();
 
 private slots:
-	void GoToMain();
-	void GoToSinglePlayer();
-	void GoToSetup();
-	void GoToMultiplayer();
-	void GoToSaves();
-	void GoToDemos();
-	void GoToNet();
-	void GoToNetType();
-	void GoToInfo();
-	void GoToTraining();
-	void GoToSelectWeapon();
-	void GoToSelectWeaponSet(const QString & name);
-	void GoToSelectNewWeapon();
-	void GoToNetServer();
-	void GoToSchemes();
-	void GoToAdmin();
-	void GoToPage(quint8 id);
-	void GoBack();
-	void btnExitPressed();
-	void btnExitClicked();
-	void IntermediateSetup();
-	void NewTeam();
-	void EditTeam();
-	void RandomNames();
-	void RandomName(const int &i);
-	void TeamSave();
-	void TeamDiscard();
-	void SimpleGame();
-	void PlayDemo();
-	void StartTraining();
-	void NetConnect();
-	void NetConnectServer(const QString & host, quint16 port);
-	void NetConnectOfficialServer();
-	void NetStartServer();
-	void NetDisconnect();
-	void NetConnected();
-	void NetGameEnter();
-	void AddNetTeam(const HWTeam& team);
-	void StartMPGame();
-	void GameStateChanged(GameState gameState);
-	void ForcedDisconnect();
-	void ShowErrorMessage(const QString &);
-	void GetRecord(bool isDemo, const QByteArray & record);
-	void CreateNetGame();
-	void UpdateWeapons();
-	void onFrontendFullscreen(bool value);
-	void Music(bool checked);
+    void GoToMain();
+    void GoToSinglePlayer();
+    void GoToSetup();
+    void GoToMultiplayer();
+    void GoToSaves();
+    void GoToDemos();
+    void GoToNet();
+    void GoToNetType();
+    void GoToInfo();
+    void GoToTraining();
+    void GoToSelectWeapon();
+    void GoToSelectWeaponSet(const QString & name);
+    void GoToSelectNewWeapon();
+    void GoToNetServer();
+    void GoToSchemes();
+    void GoToAdmin();
+    void GoToPage(quint8 id);
+    void GoBack();
+    void btnExitPressed();
+    void btnExitClicked();
+    void IntermediateSetup();
+    void NewTeam();
+    void EditTeam();
+    void RandomNames();
+    void RandomName(const int &i);
+    void TeamSave();
+    void TeamDiscard();
+    void SimpleGame();
+    void PlayDemo();
+    void StartTraining();
+    void NetConnect();
+    void NetConnectServer(const QString & host, quint16 port);
+    void NetConnectOfficialServer();
+    void NetStartServer();
+    void NetDisconnect();
+    void NetConnected();
+    void NetGameEnter();
+    void AddNetTeam(const HWTeam& team);
+    void StartMPGame();
+    void GameStateChanged(GameState gameState);
+    void ForcedDisconnect();
+    void ShowErrorMessage(const QString &);
+    void GetRecord(bool isDemo, const QByteArray & record);
+    void CreateNetGame();
+    void UpdateWeapons();
+    void onFrontendFullscreen(bool value);
+    void Music(bool checked);
 
-	void NetGameChangeStatus(bool isMaster);
-	void NetGameMaster();
-	void NetGameSlave();
+    void NetGameChangeStatus(bool isMaster);
+    void NetGameMaster();
+    void NetGameSlave();
 
-	void AsyncNetServerStart();
-	void NetLeftRoom();
-	void selectFirstNetScheme();
+    void AsyncNetServerStart();
+    void NetLeftRoom();
+    void selectFirstNetScheme();
 
 private:
-	void _NetConnect(const QString & hostName, quint16 port, const QString & nick);
-	void UpdateTeamsLists(const QStringList* editable_teams=0);
-	void CreateGame(GameCFGWidget * gamecfg, TeamSelWidget* pTeamSelWidget, QString ammo);
-	void closeEvent(QCloseEvent *event);
-	void CustomizePalettes();
-	void resizeEvent(QResizeEvent * event);
+    void _NetConnect(const QString & hostName, quint16 port, const QString & nick);
+    void UpdateTeamsLists(const QStringList* editable_teams=0);
+    void CreateGame(GameCFGWidget * gamecfg, TeamSelWidget* pTeamSelWidget, QString ammo);
+    void closeEvent(QCloseEvent *event);
+    void CustomizePalettes();
+    void resizeEvent(QResizeEvent * event);
 
-	enum PageIDs {
-		ID_PAGE_SETUP_TEAM      =  0,
-		ID_PAGE_SETUP           =  1,
-		ID_PAGE_MULTIPLAYER     =  2,
-		ID_PAGE_DEMOS           =  3,
-		ID_PAGE_NET             =  4,
-		ID_PAGE_NETGAME         =  5,
-		ID_PAGE_INFO            =  6,
-		ID_PAGE_MAIN            =  7,
-		ID_PAGE_GAMESTATS       =  8,
-		ID_PAGE_SINGLEPLAYER    =  9,
-		ID_PAGE_TRAINING        = 10,
-		ID_PAGE_SELECTWEAPON    = 11,
-		ID_PAGE_NETSERVER       = 12,
-		ID_PAGE_INGAME          = 13,
-		ID_PAGE_ROOMSLIST       = 14,
-		ID_PAGE_CONNECTING      = 15,
-		ID_PAGE_SCHEME          = 16,
-		ID_PAGE_ADMIN           = 17,
-		ID_PAGE_NETTYPE         = 18
-		};
-	HWGame * game;
-	HWNetServer* pnetserver;
-	HWNetRegisterServer* pRegisterServer;
-	HWTeam * editedTeam;
-	HWNewNet * hwnet;
-	HWNamegen * namegen;
-	AmmoSchemeModel * ammoSchemeModel;
-	QStack<quint8> PagesStack;
-	QTime eggTimer;
-	BGWidget * wBackground;
+    enum PageIDs {
+        ID_PAGE_SETUP_TEAM      =  0,
+        ID_PAGE_SETUP           =  1,
+        ID_PAGE_MULTIPLAYER     =  2,
+        ID_PAGE_DEMOS           =  3,
+        ID_PAGE_NET             =  4,
+        ID_PAGE_NETGAME         =  5,
+        ID_PAGE_INFO            =  6,
+        ID_PAGE_MAIN            =  7,
+        ID_PAGE_GAMESTATS       =  8,
+        ID_PAGE_SINGLEPLAYER    =  9,
+        ID_PAGE_TRAINING        = 10,
+        ID_PAGE_SELECTWEAPON    = 11,
+        ID_PAGE_NETSERVER       = 12,
+        ID_PAGE_INGAME          = 13,
+        ID_PAGE_ROOMSLIST       = 14,
+        ID_PAGE_CONNECTING      = 15,
+        ID_PAGE_SCHEME          = 16,
+        ID_PAGE_ADMIN           = 17,
+        ID_PAGE_NETTYPE         = 18
+        };
+    HWGame * game;
+    HWNetServer* pnetserver;
+    HWNetRegisterServer* pRegisterServer;
+    HWTeam * editedTeam;
+    HWNewNet * hwnet;
+    HWNamegen * namegen;
+    AmmoSchemeModel * ammoSchemeModel;
+    QStack<quint8> PagesStack;
+    QTime eggTimer;
+    BGWidget * wBackground;
         
 #ifdef __APPLE__
         InstallController * panel;
 #endif
         
-	void OnPageShown(quint8 id, quint8 lastid=0);
+    void OnPageShown(quint8 id, quint8 lastid=0);
 };
 
 #endif
--- a/QTfrontend/hwmap.cpp	Sat Mar 06 10:54:24 2010 +0000
+++ b/QTfrontend/hwmap.cpp	Sat Mar 06 10:59:20 2010 +0000
@@ -29,35 +29,35 @@
 
 void HWMap::getImage(std::string seed, int filter)
 {
-	m_seed = seed;
-	templateFilter = filter;
-	Start();
+    m_seed = seed;
+    templateFilter = filter;
+    Start();
 }
 
 QStringList HWMap::setArguments()
 {
-	QStringList arguments;
-	arguments << cfgdir->absolutePath();
-	arguments << QString("%1").arg(ipc_port);
-	arguments << "landpreview";
-	return arguments;
+    QStringList arguments;
+    arguments << cfgdir->absolutePath();
+    arguments << QString("%1").arg(ipc_port);
+    arguments << "landpreview";
+    return arguments;
 }
 
 void HWMap::onClientDisconnect()
 {
-	if (readbuffer.size() == 128 * 32 + 1)
-	{
-		quint8 *buf = (quint8*) readbuffer.constData();
-		QImage im(buf, 256, 128, QImage::Format_Mono);
-		im.setNumColors(2);
-		emit HHLimitReceived(buf[128 * 32]);
-		emit ImageReceived(im);
-	}
+    if (readbuffer.size() == 128 * 32 + 1)
+    {
+        quint8 *buf = (quint8*) readbuffer.constData();
+        QImage im(buf, 256, 128, QImage::Format_Mono);
+        im.setNumColors(2);
+        emit HHLimitReceived(buf[128 * 32]);
+        emit ImageReceived(im);
+    }
 }
 
 void HWMap::SendToClientFirst()
 {
-	SendIPC(QString("eseed %1").arg(m_seed.c_str()).toLatin1());
-	SendIPC(QString("e$template_filter %1").arg(templateFilter).toLatin1());
-	SendIPC("!");
+    SendIPC(QString("eseed %1").arg(m_seed.c_str()).toLatin1());
+    SendIPC(QString("e$template_filter %1").arg(templateFilter).toLatin1());
+    SendIPC("!");
 }
--- a/QTfrontend/igbox.cpp	Sat Mar 06 10:54:24 2010 +0000
+++ b/QTfrontend/igbox.cpp	Sat Mar 06 10:59:20 2010 +0000
@@ -27,50 +27,50 @@
 {
 // Has issues with border-radius on children
 //    setAttribute(Qt::WA_PaintOnScreen, true);
-	titleLeftPadding = 82;
+    titleLeftPadding = 82;
     contentTopPadding = 22;
 }
 
 void IconedGroupBox::setIcon(const QIcon & icon)
 {
-	if (this->icon.isNull())
-		setStyleSheet(QString(
-			"IconedGroupBox{"
-				"margin-top: 46px;"
-				"margin-left: 12px;"
+    if (this->icon.isNull())
+        setStyleSheet(QString(
+            "IconedGroupBox{"
+                "margin-top: 46px;"
+                "margin-left: 12px;"
                 "padding: %1px 2px 5px 2px;"
-				"}"
-			"IconedGroupBox::title{"
-				"subcontrol-origin: margin;"
-				"subcontrol-position: top left;"
-				"padding-left: %2px;"
-				"padding-top: 25px;"
-				"text-align: left;"
-				"}"
-				).arg(contentTopPadding).arg(titleLeftPadding)
-		);
+                "}"
+            "IconedGroupBox::title{"
+                "subcontrol-origin: margin;"
+                "subcontrol-position: top left;"
+                "padding-left: %2px;"
+                "padding-top: 25px;"
+                "text-align: left;"
+                "}"
+                ).arg(contentTopPadding).arg(titleLeftPadding)
+        );
 
-	this->icon = icon;
-	repaint();
+    this->icon = icon;
+    repaint();
 }
 
 void IconedGroupBox::paintEvent(QPaintEvent * event)
 {
-	QStylePainter painter(this);
+    QStylePainter painter(this);
 
-	QStyleOptionGroupBox option;
-	initStyleOption(&option);
-	painter.drawComplexControl(QStyle::CC_GroupBox, option);
+    QStyleOptionGroupBox option;
+    initStyleOption(&option);
+    painter.drawComplexControl(QStyle::CC_GroupBox, option);
 
-	icon.paint(&painter, QRect(QPoint(0, 0), icon.actualSize(size())));
+    icon.paint(&painter, QRect(QPoint(0, 0), icon.actualSize(size())));
 }
 
 void IconedGroupBox::setTitleTextPadding(int px)
 {
-	titleLeftPadding = px;
+    titleLeftPadding = px;
 }
 
 void IconedGroupBox::setContentTopPadding(int px)
 {
-	contentTopPadding = px;
+    contentTopPadding = px;
 }
--- a/QTfrontend/igbox.h	Sat Mar 06 10:54:24 2010 +0000
+++ b/QTfrontend/igbox.h	Sat Mar 06 10:59:20 2010 +0000
@@ -24,21 +24,21 @@
 
 class IconedGroupBox : public QGroupBox
 {
-	Q_OBJECT
+    Q_OBJECT
 
 public:
-	IconedGroupBox(QWidget * parent = 0);
+    IconedGroupBox(QWidget * parent = 0);
 
-	void setIcon(const QIcon & icon);
-	void setTitleTextPadding(int px);
-	void setContentTopPadding(int px);
+    void setIcon(const QIcon & icon);
+    void setTitleTextPadding(int px);
+    void setContentTopPadding(int px);
 protected:
-	virtual void paintEvent(QPaintEvent * event);
+    virtual void paintEvent(QPaintEvent * event);
 
 private:
-	QIcon icon;
-	int titleLeftPadding;
-	int contentTopPadding;
+    QIcon icon;
+    int titleLeftPadding;
+    int contentTopPadding;
 };
 
 #endif // _IGBOX_H
--- a/QTfrontend/input_ip.cpp	Sat Mar 06 10:54:24 2010 +0000
+++ b/QTfrontend/input_ip.cpp	Sat Mar 06 10:59:20 2010 +0000
@@ -26,43 +26,43 @@
 
 HWHostPortDialog::HWHostPortDialog(QWidget* parent) : QDialog(parent)
 {
-	QGridLayout * layout = new QGridLayout(this);
+    QGridLayout * layout = new QGridLayout(this);
 
-	QLabel * lbHost = new QLabel(this);
-	lbHost->setText(QLabel::tr("Host:"));
-	layout->addWidget(lbHost, 0, 0);
+    QLabel * lbHost = new QLabel(this);
+    lbHost->setText(QLabel::tr("Host:"));
+    layout->addWidget(lbHost, 0, 0);
 
-	QLabel * lbPort = new QLabel(this);
-	lbPort->setText(QLabel::tr("Port:"));
-	layout->addWidget(lbPort, 1, 0);
+    QLabel * lbPort = new QLabel(this);
+    lbPort->setText(QLabel::tr("Port:"));
+    layout->addWidget(lbPort, 1, 0);
 
-	leHost = new QLineEdit(this);
-	layout->addWidget(leHost, 0, 1, 1, 2);
+    leHost = new QLineEdit(this);
+    layout->addWidget(leHost, 0, 1, 1, 2);
 
-	sbPort = new QSpinBox(this);
-	sbPort->setMinimum(0);
-	sbPort->setMaximum(65535);
-	layout->addWidget(sbPort, 1, 1, 1, 2);
+    sbPort = new QSpinBox(this);
+    sbPort->setMinimum(0);
+    sbPort->setMaximum(65535);
+    layout->addWidget(sbPort, 1, 1, 1, 2);
 
-	pbDefault = new QPushButton(this);
-	pbDefault->setText(QPushButton::tr("default"));
-	layout->addWidget(pbDefault, 1, 3);
+    pbDefault = new QPushButton(this);
+    pbDefault->setText(QPushButton::tr("default"));
+    layout->addWidget(pbDefault, 1, 3);
 
-	pbOK = new QPushButton(this);
-	pbOK->setText(QPushButton::tr("OK"));
-	pbOK->setDefault(true);
-	layout->addWidget(pbOK, 3, 1);
+    pbOK = new QPushButton(this);
+    pbOK->setText(QPushButton::tr("OK"));
+    pbOK->setDefault(true);
+    layout->addWidget(pbOK, 3, 1);
 
-	pbCancel = new QPushButton(this);
-	pbCancel->setText(QPushButton::tr("Cancel"));
-	layout->addWidget(pbCancel, 3, 2);
+    pbCancel = new QPushButton(this);
+    pbCancel->setText(QPushButton::tr("Cancel"));
+    layout->addWidget(pbCancel, 3, 2);
 
-	connect(pbOK, SIGNAL(clicked()), this, SLOT(accept()));
-	connect(pbCancel, SIGNAL(clicked()), this, SLOT(reject()));
-	connect(pbDefault, SIGNAL(clicked()), this, SLOT(setDefaultPort()));
+    connect(pbOK, SIGNAL(clicked()), this, SLOT(accept()));
+    connect(pbCancel, SIGNAL(clicked()), this, SLOT(reject()));
+    connect(pbDefault, SIGNAL(clicked()), this, SLOT(setDefaultPort()));
 }
 
 void HWHostPortDialog::setDefaultPort()
 {
-	sbPort->setValue(46631);
+    sbPort->setValue(46631);
 }
--- a/QTfrontend/input_ip.h	Sat Mar 06 10:54:24 2010 +0000
+++ b/QTfrontend/input_ip.h	Sat Mar 06 10:59:20 2010 +0000
@@ -29,20 +29,20 @@
 
 class HWHostPortDialog : public QDialog
 {
-	Q_OBJECT
+    Q_OBJECT
 public:
-	HWHostPortDialog(QWidget* parent = 0);
+    HWHostPortDialog(QWidget* parent = 0);
 
-	QLineEdit* leHost;
-	QSpinBox* sbPort;
+    QLineEdit* leHost;
+    QSpinBox* sbPort;
 
 private:
-	QPushButton* pbOK;
-	QPushButton* pbCancel;
-	QPushButton * pbDefault;
+    QPushButton* pbOK;
+    QPushButton* pbCancel;
+    QPushButton * pbDefault;
 
 private slots:
-	void setDefaultPort();
+    void setDefaultPort();
 };
 
 
--- a/QTfrontend/main.cpp	Sat Mar 06 10:54:24 2010 +0000
+++ b/QTfrontend/main.cpp	Sat Mar 06 10:59:20 2010 +0000
@@ -30,17 +30,17 @@
 
 bool checkForDir(const QString & dir)
 {
-	QDir tmpdir;
-	if (!tmpdir.exists(dir))
-		if (!tmpdir.mkdir(dir))
-		{
-			QMessageBox::critical(0,
-					QObject::tr("Error"),
-					QObject::tr("Cannot create directory %1").arg(dir),
-					QObject::tr("OK"));
-			return false;
-		}
-	return true;
+    QDir tmpdir;
+    if (!tmpdir.exists(dir))
+        if (!tmpdir.mkdir(dir))
+        {
+            QMessageBox::critical(0,
+                    QObject::tr("Error"),
+                    QObject::tr("Cannot create directory %1").arg(dir),
+                    QObject::tr("OK"));
+            return false;
+        }
+    return true;
 }
 
 int main(int argc, char *argv[]) {        
@@ -76,103 +76,103 @@
         *cConfigDir = f.absoluteFilePath();
     }
 
-	app.setStyle(new QPlastiqueStyle);
+    app.setStyle(new QPlastiqueStyle);
 
-	QDateTime now = QDateTime::currentDateTime();
-	srand(now.toTime_t());
-	rand();
+    QDateTime now = QDateTime::currentDateTime();
+    srand(now.toTime_t());
+    rand();
 
-	Q_INIT_RESOURCE(hedgewars);
+    Q_INIT_RESOURCE(hedgewars);
 
-	qApp->setStyleSheet
-		(QString(
-			"HWForm,QDialog{"
-				"background-image: url(\":/res/Background.png\");"
-				"background-position: bottom center;"
-				"background-repeat: repeat-x;"
-				"background-color: #141250;"
-				"}"
+    qApp->setStyleSheet
+        (QString(
+            "HWForm,QDialog{"
+                "background-image: url(\":/res/Background.png\");"
+                "background-position: bottom center;"
+                "background-repeat: repeat-x;"
+                "background-color: #141250;"
+                "}"
 
-			"* {"
-				"color: #ffcc00;"
-				"selection-background-color: #ffcc00;"
-				"selection-color: #00351d;"
-			"}"
+            "* {"
+                "color: #ffcc00;"
+                "selection-background-color: #ffcc00;"
+                "selection-color: #00351d;"
+            "}"
 
-			"QLineEdit, QListWidget, QTableView, QTextBrowser, QSpinBox, QComboBox, "
+            "QLineEdit, QListWidget, QTableView, QTextBrowser, QSpinBox, QComboBox, "
             "QComboBox QAbstractItemView, QMenu::item {"
-				"background-color: rgba(13, 5, 68, 70%);"
-			"}"
+                "background-color: rgba(13, 5, 68, 70%);"
+            "}"
 
-			"QPushButton, QListWidget, QTableView, QLineEdit, QHeaderView, "
-			"QTextBrowser, QSpinBox, QToolBox, QComboBox, "
+            "QPushButton, QListWidget, QTableView, QLineEdit, QHeaderView, "
+            "QTextBrowser, QSpinBox, QToolBox, QComboBox, "
             "QComboBox QAbstractItemView, IconedGroupBox, "
-			".QGroupBox, GameCFGWidget, TeamSelWidget, SelWeaponWidget, "
+            ".QGroupBox, GameCFGWidget, TeamSelWidget, SelWeaponWidget, "
             "QTabWidget::pane, QTabBar::tab {"
-				"border: solid;"
-				"border-width: 3px;"
-				"border-color: #ffcc00;"
-			"}"
+                "border: solid;"
+                "border-width: 3px;"
+                "border-color: #ffcc00;"
+            "}"
 
-			"QPushButton:hover, QLineEdit:hover, QListWidget:hover, "
-			"QSpinBox:hover, QToolBox:hover, QComboBox:hover {"
-			    "border-color: yellow;"
-			"}"
+            "QPushButton:hover, QLineEdit:hover, QListWidget:hover, "
+            "QSpinBox:hover, QToolBox:hover, QComboBox:hover {"
+                "border-color: yellow;"
+            "}"
 
-			"QLineEdit, QListWidget,QTableView, QTextBrowser, "
-			"QSpinBox, QToolBox { "
-				"border-radius: 12px;"
-			"}"
+            "QLineEdit, QListWidget,QTableView, QTextBrowser, "
+            "QSpinBox, QToolBox { "
+                "border-radius: 12px;"
+            "}"
 
-			"QLineEdit, QLabel, QHeaderView, QListWidget, QTableView, "
-			"QSpinBox, QToolBox::tab, QComboBox, QComboBox QAbstractItemView, "
-			"IconedGroupBox, .QGroupBox, GameCFGWidget, TeamSelWidget, "
+            "QLineEdit, QLabel, QHeaderView, QListWidget, QTableView, "
+            "QSpinBox, QToolBox::tab, QComboBox, QComboBox QAbstractItemView, "
+            "IconedGroupBox, .QGroupBox, GameCFGWidget, TeamSelWidget, "
             "SelWeaponWidget, QCheckBox, QRadioButton {"
-				"font: bold 14px;"
-			"}"
+                "font: bold 14px;"
+            "}"
             "SelWeaponWidget QTabWidget::pane, SelWeaponWidget QTabBar::tab:selected {"
-				"background-position: bottom center;"
-				"background-repeat: repeat-x;"
-				"background-color: #000000;"
-			"}"
-			".QGroupBox,GameCFGWidget,TeamSelWidget,SelWeaponWidget {"
-				"background-position: bottom center;"
-				"background-repeat: repeat-x;"
-				"border-radius: 16px;"
-				"background-color: rgba(13, 5, 68, 70%);"
-				"padding: 6px;"
-			"}"
+                "background-position: bottom center;"
+                "background-repeat: repeat-x;"
+                "background-color: #000000;"
+            "}"
+            ".QGroupBox,GameCFGWidget,TeamSelWidget,SelWeaponWidget {"
+                "background-position: bottom center;"
+                "background-repeat: repeat-x;"
+                "border-radius: 16px;"
+                "background-color: rgba(13, 5, 68, 70%);"
+                "padding: 6px;"
+            "}"
 /*  Experimenting with PaintOnScreen and border-radius on IconedGroupBox children didn't work out well
-			"IconedGroupBox QComboBox, IconedGroupBox QPushButton, IconedGroupBox QLineEdit, "
+            "IconedGroupBox QComboBox, IconedGroupBox QPushButton, IconedGroupBox QLineEdit, "
             "IconedGroupBox QSpinBox {"
-				"border-radius: 0;"
-			"}"
-			"IconedGroupBox, IconedGroupBox *, QTabWidget::pane, QTabBar::tab:selected, QToolBox::tab QWidget{" */
-			"IconedGroupBox, QTabWidget::pane, QTabBar::tab:selected, QToolBox::tab QWidget{"
-				"background-color: #130f2c;"
-			"}"
+                "border-radius: 0;"
+            "}"
+            "IconedGroupBox, IconedGroupBox *, QTabWidget::pane, QTabBar::tab:selected, QToolBox::tab QWidget{" */
+            "IconedGroupBox, QTabWidget::pane, QTabBar::tab:selected, QToolBox::tab QWidget{"
+                "background-color: #130f2c;"
+            "}"
 
 
-			"QPushButton {"
-				"border-radius: 10px;"
-				"background-origin: margin;"
-				"background-position: top left;"
-				"background-color: rgba(18, 42, 5, 70%);"
-			"}"
+            "QPushButton {"
+                "border-radius: 10px;"
+                "background-origin: margin;"
+                "background-position: top left;"
+                "background-color: rgba(18, 42, 5, 70%);"
+            "}"
 
-			"QPushButton:pressed{"
-			    "border-color: white;"
-			"}"
+            "QPushButton:pressed{"
+                "border-color: white;"
+            "}"
 
-			"QHeaderView {"
-				"border-radius: 0;"
-				"border-width: 0;"
-				"border-bottom-width: 3px;"
-				"background-color: #00351d;"
-			"}"
-			"QTableView {"
-				"alternate-background-color: #2f213a;"
-			"}"
+            "QHeaderView {"
+                "border-radius: 0;"
+                "border-width: 0;"
+                "border-bottom-width: 3px;"
+                "background-color: #00351d;"
+            "}"
+            "QTableView {"
+                "alternate-background-color: #2f213a;"
+            "}"
 
             "QTabBar::tab {"
                  "border-bottom-width: 0;"
@@ -185,189 +185,189 @@
                  "color: #0d0544;"
                  "background-color: #ffcc00;"
             "}"
-			"QSpinBox::up-button{"
-				"background: transparent;"
-				"width: 16px;"
-				"height: 10px;"
-			"}"
+            "QSpinBox::up-button{"
+                "background: transparent;"
+                "width: 16px;"
+                "height: 10px;"
+            "}"
 
-			"QSpinBox::up-arrow {"
-				"image: url(\":/res/spin_up.png\");"
-			"}"
+            "QSpinBox::up-arrow {"
+                "image: url(\":/res/spin_up.png\");"
+            "}"
 
-			"QSpinBox::down-arrow {"
-				"image: url(\":/res/spin_down.png\");"
-			"}"
+            "QSpinBox::down-arrow {"
+                "image: url(\":/res/spin_down.png\");"
+            "}"
 
-			"QSpinBox::down-button {"
-				"background: transparent;"
-				"width: 16px;"
-				"height: 10px;"
-			"}"
+            "QSpinBox::down-button {"
+                "background: transparent;"
+                "width: 16px;"
+                "height: 10px;"
+            "}"
 
-			"QComboBox {"
-				"border-radius: 15px;"
-				"padding: 3px;"
-			"}"
-			"QComboBox:pressed{"
-				"border-color: white;"
-			"}"
-			"QComboBox::drop-down{"
-				"border: transparent;"
-				"width: 25px;"
-			"}"
-			"QComboBox::down-arrow {"
-				"image: url(\":/res/dropdown.png\");"
-			"}"
+            "QComboBox {"
+                "border-radius: 15px;"
+                "padding: 3px;"
+            "}"
+            "QComboBox:pressed{"
+                "border-color: white;"
+            "}"
+            "QComboBox::drop-down{"
+                "border: transparent;"
+                "width: 25px;"
+            "}"
+            "QComboBox::down-arrow {"
+                "image: url(\":/res/dropdown.png\");"
+            "}"
 
-			"VertScrArea {"
-				"background-position: bottom center;"
-				"background-repeat: repeat-x;"
-			"}"
+            "VertScrArea {"
+                "background-position: bottom center;"
+                "background-repeat: repeat-x;"
+            "}"
 
-			"IconedGroupBox {"
-				"border-radius: 16px;"
-				"padding: 2px;"
-			"}"
+            "IconedGroupBox {"
+                "border-radius: 16px;"
+                "padding: 2px;"
+            "}"
 
-			"QGroupBox::title{"
-				"subcontrol-origin: margin;"
-				"subcontrol-position: top left;"
-				"text-align: left;"
-				"}"
+            "QGroupBox::title{"
+                "subcontrol-origin: margin;"
+                "subcontrol-position: top left;"
+                "text-align: left;"
+                "}"
 
-			"QCheckBox::indicator:checked{"
-				"image: url(\":/res/checked.png\");"
-				"}"
-			"QCheckBox::indicator:unchecked{"
-				"image: url(\":/res/unchecked.png\");"
-				"}"
+            "QCheckBox::indicator:checked{"
+                "image: url(\":/res/checked.png\");"
+                "}"
+            "QCheckBox::indicator:unchecked{"
+                "image: url(\":/res/unchecked.png\");"
+                "}"
 
-			".QWidget{"
-				"background: transparent;"
-				"}"
+            ".QWidget{"
+                "background: transparent;"
+                "}"
 
-			"QTabWidget::pane {"
+            "QTabWidget::pane {"
                 "border-top-width: 2px;"
-			"}"
+            "}"
 
-			"QMenu{"
-				"background-color: #ffcc00;"
-				"margin: 3px;"
-			"}"
-			"QMenu::item {"
-				"background-color: #0d0544;"
-				"border: 1px solid transparent;"
-				"font: bold;"
-				"padding: 2px 25px 2px 20px;"
-			"}"
-			"QMenu::item:selected {"
-				"background-color: #2d2564;"
-			"}"
-			"QMenu::indicator {"
-				"width: 16px;"
-				"height: 16px;"
-			"}"
-			"QMenu::indicator:non-exclusive:checked{"
-				"image: url(\":/res/checked.png\");"
-			"}"
-			"QMenu::indicator:non-exclusive:unchecked{"
-				"image: url(\":/res/unchecked.png\");"
-			"}"
+            "QMenu{"
+                "background-color: #ffcc00;"
+                "margin: 3px;"
+            "}"
+            "QMenu::item {"
+                "background-color: #0d0544;"
+                "border: 1px solid transparent;"
+                "font: bold;"
+                "padding: 2px 25px 2px 20px;"
+            "}"
+            "QMenu::item:selected {"
+                "background-color: #2d2564;"
+            "}"
+            "QMenu::indicator {"
+                "width: 16px;"
+                "height: 16px;"
+            "}"
+            "QMenu::indicator:non-exclusive:checked{"
+                "image: url(\":/res/checked.png\");"
+            "}"
+            "QMenu::indicator:non-exclusive:unchecked{"
+                "image: url(\":/res/unchecked.png\");"
+            "}"
 
-			"QToolTip{"
-				"background-color: #0d0544;"
-			"}"
+            "QToolTip{"
+                "background-color: #0d0544;"
+            "}"
 
-			":disabled{"
-				"color: #a0a0a0;"
-			"}"
+            ":disabled{"
+                "color: #a0a0a0;"
+            "}"
             "SquareLabel, ItemNum {"
-				"background-color: #000000;"
-			"}"
-			)
-		);
+                "background-color: #000000;"
+            "}"
+            )
+        );
 
-	bindir->cd("bin"); // workaround over NSIS installer
+    bindir->cd("bin"); // workaround over NSIS installer
 
-	if(cConfigDir->length() == 0)
-		cfgdir->setPath(cfgdir->homePath());
-	else
-		cfgdir->setPath(*cConfigDir);
+    if(cConfigDir->length() == 0)
+        cfgdir->setPath(cfgdir->homePath());
+    else
+        cfgdir->setPath(*cConfigDir);
 
-	if(cConfigDir->length() == 0)
-	{
+    if(cConfigDir->length() == 0)
+    {
 #ifdef __APPLE__
-		if (checkForDir(cfgdir->absolutePath() + "/Library/Application Support/Hedgewars"))
-		{
-			checkForDir(cfgdir->absolutePath() + "/Library/Application Support/Hedgewars/Demos");
-			checkForDir(cfgdir->absolutePath() + "/Library/Application Support/Hedgewars/Saves");
-		}
-		cfgdir->cd("Library/Application Support/Hedgewars");
+        if (checkForDir(cfgdir->absolutePath() + "/Library/Application Support/Hedgewars"))
+        {
+            checkForDir(cfgdir->absolutePath() + "/Library/Application Support/Hedgewars/Demos");
+            checkForDir(cfgdir->absolutePath() + "/Library/Application Support/Hedgewars/Saves");
+        }
+        cfgdir->cd("Library/Application Support/Hedgewars");
 #else
-		if (checkForDir(cfgdir->absolutePath() + "/.hedgewars"))
-		{
-			checkForDir(cfgdir->absolutePath() + "/.hedgewars/Demos");
-			checkForDir(cfgdir->absolutePath() + "/.hedgewars/Saves");
-		}
-		cfgdir->cd(".hedgewars");
+        if (checkForDir(cfgdir->absolutePath() + "/.hedgewars"))
+        {
+            checkForDir(cfgdir->absolutePath() + "/.hedgewars/Demos");
+            checkForDir(cfgdir->absolutePath() + "/.hedgewars/Saves");
+        }
+        cfgdir->cd(".hedgewars");
 #endif
-	}
-	else
-	{
-		if (checkForDir(cfgdir->absolutePath()))
-		{
-			checkForDir(cfgdir->absolutePath() + "/Demos");
-			checkForDir(cfgdir->absolutePath() + "/Saves");
-		}
-	}
+    }
+    else
+    {
+        if (checkForDir(cfgdir->absolutePath()))
+        {
+            checkForDir(cfgdir->absolutePath() + "/Demos");
+            checkForDir(cfgdir->absolutePath() + "/Saves");
+        }
+    }
 
 
-	datadir->cd(bindir->absolutePath());
-	datadir->cd(*cDataDir);
-	if(!datadir->cd("hedgewars/Data")) {
-		QMessageBox::critical(0, QMessageBox::tr("Error"),
-			QMessageBox::tr("Failed to open data directory:\n%1\n"
-					"Please check your installation").
-					arg(datadir->absolutePath()+"/hedgewars/Data"));
-		return 1;
-	}
+    datadir->cd(bindir->absolutePath());
+    datadir->cd(*cDataDir);
+    if(!datadir->cd("hedgewars/Data")) {
+        QMessageBox::critical(0, QMessageBox::tr("Error"),
+            QMessageBox::tr("Failed to open data directory:\n%1\n"
+                    "Please check your installation").
+                    arg(datadir->absolutePath()+"/hedgewars/Data"));
+        return 1;
+    }
 
-	Themes = new QStringList();
-	QFile themesfile(datadir->absolutePath() + "/Themes/themes.cfg");
-	if (themesfile.open(QIODevice::ReadOnly)) {
-		QTextStream stream(&themesfile);
-		QString str;
-		while (!stream.atEnd())
-		{
-			Themes->append(stream.readLine());
-		}
-		themesfile.close();
-	} else {
-		QMessageBox::critical(0, "Error", "Cannot access themes.cfg", "OK");
-	}
+    Themes = new QStringList();
+    QFile themesfile(datadir->absolutePath() + "/Themes/themes.cfg");
+    if (themesfile.open(QIODevice::ReadOnly)) {
+        QTextStream stream(&themesfile);
+        QString str;
+        while (!stream.atEnd())
+        {
+            Themes->append(stream.readLine());
+        }
+        themesfile.close();
+    } else {
+        QMessageBox::critical(0, "Error", "Cannot access themes.cfg", "OK");
+    }
 
-	QDir tmpdir;
-	tmpdir.cd(datadir->absolutePath());
-	tmpdir.cd("Maps");
-	tmpdir.setFilter(QDir::Dirs | QDir::NoDotAndDotDot);
-	mapList = new QStringList(tmpdir.entryList(QStringList("*")));
+    QDir tmpdir;
+    tmpdir.cd(datadir->absolutePath());
+    tmpdir.cd("Maps");
+    tmpdir.setFilter(QDir::Dirs | QDir::NoDotAndDotDot);
+    mapList = new QStringList(tmpdir.entryList(QStringList("*")));
 
 
-	QTranslator Translator;
-	{
-		QSettings settings(cfgdir->absolutePath() + "/hedgewars.ini", QSettings::IniFormat);
-		QString cc = settings.value("misc/locale", "").toString();
-		if(!cc.compare(""))
-			cc = QLocale::system().name();
-		Translator.load(datadir->absolutePath() + "/Locale/hedgewars_" + cc);
-		app.installTranslator(&Translator);
-	}
+    QTranslator Translator;
+    {
+        QSettings settings(cfgdir->absolutePath() + "/hedgewars.ini", QSettings::IniFormat);
+        QString cc = settings.value("misc/locale", "").toString();
+        if(!cc.compare(""))
+            cc = QLocale::system().name();
+        Translator.load(datadir->absolutePath() + "/Locale/hedgewars_" + cc);
+        app.installTranslator(&Translator);
+    }
 
 
-	HWForm *Form = new HWForm();
+    HWForm *Form = new HWForm();
 
 
-	Form->show();
-	return app.exec();
+    Form->show();
+    return app.exec();
 }
--- a/QTfrontend/mapContainer.cpp	Sat Mar 06 10:54:24 2010 +0000
+++ b/QTfrontend/mapContainer.cpp	Sat Mar 06 10:59:20 2010 +0000
@@ -35,139 +35,139 @@
 #include "igbox.h"
 
 HWMapContainer::HWMapContainer(QWidget * parent) :
-	QWidget(parent),
-	mainLayout(this),
-	pMap(0)
+    QWidget(parent),
+    mainLayout(this),
+    pMap(0)
 {
-	hhSmall.load(":/res/hh_small.png");
-	hhLimit = 18;
+    hhSmall.load(":/res/hh_small.png");
+    hhLimit = 18;
     templateFilter = 0;
 
-	mainLayout.setContentsMargins(QApplication::style()->pixelMetric(QStyle::PM_LayoutLeftMargin),
-		1,
-		QApplication::style()->pixelMetric(QStyle::PM_LayoutRightMargin),
-		QApplication::style()->pixelMetric(QStyle::PM_LayoutBottomMargin));
+    mainLayout.setContentsMargins(QApplication::style()->pixelMetric(QStyle::PM_LayoutLeftMargin),
+        1,
+        QApplication::style()->pixelMetric(QStyle::PM_LayoutRightMargin),
+        QApplication::style()->pixelMetric(QStyle::PM_LayoutBottomMargin));
 
-	imageButt = new QPushButton(this);
-	imageButt->setObjectName("imageButt");
-	imageButt->setFixedSize(256 + 6, 128 + 6);
-	imageButt->setFlat(true);
-	imageButt->setSizePolicy(QSizePolicy::Fixed, QSizePolicy::Fixed);//QSizePolicy::Minimum, QSizePolicy::Minimum);
-	mainLayout.addWidget(imageButt, 0, 0, 1, 2);
-	connect(imageButt, SIGNAL(clicked()), this, SLOT(setRandomSeed()));
-	connect(imageButt, SIGNAL(clicked()), this, SLOT(setRandomTheme()));
+    imageButt = new QPushButton(this);
+    imageButt->setObjectName("imageButt");
+    imageButt->setFixedSize(256 + 6, 128 + 6);
+    imageButt->setFlat(true);
+    imageButt->setSizePolicy(QSizePolicy::Fixed, QSizePolicy::Fixed);//QSizePolicy::Minimum, QSizePolicy::Minimum);
+    mainLayout.addWidget(imageButt, 0, 0, 1, 2);
+    connect(imageButt, SIGNAL(clicked()), this, SLOT(setRandomSeed()));
+    connect(imageButt, SIGNAL(clicked()), this, SLOT(setRandomTheme()));
 
-	chooseMap = new QComboBox(this);
-	chooseMap->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Fixed);
-	chooseMap->addItem(QComboBox::tr("generated map..."));
-	for (int i = 0; i < mapList->size(); ++i) {
-		QString map = (*mapList)[i];
-		QFile mapCfgFile(
-				QString("%1/Maps/%2/map.cfg")
-				.arg(datadir->absolutePath())
-				.arg(map));
+    chooseMap = new QComboBox(this);
+    chooseMap->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Fixed);
+    chooseMap->addItem(QComboBox::tr("generated map..."));
+    for (int i = 0; i < mapList->size(); ++i) {
+        QString map = (*mapList)[i];
+        QFile mapCfgFile(
+                QString("%1/Maps/%2/map.cfg")
+                .arg(datadir->absolutePath())
+                .arg(map));
 
-		if (mapCfgFile.open(QFile::ReadOnly)) {
-			QString theme;
-			quint32 limit = 0;
-			QList<QVariant> mapInfo;
-			QTextStream input(&mapCfgFile);
-			input >> theme;
-			input >> limit;
-			mapInfo.push_back(theme);
-			if (limit)
-				mapInfo.push_back(limit);
-			else
-				mapInfo.push_back(18);
-			chooseMap->addItem(map, mapInfo);
-			mapCfgFile.close();
-		}
-	}
+        if (mapCfgFile.open(QFile::ReadOnly)) {
+            QString theme;
+            quint32 limit = 0;
+            QList<QVariant> mapInfo;
+            QTextStream input(&mapCfgFile);
+            input >> theme;
+            input >> limit;
+            mapInfo.push_back(theme);
+            if (limit)
+                mapInfo.push_back(limit);
+            else
+                mapInfo.push_back(18);
+            chooseMap->addItem(map, mapInfo);
+            mapCfgFile.close();
+        }
+    }
 
-	connect(chooseMap, SIGNAL(currentIndexChanged(int)), this, SLOT(mapChanged(int)));
-	mainLayout.addWidget(chooseMap, 1, 1);
+    connect(chooseMap, SIGNAL(currentIndexChanged(int)), this, SLOT(mapChanged(int)));
+    mainLayout.addWidget(chooseMap, 1, 1);
 
-	QLabel * lblMap = new QLabel(tr("Map"), this);
-	mainLayout.addWidget(lblMap, 1, 0);
+    QLabel * lblMap = new QLabel(tr("Map"), this);
+    mainLayout.addWidget(lblMap, 1, 0);
 
-	lblFilter = new QLabel(tr("Filter"), this);
-	mainLayout.addWidget(lblFilter, 2, 0);
+    lblFilter = new QLabel(tr("Filter"), this);
+    mainLayout.addWidget(lblFilter, 2, 0);
 
-	CB_TemplateFilter = new QComboBox(this);
+    CB_TemplateFilter = new QComboBox(this);
     CB_TemplateFilter->addItem(tr("All"), 0);
     CB_TemplateFilter->addItem(tr("Small"), 1);
     CB_TemplateFilter->addItem(tr("Medium"), 2);
     CB_TemplateFilter->addItem(tr("Large"), 3);
     CB_TemplateFilter->addItem(tr("Cavern"), 4);
     CB_TemplateFilter->addItem(tr("Wacky"), 5);
-	mainLayout.addWidget(CB_TemplateFilter, 2, 1);
+    mainLayout.addWidget(CB_TemplateFilter, 2, 1);
 
-	connect(CB_TemplateFilter, SIGNAL(currentIndexChanged(int)), this, SLOT(templateFilterChanged(int)));
+    connect(CB_TemplateFilter, SIGNAL(currentIndexChanged(int)), this, SLOT(templateFilterChanged(int)));
 
-	gbThemes = new IconedGroupBox(this);
-	gbThemes->setTitleTextPadding(60);
-	gbThemes->setContentTopPadding(6);
-	gbThemes->setTitle(tr("Themes"));
+    gbThemes = new IconedGroupBox(this);
+    gbThemes->setTitleTextPadding(60);
+    gbThemes->setContentTopPadding(6);
+    gbThemes->setTitle(tr("Themes"));
 
-	//gbThemes->setStyleSheet("padding: 0px"); // doesn't work - stylesheet is set with icon
-	mainLayout.addWidget(gbThemes, 0, 2, 3, 1);
+    //gbThemes->setStyleSheet("padding: 0px"); // doesn't work - stylesheet is set with icon
+    mainLayout.addWidget(gbThemes, 0, 2, 3, 1);
 
-	QVBoxLayout * gbTLayout = new QVBoxLayout(gbThemes);
-	gbTLayout->setContentsMargins(0, 0, 0 ,0);
-	gbTLayout->setSpacing(0);
-	lwThemes = new QListWidget(this);
-	lwThemes->setMinimumHeight(30);
-	lwThemes->setFixedWidth(120);
-	for (int i = 0; i < Themes->size(); ++i) {
-		QListWidgetItem * lwi = new QListWidgetItem();
-		lwi->setText(Themes->at(i));
-		lwi->setTextAlignment(Qt::AlignHCenter);
-		lwThemes->addItem(lwi);
-	}
-	connect(lwThemes, SIGNAL(currentRowChanged(int)), this, SLOT(themeSelected(int)));
+    QVBoxLayout * gbTLayout = new QVBoxLayout(gbThemes);
+    gbTLayout->setContentsMargins(0, 0, 0 ,0);
+    gbTLayout->setSpacing(0);
+    lwThemes = new QListWidget(this);
+    lwThemes->setMinimumHeight(30);
+    lwThemes->setFixedWidth(120);
+    for (int i = 0; i < Themes->size(); ++i) {
+        QListWidgetItem * lwi = new QListWidgetItem();
+        lwi->setText(Themes->at(i));
+        lwi->setTextAlignment(Qt::AlignHCenter);
+        lwThemes->addItem(lwi);
+    }
+    connect(lwThemes, SIGNAL(currentRowChanged(int)), this, SLOT(themeSelected(int)));
 
     // override default style to tighten up theme scroller
-	lwThemes->setStyleSheet(QString(
-		"QListWidget{"
-			"border: solid;"
-			"border-width: 0px;"
-			"border-radius: 0px;"
-			"border-color: transparent;"
-			"background-color: #0d0544;"
-			"color: #ffcc00;"
-			"font: bold 14px;"
-			"}"
-		)
-	);
+    lwThemes->setStyleSheet(QString(
+        "QListWidget{"
+            "border: solid;"
+            "border-width: 0px;"
+            "border-radius: 0px;"
+            "border-color: transparent;"
+            "background-color: #0d0544;"
+            "color: #ffcc00;"
+            "font: bold 14px;"
+            "}"
+        )
+    );
 
-	gbTLayout->addWidget(lwThemes);
-	lwThemes->setSizePolicy(QSizePolicy::Maximum, QSizePolicy::Minimum);
+    gbTLayout->addWidget(lwThemes);
+    lwThemes->setSizePolicy(QSizePolicy::Maximum, QSizePolicy::Minimum);
 
-	mainLayout.setSizeConstraint(QLayout::SetFixedSize);//SetMinimumSize
+    mainLayout.setSizeConstraint(QLayout::SetFixedSize);//SetMinimumSize
 
-	setRandomSeed();
-	setRandomTheme();
+    setRandomSeed();
+    setRandomTheme();
 }
 
 void HWMapContainer::setImage(const QImage newImage)
 {
-	QPixmap px(256, 128);
-	QPixmap pxres(256, 128);
-	QPainter p(&pxres);
+    QPixmap px(256, 128);
+    QPixmap pxres(256, 128);
+    QPainter p(&pxres);
 
-	px.fill(Qt::yellow);
-	QBitmap bm = QBitmap::fromImage(newImage);
-	px.setMask(bm);
+    px.fill(Qt::yellow);
+    QBitmap bm = QBitmap::fromImage(newImage);
+    px.setMask(bm);
 
-	QLinearGradient linearGrad(QPoint(128, 0), QPoint(128, 128));
-	linearGrad.setColorAt(1, QColor(0, 0, 192));
-	linearGrad.setColorAt(0, QColor(66, 115, 225));
-	p.fillRect(QRect(0, 0, 256, 128), linearGrad);
-	p.drawPixmap(QPoint(0, 0), px);
+    QLinearGradient linearGrad(QPoint(128, 0), QPoint(128, 128));
+    linearGrad.setColorAt(1, QColor(0, 0, 192));
+    linearGrad.setColorAt(0, QColor(66, 115, 225));
+    p.fillRect(QRect(0, 0, 256, 128), linearGrad);
+    p.drawPixmap(QPoint(0, 0), px);
 
     addInfoToPreview(pxres);
-	chooseMap->setCurrentIndex(0);
-	pMap = 0;
+    chooseMap->setCurrentIndex(0);
+    pMap = 0;
 }
 
 void HWMapContainer::setHHLimit(int newHHLimit)
@@ -177,31 +177,31 @@
 
 void HWMapContainer::mapChanged(int index)
 {
-	if(!index) {
-		changeImage();
-		gbThemes->show();
+    if(!index) {
+        changeImage();
+        gbThemes->show();
         lblFilter->show();
         CB_TemplateFilter->show();
-		emit mapChanged("+rnd+");
-		emit themeChanged(chooseMap->itemData(0).toList()[0].toString());
-	} else
-	{
-		loadMap(index);
-		gbThemes->hide();
+        emit mapChanged("+rnd+");
+        emit themeChanged(chooseMap->itemData(0).toList()[0].toString());
+    } else
+    {
+        loadMap(index);
+        gbThemes->hide();
         lblFilter->hide();
         CB_TemplateFilter->hide();
-		emit mapChanged(chooseMap->currentText());
-	}
+        emit mapChanged(chooseMap->currentText());
+    }
 }
 
 void HWMapContainer::loadMap(int index)
 {
-	QPixmap mapImage;
-	if(!mapImage.load(datadir->absolutePath() + "/Maps/" + chooseMap->currentText() + "/preview.png")) {
-		changeImage();
-		chooseMap->setCurrentIndex(0);
-		return;
-	}
+    QPixmap mapImage;
+    if(!mapImage.load(datadir->absolutePath() + "/Maps/" + chooseMap->currentText() + "/preview.png")) {
+        changeImage();
+        chooseMap->setCurrentIndex(0);
+        return;
+    }
 
     hhLimit = chooseMap->itemData(index).toList()[1].toInt();
     addInfoToPreview(mapImage);
@@ -210,73 +210,73 @@
 // Should this add text to identify map size?
 void HWMapContainer::addInfoToPreview(QPixmap image)
 {
-	QPixmap finalImage = QPixmap(image.size());
-	finalImage.fill(QColor(0, 0, 0, 0));
+    QPixmap finalImage = QPixmap(image.size());
+    finalImage.fill(QColor(0, 0, 0, 0));
 
-	QPainter p(&finalImage);
-	p.drawPixmap(image.rect(), image);
-	//p.setPen(QColor(0xf4,0x9e,0xe9));
-	p.setPen(QColor(0xff,0xcc,0x00));
-	p.setBrush(QColor(0, 0, 0));
-	p.drawRect(image.rect().width() - hhSmall.rect().width() - 28, 3, 40, 20);
-	p.setFont(QFont("MS Shell Dlg", 10));
-	p.drawText(image.rect().width() - hhSmall.rect().width() - 14 - (hhLimit > 9 ? 10 : 0), 18, QString::number(hhLimit));
-	p.drawPixmap(image.rect().width() - hhSmall.rect().width() - 5, 5, hhSmall.rect().width(), hhSmall.rect().height(), hhSmall);
+    QPainter p(&finalImage);
+    p.drawPixmap(image.rect(), image);
+    //p.setPen(QColor(0xf4,0x9e,0xe9));
+    p.setPen(QColor(0xff,0xcc,0x00));
+    p.setBrush(QColor(0, 0, 0));
+    p.drawRect(image.rect().width() - hhSmall.rect().width() - 28, 3, 40, 20);
+    p.setFont(QFont("MS Shell Dlg", 10));
+    p.drawText(image.rect().width() - hhSmall.rect().width() - 14 - (hhLimit > 9 ? 10 : 0), 18, QString::number(hhLimit));
+    p.drawPixmap(image.rect().width() - hhSmall.rect().width() - 5, 5, hhSmall.rect().width(), hhSmall.rect().height(), hhSmall);
 
-	imageButt->setIcon(finalImage);
-	imageButt->setIconSize(image.size());
+    imageButt->setIcon(finalImage);
+    imageButt->setIconSize(image.size());
 }
 
 void HWMapContainer::changeImage()
 {
-	if (pMap)
-	{
-		disconnect(pMap, 0, this, SLOT(setImage(const QImage)));
-		disconnect(pMap, 0, this, SLOT(setHHLimit(int)));
-		pMap = 0;
-	}
+    if (pMap)
+    {
+        disconnect(pMap, 0, this, SLOT(setImage(const QImage)));
+        disconnect(pMap, 0, this, SLOT(setHHLimit(int)));
+        pMap = 0;
+    }
 
-	pMap = new HWMap();
-	connect(pMap, SIGNAL(ImageReceived(const QImage)), this, SLOT(setImage(const QImage)));
-	connect(pMap, SIGNAL(HHLimitReceived(int)), this, SLOT(setHHLimit(int)));
-	pMap->getImage(m_seed.toStdString(), getTemplateFilter());
+    pMap = new HWMap();
+    connect(pMap, SIGNAL(ImageReceived(const QImage)), this, SLOT(setImage(const QImage)));
+    connect(pMap, SIGNAL(HHLimitReceived(int)), this, SLOT(setHHLimit(int)));
+    pMap->getImage(m_seed.toStdString(), getTemplateFilter());
 }
 
 void HWMapContainer::themeSelected(int currentRow)
 {
-	QString theme = Themes->at(currentRow);
-	QList<QVariant> mapInfo;
-	mapInfo.push_back(theme);
-	mapInfo.push_back(18);
-	chooseMap->setItemData(0, mapInfo);
-	gbThemes->setIcon(QIcon(QString("%1/Themes/%2/icon.png").arg(datadir->absolutePath()).arg(theme)));
-	emit themeChanged(theme);
+    QString theme = Themes->at(currentRow);
+    QList<QVariant> mapInfo;
+    mapInfo.push_back(theme);
+    mapInfo.push_back(18);
+    chooseMap->setItemData(0, mapInfo);
+    gbThemes->setIcon(QIcon(QString("%1/Themes/%2/icon.png").arg(datadir->absolutePath()).arg(theme)));
+    emit themeChanged(theme);
 }
 
 QString HWMapContainer::getCurrentSeed() const
 {
-	return m_seed;
+    return m_seed;
 }
 
 QString HWMapContainer::getCurrentMap() const
 {
-	if(!chooseMap->currentIndex()) return QString();
-	return chooseMap->currentText();
+    if(!chooseMap->currentIndex()) return QString();
+    return chooseMap->currentText();
 }
 
 QString HWMapContainer::getCurrentTheme() const
 {
-	return chooseMap->itemData(chooseMap->currentIndex()).toList()[0].toString();
+    return chooseMap->itemData(chooseMap->currentIndex()).toList()[0].toString();
 }
 
 int HWMapContainer::getCurrentHHLimit() const
 {
-	return hhLimit;
+    return hhLimit;
 }
 
 quint32 HWMapContainer::getTemplateFilter() const
 {
-	return CB_TemplateFilter->itemData(CB_TemplateFilter->currentIndex()).toInt();
+    return CB_TemplateFilter->itemData(CB_TemplateFilter->currentIndex()).toInt();
 }
 
 void HWMapContainer::resizeEvent ( QResizeEvent * event )
@@ -286,60 +286,60 @@
 
 void HWMapContainer::setSeed(const QString & seed)
 {
-	m_seed = seed;
-	changeImage();
+    m_seed = seed;
+    changeImage();
 }
 
 void HWMapContainer::setMap(const QString & map)
 {
-	if(map == "+rnd+")
-	{
-		changeImage();
-		return;
-	}
+    if(map == "+rnd+")
+    {
+        changeImage();
+        return;
+    }
 
-	int id = chooseMap->findText(map);
-	if(id > 0) {
-		if (pMap)
-		{
-			disconnect(pMap, 0, this, SLOT(setImage(const QImage)));
-			disconnect(pMap, 0, this, SLOT(setHHLimit(int)));
-			pMap = 0;
-		}
-		chooseMap->setCurrentIndex(id);
-		loadMap(id);
-	}
+    int id = chooseMap->findText(map);
+    if(id > 0) {
+        if (pMap)
+        {
+            disconnect(pMap, 0, this, SLOT(setImage(const QImage)));
+            disconnect(pMap, 0, this, SLOT(setHHLimit(int)));
+            pMap = 0;
+        }
+        chooseMap->setCurrentIndex(id);
+        loadMap(id);
+    }
 }
 
 void HWMapContainer::setTheme(const QString & theme)
 {
-	QList<QListWidgetItem *> items = lwThemes->findItems(theme, Qt::MatchExactly);
-	if(items.size())
-		lwThemes->setCurrentItem(items.at(0));
+    QList<QListWidgetItem *> items = lwThemes->findItems(theme, Qt::MatchExactly);
+    if(items.size())
+        lwThemes->setCurrentItem(items.at(0));
 }
 
 void HWMapContainer::setRandomSeed()
 {
-	m_seed = QUuid::createUuid().toString();
-	emit seedChanged(m_seed);
-	changeImage();
+    m_seed = QUuid::createUuid().toString();
+    emit seedChanged(m_seed);
+    changeImage();
 }
 
 void HWMapContainer::setRandomTheme()
 {
-	if(!Themes->size()) return;
-	quint32 themeNum = rand() % Themes->size();
-	lwThemes->setCurrentRow(themeNum);
+    if(!Themes->size()) return;
+    quint32 themeNum = rand() % Themes->size();
+    lwThemes->setCurrentRow(themeNum);
 }
 
 void HWMapContainer::setTemplateFilter(int filter)
 {
-	CB_TemplateFilter->setCurrentIndex(filter);
+    CB_TemplateFilter->setCurrentIndex(filter);
 }
 
 void HWMapContainer::templateFilterChanged(int filter)
 {
-	emit newTemplateFilter(filter);
-	changeImage();
+    emit newTemplateFilter(filter);
+    changeImage();
 }
 
--- a/QTfrontend/misc.h	Sat Mar 06 10:54:24 2010 +0000
+++ b/QTfrontend/misc.h	Sat Mar 06 10:59:20 2010 +0000
@@ -24,21 +24,21 @@
 
 class FreqSpinBox : public QSpinBox
 {
-	Q_OBJECT
+    Q_OBJECT
 
 public:
-	FreqSpinBox(QWidget* parent) : QSpinBox(parent)
-	{
+    FreqSpinBox(QWidget* parent) : QSpinBox(parent)
+    {
 
-	}
+    }
 
-	QString textFromValue(int value) const
-	{
-		if (!value)
-			return tr("Never");
-		else
-			return tr("Every %1 turn", "", value).arg(value);
-	}
+    QString textFromValue(int value) const
+    {
+        if (!value)
+            return tr("Never");
+        else
+            return tr("Every %1 turn", "", value).arg(value);
+    }
 };
 
 
--- a/QTfrontend/namegen.cpp	Sat Mar 06 10:54:24 2010 +0000
+++ b/QTfrontend/namegen.cpp	Sat Mar 06 10:59:20 2010 +0000
@@ -27,10 +27,10 @@
 
 
 HWNamegen::HWNamegen() :
-	TypesAvliable(false)
+    TypesAvliable(false)
 {
 
-	TypesLoad();
+    TypesLoad();
 }
 
 HWNamegen::~HWNamegen()
@@ -41,46 +41,46 @@
 
 void HWNamegen::TeamRandomName(HWTeam*& team, const int &i)
 {
-	RandomNameByHat(team,i);
+    RandomNameByHat(team,i);
 }
 
 void HWNamegen::TeamRandomNames(HWTeam*& team, const bool changeteamname)
 {
-	if ((TypesHatnames.size() > 0) && TypesAvliable){
+    if ((TypesHatnames.size() > 0) && TypesAvliable){
 
-		int kind = (rand()%(TypesHatnames.size()));
+        int kind = (rand()%(TypesHatnames.size()));
 
-		if (changeteamname){
-			if (TypesTeamnames[kind].size() > 0){
-				team->TeamName = TypesTeamnames[kind][rand()%(TypesTeamnames[kind].size())];
-			}
-			team->Grave = "Simple"; // Todo: make it semi-random
-			team->Fort = "Island"; // Todo: make it semi-random
-			team->Voicepack = "Default";
-		}
+        if (changeteamname){
+            if (TypesTeamnames[kind].size() > 0){
+                team->TeamName = TypesTeamnames[kind][rand()%(TypesTeamnames[kind].size())];
+            }
+            team->Grave = "Simple"; // Todo: make it semi-random
+            team->Fort = "Island"; // Todo: make it semi-random
+            team->Voicepack = "Default";
+        }
 
-		for(int i = 0; i < 8; i++)
-		{
-			if ((TypesHatnames[kind].size()) > 0){
-				team->HHHat[i] = TypesHatnames[kind][rand()%(TypesHatnames[kind].size())];
-			}
-			RandomNameByHat(team,i);
-		}
+        for(int i = 0; i < 8; i++)
+        {
+            if ((TypesHatnames[kind].size()) > 0){
+                team->HHHat[i] = TypesHatnames[kind][rand()%(TypesHatnames[kind].size())];
+            }
+            RandomNameByHat(team,i);
+        }
 
-	}
+    }
 
 }
 
 
 void HWNamegen::RandomNameByHat(HWTeam*& team, const int &i)
 {
-	QStringList Dictionaries;
-	HatCfgLoad(team->HHHat[i],Dictionaries);
+    QStringList Dictionaries;
+    HatCfgLoad(team->HHHat[i],Dictionaries);
 
-	QStringList Dictionary;
-	DictLoad(Dictionaries[rand()%(Dictionaries.size())],Dictionary);
+    QStringList Dictionary;
+    DictLoad(Dictionaries[rand()%(Dictionaries.size())],Dictionary);
 
-	team->HHName[i] = Dictionary[rand()%(Dictionary.size())];
+    team->HHName[i] = Dictionary[rand()%(Dictionary.size())];
 }
 
 void HWNamegen::DictLoad(const QString filename, QStringList &list)
--- a/QTfrontend/namegen.h	Sat Mar 06 10:54:24 2010 +0000
+++ b/QTfrontend/namegen.h	Sat Mar 06 10:59:20 2010 +0000
@@ -27,21 +27,21 @@
 class HWNamegen
 {
 public:
-	HWNamegen();
-	~HWNamegen();
+    HWNamegen();
+    ~HWNamegen();
 
-	void TeamRandomName(HWTeam*& team, const int &i);
-	void TeamRandomNames(HWTeam*& team, const bool changeteamname);
-	void RandomNameByHat(HWTeam*& team, const int &i);
+    void TeamRandomName(HWTeam*& team, const int &i);
+    void TeamRandomNames(HWTeam*& team, const bool changeteamname);
+    void RandomNameByHat(HWTeam*& team, const int &i);
 
 private:
 
-		QList<QStringList> TypesTeamnames;
-		QList<QStringList> TypesHatnames;
-		bool TypesAvliable;
-		void TypesLoad();
-		void DictLoad(const QString filename, QStringList &list);
-		void HatCfgLoad(const QString hatname, QStringList &list);
+        QList<QStringList> TypesTeamnames;
+        QList<QStringList> TypesHatnames;
+        bool TypesAvliable;
+        void TypesLoad();
+        void DictLoad(const QString filename, QStringList &list);
+        void HatCfgLoad(const QString hatname, QStringList &list);
 };
 
 
--- a/QTfrontend/netregister.h	Sat Mar 06 10:54:24 2010 +0000
+++ b/QTfrontend/netregister.h	Sat Mar 06 10:59:20 2010 +0000
@@ -23,13 +23,13 @@
 
 class HWNetRegisterServer : public QObject
 {
-	Q_OBJECT
+    Q_OBJECT
 
 public:
-	HWNetRegisterServer(QObject *parent, const QString & descr, quint16 port);
+    HWNetRegisterServer(QObject *parent, const QString & descr, quint16 port);
 
 public slots:
-	virtual void unregister();
+    virtual void unregister();
 };
 
 #endif // _NET_REGISTER_INCLUDED
--- a/QTfrontend/netserver.cpp	Sat Mar 06 10:54:24 2010 +0000
+++ b/QTfrontend/netserver.cpp	Sat Mar 06 10:59:20 2010 +0000
@@ -24,25 +24,25 @@
 
 HWNetServer::~HWNetServer()
 {
-	StopServer();
+    StopServer();
 }
 
 bool HWNetServer::StartServer(quint16 port)
 {
-	ds_port = port;
+    ds_port = port;
 
-	QStringList params;
-	params << QString("--port=%1").arg(port);
-	params << "--dedicated=False";
+    QStringList params;
+    params << QString("--port=%1").arg(port);
+    params << "--dedicated=False";
 
-	process.start(bindir->absolutePath() + "/hedgewars-server", params);
+    process.start(bindir->absolutePath() + "/hedgewars-server", params);
 
-	return process.waitForStarted(5000);
+    return process.waitForStarted(5000);
 }
 
 void HWNetServer::StopServer()
 {
-	process.close();
+    process.close();
 }
 
 
--- a/QTfrontend/netserver.h	Sat Mar 06 10:54:24 2010 +0000
+++ b/QTfrontend/netserver.h	Sat Mar 06 10:59:20 2010 +0000
@@ -24,18 +24,18 @@
 
 class HWNetServer : public QObject
 {
-	Q_OBJECT
+    Q_OBJECT
 
 public:
-	~HWNetServer();
-	bool StartServer(quint16 port);
-	void StopServer();
-	QString getRunningHostName() const;
-	quint16 getRunningPort() const;
+    ~HWNetServer();
+    bool StartServer(quint16 port);
+    void StopServer();
+    QString getRunningHostName() const;
+    quint16 getRunningPort() const;
 
 private:
-	quint16 ds_port;
-	QProcess process;
+    quint16 ds_port;
+    QProcess process;
 };
 
 #endif // _NETSERVER_INCLUDED
--- a/QTfrontend/netserverslist.cpp	Sat Mar 06 10:54:24 2010 +0000
+++ b/QTfrontend/netserverslist.cpp	Sat Mar 06 10:59:20 2010 +0000
@@ -35,34 +35,34 @@
 QVariant HWNetServersModel::headerData(int section,
             Qt::Orientation orientation, int role) const
 {
-	if (role != Qt::DisplayRole)
-		return QVariant();
+    if (role != Qt::DisplayRole)
+        return QVariant();
 
-	if (orientation == Qt::Horizontal)
-	{
-		switch (section)
-		{
-			case 0: return tr("Title");
-			case 1: return tr("IP");
-			case 2: return tr("Port");
-			default: return QVariant();
-		}
-	} else
-		return QString("%1").arg(section + 1);
+    if (orientation == Qt::Horizontal)
+    {
+        switch (section)
+        {
+            case 0: return tr("Title");
+            case 1: return tr("IP");
+            case 2: return tr("Port");
+            default: return QVariant();
+        }
+    } else
+        return QString("%1").arg(section + 1);
 }
 
 int HWNetServersModel::rowCount(const QModelIndex &parent) const
 {
-	if (parent.isValid())
-		return 0;
-	else
-		return games.size();
+    if (parent.isValid())
+        return 0;
+    else
+        return games.size();
 }
 
 int HWNetServersModel::columnCount(const QModelIndex & parent) const
 {
-	if (parent.isValid())
-		return 0;
-	else
-		return 3;
+    if (parent.isValid())
+        return 0;
+    else
+        return 3;
 }
--- a/QTfrontend/netserverslist.h	Sat Mar 06 10:54:24 2010 +0000
+++ b/QTfrontend/netserverslist.h	Sat Mar 06 10:59:20 2010 +0000
@@ -24,20 +24,20 @@
 
 class HWNetServersModel : public QAbstractTableModel
 {
-	Q_OBJECT
+    Q_OBJECT
 
 public:
-	HWNetServersModel(QObject *parent = 0);
+    HWNetServersModel(QObject *parent = 0);
 
-	QVariant headerData(int section, Qt::Orientation orientation, int role) const;
-	int rowCount(const QModelIndex & parent) const;
-	int columnCount(const QModelIndex & parent) const;
+    QVariant headerData(int section, Qt::Orientation orientation, int role) const;
+    int rowCount(const QModelIndex & parent) const;
+    int columnCount(const QModelIndex & parent) const;
 
 public slots:
-	virtual void updateList();
+    virtual void updateList();
 
 protected:
-	QList<QStringList> games;
+    QList<QStringList> games;
 };
 
 #endif // _NET_SERVERSLIST_INCLUDED
--- a/QTfrontend/netudpwidget.cpp	Sat Mar 06 10:54:24 2010 +0000
+++ b/QTfrontend/netudpwidget.cpp	Sat Mar 06 10:59:20 2010 +0000
@@ -24,48 +24,48 @@
 HWNetUdpModel::HWNetUdpModel(QObject* parent) :
   HWNetServersModel(parent)
 {
-	pUdpSocket = new QUdpSocket(this);
+    pUdpSocket = new QUdpSocket(this);
 
-	pUdpSocket->bind();
-	connect(pUdpSocket, SIGNAL(readyRead()), this, SLOT(onClientRead()));
+    pUdpSocket->bind();
+    connect(pUdpSocket, SIGNAL(readyRead()), this, SLOT(onClientRead()));
 }
 
 void HWNetUdpModel::updateList()
 {
-	games.clear();
+    games.clear();
 
-	reset();
+    reset();
 
-	pUdpSocket->writeDatagram("hedgewars client", QHostAddress::Broadcast, 46631);
+    pUdpSocket->writeDatagram("hedgewars client", QHostAddress::Broadcast, 46631);
 }
 
 void HWNetUdpModel::onClientRead()
 {
-	while (pUdpSocket->hasPendingDatagrams()) {
-		QByteArray datagram;
-		datagram.resize(pUdpSocket->pendingDatagramSize());
-		QHostAddress clientAddr;
-		quint16 clientPort;
+    while (pUdpSocket->hasPendingDatagrams()) {
+        QByteArray datagram;
+        datagram.resize(pUdpSocket->pendingDatagramSize());
+        QHostAddress clientAddr;
+        quint16 clientPort;
 
-		pUdpSocket->readDatagram(datagram.data(), datagram.size(), &clientAddr, &clientPort);
+        pUdpSocket->readDatagram(datagram.data(), datagram.size(), &clientAddr, &clientPort);
 
-		if(QString("%1").arg(datagram.data())==QString("hedgewars server")) {
-			QStringList sl;
-			sl << "-" << clientAddr.toString() << "46631";
-			games.append(sl);
-		}
-	}
+        if(QString("%1").arg(datagram.data())==QString("hedgewars server")) {
+            QStringList sl;
+            sl << "-" << clientAddr.toString() << "46631";
+            games.append(sl);
+        }
+    }
 
-	reset();
+    reset();
 }
 
 QVariant HWNetUdpModel::data(const QModelIndex &index,
                              int role) const
 {
-	if (!index.isValid() || index.row() < 0
-		|| index.row() >= games.size()
-		|| role != Qt::DisplayRole)
-	return QVariant();
+    if (!index.isValid() || index.row() < 0
+        || index.row() >= games.size()
+        || role != Qt::DisplayRole)
+    return QVariant();
 
-	return games[index.row()][index.column()];
+    return games[index.row()][index.column()];
 }
--- a/QTfrontend/netudpwidget.h	Sat Mar 06 10:54:24 2010 +0000
+++ b/QTfrontend/netudpwidget.h	Sat Mar 06 10:59:20 2010 +0000
@@ -29,18 +29,18 @@
   Q_OBJECT
 
 public:
-	HWNetUdpModel(QObject *parent = 0);
+    HWNetUdpModel(QObject *parent = 0);
 
-	QVariant data(const QModelIndex &index, int role) const;
+    QVariant data(const QModelIndex &index, int role) const;
 
 public slots:
-	void updateList();
+    void updateList();
 
 private slots:
-	void onClientRead();
+    void onClientRead();
 
 private:
-	QUdpSocket* pUdpSocket;
+    QUdpSocket* pUdpSocket;
 };
 
 #endif // _NET_UDPWIDGET_INCLUDED
--- a/QTfrontend/newnetclient.cpp	Sat Mar 06 10:54:24 2010 +0000
+++ b/QTfrontend/newnetclient.cpp	Sat Mar 06 10:59:20 2010 +0000
@@ -42,96 +42,96 @@
   netClientState(0)
 {
 // socket stuff
-	connect(&NetSocket, SIGNAL(readyRead()), this, SLOT(ClientRead()));
-	connect(&NetSocket, SIGNAL(connected()), this, SLOT(OnConnect()));
-	connect(&NetSocket, SIGNAL(disconnected()), this, SLOT(OnDisconnect()));
-	connect(&NetSocket, SIGNAL(error(QAbstractSocket::SocketError)), this,
-			SLOT(displayError(QAbstractSocket::SocketError)));
+    connect(&NetSocket, SIGNAL(readyRead()), this, SLOT(ClientRead()));
+    connect(&NetSocket, SIGNAL(connected()), this, SLOT(OnConnect()));
+    connect(&NetSocket, SIGNAL(disconnected()), this, SLOT(OnDisconnect()));
+    connect(&NetSocket, SIGNAL(error(QAbstractSocket::SocketError)), this,
+            SLOT(displayError(QAbstractSocket::SocketError)));
 
 // config stuff
-	connect(this, SIGNAL(paramChanged(const QString &, const QStringList &)), pGameCFGWidget, SLOT(setParam(const QString &, const QStringList &)));
-	connect(pGameCFGWidget, SIGNAL(paramChanged(const QString &, const QStringList &)), this, SLOT(onParamChanged(const QString &, const QStringList &)));
-	connect(this, SIGNAL(configAsked()), pGameCFGWidget, SLOT(fullNetConfig()));
+    connect(this, SIGNAL(paramChanged(const QString &, const QStringList &)), pGameCFGWidget, SLOT(setParam(const QString &, const QStringList &)));
+    connect(pGameCFGWidget, SIGNAL(paramChanged(const QString &, const QStringList &)), this, SLOT(onParamChanged(const QString &, const QStringList &)));
+    connect(this, SIGNAL(configAsked()), pGameCFGWidget, SLOT(fullNetConfig()));
 }
 
 HWNewNet::~HWNewNet()
 {
-	if (m_game_connected)
-	{
-		RawSendNet(QString("QUIT%1%2").arg(delimeter).arg("User quit"));
-		emit Disconnected();
-	}
-	NetSocket.flush();
+    if (m_game_connected)
+    {
+        RawSendNet(QString("QUIT%1%2").arg(delimeter).arg("User quit"));
+        emit Disconnected();
+    }
+    NetSocket.flush();
 }
 
 void HWNewNet::Connect(const QString & hostName, quint16 port, const QString & nick)
 {
-	mynick = nick.isEmpty() ? QLineEdit::tr("unnamed") : nick;
-	myhost = hostName + QString(":%1").arg(port);
-	NetSocket.connectToHost(hostName, port);
+    mynick = nick.isEmpty() ? QLineEdit::tr("unnamed") : nick;
+    myhost = hostName + QString(":%1").arg(port);
+    NetSocket.connectToHost(hostName, port);
 }
 
 void HWNewNet::Disconnect()
 {
-	if (m_game_connected)
-		RawSendNet(QString("QUIT%1%2").arg(delimeter).arg("User quit"));
-	m_game_connected = false;
+    if (m_game_connected)
+        RawSendNet(QString("QUIT%1%2").arg(delimeter).arg("User quit"));
+    m_game_connected = false;
 
-	NetSocket.disconnectFromHost();
+    NetSocket.disconnectFromHost();
 }
 
 void HWNewNet::CreateRoom(const QString & room)
 {
-	if(netClientState != 2)
-	{
-		qWarning("Illegal try to create room!");
-		return;
-	}
+    if(netClientState != 2)
+    {
+        qWarning("Illegal try to create room!");
+        return;
+    }
 
-	myroom = room;
+    myroom = room;
 
-	RawSendNet(QString("CREATE_ROOM%1%2").arg(delimeter).arg(room));
-	isChief = true;
+    RawSendNet(QString("CREATE_ROOM%1%2").arg(delimeter).arg(room));
+    isChief = true;
 }
 
 void HWNewNet::JoinRoom(const QString & room)
 {
-	if(netClientState != 2)
-	{
-		qWarning("Illegal try to join room!");
-		return;
-	}
+    if(netClientState != 2)
+    {
+        qWarning("Illegal try to join room!");
+        return;
+    }
 
-	myroom = room;
+    myroom = room;
 
-	RawSendNet(QString("JOIN_ROOM%1%2").arg(delimeter).arg(room));
-	isChief = false;
+    RawSendNet(QString("JOIN_ROOM%1%2").arg(delimeter).arg(room));
+    isChief = false;
 }
 
 void HWNewNet::AddTeam(const HWTeam & team)
 {
-	QString cmd = QString("ADD_TEAM") + delimeter +
-	     team.TeamName + delimeter +
-	     team.teamColor.name() + delimeter +
-	     team.Grave + delimeter +
-	     team.Fort + delimeter +
-	     team.Voicepack + delimeter +
-		 team.Flag + delimeter +
-	     QString::number(team.difficulty);
+    QString cmd = QString("ADD_TEAM") + delimeter +
+         team.TeamName + delimeter +
+         team.teamColor.name() + delimeter +
+         team.Grave + delimeter +
+         team.Fort + delimeter +
+         team.Voicepack + delimeter +
+         team.Flag + delimeter +
+         QString::number(team.difficulty);
 
-	for(int i = 0; i < 8; ++i)
-	{
-		cmd.append(delimeter);
-		cmd.append(team.HHName[i]);
-		cmd.append(delimeter);
-		cmd.append(team.HHHat[i]);
-	}
-	RawSendNet(cmd);
+    for(int i = 0; i < 8; ++i)
+    {
+        cmd.append(delimeter);
+        cmd.append(team.HHName[i]);
+        cmd.append(delimeter);
+        cmd.append(team.HHHat[i]);
+    }
+    RawSendNet(cmd);
 }
 
 void HWNewNet::RemoveTeam(const HWTeam & team)
 {
-	RawSendNet(QString("REMOVE_TEAM") + delimeter + team.TeamName);
+    RawSendNet(QString("REMOVE_TEAM") + delimeter + team.TeamName);
 }
 
 void HWNewNet::ToggleReady()
@@ -153,23 +153,23 @@
 
 void HWNewNet::RawSendNet(const QByteArray & buf)
 {
-//	qDebug() << "Client: " << QString(buf).split("\n");
-	NetSocket.write(buf);
-	NetSocket.write("\n\n", 2);
+//  qDebug() << "Client: " << QString(buf).split("\n");
+    NetSocket.write(buf);
+    NetSocket.write("\n\n", 2);
 }
 
 void HWNewNet::ClientRead()
 {
-	while (NetSocket.canReadLine()) {
-		QString s = QString::fromUtf8(NetSocket.readLine());
-		if (s.endsWith('\n')) s.chop(1);
+    while (NetSocket.canReadLine()) {
+        QString s = QString::fromUtf8(NetSocket.readLine());
+        if (s.endsWith('\n')) s.chop(1);
 
-		if (s.size() == 0) {
-			ParseCmd(cmdbuf);
-			cmdbuf.clear();
-		} else
-			cmdbuf << s;
-	}
+        if (s.size() == 0) {
+            ParseCmd(cmdbuf);
+            cmdbuf.clear();
+        } else
+            cmdbuf << s;
+    }
 }
 
 void HWNewNet::OnConnect()
@@ -178,284 +178,284 @@
 
 void HWNewNet::OnDisconnect()
 {
-	if(m_game_connected) emit Disconnected();
-	m_game_connected = false;
+    if(m_game_connected) emit Disconnected();
+    m_game_connected = false;
 }
 
 void HWNewNet::displayError(QAbstractSocket::SocketError socketError)
 {
-	emit Disconnected();
+    emit Disconnected();
 
-	switch (socketError) {
-		case QAbstractSocket::RemoteHostClosedError:
-			break;
-		case QAbstractSocket::HostNotFoundError:
-			emit showMessage(tr("The host was not found. Please check the host name and port settings."));
-			break;
-		case QAbstractSocket::ConnectionRefusedError:
-			emit showMessage(tr("Connection refused"));
-			break;
-		default:
-			emit showMessage(NetSocket.errorString());
-		}
+    switch (socketError) {
+        case QAbstractSocket::RemoteHostClosedError:
+            break;
+        case QAbstractSocket::HostNotFoundError:
+            emit showMessage(tr("The host was not found. Please check the host name and port settings."));
+            break;
+        case QAbstractSocket::ConnectionRefusedError:
+            emit showMessage(tr("Connection refused"));
+            break;
+        default:
+            emit showMessage(NetSocket.errorString());
+        }
 }
 
 void HWNewNet::ParseCmd(const QStringList & lst)
 {
-//	qDebug() << "Server: " << lst;
+//  qDebug() << "Server: " << lst;
 
-	if(!lst.size())
-	{
-		qWarning("Net client: Bad message");
-		return;
-	}
+    if(!lst.size())
+    {
+        qWarning("Net client: Bad message");
+        return;
+    }
 
-	if (lst[0] == "NICK")
-	{
-		mynick = lst[1];
-		return ;
-	}
+    if (lst[0] == "NICK")
+    {
+        mynick = lst[1];
+        return ;
+    }
 
-	if (lst[0] == "PROTO")
-		return ;
+    if (lst[0] == "PROTO")
+        return ;
 
-	if (lst[0] == "ERROR") {
-		if (lst.size() == 2)
-			emit showMessage("Error: " + lst[1]);
-		else
-			emit showMessage("Unknown error");
-		return;
-	}
+    if (lst[0] == "ERROR") {
+        if (lst.size() == 2)
+            emit showMessage("Error: " + lst[1]);
+        else
+            emit showMessage("Unknown error");
+        return;
+    }
 
-	if (lst[0] == "WARNING") {
-		if (lst.size() == 2)
-			emit showMessage("Warning: " + lst[1]);
-		else
-			emit showMessage("Unknown warning");
-		return;
-	}
+    if (lst[0] == "WARNING") {
+        if (lst.size() == 2)
+            emit showMessage("Warning: " + lst[1]);
+        else
+            emit showMessage("Unknown warning");
+        return;
+    }
 
-	if (lst[0] == "CONNECTED") {
-		RawSendNet(QString("NICK%1%2").arg(delimeter).arg(mynick));
-		RawSendNet(QString("PROTO%1%2").arg(delimeter).arg(*cProtoVer));
-		netClientState = 1;
-		m_game_connected = true;
-		emit adminAccess(false);
-		return;
-	}
+    if (lst[0] == "CONNECTED") {
+        RawSendNet(QString("NICK%1%2").arg(delimeter).arg(mynick));
+        RawSendNet(QString("PROTO%1%2").arg(delimeter).arg(*cProtoVer));
+        netClientState = 1;
+        m_game_connected = true;
+        emit adminAccess(false);
+        return;
+    }
 
-	if (lst[0] == "PING") {
-		if (lst.size() > 1)
-			RawSendNet(QString("PONG%1%2").arg(delimeter).arg(lst[1]));
-		else
-			RawSendNet(QString("PONG"));
-		return;
-	}
+    if (lst[0] == "PING") {
+        if (lst.size() > 1)
+            RawSendNet(QString("PONG%1%2").arg(delimeter).arg(lst[1]));
+        else
+            RawSendNet(QString("PONG"));
+        return;
+    }
 
-	if (lst[0] == "ROOMS") {
-		QStringList tmp = lst;
-		tmp.removeFirst();
-		emit roomsList(tmp);
-		return;
-	}
+    if (lst[0] == "ROOMS") {
+        QStringList tmp = lst;
+        tmp.removeFirst();
+        emit roomsList(tmp);
+        return;
+    }
 
-	if (lst[0] == "SERVER_MESSAGE") {
-		if(lst.size() < 2)
-		{
-			qWarning("Net: Empty SERVERMESSAGE message");
-			return;
-		}
-		emit serverMessage(lst[1]);
-		return;
-	}
+    if (lst[0] == "SERVER_MESSAGE") {
+        if(lst.size() < 2)
+        {
+            qWarning("Net: Empty SERVERMESSAGE message");
+            return;
+        }
+        emit serverMessage(lst[1]);
+        return;
+    }
 
-	if (lst[0] == "CHAT") {
-		if(lst.size() < 3)
-		{
-			qWarning("Net: Empty CHAT message");
-			return;
-		}
-		if (netClientState == 2)
-			emit chatStringLobby(HWProto::formatChatMsg(lst[1], lst[2]));
-		else
-			emit chatStringFromNet(HWProto::formatChatMsg(lst[1], lst[2]));
-		return;
-	}
+    if (lst[0] == "CHAT") {
+        if(lst.size() < 3)
+        {
+            qWarning("Net: Empty CHAT message");
+            return;
+        }
+        if (netClientState == 2)
+            emit chatStringLobby(HWProto::formatChatMsg(lst[1], lst[2]));
+        else
+            emit chatStringFromNet(HWProto::formatChatMsg(lst[1], lst[2]));
+        return;
+    }
 
-	if (lst[0] == "INFO") {
-		if(lst.size() < 5)
-		{
-			qWarning("Net: Malformed INFO message");
-			return;
-		}
-		QStringList tmp = lst;
-		tmp.removeFirst();
-		if (netClientState == 2)
-			emit chatStringLobby(tmp.join("\n").prepend('\x01'));
-		else
-			emit chatStringFromNet(tmp.join("\n").prepend('\x01'));
-		return;
-	}
+    if (lst[0] == "INFO") {
+        if(lst.size() < 5)
+        {
+            qWarning("Net: Malformed INFO message");
+            return;
+        }
+        QStringList tmp = lst;
+        tmp.removeFirst();
+        if (netClientState == 2)
+            emit chatStringLobby(tmp.join("\n").prepend('\x01'));
+        else
+            emit chatStringFromNet(tmp.join("\n").prepend('\x01'));
+        return;
+    }
 
-	if (lst[0] == "READY") {
-		if(lst.size() < 2)
-		{
-			qWarning("Net: Malformed READY message");
-			return;
-		}
-		for(int i = 1; i < lst.size(); ++i)
-		{
-			if (lst[i] == mynick)
-				emit setMyReadyStatus(true);
-			emit setReadyStatus(lst[i], true);
-		}
-		return;
-	}
+    if (lst[0] == "READY") {
+        if(lst.size() < 2)
+        {
+            qWarning("Net: Malformed READY message");
+            return;
+        }
+        for(int i = 1; i < lst.size(); ++i)
+        {
+            if (lst[i] == mynick)
+                emit setMyReadyStatus(true);
+            emit setReadyStatus(lst[i], true);
+        }
+        return;
+    }
 
-	if (lst[0] == "NOT_READY") {
-		if(lst.size() < 2)
-		{
-			qWarning("Net: Malformed NOT_READY message");
-			return;
-		}
-		for(int i = 1; i < lst.size(); ++i)
-		{
-			if (lst[i] == mynick)
-				emit setMyReadyStatus(false);
-			emit setReadyStatus(lst[i], false);
-		}
-		return;
-	}
+    if (lst[0] == "NOT_READY") {
+        if(lst.size() < 2)
+        {
+            qWarning("Net: Malformed NOT_READY message");
+            return;
+        }
+        for(int i = 1; i < lst.size(); ++i)
+        {
+            if (lst[i] == mynick)
+                emit setMyReadyStatus(false);
+            emit setReadyStatus(lst[i], false);
+        }
+        return;
+    }
 
-	if (lst[0] == "ADD_TEAM") {
-		if(lst.size() != 24)
-		{
-			qWarning("Net: Bad ADDTEAM message");
-			return;
-		}
-		QStringList tmp = lst;
-		tmp.removeFirst();
-		emit AddNetTeam(tmp);
-		return;
-	}
+    if (lst[0] == "ADD_TEAM") {
+        if(lst.size() != 24)
+        {
+            qWarning("Net: Bad ADDTEAM message");
+            return;
+        }
+        QStringList tmp = lst;
+        tmp.removeFirst();
+        emit AddNetTeam(tmp);
+        return;
+    }
 
-	if (lst[0] == "REMOVE_TEAM") {
-		if(lst.size() != 2)
-		{
-			qWarning("Net: Bad REMOVETEAM message");
-			return;
-		}
-		m_pTeamSelWidget->removeNetTeam(HWTeam(lst[1]));
-		return;
-	}
+    if (lst[0] == "REMOVE_TEAM") {
+        if(lst.size() != 2)
+        {
+            qWarning("Net: Bad REMOVETEAM message");
+            return;
+        }
+        m_pTeamSelWidget->removeNetTeam(HWTeam(lst[1]));
+        return;
+    }
 
-	if(lst[0] == "ROOMABANDONED") {
-		netClientState = 2;
-		emit showMessage(HWNewNet::tr("Room destroyed"));
-		emit LeftRoom();
-		return;
-	}
+    if(lst[0] == "ROOMABANDONED") {
+        netClientState = 2;
+        emit showMessage(HWNewNet::tr("Room destroyed"));
+        emit LeftRoom();
+        return;
+    }
 
-	if(lst[0] == "KICKED") {
-		netClientState = 2;
-		emit showMessage(HWNewNet::tr("You got kicked"));
-		emit LeftRoom();
-		return;
-	}
+    if(lst[0] == "KICKED") {
+        netClientState = 2;
+        emit showMessage(HWNewNet::tr("You got kicked"));
+        emit LeftRoom();
+        return;
+    }
 
-	if(lst[0] == "JOINED") {
-		if(lst.size() < 2)
-		{
-			qWarning("Net: Bad JOINED message");
-			return;
-		}
+    if(lst[0] == "JOINED") {
+        if(lst.size() < 2)
+        {
+            qWarning("Net: Bad JOINED message");
+            return;
+        }
 
-		for(int i = 1; i < lst.size(); ++i)
-		{
-			if (lst[i] == mynick)
-			{
-				netClientState = 3;
-				emit EnteredGame();
-				emit roomMaster(isChief);
-				if (isChief)
-					emit configAsked();
-			}
-			emit nickAdded(lst[i], isChief && (lst[i] != mynick));
+        for(int i = 1; i < lst.size(); ++i)
+        {
+            if (lst[i] == mynick)
+            {
+                netClientState = 3;
+                emit EnteredGame();
+                emit roomMaster(isChief);
+                if (isChief)
+                    emit configAsked();
+            }
+            emit nickAdded(lst[i], isChief && (lst[i] != mynick));
             emit chatStringFromNet(tr("%1 *** %2 has joined the room").arg('\x03').arg(lst[i]));
-		}
-		return;
-	}
+        }
+        return;
+    }
 
-	if(lst[0] == "LOBBY:JOINED") {
-		if(lst.size() < 2)
-		{
-			qWarning("Net: Bad JOINED message");
-			return;
-		}
+    if(lst[0] == "LOBBY:JOINED") {
+        if(lst.size() < 2)
+        {
+            qWarning("Net: Bad JOINED message");
+            return;
+        }
 
-		for(int i = 1; i < lst.size(); ++i)
-		{
-			if (lst[i] == mynick)
-			{
-				netClientState = 2;
-				RawSendNet(QString("LIST"));
-				emit Connected();
-			}
+        for(int i = 1; i < lst.size(); ++i)
+        {
+            if (lst[i] == mynick)
+            {
+                netClientState = 2;
+                RawSendNet(QString("LIST"));
+                emit Connected();
+            }
 
-			emit nickAddedLobby(lst[i], false);
-			emit chatStringLobby(tr("%1 *** %2 has joined").arg('\x03').arg(lst[i]));
-		}
-		return;
-	}
+            emit nickAddedLobby(lst[i], false);
+            emit chatStringLobby(tr("%1 *** %2 has joined").arg('\x03').arg(lst[i]));
+        }
+        return;
+    }
 
-	if(lst[0] == "LEFT") {
-		if(lst.size() < 2)
-		{
-			qWarning("Net: Bad LEFT message");
-			return;
-		}
-		emit nickRemoved(lst[1]);
-		if (lst.size() < 3)
-			emit chatStringFromNet(tr("%1 *** %2 has left").arg('\x03').arg(lst[1]));
-		else
-			emit chatStringFromNet(tr("%1 *** %2 has left (%3)").arg('\x03').arg(lst[1], lst[2]));
-		return;
-	}
+    if(lst[0] == "LEFT") {
+        if(lst.size() < 2)
+        {
+            qWarning("Net: Bad LEFT message");
+            return;
+        }
+        emit nickRemoved(lst[1]);
+        if (lst.size() < 3)
+            emit chatStringFromNet(tr("%1 *** %2 has left").arg('\x03').arg(lst[1]));
+        else
+            emit chatStringFromNet(tr("%1 *** %2 has left (%3)").arg('\x03').arg(lst[1], lst[2]));
+        return;
+    }
 
-	if(lst[0] == "ROOM") {
-		if(lst.size() < 2)
-		{
-			qWarning("Net: Bad ROOM message");
-			return;
-		}
-		RawSendNet(QString("LIST"));
-		return;
-	}
+    if(lst[0] == "ROOM") {
+        if(lst.size() < 2)
+        {
+            qWarning("Net: Bad ROOM message");
+            return;
+        }
+        RawSendNet(QString("LIST"));
+        return;
+    }
 
-	if(lst[0] == "LOBBY:LEFT") {
-		if(lst.size() < 2)
-		{
-			qWarning("Net: Bad LOBBY:LEFT message");
-			return;
-		}
-		emit nickRemovedLobby(lst[1]);
-		if (lst.size() < 3)
-			emit chatStringLobby(tr("%1 *** %2 has left").arg('\x03').arg(lst[1]));
-		else
-			emit chatStringLobby(tr("%1 *** %2 has left (%3)").arg('\x03').arg(lst[1], lst[2]));
-		return;
-	}
+    if(lst[0] == "LOBBY:LEFT") {
+        if(lst.size() < 2)
+        {
+            qWarning("Net: Bad LOBBY:LEFT message");
+            return;
+        }
+        emit nickRemovedLobby(lst[1]);
+        if (lst.size() < 3)
+            emit chatStringLobby(tr("%1 *** %2 has left").arg('\x03').arg(lst[1]));
+        else
+            emit chatStringLobby(tr("%1 *** %2 has left (%3)").arg('\x03').arg(lst[1], lst[2]));
+        return;
+    }
 
-	if (lst[0] == "RUN_GAME") {
-		netClientState = 5;
-		emit AskForRunGame();
-		return;
-	}
+    if (lst[0] == "RUN_GAME") {
+        netClientState = 5;
+        emit AskForRunGame();
+        return;
+    }
 
-	if (lst[0] == "ASKPASSWORD") {
+    if (lst[0] == "ASKPASSWORD") {
         int passLength = config->value("net/passwordlength", 0).toInt();
         QString hash = config->value("net/passwordhash", "").toString();
-		QString password = QInputDialog::getText(0, tr("Password"), tr("Your nickname %1 is\nregistered on Hedgewars.org\nPlease provide your password\nor pick another nickname:").arg(mynick), QLineEdit::Password, passLength==0?NULL:QString(passLength,'\0'));
+        QString password = QInputDialog::getText(0, tr("Password"), tr("Your nickname %1 is\nregistered on Hedgewars.org\nPlease provide your password\nor pick another nickname:").arg(mynick), QLineEdit::Password, passLength==0?NULL:QString(passLength,'\0'));
 
         if (!passLength || password!=QString(passLength, '\0')) {
             hash = QCryptographicHash::hash(password.toLatin1(), QCryptographicHash::Md5).toHex();
@@ -463,255 +463,255 @@
             config->setValue("net/passwordlength", password.size());
         }
 
-		RawSendNet(QString("PASSWORD%1%2").arg(delimeter).arg(hash));
-		return;
-	}
+        RawSendNet(QString("PASSWORD%1%2").arg(delimeter).arg(hash));
+        return;
+    }
 
-	if (lst[0] == "TEAM_ACCEPTED") {
-		if (lst.size() != 2)
-		{
-			qWarning("Net: Bad TEAM_ACCEPTED message");
-			return;
-		}
-		m_pTeamSelWidget->changeTeamStatus(lst[1]);
-		return;
-	}
+    if (lst[0] == "TEAM_ACCEPTED") {
+        if (lst.size() != 2)
+        {
+            qWarning("Net: Bad TEAM_ACCEPTED message");
+            return;
+        }
+        m_pTeamSelWidget->changeTeamStatus(lst[1]);
+        return;
+    }
 
 
-	if (lst[0] == "CFG") {
-		if(lst.size() < 3)
-		{
-			qWarning("Net: Bad CFG message");
-			return;
-		}
-		QStringList tmp = lst;
-		tmp.removeFirst();
-		tmp.removeFirst();
-		if (lst[1] == "SCHEME")
-			emit netSchemeConfig(tmp);
-		else
-			emit paramChanged(lst[1], tmp);
-		return;
-	}
+    if (lst[0] == "CFG") {
+        if(lst.size() < 3)
+        {
+            qWarning("Net: Bad CFG message");
+            return;
+        }
+        QStringList tmp = lst;
+        tmp.removeFirst();
+        tmp.removeFirst();
+        if (lst[1] == "SCHEME")
+            emit netSchemeConfig(tmp);
+        else
+            emit paramChanged(lst[1], tmp);
+        return;
+    }
 
-	if (lst[0] == "HH_NUM") {
-		if (lst.size() != 3)
-		{
-			qWarning("Net: Bad TEAM_ACCEPTED message");
-			return;
-		}
-		HWTeam tmptm(lst[1]);
-		tmptm.numHedgehogs = lst[2].toUInt();
-		emit hhnumChanged(tmptm);
-		return;
-	}
+    if (lst[0] == "HH_NUM") {
+        if (lst.size() != 3)
+        {
+            qWarning("Net: Bad TEAM_ACCEPTED message");
+            return;
+        }
+        HWTeam tmptm(lst[1]);
+        tmptm.numHedgehogs = lst[2].toUInt();
+        emit hhnumChanged(tmptm);
+        return;
+    }
 
-	if (lst[0] == "TEAM_COLOR") {
-		if (lst.size() != 3)
-		{
-			qWarning("Net: Bad TEAM_COLOR message");
-			return;
-		}
-		HWTeam tmptm(lst[1]);
-		tmptm.teamColor = QColor(lst[2]);
-		emit teamColorChanged(tmptm);
-		return;
-	}
+    if (lst[0] == "TEAM_COLOR") {
+        if (lst.size() != 3)
+        {
+            qWarning("Net: Bad TEAM_COLOR message");
+            return;
+        }
+        HWTeam tmptm(lst[1]);
+        tmptm.teamColor = QColor(lst[2]);
+        emit teamColorChanged(tmptm);
+        return;
+    }
 
-	if (lst[0] == "EM") {
-		if(lst.size() < 2)
-		{
-			qWarning("Net: Bad EM message");
-			return;
-		}
-		for(int i = 1; i < lst.size(); ++i)
-		{
-			QByteArray em = QByteArray::fromBase64(lst[i].toAscii());
-			emit FromNet(em);
-		}
-		return;
-	}
+    if (lst[0] == "EM") {
+        if(lst.size() < 2)
+        {
+            qWarning("Net: Bad EM message");
+            return;
+        }
+        for(int i = 1; i < lst.size(); ++i)
+        {
+            QByteArray em = QByteArray::fromBase64(lst[i].toAscii());
+            emit FromNet(em);
+        }
+        return;
+    }
 
-	if (lst[0] == "BYE") {
-		if (lst.size() < 2)
-		{
-			qWarning("Net: Bad BYE message");
-			return;
-		}
-		emit showMessage(HWNewNet::tr("Quit reason: ") + lst[1]);
-		return;
-	}
+    if (lst[0] == "BYE") {
+        if (lst.size() < 2)
+        {
+            qWarning("Net: Bad BYE message");
+            return;
+        }
+        emit showMessage(HWNewNet::tr("Quit reason: ") + lst[1]);
+        return;
+    }
 
 
-	if (lst[0] == "ADMIN_ACCESS") {
-		emit adminAccess(true);
-		return;
-	}
+    if (lst[0] == "ADMIN_ACCESS") {
+        emit adminAccess(true);
+        return;
+    }
 
-	if (lst[0] == "ROOM_CONTROL_ACCESS") {
-		if (lst.size() < 2)
-		{
-			qWarning("Net: Bad BYE message");
-			return;
-		}
-		bool b = lst[1] != "0";
-		m_pGameCFGWidget->setEnabled(b);
-		m_pTeamSelWidget->setInteractivity(b);
-		isChief = b;
-		emit roomMaster(isChief);
+    if (lst[0] == "ROOM_CONTROL_ACCESS") {
+        if (lst.size() < 2)
+        {
+            qWarning("Net: Bad BYE message");
+            return;
+        }
+        bool b = lst[1] != "0";
+        m_pGameCFGWidget->setEnabled(b);
+        m_pTeamSelWidget->setInteractivity(b);
+        isChief = b;
+        emit roomMaster(isChief);
 
-		return;
-	}
+        return;
+    }
 
-	qWarning() << "Net: Unknown message:" << lst;
+    qWarning() << "Net: Unknown message:" << lst;
 }
 
 void HWNewNet::onHedgehogsNumChanged(const HWTeam& team)
 {
-	if (isChief)
-	RawSendNet(QString("HH_NUM%1%2%1%3")
-			.arg(delimeter)
-			.arg(team.TeamName)
-			.arg(team.numHedgehogs));
+    if (isChief)
+    RawSendNet(QString("HH_NUM%1%2%1%3")
+            .arg(delimeter)
+            .arg(team.TeamName)
+            .arg(team.numHedgehogs));
 }
 
 void HWNewNet::onTeamColorChanged(const HWTeam& team)
 {
-	if (isChief)
-	RawSendNet(QString("TEAM_COLOR%1%2%1%3")
-			.arg(delimeter)
-			.arg(team.TeamName)
-			.arg(team.teamColor.name()));
+    if (isChief)
+    RawSendNet(QString("TEAM_COLOR%1%2%1%3")
+            .arg(delimeter)
+            .arg(team.TeamName)
+            .arg(team.teamColor.name()));
 }
 
 void HWNewNet::onParamChanged(const QString & param, const QStringList & value)
 {
-	if (isChief)
-		RawSendNet(
-				QString("CFG%1%2%1%3")
-					.arg(delimeter)
-					.arg(param)
-					.arg(value.join(QString(delimeter)))
-				);
+    if (isChief)
+        RawSendNet(
+                QString("CFG%1%2%1%3")
+                    .arg(delimeter)
+                    .arg(param)
+                    .arg(value.join(QString(delimeter)))
+                );
 }
 
 void HWNewNet::chatLineToNet(const QString& str)
 {
-	if(str != "") {
-		RawSendNet(QString("CHAT") + delimeter + str);
-		emit(chatStringFromMe(HWProto::formatChatMsg(mynick, str)));
-	}
+    if(str != "") {
+        RawSendNet(QString("CHAT") + delimeter + str);
+        emit(chatStringFromMe(HWProto::formatChatMsg(mynick, str)));
+    }
 }
 
 void HWNewNet::chatLineToLobby(const QString& str)
 {
-	if(str != "") {
-		RawSendNet(QString("CHAT") + delimeter + str);
-		emit(chatStringFromMeLobby(HWProto::formatChatMsg(mynick, str)));
-	}
+    if(str != "") {
+        RawSendNet(QString("CHAT") + delimeter + str);
+        emit(chatStringFromMeLobby(HWProto::formatChatMsg(mynick, str)));
+    }
 }
 
 void HWNewNet::SendTeamMessage(const QString& str)
 {
-	RawSendNet(QString("TEAMCHAT") + delimeter + str);
+    RawSendNet(QString("TEAMCHAT") + delimeter + str);
 }
 
 void HWNewNet::askRoomsList()
 {
-	if(netClientState != 2)
-	{
-		qWarning("Illegal try to get rooms list!");
-		return;
-	}
-	RawSendNet(QString("LIST"));
+    if(netClientState != 2)
+    {
+        qWarning("Illegal try to get rooms list!");
+        return;
+    }
+    RawSendNet(QString("LIST"));
 }
 
 int HWNewNet::getClientState()
 {
-	return netClientState;
+    return netClientState;
 }
 
 QString HWNewNet::getNick()
 {
-	return mynick;
+    return mynick;
 }
 
 QString HWNewNet::getRoom()
 {
-	return myroom;
+    return myroom;
 }
 
 QString HWNewNet::getHost()
 {
-	return myhost;
+    return myhost;
 }
 
 bool HWNewNet::isRoomChief()
 {
-	return isChief;
+    return isChief;
 }
 
 void HWNewNet::gameFinished()
 {
-	if (netClientState == 5) netClientState = 3;
-	RawSendNet(QString("ROUNDFINISHED"));
+    if (netClientState == 5) netClientState = 3;
+    RawSendNet(QString("ROUNDFINISHED"));
 }
 
 void HWNewNet::banPlayer(const QString & nick)
 {
-	RawSendNet(QString("BAN%1%2").arg(delimeter).arg(nick));
+    RawSendNet(QString("BAN%1%2").arg(delimeter).arg(nick));
 }
 
 void HWNewNet::kickPlayer(const QString & nick)
 {
-	RawSendNet(QString("KICK%1%2").arg(delimeter).arg(nick));
+    RawSendNet(QString("KICK%1%2").arg(delimeter).arg(nick));
 }
 
 void HWNewNet::infoPlayer(const QString & nick)
 {
-	RawSendNet(QString("INFO%1%2").arg(delimeter).arg(nick));
+    RawSendNet(QString("INFO%1%2").arg(delimeter).arg(nick));
 }
 
 void HWNewNet::followPlayer(const QString & nick)
 {
-	if (!isInRoom()) {
-		RawSendNet(QString("FOLLOW%1%2").arg(delimeter).arg(nick));
-		isChief = false;
-	}
+    if (!isInRoom()) {
+        RawSendNet(QString("FOLLOW%1%2").arg(delimeter).arg(nick));
+        isChief = false;
+    }
 }
 
 void HWNewNet::startGame()
 {
-	RawSendNet(QString("START_GAME"));
+    RawSendNet(QString("START_GAME"));
 }
 
 void HWNewNet::toggleRestrictJoins()
 {
-	RawSendNet(QString("TOGGLE_RESTRICT_JOINS"));
+    RawSendNet(QString("TOGGLE_RESTRICT_JOINS"));
 }
 
 void HWNewNet::toggleRestrictTeamAdds()
 {
-	RawSendNet(QString("TOGGLE_RESTRICT_TEAMS"));
+    RawSendNet(QString("TOGGLE_RESTRICT_TEAMS"));
 }
 
 void HWNewNet::clearAccountsCache()
 {
-	RawSendNet(QString("CLEAR_ACCOUNTS_CACHE"));
+    RawSendNet(QString("CLEAR_ACCOUNTS_CACHE"));
 }
 
 void HWNewNet::partRoom()
 {
-	netClientState = 2;
-	RawSendNet(QString("PART"));
+    netClientState = 2;
+    RawSendNet(QString("PART"));
 }
 
 bool HWNewNet::isInRoom()
 {
-	return netClientState > 2;
+    return netClientState > 2;
 }
 
 void HWNewNet::newServerMessage(const QString & msg)
 {
-	RawSendNet(QString("SET_SERVER_MESSAGE%1%2").arg(delimeter).arg(msg));
+    RawSendNet(QString("SET_SERVER_MESSAGE%1%2").arg(delimeter).arg(msg));
 }
--- a/QTfrontend/pages.cpp	Sat Mar 06 10:54:24 2010 +0000
+++ b/QTfrontend/pages.cpp	Sat Mar 06 10:59:20 2010 +0000
@@ -66,313 +66,313 @@
   AbstractPage(parent)
 {
     if(frontendEffects) setAttribute(Qt::WA_NoSystemBackground, true);
-	QGridLayout * pageLayout = new QGridLayout(this);
-	//pageLayout->setColumnStretch(0, 1);
-	//pageLayout->setColumnStretch(1, 2);
-	//pageLayout->setColumnStretch(2, 1);
+    QGridLayout * pageLayout = new QGridLayout(this);
+    //pageLayout->setColumnStretch(0, 1);
+    //pageLayout->setColumnStretch(1, 2);
+    //pageLayout->setColumnStretch(2, 1);
 
-	//QPushButton* btnLogo = addButton(":/res/HedgewarsTitle.png", pageLayout, 0, 0, 1, 4, true);
-	//pageLayout->setAlignment(btnLogo, Qt::AlignHCenter);
-	pageLayout->setRowStretch(0, 1);
-	pageLayout->setRowStretch(1, 1);
-	pageLayout->setRowStretch(2, 0);
-	pageLayout->setRowStretch(3, 1);
-	pageLayout->setRowStretch(4, 1);
+    //QPushButton* btnLogo = addButton(":/res/HedgewarsTitle.png", pageLayout, 0, 0, 1, 4, true);
+    //pageLayout->setAlignment(btnLogo, Qt::AlignHCenter);
+    pageLayout->setRowStretch(0, 1);
+    pageLayout->setRowStretch(1, 1);
+    pageLayout->setRowStretch(2, 0);
+    pageLayout->setRowStretch(3, 1);
+    pageLayout->setRowStretch(4, 1);
 
-	BtnSinglePlayer = addButton(":/res/LocalPlay.png", pageLayout, 2, 0, 1, 2, true);
-	BtnSinglePlayer->setToolTip(tr("Local Game (Play a game on a single computer)"));
-	pageLayout->setAlignment(BtnSinglePlayer, Qt::AlignHCenter);
+    BtnSinglePlayer = addButton(":/res/LocalPlay.png", pageLayout, 2, 0, 1, 2, true);
+    BtnSinglePlayer->setToolTip(tr("Local Game (Play a game on a single computer)"));
+    pageLayout->setAlignment(BtnSinglePlayer, Qt::AlignHCenter);
 
-	BtnNet = addButton(":/res/NetworkPlay.png", pageLayout, 2, 2, 1, 2, true);
-	BtnNet->setToolTip(tr("Network Game (Play a game across a network)"));
-	pageLayout->setAlignment(BtnNet, Qt::AlignHCenter);
+    BtnNet = addButton(":/res/NetworkPlay.png", pageLayout, 2, 2, 1, 2, true);
+    BtnNet->setToolTip(tr("Network Game (Play a game across a network)"));
+    pageLayout->setAlignment(BtnNet, Qt::AlignHCenter);
 
-	BtnSetup = addButton(":/res/Settings.png", pageLayout, 4, 3, true);
+    BtnSetup = addButton(":/res/Settings.png", pageLayout, 4, 3, true);
 
-	//BtnInfo = addButton(":/res/About.png", pageLayout, 3, 1, 1, 2, true);
-	BtnInfo = addButton(":/res/HedgewarsTitle.png", pageLayout, 0, 0, 1, 4, true);
-	BtnInfo->setStyleSheet("border: transparent;background: transparent;");
-	pageLayout->setAlignment(BtnInfo, Qt::AlignHCenter);
-	//pageLayout->setAlignment(BtnInfo, Qt::AlignHCenter);
+    //BtnInfo = addButton(":/res/About.png", pageLayout, 3, 1, 1, 2, true);
+    BtnInfo = addButton(":/res/HedgewarsTitle.png", pageLayout, 0, 0, 1, 4, true);
+    BtnInfo->setStyleSheet("border: transparent;background: transparent;");
+    pageLayout->setAlignment(BtnInfo, Qt::AlignHCenter);
+    //pageLayout->setAlignment(BtnInfo, Qt::AlignHCenter);
 
-	BtnExit = addButton(":/res/Exit.png", pageLayout, 4, 0, 1, 1, true);
+    BtnExit = addButton(":/res/Exit.png", pageLayout, 4, 0, 1, 1, true);
 }
 
 PageEditTeam::PageEditTeam(QWidget* parent, SDLInteraction * sdli) :
   AbstractPage(parent)
 {
     mySdli = sdli;
-	QGridLayout * pageLayout = new QGridLayout(this);
-	QTabWidget * tbw = new QTabWidget(this);
-	QWidget * page1 = new QWidget(this);
-	QWidget * page2 = new QWidget(this);
-	tbw->addTab(page1, tr("General"));
-	tbw->addTab(page2, tr("Advanced"));
-	pageLayout->addWidget(tbw, 0, 0, 1, 3);
-	BtnTeamDiscard = addButton(":/res/Exit.png", pageLayout, 1, 0, true);
-	BtnTeamSave = addButton(":/res/Save.png", pageLayout, 1, 2, true);;
-	BtnTeamSave->setStyleSheet("QPushButton{margin: 12px 0px 12px 0px;}");
+    QGridLayout * pageLayout = new QGridLayout(this);
+    QTabWidget * tbw = new QTabWidget(this);
+    QWidget * page1 = new QWidget(this);
+    QWidget * page2 = new QWidget(this);
+    tbw->addTab(page1, tr("General"));
+    tbw->addTab(page2, tr("Advanced"));
+    pageLayout->addWidget(tbw, 0, 0, 1, 3);
+    BtnTeamDiscard = addButton(":/res/Exit.png", pageLayout, 1, 0, true);
+    BtnTeamSave = addButton(":/res/Save.png", pageLayout, 1, 2, true);;
+    BtnTeamSave->setStyleSheet("QPushButton{margin: 12px 0px 12px 0px;}");
 
-	QHBoxLayout * page1Layout = new QHBoxLayout(page1);
-	page1Layout->setAlignment(Qt::AlignTop);
-	QGridLayout * page2Layout = new QGridLayout(page2);
+    QHBoxLayout * page1Layout = new QHBoxLayout(page1);
+    page1Layout->setAlignment(Qt::AlignTop);
+    QGridLayout * page2Layout = new QGridLayout(page2);
 
 // ====== Page 1 ======
-	QVBoxLayout * vbox1 = new QVBoxLayout();
-	QVBoxLayout * vbox2 = new QVBoxLayout();
-	page1Layout->addLayout(vbox1);
-	page1Layout->addLayout(vbox2);
+    QVBoxLayout * vbox1 = new QVBoxLayout();
+    QVBoxLayout * vbox2 = new QVBoxLayout();
+    page1Layout->addLayout(vbox1);
+    page1Layout->addLayout(vbox2);
 
-	GBoxHedgehogs = new QGroupBox(this);
-	GBoxHedgehogs->setTitle(QGroupBox::tr("Team Members"));
-	GBoxHedgehogs->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Fixed);
-	QGridLayout * GBHLayout = new QGridLayout(GBoxHedgehogs);
+    GBoxHedgehogs = new QGroupBox(this);
+    GBoxHedgehogs->setTitle(QGroupBox::tr("Team Members"));
+    GBoxHedgehogs->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Fixed);
+    QGridLayout * GBHLayout = new QGridLayout(GBoxHedgehogs);
 
-	signalMapper = new QSignalMapper(this);
+    signalMapper = new QSignalMapper(this);
 
-	HatsModel * hatsModel = new HatsModel(GBoxHedgehogs);
-	for(int i = 0; i < 8; i++)
-	{
-		HHHats[i] = new QComboBox(GBoxHedgehogs);
-		HHHats[i]->setModel(hatsModel);
-		HHHats[i]->setIconSize(QSize(32, 37));
-		//HHHats[i]->setSizeAdjustPolicy(QComboBox::AdjustToContents);
-		//HHHats[i]->setModelColumn(1);
-		//HHHats[i]->setMinimumWidth(132);
-		GBHLayout->addWidget(HHHats[i], i, 0);
+    HatsModel * hatsModel = new HatsModel(GBoxHedgehogs);
+    for(int i = 0; i < 8; i++)
+    {
+        HHHats[i] = new QComboBox(GBoxHedgehogs);
+        HHHats[i]->setModel(hatsModel);
+        HHHats[i]->setIconSize(QSize(32, 37));
+        //HHHats[i]->setSizeAdjustPolicy(QComboBox::AdjustToContents);
+        //HHHats[i]->setModelColumn(1);
+        //HHHats[i]->setMinimumWidth(132);
+        GBHLayout->addWidget(HHHats[i], i, 0);
 
-		HHNameEdit[i] = new QLineEdit(GBoxHedgehogs);
-		HHNameEdit[i]->setMaxLength(64);
-		HHNameEdit[i]->setMinimumWidth(120);
-		GBHLayout->addWidget(HHNameEdit[i], i, 1);
+        HHNameEdit[i] = new QLineEdit(GBoxHedgehogs);
+        HHNameEdit[i]->setMaxLength(64);
+        HHNameEdit[i]->setMinimumWidth(120);
+        GBHLayout->addWidget(HHNameEdit[i], i, 1);
 
-		randButton[i] = addButton(":/res/dice.png", GBHLayout, i, 3, true);
+        randButton[i] = addButton(":/res/dice.png", GBHLayout, i, 3, true);
 
-		connect(randButton[i], SIGNAL(clicked()), signalMapper, SLOT(map()));
-         	signalMapper->setMapping(randButton[i], i);
+        connect(randButton[i], SIGNAL(clicked()), signalMapper, SLOT(map()));
+            signalMapper->setMapping(randButton[i], i);
 
-	}
+    }
 
-	randTeamButton = addButton(QPushButton::tr("Random Team"), GBHLayout, 9, false);
+    randTeamButton = addButton(QPushButton::tr("Random Team"), GBHLayout, 9, false);
 
-	vbox1->addWidget(GBoxHedgehogs);
+    vbox1->addWidget(GBoxHedgehogs);
 
 
-	GBoxTeam = new QGroupBox(this);
-	GBoxTeam->setTitle(QGroupBox::tr("Team Settings"));
-	GBoxTeam->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Fixed);
-	QGridLayout * GBTLayout = new QGridLayout(GBoxTeam);
-	QLabel * tmpLabel = new QLabel(GBoxTeam);
-	tmpLabel->setText(QLabel::tr("Name"));
-	GBTLayout->addWidget(tmpLabel, 0, 0);
-	tmpLabel = new QLabel(GBoxTeam);
-	tmpLabel->setText(QLabel::tr("Type"));
-	GBTLayout->addWidget(tmpLabel, 1, 0);
-	tmpLabel = new QLabel(GBoxTeam);
-	tmpLabel->setText(QLabel::tr("Grave"));
-	GBTLayout->addWidget(tmpLabel, 2, 0);
-	tmpLabel = new QLabel(GBoxTeam);
-	tmpLabel->setText(QLabel::tr("Flag"));
-	GBTLayout->addWidget(tmpLabel, 3, 0);
-	tmpLabel = new QLabel(GBoxTeam);
-	tmpLabel->setText(QLabel::tr("Voice"));
-	GBTLayout->addWidget(tmpLabel, 4, 0);
+    GBoxTeam = new QGroupBox(this);
+    GBoxTeam->setTitle(QGroupBox::tr("Team Settings"));
+    GBoxTeam->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Fixed);
+    QGridLayout * GBTLayout = new QGridLayout(GBoxTeam);
+    QLabel * tmpLabel = new QLabel(GBoxTeam);
+    tmpLabel->setText(QLabel::tr("Name"));
+    GBTLayout->addWidget(tmpLabel, 0, 0);
+    tmpLabel = new QLabel(GBoxTeam);
+    tmpLabel->setText(QLabel::tr("Type"));
+    GBTLayout->addWidget(tmpLabel, 1, 0);
+    tmpLabel = new QLabel(GBoxTeam);
+    tmpLabel->setText(QLabel::tr("Grave"));
+    GBTLayout->addWidget(tmpLabel, 2, 0);
+    tmpLabel = new QLabel(GBoxTeam);
+    tmpLabel->setText(QLabel::tr("Flag"));
+    GBTLayout->addWidget(tmpLabel, 3, 0);
+    tmpLabel = new QLabel(GBoxTeam);
+    tmpLabel->setText(QLabel::tr("Voice"));
+    GBTLayout->addWidget(tmpLabel, 4, 0);
 
 
-	TeamNameEdit = new QLineEdit(GBoxTeam);
-	TeamNameEdit->setMaxLength(64);
-	GBTLayout->addWidget(TeamNameEdit, 0, 1);
-	vbox2->addWidget(GBoxTeam);
+    TeamNameEdit = new QLineEdit(GBoxTeam);
+    TeamNameEdit->setMaxLength(64);
+    GBTLayout->addWidget(TeamNameEdit, 0, 1);
+    vbox2->addWidget(GBoxTeam);
 
-	CBTeamLvl = new QComboBox(GBoxTeam);
-	CBTeamLvl->setIconSize(QSize(48, 48));
-	CBTeamLvl->addItem(QIcon(":/res/botlevels/0.png"), QComboBox::tr("Human"));
-	for(int i = 5; i > 0; i--)
-		CBTeamLvl->addItem(
-				QIcon(QString(":/res/botlevels/%1.png").arg(6 - i)),
-				QString("%1 %2").arg(QComboBox::tr("Level")).arg(i)
-				);
-	GBTLayout->addWidget(CBTeamLvl, 1, 1);
+    CBTeamLvl = new QComboBox(GBoxTeam);
+    CBTeamLvl->setIconSize(QSize(48, 48));
+    CBTeamLvl->addItem(QIcon(":/res/botlevels/0.png"), QComboBox::tr("Human"));
+    for(int i = 5; i > 0; i--)
+        CBTeamLvl->addItem(
+                QIcon(QString(":/res/botlevels/%1.png").arg(6 - i)),
+                QString("%1 %2").arg(QComboBox::tr("Level")).arg(i)
+                );
+    GBTLayout->addWidget(CBTeamLvl, 1, 1);
 
-	CBGrave = new QComboBox(GBoxTeam);
-	CBGrave->setMaxCount(65535);
-	CBGrave->setIconSize(QSize(32, 32));
-	GBTLayout->addWidget(CBGrave, 2, 1);
+    CBGrave = new QComboBox(GBoxTeam);
+    CBGrave->setMaxCount(65535);
+    CBGrave->setIconSize(QSize(32, 32));
+    GBTLayout->addWidget(CBGrave, 2, 1);
 
-	CBFlag = new QComboBox(GBoxTeam);
-	CBFlag->setMaxCount(65535);
-	CBFlag->setIconSize(QSize(22, 15));
-	GBTLayout->addWidget(CBFlag, 3, 1);
+    CBFlag = new QComboBox(GBoxTeam);
+    CBFlag->setMaxCount(65535);
+    CBFlag->setIconSize(QSize(22, 15));
+    GBTLayout->addWidget(CBFlag, 3, 1);
 
-	{
-		QHBoxLayout * hbox = new QHBoxLayout();
-		CBVoicepack = new QComboBox(GBoxTeam);
-		{
-			QDir tmpdir;
-			tmpdir.cd(datadir->absolutePath());
-			tmpdir.cd("Sounds/voices");
-			QStringList list = tmpdir.entryList(QDir::AllDirs | QDir::NoDotAndDotDot, QDir::Name);
-			CBVoicepack->addItems(list);
-		}
-		hbox->addWidget(CBVoicepack, 100);
-		BtnTestSound = addButton(":/res/PlaySound.png", hbox, 1, true);
-		hbox->setStretchFactor(BtnTestSound, 1);
-		connect(BtnTestSound, SIGNAL(clicked()), this, SLOT(testSound()));
-		GBTLayout->addLayout(hbox, 4, 1);
-	}
+    {
+        QHBoxLayout * hbox = new QHBoxLayout();
+        CBVoicepack = new QComboBox(GBoxTeam);
+        {
+            QDir tmpdir;
+            tmpdir.cd(datadir->absolutePath());
+            tmpdir.cd("Sounds/voices");
+            QStringList list = tmpdir.entryList(QDir::AllDirs | QDir::NoDotAndDotDot, QDir::Name);
+            CBVoicepack->addItems(list);
+        }
+        hbox->addWidget(CBVoicepack, 100);
+        BtnTestSound = addButton(":/res/PlaySound.png", hbox, 1, true);
+        hbox->setStretchFactor(BtnTestSound, 1);
+        connect(BtnTestSound, SIGNAL(clicked()), this, SLOT(testSound()));
+        GBTLayout->addLayout(hbox, 4, 1);
+    }
 
-	GBoxFort = new QGroupBox(this);
-	GBoxFort->setTitle(QGroupBox::tr("Fort"));
-	QGridLayout * GBFLayout = new QGridLayout(GBoxFort);
-	CBFort = new QComboBox(GBoxFort);
-	CBFort->setMaxCount(65535);
-	GBFLayout->addWidget(CBFort, 0, 0);
-	FortPreview = new SquareLabel(GBoxFort);
-	FortPreview->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding);
-	FortPreview->setMinimumSize(128, 128);
-	FortPreview->setPixmap(QPixmap());
+    GBoxFort = new QGroupBox(this);
+    GBoxFort->setTitle(QGroupBox::tr("Fort"));
+    QGridLayout * GBFLayout = new QGridLayout(GBoxFort);
+    CBFort = new QComboBox(GBoxFort);
+    CBFort->setMaxCount(65535);
+    GBFLayout->addWidget(CBFort, 0, 0);
+    FortPreview = new SquareLabel(GBoxFort);
+    FortPreview->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding);
+    FortPreview->setMinimumSize(128, 128);
+    FortPreview->setPixmap(QPixmap());
     // perhaps due to handling its own paintevents, SquareLabel doesn't play nice with the stars
     //FortPreview->setAttribute(Qt::WA_PaintOnScreen, true);
-	GBFLayout->addWidget(FortPreview, 1, 0);
-	vbox2->addWidget(GBoxFort);
+    GBFLayout->addWidget(FortPreview, 1, 0);
+    vbox2->addWidget(GBoxFort);
 
-	QDir tmpdir;
-	tmpdir.cd(datadir->absolutePath());
-	tmpdir.cd("Forts");
-	tmpdir.setFilter(QDir::Files);
+    QDir tmpdir;
+    tmpdir.cd(datadir->absolutePath());
+    tmpdir.cd("Forts");
+    tmpdir.setFilter(QDir::Files);
 
-	connect(CBFort, SIGNAL(currentIndexChanged(const QString &)), this, SLOT(CBFort_activated(const QString &)));
-	CBFort->addItems(tmpdir.entryList(QStringList("*L.png")).replaceInStrings(QRegExp("^(.*)L\\.png"), "\\1"));
+    connect(CBFort, SIGNAL(currentIndexChanged(const QString &)), this, SLOT(CBFort_activated(const QString &)));
+    CBFort->addItems(tmpdir.entryList(QStringList("*L.png")).replaceInStrings(QRegExp("^(.*)L\\.png"), "\\1"));
 
-	tmpdir.cd("../Graphics/Graves");
-	QStringList list = tmpdir.entryList(QStringList("*.png"));
-	for (QStringList::Iterator it = list.begin(); it != list.end(); ++it )
-	{
-		QPixmap pix(datadir->absolutePath() + "/Graphics/Graves/" + *it);
-		QIcon icon(pix.copy(0, 0, 32, 32));
-		CBGrave->addItem(icon, (*it).replace(QRegExp("^(.*)\\.png"), "\\1"));
-	}
+    tmpdir.cd("../Graphics/Graves");
+    QStringList list = tmpdir.entryList(QStringList("*.png"));
+    for (QStringList::Iterator it = list.begin(); it != list.end(); ++it )
+    {
+        QPixmap pix(datadir->absolutePath() + "/Graphics/Graves/" + *it);
+        QIcon icon(pix.copy(0, 0, 32, 32));
+        CBGrave->addItem(icon, (*it).replace(QRegExp("^(.*)\\.png"), "\\1"));
+    }
 
-	tmpdir.cd(datadir->absolutePath());
-	tmpdir.cd("Graphics/Flags");
-	list = tmpdir.entryList(QStringList("*.png"));
-	for (QStringList::Iterator it = list.begin(); it != list.end(); ++it )
-	{
-		QPixmap pix(datadir->absolutePath() + "/Graphics/Flags/" + *it);
-		QIcon icon(pix.copy(0, 0, 22, 15));
-		if(it->compare("cpu.png")) // skip cpu flag
-			CBFlag->addItem(icon, (*it).replace(QRegExp("^(.*)\\.png"), "\\1"));
-	}
+    tmpdir.cd(datadir->absolutePath());
+    tmpdir.cd("Graphics/Flags");
+    list = tmpdir.entryList(QStringList("*.png"));
+    for (QStringList::Iterator it = list.begin(); it != list.end(); ++it )
+    {
+        QPixmap pix(datadir->absolutePath() + "/Graphics/Flags/" + *it);
+        QIcon icon(pix.copy(0, 0, 22, 15));
+        if(it->compare("cpu.png")) // skip cpu flag
+            CBFlag->addItem(icon, (*it).replace(QRegExp("^(.*)\\.png"), "\\1"));
+    }
 
-	vbox1->addStretch();
-	vbox2->addStretch();
+    vbox1->addStretch();
+    vbox2->addStretch();
 
 // ====== Page 2 ======
-	GBoxBinds = new QGroupBox(this);
-	GBoxBinds->setTitle(QGroupBox::tr("Key binds"));
-	QGridLayout * GBBLayout = new QGridLayout(GBoxBinds);
-	BindsBox = new QToolBox(GBoxBinds);
-	BindsBox->setLineWidth(0);
-	GBBLayout->addWidget(BindsBox);
-	page2Layout->addWidget(GBoxBinds, 0, 0);
+    GBoxBinds = new QGroupBox(this);
+    GBoxBinds->setTitle(QGroupBox::tr("Key binds"));
+    QGridLayout * GBBLayout = new QGridLayout(GBoxBinds);
+    BindsBox = new QToolBox(GBoxBinds);
+    BindsBox->setLineWidth(0);
+    GBBLayout->addWidget(BindsBox);
+    page2Layout->addWidget(GBoxBinds, 0, 0);
 
-	quint16 i = 0;
-	quint16 num = 0;
-	QWidget * curW = NULL;
-	QGridLayout * pagelayout = NULL;
-	QLabel* l = NULL;
-	while (i < BINDS_NUMBER) {
-		if(cbinds[i].category != NULL)
-		{
-			if(curW != NULL)
-			{
-				l = new QLabel(curW);
-				l->setText("");
-				pagelayout->addWidget(l, num++, 0, 1, 2);
-			}
-			curW = new QWidget(this);
-			BindsBox->addItem(curW, QApplication::translate("binds (categories)", cbinds[i].category));
-			pagelayout = new QGridLayout(curW);
-			num = 0;
-		}
-		if(cbinds[i].description != NULL)
-		{
-			l = new QLabel(curW);
-			l->setText((num > 0 ? QString("\n") : QString("")) + QApplication::translate("binds (descriptions)", cbinds[i].description));
-			pagelayout->addWidget(l, num++, 0, 1, 2);
-		}
+    quint16 i = 0;
+    quint16 num = 0;
+    QWidget * curW = NULL;
+    QGridLayout * pagelayout = NULL;
+    QLabel* l = NULL;
+    while (i < BINDS_NUMBER) {
+        if(cbinds[i].category != NULL)
+        {
+            if(curW != NULL)
+            {
+                l = new QLabel(curW);
+                l->setText("");
+                pagelayout->addWidget(l, num++, 0, 1, 2);
+            }
+            curW = new QWidget(this);
+            BindsBox->addItem(curW, QApplication::translate("binds (categories)", cbinds[i].category));
+            pagelayout = new QGridLayout(curW);
+            num = 0;
+        }
+        if(cbinds[i].description != NULL)
+        {
+            l = new QLabel(curW);
+            l->setText((num > 0 ? QString("\n") : QString("")) + QApplication::translate("binds (descriptions)", cbinds[i].description));
+            pagelayout->addWidget(l, num++, 0, 1, 2);
+        }
 
-		l = new QLabel(curW);
-		l->setText(QApplication::translate("binds", cbinds[i].name));
-		l->setAlignment(Qt::AlignRight);
-		pagelayout->addWidget(l, num, 0);
-		CBBind[i] = new QComboBox(curW);
-		for(int j = 0; sdlkeys[j][1][0] != '\0'; j++)
-			CBBind[i]->addItem(QApplication::translate("binds (keys)", sdlkeys[j][1]).contains(": ") ? QApplication::translate("binds (keys)", sdlkeys[j][1]) : QApplication::translate("binds (keys)", "Keyboard") + QString(": ") + QApplication::translate("binds (keys)", sdlkeys[j][1]), sdlkeys[j][0]);
-		pagelayout->addWidget(CBBind[i++], num++, 1);
-	}
+        l = new QLabel(curW);
+        l->setText(QApplication::translate("binds", cbinds[i].name));
+        l->setAlignment(Qt::AlignRight);
+        pagelayout->addWidget(l, num, 0);
+        CBBind[i] = new QComboBox(curW);
+        for(int j = 0; sdlkeys[j][1][0] != '\0'; j++)
+            CBBind[i]->addItem(QApplication::translate("binds (keys)", sdlkeys[j][1]).contains(": ") ? QApplication::translate("binds (keys)", sdlkeys[j][1]) : QApplication::translate("binds (keys)", "Keyboard") + QString(": ") + QApplication::translate("binds (keys)", sdlkeys[j][1]), sdlkeys[j][0]);
+        pagelayout->addWidget(CBBind[i++], num++, 1);
+    }
 }
 
 void PageEditTeam::CBFort_activated(const QString & fortname)
 {
-	QPixmap pix(datadir->absolutePath() + "/Forts/" + fortname + "L.png");
-	FortPreview->setPixmap(pix);
+    QPixmap pix(datadir->absolutePath() + "/Forts/" + fortname + "L.png");
+    FortPreview->setPixmap(pix);
 }
 
 void PageEditTeam::testSound()
 {
-	Mix_Chunk *sound;
-	QDir tmpdir;
-	mySdli->SDLMusicInit();
-	
-	tmpdir.cd(datadir->absolutePath());
-	tmpdir.cd("Sounds/voices");
-	tmpdir.cd(CBVoicepack->currentText());
-	QStringList list = tmpdir.entryList(QStringList() << "Illgetyou.ogg" << "Incoming.ogg" << "Stupid.ogg" << "Coward.ogg" << "Firstblood.ogg", QDir::Files);
-	if (list.size()) {
-		sound = Mix_LoadWAV(QString(tmpdir.absolutePath() + "/" + list[rand() % list.size()]).toLocal8Bit().constData());
-		Mix_PlayChannel(-1, sound, 0);
-	}
+    Mix_Chunk *sound;
+    QDir tmpdir;
+    mySdli->SDLMusicInit();
+    
+    tmpdir.cd(datadir->absolutePath());
+    tmpdir.cd("Sounds/voices");
+    tmpdir.cd(CBVoicepack->currentText());
+    QStringList list = tmpdir.entryList(QStringList() << "Illgetyou.ogg" << "Incoming.ogg" << "Stupid.ogg" << "Coward.ogg" << "Firstblood.ogg", QDir::Files);
+    if (list.size()) {
+        sound = Mix_LoadWAV(QString(tmpdir.absolutePath() + "/" + list[rand() % list.size()]).toLocal8Bit().constData());
+        Mix_PlayChannel(-1, sound, 0);
+    }
 }
 
 PageMultiplayer::PageMultiplayer(QWidget* parent) :
   AbstractPage(parent)
 {
-	QGridLayout * pageLayout = new QGridLayout(this);
+    QGridLayout * pageLayout = new QGridLayout(this);
 
-	BtnBack = addButton(":/res/Exit.png", pageLayout, 2, 0, true);
+    BtnBack = addButton(":/res/Exit.png", pageLayout, 2, 0, true);
 
-	gameCFG = new GameCFGWidget(this);
-	pageLayout->addWidget(gameCFG, 0, 0, 1, 2);
+    gameCFG = new GameCFGWidget(this);
+    pageLayout->addWidget(gameCFG, 0, 0, 1, 2);
 
-	pageLayout->setRowStretch(1, 1);
+    pageLayout->setRowStretch(1, 1);
 
-	teamsSelect = new TeamSelWidget(this);
-	pageLayout->addWidget(teamsSelect, 0, 2, 2, 2);
+    teamsSelect = new TeamSelWidget(this);
+    pageLayout->addWidget(teamsSelect, 0, 2, 2, 2);
 
-	BtnStartMPGame = addButton(tr("Start"), pageLayout, 2, 3);
+    BtnStartMPGame = addButton(tr("Start"), pageLayout, 2, 3);
 }
 
 PageOptions::PageOptions(QWidget* parent) :
   AbstractPage(parent)
 {
-	QGridLayout * pageLayout = new QGridLayout(this);
-	pageLayout->setColumnStretch(0, 100);
-	pageLayout->setColumnStretch(1, 100);
-	pageLayout->setColumnStretch(2, 100);
-	pageLayout->setRowStretch(0, 0);
-	pageLayout->setRowStretch(1, 100);
-	pageLayout->setRowStretch(2, 0);
-	pageLayout->setContentsMargins(7, 7, 7, 0);
-	pageLayout->setSpacing(0);
+    QGridLayout * pageLayout = new QGridLayout(this);
+    pageLayout->setColumnStretch(0, 100);
+    pageLayout->setColumnStretch(1, 100);
+    pageLayout->setColumnStretch(2, 100);
+    pageLayout->setRowStretch(0, 0);
+    pageLayout->setRowStretch(1, 100);
+    pageLayout->setRowStretch(2, 0);
+    pageLayout->setContentsMargins(7, 7, 7, 0);
+    pageLayout->setSpacing(0);
 
 
-	QGroupBox * gbTwoBoxes = new QGroupBox(this);
-	pageLayout->addWidget(gbTwoBoxes, 0, 0, 1, 3);
-	QGridLayout * gbTBLayout = new QGridLayout(gbTwoBoxes);
-	gbTBLayout->setMargin(0);
-	gbTBLayout->setSpacing(0);
-	gbTBLayout->setAlignment(Qt::AlignTop | Qt::AlignLeft);
+    QGroupBox * gbTwoBoxes = new QGroupBox(this);
+    pageLayout->addWidget(gbTwoBoxes, 0, 0, 1, 3);
+    QGridLayout * gbTBLayout = new QGridLayout(gbTwoBoxes);
+    gbTBLayout->setMargin(0);
+    gbTBLayout->setSpacing(0);
+    gbTBLayout->setAlignment(Qt::AlignTop | Qt::AlignLeft);
         {
             teamsBox = new IconedGroupBox(this);
             //teamsBox->setContentTopPadding(0);
@@ -445,7 +445,7 @@
             tmpdir.cd("Locale");
             tmpdir.setFilter(QDir::Files);
             QStringList locs = tmpdir.entryList(QStringList("hedgewars_*.qm"));
-			CBLanguage->addItem(QComboBox::tr("(System default)"), QString(""));
+            CBLanguage->addItem(QComboBox::tr("(System default)"), QString(""));
             for(int i = 0; i < locs.count(); i++)
             {
                 QLocale loc(locs[i].replace(QRegExp("hedgewars_(.*)\\.qm"), "\\1"));
@@ -567,458 +567,458 @@
             hr->setFixedHeight(12);
             GBAlayout->addWidget(hr);
 
-	            QLabel *restartNote = new QLabel(this);
+                QLabel *restartNote = new QLabel(this);
             restartNote->setText(QString("* ") + QLabel::tr("Restart game to apply"));
             GBAlayout->addWidget(restartNote);
 
             gbTBLayout->addWidget(AGGroupBox, 0, 1, 3, 1);
         }
 
-	BtnSaveOptions = addButton(":/res/Save.png", pageLayout, 2, 2, true);
-	BtnSaveOptions->setStyleSheet("QPushButton{margin: 12px 0px 12px 0px;}");
+    BtnSaveOptions = addButton(":/res/Save.png", pageLayout, 2, 2, true);
+    BtnSaveOptions->setStyleSheet("QPushButton{margin: 12px 0px 12px 0px;}");
 
-	BtnBack = addButton(":/res/Exit.png", pageLayout, 2, 0, true);
+    BtnBack = addButton(":/res/Exit.png", pageLayout, 2, 0, true);
 }
 
 PageNet::PageNet(QWidget* parent) : AbstractPage(parent)
 {
-	QFont * font14 = new QFont("MS Shell Dlg", 14);
-	QGridLayout * pageLayout = new QGridLayout(this);
-	pageLayout->setColumnStretch(0, 1);
-	pageLayout->setColumnStretch(1, 1);
-	pageLayout->setColumnStretch(2, 1);
+    QFont * font14 = new QFont("MS Shell Dlg", 14);
+    QGridLayout * pageLayout = new QGridLayout(this);
+    pageLayout->setColumnStretch(0, 1);
+    pageLayout->setColumnStretch(1, 1);
+    pageLayout->setColumnStretch(2, 1);
 
-	BtnNetSvrStart = new QPushButton(this);
-	BtnNetSvrStart->setFont(*font14);
-	BtnNetSvrStart->setText(QPushButton::tr("Start server"));
-	BtnNetSvrStart->setVisible(haveServer);
-	pageLayout->addWidget(BtnNetSvrStart, 4, 2);
+    BtnNetSvrStart = new QPushButton(this);
+    BtnNetSvrStart->setFont(*font14);
+    BtnNetSvrStart->setText(QPushButton::tr("Start server"));
+    BtnNetSvrStart->setVisible(haveServer);
+    pageLayout->addWidget(BtnNetSvrStart, 4, 2);
 
-	BtnBack = addButton(":/res/Exit.png", pageLayout, 4, 0, true);
+    BtnBack = addButton(":/res/Exit.png", pageLayout, 4, 0, true);
 
-	ConnGroupBox = new QGroupBox(this);
-	ConnGroupBox->setTitle(QGroupBox::tr("Net game"));
-	pageLayout->addWidget(ConnGroupBox, 2, 0, 1, 3);
-	GBClayout = new QGridLayout(ConnGroupBox);
-	GBClayout->setColumnStretch(0, 1);
-	GBClayout->setColumnStretch(1, 1);
-	GBClayout->setColumnStretch(2, 1);
+    ConnGroupBox = new QGroupBox(this);
+    ConnGroupBox->setTitle(QGroupBox::tr("Net game"));
+    pageLayout->addWidget(ConnGroupBox, 2, 0, 1, 3);
+    GBClayout = new QGridLayout(ConnGroupBox);
+    GBClayout->setColumnStretch(0, 1);
+    GBClayout->setColumnStretch(1, 1);
+    GBClayout->setColumnStretch(2, 1);
 
-	BtnNetConnect = new QPushButton(ConnGroupBox);
-	BtnNetConnect->setFont(*font14);
-	BtnNetConnect->setText(QPushButton::tr("Connect"));
-	GBClayout->addWidget(BtnNetConnect, 2, 2);
+    BtnNetConnect = new QPushButton(ConnGroupBox);
+    BtnNetConnect->setFont(*font14);
+    BtnNetConnect->setText(QPushButton::tr("Connect"));
+    GBClayout->addWidget(BtnNetConnect, 2, 2);
 
-	tvServersList = new QTableView(ConnGroupBox);
-	tvServersList->setSelectionBehavior(QAbstractItemView::SelectRows);
-	GBClayout->addWidget(tvServersList, 1, 0, 1, 3);
+    tvServersList = new QTableView(ConnGroupBox);
+    tvServersList->setSelectionBehavior(QAbstractItemView::SelectRows);
+    GBClayout->addWidget(tvServersList, 1, 0, 1, 3);
 
-	BtnUpdateSList = new QPushButton(ConnGroupBox);
-	BtnUpdateSList->setFont(*font14);
-	BtnUpdateSList->setText(QPushButton::tr("Update"));
-	GBClayout->addWidget(BtnUpdateSList, 2, 0);
+    BtnUpdateSList = new QPushButton(ConnGroupBox);
+    BtnUpdateSList->setFont(*font14);
+    BtnUpdateSList->setText(QPushButton::tr("Update"));
+    GBClayout->addWidget(BtnUpdateSList, 2, 0);
 
-	BtnSpecifyServer = new QPushButton(ConnGroupBox);
-	BtnSpecifyServer->setFont(*font14);
-	BtnSpecifyServer->setText(QPushButton::tr("Specify"));
-	GBClayout->addWidget(BtnSpecifyServer, 2, 1);
+    BtnSpecifyServer = new QPushButton(ConnGroupBox);
+    BtnSpecifyServer->setFont(*font14);