From 161d3ebaa791d5cad53bd274f18ffdb1cdf407f6 Mon Sep 17 00:00:00 2001 From: Moritz Bunkus Date: Sat, 21 Feb 2004 17:12:00 +0000 Subject: [PATCH] Fix parameter order for the wxFileDialog class. Otherwise the default directory will not be set. --- ChangeLog | 6 ++++++ src/mmg/tab_attachments.cpp | 2 +- src/mmg/tab_input.cpp | 4 ++-- 3 files changed, 9 insertions(+), 3 deletions(-) diff --git a/ChangeLog b/ChangeLog index e21f14654..cee042532 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2004-02-21 Moritz Bunkus + + * mmg: bug fix: For some 'browse file' buttons the default + directory was not set to the last directory a file was selected + from. + 2004-02-16 Moritz Bunkus * mmg: new feature: Added a function for adjusting the chapter diff --git a/src/mmg/tab_attachments.cpp b/src/mmg/tab_attachments.cpp index 6b21dcb24..f075ee2ea 100644 --- a/src/mmg/tab_attachments.cpp +++ b/src/mmg/tab_attachments.cpp @@ -103,7 +103,7 @@ void tab_attachments::on_add_attachment(wxCommandEvent &evt) { uint32_t i, j; vector extensions; - wxFileDialog dlg(NULL, "Choose an attachment file", "", last_open_dir, + wxFileDialog dlg(NULL, "Choose an attachment file", last_open_dir, "", _T(ALLFILES), wxOPEN); if(dlg.ShowModal() == wxID_OK) { diff --git a/src/mmg/tab_input.cpp b/src/mmg/tab_input.cpp index db70afdd3..e6d03250f 100644 --- a/src/mmg/tab_input.cpp +++ b/src/mmg/tab_input.cpp @@ -929,7 +929,7 @@ void tab_input::on_browse_tags(wxCommandEvent &evt) { if ((selected_file == -1) || (selected_track == -1)) return; - wxFileDialog dlg(NULL, "Choose a tag file", "", last_open_dir, + wxFileDialog dlg(NULL, "Choose a tag file", last_open_dir, "", _T("Tag files (*.xml;*.txt)|*.xml;*.txt|" ALLFILES), wxOPEN); if(dlg.ShowModal() == wxID_OK) { @@ -943,7 +943,7 @@ void tab_input::on_browse_timecodes_clicked(wxCommandEvent &evt) { if ((selected_file == -1) || (selected_track == -1)) return; - wxFileDialog dlg(NULL, "Choose a timecodes file", "", last_open_dir, + wxFileDialog dlg(NULL, "Choose a timecodes file", last_open_dir, "", _T("Tag files (*.txt)|*.txt|" ALLFILES), wxOPEN); if(dlg.ShowModal() == wxID_OK) { last_open_dir = dlg.GetDirectory();