Merge
authorunc0rr
Tue, 29 Jan 2013 10:10:23 +0400
changeset 8457 071d118b3283
parent 8455 c86c7d1fc9fc (diff)
parent 8433 3b318a130a62 (current diff)
child 8458 a7ff58c92d2e
Merge
--- a/ChangeLog.txt	Fri Jan 25 13:29:20 2013 +0400
+++ b/ChangeLog.txt	Tue Jan 29 10:10:23 2013 +0400
@@ -28,7 +28,7 @@
  * Fix all knowns bugs which caused network game hang when players close engine or quit
  * Fix drill strike bug when drill's timer gets ridiculously high value instead of explosion
  * Fix some crashes, freezes and memory leaks in frontend and engine
- 
+
 0.9.16 -> 0.9.17:
  + New theme, Cave
  + New voicepack, Hillbilly
@@ -401,7 +401,7 @@
  + AI updates
  + Teams now work in fort mode, i.e. 2v2
  + Ability to attack whilst jumping/rope swinging
- + Some weapons can only be used after a certain number of turns 
+ + Some weapons can only be used after a certain number of turns
  + Lots of new graphics
  * Many network/gameplay bug fixes
 
--- a/QTfrontend/CMakeLists.txt	Fri Jan 25 13:29:20 2013 +0400
+++ b/QTfrontend/CMakeLists.txt	Tue Jan 29 10:10:23 2013 +0400
@@ -123,6 +123,7 @@
 file(GLOB ModelHdr model/*.h)
 file(GLOB NetHdr net/*.h)
 file(GLOB_RECURSE UIhdr ui/*.h)
+list(REMOVE_ITEM UIhdr "${CMAKE_CURRENT_SOURCE_DIR}/ui/widget/flowlayout.h")
 file(GLOB UtilHdr util/*.h)
 
 
@@ -138,7 +139,6 @@
     team.h
     util/DataManager.h
     util/LibavInteraction.h
-    util/MessageDialog.h
     )
 
 set(hwfr_hdrs
--- a/QTfrontend/campaign.cpp	Fri Jan 25 13:29:20 2013 +0400
+++ b/QTfrontend/campaign.cpp	Tue Jan 29 10:10:23 2013 +0400
@@ -59,7 +59,7 @@
     QSettings campfile("physfs://Missions/Campaign/" + campaign + "/campaign.ini", QSettings::IniFormat, 0);
     campfile.setIniCodec("UTF-8");
     unsigned int mNum = campfile.value("MissionNum", 0).toInt();
-    
+
     QStringList missionList;
     for (unsigned int i = 0; i < mNum; i++)
     {
@@ -67,7 +67,7 @@
     }
     return missionList;
 }
-  
+
 unsigned int getCampProgress(QString & teamName, QString & campName)
 {
     QSettings teamfile(cfgdir->absolutePath() + "/Teams/" + teamName + ".hwt", QSettings::IniFormat, 0);
@@ -81,10 +81,3 @@
     campfile.setIniCodec("UTF-8");
     return campfile.value(QString("Mission %1/Script").arg(mNum)).toString();
 }
-
-
-    
-
-
-
-    
--- a/QTfrontend/game.cpp	Fri Jan 25 13:29:20 2013 +0400
+++ b/QTfrontend/game.cpp	Tue Jan 29 10:10:23 2013 +0400
@@ -60,7 +60,7 @@
     switch (gameType)
     {
         case gtDemo:
-            // for video recording we need demo anyway 
+            // for video recording we need demo anyway
             emit HaveRecord(rtNeither, demo);
             break;
         case gtNet:
@@ -83,7 +83,7 @@
     {
         QString value = config->value(QString("Binds/%1").arg(cbinds[i].action), cbinds[i].strbind).toString();
         if (value.isEmpty() || value == "default") continue;
-        
+
         QString bind = QString("edbind " + value + " " + cbinds[i].action);
         HWProto::addStringToBuffer(*buf, bind);
     }
@@ -124,7 +124,7 @@
             ;
         }
     }
-    
+
     RawSendIPC(buf);
 }
 
@@ -171,7 +171,7 @@
     HWProto::addStringToBuffer(teamscfg, QString("eammreinf %1").arg(cDefaultAmmoStore->mid(3 * cAmmoNumber, cAmmoNumber)));
     HWProto::addStringToBuffer(teamscfg, QString("eammstore"));
     HWProto::addStringToBuffer(teamscfg, QString("eammstore"));
-    
+
     RawSendIPC(teamscfg);
 }
 
--- a/QTfrontend/gameuiconfig.cpp	Fri Jan 25 13:29:20 2013 +0400
+++ b/QTfrontend/gameuiconfig.cpp	Tue Jan 29 10:10:23 2013 +0400
@@ -83,7 +83,7 @@
             Form->ui.pageOptions->CBResolution->setCurrentIndex(0);
     }
     else Form->ui.pageOptions->CBResolution->setCurrentIndex(t);
-    
+
     // Default the windowed resolution to 5/6 of the screen size
     int screenWidth = SDL_GetVideoInfo()->current_w * 5 / 6;
     int screenHeight = SDL_GetVideoInfo()->current_h * 5 / 6;
@@ -96,7 +96,7 @@
     wHeight = (wHeight == "" ? heightStr : wHeight);
     Form->ui.pageOptions->windowWidthEdit->setText(wWidth);
     Form->ui.pageOptions->windowHeightEdit->setText(wHeight);
-    
+
     Form->ui.pageOptions->CBResolution->setCurrentIndex((t < 0) ? 1 : t);
     Form->ui.pageOptions->CBFullscreen->setChecked(value("video/fullscreen", false).toBool());
     bool ffscr=value("frontend/fullscreen", false).toBool();
@@ -263,7 +263,7 @@
 
     setValue("net/nick", netNick());
     if (netPasswordIsValid() && Form->ui.pageOptions->CBSavePassword->isChecked()) {
-	setPasswordHash(netPasswordHash());
+        setPasswordHash(netPasswordHash());
     }
     else if(!Form->ui.pageOptions->CBSavePassword->isChecked()) {
         clearPasswordHash();
@@ -372,7 +372,7 @@
     std::pair<QRect, QRect> result = vid_ResolutionPair();
     if(Form->ui.pageOptions->CBFullscreen->isChecked())
         return result.first;
-    else 
+    else
         return result.second;
 }
 
@@ -515,7 +515,7 @@
     return (netPasswordLength() == 0 || Form->ui.pageOptions->editNetPassword->text() != QString(netPasswordLength(), '*'));
 }
 
-void GameUIConfig::clearPasswordHash() 
+void GameUIConfig::clearPasswordHash()
 {
     setValue("net/passwordhash", QString());
     setValue("net/passwordlength", 0);
@@ -535,7 +535,7 @@
     return value("net/passwordhash").toString();
 }
 
-void GameUIConfig::clearTempHash() 
+void GameUIConfig::clearTempHash()
 {
     setTempHash(QString());
 }
--- a/QTfrontend/gameuiconfig.h	Fri Jan 25 13:29:20 2013 +0400
+++ b/QTfrontend/gameuiconfig.h	Tue Jan 29 10:10:23 2013 +0400
@@ -97,7 +97,7 @@
     private:
         bool netPasswordIsValid();
         bool eventFilter(QObject *object, QEvent *event);
-	    QString temphash;
+        QString temphash;
         QList<BindAction> m_binds;
 };
 
--- a/QTfrontend/hwform.cpp	Fri Jan 25 13:29:20 2013 +0400
+++ b/QTfrontend/hwform.cpp	Tue Jan 29 10:10:23 2013 +0400
@@ -155,6 +155,7 @@
     playerHash = QString(QCryptographicHash::hash(config->value("net/nick","").toString().toUtf8(), QCryptographicHash::Md5).toHex());
 
     ui.pageRoomsList->setSettings(config);
+    ui.pageNetGame->setSettings(config);
     ui.pageNetGame->chatWidget->setSettings(config);
     ui.pageRoomsList->chatWidget->setSettings(config);
     ui.pageOptions->setConfig(config);
@@ -592,11 +593,11 @@
 #ifdef USE_XFIRE
     updateXfire();
 #endif
-    
+
     qDebug("Leaving %s, entering %s", qPrintable(stringifyPageId(lastid)), qPrintable(stringifyPageId(id)));
 
     // pageEnter and pageLeave events
-    ((AbstractPage*)ui.Pages->widget(lastid))->triggerPageLeave();    
+    ((AbstractPage*)ui.Pages->widget(lastid))->triggerPageLeave();
     ((AbstractPage*)ui.Pages->widget(id))->triggerPageEnter();
 
     if (id == ID_PAGE_DATADOWNLOAD)
@@ -1096,10 +1097,10 @@
     if (!ok || newNick.isEmpty())
     {
         //ForcedDisconnect(tr("No nickname supplied."));
-	bool retry = RetryDialog(tr("Hedgewars - Empty nickname"), tr("No nickname supplied."));
-	GoBack();
+    bool retry = RetryDialog(tr("Hedgewars - Empty nickname"), tr("No nickname supplied."));
+    GoBack();
         if (retry) {
-       	   NetConnectOfficialServer();
+            NetConnectOfficialServer();
         }
         return;
     }
@@ -1259,6 +1260,8 @@
             hwnet, SLOT(infoPlayer(const QString&)));
     connect(ui.pageNetGame->chatWidget, SIGNAL(follow(const QString&)),
             hwnet, SLOT(followPlayer(const QString&)));
+    connect(ui.pageNetGame->chatWidget, SIGNAL(consoleCommand(const QString&)),
+            hwnet, SLOT(consoleCommand(const QString&)));
     connect(ui.pageRoomsList->chatWidget, SIGNAL(kick(const QString&)),
             hwnet, SLOT(kickPlayer(const QString&)));
     connect(ui.pageRoomsList->chatWidget, SIGNAL(ban(const QString&)),
@@ -1276,7 +1279,7 @@
     connect(hwnet, SIGNAL(chatStringLobby(const QString&)),
             ui.pageRoomsList->chatWidget, SLOT(onChatString(const QString&)), Qt::QueuedConnection);
     connect(hwnet, SIGNAL(chatStringLobby(const QString&, const QString&)),
-            ui.pageRoomsList->chatWidget, SLOT(onChatString(const QString&, const QString&)));
+            ui.pageRoomsList->chatWidget, SLOT(onChatString(const QString&, const QString&)), Qt::QueuedConnection);
     connect(hwnet, SIGNAL(chatStringFromMeLobby(const QString&)),
             ui.pageRoomsList->chatWidget, SLOT(onChatString(const QString&)), Qt::QueuedConnection);
 
@@ -1490,7 +1493,7 @@
         }
         else {
             while (ui.Pages->currentIndex() != ID_PAGE_NET
-                && ui.Pages->currentIndex() != ID_PAGE_MAIN) 
+                && ui.Pages->currentIndex() != ID_PAGE_MAIN)
             {
                 GoBack();
             }
@@ -1927,10 +1930,10 @@
         MessageDialog::ShowErrorMessage(QMessageBox::tr("File association failed."), this);
 }
 
-void HWForm::openRegistrationPage() 
+void HWForm::openRegistrationPage()
 {
     QDesktopServices::openUrl(QUrl("http://www.hedgewars.org/user/register"));
-}    
+}
 
 void HWForm::saveDemoWithCustomName()
 {
--- a/QTfrontend/hwform.h	Fri Jan 25 13:29:20 2013 +0400
+++ b/QTfrontend/hwform.h	Tue Jan 29 10:10:23 2013 +0400
@@ -109,7 +109,7 @@
         void NetNickNotRegistered(const QString & nick);
         void NetNickTaken(const QString & nick);
         void NetAuthFailed();
-	bool RetryDialog(const QString & title, const QString & label);
+        bool RetryDialog(const QString & title, const QString & label);
         void NetTeamAccepted(const QString& team);
         void AddNetTeam(const HWTeam& team);
         void RemoveNetTeam(const HWTeam& team);
@@ -174,7 +174,7 @@
             ID_PAGE_CAMPAIGN       ,
             ID_PAGE_DRAWMAP        ,
             ID_PAGE_DATADOWNLOAD   ,
-            ID_PAGE_VIDEOS	   ,
+            ID_PAGE_VIDEOS         ,
             MAX_PAGE
         };
         QPointer<HWGame> game;
--- a/QTfrontend/model/HatModel.cpp	Fri Jan 25 13:29:20 2013 +0400
+++ b/QTfrontend/model/HatModel.cpp	Tue Jan 29 10:10:23 2013 +0400
@@ -76,9 +76,9 @@
 
         QString str = hatsList.at(i);
         str = str.remove(QRegExp("\\.png$"));
-        QPixmap pix(            
+        QPixmap pix(
                 "physfs://Graphics/Hats/" + QString(isReserved?"Reserved/":"") + str +
-                ".png"           
+                ".png"
         );
 
         // rename properly
--- a/QTfrontend/model/ThemeModel.cpp	Fri Jan 25 13:29:20 2013 +0400
+++ b/QTfrontend/model/ThemeModel.cpp	Tue Jan 29 10:10:23 2013 +0400
@@ -101,4 +101,4 @@
 
 
     endResetModel();
-}
\ No newline at end of file
+}
--- a/QTfrontend/net/newnetclient.cpp	Fri Jan 25 13:29:20 2013 +0400
+++ b/QTfrontend/net/newnetclient.cpp	Tue Jan 29 10:10:23 2013 +0400
@@ -1025,4 +1025,4 @@
 QAbstractItemModel *HWNewNet::roomPlayersModel()
 {
     return m_roomPlayersModel;
-}
\ No newline at end of file
+}
--- a/QTfrontend/net/newnetclient.h	Fri Jan 25 13:29:20 2013 +0400
+++ b/QTfrontend/net/newnetclient.h	Tue Jan 29 10:10:23 2013 +0400
@@ -161,7 +161,7 @@
         void toggleRestrictJoins();
         void toggleRestrictTeamAdds();
         void partRoom();
-        void clearAccountsCache();        
+        void clearAccountsCache();
         void getBanList();
         void removeBan(const QString &);
         void banIP(const QString & ip, const QString & reason, int seconds);
--- a/QTfrontend/net/recorder.cpp	Fri Jan 25 13:29:20 2013 +0400
+++ b/QTfrontend/net/recorder.cpp	Tue Jan 29 10:10:23 2013 +0400
@@ -136,7 +136,7 @@
     arguments << prefix;
     arguments << config->AVFormat();
     arguments << config->videoCodec();
-// Could use a field to use quality instead. maybe quality could override bitrate - or just pass (and set) both. 
+// Could use a field to use quality instead. maybe quality could override bitrate - or just pass (and set) both.
 // The library does support using both at once after all.
     arguments << QString::number(config->rec_Bitrate()*1024);
     arguments << (config->recordAudio() ? config->audioCodec() : "no");
--- a/QTfrontend/res/html/about.html	Fri Jan 25 13:29:20 2013 +0400
+++ b/QTfrontend/res/html/about.html	Tue Jan 29 10:10:23 2013 +0400
@@ -8,8 +8,8 @@
 </style>
 </head>
 <body>
-	<h2>Developers:</h2>
-	<p>
+    <h2>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>
@@ -30,8 +30,10 @@
         WebGL port, some pas2c and GLES2 work: Meng Xiangyun &lt;<a href="mailto:xymengxy@gmail.com">xymengxy@gmail.com</a>&gt;<br>
         Video recording: Stepan Podoskin &lt;<a href="mailto:stepik-777@mail.ru">stepik-777@mail.ru</a>&gt;<br>
         Campaign support, first campaign: Szabolcs Orb&agrave;n &lt;<a href="mailto:szabibibi@gmail.com">szabibibi@gmail.com</a>&gt;<br>
+        Keybinds, feedback, maps and hats interfaces: Drew Gottlieb &lt;<a href="mailto:gottlieb.drew@gmail.com">gottlieb.drew@gmail.com</a>&gt;<br>
+        Login dialogs, frontend improvements: Ondrej Skopek &lt;<a href="mailto:skopekondrej@gmail.com">skopekondrej@gmail.com</a>&gt;<br>
         </p>
-        
+
         <h2>Art:</h2>
             <p>John Dum &lt;<a href="mailto:fizzy@gmail.com">fizzy@gmail.com</a>&gt;
             <br>
@@ -49,7 +51,7 @@
             <br>
             Hats: Trey Perry &lt;<a href="mailto:tx.perry.j@gmail.com">tx.perry.j@gmail.com</a>&gt;
             </p>
-        
+
         <h2>Sounds:</h2>
         <p>
         Hedgehogs voice: Stephen Alexander &lt;<a href="mailto:ArmagonNo1@gmail.com">ArmagonNo1@gmail.com</a>&gt;
--- a/QTfrontend/ui/dialog/bandialog.h	Fri Jan 25 13:29:20 2013 +0400
+++ b/QTfrontend/ui/dialog/bandialog.h	Tue Jan 29 10:10:23 2013 +0400
@@ -11,7 +11,7 @@
 {
     Q_OBJECT
 public:
-    explicit BanDialog(QWidget *parent = 0);    
+    explicit BanDialog(QWidget *parent = 0);
 
     bool byIP();
     int duration();
--- a/QTfrontend/ui/dialog/input_password.cpp	Fri Jan 25 13:29:20 2013 +0400
+++ b/QTfrontend/ui/dialog/input_password.cpp	Tue Jan 29 10:10:23 2013 +0400
@@ -28,7 +28,7 @@
 HWPasswordDialog::HWPasswordDialog(QWidget* parent) : QDialog(parent)
 {
     setWindowTitle(tr("Login"));
-    
+
     QString titleLabelText = "To connect to the server, please log in.\n\nIf you don't have an account on www.hedgewars.org,\njust enter your nickname.";
     QString nickLabelText = "Nickname:";
     QString passLabelText = "Password:";
@@ -38,15 +38,15 @@
     QLabel * titleLabel = new QLabel(this);
     titleLabel->setText(titleLabelText);
     layout->addWidget(titleLabel, 0, 0);
-    
+
     QLabel * nickLabel = new QLabel(this);
     nickLabel->setText(nickLabelText);
     layout->addWidget(nickLabel, 1, 0);
-    
+
     leNickname = new QLineEdit(this);
     leNickname->setEchoMode(QLineEdit::Normal);
     layout->addWidget(leNickname, 2, 0);
-    
+
     QLabel * passLabel = new QLabel(this);
     passLabel->setText(passLabelText);
     layout->addWidget(passLabel, 3, 0);
--- a/QTfrontend/ui/page/pageeditteam.cpp	Fri Jan 25 13:29:20 2013 +0400
+++ b/QTfrontend/ui/page/pageeditteam.cpp	Tue Jan 29 10:10:23 2013 +0400
@@ -370,7 +370,7 @@
 {
     tbw->setCurrentIndex(0);
     binder->resetInterface();
-    
+
     TeamNameEdit->setText(team.name());
     CBTeamLvl->setCurrentIndex(team.difficulty());
 
@@ -396,7 +396,7 @@
     for(int i = 0; i < BINDS_NUMBER; i++)
     {
         if (team.keyBind(i).isEmpty()) continue;
-        
+
         QModelIndexList mdl = binds->match(binds->index(0, 0), Qt::UserRole + 1, team.keyBind(i), 1, Qt::MatchExactly);
 
         if(mdl.size() == 1)
--- a/QTfrontend/ui/page/pagemain.cpp	Fri Jan 25 13:29:20 2013 +0400
+++ b/QTfrontend/ui/page/pagemain.cpp	Tue Jan 29 10:10:23 2013 +0400
@@ -49,8 +49,7 @@
     BtnNet = addButton(":/res/NetworkPlay.png", pageLayout, 2, 2, 1, 2, true);
     BtnNet->setWhatsThis(tr("Play a game across a network"));
     pageLayout->setAlignment(BtnNet, Qt::AlignHCenter);
-    connect(BtnNet, SIGNAL(clicked()), this, SLOT(toggleNetworkChoice()));
-    
+
     originalNetworkIcon = BtnNet->icon();
     disabledNetworkIcon = QIcon(":/res/NetworkPlayDisabled.png");
 
@@ -120,7 +119,8 @@
 
 void PageMain::connectSignals()
 {
-    //TODO
+    connect(BtnNet, SIGNAL(clicked()), this, SLOT(toggleNetworkChoice()));
+    // TODO: add signal-forwarding required by (currently missing) encapsulation
 }
 
 PageMain::PageMain(QWidget* parent) : AbstractPage(parent)
@@ -163,8 +163,8 @@
             tip_platform = 2;
         if(line.contains("<linux-only>", Qt::CaseSensitive))
             tip_platform = 3;
-        if(line.contains("</windows-only>", Qt::CaseSensitive) || 
-                line.contains("</mac-only>", Qt::CaseSensitive) || 
+        if(line.contains("</windows-only>", Qt::CaseSensitive) ||
+                line.contains("</mac-only>", Qt::CaseSensitive) ||
                 line.contains("</linux-only>", Qt::CaseSensitive)) {
             tip_platform = 0;
         }
--- a/QTfrontend/ui/page/pagemultiplayer.cpp	Fri Jan 25 13:29:20 2013 +0400
+++ b/QTfrontend/ui/page/pagemultiplayer.cpp	Tue Jan 29 10:10:23 2013 +0400
@@ -47,7 +47,7 @@
 QLayout * PageMultiplayer::footerLayoutLeftDefinition()
 {
     QHBoxLayout * bottomLeftLayout = new QHBoxLayout();
-    
+
     btnSetup = addButton(":/res/Settings.png", bottomLeftLayout, 0, true);
     btnSetup->setWhatsThis(tr("Edit game preferences"));
 
--- a/QTfrontend/ui/page/pagenetgame.cpp	Fri Jan 25 13:29:20 2013 +0400
+++ b/QTfrontend/ui/page/pagenetgame.cpp	Tue Jan 29 10:10:23 2013 +0400
@@ -22,6 +22,7 @@
 #include <QAction>
 #include <QMenu>
 #include <QMessageBox>
+#include <QSettings>
 
 #include "pagenetgame.h"
 #include "gamecfgwidget.h"
@@ -56,9 +57,12 @@
     roomConfigLayout->addWidget(leRoomName, 100);
 
     QLabel * lblRoomName = new QLabel(tr("Room name: "), leRoomName);
-    lblRoomName->setStyleSheet("font: 12px; font-weight: bold;");
-    lblRoomName->setStyleSheet(QString("font: 12px; font-weight: bold; background: none; margin-left: -%1px; margin-top: 8px;").arg(lblRoomName->width() - 20));
-    leRoomName->setStyleSheet(QString("font: 12px; border-right: 0; padding-left: %1px; padding-bottom: 0px; border-top-right-radius: 0px; border-bottom-right-radius: 0px;").arg(lblRoomName->width() - 14));
+    lblRoomName->setFont(QFont("Arial", 12, QFont::Black));
+    QFontMetrics lblMetrics(lblRoomName->font());
+    int lblRoomNameWidth = lblMetrics.width(lblRoomName->text());
+    lblRoomName->setStyleSheet(QString("background: none; margin-left: -%1px; margin-top: 6px;").arg(lblRoomNameWidth + 12));
+    leRoomName->setFont(QFont("Arial", 12, QFont::Normal));
+    leRoomName->setStyleSheet(QString("HistoryLineEdit, QLabel { border-right: 0; padding-left: %1px; padding-bottom: 2px; border-top-right-radius: 0px; border-bottom-right-radius: 0px; }").arg(lblRoomNameWidth + 16));
 
     BtnUpdate = new QPushButton();
     BtnUpdate->setEnabled(false);
@@ -100,7 +104,7 @@
     pageLayout->addWidget(pNetTeamsWidget, 1, 1);
 
     // Chat
-    
+
     chatWidget = new HWChatWidget(this, true);
     chatWidget->setShowFollow(false); // don't show follow in nicks' context menus
     chatWidget->setIgnoreListKick(true); // kick ignored players automatically
@@ -114,7 +118,7 @@
 QLayout * PageNetGame::footerLayoutLeftDefinition()
 {
     QHBoxLayout * bottomLeftLayout = new QHBoxLayout();
-    
+
     btnSetup = addButton(":/res/Settings.png", bottomLeftLayout, 0, true);
     btnSetup->setWhatsThis(tr("Edit game preferences"));
 
@@ -188,9 +192,13 @@
     int newHeight = event->size().height();
 
     if (newHeight < cutoffHeight && oldHeight >= cutoffHeight)
+    {
         pGameCFG->setTabbed(true);
+    }
     else if (newHeight >= cutoffHeight && oldHeight < cutoffHeight)
+    {
         pGameCFG->setTabbed(false);
+    }
 }
 
 void PageNetGame::displayError(const QString & message)
@@ -227,9 +235,10 @@
 {
     if (!leRoomName->text().trimmed().isEmpty())
     {
-        emit askForUpdateRoomName(leRoomName->text());
+        m_gameSettings->setValue("frontend/lastroomname", leRoomName->text());
         leRoomName->rememberCurrentText();
         BtnUpdate->setEnabled(false);
+        emit askForUpdateRoomName(leRoomName->text());
     }
     else
     {
@@ -240,6 +249,7 @@
         roomMsg.setText(QMessageBox::tr("Please enter room name"));
         roomMsg.setWindowModality(Qt::WindowModal);
         roomMsg.exec();
+        leRoomName->setFocus();
     }
 }
 
@@ -259,9 +269,16 @@
     BtnUpdate->setVisible(isMaster);
     leRoomName->setVisible(isMaster);
     lblRoomNameReadOnly->setVisible(!isMaster);
+    pGameCFG->setMaster(isMaster);
+    repaint();
 }
 
 void PageNetGame::setUser(const QString & nickname)
 {
     chatWidget->setUser(nickname);
 }
+
+void PageNetGame::setSettings(QSettings *settings)
+{
+    m_gameSettings = settings;
+}
--- a/QTfrontend/ui/page/pagenetgame.h	Fri Jan 25 13:29:20 2013 +0400
+++ b/QTfrontend/ui/page/pagenetgame.h	Tue Jan 29 10:10:23 2013 +0400
@@ -26,6 +26,7 @@
 class HWChatWidget;
 class TeamSelWidget;
 class GameCFGWidget;
+class QSettings;
 
 class PageNetGame : public AbstractPage
 {
@@ -40,6 +41,8 @@
          */
         void setRoomName(const QString & roomName);
 
+        void setSettings(QSettings * settings);
+
         void displayError(const QString & message);
         void displayNotice(const QString & message);
         void displayWarning(const QString & message);
@@ -80,6 +83,7 @@
         QLayout * footerLayoutLeftDefinition();
         void connectSignals();
 
+        QSettings * m_gameSettings;
         QPushButton * btnSetup;
         QLabel * lblRoomNameReadOnly;
 };
--- a/QTfrontend/ui/page/pageoptions.cpp	Fri Jan 25 13:29:20 2013 +0400
+++ b/QTfrontend/ui/page/pageoptions.cpp	Tue Jan 29 10:10:23 2013 +0400
@@ -199,7 +199,7 @@
         { // group: weapons
             OptionGroupBox * groupWeapons = new OptionGroupBox(":/res/weaponsicon.png", tr("Weapons"), this);
             leftColumn->addWidget(groupWeapons);
-            
+
             groupWeapons->layout()->setColumnStretch(0, 1);
 
             WeaponsName = new QComboBox(groupWeapons);
@@ -250,7 +250,7 @@
             CBFullscreen->setText(QLabel::tr("Fullscreen"));
 
             // Fullscreen resolution
-            
+
             lblFullScreenRes = new QLabel(groupGame);
             lblFullScreenRes->setText(QLabel::tr("Fullscreen Resolution"));
             groupGame->layout()->addWidget(lblFullScreenRes, 1, 0);
@@ -260,28 +260,28 @@
             groupGame->layout()->addWidget(CBResolution, 1, 1, Qt::AlignLeft);
 
             // Windowed resolution
-            
+
             lblWinScreenRes = new QLabel(groupGame);
             lblWinScreenRes->setText(QLabel::tr("Windowed Resolution"));
             groupGame->layout()->addWidget(lblWinScreenRes, 2, 0);
-                        
+
             winResContainer = new QWidget();
             QHBoxLayout * winResLayout = new QHBoxLayout(winResContainer);
             winResLayout->setSpacing(0);
             groupGame->layout()->addWidget(winResContainer, 2, 1);
-            
+
             QLabel *winLabelX = new QLabel(groupGame);
             winLabelX->setText("x"); // decorational x
             winLabelX->setFixedWidth(40);
             winLabelX->setAlignment(Qt::AlignCenter);
-            
+
             windowWidthEdit = new QLineEdit(groupGame);
             windowWidthEdit->setValidator(new QIntValidator(this));
             windowWidthEdit->setFixedSize(55, CBResolution->height());
             windowHeightEdit = new QLineEdit(groupGame);
             windowHeightEdit->setValidator(new QIntValidator(this));
             windowHeightEdit->setFixedSize(55, CBResolution->height());
-            
+
             winResLayout->addWidget(windowWidthEdit, 0);
             winResLayout->addWidget(winLabelX, 0);
             winResLayout->addWidget(windowHeightEdit, 0);
@@ -830,7 +830,7 @@
 void PageOptions::forceFullscreen(int index)
 {
     bool forced = (index == 7 || index == 8 || index == 9);
-    
+
     if (index != 0)
     {
         this->SLQuality->setValue(this->SLQuality->maximum());
@@ -1114,7 +1114,7 @@
 void PageOptions::bindUpdated(int bindID)
 {
     int bindIndex = binder->bindIndex(bindID);
-    
+
     if (bindIndex == 0) bindIndex = resetBindToDefault(bindID);
 
     // Save bind
--- a/QTfrontend/ui/page/pageroomslist.cpp	Fri Jan 25 13:29:20 2013 +0400
+++ b/QTfrontend/ui/page/pageroomslist.cpp	Tue Jan 29 10:10:23 2013 +0400
@@ -16,102 +16,184 @@
  * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
  */
 
+#include <QVBoxLayout>
+#include <QHBoxLayout>
 #include <QGridLayout>
-#include <QHBoxLayout>
 #include <QPushButton>
 #include <QComboBox>
 #include <QLabel>
 #include <QLineEdit>
 #include <QMessageBox>
 #include <QHeaderView>
-#include <QTableView>
+#include <QGroupBox>
+#include <QFontMetrics>
+#include <QMenu>
+#include <QDebug>
 
 #include <QSortFilterProxyModel>
 
 #include "roomslistmodel.h"
 
 #include "ammoSchemeModel.h"
-#include "pageroomslist.h"
 #include "hwconsts.h"
 #include "chatwidget.h"
+#include "roomnameprompt.h"
+#include "lineeditcursor.h"
+#include "pageroomslist.h"
 
 QLayout * PageRoomsList::bodyLayoutDefinition()
 {
-    QGridLayout * pageLayout = new QGridLayout();
+    QVBoxLayout * pageLayout = new QVBoxLayout();
+    pageLayout->setSpacing(0);
+
+    QGridLayout * topLayout = new QGridLayout();
+    topLayout->setSpacing(0);
+    pageLayout->addLayout(topLayout, 0);
+
+    // Help/prompt message at top
+    QLabel * lblDesc = new QLabel(tr("Join a room"));
+    lblDesc->setObjectName("lblDesc");
+    lblDesc->setStyleSheet("#lblDesc { color: #130F2A; background: #F6CB1C; border: solid 4px #F6CB1C; border-top-left-radius: 10px; padding: 4px 10px;}");
+    lblDesc->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Fixed);
+    lblDesc->setFixedHeight(24);
+    lblDesc->setMinimumWidth(0);
+
+    // Search text box
+    QWidget * searchContainer = new QWidget();
+    searchContainer->setFixedHeight(24);
+    searchContainer->setObjectName("searchContainer");
+    searchContainer->setStyleSheet("#searchContainer { background: #F6CB1C; border-top-right-radius: 10px; padding: 3px; }");
+    searchContainer->setFixedWidth(250);
+    searchText = new LineEditCursor(searchContainer);
+    searchText->setFixedWidth(250);
+    searchText->setMaxLength(60);
+    searchText->setFixedHeight(22);
 
-    QHBoxLayout * newRoomLayout = new QHBoxLayout();
-    QLabel * roomNameLabel = new QLabel(this);
-    roomNameLabel->setText(tr("Room Name:"));
-    roomName = new QLineEdit(this);
-    roomName->setMaxLength(60);
-    newRoomLayout->addWidget(roomNameLabel);
-    newRoomLayout->addWidget(roomName);
-    pageLayout->addLayout(newRoomLayout, 0, 0, 1, 2);
+    // Search label
+    QLabel * lblSearch = new QLabel(tr("Search: "), searchText);
+    QFontMetrics lblMetrics(lblSearch->font());
+    int lblSearchWidth = lblMetrics.width(lblSearch->text());
+    lblSearch->setStyleSheet(QString("background: none; margin-left: -%1px; margin-top: 4px;").arg(lblSearchWidth + 5));
+    searchText->setStyleSheet(QString("LineEditCursor, QLabel { border-width: 0px; border-radius: 6px; margin-top: 3px; margin-right: 3px; padding-left: %1px; padding-bottom: 2px; background-color: rgb(23, 11, 54); } LineEditCursor:hover, LineEditCursor:focus { background-color: rgb(13, 5, 68); }").arg(lblSearchWidth + 5));
+
+    // Corner widget
+    QLabel * corner = new QLabel();
+    corner->setPixmap(QPixmap(QString::fromUtf8(":/res/inverse-corner-bl.png")));
+    corner->setFixedSize(10, 10);
+
+    const QIcon& lp = QIcon(":/res/new.png");
+    QSize sz = lp.actualSize(QSize(65535, 65535));
+    BtnCreate = new QPushButton();
+    BtnCreate->setText(tr("Create room"));
+    BtnCreate->setIcon(lp);
+    BtnCreate->setStyleSheet("padding: 4px 8px; margin-bottom: 6px;");
 
-    roomsList = new QTableView(this);
+    BtnJoin = new QPushButton(tr("Join room"));
+    BtnJoin->setStyleSheet("padding: 4px 8px; margin-bottom: 6px; margin-left: 6px;");
+    BtnJoin->setEnabled(false);
+
+    // Add widgets to top layout
+    topLayout->addWidget(lblDesc, 1, 0);
+    topLayout->addWidget(searchContainer, 1, 1);
+    topLayout->addWidget(corner, 1, 2, Qt::AlignBottom);
+    topLayout->addWidget(BtnCreate, 0, 4, 2, 1);
+    topLayout->addWidget(BtnJoin, 0, 5, 2, 1);
+
+    // Top layout stretch
+    topLayout->setRowStretch(0, 1);
+    topLayout->setRowStretch(1, 0);
+    topLayout->setColumnStretch(3, 1);
+
+    // Room list
+
+    roomsList = new RoomTableView(this);
     roomsList->setSelectionBehavior(QAbstractItemView::SelectRows);
     roomsList->verticalHeader()->setVisible(false);
     roomsList->horizontalHeader()->setResizeMode(QHeaderView::Interactive);
     roomsList->setAlternatingRowColors(true);
     roomsList->setShowGrid(false);
     roomsList->setSelectionMode(QAbstractItemView::SingleSelection);
-    pageLayout->addWidget(roomsList, 1, 0, 3, 2);
-    pageLayout->setRowStretch(2, 100);
+    roomsList->setStyleSheet("QTableView { border-top-left-radius: 0px; }");
+    roomsList->setFocusPolicy(Qt::NoFocus);
+    pageLayout->addWidget(roomsList, 200);
+
+    // Room filters container
+
+    QWidget * filtersContainer = new QWidget();
+    filtersContainer->setMaximumWidth(800);
+    filtersContainer->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Fixed);
 
-    QHBoxLayout * filterLayout = new QHBoxLayout();
+    pageLayout->addSpacing(7);
+    pageLayout->addWidget(filtersContainer, 0, Qt::AlignHCenter);
+    pageLayout->addSpacing(7);
+    
+    QHBoxLayout * filterLayout = new QHBoxLayout(filtersContainer);
+    filterLayout->setSpacing(0);
+    filterLayout->setMargin(0);
 
-    QLabel * stateLabel = new QLabel(this);
-    CBState = new QComboBox(this);
+    const int filterSpacing = 20;
+
+    // State button
 
-    filterLayout->addWidget(stateLabel);
-    filterLayout->addWidget(CBState);
-    filterLayout->addStretch(1);
+    QPushButton * btnState = new QPushButton(tr("Room state"));
+    btnState->setStyleSheet("QPushButton { padding: 2px 4px; } QPushButton:pressed { background-color: #ffcc00; border-color: #ffcc00; border-bottom-left-radius: 0px; border-bottom-right-radius: 0px; color: #11084A; }");
+    btnState->setSizePolicy(QSizePolicy::Fixed, QSizePolicy::Preferred);
+    filterLayout->addWidget(btnState);
+    filterLayout->addSpacing(filterSpacing);
+
+    // State menu
 
-    QLabel * ruleLabel = new QLabel(this);
-    ruleLabel->setText(tr("Rules:"));
+    QMenu * stateMenu = new QMenu(btnState);
+    showGamesInLobby = new QAction(QAction::tr("Show games in lobby"), stateMenu);
+    showGamesInLobby->setCheckable(true);
+    showGamesInLobby->setChecked(true);
+    showGamesInProgress = new QAction(QAction::tr("Show games in-progress"), stateMenu);
+    showGamesInProgress->setCheckable(true);
+    showGamesInProgress->setChecked(true);
+    stateMenu->addAction(showGamesInLobby);
+    stateMenu->addAction(showGamesInProgress);
+    btnState->setMenu(stateMenu);
+
+    // Rules dropdown
+
     CBRules = new QComboBox(this);
+    CBRules->setStyleSheet("QComboBox { border-top-left-radius: 0px; border-bottom-left-radius: 0px; border-left-width: 2px; }");
+
+    QLabel * ruleLabel = new QLabel(tr("Rules:"), this);
+    ruleLabel->setFixedHeight(CBRules->height());
+    ruleLabel->setSizePolicy(QSizePolicy::Fixed, QSizePolicy::Fixed);
+    ruleLabel->setStyleSheet("border: solid; border-width: 3px; border-right-width: 0px; border-color: #ffcc00; border-top-left-radius: 10px; border-bottom-left-radius: 10px; background-color: rgba(13, 5, 68, 70%);");
 
     filterLayout->addWidget(ruleLabel);
     filterLayout->addWidget(CBRules);
-    filterLayout->addStretch(1);
+    filterLayout->addSpacing(filterSpacing);
+
+    // Weapons dropdown
 
-    QLabel * weaponLabel = new QLabel(this);
-    weaponLabel->setText(tr("Weapons:"));
     CBWeapons = new QComboBox(this);
+    CBWeapons->setStyleSheet("QComboBox { border-top-left-radius: 0px; border-bottom-left-radius: 0px; border-left-width: 2px; }");
+
+    QLabel * weaponLabel = new QLabel(tr("Weapons:"), this);
+    weaponLabel->setFixedHeight(CBWeapons->height());
+    weaponLabel->setSizePolicy(QSizePolicy::Fixed, QSizePolicy::Fixed);
+    weaponLabel->setStyleSheet("border: solid; border-width: 3px; border-right-width: 0px; border-color: #ffcc00; border-top-left-radius: 10px; border-bottom-left-radius: 10px; background-color: rgba(13, 5, 68, 70%);");
 
     filterLayout->addWidget(weaponLabel);
     filterLayout->addWidget(CBWeapons);
-    filterLayout->addStretch(1);
+    filterLayout->addSpacing(filterSpacing);
+
+    // Clear filters button
 
-    QLabel * searchLabel = new QLabel(this);
-    searchLabel->setText(tr("Search:"));
-    searchText = new QLineEdit(this);
-    searchText->setMaxLength(60);
-    searchText->setMinimumWidth(100);
-    searchText->setMaximumWidth(360);
-    filterLayout->addWidget(searchLabel);
-    filterLayout->addWidget(searchText);
-    filterLayout->setStretchFactor(searchText, 2);
+    BtnClear = addButton(tr("Clear filters"), filterLayout, 0);
+    weaponLabel->setFixedHeight(CBWeapons->height());
+    BtnClear->setStyleSheet("padding: 4px;");
 
-    pageLayout->addLayout(filterLayout, 4, 0, 1, 2);
+    // Lobby chat
 
     chatWidget = new HWChatWidget(this, false);
-    pageLayout->addWidget(chatWidget, 5, 0, 1, 3);
-    pageLayout->setRowStretch(5, 350);
-
-    BtnCreate = addButton(tr("Create"), pageLayout, 0, 2);
-    BtnJoin = addButton(tr("Join"), pageLayout, 1, 2);
-    BtnClear = addButton(tr("Clear"), pageLayout, 4, 2);
-
-    // strech all but the buttons column
-    pageLayout->setColumnStretch(0, 1);
-    pageLayout->setColumnStretch(1, 1);
-    pageLayout->setColumnStretch(2, 0);
+    pageLayout->addWidget(chatWidget, 350);
 
     CBRules->addItem(QComboBox::tr("Any"));
-    CBState->addItem(QComboBox::tr("Any"));
-    CBState->addItem(QComboBox::tr("In lobby"));
-    CBState->addItem(QComboBox::tr("In progress"));
 
     return pageLayout;
 }
@@ -120,18 +202,9 @@
 {
     QHBoxLayout * bottomLayout = new QHBoxLayout();
 
-    lblCount = new QLabel(this);
-    bottomLayout->addWidget(lblCount, 0, Qt::AlignHCenter);
-    bottomLayout->setStretchFactor(lblCount, 1);
-    lblCount->setText("?");
-    lblCount->setSizePolicy(QSizePolicy::Maximum, QSizePolicy::Maximum);
-
-    BtnAdmin = addButton(tr("Admin features"), bottomLayout, 1);
-    BtnAdmin->setMinimumWidth(160);
-
-    // strech left part
-    bottomLayout->setStretch(0, 1);
-    bottomLayout->setStretch(1, 0);
+    BtnAdmin = addButton(tr("Admin features"), bottomLayout, 0);
+    BtnAdmin->setStyleSheet("padding: 4px auto;");
+    BtnAdmin->setWhatsThis(tr("Open server administration page"));
 
     return bottomLayout;
 }
@@ -143,18 +216,40 @@
     connect(BtnCreate, SIGNAL(clicked()), this, SLOT(onCreateClick()));
     connect(BtnJoin, SIGNAL(clicked()), this, SLOT(onJoinClick()));
     connect(BtnClear, SIGNAL(clicked()), this, SLOT(onClearClick()));
+    connect(searchText, SIGNAL(moveUp()), this, SLOT(moveSelectionUp()));
+    connect(searchText, SIGNAL(moveDown()), this, SLOT(moveSelectionDown()));
+    connect(searchText, SIGNAL(returnPressed()), this, SLOT(onJoinClick()));
     connect(roomsList, SIGNAL(doubleClicked (const QModelIndex &)), this, SLOT(onJoinClick()));
-    connect(CBState, SIGNAL(currentIndexChanged (int)), this, SLOT(onFilterChanged()));
+    connect(roomsList, SIGNAL(clicked (const QModelIndex &)), searchText, SLOT(setFocus()));
+    connect(showGamesInLobby, SIGNAL(triggered()), this, SLOT(onFilterChanged()));
+    connect(showGamesInProgress, SIGNAL(triggered()), this, SLOT(onFilterChanged()));
     connect(CBRules, SIGNAL(currentIndexChanged (int)), this, SLOT(onFilterChanged()));
     connect(CBWeapons, SIGNAL(currentIndexChanged (int)), this, SLOT(onFilterChanged()));
     connect(searchText, SIGNAL(textChanged (const QString &)), this, SLOT(onFilterChanged()));
     connect(this, SIGNAL(askJoinConfirmation (const QString &)), this, SLOT(onJoinConfirmation(const QString &)), Qt::QueuedConnection);
 
+    // Set focus on search box
+    connect(this, SIGNAL(pageEnter()), searchText, SLOT(setFocus()));
+
     // sorting
     connect(roomsList->horizontalHeader(), SIGNAL(sortIndicatorChanged(int, Qt::SortOrder)),
             this, SLOT(onSortIndicatorChanged(int, Qt::SortOrder)));
 }
 
+void PageRoomsList::moveSelectionUp()
+{
+    roomsList->setCurrentIndex(roomsList->moveCursor(QAbstractItemView::MoveUp, Qt::NoModifier));
+}
+
+void PageRoomsList::moveSelectionDown()
+{
+    roomsList->setCurrentIndex(roomsList->moveCursor(QAbstractItemView::MoveDown, Qt::NoModifier));
+}
+
+void PageRoomsList::roomSelectionChanged(const QModelIndex & current, const QModelIndex & previous)
+{
+    BtnJoin->setEnabled(current.isValid());
+}
 
 PageRoomsList::PageRoomsList(QWidget* parent) :
     AbstractPage(parent)
@@ -419,16 +514,21 @@
 
 void PageRoomsList::onCreateClick()
 {
-    if (roomName->text().size())
-        emit askForCreateRoom(roomName->text());
+    RoomNamePrompt prompt(parentWidget()->parentWidget(), m_gameSettings->value("frontend/lastroomname", QString()).toString());
+    connect(&prompt, SIGNAL(roomNameChosen(const QString &)), this, SLOT(onRoomNameChosen(const QString &)));
+    prompt.exec();
+}
+
+void PageRoomsList::onRoomNameChosen(const QString & roomName)
+{
+    if (!roomName.trimmed().isEmpty())
+    {
+        m_gameSettings->setValue("frontend/lastroomname", roomName);
+        emit askForCreateRoom(roomName);
+    }
     else
     {
-        QMessageBox roomNameMsg(this);
-        roomNameMsg.setIcon(QMessageBox::Warning);
-        roomNameMsg.setWindowTitle(QMessageBox::tr("Room Name - Error"));
-        roomNameMsg.setText(QMessageBox::tr("Please enter room name"));
-        roomNameMsg.setWindowModality(Qt::WindowModal);
-        roomNameMsg.exec();
+        onCreateClick();
     }
 }
 
@@ -463,10 +563,12 @@
 
 void PageRoomsList::onClearClick()
 {
-    CBState->setCurrentIndex(0);
+    showGamesInLobby->setChecked(true);
+    showGamesInProgress->setChecked(true);
     CBRules->setCurrentIndex(0);
     CBWeapons->setCurrentIndex(0);
     searchText->clear();
+    searchText->setFocus();
 }
 
 void PageRoomsList::onJoinConfirmation(const QString & room)
@@ -487,7 +589,7 @@
 
 void PageRoomsList::updateNickCounter(int cnt)
 {
-    lblCount->setText(tr("%1 players online", 0, cnt).arg(cnt));
+    setDefautDescription(tr("%1 players online", 0, cnt).arg(cnt));
 }
 
 void PageRoomsList::setUser(const QString & nickname)
@@ -531,6 +633,12 @@
 
         // let the table view display the last model in the filter chain
         roomsList->setModel(roomsModel);
+
+        // When the data changes
+        connect(roomsModel, SIGNAL(layoutChanged()), roomsList, SLOT(repaint()));
+
+        // When a selection changes
+        connect(roomsList->selectionModel(), SIGNAL(currentRowChanged(const QModelIndex &, const QModelIndex &)), this, SLOT(roomSelectionChanged(const QModelIndex &, const QModelIndex &)));
     }
 
     stateFilteredModel->setSourceModel(model);
@@ -559,6 +667,8 @@
             this, SLOT(saveHeaderState()));
     connect(roomsList->horizontalHeader(), SIGNAL(sectionResized(int, int, int)),
             this, SLOT(saveHeaderState()));
+
+    roomsList->repaint();
 }
 
 
@@ -589,13 +699,15 @@
 
     roomsModel->setFilterWildcard(QString("*%1*").arg(searchText->text()));
 
-    int stateIdx = CBState->currentIndex();
-    // any = 0, in lobby/false = 1, in progress/true = 2
+    bool stateLobby = showGamesInLobby->isChecked();
+    bool stateProgress = showGamesInProgress->isChecked();
 
-    if (stateIdx == 0)
+    if (stateLobby && stateProgress)
         stateFilteredModel->setFilterWildcard("*"); // "any"
+    else if (stateLobby != stateProgress)
+        stateFilteredModel->setFilterFixedString(QString(stateProgress));
     else
-        stateFilteredModel->setFilterFixedString(QString(stateIdx == 2));
+        stateFilteredModel->setFilterFixedString(QString("none")); // Basically, none.
 
     if (CBRules->currentIndex() == 0)
         schemeFilteredModel->setFilterWildcard("*"); // "any"
--- a/QTfrontend/ui/page/pageroomslist.h	Fri Jan 25 13:29:20 2013 +0400
+++ b/QTfrontend/ui/page/pageroomslist.h	Tue Jan 29 10:10:23 2013 +0400
@@ -19,6 +19,7 @@
 #ifndef PAGE_ROOMLIST_H
 #define PAGE_ROOMLIST_H
 
+#include <QTableView>
 #include "AbstractPage.h"
 
 class HWChatWidget;
@@ -27,6 +28,14 @@
 class RoomsListModel;
 class QSortFilterProxyModel;
 
+class RoomTableView : public QTableView
+{
+    friend class PageRoomsList;
+
+    public:
+        RoomTableView(QWidget* parent = 0) : QTableView(parent){}
+};
+
 class PageRoomsList : public AbstractPage
 {
         Q_OBJECT
@@ -38,9 +47,8 @@
         void displayWarning(const QString & message);
         void setSettings(QSettings * settings);
 
-        QLineEdit * roomName;
         QLineEdit * searchText;
-        QTableView * roomsList;
+        RoomTableView * roomsList;
         QPushButton * BtnCreate;
         QPushButton * BtnJoin;
         QPushButton * BtnAdmin;
@@ -78,6 +86,10 @@
         void onSortIndicatorChanged(int logicalIndex, Qt::SortOrder order);
         void onFilterChanged();
         void saveHeaderState();
+        void onRoomNameChosen(const QString &);
+        void roomSelectionChanged(const QModelIndex &, const QModelIndex &);
+        void moveSelectionUp();
+        void moveSelectionDown();
 
     private:
         QSettings * m_gameSettings;
@@ -85,6 +97,8 @@
         QSortFilterProxyModel * stateFilteredModel;
         QSortFilterProxyModel * schemeFilteredModel;
         QSortFilterProxyModel * weaponsFilteredModel;
+        QAction * showGamesInLobby;
+        QAction * showGamesInProgress;
 
         AmmoSchemeModel * ammoSchemeModel;
 
--- a/QTfrontend/ui/page/pagevideos.cpp	Fri Jan 25 13:29:20 2013 +0400
+++ b/QTfrontend/ui/page/pagevideos.cpp	Tue Jan 29 10:10:23 2013 +0400
@@ -173,7 +173,7 @@
         labelDesc = new QLabel(pDescGroup);
         labelDesc->setAlignment(Qt::AlignLeft | Qt::AlignTop);
         labelDesc->setTextInteractionFlags(Qt::TextSelectableByMouse |
-                                           Qt::TextSelectableByKeyboard	|
+                                           Qt::TextSelectableByKeyboard |
                                            Qt::LinksAccessibleByMouse |
                                            Qt::LinksAccessibleByKeyboard);
         labelDesc->setTextFormat(Qt::RichText);
--- a/QTfrontend/ui/widget/about.cpp	Fri Jan 25 13:29:20 2013 +0400
+++ b/QTfrontend/ui/widget/about.cpp	Tue Jan 29 10:10:23 2013 +0400
@@ -78,7 +78,7 @@
 
     lbl2 = new QTextBrowser(this);
     lbl2->setOpenExternalLinks(true);
-    QUrl localpage = QUrl::fromLocalFile(":/res/html/about.html"); 
+    QUrl localpage = QUrl::fromLocalFile(":/res/html/about.html");
     lbl2->setSource(localpage); //sets the source of the label from the file above
     mainLayout->addWidget(lbl2, 1, 1);
 
@@ -87,9 +87,9 @@
     QString libinfo = "<style type=text/css>a:link { color: #FFFF6E; }</style>";
 
 #ifdef __GNUC__
-    libinfo.append(QString("Compiler: <a href=\"http://gcc.gnu.org\">GCC</a> %1<br>").arg(__VERSION__));
+    libinfo.append(QString("<a href=\"http://gcc.gnu.org\">GCC</a> %1<br>").arg(__VERSION__));
 #else
-    libinfo.append(QString("Compiler: Unknown<br>").arg(__VERSION__));
+    libinfo.append(QString(tr("Unknown Compiler")).arg(__VERSION__) + QString("<br>"));
 #endif
 
     libinfo.append(QString("<a href=\"http://www.libsdl.org/\">SDL</a> version: %1.%2.%3<br>")
@@ -115,7 +115,7 @@
     lblLibInfo->setText(libinfo);
     lblLibInfo->setWordWrap(true);
     lblLibInfo->setMaximumWidth(280);
-    leftLayout->addWidget(lblLibInfo, 0, Qt::AlignTop | Qt::AlignHCenter);
+    leftLayout->addWidget(lblLibInfo, 0, Qt::AlignHCenter);
     leftLayout->addStretch(1);
 
     setAcceptDrops(true);
--- a/QTfrontend/ui/widget/chatwidget.cpp	Fri Jan 25 13:29:20 2013 +0400
+++ b/QTfrontend/ui/widget/chatwidget.cpp	Tue Jan 29 10:10:23 2013 +0400
@@ -31,6 +31,7 @@
 #include <QModelIndexList>
 #include <QSortFilterProxyModel>
 #include <QMenu>
+#include <QScrollBar>
 
 #include "DataManager.h"
 #include "hwconsts.h"
@@ -156,24 +157,18 @@
 void HWChatWidget::displayError(const QString & message)
 {
     addLine("msg_Error", " !!! " + message);
-    // scroll to the end
-    chatText->moveCursor(QTextCursor::End);
 }
 
 
 void HWChatWidget::displayNotice(const QString & message)
 {
     addLine("msg_Notice", " *** " + message);
-    // scroll to the end
-    chatText->moveCursor(QTextCursor::End);
 }
 
 
 void HWChatWidget::displayWarning(const QString & message)
 {
     addLine("msg_Warning", " *!* " + message);
-    // scroll to the end
-    chatText->moveCursor(QTextCursor::End);
 }
 
 
@@ -451,6 +446,8 @@
     if (s_displayNone->contains(cssClass))
         return; // the css forbids us to display this line
 
+    beforeContentAdd();
+
     if (chatStrings.size() > 250)
         chatStrings.removeFirst();
 
@@ -473,11 +470,13 @@
 
     chatText->setHtml("<html><body>"+chatStrings.join("<br>")+"</body></html>");
 
-    chatText->moveCursor(QTextCursor::End);
+    afterContentAdd();
 }
 
 void HWChatWidget::onServerMessage(const QString& str)
 {
+    beforeContentAdd();
+
     if (chatStrings.size() > 250)
         chatStrings.removeFirst();
 
@@ -485,7 +484,7 @@
 
     chatText->setHtml("<html><body>"+chatStrings.join("<br>")+"</body></html>");
 
-    chatText->moveCursor(QTextCursor::End);
+    afterContentAdd();
 }
 
 
@@ -901,3 +900,21 @@
 
     m_nicksMenu->popup(chatNicks->mapToGlobal(pos));
 }
+
+void HWChatWidget::beforeContentAdd()
+{
+    m_scrollBarPos = chatText->verticalScrollBar()->value();
+    m_scrollToBottom = m_scrollBarPos == chatText->verticalScrollBar()->maximum();
+}
+
+void HWChatWidget::afterContentAdd()
+{
+    if(m_scrollToBottom)
+    {
+        chatText->verticalScrollBar()->setValue(chatText->verticalScrollBar()->maximum());
+        chatText->moveCursor(QTextCursor::End);
+    } else
+    {
+        chatText->verticalScrollBar()->setValue(m_scrollBarPos);
+    }
+}
--- a/QTfrontend/ui/widget/chatwidget.h	Fri Jan 25 13:29:20 2013 +0400
+++ b/QTfrontend/ui/widget/chatwidget.h	Tue Jan 29 10:10:23 2013 +0400
@@ -83,6 +83,8 @@
         void discardStyleSheet();
         void saveStyleSheet();
         QString linkedNick(const QString & nickname);
+        void beforeContentAdd();
+        void afterContentAdd();
 
     public slots:
         void onChatString(const QString& str);
@@ -124,6 +126,8 @@
         QList<QRegExp> m_highlights; ///< regular expressions used for highlighting
         bool notify;
         bool m_autoKickEnabled;
+        bool m_scrollToBottom;
+        int m_scrollBarPos;
 
     private slots:
         void returnPressed();
--- a/QTfrontend/ui/widget/colorwidget.h	Fri Jan 25 13:29:20 2013 +0400
+++ b/QTfrontend/ui/widget/colorwidget.h	Tue Jan 29 10:10:23 2013 +0400
@@ -13,7 +13,7 @@
 class ColorWidget : public QFrame
 {
     Q_OBJECT
-    
+
 public:
     explicit ColorWidget(QStandardItemModel *colorsModel, QWidget *parent = 0);
     ~ColorWidget();
@@ -24,7 +24,7 @@
 
 signals:
     void colorChanged(int color);
-    
+
 private:
     int m_color;
     QStandardItemModel * m_colorsModel;
--- a/QTfrontend/ui/widget/feedbackdialog.cpp	Fri Jan 25 13:29:20 2013 +0400
+++ b/QTfrontend/ui/widget/feedbackdialog.cpp	Tue Jan 29 10:10:23 2013 +0400
@@ -53,19 +53,19 @@
 
 FeedbackDialog::FeedbackDialog(QWidget * parent) : QDialog(parent)
 {
-	setModal(true);
-	setWindowFlags(Qt::Sheet);
-	setWindowModality(Qt::WindowModal);
-	setMinimumSize(700, 460);
-	resize(700, 460);
-	setSizePolicy(QSizePolicy::Minimum, QSizePolicy::Minimum);
+    setModal(true);
+    setWindowFlags(Qt::Sheet);
+    setWindowModality(Qt::WindowModal);
+    setMinimumSize(700, 460);
+    resize(700, 460);
+    setSizePolicy(QSizePolicy::Minimum, QSizePolicy::Minimum);
 
-	netManager = NULL;
-	GenerateSpecs();
+    netManager = NULL;
+    GenerateSpecs();
 
-	/* Top layout */
+    /* Top layout */
 
-	QVBoxLayout * pageLayout = new QVBoxLayout();
+    QVBoxLayout * pageLayout = new QVBoxLayout();
     QHBoxLayout * summaryLayout = new QHBoxLayout();
     QHBoxLayout * emailLayout = new QHBoxLayout();
     QHBoxLayout * descriptionLayout = new QHBoxLayout();
@@ -96,7 +96,7 @@
     email = new QLineEdit();
     emailLayout->addWidget(email);
     summaryEmailLayout->addLayout(emailLayout);
-    
+
     label_summary = new QLabel();
     label_summary->setText(QLabel::tr("Summary"));
     label_summary->setFixedWidth(labelWidth);
@@ -104,7 +104,7 @@
     summary = new QLineEdit();
     summaryLayout->addWidget(summary);
     summaryEmailLayout->addLayout(summaryLayout);
-    
+
     combinedTopLayout->addLayout(summaryEmailLayout);
 
     CheckSendSpecs = new QCheckBox();
@@ -163,7 +163,7 @@
 
     bottomLayout->addLayout(captchaLayout);
     bottomLayout->addSpacing(40);
-    
+
     // TODO: Set green arrow icon for send button (:/res/Start.png)
     BtnSend = new QPushButton(tr("Send Feedback"));
     bottomLayout->addWidget(BtnSend, 0);
@@ -373,7 +373,7 @@
 
         QString url = "http://hedgewars.org/feedback/?captcha&id=";
         url += QString::number(captchaID);
-        
+
         QNetworkAccessManager *netManager = GetNetManager();
         QUrl captchaURL(url);
         QNetworkRequest req(captchaURL);
@@ -424,7 +424,7 @@
             infoMsg.exec();
 
             accept();
-            
+
             return;
     }
     else
@@ -437,7 +437,7 @@
 void FeedbackDialog::SendFeedback()
 {
     // Get form data
-    
+
     QString summary = this->summary->text();
     QString description = this->description->toPlainText();
     QString email = this->email->text();
@@ -452,7 +452,7 @@
     }
 
     // Submit issue to PHP script
-    
+
     QByteArray body;
     body.append("captcha=");
     body.append(captchaID);
@@ -471,14 +471,14 @@
         body.append("&specs=");
         body.append(QUrl::toPercentEncoding(specs));
     }
-    
+
     nam = new QNetworkAccessManager(this);
     connect(nam, SIGNAL(finished(QNetworkReply*)),
             this, SLOT(finishedSlot(QNetworkReply*)));
-            
+
     QNetworkRequest header(QUrl("http://hedgewars.org/feedback/?submit"));
     header.setRawHeader("Content-Length", QString::number(body.size()).toAscii());
     header.setRawHeader("Content-Type", "application/x-www-form-urlencoded");
-    
+
     nam->post(header, body);
 }
--- a/QTfrontend/ui/widget/flowlayout.cpp	Fri Jan 25 13:29:20 2013 +0400
+++ b/QTfrontend/ui/widget/flowlayout.cpp	Tue Jan 29 10:10:23 2013 +0400
@@ -41,150 +41,150 @@
  #include <QtGui>
 
  #include "flowlayout.h"
- 
- FlowLayout::FlowLayout(QWidget *parent, int margin, int hSpacing, int vSpacing)
-     : QLayout(parent), m_hSpace(hSpacing), m_vSpace(vSpacing)
- {
-     setContentsMargins(margin, margin, margin, margin);
- }
 
- FlowLayout::FlowLayout(int margin, int hSpacing, int vSpacing)
-     : m_hSpace(hSpacing), m_vSpace(vSpacing)
- {
-     setContentsMargins(margin, margin, margin, margin);
- }
+FlowLayout::FlowLayout(QWidget *parent, int margin, int hSpacing, int vSpacing)
+    : QLayout(parent), m_hSpace(hSpacing), m_vSpace(vSpacing)
+{
+    setContentsMargins(margin, margin, margin, margin);
+}
+
+FlowLayout::FlowLayout(int margin, int hSpacing, int vSpacing)
+    : m_hSpace(hSpacing), m_vSpace(vSpacing)
+{
+    setContentsMargins(margin, margin, margin, margin);
+}
 
- FlowLayout::~FlowLayout()
- {
-     QLayoutItem *item;
-     while ((item = takeAt(0)))
-         delete item;
- }
+FlowLayout::~FlowLayout()
+{
+    QLayoutItem *item;
+    while ((item = takeAt(0)))
+        delete item;
+}
 
- void FlowLayout::addItem(QLayoutItem *item)
- {
-     itemList.append(item);
- }
+void FlowLayout::addItem(QLayoutItem *item)
+{
+    itemList.append(item);
+}
 
- int FlowLayout::horizontalSpacing() const
- {
-     if (m_hSpace >= 0) {
-         return m_hSpace;
-     } else {
-         return smartSpacing(QStyle::PM_LayoutHorizontalSpacing);
-     }
- }
+int FlowLayout::horizontalSpacing() const
+{
+    if (m_hSpace >= 0) {
+        return m_hSpace;
+    } else {
+        return smartSpacing(QStyle::PM_LayoutHorizontalSpacing);
+    }
+}
 
- int FlowLayout::verticalSpacing() const
- {
-     if (m_vSpace >= 0) {
-         return m_vSpace;
-     } else {
-         return smartSpacing(QStyle::PM_LayoutVerticalSpacing);
-     }
- }
+int FlowLayout::verticalSpacing() const
+{
+    if (m_vSpace >= 0) {
+        return m_vSpace;
+    } else {
+        return smartSpacing(QStyle::PM_LayoutVerticalSpacing);
+    }
+}
 
- int FlowLayout::count() const
- {
-     return itemList.size();
- }
+int FlowLayout::count() const
+{
+    return itemList.size();
+}
 
- QLayoutItem *FlowLayout::itemAt(int index) const
- {
-     return itemList.value(index);
- }
+QLayoutItem *FlowLayout::itemAt(int index) const
+{
+    return itemList.value(index);
+}
 
- QLayoutItem *FlowLayout::takeAt(int index)
- {
-     if (index >= 0 && index < itemList.size())
-         return itemList.takeAt(index);
-     else
-         return 0;
- }
+QLayoutItem *FlowLayout::takeAt(int index)
+{
+    if (index >= 0 && index < itemList.size())
+        return itemList.takeAt(index);
+    else
+        return 0;
+}
 
- Qt::Orientations FlowLayout::expandingDirections() const
- {
-     return 0;
- }
+Qt::Orientations FlowLayout::expandingDirections() const
+{
+    return 0;
+}
 
- bool FlowLayout::hasHeightForWidth() const
- {
-     return true;
- }
+bool FlowLayout::hasHeightForWidth() const
+{
+    return true;
+}
 
- int FlowLayout::heightForWidth(int width) const
- {
-     int height = doLayout(QRect(0, 0, width, 0), true);
-     return height;
- }
+int FlowLayout::heightForWidth(int width) const
+{
+    int height = doLayout(QRect(0, 0, width, 0), true);
+    return height;
+}
 
- void FlowLayout::setGeometry(const QRect &rect)
- {
-     QLayout::setGeometry(rect);
-     doLayout(rect, false);
- }
+void FlowLayout::setGeometry(const QRect &rect)
+{
+    QLayout::setGeometry(rect);
+    doLayout(rect, false);
+}
 
- QSize FlowLayout::sizeHint() const
- {
-     return minimumSize();
- }
+QSize FlowLayout::sizeHint() const
+{
+    return minimumSize();
+}
 
- QSize FlowLayout::minimumSize() const
- {
-     QSize size;
-     QLayoutItem *item;
-     foreach (item, itemList)
-         size = size.expandedTo(item->minimumSize());
+QSize FlowLayout::minimumSize() const
+{
+    QSize size;
+    QLayoutItem *item;
+    foreach (item, itemList)
+        size = size.expandedTo(item->minimumSize());
 
-     size += QSize(2*margin(), 2*margin());
-     return size;
- }
+    size += QSize(2*margin(), 2*margin());
+    return size;
+}
 
- int FlowLayout::doLayout(const QRect &rect, bool testOnly) const
- {
-     int left, top, right, bottom;
-     getContentsMargins(&left, &top, &right, &bottom);
-     QRect effectiveRect = rect.adjusted(+left, +top, -right, -bottom);
-     int x = effectiveRect.x();
-     int y = effectiveRect.y();
-     int lineHeight = 0;
+int FlowLayout::doLayout(const QRect &rect, bool testOnly) const
+{
+    int left, top, right, bottom;
+    getContentsMargins(&left, &top, &right, &bottom);
+    QRect effectiveRect = rect.adjusted(+left, +top, -right, -bottom);
+    int x = effectiveRect.x();
+    int y = effectiveRect.y();
+    int lineHeight = 0;
 
-     QLayoutItem *item;
-     foreach (item, itemList) {
-         QWidget *wid = item->widget();
-         int spaceX = horizontalSpacing();
-         if (spaceX == -1)
-             spaceX = wid->style()->layoutSpacing(
-                 QSizePolicy::PushButton, QSizePolicy::PushButton, Qt::Horizontal);
-         int spaceY = verticalSpacing();
-         if (spaceY == -1)
-             spaceY = wid->style()->layoutSpacing(
-                 QSizePolicy::PushButton, QSizePolicy::PushButton, Qt::Vertical);
-         int nextX = x + item->sizeHint().width() + spaceX;
-         if (nextX - spaceX > effectiveRect.right() && lineHeight > 0) {
-             x = effectiveRect.x();
-             y = y + lineHeight + spaceY;
-             nextX = x + item->sizeHint().width() + spaceX;
-             lineHeight = 0;
-         }
+    QLayoutItem *item;
+    foreach (item, itemList) {
+        QWidget *wid = item->widget();
+        int spaceX = horizontalSpacing();
+        if (spaceX == -1)
+            spaceX = wid->style()->layoutSpacing(
+                QSizePolicy::PushButton, QSizePolicy::PushButton, Qt::Horizontal);
+        int spaceY = verticalSpacing();
+        if (spaceY == -1)
+            spaceY = wid->style()->layoutSpacing(
+                QSizePolicy::PushButton, QSizePolicy::PushButton, Qt::Vertical);
+        int nextX = x + item->sizeHint().width() + spaceX;
+        if (nextX - spaceX > effectiveRect.right() && lineHeight > 0) {
+            x = effectiveRect.x();
+            y = y + lineHeight + spaceY;
+            nextX = x + item->sizeHint().width() + spaceX;
+            lineHeight = 0;
+        }
 
-         if (!testOnly)
-             item->setGeometry(QRect(QPoint(x, y), item->sizeHint()));
+        if (!testOnly)
+            item->setGeometry(QRect(QPoint(x, y), item->sizeHint()));
 
-         x = nextX;
-         lineHeight = qMax(lineHeight, item->sizeHint().height());
-     }
-     return y + lineHeight - rect.y() + bottom;
- }
- int FlowLayout::smartSpacing(QStyle::PixelMetric pm) const
- {
-     QObject *parent = this->parent();
-     if (!parent) {
-         return -1;
-     } else if (parent->isWidgetType()) {
-         QWidget *pw = static_cast<QWidget *>(parent);
-         return pw->style()->pixelMetric(pm, 0, pw);
-     } else {
-         return static_cast<QLayout *>(parent)->spacing();
-     }
- }
+        x = nextX;
+        lineHeight = qMax(lineHeight, item->sizeHint().height());
+    }
+    return y + lineHeight - rect.y() + bottom;
+}
+int FlowLayout::smartSpacing(QStyle::PixelMetric pm) const
+{
+    QObject *parent = this->parent();
+    if (!parent) {
+        return -1;
+    } else if (parent->isWidgetType()) {
+        QWidget *pw = static_cast<QWidget *>(parent);
+        return pw->style()->pixelMetric(pm, 0, pw);
+    } else {
+        return static_cast<QLayout *>(parent)->spacing();
+    }
+}
--- a/QTfrontend/ui/widget/gamecfgwidget.cpp	Fri Jan 25 13:29:20 2013 +0400
+++ b/QTfrontend/ui/widget/gamecfgwidget.cpp	Tue Jan 29 10:10:23 2013 +0400
@@ -262,7 +262,7 @@
     if (schemeData(18).toBool())
         result |= 0x00080000;       // ai survival
     if (schemeData(19).toBool())
-        result |= 0x00100000;       // infinite attacks 
+        result |= 0x00100000;       // infinite attacks
     if (schemeData(20).toBool())
         result |= 0x00200000;       // reset weaps
     if (schemeData(21).toBool())
@@ -678,7 +678,6 @@
 
 void GameCFGWidget::setMaster(bool master)
 {
-    if (master == m_master) return;
     m_master = master;
 
     pMapContainer->setMaster(master);
--- a/QTfrontend/ui/widget/hatbutton.cpp	Fri Jan 25 13:29:20 2013 +0400
+++ b/QTfrontend/ui/widget/hatbutton.cpp	Tue Jan 29 10:10:23 2013 +0400
@@ -25,48 +25,48 @@
 
 HatButton::HatButton(QWidget* parent) : QPushButton(parent)
 {
-	setIconSize(QSize(32, 37));
-	setFixedSize(44, 44);
+    setIconSize(QSize(32, 37));
+    setFixedSize(44, 44);
 
-	m_hatModel = DataManager::instance().hatModel();
-	connect(this, SIGNAL(clicked()), this, SLOT(showPrompt()));
+    m_hatModel = DataManager::instance().hatModel();
+    connect(this, SIGNAL(clicked()), this, SLOT(showPrompt()));
 
-	setCurrentIndex(0);
+    setCurrentIndex(0);
 }
 
 void HatButton::setCurrentIndex(int index)
 {
-	m_hat = m_hatModel->index(index, 0);
-	setWhatsThis(QString(tr("Change hat (%1)")).arg(m_hat.data(Qt::DisplayRole).toString()));
-	setToolTip(m_hat.data(Qt::DisplayRole).toString());
-	setIcon(m_hat.data(Qt::DecorationRole).value<QIcon>());
+    m_hat = m_hatModel->index(index, 0);
+    setWhatsThis(QString(tr("Change hat (%1)")).arg(m_hat.data(Qt::DisplayRole).toString()));
+    setToolTip(m_hat.data(Qt::DisplayRole).toString());
+    setIcon(m_hat.data(Qt::DecorationRole).value<QIcon>());
 }
 
 int HatButton::currentIndex()
 {
-	return m_hat.row();
+    return m_hat.row();
 }
 
 void HatButton::setCurrentHat(const QString & name)
 {
-	QList<QStandardItem *> hats = m_hatModel->findItems(name);
+    QList<QStandardItem *> hats = m_hatModel->findItems(name);
 
-	if (hats.count() > 0)
-		setCurrentIndex(hats[0]->row());
+    if (hats.count() > 0)
+        setCurrentIndex(hats[0]->row());
 }
 
 QString HatButton::currentHat() const
 {
-	return m_hat.data(Qt::DisplayRole).toString();
+    return m_hat.data(Qt::DisplayRole).toString();
 }
 
 void HatButton::showPrompt()
 {
-	HatPrompt prompt(currentIndex(), this);
-	int hatID = prompt.exec() - 1; // Since 0 means canceled, so all indexes are +1'd
-	if (hatID < 0) return;
+    HatPrompt prompt(currentIndex(), this);
+    int hatID = prompt.exec() - 1; // Since 0 means canceled, so all indexes are +1'd
+    if (hatID < 0) return;
 
-	setCurrentIndex(hatID);
-	emit currentIndexChanged(hatID);
-	emit currentHatChanged(currentHat());
+    setCurrentIndex(hatID);
+    emit currentIndexChanged(hatID);
+    emit currentHatChanged(currentHat());
 }
--- a/QTfrontend/ui/widget/hatbutton.h	Fri Jan 25 13:29:20 2013 +0400
+++ b/QTfrontend/ui/widget/hatbutton.h	Tue Jan 29 10:10:23 2013 +0400
@@ -37,16 +37,16 @@
         QString currentHat() const;
 
     private:
-    	QModelIndex m_hat;
-    	HatModel * m_hatModel;
+        QModelIndex m_hat;
+        HatModel * m_hatModel;
 
     signals:
-    	void currentIndexChanged(int);
-    	void currentHatChanged(const QString &);
+        void currentIndexChanged(int);
+        void currentHatChanged(const QString &);
 
     public slots:
-    	void setCurrentIndex(int index);
-    	void setCurrentHat(const QString & name);
+        void setCurrentIndex(int index);
+        void setCurrentHat(const QString & name);
 
     private slots:
         void showPrompt();
--- a/QTfrontend/ui/widget/hatprompt.cpp	Fri Jan 25 13:29:20 2013 +0400
+++ b/QTfrontend/ui/widget/hatprompt.cpp	Tue Jan 29 10:10:23 2013 +0400
@@ -28,6 +28,7 @@
 #include <QLineEdit>
 #include <QLabel>
 #include <QSortFilterProxyModel>
+#include <QFontMetrics>
 #include <QDebug>
 
 #include "DataManager.h"
@@ -37,31 +38,31 @@
 
 HatPrompt::HatPrompt(int currentIndex, QWidget* parent) : QDialog(parent)
 {
-	setModal(true);
-	setWindowFlags(Qt::Sheet);
-	setWindowModality(Qt::WindowModal);
-	setMinimumSize(550, 430);
-	resize(550, 430);
-	setSizePolicy(QSizePolicy::Minimum, QSizePolicy::Minimum);
+    setModal(true);
+    setWindowFlags(Qt::Sheet);
+    setWindowModality(Qt::WindowModal);
+    setMinimumSize(550, 430);
+    resize(550, 430);
+    setSizePolicy(QSizePolicy::Minimum, QSizePolicy::Minimum);
 
-	setStyleSheet("QPushButton { padding: 5px; margin-top: 10px; }");
+    setStyleSheet("QPushButton { padding: 5px; margin-top: 10px; }");
 
-	// Hat model, and a model for setting a filter
-	HatModel * hatModel = DataManager::instance().hatModel();
-	filterModel = new QSortFilterProxyModel();
-	filterModel->setSourceModel(hatModel);
-	filterModel->setFilterCaseSensitivity(Qt::CaseInsensitive);
+    // Hat model, and a model for setting a filter
+    HatModel * hatModel = DataManager::instance().hatModel();
+    filterModel = new QSortFilterProxyModel();
+    filterModel->setSourceModel(hatModel);
+    filterModel->setFilterCaseSensitivity(Qt::CaseInsensitive);
 
-	// Grid
-	QGridLayout * dialogLayout = new QGridLayout(this);
-	dialogLayout->setSpacing(0);
-	dialogLayout->setColumnStretch(1, 1);
+    // Grid
+    QGridLayout * dialogLayout = new QGridLayout(this);
+    dialogLayout->setSpacing(0);
+    dialogLayout->setColumnStretch(1, 1);
 
-	QHBoxLayout * topLayout = new QHBoxLayout();
+    QHBoxLayout * topLayout = new QHBoxLayout();
 
-	// Help/prompt message at top
-	QLabel * lblDesc = new QLabel(tr("Select a hat"));
-	lblDesc->setObjectName("lblDesc");
+    // Help/prompt message at top
+    QLabel * lblDesc = new QLabel(tr("Select a hat"));
+    lblDesc->setObjectName("lblDesc");
     lblDesc->setStyleSheet("#lblDesc { color: #130F2A; background: #F6CB1C; border: solid 4px #F6CB1C; border-top-left-radius: 10px; padding: 4px 10px;}");
     lblDesc->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Fixed);
     lblDesc->setFixedHeight(24);
@@ -85,8 +86,10 @@
 
     // Filter label
     QLabel * lblFilter = new QLabel(tr("Filter: "), txtFilter);
-    lblFilter->setStyleSheet(QString("background: none; margin-left: -%1px; margin-top: 4px;").arg(lblFilter->width() / 2 - 3));
-    txtFilter->setStyleSheet(QString("border-width: 0px; background-color: rgb(13, 5, 68); border-radius: 6px; margin-top: 3px; margin-right: 3px; padding-left: %1px; padding-bottom: 2px;").arg(lblFilter->width() / 2));
+    QFontMetrics lblMetrics(lblFilter->font());
+    int lblFilterWidth = lblMetrics.width(lblFilter->text());
+    lblFilter->setStyleSheet(QString("background: none; margin-left: -%1px; margin-top: 4px;").arg(lblFilterWidth + 5));
+    txtFilter->setStyleSheet(QString("LineEditCursor, QLabel { border-width: 0px; border-radius: 6px; margin-top: 3px; margin-right: 3px; padding-left: %1px; padding-bottom: 2px; background-color: rgb(23, 11, 54); } LineEditCursor:hover, LineEditCursor:focus { background-color: rgb(13, 5, 68); }").arg(lblFilterWidth + 5));
 
     // Corner widget
     QLabel * corner = new QLabel();
@@ -99,71 +102,71 @@
     topLayout->addWidget(corner, 0, Qt::AlignBottom);
     topLayout->addStretch(1);
 
-	// Cancel button (closes dialog)
-	QPushButton * btnCancel = new QPushButton(tr("Cancel"));
-	connect(btnCancel, SIGNAL(clicked()), this, SLOT(reject()));
+    // Cancel button (closes dialog)
+    QPushButton * btnCancel = new QPushButton(tr("Cancel"));
+    connect(btnCancel, SIGNAL(clicked()), this, SLOT(reject()));
 
-	// Select button
-	QPushButton * btnSelect = new QPushButton(tr("Use selected hat"));
-	btnSelect->setDefault(true);
-	connect(btnSelect, SIGNAL(clicked()), this, SLOT(onAccepted()));
+    // Select button
+    QPushButton * btnSelect = new QPushButton(tr("Use selected hat"));
+    btnSelect->setDefault(true);
+    connect(btnSelect, SIGNAL(clicked()), this, SLOT(onAccepted()));
 
-	// Add hats
-	list = new HatListView();
-	list->setModel(filterModel);
-	list->setViewMode(QListView::IconMode);
-	list->setResizeMode(QListView::Adjust);
-	list->setMovement(QListView::Static);
-	list->setEditTriggers(QAbstractItemView::NoEditTriggers);
-	list->setSpacing(8);
-	list->setWordWrap(true);
-	list->setSelectionMode(QAbstractItemView::SingleSelection);
-	list->setObjectName("hatList");
-	list->setCurrentIndex(filterModel->index(currentIndex, 0));
-	connect(list, SIGNAL(activated(const QModelIndex &)), this, SLOT(hatChosen(const QModelIndex &)));
-	connect(list, SIGNAL(clicked(const QModelIndex &)), this, SLOT(hatChosen(const QModelIndex &)));
+    // Add hats
+    list = new HatListView();
+    list->setModel(filterModel);
+    list->setViewMode(QListView::IconMode);
+    list->setResizeMode(QListView::Adjust);
+    list->setMovement(QListView::Static);
+    list->setEditTriggers(QAbstractItemView::NoEditTriggers);
+    list->setSpacing(8);
+    list->setWordWrap(true);
+    list->setSelectionMode(QAbstractItemView::SingleSelection);
+    list->setObjectName("hatList");
+    list->setCurrentIndex(filterModel->index(currentIndex, 0));
+    connect(list, SIGNAL(activated(const QModelIndex &)), this, SLOT(hatChosen(const QModelIndex &)));
+    connect(list, SIGNAL(clicked(const QModelIndex &)), this, SLOT(hatChosen(const QModelIndex &)));
 
-	// Add elements to layouts
-	dialogLayout->addLayout(topLayout, 0, 0, 1, 3);
-	dialogLayout->addWidget(list, 1, 0, 1, 3);
-	dialogLayout->addWidget(btnCancel, 2, 0, 1, 1, Qt::AlignLeft);
-	dialogLayout->addWidget(btnSelect, 2, 2, 1, 1, Qt::AlignRight);
+    // Add elements to layouts
+    dialogLayout->addLayout(topLayout, 0, 0, 1, 3);
+    dialogLayout->addWidget(list, 1, 0, 1, 3);
+    dialogLayout->addWidget(btnCancel, 2, 0, 1, 1, Qt::AlignLeft);
+    dialogLayout->addWidget(btnSelect, 2, 2, 1, 1, Qt::AlignRight);
 }
 
 void HatPrompt::moveUp()
 {
-	list->setCurrentIndex(list->moveCursor(QAbstractItemView::MoveUp, Qt::NoModifier));
+    list->setCurrentIndex(list->moveCursor(QAbstractItemView::MoveUp, Qt::NoModifier));
 }
 
 void HatPrompt::moveDown()
 {
-	list->setCurrentIndex(list->moveCursor(QAbstractItemView::MoveDown, Qt::NoModifier));
+    list->setCurrentIndex(list->moveCursor(QAbstractItemView::MoveDown, Qt::NoModifier));
 }
 
 void HatPrompt::moveLeft()
 {
-	list->setCurrentIndex(list->moveCursor(QAbstractItemView::MoveLeft, Qt::NoModifier));
+    list->setCurrentIndex(list->moveCursor(QAbstractItemView::MoveLeft, Qt::NoModifier));
 }
 
 void HatPrompt::moveRight()
 {
-	list->setCurrentIndex(list->moveCursor(QAbstractItemView::MoveRight, Qt::NoModifier));
+    list->setCurrentIndex(list->moveCursor(QAbstractItemView::MoveRight, Qt::NoModifier));
 }
 
 void HatPrompt::onAccepted()
 {
-	hatChosen(list->currentIndex());
+    hatChosen(list->currentIndex());
 }
 
 // When a hat is selected
 void HatPrompt::hatChosen(const QModelIndex & index)
 {
-	done(filterModel->mapToSource(index).row() + 1); // Since returning 0 means canceled
+    done(filterModel->mapToSource(index).row() + 1); // Since returning 0 means canceled
 }
 
 // When the text in the filter text box is changed
 void HatPrompt::filterChanged(const QString & text)
 {
-	filterModel->setFilterFixedString(text);
-	list->setCurrentIndex(filterModel->index(0, 0));
+    filterModel->setFilterFixedString(text);
+    list->setCurrentIndex(filterModel->index(0, 0));
 }
--- a/QTfrontend/ui/widget/hatprompt.h	Fri Jan 25 13:29:20 2013 +0400
+++ b/QTfrontend/ui/widget/hatprompt.h	Tue Jan 29 10:10:23 2013 +0400
@@ -30,9 +30,9 @@
 
 class HatListView : public QListView
 {
-	friend class HatPrompt;
+    friend class HatPrompt;
 
-	public:
+    public:
         HatListView(QWidget* parent = 0) : QListView(parent){}
 };
 
@@ -49,7 +49,7 @@
         QSortFilterProxyModel * filterModel;
 
     private slots:
-    	void onAccepted();
+        void onAccepted();
         void hatChosen(const QModelIndex & index);
         void filterChanged(const QString & text);
         void moveUp();
--- a/QTfrontend/ui/widget/keybinder.cpp	Fri Jan 25 13:29:20 2013 +0400
+++ b/QTfrontend/ui/widget/keybinder.cpp	Tue Jan 29 10:10:23 2013 +0400
@@ -38,12 +38,12 @@
 {
     this->defaultText = defaultText;
     enableSignal = false;
-    
+
     // Two-column tab layout
     QHBoxLayout * pageKeysLayout = new QHBoxLayout(this);
     pageKeysLayout->setSpacing(0);
     pageKeysLayout->setContentsMargins(0, 0, 0, 0);
-    
+
     // Table for category list
     QVBoxLayout * catListContainer = new QVBoxLayout();
     catListContainer->setContentsMargins(10, 10, 10, 10);
@@ -122,12 +122,12 @@
         {
             // Add stretch at end of previous layout
             if (curLayout != NULL) curLayout->insertStretch(-1, 1);
-            
+
             // Category list item
             QListWidgetItem * catItem = new QListWidgetItem(HWApplication::translate("binds (categories)", cbinds[i].category));
             catItem->setSizeHint(catSize);
             catList->addItem(catItem);
-            
+
             // Create new page
             curPage = new QWidget();
             curLayout = new QVBoxLayout(curPage);
@@ -170,7 +170,7 @@
         comboBox->setModel((QAbstractItemModel*)DataManager::instance().bindsModel());
         comboBox->setVisible(false);
         comboBox->setFixedWidth(200);
-        
+
         // Table row
         int row = curTable->rowCount();
         QTableWidgetItem * nameCell = new QTableWidgetItem(HWApplication::translate("binds", cbinds[i].name));
@@ -241,7 +241,7 @@
     QComboBox * box = bindCellComboBoxMappings->value(item);
     QTableWidget * table = item->tableWidget();
     QFrame * frame = box->findChild<QFrame*>();
-    
+
     box->showPopup();
     frame->move(
         frame->x() + table->horizontalHeader()->sectionSize(0),
@@ -279,7 +279,7 @@
 void KeyBinder::resetInterface()
 {
     enableSignal = false;
-    
+
     catList->setCurrentItem(catList->item(1));
     changeBindingsPage(1);
     if (selectedBindTable != NULL)
@@ -287,7 +287,7 @@
         selectedBindTable->clearSelection();
         selectedBindTable = NULL;
     }
-    
+
     // Default bind text
     DataManager::instance().bindsModel()->item(0)->setData(defaultText, Qt::DisplayRole);
     for (int i = 0; i < BINDS_NUMBER; i++)
--- a/QTfrontend/ui/widget/lineeditcursor.cpp	Fri Jan 25 13:29:20 2013 +0400
+++ b/QTfrontend/ui/widget/lineeditcursor.cpp	Tue Jan 29 10:10:23 2013 +0400
@@ -22,14 +22,14 @@
 
 void LineEditCursor::keyPressEvent(QKeyEvent * event)
 {
-	if (event->key() == Qt::Key_Up)
-		emit moveUp();
-	else if (event->key() == Qt::Key_Down)
-		emit moveDown();
-	else if (event->key() == Qt::Key_Left)
-		emit moveLeft();
-	else if (event->key() == Qt::Key_Right)
-		emit moveRight();
-	else
-		QLineEdit::keyPressEvent(event);
+    if (event->key() == Qt::Key_Up)
+        emit moveUp();
+    else if (event->key() == Qt::Key_Down)
+        emit moveDown();
+    else if (event->key() == Qt::Key_Left)
+        emit moveLeft();
+    else if (event->key() == Qt::Key_Right)
+        emit moveRight();
+    else
+        QLineEdit::keyPressEvent(event);
 }
--- a/QTfrontend/ui/widget/mapContainer.cpp	Fri Jan 25 13:29:20 2013 +0400
+++ b/QTfrontend/ui/widget/mapContainer.cpp	Tue Jan 29 10:10:23 2013 +0400
@@ -887,9 +887,8 @@
 
 void HWMapContainer::setMaster(bool master)
 {
-    if (master == m_master) return;
     m_master = master;
-    
+
     foreach (QWidget *widget, m_childWidgets)
         widget->setEnabled(master);
 }
--- a/QTfrontend/ui/widget/seedprompt.cpp	Fri Jan 25 13:29:20 2013 +0400
+++ b/QTfrontend/ui/widget/seedprompt.cpp	Tue Jan 29 10:10:23 2013 +0400
@@ -28,58 +28,58 @@
 
 SeedPrompt::SeedPrompt(QWidget* parent, const QString & seed, bool editable) : QDialog(parent)
 {
-	setModal(true);
-	setWindowFlags(Qt::Sheet);
-	setWindowModality(Qt::WindowModal);
-	setMinimumSize(360, 160);
-	resize(360, 160);
-	setSizePolicy(QSizePolicy::Minimum, QSizePolicy::Minimum);
+    setModal(true);
+    setWindowFlags(Qt::Sheet);
+    setWindowModality(Qt::WindowModal);
+    setMinimumSize(360, 160);
+    resize(360, 160);
+    setSizePolicy(QSizePolicy::Minimum, QSizePolicy::Minimum);
 
-	// Layout
-	QVBoxLayout * dialogLayout = new QVBoxLayout(this);
+    // Layout
+    QVBoxLayout * dialogLayout = new QVBoxLayout(this);
 
-	// Label
-	QLabel * label = new QLabel(tr("The map seed is the basis for all random values generated by the game."));
-	label->setWordWrap(true);
-	dialogLayout->addWidget(label, 0);
+    // Label
+    QLabel * label = new QLabel(tr("The map seed is the basis for all random values generated by the game."));
+    label->setWordWrap(true);
+    dialogLayout->addWidget(label, 0);
 
-	// Input box
-	editBox = new QLineEdit();
-	editBox->setText(seed);
-	editBox->setReadOnly(!editable);
-	editBox->setStyleSheet("QLineEdit { padding: 3px; }");
-	dialogLayout->addWidget(editBox, 1);
+    // Input box
+    editBox = new QLineEdit();
+    editBox->setText(seed);
+    editBox->setReadOnly(!editable);
+    editBox->setStyleSheet("QLineEdit { padding: 3px; }");
+    dialogLayout->addWidget(editBox, 1);
 
-	dialogLayout->addStretch(1);
+    dialogLayout->addStretch(1);
 
-	// Buttons
-	QHBoxLayout * buttonLayout = new QHBoxLayout();
-	buttonLayout->addStretch(1);
-	dialogLayout->addLayout(buttonLayout);
-	if (editable)
-	{
-		QPushButton * btnCancel = new QPushButton(tr("Cancel"));
-		QPushButton * btnOkay = new QPushButton(tr("Set seed"));
-		connect(btnCancel, SIGNAL(clicked()), this, SLOT(reject()));
-		connect(btnOkay, SIGNAL(clicked()), this, SLOT(accept()));
-		buttonLayout->addWidget(btnCancel);
-		buttonLayout->addWidget(btnOkay);
-		btnOkay->setDefault(true);
-	}
-	else
-	{
-		QPushButton * btnClose = new QPushButton(tr("Close"));
-		connect(btnClose, SIGNAL(clicked()), this, SLOT(reject()));
-		buttonLayout->addWidget(btnClose);
-		btnClose->setDefault(true);
-	}
+    // Buttons
+    QHBoxLayout * buttonLayout = new QHBoxLayout();
+    buttonLayout->addStretch(1);
+    dialogLayout->addLayout(buttonLayout);
+    if (editable)
+    {
+        QPushButton * btnCancel = new QPushButton(tr("Cancel"));
+        QPushButton * btnOkay = new QPushButton(tr("Set seed"));
+        connect(btnCancel, SIGNAL(clicked()), this, SLOT(reject()));
+        connect(btnOkay, SIGNAL(clicked()), this, SLOT(accept()));
+        buttonLayout->addWidget(btnCancel);
+        buttonLayout->addWidget(btnOkay);
+        btnOkay->setDefault(true);
+    }
+    else
+    {
+        QPushButton * btnClose = new QPushButton(tr("Close"));
+        connect(btnClose, SIGNAL(clicked()), this, SLOT(reject()));
+        buttonLayout->addWidget(btnClose);
+        btnClose->setDefault(true);
+    }
 
-	setStyleSheet("QPushButton { padding: 5px; }");
+    setStyleSheet("QPushButton { padding: 5px; }");
 
-	connect(this, SIGNAL(accepted()), this, SLOT(setSeed()));
+    connect(this, SIGNAL(accepted()), this, SLOT(setSeed()));
 }
 
 void SeedPrompt::setSeed()
 {
-	emit seedSelected(editBox->text());
+    emit seedSelected(editBox->text());
 }
--- a/QTfrontend/ui/widget/seedprompt.h	Fri Jan 25 13:29:20 2013 +0400
+++ b/QTfrontend/ui/widget/seedprompt.h	Tue Jan 29 10:10:23 2013 +0400
@@ -31,13 +31,13 @@
         SeedPrompt(QWidget* parent, const QString & seed, bool editable);
 
     signals:
-    	void seedSelected(const QString & seed);
+        void seedSelected(const QString & seed);
 
     private slots:
-    	void setSeed();
+        void setSeed();
 
     private:
-    	QLineEdit * editBox;
+        QLineEdit * editBox;
 };
 
 #endif // SEEDPROMPT_H
--- a/QTfrontend/ui/widget/teamselect.cpp	Fri Jan 25 13:29:20 2013 +0400
+++ b/QTfrontend/ui/widget/teamselect.cpp	Tue Jan 29 10:10:23 2013 +0400
@@ -36,8 +36,6 @@
     {
         framePlaying->addTeam(team, true);
         curPlayingTeams.push_back(team);
-        connect(framePlaying->getTeamWidget(team), SIGNAL(teamStatusChanged(HWTeam)),
-                this, SLOT(netTeamStatusChanged(const HWTeam&)));
         connect(framePlaying->getTeamWidget(team), SIGNAL(hhNmChanged(const HWTeam&)),
                 this, SLOT(hhNumChanged(const HWTeam&)));
         dynamic_cast<TeamShowWidget*>(framePlaying->getTeamWidget(team))->hhNumChanged();
@@ -145,17 +143,6 @@
     emit setEnabledGameStart(curPlayingTeams.size()>1);
 }
 
-void TeamSelWidget::netTeamStatusChanged(const HWTeam& team)
-{
-    QList<HWTeam>::iterator itPlay=std::find(curPlayingTeams.begin(), curPlayingTeams.end(), team);
-
-}
-
-//void TeamSelWidget::removeTeam(__attribute__ ((unused)) HWTeam team)
-//{
-//curDontPlayingTeams.erase(std::find(curDontPlayingTeams.begin(), curDontPlayingTeams.end(), team));
-//}
-
 void TeamSelWidget::changeTeamStatus(HWTeam team)
 {
     QList<HWTeam>::iterator itDontPlay=std::find(m_curNotPlayingTeams.begin(), m_curNotPlayingTeams.end(), team);
@@ -330,4 +317,4 @@
     QWidget::repaint();
     framePlaying->repaint();
     frameDontPlaying->repaint();
-}
\ No newline at end of file
+}
--- a/QTfrontend/ui/widget/teamselect.h	Fri Jan 25 13:29:20 2013 +0400
+++ b/QTfrontend/ui/widget/teamselect.h	Tue Jan 29 10:10:23 2013 +0400
@@ -51,7 +51,6 @@
 
     public slots:
         void addTeam(HWTeam team);
-        void netTeamStatusChanged(const HWTeam& team);
         void changeHHNum(const HWTeam&);
         void changeTeamColor(const HWTeam&);
         void changeTeamStatus(HWTeam team);
--- a/QTfrontend/ui/widget/themeprompt.cpp	Fri Jan 25 13:29:20 2013 +0400
+++ b/QTfrontend/ui/widget/themeprompt.cpp	Tue Jan 29 10:10:23 2013 +0400
@@ -32,29 +32,29 @@
 
 ThemePrompt::ThemePrompt(QWidget* parent) : QDialog(parent)
 {
-	setModal(true);
-	setWindowFlags(Qt::Sheet);
-	setWindowModality(Qt::WindowModal);
-	setMinimumSize(550, 430);
-	resize(550, 430);
-	setSizePolicy(QSizePolicy::Minimum, QSizePolicy::Minimum);
+    setModal(true);
+    setWindowFlags(Qt::Sheet);
+    setWindowModality(Qt::WindowModal);
+    setMinimumSize(550, 430);
+    resize(550, 430);
+    setSizePolicy(QSizePolicy::Minimum, QSizePolicy::Minimum);
 
-	// Grid
-	QVBoxLayout * dialogLayout = new QVBoxLayout(this);
-	dialogLayout->setSpacing(0);
+    // Grid
+    QVBoxLayout * dialogLayout = new QVBoxLayout(this);
+    dialogLayout->setSpacing(0);
 
-	// Help/prompt message at top
-	QLabel * lblDesc = new QLabel(tr("Select a theme for this map"));
+    // Help/prompt message at top
+    QLabel * lblDesc = new QLabel(tr("Select a theme for this map"));
     lblDesc->setStyleSheet("color: #130F2A; background: #F6CB1C; border: solid 4px #F6CB1C; border-top-left-radius: 10px; border-top-right-radius: 10px; padding: auto 20px;");
     lblDesc->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Fixed);
     lblDesc->setFixedHeight(24);
     lblDesc->setMinimumWidth(0);
 
-	// Scroll area and container for theme icons
-	QWidget * themesContainer = new QWidget();
-	FlowLayout * themesGrid = new FlowLayout();
-	themesContainer->setLayout(themesGrid);
-	QScrollArea * scrollArea = new QScrollArea();
+    // Scroll area and container for theme icons
+    QWidget * themesContainer = new QWidget();
+    FlowLayout * themesGrid = new FlowLayout();
+    themesContainer->setLayout(themesGrid);
+    QScrollArea * scrollArea = new QScrollArea();
     scrollArea->setVerticalScrollBarPolicy(Qt::ScrollBarAsNeeded);
     scrollArea->setObjectName("scrollArea");
     scrollArea->setStyleSheet("QScrollBar, #scrollArea { background-color: #130F2A; } #scrollArea { border-color: #F6CB1C; border-width: 3px; border-top-width: 0; border-style: solid; border-bottom-left-radius: 10px; border-bottom-right-radius: 10px; }");
@@ -62,40 +62,40 @@
     scrollArea->setFrameShape(QFrame::NoFrame);
     scrollArea->setWidget(themesContainer);
 
-	// Cancel button (closes dialog)
-	QPushButton * btnCancel = new QPushButton(tr("Cancel"));
-	btnCancel->setStyleSheet("padding: 5px; margin-top: 10px;");
-	connect(btnCancel, SIGNAL(clicked()), this, SLOT(reject()));
+    // Cancel button (closes dialog)
+    QPushButton * btnCancel = new QPushButton(tr("Cancel"));
+    btnCancel->setStyleSheet("padding: 5px; margin-top: 10px;");
+    connect(btnCancel, SIGNAL(clicked()), this, SLOT(reject()));
 
-	// Add elements to layouts
-	dialogLayout->addWidget(lblDesc, 0);
-	dialogLayout->addWidget(scrollArea, 1);
-	dialogLayout->addWidget(btnCancel, 0, Qt::AlignLeft);
+    // Add elements to layouts
+    dialogLayout->addWidget(lblDesc, 0);
+    dialogLayout->addWidget(scrollArea, 1);
+    dialogLayout->addWidget(btnCancel, 0, Qt::AlignLeft);
 
-	// Tooltip label for theme name
-	lblToolTip = new QLabel(this);
+    // Tooltip label for theme name
+    lblToolTip = new QLabel(this);
 
-	// Add theme buttons
-	ThemeModel * themes = DataManager::instance().themeModel();
-	for (int i = 0; i < themes->rowCount(); i++)
-	{
-		QModelIndex index = themes->index(i, 0);
-		QToolButton * btn = new QToolButton();
-		bool dlc = themes->data(index, Qt::UserRole + 2).toBool();
-		btn->setToolButtonStyle(Qt::ToolButtonTextUnderIcon);
-		btn->setIcon(qVariantValue<QIcon>(themes->data(index, Qt::UserRole)));
-		btn->setText((dlc ? "*" : "") + themes->data(index, Qt::DisplayRole).toString());
-		btn->setIconSize(QSize(60, 60));
-		btn->setProperty("themeID", QVariant(i));
-		btn->setStyleSheet("padding: 2px;");
-		connect(btn, SIGNAL(clicked()), this, SLOT(themeClicked()));
-		themesGrid->addWidget(btn);
-	}
+    // Add theme buttons
+    ThemeModel * themes = DataManager::instance().themeModel();
+    for (int i = 0; i < themes->rowCount(); i++)
+    {
+        QModelIndex index = themes->index(i, 0);
+        QToolButton * btn = new QToolButton();
+        bool dlc = themes->data(index, Qt::UserRole + 2).toBool();
+        btn->setToolButtonStyle(Qt::ToolButtonTextUnderIcon);
+        btn->setIcon(qVariantValue<QIcon>(themes->data(index, Qt::UserRole)));
+        btn->setText((dlc ? "*" : "") + themes->data(index, Qt::DisplayRole).toString());
+        btn->setIconSize(QSize(60, 60));
+        btn->setProperty("themeID", QVariant(i));
+        btn->setStyleSheet("padding: 2px;");
+        connect(btn, SIGNAL(clicked()), this, SLOT(themeClicked()));
+        themesGrid->addWidget(btn);
+    }
 }
 
 // When a theme is selected
 void ThemePrompt::themeClicked()
 {
-	QWidget * btn = (QWidget*)sender();
-	done(btn->property("themeID").toInt() + 1); // Since returning 0 means canceled
+    QWidget * btn = (QWidget*)sender();
+    done(btn->property("themeID").toInt() + 1); // Since returning 0 means canceled
 }
--- a/QTfrontend/util/FileEngine.cpp	Fri Jan 25 13:29:20 2013 +0400
+++ b/QTfrontend/util/FileEngine.cpp	Tue Jan 29 10:10:23 2013 +0400
@@ -1,380 +1,380 @@
-/* borrowed from https://github.com/skhaz/qt-physfs-wrapper
- * TODO: add copyright header, determine license
- */
-
-#include "hwpacksmounter.h"
-#include "FileEngine.h"
-
-
-const QString FileEngineHandler::scheme = "physfs:/";
-
-FileEngine::FileEngine(const QString& filename)
-    : m_handle(NULL)
-    , m_size(0)
-    , m_flags(0)
-    , m_bufferSet(false)
-    , m_readWrite(false)
-{
-    setFileName(filename);
-}
-
-FileEngine::~FileEngine()
-{
-    close();
-}
-
-bool FileEngine::open(QIODevice::OpenMode openMode)
-{
-    close();
-
-    if ((openMode & QIODevice::ReadWrite) == QIODevice::ReadWrite) {
-        m_handle = PHYSFS_openAppend(m_fileName.toUtf8().constData());
-        if(m_handle)
-        {
-            m_readWrite = true;
-            seek(0);
-        }
-    }
-
-    else if (openMode & QIODevice::WriteOnly) {
-        m_handle = PHYSFS_openWrite(m_fileName.toUtf8().constData());
-        m_flags = QAbstractFileEngine::WriteOwnerPerm | QAbstractFileEngine::WriteUserPerm | QAbstractFileEngine::FileType;
-    }
-
-    else if (openMode & QIODevice::ReadOnly) {
-        m_handle = PHYSFS_openRead(m_fileName.toUtf8().constData());
-    }
-
-    else if (openMode & QIODevice::Append) {
-        m_handle = PHYSFS_openAppend(m_fileName.toUtf8().constData());
-    }
-
-    else {
-        qWarning("[PHYSFS] Bad file open mode: %d", (int)openMode);
-    }
-
-    if (!m_handle) {
-        qWarning("[PHYSFS] Failed to open %s, reason: %s", m_fileName.toUtf8().constData(), PHYSFS_getLastError());
-        return false;
-    }
-
-    return true;
-}
-
-bool FileEngine::close()
-{
-    if (isOpened()) {
-        int result = PHYSFS_close(m_handle);
-        m_handle = NULL;
-        return result != 0;
-    }
-
-    return true;
-}
-
-bool FileEngine::flush()
-{
-    return PHYSFS_flush(m_handle) != 0;
-}
-
-qint64 FileEngine::size() const
-{
-    return m_size;
-}
-
-qint64 FileEngine::pos() const
-{
-    return PHYSFS_tell(m_handle);
-}
-
-bool FileEngine::setSize(qint64 size)
-{
-    if(size == 0)
-    {
-        m_size = 0;
-        return open(QIODevice::WriteOnly);
-    }
-    else
-        return false;
-}
-
-bool FileEngine::seek(qint64 pos)
-{
-    bool ok = PHYSFS_seek(m_handle, pos) != 0;
-
-    return ok;
-}
-
-bool FileEngine::isSequential() const
-{
-    return false;
-}
-
-bool FileEngine::remove()
-{
-    return PHYSFS_delete(m_fileName.toUtf8().constData()) != 0;
-}
-
-bool FileEngine::mkdir(const QString &dirName, bool createParentDirectories) const
-{
-    Q_UNUSED(createParentDirectories);
-
-    return PHYSFS_mkdir(dirName.toUtf8().constData()) != 0;
-}
-
-bool FileEngine::rmdir(const QString &dirName, bool recurseParentDirectories) const
-{
-    Q_UNUSED(recurseParentDirectories);
-
-    return PHYSFS_delete(dirName.toUtf8().constData()) != 0;
-}
-
-bool FileEngine::caseSensitive() const
-{
-    return true;
-}
-
-bool FileEngine::isRelativePath() const
-{
-    return false;
-}
-
-QAbstractFileEngineIterator * FileEngine::beginEntryList(QDir::Filters filters, const QStringList &filterNames)
-{
-    return new FileEngineIterator(filters, filterNames, entryList(filters, filterNames));
-}
-
-QStringList FileEngine::entryList(QDir::Filters filters, const QStringList &filterNames) const
-{
-    Q_UNUSED(filters);
-
-    QString file;
-    QStringList result;
-    char **files = PHYSFS_enumerateFiles(m_fileName.toUtf8().constData());
-
-    for (char **i = files; *i != NULL; i++) {
-        file = QString::fromUtf8(*i);
-
-        if (filterNames.isEmpty() || QDir::match(filterNames, file)) {
-            result << file;
-        }
-    }
-
-    PHYSFS_freeList(files);
-
-    return result;
-}
-
-QAbstractFileEngine::FileFlags FileEngine::fileFlags(FileFlags type) const
-{
-    return type & m_flags;
-}
-
-QString FileEngine::fileName(FileName file) const
-{
-    switch(file)
-    {
-        case QAbstractFileEngine::AbsolutePathName:
-        {
-            QString s(PHYSFS_getWriteDir());
-            return s;
-        }
-        case QAbstractFileEngine::BaseName:
-        {
-            int l = m_fileName.lastIndexOf('/');
-            QString s = m_fileName.mid(l + 1);
-            return s;
-        }
-        case QAbstractFileEngine::DefaultName:
-        case QAbstractFileEngine::AbsoluteName:
-        default:
-        {
-            QString s = "physfs:/" + m_fileName;
-            return s;
-        }
-    }
-}
-
-QDateTime FileEngine::fileTime(FileTime time) const
-{
-    switch (time)
-    {
-        case QAbstractFileEngine::ModificationTime:
-        default:
-            return m_date;
-            break;
-    };
-}
-
-void FileEngine::setFileName(const QString &file)
-{
-    if(file.startsWith(FileEngineHandler::scheme))
-        m_fileName = file.mid(FileEngineHandler::scheme.size());
-    else
-        m_fileName = file;
-    PHYSFS_Stat stat;
-    if (PHYSFS_stat(m_fileName.toUtf8().constData(), &stat) != 0) {        
-        m_size = stat.filesize;
-        m_date = QDateTime::fromTime_t(stat.modtime);
-//        m_flags |= QAbstractFileEngine::WriteOwnerPerm;
-        m_flags |= QAbstractFileEngine::ReadOwnerPerm;
-        m_flags |= QAbstractFileEngine::ReadUserPerm;
-        m_flags |= QAbstractFileEngine::ExistsFlag;
-        m_flags |= QAbstractFileEngine::LocalDiskFlag;
-
-        switch (stat.filetype)
-        {
-            case PHYSFS_FILETYPE_REGULAR:
-                m_flags |= QAbstractFileEngine::FileType;
-                break;
-            case PHYSFS_FILETYPE_DIRECTORY:
-                m_flags |= QAbstractFileEngine::DirectoryType;
-                break;
-            case PHYSFS_FILETYPE_SYMLINK:
-                m_flags |= QAbstractFileEngine::LinkType;
-                break;
-            default: ;
-        }
-    }
-}
-
-bool FileEngine::atEnd() const
-{
-    return PHYSFS_eof(m_handle) != 0;
-}
-
-qint64 FileEngine::read(char *data, qint64 maxlen)
-{
-    if(m_readWrite)
-    {
-        if(pos() == 0)
-            open(QIODevice::ReadOnly);
-        else
-            return -1;
-    }
-
-    qint64 len = PHYSFS_readBytes(m_handle, data, maxlen);
-    return len;
-}
-
-qint64 FileEngine::readLine(char *data, qint64 maxlen)
-{
-    if(!m_bufferSet)
-    {
-        PHYSFS_setBuffer(m_handle, 4096);
-        m_bufferSet = true;
-    }
-
-    qint64 bytesRead = 0;
-    while(PHYSFS_readBytes(m_handle, data, 1)
-          && maxlen
-          && (*data == '\n'))
-    {
-        ++data;
-        --maxlen;
-        ++bytesRead;
-    }
-
-    return bytesRead;
-}
-
-qint64 FileEngine::write(const char *data, qint64 len)
-{
-    return PHYSFS_writeBytes(m_handle, data, len);
-}
-
-bool FileEngine::isOpened() const
-{
-    return m_handle != NULL;
-}
-
-QFile::FileError FileEngine::error() const
-{
-    return QFile::UnspecifiedError;
-}
-
-QString FileEngine::errorString() const
-{
-    return PHYSFS_getLastError();
-}
-
-bool FileEngine::supportsExtension(Extension extension) const
-{
-    return
-            (extension == QAbstractFileEngine::AtEndExtension)
-            || (extension == QAbstractFileEngine::FastReadLineExtension)
-            ;
-}
-
-
-FileEngineHandler::FileEngineHandler(char *argv0)
-{
-    PHYSFS_init(argv0);
-}
-
-FileEngineHandler::~FileEngineHandler()
-{
-    PHYSFS_deinit();
-}
-
-QAbstractFileEngine* FileEngineHandler::create(const QString &filename) const
-{
-    if (filename.startsWith(scheme))
-        return new FileEngine(filename);
-    else
-        return NULL;
-}
-
-void FileEngineHandler::mount(const QString &path)
-{
-    PHYSFS_mount(path.toUtf8().constData(), NULL, 1);
-}
-
-void FileEngineHandler::mount(const QString & path, const QString & mountPoint)
-{
-    PHYSFS_mount(path.toUtf8().constData(), mountPoint.toUtf8().constData(), 1);
-}
-
-void FileEngineHandler::setWriteDir(const QString &path)
-{
-    PHYSFS_setWriteDir(path.toUtf8().constData());
-}
-
-void FileEngineHandler::mountPacks()
-{
-    hedgewarsMountPackages();
-}
-
-
-FileEngineIterator::FileEngineIterator(QDir::Filters filters, const QStringList &nameFilters, const QStringList &entries)
-    : QAbstractFileEngineIterator(filters, nameFilters)
-{
-    m_entries = entries;
-
-    /* heck.. docs are unclear on this
-     * QDirIterator puts iterator before first entry
-     * but QAbstractFileEngineIterator example puts iterator on first entry
-     * though QDirIterator approach seems to be the right one
-     */
-
-    m_index = -1;
-}
-
-bool FileEngineIterator::hasNext() const
-{
-    return m_index < m_entries.size() - 1;
-}
-
-QString FileEngineIterator::next()
-{
-   if (!hasNext())
-       return QString();
-
-   ++m_index;
-   return currentFilePath();
-}
-
-QString FileEngineIterator::currentFileName() const
-{
-    return m_entries.at(m_index);
-}
+/* borrowed from https://github.com/skhaz/qt-physfs-wrapper
+ * TODO: add copyright header, determine license
+ */
+
+#include "hwpacksmounter.h"
+#include "FileEngine.h"
+
+
+const QString FileEngineHandler::scheme = "physfs:/";
+
+FileEngine::FileEngine(const QString& filename)
+    : m_handle(NULL)
+    , m_size(0)
+    , m_flags(0)
+    , m_bufferSet(false)
+    , m_readWrite(false)
+{
+    setFileName(filename);
+}
+
+FileEngine::~FileEngine()
+{
+    close();
+}
+
+bool FileEngine::open(QIODevice::OpenMode openMode)
+{
+    close();
+
+    if ((openMode & QIODevice::ReadWrite) == QIODevice::ReadWrite) {
+        m_handle = PHYSFS_openAppend(m_fileName.toUtf8().constData());
+        if(m_handle)
+        {
+            m_readWrite = true;
+            seek(0);
+        }
+    }
+
+    else if (openMode & QIODevice::WriteOnly) {
+        m_handle = PHYSFS_openWrite(m_fileName.toUtf8().constData());
+        m_flags = QAbstractFileEngine::WriteOwnerPerm | QAbstractFileEngine::WriteUserPerm | QAbstractFileEngine::FileType;
+    }
+
+    else if (openMode & QIODevice::ReadOnly) {
+        m_handle = PHYSFS_openRead(m_fileName.toUtf8().constData());
+    }
+
+    else if (openMode & QIODevice::Append) {
+        m_handle = PHYSFS_openAppend(m_fileName.toUtf8().constData());
+    }
+
+    else {
+        qWarning("[PHYSFS] Bad file open mode: %d", (int)openMode);
+    }
+
+    if (!m_handle) {
+        qWarning("[PHYSFS] Failed to open %s, reason: %s", m_fileName.toUtf8().constData(), PHYSFS_getLastError());
+        return false;
+    }
+
+    return true;
+}
+
+bool FileEngine::close()
+{
+    if (isOpened()) {
+        int result = PHYSFS_close(m_handle);
+        m_handle = NULL;
+        return result != 0;
+    }
+
+    return true;
+}
+
+bool FileEngine::flush()
+{
+    return PHYSFS_flush(m_handle) != 0;
+}
+
+qint64 FileEngine::size() const
+{
+    return m_size;
+}
+
+qint64 FileEngine::pos() const
+{
+    return PHYSFS_tell(m_handle);
+}
+
+bool FileEngine::setSize(qint64 size)
+{
+    if(size == 0)
+    {
+        m_size = 0;
+        return open(QIODevice::WriteOnly);
+    }
+    else
+        return false;
+}
+
+bool FileEngine::seek(qint64 pos)
+{
+    bool ok = PHYSFS_seek(m_handle, pos) != 0;
+
+    return ok;
+}
+
+bool FileEngine::isSequential() const
+{
+    return false;
+}
+
+bool FileEngine::remove()
+{
+    return PHYSFS_delete(m_fileName.toUtf8().constData()) != 0;
+}
+
+bool FileEngine::mkdir(const QString &dirName, bool createParentDirectories) const
+{
+    Q_UNUSED(createParentDirectories);
+
+    return PHYSFS_mkdir(dirName.toUtf8().constData()) != 0;
+}
+
+bool FileEngine::rmdir(const QString &dirName, bool recurseParentDirectories) const
+{
+    Q_UNUSED(recurseParentDirectories);
+
+    return PHYSFS_delete(dirName.toUtf8().constData()) != 0;
+}
+
+bool FileEngine::caseSensitive() const
+{
+    return true;
+}
+
+bool FileEngine::isRelativePath() const
+{
+    return false;
+}
+
+QAbstractFileEngineIterator * FileEngine::beginEntryList(QDir::Filters filters, const QStringList &filterNames)
+{
+    return new FileEngineIterator(filters, filterNames, entryList(filters, filterNames));
+}
+
+QStringList FileEngine::entryList(QDir::Filters filters, const QStringList &filterNames) const
+{
+    Q_UNUSED(filters);
+
+    QString file;
+    QStringList result;
+    char **files = PHYSFS_enumerateFiles(m_fileName.toUtf8().constData());
+
+    for (char **i = files; *i != NULL; i++) {
+        file = QString::fromUtf8(*i);
+
+        if (filterNames.isEmpty() || QDir::match(filterNames, file)) {
+            result << file;
+        }
+    }
+
+    PHYSFS_freeList(files);
+
+    return result;
+}
+
+QAbstractFileEngine::FileFlags FileEngine::fileFlags(FileFlags type) const
+{
+    return type & m_flags;
+}
+
+QString FileEngine::fileName(FileName file) const
+{
+    switch(file)
+    {
+        case QAbstractFileEngine::AbsolutePathName:
+        {
+            QString s(PHYSFS_getWriteDir());
+            return s;
+        }
+        case QAbstractFileEngine::BaseName:
+        {
+            int l = m_fileName.lastIndexOf('/');
+            QString s = m_fileName.mid(l + 1);
+            return s;
+        }
+        case QAbstractFileEngine::DefaultName:
+        case QAbstractFileEngine::AbsoluteName:
+        default:
+        {
+            QString s = "physfs:/" + m_fileName;
+            return s;
+        }
+    }
+}
+
+QDateTime FileEngine::fileTime(FileTime time) const
+{
+    switch (time)
+    {
+        case QAbstractFileEngine::ModificationTime:
+        default:
+            return m_date;
+            break;
+    };
+}
+
+void FileEngine::setFileName(const QString &file)
+{
+    if(file.startsWith(FileEngineHandler::scheme))
+        m_fileName = file.mid(FileEngineHandler::scheme.size());
+    else
+        m_fileName = file;
+    PHYSFS_Stat stat;
+    if (PHYSFS_stat(m_fileName.toUtf8().constData(), &stat) != 0) {
+        m_size = stat.filesize;
+        m_date = QDateTime::fromTime_t(stat.modtime);
+//        m_flags |= QAbstractFileEngine::WriteOwnerPerm;
+        m_flags |= QAbstractFileEngine::ReadOwnerPerm;
+        m_flags |= QAbstractFileEngine::ReadUserPerm;
+        m_flags |= QAbstractFileEngine::ExistsFlag;
+        m_flags |= QAbstractFileEngine::LocalDiskFlag;
+
+        switch (stat.filetype)
+        {
+            case PHYSFS_FILETYPE_REGULAR:
+                m_flags |= QAbstractFileEngine::FileType;
+                break;
+            case PHYSFS_FILETYPE_DIRECTORY:
+                m_flags |= QAbstractFileEngine::DirectoryType;
+                break;
+            case PHYSFS_FILETYPE_SYMLINK:
+                m_flags |= QAbstractFileEngine::LinkType;
+                break;
+            default: ;
+        }
+    }
+}
+
+bool FileEngine::atEnd() const
+{
+    return PHYSFS_eof(m_handle) != 0;
+}
+
+qint64 FileEngine::read(char *data, qint64 maxlen)
+{
+    if(m_readWrite)
+    {
+        if(pos() == 0)
+            open(QIODevice::ReadOnly);
+        else
+            return -1;
+    }
+
+    qint64 len = PHYSFS_readBytes(m_handle, data, maxlen);
+    return len;
+}
+
+qint64 FileEngine::readLine(char *data, qint64 maxlen)
+{
+    if(!m_bufferSet)
+    {
+        PHYSFS_setBuffer(m_handle, 4096);
+        m_bufferSet = true;
+    }
+
+    qint64 bytesRead = 0;
+    while(PHYSFS_readBytes(m_handle, data, 1)
+          && maxlen
+          && (*data == '\n'))
+    {
+        ++data;
+        --maxlen;
+        ++bytesRead;
+    }
+
+    return bytesRead;
+}
+
+qint64 FileEngine::write(const char *data, qint64 len)
+{
+    return PHYSFS_writeBytes(m_handle, data, len);
+}
+
+bool FileEngine::isOpened() const
+{
+    return m_handle != NULL;
+}
+
+QFile::FileError FileEngine::error() const
+{
+    return QFile::UnspecifiedError;
+}
+
+QString FileEngine::errorString() const
+{
+    return PHYSFS_getLastError();
+}
+
+bool FileEngine::supportsExtension(Extension extension) const
+{
+    return
+            (extension == QAbstractFileEngine::AtEndExtension)
+            || (extension == QAbstractFileEngine::FastReadLineExtension)
+            ;
+}
+
+
+FileEngineHandler::FileEngineHandler(char *argv0)
+{
+    PHYSFS_init(argv0);
+}
+
+FileEngineHandler::~FileEngineHandler()
+{
+    PHYSFS_deinit();
+}
+
+QAbstractFileEngine* FileEngineHandler::create(const QString &filename) const
+{
+    if (filename.startsWith(scheme))
+        return new FileEngine(filename);
+    else
+        return NULL;
+}
+
+void FileEngineHandler::mount(const QString &path)
+{
+    PHYSFS_mount(path.toUtf8().constData(), NULL, 1);
+}
+
+void FileEngineHandler::mount(const QString & path, const QString & mountPoint)
+{
+    PHYSFS_mount(path.toUtf8().constData(), mountPoint.toUtf8().constData(), 1);
+}
+
+void FileEngineHandler::setWriteDir(const QString &path)
+{
+    PHYSFS_setWriteDir(path.toUtf8().constData());
+}
+
+void FileEngineHandler::mountPacks()
+{
+    hedgewarsMountPackages();
+}
+
+
+FileEngineIterator::FileEngineIterator(QDir::Filters filters, const QStringList &nameFilters, const QStringList &entries)
+    : QAbstractFileEngineIterator(filters, nameFilters)
+{
+    m_entries = entries;
+
+    /* heck.. docs are unclear on this
+     * QDirIterator puts iterator before first entry
+     * but QAbstractFileEngineIterator example puts iterator on first entry
+     * though QDirIterator approach seems to be the right one
+     */
+
+    m_index = -1;
+}
+
+bool FileEngineIterator::hasNext() const
+{
+    return m_index < m_entries.size() - 1;
+}
+
+QString FileEngineIterator::next()
+{
+   if (!hasNext())
+       return QString();
+
+   ++m_index;
+   return currentFilePath();
+}
+
+QString FileEngineIterator::currentFileName() const
+{
+    return m_entries.at(m_index);
+}
--- a/QTfrontend/util/MessageDialog.cpp	Fri Jan 25 13:29:20 2013 +0400
+++ b/QTfrontend/util/MessageDialog.cpp	Tue Jan 29 10:10:23 2013 +0400
@@ -30,7 +30,7 @@
 
 int MessageDialog::ShowMessage(const QString & msg, const QString & title, QMessageBox::Icon icon, QWidget * parent)
 {
-	QMessageBox msgMsg(parent);
+    QMessageBox msgMsg(parent);
     msgMsg.setIcon(icon);
     msgMsg.setWindowTitle(title.isEmpty() ? QMessageBox::tr("Hedgewars") : title);
     msgMsg.setText(msg);
--- a/QTfrontend/util/MessageDialog.h	Fri Jan 25 13:29:20 2013 +0400
+++ b/QTfrontend/util/MessageDialog.h	Tue Jan 29 10:10:23 2013 +0400
@@ -26,10 +26,10 @@
 
 class MessageDialog
 {
-	public:
-		static int ShowErrorMessage(const QString & msg, QWidget * parent = 0);
-		static int ShowInfoMessage(const QString & msg, QWidget * parent = 0);
-		static int ShowMessage(const QString & msg, const QString & title = QString(), QMessageBox::Icon icon = QMessageBox::NoIcon, QWidget * parent = 0);
+    public:
+        static int ShowErrorMessage(const QString & msg, QWidget * parent = 0);
+        static int ShowInfoMessage(const QString & msg, QWidget * parent = 0);
+        static int ShowMessage(const QString & msg, const QString & title = QString(), QMessageBox::Icon icon = QMessageBox::NoIcon, QWidget * parent = 0);
 };
 
 #endif
--- a/QTfrontend/util/platform/M3InstallController.m	Fri Jan 25 13:29:20 2013 +0400
+++ b/QTfrontend/util/platform/M3InstallController.m	Tue Jan 29 10:10:23 2013 +0400
@@ -37,61 +37,83 @@
 
 - (id) init {
         if ((self = [super init])) {
-		NSString *appName = [[NSBundle mainBundle] objectForInfoDictionaryKey:@"CFBundleName"];
-		NSString *title = [NSString stringWithFormat:NSLocalizedString(@"%@ is currently running from a disk image", @"AppName is currently running from a disk image"), appName];
-		NSString *body = [NSString stringWithFormat:NSLocalizedString(@"Would you like to install %@ in your applications folder before quitting?", @"Would you like to install App Name in your applications folder before quitting?"), appName];
-		alert = [[NSAlert alertWithMessageText:title
-								 defaultButton:NSLocalizedString(@"Install", @"Install")
-							   alternateButton:NSLocalizedString(@"Don't Install", @"Don't Install")
-								   otherButton:nil
-					 informativeTextWithFormat:body] retain];
-		//[alert setShowsSuppressionButton:YES];
-	}
-	return self;
+        NSString *appName = [[NSBundle mainBundle] objectForInfoDictionaryKey:@"CFBundleName"];
+        NSString *title = [NSString stringWithFormat:NSLocalizedString(@"%@ is currently running from a disk image", @"AppName is currently running from a disk image"), appName];
+        NSString *body = [NSString stringWithFormat:NSLocalizedString(@"Would you like to install %@ in your applications folder before quitting?", @"Would you like to install App Name in your applications folder before quitting?"), appName];
+        alert = [[NSAlert alertWithMessageText:title
+                                 defaultButton:NSLocalizedString(@"Install", @"Install")
+                               alternateButton:NSLocalizedString(@"Don't Install", @"Don't Install")
+                                   otherButton:nil
+                     informativeTextWithFormat:body] retain];
+        //[alert setShowsSuppressionButton:YES];
+    }
+    return self;
 }
 
 - (void)displayInstaller {
-	NSString *imageFilePath = [[[NSWorkspace sharedWorkspace] propertiesForPath:[[NSBundle mainBundle] bundlePath]] objectForKey:NSWorkspace_RBimagefilepath];
-	if (imageFilePath && ![imageFilePath isEqualToString:[NSString stringWithFormat:@"/Users/.%@/%@.sparseimage", NSUserName(), NSUserName()]] && ![[NSUserDefaults standardUserDefaults] boolForKey:@"M3DontAskInstallAgain"]) {
-		NSInteger returnValue = [alert runModal];
-		if (returnValue == NSAlertDefaultReturn) {
-			[self installApp];
-		}
-		if ([[alert suppressionButton] state] == NSOnState) {
-			[[NSUserDefaults standardUserDefaults] setBool:YES forKey:@"M3DontAskInstallAgain"];
-		}
-	}
+    NSString *imageFilePath = [[[NSWorkspace sharedWorkspace] propertiesForPath:[[NSBundle mainBundle] bundlePath]] objectForKey:NSWorkspace_RBimagefilepath];
+    if (imageFilePath && ![imageFilePath isEqualToString:[NSString stringWithFormat:@"/Users/.%@/%@.sparseimage", NSUserName(), NSUserName()]] && ![[NSUserDefaults standardUserDefaults] boolForKey:@"M3DontAskInstallAgain"]) {
+        NSInteger returnValue = [alert runModal];
+        if (returnValue == NSAlertDefaultReturn) {
+            [self installApp];
+        }
+        if ([[alert suppressionButton] state] == NSOnState) {
+            [[NSUserDefaults standardUserDefaults] setBool:YES forKey:@"M3DontAskInstallAgain"];
+        }
+    }
 }
 
 - (void)installApp {
-	NSString *appsPath = [[NSString stringWithString:@"/Applications"] stringByAppendingPathComponent:[[[NSBundle mainBundle] bundlePath] lastPathComponent]];
-	NSString *userAppsPath = [[[NSString stringWithString:@"~/Applications"] stringByAppendingPathComponent:[[[NSBundle mainBundle] bundlePath] lastPathComponent]] stringByExpandingTildeInPath];
-	NSString *appName = [[NSBundle mainBundle] objectForInfoDictionaryKey:@"CFBundleName"];
+    NSString *appsPath = [[NSString stringWithString:@"/Applications"] stringByAppendingPathComponent:[[[NSBundle mainBundle] bundlePath] lastPathComponent]];
+    NSString *userAppsPath = [[[NSString stringWithString:@"~/Applications"] stringByAppendingPathComponent:[[[NSBundle mainBundle] bundlePath] lastPathComponent]] stringByExpandingTildeInPath];
+    NSString *appName = [[NSBundle mainBundle] objectForInfoDictionaryKey:@"CFBundleName"];
 
-	//Delete the app that is installed
-	if ([[NSFileManager defaultManager] fileExistsAtPath:appsPath]) {
-		[[NSFileManager defaultManager] removeFileAtPath:appsPath handler:nil];
-	}
-	//Delete the app that is installed
-	if ([[NSFileManager defaultManager] copyPath:[[NSBundle mainBundle] bundlePath] toPath:appsPath
-										  handler:nil]) {
-		NSRunAlertPanel([NSString stringWithFormat:NSLocalizedString(@"%@ installed successfully", @"App Name installed successfully"), appName],
-						[NSString stringWithFormat:NSLocalizedString(@"%@ was installed in /Applications", @"App Name was installed in /Applications"), appName],
-						NSLocalizedString(@"Quit", @"Quit"), nil, nil);
-	} else {
-		if ([[NSFileManager defaultManager] fileExistsAtPath:userAppsPath]) {
-			[[NSFileManager defaultManager] removeFileAtPath:userAppsPath handler:nil];
-		}
-		if ([[NSFileManager defaultManager] copyPath:[[NSBundle mainBundle] bundlePath] toPath:userAppsPath
-												handler:nil]) {
-		NSRunAlertPanel([NSString stringWithFormat:NSLocalizedString(@"%@ installed successfully", @"AppName installed successfully"), appName],
-				[NSString stringWithFormat:NSLocalizedString(@"%@ was installed in %@", @"App Name was installed in %@"), appName, [[NSString stringWithString:@"~/Applications"] stringByExpandingTildeInPath]],
-						NSLocalizedString(@"Quit", @"Quit"), nil, nil);
-		} else {
-			NSRunAlertPanel([NSString stringWithFormat:NSLocalizedString(@"Could not install %@", @"Could not install App Name"), appName],
-							NSLocalizedString(@"An error occurred when installing", @"An error occurred when installing"), NSLocalizedString(@"Quit", @"Quit"), nil, nil);
-		}
-	}
+    //Delete the app that is installed
+    if ([[NSFileManager defaultManager] fileExistsAtPath:appsPath]) {
+        if ([NSFileManager instancesRespondToSelector:@selector(removeItemAtPath:error:)])
+            [[NSFileManager defaultManager] removeItemAtPath:appsPath error:nil];
+        else
+            //casting hides the deprecation warning
+            [(id)[NSFileManager defaultManager] removeFileAtPath:appsPath handler:nil];
+    }
+    //Delete the app that is installed
+    BOOL success = NO;
+    if ([NSFileManager instancesRespondToSelector:@selector(copyItemAtPath:toPath:error:)])
+        success = [[NSFileManager defaultManager] copyItemAtPath:[[NSBundle mainBundle] bundlePath]
+                                                          toPath:appsPath
+                                                           error:nil];
+    else
+        success = [(id)[NSFileManager defaultManager] copyPath:[[NSBundle mainBundle] bundlePath]
+                                                        toPath:appsPath
+                                                       handler:nil];
+    if (success) {
+        NSRunAlertPanel([NSString stringWithFormat:NSLocalizedString(@"%@ installed successfully", @"App Name installed successfully"), appName],
+                        [NSString stringWithFormat:NSLocalizedString(@"%@ was installed in /Applications", @"App Name was installed in /Applications"), appName],
+                        NSLocalizedString(@"Quit", @"Quit"), nil, nil);
+    } else {
+        if ([[NSFileManager defaultManager] fileExistsAtPath:userAppsPath]) {
+            if ([NSFileManager instancesRespondToSelector:@selector(removeItemAtPath:error:)])
+                [[NSFileManager defaultManager] removeItemAtPath:userAppsPath error:nil];
+            else
+                [(id)[NSFileManager defaultManager] removeFileAtPath:userAppsPath handler:nil];
+        }
+        if ([NSFileManager instancesRespondToSelector:@selector(copyItemAtPath:toPath:error:)])
+            success = [[NSFileManager defaultManager] copyItemAtPath:[[NSBundle mainBundle] bundlePath]
+                                                              toPath:userAppsPath
+                                                               error:nil];
+        else
+            success = [(id)[NSFileManager defaultManager] copyPath:[[NSBundle mainBundle] bundlePath]
+                                                            toPath:userAppsPath
+                                                           handler:nil];
+        if (success) {
+            NSRunAlertPanel([NSString stringWithFormat:NSLocalizedString(@"%@ installed successfully", @"AppName installed successfully"), appName],
+                [NSString stringWithFormat:NSLocalizedString(@"%@ was installed in %@", @"App Name was installed in %@"), appName, [[NSString stringWithString:@"~/Applications"] stringByExpandingTildeInPath]],
+                        NSLocalizedString(@"Quit", @"Quit"), nil, nil);
+        } else {
+            NSRunAlertPanel([NSString stringWithFormat:NSLocalizedString(@"Could not install %@", @"Could not install App Name"), appName],
+                            NSLocalizedString(@"An error occurred when installing", @"An error occurred when installing"), NSLocalizedString(@"Quit", @"Quit"), nil, nil);
+        }
+    }
 }
 
 @end
--- a/QTfrontend/util/platform/NSWorkspace_RBAdditions.m	Fri Jan 25 13:29:20 2013 +0400
+++ b/QTfrontend/util/platform/NSWorkspace_RBAdditions.m	Tue Jan 29 10:10:23 2013 +0400
@@ -24,20 +24,20 @@
 // like one or the other nil, or one containing the other already.
 
 static NSString* AddPart(NSString* first,NSString* second) {
-	if (!second) {
-		return first;
-	}
-	second = [second stringByTrimmingCharactersInSet:[NSCharacterSet whitespaceAndNewlineCharacterSet]];
-	if (first) {
-		if ([first rangeOfString:second options:NSCaseInsensitiveSearch].location==NSNotFound) {
-			if ([second rangeOfString:first options:NSCaseInsensitiveSearch].location==NSNotFound) {
-				return [NSString stringWithFormat:@"%@; %@",first,second];
-			}
-			return second;
-		}
-		return first;
-	}
-	return second;
+    if (!second) {
+        return first;
+    }
+    second = [second stringByTrimmingCharactersInSet:[NSCharacterSet whitespaceAndNewlineCharacterSet]];
+    if (first) {
+        if ([first rangeOfString:second options:NSCaseInsensitiveSearch].location==NSNotFound) {
+            if ([second rangeOfString:first options:NSCaseInsensitiveSearch].location==NSNotFound) {
+                return [NSString stringWithFormat:@"%@; %@",first,second];
+            }
+            return second;
+        }
+        return first;
+    }
+    return second;
 }
 
 // This static functions recurses "upwards" over the IO registry. Returns strings that are concatenated
@@ -50,119 +50,119 @@
 // YMMV, and it may stop working in any new version of Mac OS X.
 
 static NSString* CheckParents(io_object_t thing,NSString* part,NSMutableDictionary* dict) {
-	NSString* result = part;
+    NSString* result = part;
     io_iterator_t parentsIterator = 0;
     kern_return_t kernResult = IORegistryEntryGetParentIterator(thing,kIOServicePlane,&parentsIterator);
     if ((kernResult==KERN_SUCCESS)&&parentsIterator) {
-		io_object_t nextParent = 0;
-		while ((nextParent = IOIteratorNext(parentsIterator))) {
-			NSDictionary* props = nil;
-			NSString* image = nil;
-			NSString* partition = nil;
-			NSString* connection = nil;
-			kernResult = IORegistryEntryCreateCFProperties(nextParent,(CFMutableDictionaryRef*)&props,kCFAllocatorDefault,0);
-			if (IOObjectConformsTo(nextParent,"IOApplePartitionScheme")) {
-				partition = [props objectForKey:@"Content Mask"];
-			} else if (IOObjectConformsTo(nextParent,"IOMedia")) {
-				partition = [props objectForKey:@"Content"];
-			} else if (IOObjectConformsTo(nextParent,"IODiskImageBlockStorageDeviceOutKernel")) {
-				NSData* data = nil;
+        io_object_t nextParent = 0;
+        while ((nextParent = IOIteratorNext(parentsIterator))) {
+            NSDictionary* props = nil;
+            NSString* image = nil;
+            NSString* partition = nil;
+            NSString* connection = nil;
+            kernResult = IORegistryEntryCreateCFProperties(nextParent,(CFMutableDictionaryRef*)&props,kCFAllocatorDefault,0);
+            if (IOObjectConformsTo(nextParent,"IOApplePartitionScheme")) {
+                partition = [props objectForKey:@"Content Mask"];
+            } else if (IOObjectConformsTo(nextParent,"IOMedia")) {
+                partition = [props objectForKey:@"Content"];
+            } else if (IOObjectConformsTo(nextParent,"IODiskImageBlockStorageDeviceOutKernel")) {
+                NSData* data = nil;
                                 if ((data = [[props objectForKey:@"Protocol Characteristics"] objectForKey:@"Virtual Interface Location Path"])) {
-					image = [[[NSString alloc] initWithBytes:[data bytes] length:[data length] encoding:NSUTF8StringEncoding] autorelease];
-				}
-			} else if (IOObjectConformsTo(nextParent,"IOHDIXHDDriveInKernel")) {
-				image = [props objectForKey:@"KDIURLPath"];
-			}
-			NSDictionary* subdict;
+                    image = [[[NSString alloc] initWithBytes:[data bytes] length:[data length] encoding:NSUTF8StringEncoding] autorelease];
+                }
+            } else if (IOObjectConformsTo(nextParent,"IOHDIXHDDriveInKernel")) {
+                image = [props objectForKey:@"KDIURLPath"];
+            }
+            NSDictionary* subdict;
                         if ((subdict = [props objectForKey:@"Protocol Characteristics"])) {
-				connection = [subdict objectForKey:@"Physical Interconnect"];
-			} else {
-				connection = [props objectForKey:@"Physical Interconnect"];
-			}
-			if (connection) {
-				[dict setObject:AddPart([dict objectForKey:NSWorkspace_RBconnectiontype],connection) forKey:NSWorkspace_RBconnectiontype];
-			}
-			if (partition) {
-				[dict setObject:partition forKey:NSWorkspace_RBpartitionscheme];
-			}
-			if (image) {
-				[dict setObject:image forKey:NSWorkspace_RBimagefilepath];
-			}
-			NSString* value;
+                connection = [subdict objectForKey:@"Physical Interconnect"];
+            } else {
+                connection = [props objectForKey:@"Physical Interconnect"];
+            }
+            if (connection) {
+                [dict setObject:AddPart([dict objectForKey:NSWorkspace_RBconnectiontype],connection) forKey:NSWorkspace_RBconnectiontype];
+            }
+            if (partition) {
+                [dict setObject:partition forKey:NSWorkspace_RBpartitionscheme];
+            }
+            if (image) {
+                [dict setObject:image forKey:NSWorkspace_RBimagefilepath];
+            }
+            NSString* value;
                         if ((subdict = [props objectForKey:@"Device Characteristics"])) {
                                 if ((value = [subdict objectForKey:@"Product Name"])) {
-					result = AddPart(result,value);
-				}
+                    result = AddPart(result,value);
+                }
                                 if ((value = [subdict objectForKey:@"Product Revision Level"])) {
-					result = AddPart(result,value);
-				}
+                    result = AddPart(result,value);
+                }
                                 if ((value = [subdict objectForKey:@"Vendor Name"])) {
-					result = AddPart(result,value);
-				}
-			}
+                    result = AddPart(result,value);
+                }
+            }
                         if ((value = [props objectForKey:@"USB Serial Number"])) {
-				result = AddPart(result,value);
-			}
+                result = AddPart(result,value);
+            }
                         if ((value = [props objectForKey:@"USB Vendor Name"])) {
-				result = AddPart(result,value);
-			}
-			NSString* cls = [(NSString*)IOObjectCopyClass(nextParent) autorelease];
-			if (![cls isEqualToString:@"IOPCIDevice"]) {
+                result = AddPart(result,value);
+            }
+            NSString* cls = [(NSString*)IOObjectCopyClass(nextParent) autorelease];
+            if (![cls isEqualToString:@"IOPCIDevice"]) {
 
 // Uncomment the following line to have the device tree dumped to the console.
-//				NSLog(@"=================================> %@:%@\n",cls,props);
+//              NSLog(@"=================================> %@:%@\n",cls,props);
 
-				result = CheckParents(nextParent,result,dict);
-			}
-			IOObjectRelease(nextParent);
-		}
+                result = CheckParents(nextParent,result,dict);
+            }
+            IOObjectRelease(nextParent);
+        }
     }
     if (parentsIterator) {
-		IOObjectRelease(parentsIterator);
+        IOObjectRelease(parentsIterator);
     }
-	return result;
+    return result;
 }
 
 // This formats the (partially undocumented) AFPXMountInfo info into a string.
 
 /*
 static NSString* FormatAFPURL(AFPXVolMountInfoPtr mountInfo,NSString** devdesc) {
-	UInt8* work = ((UInt8*)mountInfo)+mountInfo->serverNameOffset;
-	if (devdesc) {
-		*devdesc = [[[NSString alloc] initWithBytes:&work[1] length:work[0] encoding:NSUTF8StringEncoding] autorelease];
-	}
-	work = ((UInt8*)mountInfo)+mountInfo->volNameOffset;
-	NSString* volname = [[[NSString alloc] initWithBytes:&work[1] length:work[0] encoding:NSUTF8StringEncoding] autorelease];
-	work = ((UInt8*)mountInfo)+mountInfo->alternateAddressOffset;
-	AFPAlternateAddress* afpa = (AFPAlternateAddress*)work;
-	AFPTagData* afpta = (AFPTagData*)(&afpa->fAddressList);
-	NSString* ip = nil;
-	NSString* dns = nil;
-	int i = afpa->fAddressCount;
-	while ((i-->0)) {
-		switch (afpta->fType) {
-			case kAFPTagTypeIP:
-				if (!ip) {
-					ip = [[[NSString alloc] initWithBytes:&afpta->fData[0] length:afpta->fLength-2 encoding:NSUTF8StringEncoding] autorelease];
-				}
-				break;
-			case kAFPTagTypeIPPort:
-				ip = [NSString stringWithFormat:@"%u.%u.%u.%u:%u",afpta->fData[0],afpta->fData[1],afpta->fData[2],afpta->fData[3],OSSwapBigToHostInt16(*(UInt16*)&afpta->fData[4])];
-				break;
-			case kAFPTagTypeDNS:
-				dns = [[[NSString alloc] initWithBytes:&afpta->fData[0] length:afpta->fLength-2 encoding:NSUTF8StringEncoding] autorelease];
-				break;
-			case 0x07:
-				ip = [NSString stringWithFormat:@"[%x:%x:%x:%x:%x:%x:%x:%x]",OSSwapBigToHostInt16(*(UInt16*)&afpta->fData[0]),
-					OSSwapBigToHostInt16(*(UInt16*)&afpta->fData[2]),OSSwapBigToHostInt16(*(UInt16*)&afpta->fData[4]),
-					OSSwapBigToHostInt16(*(UInt16*)&afpta->fData[6]),OSSwapBigToHostInt16(*(UInt16*)&afpta->fData[8]),
-					OSSwapBigToHostInt16(*(UInt16*)&afpta->fData[10]),OSSwapBigToHostInt16(*(UInt16*)&afpta->fData[12]),
-					OSSwapBigToHostInt16(*(UInt16*)&afpta->fData[14])];
-				break;
-		}
-		afpta = (AFPTagData*)((char*)afpta+afpta->fLength);
-	}
-	return [NSString stringWithFormat:@"afp://%@/%@",dns?:(ip?:@""),volname];
+    UInt8* work = ((UInt8*)mountInfo)+mountInfo->serverNameOffset;
+    if (devdesc) {
+        *devdesc = [[[NSString alloc] initWithBytes:&work[1] length:work[0] encoding:NSUTF8StringEncoding] autorelease];
+    }
+    work = ((UInt8*)mountInfo)+mountInfo->volNameOffset;
+    NSString* volname = [[[NSString alloc] initWithBytes:&work[1] length:work[0] encoding:NSUTF8StringEncoding] autorelease];
+    work = ((UInt8*)mountInfo)+mountInfo->alternateAddressOffset;
+    AFPAlternateAddress* afpa = (AFPAlternateAddress*)work;
+    AFPTagData* afpta = (AFPTagData*)(&afpa->fAddressList);
+    NSString* ip = nil;
+    NSString* dns = nil;
+    int i = afpa->fAddressCount;
+    while ((i-->0)) {
+        switch (afpta->fType) {
+            case kAFPTagTypeIP:
+                if (!ip) {
+                    ip = [[[NSString alloc] initWithBytes:&afpta->fData[0] length:afpta->fLength-2 encoding:NSUTF8StringEncoding] autorelease];
+                }
+                break;
+            case kAFPTagTypeIPPort:
+                ip = [NSString stringWithFormat:@"%u.%u.%u.%u:%u",afpta->fData[0],afpta->fData[1],afpta->fData[2],afpta->fData[3],OSSwapBigToHostInt16(*(UInt16*)&afpta->fData[4])];
+                break;
+            case kAFPTagTypeDNS:
+                dns = [[[NSString alloc] initWithBytes:&afpta->fData[0] length:afpta->fLength-2 encoding:NSUTF8StringEncoding] autorelease];
+                break;
+            case 0x07:
+                ip = [NSString stringWithFormat:@"[%x:%x:%x:%x:%x:%x:%x:%x]",OSSwapBigToHostInt16(*(UInt16*)&afpta->fData[0]),
+                    OSSwapBigToHostInt16(*(UInt16*)&afpta->fData[2]),OSSwapBigToHostInt16(*(UInt16*)&afpta->fData[4]),
+                    OSSwapBigToHostInt16(*(UInt16*)&afpta->fData[6]),OSSwapBigToHostInt16(*(UInt16*)&afpta->fData[8]),
+                    OSSwapBigToHostInt16(*(UInt16*)&afpta->fData[10]),OSSwapBigToHostInt16(*(UInt16*)&afpta->fData[12]),
+                    OSSwapBigToHostInt16(*(UInt16*)&afpta->fData[14])];
+                break;
+        }
+        afpta = (AFPTagData*)((char*)afpta+afpta->fLength);
+    }
+    return [NSString stringWithFormat:@"afp://%@/%@",dns?:(ip?:@""),volname];
 }
 */
 
@@ -172,92 +172,92 @@
 // This assumes that the length of path is less than PATH_MAX (currently 1024 characters).
 
 - (NSDictionary*)propertiesForPath:(NSString*)path {
-	const char* ccpath = (const char*)[path fileSystemRepresentation];
-	NSMutableDictionary* result = nil;
-	struct statfs fs;
-	if (!statfs(ccpath,&fs)) {
-		NSString* from = [NSString stringWithUTF8String:fs.f_mntfromname];
-		result = [NSMutableDictionary dictionaryWithObjectsAndKeys:
-			[NSString stringWithUTF8String:fs.f_fstypename],NSWorkspace_RBfstypename,
-			[NSString stringWithUTF8String:fs.f_mntonname],NSWorkspace_RBmntonname,
-			nil];
-		if (strncmp(fs.f_mntfromname,"/dev/",5)==0) {
+    const char* ccpath = (const char*)[path fileSystemRepresentation];
+    NSMutableDictionary* result = nil;
+    struct statfs fs;
+    if (!statfs(ccpath,&fs)) {
+        NSString* from = [NSString stringWithUTF8String:fs.f_mntfromname];
+        result = [NSMutableDictionary dictionaryWithObjectsAndKeys:
+            [NSString stringWithUTF8String:fs.f_fstypename],NSWorkspace_RBfstypename,
+            [NSString stringWithUTF8String:fs.f_mntonname],NSWorkspace_RBmntonname,
+            nil];
+        if (strncmp(fs.f_mntfromname,"/dev/",5)==0) {
 // For a local volume,get the IO registry tree and search it for further info.
-			mach_port_t masterPort = 0;
-			io_iterator_t mediaIterator = 0;
-			kern_return_t kernResult = IOMasterPort(bootstrap_port,&masterPort);
-			if (kernResult==KERN_SUCCESS) {
-				CFMutableDictionaryRef classesToMatch = IOBSDNameMatching(masterPort,0,&fs.f_mntfromname[5]);
-				if (classesToMatch) {
-					kernResult = IOServiceGetMatchingServices(masterPort,classesToMatch,&mediaIterator);
-					if ((kernResult==KERN_SUCCESS)&&mediaIterator) {
-						io_object_t firstMedia = 0;
-						while ((firstMedia = IOIteratorNext(mediaIterator))) {
-							NSString* stuff = CheckParents(firstMedia,nil,result);
-							if (stuff) {
-								[result setObject:stuff forKey:NSWorkspace_RBdeviceinfo];
-							}
-							IOObjectRelease(firstMedia);
-						}
-					}
-				}
-			}
-			if (mediaIterator) {
-				IOObjectRelease(mediaIterator);
-			}
-			if (masterPort) {
-				mach_port_deallocate(mach_task_self(),masterPort);
-			}
-		}
-		//Don't need this for disk images, gets around warnings for some deprecated functions
+            mach_port_t masterPort = 0;
+            io_iterator_t mediaIterator = 0;
+            kern_return_t kernResult = IOMasterPort(bootstrap_port,&masterPort);
+            if (kernResult==KERN_SUCCESS) {
+                CFMutableDictionaryRef classesToMatch = IOBSDNameMatching(masterPort,0,&fs.f_mntfromname[5]);
+                if (classesToMatch) {
+                    kernResult = IOServiceGetMatchingServices(masterPort,classesToMatch,&mediaIterator);
+                    if ((kernResult==KERN_SUCCESS)&&mediaIterator) {
+                        io_object_t firstMedia = 0;
+                        while ((firstMedia = IOIteratorNext(mediaIterator))) {
+                            NSString* stuff = CheckParents(firstMedia,nil,result);
+                            if (stuff) {
+                                [result setObject:stuff forKey:NSWorkspace_RBdeviceinfo];
+                            }
+                            IOObjectRelease(firstMedia);
+                        }
+                    }
+                }
+            }
+            if (mediaIterator) {
+                IOObjectRelease(mediaIterator);
+            }
+            if (masterPort) {
+                mach_port_deallocate(mach_task_self(),masterPort);
+            }
+        }
+        //Don't need this for disk images, gets around warnings for some deprecated functions
 
-		/* else {
+        /* else {
 // For a network volume, get the volume reference number and use to get the server URL.
-			FSRef ref;
-			if (FSPathMakeRef((const UInt8*)ccpath,&ref,NULL)==noErr) {
-				FSCatalogInfo info;
-				if (FSGetCatalogInfo(&ref,kFSCatInfoVolume,&info,NULL,NULL,NULL)==noErr) {
-					ParamBlockRec pb;
-					UInt16 vmisize = 0;
-					VolumeMountInfoHeaderPtr mountInfo = NULL;
-					pb.ioParam.ioCompletion = NULL;
-					pb.ioParam.ioNamePtr = NULL;
-					pb.ioParam.ioVRefNum = info.volume;
-					pb.ioParam.ioBuffer = (Ptr)&vmisize;
-					pb.ioParam.ioReqCount = sizeof(vmisize);
-					if ((PBGetVolMountInfoSize(&pb)==noErr)&&vmisize) {
-						mountInfo = (VolumeMountInfoHeaderPtr)malloc(vmisize);
-						if (mountInfo) {
-							pb.ioParam.ioBuffer = (Ptr)mountInfo;
-							pb.ioParam.ioReqCount = vmisize;
-							if (PBGetVolMountInfo(&pb)==noErr) {
-								NSString* url = nil;
-								switch (mountInfo->media) {
-								case AppleShareMediaType:
-									url = FormatAFPURL((AFPXVolMountInfoPtr)mountInfo,&from);
-									break;
-								case 'http':
-									url = from;
-									break;
-								case 'crbm':
-								case 'nfs_':
-								case 'cifs':
-									url = [NSString stringWithUTF8String:(char*)mountInfo+sizeof(VolumeMountInfoHeader)+sizeof(OSType)];
-									break;
-								}
-								if (url) {
-									[result setObject:url forKey:NSWorkspace_RBserverURL];
-								}
-							}
-						}
-						free(mountInfo);
-					}
-				}
-			}
-		}*/
-		[result setObject:from forKey:NSWorkspace_RBmntfromname];
-	}
-	return result;
+            FSRef ref;
+            if (FSPathMakeRef((const UInt8*)ccpath,&ref,NULL)==noErr) {
+                FSCatalogInfo info;
+                if (FSGetCatalogInfo(&ref,kFSCatInfoVolume,&info,NULL,NULL,NULL)==noErr) {
+                    ParamBlockRec pb;
+                    UInt16 vmisize = 0;
+                    VolumeMountInfoHeaderPtr mountInfo = NULL;
+                    pb.ioParam.ioCompletion = NULL;
+                    pb.ioParam.ioNamePtr = NULL;
+                    pb.ioParam.ioVRefNum = info.volume;
+                    pb.ioParam.ioBuffer = (Ptr)&vmisize;
+                    pb.ioParam.ioReqCount = sizeof(vmisize);
+                    if ((PBGetVolMountInfoSize(&pb)==noErr)&&vmisize) {
+                        mountInfo = (VolumeMountInfoHeaderPtr)malloc(vmisize);
+                        if (mountInfo) {
+                            pb.ioParam.ioBuffer = (Ptr)mountInfo;
+                            pb.ioParam.ioReqCount = vmisize;
+                            if (PBGetVolMountInfo(&pb)==noErr) {
+                                NSString* url = nil;
+                                switch (mountInfo->media) {
+                                case AppleShareMediaType:
+                                    url = FormatAFPURL((AFPXVolMountInfoPtr)mountInfo,&from);
+                                    break;
+                                case 'http':
+                                    url = from;
+                                    break;
+                                case 'crbm':
+                                case 'nfs_':
+                                case 'cifs':
+                                    url = [NSString stringWithUTF8String:(char*)mountInfo+sizeof(VolumeMountInfoHeader)+sizeof(OSType)];
+                                    break;
+                                }
+                                if (url) {
+                                    [result setObject:url forKey:NSWorkspace_RBserverURL];
+                                }
+                            }
+                        }
+                        free(mountInfo);
+                    }
+                }
+            }
+        }*/
+        [result setObject:from forKey:NSWorkspace_RBmntfromname];
+    }
+    return result;
 }
 
 @end
--- a/QTfrontend/util/platform/xfire_license.txt	Fri Jan 25 13:29:20 2013 +0400
+++ b/QTfrontend/util/platform/xfire_license.txt	Tue Jan 29 10:10:23 2013 +0400
@@ -1,6 +1,6 @@
 Terms and Conditions
 AGREEMENT BETWEEN USER AND XFIRE INC.
-This is a legal agreement between you and Xfire Inc. ("Xfire") with respect to your access and use of the Xfire Service, which may also include Xfire software, content and related documentation and information (collectively, the "Service"). You must accept without modification all of the terms, conditions, and notices contained in these Terms of Use in order to access and/or use the Service (collectively, the "Terms of Use" or "Agreement"). If you do not accept these Terms of Use in their entirety, you may not access or use the Service. 
+This is a legal agreement between you and Xfire Inc. ("Xfire") with respect to your access and use of the Xfire Service, which may also include Xfire software, content and related documentation and information (collectively, the "Service"). You must accept without modification all of the terms, conditions, and notices contained in these Terms of Use in order to access and/or use the Service (collectively, the "Terms of Use" or "Agreement"). If you do not accept these Terms of Use in their entirety, you may not access or use the Service.
 
 Portions of the Service may be governed by posted guidelines, rules, or other terms and conditions. All such guidelines, rules, terms and conditions are hereby incorporated by reference into these Terms of Use. In the event of a conflict between such other guidelines, rules, terms and conditions and these Terms of Use, the Terms of Use shall control, except that the Xfire Service Privacy Policy, referenced below, supersedes any conflicting language in these Terms of Use and/or any other guidelines, rules, terms and conditions published in connection with the Service with respect to the subject matter covered by such privacy policy.
 
@@ -20,29 +20,29 @@
 You agree to use the Service only to send, receive, and transfer appropriate messages and material. By way of example, and not as a limitation, you agree that when using the Service, you will not:
 
 
-• Use the Service in connection with surveys, contests, pyramid schemes, chain letters, junk email, spamming or any duplicative, bulk or unsolicited messages (commercial or otherwise). 
+• Use the Service in connection with surveys, contests, pyramid schemes, chain letters, junk email, spamming or any duplicative, bulk or unsolicited messages (commercial or otherwise).
 
-• Defame, abuse, harass, stalk, threaten or otherwise violate the legal rights (such as rights of privacy and publicity) of others. 
+• Defame, abuse, harass, stalk, threaten or otherwise violate the legal rights (such as rights of privacy and publicity) of others.
 
-• Create a false identity for the purpose of misleading others. 
+• Create a false identity for the purpose of misleading others.
 
-• Publish, transfer, distribute or disseminate any inappropriate, profane, defamatory, obscene, indecent or unlawful topic, name, material or information. 
+• Publish, transfer, distribute or disseminate any inappropriate, profane, defamatory, obscene, indecent or unlawful topic, name, material or information.
 
-• Transfer, stream, or otherwise make available, files or other material that contain images, photographs, software or other material protected by intellectual property laws, including, by way of example, and not as limitation, copyright or trademark laws (or by rights of privacy or publicity) unless you own or control the rights thereto or have received all necessary consents to do the same. 
+• Transfer, stream, or otherwise make available, files or other material that contain images, photographs, software or other material protected by intellectual property laws, including, by way of example, and not as limitation, copyright or trademark laws (or by rights of privacy or publicity) unless you own or control the rights thereto or have received all necessary consents to do the same.
 
-• Use any material or information, including images or photographs, which is made available through the Service in any manner that infringes any copyright, trademark, patent, trade secret, or other proprietary right of any party. 
+• Use any material or information, including images or photographs, which is made available through the Service in any manner that infringes any copyright, trademark, patent, trade secret, or other proprietary right of any party.
 
-• Transfer, stream or otherwise make available, files or other material that contain viruses, Trojan horses, worms, time bombs, cancelbots, corrupted files, or any other similar software or programs that may damage the operation of another's computer or property of another. 
+• Transfer, stream or otherwise make available, files or other material that contain viruses, Trojan horses, worms, time bombs, cancelbots, corrupted files, or any other similar software or programs that may damage the operation of another's computer or property of another.
 
-• Download any file or other material transferred by another user of the Service that you know, or reasonably should know, cannot be legally distributed in such manner. 
+• Download any file or other material transferred by another user of the Service that you know, or reasonably should know, cannot be legally distributed in such manner.
 
-• Use, download or otherwise copy, or provide (whether or not for a fee) to a person or entity any directory of users of the Service or other user or usage information or any portion thereof. 
+• Use, download or otherwise copy, or provide (whether or not for a fee) to a person or entity any directory of users of the Service or other user or usage information or any portion thereof.
 
-• Falsify or delete any author attributions, legal or other proper notices or proprietary designations or labels of the origin or source of software or other material contained in a file that is transferred. 
+• Falsify or delete any author attributions, legal or other proper notices or proprietary designations or labels of the origin or source of software or other material contained in a file that is transferred.
 
-• Violate any code of conduct or other guidelines which may be applicable to the Service. 
+• Violate any code of conduct or other guidelines which may be applicable to the Service.
 
-• Use any portion of the Service to harvest or otherwise collect information about others, including e-mail addresses. 
+• Use any portion of the Service to harvest or otherwise collect information about others, including e-mail addresses.
 
 Xfire reserves the right at all times to monitor communications on the Service and disclose any information Xfire deems necessary to (i) ensure your compliance with this Agreement; (ii) satisfy any applicable law, regulation or legal process; or (iii) protect the rights, property, and interests of Xfire, its employees or the public. Xfire also reserves the right to edit, refuse to transfer or to remove any information or materials, in whole or in part, in Xfire's sole discretion.
 
--- a/QTfrontend/util/platform/xfiregameclient.cpp	Fri Jan 25 13:29:20 2013 +0400
+++ b/QTfrontend/util/platform/xfiregameclient.cpp	Tue Jan 29 10:10:23 2013 +0400
@@ -34,88 +34,88 @@
 
 int XfireIsLoaded()
 {
-	HelperInit();
-	if (ptr_XfireSetCustomGameDataA &&
-		ptr_XfireSetCustomGameDataW &&
-		ptr_XfireSetCustomGameDataUTF8)
-		return 1;
-	return 0;
+    HelperInit();
+    if (ptr_XfireSetCustomGameDataA &&
+        ptr_XfireSetCustomGameDataW &&
+        ptr_XfireSetCustomGameDataUTF8)
+        return 1;
+    return 0;
 }
 
 int XfireSetCustomGameDataA(int num_keys, const char **keys, const char **values)
 {
-	HelperInit();
-	if (ptr_XfireSetCustomGameDataA)
-		return ptr_XfireSetCustomGameDataA(num_keys, keys, values);
-	return 1;
+    HelperInit();
+    if (ptr_XfireSetCustomGameDataA)
+        return ptr_XfireSetCustomGameDataA(num_keys, keys, values);
+    return 1;
 }
 
 int XfireSetCustomGameDataW(int num_keys, const wchar_t **keys, const wchar_t **values)
 {
-	HelperInit();
-	if (ptr_XfireSetCustomGameDataW)
-		return ptr_XfireSetCustomGameDataW(num_keys, keys, values);
-	return 1;
+    HelperInit();
+    if (ptr_XfireSetCustomGameDataW)
+        return ptr_XfireSetCustomGameDataW(num_keys, keys, values);
+    return 1;
 }
 
 int XfireSetCustomGameDataUTF8(int num_keys, const char **keys, const char **values)
 {
-	HelperInit();
-	if (ptr_XfireSetCustomGameDataUTF8)
-		return ptr_XfireSetCustomGameDataUTF8(num_keys, keys, values);
-	return 1;
+    HelperInit();
+    if (ptr_XfireSetCustomGameDataUTF8)
+        return ptr_XfireSetCustomGameDataUTF8(num_keys, keys, values);
+    return 1;
 }
 
 /* ------------------------------------------------------------------------- */
 static void HelperInit()
 {
-	if (!ptr_XfireSetCustomGameDataA ||
-		!ptr_XfireSetCustomGameDataW ||
-		!ptr_XfireSetCustomGameDataUTF8)
-	{
-		HMODULE toucan_dll = HelperGetToucanDLL();
-		if (toucan_dll)
-		{
-			ptr_XfireSetCustomGameDataA = (XfireSetCustomGameDataAFunction)::GetProcAddress(toucan_dll, "ToucanSendGameClientDataA_V1");
-			ptr_XfireSetCustomGameDataW = (XfireSetCustomGameDataWFunction)::GetProcAddress(toucan_dll, "ToucanSendGameClientDataW_V1");
-			ptr_XfireSetCustomGameDataUTF8 = (XfireSetCustomGameDataUTF8Function)::GetProcAddress(toucan_dll, "ToucanSendGameClientDataUTF8_V1");
-		}
-	}
+    if (!ptr_XfireSetCustomGameDataA ||
+        !ptr_XfireSetCustomGameDataW ||
+        !ptr_XfireSetCustomGameDataUTF8)
+    {
+        HMODULE toucan_dll = HelperGetToucanDLL();
+        if (toucan_dll)
+        {
+            ptr_XfireSetCustomGameDataA = (XfireSetCustomGameDataAFunction)::GetProcAddress(toucan_dll, "ToucanSendGameClientDataA_V1");
+            ptr_XfireSetCustomGameDataW = (XfireSetCustomGameDataWFunction)::GetProcAddress(toucan_dll, "ToucanSendGameClientDataW_V1");
+            ptr_XfireSetCustomGameDataUTF8 = (XfireSetCustomGameDataUTF8Function)::GetProcAddress(toucan_dll, "ToucanSendGameClientDataUTF8_V1");
+        }
+    }
 }
 
 
 static HMODULE HelperGetToucanDLL()
 {
-	if (g_toucan_dll)
-		return g_toucan_dll;
+    if (g_toucan_dll)
+        return g_toucan_dll;
 
-	/*
-	** We need to enumerate the DLLs loaded to find toucan dll.
-	** This is done because the toucan dll changes with each update.
-	** The toucan dll has the following format. "xfire_toucan_{BUILD_NUMBER}.dll"
-	** We simply try to find a dll w/ the prefix "xfire_toucan"
-	*/
-	HANDLE snapshot_handle = CreateToolhelp32Snapshot(TH32CS_SNAPMODULE, GetCurrentProcessId());
-	if (snapshot_handle != INVALID_HANDLE_VALUE)
-	{
-		MODULEENTRY32 module_entry;
-		module_entry.dwSize = sizeof(MODULEENTRY32);
+    /*
+    ** We need to enumerate the DLLs loaded to find toucan dll.
+    ** This is done because the toucan dll changes with each update.
+    ** The toucan dll has the following format. "xfire_toucan_{BUILD_NUMBER}.dll"
+    ** We simply try to find a dll w/ the prefix "xfire_toucan"
+    */
+    HANDLE snapshot_handle = CreateToolhelp32Snapshot(TH32CS_SNAPMODULE, GetCurrentProcessId());
+    if (snapshot_handle != INVALID_HANDLE_VALUE)
+    {
+        MODULEENTRY32 module_entry;
+        module_entry.dwSize = sizeof(MODULEENTRY32);
 
-		BOOL result = Module32First(snapshot_handle, &module_entry);
-		char module_name[] = "xfire_toucan";
-		DWORD module_name_len = sizeof(module_name)-1;
-		while (result)
-		{
-			if (CompareStringA(LOCALE_USER_DEFAULT, NORM_IGNORECASE, module_entry.szModule, module_name_len, module_name, module_name_len) == CSTR_EQUAL)
-			{
-				g_toucan_dll = module_entry.hModule;
-				break;
-			}
-			result = Module32Next(snapshot_handle, &module_entry);
-		}
+        BOOL result = Module32First(snapshot_handle, &module_entry);
+        char module_name[] = "xfire_toucan";
+        DWORD module_name_len = sizeof(module_name)-1;
+        while (result)
+        {
+            if (CompareStringA(LOCALE_USER_DEFAULT, NORM_IGNORECASE, module_entry.szModule, module_name_len, module_name, module_name_len) == CSTR_EQUAL)
+            {
+                g_toucan_dll = module_entry.hModule;
+                break;
+            }
+            result = Module32Next(snapshot_handle, &module_entry);
+        }
 
-		CloseHandle(snapshot_handle);
-	}
+        CloseHandle(snapshot_handle);
+    }
 
-	return g_toucan_dll;
+    return g_toucan_dll;
 }
--- a/bin/CMakeLists.txt	Fri Jan 25 13:29:20 2013 +0400
+++ b/bin/CMakeLists.txt	Tue Jan 29 10:10:23 2013 +0400
@@ -1,9 +1,9 @@
 if(WIN32 AND NOT UNIX)
-	file(GLOB DLLs *.dll)
-	file(GLOB ICOs *.ico)
-	
-	install(FILES
-		${DLLs}
-		${ICOs}
-		DESTINATION ${target_library_install_dir})
+    file(GLOB DLLs *.dll)
+    file(GLOB ICOs *.ico)
+
+    install(FILES
+        ${DLLs}
+        ${ICOs}
+        DESTINATION ${target_library_install_dir})
 endif(WIN32 AND NOT UNIX)
--- a/cmake_modules/FindLibraryWithDebug.cmake	Fri Jan 25 13:29:20 2013 +0400
+++ b/cmake_modules/FindLibraryWithDebug.cmake	Tue Jan 29 10:10:23 2013 +0400
@@ -100,7 +100,7 @@
           SET(${var_name} ${${var_name}_DEBUG})
 
         ENDIF(${var_name}_RELEASE)
-       
+
       ENDIF(${var_name}_RELEASE AND ${var_name}_DEBUG)
 
       MARK_AS_ADVANCED(${var_name}_RELEASE)
--- a/gameServer/Actions.hs	Fri Jan 25 13:29:20 2013 +0400
+++ b/gameServer/Actions.hs	Tue Jan 29 10:10:23 2013 +0400
@@ -56,7 +56,7 @@
     | BanList
     | Unban B.ByteString
     | ChangeMaster (Maybe ClientIndex)
-    | RemoveClientTeams ClientIndex
+    | RemoveClientTeams
     | ModifyClient (ClientInfo -> ClientInfo)
     | ModifyClient2 ClientIndex (ClientInfo -> ClientInfo)
     | ModifyRoomClients (ClientInfo -> ClientInfo)
@@ -236,11 +236,11 @@
 
     if master then
         if playersNum > 1 then
-            mapM_ processAction [ChangeMaster Nothing, NoticeMessage AdminLeft, RemoveClientTeams ci, AnswerClients chans ["LEFT", clNick, msg]]
+            mapM_ processAction [ChangeMaster Nothing, NoticeMessage AdminLeft, RemoveClientTeams, AnswerClients chans ["LEFT", clNick, msg]]
             else
             processAction RemoveRoom
         else
-        mapM_ processAction [RemoveClientTeams ci, AnswerClients chans ["LEFT", clNick, msg]]
+        mapM_ processAction [RemoveClientTeams, AnswerClients chans ["LEFT", clNick, msg]]
 
     -- when not removing room
     ready <- client's isReady
@@ -390,9 +390,13 @@
 
 
 processAction (RemoveTeam teamName) = do
+    (Just ci) <- gets clientIndex
     rnc <- gets roomsClients
     ri <- clientRoomA
-    inGame <- io $ room'sM rnc (isJust . gameInfo) ri
+    inGame <- io $ do
+        r <- room'sM rnc (isJust . gameInfo) ri
+        c <- client'sM rnc isInGame ci
+        return $ r && c
     chans <- othersChans
     mapM_ processAction $
         ModifyRoom (\r -> r{
@@ -404,14 +408,14 @@
         : [SendTeamRemovalMessage teamName | inGame]
 
 
-processAction (RemoveClientTeams clId) = do
+processAction RemoveClientTeams = do
+    (Just ci) <- gets clientIndex
     rnc <- gets roomsClients
 
     removeTeamActions <- io $ do
-        clNick <- client'sM rnc nick clId
-        rId <- clientRoomM rnc clId
+        rId <- clientRoomM rnc ci
         roomTeams <- room'sM rnc teams rId
-        return . Prelude.map (RemoveTeam . teamname) . Prelude.filter (\t -> teamowner t == clNick) $ roomTeams
+        return . Prelude.map (RemoveTeam . teamname) . Prelude.filter (\t -> teamownerId t == ci) $ roomTeams
 
     mapM_ processAction removeTeamActions
 
@@ -644,12 +648,19 @@
 
 processAction Stats = do
     cls <- allClientsS
-    let stats = versions cls
-    processAction $ Warning stats
-    where
-        versions = B.concat . ((:) "<table border=1>") . (flip (++) ["</table>"])
-            . concatMap (\(p, n :: Int) -> ["<tr><td>", protoNumber2ver p, "</td><td>", showB n, "</td></tr>"])
-            . Map.toList . Map.fromListWith (+) . map (\c -> (clientProto c, 1))
+    rms <- allRoomsS
+    let clientsMap = Map.fromListWith (+) . map (\c -> (clientProto c, 1 :: Int)) $ cls
+    let roomsMap = Map.fromListWith (+) . map (\c -> (roomProto c, 1 :: Int)) . filter ((/=) 0 . roomProto) $ rms
+    let keys = Map.keysSet clientsMap `Set.union` Map.keysSet roomsMap
+    let versionsStats = B.concat . ((:) "<table border=1>") . (flip (++) ["</table>"])
+            . concatMap (\p -> [
+                    "<tr><td>", protoNumber2ver p
+                    , "</td><td>", showB $ Map.findWithDefault 0 p clientsMap
+                    , "</td><td>", showB $ Map.findWithDefault 0 p roomsMap
+                    , "</td></tr>"])
+            . Set.toList $ keys
+    processAction $ Warning versionsStats
+
 
 #if defined(OFFICIAL_SERVER)
 processAction SaveReplay = do
--- a/gameServer/ClientIO.hs	Fri Jan 25 13:29:20 2013 +0400
+++ b/gameServer/ClientIO.hs	Tue Jan 29 10:10:23 2013 +0400
@@ -37,7 +37,7 @@
             unless (B.null recvBS) $ do
                 let (packets, newrecvBuf) = bs2Packets $ B.append recvBuf recvBS
                 forM_ packets sendPacket
-                receiveWithBufferLoop newrecvBuf
+                receiveWithBufferLoop $ B.copy newrecvBuf
 
         sendPacket packet = writeChan chan $ ClientMessage (ci, packet)
 
--- a/gameServer/RoomsAndClients.hs	Fri Jan 25 13:29:20 2013 +0400
+++ b/gameServer/RoomsAndClients.hs	Tue Jan 29 10:10:23 2013 +0400
@@ -23,6 +23,7 @@
     room'sM,
     allClientsM,
     clientsM,
+    roomsM,
     roomClientsM,
     roomClientsIndicesM,
     withRoomsAndClients,
@@ -160,6 +161,9 @@
 clientsM :: MRoomsAndClients r c -> IO [c]
 clientsM (MRoomsAndClients (_, clients)) = indicesM clients >>= mapM (liftM client' . readElem clients)
 
+roomsM :: MRoomsAndClients r c -> IO [r]
+roomsM (MRoomsAndClients (rooms, _)) = indicesM rooms >>= mapM (liftM room' . readElem rooms)
+
 roomClientsIndicesM :: MRoomsAndClients r c -> RoomIndex -> IO [ClientIndex]
 roomClientsIndicesM (MRoomsAndClients (rooms, _)) (RoomIndex ri) = liftM roomClients' (rooms `readElem` ri)
 
--- a/gameServer/ServerState.hs	Fri Jan 25 13:29:20 2013 +0400
+++ b/gameServer/ServerState.hs	Tue Jan 29 10:10:23 2013 +0400
@@ -5,6 +5,7 @@
     ServerState(..),
     client's,
     allClientsS,
+    allRoomsS,
     roomClientsS,
     sameProtoClientsS,
     io
@@ -40,6 +41,9 @@
 allClientsS :: StateT ServerState IO [ClientInfo]
 allClientsS = gets roomsClients >>= liftIO . clientsM
 
+allRoomsS :: StateT ServerState IO [RoomInfo]
+allRoomsS = gets roomsClients >>= liftIO . roomsM
+
 roomClientsS :: RoomIndex -> StateT ServerState IO [ClientInfo]
 roomClientsS ri = do
     rnc <- gets roomsClients
--- a/hedgewars/hwengine.pas	Fri Jan 25 13:29:20 2013 +0400
+++ b/hedgewars/hwengine.pas	Tue Jan 29 10:10:23 2013 +0400
@@ -439,7 +439,6 @@
 begin
     uUtils.initModule(complete);    // opens the debug file, must be the first
     uVariables.initModule;          // inits all global variables
-    uConsole.initModule;            // opens stdout
     uCommands.initModule;           // helps below
     uCommandHandlers.initModule;    // registers all messages from frontend
 
@@ -510,7 +509,6 @@
 
     uCommandHandlers.freeModule;
     uCommands.freeModule;
-    uConsole.freeModule;            // closes stdout
     uVariables.freeModule;
     uUtils.freeModule;              // closes debug file
 end;
--- a/hedgewars/uConsole.pas	Fri Jan 25 13:29:20 2013 +0400
+++ b/hedgewars/uConsole.pas	Tue Jan 29 10:10:23 2013 +0400
@@ -21,61 +21,26 @@
 unit uConsole;
 interface
 
-procedure initModule;
-procedure freeModule;
-procedure WriteToConsole(s: shortstring);
-procedure WriteLnToConsole(s: shortstring);
-function  GetLastConsoleLine: shortstring;
-function  ShortStringAsPChar(s: shortstring): PChar;
-
-implementation
-uses Types, uVariables, uUtils {$IFDEF ANDROID}, log in 'log.pas'{$ENDIF};
-
-const cLinesCount = 8;
-var   cLineWidth: LongInt;
-
-type
-    TTextLine = record
-        s: shortstring
-        end;
-
-var   ConsoleLines: array[byte] of TTextLine;
-      CurrLine: LongInt;
-
-procedure SetLine(var tl: TTextLine; str: shortstring);
-begin
-with tl do
-    s:= str;
-end;
 
 procedure WriteToConsole(s: shortstring);
-{$IFNDEF NOCONSOLE}
-var Len: LongInt;
-    done: boolean;
-{$ENDIF}
+procedure WriteLnToConsole(s: shortstring);
+function  ShortStringAsPChar(s: shortstring): PChar;
+
+var lastConsoleline : shortstring;
+
+implementation
+uses Types, uUtils {$IFDEF ANDROID}, log in 'log.pas'{$ENDIF};
+
+
+procedure WriteToConsole(s: shortstring);
 begin
 {$IFNDEF NOCONSOLE}
-AddFileLog('[Con] ' + s);
+    AddFileLog('[Con] ' + s);
 {$IFDEF ANDROID}
+    //TODO integrate this function in the uMobile record
     Log.__android_log_write(Log.Android_LOG_DEBUG, 'HW_Engine', ShortStringAsPChar('[Con]' + s));
 {$ELSE}
-Write(stderr, s);
-done:= false;
-
-while not done do
-    begin
-    Len:= cLineWidth - Length(ConsoleLines[CurrLine].s);
-    SetLine(ConsoleLines[CurrLine], ConsoleLines[CurrLine].s + copy(s, 1, Len));
-    Delete(s, 1, Len);
-    if byte(ConsoleLines[CurrLine].s[0]) = cLineWidth then
-        begin
-        inc(CurrLine);
-        if CurrLine = cLinesCount then
-            CurrLine:= 0;
-        PByte(@ConsoleLines[CurrLine].s)^:= 0
-        end;
-    done:= (Length(s) = 0);
-    end;
+    Write(stderr, s);
 {$ENDIF}
 {$ENDIF}
 end;
@@ -83,13 +48,10 @@
 procedure WriteLnToConsole(s: shortstring);
 begin
 {$IFNDEF NOCONSOLE}
-WriteToConsole(s);
+    WriteToConsole(s);
+    lastConsoleline:= s;
 {$IFNDEF ANDROID}
-WriteLn(stderr, '');
-inc(CurrLine);
-if CurrLine = cLinesCount then
-    CurrLine:= 0;
-PByte(@ConsoleLines[CurrLine].s)^:= 0
+    WriteLn(stderr, '');
 {$ENDIF}
 {$ENDIF}
 end;
@@ -102,37 +64,5 @@
     ShortStringAsPChar:= @s[1];
 end;
 
-function GetLastConsoleLine: shortstring;
-var valueStr: shortstring;
-    i: LongWord;
-begin
-i:= (CurrLine + cLinesCount - 2) mod cLinesCount;
-valueStr:= ConsoleLines[i].s;
-
-valueStr:= valueStr + #10;
-
-i:= (CurrLine + cLinesCount - 1) mod cLinesCount;
-valueStr:= valueStr + ConsoleLines[i].s;
-
-GetLastConsoleLine:= valueStr;
-end;
-
-procedure initModule;
-var i: LongInt;
-begin
-    CurrLine:= 0;
-
-    // initConsole
-    cLineWidth:= cScreenWidth div 10;
-    if cLineWidth > 255 then
-        cLineWidth:= 255;
-    for i:= 0 to Pred(cLinesCount) do
-        PByte(@ConsoleLines[i])^:= 0;
-end;
-
-procedure freeModule;
-begin
-
-end;
 
 end.
--- a/hedgewars/uDebug.pas	Fri Jan 25 13:29:20 2013 +0400
+++ b/hedgewars/uDebug.pas	Tue Jan 29 10:10:23 2013 +0400
@@ -34,7 +34,7 @@
 WriteLnToConsole(Msg);
 if isFatalError then
     begin
-    ParseCommand('fatal ' + GetLastConsoleLine, true);
+    ParseCommand('fatal ' + lastConsoleline, true);
     SDL_Quit;
     halt(1)
     end
--- a/project_files/HedgewarsMobile/Classes/Appirater.h	Fri Jan 25 13:29:20 2013 +0400
+++ b/project_files/HedgewarsMobile/Classes/Appirater.h	Tue Jan 29 10:10:23 2013 +0400
@@ -1,9 +1,9 @@
 /*
  This file is part of Appirater, http://arashpayan.com
- 
+
  Copyright (c) 2010, Arash Payan
  All rights reserved.
- 
+
  Permission is hereby granted, free of charge, to any person
  obtaining a copy of this software and associated documentation
  files (the "Software"), to deal in the Software without
@@ -12,10 +12,10 @@
  copies of the Software, and to permit persons to whom the
  Software is furnished to do so, subject to the following
  conditions:
- 
+
  The above copyright notice and this permission notice shall be
  included in all copies or substantial portions of the Software.
- 
+
  THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
  EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
  OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
--- a/project_files/HedgewarsMobile/Classes/Appirater.m	Fri Jan 25 13:29:20 2013 +0400
+++ b/project_files/HedgewarsMobile/Classes/Appirater.m	Tue Jan 29 10:10:23 2013 +0400
@@ -1,9 +1,9 @@
 /*
  This file is part of Appirater, http://arashpayan.com
- 
+
  Copyright (c) 2010, Arash Payan
  All rights reserved.
- 
+
  Permission is hereby granted, free of charge, to any person
  obtaining a copy of this software and associated documentation
  files (the "Software"), to deal in the Software without
@@ -12,10 +12,10 @@
  copies of the Software, and to permit persons to whom the
  Software is furnished to do so, subject to the following
  conditions:
- 
+
  The above copyright notice and this permission notice shall be
  included in all copies or substantial portions of the Software.
- 
+
  THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
  EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
  OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
@@ -66,7 +66,7 @@
         trackingVersion = version;
         [userDefaults setObject:version forKey:kAppiraterCurrentVersion];
     }
-    
+
     if (APPIRATER_DEBUG)
         DLog(@"APPIRATER Tracking version: %@", trackingVersion);
 
@@ -98,7 +98,7 @@
              launchCount > LAUNCHES_UNTIL_PROMPT &&
              !declinedToRate &&
              !ratedApp) {
-            if ([HWUtils isNetworkReachable]) {	// check if they can reach the app store
+            if ([HWUtils isNetworkReachable]) { // check if they can reach the app store
                 willShowPrompt = YES;
                 [self performSelectorOnMainThread:@selector(showPrompt) withObject:nil waitUntilDone:NO];
             }
@@ -141,7 +141,7 @@
             // they want to rate it
             [[UIApplication sharedApplication] openURL:
              [NSURL URLWithString:[templateReviewURL stringByReplacingOccurrencesOfString:@"APP_ID" withString:[NSString stringWithFormat:@"%d", APPIRATER_APP_ID]]]];
-            
+
             [userDefaults setBool:YES forKey:kAppiraterRatedCurrentVersion];
             break;
         case 2:
--- a/project_files/HedgewarsMobile/Classes/AudioManagerController.m	Fri Jan 25 13:29:20 2013 +0400
+++ b/project_files/HedgewarsMobile/Classes/AudioManagerController.m	Tue Jan 29 10:10:23 2013 +0400
@@ -79,7 +79,7 @@
         self.backgroundMusic.delegate = nil;
         self.backgroundMusic.numberOfLoops = -1;
     }
-    
+
     self.backgroundMusic.volume = DEFAULT_VOLUME;
     [self.backgroundMusic play];
 }
@@ -98,7 +98,7 @@
 
     if (self.audioFaderQueue == nil)
         self.audioFaderQueue = [[NSOperationQueue alloc] init];
-    
+
     MXAudioPlayerFadeOperation *fadeOut = [[MXAudioPlayerFadeOperation alloc] initFadeWithAudioPlayer:self.backgroundMusic
                                                                                              toVolume:0.0
                                                                                          overDuration:FADEOUT_DURATION];
@@ -144,30 +144,30 @@
 -(void) playClickSound {
     if ([[[NSUserDefaults standardUserDefaults] objectForKey:@"sound"] boolValue] == NO)
         return;
-    
+
     if (self.clickSound == -1)
         self.clickSound = [self loadSound:@"clickSound"];
-    
+
     AudioServicesPlaySystemSound(self.clickSound);
 }
 
 -(void) playBackSound {
     if ([[[NSUserDefaults standardUserDefaults] objectForKey:@"sound"] boolValue] == NO)
         return;
-    
+
     if (self.backSound == -1)
         self.backSound = [self loadSound:@"backSound"];
-    
+
     AudioServicesPlaySystemSound(self.backSound);
 }
 
 -(void) playSelectSound {
     if ([[[NSUserDefaults standardUserDefaults] objectForKey:@"sound"] boolValue] == NO)
         return;
-    
+
     if (self.selSound == -1)
         self.selSound = [self loadSound:@"selSound"];
-    
+
     AudioServicesPlaySystemSound(self.selSound);
 }
 
--- a/project_files/HedgewarsMobile/Classes/CreationChamber.m	Fri Jan 25 13:29:20 2013 +0400
+++ b/project_files/HedgewarsMobile/Classes/CreationChamber.m	Tue Jan 29 10:10:23 2013 +0400
@@ -390,7 +390,7 @@
     [basicArray release];
 
     NSString *schemeFile = [[NSString alloc] initWithFormat:@"%@/%@.plist", schemesDirectory, nameWithoutExt];
-    
+
     [theScheme writeToFile:schemeFile atomically:YES];
     [schemeFile release];
     [theScheme release];
--- a/project_files/HedgewarsMobile/Classes/DefinesAndMacros.h	Fri Jan 25 13:29:20 2013 +0400
+++ b/project_files/HedgewarsMobile/Classes/DefinesAndMacros.h	Tue Jan 29 10:10:23 2013 +0400
@@ -39,7 +39,7 @@
 #define rotationManager(x) (IS_IPAD() ? YES : (x == UIInterfaceOrientationLandscapeRight) || (x == UIInterfaceOrientationLandscapeLeft))
 
 #define START_TIMER()   NSTimeInterval start = [NSDate timeIntervalSinceReferenceDate];
-#define END_TIMER(msg) 	NSTimeInterval stop = [NSDate timeIntervalSinceReferenceDate]; DLog([NSString stringWithFormat:@"%@ Time = %f", msg, stop-start]);
+#define END_TIMER(msg)  NSTimeInterval stop = [NSDate timeIntervalSinceReferenceDate]; DLog([NSString stringWithFormat:@"%@ Time = %f", msg, stop-start]);
 
 
 #define DOCUMENTS_FOLDER()      [NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES) objectAtIndex:0]
--- a/project_files/HedgewarsMobile/Classes/FlagsViewController.m	Fri Jan 25 13:29:20 2013 +0400
+++ b/project_files/HedgewarsMobile/Classes/FlagsViewController.m	Tue Jan 29 10:10:23 2013 +0400
@@ -35,7 +35,7 @@
 
     NSMutableArray *array_na = [[NSMutableArray alloc] init];
     NSMutableArray *array_cm = [[NSMutableArray alloc] init];
-    
+
     for (NSString *name in [[NSFileManager defaultManager] contentsOfDirectoryAtPath:FLAGS_DIRECTORY() error:NULL]) {
         if ([name hasPrefix:@"cm_"]) {
             NSString *processed = [name substringFromIndex:3];
@@ -43,7 +43,7 @@
         } else
              [array_na addObject:name];
     }
-    
+
     self.flagArray = array_na;
     [array_na release];
     self.communityArray = array_cm;
@@ -135,14 +135,14 @@
     int oldRow = (lastIndexPath != nil) ? [lastIndexPath row] : -1;
     int newSection = [indexPath section];
     int oldSection = (lastIndexPath != nil) ? [lastIndexPath section] : -1;
-    
+
     if (newRow != oldRow || newSection != oldSection) {
         NSString *flag = nil;
         if ([indexPath section] == 0)
             flag = [self.flagArray objectAtIndex:newRow];
         else
             flag = [NSString stringWithFormat:@"cm_%@",[self.communityArray objectAtIndex:newRow]];
-        
+
         // if the two selected rows differ update data on the hog dictionary and reload table content
         [self.teamDictionary setValue:[flag stringByDeletingPathExtension] forKey:@"flag"];
 
--- a/project_files/HedgewarsMobile/Classes/GameConfigViewController.m	Fri Jan 25 13:29:20 2013 +0400
+++ b/project_files/HedgewarsMobile/Classes/GameConfigViewController.m	Tue Jan 29 10:10:23 2013 +0400
@@ -62,7 +62,7 @@
                 }
             }
             [self startGame:theButton];
-            
+
             break;
         case 2:
             [[AudioManagerController mainManager] playClickSound];
--- a/project_files/HedgewarsMobile/Classes/GeneralSettingsViewController.m	Fri Jan 25 13:29:20 2013 +0400
+++ b/project_files/HedgewarsMobile/Classes/GeneralSettingsViewController.m	Tue Jan 29 10:10:23 2013 +0400
@@ -149,7 +149,7 @@
                 editableCell.textField.font = [UIFont systemFontOfSize:[UIFont systemFontSize]];
                 editableCell.textField.textColor = [UIColor blackColor];
             }
-            
+
             if (row == 0) {
                 editableCell.titleLabel.text = NSLocalizedString(@"Nickname","from the settings table");
                 editableCell.textField.placeholder = NSLocalizedString(@"Insert your username (if you have one)",@"from the settings table");
@@ -163,7 +163,7 @@
                 editableCell.textField.secureTextEntry = YES;
                 editableCell.tag = 50;
             }
-            
+
             editableCell.accessoryView = nil;
             cell = editableCell;
             break;
@@ -176,7 +176,7 @@
                 cell.accessoryView = theSwitch;
                 [theSwitch release];
             }
-            
+
             switchContent = (UISwitch *)cell.accessoryView;
             if (row == 0) {
                 cell.textLabel.text = NSLocalizedString(@"Sound Effects", @"from the settings table");
@@ -197,7 +197,7 @@
                 cell.accessoryView = theSwitch;
                 [theSwitch release];
             }
-            
+
             switchContent = (UISwitch *)cell.accessoryView;
             cell.detailTextLabel.adjustsFontSizeToFitWidth = YES;
             switch (row) {
@@ -221,7 +221,7 @@
         default:
             break;
     }
-    
+
     cell.accessoryType = UITableViewCellAccessoryNone;
     cell.selectionStyle = UITableViewCellSelectionStyleNone;
     cell.imageView.image = nil;
--- a/project_files/HedgewarsMobile/Classes/HoldTableViewCell.m	Fri Jan 25 13:29:20 2013 +0400
+++ b/project_files/HedgewarsMobile/Classes/HoldTableViewCell.m	Tue Jan 29 10:10:23 2013 +0400
@@ -35,8 +35,8 @@
 
 -(void) touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event {
     UITouch *touch = [[event allTouches] anyObject];
-    
-    time = touch.timestamp; 
+
+    time = touch.timestamp;
     [self performSelector:@selector(holdAction) withObject:nil afterDelay:0.25];
 
     [super touchesBegan:touches withEvent:event];
@@ -44,12 +44,12 @@
 
 -(void) touchesEnded:(NSSet *)touches withEvent:(UIEvent *)event {
     UITouch *touch = [[event allTouches] anyObject];
-    
+
     if ( touch.timestamp - time < 0.25 ) {
         [NSObject cancelPreviousPerformRequestsWithTarget:self
                                                  selector:@selector(holdAction)
                                                    object:nil];
-        
+
         [super touchesEnded:touches withEvent:event];
     } else
         [super touchesCancelled:touches withEvent:event];
--- a/project_files/HedgewarsMobile/Classes/LevelViewController.h	Fri Jan 25 13:29:20 2013 +0400
+++ b/project_files/HedgewarsMobile/Classes/LevelViewController.h	Tue Jan 29 10:10:23 2013 +0400
@@ -26,7 +26,7 @@
     NSArray *levelArray;
     NSArray *levelSprites;
     NSIndexPath *lastIndexPath;
-    
+
     NSInteger numberOfSections;
 }
 
--- a/project_files/HedgewarsMobile/Classes/LevelViewController.m	Fri Jan 25 13:29:20 2013 +0400
+++ b/project_files/HedgewarsMobile/Classes/LevelViewController.m	Tue Jan 29 10:10:23 2013 +0400
@@ -48,19 +48,19 @@
 
 -(void) viewWillAppear:(BOOL)animated {
     [super viewWillAppear:animated];
-    
+
     if ([[[[self.teamDictionary objectForKey:@"hedgehogs"] objectAtIndex:0] objectForKey:@"level"] intValue] == 0)
         numberOfSections = 1;
     else
         numberOfSections = 2;
-    
+
     [self.tableView reloadData];
     // this moves the tableview to the top
     [self.tableView setContentOffset:CGPointMake(0,0) animated:NO];
 }
 
 -(void) viewWillDisappear:(BOOL)animated {
- // stuff like checking that at least 1 field was selected   
+ // stuff like checking that at least 1 field was selected
 }
 
 #pragma mark -
@@ -84,7 +84,7 @@
     NSInteger row = [indexPath row];
     NSInteger section = [indexPath section];
     UITableViewCell *cell;
-    
+
     if (section == 0) {
         cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier0];
         if (cell == nil) {
@@ -104,7 +104,7 @@
         cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier1];
         if (cell == nil)
             cell = [[[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:CellIdentifier1] autorelease];
-        
+
         cell.textLabel.text = [levelArray objectAtIndex:row];
         NSDictionary *hog = [[self.teamDictionary objectForKey:@"hedgehogs"] objectAtIndex:0];
         if ([[hog objectForKey:@"level"] intValue] == row+1) {
@@ -113,14 +113,14 @@
         } else {
             cell.accessoryType = UITableViewCellAccessoryNone;
         }
-        
+
         NSString *botlevelPath = [[NSString alloc] initWithFormat:@"%@/bot%d.png",[[NSBundle mainBundle] resourcePath],row+1];
         UIImage *levelImage = [[UIImage alloc] initWithContentsOfFile:botlevelPath];
         [botlevelPath release];
         cell.imageView.image = levelImage;
         [levelImage release];
     }
-    
+
     return cell;
 }
 
@@ -129,7 +129,7 @@
     NSIndexSet *sections = [[NSIndexSet alloc] initWithIndex:1];
     NSMutableArray *hogs = [self.teamDictionary objectForKey:@"hedgehogs"];
     NSInteger level;
-    
+
     if (theSwitch.on) {
         numberOfSections = 2;
         [self.tableView insertSections:sections withRowAnimation:UITableViewRowAnimationFade];
@@ -156,19 +156,19 @@
     int newRow = [indexPath row];
     int oldRow = (self.lastIndexPath != nil) ? [self.lastIndexPath row] : -1;
 
-    if ([indexPath section] != 0) { 
+    if ([indexPath section] != 0) {
         if (newRow != oldRow) {
             NSMutableArray *hogs = [self.teamDictionary objectForKey:@"hedgehogs"];
-            
+
             NSInteger level = newRow + 1;
             for (NSMutableDictionary *hog in hogs)
                 [hog setObject:[NSNumber numberWithInt:level] forKey:@"level"];
             DLog(@"New level is %d",level);
-            
+
             // tell our boss to write this new stuff on disk
             [[NSNotificationCenter defaultCenter] postNotificationName:@"setWriteNeedTeams" object:nil];
             [self.tableView reloadData];
-            
+
             self.lastIndexPath = indexPath;
             [self.tableView selectRowAtIndexPath:indexPath animated:YES scrollPosition:UITableViewScrollPositionNone];
         }
--- a/project_files/HedgewarsMobile/Classes/MGSplitViewController/MGSplitCornersView.h	Fri Jan 25 13:29:20 2013 +0400
+++ b/project_files/HedgewarsMobile/Classes/MGSplitViewController/MGSplitCornersView.h	Tue Jan 29 10:10:23 2013 +0400
@@ -9,18 +9,18 @@
 #import <UIKit/UIKit.h>
 
 typedef enum _MGCornersPosition {
-	MGCornersPositionLeadingVertical	= 0, // top of screen for a left/right split.
-	MGCornersPositionTrailingVertical	= 1, // bottom of screen for a left/right split.
-	MGCornersPositionLeadingHorizontal	= 2, // left of screen for a top/bottom split.
-	MGCornersPositionTrailingHorizontal	= 3  // right of screen for a top/bottom split.
+    MGCornersPositionLeadingVertical    = 0, // top of screen for a left/right split.
+    MGCornersPositionTrailingVertical   = 1, // bottom of screen for a left/right split.
+    MGCornersPositionLeadingHorizontal  = 2, // left of screen for a top/bottom split.
+    MGCornersPositionTrailingHorizontal = 3  // right of screen for a top/bottom split.
 } MGCornersPosition;
 
 @class MGSplitViewController;
 @interface MGSplitCornersView : UIView {
-	float cornerRadius;
-	MGSplitViewController *splitViewController;
-	MGCornersPosition cornersPosition;
-	UIColor *cornerBackgroundColor;
+    float cornerRadius;
+    MGSplitViewController *splitViewController;
+    MGCornersPosition cornersPosition;
+    UIColor *cornerBackgroundColor;
 }
 
 @property (nonatomic, assign) float cornerRadius;
--- a/project_files/HedgewarsMobile/Classes/MGSplitViewController/MGSplitCornersView.m	Fri Jan 25 13:29:20 2013 +0400
+++ b/project_files/HedgewarsMobile/Classes/MGSplitViewController/MGSplitCornersView.m	Tue Jan 29 10:10:23 2013 +0400
@@ -19,23 +19,23 @@
 - (id)initWithFrame:(CGRect)frame
 {
     if ((self = [super initWithFrame:frame])) {
-		self.contentMode = UIViewContentModeRedraw;
-		self.userInteractionEnabled = NO;
-		self.opaque = NO;
-		self.backgroundColor = [UIColor clearColor];
-		cornerRadius = 0.0; // actual value is set by the splitViewController.
-		cornersPosition = MGCornersPositionLeadingVertical;
+        self.contentMode = UIViewContentModeRedraw;
+        self.userInteractionEnabled = NO;
+        self.opaque = NO;
+        self.backgroundColor = [UIColor clearColor];
+        cornerRadius = 0.0; // actual value is set by the splitViewController.
+        cornersPosition = MGCornersPositionLeadingVertical;
     }
-	
+
     return self;
 }
 
 
 - (void)dealloc
 {
-	self.cornerBackgroundColor = nil;
-	
-	[super dealloc];
+    self.cornerBackgroundColor = nil;
+
+    [super dealloc];
 }
 
 
@@ -45,131 +45,131 @@
 
 - (void)drawRect:(CGRect)rect
 {
-	// Draw two appropriate corners, with cornerBackgroundColor behind them.
-	if (cornerRadius > 0) {
-		if (NO) { // just for debugging.
-			[[UIColor redColor] set];
-			UIRectFill(self.bounds);
-		}
-		
-		float maxX = CGRectGetMaxX(self.bounds);
-		float maxY = CGRectGetMaxY(self.bounds);
-		UIBezierPath *path = [UIBezierPath bezierPath];
-		CGPoint pt = CGPointZero;
-		switch (cornersPosition) {
-			case MGCornersPositionLeadingVertical: // top of screen for a left/right split
-				[path moveToPoint:pt];
-				pt.y += cornerRadius;
-				[path appendPath:[UIBezierPath bezierPathWithArcCenter:pt radius:cornerRadius startAngle:degreesToRadians(90) endAngle:0 clockwise:YES]];
-				pt.x += cornerRadius;
-				pt.y -= cornerRadius;
-				[path addLineToPoint:pt];
-				[path addLineToPoint:CGPointZero];
-				[path closePath];
-				
-				pt.x = maxX - cornerRadius;
-				pt.y = 0;
-				[path moveToPoint:pt];
-				pt.y = maxY;
-				[path addLineToPoint:pt];
-				pt.x += cornerRadius;
-				[path appendPath:[UIBezierPath bezierPathWithArcCenter:pt radius:cornerRadius startAngle:degreesToRadians(180) endAngle:degreesToRadians(90) clockwise:YES]];
-				pt.y -= cornerRadius;
-				[path addLineToPoint:pt];
-				pt.x -= cornerRadius;
-				[path addLineToPoint:pt];
-				[path closePath];
-				
-				break;
-				
-			case MGCornersPositionTrailingVertical: // bottom of screen for a left/right split
-				pt.y = maxY;
-				[path moveToPoint:pt];
-				pt.y -= cornerRadius;
-				[path appendPath:[UIBezierPath bezierPathWithArcCenter:pt radius:cornerRadius startAngle:degreesToRadians(270) endAngle:degreesToRadians(360) clockwise:NO]];
-				pt.x += cornerRadius;
-				pt.y += cornerRadius;
-				[path addLineToPoint:pt];
-				pt.x -= cornerRadius;
-				[path addLineToPoint:pt];
-				[path closePath];
-				
-				pt.x = maxX - cornerRadius;
-				pt.y = maxY;
-				[path moveToPoint:pt];
-				pt.y -= cornerRadius;
-				[path addLineToPoint:pt];
-				pt.x += cornerRadius;
-				[path appendPath:[UIBezierPath bezierPathWithArcCenter:pt radius:cornerRadius startAngle:degreesToRadians(180) endAngle:degreesToRadians(270) clockwise:NO]];
-				pt.y += cornerRadius;
-				[path addLineToPoint:pt];
-				pt.x -= cornerRadius;
-				[path addLineToPoint:pt];
-				[path closePath];
-				
-				break;
-				
-			case MGCornersPositionLeadingHorizontal: // left of screen for a top/bottom split
-				pt.x = 0;
-				pt.y = cornerRadius;
-				[path moveToPoint:pt];
-				pt.y -= cornerRadius;
-				[path addLineToPoint:pt];
-				pt.x += cornerRadius;
-				[path appendPath:[UIBezierPath bezierPathWithArcCenter:pt radius:cornerRadius startAngle:degreesToRadians(180) endAngle:degreesToRadians(270) clockwise:NO]];
-				pt.y += cornerRadius;
-				[path addLineToPoint:pt];
-				pt.x -= cornerRadius;
-				[path addLineToPoint:pt];
-				[path closePath];
-				
-				pt.x = 0;
-				pt.y = maxY - cornerRadius;
-				[path moveToPoint:pt];
-				pt.y = maxY;
-				[path addLineToPoint:pt];
-				pt.x += cornerRadius;
-				[path appendPath:[UIBezierPath bezierPathWithArcCenter:pt radius:cornerRadius startAngle:degreesToRadians(180) endAngle:degreesToRadians(90) clockwise:YES]];
-				pt.y -= cornerRadius;
-				[path addLineToPoint:pt];
-				pt.x -= cornerRadius;
-				[path addLineToPoint:pt];
-				[path closePath];
-				
-				break;
-				
-			case MGCornersPositionTrailingHorizontal: // right of screen for a top/bottom split
-				pt.y = cornerRadius;
-				[path moveToPoint:pt];
-				pt.y -= cornerRadius;
-				[path appendPath:[UIBezierPath bezierPathWithArcCenter:pt radius:cornerRadius startAngle:degreesToRadians(270) endAngle:degreesToRadians(360) clockwise:NO]];
-				pt.x += cornerRadius;
-				pt.y += cornerRadius;
-				[path addLineToPoint:pt];
-				pt.x -= cornerRadius;
-				[path addLineToPoint:pt];
-				[path closePath];
-				
-				pt.y = maxY - cornerRadius;
-				[path moveToPoint:pt];
-				pt.y += cornerRadius;
-				[path appendPath:[UIBezierPath bezierPathWithArcCenter:pt radius:cornerRadius startAngle:degreesToRadians(90) endAngle:0 clockwise:YES]];
-				pt.x += cornerRadius;
-				pt.y -= cornerRadius;
-				[path addLineToPoint:pt];
-				pt.x -= cornerRadius;
-				[path addLineToPoint:pt];
-				[path closePath];
-				
-				break;
-				
-			default:
-				break;
-		}
-		
-		[self.cornerBackgroundColor set];
-		[path fill];
-	}
+    // Draw two appropriate corners, with cornerBackgroundColor behind them.
+    if (cornerRadius > 0) {
+        if (NO) { // just for debugging.
+            [[UIColor redColor] set];
+            UIRectFill(self.bounds);
+        }
+
+        float maxX = CGRectGetMaxX(self.bounds);
+        float maxY = CGRectGetMaxY(self.bounds);
+        UIBezierPath *path = [UIBezierPath bezierPath];
+        CGPoint pt = CGPointZero;
+        switch (cornersPosition) {
+            case MGCornersPositionLeadingVertical: // top of screen for a left/right split
+                [path moveToPoint:pt];
+                pt.y += cornerRadius;
+                [path appendPath:[UIBezierPath bezierPathWithArcCenter:pt radius:cornerRadius startAngle:degreesToRadians(90) endAngle:0 clockwise:YES]];
+                pt.x += cornerRadius;
+                pt.y -= cornerRadius;
+                [path addLineToPoint:pt];
+                [path addLineToPoint:CGPointZero];
+                [path closePath];
+
+                pt.x = maxX - cornerRadius;
+                pt.y = 0;
+                [path moveToPoint:pt];
+                pt.y = maxY;
+                [path addLineToPoint:pt];
+                pt.x += cornerRadius;
+                [path appendPath:[UIBezierPath bezierPathWithArcCenter:pt radius:cornerRadius startAngle:degreesToRadians(180) endAngle:degreesToRadians(90) clockwise:YES]];
+                pt.y -= cornerRadius;
+                [path addLineToPoint:pt];
+                pt.x -= cornerRadius;
+                [path addLineToPoint:pt];
+                [path closePath];
+
+                break;
+
+            case MGCornersPositionTrailingVertical: // bottom of screen for a left/right split
+                pt.y = maxY;
+                [path moveToPoint:pt];
+                pt.y -= cornerRadius;
+                [path appendPath:[UIBezierPath bezierPathWithArcCenter:pt radius:cornerRadius startAngle:degreesToRadians(270) endAngle:degreesToRadians(360) clockwise:NO]];
+                pt.x += cornerRadius;
+                pt.y += cornerRadius;
+                [path addLineToPoint:pt];
+                pt.x -= cornerRadius;
+                [path addLineToPoint:pt];
+                [path closePath];
+
+                pt.x = maxX - cornerRadius;
+                pt.y = maxY;
+                [path moveToPoint:pt];
+                pt.y -= cornerRadius;
+                [path addLineToPoint:pt];
+                pt.x += cornerRadius;
+                [path appendPath:[UIBezierPath bezierPathWithArcCenter:pt radius:cornerRadius startAngle:degreesToRadians(180) endAngle:degreesToRadians(270) clockwise:NO]];
+                pt.y += cornerRadius;
+                [path addLineToPoint:pt];
+                pt.x -= cornerRadius;
+                [path addLineToPoint:pt];
+                [path closePath];
+
+                break;
+
+            case MGCornersPositionLeadingHorizontal: // left of screen for a top/bottom split
+                pt.x = 0;
+                pt.y = cornerRadius;
+                [path moveToPoint:pt];
+                pt.y -= cornerRadius;
+                [path addLineToPoint:pt];
+                pt.x += cornerRadius;
+                [path appendPath:[UIBezierPath bezierPathWithArcCenter:pt radius:cornerRadius startAngle:degreesToRadians(180) endAngle:degreesToRadians(270) clockwise:NO]];
+                pt.y += cornerRadius;
+                [path addLineToPoint:pt];
+                pt.x -= cornerRadius;
+                [path addLineToPoint:pt];
+                [path closePath];
+
+                pt.x = 0;
+                pt.y = maxY - cornerRadius;
+                [path moveToPoint:pt];
+                pt.y = maxY;
+                [path addLineToPoint:pt];
+                pt.x += cornerRadius;
+                [path appendPath:[UIBezierPath bezierPathWithArcCenter:pt radius:cornerRadius startAngle:degreesToRadians(180) endAngle:degreesToRadians(90) clockwise:YES]];
+                pt.y -= cornerRadius;
+                [path addLineToPoint:pt];
+                pt.x -= cornerRadius;
+                [path addLineToPoint:pt];
+                [path closePath];
+
+                break;
+
+            case MGCornersPositionTrailingHorizontal: // right of screen for a top/bottom split
+                pt.y = cornerRadius;
+                [path moveToPoint:pt];
+                pt.y -= cornerRadius;
+                [path appendPath:[UIBezierPath bezierPathWithArcCenter:pt radius:cornerRadius startAngle:degreesToRadians(270) endAngle:degreesToRadians(360) clockwise:NO]];
+                pt.x += cornerRadius;
+                pt.y += cornerRadius;
+                [path addLineToPoint:pt];
+                pt.x -= cornerRadius;
+                [path addLineToPoint:pt];
+                [path closePath];
+
+                pt.y = maxY - cornerRadius;
+                [path moveToPoint:pt];
+                pt.y += cornerRadius;
+                [path appendPath:[UIBezierPath bezierPathWithArcCenter:pt radius:cornerRadius startAngle:degreesToRadians(90) endAngle:0 clockwise:YES]];
+                pt.x += cornerRadius;
+                pt.y -= cornerRadius;
+                [path addLineToPoint:pt];
+                pt.x -= cornerRadius;
+                [path addLineToPoint:pt];
+                [path closePath];
+
+                break;
+
+            default:
+                break;
+        }
+
+        [self.cornerBackgroundColor set];
+        [path fill];
+    }
 }
 
 
@@ -179,38 +179,38 @@
 
 - (void)setCornerRadius:(float)newRadius
 {
-	if (newRadius != cornerRadius) {
-		cornerRadius = newRadius;
-		[self setNeedsDisplay];
-	}
+    if (newRadius != cornerRadius) {
+        cornerRadius = newRadius;
+        [self setNeedsDisplay];
+    }
 }
 
 
 - (void)setSplitViewController:(MGSplitViewController *)theController
 {
-	if (theController != splitViewController) {
-		splitViewController = theController;
-		[self setNeedsDisplay];
-	}
+    if (theController != splitViewController) {
+        splitViewController = theController;
+        [self setNeedsDisplay];
+    }
 }
 
 
 - (void)setCornersPosition:(MGCornersPosition)posn
 {
-	if (cornersPosition != posn) {
-		cornersPosition = posn;
-		[self setNeedsDisplay];
-	}
+    if (cornersPosition != posn) {
+        cornersPosition = posn;
+        [self setNeedsDisplay];
+    }
 }
 
 
 - (void)setCornerBackgroundColor:(UIColor *)color
 {
-	if (color != cornerBackgroundColor) {
-		[cornerBackgroundColor release];
-		cornerBackgroundColor = [color retain];
-		[self setNeedsDisplay];
-	}
+    if (color != cornerBackgroundColor) {
+        [cornerBackgroundColor release];
+        cornerBackgroundColor = [color retain];
+        [self setNeedsDisplay];
+    }
 }
 
 
--- a/project_files/HedgewarsMobile/Classes/MGSplitViewController/MGSplitDividerView.h	Fri Jan 25 13:29:20 2013 +0400
+++ b/project_files/HedgewarsMobile/Classes/MGSplitViewController/MGSplitDividerView.h	Tue Jan 29 10:10:23 2013 +0400
@@ -10,8 +10,8 @@
 
 @class MGSplitViewController;
 @interface MGSplitDividerView : UIView {
-	MGSplitViewController *splitViewController;
-	BOOL allowsDragging;
+    MGSplitViewController *splitViewController;
+    BOOL allowsDragging;
 }
 
 @property (nonatomic, assign) MGSplitViewController *splitViewController; // weak ref.
--- a/project_files/HedgewarsMobile/Classes/MGSplitViewController/MGSplitDividerView.m	Fri Jan 25 13:29:20 2013 +0400
+++ b/project_files/HedgewarsMobile/Classes/MGSplitViewController/MGSplitDividerView.m	Tue Jan 29 10:10:23 2013 +0400
@@ -19,19 +19,19 @@
 
 - (id)initWithFrame:(CGRect)frame
 {
-	if ((self = [super initWithFrame:frame])) {
-		self.userInteractionEnabled = NO;
-		self.allowsDragging = NO;
-		self.contentMode = UIViewContentModeRedraw;
-	}
-	return self;
+    if ((self = [super initWithFrame:frame])) {
+        self.userInteractionEnabled = NO;
+        self.allowsDragging = NO;
+        self.contentMode = UIViewContentModeRedraw;
+    }
+    return self;
 }
 
 
 - (void)dealloc
 {
-	self.splitViewController = nil;
-	[super dealloc];
+    self.splitViewController = nil;
+    [super dealloc];
 }
 
 
@@ -41,139 +41,139 @@
 
 - (void)drawRect:(CGRect)rect
 {
-	if (splitViewController.dividerStyle == MGSplitViewDividerStyleThin) {
-		[super drawRect:rect];
-		
-	} else if (splitViewController.dividerStyle == MGSplitViewDividerStylePaneSplitter) {
-		// Draw gradient background.
-		CGRect bounds = self.bounds;
-		CGColorSpaceRef rgb = CGColorSpaceCreateDeviceRGB();
-		CGFloat locations[2] = {0, 1};
-		CGFloat components[8] = {	0.988, 0.988, 0.988, 1.0,  // light
-									0.875, 0.875, 0.875, 1.0 };// dark
-		CGGradientRef gradient = CGGradientCreateWithColorComponents (rgb, components, locations, 2);
-		CGContextRef context = UIGraphicsGetCurrentContext();
-		CGPoint start, end;
-		if (splitViewController.vertical) {
-			// Light left to dark right.
-			start = CGPointMake(CGRectGetMinX(bounds), CGRectGetMidY(bounds));
-			end = CGPointMake(CGRectGetMaxX(bounds), CGRectGetMidY(bounds));
-		} else {
-			// Light top to dark bottom.
-			start = CGPointMake(CGRectGetMidX(bounds), CGRectGetMinY(bounds));
-			end = CGPointMake(CGRectGetMidX(bounds), CGRectGetMaxY(bounds));
-		}
-		CGContextDrawLinearGradient(context, gradient, start, end, 0);
-		CGColorSpaceRelease(rgb);
-		CGGradientRelease(gradient);
-		
-		// Draw borders.
-		float borderThickness = 1.0;
-		[[UIColor colorWithWhite:0.7 alpha:1.0] set];
-		CGRect borderRect = bounds;
-		if (splitViewController.vertical) {
-			borderRect.size.width = borderThickness;
-			UIRectFill(borderRect);
-			borderRect.origin.x = CGRectGetMaxX(bounds) - borderThickness;
-			UIRectFill(borderRect);
-			
-		} else {
-			borderRect.size.height = borderThickness;
-			UIRectFill(borderRect);
-			borderRect.origin.y = CGRectGetMaxY(bounds) - borderThickness;
-			UIRectFill(borderRect);
-		}
-		
-		// Draw grip.
-		[self drawGripThumbInRect:bounds];
-	}
+    if (splitViewController.dividerStyle == MGSplitViewDividerStyleThin) {
+        [super drawRect:rect];
+
+    } else if (splitViewController.dividerStyle == MGSplitViewDividerStylePaneSplitter) {
+        // Draw gradient background.
+        CGRect bounds = self.bounds;
+        CGColorSpaceRef rgb = CGColorSpaceCreateDeviceRGB();
+        CGFloat locations[2] = {0, 1};
+        CGFloat components[8] = {   0.988, 0.988, 0.988, 1.0,  // light
+                                    0.875, 0.875, 0.875, 1.0 };// dark
+        CGGradientRef gradient = CGGradientCreateWithColorComponents (rgb, components, locations, 2);
+        CGContextRef context = UIGraphicsGetCurrentContext();
+        CGPoint start, end;
+        if (splitViewController.vertical) {
+            // Light left to dark right.
+            start = CGPointMake(CGRectGetMinX(bounds), CGRectGetMidY(bounds));
+            end = CGPointMake(CGRectGetMaxX(bounds), CGRectGetMidY(bounds));
+        } else {
+            // Light top to dark bottom.
+            start = CGPointMake(CGRectGetMidX(bounds), CGRectGetMinY(bounds));
+            end = CGPointMake(CGRectGetMidX(bounds), CGRectGetMaxY(bounds));
+        }
+        CGContextDrawLinearGradient(context, gradient, start, end, 0);
+        CGColorSpaceRelease(rgb);
+        CGGradientRelease(gradient);
+
+        // Draw borders.
+        float borderThickness = 1.0;
+        [[UIColor colorWithWhite:0.7 alpha:1.0] set];
+        CGRect borderRect = bounds;
+        if (splitViewController.vertical) {
+            borderRect.size.width = borderThickness;
+            UIRectFill(borderRect);
+            borderRect.origin.x = CGRectGetMaxX(bounds) - borderThickness;
+            UIRectFill(borderRect);
+
+        } else {
+            borderRect.size.height = borderThickness;
+            UIRectFill(borderRect);
+            borderRect.origin.y = CGRectGetMaxY(bounds) - borderThickness;
+            UIRectFill(borderRect);
+        }
+
+        // Draw grip.
+        [self drawGripThumbInRect:bounds];
+    }
 }
 
 
 - (void)drawGripThumbInRect:(CGRect)rect
 {
-	float width = 9.0;
-	float height;
-	if (splitViewController.vertical) {
-		height = 30.0;
-	} else {
-		height = width;
-		width = 30.0;
-	}
-	
-	// Draw grip in centred in rect.
-	CGRect gripRect = CGRectMake(0, 0, width, height);
-	gripRect.origin.x = ((rect.size.width - gripRect.size.width) / 2.0);
-	gripRect.origin.y = ((rect.size.height - gripRect.size.height) / 2.0);
-	
-	float stripThickness = 1.0;
-	UIColor *stripColor = [UIColor colorWithWhite:0.35 alpha:1.0];
-	UIColor *lightColor = [UIColor colorWithWhite:1.0 alpha:1.0];
-	float space = 3.0;
-	if (splitViewController.vertical) {
-		gripRect.size.width = stripThickness;
-		[stripColor set];
-		UIRectFill(gripRect);
-		
-		gripRect.origin.x += stripThickness;
-		gripRect.origin.y += 1;
-		[lightColor set];
-		UIRectFill(gripRect);
-		gripRect.origin.x -= stripThickness;
-		gripRect.origin.y -= 1;
-		
-		gripRect.origin.x += space + stripThickness;
-		[stripColor set];
-		UIRectFill(gripRect);
-		
-		gripRect.origin.x += stripThickness;
-		gripRect.origin.y += 1;
-		[lightColor set];
-		UIRectFill(gripRect);
-		gripRect.origin.x -= stripThickness;
-		gripRect.origin.y -= 1;
-		
-		gripRect.origin.x += space + stripThickness;
-		[stripColor set];
-		UIRectFill(gripRect);
-		
-		gripRect.origin.x += stripThickness;
-		gripRect.origin.y += 1;
-		[lightColor set];
-		UIRectFill(gripRect);
-		
-	} else {
-		gripRect.size.height = stripThickness;
-		[stripColor set];
-		UIRectFill(gripRect);
-		
-		gripRect.origin.y += stripThickness;
-		gripRect.origin.x -= 1;
-		[lightColor set];
-		UIRectFill(gripRect);
-		gripRect.origin.y -= stripThickness;
-		gripRect.origin.x += 1;
-		
-		gripRect.origin.y += space + stripThickness;
-		[stripColor set];
-		UIRectFill(gripRect);
-		
-		gripRect.origin.y += stripThickness;
-		gripRect.origin.x -= 1;
-		[lightColor set];
-		UIRectFill(gripRect);
-		gripRect.origin.y -= stripThickness;
-		gripRect.origin.x += 1;
-		
-		gripRect.origin.y += space + stripThickness;
-		[stripColor set];
-		UIRectFill(gripRect);
-		
-		gripRect.origin.y += stripThickness;
-		gripRect.origin.x -= 1;
-		[lightColor set];
-		UIRectFill(gripRect);
-	}
+    float width = 9.0;
+    float height;
+    if (splitViewController.vertical) {
+        height = 30.0;
+    } else {
+        height = width;
+        width = 30.0;
+    }
+
+    // Draw grip in centred in rect.
+    CGRect gripRect = CGRectMake(0, 0, width, height);
+    gripRect.origin.x = ((rect.size.width - gripRect.size.width) / 2.0);
+    gripRect.origin.y = ((rect.size.height - gripRect.size.height) / 2.0);
+
+    float stripThickness = 1.0;
+    UIColor *stripColor = [UIColor colorWithWhite:0.35 alpha:1.0];
+    UIColor *lightColor = [UIColor colorWithWhite:1.0 alpha:1.0];
+    float space = 3.0;
+    if (splitViewController.vertical) {
+        gripRect.size.width = stripThickness;
+        [stripColor set];
+        UIRectFill(gripRect);
+
+        gripRect.origin.x += stripThickness;
+        gripRect.origin.y += 1;
+        [lightColor set];
+        UIRectFill(gripRect);
+        gripRect.origin.x -= stripThickness;
+        gripRect.origin.y -= 1;
+
+        gripRect.origin.x += space + stripThickness;
+        [stripColor set];
+        UIRectFill(gripRect);
+
+        gripRect.origin.x += stripThickness;
+        gripRect.origin.y += 1;
+        [lightColor set];
+        UIRectFill(gripRect);
+        gripRect.origin.x -= stripThickness;
+        gripRect.origin.y -= 1;
+
+        gripRect.origin.x += space + stripThickness;
+        [stripColor set];
+        UIRectFill(gripRect);
+
+        gripRect.origin.x += stripThickness;
+        gripRect.origin.y += 1;
+        [lightColor set];
+        UIRectFill(gripRect);
+
+    } else {
+        gripRect.size.height = stripThickness;
+        [stripColor set];
+        UIRectFill(gripRect);
+
+        gripRect.origin.y += stripThickness;
+        gripRect.origin.x -= 1;
+        [lightColor set];
+        UIRectFill(gripRect);
+        gripRect.origin.y -= stripThickness;
+        gripRect.origin.x += 1;
+
+        gripRect.origin.y += space + stripThickness;
+        [stripColor set];
+        UIRectFill(gripRect);
+
+        gripRect.origin.y += stripThickness;
+        gripRect.origin.x -= 1;
+        [lightColor set];
+        UIRectFill(gripRect);
+        gripRect.origin.y -= stripThickness;
+        gripRect.origin.x += 1;
+
+        gripRect.origin.y += space + stripThickness;
+        [stripColor set];
+        UIRectFill(gripRect);
+
+        gripRect.origin.y += stripThickness;
+        gripRect.origin.x -= 1;
+        [lightColor set];
+        UIRectFill(gripRect);
+    }
 }
 
 
@@ -183,16 +183,16 @@
 
 - (void)touchesMoved:(NSSet *)touches withEvent:(UIEvent *)event
 {
-	UITouch *touch = [touches anyObject];
-	if (touch) {
-		CGPoint lastPt = [touch previousLocationInView:self];
-		CGPoint pt = [touch locationInView:self];
-		float offset = (splitViewController.vertical) ? pt.x - lastPt.x : pt.y - lastPt.y;
-		if (!splitViewController.masterBeforeDetail) {
-			offset = -offset;
-		}
-		splitViewController.splitPosition = splitViewController.splitPosition + offset;
-	}
+    UITouch *touch = [touches anyObject];
+    if (touch) {
+        CGPoint lastPt = [touch previousLocationInView:self];
+        CGPoint pt = [touch locationInView:self];
+        float offset = (splitViewController.vertical) ? pt.x - lastPt.x : pt.y - lastPt.y;
+        if (!splitViewController.masterBeforeDetail) {
+            offset = -offset;
+        }
+        splitViewController.splitPosition = splitViewController.splitPosition + offset;
+    }
 }
 
 
@@ -202,10 +202,10 @@
 
 - (void)setAllowsDragging:(BOOL)flag
 {
-	if (flag != allowsDragging) {
-		allowsDragging = flag;
-		self.userInteractionEnabled = allowsDragging;
-	}
+    if (flag != allowsDragging) {
+        allowsDragging = flag;
+        self.userInteractionEnabled = allowsDragging;
+    }
 }
 
 
--- a/project_files/HedgewarsMobile/Classes/MGSplitViewController/MGSplitViewController.h	Fri Jan 25 13:29:20 2013 +0400
+++ b/project_files/HedgewarsMobile/Classes/MGSplitViewController/MGSplitViewController.h	Tue Jan 29 10:10:23 2013 +0400
@@ -9,28 +9,28 @@
 #import <UIKit/UIKit.h>
 
 typedef enum _MGSplitViewDividerStyle {
-	// These names have been chosen to be conceptually similar to those of NSSplitView on Mac OS X.
-	MGSplitViewDividerStyleThin			= 0, // Thin divider, like UISplitViewController (default).
-	MGSplitViewDividerStylePaneSplitter	= 1  // Thick divider, drawn with a grey gradient and a grab-strip.
+    // These names have been chosen to be conceptually similar to those of NSSplitView on Mac OS X.
+    MGSplitViewDividerStyleThin         = 0, // Thin divider, like UISplitViewController (default).
+    MGSplitViewDividerStylePaneSplitter = 1  // Thick divider, drawn with a grey gradient and a grab-strip.
 } MGSplitViewDividerStyle;
 
 @class MGSplitDividerView;
 @protocol MGSplitViewControllerDelegate;
 @interface MGSplitViewController : UIViewController <UIPopoverControllerDelegate> {
-	BOOL _showsMasterInPortrait;
-	BOOL _showsMasterInLandscape;
-	float _splitWidth;
-	id _delegate;
-	BOOL _vertical;
-	BOOL _masterBeforeDetail;
-	NSMutableArray *_viewControllers;
-	UIBarButtonItem *_barButtonItem; // To be compliant with wacky UISplitViewController behaviour.
+    BOOL _showsMasterInPortrait;
+    BOOL _showsMasterInLandscape;
+    float _splitWidth;
+    id _delegate;
+    BOOL _vertical;
+    BOOL _masterBeforeDetail;
+    NSMutableArray *_viewControllers;
+    UIBarButtonItem *_barButtonItem; // To be compliant with wacky UISplitViewController behaviour.
     UIPopoverController *_hiddenPopoverController; // Popover used to hold the master view if it's not always visible.
-	MGSplitDividerView *_dividerView; // View that draws the divider between the master and detail views.
-	NSArray *_cornerViews; // Views to draw the inner rounded corners between master and detail views.
-	float _splitPosition;
-	BOOL _reconfigurePopup;
-	MGSplitViewDividerStyle _dividerStyle; // Meta-setting which configures several aspects of appearance and behaviour.
+    MGSplitDividerView *_dividerView; // View that draws the divider between the master and detail views.
+    NSArray *_cornerViews; // Views to draw the inner rounded corners between master and detail views.
+    float _splitPosition;
+    BOOL _reconfigurePopup;
+    MGSplitViewDividerStyle _dividerStyle; // Meta-setting which configures several aspects of appearance and behaviour.
 }
 
 @property (nonatomic, assign) IBOutlet id <MGSplitViewControllerDelegate> delegate;
@@ -60,14 +60,14 @@
 // Conveniences for you, because I care.
 - (BOOL)isShowingMaster;
 - (void)setSplitPosition:(float)posn animated:(BOOL)animate; // Allows for animation of splitPosition changes. The property's regular setter is not animated.
-/* Note:	splitPosition is the width (in a left/right split, or height in a top/bottom split) of the master view.
-			It is relative to the appropriate side of the splitView, which can be any of the four sides depending on the values in isMasterBeforeDetail and isVertical:
-				isVertical = YES, isMasterBeforeDetail = YES: splitPosition is relative to the LEFT edge. (Default)
-				isVertical = YES, isMasterBeforeDetail = NO: splitPosition is relative to the RIGHT edge.
- 				isVertical = NO, isMasterBeforeDetail = YES: splitPosition is relative to the TOP edge.
- 				isVertical = NO, isMasterBeforeDetail = NO: splitPosition is relative to the BOTTOM edge.
+/* Note:    splitPosition is the width (in a left/right split, or height in a top/bottom split) of the master view.
+            It is relative to the appropriate side of the splitView, which can be any of the four sides depending on the values in isMasterBeforeDetail and isVertical:
+                isVertical = YES, isMasterBeforeDetail = YES: splitPosition is relative to the LEFT edge. (Default)
+                isVertical = YES, isMasterBeforeDetail = NO: splitPosition is relative to the RIGHT edge.
+                isVertical = NO, isMasterBeforeDetail = YES: splitPosition is relative to the TOP edge.
+                isVertical = NO, isMasterBeforeDetail = NO: splitPosition is relative to the BOTTOM edge.
 
-			This implementation was chosen so you don't need to recalculate equivalent splitPositions if the user toggles masterBeforeDetail themselves.
+            This implementation was chosen so you don't need to recalculate equivalent splitPositions if the user toggles masterBeforeDetail themselves.
  */
 - (void)setDividerStyle:(MGSplitViewDividerStyle)newStyle animated:(BOOL)animate; // Allows for animation of dividerStyle changes. The property's regular setter is not animated.
 - (NSArray *)cornerViews;
@@ -76,8 +76,8 @@
  The first view is the "leading" corners (top edge of screen for left/right split, left edge of screen for top/bottom split).
  The second view is the "trailing" corners (bottom edge of screen for left/right split, right edge of screen for top/bottom split).
  Do NOT modify them, except to:
-	1. Change their .cornerBackgroundColor
-	2. Change their .cornerRadius
+    1. Change their .cornerBackgroundColor
+    2. Change their .cornerRadius
  */
 
 @end
@@ -88,19 +88,19 @@
 @optional
 
 // Called when a button should be added to a toolbar for a hidden view controller.
-- (void)splitViewController:(MGSplitViewController*)svc 
-	 willHideViewController:(UIViewController *)aViewController 
-		  withBarButtonItem:(UIBarButtonItem*)barButtonItem 
-	   forPopoverController: (UIPopoverController*)pc;
+- (void)splitViewController:(MGSplitViewController*)svc
+     willHideViewController:(UIViewController *)aViewController
+          withBarButtonItem:(UIBarButtonItem*)barButtonItem
+       forPopoverController: (UIPopoverController*)pc;
 
 // Called when the master view is shown again in the split view, invalidating the button and popover controller.
-- (void)splitViewController:(MGSplitViewController*)svc 
-	 willShowViewController:(UIViewController *)aViewController 
+- (void)splitViewController:(MGSplitViewController*)svc
+     willShowViewController:(UIViewController *)aViewController
   invalidatingBarButtonItem:(UIBarButtonItem *)barButtonItem;
 
 // Called when the master view is shown in a popover, so the delegate can take action like hiding other popovers.
-- (void)splitViewController:(MGSplitViewController*)svc 
-		  popoverController:(UIPopoverController*)pc 
+- (void)splitViewController:(MGSplitViewController*)svc
+          popoverController:(UIPopoverController*)pc
   willPresentViewController:(UIViewController *)aViewController;
 
 // Called when the split orientation will change (from vertical to horizontal, or vice versa).
--- a/project_files/HedgewarsMobile/Classes/MGSplitViewController/MGSplitViewController.m	Fri Jan 25 13:29:20 2013 +0400
+++ b/project_files/HedgewarsMobile/Classes/MGSplitViewController/MGSplitViewController.m	Tue Jan 29 10:10:23 2013 +0400
@@ -10,18 +10,18 @@
 #import "MGSplitDividerView.h"
 #import "MGSplitCornersView.h"
 
-#define MG_DEFAULT_SPLIT_POSITION		320.0	// default width of master view in UISplitViewController.
-#define MG_DEFAULT_SPLIT_WIDTH			1.0		// default width of split-gutter in UISplitViewController.
-#define MG_DEFAULT_CORNER_RADIUS		5.0		// default corner-radius of overlapping split-inner corners on the master and detail views.
-#define MG_DEFAULT_CORNER_COLOR			[UIColor blackColor]	// default color of intruding inner corners (and divider background).
+#define MG_DEFAULT_SPLIT_POSITION       320.0   // default width of master view in UISplitViewController.
+#define MG_DEFAULT_SPLIT_WIDTH          1.0     // default width of split-gutter in UISplitViewController.
+#define MG_DEFAULT_CORNER_RADIUS        5.0     // default corner-radius of overlapping split-inner corners on the master and detail views.
+#define MG_DEFAULT_CORNER_COLOR         [UIColor blackColor]    // default color of intruding inner corners (and divider background).
 
-#define MG_PANESPLITTER_CORNER_RADIUS	0.0		// corner-radius of split-inner corners for MGSplitViewDividerStylePaneSplitter style.
-#define MG_PANESPLITTER_SPLIT_WIDTH		25.0	// width of split-gutter for MGSplitViewDividerStylePaneSplitter style.
+#define MG_PANESPLITTER_CORNER_RADIUS   0.0     // corner-radius of split-inner corners for MGSplitViewDividerStylePaneSplitter style.
+#define MG_PANESPLITTER_SPLIT_WIDTH     25.0    // width of split-gutter for MGSplitViewDividerStylePaneSplitter style.
 
-#define MG_MIN_VIEW_WIDTH				200.0	// minimum width a view is allowed to become as a result of changing the splitPosition.
+#define MG_MIN_VIEW_WIDTH               200.0   // minimum width a view is allowed to become as a result of changing the splitPosition.
 
-#define MG_ANIMATION_CHANGE_SPLIT_ORIENTATION	@"ChangeSplitOrientation"	// Animation ID for internal use.
-#define MG_ANIMATION_CHANGE_SUBVIEWS_ORDER		@"ChangeSubviewsOrder"	// Animation ID for internal use.
+#define MG_ANIMATION_CHANGE_SPLIT_ORIENTATION   @"ChangeSplitOrientation"   // Animation ID for internal use.
+#define MG_ANIMATION_CHANGE_SUBVIEWS_ORDER      @"ChangeSubviewsOrder"  // Animation ID for internal use.
 
 
 @interface MGSplitViewController (MGPrivateMethods)
@@ -48,50 +48,50 @@
 
 - (NSString *)nameOfInterfaceOrientation:(UIInterfaceOrientation)theOrientation
 {
-	NSString *orientationName = nil;
-	switch (theOrientation) {
-		case UIInterfaceOrientationPortrait:
-			orientationName = @"Portrait"; // Home button at bottom
-			break;
-		case UIInterfaceOrientationPortraitUpsideDown:
-			orientationName = @"Portrait (Upside Down)"; // Home button at top
-			break;
-		case UIInterfaceOrientationLandscapeLeft:
-			orientationName = @"Landscape (Left)"; // Home button on left
-			break;
-		case UIInterfaceOrientationLandscapeRight:
-			orientationName = @"Landscape (Right)"; // Home button on right
-			break;
-		default:
-			break;
-	}
-	
-	return orientationName;
+    NSString *orientationName = nil;
+    switch (theOrientation) {
+        case UIInterfaceOrientationPortrait:
+            orientationName = @"Portrait"; // Home button at bottom
+            break;
+        case UIInterfaceOrientationPortraitUpsideDown:
+            orientationName = @"Portrait (Upside Down)"; // Home button at top
+            break;
+        case UIInterfaceOrientationLandscapeLeft:
+            orientationName = @"Landscape (Left)"; // Home button on left
+            break;
+        case UIInterfaceOrientationLandscapeRight:
+            orientationName = @"Landscape (Right)"; // Home button on right
+            break;
+        default:
+            break;
+    }
+
+    return orientationName;
 }
 
 
 - (BOOL)isLandscape
 {
-	return UIInterfaceOrientationIsLandscape(self.interfaceOrientation);
+    return UIInterfaceOrientationIsLandscape(self.interfaceOrientation);
 }
 
 
 - (BOOL)shouldShowMasterForInterfaceOrientation:(UIInterfaceOrientation)theOrientation
 {
-	// Returns YES if master view should be shown directly embedded in the splitview, instead of hidden in a popover.
-	return ((UIInterfaceOrientationIsLandscape(theOrientation)) ? _showsMasterInLandscape : _showsMasterInPortrait);
+    // Returns YES if master view should be shown directly embedded in the splitview, instead of hidden in a popover.
+    return ((UIInterfaceOrientationIsLandscape(theOrientation)) ? _showsMasterInLandscape : _showsMasterInPortrait);
 }
 
 
 - (BOOL)shouldShowMaster
 {
-	return [self shouldShowMasterForInterfaceOrientation:self.interfaceOrientation];
+    return [self shouldShowMasterForInterfaceOrientation:self.interfaceOrientation];
 }
 
 
 - (BOOL)isShowingMaster
 {
-	return [self shouldShowMaster] && self.masterViewController && self.masterViewController.view && ([self.masterViewController.view superview] == self.view);
+    return [self shouldShowMaster] && self.masterViewController && self.masterViewController.view && ([self.masterViewController.view superview] == self.view);
 }
 
 
@@ -101,61 +101,61 @@
 
 - (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil
 {
-	if ((self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil])) {
-		[self setup];
-	}
-	
-	return self;
+    if ((self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil])) {
+        [self setup];
+    }
+
+    return self;
 }
 
 
 - (id)initWithCoder:(NSCoder *)aDecoder
 {
-	if ((self = [super initWithCoder:aDecoder])) {
-		[self setup];
-	}
-	
-	return self;
+    if ((self = [super initWithCoder:aDecoder])) {
+        [self setup];
+    }
+
+    return self;
 }
 
 
 - (void)setup
 {
-	// Configure default behaviour.
-	_viewControllers = [[NSMutableArray alloc] initWithObjects:[NSNull null], [NSNull null], nil];
-	_splitWidth = MG_DEFAULT_SPLIT_WIDTH;
-	_showsMasterInPortrait = NO;
-	_showsMasterInLandscape = YES;
-	_reconfigurePopup = NO;
-	_vertical = YES;
-	_masterBeforeDetail = YES;
-	_splitPosition = MG_DEFAULT_SPLIT_POSITION;
-	CGRect divRect = self.view.bounds;
-	if ([self isVertical]) {
-		divRect.origin.y = _splitPosition;
-		divRect.size.height = _splitWidth;
-	} else {
-		divRect.origin.x = _splitPosition;
-		divRect.size.width = _splitWidth;
-	}
-	_dividerView = [[MGSplitDividerView alloc] initWithFrame:divRect];
-	_dividerView.splitViewController = self;
-	_dividerView.backgroundColor = MG_DEFAULT_CORNER_COLOR;
-	_dividerStyle = MGSplitViewDividerStyleThin;
+    // Configure default behaviour.
+    _viewControllers = [[NSMutableArray alloc] initWithObjects:[NSNull null], [NSNull null], nil];
+    _splitWidth = MG_DEFAULT_SPLIT_WIDTH;
+    _showsMasterInPortrait = NO;
+    _showsMasterInLandscape = YES;
+    _reconfigurePopup = NO;
+    _vertical = YES;
+    _masterBeforeDetail = YES;
+    _splitPosition = MG_DEFAULT_SPLIT_POSITION;
+    CGRect divRect = self.view.bounds;
+    if ([self isVertical]) {
+        divRect.origin.y = _splitPosition;
+        divRect.size.height = _splitWidth;
+    } else {
+        divRect.origin.x = _splitPosition;
+        divRect.size.width = _splitWidth;
+    }
+    _dividerView = [[MGSplitDividerView alloc] initWithFrame:divRect];
+    _dividerView.splitViewController = self;
+    _dividerView.backgroundColor = MG_DEFAULT_CORNER_COLOR;
+    _dividerStyle = MGSplitViewDividerStyleThin;
 }
 
 
 - (void)dealloc
 {
-	_delegate = nil;
-	[self.view.subviews makeObjectsPerformSelector:@selector(removeFromSuperview)];
-	[_viewControllers release];
-	[_barButtonItem release];
-	[_hiddenPopoverController release];
-	[_dividerView release];
-	[_cornerViews release];
-	
-	[super dealloc];
+    _delegate = nil;
+    [self.view.subviews makeObjectsPerformSelector:@selector(removeFromSuperview)];
+    [_viewControllers release];
+    [_barButtonItem release];
+    [_hiddenPopoverController release];
+    [_dividerView release];
+    [_cornerViews release];
+
+    [super dealloc];
 }
 
 
@@ -171,371 +171,371 @@
 
 - (void)willRotateToInterfaceOrientation:(UIInterfaceOrientation)toInterfaceOrientation duration:(NSTimeInterval)duration
 {
-	[self.masterViewController willRotateToInterfaceOrientation:toInterfaceOrientation duration:duration];
-	[self.detailViewController willRotateToInterfaceOrientation:toInterfaceOrientation duration:duration];
+    [self.masterViewController willRotateToInterfaceOrientation:toInterfaceOrientation duration:duration];
+    [self.detailViewController willRotateToInterfaceOrientation:toInterfaceOrientation duration:duration];
 }
 
 
 - (void)didRotateFromInterfaceOrientation:(UIInterfaceOrientation)fromInterfaceOrientation
 {
-	[self.masterViewController didRotateFromInterfaceOrientation:fromInterfaceOrientation];
-	[self.detailViewController didRotateFromInterfaceOrientation:fromInterfaceOrientation];
+    [self.masterViewController didRotateFromInterfaceOrientation:fromInterfaceOrientation];
+    [self.detailViewController didRotateFromInterfaceOrientation:fromInterfaceOrientation];
 }
 
 
-- (void)willAnimateRotationToInterfaceOrientation:(UIInterfaceOrientation)toInterfaceOrientation 
-										 duration:(NSTimeInterval)duration
+- (void)willAnimateRotationToInterfaceOrientation:(UIInterfaceOrientation)toInterfaceOrientation
+                                         duration:(NSTimeInterval)duration
 {
-	[self.masterViewController willAnimateRotationToInterfaceOrientation:toInterfaceOrientation duration:duration];
-	[self.detailViewController willAnimateRotationToInterfaceOrientation:toInterfaceOrientation duration:duration];
-	
-	// Hide popover.
-	if (_hiddenPopoverController && _hiddenPopoverController.popoverVisible) {
-		[_hiddenPopoverController dismissPopoverAnimated:NO];
-	}
-	
-	// Re-tile views.
-	_reconfigurePopup = YES;
-	[self layoutSubviewsForInterfaceOrientation:toInterfaceOrientation withAnimation:YES];
+    [self.masterViewController willAnimateRotationToInterfaceOrientation:toInterfaceOrientation duration:duration];
+    [self.detailViewController willAnimateRotationToInterfaceOrientation:toInterfaceOrientation duration:duration];
+
+    // Hide popover.
+    if (_hiddenPopoverController && _hiddenPopoverController.popoverVisible) {
+        [_hiddenPopoverController dismissPopoverAnimated:NO];
+    }
+
+    // Re-tile views.
+    _reconfigurePopup = YES;
+    [self layoutSubviewsForInterfaceOrientation:toInterfaceOrientation withAnimation:YES];
 }
 
 
 - (void)willAnimateFirstHalfOfRotationToInterfaceOrientation:(UIInterfaceOrientation)toInterfaceOrientation duration:(NSTimeInterval)duration
 {
-	[self.masterViewController willAnimateFirstHalfOfRotationToInterfaceOrientation:toInterfaceOrientation duration:duration];
-	[self.detailViewController willAnimateFirstHalfOfRotationToInterfaceOrientation:toInterfaceOrientation duration:duration];
+    [self.masterViewController willAnimateFirstHalfOfRotationToInterfaceOrientation:toInterfaceOrientation duration:duration];
+    [self.detailViewController willAnimateFirstHalfOfRotationToInterfaceOrientation:toInterfaceOrientation duration:duration];
 }
 
 
 - (void)didAnimateFirstHalfOfRotationToInterfaceOrientation:(UIInterfaceOrientation)toInterfaceOrientation
 {
-	[self.masterViewController didAnimateFirstHalfOfRotationToInterfaceOrientation:toInterfaceOrientation];
-	[self.detailViewController didAnimateFirstHalfOfRotationToInterfaceOrientation:toInterfaceOrientation];
+    [self.masterViewController didAnimateFirstHalfOfRotationToInterfaceOrientation:toInterfaceOrientation];
+    [self.detailViewController didAnimateFirstHalfOfRotationToInterfaceOrientation:toInterfaceOrientation];
 }
 
 
 - (void)willAnimateSecondHalfOfRotationFromInterfaceOrientation:(UIInterfaceOrientation)fromInterfaceOrientation duration:(NSTimeInterval)duration
 {
-	[self.masterViewController willAnimateSecondHalfOfRotationFromInterfaceOrientation:fromInterfaceOrientation duration:duration];
-	[self.detailViewController willAnimateSecondHalfOfRotationFromInterfaceOrientation:fromInterfaceOrientation duration:duration];
+    [self.masterViewController willAnimateSecondHalfOfRotationFromInterfaceOrientation:fromInterfaceOrientation duration:duration];
+    [self.detailViewController willAnimateSecondHalfOfRotationFromInterfaceOrientation:fromInterfaceOrientation duration:duration];
 }
 
 
 - (CGSize)splitViewSizeForOrientation:(UIInterfaceOrientation)theOrientation
 {
-	UIScreen *screen = [UIScreen mainScreen];
-	CGRect fullScreenRect = screen.bounds; // always implicitly in Portrait orientation.
-	CGRect appFrame = screen.applicationFrame;
-	
-	// Find status bar height by checking which dimension of the applicationFrame is narrower than screen bounds.
-	// Little bit ugly looking, but it'll still work even if they change the status bar height in future.
-	float statusBarHeight = MAX((fullScreenRect.size.width - appFrame.size.width), (fullScreenRect.size.height - appFrame.size.height));
-	
-	// Initially assume portrait orientation.
-	float width = fullScreenRect.size.width;
-	float height = fullScreenRect.size.height;
-	
-	// Correct for orientation.
-	if (UIInterfaceOrientationIsLandscape(theOrientation)) {
-		width = height;
-		height = fullScreenRect.size.width;
-	}
-	
-	// Account for status bar, which always subtracts from the height (since it's always at the top of the screen).
-	height -= statusBarHeight;
-	
-	return CGSizeMake(width, height);
+    UIScreen *screen = [UIScreen mainScreen];
+    CGRect fullScreenRect = screen.bounds; // always implicitly in Portrait orientation.
+    CGRect appFrame = screen.applicationFrame;
+
+    // Find status bar height by checking which dimension of the applicationFrame is narrower than screen bounds.
+    // Little bit ugly looking, but it'll still work even if they change the status bar height in future.
+    float statusBarHeight = MAX((fullScreenRect.size.width - appFrame.size.width), (fullScreenRect.size.height - appFrame.size.height));
+
+    // Initially assume portrait orientation.
+    float width = fullScreenRect.size.width;
+    float height = fullScreenRect.size.height;
+
+    // Correct for orientation.
+    if (UIInterfaceOrientationIsLandscape(theOrientation)) {
+        width = height;
+        height = fullScreenRect.size.width;
+    }
+
+    // Account for status bar, which always subtracts from the height (since it's always at the top of the screen).
+    height -= statusBarHeight;
+
+    return CGSizeMake(width, height);
 }
 
 
 - (void)layoutSubviewsForInterfaceOrientation:(UIInterfaceOrientation)theOrientation withAnimation:(BOOL)animate
 {
-	if (_reconfigurePopup) {
-		[self reconfigureForMasterInPopover:![self shouldShowMasterForInterfaceOrientation:theOrientation]];
-	}
-	
-	// Layout the master, detail and divider views appropriately, adding/removing subviews as needed.
-	// First obtain relevant geometry.
-	CGSize fullSize = [self splitViewSizeForOrientation:theOrientation];
-	float width = fullSize.width;
-	float height = fullSize.height;
-	
-	if (NO) { // Just for debugging.
-		NSLog(@"Target orientation is %@, dimensions will be %.0f x %.0f", 
-			  [self nameOfInterfaceOrientation:theOrientation], width, height);
-	}
-	
-	// Layout the master, divider and detail views.
-	CGRect newFrame = CGRectMake(0, 0, width, height);
-	UIViewController *controller;
-	UIView *theView;
-	BOOL shouldShowMaster = [self shouldShowMasterForInterfaceOrientation:theOrientation];
-	BOOL masterFirst = [self isMasterBeforeDetail];
-	if ([self isVertical]) {
-		// Master on left, detail on right (or vice versa).
-		CGRect masterRect, dividerRect, detailRect;
-		if (masterFirst) {
-			if (!shouldShowMaster) {
-				// Move off-screen.
-				newFrame.origin.x -= (_splitPosition + _splitWidth);
-			}
-			
-			newFrame.size.width = _splitPosition;
-			masterRect = newFrame;
-			
-			newFrame.origin.x += newFrame.size.width;
-			newFrame.size.width = _splitWidth;
-			dividerRect = newFrame;
-			
-			newFrame.origin.x += newFrame.size.width;
-			newFrame.size.width = width - newFrame.origin.x;
-			detailRect = newFrame;
-			
-		} else {
-			if (!shouldShowMaster) {
-				// Move off-screen.
-				newFrame.size.width += (_splitPosition + _splitWidth);
-			}
-			
-			newFrame.size.width -= (_splitPosition + _splitWidth);
-			detailRect = newFrame;
-			
-			newFrame.origin.x += newFrame.size.width;
-			newFrame.size.width = _splitWidth;
-			dividerRect = newFrame;
-			
-			newFrame.origin.x += newFrame.size.width;
-			newFrame.size.width = _splitPosition;
-			masterRect = newFrame;
-		}
-		
-		// Position master.
-		controller = self.masterViewController;
-		if (controller && [controller isKindOfClass:[UIViewController class]])  {
-			theView = controller.view;
-			if (theView) {
-				theView.frame = masterRect;
-				if (!theView.superview) {
-					[controller viewWillAppear:NO];
-					[self.view addSubview:theView];
-					[controller viewDidAppear:NO];
-				}
-			}
-		}
-		
-		// Position divider.
-		theView = _dividerView;
-		theView.frame = dividerRect;
-		if (!theView.superview) {
-			[self.view addSubview:theView];
-		}
-		
-		// Position detail.
-		controller = self.detailViewController;
-		if (controller && [controller isKindOfClass:[UIViewController class]])  {
-			theView = controller.view;
-			if (theView) {
-				theView.frame = detailRect;
-				if (!theView.superview) {
-					[self.view insertSubview:theView aboveSubview:self.masterViewController.view];
-				} else {
-					[self.view bringSubviewToFront:theView];
-				}
-			}
-		}
-		
-	} else {
-		// Master above, detail below (or vice versa).
-		CGRect masterRect, dividerRect, detailRect;
-		if (masterFirst) {
-			if (!shouldShowMaster) {
-				// Move off-screen.
-				newFrame.origin.y -= (_splitPosition + _splitWidth);
-			}
-			
-			newFrame.size.height = _splitPosition;
-			masterRect = newFrame;
-			
-			newFrame.origin.y += newFrame.size.height;
-			newFrame.size.height = _splitWidth;
-			dividerRect = newFrame;
-			
-			newFrame.origin.y += newFrame.size.height;
-			newFrame.size.height = height - newFrame.origin.y;
-			detailRect = newFrame;
-			
-		} else {
-			if (!shouldShowMaster) {
-				// Move off-screen.
-				newFrame.size.height += (_splitPosition + _splitWidth);
-			}
-			
-			newFrame.size.height -= (_splitPosition + _splitWidth);
-			detailRect = newFrame;
-			
-			newFrame.origin.y += newFrame.size.height;
-			newFrame.size.height = _splitWidth;
-			dividerRect = newFrame;
-			
-			newFrame.origin.y += newFrame.size.height;
-			newFrame.size.height = _splitPosition;
-			masterRect = newFrame;
-		}
-		
-		// Position master.
-		controller = self.masterViewController;
-		if (controller && [controller isKindOfClass:[UIViewController class]])  {
-			theView = controller.view;
-			if (theView) {
-				theView.frame = masterRect;
-				if (!theView.superview) {
-					[controller viewWillAppear:NO];
-					[self.view addSubview:theView];
-					[controller viewDidAppear:NO];
-				}
-			}
-		}
-		
-		// Position divider.
-		theView = _dividerView;
-		theView.frame = dividerRect;
-		if (!theView.superview) {
-			[self.view addSubview:theView];
-		}
-		
-		// Position detail.
-		controller = self.detailViewController;
-		if (controller && [controller isKindOfClass:[UIViewController class]])  {
-			theView = controller.view;
-			if (theView) {
-				theView.frame = detailRect;
-				if (!theView.superview) {
-					[self.view insertSubview:theView aboveSubview:self.masterViewController.view];
-				} else {
-					[self.view bringSubviewToFront:theView];
-				}
-			}
-		}
-	}
-	
-	// Create corner views if necessary.
-	MGSplitCornersView *leadingCorners; // top/left of screen in vertical/horizontal split.
-	MGSplitCornersView *trailingCorners; // bottom/right of screen in vertical/horizontal split.
-	if (!_cornerViews) {
-		CGRect cornerRect = CGRectMake(0, 0, 10, 10); // arbitrary, will be resized below.
-		leadingCorners = [[MGSplitCornersView alloc] initWithFrame:cornerRect];
-		leadingCorners.splitViewController = self;
-		leadingCorners.cornerBackgroundColor = MG_DEFAULT_CORNER_COLOR;
-		leadingCorners.cornerRadius = MG_DEFAULT_CORNER_RADIUS;
-		trailingCorners = [[MGSplitCornersView alloc] initWithFrame:cornerRect];
-		trailingCorners.splitViewController = self;
-		trailingCorners.cornerBackgroundColor = MG_DEFAULT_CORNER_COLOR;
-		trailingCorners.cornerRadius = MG_DEFAULT_CORNER_RADIUS;
-		_cornerViews = [[NSArray alloc] initWithObjects:leadingCorners, trailingCorners, nil];
-		[leadingCorners release];
-		[trailingCorners release];
-		
-	} else if ([_cornerViews count] == 2) {
-		leadingCorners = [_cornerViews objectAtIndex:0];
-		trailingCorners = [_cornerViews objectAtIndex:1];
-	}
-	
-	// Configure and layout the corner-views.
-	leadingCorners.cornersPosition = (_vertical) ? MGCornersPositionLeadingVertical : MGCornersPositionLeadingHorizontal;
-	trailingCorners.cornersPosition = (_vertical) ? MGCornersPositionTrailingVertical : MGCornersPositionTrailingHorizontal;
-	leadingCorners.autoresizingMask = (_vertical) ? UIViewAutoresizingFlexibleBottomMargin : UIViewAutoresizingFlexibleRightMargin;
-	trailingCorners.autoresizingMask = (_vertical) ? UIViewAutoresizingFlexibleTopMargin : UIViewAutoresizingFlexibleLeftMargin;
-	
-	float x, y, cornersWidth, cornersHeight;
-	CGRect leadingRect, trailingRect;
-	float radius = leadingCorners.cornerRadius;
-	if (_vertical) { // left/right split
-		cornersWidth = (radius * 2.0) + _splitWidth;
-		cornersHeight = radius;
-		x = ((shouldShowMaster) ? ((masterFirst) ? _splitPosition : width - (_splitPosition + _splitWidth)) : (0 - _splitWidth)) - radius;
-		y = 0;
-		leadingRect = CGRectMake(x, y, cornersWidth, cornersHeight); // top corners
-		trailingRect = CGRectMake(x, (height - cornersHeight), cornersWidth, cornersHeight); // bottom corners
-		
-	} else { // top/bottom split
-		x = 0;
-		y = ((shouldShowMaster) ? ((masterFirst) ? _splitPosition : height - (_splitPosition + _splitWidth)) : (0 - _splitWidth)) - radius;
-		cornersWidth = radius;
-		cornersHeight = (radius * 2.0) + _splitWidth;
-		leadingRect = CGRectMake(x, y, cornersWidth, cornersHeight); // left corners
-		trailingRect = CGRectMake((width - cornersWidth), y, cornersWidth, cornersHeight); // right corners
-	}
-	
-	leadingCorners.frame = leadingRect;
-	trailingCorners.frame = trailingRect;
-	
-	// Ensure corners are visible and frontmost.
-	if (!leadingCorners.superview) {
-		[self.view insertSubview:leadingCorners aboveSubview:self.detailViewController.view];
-		[self.view insertSubview:trailingCorners aboveSubview:self.detailViewController.view];
-	} else {
-		[self.view bringSubviewToFront:leadingCorners];
-		[self.view bringSubviewToFront:trailingCorners];
-	}
+    if (_reconfigurePopup) {
+        [self reconfigureForMasterInPopover:![self shouldShowMasterForInterfaceOrientation:theOrientation]];
+    }
+
+    // Layout the master, detail and divider views appropriately, adding/removing subviews as needed.
+    // First obtain relevant geometry.
+    CGSize fullSize = [self splitViewSizeForOrientation:theOrientation];
+    float width = fullSize.width;
+    float height = fullSize.height;
+
+    if (NO) { // Just for debugging.
+        NSLog(@"Target orientation is %@, dimensions will be %.0f x %.0f",
+              [self nameOfInterfaceOrientation:theOrientation], width, height);
+    }
+
+    // Layout the master, divider and detail views.
+    CGRect newFrame = CGRectMake(0, 0, width, height);
+    UIViewController *controller;
+    UIView *theView;
+    BOOL shouldShowMaster = [self shouldShowMasterForInterfaceOrientation:theOrientation];
+    BOOL masterFirst = [self isMasterBeforeDetail];
+    if ([self isVertical]) {
+        // Master on left, detail on right (or vice versa).
+        CGRect masterRect, dividerRect, detailRect;
+        if (masterFirst) {
+            if (!shouldShowMaster) {
+                // Move off-screen.
+                newFrame.origin.x -= (_splitPosition + _splitWidth);
+            }
+
+            newFrame.size.width = _splitPosition;
+            masterRect = newFrame;
+
+            newFrame.origin.x += newFrame.size.width;
+            newFrame.size.width = _splitWidth;
+            dividerRect = newFrame;
+
+            newFrame.origin.x += newFrame.size.width;
+            newFrame.size.width = width - newFrame.origin.x;
+            detailRect = newFrame;
+
+        } else {
+            if (!shouldShowMaster) {
+                // Move off-screen.
+                newFrame.size.width += (_splitPosition + _splitWidth);
+            }
+
+            newFrame.size.width -= (_splitPosition + _splitWidth);
+            detailRect = newFrame;
+
+            newFrame.origin.x += newFrame.size.width;
+            newFrame.size.width = _splitWidth;
+            dividerRect = newFrame;
+
+            newFrame.origin.x += newFrame.size.width;
+            newFrame.size.width = _splitPosition;
+            masterRect = newFrame;
+        }
+
+        // Position master.
+        controller = self.masterViewController;
+        if (controller && [controller isKindOfClass:[UIViewController class]])  {
+            theView = controller.view;
+            if (theView) {
+                theView.frame = masterRect;
+                if (!theView.superview) {
+                    [controller viewWillAppear:NO];
+                    [self.view addSubview:theView];
+                    [controller viewDidAppear:NO];
+                }
+            }
+        }
+
+        // Position divider.
+        theView = _dividerView;
+        theView.frame = dividerRect;
+        if (!theView.superview) {
+            [self.view addSubview:theView];
+        }
+
+        // Position detail.
+        controller = self.detailViewController;
+        if (controller && [controller isKindOfClass:[UIViewController class]])  {
+            theView = controller.view;
+            if (theView) {
+                theView.frame = detailRect;
+                if (!theView.superview) {
+                    [self.view insertSubview:theView aboveSubview:self.masterViewController.view];
+                } else {
+                    [self.view bringSubviewToFront:theView];
+                }
+            }
+        }
+
+    } else {
+        // Master above, detail below (or vice versa).
+        CGRect masterRect, dividerRect, detailRect;
+        if (masterFirst) {
+            if (!shouldShowMaster) {
+                // Move off-screen.
+                newFrame.origin.y -= (_splitPosition + _splitWidth);
+            }
+
+            newFrame.size.height = _splitPosition;
+            masterRect = newFrame;
+
+            newFrame.origin.y += newFrame.size.height;
+            newFrame.size.height = _splitWidth;
+            dividerRect = newFrame;
+
+            newFrame.origin.y += newFrame.size.height;
+            newFrame.size.height = height - newFrame.origin.y;
+            detailRect = newFrame;
+
+        } else {
+            if (!shouldShowMaster) {
+                // Move off-screen.
+                newFrame.size.height += (_splitPosition + _splitWidth);
+            }
+
+            newFrame.size.height -= (_splitPosition + _splitWidth);
+            detailRect = newFrame;
+
+            newFrame.origin.y += newFrame.size.height;
+            newFrame.size.height = _splitWidth;
+            dividerRect = newFrame;
+
+            newFrame.origin.y += newFrame.size.height;
+            newFrame.size.height = _splitPosition;
+            masterRect = newFrame;
+        }
+
+        // Position master.
+        controller = self.masterViewController;
+        if (controller && [controller isKindOfClass:[UIViewController class]])  {
+            theView = controller.view;
+            if (theView) {
+                theView.frame = masterRect;
+                if (!theView.superview) {
+                    [controller viewWillAppear:NO];
+                    [self.view addSubview:theView];
+                    [controller viewDidAppear:NO];
+                }
+            }
+        }
+
+        // Position divider.
+        theView = _dividerView;
+        theView.frame = dividerRect;
+        if (!theView.superview) {
+            [self.view addSubview:theView];
+        }
+
+        // Position detail.
+        controller = self.detailViewController;
+        if (controller && [controller isKindOfClass:[UIViewController class]])  {
+            theView = controller.view;
+            if (theView) {
+                theView.frame = detailRect;
+                if (!theView.superview) {
+                    [self.view insertSubview:theView aboveSubview:self.masterViewController.view];
+                } else {
+                    [self.view bringSubviewToFront:theView];
+                }
+            }
+        }
+    }
+
+    // Create corner views if necessary.
+    MGSplitCornersView *leadingCorners; // top/left of screen in vertical/horizontal split.
+    MGSplitCornersView *trailingCorners; // bottom/right of screen in vertical/horizontal split.
+    if (!_cornerViews) {
+        CGRect cornerRect = CGRectMake(0, 0, 10, 10); // arbitrary, will be resized below.
+        leadingCorners = [[MGSplitCornersView alloc] initWithFrame:cornerRect];
+        leadingCorners.splitViewController = self;
+        leadingCorners.cornerBackgroundColor = MG_DEFAULT_CORNER_COLOR;
+        leadingCorners.cornerRadius = MG_DEFAULT_CORNER_RADIUS;
+        trailingCorners = [[MGSplitCornersView alloc] initWithFrame:cornerRect];
+        trailingCorners.splitViewController = self;
+        trailingCorners.cornerBackgroundColor = MG_DEFAULT_CORNER_COLOR;
+        trailingCorners.cornerRadius = MG_DEFAULT_CORNER_RADIUS;
+        _cornerViews = [[NSArray alloc] initWithObjects:leadingCorners, trailingCorners, nil];
+        [leadingCorners release];
+        [trailingCorners release];
+
+    } else if ([_cornerViews count] == 2) {
+        leadingCorners = [_cornerViews objectAtIndex:0];
+        trailingCorners = [_cornerViews objectAtIndex:1];
+    }
+
+    // Configure and layout the corner-views.
+    leadingCorners.cornersPosition = (_vertical) ? MGCornersPositionLeadingVertical : MGCornersPositionLeadingHorizontal;
+    trailingCorners.cornersPosition = (_vertical) ? MGCornersPositionTrailingVertical : MGCornersPositionTrailingHorizontal;
+    leadingCorners.autoresizingMask = (_vertical) ? UIViewAutoresizingFlexibleBottomMargin : UIViewAutoresizingFlexibleRightMargin;
+    trailingCorners.autoresizingMask = (_vertical) ? UIViewAutoresizingFlexibleTopMargin : UIViewAutoresizingFlexibleLeftMargin;
+
+    float x, y, cornersWidth, cornersHeight;
+    CGRect leadingRect, trailingRect;
+    float radius = leadingCorners.cornerRadius;
+    if (_vertical) { // left/right split
+        cornersWidth = (radius * 2.0) + _splitWidth;
+        cornersHeight = radius;
+        x = ((shouldShowMaster) ? ((masterFirst) ? _splitPosition : width - (_splitPosition + _splitWidth)) : (0 - _splitWidth)) - radius;
+        y = 0;
+        leadingRect = CGRectMake(x, y, cornersWidth, cornersHeight); // top corners
+        trailingRect = CGRectMake(x, (height - cornersHeight), cornersWidth, cornersHeight); // bottom corners
+
+    } else { // top/bottom split
+        x = 0;
+        y = ((shouldShowMaster) ? ((masterFirst) ? _splitPosition : height - (_splitPosition + _splitWidth)) : (0 - _splitWidth)) - radius;
+        cornersWidth = radius;
+        cornersHeight = (radius * 2.0) + _splitWidth;
+        leadingRect = CGRectMake(x, y, cornersWidth, cornersHeight); // left corners
+        trailingRect = CGRectMake((width - cornersWidth), y, cornersWidth, cornersHeight); // right corners
+    }
+
+    leadingCorners.frame = leadingRect;
+    trailingCorners.frame = trailingRect;
+
+    // Ensure corners are visible and frontmost.
+    if (!leadingCorners.superview) {
+        [self.view insertSubview:leadingCorners aboveSubview:self.detailViewController.view];
+        [self.view insertSubview:trailingCorners aboveSubview:self.detailViewController.view];
+    } else {
+        [self.view bringSubviewToFront:leadingCorners];
+        [self.view bringSubviewToFront:trailingCorners];
+    }
 }
 
 
 - (void)layoutSubviewsWithAnimation:(BOOL)animate
 {
-	[self layoutSubviewsForInterfaceOrientation:self.interfaceOrientation withAnimation:animate];
+    [self layoutSubviewsForInterfaceOrientation:self.interfaceOrientation withAnimation:animate];
 }
 
 
 - (void)layoutSubviews
 {
-	[self layoutSubviewsForInterfaceOrientation:self.interfaceOrientation withAnimation:YES];
+    [self layoutSubviewsForInterfaceOrientation:self.interfaceOrientation withAnimation:YES];
 }
 
 
 - (void)viewWillAppear:(BOOL)animated
 {
-	[super viewWillAppear:animated];
-	
-	if ([self isShowingMaster]) {
-		[self.masterViewController viewWillAppear:animated];
-	}
-	[self.detailViewController viewWillAppear:animated];
-	
-	_reconfigurePopup = YES;
-	[self layoutSubviews];
+    [super viewWillAppear:animated];
+
+    if ([self isShowingMaster]) {
+        [self.masterViewController viewWillAppear:animated];
+    }
+    [self.detailViewController viewWillAppear:animated];
+
+    _reconfigurePopup = YES;
+    [self layoutSubviews];
 }
 
 
 - (void)viewDidAppear:(BOOL)animated
 {
-	[super viewDidAppear:animated];
-	
-	if ([self isShowingMaster]) {
-		[self.masterViewController viewDidAppear:animated];
-	}
-	[self.detailViewController viewDidAppear:animated];
+    [super viewDidAppear:animated];
+
+    if ([self isShowingMaster]) {
+        [self.masterViewController viewDidAppear:animated];
+    }
+    [self.detailViewController viewDidAppear:animated];
 }
 
 
 - (void)viewWillDisappear:(BOOL)animated
 {
-	[super viewWillDisappear:animated];
-	
-	if ([self isShowingMaster]) {
-		[self.masterViewController viewWillDisappear:animated];
-	}
-	[self.detailViewController viewWillDisappear:animated];
+    [super viewWillDisappear:animated];
+
+    if ([self isShowingMaster]) {
+        [self.masterViewController viewWillDisappear:animated];
+    }
+    [self.detailViewController viewWillDisappear:animated];
 }
 
 
 - (void)viewDidDisappear:(BOOL)animated
 {
-	[super viewDidDisappear:animated];
-	
-	if ([self isShowingMaster]) {
-		[self.masterViewController viewDidDisappear:animated];
-	}
-	[self.detailViewController viewDidDisappear:animated];
+    [super viewDidDisappear:animated];
+
+    if ([self isShowingMaster]) {
+        [self.masterViewController viewDidDisappear:animated];
+    }
+    [self.detailViewController viewDidDisappear:animated];
 }
 
 
@@ -545,73 +545,73 @@
 
 - (void)reconfigureForMasterInPopover:(BOOL)inPopover
 {
-	_reconfigurePopup = NO;
-	
-	if ((inPopover && _hiddenPopoverController) || (!inPopover && !_hiddenPopoverController) || !self.masterViewController) {
-		// Nothing to do.
-		return;
-	}
-	
-	if (inPopover && !_hiddenPopoverController && !_barButtonItem) {
-		// Create and configure popover for our masterViewController.
-		[_hiddenPopoverController release];
-		_hiddenPopoverController = nil;
-		[self.masterViewController viewWillDisappear:NO];
-		_hiddenPopoverController = [[UIPopoverController alloc] initWithContentViewController:self.masterViewController];
-		[self.masterViewController viewDidDisappear:NO];
-		
-		// Create and configure _barButtonItem.
-		_barButtonItem = [[UIBarButtonItem alloc] initWithTitle:NSLocalizedString(@"Master", nil) 
-														  style:UIBarButtonItemStyleBordered 
-														 target:self 
-														 action:@selector(showMasterPopover:)];
-		
-		// Inform delegate of this state of affairs.
-		if (_delegate && [_delegate respondsToSelector:@selector(splitViewController:willHideViewController:withBarButtonItem:forPopoverController:)]) {
-			[(NSObject <MGSplitViewControllerDelegate> *)_delegate splitViewController:self 
-																willHideViewController:self.masterViewController 
-																	 withBarButtonItem:_barButtonItem 
-																  forPopoverController:_hiddenPopoverController];
-		}
-		
-	} else if (!inPopover && _hiddenPopoverController && _barButtonItem) {
-		// I know this looks strange, but it fixes a bizarre issue with UIPopoverController leaving masterViewController's views in disarray.
-		[_hiddenPopoverController presentPopoverFromRect:CGRectZero inView:self.view permittedArrowDirections:UIPopoverArrowDirectionAny animated:NO];
-		
-		// Remove master from popover and destroy popover, if it exists.
-		[_hiddenPopoverController dismissPopoverAnimated:NO];
-		[_hiddenPopoverController release];
-		_hiddenPopoverController = nil;
-		
-		// Inform delegate that the _barButtonItem will become invalid.
-		if (_delegate && [_delegate respondsToSelector:@selector(splitViewController:willShowViewController:invalidatingBarButtonItem:)]) {
-			[(NSObject <MGSplitViewControllerDelegate> *)_delegate splitViewController:self 
-																willShowViewController:self.masterViewController 
-															 invalidatingBarButtonItem:_barButtonItem];
-		}
-		
-		// Destroy _barButtonItem.
-		[_barButtonItem release];
-		_barButtonItem = nil;
-		
-		// Move master view.
-		UIView *masterView = self.masterViewController.view;
-		if (masterView && masterView.superview != self.view) {
-			[masterView removeFromSuperview];
-		}
-	}
+    _reconfigurePopup = NO;
+
+    if ((inPopover && _hiddenPopoverController) || (!inPopover && !_hiddenPopoverController) || !self.masterViewController) {
+        // Nothing to do.
+        return;
+    }
+
+    if (inPopover && !_hiddenPopoverController && !_barButtonItem) {
+        // Create and configure popover for our masterViewController.
+        [_hiddenPopoverController release];
+        _hiddenPopoverController = nil;
+        [self.masterViewController viewWillDisappear:NO];
+        _hiddenPopoverController = [[UIPopoverController alloc] initWithContentViewController:self.masterViewController];
+        [self.masterViewController viewDidDisappear:NO];
+
+        // Create and configure _barButtonItem.
+        _barButtonItem = [[UIBarButtonItem alloc] initWithTitle:NSLocalizedString(@"Master", nil)
+                                                          style:UIBarButtonItemStyleBordered
+                                                         target:self
+                                                         action:@selector(showMasterPopover:)];
+
+        // Inform delegate of this state of affairs.
+        if (_delegate && [_delegate respondsToSelector:@selector(splitViewController:willHideViewController:withBarButtonItem:forPopoverController:)]) {
+            [(NSObject <MGSplitViewControllerDelegate> *)_delegate splitViewController:self
+                                                                willHideViewController:self.masterViewController
+                                                                     withBarButtonItem:_barButtonItem
+                                                                  forPopoverController:_hiddenPopoverController];
+        }
+
+    } else if (!inPopover && _hiddenPopoverController && _barButtonItem) {
+        // I know this looks strange, but it fixes a bizarre issue with UIPopoverController leaving masterViewController's views in disarray.
+        [_hiddenPopoverController presentPopoverFromRect:CGRectZero inView:self.view permittedArrowDirections:UIPopoverArrowDirectionAny animated:NO];
+
+        // Remove master from popover and destroy popover, if it exists.
+        [_hiddenPopoverController dismissPopoverAnimated:NO];
+        [_hiddenPopoverController release];
+        _hiddenPopoverController = nil;
+
+        // Inform delegate that the _barButtonItem will become invalid.
+        if (_delegate && [_delegate respondsToSelector:@selector(splitViewController:willShowViewController:invalidatingBarButtonItem:)]) {
+            [(NSObject <MGSplitViewControllerDelegate> *)_delegate splitViewController:self
+                                                                willShowViewController:self.masterViewController
+                                                             invalidatingBarButtonItem:_barButtonItem];
+        }
+
+        // Destroy _barButtonItem.
+        [_barButtonItem release];
+        _barButtonItem = nil;
+
+        // Move master view.
+        UIView *masterView = self.masterViewController.view;
+        if (masterView && masterView.superview != self.view) {
+            [masterView removeFromSuperview];
+        }
+    }
 }
 
 
 - (void)popoverControllerDidDismissPopover:(UIPopoverController *)popoverController
 {
-	[self reconfigureForMasterInPopover:NO];
+    [self reconfigureForMasterInPopover:NO];
 }
 
 
 - (void)notePopoverDismissed
 {
-	[self popoverControllerDidDismissPopover:_hiddenPopoverController];
+    [self popoverControllerDidDismissPopover:_hiddenPopoverController];
 }
 
 
@@ -621,14 +621,14 @@
 
 - (void)animationDidStop:(NSString *)animationID finished:(NSNumber *)finished context:(void *)context
 {
-	if (([animationID isEqualToString:MG_ANIMATION_CHANGE_SPLIT_ORIENTATION] || 
-		 [animationID isEqualToString:MG_ANIMATION_CHANGE_SUBVIEWS_ORDER])
-		&& _cornerViews) {
-		for (UIView *corner in _cornerViews) {
-			corner.hidden = NO;
-		}
-		_dividerView.hidden = NO;
-	}
+    if (([animationID isEqualToString:MG_ANIMATION_CHANGE_SPLIT_ORIENTATION] ||
+         [animationID isEqualToString:MG_ANIMATION_CHANGE_SUBVIEWS_ORDER])
+        && _cornerViews) {
+        for (UIView *corner in _cornerViews) {
+            corner.hidden = NO;
+        }
+        _dividerView.hidden = NO;
+    }
 }
 
 
@@ -638,83 +638,83 @@
 
 - (IBAction)toggleSplitOrientation:(id)sender
 {
-	BOOL showingMaster = [self isShowingMaster];
-	if (showingMaster) {
-		if (_cornerViews) {
-			for (UIView *corner in _cornerViews) {
-				corner.hidden = YES;
-			}
-			_dividerView.hidden = YES;
-		}
-		[UIView beginAnimations:MG_ANIMATION_CHANGE_SPLIT_ORIENTATION context:nil];
-		[UIView setAnimationDelegate:self];
-		[UIView setAnimationDidStopSelector:@selector(animationDidStop:finished:context:)];
-	}
-	self.vertical = (!self.vertical);
-	if (showingMaster) {
-		[UIView commitAnimations];
-	}
+    BOOL showingMaster = [self isShowingMaster];
+    if (showingMaster) {
+        if (_cornerViews) {
+            for (UIView *corner in _cornerViews) {
+                corner.hidden = YES;
+            }
+            _dividerView.hidden = YES;
+        }
+        [UIView beginAnimations:MG_ANIMATION_CHANGE_SPLIT_ORIENTATION context:nil];
+        [UIView setAnimationDelegate:self];
+        [UIView setAnimationDidStopSelector:@selector(animationDidStop:finished:context:)];
+    }
+    self.vertical = (!self.vertical);
+    if (showingMaster) {
+        [UIView commitAnimations];
+    }
 }
 
 
 - (IBAction)toggleMasterBeforeDetail:(id)sender
 {
-	BOOL showingMaster = [self isShowingMaster];
-	if (showingMaster) {
-		if (_cornerViews) {
-			for (UIView *corner in _cornerViews) {
-				corner.hidden = YES;
-			}
-			_dividerView.hidden = YES;
-		}
-		[UIView beginAnimations:MG_ANIMATION_CHANGE_SUBVIEWS_ORDER context:nil];
-		[UIView setAnimationDelegate:self];
-		[UIView setAnimationDidStopSelector:@selector(animationDidStop:finished:context:)];
-	}
-	self.masterBeforeDetail = (!self.masterBeforeDetail);
-	if (showingMaster) {
-		[UIView commitAnimations];
-	}
+    BOOL showingMaster = [self isShowingMaster];
+    if (showingMaster) {
+        if (_cornerViews) {
+            for (UIView *corner in _cornerViews) {
+                corner.hidden = YES;
+            }
+            _dividerView.hidden = YES;
+        }
+        [UIView beginAnimations:MG_ANIMATION_CHANGE_SUBVIEWS_ORDER context:nil];
+        [UIView setAnimationDelegate:self];
+        [UIView setAnimationDidStopSelector:@selector(animationDidStop:finished:context:)];
+    }
+    self.masterBeforeDetail = (!self.masterBeforeDetail);
+    if (showingMaster) {
+        [UIView commitAnimations];
+    }
 }
 
 
 - (IBAction)toggleMasterView:(id)sender
 {
-	if (_hiddenPopoverController && _hiddenPopoverController.popoverVisible) {
-		[_hiddenPopoverController dismissPopoverAnimated:NO];
-	}
-	
-	if (![self isShowingMaster]) {
-		// We're about to show the master view. Ensure it's in place off-screen to be animated in.
-		_reconfigurePopup = YES;
-		[self reconfigureForMasterInPopover:NO];
-		[self layoutSubviews];
-	}
-	
-	// This action functions on the current primary orientation; it is independent of the other primary orientation.
-	[UIView beginAnimations:@"toggleMaster" context:nil];
-	if (self.isLandscape) {
-		self.showsMasterInLandscape = !_showsMasterInLandscape;
-	} else {
-		self.showsMasterInPortrait = !_showsMasterInPortrait;
-	}
-	[UIView commitAnimations];
+    if (_hiddenPopoverController && _hiddenPopoverController.popoverVisible) {
+        [_hiddenPopoverController dismissPopoverAnimated:NO];
+    }
+
+    if (![self isShowingMaster]) {
+        // We're about to show the master view. Ensure it's in place off-screen to be animated in.
+        _reconfigurePopup = YES;
+        [self reconfigureForMasterInPopover:NO];
+        [self layoutSubviews];
+    }
+
+    // This action functions on the current primary orientation; it is independent of the other primary orientation.
+    [UIView beginAnimations:@"toggleMaster" context:nil];
+    if (self.isLandscape) {
+        self.showsMasterInLandscape = !_showsMasterInLandscape;
+    } else {
+        self.showsMasterInPortrait = !_showsMasterInPortrait;
+    }
+    [UIView commitAnimations];
 }
 
 
 - (IBAction)showMasterPopover:(id) sender
 {
-	if (_hiddenPopoverController && !(_hiddenPopoverController.popoverVisible)) {
-		// Inform delegate.
-		if (_delegate && [_delegate respondsToSelector:@selector(splitViewController:popoverController:willPresentViewController:)]) {
-			[(NSObject <MGSplitViewControllerDelegate> *)_delegate splitViewController:self 
-																	 popoverController:_hiddenPopoverController 
-															 willPresentViewController:self.masterViewController];
-		}
-		
-		// Show popover.
-		[_hiddenPopoverController presentPopoverFromBarButtonItem:_barButtonItem permittedArrowDirections:UIPopoverArrowDirectionAny animated:YES];
-	}
+    if (_hiddenPopoverController && !(_hiddenPopoverController.popoverVisible)) {
+        // Inform delegate.
+        if (_delegate && [_delegate respondsToSelector:@selector(splitViewController:popoverController:willPresentViewController:)]) {
+            [(NSObject <MGSplitViewControllerDelegate> *)_delegate splitViewController:self
+                                                                     popoverController:_hiddenPopoverController
+                                                             willPresentViewController:self.masterViewController];
+        }
+
+        // Show popover.
+        [_hiddenPopoverController presentPopoverFromBarButtonItem:_barButtonItem permittedArrowDirections:UIPopoverArrowDirectionAny animated:YES];
+    }
 }
 
 
@@ -724,395 +724,395 @@
 
 - (id)delegate
 {
-	return _delegate;
+    return _delegate;
 }
 
 
 - (void)setDelegate:(id <MGSplitViewControllerDelegate>)newDelegate
 {
-	if (newDelegate != _delegate && 
-		(!newDelegate || [(NSObject *)newDelegate conformsToProtocol:@protocol(MGSplitViewControllerDelegate)])) {
-		_delegate = newDelegate;
-	}
+    if (newDelegate != _delegate &&
+        (!newDelegate || [(NSObject *)newDelegate conformsToProtocol:@protocol(MGSplitViewControllerDelegate)])) {
+        _delegate = newDelegate;
+    }
 }
 
 
 - (BOOL)showsMasterInPortrait
 {
-	return _showsMasterInPortrait;
+    return _showsMasterInPortrait;
 }
 
 
 - (void)setShowsMasterInPortrait:(BOOL)flag
 {
-	if (flag != _showsMasterInPortrait) {
-		_showsMasterInPortrait = flag;
-		
-		if (![self isLandscape]) { // i.e. if this will cause a visual change.
-			if (_hiddenPopoverController && _hiddenPopoverController.popoverVisible) {
-				[_hiddenPopoverController dismissPopoverAnimated:NO];
-			}
-			
-			// Rearrange views.
-			_reconfigurePopup = YES;
-			[self layoutSubviews];
-		}
-	}
+    if (flag != _showsMasterInPortrait) {
+        _showsMasterInPortrait = flag;
+
+        if (![self isLandscape]) { // i.e. if this will cause a visual change.
+            if (_hiddenPopoverController && _hiddenPopoverController.popoverVisible) {
+                [_hiddenPopoverController dismissPopoverAnimated:NO];
+            }
+
+            // Rearrange views.
+            _reconfigurePopup = YES;
+            [self layoutSubviews];
+        }
+    }
 }
 
 
 - (BOOL)showsMasterInLandscape
 {
-	return _showsMasterInLandscape;
+    return _showsMasterInLandscape;
 }
 
 
 - (void)setShowsMasterInLandscape:(BOOL)flag
 {
-	if (flag != _showsMasterInLandscape) {
-		_showsMasterInLandscape = flag;
-		
-		if ([self isLandscape]) { // i.e. if this will cause a visual change.
-			if (_hiddenPopoverController && _hiddenPopoverController.popoverVisible) {
-				[_hiddenPopoverController dismissPopoverAnimated:NO];
-			}
-			
-			// Rearrange views.
-			_reconfigurePopup = YES;
-			[self layoutSubviews];
-		}
-	}
+    if (flag != _showsMasterInLandscape) {
+        _showsMasterInLandscape = flag;
+
+        if ([self isLandscape]) { // i.e. if this will cause a visual change.
+            if (_hiddenPopoverController && _hiddenPopoverController.popoverVisible) {
+                [_hiddenPopoverController dismissPopoverAnimated:NO];
+            }
+
+            // Rearrange views.
+            _reconfigurePopup = YES;
+            [self layoutSubviews];
+        }
+    }
 }
 
 
 - (BOOL)isVertical
 {
-	return _vertical;
+    return _vertical;
 }
 
 
 - (void)setVertical:(BOOL)flag
 {
-	if (flag != _vertical) {
-		if (_hiddenPopoverController && _hiddenPopoverController.popoverVisible) {
-			[_hiddenPopoverController dismissPopoverAnimated:NO];
-		}
-		
-		_vertical = flag;
-		
-		// Inform delegate.
-		if (_delegate && [_delegate respondsToSelector:@selector(splitViewController:willChangeSplitOrientationToVertical:)]) {
-			[_delegate splitViewController:self willChangeSplitOrientationToVertical:_vertical];
-		}
-		
-		[self layoutSubviews];
-	}
+    if (flag != _vertical) {
+        if (_hiddenPopoverController && _hiddenPopoverController.popoverVisible) {
+            [_hiddenPopoverController dismissPopoverAnimated:NO];
+        }
+
+        _vertical = flag;
+
+        // Inform delegate.
+        if (_delegate && [_delegate respondsToSelector:@selector(splitViewController:willChangeSplitOrientationToVertical:)]) {
+            [_delegate splitViewController:self willChangeSplitOrientationToVertical:_vertical];
+        }
+
+        [self layoutSubviews];
+    }
 }
 
 
 - (BOOL)isMasterBeforeDetail
 {
-	return _masterBeforeDetail;
+    return _masterBeforeDetail;
 }
 
 
 - (void)setMasterBeforeDetail:(BOOL)flag
 {
-	if (flag != _masterBeforeDetail) {
-		if (_hiddenPopoverController && _hiddenPopoverController.popoverVisible) {
-			[_hiddenPopoverController dismissPopoverAnimated:NO];
-		}
-		
-		_masterBeforeDetail = flag;
-		
-		if ([self isShowingMaster]) {
-			[self layoutSubviews];
-		}
-	}
+    if (flag != _masterBeforeDetail) {
+        if (_hiddenPopoverController && _hiddenPopoverController.popoverVisible) {
+            [_hiddenPopoverController dismissPopoverAnimated:NO];
+        }
+
+        _masterBeforeDetail = flag;
+
+        if ([self isShowingMaster]) {
+            [self layoutSubviews];
+        }
+    }
 }
 
 
 - (float)splitPosition
 {
-	return _splitPosition;
+    return _splitPosition;
 }
 
 
 - (void)setSplitPosition:(float)posn
 {
-	// Check to see if delegate wishes to constrain the position.
-	float newPosn = posn;
-	BOOL constrained = NO;
-	CGSize fullSize = [self splitViewSizeForOrientation:self.interfaceOrientation];
-	if (_delegate && [_delegate respondsToSelector:@selector(splitViewController:constrainSplitPosition:splitViewSize:)]) {
-		newPosn = [_delegate splitViewController:self constrainSplitPosition:newPosn splitViewSize:fullSize];
-		constrained = YES; // implicitly trust delegate's response.
-		
-	} else {
-		// Apply default constraints if delegate doesn't wish to participate.
-		float minPos = MG_MIN_VIEW_WIDTH;
-		float maxPos = ((_vertical) ? fullSize.width : fullSize.height) - (MG_MIN_VIEW_WIDTH + _splitWidth);
-		constrained = (newPosn != _splitPosition && newPosn >= minPos && newPosn <= maxPos);
-	}
-	
-	if (constrained) {
-		if (_hiddenPopoverController && _hiddenPopoverController.popoverVisible) {
-			[_hiddenPopoverController dismissPopoverAnimated:NO];
-		}
-		
-		_splitPosition = newPosn;
-		
-		// Inform delegate.
-		if (_delegate && [_delegate respondsToSelector:@selector(splitViewController:willMoveSplitToPosition:)]) {
-			[_delegate splitViewController:self willMoveSplitToPosition:_splitPosition];
-		}
-		
-		if ([self isShowingMaster]) {
-			[self layoutSubviews];
-		}
-	}
+    // Check to see if delegate wishes to constrain the position.
+    float newPosn = posn;
+    BOOL constrained = NO;
+    CGSize fullSize = [self splitViewSizeForOrientation:self.interfaceOrientation];
+    if (_delegate && [_delegate respondsToSelector:@selector(splitViewController:constrainSplitPosition:splitViewSize:)]) {
+        newPosn = [_delegate splitViewController:self constrainSplitPosition:newPosn splitViewSize:fullSize];
+        constrained = YES; // implicitly trust delegate's response.
+
+    } else {
+        // Apply default constraints if delegate doesn't wish to participate.
+        float minPos = MG_MIN_VIEW_WIDTH;
+        float maxPos = ((_vertical) ? fullSize.width : fullSize.height) - (MG_MIN_VIEW_WIDTH + _splitWidth);
+        constrained = (newPosn != _splitPosition && newPosn >= minPos && newPosn <= maxPos);
+    }
+
+    if (constrained) {
+        if (_hiddenPopoverController && _hiddenPopoverController.popoverVisible) {
+            [_hiddenPopoverController dismissPopoverAnimated:NO];
+        }
+
+        _splitPosition = newPosn;
+
+        // Inform delegate.
+        if (_delegate && [_delegate respondsToSelector:@selector(splitViewController:willMoveSplitToPosition:)]) {
+            [_delegate splitViewController:self willMoveSplitToPosition:_splitPosition];
+        }
+
+        if ([self isShowingMaster]) {
+            [self layoutSubviews];
+        }
+    }
 }
 
 
 - (void)setSplitPosition:(float)posn animated:(BOOL)animate
 {
-	BOOL shouldAnimate = (animate && [self isShowingMaster]);
-	if (shouldAnimate) {
-		[UIView beginAnimations:@"SplitPosition" context:nil];
-	}
-	[self setSplitPosition:posn];
-	if (shouldAnimate) {
-		[UIView commitAnimations];
-	}
+    BOOL shouldAnimate = (animate && [self isShowingMaster]);
+    if (shouldAnimate) {
+        [UIView beginAnimations:@"SplitPosition" context:nil];
+    }
+    [self setSplitPosition:posn];
+    if (shouldAnimate) {
+        [UIView commitAnimations];
+    }
 }
 
 
 - (float)splitWidth
 {
-	return _splitWidth;
+    return _splitWidth;
 }
 
 
 - (void)setSplitWidth:(float)width
 {
-	if (width != _splitWidth && width >= 0) {
-		_splitWidth = width;
-		if ([self isShowingMaster]) {
-			[self layoutSubviews];
-		}
-	}
+    if (width != _splitWidth && width >= 0) {
+        _splitWidth = width;
+        if ([self isShowingMaster]) {
+            [self layoutSubviews];
+        }
+    }
 }
 
 
 - (NSArray *)viewControllers
 {
-	return [[_viewControllers copy] autorelease];
+    return [[_viewControllers copy] autorelease];
 }
 
 
 - (void)setViewControllers:(NSArray *)controllers
 {
-	if (controllers != _viewControllers) {
-		for (UIViewController *controller in _viewControllers) {
-			if ([controller isKindOfClass:[UIViewController class]]) {
-				[controller.view removeFromSuperview];
-			}
-		}
-		[_viewControllers release];
-		_viewControllers = [[NSMutableArray alloc] initWithCapacity:2];
-		if (controllers && [controllers count] >= 2) {
-			self.masterViewController = [controllers objectAtIndex:0];
-			self.detailViewController = [controllers objectAtIndex:1];
-		} else {
-			NSLog(@"Error: %@ requires 2 view-controllers. (%@)", NSStringFromClass([self class]), NSStringFromSelector(_cmd));
-		}
-		
-		[self layoutSubviews];
-	}
+    if (controllers != _viewControllers) {
+        for (UIViewController *controller in _viewControllers) {
+            if ([controller isKindOfClass:[UIViewController class]]) {
+                [controller.view removeFromSuperview];
+            }
+        }
+        [_viewControllers release];
+        _viewControllers = [[NSMutableArray alloc] initWithCapacity:2];
+        if (controllers && [controllers count] >= 2) {
+            self.masterViewController = [controllers objectAtIndex:0];
+            self.detailViewController = [controllers objectAtIndex:1];
+        } else {
+            NSLog(@"Error: %@ requires 2 view-controllers. (%@)", NSStringFromClass([self class]), NSStringFromSelector(_cmd));
+        }
+
+        [self layoutSubviews];
+    }
 }
 
 
 - (UIViewController *)masterViewController
 {
-	if (_viewControllers && [_viewControllers count] > 0) {
-		NSObject *controller = [_viewControllers objectAtIndex:0];
-		if ([controller isKindOfClass:[UIViewController class]]) {
-			return [[controller retain] autorelease];
-		}
-	}
-	
-	return nil;
+    if (_viewControllers && [_viewControllers count] > 0) {
+        NSObject *controller = [_viewControllers objectAtIndex:0];
+        if ([controller isKindOfClass:[UIViewController class]]) {
+            return [[controller retain] autorelease];
+        }
+    }
+
+    return nil;
 }
 
 
 - (void)setMasterViewController:(UIViewController *)master
 {
-	if (!_viewControllers) {
-		_viewControllers = [[NSMutableArray alloc] initWithCapacity:2];
-	}
-	
-	NSObject *newMaster = master;
-	if (!newMaster) {
-		newMaster = [NSNull null];
-	}
-	
-	BOOL changed = YES;
-	if ([_viewControllers count] > 0) {
-		if ([_viewControllers objectAtIndex:0] == newMaster) {
-			changed = NO;
-		} else {
-			[_viewControllers replaceObjectAtIndex:0 withObject:newMaster];
-		}
-		
-	} else {
-		[_viewControllers addObject:newMaster];
-	}
-	
-	if (changed) {
-		[self layoutSubviews];
-	}
+    if (!_viewControllers) {
+        _viewControllers = [[NSMutableArray alloc] initWithCapacity:2];
+    }
+
+    NSObject *newMaster = master;
+    if (!newMaster) {
+        newMaster = [NSNull null];
+    }
+
+    BOOL changed = YES;
+    if ([_viewControllers count] > 0) {
+        if ([_viewControllers objectAtIndex:0] == newMaster) {
+            changed = NO;
+        } else {
+            [_viewControllers replaceObjectAtIndex:0 withObject:newMaster];
+        }
+
+    } else {
+        [_viewControllers addObject:newMaster];
+    }
+
+    if (changed) {
+        [self layoutSubviews];
+    }
 }
 
 
 - (UIViewController *)detailViewController
 {
-	if (_viewControllers && [_viewControllers count] > 1) {
-		NSObject *controller = [_viewControllers objectAtIndex:1];
-		if ([controller isKindOfClass:[UIViewController class]]) {
-			return [[controller retain] autorelease];
-		}
-	}
-	
-	return nil;
+    if (_viewControllers && [_viewControllers count] > 1) {
+        NSObject *controller = [_viewControllers objectAtIndex:1];
+        if ([controller isKindOfClass:[UIViewController class]]) {
+            return [[controller retain] autorelease];
+        }
+    }
+
+    return nil;
 }
 
 
 - (void)setDetailViewController:(UIViewController *)detail
 {
-	if (!_viewControllers) {
-		_viewControllers = [[NSMutableArray alloc] initWithCapacity:2];
-		[_viewControllers addObject:[NSNull null]];
-	}
-	
-	BOOL changed = YES;
-	if ([_viewControllers count] > 1) {
-		if ([_viewControllers objectAtIndex:1] == detail) {
-			changed = NO;
-		} else {
-			[_viewControllers replaceObjectAtIndex:1 withObject:detail];
-		}
-		
-	} else {
-		[_viewControllers addObject:detail];
-	}
-	
-	if (changed) {
-		[self layoutSubviews];
-	}
+    if (!_viewControllers) {
+        _viewControllers = [[NSMutableArray alloc] initWithCapacity:2];
+        [_viewControllers addObject:[NSNull null]];
+    }
+
+    BOOL changed = YES;
+    if ([_viewControllers count] > 1) {
+        if ([_viewControllers objectAtIndex:1] == detail) {
+            changed = NO;
+        } else {
+            [_viewControllers replaceObjectAtIndex:1 withObject:detail];
+        }
+
+    } else {
+        [_viewControllers addObject:detail];
+    }
+
+    if (changed) {
+        [self layoutSubviews];
+    }
 }
 
 
 - (MGSplitDividerView *)dividerView
 {
-	return [[_dividerView retain] autorelease];
+    return [[_dividerView retain] autorelease];
 }
 
 
 - (void)setDividerView:(MGSplitDividerView *)divider
 {
-	if (divider != _dividerView) {
-		[_dividerView removeFromSuperview];
-		[_dividerView release];
-		_dividerView = [divider retain];
-		_dividerView.splitViewController = self;
-		_dividerView.backgroundColor = MG_DEFAULT_CORNER_COLOR;
-		if ([self isShowingMaster]) {
-			[self layoutSubviews];
-		}
-	}
+    if (divider != _dividerView) {
+        [_dividerView removeFromSuperview];
+        [_dividerView release];
+        _dividerView = [divider retain];
+        _dividerView.splitViewController = self;
+        _dividerView.backgroundColor = MG_DEFAULT_CORNER_COLOR;
+        if ([self isShowingMaster]) {
+            [self layoutSubviews];
+        }
+    }
 }
 
 
 - (BOOL)allowsDraggingDivider
 {
-	if (_dividerView) {
-		return _dividerView.allowsDragging;
-	}
-	
-	return NO;
+    if (_dividerView) {
+        return _dividerView.allowsDragging;
+    }
+
+    return NO;
 }
 
 
 - (void)setAllowsDraggingDivider:(BOOL)flag
 {
-	if (self.allowsDraggingDivider != flag && _dividerView) {
-		_dividerView.allowsDragging = flag;
-	}
+    if (self.allowsDraggingDivider != flag && _dividerView) {
+        _dividerView.allowsDragging = flag;
+    }
 }
 
 
 - (MGSplitViewDividerStyle)dividerStyle
 {
-	return _dividerStyle;
+    return _dividerStyle;
 }
 
 
 - (void)setDividerStyle:(MGSplitViewDividerStyle)newStyle
 {
-	if (_hiddenPopoverController && _hiddenPopoverController.popoverVisible) {
-		[_hiddenPopoverController dismissPopoverAnimated:NO];
-	}
-	
-	// We don't check to see if newStyle equals _dividerStyle, because it's a meta-setting.
-	// Aspects could have been changed since it was set.
-	_dividerStyle = newStyle;
-	
-	// Reconfigure general appearance and behaviour.
-	float cornerRadius;
-	if (_dividerStyle == MGSplitViewDividerStyleThin) {
-		cornerRadius = MG_DEFAULT_CORNER_RADIUS;
-		_splitWidth = MG_DEFAULT_SPLIT_WIDTH;
-		self.allowsDraggingDivider = NO;
-		
-	} else if (_dividerStyle == MGSplitViewDividerStylePaneSplitter) {
-		cornerRadius = MG_PANESPLITTER_CORNER_RADIUS;
-		_splitWidth = MG_PANESPLITTER_SPLIT_WIDTH;
-		self.allowsDraggingDivider = YES;
-	}
-	
-	// Update divider and corners.
-	[_dividerView setNeedsDisplay];
-	if (_cornerViews) {
-		for (MGSplitCornersView *corner in _cornerViews) {
-			corner.cornerRadius = cornerRadius;
-		}
-	}
-	
-	// Layout all views.
-	[self layoutSubviews];
+    if (_hiddenPopoverController && _hiddenPopoverController.popoverVisible) {
+        [_hiddenPopoverController dismissPopoverAnimated:NO];
+    }
+
+    // We don't check to see if newStyle equals _dividerStyle, because it's a meta-setting.
+    // Aspects could have been changed since it was set.
+    _dividerStyle = newStyle;
+
+    // Reconfigure general appearance and behaviour.
+    float cornerRadius;
+    if (_dividerStyle == MGSplitViewDividerStyleThin) {
+        cornerRadius = MG_DEFAULT_CORNER_RADIUS;
+        _splitWidth = MG_DEFAULT_SPLIT_WIDTH;
+        self.allowsDraggingDivider = NO;
+
+    } else if (_dividerStyle == MGSplitViewDividerStylePaneSplitter) {
+        cornerRadius = MG_PANESPLITTER_CORNER_RADIUS;
+        _splitWidth = MG_PANESPLITTER_SPLIT_WIDTH;
+        self.allowsDraggingDivider = YES;
+    }
+
+    // Update divider and corners.
+    [_dividerView setNeedsDisplay];
+    if (_cornerViews) {
+        for (MGSplitCornersView *corner in _cornerViews) {
+            corner.cornerRadius = cornerRadius;
+        }
+    }
+
+    // Layout all views.
+    [self layoutSubviews];
 }
 
 
 - (void)setDividerStyle:(MGSplitViewDividerStyle)newStyle animated:(BOOL)animate
 {
-	BOOL shouldAnimate = (animate && [self isShowingMaster]);
-	if (shouldAnimate) {
-		[UIView beginAnimations:@"DividerStyle" context:nil];
-	}
-	[self setDividerStyle:newStyle];
-	if (shouldAnimate) {
-		[UIView commitAnimations];
-	}
+    BOOL shouldAnimate = (animate && [self isShowingMaster]);
+    if (shouldAnimate) {
+        [UIView beginAnimations:@"DividerStyle" context:nil];
+    }
+    [self setDividerStyle:newStyle];
+    if (shouldAnimate) {
+        [UIView commitAnimations];
+    }
 }
 
 
 - (NSArray *)cornerViews
 {
-	if (_cornerViews) {
-		return [[_cornerViews retain] autorelease];
-	}
-	
-	return nil;
+    if (_cornerViews) {
+        return [[_cornerViews retain] autorelease];
+    }
+
+    return nil;
 }
 
 
--- a/project_files/HedgewarsMobile/Classes/MXAudioPlayerFadeOperation.h	Fri Jan 25 13:29:20 2013 +0400
+++ b/project_files/HedgewarsMobile/Classes/MXAudioPlayerFadeOperation.h	Tue Jan 29 10:10:23 2013 +0400
@@ -17,26 +17,26 @@
   BOOL _playBeforeFade;
 }
 
-// The AVAudioPlayer that the volume fade will be applied to. 
+// The AVAudioPlayer that the volume fade will be applied to.
 // Retained until the fade is completed.
 // Must be set with init method.
-@property (nonatomic, retain, readonly) AVAudioPlayer *audioPlayer; 
+@property (nonatomic, retain, readonly) AVAudioPlayer *audioPlayer;
 
-// The duration of the volume fade. 
+// The duration of the volume fade.
 // Default value is 1.0
-@property (nonatomic, assign) NSTimeInterval fadeDuration; 
+@property (nonatomic, assign) NSTimeInterval fadeDuration;
 
-// The delay before the volume fade begins. 
+// The delay before the volume fade begins.
 // Default value is 0.0
-@property (nonatomic, assign) NSTimeInterval delay; 
+@property (nonatomic, assign) NSTimeInterval delay;
 
-// The volume that will be faded to. 
+// The volume that will be faded to.
 // Default value is 0.0
-@property (nonatomic, assign) float finishVolume; 
+@property (nonatomic, assign) float finishVolume;
 
-// If YES, audio player will be sent a pause message when the fade has completed. 
+// If YES, audio player will be sent a pause message when the fade has completed.
 // Default value is NO, however, if finishVolume is 0.0, default is YES
-@property (nonatomic, assign) BOOL pauseAfterFade; 
+@property (nonatomic, assign) BOOL pauseAfterFade;
 
 // If YES, when the fade has completed the audio player will be sent a stop message.
 // Default value is NO.
--- a/project_files/HedgewarsMobile/Classes/MXAudioPlayerFadeOperation.m	Fri Jan 25 13:29:20 2013 +0400
+++ b/project_files/HedgewarsMobile/Classes/MXAudioPlayerFadeOperation.m	Tue Jan 29 10:10:23 2013 +0400
@@ -10,7 +10,7 @@
 #define SKVolumeChangesPerSecond 15
 
 @interface MXAudioPlayerFadeOperation ()
-@property (nonatomic, retain, readwrite) AVAudioPlayer *audioPlayer; 
+@property (nonatomic, retain, readwrite) AVAudioPlayer *audioPlayer;
 - (void)beginFadeOperation;
 - (void)finishFadeOperation;
 @end
@@ -87,21 +87,21 @@
   else {
     ALog(@"AudioPlayerFadeOperation began with invalid AVAudioPlayer");
   }
-  
+
   [pool release];
 }
 
 - (void)beginFadeOperation {
   if (![self.audioPlayer isPlaying] && _playBeforeFade) [self.audioPlayer play];
-  
+
   if (_fadeDuration != 0.0) {
-    
+
     NSTimeInterval sleepInterval = (1.0 / SKVolumeChangesPerSecond);
     NSTimeInterval startTime = [[NSDate date] timeIntervalSinceReferenceDate];
     NSTimeInterval now = startTime;
-    
+
     float startVolume = [self.audioPlayer volume];
-    
+
     while (now < (startTime + _fadeDuration)) {
       float ratioOfFadeCompleted = (now - startTime)/_fadeDuration;
       float volume = (_finishVolume * ratioOfFadeCompleted) + (startVolume * (1-ratioOfFadeCompleted));
@@ -109,7 +109,7 @@
       [NSThread sleepForTimeInterval:sleepInterval];
       now = [[NSDate date] timeIntervalSinceReferenceDate];
     }
-    
+
     [self.audioPlayer setVolume:_finishVolume];
     [self finishFadeOperation];
   }
--- a/project_files/HedgewarsMobile/Classes/MapConfigViewController.m	Fri Jan 25 13:29:20 2013 +0400
+++ b/project_files/HedgewarsMobile/Classes/MapConfigViewController.m	Tue Jan 29 10:10:23 2013 +0400
@@ -150,8 +150,8 @@
 // this set details for a static map (called by didSelectRowAtIndexPath)
 -(void) setDetailsForStaticMap:(NSInteger) index {
     NSArray *source = [self.dataSourceArray objectAtIndex:scIndex];
-    
-    NSString *fileCfg = [[NSString alloc] initWithFormat:@"%@/%@/map.cfg", 
+
+    NSString *fileCfg = [[NSString alloc] initWithFormat:@"%@/%@/map.cfg",
                          (scIndex == 1) ? MAPS_DIRECTORY() : MISSIONS_DIRECTORY(),[source objectAtIndex:index]];
     NSString *contents = [[NSString alloc] initWithContentsOfFile:fileCfg encoding:NSUTF8StringEncoding error:NULL];
     [fileCfg release];
@@ -166,7 +166,7 @@
     else
         max = @"18";
     [self setMaxLabelText:max];
-    
+
     self.themeCommand = [NSString stringWithFormat:@"etheme %@", [split objectAtIndex:0]];
     self.staticMapCommand = [NSString stringWithFormat:@"emap %@", [source objectAtIndex:index]];
 
@@ -357,7 +357,7 @@
 -(NSArray *) dataSourceArray {
     if (dataSourceArray == nil) {
         NSString *model = [HWUtils modelType];
-        
+
         // only folders containing icon.png are a valid theme
         NSArray *themeArrayFull = [[NSFileManager defaultManager] contentsOfDirectoryAtPath:THEMES_DIRECTORY() error:NULL];
         NSMutableArray *themeArray = [[NSMutableArray alloc] init];
@@ -367,7 +367,7 @@
                 [themeArray addObject:themeName];
             [checkPath release];
         }
-        
+
         // remove images that are too big for certain devices without loading the whole image
         NSArray *mapArrayFull = [[NSFileManager defaultManager] contentsOfDirectoryAtPath:MAPS_DIRECTORY() error:NULL];
         NSMutableArray *mapArray = [[NSMutableArray alloc] init];
@@ -379,7 +379,7 @@
                 continue;
             [mapArray addObject:str];
         }
-        
+
         NSArray *missionArrayFull = [[NSFileManager defaultManager] contentsOfDirectoryAtPath:MISSIONS_DIRECTORY() error:NULL];
         NSMutableArray *missionArray = [[NSMutableArray alloc] init];
         for (NSString *str in missionArrayFull) {
@@ -394,7 +394,7 @@
         [missionArray release];
         [themeArray release];
         [mapArray release];
-        
+
         self.dataSourceArray = array;
         [array release];
     }
@@ -404,7 +404,7 @@
 -(void) viewDidLoad {
     [super viewDidLoad];
     srandom(time(NULL));
-    
+
     // initialize some "default" values
     self.slider.value = 0.05f;
     self.slider.enabled = NO;
--- a/project_files/HedgewarsMobile/Classes/MapPreviewButtonView.m	Fri Jan 25 13:29:20 2013 +0400
+++ b/project_files/HedgewarsMobile/Classes/MapPreviewButtonView.m	Tue Jan 29 10:10:23 2013 +0400
@@ -52,7 +52,7 @@
 }
 
 #pragma mark -
-#pragma mark preview 
+#pragma mark preview
 -(int) sendToEngine:(NSString *)string {
     unsigned char length = [string length];
 
@@ -157,7 +157,7 @@
     [self performSelectorOnMainThread:@selector(removeIndicator)
                            withObject:nil
                         waitUntilDone:NO];
-    
+
     [pool release];
 }
 
@@ -165,12 +165,12 @@
     // remove the current preview and title
     [self setImage:nil forState:UIControlStateNormal];
     [self setTitle:nil forState:UIControlStateNormal];
-    
+
     // don't display preview on slower device, too slow and memory hog
     if (IS_NOT_POWERFUL([HWUtils modelType])) {
         [self setTitle:NSLocalizedString(@"Preview not available",@"") forState:UIControlStateNormal];
         [self turnOnWidgets];
-    } else {        
+    } else {
         // add a very nice spinning wheel
         UIActivityIndicatorView *indicator = [[UIActivityIndicatorView alloc]
                                               initWithActivityIndicatorStyle:UIActivityIndicatorViewStyleWhiteLarge];
@@ -179,7 +179,7 @@
         [indicator startAnimating];
         [self addSubview:indicator];
         [indicator release];
-        
+
         // let's draw in a separate thread so the gui can work; at the end it restore other widgets
         [NSThread detachNewThreadSelector:@selector(drawingThread) toTarget:self withObject:nil];
     }
--- a/project_files/HedgewarsMobile/Classes/PascalImports.h	Fri Jan 25 13:29:20 2013 +0400
+++ b/project_files/HedgewarsMobile/Classes/PascalImports.h	Tue Jan 29 10:10:23 2013 +0400
@@ -44,7 +44,7 @@
     int  HW_getMaxNumberOfTeams(void);
 
     void HW_memoryWarningCallback(void);
-    
+
 #ifdef __cplusplus
 }
 #endif
--- a/project_files/HedgewarsMobile/Classes/SavedGamesViewController.m	Fri Jan 25 13:29:20 2013 +0400
+++ b/project_files/HedgewarsMobile/Classes/SavedGamesViewController.m	Tue Jan 29 10:10:23 2013 +0400
@@ -203,12 +203,12 @@
         [self updateTable];
     NSString *oldFilePath = [NSString stringWithFormat:@"%@/%@",SAVES_DIRECTORY(),[self.listOfSavegames objectAtIndex:tagValue]];
     NSString *newFilePath = [NSString stringWithFormat:@"%@/%@.hws",SAVES_DIRECTORY(),textString];
-    
+
     if ([oldFilePath isEqualToString:newFilePath] == NO) {
         [[NSFileManager defaultManager] moveItemAtPath:oldFilePath toPath:newFilePath error:nil];
         [self.listOfSavegames replaceObjectAtIndex:tagValue withObject:[textString stringByAppendingString:@".hws"]];
     }
-    
+
 }
 
 #pragma mark -
--- a/project_files/HedgewarsMobile/Classes/SingleSchemeViewController.m	Fri Jan 25 13:29:20 2013 +0400
+++ b/project_files/HedgewarsMobile/Classes/SingleSchemeViewController.m	Tue Jan 29 10:10:23 2013 +0400
@@ -151,7 +151,7 @@
             editableCell.selectionStyle = UITableViewCellSelectionStyleNone;
             editableCell.imageView.image = nil;
             editableCell.detailTextLabel.text = nil;
-         
+
             if (row == 0) {
                 editableCell.textField.text = self.schemeName;
                 editableCell.textField.font = [UIFont boldSystemFontOfSize:[UIFont labelFontSize]];
@@ -199,7 +199,7 @@
                 if ([oneView isMemberOfClass:[UISlider class]]) {
                     cellSlider = (UISlider *)oneView;
                     break;
-                } 
+                }
             }
             cellSlider.tag = SLIDER_TAG + row;
             cellSlider.maximumValue = [[detail objectForKey:@"max"] floatValue];
@@ -244,7 +244,7 @@
             UISwitch *switcher = (UISwitch *)cell.accessoryView;
             switcher.tag = SWITCH_TAG + row;
             [switcher setOn:[[[self.schemeDictionary objectForKey:@"gamemod"] objectAtIndex:row] boolValue] animated:NO];
-            
+
             UIImage *image = [[UIImage alloc] initWithContentsOfFile:[NSString stringWithFormat:@"%@/btn%@.png",ICONS_DIRECTORY(),
                                                                       [[self.gameModifierArray objectAtIndex:row] objectForKey:@"image"]]];
             cell.imageView.image = image;
--- a/project_files/HedgewarsMobile/Classes/SingleTeamViewController.m	Fri Jan 25 13:29:20 2013 +0400
+++ b/project_files/HedgewarsMobile/Classes/SingleTeamViewController.m	Tue Jan 29 10:10:23 2013 +0400
@@ -69,7 +69,7 @@
                       NSLocalizedString(@"Level",@""),nil];
     self.secondaryItems = array;
     [array release];
-    
+
     // labels for the subtitles
     NSArray *moreArray = [[NSArray alloc] initWithObjects:
                           NSLocalizedString(@"Mark the death of your fallen warriors",@""),
@@ -295,35 +295,35 @@
             case 0: // grave
                 if (nil == gravesViewController)
                     gravesViewController = [[GravesViewController alloc] initWithStyle:UITableViewStyleGrouped];
-                
+
                 [gravesViewController setTeamDictionary:teamDictionary];
                 [self.navigationController pushViewController:gravesViewController animated:YES];
                 break;
             case 1: // voice
                 if (nil == voicesViewController)
                     voicesViewController = [[VoicesViewController alloc] initWithStyle:UITableViewStyleGrouped];
-                
+
                 [voicesViewController setTeamDictionary:teamDictionary];
                 [self.navigationController pushViewController:voicesViewController animated:YES];
                 break;
             case 2: // fort
                 if (nil == fortsViewController)
                     fortsViewController = [[FortsViewController alloc] initWithStyle:UITableViewStyleGrouped];
-                
+
                 [fortsViewController setTeamDictionary:teamDictionary];
                 [self.navigationController pushViewController:fortsViewController animated:YES];
                 break;
             case 3: // flag
                 if (nil == flagsViewController)
                     flagsViewController = [[FlagsViewController alloc] initWithStyle:UITableViewStyleGrouped];
-                
+
                 [flagsViewController setTeamDictionary:teamDictionary];
                 [self.navigationController pushViewController:flagsViewController animated:YES];
                 break;
             case 4: // level
                 if (nil == levelViewController)
                     levelViewController = [[LevelViewController alloc] initWithStyle:UITableViewStyleGrouped];
-                
+
                 [levelViewController setTeamDictionary:teamDictionary];
                 [self.navigationController pushViewController:levelViewController animated:YES];
                 break;
--- a/project_files/HedgewarsMobile/Classes/SingleWeaponViewController.m	Fri Jan 25 13:29:20 2013 +0400
+++ b/project_files/HedgewarsMobile/Classes/SingleWeaponViewController.m	Tue Jan 29 10:10:23 2013 +0400
@@ -31,38 +31,38 @@
 #pragma mark View lifecycle
 -(void) viewDidLoad {
     [super viewDidLoad];
-    
+
     NSString *trFilePath = [NSString stringWithFormat:@"%@/%@.txt",LOCALE_DIRECTORY(),[[NSLocale preferredLanguages] objectAtIndex:0]];
     // fill the data structure that we are going to read
     LoadLocaleWrapper([trFilePath UTF8String]);
-    
+
     quantity = (char *)malloc(sizeof(char)*(HW_getNumberOfWeapons()+1));
     probability = (char *)malloc(sizeof(char)*(HW_getNumberOfWeapons()+1));
     delay = (char *)malloc(sizeof(char)*(HW_getNumberOfWeapons()+1));
     crateness = (char *)malloc(sizeof(char)*(HW_getNumberOfWeapons()+1));
-    
+
     NSString *str = [NSString stringWithFormat:@"%@/AmmoMenu/Ammos.png",GRAPHICS_DIRECTORY()];
     UIImage *img = [[UIImage alloc] initWithContentsOfFile:str];
     self.ammoStoreImage = img;
     [img release];
-    
+
     self.title = NSLocalizedString(@"Edit weapons preferences",@"");
 }
 
 -(void) viewWillAppear:(BOOL) animated {
     [super viewWillAppear:animated];
-    
+
     NSString *ammoFile = [[NSString alloc] initWithFormat:@"%@/%@.plist",WEAPONS_DIRECTORY(),self.weaponName];
     NSDictionary *weapon = [[NSDictionary alloc] initWithContentsOfFile:ammoFile];
     [ammoFile release];
-    
+
     self.description = [weapon objectForKey:@"description"];
     const char *tmp1 = [[weapon objectForKey:@"ammostore_initialqt"] UTF8String];
     const char *tmp2 = [[weapon objectForKey:@"ammostore_probability"] UTF8String];
     const char *tmp3 = [[weapon objectForKey:@"ammostore_delay"] UTF8String];
     const char *tmp4 = [[weapon objectForKey:@"ammostore_crate"] UTF8String];
     [weapon release];
-    
+
     // if the new weaponset is diffrent from the older we need to update it replacing
     // the missing ammos with 0 quantity
     int oldlen = strlen(tmp1);
@@ -78,7 +78,7 @@
         delay[i] = '0';
         crateness[i] = '0';
     }
-    
+
     [self.tableView reloadData];
 }
 
@@ -92,20 +92,20 @@
     probability[HW_getNumberOfWeapons()] = '\0';
     delay[HW_getNumberOfWeapons()] = '\0';
     crateness[HW_getNumberOfWeapons()] = '\0';
-    
+
     NSString *quantityStr = [NSString stringWithUTF8String:quantity];
     NSString *probabilityStr = [NSString stringWithUTF8String:probability];
     NSString *delayStr = [NSString stringWithUTF8String:delay];
     NSString *cratenessStr = [NSString stringWithUTF8String:crateness];
-    
+
     NSDictionary *weapon = [[NSDictionary alloc] initWithObjectsAndKeys:
                             quantityStr,@"ammostore_initialqt",
                             probabilityStr,@"ammostore_probability",
                             delayStr,@"ammostore_delay",
-                            cratenessStr,@"ammostore_crate", 
+                            cratenessStr,@"ammostore_crate",
                             self.description,@"description",
                             nil];
-    
+
     NSString *ammoFile = [[NSString alloc] initWithFormat:@"%@/%@.plist",WEAPONS_DIRECTORY(),self.weaponName];
     [weapon writeToFile:ammoFile atomically:YES];
     [ammoFile release];
@@ -131,7 +131,7 @@
     static NSString *CellIdentifier1 = @"Cell1";
     NSInteger row = [indexPath row];
     UITableViewCell *cell = nil;
-    
+
     if (0 == [indexPath section]) {
         EditableCellView *editableCell = (EditableCellView *)[aTableView dequeueReusableCellWithIdentifier:CellIdentifier0];
         if (editableCell == nil) {
@@ -143,7 +143,7 @@
         editableCell.selectionStyle = UITableViewCellSelectionStyleNone;
         editableCell.imageView.image = nil;
         editableCell.detailTextLabel.text = nil;
-        
+
         if (row == 0) {
             editableCell.textField.text = self.weaponName;
             editableCell.textField.font = [UIFont boldSystemFontOfSize:[UIFont labelFontSize]];
--- a/project_files/HedgewarsMobile/Classes/SupportViewController.m	Fri Jan 25 13:29:20 2013 +0400
+++ b/project_files/HedgewarsMobile/Classes/SupportViewController.m	Tue Jan 29 10:10:23 2013 +0400
@@ -107,7 +107,7 @@
         [imgView release];
     }
     [img release];
-    
+
     return cell;
 }
 
@@ -150,7 +150,7 @@
         imgView.autoresizingMask = UIViewAutoresizingFlexibleLeftMargin | UIViewAutoresizingFlexibleRightMargin;
         [footer addSubview:imgView];
         [imgView release];
-        
+
         UILabel *label = [[UILabel alloc] initWithFrame:CGRectMake(0, 0, self.tableView.frame.size.width, 20)];
         label.autoresizingMask = UIViewAutoresizingFlexibleLeftMargin | UIViewAutoresizingFlexibleRightMargin;
         label.textAlignment = UITextAlignmentCenter;
@@ -159,7 +159,7 @@
         label.center = CGPointMake(self.tableView.frame.size.width/2, 250);
         [footer addSubview:label];
         [label release];
-        
+
         return [footer autorelease];
     } else
         return nil;
--- a/project_files/HedgewarsMobile/Classes/TeamConfigViewController.m	Fri Jan 25 13:29:20 2013 +0400
+++ b/project_files/HedgewarsMobile/Classes/TeamConfigViewController.m	Tue Jan 29 10:10:23 2013 +0400
@@ -150,7 +150,7 @@
 
         cell.textLabel.text = [[[self.listOfAllTeams objectAtIndex:[indexPath row]] objectForKey:@"team"] stringByDeletingPathExtension];
         cell.textLabel.backgroundColor = [UIColor clearColor];
-        
+
         NSString *teamPath = [NSString stringWithFormat:@"%@/%@.plist",TEAMS_DIRECTORY(),cell.textLabel.text];
         NSDictionary *firstHog = [[[NSDictionary dictionaryWithContentsOfFile:teamPath] objectForKey:@"hedgehogs"] objectAtIndex:0];
         if ([[firstHog objectForKey:@"level"] intValue] != 0) {
@@ -159,7 +159,7 @@
             [imgString release];
             UIImageView *spriteView = [[UIImageView alloc] initWithImage:sprite];
             [sprite release];
-            
+
             cell.accessoryView = spriteView;
             [spriteView release];
         } else
--- a/project_files/HedgewarsMobile/Classes/WeaponCellView.m	Fri Jan 25 13:29:20 2013 +0400
+++ b/project_files/HedgewarsMobile/Classes/WeaponCellView.m	Tue Jan 29 10:10:23 2013 +0400
@@ -159,7 +159,7 @@
 
     weaponIcon.frame = CGRectMake(5, 5, 32, 32);
     weaponName.frame = CGRectMake(45, 8, 200, 25);
-    
+
     helpLabel.frame = CGRectMake(200 + helpLabelOffset, 11, helpLabelLength, 20);
 
     // second line
@@ -212,7 +212,7 @@
 -(void) startDragging:(id) sender {
     UISlider *slider = (UISlider *)sender;
     NSString *str = nil;
-    
+
     switch (slider.tag) {
         case 100:
             str = NSLocalizedString(@"Initial quantity",@"ammo selection");
--- a/project_files/HedgewarsMobile/Locale/hw-desc_da.txt	Fri Jan 25 13:29:20 2013 +0400
+++ b/project_files/HedgewarsMobile/Locale/hw-desc_da.txt	Tue Jan 29 10:10:23 2013 +0400
@@ -4,7 +4,7 @@
 ✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭
 Hedgewars er tilgængeligt i Mac App Store! Søg efter Hedgewars på din Mac og få din GRATIS kopi i dag!
 ✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭
-✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭ 
+✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭
 
 iOS versionen har flere eksklusive funktioner, så som
 * iPad VGA-udgangssignal: tilslut en ekstern skærm og spil i fuld oplysning;
--- a/project_files/HedgewarsMobile/Locale/hw-desc_de.txt	Fri Jan 25 13:29:20 2013 +0400
+++ b/project_files/HedgewarsMobile/Locale/hw-desc_de.txt	Tue Jan 29 10:10:23 2013 +0400
@@ -4,7 +4,7 @@
 ✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭
 Hedgewars ist jetzt auch im Mac Appstore verfügbar! Suche Hedgewars von deinem Mac und bekomme deine GRATIS Kopie!
 ✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭
-✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭ 
+✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭
 
 Der iOS-Port hat einige exklusiven Features, wie z.B.:
 * iPad VGA-Ausgabe: Schließe einen externen Bildschirm an und spiele mit voller Auflösung;
--- a/project_files/HedgewarsMobile/Locale/hw-desc_en.txt	Fri Jan 25 13:29:20 2013 +0400
+++ b/project_files/HedgewarsMobile/Locale/hw-desc_en.txt	Tue Jan 29 10:10:23 2013 +0400
@@ -4,7 +4,7 @@
 ✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭
 Hedgewars is available for the Mac Appstore! Search Hedgewars on your Mac and get your FREE copy today!
 ✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭
-✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭ 
+✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭
 
 The iOS port has some exclusive features, such as
 * iPad VGA Out: hook an external display and play at full resolution;
--- a/project_files/HedgewarsMobile/Locale/hw-desc_es.txt	Fri Jan 25 13:29:20 2013 +0400
+++ b/project_files/HedgewarsMobile/Locale/hw-desc_es.txt	Tue Jan 29 10:10:23 2013 +0400
@@ -4,7 +4,7 @@
 ✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭
 ¡Hedgewars esta disponible en la Mac Appstore! ¡Busca Hedgewars en tu Mac y consigue tu copia gratuita hoy!
 ✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭
-✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭ 
+✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭
 
 La versión para iOS contiene algunas características exclusivas, como:
 * Salida VGA para iPad: conecta un monitor externo y juega a resolución completa;
--- a/project_files/HedgewarsMobile/Locale/hw-desc_fr.txt	Fri Jan 25 13:29:20 2013 +0400
+++ b/project_files/HedgewarsMobile/Locale/hw-desc_fr.txt	Tue Jan 29 10:10:23 2013 +0400
@@ -4,7 +4,7 @@
 ✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭
 Hedgewars est disponible sur le Mac Appstore ! Cherchez Hedgewars sur votre Mac et obtenez une copie gratuite aujourd'hui !
 ✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭
-✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭ 
+✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭
 
 Le portage vers iOS a quelques fonctionnalités exclusives, comme :
 * Sortie VGA de l'iPad: connectez un affichage externe et jouez à la résolution maximale;
--- a/project_files/HedgewarsMobile/Locale/hw-desc_it.txt	Fri Jan 25 13:29:20 2013 +0400
+++ b/project_files/HedgewarsMobile/Locale/hw-desc_it.txt	Tue Jan 29 10:10:23 2013 +0400
@@ -4,7 +4,7 @@
 ✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭
 Hedgewars è disponiile sul Mac Appstore! Cerca Hedgewars sul tuo Mac e scarica la tua copia gratuitamente!
 ✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭
-✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭ 
+✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭
 
 La verisone per iOS offre alcune fantastiche esclusive, come
 * iPad VGA Out: attacca un dispaly esterno e gioca a piena risoluzione;
--- a/project_files/HedgewarsMobile/Locale/hw-desc_pl.txt	Fri Jan 25 13:29:20 2013 +0400
+++ b/project_files/HedgewarsMobile/Locale/hw-desc_pl.txt	Tue Jan 29 10:10:23 2013 +0400
@@ -4,7 +4,7 @@
 ✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭
 Hedgewars jest dostępny na Mac Appstore! Poszukaj Hedgewars na swoim Mac'u i otrzymaj kopię za darmo!
 ✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭
-✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭ 
+✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭
 
 Port na iOS posiada kilka unikalnych funkcji, takich jak:
 * Wtyczka iPad VGA : podłącz zewnętrzny ekran i graj w pełnej rozdzielczości;
--- a/project_files/HedgewarsMobile/Locale/hw-desc_pt.txt	Fri Jan 25 13:29:20 2013 +0400
+++ b/project_files/HedgewarsMobile/Locale/hw-desc_pt.txt	Tue Jan 29 10:10:23 2013 +0400
@@ -4,7 +4,7 @@
 ✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭
 O Hedgewars está disponível na Mac App Store! Pesquisa Hedgewars no teu MacBook e obtém a tua cópia GRATUITA hoje!
 ✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭
-✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭ 
+✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭✭
 
 A versão para iOS tem algumas funcionalidades exclusivas, como
 * Saída VGA no iPad: liga-o a um ecrã externo e joga em resolução completa;
--- a/project_files/hedgewars.pro	Fri Jan 25 13:29:20 2013 +0400
+++ b/project_files/hedgewars.pro	Tue Jan 29 10:10:23 2013 +0400
@@ -93,7 +93,6 @@
     ../QTfrontend/sdlkeys.h \
     ../QTfrontend/ui/mouseoverfilter.h \
     ../QTfrontend/ui/widget/qpushbuttonwithsound.h \
-    ../QTfrontend/ui/page/pagefeedback.h \
     ../QTfrontend/model/roomslistmodel.h \
     ../QTfrontend/ui/dialog/input_password.h \
     ../QTfrontend/ui/widget/colorwidget.h \
--- a/share/Info.plist.in	Fri Jan 25 13:29:20 2013 +0400
+++ b/share/Info.plist.in	Tue Jan 29 10:10:23 2013 +0400
@@ -2,159 +2,159 @@
 <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
 <plist version="1.0">
 <dict>
-	<key>LSApplicationCategoryType</key>
-	<string>public.app-category.strategy-games</string>
-	<key>CFBundleName</key>
-	<string>Hedgewars</string>
-	<key>CFBundleExecutable</key>
-	<string>hedgewars</string>
-	<key>CFBundleGetInfoString</key>
-	<string>http://www.hedgewars.org</string>
-	<key>CFBundleIconFile</key>
-	<string>Icon.icns</string>
-	<key>CFBundleIdentifier</key>
-	<string>org.hedgewars.desktop</string>
-	<key>CFBundlePackageType</key>
-	<string>APPL</string>
-	<key>CFBundleSignature</key>
-	<string>Hedge</string>
-	<key>CFBundleVersion</key>
-	<string>${HEDGEWARS_REVISION}</string>
-	<key>CFBundleShortVersionString</key>
-	<string>${HEDGEWARS_VERSION}</string>
-	<key>NSHumanReadableCopyright</key>
-	<string>Copyright © 2004-2012, Hedgewars Project</string>
-	<key>NSAppleScriptEnabled</key>
-	<false/>
-	<key>LSRequiresNativeExecution</key>
-	<true/>
-	<key>LSMinimumSystemVersionByArchitecture</key>
-	<dict>
-		<key>x86_64</key>
-		<string>10.6.0</string>
-		<key>i386</key>
-		<string>10.4.0</string>
-		<key>ppc</key>
-		<string>10.4.0</string>
-	</dict>
-	<key>LSArchitecturePriority</key>
-	<array>
-		<string>x86_64</string>
-		<string>i386</string>
-		<string>ppc</string>
-	</array>
-	<key>LSMinimumSystemVersion</key>
-	<string>${minimum_macosx_version}</string>
-	<key>SUPublicDSAKeyFile</key>
-	<string>dsa_pub.pem</string>
-	<key>SUFeedURL</key>
-	<string>http://www.hedgewars.org/download/appcast.xml</string>
-	<key>CFBundleLocalizations</key>
-	<array>
-		<string>ar</string>
-		<string>bg</string>
-		<string>cs</string>
-		<string>da</string>
-		<string>de</string>
-		<string>el</string>
-		<string>en</string>
-		<string>es</string>
-		<string>fi</string>
-		<string>fr</string>
-		<string>gl</string>
-		<string>hu</string>
-		<string>it</string>
-		<string>ja</string>
-		<string>ko</string>
-		<string>lt</string>
-		<string>nl</string>
-		<string>pl</string>
-		<string>pt_BR</string>
-		<string>pt_PT</string>
-		<string>ro</string>
-		<string>ru</string>
-		<string>sk</string>
-		<string>sv</string>
-		<string>tr_TR</string>
-		<string>uk</string>
-		<string>zh_CN</string>
-		<string>zh_TW</string>
-	</array>
-	<key>UTExportedTypeDeclarations</key>
-	<array>
-		<dict>
-			<key>UTTypeIdentifier</key>
-			<string>org.hedgewars.desktop.hws</string>
-			<key>UTTypeReferenceURL</key>
-			<string>http://www.hedgewars.org/demos/</string>
-			<key>UTTypeDescription</key>
-			<string>Hedgewars Save Game</string>
-			<key>UTTypeIconFile</key>
-			<string>public.text.icns</string>
-			<key>UTTypeConformsTo</key>
-			<array>
-				<string>public.data</string>
-			</array>
-			<key>UTTypeTagSpecification</key>
-			<dict>
-				<key>public.filename-extension</key>
-				<array>
-					<string>hws</string>
-				</array>
-				<key>public.mime-type</key>
-				<string>application/x-hedgewars-save</string>
-			</dict>
-		</dict>
-		<dict>
-			<key>UTTypeIdentifier</key>
-			<string>org.hedgewars.desktop.hwd</string>
-			<key>UTTypeReferenceURL</key>
-			<string>http://www.hedgewars.org/demos/</string>
-			<key>UTTypeIconFile</key>
-			<string>public.text.icns</string>
-			<key>UTTypeDescription</key>
-			<string>Hedgewars Demo Game</string>
-			<key>UTTypeConformsTo</key>
-			<array>
-				<string>public.data</string>
-			</array>
-			<key>UTTypeTagSpecification</key>
-			<dict>
-				<key>public.filename-extension</key>
-				<array>
-					<string>hwd</string>
-				</array>
-				<key>public.mime-type</key>
-				<string>application/x-hedgewars-demo</string>
-			</dict>
-		</dict>
-	</array>
-	<key>CFBundleDocumentTypes</key>
-	<array>
-		<dict>
-			<key>CFBundleTypeIconFile</key>
-			<string>hwico.icns</string>
-			<key>CFBundleTypeName</key>
-			<string>Hedgewars Savefile</string>
-			<key>LSItemContentTypes</key>
-			<array>
-				<string>org.hedgewars.desktop.hws</string>
-			</array>
-			<key>CFBundleTypeRole</key>
-			<string>Editor</string>
-		</dict>
-		<dict>
-			<key>CFBundleTypeIconFile</key>
-			<string>hwico.icns</string>
-			<key>CFBundleTypeName</key>
-			<string>Hedgewars Demofile</string>
-			<key>LSItemContentTypes</key>
-			<array>
-				<string>org.hedgewars.desktop.hwd</string>
-			</array>
-			<key>CFBundleTypeRole</key>
-			<string>Viewer</string>
-		</dict>
-	</array>
+    <key>LSApplicationCategoryType</key>
+    <string>public.app-category.strategy-games</string>
+    <key>CFBundleName</key>
+    <string>Hedgewars</string>
+    <key>CFBundleExecutable</key>
+    <string>hedgewars</string>
+    <key>CFBundleGetInfoString</key>
+    <string>http://www.hedgewars.org</string>
+    <key>CFBundleIconFile</key>
+    <string>Icon.icns</string>
+    <key>CFBundleIdentifier</key>
+    <string>org.hedgewars.desktop</string>
+    <key>CFBundlePackageType</key>
+    <string>APPL</string>
+    <key>CFBundleSignature</key>
+    <string>Hedge</string>
+    <key>CFBundleVersion</key>
+    <string>${HEDGEWARS_REVISION}</string>
+    <key>CFBundleShortVersionString</key>
+    <string>${HEDGEWARS_VERSION}</string>
+    <key>NSHumanReadableCopyright</key>
+    <string>Copyright © 2004-2012, Hedgewars Project</string>
+    <key>NSAppleScriptEnabled</key>
+    <false/>
+    <key>LSRequiresNativeExecution</key>
+    <true/>
+    <key>LSMinimumSystemVersionByArchitecture</key>
+    <dict>
+        <key>x86_64</key>
+        <string>10.6.0</string>
+        <key>i386</key>
+        <string>10.4.0</string>
+        <key>ppc</key>
+        <string>10.4.0</string>
+    </dict>
+    <key>LSArchitecturePriority</key>
+    <array>
+        <string>x86_64</string>
+        <string>i386</string>
+        <string>ppc</string>
+    </array>
+    <key>LSMinimumSystemVersion</key>
+    <string>${minimum_macosx_version}</string>
+    <key>SUPublicDSAKeyFile</key>
+    <string>dsa_pub.pem</string>
+    <key>SUFeedURL</key>
+    <string>http://www.hedgewars.org/download/appcast.xml</string>
+    <key>CFBundleLocalizations</key>
+    <array>
+        <string>ar</string>
+        <string>bg</string>
+        <string>cs</string>
+        <string>da</string>
+        <string>de</string>
+        <string>el</string>
+        <string>en</string>
+        <string>es</string>
+        <string>fi</string>
+        <string>fr</string>
+        <string>gl</string>
+        <string>hu</string>
+        <string>it</string>
+        <string>ja</string>
+        <string>ko</string>
+        <string>lt</string>
+        <string>nl</string>
+        <string>pl</string>
+        <string>pt_BR</string>
+        <string>pt_PT</string>
+        <string>ro</string>
+        <string>ru</string>
+        <string>sk</string>
+        <string>sv</string>
+        <string>tr_TR</string>
+        <string>uk</string>
+        <string>zh_CN</string>
+        <string>zh_TW</string>
+    </array>
+    <key>UTExportedTypeDeclarations</key>
+    <array>
+        <dict>
+            <key>UTTypeIdentifier</key>
+            <string>org.hedgewars.desktop.hws</string>
+            <key>UTTypeReferenceURL</key>
+            <string>http://www.hedgewars.org/demos/</string>
+            <key>UTTypeDescription</key>
+            <string>Hedgewars Save Game</string>
+            <key>UTTypeIconFile</key>
+            <string>public.text.icns</string>
+            <key>UTTypeConformsTo</key>
+            <array>
+                <string>public.data</string>
+            </array>
+            <key>UTTypeTagSpecification</key>
+            <dict>
+                <key>public.filename-extension</key>
+                <array>
+                    <string>hws</string>
+                </array>
+                <key>public.mime-type</key>
+                <string>application/x-hedgewars-save</string>
+            </dict>
+        </dict>
+        <dict>
+            <key>UTTypeIdentifier</key>
+            <string>org.hedgewars.desktop.hwd</string>
+            <key>UTTypeReferenceURL</key>
+            <string>http://www.hedgewars.org/demos/</string>
+            <key>UTTypeIconFile</key>
+            <string>public.text.icns</string>
+            <key>UTTypeDescription</key>
+            <string>Hedgewars Demo Game</string>
+            <key>UTTypeConformsTo</key>
+            <array>
+                <string>public.data</string>
+            </array>
+            <key>UTTypeTagSpecification</key>
+            <dict>
+                <key>public.filename-extension</key>
+                <array>
+                    <string>hwd</string>
+                </array>
+                <key>public.mime-type</key>
+                <string>application/x-hedgewars-demo</string>
+            </dict>
+        </dict>
+    </array>
+    <key>CFBundleDocumentTypes</key>
+    <array>
+        <dict>
+            <key>CFBundleTypeIconFile</key>
+            <string>hwico.icns</string>
+            <key>CFBundleTypeName</key>
+            <string>Hedgewars Savefile</string>
+            <key>LSItemContentTypes</key>
+            <array>
+                <string>org.hedgewars.desktop.hws</string>
+            </array>
+            <key>CFBundleTypeRole</key>
+            <string>Editor</string>
+        </dict>
+        <dict>
+            <key>CFBundleTypeIconFile</key>
+            <string>hwico.icns</string>
+            <key>CFBundleTypeName</key>
+            <string>Hedgewars Demofile</string>
+            <key>LSItemContentTypes</key>
+            <array>
+                <string>org.hedgewars.desktop.hwd</string>
+            </array>
+            <key>CFBundleTypeRole</key>
+            <string>Viewer</string>
+        </dict>
+    </array>
 </dict>
 </plist>
--- a/share/hedgewars/Data/Fonts/CMakeLists.txt	Fri Jan 25 13:29:20 2013 +0400
+++ b/share/hedgewars/Data/Fonts/CMakeLists.txt	Tue Jan 29 10:10:23 2013 +0400
@@ -1,4 +1,4 @@
 install(FILES
-	DejaVuSans-Bold.ttf
+    DejaVuSans-Bold.ttf
     wqy-zenhei.ttc
-	DESTINATION ${SHAREPATH}Data/Fonts)
+    DESTINATION ${SHAREPATH}Data/Fonts)
--- a/share/hedgewars/Data/Forts/CMakeLists.txt	Fri Jan 25 13:29:20 2013 +0400
+++ b/share/hedgewars/Data/Forts/CMakeLists.txt	Tue Jan 29 10:10:23 2013 +0400
@@ -1,7 +1,7 @@
-file(GLOB FortSprites *L.png *R.png) 
+file(GLOB FortSprites *L.png *R.png)
 list(REMOVE_ITEM FortSprites *@2x.png)
 list(REMOVE_ITEM FortSprites *-icon.png)
 
 install(FILES
-	${FortSprites}
-	DESTINATION ${SHAREPATH}Data/Forts)
+    ${FortSprites}
+    DESTINATION ${SHAREPATH}Data/Forts)
--- a/share/hedgewars/Data/Graphics/AmmoMenu/CMakeLists.txt	Fri Jan 25 13:29:20 2013 +0400
+++ b/share/hedgewars/Data/Graphics/AmmoMenu/CMakeLists.txt	Tue Jan 29 10:10:23 2013 +0400
@@ -1,5 +1,5 @@
 file(GLOB AmmoMenuSprites *.png)
 
 install(FILES
-	${AmmoMenuSprites}
-	DESTINATION ${SHAREPATH}Data/Graphics/AmmoMenu)
+    ${AmmoMenuSprites}
+    DESTINATION ${SHAREPATH}Data/Graphics/AmmoMenu)
--- a/share/hedgewars/Data/Graphics/CMakeLists.txt	Fri Jan 25 13:29:20 2013 +0400
+++ b/share/hedgewars/Data/Graphics/CMakeLists.txt	Tue Jan 29 10:10:23 2013 +0400
@@ -6,9 +6,9 @@
 add_subdirectory(SuddenDeath)
 add_subdirectory(Missions)
 
-file(GLOB BaseSprites *.png) 
+file(GLOB BaseSprites *.png)
 list(REMOVE_ITEM BaseSprites *@2x.png)
 
 install(FILES
-	${BaseSprites}
-	DESTINATION ${SHAREPATH}Data/Graphics)
+    ${BaseSprites}
+    DESTINATION ${SHAREPATH}Data/Graphics)
--- a/share/hedgewars/Data/Graphics/Flags/CMakeLists.txt	Fri Jan 25 13:29:20 2013 +0400
+++ b/share/hedgewars/Data/Graphics/Flags/CMakeLists.txt	Tue Jan 29 10:10:23 2013 +0400
@@ -1,5 +1,5 @@
-file(GLOB FlagTemplates *.png) 
+file(GLOB FlagTemplates *.png)
 
 install(FILES
-	${FlagTemplates}
-	DESTINATION ${SHAREPATH}Data/Graphics/Flags)
+    ${FlagTemplates}
+    DESTINATION ${SHAREPATH}Data/Graphics/Flags)
Binary file share/hedgewars/Data/Graphics/Flags/cm_belarus.png has changed
--- a/share/hedgewars/Data/Graphics/Graves/CMakeLists.txt	Fri Jan 25 13:29:20 2013 +0400
+++ b/share/hedgewars/Data/Graphics/Graves/CMakeLists.txt	Tue Jan 29 10:10:23 2013 +0400
@@ -1,5 +1,5 @@
-file(GLOB GraveSprites *.png) 
+file(GLOB GraveSprites *.png)
 
 install(FILES
-	${GraveSprites}
-	DESTINATION ${SHAREPATH}Data/Graphics/Graves)
+    ${GraveSprites}
+    DESTINATION ${SHAREPATH}Data/Graphics/Graves)
--- a/share/hedgewars/Data/Graphics/Hats/CMakeLists.txt	Fri Jan 25 13:29:20 2013 +0400
+++ b/share/hedgewars/Data/Graphics/Hats/CMakeLists.txt	Tue Jan 29 10:10:23 2013 +0400
@@ -3,5 +3,5 @@
 file(GLOB HatSprites *.png)
 
 install(FILES
-	${HatSprites}
-	DESTINATION ${SHAREPATH}Data/Graphics/Hats)
+    ${HatSprites}
+    DESTINATION ${SHAREPATH}Data/Graphics/Hats)
--- a/share/hedgewars/Data/Graphics/Hats/Reserved/CMakeLists.txt	Fri Jan 25 13:29:20 2013 +0400
+++ b/share/hedgewars/Data/Graphics/Hats/Reserved/CMakeLists.txt	Tue Jan 29 10:10:23 2013 +0400
@@ -1,5 +1,5 @@
 file(GLOB HatSprites *.png)
 
 install(FILES
-	${HatSprites}
-	DESTINATION ${SHAREPATH}Data/Graphics/Hats/Reserved)
+    ${HatSprites}
+    DESTINATION ${SHAREPATH}Data/Graphics/Hats/Reserved)
--- a/share/hedgewars/Data/Graphics/Hedgehog/CMakeLists.txt	Fri Jan 25 13:29:20 2013 +0400
+++ b/share/hedgewars/Data/Graphics/Hedgehog/CMakeLists.txt	Tue Jan 29 10:10:23 2013 +0400
@@ -1,5 +1,5 @@
 file(GLOB HedgehogSprites *.png)
 
 install(FILES
-	${HedgehogSprites}
-	DESTINATION ${SHAREPATH}Data/Graphics/Hedgehog)
+    ${HedgehogSprites}
+    DESTINATION ${SHAREPATH}Data/Graphics/Hedgehog)
--- a/share/hedgewars/Data/Graphics/Missions/Training/CMakeLists.txt	Fri Jan 25 13:29:20 2013 +0400
+++ b/share/hedgewars/Data/Graphics/Missions/Training/CMakeLists.txt	Tue Jan 29 10:10:23 2013 +0400
@@ -1,5 +1,5 @@
 file(GLOB MissionPics *@2x.png)
 
 install(FILES
-	${MissionPics}
-	DESTINATION ${SHAREPATH}Data/Graphics/Missions/Training)
+    ${MissionPics}
+    DESTINATION ${SHAREPATH}Data/Graphics/Missions/Training)
--- a/share/hedgewars/Data/Graphics/SuddenDeath/CMakeLists.txt	Fri Jan 25 13:29:20 2013 +0400
+++ b/share/hedgewars/Data/Graphics/SuddenDeath/CMakeLists.txt	Tue Jan 29 10:10:23 2013 +0400
@@ -1,5 +1,5 @@
 file(GLOB Sprites *.png)
 
 install(FILES
-	${Sprites}
-	DESTINATION ${SHAREPATH}Data/Graphics/SuddenDeath)
+    ${Sprites}
+    DESTINATION ${SHAREPATH}Data/Graphics/SuddenDeath)
--- a/share/hedgewars/Data/Locale/CMakeLists.txt	Fri Jan 25 13:29:20 2013 +0400
+++ b/share/hedgewars/Data/Locale/CMakeLists.txt	Tue Jan 29 10:10:23 2013 +0400
@@ -6,17 +6,17 @@
 
 QT4_ADD_TRANSLATION(QM ${tsfiles})
 
-add_custom_target (release-translation ALL 
-		DEPENDS ${QM}
-		COMMENT "Compiling ts files"
+add_custom_target (release-translation ALL
+        DEPENDS ${QM}
+        COMMENT "Compiling ts files"
 )
 
 install(FILES
-	${txttrans2}
-	${txttrans5}
-	${QM}
-	${luafiles}
-	${missionfiles}
-	DESTINATION ${SHAREPATH}Data/Locale
+    ${txttrans2}
+    ${txttrans5}
+    ${QM}
+    ${luafiles}
+    ${missionfiles}
+    DESTINATION ${SHAREPATH}Data/Locale
 )
 
--- a/share/hedgewars/Data/Locale/cs.txt	Fri Jan 25 13:29:20 2013 +0400
+++ b/share/hedgewars/Data/Locale/cs.txt	Tue Jan 29 10:10:23 2013 +0400
@@ -506,7 +506,7 @@
 04:51=Získat ve volném záběru vrhá kouli bláta.|Žihadla bit, a srazí prasata zpět.
 04:52=NEPOUŽITO
 04:53=Vydejte se na dobrodružství v Äase a prostoru,|pÅ™iÄemž vaÅ¡i kamarádi bojovat dál sám.|Být pÅ™ipraven vrátit kdykoliv,|nebo náhlé smrti nebo pokud jsou vÅ¡ichni poraženi.|Prohlášení. Nefunguje v náhlé smrti,|Pokud jste sami, nebo jste-li král.
-04:54=NEÚPLNà                 
+04:54=NEÚPLNÃ
 04:55=Sprej proud lepkavými vloÄkami.|StavÄ›t mosty, pohÅ™bít nepřátele, utÄ›snÄ›ní tunely.|BuÄte opatrní, nechcete dostat každý z vás!
 
 ; Game goal strings
--- a/share/hedgewars/Data/Locale/da.txt	Fri Jan 25 13:29:20 2013 +0400
+++ b/share/hedgewars/Data/Locale/da.txt	Tue Jan 29 10:10:23 2013 +0400
@@ -505,7 +505,7 @@
 04:51=Få et skud lige ind med en Mudderklat.|Bider en smule og slår fjender omkuld.
 04:52=UBRUGT
 04:53=Tag på et eventyr gennem tid og rum,|mens du efterlader kampen til dine kammerater.|Vær klar til at vende tilbage når som helst,|eller hvis Pludselig Død indtræder|eller alle dine andre pindsvin dør.|Advarsel! Virker ikke under Pludselig Død,|hvis du er alene eller er Konge.
-04:54=UFÆRDIG                                                                                                                                    
+04:54=UFÆRDIG
 04:55=Sprøjt rundt med klistrende flammer.|Byg broer, begrav fjender, luk tunneler af.|Pas på ikke selv at få noget på dig.
 
 ; Game goal strings
--- a/share/hedgewars/Data/Locale/el.txt	Fri Jan 25 13:29:20 2013 +0400
+++ b/share/hedgewars/Data/Locale/el.txt	Tue Jan 29 10:10:23 2013 +0400
@@ -164,7 +164,7 @@
 02:01=Ο %1 βÏήκε την χαμένη πόλη της Ατλαντίδας!
 02:01=Ο %1 έγινε Ï„Ïοφή για τα ψάÏια!
 02:01=Του %1 δεν του αÏέσουν τα αθλήματα του νεÏοÏ!
-02:01=Ο %1 έπÏεπε να φέÏει τη σχεδία του! 
+02:01=Ο %1 έπÏεπε να φέÏει τη σχεδία του!
 02:01=Ο %1 πιστεÏει ότι το θαλασσινό νεÏÏŒ κάνει καλό στο δέÏμα!
 02:01=Ο %1 βάζει αλάτι στις πληγές του!
 02:01=Ο %1 πάει ταξίδι στην άβυσσο!
@@ -187,10 +187,10 @@
 02:02=ΣυνέτÏιψε τους εχθÏοÏÏ‚ σου!
 02:02=Ας νικήσει ο καλÏτεÏος σκαντζόχοιÏος!
 02:02=Îίκη ή θάνατος!
-02:02=Τα λάφυÏα πάνε στο νικητή! 
+02:02=Τα λάφυÏα πάνε στο νικητή!
 02:02=Η ήττα δεν είναι επιλογή!
 02:02=ΣκοÏπίστε τον όλεθÏο!
-02:02=Αφέθηκαν ελεÏθεÏοι οι σκαντζόχοιÏοι του πολέμου! 
+02:02=Αφέθηκαν ελεÏθεÏοι οι σκαντζόχοιÏοι του πολέμου!
 02:02=Hedgewars, σας Ï€ÏοσφέÏεται από το Hedgewars.org
 02:02=ΑΑΑΑΕΕΕΕΕΕΡΡΡΡΡΑΑΑΑΑΑΑΑΑΑΑΑΑΑΑ.....
 02:02=Είσαι Ï€Î¿Î»Ï Ï„Ï…Ï‡ÎµÏός αν δεν είσαι εναντίων του Tiyuri!
@@ -486,7 +486,7 @@
 
 ; Game goal strings
 05:00=Κανόνες ΠαιχνιδιοÏ
-05:01=ΙσχÏουν οι ακόλουθοι κανόνες : 
+05:01=ΙσχÏουν οι ακόλουθοι κανόνες :
 05:02=ΦÏοÏÏια : ΥπεÏασπιστείτε το φÏοÏÏιό σας, συντÏίψτε τους εχθÏοÏÏ‚ σας!
 05:03=ΜικÏοβαÏÏτητα : ΠÏοσέξτε Ï€Î¿Ï Ï€Î±Ï„Î¬Ï„Îµ!
 05:04=Ασπίδα: Οι σκαντζόχοιÏοι είναι (σχεδόν) άτÏωτοι.
--- a/share/hedgewars/Data/Locale/en.txt	Fri Jan 25 13:29:20 2013 +0400
+++ b/share/hedgewars/Data/Locale/en.txt	Tue Jan 29 10:10:23 2013 +0400
@@ -508,7 +508,7 @@
 04:51=Get in a free shot by hurling a ball of mud.|Stings a bit, and knocks hogs back.
 04:52=UNUSED
 04:53=Take a trip through time and space,|while leaving your comrades to fight on alone.|Be prepared to return at any time,|or for Sudden Death or if they are all defeated.|Disclaimer. Does not function in Sudden Death,|if you are alone, or if you are a King.
-04:54=INCOMPLETE                                                                                                                                     
+04:54=INCOMPLETE
 04:55=Spray a stream of sticky flakes.|Build bridges, bury enemies, seal off tunnels.|Be careful you don't get any on you!
 
 ; Game goal strings
--- a/share/hedgewars/Data/Locale/es.txt	Fri Jan 25 13:29:20 2013 +0400
+++ b/share/hedgewars/Data/Locale/es.txt	Tue Jan 29 10:10:23 2013 +0400
@@ -504,7 +504,7 @@
 04:51=¿Qué hay más barato que el barro?|Un tiro gratis gracias a la bola de barro.|Hará que el enemigo salga volando|y escuece un poco si te entra en los ojos.
 04:52=SIN USAR
 04:53=Vive una trepidante aventura a través del|espacio y el tiempo mientras tus compañeros|siguen luchando en tu lugar.|Estate preparado para volver en cualquier momento,|o al llegar la Muerte súbita si te has quedado solo.|Aviso: no funciona durante la Muerte súbita,|si estás solo o si eres el rey.
-04:54=INCOMPLETO                                                                                                                                     
+04:54=INCOMPLETO
 04:55=Esparce un chorro de pegajoso barro.|Construye puentes, entierra enemigos o cierra túneles.|¡Ten especial cuidado de no mancharte!
 
 ; Game goal strings
--- a/share/hedgewars/Data/Locale/fi.txt	Fri Jan 25 13:29:20 2013 +0400
+++ b/share/hedgewars/Data/Locale/fi.txt	Tue Jan 29 10:10:23 2013 +0400
@@ -416,18 +416,18 @@
 04:01=Hyökkää sirpalepommilla.|Se jakaantuu pienemmiksi pommeiksi ajan|loppuessa ajastimesta|1-5: Säädä kranaatin ajastin|Hyökkää: Pidä pohjassa lisätäksesi heittovoimaa
 04:02=Hyökkää ballistisella ammuksella|johon tuuli saattaa vaikuttaa|Hyökkää: Pidä pohjassa lisätäksesi voimaa
 04:03=Laukaise ohjattu mehiläinen joka lukittuu|valittuun kohteeseen. Älä ammu täydellä voimalla|lisätäksesi tarkkuutta|Kursori: Valitse kohde|Hyökkää: Pidä pohjassa lisätäksesi voimaa
-04:04=Ammu vihollisiasi kahdesti laukeavalla haulikolla.|Kiitos leviämisen sinun ei tarvitse tähdätä suoraan|vahingoittaeksi vihollisiasi.|Hyökkää: Ammu (useita kertoja)                   
+04:04=Ammu vihollisiasi kahdesti laukeavalla haulikolla.|Kiitos leviämisen sinun ei tarvitse tähdätä suoraan|vahingoittaeksi vihollisiasi.|Hyökkää: Ammu (useita kertoja)
 04:05=Siirry maan alle! Käytä maaporaa porataksesi|reiän maahan päästäksesi muille alueille.|Hyökkää: Aloita ja lopeta kaivaminen
 04:06=Tylsää? Ei mitään tapaa hyökätä? Säästät ammuksiasi?|Ei hätää! Jätä vuoro väliin, pelkuri!|Hyökkää: Jätä vuorosi väliin ilman tappelua
 04:07=Ylitä pitkiä välimatkoja|hyvin ajoitetuilla laukauksilla ja köydellä.|Käytä momenttiasi liukuaksesi muiden siilien sekaan|tai pudota kranaatteja ja muita aseita niiden päälle.|Hyökkää: Ammu ja irroita köysi|Pitkä hyppy: Pudota kranaatteja ja vastaavia aseita
 04:08=Pidä viholliset kaukana pudottamalla miina|kapeille käytäville tai suoraan niiden jalkojen juureen.|Pakene ennen kuin aktivoit sen itse!|Hyökkää: Pudota miina viereesi
 04:09=Oletko epävarma tähtäyksestäsi? Käytä Desert|Eaglea hyökätäksesi neljällä laukauksella| Hyökkää: Ammu (useita kertoja)
-04:10=Raaka voima on aina vaihtoehto. Käytä tätä klassista|räjähdettä vihollisiis ja pakene.|Hyökkää: Pudota dynamiitti viereesi                                                             
+04:10=Raaka voima on aina vaihtoehto. Käytä tätä klassista|räjähdettä vihollisiis ja pakene.|Hyökkää: Pudota dynamiitti viereesi
 04:11=Hankkiudu vihollissiileistä eroon lyömällä ne mailalla|kartan ulkopuolelle tai veteen. Tai miten olisi|muutaman miinan lyöminen kavereillesi?|Hyökkää: Lyö kaikkia edessä olevia
-04:12=Mene henkilökohtaisuuksiin vapauttamalla|tämän melkein tappavan kamppailulajitekniikan voimat.|Hyökkää: Suorita Fire Punch                                                                           
-04:13=UNUSED                                                                                                                                                                                             
+04:12=Mene henkilökohtaisuuksiin vapauttamalla|tämän melkein tappavan kamppailulajitekniikan voimat.|Hyökkää: Suorita Fire Punch
+04:13=UNUSED
 04:14=Korkean paikan kammo? Parempi ottaa laskuvarjo.|Se avautuu kun putoat liian kauas|ja pelastaa siilen putoamisvaurioilta.|Hyökkää: Avaa laskuvarjo
-04:15=Kutsu lentokone hyökkäämään vihollisiasi päin|pommituslennolla|Vasen/Oikea: Valitse suunta|Osoitin: Valitse kohdealue                                                              
+04:15=Kutsu lentokone hyökkäämään vihollisiasi päin|pommituslennolla|Vasen/Oikea: Valitse suunta|Osoitin: Valitse kohdealue
 04:16=Kutsu lentokone pudottaaman useita miinoja kohdealueelle|Vasen/Oikea: Valitse hyökkäyssuunta|Osoitin: Valitse kohdealue
 04:17=Tarvitsetko suojaa? Käytä puhalluslamppua kaivaaksesi|tunnelin maahan saadaksesi suojaa|Hyökkää: Aloita ja lopeta kaivaminen
 04:18=Tarvitsetko suojaa vai haluatko ylittää|ylittämättömän maa-alueen? Sijoita muutamia palkkeja kuten haluat|Vasen/Oikea: Valitse asetettava palkki|Osoitin: Sijoita palkki sallittuun kohtaan
@@ -436,7 +436,7 @@
 04:21=Ammu kranaatin kaltainen ammus|joka vapauttaa useita pommeja osuessaan|Hyökkää: Ammu täydellä voimalla
 04:22=Ei vain Indiana Jonesille! Piiska on hyödyllinen ase|useissa tilanteissa. Erityisesti|jos haluat sysätä jonkun alas kielekkeeltä|Hyökkää: Iske kaikkea edessäsi olevaa
 04:23=Jos sinulla ei ole mitään menettävää|tämä saattaa olla melko kätevä.|Uhraa siilesi laukaisemalla se|valittuun suuntan vahingottaen kaikkea tiellä olevaa räjähtäen lopussa|Hyökkää: Laukaise tuhoisa ja tappava hyökkäys
-04:24=Hyvää syntymäpäivää! Laukaise tämä kakku ja anna sen kävellä|vihollistesi viereen ja järjestä heille räjähtävät kekkerit.|Tämä kakku voi ylittää melkein minkä tahansa maaston|Mutta se saattaa räjähtää matkalla|Hyökkää: Laukaise kakku tai anna sen pysähtyä ja räjähtää                                      
+04:24=Hyvää syntymäpäivää! Laukaise tämä kakku ja anna sen kävellä|vihollistesi viereen ja järjestä heille räjähtävät kekkerit.|Tämä kakku voi ylittää melkein minkä tahansa maaston|Mutta se saattaa räjähtää matkalla|Hyökkää: Laukaise kakku tai anna sen pysähtyä ja räjähtää
 04:25=Käytä tätä naamioitumispakkausta saadaksesi vihollisesi|hyppäämään halatakseen (ja sitten putoamaan kuoppaan tai reikään).|Hyökkää: Käytä pakkausta ja yritä vietellä toinen siili
 04:26=Heitä tämä mehukas vesimeloni vihollsiasi kohti|Kun ajastimesta loppuu aika, se hajoaa useiksi|räjähtäviksi palasiksi.|1-5: säädä vesimelonin ajastinta|Hyökkää: Pidä pohjassa lisätäksesi voimaa
 04:27=Anna helvetin tulen sataa vihollistesi päälle käyttämällä tätä|pirullista räjähdettä. Älä mene liian lähelle tätä räjähdettä|koska pienemmät tulet saattavat kestää pitempään.|Hyökkää: Pidä pohjassa ampuaksesi voimakkaammin
--- a/share/hedgewars/Data/Locale/fr.txt	Fri Jan 25 13:29:20 2013 +0400
+++ b/share/hedgewars/Data/Locale/fr.txt	Tue Jan 29 10:10:23 2013 +0400
@@ -351,113 +351,113 @@
 02:10=Hors du parc !
 02:10=Coup gagnant !
 02:10=I believe I can FLY ! I believe I can... *boum*
-; Weapon Categories 
-03:00=Grenade à retardement 
-03:01=Grenade à retardement 
-03:02=Arme balistique 
-03:03=Arme téléguidée 
-03:04=Fusil (plusieurs coups) 
-03:05=Engin excavateur 
-03:06=Action 
-03:07=Véhicule utilitaire 
-03:08=Bombe de proximité 
-03:09=Révolver (à plusieurs coups) 
-03:10=BOUM! 
-03:11=Bonk! 
-03:12=Arts martiaux 
-03:13=Non Utilisé 
-03:14=Véhicule utilitaire 
-03:15=Attaque aéroportée 
-03:16=Attaque aéroportée 
-03:17=Engin excavateur 
-03:18=Utilitaire 
-03:19=Véhicule utilitaire 
-03:20=Action 
-03:21=Engin balistique 
-03:22=Appelez-moi Indiana ! 
-03:23=Arts (vraiment) martiaux ! 
-03:24=Le gâteau n'est PAS un mensonge ! 
-03:25=Déguisement 
-03:26=Grenade à fragmentation 
-03:27=Grenade infernale 
-03:28=Missile balistique 
-03:29=Missile balistique 
-03:30=Attaque aéroportée 
-03:31=Bombe à déclenchement télécommandé 
-03:32=Effet temporaire 
-03:33=Effet temporaire 
-03:34=Effet temporaire 
-03:35=Effet temporaire 
-03:36=Effet temporaire 
-03:37=Effet temporaire 
-03:38=Fusil (à coups multiples) 
-03:39=Moyen de transport 
-03:40=Grenade incendiaire 
+; Weapon Categories
+03:00=Grenade à retardement
+03:01=Grenade à retardement
+03:02=Arme balistique
+03:03=Arme téléguidée
+03:04=Fusil (plusieurs coups)
+03:05=Engin excavateur
+03:06=Action
+03:07=Véhicule utilitaire
+03:08=Bombe de proximité
+03:09=Révolver (à plusieurs coups)
+03:10=BOUM!
+03:11=Bonk!
+03:12=Arts martiaux
+03:13=Non Utilisé
+03:14=Véhicule utilitaire
+03:15=Attaque aéroportée
+03:16=Attaque aéroportée
+03:17=Engin excavateur
+03:18=Utilitaire
+03:19=Véhicule utilitaire
+03:20=Action
+03:21=Engin balistique
+03:22=Appelez-moi Indiana !
+03:23=Arts (vraiment) martiaux !
+03:24=Le gâteau n'est PAS un mensonge !
+03:25=Déguisement
+03:26=Grenade à fragmentation
+03:27=Grenade infernale
+03:28=Missile balistique
+03:29=Missile balistique
+03:30=Attaque aéroportée
+03:31=Bombe à déclenchement télécommandé
+03:32=Effet temporaire
+03:33=Effet temporaire
+03:34=Effet temporaire
+03:35=Effet temporaire
+03:36=Effet temporaire
+03:37=Effet temporaire
+03:38=Fusil (à coups multiples)
+03:39=Moyen de transport
+03:40=Grenade incendiaire
 03:41=Un supporter enragé de Squawks
 
-; Weapon Descriptions (use | as line breaks) 
-04:00=Attaquez vos ennemis en utilisant une simple grenade.|Elle explosera une fois que le compte à rebours atteindra zéro.|1-5: Lancez le minuteur de la grenade|Attaque : maintenez pour la lancer avec plus de force 
-04:01=Attaquez vos ennemis en utilisant une bombe à retardement.|Elle se désintégrera en de multiples petites bombes |quand le compte à rebours atteindra zéro|1-5 : Lancez le minuteur de la grenade|Attaque : maintenez pour la lancer avec plus de force 
-04:02=Attaquez vos ennemis en utilisant un missile balistique|subissant l'influence du vent.|Attaque : maintenez pour tirer avec plus de force 
-04:03=Lancez une bombe téléguidée qui se verrouillera|sur la cible choisie. Ne tirez pas à pleine puissance|pour une meilleure précision.|Curseur : choix de la cible|Attaque : maintenez pour tirer avec plus de force 
-04:04=Attaquez votre ennemi en utilisant un fusil à deux coups.|Grâce à son pouvoir de dispersion vous n'avez pas besoin de frapper directement sur la cible|pour toucher votre ennemi.|Attaque : tirez (coups multiples) 
-04:05=Descendez sous terre ! Utilisez le marteau-piqueur pour creuser un trou|dans le sol et atteindre d'autres zones.|Attaque : commencez/achevez de creuser 
-04:06=Vous en avez marre ? Pas moyen d'attaquer ? Vous économisez vos munitions ?|Pas de problèmes ! Passez simplement votre tour, espèce de lâche !|Attaque : Passez votre tour sans combattre 
-04:07=Franchissez les grandes distances en utilisant par intervalles la |corde ninja. Utilisez votre élan pour vous lancer contre les autres hérissons,|balancez leurs des grenades ou d'autres armes explosives.|Attaque : Tirer ou lâchez la corde ninja|Saut longue distance : jetez des grenades ou des armes similaires 
+; Weapon Descriptions (use | as line breaks)
+04:00=Attaquez vos ennemis en utilisant une simple grenade.|Elle explosera une fois que le compte à rebours atteindra zéro.|1-5: Lancez le minuteur de la grenade|Attaque : maintenez pour la lancer avec plus de force
+04:01=Attaquez vos ennemis en utilisant une bombe à retardement.|Elle se désintégrera en de multiples petites bombes |quand le compte à rebours atteindra zéro|1-5 : Lancez le minuteur de la grenade|Attaque : maintenez pour la lancer avec plus de force
+04:02=Attaquez vos ennemis en utilisant un missile balistique|subissant l'influence du vent.|Attaque : maintenez pour tirer avec plus de force
+04:03=Lancez une bombe téléguidée qui se verrouillera|sur la cible choisie. Ne tirez pas à pleine puissance|pour une meilleure précision.|Curseur : choix de la cible|Attaque : maintenez pour tirer avec plus de force
+04:04=Attaquez votre ennemi en utilisant un fusil à deux coups.|Grâce à son pouvoir de dispersion vous n'avez pas besoin de frapper directement sur la cible|pour toucher votre ennemi.|Attaque : tirez (coups multiples)
+04:05=Descendez sous terre ! Utilisez le marteau-piqueur pour creuser un trou|dans le sol et atteindre d'autres zones.|Attaque : commencez/achevez de creuser
+04:06=Vous en avez marre ? Pas moyen d'attaquer ? Vous économisez vos munitions ?|Pas de problèmes ! Passez simplement votre tour, espèce de lâche !|Attaque : Passez votre tour sans combattre
+04:07=Franchissez les grandes distances en utilisant par intervalles la |corde ninja. Utilisez votre élan pour vous lancer contre les autres hérissons,|balancez leurs des grenades ou d'autres armes explosives.|Attaque : Tirer ou lâchez la corde ninja|Saut longue distance : jetez des grenades ou des armes similaires
 04:08=Maintenez vos ennemis à distance en laissant une mine|dans les passages étroits ou juste sous leurs pieds. Assurez-vous|que vous pouvez vous sauver avant son déclenchement !|Attaque : lâchez la mine à vos pieds
-04:09=Vous n'êtes pas sûr de ce que vous voulez ? Utilisez l'Aigle| du Désert pour attaquer en utilisant vos quatre coups. Poussez dans l'eau vos ennemis ou transpercez leur défense|Attaque : tirez (coups multiples) 
-04:10=La force brute est toujours une possibilité. Lancez cet explosif|classique sur vos ennemis et prenez le temps de vous retirer.|Attaque : Lâchez la dynamite à vos pieds 
+04:09=Vous n'êtes pas sûr de ce que vous voulez ? Utilisez l'Aigle| du Désert pour attaquer en utilisant vos quatre coups. Poussez dans l'eau vos ennemis ou transpercez leur défense|Attaque : tirez (coups multiples)
+04:10=La force brute est toujours une possibilité. Lancez cet explosif|classique sur vos ennemis et prenez le temps de vous retirer.|Attaque : Lâchez la dynamite à vos pieds
 04:11=Débarrassez-vous des hérissons ennemis en leur donnant des coups pour les chasser |vers d'autres horizons ou en les jetant à l'eau. Ou bien préférez-vous|envoyer quelques tonneaux ou mines sur vos ennemis ?|Attaque : frappez un bon coup sur tout ce qui bouge.
 04:12=Allez au combat rapproché corps à corps pour utiliser toute la force presque mortelle de ces arts martiaux.|Attaque : lancez un coup de poing fulgurant
 04:13=non-utilisé
 04:14=Vous avez le vertige ? Prenez donc un parachute.|Il se déploiera lorsque|vous serez tombé trop loin|et épargnera le choc de la chute à votre hérisson.|Attaque: Dépliez le parachute
 04:15=Appelez le 3615 BOMBE pour commander une frappe aérienne dévastatrice sur vos ennemis.|Gauche/Droite : Déterminez la direction de l'attaque|Curseur : Choisissez la zone cible
 04:16=Appelez un avion qui enverra plusieurs mines|sur la zone cible.|Gauche/Droite : Détermine la direction de l'attaque|Curseur : Sélectionnez la zone cible
-04:17=vous avez besoin d'un abri ? de pousser quelques ennemis dans l'eau ? Utilisez le chalumeau| pour creuser un tunnel dans le sol, vous protéger ou faire de nouvelles victimes.|Attaque : Commencez/cessez de creuser. 
-04:18=Vous avez besoin de vous protéger davantage ou de passer un |obstacle infranchissable ? Placez quelques poutrelles|où vous voulez .|Gauche/Droite : Choisissez la poutrelle à placer|Curseur : Placez la poutrelle dans la bonne position 
+04:17=vous avez besoin d'un abri ? de pousser quelques ennemis dans l'eau ? Utilisez le chalumeau| pour creuser un tunnel dans le sol, vous protéger ou faire de nouvelles victimes.|Attaque : Commencez/cessez de creuser.
+04:18=Vous avez besoin de vous protéger davantage ou de passer un |obstacle infranchissable ? Placez quelques poutrelles|où vous voulez .|Gauche/Droite : Choisissez la poutrelle à placer|Curseur : Placez la poutrelle dans la bonne position
 04:19=La téléportation utilisée au bon moment|peut être bien plus efficace|que la plupart des autres armes|car elle vous permet de sauver des hérissons de situations dangereuses|en quelques secondes.|Curseur : Choisissez la zone cible
-04:20=Vous permet de jouer la partie en cours avec|un hérisson différent.|Attaque : Activez le changement de hérisson 
+04:20=Vous permet de jouer la partie en cours avec|un hérisson différent.|Attaque : Activez le changement de hérisson
 04:21=Tirez un missile balistique qui va|envoyer de multiples bombes au point d'impact.|Attaque : Tirez à pleine puissance
-04:22=Ce n'est pas réservé à Indiana Jones ! Le fouet est une|arme bien utile dans plusieurs situations. Particulièrement|quand vous devez hisser quelqu'un en haut d'une falaise.|Attaque : Frappez tout ce qui bouge devant vous 
+04:22=Ce n'est pas réservé à Indiana Jones ! Le fouet est une|arme bien utile dans plusieurs situations. Particulièrement|quand vous devez hisser quelqu'un en haut d'une falaise.|Attaque : Frappez tout ce qui bouge devant vous
 04:23=Si vous n'avez rien à perdre, voilà qui peut être |bien pratique. Sacrifiez votre hérisson en le lançant dans une direction| particulière. Il heurtera tout sur son passage avant |d'exploser finalement.|Attaque : Lancer l'attaque mortelle et dévastatrice
-04:24=Joyeux anniversaire ! Lancez ce gâteau, faites-le atterrir|tout près de vos ennemis et offrez-leur une fête explosive.|Le gâteau peut franchir presque tous les environnements mais|il se peut qu'il explose à mi-chemin.|Attaque : Lancez le gâteau ou bien faites-le s'arrêter et exploser 
-04:25=Arme de séduction massive ! Utilisez le déguisement pour amener vos ennemis| à sauter vers votre hérisson (et donc vers un piège ou un trou).|Attaque : Utilisez le déguisement et tentez de séduire un autre hérisson 
-04:26=Envoyez cette pastèque explosive à la tête de vos ennemis. Une fois le compte-à-rebours achevé, elle se désintégrera en de multiples fragments explosifs|1-5 : Lancer le compte à rebours|Attaque : Maintenez pour tirer avec plus de puissance 
+04:24=Joyeux anniversaire ! Lancez ce gâteau, faites-le atterrir|tout près de vos ennemis et offrez-leur une fête explosive.|Le gâteau peut franchir presque tous les environnements mais|il se peut qu'il explose à mi-chemin.|Attaque : Lancez le gâteau ou bien faites-le s'arrêter et exploser
+04:25=Arme de séduction massive ! Utilisez le déguisement pour amener vos ennemis| à sauter vers votre hérisson (et donc vers un piège ou un trou).|Attaque : Utilisez le déguisement et tentez de séduire un autre hérisson
+04:26=Envoyez cette pastèque explosive à la tête de vos ennemis. Une fois le compte-à-rebours achevé, elle se désintégrera en de multiples fragments explosifs|1-5 : Lancer le compte à rebours|Attaque : Maintenez pour tirer avec plus de puissance
 04:27=Faites tomber un déluge de feu sur vos adversaires en utilisant|cet explosif dévastateur.|Ne vous tenez pas trop prêt|de l'impact car les flammes peuvent durer longtemps|Attaque : Maintenez pour tirer avec plus de puissance
 04:28=Peu après le lancement de ce missile, il va se mettre|à creuser le sol le plus résistant et explosera|une fois son détonateur amorcé ou une fois atteint l'air libre.|Attaque : Maintenez pour tirer avec plus de puissance
 04:29=Ce n'est pas un jouet pour les enfants ! La mitrailleuse envoie|des centaines de petites balles colorées explosives.|Attaque : Tirez à pleine puissance|Haut/Bas : Continuez à tirer
-04:30=Appelez un avion pour larguer une puissante giclée de napalm.|En la menant correctement cette attaque peut éradiquer|des zones entières du paysage, et notamment les hérissons qui auraient la malchance de se trouver là.|Gauche/Droite: Déterminez la direction de l'attaque|Curseur : Choisissez la zone cible 
-04:31=L'avion télécommandé est l'arme idéale pour récolter des boites ou|attaquer des hérissons très éloignés. Une fois vos ennemis bombardés, vous pourrez lancer votre avion sur l'ennemi dans une explosion incendiaire.|Attaque : Lancez l'avion ou larguez des bombes|Saut longue distance : laissez les valkyries entrer dans la danse guerrière|Haut/Bas : Pilotez l'avion 
+04:30=Appelez un avion pour larguer une puissante giclée de napalm.|En la menant correctement cette attaque peut éradiquer|des zones entières du paysage, et notamment les hérissons qui auraient la malchance de se trouver là.|Gauche/Droite: Déterminez la direction de l'attaque|Curseur : Choisissez la zone cible
+04:31=L'avion télécommandé est l'arme idéale pour récolter des boites ou|attaquer des hérissons très éloignés. Une fois vos ennemis bombardés, vous pourrez lancer votre avion sur l'ennemi dans une explosion incendiaire.|Attaque : Lancez l'avion ou larguez des bombes|Saut longue distance : laissez les valkyries entrer dans la danse guerrière|Haut/Bas : Pilotez l'avion
 04:32=La fable gravité est plus efficace que n'importe quel régime ! Sautez|plus haut et franchissez de plus grandes distances ou bien faites voltiger vos ennemis |encore plus loin.|Attaque : Activez
-04:33=Parfois vous avez besoin d'un petit coup de pouce supplémentaire|pour gérer les dégâts.|Attaque : Activez 
+04:33=Parfois vous avez besoin d'un petit coup de pouce supplémentaire|pour gérer les dégâts.|Attaque : Activez
 04:34=Personne ne peut me toucher !|Attaque : Activez
 04:35=Parfois le temps passe trop vite. Grappillez quelques secondes de plus pour terminer votre attaque|Attaque : Activez
-04:36=Eh bien, parfois vous ratez complètement la cible. Demandez plutôt de l'aide|à la technologie de pointe actuelle pour bien viser.|Attaque : Activez 
+04:36=Eh bien, parfois vous ratez complètement la cible. Demandez plutôt de l'aide|à la technologie de pointe actuelle pour bien viser.|Attaque : Activez
 04:37=Ne craignez pas la lumière du jour. Rafraichissez vous |d'un peu de sang en récupérant des points de vie sur les dégats faits aux ennemis.|Attaque : Activez
-04:38= Le fusil à lunette peut être une des armes les plus dévastatrices|de tout votre arsenal, toutefois il est totalement inefficace|en combat rapproché. Les dommages qu'il cause augmentent suivant|la distance de la cible.|Attaque : Tirez (deux fois) 
+04:38= Le fusil à lunette peut être une des armes les plus dévastatrices|de tout votre arsenal, toutefois il est totalement inefficace|en combat rapproché. Les dommages qu'il cause augmentent suivant|la distance de la cible.|Attaque : Tirez (deux fois)
 04:39=Volez vers d'autres secteurs de la carte en utilisant une soucoupe|volante. Ce moyen de transport, pas facile à dompter, vous|emportera vers presque tous les horizons du champ de bataille|Attaque : Activer|Haut/Gauche/Droite : Prenez de l'altitude et controllez votre direction
-04:40=Mettez le feu à un territoire en utilisant cette bouteille remplie|de liquide inflammable.|Attaque : maintenez pour tirer avec plus de force 
+04:40=Mettez le feu à un territoire en utilisant cette bouteille remplie|de liquide inflammable.|Attaque : maintenez pour tirer avec plus de force
 04:41=Une arme naturelle qui peut suffire à remplacer la soucoupe volante.|Cet oiseau a du manger un vieux fromage pourri (du Limburger vous dites ?)|car ses oeufs ont comme quelquechose de ... toxique.|Le piaf peut donc transporter votre hérisson et balancer des œufs|sur vos ennemis !|Attaque : Activez et larguez des œufs|Haut/Gauche/Droite: voltigez vers une direction.
 04:42=Ce fusil à portails est capable de transporter instantanément hérissons,|tonneaux ou mines entre deux points du terrain. |Utilisez-le intelligemment et votre campagne sera un ... GRAND SUCCÈS !|Attaque : Crée un portail|Modificateur : Change la couleur du portail
 04:43=Faites de vos débuts musicaux un succès explosif !| Lâchez un piano depuis les cieux, mais attention ... si quelqu'un doit|jouer dessus, cela pourrait lui coûter la vie !|Curseur : Choix de la cible|F1-F9 : Jouer du piano
-04:44=Ce n'est pas juste un fromage, c'est une arme bactériologique !|Si il ne provoque que de faibles dommages, sa puissance se|trouve dans sa durée. Il empoisonnera tous les malchanceux|touchés par l'odeur et réduira leur vie à l'agonie !|1-5 : Lancez le minuteur de la grenade|Attaque : maintenez pour la lancer avec plus de force 
+04:44=Ce n'est pas juste un fromage, c'est une arme bactériologique !|Si il ne provoque que de faibles dommages, sa puissance se|trouve dans sa durée. Il empoisonnera tous les malchanceux|touchés par l'odeur et réduira leur vie à l'agonie !|1-5 : Lancez le minuteur de la grenade|Attaque : maintenez pour la lancer avec plus de force
 04:45=Tous ces cours de physique ont finalement payé,|lancez une onde Sinus dévastatrice sur vos ennemis.|Attention au recul ! (cette arme est incomplète)|Attaque : Activez
 04:46=Aspergez vos ennemis de flammes liquides ou creusez vous un passage dans le sol.|Hardi !|Attaque : Activez|Haut/Bas : Continuez à viser|Droite/Gauche : Changer la puissance de tir
 04:47=Doublez le fun avec deux mines, piquantes, furtives et collantes.|Provoquez une réaction en chaine dévastatrice et/ou défendez-vous ! |Attaque : maintenez pour tirer avec plus de force (deux fois)
 04:48=Outre une bonne bosse, un bon coup de ce marteau enlèvera un tiers de la santé |du hérisson ennemi et l'enfoncera dans le sol ou dans l'eau comme un vulgaire asticot !|Attaque : Activez
 04:49=Ressuscite vos amis oubliés six pieds sous terre ! Mais méfiez-vous, ressuscite également vos ennemis. |Attaque : Maintenez attaque pressée pour ressusciter lentement|Haut : Accélérer la résurrection
 
-; Game goal strings 
-05:00=Modes de jeu 
-05:01=Les règles suivantes s'appliquent 
-05:02=Forts : Défendez votre forteresse ; exterminez vos ennemis ! 
-05:03=Faible gravité : Attention à vos mouvements 
-05:04=Invulnérabilité : Les hérissons sont (presque) invulnérables 
-05:05=Vampirisme : Les hérissons récupèrent des points de vie par les dégats qu'ils infligent 
+; Game goal strings
+05:00=Modes de jeu
+05:01=Les règles suivantes s'appliquent
+05:02=Forts : Défendez votre forteresse ; exterminez vos ennemis !
+05:03=Faible gravité : Attention à vos mouvements
+05:04=Invulnérabilité : Les hérissons sont (presque) invulnérables
+05:05=Vampirisme : Les hérissons récupèrent des points de vie par les dégats qu'ils infligent
 05:06=Karma: Les hérissons sont victimes des blessures qu'ils infligent
-05:07=Protégez le roi : Ne laissez pas mourir le roi !|Placez le roi : Choisissez un point de départ sécurisé pour le roi 
-05:08=Placez les hérissons : Placez vos hérissons avant le début de la partie 
-05:09=Artillerie : Les hérissons ne peuvent pas se déplacer pour changer de place 
+05:07=Protégez le roi : Ne laissez pas mourir le roi !|Placez le roi : Choisissez un point de départ sécurisé pour le roi
+05:08=Placez les hérissons : Placez vos hérissons avant le début de la partie
+05:09=Artillerie : Les hérissons ne peuvent pas se déplacer pour changer de place
 05:10=Terrain indestructible : La plupart des armes sont incapables de modifier le terrain
 05:11=Munitions partagées : Toutes les équipes de la même couleur partagent leurs munitions
 05:12=Mines à retardement : Les mines exploseront après %1 seconde(s)
--- a/share/hedgewars/Data/Locale/hu.txt	Fri Jan 25 13:29:20 2013 +0400
+++ b/share/hedgewars/Data/Locale/hu.txt	Tue Jan 29 10:10:23 2013 +0400
@@ -108,7 +108,7 @@
 02:00=%1 lejárt a szavatossága
 02:00=Nyugodj békében, %1
 02:00=%1 nem bírta a kiképzést
-02:00=%1 nem volt macska, hogy kilenc élete legyen 
+02:00=%1 nem volt macska, hogy kilenc élete legyen
 02:00=Van itt orvos?
 
 ; Hog (%1) drowned
--- a/share/hedgewars/Data/Locale/it.txt	Fri Jan 25 13:29:20 2013 +0400
+++ b/share/hedgewars/Data/Locale/it.txt	Tue Jan 29 10:10:23 2013 +0400
@@ -389,7 +389,7 @@
 02:10=Proprio un bel colpo!
 
 ; Hog (%1) has to leave (team is gone)
-02:11=%1 deve andare a dormire! 
+02:11=%1 deve andare a dormire!
 02:11=%1 sembra che non abbia tempo per giocare
 02:11=%1 se ne deve andare
 02:11=%1 stava giocando sui PC della scuola ed è stato beccato
--- a/share/hedgewars/Data/Locale/ko.txt	Fri Jan 25 13:29:20 2013 +0400
+++ b/share/hedgewars/Data/Locale/ko.txt	Tue Jan 29 10:10:23 2013 +0400
@@ -13,7 +13,7 @@
 00:10=다ì´ë„ˆë§ˆì´íŠ¸
 00:11=야구 ë°©ë§ì´
 00:12=Shoryuken
-00:13=ì´ˆ	
+00:13=ì´ˆ
 00:14=낙하산
 00:15=í­íƒ„ 공습
 00:16=지뢰 공습
--- a/share/hedgewars/Data/Locale/lt.txt	Fri Jan 25 13:29:20 2013 +0400
+++ b/share/hedgewars/Data/Locale/lt.txt	Tue Jan 29 10:10:23 2013 +0400
@@ -298,7 +298,7 @@
 02:07=Tai Gali Praversti...
 02:07=Naudingi Irankiai!
 02:07=Išnaudok Šia Dėže
-02:07=Atsargiai Žemiau  
+02:07=Atsargiai Žemiau
 02:07=Dar Daugiau Naudingu Irankiu!
 02:07=Irankiai tau!
 02:07=Tai TurÄ—tu Buti Gera!
@@ -364,7 +364,7 @@
 02:09=%1 artÄ—ja prie savizudybÄ—s
 02:09=%1 padeda priešui
 02:09=Tai buvo kvaila %1
-02:09=%1 Palauk KA?? 
+02:09=%1 Palauk KA??
 02:09=%1 susimaišė
 02:09=%1 sužaloja save
 02:09=%1 myli žeminti save
@@ -406,7 +406,7 @@
 03:11=Bonk!
 03:12=Kovos Menai
 03:13=UNUSED
-03:14=Transporto PriemonÄ— 
+03:14=Transporto PriemonÄ—
 03:15=AviacinÄ— Ataka
 03:16=AviacinÄ— Ataka
 03:17=Kasimosi Irankis
@@ -455,7 +455,7 @@
 04:02=Atakuok savo priešus paleisdamas balistini objekta|kuris gali buti valdomas vėjo.|Ataka: Laikyk kad šautum stipriau
 04:03=Paleisk sprogstanÄia bite kuri seks prieÅ¡a|arba pasirinkta taikini. NeÅ¡auk su pilna jÄ—ga|nes tai gadina taikluma.|PelÄ—: Pasirink taikini|Ataka: Laikyk kad Å¡autum stipriau
 04:04=Atakuok savo prieÅ¡us naudodamas Å¡ratini Å¡autuva.|AÄiu jo pasiskirstimui tau nereikia nusitaikity tiesiai i prieÅ¡a|kad padarytum žalos.|Ataka: Å auna (Keleta Kartu)
-04:05=Judėk po žeme naudok kasimo iranga|kad galėtum nusileisti i tuneli arba i kita vietove.|Ataka: Pradėti ir nustoti kasima 
+04:05=Judėk po žeme naudok kasimo iranga|kad galėtum nusileisti i tuneli arba i kita vietove.|Ataka: Pradėti ir nustoti kasima
 04:06=Nusibodo? Nėra Kaip Pulti? Taupai Kulkas?|Jokiu Problemu! Tiesiog praleisk savo eile, baily!|Ataka: Praleidžia tavo eile be veiksmo
 04:07=Nuvaryk toli ir greitai|su virve. Numesk ežius i vandeni|arba numesk ant ju granata arba panašius ginklus.|Ataka: Šauk arba atleisk virve|Ilgas Šuolis: Meta granatas arba panašius ginklus
 04:08=Laikyk savo priešus kuo toliau numesdamas|mina siauruose praėjimuose arba prie ju kojiu. Tik|buk tikras kad pabėgsi kad pats jos neaktyvuotum!|Ataka: Meta mina tau prie kojiu
--- a/share/hedgewars/Data/Locale/missions_de.txt	Fri Jan 25 13:29:20 2013 +0400
+++ b/share/hedgewars/Data/Locale/missions_de.txt	Tue Jan 29 10:10:23 2013 +0400
@@ -1,4 +1,4 @@
-Basic_Training_-_Bazooka.name=Training: Bazooka - Grundlagen 
+Basic_Training_-_Bazooka.name=Training: Bazooka - Grundlagen
 Basic_Training_-_Bazooka.desc="Nutze den Wind zu deinem Vorteil aus!"
 
 Basic_Training_-_Grenade.name=Training: Granate - Grundlagen
--- a/share/hedgewars/Data/Locale/missions_fr.txt	Fri Jan 25 13:29:20 2013 +0400
+++ b/share/hedgewars/Data/Locale/missions_fr.txt	Tue Jan 29 10:10:23 2013 +0400
@@ -1,5 +1,5 @@
 Basic_Training_-_Bazooka.name=Initiation au Bazooka
-Basic_Training_-_Bazooka.desc="Pour gagner, utiliser le vent à votre avantage !" 
+Basic_Training_-_Bazooka.desc="Pour gagner, utiliser le vent à votre avantage !"
 
 Basic_Training_-_Grenade.name=Entrainement au lancer de Grenade
 Basic_Training_-_Grenade.desc="Souvenez vous, retirez la goupille et lancez !"
@@ -16,11 +16,11 @@
 Basic_Training_-_Rope.name=Initiation à la Corde Ninja
 Basic_Training_-_Rope.desc="Bouge de là et Balance toi !"
 
-User_Mission_-_Dangerous_Ducklings.name=Mission: Canards dangereux 
-User_Mission_-_Dangerous_Ducklings.desc="Très bien le bleu, il est temps de mettre en pratique ce que tu as appris aux entraînements !" 
+User_Mission_-_Dangerous_Ducklings.name=Mission: Canards dangereux
+User_Mission_-_Dangerous_Ducklings.desc="Très bien le bleu, il est temps de mettre en pratique ce que tu as appris aux entraînements !"
 
 User_Mission_-_Diver.name=Mission: Diver
-User_Mission_-_Diver.desc="Cet assault 'sous-marin' est plus dur que cela n'y paraît...." 
+User_Mission_-_Diver.desc="Cet assault 'sous-marin' est plus dur que cela n'y paraît...."
 
 User_Mission_-_Teamwork.name=Mission: Travail en équipe
 User_Mission_-_Teamwork.desc="Parfois, l'amour blesse."
@@ -28,7 +28,7 @@
 User_Mission_-_Spooky_Tree.name=Mission: L'arbre qui parle
 User_Mission_-_Spooky_Tree.desc="Beaucoup de caisses par ici. J'espère vraiment que cet oiseau n'a pas faim."
 
-User_Mission_-_Bamboo_Thicket.name=Mission: Forêt de Bamboo 
+User_Mission_-_Bamboo_Thicket.name=Mission: Forêt de Bamboo
 User_Mission_-_Bamboo_Thicket.desc="La mort vient d'en haut."
 
 User_Mission_-_That_Sinking_Feeling.name=Mission: Cette impression de naufrage
@@ -44,4 +44,4 @@
 User_Mission_-_Rope_Knock_Challenge.desc="Regarde derrière toi !"
 
 User_Mission_-_RCPlane_Challenge.name=Challenge: Avion télécommandé
-User_Mission_-_RCPlane_Challenge.desc="Plutôt confiant, hein, aviateur ?" 
\ No newline at end of file
+User_Mission_-_RCPlane_Challenge.desc="Plutôt confiant, hein, aviateur ?"
\ No newline at end of file
--- a/share/hedgewars/Data/Locale/pl.txt	Fri Jan 25 13:29:20 2013 +0400
+++ b/share/hedgewars/Data/Locale/pl.txt	Tue Jan 29 10:10:23 2013 +0400
@@ -247,14 +247,14 @@
 02:02=Możesz uważać się za szczęśliwca jeżeli nie grasz przeciwko Jessorowi
 02:02=Dajcie z siebie wszystko!
 02:02=Przegrany sprzÄ…ta teren.
-02:02=Niech rozpocznie siÄ™ walka millenium 
-02:02=Niech rozpocznie siÄ™ walka wieku 
-02:02=Niech rozpocznie siÄ™ walka dekady 
+02:02=Niech rozpocznie siÄ™ walka millenium
+02:02=Niech rozpocznie siÄ™ walka wieku
+02:02=Niech rozpocznie siÄ™ walka dekady
 02:02=Niech rozpocznie siÄ™ walka roku
 02:02=Niech rozpocznie siÄ™ walka miesiÄ…ca
 02:02=Niech rozpocznie siÄ™ walka tygodnia
 02:02=Niech rozpocznie siÄ™ walka dnia
-02:02=Niech rozpocznie siÄ™ walka godziny 
+02:02=Niech rozpocznie siÄ™ walka godziny
 02:02=Graj jak najlepiej!
 02:02=Zniszcz przeciwnika!
 02:02=Powodzenia
@@ -549,9 +549,9 @@
 04:02=Atakuj przeciwników pociskiem balistycznym,|który jest podatny na wiatr.|Atak: Przytrzymaj by strzelić z większą siłą
 04:03=Wypuść zdenerwowaną Pszczołę, która "użądli"|zaznaczony cel. By zwiększyć precyzję nie|strzelaj pełną mocą|Kursor: Wybierz cel|Atak: Przytrzymaj by strzelić z większą siłą
 04:04=Atakuj przeciwników strzelbą z dwoma strzałami.|Działa obszarowo, więc nie musisz dokładnie|celować by zranić przeciwników.|Atak: Strzel (kilka razy)
-04:05=Schowaj się pod ziemię! Użyj młota pneumatycznego|do wywiercenia dziury w podłożu i dostania się do|innych miejsc.|Atak: Zacznij/Zakończ kopać 
+04:05=Schowaj się pod ziemię! Użyj młota pneumatycznego|do wywiercenia dziury w podłożu i dostania się do|innych miejsc.|Atak: Zacznij/Zakończ kopać
 04:06=Znudzony? Brak motywacji do ataku? Oszczędzasz broń?|No problemo! Po prostu pomiń turę, tchórzu!|Atak: Pomiń turę bez walki
-04:07=Skróć wielkie odległości używając liny. Rozpędź się|by wślizgnąć się w inne jeże lub upuścić na nich|granat albo inną broń.|Atak: Rozwiń albo odłącz linę|Długi skok: Upuść granat lub podobną broń      
+04:07=Skróć wielkie odległości używając liny. Rozpędź się|by wślizgnąć się w inne jeże lub upuścić na nich|granat albo inną broń.|Atak: Rozwiń albo odłącz linę|Długi skok: Upuść granat lub podobną broń
 04:08=Trzymaj przeciwników na dystans przez upuszczenie|miny w wąskim przejściu lub zaraz obok ich stóp. I nie|zapomnij uciec zanim się włączy!|Atak: Upuść minę obok siebie
 04:09=Niepewny co do umiejętności w celowaniu?|Weź pistolet i powystrzelaj ich jak kaczki.|Atak: Strzel (kilka razy)
 04:10=Brutalna siła zawsze jest rozwiązaniem. Upuść ten|wybuchową laskę dynamitu obok przeciwnika i|uciekaj gdzie pieprz rośnie.|Atak: Upuść dynamit obok siebie
@@ -565,15 +565,15 @@
 04:18=Potrzebujesz dodatkowej ochrony albo chcesz|przejść przez teren nie do przejścia? Umieść|konstrukcje gdzie chcesz.|Lewo/Prawo: Wybierz konstrukcję do umieszczenia|Kursor: Umieść konstrukcję w odpowiednim miejscu
 04:19=Teleport użyty w odpowiednim momencie, staje|się potężniejszy niż każda inna broń,|ponieważ potrafi wyzwolić jeża z tarapatów|w przeciągu sekund.|Kursor: Wybierz region
 04:20=Pozwala w tej turze zagrać innym jeżem.|Atak: Uaktywnij wybieranie jeża
-04:21=Odpal moździerz, który po uderzeniu|wypuści kilka bomb.|Atak: Strzel z całą mocą      
+04:21=Odpal moździerz, który po uderzeniu|wypuści kilka bomb.|Atak: Strzel z całą mocą
 04:22=Nie tylko dla Indiana Jones! Ten bicz może|być użyteczny w wielu wypadkach. Szczególnie|kiedy chcesz kogoś zrzucić z urwiska.|Atak: Ubiczuj wszystko co jest przed tobą
 04:23=Jeśli nie masz nic do stracenia, ten atak może być|całkiem użyteczny. Poświęć swojego jeża i poślij|go w odpowiednim kierunku, raniąc wszystkich po|drodze i eksplodując na końcu.|Atak: Odpal tę niszczycielską i zabójczą technikę
 04:24=Sto lat! Uruchom ciasto i pozwól mu pójść w stronę|twoich przeciwników urządzając im wybuchowe przyjęcie.|Może chodzić prawie po wszystkim, ale wtedy|wcześniej eksploduje.|Atak: Odpal ciasto albo zatrzymaj je, by wybuchło
 04:25=Użyj kostiumu by sprawić, żeby twój wróg zakochał się|w Tobie (i spadł w przepaść lub dziurę).|Atak: Użyj kostiumu i uwiedź jeża
 04:26=Rzuć tego smacznego arbuza w przeciwników. Kiedy jego|zapalnik wskaże zero, podzieli się na mniejsze kawałki.|1-5: Ustawia zapalnik arbuza|Atak: Przytrzymaj by rzucić z większą siłą
 04:27=Niech ognie piekielne ogarną twoich przeciwników!|Nie podchodź zbyt blisko po wybuchu, gdyż ogień|pali się przez dłuższy czas|Atak: Przytrzymaj by rzucić z większą siłą
-04:28=Krótko po wystrzeleniu, rakieta zacznie wiercić tunel w ziemi|i eksploduje gdy zapalnik zostanie uruchomiony lub|jeśli pojawi się po drugiej stronie terenu.|Atak: Przytrzymaj by strzelić z większą siłą   
-04:29=Tego nie powinny używać dzieci!|Pistolet na kulki wystrzeliwuje tony małych|kolorowych kulek wypełnionych materiałem wybuchowym.|Atak: Strzel kulkami|Góra/Dół: Kontynuuj celowanie      
+04:28=Krótko po wystrzeleniu, rakieta zacznie wiercić tunel w ziemi|i eksploduje gdy zapalnik zostanie uruchomiony lub|jeśli pojawi się po drugiej stronie terenu.|Atak: Przytrzymaj by strzelić z większą siłą
+04:29=Tego nie powinny używać dzieci!|Pistolet na kulki wystrzeliwuje tony małych|kolorowych kulek wypełnionych materiałem wybuchowym.|Atak: Strzel kulkami|Góra/Dół: Kontynuuj celowanie
 04:30=Wezwij samolot, żeby zrzucić dużą ilość|napalmu. Dzięki dobremu celowi ten atak|może zlikwidować dużą część mapy, w tym|znajdujące się tam nieszczęsne jeże.|Lewo/Prawo: Określ kierunek ataku|Kursor: Wybierz region
 04:31=Zaatakuj odległych przeciwników, bądź zbierz|skrzynki! Nie zapomnij o zrzuceniu bomb!|Góra/Dół: Steruj samolotem|Atak: Zrzuć bombę (3x) |Długi skok: Niech walkirie wkroczą na pole bitwy!
 04:32=Niska grawitacja jest lepsza od diety! Skacz|wyżej i dalej albo pozwól przeciwnikom fruwać.|Atak: Aktywuj
@@ -598,7 +598,7 @@
 04:51=Obrzuć kogoś błotem! Broń ta nie zadaje dużych|obrażeń ale może Gogol zepchnąć z krawędzi!|Atak: Przytrzymaj by strzelić z większą siłą
 04:52=UNUSED
 04:53=Wybierz się na podróż w czasie i przestrzeni|zostawiając inne jeże na polu walki.|Bądź przygotowany na powrót w dowolnym momencie.|Gdy rozpocznie się|Nagła Śmierć lub większość jeży zostanie wybita.|Uwaga. Nie zadziała podczas Nagłej Śmierci,|gdy jesteś sam lub jeśli jesteś Królem.
-04:54=INCOMPLETE                                                                                                                                     
+04:54=INCOMPLETE
 04:55=Wystrzel strumień kleistej mazi.|Buduj mosty, zasypuj wrogów, zatykaj tunele.|Uważaj by nie zasypać samego siebie!
 
 ; Game goal strings
--- a/share/hedgewars/Data/Locale/pt_BR.txt	Fri Jan 25 13:29:20 2013 +0400
+++ b/share/hedgewars/Data/Locale/pt_BR.txt	Tue Jan 29 10:10:23 2013 +0400
@@ -219,7 +219,7 @@
 02:08=%1 está se balançando na rede
 02:08=%1 prefere só ficar olhando
 02:08=%1 desaponta a todos
-02:08=%1 ficou filosofando 
+02:08=%1 ficou filosofando
 02:08=%1 amarelou
 02:08=%1 tá de boa
 02:08=%1 pegou no sono
@@ -237,7 +237,7 @@
 ; Hog (%1) hurts himself only
 02:09=%1 se machucou
 02:09=%1 fez dodói
-02:09=%1 é uma anta 
+02:09=%1 é uma anta
 02:09=%1 não sabe quem é o inimigo
 02:09=%1 não gosta de si mesmo
 02:09=%1 não tem amor próprio
@@ -297,7 +297,7 @@
 03:20=Ação
 03:21=Arma Balística
 03:22=Me chame Indiana!
-03:23=Artes Marciais (Realmente) 
+03:23=Artes Marciais (Realmente)
 03:24=O Bolo não é de brinquedo!
 03:25=Disfarce
 03:26=Granada Suculenta
@@ -353,7 +353,7 @@
 04:15=Chame um avião para bombadear seus inimigos.|Esquerda/Direita: Determina a direção do ataque|Cursor: Seleciona a região do ataque
 04:16=Chame um avião para lançar diversas minas|na área alvo.|Esquerda/Direita: Determina a direção do ataque|Cursor: Seleciona a região do ataque
 04:17=Precisa de abrigo? Use o maçarico para|cavar um túnel que te de cobertura.|Ataque:Liga/Desliga o maçarico
-04:18=Precisa de proteção adicional ou quer atravessar|um lugar difícil? Coloque algumas vigas.|Esquerda/Direita: Seleciona a viga a colocar|Cursor: Coloca a viga em uma posição válida. 
+04:18=Precisa de proteção adicional ou quer atravessar|um lugar difícil? Coloque algumas vigas.|Esquerda/Direita: Seleciona a viga a colocar|Cursor: Coloca a viga em uma posição válida.
 04:19=Usada no momento certo, teleportar-se pode ser mais|poderosa que todas as outras armas, permitindo|salvar alguns ouriços em situação perigosa|Cursor: Seleciona o destino do teletransporte.
 
 04:20=Permite você jogar este turno com um ouriço diferente.|Ataque: Ativa|Tab: Alterna o ouriço
@@ -392,7 +392,7 @@
 04:51=Ganhe um tiro de graça, atirando uma bola de barro.|Fará com que o inimigo saia voando|e arde a vista.
 04:52=Sem Uso
 04:53=Viage através do tempo e espaço,|deixando seus camaradas na mão.|Esteja preparado para retornar a qualquer momento,|ou para a Morte Súbita se todos os aliados foram mortos.|Aviso. Não funciona na Morte Súbita,|se você estiversozinho, ou se você for o Rei.
-04:54=INCOMPLETO                                                                                                                                     
+04:54=INCOMPLETO
 04:55=Atira um jorro de barro pegajoso.|Constrói pontes, enterra inimigos, sela túneis.|Cuidado para que não pegue em você!
 
 ; Game goal strings
@@ -404,7 +404,7 @@
 05:05=Vampirismo: Ouriços serão curados pelos danos causados
 05:06=Carma: Ouriços serão machucados pelos danos causados
 05:07=Proteja o rei: Não deixe o seu Rei morrer!|Colocar o Rei: Escolha um lugar protegido para posicionar o seu Rei
-05:08=Colocar Ouriços: Permite posicionar os ouriços antes da partida começar 
+05:08=Colocar Ouriços: Permite posicionar os ouriços antes da partida começar
 05:09=Artilharia: Ouriços não podem andar para mudar de lugar
 05:10=Terreno Indestrutível: Maioria das armas não destrói o terreno
 05:11=Munição Compartilhada: Todos as equipes de mesma cor compartilham a munição
--- a/share/hedgewars/Data/Locale/ro.txt	Fri Jan 25 13:29:20 2013 +0400
+++ b/share/hedgewars/Data/Locale/ro.txt	Tue Jan 29 10:10:23 2013 +0400
@@ -20,7 +20,7 @@
 00:17=Lovitura de torță
 00:18=Constructie
 00:19=Teleportare
-00:20=Schimbă ariciuș	
+00:20=Schimbă ariciuș
 00:21=Mortar
 00:22=Bici
 00:23=Kamikaze
@@ -28,7 +28,7 @@
 00:25=Seducere
 00:26=Pepene bombă
 00:27=Grenadă de mână infernală
-00:28=Racheta burghiu	
+00:28=Racheta burghiu
 00:29=Pistol cu bile
 00:30=Napalm
 00:31=Avion RC
@@ -505,7 +505,7 @@
 04:51=Get in a free shot by hurling a ball of mud.|Stings a bit, and knocks hogs back.
 04:52=UNUSED
 04:53=Go on an adventure through time and space,|while leaving your comrades to fight on alone.|Be prepared to return at any time,|or for Sudden Death or if they are all defeated.|Disclaimer. Does not function in Sudden Death,|if you are alone, or if you are a King.
-04:54=INCOMPLETE                                                                                                                                     
+04:54=INCOMPLETE
 04:55=Spray a stream of sticky flakes.|Build bridges, bury enemies, seal off tunnels.|Be careful you don't get any on you!
 
 ; Game goal strings
--- a/share/hedgewars/Data/Locale/sv.txt	Fri Jan 25 13:29:20 2013 +0400
+++ b/share/hedgewars/Data/Locale/sv.txt	Tue Jan 29 10:10:23 2013 +0400
@@ -535,7 +535,7 @@
 04:51=Få till en gratisträff genom att kasta en boll med|jord. Känns lite gran, och knuffar tillbaka|igelkottar.
 04:52=UNUSED
 04:53=Åk på ett äventyr genom tid och rymd, medan dina|kamrater blir kvar själva att slåss. Var beredd|att komma tillbaka när som helst, eller till|Sudden Death eller om de andra blir besegrade.|Varning. Fungerar inte under Sudden Death, om du|är ensam, eller om du är en kung.
-04:54=INCOMPLETE                                                                                                                                     
+04:54=INCOMPLETE
 04:55=Spruta en ström av fästande jord.|Bygg broar, gräv ner fienden, stäng igen tunnlar.|Var försiktig så att du inte får något på dig!
 
 ; Game goal strings
--- a/share/hedgewars/Data/Locale/uk.txt	Fri Jan 25 13:29:20 2013 +0400
+++ b/share/hedgewars/Data/Locale/uk.txt	Tue Jan 29 10:10:23 2013 +0400
@@ -110,7 +110,7 @@
 02:01=%1 забув надіти Ñ€Ñтувальний жилет
 02:01=%1 Ñпить Ñеред риб
 02:01=%1 хоче пити
-02:01=%1 загубивÑÑ Ð² морі 
+02:01=%1 загубивÑÑ Ð² морі
 02:01=%1 забув надіти акваланг
 02:01=%1 похований у морі
 02:01=%1 пробує плавати на Ñпині
@@ -344,7 +344,7 @@
 04:51=ЗдійÑни халÑвний удар, шпурни грудку багна.|Трохи пече Ñ– відкидає їжака назад.
 04:52=UNUSED
 04:53=ЗдійÑни подорож крізь Ñ‡Ð°Ñ Ñ‚Ð° проÑÑ‚Ñ–Ñ€,|залишивши товаришів битиÑÑŒ далі Ñамим.|Будь готовий повернутиÑÑŒ в кожну мить,|або до Раптової Ñмерті або до Ñ—Ñ… поразки.|Відмова. Ðе працює в Раптовій Смерті,|Ñкщо ти один, або Ñкщо ти Король.
-04:54=ÐЕЗÐВЕРШЕÐО                                                                                                                                     
+04:54=ÐЕЗÐВЕРШЕÐО
 04:55=Розпили потік лепких плаÑтівців.|будуй моÑти, хорони ворогів, перекривай тунелі.|Стеж щоб на тебе не впала жодна з них!
 
 ; Game goal strings
--- a/share/hedgewars/Data/Maps/Bamboo/CMakeLists.txt	Fri Jan 25 13:29:20 2013 +0400
+++ b/share/hedgewars/Data/Maps/Bamboo/CMakeLists.txt	Tue Jan 29 10:10:23 2013 +0400
@@ -1,5 +1,5 @@
 install(FILES
-	map.png
-	map.cfg
-	preview.png
-	DESTINATION ${SHAREPATH}Data/Maps/Bamboo)
+    map.png
+    map.cfg
+    preview.png
+    DESTINATION ${SHAREPATH}Data/Maps/Bamboo)
--- a/share/hedgewars/Data/Maps/BambooPlinko/CMakeLists.txt	Fri Jan 25 13:29:20 2013 +0400
+++ b/share/hedgewars/Data/Maps/BambooPlinko/CMakeLists.txt	Tue Jan 29 10:10:23 2013 +0400
@@ -1,5 +1,5 @@
 install(FILES
-	map.png
-	map.cfg
-	preview.png
-	DESTINATION ${SHAREPATH}Data/Maps/BambooPlinko)
+    map.png
+    map.cfg
+    preview.png
+    DESTINATION ${SHAREPATH}Data/Maps/BambooPlinko)
--- a/share/hedgewars/Data/Maps/Basketball/CMakeLists.txt	Fri Jan 25 13:29:20 2013 +0400
+++ b/share/hedgewars/Data/Maps/Basketball/CMakeLists.txt	Tue Jan 29 10:10:23 2013 +0400
@@ -1,8 +1,8 @@
 install(FILES
-	map.png
-	map.cfg
-	map.lua
-	mask.png
-	preview.png
-	desc.txt
-	DESTINATION ${SHAREPATH}Data/Maps/Basketball)
+    map.png
+    map.cfg
+    map.lua
+    mask.png
+    preview.png
+    desc.txt
+    DESTINATION ${SHAREPATH}Data/Maps/Basketball)
--- a/share/hedgewars/Data/Maps/Bath/CMakeLists.txt	Fri Jan 25 13:29:20 2013 +0400
+++ b/share/hedgewars/Data/Maps/Bath/CMakeLists.txt	Tue Jan 29 10:10:23 2013 +0400
@@ -1,5 +1,5 @@
 install(FILES
-	map.png
-	map.cfg
-	preview.png
-	DESTINATION ${SHAREPATH}Data/Maps/Bath)
+    map.png
+    map.cfg
+    preview.png
+    DESTINATION ${SHAREPATH}Data/Maps/Bath)
--- a/share/hedgewars/Data/Maps/Battlefield/CMakeLists.txt	Fri Jan 25 13:29:20 2013 +0400
+++ b/share/hedgewars/Data/Maps/Battlefield/CMakeLists.txt	Tue Jan 29 10:10:23 2013 +0400
@@ -1,7 +1,7 @@
 install(FILES
-	map.png
-	mask.png
-	map.cfg
-	preview.png
-	DESTINATION ${SHAREPATH}Data/Maps/Battlefield)
+    map.png
+    mask.png
+    map.cfg
+    preview.png
+    DESTINATION ${SHAREPATH}Data/Maps/Battlefield)
 
--- a/share/hedgewars/Data/Maps/Blizzard/CMakeLists.txt	Fri Jan 25 13:29:20 2013 +0400
+++ b/share/hedgewars/Data/Maps/Blizzard/CMakeLists.txt	Tue Jan 29 10:10:23 2013 +0400
@@ -1,7 +1,7 @@
 install(FILES
-	map.png
-	map.cfg
-	mask.png
-	preview.png
-	DESTINATION ${SHAREPATH}Data/Maps/Blizzard)
+    map.png
+    map.cfg
+    mask.png
+    preview.png
+    DESTINATION ${SHAREPATH}Data/Maps/Blizzard)
 
--- a/share/hedgewars/Data/Maps/Blox/CMakeLists.txt	Fri Jan 25 13:29:20 2013 +0400
+++ b/share/hedgewars/Data/Maps/Blox/CMakeLists.txt	Tue Jan 29 10:10:23 2013 +0400
@@ -1,6 +1,6 @@
 install(FILES
-	map.png
-	mask.png
-	map.cfg
-	preview.png
-	DESTINATION ${SHAREPATH}Data/Maps/Blox)
+    map.png
+    mask.png
+    map.cfg
+    preview.png
+    DESTINATION ${SHAREPATH}Data/Maps/Blox)
--- a/share/hedgewars/Data/Maps/Bubbleflow/CMakeLists.txt	Fri Jan 25 13:29:20 2013 +0400
+++ b/share/hedgewars/Data/Maps/Bubbleflow/CMakeLists.txt	Tue Jan 29 10:10:23 2013 +0400
@@ -1,5 +1,5 @@
 install(FILES
-	map.png
-	map.cfg
-	preview.png
-	DESTINATION ${SHAREPATH}Data/Maps/Bubbleflow)
+    map.png
+    map.cfg
+    preview.png
+    DESTINATION ${SHAREPATH}Data/Maps/Bubbleflow)
--- a/share/hedgewars/Data/Maps/CMakeLists.txt	Fri Jan 25 13:29:20 2013 +0400
+++ b/share/hedgewars/Data/Maps/CMakeLists.txt	Tue Jan 29 10:10:23 2013 +0400
@@ -1,45 +1,45 @@
 foreach(dir
-	Bamboo
-	BambooPlinko
-	Basketball
-	Bath
-	Battlefield
-	Blizzard
-	Blox
-	Bubbleflow
-	Cake
-	Castle
-	Cave
-	Cheese
-	Cogs
-	Control
-	CrazyMission
-	CTF_Blizzard
-	EarthRise
-	Eyes
-	Hammock
-	HedgeFortress
-	Hedgelove
-	Hedgewars
-	Hogville
-	Hydrant
-	Islands
-	Knockball
-	Lonely_Island
-	Mushrooms
-	Octorama
-	PirateFlag
-	Plane
-	portal
-	Ropes
-	Ruler
-	Sheep
-	ShoppaKing
-	Sticks
-	Trash
-	Tree
-	TrophyRace
-	)
+    Bamboo
+    BambooPlinko
+    Basketball
+    Bath
+    Battlefield
+    Blizzard
+    Blox
+    Bubbleflow
+    Cake
+    Castle
+    Cave
+    Cheese
+    Cogs
+    Control
+    CrazyMission
+    CTF_Blizzard
+    EarthRise
+    Eyes
+    Hammock
+    HedgeFortress
+    Hedgelove
+    Hedgewars
+    Hogville
+    Hydrant
+    Islands
+    Knockball
+    Lonely_Island
+    Mushrooms
+    Octorama
+    PirateFlag
+    Plane
+    portal
+    Ropes
+    Ruler
+    Sheep
+    ShoppaKing
+    Sticks
+    Trash
+    Tree
+    TrophyRace
+    )
 
 add_subdirectory(${dir})
 endforeach(dir)
--- a/share/hedgewars/Data/Maps/CTF_Blizzard/CMakeLists.txt	Fri Jan 25 13:29:20 2013 +0400
+++ b/share/hedgewars/Data/Maps/CTF_Blizzard/CMakeLists.txt	Tue Jan 29 10:10:23 2013 +0400
@@ -1,6 +1,6 @@
 install(FILES
-	map.cfg
-	map.lua
-	preview.png
-	desc.txt
-	DESTINATION ${SHAREPATH}Data/Maps/CTF_Blizzard)
+    map.cfg
+    map.lua
+    preview.png
+    desc.txt
+    DESTINATION ${SHAREPATH}Data/Maps/CTF_Blizzard)
--- a/share/hedgewars/Data/Maps/Cake/CMakeLists.txt	Fri Jan 25 13:29:20 2013 +0400
+++ b/share/hedgewars/Data/Maps/Cake/CMakeLists.txt	Tue Jan 29 10:10:23 2013 +0400
@@ -1,6 +1,6 @@
 install(FILES
-	map.png
-	mask.png
-	map.cfg
-	preview.png
-	DESTINATION ${SHAREPATH}Data/Maps/Cake)
+    map.png
+    mask.png
+    map.cfg
+    preview.png
+    DESTINATION ${SHAREPATH}Data/Maps/Cake)
--- a/share/hedgewars/Data/Maps/Castle/CMakeLists.txt	Fri Jan 25 13:29:20 2013 +0400
+++ b/share/hedgewars/Data/Maps/Castle/CMakeLists.txt	Tue Jan 29 10:10:23 2013 +0400
@@ -1,6 +1,6 @@
 install(FILES
-	map.png
-	mask.png
-	map.cfg
-	preview.png
-	DESTINATION ${SHAREPATH}Data/Maps/Castle)
+    map.png
+    mask.png
+    map.cfg
+    preview.png
+    DESTINATION ${SHAREPATH}Data/Maps/Castle)
--- a/share/hedgewars/Data/Maps/Cave/CMakeLists.txt	Fri Jan 25 13:29:20 2013 +0400
+++ b/share/hedgewars/Data/Maps/Cave/CMakeLists.txt	Tue Jan 29 10:10:23 2013 +0400
@@ -1,6 +1,6 @@
 install(FILES
-	map.png
-	mask.png
-	map.cfg
-	preview.png
-	DESTINATION ${SHAREPATH}Data/Maps/Cave)
+    map.png
+    mask.png
+    map.cfg
+    preview.png
+    DESTINATION ${SHAREPATH}Data/Maps/Cave)
--- a/share/hedgewars/Data/Maps/Cheese/CMakeLists.txt	Fri Jan 25 13:29:20 2013 +0400
+++ b/share/hedgewars/Data/Maps/Cheese/CMakeLists.txt	Tue Jan 29 10:10:23 2013 +0400
@@ -1,6 +1,6 @@
 install(FILES
-	map.png
-	mask.png
-	map.cfg
-	preview.png
-	DESTINATION ${SHAREPATH}Data/Maps/Cheese)
+    map.png
+    mask.png
+    map.cfg
+    preview.png
+    DESTINATION ${SHAREPATH}Data/Maps/Cheese)
--- a/share/hedgewars/Data/Maps/Cogs/CMakeLists.txt	Fri Jan 25 13:29:20 2013 +0400
+++ b/share/hedgewars/Data/Maps/Cogs/CMakeLists.txt	Tue Jan 29 10:10:23 2013 +0400
@@ -1,5 +1,5 @@
 install(FILES
-	map.png
-	map.cfg
-	preview.png
-	DESTINATION ${SHAREPATH}Data/Maps/Cogs)
+    map.png
+    map.cfg
+    preview.png
+    DESTINATION ${SHAREPATH}Data/Maps/Cogs)
--- a/share/hedgewars/Data/Maps/Control/CMakeLists.txt	Fri Jan 25 13:29:20 2013 +0400
+++ b/share/hedgewars/Data/Maps/Control/CMakeLists.txt	Tue Jan 29 10:10:23 2013 +0400
@@ -1,7 +1,7 @@
 install(FILES
-	map.cfg
-	map.lua
-	map.png
-	preview.png
-	desc.txt
-	DESTINATION ${SHAREPATH}Data/Maps/Control)
+    map.cfg
+    map.lua
+    map.png
+    preview.png
+    desc.txt
+    DESTINATION ${SHAREPATH}Data/Maps/Control)
--- a/share/hedgewars/Data/Maps/CrazyMission/CMakeLists.txt	Fri Jan 25 13:29:20 2013 +0400
+++ b/share/hedgewars/Data/Maps/CrazyMission/CMakeLists.txt	Tue Jan 29 10:10:23 2013 +0400
@@ -1,5 +1,5 @@
 install(FILES
-	map.png
-	map.cfg
-	preview.png
-	DESTINATION ${SHAREPATH}Data/Maps/CrazyMission)
+    map.png
+    map.cfg
+    preview.png
+    DESTINATION ${SHAREPATH}Data/Maps/CrazyMission)
--- a/share/hedgewars/Data/Maps/EarthRise/CMakeLists.txt	Fri Jan 25 13:29:20 2013 +0400
+++ b/share/hedgewars/Data/Maps/EarthRise/CMakeLists.txt	Tue Jan 29 10:10:23 2013 +0400
@@ -1,6 +1,6 @@
 install(FILES
-	map.png
-	mask.png
-	map.cfg
-	preview.png
-	DESTINATION ${SHAREPATH}Data/Maps/EarthRise)
+    map.png
+    mask.png
+    map.cfg
+    preview.png
+    DESTINATION ${SHAREPATH}Data/Maps/EarthRise)
--- a/share/hedgewars/Data/Maps/Eyes/CMakeLists.txt	Fri Jan 25 13:29:20 2013 +0400
+++ b/share/hedgewars/Data/Maps/Eyes/CMakeLists.txt	Tue Jan 29 10:10:23 2013 +0400
@@ -1,5 +1,5 @@
 install(FILES
-	map.png
-	map.cfg
-	preview.png
-	DESTINATION ${SHAREPATH}Data/Maps/Eyes)
+    map.png
+    map.cfg
+    preview.png
+    DESTINATION ${SHAREPATH}Data/Maps/Eyes)
--- a/share/hedgewars/Data/Maps/Hammock/CMakeLists.txt	Fri Jan 25 13:29:20 2013 +0400
+++ b/share/hedgewars/Data/Maps/Hammock/CMakeLists.txt	Tue Jan 29 10:10:23 2013 +0400
@@ -1,5 +1,5 @@
 install(FILES
-	map.png
-	map.cfg
-	preview.png
-	DESTINATION ${SHAREPATH}Data/Maps/Hammock)
+    map.png
+    map.cfg
+    preview.png
+    DESTINATION ${SHAREPATH}Data/Maps/Hammock)
--- a/share/hedgewars/Data/Maps/HedgeFortress/CMakeLists.txt	Fri Jan 25 13:29:20 2013 +0400
+++ b/share/hedgewars/Data/Maps/HedgeFortress/CMakeLists.txt	Tue Jan 29 10:10:23 2013 +0400
@@ -1,6 +1,6 @@
 install(FILES
-	map.png
-	mask.png
-	map.cfg
-	preview.png
-	DESTINATION ${SHAREPATH}Data/Maps/HedgeFortress)
+    map.png
+    mask.png
+    map.cfg
+    preview.png
+    DESTINATION ${SHAREPATH}Data/Maps/HedgeFortress)
--- a/share/hedgewars/Data/Maps/Hedgelove/CMakeLists.txt	Fri Jan 25 13:29:20 2013 +0400
+++ b/share/hedgewars/Data/Maps/Hedgelove/CMakeLists.txt	Tue Jan 29 10:10:23 2013 +0400
@@ -1,5 +1,5 @@
 install(FILES
-	map.png
-	map.cfg
-	preview.png
-	DESTINATION ${SHAREPATH}Data/Maps/Hedgelove)
+    map.png
+    map.cfg
+    preview.png
+    DESTINATION ${SHAREPATH}Data/Maps/Hedgelove)
--- a/share/hedgewars/Data/Maps/Hedgewars/CMakeLists.txt	Fri Jan 25 13:29:20 2013 +0400
+++ b/share/hedgewars/Data/Maps/Hedgewars/CMakeLists.txt	Tue Jan 29 10:10:23 2013 +0400
@@ -1,5 +1,5 @@
 install(FILES
-	map.png
-	map.cfg
-	preview.png
-	DESTINATION ${SHAREPATH}Data/Maps/Hedgewars)
+    map.png
+    map.cfg
+    preview.png
+    DESTINATION ${SHAREPATH}Data/Maps/Hedgewars)
--- a/share/hedgewars/Data/Maps/Hogville/CMakeLists.txt	Fri Jan 25 13:29:20 2013 +0400
+++ b/share/hedgewars/Data/Maps/Hogville/CMakeLists.txt	Tue Jan 29 10:10:23 2013 +0400
@@ -1,5 +1,5 @@
 install(FILES
-	map.png
-	map.cfg
-	preview.png
-	DESTINATION ${SHAREPATH}Data/Maps/Hogville)
+    map.png
+    map.cfg
+    preview.png
+    DESTINATION ${SHAREPATH}Data/Maps/Hogville)
--- a/share/hedgewars/Data/Maps/Hydrant/CMakeLists.txt	Fri Jan 25 13:29:20 2013 +0400
+++ b/share/hedgewars/Data/Maps/Hydrant/CMakeLists.txt	Tue Jan 29 10:10:23 2013 +0400
@@ -1,5 +1,5 @@
 install(FILES
-	map.png
-	map.cfg
-	preview.png
-	DESTINATION ${SHAREPATH}Data/Maps/Hydrant)
+    map.png
+    map.cfg
+    preview.png
+    DESTINATION ${SHAREPATH}Data/Maps/Hydrant)
--- a/share/hedgewars/Data/Maps/Islands/CMakeLists.txt	Fri Jan 25 13:29:20 2013 +0400
+++ b/share/hedgewars/Data/Maps/Islands/CMakeLists.txt	Tue Jan 29 10:10:23 2013 +0400
@@ -1,5 +1,5 @@
 install(FILES
-	map.png
-	map.cfg
-	preview.png
-	DESTINATION ${SHAREPATH}Data/Maps/Islands)
+    map.png
+    map.cfg
+    preview.png
+    DESTINATION ${SHAREPATH}Data/Maps/Islands)
--- a/share/hedgewars/Data/Maps/Knockball/CMakeLists.txt	Fri Jan 25 13:29:20 2013 +0400
+++ b/share/hedgewars/Data/Maps/Knockball/CMakeLists.txt	Tue Jan 29 10:10:23 2013 +0400
@@ -1,7 +1,7 @@
 install(FILES
-	map.png
-	map.cfg
-	map.lua
-	preview.png
-	desc.txt
-	DESTINATION ${SHAREPATH}Data/Maps/Knockball)
+    map.png
+    map.cfg
+    map.lua
+    preview.png
+    desc.txt
+    DESTINATION ${SHAREPATH}Data/Maps/Knockball)
--- a/share/hedgewars/Data/Maps/Lonely_Island/CMakeLists.txt	Fri Jan 25 13:29:20 2013 +0400
+++ b/share/hedgewars/Data/Maps/Lonely_Island/CMakeLists.txt	Tue Jan 29 10:10:23 2013 +0400
@@ -1,6 +1,6 @@
 install(FILES
-	map.png
-	mask.png
-	map.cfg
-	preview.png
-	DESTINATION ${SHAREPATH}Data/Maps/Lonely_Island)
+    map.png
+    mask.png
+    map.cfg
+    preview.png
+    DESTINATION ${SHAREPATH}Data/Maps/Lonely_Island)
--- a/share/hedgewars/Data/Maps/Mushrooms/CMakeLists.txt	Fri Jan 25 13:29:20 2013 +0400
+++ b/share/hedgewars/Data/Maps/Mushrooms/CMakeLists.txt	Tue Jan 29 10:10:23 2013 +0400
@@ -1,6 +1,6 @@
 install(FILES
-	map.png
-	mask.png
-	map.cfg
-	preview.png
-	DESTINATION ${SHAREPATH}Data/Maps/Mushrooms)
+    map.png
+    mask.png
+    map.cfg
+    preview.png
+    DESTINATION ${SHAREPATH}Data/Maps/Mushrooms)
--- a/share/hedgewars/Data/Maps/Octorama/CMakeLists.txt	Fri Jan 25 13:29:20 2013 +0400
+++ b/share/hedgewars/Data/Maps/Octorama/CMakeLists.txt	Tue Jan 29 10:10:23 2013 +0400
@@ -1,6 +1,6 @@
 install(FILES
-	info.txt
-	map.png
-	map.cfg
-	preview.png
-	DESTINATION ${SHAREPATH}Data/Maps/Octorama)
+    info.txt
+    map.png
+    map.cfg
+    preview.png
+    DESTINATION ${SHAREPATH}Data/Maps/Octorama)
--- a/share/hedgewars/Data/Maps/Octorama/info.txt	Fri Jan 25 13:29:20 2013 +0400
+++ b/share/hedgewars/Data/Maps/Octorama/info.txt	Tue Jan 29 10:10:23 2013 +0400
@@ -2,9 +2,9 @@
   octorama
 
 :: TYPE
-  custom hedgewars map 
- 
-:: VERSION 
+  custom hedgewars map
+
+:: VERSION
   RC3
 
 :: CHANGELOG
@@ -27,13 +27,13 @@
    - shades on upper left bubbles are now correct
    - removed the theme for now since the theme didn't
      bring anything new but the music (tiyuri)
- 
-:: DESCRIPTION 
-  just a fun map similar to bubbleflow 
- 
-:: CREATOR 
+
+:: DESCRIPTION
+  just a fun map similar to bubbleflow
+
+:: CREATOR
   jesse/jessor - http://geekosphere.org
- 
+
 :: RIGHTZ
   Octopod Vector Art: http://iconicon.net/ (CC)
 
--- a/share/hedgewars/Data/Maps/PirateFlag/CMakeLists.txt	Fri Jan 25 13:29:20 2013 +0400
+++ b/share/hedgewars/Data/Maps/PirateFlag/CMakeLists.txt	Tue Jan 29 10:10:23 2013 +0400
@@ -1,6 +1,6 @@
 install(FILES
-	map.png
-	map.cfg
-	preview.png
-	DESTINATION ${SHAREPATH}Data/Maps/PirateFlag)
+    map.png
+    map.cfg
+    preview.png
+    DESTINATION ${SHAREPATH}Data/Maps/PirateFlag)
 
--- a/share/hedgewars/Data/Maps/Plane/CMakeLists.txt	Fri Jan 25 13:29:20 2013 +0400
+++ b/share/hedgewars/Data/Maps/Plane/CMakeLists.txt	Tue Jan 29 10:10:23 2013 +0400
@@ -1,6 +1,6 @@
 install(FILES
-	map.png
-	map.cfg
-	preview.png
-	DESTINATION ${SHAREPATH}Data/Maps/Plane)
+    map.png
+    map.cfg
+    preview.png
+    DESTINATION ${SHAREPATH}Data/Maps/Plane)
 
--- a/share/hedgewars/Data/Maps/Ropes/CMakeLists.txt	Fri Jan 25 13:29:20 2013 +0400
+++ b/share/hedgewars/Data/Maps/Ropes/CMakeLists.txt	Tue Jan 29 10:10:23 2013 +0400
@@ -1,5 +1,5 @@
 install(FILES
-	map.png
-	map.cfg
-	preview.png
-	DESTINATION ${SHAREPATH}Data/Maps/Ropes)
+    map.png
+    map.cfg
+    preview.png
+    DESTINATION ${SHAREPATH}Data/Maps/Ropes)
--- a/share/hedgewars/Data/Maps/Ruler/CMakeLists.txt	Fri Jan 25 13:29:20 2013 +0400
+++ b/share/hedgewars/Data/Maps/Ruler/CMakeLists.txt	Tue Jan 29 10:10:23 2013 +0400
@@ -1,6 +1,6 @@
 install(FILES
-	map.png
-	map.cfg
-	preview.png
-	DESTINATION ${SHAREPATH}Data/Maps/Ruler)
+    map.png
+    map.cfg
+    preview.png
+    DESTINATION ${SHAREPATH}Data/Maps/Ruler)
 
--- a/share/hedgewars/Data/Maps/Sheep/CMakeLists.txt	Fri Jan 25 13:29:20 2013 +0400
+++ b/share/hedgewars/Data/Maps/Sheep/CMakeLists.txt	Tue Jan 29 10:10:23 2013 +0400
@@ -1,6 +1,6 @@
 install(FILES
-	map.png
-	map.cfg
-	preview.png
-	DESTINATION ${SHAREPATH}Data/Maps/Sheep)
+    map.png
+    map.cfg
+    preview.png
+    DESTINATION ${SHAREPATH}Data/Maps/Sheep)
 
--- a/share/hedgewars/Data/Maps/ShoppaKing/CMakeLists.txt	Fri Jan 25 13:29:20 2013 +0400
+++ b/share/hedgewars/Data/Maps/ShoppaKing/CMakeLists.txt	Tue Jan 29 10:10:23 2013 +0400
@@ -1,5 +1,5 @@
 install(FILES
-	map.png
-	map.cfg
-	preview.png
-	DESTINATION ${SHAREPATH}Data/Maps/ShoppaKing)
+    map.png
+    map.cfg
+    preview.png
+    DESTINATION ${SHAREPATH}Data/Maps/ShoppaKing)
--- a/share/hedgewars/Data/Maps/Sticks/CMakeLists.txt	Fri Jan 25 13:29:20 2013 +0400
+++ b/share/hedgewars/Data/Maps/Sticks/CMakeLists.txt	Tue Jan 29 10:10:23 2013 +0400
@@ -1,5 +1,5 @@
 install(FILES
-	map.png
-	map.cfg
-	preview.png
-	DESTINATION ${SHAREPATH}Data/Maps/Sticks)
+    map.png
+    map.cfg
+    preview.png
+    DESTINATION ${SHAREPATH}Data/Maps/Sticks)
--- a/share/hedgewars/Data/Maps/Trash/CMakeLists.txt	Fri Jan 25 13:29:20 2013 +0400
+++ b/share/hedgewars/Data/Maps/Trash/CMakeLists.txt	Tue Jan 29 10:10:23 2013 +0400
@@ -1,6 +1,6 @@
 install(FILES
-	map.png
-	map.cfg
-	preview.png
-	DESTINATION ${SHAREPATH}Data/Maps/Trash)
+    map.png
+    map.cfg
+    preview.png
+    DESTINATION ${SHAREPATH}Data/Maps/Trash)
 
--- a/share/hedgewars/Data/Maps/Tree/CMakeLists.txt	Fri Jan 25 13:29:20 2013 +0400
+++ b/share/hedgewars/Data/Maps/Tree/CMakeLists.txt	Tue Jan 29 10:10:23 2013 +0400
@@ -1,5 +1,5 @@
 install(FILES
-	map.png
-	map.cfg
-	preview.png
-	DESTINATION ${SHAREPATH}Data/Maps/Tree)
+    map.png
+    map.cfg
+    preview.png
+    DESTINATION ${SHAREPATH}Data/Maps/Tree)
--- a/share/hedgewars/Data/Maps/TrophyRace/CMakeLists.txt	Fri Jan 25 13:29:20 2013 +0400
+++ b/share/hedgewars/Data/Maps/TrophyRace/CMakeLists.txt	Tue Jan 29 10:10:23 2013 +0400
@@ -1,8 +1,8 @@
 install(FILES
-	map.cfg
-	map.lua
-	map.png
-	mask.png
-	preview.png
-	desc.txt
-	DESTINATION ${SHAREPATH}Data/Maps/TrophyRace)
+    map.cfg
+    map.lua
+    map.png
+    mask.png
+    preview.png
+    desc.txt
+    DESTINATION ${SHAREPATH}Data/Maps/TrophyRace)
--- a/share/hedgewars/Data/Maps/portal/CMakeLists.txt	Fri Jan 25 13:29:20 2013 +0400
+++ b/share/hedgewars/Data/Maps/portal/CMakeLists.txt	Tue Jan 29 10:10:23 2013 +0400
@@ -1,6 +1,6 @@
 install(FILES
-	map.png
-	mask.png
-	map.cfg
-	preview.png
-	DESTINATION ${SHAREPATH}Data/Maps/portal)
+    map.png
+    mask.png
+    map.cfg
+    preview.png
+    DESTINATION ${SHAREPATH}Data/Maps/portal)
--- a/share/hedgewars/Data/Missions/Campaign/A Classic Fairytale/CMakeLists.txt	Fri Jan 25 13:29:20 2013 +0400
+++ b/share/hedgewars/Data/Missions/Campaign/A Classic Fairytale/CMakeLists.txt	Tue Jan 29 10:10:23 2013 +0400
@@ -2,6 +2,6 @@
 file(GLOB Missions *.lua)
 
 install(FILES
-	${Config}
-	${Missions}
-	DESTINATION "${SHAREPATH}Data/Missions/Campaign/A Classic Fairytale")
+    ${Config}
+    ${Missions}
+    DESTINATION "${SHAREPATH}Data/Missions/Campaign/A Classic Fairytale")
--- a/share/hedgewars/Data/Missions/Campaign/CMakeLists.txt	Fri Jan 25 13:29:20 2013 +0400
+++ b/share/hedgewars/Data/Missions/Campaign/CMakeLists.txt	Tue Jan 29 10:10:23 2013 +0400
@@ -3,5 +3,5 @@
 file(GLOB Scripts *.lua)
 
 install(FILES
-	${Scripts}
-	DESTINATION ${SHAREPATH}Data/Missions/Campaign)
+    ${Scripts}
+    DESTINATION ${SHAREPATH}Data/Missions/Campaign)
--- a/share/hedgewars/Data/Missions/Training/CMakeLists.txt	Fri Jan 25 13:29:20 2013 +0400
+++ b/share/hedgewars/Data/Missions/Training/CMakeLists.txt	Tue Jan 29 10:10:23 2013 +0400
@@ -1,5 +1,5 @@
 file(GLOB Scripts *.lua)
 
 install(FILES
-	${Scripts}
-	DESTINATION ${SHAREPATH}Data/Missions/Training)
+    ${Scripts}
+    DESTINATION ${SHAREPATH}Data/Missions/Training)
--- a/share/hedgewars/Data/Music/CMakeLists.txt	Fri Jan 25 13:29:20 2013 +0400
+++ b/share/hedgewars/Data/Music/CMakeLists.txt	Tue Jan 29 10:10:23 2013 +0400
@@ -1,5 +1,5 @@
-file(GLOB BaseMusic *.ogg) 
+file(GLOB BaseMusic *.ogg)
 
 install(FILES
-	${BaseMusic}
-	DESTINATION ${SHAREPATH}Data/Music)
+    ${BaseMusic}
+    DESTINATION ${SHAREPATH}Data/Music)
--- a/share/hedgewars/Data/Names/CMakeLists.txt	Fri Jan 25 13:29:20 2013 +0400
+++ b/share/hedgewars/Data/Names/CMakeLists.txt	Tue Jan 29 10:10:23 2013 +0400
@@ -2,7 +2,7 @@
 file(GLOB cfgnames *.cfg)
 
 install(FILES
-	types.ini
-	${txtnames}
-	${cfgnames}
-	DESTINATION ${SHAREPATH}Data/Names)
+    types.ini
+    ${txtnames}
+    ${cfgnames}
+    DESTINATION ${SHAREPATH}Data/Names)
--- a/share/hedgewars/Data/Scripts/CMakeLists.txt	Fri Jan 25 13:29:20 2013 +0400
+++ b/share/hedgewars/Data/Scripts/CMakeLists.txt	Tue Jan 29 10:10:23 2013 +0400
@@ -1,7 +1,7 @@
 file(GLOB luafiles *.lua)
 
 install(FILES
-	${luafiles}
-	DESTINATION ${SHAREPATH}Data/Scripts)
+    ${luafiles}
+    DESTINATION ${SHAREPATH}Data/Scripts)
 
 add_subdirectory(Multiplayer)
--- a/share/hedgewars/Data/Scripts/Multiplayer/CMakeLists.txt	Fri Jan 25 13:29:20 2013 +0400
+++ b/share/hedgewars/Data/Scripts/Multiplayer/CMakeLists.txt	Tue Jan 29 10:10:23 2013 +0400
@@ -2,6 +2,6 @@
 file(GLOB cfgfiles *.cfg)
 
 install(FILES
-	${luafiles}
-	${cfgfiles}
-	DESTINATION ${SHAREPATH}Data/Scripts/Multiplayer)
+    ${luafiles}
+    ${cfgfiles}
+    DESTINATION ${SHAREPATH}Data/Scripts/Multiplayer)
--- a/share/hedgewars/Data/Sounds/CMakeLists.txt	Fri Jan 25 13:29:20 2013 +0400
+++ b/share/hedgewars/Data/Sounds/CMakeLists.txt	Tue Jan 29 10:10:23 2013 +0400
@@ -1,7 +1,7 @@
 add_subdirectory(voices)
 
-file(GLOB BaseSounds *.ogg) 
+file(GLOB BaseSounds *.ogg)
 
 install(FILES
-	${BaseSounds}
-	DESTINATION ${SHAREPATH}Data/Sounds)
+    ${BaseSounds}
+    DESTINATION ${SHAREPATH}Data/Sounds)
--- a/share/hedgewars/Data/Sounds/voices/British/CMakeLists.txt	Fri Jan 25 13:29:20 2013 +0400
+++ b/share/hedgewars/Data/Sounds/voices/British/CMakeLists.txt	Tue Jan 29 10:10:23 2013 +0400
@@ -37,5 +37,5 @@
 )
 
 install(FILES
-	${VoiceSounds}
-	DESTINATION ${SHAREPATH}Data/Sounds/voices/British)
+    ${VoiceSounds}
+    DESTINATION ${SHAREPATH}Data/Sounds/voices/British)
--- a/share/hedgewars/Data/Sounds/voices/CMakeLists.txt	Fri Jan 25 13:29:20 2013 +0400
+++ b/share/hedgewars/Data/Sounds/voices/CMakeLists.txt	Tue Jan 29 10:10:23 2013 +0400
@@ -1,16 +1,16 @@
 foreach(dir
     British
-	Classic
-	Default
-	Mobster
-	Pirate
-	Robot
-	Russian
-	Singer
-	Surfer
-	Default_uk
-	Default_es
-	HillBilly
-	)
-	add_subdirectory(${dir})
+    Classic
+    Default
+    Mobster
+    Pirate
+    Robot
+    Russian
+    Singer
+    Surfer
+    Default_uk
+    Default_es
+    HillBilly
+    )
+    add_subdirectory(${dir})
 endforeach(dir)
--- a/share/hedgewars/Data/Sounds/voices/Classic/CMakeLists.txt	Fri Jan 25 13:29:20 2013 +0400
+++ b/share/hedgewars/Data/Sounds/voices/Classic/CMakeLists.txt	Tue Jan 29 10:10:23 2013 +0400
@@ -37,5 +37,5 @@
 )
 
 install(FILES
-	${VoiceSounds}
-	DESTINATION ${SHAREPATH}Data/Sounds/voices/Classic)
+    ${VoiceSounds}
+    DESTINATION ${SHAREPATH}Data/Sounds/voices/Classic)
--- a/share/hedgewars/Data/Sounds/voices/Default/CMakeLists.txt	Fri Jan 25 13:29:20 2013 +0400
+++ b/share/hedgewars/Data/Sounds/voices/Default/CMakeLists.txt	Tue Jan 29 10:10:23 2013 +0400
@@ -37,5 +37,5 @@
 )
 
 install(FILES
-	${VoiceSounds}
-	DESTINATION ${SHAREPATH}Data/Sounds/voices/Default)
+    ${VoiceSounds}
+    DESTINATION ${SHAREPATH}Data/Sounds/voices/Default)
--- a/share/hedgewars/Data/Sounds/voices/Default_es/CMakeLists.txt	Fri Jan 25 13:29:20 2013 +0400
+++ b/share/hedgewars/Data/Sounds/voices/Default_es/CMakeLists.txt	Tue Jan 29 10:10:23 2013 +0400
@@ -37,5 +37,5 @@
 )
 
 install(FILES
-	${VoiceSounds}
-	DESTINATION ${SHAREPATH}Data/Sounds/voices/Default_es)
+    ${VoiceSounds}
+    DESTINATION ${SHAREPATH}Data/Sounds/voices/Default_es)
--- a/share/hedgewars/Data/Sounds/voices/Default_uk/CMakeLists.txt	Fri Jan 25 13:29:20 2013 +0400
+++ b/share/hedgewars/Data/Sounds/voices/Default_uk/CMakeLists.txt	Tue Jan 29 10:10:23 2013 +0400
@@ -37,5 +37,5 @@
 )
 
 install(FILES
-	${VoiceSounds}
-	DESTINATION ${SHAREPATH}Data/Sounds/voices/Default_uk)
+    ${VoiceSounds}
+    DESTINATION ${SHAREPATH}Data/Sounds/voices/Default_uk)
--- a/share/hedgewars/Data/Sounds/voices/HillBilly/CMakeLists.txt	Fri Jan 25 13:29:20 2013 +0400
+++ b/share/hedgewars/Data/Sounds/voices/HillBilly/CMakeLists.txt	Tue Jan 29 10:10:23 2013 +0400
@@ -37,5 +37,5 @@
 )
 
 install(FILES
-	${VoiceSounds}
-	DESTINATION ${SHAREPATH}Data/Sounds/voices/HillBilly)
+    ${VoiceSounds}
+    DESTINATION ${SHAREPATH}Data/Sounds/voices/HillBilly)
--- a/share/hedgewars/Data/Sounds/voices/HillBilly/readme.txt	Fri Jan 25 13:29:20 2013 +0400
+++ b/share/hedgewars/Data/Sounds/voices/HillBilly/readme.txt	Tue Jan 29 10:10:23 2013 +0400
@@ -3,8 +3,8 @@
 
 
 
-What can I say? I got bored and decided to add a little West Virginia to the game. 
+What can I say? I got bored and decided to add a little West Virginia to the game.
 
-This version has better quality audio, and the oofs, fireballs, oops, and ows were replaced as well. 
+This version has better quality audio, and the oofs, fireballs, oops, and ows were replaced as well.
 
 Enjoy.
--- a/share/hedgewars/Data/Sounds/voices/Mobster/CMakeLists.txt	Fri Jan 25 13:29:20 2013 +0400
+++ b/share/hedgewars/Data/Sounds/voices/Mobster/CMakeLists.txt	Tue Jan 29 10:10:23 2013 +0400
@@ -37,5 +37,5 @@
 )
 
 install(FILES
-	${VoiceSounds}
-	DESTINATION ${SHAREPATH}Data/Sounds/voices/Mobster)
+    ${VoiceSounds}
+    DESTINATION ${SHAREPATH}Data/Sounds/voices/Mobster)
--- a/share/hedgewars/Data/Sounds/voices/Pirate/CMakeLists.txt	Fri Jan 25 13:29:20 2013 +0400
+++ b/share/hedgewars/Data/Sounds/voices/Pirate/CMakeLists.txt	Tue Jan 29 10:10:23 2013 +0400
@@ -37,5 +37,5 @@
 )
 
 install(FILES
-	${VoiceSounds}
-	DESTINATION ${SHAREPATH}Data/Sounds/voices/Pirate)
+    ${VoiceSounds}
+    DESTINATION ${SHAREPATH}Data/Sounds/voices/Pirate)
--- a/share/hedgewars/Data/Sounds/voices/Robot/CMakeLists.txt	Fri Jan 25 13:29:20 2013 +0400
+++ b/share/hedgewars/Data/Sounds/voices/Robot/CMakeLists.txt	Tue Jan 29 10:10:23 2013 +0400
@@ -37,5 +37,5 @@
 )
 
 install(FILES
-	${VoiceSounds}
-	DESTINATION ${SHAREPATH}Data/Sounds/voices/Robot)
+    ${VoiceSounds}
+    DESTINATION ${SHAREPATH}Data/Sounds/voices/Robot)
--- a/share/hedgewars/Data/Sounds/voices/Russian/CMakeLists.txt	Fri Jan 25 13:29:20 2013 +0400
+++ b/share/hedgewars/Data/Sounds/voices/Russian/CMakeLists.txt	Tue Jan 29 10:10:23 2013 +0400
@@ -37,5 +37,5 @@
 )
 
 install(FILES
-	${VoiceSounds}
-	DESTINATION ${SHAREPATH}Data/Sounds/voices/Russian)
+    ${VoiceSounds}
+    DESTINATION ${SHAREPATH}Data/Sounds/voices/Russian)
--- a/share/hedgewars/Data/Sounds/voices/Singer/CMakeLists.txt	Fri Jan 25 13:29:20 2013 +0400
+++ b/share/hedgewars/Data/Sounds/voices/Singer/CMakeLists.txt	Tue Jan 29 10:10:23 2013 +0400
@@ -37,5 +37,5 @@
 )
 
 install(FILES
-	${VoiceSounds}
-	DESTINATION ${SHAREPATH}Data/Sounds/voices/Singer)
+    ${VoiceSounds}
+    DESTINATION ${SHAREPATH}Data/Sounds/voices/Singer)
--- a/share/hedgewars/Data/Sounds/voices/Surfer/CMakeLists.txt	Fri Jan 25 13:29:20 2013 +0400
+++ b/share/hedgewars/Data/Sounds/voices/Surfer/CMakeLists.txt	Tue Jan 29 10:10:23 2013 +0400
@@ -37,5 +37,5 @@
 )
 
 install(FILES
-	${VoiceSounds}
-	DESTINATION ${SHAREPATH}Data/Sounds/voices/Surfer)
+    ${VoiceSounds}
+    DESTINATION ${SHAREPATH}Data/Sounds/voices/Surfer)
--- a/share/hedgewars/Data/Themes/CMakeLists.txt	Fri Jan 25 13:29:20 2013 +0400
+++ b/share/hedgewars/Data/Themes/CMakeLists.txt	Tue Jan 29 10:10:23 2013 +0400
@@ -1,34 +1,34 @@
 foreach(dir
-	Art
-	Bamboo
-	Bath
-	Blox
-	Brick
-	Cake
-	Cave
-	Castle
-	Cheese
-	Christmas
-	Compost
-	Deepspace
-	Desert
-	City
-	CrazyMission
-	EarthRise
-	Eyes
-	Freeway
-	Golf
-	Halloween
-	Hell
-	Island
-	Jungle
-	Nature
-	Olympics
-	Planes
-	Sheep
-	Snow
-	Stage
-	Underwater
-	)
-	add_subdirectory(${dir})
+    Art
+    Bamboo
+    Bath
+    Blox
+    Brick
+    Cake
+    Cave
+    Castle
+    Cheese
+    Christmas
+    Compost
+    Deepspace
+    Desert
+    City
+    CrazyMission
+    EarthRise
+    Eyes
+    Freeway
+    Golf
+    Halloween
+    Hell
+    Island
+    Jungle
+    Nature
+    Olympics
+    Planes
+    Sheep
+    Snow
+    Stage
+    Underwater
+    )
+    add_subdirectory(${dir})
 endforeach(dir)
--- a/tools/PascalParser.hs	Fri Jan 25 13:29:20 2013 +0400
+++ b/tools/PascalParser.hs	Tue Jan 29 10:10:23 2013 +0400
@@ -45,7 +45,7 @@
         parens pas (liftM RefExpression expression >>= postfixes) >>= postfixes
         , try $ typeCast >>= postfixes
         , char '@' >> liftM Address reference >>= postfixes
-        , liftM SimpleReference iD >>= postfixes 
+        , liftM SimpleReference iD >>= postfixes
         ] <?> "simple reference"
 
     table = [
@@ -149,7 +149,7 @@
         if null r then
             return $ ArrayDecl Nothing t
             else
-            return $ foldr (\a b -> ArrayDecl (Just a) b) (ArrayDecl (Just $ head r) t) (tail r) 
+            return $ foldr (\a b -> ArrayDecl (Just a) b) (ArrayDecl (Just $ head r) t) (tail r)
     recordDecl = do
         try $ do
             optional $ (try $ string "packed") >> comments
@@ -401,7 +401,7 @@
         {-, [  Infix (try $ string "shl" >> return (BinOp "shl")) AssocNone
              , Infix (try $ string "shr" >> return (BinOp "shr")) AssocNone
           ]
-        , [ 
+        , [
              Infix (try $ string "or" >> return (BinOp "or")) AssocLeft
            , Infix (try $ string "xor" >> return (BinOp "xor")) AssocLeft
           ]-}
@@ -497,7 +497,7 @@
             optionMaybe $ choice [
                 try $ string "to"
                 , try $ string "downto"
-                ]   
+                ]
     --choice [string "to", string "downto"]
     comments
     e2 <- expression
@@ -563,7 +563,7 @@
 initExpression = buildExpressionParser table term <?> "initialization expression"
     where
     term = comments >> choice [
-        liftM (uncurry BuiltInFunction) $ builtInFunction initExpression 
+        liftM (uncurry BuiltInFunction) $ builtInFunction initExpression
         , try $ brackets pas (commaSep pas $ initExpression) >>= return . InitSet
         , try $ parens pas (commaSep pas $ initExpression) >>= \ia -> when (null $ tail ia) mzero >> return (InitArray ia)
         , try $ parens pas (sepEndBy recField (char ';' >> comments)) >>= return . InitRecord
--- a/tools/pas2c.hs	Fri Jan 25 13:29:20 2013 +0400
+++ b/tools/pas2c.hs	Tue Jan 29 10:10:23 2013 +0400
@@ -502,7 +502,7 @@
     liftM (map(\i -> t' i)) $ mapM (id2CTyped2 (Just $ t' empty) (VarParamType t)) ids
 
 tvar2C _ externVar includeType ignoreInit (VarDeclaration _ isConst (ids, t) mInitExpr) = do
-    t' <- liftM (((if isConst then text "static const" else if externVar 
+    t' <- liftM (((if isConst then text "static const" else if externVar
                                                                 then text "extern"
                                                                 else empty)
                    <+>) . ) $ type2C t
@@ -522,18 +522,18 @@
             ie' <- return $ case (r, mInitExpr, ignoreInit) of
                 (RangeInfinite, Nothing, False) -> text "= NULL" -- force dynamic array to be initialized as NULL if not initialized at all
                 (_, _, _) -> ie
-            result <- liftM (map(\i -> varDeclDecision isConst includeType (t' i) ie')) $ mapM (id2CTyped t) ids           
+            result <- liftM (map(\i -> varDeclDecision isConst includeType (t' i) ie')) $ mapM (id2CTyped t) ids
             case (r, ignoreInit) of
-                (RangeInfinite, False) -> 
+                (RangeInfinite, False) ->
                     -- if the array is dynamic, add dimension info to it
                     return $ [dimDecl] ++ result
-                    where 
+                    where
                         arrayDimStr = show $ arrayDimension t
                         arrayDimInitExp = text ("={" ++ ".dim = " ++ arrayDimStr ++ ", .a = {0, 0, 0, 0}}")
                         dimDecl = varDeclDecision isConst includeType (text "fpcrtl_dimension_t" <+>  i' <> text "_dimension_info") arrayDimInitExp
-                    
+
                 (_, _) -> return result
-            
+
          _ -> liftM (map(\i -> varDeclDecision isConst includeType (t' i) ie)) $ mapM (id2CTyped2 (Just $ t' empty) t) ids
     where
     initExpr Nothing = return $ empty
@@ -815,7 +815,7 @@
         i <+> text "=" <+> e1 <> semi
         $$
         iType <+> iEnd <+> text "=" <+> e2 <> semi
-        $$ 
+        $$
         text "if" <+> (parens $ i <+> text "<=" <+> iEnd) <+> text "do" <+> ph <+>
         text "while" <> parens (i <+> text "!=" <+> iEnd <+> text add) <> semi
     where
--- a/tools/templates/mainform.cpp	Fri Jan 25 13:29:20 2013 +0400
+++ b/tools/templates/mainform.cpp	Tue Jan 29 10:10:23 2013 +0400
@@ -9,102 +9,102 @@
 #include "mainform.h"
 
 MyWindow::MyWindow(QWidget * parent, Qt::WFlags flags)
-		: QMainWindow(parent, flags)
+        : QMainWindow(parent, flags)
 
 {
-	QWidget * centralWidget = new QWidget(this);
-	QGridLayout * mainlayout = new QGridLayout(centralWidget);
-	mainlayout->setMargin(1);
-	mainlayout->setSpacing(1);
+    QWidget * centralWidget = new QWidget(this);
+    QGridLayout * mainlayout = new QGridLayout(centralWidget);
+    mainlayout->setMargin(1);
+    mainlayout->setSpacing(1);
 
-	sa_xy = new QScrollArea(centralWidget);
-	xy = new PixLabel();
-	xy->setFixedSize(1024, 512);
-	sa_xy->setWidget(xy);
+    sa_xy = new QScrollArea(centralWidget);
+    xy = new PixLabel();
+    xy->setFixedSize(1024, 512);
+    sa_xy->setWidget(xy);
 
-	mainlayout->addWidget(sa_xy, 0, 0, 1, 4);
+    mainlayout->addWidget(sa_xy, 0, 0, 1, 4);
 
-	setCentralWidget(centralWidget);
+    setCentralWidget(centralWidget);
 
-	buttAdd = new QPushButton(centralWidget);
-	buttAdd->setText(tr("Add"));
-	mainlayout->addWidget(buttAdd, 1, 0);
+    buttAdd = new QPushButton(centralWidget);
+    buttAdd->setText(tr("Add"));
+    mainlayout->addWidget(buttAdd, 1, 0);
 
-	buttCode = new QPushButton(centralWidget);
-	buttCode->setText(tr("Code"));
-	mainlayout->addWidget(buttCode, 1, 1);
+    buttCode = new QPushButton(centralWidget);
+    buttCode->setText(tr("Code"));
+    mainlayout->addWidget(buttCode, 1, 1);
 
-	buttSave = new QPushButton(centralWidget);
-	buttSave->setText(tr("Save"));
-	mainlayout->addWidget(buttSave, 1, 3);
+    buttSave = new QPushButton(centralWidget);
+    buttSave->setText(tr("Save"));
+    mainlayout->addWidget(buttSave, 1, 3);
 
-	buttLoad = new QPushButton(centralWidget);
-	buttLoad->setText(tr("Load"));
-	mainlayout->addWidget(buttLoad, 1, 2);
+    buttLoad = new QPushButton(centralWidget);
+    buttLoad->setText(tr("Load"));
+    mainlayout->addWidget(buttLoad, 1, 2);
 
-	connect(buttAdd, SIGNAL(clicked()), xy, SLOT(AddRect()));
-	connect(buttCode, SIGNAL(clicked()), this, SLOT(Code()));
-	connect(buttSave, SIGNAL(clicked()), this, SLOT(Save()));
-	connect(buttLoad, SIGNAL(clicked()), this, SLOT(Load()));
+    connect(buttAdd, SIGNAL(clicked()), xy, SLOT(AddRect()));
+    connect(buttCode, SIGNAL(clicked()), this, SLOT(Code()));
+    connect(buttSave, SIGNAL(clicked()), this, SLOT(Save()));
+    connect(buttLoad, SIGNAL(clicked()), this, SLOT(Load()));
 }
 
 void MyWindow::Code()
 {
-	if (xy->rects.size())
-	{
-		QFile f("template.pas");
-		if (!f.open(QIODevice::WriteOnly))
-		{
-			QMessageBox::information(this, tr("Error"),
-						tr("Cannot save"));
-			return ;
-		}
+    if (xy->rects.size())
+    {
+        QFile f("template.pas");
+        if (!f.open(QIODevice::WriteOnly))
+        {
+            QMessageBox::information(this, tr("Error"),
+                        tr("Cannot save"));
+            return ;
+        }
 
-		QTextStream stream(&f);
-		stream << QString("const Template0Points: array[0..%1] of TSDL_Rect =").arg(xy->rects.size() - 1) << endl;
-		stream << "      (" << endl;
-		for(int i = 0; i < xy->rects.size(); i++)
-		{
-			QRect r = xy->rects[i].normalized();
-			stream << QString("       (x: %1; y: %2; w: %3; h: %4),").
-					arg(r.x() * 4, 4).arg(r.y() * 4, 4).arg(r.width() * 4, 4).arg(r.height() * 4, 4) << endl;
-		}
-		stream << "      );" << endl;
-		f.close();
-	}
+        QTextStream stream(&f);
+        stream << QString("const Template0Points: array[0..%1] of TSDL_Rect =").arg(xy->rects.size() - 1) << endl;
+        stream << "      (" << endl;
+        for(int i = 0; i < xy->rects.size(); i++)
+        {
+            QRect r = xy->rects[i].normalized();
+            stream << QString("       (x: %1; y: %2; w: %3; h: %4),").
+                    arg(r.x() * 4, 4).arg(r.y() * 4, 4).arg(r.width() * 4, 4).arg(r.height() * 4, 4) << endl;
+        }
+        stream << "      );" << endl;
+        f.close();
+    }
 }
 
 void MyWindow::Save()
 {
-	Code();
+    Code();
 }
 
 void MyWindow::Load()
 {
-	QFile f("template.pas");
-	if (!f.open(QIODevice::ReadOnly))
-	{
-		QMessageBox::information(this, tr("Error"),
-					tr("Cannot open file"));
-		return ;
-	}
+    QFile f("template.pas");
+    if (!f.open(QIODevice::ReadOnly))
+    {
+        QMessageBox::information(this, tr("Error"),
+                    tr("Cannot open file"));
+        return ;
+    }
 
-	QTextStream stream(&f);
-	QStringList sl;
-	while (!stream.atEnd())
-	{
-		sl << stream.readLine();
-	}
-	xy->rects.clear();
-	for (int i = 0; i < sl.size(); ++i)
-	{
-		QRegExp re("x:\\s+(\\d+);\\sy:\\s+(\\d+);\\sw:\\s+(\\d+);\\sh:\\s+(\\d+)");
-		re.indexIn(sl.at(i));
-		QStringList coords = re.capturedTexts();
-		qDebug() << sl.at(i) << coords;
-		if ((coords.size() == 5) && (coords[0].size()))
-			xy->rects.push_back(QRect(coords[1].toInt() / 4, coords[2].toInt() / 4, coords[3].toInt() / 4, coords[4].toInt() / 4));
-	}
-	f.close();
-	xy->repaint();
+    QTextStream stream(&f);
+    QStringList sl;
+    while (!stream.atEnd())
+    {
+        sl << stream.readLine();
+    }
+    xy->rects.clear();
+    for (int i = 0; i < sl.size(); ++i)
+    {
+        QRegExp re("x:\\s+(\\d+);\\sy:\\s+(\\d+);\\sw:\\s+(\\d+);\\sh:\\s+(\\d+)");
+        re.indexIn(sl.at(i));
+        QStringList coords = re.capturedTexts();
+        qDebug() << sl.at(i) << coords;
+        if ((coords.size() == 5) && (coords[0].size()))
+            xy->rects.push_back(QRect(coords[1].toInt() / 4, coords[2].toInt() / 4, coords[3].toInt() / 4, coords[4].toInt() / 4));
+    }
+    f.close();
+    xy->repaint();
 }
--- a/tools/templates/mainform.h	Fri Jan 25 13:29:20 2013 +0400
+++ b/tools/templates/mainform.h	Tue Jan 29 10:10:23 2013 +0400
@@ -7,23 +7,23 @@
 
 class MyWindow : public QMainWindow
 {
-	Q_OBJECT
+    Q_OBJECT
 
 public:
 
-	MyWindow(QWidget * parent = 0, Qt::WFlags flags = 0);
+    MyWindow(QWidget * parent = 0, Qt::WFlags flags = 0);
 
 private:
 
-	QScrollArea * sa_xy;
-	PixLabel * xy;
-	QPushButton * buttAdd;
-	QPushButton * buttCode;
-	QPushButton * buttSave;
-	QPushButton * buttLoad;
+    QScrollArea * sa_xy;
+    PixLabel * xy;
+    QPushButton * buttAdd;
+    QPushButton * buttCode;
+    QPushButton * buttSave;
+    QPushButton * buttLoad;
 
 private slots:
-	void Code();
-	void Save();
-	void Load();
+    void Code();
+    void Save();
+    void Load();
 };
--- a/tools/templates/pixlabel.cpp	Fri Jan 25 13:29:20 2013 +0400
+++ b/tools/templates/pixlabel.cpp	Tue Jan 29 10:10:23 2013 +0400
@@ -3,49 +3,49 @@
 #include "pixlabel.h"
 
 PixLabel::PixLabel()
-		: QLabel(0)
+        : QLabel(0)
 {
 
 }
 
 void PixLabel::paintEvent(QPaintEvent * event)
 {
-	QLabel::paintEvent(event);
-	QPainter p(this);
+    QLabel::paintEvent(event);
+    QPainter p(this);
 
-	p.fillRect(QRect(0, 0, 1024, 512), QBrush(Qt::black));
+    p.fillRect(QRect(0, 0, 1024, 512), QBrush(Qt::black));
 
-	if (rects.size())
-	{
-		p.setPen(QPen(Qt::lightGray));
-		QVector<QPoint> centers;
-		for(QList<QRect>::const_iterator it = rects.begin(); it != rects.end(); ++it)
-			centers.push_back((*it).center());
-		p.drawPolyline(QPolygon(centers));
+    if (rects.size())
+    {
+        p.setPen(QPen(Qt::lightGray));
+        QVector<QPoint> centers;
+        for(QList<QRect>::const_iterator it = rects.begin(); it != rects.end(); ++it)
+            centers.push_back((*it).center());
+        p.drawPolyline(QPolygon(centers));
 
-		p.setPen(QPen(Qt::white));
-		p.drawRects(rects.toVector());
+        p.setPen(QPen(Qt::white));
+        p.drawRects(rects.toVector());
 
-		p.setPen(QPen(Qt::yellow));
-		p.drawRect(rects.last());
-	}
+        p.setPen(QPen(Qt::yellow));
+        p.drawRect(rects.last());
+    }
 }
 
 void PixLabel::mousePressEvent(QMouseEvent * e)
 {
-	if (!rects.empty())
-	{
-		if (e->button() == Qt::LeftButton)
-			rects[rects.size() - 1].moveTopLeft(QPoint(e->x(), e->y()));
-		else
-		if (e->button() == Qt::RightButton)
-			rects[rects.size() - 1].setBottomRight(QPoint(e->x(), e->y()));
-		repaint();
-	}
+    if (!rects.empty())
+    {
+        if (e->button() == Qt::LeftButton)
+            rects[rects.size() - 1].moveTopLeft(QPoint(e->x(), e->y()));
+        else
+        if (e->button() == Qt::RightButton)
+            rects[rects.size() - 1].setBottomRight(QPoint(e->x(), e->y()));
+        repaint();
+    }
 }
 
 void PixLabel::AddRect()
 {
-	rects.push_back(QRect(0, 0, 1, 1));
-	repaint();
+    rects.push_back(QRect(0, 0, 1, 1));
+    repaint();
 }
--- a/tools/templates/pixlabel.h	Fri Jan 25 13:29:20 2013 +0400
+++ b/tools/templates/pixlabel.h	Tue Jan 29 10:10:23 2013 +0400
@@ -5,17 +5,17 @@
 
 class PixLabel : public QLabel
 {
-	Q_OBJECT
+    Q_OBJECT
 
 public:
 
-	PixLabel();
-	QList<QRect> rects;
+    PixLabel();
+    QList<QRect> rects;
 
 public slots:
-	void AddRect();
+    void AddRect();
 
 private:
-	void paintEvent(QPaintEvent * event);
-	void mousePressEvent(QMouseEvent * e);
+    void paintEvent(QPaintEvent * event);
+    void mousePressEvent(QMouseEvent * e);
 };