MakeDialog mkDlg(this, TPI_COMMAND_CREATE);\r
if (e.GetClientData() == NULL)\r
{\r
- // 処理対象のファイルを選択。\r
- wxFileDialog fd(this, _("Choose files to compress"), this->conf.ReadHistory(CONF_HISTORY_PATH, 0), wxEmptyString, wxFileSelectorDefaultWildcardStr, wxFD_OPEN | wxFD_FILE_MUST_EXIST | wxFD_MULTIPLE);\r
- if (fd.ShowModal() == wxID_CANCEL)\r
+ if (::wxGetKeyState(WXK_SHIFT))\r
{\r
- return;\r
+ // 処理対象のフォルダを選択。\r
+ wxDirDialog dd(this, _("Choose dir to compress"), this->conf.ReadHistory(CONF_HISTORY_PATH, 0), wxDD_DIR_MUST_EXIST);\r
+ if (dd.ShowModal() == wxID_CANCEL)\r
+ {\r
+ return;\r
+ }\r
+ swInfo.fnDestinationDirectory = wxFileName(dd.GetPath());\r
+ this->conf.WriteHistory(CONF_HISTORY_PATH, swInfo.fnDestinationDirectory.GetPath());\r
+ mkDlg.files.Add(swInfo.fnDestinationDirectory.GetFullName());\r
+ }\r
+ else\r
+ {\r
+ // 処理対象のファイルを選択。\r
+ wxFileDialog fd(this, _("Choose files to compress"), this->conf.ReadHistory(CONF_HISTORY_PATH, 0), wxEmptyString, wxFileSelectorDefaultWildcardStr, wxFD_OPEN | wxFD_FILE_MUST_EXIST | wxFD_MULTIPLE);\r
+ if (fd.ShowModal() == wxID_CANCEL)\r
+ {\r
+ return;\r
+ }\r
+ fd.GetFilenames(mkDlg.files);\r
+ swInfo.fnDestinationDirectory = wxFileName::DirName(fd.GetDirectory());\r
+ this->conf.WriteHistory(CONF_HISTORY_PATH, fd.GetDirectory());\r
}\r
- swInfo.fnDestinationDirectory = wxFileName::DirName(fd.GetDirectory());\r
- this->conf.WriteHistory(CONF_HISTORY_PATH, fd.GetDirectory());\r
- fd.GetFilenames(mkDlg.files);\r
}\r
else\r
{\r