mirror of
https://gitlab.com/mbunkus/mkvtoolnix.git
synced 2024-12-24 11:54:01 +00:00
Allow multiple files to be selected when adding files and attachments.
This commit is contained in:
parent
79e6186cfe
commit
b3545aede4
@ -140,11 +140,16 @@ tab_attachments::enable(bool e) {
|
|||||||
void
|
void
|
||||||
tab_attachments::on_add_attachment(wxCommandEvent &evt) {
|
tab_attachments::on_add_attachment(wxCommandEvent &evt) {
|
||||||
wxFileDialog dlg(NULL, wxT("Choose an attachment file"), last_open_dir,
|
wxFileDialog dlg(NULL, wxT("Choose an attachment file"), last_open_dir,
|
||||||
wxT(""), wxT(ALLFILES), wxOPEN);
|
wxT(""), wxT(ALLFILES), wxOPEN | wxMULTIPLE);
|
||||||
|
|
||||||
if(dlg.ShowModal() == wxID_OK) {
|
if(dlg.ShowModal() == wxID_OK) {
|
||||||
|
wxArrayString files;
|
||||||
|
int i;
|
||||||
|
|
||||||
last_open_dir = dlg.GetDirectory();
|
last_open_dir = dlg.GetDirectory();
|
||||||
add_attachment(dlg.GetPath());
|
dlg.GetPaths(files);
|
||||||
|
for (i = 0; i < files.Count(); i++)
|
||||||
|
add_attachment(files[i]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -712,11 +712,16 @@ tab_input::select_file(bool append) {
|
|||||||
wxFileDialog dlg(NULL,
|
wxFileDialog dlg(NULL,
|
||||||
append ? wxT("Choose an input file to add") :
|
append ? wxT("Choose an input file to add") :
|
||||||
wxT("Chose an input file to append"),
|
wxT("Chose an input file to append"),
|
||||||
last_open_dir, wxT(""), media_files, wxOPEN);
|
last_open_dir, wxT(""), media_files, wxOPEN | wxMULTIPLE);
|
||||||
|
|
||||||
if(dlg.ShowModal() == wxID_OK) {
|
if(dlg.ShowModal() == wxID_OK) {
|
||||||
|
wxArrayString files;
|
||||||
|
int i;
|
||||||
|
|
||||||
last_open_dir = dlg.GetDirectory();
|
last_open_dir = dlg.GetDirectory();
|
||||||
add_file(dlg.GetPath(), append);
|
dlg.GetPaths(files);
|
||||||
|
for (i = 0; i < files.Count(); i++)
|
||||||
|
add_file(files[i], append);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -771,8 +776,8 @@ tab_input::add_file(const wxString &file_name,
|
|||||||
result = wxExecute(command, output, errors);
|
result = wxExecute(command, output, errors);
|
||||||
wxRemoveFile(opt_file_name);
|
wxRemoveFile(opt_file_name);
|
||||||
if ((result < 0) || (result > 1)) {
|
if ((result < 0) || (result > 1)) {
|
||||||
name.Printf(wxT("File identification failed. Return code: %d\n\n"),
|
name.Printf(wxT("File identification failed for '%s'. Return code: "
|
||||||
result);
|
"%d\n\n"), file_name.c_str(), result);
|
||||||
for (i = 0; i < output.Count(); i++)
|
for (i = 0; i < output.Count(); i++)
|
||||||
name += break_line(output[i]) + wxT("\n");
|
name += break_line(output[i]) + wxT("\n");
|
||||||
name += wxT("\n");
|
name += wxT("\n");
|
||||||
|
Loading…
Reference in New Issue
Block a user