#include <QSettings>
#include <QTranslator>
#include <QLocale>
+#include <QInputDialog>
+#include <QMessageBox>
#include "keygen.h"
#include "mainwindow.h"
MKeyGen mkg;
if(mkg.exec()==QDialog::Accepted)
QSettings().setValue("hostkey",mkg.getKey());
+ else{
+ QMessageBox::critical(0,app.translate("initkey","Warning"), app.translate("initkey","Magic Smoke needs a host key. You have to generate one before you can use the program."));
+ return 1;
+ }
}
- if(!QSettings().contains("profiles")){
+ QString iprof;
+ if(!QSettings().childGroups().contains("profiles")){
+ iprof="0";
+ bool ok;
+ QString ipname=app.translate("initprofile","default","initial profile");
+ ipname=QInputDialog::getText(0,app.translate("initprofile","Create Initial Profile"), app.translate("initprofile","You need a profile to work with Magic Smoke. Magic Smoke will now create one for you. Please enter the name you wish to give this profile."), QLineEdit::Normal, ipname, &ok);
+ if(!ok || ipname.isEmpty())return 1;
+ QSettings().setValue("profiles/0/name",ipname);
}
MMainWindow mmw;
<translation>&Abbrechen</translation>
</message>
</context>
+<context>
+ <name>initkey</name>
+ <message>
+ <location filename="main.cpp" line="47"/>
+ <source>Warning</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="main.cpp" line="47"/>
+ <source>Magic Smoke needs a host key. You have to generate one before you can use the program.</source>
+ <translation type="unfinished"></translation>
+ </message>
+</context>
+<context>
+ <name>initprofile</name>
+ <message>
+ <location filename="main.cpp" line="55"/>
+ <source>default</source>
+ <comment>initial profile</comment>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="main.cpp" line="56"/>
+ <source>Create Initial Profile</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="main.cpp" line="56"/>
+ <source>You need a profile to work with Magic Smoke. Magic Smoke will now create one for you. Please enter the name you wish to give this profile.</source>
+ <translation type="unfinished"></translation>
+ </message>
+</context>
</TS>
<translation>&Nee lass mal.</translation>
</message>
</context>
+<context>
+ <name>initkey</name>
+ <message>
+ <location filename="main.cpp" line="47"/>
+ <source>Warning</source>
+ <translation>Dumm gelaufen</translation>
+ </message>
+ <message>
+ <location filename="main.cpp" line="47"/>
+ <source>Magic Smoke needs a host key. You have to generate one before you can use the program.</source>
+ <translation>Mädschig Schmohg brauchd 'nen Schlüssel. Desweschen isser beleidschd. Beim nächsden Schdard mussde ihn einen mach'n lass'n.</translation>
+ </message>
+</context>
+<context>
+ <name>initprofile</name>
+ <message>
+ <location filename="main.cpp" line="55"/>
+ <source>default</source>
+ <comment>initial profile</comment>
+ <translation>Schandardbrofiel</translation>
+ </message>
+ <message>
+ <location filename="main.cpp" line="56"/>
+ <source>Create Initial Profile</source>
+ <translation>Erschdes Brofiel anlechen</translation>
+ </message>
+ <message>
+ <location filename="main.cpp" line="56"/>
+ <source>You need a profile to work with Magic Smoke. Magic Smoke will now create one for you. Please enter the name you wish to give this profile.</source>
+ <translation>Gugge, Du brauchsd sowas wie'n Brofiel. Mädschig Schmohg iss nedd und machd eens für Disch. Desderweschen brauchsde jedsd nur noch n Namen dafür eindibben.</translation>
+ </message>
+</context>
</TS>