X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/41285bc82f2e1df2fb99e3a77b4577aa36f860e9..2a32b8071b301260644a8ac0286797197e3d0ebb:/include/wx/msgdlg.h diff --git a/include/wx/msgdlg.h b/include/wx/msgdlg.h index 8645691499..6d65fc75aa 100644 --- a/include/wx/msgdlg.h +++ b/include/wx/msgdlg.h @@ -68,8 +68,9 @@ public: // stock items id support wxString GetAsString() const { - return m_stockId == wxID_NONE ? m_label - : wxGetStockLabel(m_stockId); + return m_stockId == wxID_NONE + ? m_label + : wxGetStockLabel(m_stockId, wxSTOCK_FOR_BUTTON); } // return the stock id or wxID_NONE if this is not a stock label @@ -140,7 +141,6 @@ public: // change the dialog style flag void SetMessageDialogStyle(long style) { -#ifdef __WXDEBUG__ wxASSERT_MSG( ((style & wxYES_NO) == wxYES_NO) || !(style & wxYES_NO), "wxYES and wxNO may only be used together" ); @@ -153,15 +153,14 @@ public: wxASSERT_MSG( (style & wxID_OK) != wxID_OK, "wxMessageBox: Did you mean wxOK (and not wxID_OK)?" ); - if ((style & wxNO_DEFAULT) != 0 && (style & wxNO) == 0) - wxFAIL_MSG("wxNO_DEFAULT is invalid without wxNO"); + wxASSERT_MSG( !(style & wxNO_DEFAULT) || (style & wxNO), + "wxNO_DEFAULT is invalid without wxNO" ); - if ((style & wxCANCEL_DEFAULT) != 0 && (style & wxCANCEL) == 0) - wxFAIL_MSG("wxCANCEL_DEFAULT is invalid without wxCANCEL"); + wxASSERT_MSG( !(style & wxCANCEL_DEFAULT) || (style & wxCANCEL), + "wxCANCEL_DEFAULT is invalid without wxCANCEL" ); - if ((style & wxCANCEL_DEFAULT) != 0 && (style & wxNO_DEFAULT) != 0) - wxFAIL_MSG("only one default button can be specified"); -#endif + wxASSERT_MSG( !(style & wxCANCEL_DEFAULT) || !(style & wxNO_DEFAULT), + "only one default button can be specified" ); m_dialogStyle = style; } @@ -186,7 +185,7 @@ protected: m_caption; long m_dialogStyle; - DECLARE_NO_COPY_CLASS(wxMessageDialogBase) + wxDECLARE_NO_COPY_CLASS(wxMessageDialogBase); }; // this is a helper class for native wxMessageDialog implementations which need @@ -290,7 +289,7 @@ private: m_ok, m_cancel; - DECLARE_NO_COPY_CLASS(wxMessageDialogWithCustomLabels) + wxDECLARE_NO_COPY_CLASS(wxMessageDialogWithCustomLabels); }; #endif // ports needing wxMessageDialogWithCustomLabels