]> git.saurik.com Git - wxWidgets.git/blobdiff - src/common/docview.cpp
fixes for animated GIFs playing (patch 1097003)
[wxWidgets.git] / src / common / docview.cpp
index ed5f74fa68eb44f4f659b382cb78d2da8efb41a9..551e02f516bb92ccd49c9a708eefc9c190b26fd9 100644 (file)
@@ -187,17 +187,15 @@ bool wxDocument::DeleteAllViews()
 
     for ( it = m_documentViews.begin(), en = m_documentViews.end();
           it != en;
 
     for ( it = m_documentViews.begin(), en = m_documentViews.end();
           it != en;
-          )
+          ++it )
     {
         wxView *view = (wxView *)*it;
         if (!view->Close())
             return false;
 
     {
         wxView *view = (wxView *)*it;
         if (!view->Close())
             return false;
 
-        wxList::iterator next = it; ++next;
-
         delete view; // Deletes node implicitly
         delete view; // Deletes node implicitly
-        it = next;
     }
     }
+
     // If we haven't yet deleted the document (for example
     // if there were no views) then delete it.
     if (manager && manager->GetDocuments().Member(this))
     // If we haven't yet deleted the document (for example
     // if there were no views) then delete it.
     if (manager && manager->GetDocuments().Member(this))
@@ -837,11 +835,9 @@ BEGIN_EVENT_TABLE(wxDocManager, wxEvtHandler)
 
 #if wxUSE_PRINTING_ARCHITECTURE
     EVT_MENU(wxID_PRINT, wxDocManager::OnPrint)
 
 #if wxUSE_PRINTING_ARCHITECTURE
     EVT_MENU(wxID_PRINT, wxDocManager::OnPrint)
-    EVT_MENU(wxID_PRINT_SETUP, wxDocManager::OnPrintSetup)
     EVT_MENU(wxID_PREVIEW, wxDocManager::OnPreview)
 
     EVT_UPDATE_UI(wxID_PRINT, wxDocManager::OnUpdatePrint)
     EVT_MENU(wxID_PREVIEW, wxDocManager::OnPreview)
 
     EVT_UPDATE_UI(wxID_PRINT, wxDocManager::OnUpdatePrint)
-    EVT_UPDATE_UI(wxID_PRINT_SETUP, wxDocManager::OnUpdatePrintSetup)
     EVT_UPDATE_UI(wxID_PREVIEW, wxDocManager::OnUpdatePreview)
 #endif
 END_EVENT_TABLE()
     EVT_UPDATE_UI(wxID_PREVIEW, wxDocManager::OnUpdatePreview)
 #endif
 END_EVENT_TABLE()
@@ -1005,22 +1001,6 @@ void wxDocManager::OnPrint(wxCommandEvent& WXUNUSED(event))
 #endif // wxUSE_PRINTING_ARCHITECTURE
 }
 
 #endif // wxUSE_PRINTING_ARCHITECTURE
 }
 
-void wxDocManager::OnPrintSetup(wxCommandEvent& WXUNUSED(event))
-{
-#if wxUSE_PRINTING_ARCHITECTURE
-    wxWindow *parentWin = wxTheApp->GetTopWindow();
-    wxView *view = GetCurrentView();
-    if (view)
-        parentWin = view->GetFrame();
-
-    wxPrintDialogData data;
-
-    wxPrintDialog printerDialog(parentWin, &data);
-    printerDialog.GetPrintDialogData().SetSetupDialog(true);
-    printerDialog.ShowModal();
-#endif // wxUSE_PRINTING_ARCHITECTURE
-}
-
 void wxDocManager::OnPreview(wxCommandEvent& WXUNUSED(event))
 {
 #if wxUSE_PRINTING_ARCHITECTURE
 void wxDocManager::OnPreview(wxCommandEvent& WXUNUSED(event))
 {
 #if wxUSE_PRINTING_ARCHITECTURE
@@ -1141,11 +1121,6 @@ void wxDocManager::OnUpdatePrint(wxUpdateUIEvent& event)
     event.Enable( (doc != (wxDocument*) NULL) );
 }
 
     event.Enable( (doc != (wxDocument*) NULL) );
 }
 
-void wxDocManager::OnUpdatePrintSetup(wxUpdateUIEvent& event)
-{
-    event.Enable( true );
-}
-
 void wxDocManager::OnUpdatePreview(wxUpdateUIEvent& event)
 {
     wxDocument *doc = GetCurrentDocument();
 void wxDocManager::OnUpdatePreview(wxUpdateUIEvent& event)
 {
     wxDocument *doc = GetCurrentDocument();
@@ -1839,10 +1814,6 @@ wxDocChildFrame::wxDocChildFrame(wxDocument *doc,
         view->SetFrame(this);
 }
 
         view->SetFrame(this);
 }
 
-wxDocChildFrame::~wxDocChildFrame()
-{
-}
-
 // Extend event processing to search the view's event table
 bool wxDocChildFrame::ProcessEvent(wxEvent& event)
 {
 // Extend event processing to search the view's event table
 bool wxDocChildFrame::ProcessEvent(wxEvent& event)
 {