VeraCrypt
aboutsummaryrefslogtreecommitdiff
path: root/src/Main/Forms
diff options
context:
space:
mode:
Diffstat (limited to 'src/Main/Forms')
-rw-r--r--src/Main/Forms/PreferencesDialog.cpp53
-rw-r--r--src/Main/Forms/PreferencesDialog.h45
-rw-r--r--src/Main/Forms/VolumeCreationWizard.cpp25
3 files changed, 63 insertions, 60 deletions
diff --git a/src/Main/Forms/PreferencesDialog.cpp b/src/Main/Forms/PreferencesDialog.cpp
index c4d5140f..afc2871f 100644
--- a/src/Main/Forms/PreferencesDialog.cpp
+++ b/src/Main/Forms/PreferencesDialog.cpp
@@ -82,6 +82,51 @@ namespace VeraCrypt
LanguageListBox->Append("System default");
LanguageListBox->Append("English");
+ langEntries = {
+ {"system", L"System default"},
+ {"ar", L"العربية"},
+ {"be", L"Беларуская"},
+ {"bg", L"Български"},
+ {"ca", L"Català"},
+ {"co", L"Corsu"},
+ {"cs", L"Čeština"},
+ {"da", L"Dansk"},
+ {"de", L"Deutsch"},
+ {"el", L"Ελληνικά"},
+ {"en", L"English"},
+ {"es", L"Español"},
+ {"et", L"Eesti"},
+ {"eu", L"Euskara"},
+ {"fa", L"فارسي"},
+ {"fi", L"Suomi"},
+ {"fr", L"Français"},
+ {"he", L"עברית"},
+ {"hu", L"Magyar"},
+ {"id", L"Bahasa Indonesia"},
+ {"it", L"Italiano"},
+ {"ja", L"日本語"},
+ {"ka", L"ქართული"},
+ {"ko", L"한국어"},
+ {"lv", L"Latviešu"},
+ {"nl", L"Nederlands"},
+ {"nn", L"Norsk Nynorsk"},
+ {"pl", L"Polski"},
+ {"ro", L"Română"},
+ {"ru", L"Русский"},
+ {"pt-br", L"Português-Brasil"},
+ {"sk", L"Slovenčina"},
+ {"sl", L"Slovenščina"},
+ {"sv", L"Svenska"},
+ {"th", L"ภาษาไทย"},
+ {"tr", L"Türkçe"},
+ {"uk", L"Українська"},
+ {"uz", L"Ўзбекча"},
+ {"vi", L"Tiếng Việt"},
+ {"zh-cn", L"简体中文"},
+ {"zh-hk", L"繁體中文(香港)"},
+ {"zh-tw", L"繁體中文"}
+ };
+
if (wxDir::Exists(languagesFolder.GetName())) {
size_t langCount;
langCount = wxDir::GetAllFiles(languagesFolder.GetName(), &langArray, wxEmptyString, wxDIR_FILES);
@@ -435,11 +480,11 @@ namespace VeraCrypt
if (LanguageListBox->GetSelection() != wxNOT_FOUND) {
wxString langToFind = LanguageListBox->GetString(LanguageListBox->GetSelection());
- for (const auto &each: langEntries) {
- if (each.second == langToFind) {
- Preferences.Language = each.first;
+ for (map<wxString, std::wstring>::const_iterator each = langEntries.begin(); each != langEntries.end(); ++each) {
+ if (each->second == langToFind) {
+ Preferences.Language = each->first;
#ifdef DEBUG
- cout << "Lang set to: " << each.first << endl;
+ cout << "Lang set to: " << each->first << endl;
#endif
}
}
diff --git a/src/Main/Forms/PreferencesDialog.h b/src/Main/Forms/PreferencesDialog.h
index 50e8489e..5e7f7e71 100644
--- a/src/Main/Forms/PreferencesDialog.h
+++ b/src/Main/Forms/PreferencesDialog.h
@@ -60,50 +60,7 @@ namespace VeraCrypt
UserPreferences Preferences;
bool RestoreValidatorBell;
HotkeyList UnregisteredHotkeys;
- map<wxString, wstring> langEntries = {
- {"system", L"System default"},
- {"ar", L"العربية"},
- {"be", L"Беларуская"},
- {"bg", L"Български"},
- {"ca", L"Català"},
- {"co", L"Corsu"},
- {"cs", L"Čeština"},
- {"da", L"Dansk"},
- {"de", L"Deutsch"},
- {"el", L"Ελληνικά"},
- {"en", L"English"},
- {"es", L"Español"},
- {"et", L"Eesti"},
- {"eu", L"Euskara"},
- {"fa", L"فارسي"},
- {"fi", L"Suomi"},
- {"fr", L"Français"},
- {"he", L"עברית"},
- {"hu", L"Magyar"},
- {"id", L"Bahasa Indonesia"},
- {"it", L"Italiano"},
- {"ja", L"日本語"},
- {"ka", L"ქართული"},
- {"ko", L"한국어"},
- {"lv", L"Latviešu"},
- {"nl", L"Nederlands"},
- {"nn", L"Norsk Nynorsk"},
- {"pl", L"Polski"},
- {"ro", L"Română"},
- {"ru", L"Русский"},
- {"pt-br", L"Português-Brasil"},
- {"sk", L"Slovenčina"},
- {"sl", L"Slovenščina"},
- {"sv", L"Svenska"},
- {"th", L"ภาษาไทย"},
- {"tr", L"Türkçe"},
- {"uk", L"Українська"},
- {"uz", L"Ўзбекча"},
- {"vi", L"Tiếng Việt"},
- {"zh-cn", L"简体中文"},
- {"zh-hk", L"繁體中文(香港)"},
- {"zh-tw", L"繁體中文"}
- };
+ map<wxString, wstring> langEntries;
};
}
diff --git a/src/Main/Forms/VolumeCreationWizard.cpp b/src/Main/Forms/VolumeCreationWizard.cpp
index 3f09e39f..311738ca 100644
--- a/src/Main/Forms/VolumeCreationWizard.cpp
+++ b/src/Main/Forms/VolumeCreationWizard.cpp
@@ -37,6 +37,19 @@
namespace VeraCrypt
{
+ class OpenOuterVolumeFunctor : public Functor
+ {
+ public:
+ OpenOuterVolumeFunctor (const DirectoryPath &outerVolumeMountPoint) : OuterVolumeMountPoint (outerVolumeMountPoint) { }
+
+ virtual void operator() ()
+ {
+ Gui->OpenExplorerWindow (OuterVolumeMountPoint);
+ }
+
+ DirectoryPath OuterVolumeMountPoint;
+ };
+
#ifdef TC_MACOSX
bool VolumeCreationWizard::ProcessEvent(wxEvent& event)
@@ -338,18 +351,6 @@ namespace VeraCrypt
return new InfoWizardPage (GetPageParent());
}
- struct OpenOuterVolumeFunctor : public Functor
- {
- OpenOuterVolumeFunctor (const DirectoryPath &outerVolumeMountPoint) : OuterVolumeMountPoint (outerVolumeMountPoint) { }
-
- virtual void operator() ()
- {
- Gui->OpenExplorerWindow (OuterVolumeMountPoint);
- }
-
- DirectoryPath OuterVolumeMountPoint;
- };
-
InfoWizardPage *page = new InfoWizardPage (GetPageParent(), LangString["LINUX_OPEN_OUTER_VOL"],
shared_ptr <Functor> (new OpenOuterVolumeFunctor (MountedOuterVolume->MountPoint)));