this->fnArchive = wxFileName(mkDlg.cbDir->GetValue(), mkDlg.cbFileName->GetValue());\r
if (! tpi.InitLibrary(mkDlg.afInfo[nSelected].szTPIName, this->fnArchive.GetFullPath(), mkDlg.afInfo[nSelected].llTypeId))\r
{\r
- ::ErrDlg(wxT("Error: InitLibrary()!"), this);\r
+ ::wxLogError(_("Error: %s!"), wxT("InitLibrary()!"));\r
return;\r
}\r
\r
// コールバック関数を設定。\r
if (! tpi.SetCallbackProc(TPICallbackProc))\r
{\r
- ::ErrDlg(wxT("Error: SetCallbackProc()!"), this);\r
+ ::wxLogError(_("Error: %s!"), wxT("SetCallbackProc()!"));\r
}\r
\r
// 処理を行う。\r
{\r
procDlg.Show(false);\r
tpi.FreeLibrary();\r
- ::ErrDlg(_("No plug-in supporting this archive was found!"), this);\r
+ ::wxLogError(_("No plug-in supporting this archive was found!"));\r
return;\r
}\r
TPICallbackProc(TPI_NOTIFY_COMMON, & piInfo);\r
{\r
procDlg.Show(false);\r
tpi.FreeLibrary();\r
- ::ErrDlg(wxT("Error: OpenArchive()!"), this);\r
+ ::wxLogError(_("Error: %s!"), wxT("OpenArchive()"));\r
return;\r
}\r
\r
if (piInfo.fiInfo.fnFileName.GetPathWithSep().Find(wxT("..")) != wxNOT_FOUND)\r
{\r
piInfo.fiInfo.uDanger = TRUE;\r
- ::WrnDlg(_("This archive may have Directory Traversal Vulnerability(DTV) problem, and some danger files may be extracted to the unexpected system directory! You should use the \"Ignore file pathes\" option when extracting this archive.\nDanger file is:\n") + piInfo.fiInfo.szStoredName, this);\r
+ ::wxLogWarning(_("This archive may have Directory Traversal Vulnerability(DTV) problem, and some danger files may be extracted to the unexpected system directory! You should use the \"Ignore file pathes\" option when extracting this archive.\nDanger file is:\n%s"), piInfo.fiInfo.szStoredName);\r
}\r
// 空白の連続による拡張子偽装を検査。\r
if (piInfo.fiInfo.fnFileName.GetFullName().Find(wxT(" ")) != wxNOT_FOUND)\r
{\r
piInfo.fiInfo.uDanger = TRUE;\r
- ::WrnDlg(_("This archive may contain extension-disguised files whose real extension is hidden by using many blank charactor and you may mistake that it is a \"safe\" file. Don\'t execute these files carelessly.\nDanger file is:\n") + piInfo.fiInfo.szStoredName, this);\r
+ ::wxLogWarning(_("This archive may contain extension-disguised files whose real extension is hidden by using many blank charactor and you may mistake that it is a \"safe\" file. Don\'t execute these files carelessly.\nDanger file is:%s\n"), piInfo.fiInfo.szStoredName);\r
}\r
// Unicode制御文字を検査。\r
for (wxChar c = 0x200c; c <= 0x206f; c++)\r
if (piInfo.fiInfo.fnFileName.GetFullName().Find(c) != wxNOT_FOUND)\r
{\r
piInfo.fiInfo.uDanger = TRUE;\r
- ::WrnDlg(_("This archive may contain extension-disguised files whose real extension is hidden by using Unicode control character and you may mistake that it is a \"safe\" file. Don\'t execute these files carelessly.\nDanger file is:\n") + piInfo.fiInfo.szStoredName, this);\r
+ ::wxLogWarning(_("This archive may contain extension-disguised files whose real extension is hidden by using Unicode control character and you may mistake that it is a \"safe\" file. Don\'t execute these files carelessly.\nDanger file is:\n"), piInfo.fiInfo.szStoredName);\r
}\r
switch (c)\r
{\r
{\r
procDlg.Show(false);\r
tpi.FreeLibrary();\r
- ::ErrDlg(wxT("Error: GetArchiveInformation()!"), this);\r
+ ::wxLogError(_("Error: %s!"), wxT("GetArchiveInformation()"));\r
return;\r
}\r
this->szComment = aiInfo.szComment;\r
// 書庫を閉じる。\r
if (! tpi.CloseArchive())\r
{\r
- ::ErrDlg(wxT("Error: CloseArchive()!"), this);\r
+ ::wxLogError(_("Error: %s!"), wxT("CloseArchive()"));\r
}\r
\r
// 以下、UI処理。\r
ftFile = wxTheMimeTypesManager->GetFileTypeFromExtension(this->conf.ReadID(CONF_DEFAULT_EXT, (wxString) wxT("txt")));\r
if (! ftFile)\r
{\r
- ::ErrDlg(_("Unable to get the file type!"), this);\r
+ ::wxLogError(_("Unable to get the file type!"));\r
return;\r
}\r
}\r
swInfo.fnDestinationDirectory = MakeDirPath(wxFileName::DirName(::wxGetCwd()), szDestDirBase, true);\r
if (! swInfo.fnDestinationDirectory.IsOk())\r
{\r
- ::ErrDlg(_("Unable to make the temporary directory!"), this);\r
+ ::wxLogError(_("Unable to make the temporary directory!"));\r
return;\r
}\r
}\r
swInfo.fnDestinationDirectory = MakeDirPath(swInfo.fnDestinationDirectory, this->fnArchive.GetName(), true);\r
if (! swInfo.fnDestinationDirectory.IsOk())\r
{\r
- ::ErrDlg(_("Unable to make the destination directory!"), this);\r
+ ::wxLogError(_("Unable to make the destination directory!"));\r
return;\r
}\r
}\r
ProcessDialog procDlg;\r
procDlg.InitDialog();\r
procDlg.Show(true);\r
- if (this->tpi.Command(TPI_COMMAND_TEST, & swInfo, this->fnArchive.GetFullPath(), MakeTargetFileList(this, false)))\r
+ bool bIsCorrect = this->tpi.Command(TPI_COMMAND_TEST, & swInfo, this->fnArchive.GetFullPath(), MakeTargetFileList(this, false));\r
+ procDlg.Show(false);\r
+ if (bIsCorrect)\r
{\r
- ::MsgDlg(_("This is a correct archive."), & procDlg, wxICON_INFORMATION);\r
+ ::wxLogMessage(_("This is a correct archive."));\r
}\r
else\r
{\r
this->ErrorCheck(tpi.nErrorCode);\r
}\r
- procDlg.Show(false);\r
}\r
\r
void MainFrame::OnArcRepair(wxCommandEvent&)\r
case TPI_CALLBACK_CONTINUE:\r
break;\r
case TPI_ERROR_D_UNSUPPORTED:\r
- ::ErrDlg(_("Sorry, this function is not supported yet."), this);\r
+ ::wxLogError(_("Sorry, this function is not supported yet."));\r
break;\r
case TPI_ERROR_D_SKIPPED:\r
case TPI_CALLBACK_CANCEL:\r
- ::ErrDlg(_("This operation is canceled by the user."), this);\r
+ ::wxLogError(_("This operation is canceled by the user."));\r
break;\r
default:\r
- ::ErrDlg(_("Error code: ") + wxString::Format(wxT("%d"), nErrorCode), this);\r
+ ::wxLogError(_("Error code: %d"), nErrorCode);\r
}\r
return nErrorCode;\r
}\r