added wxICON_NONE and implement support for it in wxGTK (closes #2897)

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@61234 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
2009-06-28 16:25:37 +00:00
parent 78eecde086
commit 7e3204b45c
5 changed files with 34 additions and 16 deletions

View File

@@ -1283,14 +1283,14 @@ wxWindow* wxGenericFindWindowAtPoint(const wxPoint& pt)
int wxMessageBox(const wxString& message, const wxString& caption, long style,
wxWindow *parent, int WXUNUSED(x), int WXUNUSED(y) )
{
long decorated_style = style;
if ( ( style & ( wxICON_EXCLAMATION | wxICON_HAND | wxICON_INFORMATION | wxICON_QUESTION ) ) == 0 )
// add the appropriate icon unless this was explicitly disabled by use of
// wxICON_NONE
if ( !(style & wxICON_NONE) && !(style & wxICON_MASK) )
{
decorated_style |= ( style & wxYES ) ? wxICON_QUESTION : wxICON_INFORMATION ;
style |= style & wxYES ? wxICON_QUESTION : wxICON_INFORMATION;
}
wxMessageDialog dialog(parent, message, caption, decorated_style);
wxMessageDialog dialog(parent, message, caption, style);
int ans = dialog.ShowModal();
switch ( ans )