From: Vadim Zeitlin Date: Sat, 25 Jul 2009 16:40:49 +0000 (+0000) Subject: Use Ok/Cancel dialog instead of Yes/No one in CheckFit(). X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/9b95e87cb00a02e8373d25f525910d689c176ce4 Use Ok/Cancel dialog instead of Yes/No one in CheckFit(). This has the advantage of being able to close the dialog with "Esc" and also allows us to not specify the label for the "Cancel" button at all and use the default one, which is especially important under MSW where the label returned by wxGetStockLabel(wxID_CANCEL) is actually not the same string as is used in the native message boxes (they don't define an accelerator for the cancel button). git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@61524 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/src/html/htmprint.cpp b/src/html/htmprint.cpp index 342dde6cbe..60d681cff0 100644 --- a/src/html/htmprint.cpp +++ b/src/html/htmprint.cpp @@ -218,16 +218,16 @@ wxHtmlPrintout::CheckFit(const wxSize& pageArea, const wxSize& docArea) const GetTitle() ), _("Printing"), - wxYES_NO | wxNO_DEFAULT | wxICON_QUESTION + wxOK | wxCANCEL | wxCANCEL_DEFAULT | wxICON_QUESTION ); dlg.SetExtendedMessage ( _("If possible, try changing the layout parameters to " "make the printout more narrow.") ); - dlg.SetYesNoLabels(_("&Print"), _("&Cancel")); + dlg.SetOKLabel(_("&Print")); - if ( dlg.ShowModal() != wxID_YES ) + if ( dlg.ShowModal() == wxID_CANCEL ) return false; }