// MainFrame\r
//******************************************************************************\r
\r
-MainFrame::MainFrame(): wxFrame(), gFrame(NULL)\r
+MainFrame::MainFrame(): wxFrame(), gFrame(nullptr)\r
{\r
}\r
\r
\r
void MainFrame::OnClose(wxCloseEvent& e)\r
{\r
- if (e.CanVeto() && g_procDlg != NULL)\r
+ if (e.CanVeto() && g_procDlg != nullptr)\r
{\r
g_procDlg->OnClose(e);\r
e.Veto();\r
void MainFrame::OnSize(wxSizeEvent& e)\r
{\r
// プログレスバーの位置を変更。\r
- if (this->gFrame != NULL)\r
+ if (this->gFrame != nullptr)\r
{\r
this->gFrame->SetPosition(wxPoint(this->statusbar->GetSize().GetWidth() - 230, 10));\r
}\r
void MainFrame::OnArcCreate(wxCommandEvent& e)\r
{\r
TPI_SWITCHES swInfo;\r
- swInfo.pCustomSwitches = NULL;\r
+ swInfo.pCustomSwitches = nullptr;\r
\r
// 作成ダイアログを設定。\r
MakeDialog mkDlg(this, TPI_COMMAND_CREATE);\r
- if (e.GetClientData() == NULL)\r
+ if (e.GetClientData() == nullptr)\r
{\r
if (::wxGetKeyState(WXK_SHIFT))\r
{\r
MakeDialog mkDlg(this, TPI_COMMAND_ADD);\r
\r
TPI_SWITCHES swInfo;\r
- swInfo.pCustomSwitches = NULL;\r
+ swInfo.pCustomSwitches = nullptr;\r
\r
- if (e.GetClientData() == NULL)\r
+ if (e.GetClientData() == nullptr)\r
{\r
if (::wxGetKeyState(WXK_SHIFT))\r
{\r
{\r
TPI_SWITCHES swInfo;\r
swInfo.szArcName = this->fnArchive.GetFullPath();\r
- swInfo.pCustomSwitches = NULL;\r
+ swInfo.pCustomSwitches = nullptr;\r
swInfo.szPassword = this->szPassword;\r
\r
// モード取得。通常は0, 実行なら1, ファイルDnDなら2、ディレクトリDnDなら3、クリップボードなら4、コンテキストメニューからなら8。\r
nMode = 0;\r
}\r
// 実行時のみ使用。\r
- wxFileType * ftFile = NULL;\r
+ wxFileType * ftFile = nullptr;\r
\r
// 展開ダイアログを作成。DnDまたは実行時は表示しない。\r
MakeDialog mkDlg(this, TPI_COMMAND_EXTRACT);\r
\r
// コマンドを実行。\r
wxString szTempFile = swInfo.fnDestinationDirectory.GetPathWithSep() + wxFileName(mkDlg.files[0], wxPATH_DOS).GetFullName();\r
- bool fSuccess = tpi.nErrorCode == TPI_ERROR_SUCCESS && ftFile != NULL;\r
- myProcess * pCallback = new myProcess(szTempFile, swInfo.fnDestinationDirectory.GetPath());\r
+ bool fSuccess = tpi.nErrorCode == TPI_ERROR_SUCCESS && ftFile != nullptr;\r
+ auto pCallback = new myProcess(szTempFile, swInfo.fnDestinationDirectory.GetPath());\r
if (fSuccess)\r
{\r
#ifdef __LINUX__\r
{\r
// 展開対象を決定。\r
wxArrayString asFiles;\r
- myFileDataObject * objFile = new myFileDataObject();\r
+ auto objFile = new myFileDataObject();\r
objFile->szTempDir = nMode == 3 ? swInfo.fnDestinationDirectory.GetPath() : swInfo.fnDestinationDirectory.GetFullPath();\r
// for (auto s : mkDlg.files)\r
for (size_t n = 0; n < mkDlg.files.GetCount(); n++)\r
else\r
{\r
// 自身にドロップされると煩雑なので、一時的にドロップを受け付けないようにしておく。\r
- this->SetDropTarget(NULL);\r
+ this->SetDropTarget(nullptr);\r
\r
// DnD開始。\r
wxDropSource dropSource(* objFile, this);\r