]> git.saurik.com Git - wxWidgets.git/commitdiff
Use Ok/Cancel dialog instead of Yes/No one in CheckFit().
authorVadim Zeitlin <vadim@wxwidgets.org>
Sat, 25 Jul 2009 16:40:49 +0000 (16:40 +0000)
committerVadim Zeitlin <vadim@wxwidgets.org>
Sat, 25 Jul 2009 16:40:49 +0000 (16:40 +0000)
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

src/html/htmprint.cpp

index 342dde6cbed83c9e07d629ce3866a1bd1c342195..60d681cff097c6937707687288f634c59f6b307b 100644 (file)
@@ -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;
     }