Skip to content

Commit

Permalink
Merge pull request #12 from cthoeing/v3.5.2
Browse files Browse the repository at this point in the history
Version 3.5.2
  • Loading branch information
cthoeing authored Oct 1, 2023
2 parents 6797ae7 + b26ad5b commit c0b4b66
Show file tree
Hide file tree
Showing 67 changed files with 4,222 additions and 2,741 deletions.
1,233 changes: 386 additions & 847 deletions PwTech.cbproj

Large diffs are not rendered by default.

65 changes: 33 additions & 32 deletions PwTech.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -10,39 +10,40 @@
//---------------------------------------------------------------------------
#include <Vcl.Styles.hpp>
#include <Vcl.Themes.hpp>
USEFORM("src\main\PasswMngColSelect.cpp", PasswMngColDlg);
USEFORM("src\main\PasswManager.cpp", PasswMngForm);
USEFORM("src\main\PasswList.cpp", PasswListForm);
USEFORM("src\main\PasswEnter.cpp", PasswEnterDlg);
USEFORM("src\main\MPPasswGen.cpp", MPPasswGenForm);
USEFORM("src\main\Main.cpp", MainForm);
USEFORM("src\main\PasswMngColSelect.cpp", PasswMngColDlg);
USEFORM("src\main\PasswMngDbProp.cpp", PasswMngDbPropDlg);
USEFORM("src\main\ProfileEditor.cpp", ProfileEditDlg);
USEFORM("src\main\PasswOptions.cpp", PasswOptionsDlg);
USEFORM("src\main\PasswMngPwHistory.cpp", PasswHistoryDlg);
USEFORM("src\main\PasswMngKeyValEdit.cpp", PasswMngKeyValDlg);
USEFORM("src\main\PasswMngDbSettings.cpp", PasswDbSettingsDlg);
USEFORM("src\main\PasswMngDbProp.cpp", PasswMngDbPropDlg);
USEFORM("src\main\Main.cpp", MainForm);
USEFORM("src\main\About.cpp", AboutForm);
USEFORM("src\main\InfoBox.cpp", InfoBoxForm);
USEFORM("src\main\CreateTrigramFile.cpp", CreateTrigramFileDlg);
USEFORM("src\main\CreateRandDataFile.cpp", CreateRandDataFileDlg);
USEFORM("src\main\Configuration.cpp", ConfigurationDlg);
USEFORM("src\main\ProfileEditor.cpp", ProfileEditDlg);
USEFORM("src\main\Progress.cpp", ProgressForm);
USEFORM("src\main\QuickHelp.cpp", QuickHelpForm);
USEFORM("src\main\ProvideEntropy.cpp", ProvideEntropyDlg);
USEFORM("src\main\Progress.cpp", ProgressForm);
//---------------------------------------------------------------------------
HANDLE g_hAppMutex;

int WINAPI _tWinMain(HINSTANCE, HINSTANCE, LPTSTR, int)
{
try
{
g_hAppMutex = CreateMutex(NULL, true, L"Password Tech Password Generator by C.T.");
if (g_hAppMutex == NULL)
g_hAppMutex = CreateMutex(nullptr, true,
L"Password Tech Password Generator by C.T.");
if (g_hAppMutex == nullptr)
RaiseLastOSError();

if (GetLastError() == ERROR_ALREADY_EXISTS) {
MessageBox(NULL, L"An instance of Password Tech is already running.\n"
MessageBox(nullptr, L"An instance of Password Tech is already running.\n"
"Please close it before starting a new instance.",
PROGRAM_NAME, MB_ICONWARNING);
return 0;
Expand Down Expand Up @@ -79,7 +80,7 @@ int WINAPI _tWinMain(HINSTANCE, HINSTANCE, LPTSTR, int)
if (nI < nParamCount) {
WString sIniFileName = ParamStr(++nI);
if (ExtractFilePath(sIniFileName).IsEmpty())
sIniFileName = ExtractFilePath(Application->ExeName) + sIniFileName;
sIniFileName = g_sExePath + sIniFileName;
g_cmdLineOptions.IniFileName = sIniFileName;
}
}
Expand Down Expand Up @@ -145,39 +146,39 @@ int WINAPI _tWinMain(HINSTANCE, HINSTANCE, LPTSTR, int)

const WString DEFAULT_STYLE_NAME = "Windows";

g_config.UiStyleName = DEFAULT_STYLE_NAME;
WString sStyleName = g_pIni->ReadString("Main", "GUIStyle",
g_config.UiStyleName = DEFAULT_STYLE_NAME;
WString sStyleName = g_pIni->ReadString("Main", "GUIStyle",
DEFAULT_STYLE_NAME);
if (!sStyleName.IsEmpty() && !SameText(sStyleName, DEFAULT_STYLE_NAME))
{
// TODO: Remove this when C++ Builder fully supports styles for
// Windows dialogs
TStyleManager::SystemHooks >>= TStyleManager::TSystemHook::shDialogs;
//TStyleManager::SystemHooks >>= TStyleManager::TSystemHook::shDialogs;
if (TStyleManager::TrySetStyle(sStyleName))
g_config.UiStyleName = sStyleName;
}

Application->CreateForm(__classid(TMainForm), &MainForm);
Application->CreateForm(__classid(TAboutForm), &AboutForm);
Application->CreateForm(__classid(TConfigurationDlg), &ConfigurationDlg);
Application->CreateForm(__classid(TCreateRandDataFileDlg), &CreateRandDataFileDlg);
Application->CreateForm(__classid(TCreateTrigramFileDlg), &CreateTrigramFileDlg);
Application->CreateForm(__classid(TInfoBoxForm), &InfoBoxForm);
Application->CreateForm(__classid(TMPPasswGenForm), &MPPasswGenForm);
Application->CreateForm(__classid(TPasswEnterDlg), &PasswEnterDlg);
Application->CreateForm(__classid(TPasswListForm), &PasswListForm);
Application->CreateForm(__classid(TPasswMngForm), &PasswMngForm);
Application->CreateForm(__classid(TPasswMngColDlg), &PasswMngColDlg);
Application->CreateForm(__classid(TPasswMngDbPropDlg), &PasswMngDbPropDlg);
Application->CreateForm(__classid(TPasswDbSettingsDlg), &PasswDbSettingsDlg);
Application->CreateForm(__classid(TPasswMngKeyValDlg), &PasswMngKeyValDlg);
Application->CreateForm(__classid(TPasswOptionsDlg), &PasswOptionsDlg);
Application->CreateForm(__classid(TProfileEditDlg), &ProfileEditDlg);
Application->CreateForm(__classid(TProgressForm), &ProgressForm);
Application->CreateForm(__classid(TProvideEntropyDlg), &ProvideEntropyDlg);
Application->CreateForm(__classid(TQuickHelpForm), &QuickHelpForm);
Application->CreateForm(__classid(TPasswHistoryDlg), &PasswHistoryDlg);
MainForm->StartupAction();
Application->CreateForm(__classid(TAboutForm), &AboutForm);
Application->CreateForm(__classid(TConfigurationDlg), &ConfigurationDlg);
Application->CreateForm(__classid(TCreateRandDataFileDlg), &CreateRandDataFileDlg);
Application->CreateForm(__classid(TCreateTrigramFileDlg), &CreateTrigramFileDlg);
Application->CreateForm(__classid(TInfoBoxForm), &InfoBoxForm);
Application->CreateForm(__classid(TMPPasswGenForm), &MPPasswGenForm);
Application->CreateForm(__classid(TPasswEnterDlg), &PasswEnterDlg);
Application->CreateForm(__classid(TPasswListForm), &PasswListForm);
Application->CreateForm(__classid(TPasswMngForm), &PasswMngForm);
Application->CreateForm(__classid(TPasswMngColDlg), &PasswMngColDlg);
Application->CreateForm(__classid(TPasswMngDbPropDlg), &PasswMngDbPropDlg);
Application->CreateForm(__classid(TPasswDbSettingsDlg), &PasswDbSettingsDlg);
Application->CreateForm(__classid(TPasswMngKeyValDlg), &PasswMngKeyValDlg);
Application->CreateForm(__classid(TPasswOptionsDlg), &PasswOptionsDlg);
Application->CreateForm(__classid(TProfileEditDlg), &ProfileEditDlg);
Application->CreateForm(__classid(TProgressForm), &ProgressForm);
Application->CreateForm(__classid(TProvideEntropyDlg), &ProvideEntropyDlg);
Application->CreateForm(__classid(TQuickHelpForm), &QuickHelpForm);
Application->CreateForm(__classid(TPasswHistoryDlg), &PasswHistoryDlg);
MainForm->StartupAction();

Application->Run();
}
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ Password Tech is distributed under the terms and conditions of the GNU General P

To build the software, you need:

- Embarcadero C++Builder 10.4 Update 2 or a later version ("Community" edition is sufficient)
- Embarcadero C++Builder 11 or a later version ("Community" edition is sufficient)
- (optional) [Inno Setup](https://jrsoftware.org/isinfo.php) to create the setup of Password Tech (you should use the file *setup/PwTech.iss* for this purpose)

## Credits
Expand Down
36 changes: 35 additions & 1 deletion changes.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,41 @@
Copyright (c) 2002-2023 by Christian Thöing


Version 3.5.1
Version 3.5.2

NEW FEATURES:

- Generate multiple passwords: "Generate" button redesigned; arrow button opens
context menu that allows generating passwords to the clipboard (new) as well
as generating passwords to a file

CHANGES & IMPROVEMENTS:

- Appropriate reaction to Windows "end session" event (e.g., system shutdown):
All tasks are canceled, configuration settings are saved, database is closed
gracefully if possible; otherwise, shutdown is blocked with a corresponding
message (e.g., if a database entry is being edited and the changes haven't
been confirmed yet)
- "Advanced Password Option" button in main window displays number of enabled
(boolean) options and extended tooltip information
- Clear clipboard automatically: Clipboard is only cleared if the SHA-256 hash
of its contents match the hash of the data that was copied originally
- External Windows dialogs (e.g., file open/save dialogs) have the same style
as the selected user interface style (Configuration | General)
- PassCube: Database settings: Changing "Number of key derivation rounds" can
be canceled in case the parameter has accidentally been set too large

FIXES:

- "Clear password box automatically" settings not saved to configuration file
- PassCube: Database not locked when minimizing window
- PassCube: Wrong position of "Enter password" dialog when restoring window
and unlocking database
- PassCube: "Save automatically" settings not saved to configuration file

----------

Version 3.5.1 (2023-08-01)

NEW FEATURES:

Expand Down
Loading

0 comments on commit c0b4b66

Please sign in to comment.