Merge pull request #14 from LocutusOfBorg/fix-desktop
authorsheepluva <sheepluva@users.noreply.github.com>
Sat, 08 Nov 2014 12:10:37 +0100
changeset 10468 1648912925f9
parent 10467 7d0fbc847df9 (diff)
parent 10459 02e010b64a28 (current diff)
child 10470 dae4bb274822
Merge pull request #14 from LocutusOfBorg/fix-desktop Fixed desktop file https://wiki.debian.org/Games/JessieReleaseGoal
--- a/QTfrontend/res/css/qt.css	Fri Jan 24 15:37:40 2014 +0100
+++ b/QTfrontend/res/css/qt.css	Sat Nov 08 12:10:37 2014 +0100
@@ -275,6 +275,21 @@
 height: 6px;
 border-radius: 3px;
 }
+#mapFeatureSize {
+margin-left: 3px;
+}
+
+#mapFeatureSize::groove::horizontal {
+/* background-color: #141250; 
+background-color: rgba(20, 18, 80, 50%);
+*/
+background-color: rgba(0, 0, 0, 60%);
+}
+#mapFeatureSize::handle {
+/* background-color: #141250; */
+background-color: rgba(0, 0, 0, 60%);
+border-radius: 5px;
+}
 
 HatButton, ThemeButton {
 text-align: left;
--- a/QTfrontend/ui/widget/mapContainer.cpp	Fri Jan 24 15:37:40 2014 +0100
+++ b/QTfrontend/ui/widget/mapContainer.cpp	Sat Nov 08 12:10:37 2014 +0100
@@ -16,27 +16,28 @@
  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
  */
 
-#include <QPushButton>
+#include <QBitmap>
 #include <QBuffer>
-#include <QUuid>
-#include <QBitmap>
-#include <QPainter>
-#include <QLinearGradient>
 #include <QColor>
-#include <QTextStream>
-#include <QLabel>
-#include <QListView>
-#include <QVBoxLayout>
-#include <QIcon>
-#include <QLineEdit>
-#include <QStringListModel>
-#include <QListWidget>
-#include <QListWidgetItem>
 #include <QDebug>
 #include <QFile>
 #include <QFileDialog>
+#include <QIcon>
 #include <QInputDialog>
+#include <QLabel>
+#include <QLinearGradient>
+#include <QLineEdit>
+#include <QListView>
+#include <QListWidget>
+#include <QListWidgetItem>
 #include <QMessageBox>
+#include <QPainter>
+#include <QPushButton>
+#include <QSlider>
+#include <QStringListModel>
+#include <QTextStream>
+#include <QUuid>
+#include <QVBoxLayout>
 
 #include "hwconsts.h"
 #include "mapContainer.h"
@@ -152,6 +153,15 @@
     leftLayout->addWidget(mapPreview, 0);
     connect(mapPreview, SIGNAL(clicked()), this, SLOT(previewClicked()));
 
+    mapFeatureSize = new QSlider(Qt::Horizontal, this);
+    mapFeatureSize->setObjectName("mapFeatureSize");
+    //mapFeatureSize->setTickPosition(QSlider::TicksBelow);
+    mapFeatureSize->setMaximum(100);
+    mapFeatureSize->setMinimum(1);
+    mapFeatureSize->setFixedWidth(259);
+    mapFeatureSize->setValue(50);
+    leftLayout->addWidget(mapFeatureSize, 0);
+
     /* Bottom-Left layout */
 
     QVBoxLayout * bottomLeftLayout = new QVBoxLayout();
@@ -544,19 +554,24 @@
     {
         mapgen = m;
 
+        bool f = false;
         switch (m)
         {
             case MAPGEN_REGULAR:
                 m_mapInfo.type = MapModel::GeneratedMap;
+                f = true;
                 break;
             case MAPGEN_MAZE:
                 m_mapInfo.type = MapModel::GeneratedMaze;
+                f = true;
                 break;
             case MAPGEN_PERLIN:
                 m_mapInfo.type = MapModel::GeneratedPerlin;
+                f = true;
                 break;
             case MAPGEN_DRAWN:
                 m_mapInfo.type = MapModel::HandDrawnMap;
+                f = true;
                 break;
             case MAPGEN_MAP:
                 switch (m_mapInfo.type)
@@ -572,7 +587,8 @@
                 break;
         }
 
-        emit mapgenChanged(m);
+        if(f)
+            changeMapType(m_mapInfo.type, QModelIndex());
     }
 }
 
@@ -873,11 +889,8 @@
         mapList->scrollTo(map);
     }
 
-    if (map.data(Qt::UserRole + 1).canConvert<MapModel::MapInfo>())
-        setMapInfo(map.data(Qt::UserRole + 1).value<MapModel::MapInfo>());
-    else
-        Q_ASSERT(false); // Houston, we have a problem.
-
+    Q_ASSERT(map.data(Qt::UserRole + 1).canConvert<MapModel::MapInfo>()); // Houston, we have a problem.
+    setMapInfo(map.data(Qt::UserRole + 1).value<MapModel::MapInfo>());
 }
 
 void HWMapContainer::setMapInfo(MapModel::MapInfo mapInfo)
--- a/QTfrontend/ui/widget/mapContainer.h	Fri Jan 24 15:37:40 2014 +0100
+++ b/QTfrontend/ui/widget/mapContainer.h	Sat Nov 08 12:10:37 2014 +0100
@@ -20,13 +20,14 @@
 #ifndef _HWMAP_CONTAINER_INCLUDED
 #define _HWMAP_CONTAINER_INCLUDED
 
-#include <QWidget>
-#include <QGridLayout>
-#include <QVBoxLayout>
+#include <QByteArray>
 #include <QComboBox>
+#include <QGridLayout>
 #include <QLabel>
-#include <QByteArray>
 #include <QLineEdit>
+#include <QSlider>
+#include <QVBoxLayout>
+#include <QWidget>
 
 #include "DataManager.h"
 
@@ -117,6 +118,7 @@
     private:
         QVBoxLayout mainLayout;
         QPushButton* mapPreview;
+        QSlider* mapFeatureSize;
         QComboBox* chooseMap;
         MapModel * m_staticMapModel;
         MapModel * m_missionMapModel;
--- a/hedgewars/uTypes.pas	Fri Jan 24 15:37:40 2014 +0100
+++ b/hedgewars/uTypes.pas	Sat Nov 08 12:10:37 2014 +0100
@@ -449,7 +449,7 @@
             sidConfirm, sidSuddenDeath, sidRemaining, sidFuel, sidSync,
             sidNoEndTurn, sidNotYetAvailable, sidRoundSD, sidRoundsSD, sidReady,
             sidBounce1, sidBounce2, sidBounce3, sidBounce4, sidBounce5, sidBounce,
-            sidMute, sidAFK, sidAutoCameraOn, sidAutoCameraOff);
+            sidMute, sidAFK, sidAutoCameraOff, sidAutoCameraOn);
 
     // Events that are important for the course of the game or at least interesting for other reasons
     TEventId = (eidDied, eidDrowned, eidRoundStart, eidRoundWin, eidRoundDraw,
--- a/project_files/hedgewars.pro	Fri Jan 24 15:37:40 2014 +0100
+++ b/project_files/hedgewars.pro	Sat Nov 08 12:10:37 2014 +0100
@@ -251,7 +251,7 @@
 
 RESOURCES += ../QTfrontend/hedgewars.qrc
 
-LIBS += -L../bin -lhwphysfs -lphyslayer
+LIBS += -L../bin -lphysfs -lphyslayer
 
 macx {
     QMAKE_MACOSX_DEPLOYMENT_TARGET = 10.6
--- a/share/hedgewars/Data/Locale/hedgewars_it.ts	Fri Jan 24 15:37:40 2014 +0100
+++ b/share/hedgewars/Data/Locale/hedgewars_it.ts	Sat Nov 08 12:10:37 2014 +0100
@@ -27,7 +27,7 @@
     </message>
     <message>
         <source>copy of %1</source>
-        <translation type="unfinished"></translation>
+        <translation>copia di %1</translation>
     </message>
 </context>
 <context>
@@ -62,7 +62,7 @@
     </message>
     <message>
         <source>you know why</source>
-        <translation></translation>
+        <translation>tu sai perché</translation>
     </message>
     <message>
         <source>Warning</source>
@@ -176,7 +176,7 @@
     <name>GameUIConfig</name>
     <message>
         <source>Guest</source>
-        <translation type="unfinished"></translation>
+        <translation>Ospite</translation>
     </message>
 </context>
 <context>
@@ -237,52 +237,52 @@
     <message>
         <source>Usage</source>
         <comment>command-line</comment>
-        <translation type="unfinished"></translation>
+        <translation>Utilizzo</translation>
     </message>
     <message>
         <source>OPTION</source>
         <comment>command-line</comment>
-        <translation type="unfinished"></translation>
+        <translation>OPZIONI</translation>
     </message>
     <message>
         <source>CONNECTSTRING</source>
         <comment>command-line</comment>
-        <translation type="unfinished"></translation>
+        <translation>STRINGACONNESSIONE</translation>
     </message>
     <message>
         <source>Options</source>
         <comment>command-line</comment>
-        <translation type="unfinished"></translation>
+        <translation>Opzioni</translation>
     </message>
     <message>
         <source>Display this help</source>
         <comment>command-line</comment>
-        <translation type="unfinished"></translation>
+        <translation>Visualizza questo messaggio di help</translation>
     </message>
     <message>
         <source>Custom path for configuration data and user data</source>
         <comment>command-line</comment>
-        <translation type="unfinished"></translation>
+        <translation>Percorso personalizzato per la configurazione e i dati utente</translation>
     </message>
     <message>
         <source>Custom path to the game data folder</source>
         <comment>command-line</comment>
-        <translation type="unfinished"></translation>
+        <translation>Percorso personalizzato per i dati del gioco</translation>
     </message>
     <message>
         <source>Hedgewars can use a %1 (e.g. &quot;%2&quot;) to connect on start.</source>
         <comment>command-line</comment>
-        <translation type="unfinished"></translation>
+        <translation>Hedgewars può usare un %1 (per esempio  &quot;%2&quot;) per connettersi all'avvio.</translation>
     </message>
     <message>
         <source>Malformed option argument: %1</source>
         <comment>command-line</comment>
-        <translation type="unfinished"></translation>
+        <translation>Argomento %1 errato</translation>
     </message>
     <message>
         <source>Unknown option argument: %1</source>
         <comment>command-line</comment>
-        <translation type="unfinished"></translation>
+        <translation>Opzione %1 sconosciuta</translation>
     </message>
 </context>
 <context>
@@ -461,16 +461,17 @@
     </message>
     <message>
         <source>Guest</source>
-        <translation type="unfinished"></translation>
+        <translation>Ospite</translation>
     </message>
     <message>
         <source>Room password</source>
-        <translation type="unfinished"></translation>
+        <translation>Password stanza</translation>
     </message>
     <message>
         <source>The room is protected with password.
 Please, enter the password:</source>
-        <translation type="unfinished"></translation>
+        <translation>Questa stanza è protetta da password.
+Per piacere, inserisci la password:</translation>
     </message>
 </context>
 <context>
@@ -492,7 +493,14 @@
 
 Last two engine messages:
 %2</source>
-        <translation type="unfinished"></translation>
+        <translation type="unfinished">ERRORE non recuperabile! Il motore di gioco si è dovuto arrestare.
+
+Ci dispiace molto per l'inconveniente :(
+
+Se continua a succedere, per piacere clicca il bottone &apos;%1&apos; nel menu principale!
+
+Ultimi due messaggi del motore:
+%2</translation>
     </message>
 </context>
 <context>
@@ -631,7 +639,7 @@
     </message>
     <message>
         <source>Style:</source>
-        <translation type="unfinished"></translation>
+        <translation>Stile:</translation>
     </message>
 </context>
 <context>
@@ -701,7 +709,7 @@
     </message>
     <message>
         <source>Server authentication error</source>
-        <translation type="unfinished"></translation>
+        <translation>Errore di autenticazione server</translation>
     </message>
 </context>
 <context>
@@ -801,15 +809,15 @@
     </message>
     <message>
         <source>Duration: %1m %2s</source>
-        <translation type="unfinished"></translation>
+        <translation>Durata: %1m %2s</translation>
     </message>
     <message>
         <source>Video: %1x%2</source>
-        <translation type="unfinished"></translation>
+        <translation>Video: %1x%2</translation>
     </message>
     <message>
         <source>%1 fps</source>
-        <translation type="unfinished"></translation>
+        <translation>%1 fps</translation>
     </message>
 </context>
 <context>
@@ -901,7 +909,7 @@
     </message>
     <message>
         <source>Open packages directory</source>
-        <translation type="unfinished"></translation>
+        <translation>Apri la cartella dei pacchetti</translation>
     </message>
 </context>
 <context>
@@ -944,19 +952,19 @@
     </message>
     <message>
         <source>Polyline</source>
-        <translation type="unfinished"></translation>
+        <translation>Polilinea</translation>
     </message>
     <message>
         <source>Rectangle</source>
-        <translation type="unfinished"></translation>
+        <translation>Rettangolo</translation>
     </message>
     <message>
         <source>Ellipse</source>
-        <translation type="unfinished"></translation>
+        <translation>Ellisse</translation>
     </message>
     <message>
         <source>Optimize</source>
-        <translation type="unfinished"></translation>
+        <translation>Ottimizza</translation>
     </message>
 </context>
 <context>
@@ -1018,7 +1026,7 @@
     </message>
     <message numerus="yes">
         <source>The best shot award was won by &lt;b&gt;%1&lt;/b&gt; with &lt;b&gt;%2&lt;/b&gt; pts.</source>
-        <translation type="unfinished">
+        <translation>
             <numerusform>Il premio per il miglior colpo è stato vinto da &lt;b&gt;%1&lt;/b&gt; con &lt;b&gt;%2&lt;/b&gt; punti.</numerusform>
             <numerusform></numerusform>
         </translation>
@@ -1838,27 +1846,27 @@
     </message>
     <message>
         <source>Team</source>
-        <translation type="unfinished"></translation>
+        <translation type="unfinished">Squadra</translation>
     </message>
     <message>
         <source>Enable team tags by default</source>
-        <translation type="unfinished"></translation>
+        <translation type="unfinished">Abilita i tag della squadra in automatico</translation>
     </message>
     <message>
         <source>Hog</source>
-        <translation type="unfinished"></translation>
+        <translation type="unfinished">Riccio</translation>
     </message>
     <message>
         <source>Enable hedgehog tags by default</source>
-        <translation type="unfinished"></translation>
+        <translation type="unfinished">Abilita i tag dei ricci in automatico</translation>
     </message>
     <message>
         <source>Health</source>
-        <translation type="unfinished"></translation>
+        <translation type="unfinished">Vita</translation>
     </message>
     <message>
         <source>Enable health tags by default</source>
-        <translation type="unfinished"></translation>
+        <translation type="unfinished">Abilita i tag della vita in automatico</translation>
     </message>
     <message>
         <source>Translucent</source>
@@ -2255,7 +2263,7 @@
     </message>
     <message>
         <source>Tip: %1</source>
-        <translation type="unfinished"></translation>
+        <translation type="unfinished">Consiglio: %1</translation>
     </message>
     <message>
         <source>Displayed tags above hogs and translucent tags</source>
@@ -2267,7 +2275,7 @@
     </message>
     <message>
         <source>Script parameter</source>
-        <translation type="unfinished"></translation>
+        <translation type="unfinished">Parametro dello script</translation>
     </message>
 </context>
 <context>
@@ -2554,7 +2562,7 @@
     <name>QObject</name>
     <message>
         <source>No description available</source>
-        <translation type="unfinished">Nessuna descrizione disponibile</translation>
+        <translation>Nessuna descrizione disponibile</translation>
     </message>
 </context>
 <context>
@@ -2696,7 +2704,7 @@
     </message>
     <message>
         <source>set password</source>
-        <translation type="unfinished"></translation>
+        <translation>imposta la password</translation>
     </message>
 </context>
 <context>
@@ -2747,7 +2755,7 @@
     </message>
     <message>
         <source>Script</source>
-        <translation type="unfinished"></translation>
+        <translation>Script</translation>
     </message>
     <message>
         <source>Random Perlin</source>
@@ -2801,7 +2809,7 @@
     </message>
     <message>
         <source>copy of %1</source>
-        <translation type="unfinished"></translation>
+        <translation>copia di %1</translation>
     </message>
 </context>
 <context>
@@ -3031,7 +3039,7 @@
     </message>
     <message>
         <source>speed up replay</source>
-        <translation type="unfinished"></translation>
+        <translation>aumenta velocità replay</translation>
     </message>
 </context>
 <context>
@@ -3455,115 +3463,115 @@
     <name>server</name>
     <message>
         <source>Not room master</source>
-        <translation type="unfinished">Non proprietario della stanza</translation>
+        <translation>Non proprietario della stanza</translation>
     </message>
     <message>
         <source>Corrupted hedgehogs info</source>
-        <translation type="unfinished">Informazioni ricci corrotte</translation>
+        <translation>Informazioni ricci corrotte</translation>
     </message>
     <message>
         <source>too many teams</source>
-        <translation type="unfinished">troppe squadre</translation>
+        <translation>troppe squadre</translation>
     </message>
     <message>
         <source>too many hedgehogs</source>
-        <translation type="unfinished">troppi ricci</translation>
+        <translation>troppi ricci</translation>
     </message>
     <message>
         <source>There&apos;s already a team with same name in the list</source>
-        <translation type="unfinished">C&apos;è già una quadra collo stesso nome in lista</translation>
+        <translation>C&apos;è già una quadra con lo stesso nome nella lista</translation>
     </message>
     <message>
         <source>round in progress</source>
-        <translation type="unfinished">turno in corso</translation>
+        <translation>turno in corso</translation>
     </message>
     <message>
         <source>restricted</source>
-        <translation type="unfinished">proibito</translation>
+        <translation>proibito</translation>
     </message>
     <message>
         <source>REMOVE_TEAM: no such team</source>
-        <translation type="unfinished">CANCELLA_SQUADRA: squadra non presente</translation>
+        <translation>CANCELLA_SQUADRA: squadra non presente</translation>
     </message>
     <message>
         <source>Not team owner!</source>
-        <translation type="unfinished">Non proprietario della squadra!</translation>
+        <translation>Non proprietario della squadra!</translation>
     </message>
     <message>
         <source>Less than two clans!</source>
-        <translation type="unfinished">Meno di due clan!</translation>
+        <translation>Meno di due clan!</translation>
     </message>
     <message>
         <source>Room with such name already exists</source>
-        <translation type="unfinished">Esiste già una stanza con questo nome</translation>
+        <translation>Esiste già una stanza con questo nome</translation>
     </message>
     <message>
         <source>Nickname already chosen</source>
-        <translation type="unfinished">Nome già scelto</translation>
+        <translation>Nickname già in uso</translation>
     </message>
     <message>
         <source>Illegal nickname</source>
-        <translation type="unfinished">Nome non valido</translation>
+        <translation>Nickname non valido</translation>
     </message>
     <message>
         <source>Protocol already known</source>
-        <translation type="unfinished">Protocollo già conosciuto</translation>
+        <translation>Protocollo già conosciuto</translation>
     </message>
     <message>
         <source>Bad number</source>
-        <translation type="unfinished">Numero non valido</translation>
+        <translation>Numero non valido</translation>
     </message>
     <message>
         <source>Nickname is already in use</source>
-        <translation type="unfinished">Nome già in uso</translation>
+        <translation>Nickname già in uso</translation>
     </message>
     <message>
         <source>Authentication failed</source>
-        <translation type="unfinished">Autenticazione fallita</translation>
+        <translation>Autenticazione fallita</translation>
     </message>
     <message>
         <source>60 seconds cooldown after kick</source>
-        <translation type="unfinished">60 secondi di raffreddamento prima dell&apos;espulsione</translation>
+        <translation>60 secondi di raffreddamento prima dell&apos;espulsione</translation>
     </message>
     <message>
         <source>kicked</source>
-        <translation type="unfinished">espulso</translation>
+        <translation>espulso</translation>
     </message>
     <message>
         <source>Ping timeout</source>
-        <translation type="unfinished">Scadenza ping</translation>
+        <translation>Scadenza ping</translation>
     </message>
     <message>
         <source>bye</source>
-        <translation type="unfinished">ciao</translation>
+        <translation>ciao</translation>
     </message>
     <message>
         <source>Illegal room name</source>
-        <translation type="unfinished">Nome stanza non valido</translation>
+        <translation>Nome stanza non valido</translation>
     </message>
     <message>
         <source>No such room</source>
-        <translation type="unfinished">Stanza non esistente</translation>
+        <translation>Stanza non esistente</translation>
     </message>
     <message>
         <source>Joining restricted</source>
-        <translation type="unfinished">Ingresso riservato</translation>
+        <translation>Ingresso riservato</translation>
     </message>
     <message>
         <source>Registered users only</source>
-        <translation type="unfinished">Solo utenti registrati</translation>
+        <translation>Solo utenti registrati</translation>
     </message>
     <message>
         <source>You are banned in this room</source>
-        <translation type="unfinished">Sei stato espulso dalla stanza</translation>
+        <translation>Sei stato espulso dalla stanza</translation>
     </message>
     <message>
         <source>Empty config entry</source>
-        <translation type="unfinished">Configurazione vuota</translation>
+        <translation>Configurazione vuota</translation>
     </message>
     <message>
         <source>Restricted</source>
-        <translation type="unfinished"></translation>
+        <translation>Riservato</translation>
     </message>
     <message>
         <source>No checker rights</source>
@@ -3571,63 +3579,63 @@
     </message>
     <message>
         <source>Room version incompatible to your hedgewars version</source>
-        <translation type="unfinished"></translation>
+        <translation>Stanza non compatibile con la tua versione di hedgewars</translation>
     </message>
     <message>
         <source>You already have voted</source>
-        <translation type="unfinished"></translation>
+        <translation>Hai già votato</translation>
     </message>
     <message>
         <source>Voting closed</source>
-        <translation type="unfinished"></translation>
+        <translation>Votazioni chiuse</translation>
     </message>
     <message>
         <source>New voting started</source>
-        <translation type="unfinished"></translation>
+        <translation>Nuova votazione avviata</translation>
     </message>
     <message>
         <source>Voting expired</source>
-        <translation type="unfinished"></translation>
+        <translation>Votazione scaduta</translation>
     </message>
     <message>
         <source>kick</source>
-        <translation type="unfinished"></translation>
+        <translation>espelli</translation>
     </message>
     <message>
         <source>map</source>
-        <translation type="unfinished"></translation>
+        <translation>mappa</translation>
     </message>
     <message>
         <source>pause</source>
-        <translation type="unfinished">pausa</translation>
+        <translation>pausa</translation>
     </message>
     <message>
         <source>Reconnected too fast</source>
-        <translation type="unfinished"></translation>
+        <translation>Riconnessione troppo veloce</translation>
     </message>
     <message>
         <source>Warning! Chat flood protection activated</source>
-        <translation type="unfinished"></translation>
+        <translation>Attenzione! Protezione eccessivo numero messaggi attivata</translation>
     </message>
     <message>
         <source>Excess flood</source>
-        <translation type="unfinished"></translation>
+        <translation type="unfinished">Eccessivo numero messaggi</translation>
     </message>
     <message>
         <source>Game messages flood detected - 1</source>
-        <translation type="unfinished"></translation>
+        <translation type="unfinished">Rilevato numero messaggi di gioco eccessivo - 1</translation>
     </message>
     <message>
         <source>Game messages flood detected - 2</source>
-        <translation type="unfinished"></translation>
+        <translation type="unfinished">Rilevato numero messaggi di gioco eccessivo - 2</translation>
     </message>
     <message>
         <source>Warning! Joins flood protection activated</source>
-        <translation type="unfinished"></translation>
+        <translation type="unfinished">Attenzione! Protezione congiunta eccessivo numero messaggi attivata</translation>
     </message>
     <message>
         <source>There&apos;s no voting going on</source>
-        <translation type="unfinished"></translation>
+        <translation>Non ci sono votazioni in questo momento</translation>
     </message>
 </context>
 </TS>