diff options
Diffstat (limited to 'src/Main/GraphicUserInterface.cpp')
-rwxr-xr-x | src/Main/GraphicUserInterface.cpp | 33 |
1 files changed, 17 insertions, 16 deletions
diff --git a/src/Main/GraphicUserInterface.cpp b/src/Main/GraphicUserInterface.cpp index 99b2caa..04e9885 100755 --- a/src/Main/GraphicUserInterface.cpp +++ b/src/Main/GraphicUserInterface.cpp @@ -58,7 +58,7 @@ namespace VeraCrypt #ifdef TC_MACOSX g_customIdCmdV = wxNewId(); g_customIdCmdA = wxNewId(); - wxApp::s_macHelpMenuTitleName = _("&Help"); + wxApp::s_macHelpMenuTitleName = LangString["MENU_HELP"]; #endif } @@ -344,7 +344,7 @@ namespace VeraCrypt void GraphicUserInterface::BeginInteractiveBusyState (wxWindow *window) { - static auto_ptr <wxCursor> arrowWaitCursor; + static unique_ptr <wxCursor> arrowWaitCursor; if (arrowWaitCursor.get() == nullptr) arrowWaitCursor.reset (new wxCursor (wxCURSOR_ARROWWAIT)); @@ -409,7 +409,7 @@ namespace VeraCrypt void GraphicUserInterface::EndInteractiveBusyState (wxWindow *window) const { - static auto_ptr <wxCursor> arrowCursor; + static unique_ptr <wxCursor> arrowCursor; if (arrowCursor.get() == nullptr) arrowCursor.reset (new wxCursor (wxCURSOR_ARROW)); @@ -466,7 +466,7 @@ namespace VeraCrypt } else { - wxPasswordEntryDialog dialog (Gui->GetActiveWindow(), _("Enter your user password or administrator password:"), _("Administrator privileges required")); + wxPasswordEntryDialog dialog (Gui->GetActiveWindow(), LangString["LINUX_ADMIN_PW_QUERY"], LangString["LINUX_ADMIN_PW_QUERY_TITLE"]); if (dialog.ShowModal() != wxID_OK) throw UserAbort (SRC_POS); sValue = dialog.GetValue(); @@ -632,7 +632,7 @@ namespace VeraCrypt try { - SecurityToken::InitLibrary (Preferences.SecurityTokenModule, auto_ptr <GetPinFunctor> (new PinRequestHandler), auto_ptr <SendExceptionFunctor> (new WarningHandler)); + SecurityToken::InitLibrary (Preferences.SecurityTokenModule, unique_ptr <GetPinFunctor> (new PinRequestHandler), unique_ptr <SendExceptionFunctor> (new WarningHandler)); } catch (Exception &e) { @@ -885,7 +885,7 @@ namespace VeraCrypt #ifdef TC_LINUX if (volume && !Preferences.NonInteractive && !Preferences.DisableKernelEncryptionModeWarning && volume->EncryptionModeName != L"XTS" - && !AskYesNo (LangString["ENCRYPTION_MODE_NOT_SUPPORTED_BY_KERNEL"] + _("\n\nDo you want to show this message next time you mount such a volume?"), true, true)) + && !AskYesNo (LangString["ENCRYPTION_MODE_NOT_SUPPORTED_BY_KERNEL"] + LangString["LINUX_MESSAGE_ON_MOUNT_AGAIN"], true, true)) { UserPreferences prefs = GetPreferences(); prefs.DisableKernelEncryptionModeWarning = true; @@ -965,8 +965,8 @@ namespace VeraCrypt wxConnectionBase *OnMakeConnection () { return new Connection; } }; - auto_ptr <wxDDEClient> client (new Client); - auto_ptr <wxConnectionBase> connection (client->MakeConnection (L"localhost", serverName, L"raise")); + unique_ptr <wxDDEClient> client (new Client); + unique_ptr <wxConnectionBase> connection (client->MakeConnection (L"localhost", serverName, L"raise")); if (connection.get() && connection->Execute (nullptr)) { @@ -986,7 +986,7 @@ namespace VeraCrypt if (write (showFifo, buf, 1) == 1) { close (showFifo); - Gui->ShowInfo (_("VeraCrypt is already running.")); + Gui->ShowInfo (LangString["LINUX_VC_RUNNING_ALREADY"]); Application::SetExitCode (0); return false; } @@ -1018,7 +1018,7 @@ namespace VeraCrypt wxLog::FlushActive(); Application::SetExitCode (1); - Gui->ShowInfo (_("VeraCrypt is already running.")); + Gui->ShowInfo (LangStrin["LINUX_VC_RUNNING_ALREADY"]); return false; #endif } @@ -1309,7 +1309,7 @@ namespace VeraCrypt #elif defined (TC_MACOSX) htmlPath += L"/../Resources/doc/HTML/"; #elif defined (TC_UNIX) - htmlPath = L"/usr/share/veracrypt/doc/HTML/"; + htmlPath = L"/usr/share/doc/veracrypt/HTML/"; #else localFile = false; #endif @@ -1887,9 +1887,9 @@ namespace VeraCrypt else { if (style & wxICON_EXCLAMATION) - caption = wxString (_("Warning")) + L':'; + caption = wxString (LangString["LINUX_WARNING"]) + L':'; else if (style & wxICON_ERROR || style & wxICON_HAND) - caption = wxString (_("Error")) + L':'; + caption = wxString (LangString["LINUX_ERROR"]) + L':'; else caption.clear(); } @@ -1907,8 +1907,9 @@ namespace VeraCrypt style |= wxSTAY_ON_TOP; } - - return wxMessageBox (subMessage, caption, style, GetActiveWindow()); + wxMessageDialog cur(GetActiveWindow(), subMessage, caption, style); + cur.SetYesNoLabels(LangString["UISTR_YES"], LangString["UISTR_NO"]); + return (cur.ShowModal() == wxID_YES ? wxYES : wxNO) ; } } @@ -1923,7 +1924,7 @@ namespace VeraCrypt void GraphicUserInterface::ThrowTextModeRequired () const { - Gui->ShowError (_("This feature is currently supported only in text mode.")); + Gui->ShowError (LangString["LINUX_ONLY_TEXTMODE"]); throw UserAbort (SRC_POS); } |