From b591ff45acbeabe502bac551853f7dbd5b34e4f3 Mon Sep 17 00:00:00 2001
From: Rafael <Syping@users.noreply.github.com>
Date: Tue, 26 Jul 2016 08:22:10 +0200
Subject: [PATCH] OptionsDialog give informations at changing default Custom
 Folder

---
 OptionsDialog.cpp   |  19 +++++++++++++------
 OptionsDialog.h     |   2 ++
 lang/gta5sync_ru.ts |  24 +++++++++++++-----------
 res/gta5sync_de.qm  | Bin 23392 -> 23520 bytes
 res/gta5sync_de.ts  |  26 ++++++++++++++++++--------
 5 files changed, 46 insertions(+), 25 deletions(-)

diff --git a/OptionsDialog.cpp b/OptionsDialog.cpp
index b252916..f627921 100755
--- a/OptionsDialog.cpp
+++ b/OptionsDialog.cpp
@@ -240,9 +240,10 @@ void OptionsDialog::applySettings()
     settings->setValue("AspectRatio", aspectRatio);
     settings->endGroup();
 
+    bool forceCustomFolder = ui->cbForceCustomFolder->isChecked();
     settings->beginGroup("dir");
     settings->setValue("dir", ui->txtFolder->text());
-    settings->setValue("force", ui->cbForceCustomFolder->isChecked());
+    settings->setValue("force", forceCustomFolder);
     settings->endGroup();
 
 #if QT_VERSION >= 0x050000
@@ -256,6 +257,11 @@ void OptionsDialog::applySettings()
 #else
     bool languageChanged = ui->cbLanguage->itemData(ui->cbLanguage->currentIndex()).toString() != currentLanguage;
 #endif
+
+    if (forceCustomFolder && ui->txtFolder->text() != currentCFolder || forceCustomFolder != currentFFolder && forceCustomFolder)
+    {
+        QMessageBox::information(this, tr("%1", "%1").arg(GTA5SYNC_APPSTR), tr("The new Custom Folder will initialize after you restart %1.").arg(GTA5SYNC_APPSTR));
+    }
     if (languageChanged)
     {
         QMessageBox::information(this, tr("%1", "%1").arg(GTA5SYNC_APPSTR), tr("The language change will take effect after you restart %1.").arg(GTA5SYNC_APPSTR));
@@ -384,13 +390,14 @@ void OptionsDialog::setupCustomGTAFolder()
     bool ok;
     QString defaultGameFolder = AppEnv::getGameFolder(&ok);
     settings->beginGroup("dir");
-    QString customGameFolder = settings->value("dir", "").toString();
-    if (customGameFolder == "" && ok)
+    currentCFolder = settings->value("dir", "").toString();
+    currentFFolder = settings->value("force", false).toBool();
+    if (currentCFolder == "" && ok)
     {
-        customGameFolder = defaultGameFolder;
+        currentCFolder = defaultGameFolder;
     }
-    ui->txtFolder->setText(customGameFolder);
-    ui->cbForceCustomFolder->setChecked(settings->value("force", false).toBool());
+    ui->txtFolder->setText(currentCFolder);
+    ui->cbForceCustomFolder->setChecked(currentFFolder);
     settings->endGroup();
 }
 
diff --git a/OptionsDialog.h b/OptionsDialog.h
index 4fcdeaa..824fbac 100755
--- a/OptionsDialog.h
+++ b/OptionsDialog.h
@@ -56,9 +56,11 @@ private:
     QList<QTreeWidgetItem*> playerItems;
     Qt::AspectRatioMode aspectRatio;
     QString currentLanguage;
+    QString currentCFolder;
     QString defaultProfile;
     QString percentString;
     QSettings *settings;
+    bool currentFFolder;
     int contentMode;
     int customQuality;
     int defaultQuality;
diff --git a/lang/gta5sync_ru.ts b/lang/gta5sync_ru.ts
index 1f45176..432c12d 100755
--- a/lang/gta5sync_ru.ts
+++ b/lang/gta5sync_ru.ts
@@ -264,26 +264,32 @@ Copyright &amp;copy; &lt;a href=&quot;https://github.com/Syping/&quot;&gt;Syping
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location filename="../OptionsDialog.cpp" line="261"/>
+        <location filename="../OptionsDialog.cpp" line="263"/>
+        <location filename="../OptionsDialog.cpp" line="267"/>
         <source>%1</source>
         <comment>%1</comment>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location filename="../OptionsDialog.cpp" line="261"/>
+        <location filename="../OptionsDialog.cpp" line="263"/>
+        <source>The new Custom Folder will initialize after you restart %1.</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="../OptionsDialog.cpp" line="267"/>
         <source>The language change will take effect after you restart %1.</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location filename="../OptionsDialog.cpp" line="271"/>
+        <location filename="../OptionsDialog.cpp" line="277"/>
         <source>No Profile</source>
         <comment>No Profile, as default</comment>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location filename="../OptionsDialog.cpp" line="279"/>
-        <location filename="../OptionsDialog.cpp" line="283"/>
         <location filename="../OptionsDialog.cpp" line="285"/>
+        <location filename="../OptionsDialog.cpp" line="289"/>
+        <location filename="../OptionsDialog.cpp" line="291"/>
         <source>Profile: %1</source>
         <translation type="unfinished"></translation>
     </message>
@@ -1090,6 +1096,7 @@ Copyright &amp;copy; &lt;a href=&quot;https://github.com/Syping/&quot;&gt;Syping
     </message>
     <message>
         <location filename="../UserInterface.ui" line="285"/>
+        <location filename="../UserInterface.cpp" line="123"/>
         <source>Select &amp;GTA V Folder...</source>
         <translation type="unfinished"></translation>
     </message>
@@ -1187,17 +1194,12 @@ Copyright &amp;copy; &lt;a href=&quot;https://github.com/Syping/&quot;&gt;Syping
     </message>
     <message>
         <location filename="../UserInterface.ui" line="288"/>
-        <location filename="../OptionsDialog.cpp" line="398"/>
+        <location filename="../OptionsDialog.cpp" line="406"/>
         <location filename="../UserInterface.cpp" line="72"/>
         <location filename="../UserInterface.cpp" line="446"/>
         <source>Select GTA V Folder...</source>
         <translation type="unfinished"></translation>
     </message>
-    <message>
-        <location filename="../UserInterface.cpp" line="123"/>
-        <source>Select GTA V &amp;Folder...</source>
-        <translation type="unfinished"></translation>
-    </message>
     <message>
         <location filename="../UserInterface.cpp" line="303"/>
         <source>Open File...</source>
diff --git a/res/gta5sync_de.qm b/res/gta5sync_de.qm
index f7349b5f33df0404ef40572af84e98662bea84d5..28eac5b9f93a0713849c6fd0ad2a27f2b368948d 100755
GIT binary patch
delta 1694
zcmXApc~DbV6vn?KFTA{$geZcFg2vh)yPyOjhyo$(;6jkrDdPgMjX>yN5XYI4w#tl-
z6zm|ywvH<<WvSK(E=(PfL54DdqiEe1grSb@SZz_XR(jI=$9uo~?!D){bI<widDtd-
zcv`Y^w$!uXYh9=#=?8HA9I*T}xEp35>JsEBdcb`J<R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^u!rn^NpN_Q#D-pprlmsL(usiRzd`slzKX7<L&DW+7in%0`trUemwh4(r*_hi
zcj=h13nB2b?%0YofY*76v(8D3eysOdONE3+>K7$YYu=d>ZEF2Hr6if^w*ITpC3I66
z^tBf$uYQ}p?WB|L;_3RqFN{zlrkJuihFme)kj64qm`7uk&%X;@Avrq11_vxKAd9~K
quG*X_-d>r`_0E-r2AjiT$TIjR<gZ`lEHE04uKEnG#@#uovi||3uFY!z

diff --git a/res/gta5sync_de.ts b/res/gta5sync_de.ts
index 8904ee0..73b3c7d 100755
--- a/res/gta5sync_de.ts
+++ b/res/gta5sync_de.ts
@@ -341,26 +341,36 @@ Copyright &amp;copy; &lt;a href=&quot;https://github.com/Syping/&quot;&gt;Syping
         <translation>%1 (%2 wenn verfügbar)</translation>
     </message>
     <message>
-        <location filename="../OptionsDialog.cpp" line="261"/>
+        <location filename="../OptionsDialog.cpp" line="263"/>
+        <location filename="../OptionsDialog.cpp" line="267"/>
         <source>%1</source>
         <comment>%1</comment>
         <translation>%1</translation>
     </message>
     <message>
-        <location filename="../OptionsDialog.cpp" line="261"/>
+        <location filename="../OptionsDialog.cpp" line="263"/>
+        <source>The new Custom Folder will initialize after you restart %1.</source>
+        <translation>Der eigene Ordner wird initialisiert sobald du %1 neugestartet hast.</translation>
+    </message>
+    <message>
+        <source>The new Custom Folder initialize after you restart %1.</source>
+        <translation type="vanished">Der eigene Ordner initialisiert sobald du %1 neugestartet hast.</translation>
+    </message>
+    <message>
+        <location filename="../OptionsDialog.cpp" line="267"/>
         <source>The language change will take effect after you restart %1.</source>
         <translation>Die Änderung der Sprache nimmt Effekt sobald du %1 neugestartet hast.</translation>
     </message>
     <message>
-        <location filename="../OptionsDialog.cpp" line="271"/>
+        <location filename="../OptionsDialog.cpp" line="277"/>
         <source>No Profile</source>
         <comment>No Profile, as default</comment>
         <translation>Kein Profil</translation>
     </message>
     <message>
-        <location filename="../OptionsDialog.cpp" line="279"/>
-        <location filename="../OptionsDialog.cpp" line="283"/>
         <location filename="../OptionsDialog.cpp" line="285"/>
+        <location filename="../OptionsDialog.cpp" line="289"/>
+        <location filename="../OptionsDialog.cpp" line="291"/>
         <source>Profile: %1</source>
         <translation>Profil: %1</translation>
     </message>
@@ -1449,6 +1459,7 @@ Exportieren als:</translation>
     </message>
     <message>
         <location filename="../UserInterface.ui" line="285"/>
+        <location filename="../UserInterface.cpp" line="123"/>
         <source>Select &amp;GTA V Folder...</source>
         <translation>Wähle &amp;GTA V Ordner...</translation>
     </message>
@@ -1526,16 +1537,15 @@ Exportieren als:</translation>
     </message>
     <message>
         <location filename="../UserInterface.ui" line="288"/>
-        <location filename="../OptionsDialog.cpp" line="398"/>
+        <location filename="../OptionsDialog.cpp" line="406"/>
         <location filename="../UserInterface.cpp" line="72"/>
         <location filename="../UserInterface.cpp" line="446"/>
         <source>Select GTA V Folder...</source>
         <translation>Wähle GTA V Ordner...</translation>
     </message>
     <message>
-        <location filename="../UserInterface.cpp" line="123"/>
         <source>Select GTA V &amp;Folder...</source>
-        <translation>Wähle GTA V &amp;Ordner...</translation>
+        <translation type="vanished">Wähle GTA V &amp;Ordner...</translation>
     </message>
     <message>
         <location filename="../UserInterface.cpp" line="303"/>