]> git.saurik.com Git - wxWidgets.git/blobdiff - samples/artprov/arttest.cpp
do not exceed the 80 column limit when printing the list of available libraries
[wxWidgets.git] / samples / artprov / arttest.cpp
index 186fd430037cab458c09c53b684263592a56dbbb..45c5d1f45f5bff99d78e7cd7fbe9026d5d9a23ca 100644 (file)
@@ -20,7 +20,7 @@
 #include "wx/wx.h"
 #endif
 
-#ifndef __WXMSW__
+#if !defined(__WXMSW__) && !defined(__WXPM__)
     #include "mondrian.xpm"
 #endif
 
@@ -52,7 +52,7 @@ private:
 #endif // wxUSE_LOG
     void OnBrowser(wxCommandEvent& event);
     void OnPlugProvider(wxCommandEvent& event);
-    
+
     DECLARE_EVENT_TABLE()
 };
 
@@ -96,6 +96,9 @@ IMPLEMENT_APP(MyApp)
 // 'Main program' equivalent: the program execution "starts" here
 bool MyApp::OnInit()
 {
+    if ( !wxApp::OnInit() )
+        return false;
+
     // create the main application window
     MyFrame *frame = new MyFrame(_T("wxArtProvider sample"),
                                  wxPoint(50, 50), wxSize(450, 340));
@@ -156,7 +159,7 @@ MyFrame::MyFrame(const wxString& title, const wxPoint& pos, const wxSize& size,
     wxMenu *helpMenu = new wxMenu;
     helpMenu->Append(wxID_ABOUT, _T("&About...\tF1"), _T("Show about dialog"));
 
-    menuFile->AppendCheckItem(ID_PlugProvider, _T("&Plug-in art provider"), _T("Enable custom art provider"));   
+    menuFile->AppendCheckItem(ID_PlugProvider, _T("&Plug-in art provider"), _T("Enable custom art provider"));
     menuFile->AppendSeparator();
 
 #if wxUSE_LOG
@@ -216,7 +219,7 @@ void MyFrame::OnBrowser(wxCommandEvent& WXUNUSED(event))
 void MyFrame::OnPlugProvider(wxCommandEvent& event)
 {
     if ( event.IsChecked() )
-        wxArtProvider::PushProvider(new MyArtProvider);
+        wxArtProvider::Push(new MyArtProvider);
     else
-        wxArtProvider::PopProvider();
+        wxArtProvider::Pop();
 }