X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/637f467a0639bf942ebeb466d056fa339bfdbdee..66bd6b93005b803910caca469110495ce549599f:/src/common/docview.cpp diff --git a/src/common/docview.cpp b/src/common/docview.cpp index 80ad3550d6..6f5aac75d9 100644 --- a/src/common/docview.cpp +++ b/src/common/docview.cpp @@ -36,6 +36,10 @@ #include "wx/filedlg.h" #endif +#ifdef __WXGTK__ +#include "wx/mdi.h" +#endif + #include "wx/msgdlg.h" #include "wx/choicdlg.h" #include "wx/docview.h" @@ -43,12 +47,6 @@ #include "wx/generic/prntdlgg.h" #include "wx/generic/printps.h" -/* -#ifdef __WXMSW__ -#include "wx/mdi.h" -#endif -*/ - #include #include @@ -488,28 +486,7 @@ void wxView::OnChangeFilename(void) wxString name; GetDocument()->GetPrintableName(name); - // If the frame is an MDI child, just set the title - // to the name. - // Otherwise, append the document name to the name of the application -#ifdef __WXMSW__ - if (GetFrame()->IsKindOf(CLASSINFO(wxMDIChildFrame))) -#else - if (FALSE) -#endif - { - GetFrame()->SetTitle(name); - } - else - { - if (wxTheApp->GetAppName() != "") - { - char buf[400]; - sprintf(buf, "%s - %s", (const char *)wxTheApp->GetAppName(), (const char *)name); - GetFrame()->SetTitle(buf); - } - else - GetFrame()->SetTitle(name); - } + GetFrame()->SetTitle(name); } } @@ -811,7 +788,7 @@ void wxDocManager::OnPreview(wxCommandEvent& WXUNUSED(event)) preview = new wxWindowsPrintPreview(printout, view->OnCreatePrintout()); else #endif - preview = new wxPostScriptPrintPreview(printout, view->OnCreatePrintout()); + preview = new wxPostScriptPrintPreview(printout, view->OnCreatePrintout()); wxPreviewFrame *frame = new wxPreviewFrame(preview, (wxFrame *)wxTheApp->GetTopWindow(), "Print Preview", wxPoint(100, 100), wxSize(600, 650)); @@ -1331,9 +1308,9 @@ BEGIN_EVENT_TABLE(wxDocChildFrame, wxFrame) EVT_ACTIVATE(wxDocChildFrame::OnActivate) END_EVENT_TABLE() -wxDocChildFrame::wxDocChildFrame(wxDocument *doc, wxView *view, wxFrame *frame, const wxString& title, +wxDocChildFrame::wxDocChildFrame(wxDocument *doc, wxView *view, wxFrame *frame, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style, const wxString& name): - wxFrame(frame, -1, title, pos, size, style, name) + wxFrame(frame, id, title, pos, size, style, name) { m_childDocument = doc; m_childView = view; @@ -1397,12 +1374,12 @@ bool wxDocChildFrame::OnClose(void) BEGIN_EVENT_TABLE(wxDocParentFrame, wxFrame) EVT_MENU(wxID_EXIT, wxDocParentFrame::OnExit) - EVT_MENU_RANGE(wxID_FILE1, wxID_FILE2, wxDocParentFrame::OnMRUFile) + EVT_MENU_RANGE(wxID_FILE1, wxID_FILE9, wxDocParentFrame::OnMRUFile) END_EVENT_TABLE() -wxDocParentFrame::wxDocParentFrame(wxDocManager *manager, wxFrame *frame, const wxString& title, +wxDocParentFrame::wxDocParentFrame(wxDocManager *manager, wxFrame *frame, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style, const wxString& name): - wxFrame(frame, -1, title, pos, size, style, name) + wxFrame(frame, id, title, pos, size, style, name) { m_docManager = manager; }