Patch #907 2006-03-08 19:17

sethjackson

wxFileDialog
Download
907-wxFileDialog.patch (2.3 KB)
Category
Application::Refinement
Status
Accepted
Close date
2006-03-13 10:01
Assigned to
 
Index: src/sdk/cbworkspace.cpp
===================================================================
--- src/sdk/cbworkspace.cpp    (revision 2159)
+++ src/sdk/cbworkspace.cpp    (working copy)
@@ -136,12 +136,12 @@
 bool cbWorkspace::SaveAs(const wxString& filename)
 {
     SANITY_CHECK(false);
-    wxFileDialog* dlg = new wxFileDialog(0,
-                            _("Save workspace"),
-                            m_Filename.GetPath(),
-                            m_Filename.GetFullName(),
-                            WORKSPACES_FILES_FILTER,
-                            wxSAVE | wxOVERWRITE_PROMPT);
+    wxFileDialog* dlg = new wxFileDialog(Manager::Get()->GetAppWindow(),
+                                         _("Save workspace"),
+                                         m_Filename.GetPath(),
+                                         m_Filename.GetFullName(),
+                                         WORKSPACES_FILES_FILTER,
+                                         wxSAVE | wxOVERWRITE_PROMPT);
     PlaceWindow(dlg);
     if (dlg->ShowModal() != wxID_OK)
         return false;
Index: src/sdk/templatemanager.cpp
===================================================================
--- src/sdk/templatemanager.cpp    (revision 2159)
+++ src/sdk/templatemanager.cpp    (working copy)
@@ -262,12 +262,12 @@
                     msg.Printf(_("File %s already exists.\nDo you really want to overwrite this file?"), dst.c_str());
                     if (cbMessageBox(msg, _("Overwrite existing file?"), wxYES_NO | wxICON_WARNING) == wxID_YES)
                         break;
-                    wxFileDialog fdlg(0L,
-                                        _("Save file as..."),
-                                        wxEmptyString,
-                                        dst,
-                                        SOURCE_FILES_FILTER,
-                                        wxSAVE);
+                    wxFileDialog fdlg(Manager::Get()->GetAppWindow(),
+                                      _("Save file as..."),
+                                      wxEmptyString,
+                                      dst,
+                                      SOURCE_FILES_FILTER,
+                                      wxSAVE);
                     PlaceWindow(&fdlg);
                     if (fdlg.ShowModal() == wxID_CANCEL)
                     {
killerbot 2006-03-08 21:28

I'll leave this one to Yiannis or Thomas. Have no idea yet, how all those windows should work. As far as I understand, it seems reasonable. Why indeed would the app not be the parent ?