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

@@ -86,7 +86,9 @@ void wxMessageDialog::GTKCreateMsgDialog()
#if wxUSE_LIBHILDON
const char *stockIcon;
if ( m_dialogStyle & wxICON_ERROR )
if ( m_dialogStyle & wxICON_NONE )
stockIcon = "";
else if ( m_dialogStyle & wxICON_ERROR )
stockIcon = "qgn_note_gene_syserror";
else if ( m_dialogStyle & wxICON_EXCLAMATION )
stockIcon = "qgn_note_gene_syswarning";
@@ -127,6 +129,11 @@ void wxMessageDialog::GTKCreateMsgDialog()
}
}
#ifdef __WXGTK210__
if ( gtk_check_version(2, 10, 0) == NULL && (m_dialogStyle & wxICON_NONE))
type = GTK_MESSAGE_OTHER;
else
#endif // __WXGTK210__
if (m_dialogStyle & wxICON_EXCLAMATION)
type = GTK_MESSAGE_WARNING;
else if (m_dialogStyle & wxICON_ERROR)
@@ -137,7 +144,8 @@ void wxMessageDialog::GTKCreateMsgDialog()
type = GTK_MESSAGE_QUESTION;
else
{
// GTK+ doesn't have a "typeless" msg box, so try to auto detect...
// if no style is explicitly specified, detect the suitable icon
// ourselves (this can be disabled by using wxICON_NONE)
type = m_dialogStyle & wxYES ? GTK_MESSAGE_QUESTION : GTK_MESSAGE_INFO;
}