From: Julian Smart Date: Sun, 8 Feb 2004 12:43:41 +0000 (+0000) Subject: Applied patch [ 892608 ] wxLogDialog + wxLogFrame: minor improvement for file saving X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/73ff84ff712819f4a024e6080800485b5dcae940 Applied patch [ 892608 ] wxLogDialog + wxLogFrame: minor improvement for file saving Christian Sturmlechner git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@25619 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/src/generic/logg.cpp b/src/generic/logg.cpp index 5871419db7..c3d62b8f29 100644 --- a/src/generic/logg.cpp +++ b/src/generic/logg.cpp @@ -171,7 +171,7 @@ END_EVENT_TABLE() // filename and try to open it, returns TRUE on success (file was opened), // FALSE if file couldn't be opened/created and -1 if the file selection // dialog was cancelled -static int OpenLogFile(wxFile& file, wxString *filename = NULL); +static int OpenLogFile(wxFile& file, wxString *filename = NULL, wxWindow *parent = NULL); #endif // wxUSE_FILE @@ -542,7 +542,7 @@ void wxLogFrame::OnSave(wxCommandEvent& WXUNUSED(event)) #if wxUSE_FILEDLG wxString filename; wxFile file; - int rc = OpenLogFile(file, &filename); + int rc = OpenLogFile(file, &filename, this); if ( rc == -1 ) { // cancelled @@ -963,7 +963,7 @@ void wxLogDialog::OnSave(wxCommandEvent& WXUNUSED(event)) { #if wxUSE_FILEDLG wxFile file; - int rc = OpenLogFile(file); + int rc = OpenLogFile(file, NULL, this); if ( rc == -1 ) { // cancelled @@ -1103,11 +1103,11 @@ wxLogDialog::~wxLogDialog() // filename and try to open it, returns TRUE on success (file was opened), // FALSE if file couldn't be opened/created and -1 if the file selection // dialog was cancelled -static int OpenLogFile(wxFile& file, wxString *pFilename) +static int OpenLogFile(wxFile& file, wxString *pFilename, wxWindow *parent) { // get the file name // ----------------- - wxString filename = wxSaveFileSelector(wxT("log"), wxT("txt"), wxT("log.txt")); + wxString filename = wxSaveFileSelector(wxT("log"), wxT("txt"), wxT("log.txt"), parent); if ( !filename ) { // cancelled return -1;