Update of /cvsroot/mahogany/M/src/wx/generic
In directory usw-pr-cvs1:/tmp/cvs-serv26619/src/wx/generic

Modified Files:
        persctrl.cpp 
Log Message:
use wxArtProvider instead of obsolete GetStdIcon()

Index: persctrl.cpp
===================================================================
RCS file: /cvsroot/mahogany/M/src/wx/generic/persctrl.cpp,v
retrieving revision 1.76
retrieving revision 1.77
diff -b -u -2 -r1.76 -r1.77
--- persctrl.cpp        6 Nov 2002 00:28:25 -0000       1.76
+++ persctrl.cpp        6 Nov 2002 11:07:09 -0000       1.77
@@ -47,4 +47,5 @@
 #   include  "wx/app.h"
 #   include  "wx/msgdlg.h"
+#   include  "wx/artprov.h"
 #endif //WX_PRECOMP
 
@@ -1502,10 +1503,33 @@
     // create an icon
 #ifdef USE_ICON
-    int which = style & wxICON_MASK;
+    wxArtID id;
+    switch ( style & wxICON_MASK )
+    {
+        case wxICON_WARNING:
+            id = wxART_WARNING;
+            break;
+
+        case wxICON_ERROR:
+            id = wxART_ERROR;
+            break;
+
+        case wxICON_QUESTION:
+            id = wxART_QUESTION;
+            break;
+
+        default:
+            wxFAIL_MSG( _T("unknown icon flag") );
+            // fall through
+
+        case wxICON_INFORMATION:
+            id = wxART_INFORMATION;
+            break;
+    }
+
     wxStaticBitmap *icon = new wxStaticBitmap
                                (
                                 this,
                                 -1,
-                                ((wxMApp *)mApplication)->GetStdIcon(which)
+                                wxArtProvider::GetBitmap(id)
                                );
     const int iconSize = icon->GetIcon().GetWidth();



-------------------------------------------------------
This sf.net email is sponsored by: See the NEW Palm 
Tungsten T handheld. Power & Color in a compact size!
http://ads.sourceforge.net/cgi-bin/redirect.pl?palm0001en
_______________________________________________
Mahogany-cvsupdates mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/mahogany-cvsupdates

Reply via email to