]> git.saurik.com Git - wxWidgets.git/commitdiff
Applied patch [ 892608 ] wxLogDialog + wxLogFrame: minor improvement for file saving
authorJulian Smart <julian@anthemion.co.uk>
Sun, 8 Feb 2004 12:43:41 +0000 (12:43 +0000)
committerJulian Smart <julian@anthemion.co.uk>
Sun, 8 Feb 2004 12:43:41 +0000 (12:43 +0000)
Christian Sturmlechner

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@25619 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/generic/logg.cpp

index 5871419db7989df252cf728b443de301799d24db..c3d62b8f2921bd1a843ad9ace9325275f0ba30c1 100644 (file)
@@ -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;