- Don't send any events from wxSpinCtrl::SetRange() even if the value changed.
- Display system drag images during drag and drop if available (PeterO).
+wxOSX:
+
+- Fix pages range in the print dialog (Auria).
+
2.9.4: (released 2012-07-09)
------
NSPrintPanel* panel = [NSPrintPanel printPanel];
NSPrintInfo* printInfo = ((wxOSXCocoaPrintData*)m_printDialogData.GetPrintData().GetNativeData())->GetNSPrintInfo();
+
+ NSMutableDictionary* dict = [printInfo printSettings];
+ [dict setValue:[NSNumber numberWithInt:m_printDialogData.GetMinPage()] forKey:@"com_apple_print_PrintSettings_PMFirstPage"];
+ [dict setValue:[NSNumber numberWithInt:m_printDialogData.GetMaxPage()] forKey:@"com_apple_print_PrintSettings_PMLastPage"];
+
if ( (NSInteger)[panel runModalWithPrintInfo:printInfo] == NSOKButton )
{
result = wxID_OK;
return false;
}
+ printout->OnPreparePrinting();
+
+ // Get some parameters from the printout, if defined
+ int fromPage, toPage;
+ int minPage, maxPage;
+ printout->GetPageInfo(&minPage, &maxPage, &fromPage, &toPage);
+
+ if (maxPage == 0)
+ {
+ sm_lastError = wxPRINTER_ERROR;
+ return false;
+ }
+
+ // Only set min and max, because from and to will be
+ // set by the user
+ m_printDialogData.SetMinPage(minPage);
+ m_printDialogData.SetMaxPage(maxPage);
+
if (m_printDialogData.GetMinPage() < 1)
m_printDialogData.SetMinPage(1);
if (m_printDialogData.GetMaxPage() < 1)
dc->GetSizeMM(&mw, &mh);
printout->SetPageSizeMM((int)mw, (int)mh);
- // Create an abort window
wxBeginBusyCursor();
- printout->OnPreparePrinting();
-
- // Get some parameters from the printout, if defined
- int fromPage, toPage;
- int minPage, maxPage;
- printout->GetPageInfo(&minPage, &maxPage, &fromPage, &toPage);
-
- if (maxPage == 0)
- {
- sm_lastError = wxPRINTER_ERROR;
- return false;
- }
-
- // Only set min and max, because from and to will be
- // set by the user
- m_printDialogData.SetMinPage(minPage);
- m_printDialogData.SetMaxPage(maxPage);
-
printout->OnBeginPrinting();
bool keepGoing = true;