From 8d37037674b1aa0143f22770eac2bc3dd28b71b3 Mon Sep 17 00:00:00 2001 From: Cheng Date: Sun, 8 Sep 2024 07:22:30 +0000 Subject: [PATCH] at last after all this preparation it begins --- src/frame.cpp | 15 +++++++++++++++ src/localization.cpp | 1 + src/localization.h | 1 + 3 files changed, 17 insertions(+) diff --git a/src/frame.cpp b/src/frame.cpp index 9380b1a..4ea210e 100644 --- a/src/frame.cpp +++ b/src/frame.cpp @@ -505,6 +505,21 @@ void Frame::NewWalletDisplay(const wxFileName& filename, const char* human_legib void Frame::OnSaveNew(wxCommandEvent& WXUNUSED(event)) { wxFileName wxFileWallet = GetPathForNewWallet(); + wxMessageDialog dlg(singletonFrame, + "hello, random master secrets formed, DO YOU Wwant to record them and set their security handling now (you can always do this later)", + "secrets formed caption", + wxNO_DEFAULT| wxYES_NO | wxCANCEL |wxCENTRE + ); + auto retval = dlg.ShowModal(); //Possible return values wxID_YES, wxID_NO, wxID_OK or wxID_CANCEL + if (retval == wxID_CANCEL)throw MyException(WalletCreationCancelled_sz); + if (retval == wxID_YES) { + wxMessageDialog dlg(singletonFrame, + "mISSING CODE TO SET SECURITY PROPERTIES", + "SET SECURITY CAPTION", + wxOK | wxCENTRE + ); + auto retval=dlg.ShowModal(); //Possible return values wxID_OK or wxID_CANCEL + } NewWalletDisplay(wxFileWallet, wxFileWallet.GetFullPath().ToUTF8()); } diff --git a/src/localization.cpp b/src/localization.cpp index 03c35ed..44f7f83 100644 --- a/src/localization.cpp +++ b/src/localization.cpp @@ -147,6 +147,7 @@ OversizeBase58String::OversizeBase58String() noexcept : const char FailureToThrowExpectedException_sz[]{ "Exception not thrown for deliberate error in unit test" }; +const char WalletCreationCancelled_sz[]{ R"|(Creation of new master secret and wallet cancelled)|" }; // Random words for the passphrase. diff --git a/src/localization.h b/src/localization.h index 5cf7af8..bc21dba 100644 --- a/src/localization.h +++ b/src/localization.h @@ -74,6 +74,7 @@ inline constexpr auto sz_public_key_of{ R"|(Public key of ")|" }; inline constexpr auto sz_fails_to_correspond{ R"|(" fails to correspond to master secret. This wallet cannot communicate as this identity.)|" }; constexpr auto sz_unexpected_error{ R"|(unexpected error)|" }; +extern const char WalletCreationCancelled_sz[]; //Command line parameters extern const wchar_t wsz_commandLineLogo[];