VeraCrypt
aboutsummaryrefslogtreecommitdiff
path: root/src/Main/Forms/Forms.h
diff options
context:
space:
mode:
authorJertzukka <Jertzukka@gmail.com>2023-11-19 01:31:40 +0200
committerGitHub <noreply@github.com>2023-11-19 00:31:40 +0100
commit6a1780864c57d598446eb0c1d4faf7ea238c04d4 (patch)
tree83a17d40280a4b82be556c2aabb27d15034027fc /src/Main/Forms/Forms.h
parent9247ce1bb90c44d19a0069fadb12c0c480ac9b4f (diff)
downloadVeraCrypt-6a1780864c57d598446eb0c1d4faf7ea238c04d4.tar.gz
VeraCrypt-6a1780864c57d598446eb0c1d4faf7ea238c04d4.zip
Linux/FreeBSD/macOS: Implement language selection settings (#1253)
* Implement Language selection into settings Initial commit to create a new tab in PreferencesNotebook for Language selection. By default, if nothing is chosen, it uses the current behaviour of using the language from system environment variables. If another language is chosen from the settings, it is saved into the Configuration.xml and this is used instead. * Fix SetStringSelection() assert issue on macOS * Add header include to fix build * Add current language pack, authors and way to use literal strings * Translations also for FreeBSD * Minimal GTK3 WX build on FreeBSD requires wxGraphicsContext * Get Preferences properly instead of workaround function * Use WrapSizer instead of BoxSizer for author line This forces long author lists to be put on a new line, reducing the need to increase window width. * Update Finnish translation * Borrow translation from IDM_LANGUAGE where it makes sense * Remove colon and thus unneeded function * Simplify Language tab layout * Reintroduce macOS specific fixes to Forms.cpp * cleanup
Diffstat (limited to 'src/Main/Forms/Forms.h')
-rw-r--r--src/Main/Forms/Forms.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/Main/Forms/Forms.h b/src/Main/Forms/Forms.h
index 96a03c79..70a8c230 100644
--- a/src/Main/Forms/Forms.h
+++ b/src/Main/Forms/Forms.h
@@ -38,6 +38,8 @@
#include <wx/choice.h>
#include <wx/gauge.h>
#include <wx/spinctrl.h>
+#include <wx/wrapsizer.h>
+#include <wx/listbox.h>
#include <wx/notebook.h>
#include "international.h"
@@ -116,6 +118,7 @@ namespace VeraCrypt
virtual void OnManageSecurityTokenKeyfilesMenuItemSelected( wxCommandEvent& event ) { event.Skip(); }
virtual void OnCloseAllSecurityTokenSessionsMenuItemSelected( wxCommandEvent& event ) { event.Skip(); }
virtual void OnWipeCacheButtonClick( wxCommandEvent& event ) { event.Skip(); }
+ virtual void OnLanguageMenuItemSelected( wxCommandEvent& event ) { event.Skip(); }
virtual void OnHotkeysMenuItemSelected( wxCommandEvent& event ) { event.Skip(); }
virtual void OnDefaultKeyfilesMenuItemSelected( wxCommandEvent& event ) { event.Skip(); }
virtual void OnDefaultMountParametersMenuItemSelected( wxCommandEvent& event ) { event.Skip(); }
@@ -613,11 +616,17 @@ namespace VeraCrypt
wxButton* RemoveHotkeyButton;
wxCheckBox* BeepAfterHotkeyMountDismountCheckBox;
wxCheckBox* DisplayMessageAfterHotkeyDismountCheckBox;
+ wxStaticText* m_staticText73;
+ wxStaticText* m_staticText74;
+ wxStaticText* m_staticText72;
+ wxStaticText* m_staticText71;
+ wxButton* SysDefaultLangButton;
wxButton* OKButton;
wxButton* CancelButton;
// Virtual event handlers, override them in your derived class
virtual void OnClose( wxCloseEvent& event ) { event.Skip(); }
+ virtual void OnPageChanged( wxNotebookEvent& event ) { event.Skip(); }
virtual void OnDismountOnScreenSaverCheckBoxClick( wxCommandEvent& event ) { event.Skip(); }
virtual void OnDismountOnPowerSavingCheckBoxClick( wxCommandEvent& event ) { event.Skip(); }
virtual void OnForceAutoDismountCheckBoxClick( wxCommandEvent& event ) { event.Skip(); }
@@ -630,6 +639,7 @@ namespace VeraCrypt
virtual void OnHotkeyListItemSelected( wxListEvent& event ) { event.Skip(); }
virtual void OnAssignHotkeyButtonClick( wxCommandEvent& event ) { event.Skip(); }
virtual void OnRemoveHotkeyButtonClick( wxCommandEvent& event ) { event.Skip(); }
+ virtual void OnSysDefaultLangButtonClick( wxCommandEvent& event ) { event.Skip(); }
virtual void OnOKButtonClick( wxCommandEvent& event ) { event.Skip(); }
@@ -638,6 +648,8 @@ namespace VeraCrypt
wxPanel* DefaultKeyfilesPage;
wxPanel* SecurityTokensPage;
wxPanel* HotkeysPage;
+ wxPanel* LanguagesPage;
+ wxListBox* LanguageListBox;
PreferencesDialogBase( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("IDD_PREFERENCES_DLG"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( -1,-1 ), long style = wxDEFAULT_DIALOG_STYLE );