X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/dfe1eee3bb9ecde8c4490ea69c07b5030d69530c..20a8b34e2c6d43140cb8b38482536a49ed7e0e7a:/src/generic/msgdlgg.cpp diff --git a/src/generic/msgdlgg.cpp b/src/generic/msgdlgg.cpp index 54882a1293..18bd2ba2ba 100644 --- a/src/generic/msgdlgg.cpp +++ b/src/generic/msgdlgg.cpp @@ -29,6 +29,7 @@ #include "wx/layout.h" #include "wx/intl.h" #include "wx/icon.h" +# include "wx/app.h" #endif #include @@ -44,15 +45,6 @@ // icons // ---------------------------------------------------------------------------- -// MSW icons are in the ressources, for all other platforms - in XPM files -#ifndef __WXMSW__ - #include "wx/generic/info.xpm" - #include "wx/generic/question.xpm" - #include "wx/generic/warning.xpm" - #include "wx/generic/error.xpm" -#endif // __WXMSW__ - - #if !USE_SHARED_LIBRARY BEGIN_EVENT_TABLE(wxGenericMessageDialog, wxDialog) EVT_BUTTON(wxID_YES, wxGenericMessageDialog::OnYes) @@ -77,43 +69,8 @@ wxGenericMessageDialog::wxGenericMessageDialog( wxWindow *parent, wxLayoutConstraints *c; SetAutoLayout(TRUE); - // create an icon - enum - { - Icon_Information, - Icon_Question, - Icon_Warning, - Icon_Error - } which; - -#ifdef __WXMSW__ - static char *icons[] = - { - "wxICON_INFO", - "wxICON_QUESTION", - "wxICON_WARNING", - "wxICON_ERROR", - }; -#else // XPM icons - static char **icons[] = - { - info, - question, - warning, - error, - }; -#endif // !XPM/XPM - - if ( style & wxICON_EXCLAMATION ) - which = Icon_Warning; - else if ( style & wxICON_HAND ) - which = Icon_Error; - else if ( style & wxICON_QUESTION ) - which = Icon_Question; - else - which = Icon_Information; - - wxStaticBitmap *icon = new wxStaticBitmap(this, -1, wxIcon(icons[which])); + wxStaticBitmap *icon = new wxStaticBitmap(this, -1, + wxTheApp->GetStdIcon(style & wxICON_MASK)); const int iconSize = icon->GetBitmap().GetWidth(); // split the message in lines