not much more
authorkonrad <konrad@6e3c4bff-ac9f-4ac1-96c5-d2ea494d3e33>
Sun, 8 Jul 2007 14:38:59 +0000 (14:38 +0000)
committerkonrad <konrad@6e3c4bff-ac9f-4ac1-96c5-d2ea494d3e33>
Sun, 8 Jul 2007 14:38:59 +0000 (14:38 +0000)
git-svn-id: https://silmor.de/svn/softmagic/smoke/trunk@10 6e3c4bff-ac9f-4ac1-96c5-d2ea494d3e33

src/main.cpp
src/smoke_de.ts
src/smoke_de_SAX.ts

index 832005f..c03dbc7 100644 (file)
@@ -14,6 +14,8 @@
 #include <QSettings>
 #include <QTranslator>
 #include <QLocale>
+#include <QInputDialog>
+#include <QMessageBox>
 
 #include "keygen.h"
 #include "mainwindow.h"
@@ -41,8 +43,19 @@ int main(int argc,char**argv)
                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;
index 4f562b9..c2c30a8 100644 (file)
@@ -30,4 +30,36 @@ At least %1 Bits of random are required.</source>
         <translation>&amp;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>
index abb570d..b7a2704 100644 (file)
@@ -31,4 +31,36 @@ At least %1 Bits of random are required.</source>
         <translation>&amp;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 &apos;nen Schlüssel. Desweschen isser beleidschd. Beim nächsden Schdard mussde ihn einen mach&apos;n lass&apos;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&apos;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>