]> git.saurik.com Git - wxWidgets.git/blobdiff - samples/event/event.cpp
Dtor for wxHtmlCell
[wxWidgets.git] / samples / event / event.cpp
index 8994d0a138a045b7bbea2bc6c8bf4d6b409764f7..4e9dc8798c24449173cb7f8604edd58fabd5daeb 100644 (file)
 // headers
 // ----------------------------------------------------------------------------
 
-#if defined(__GNUG__) && !defined(__APPLE__)
-    // DO NOT use event.cpp here, it breaks statics initialization in
-    // src/common/event.cpp and nothing works at all then!
-    #pragma implementation "eventsample.cpp"
-    #pragma interface "eventsample.cpp"
-#endif
-
 // For compilers that support precompilation, includes "wx/wx.h".
 #include "wx/wxprec.h"
 
@@ -295,7 +288,7 @@ void MyFrame::OnQuit(wxCommandEvent& WXUNUSED(event))
 void MyFrame::OnAbout(wxCommandEvent& WXUNUSED(event))
 {
     wxMessageBox( wxT("Event sample shows different ways of using events\n")
-                  wxT("© 2001 Vadim Zeitlin"),
+                  wxT("(c) 2001 Vadim Zeitlin"),
                   wxT("About Event Sample"), wxOK | wxICON_INFORMATION, this );
 }
 
@@ -323,15 +316,19 @@ void MyFrame::OnConnect(wxCommandEvent& event)
                 (wxEventFunction)
                 (wxCommandEventFunction)&MyFrame::OnDynamic);
 
+#if wxUSE_STATUSBAR
         SetStatusText(_T("You can now use \"Dynamic\" item in the menu"));
         SetStatusText(_T("Dynamic: on"), Status_Dynamic);
+#endif // wxUSE_STATUSBAR
     }
     else // connect
     {
         Disconnect(Event_Dynamic, wxID_ANY, wxEVT_COMMAND_MENU_SELECTED);
 
+#if wxUSE_STATUSBAR
         SetStatusText(_T("You can no more use \"Dynamic\" item in the menu"));
         SetStatusText(_T("Dynamic: off"), Status_Dynamic);
+#endif // wxUSE_STATUSBAR
     }
 }
 
@@ -343,7 +340,9 @@ void MyFrame::OnPushEventHandler(wxCommandEvent& WXUNUSED(event))
 {
     PushEventHandler(new MyEvtHandler(++m_nPush));
 
+#if wxUSE_STATUSBAR
     SetStatusText(wxString::Format(_T("Push count: %u"), m_nPush), Status_Push);
+#endif // wxUSE_STATUSBAR
 }
 
 void MyFrame::OnPopEventHandler(wxCommandEvent& WXUNUSED(event))
@@ -353,7 +352,9 @@ void MyFrame::OnPopEventHandler(wxCommandEvent& WXUNUSED(event))
     PopEventHandler(true /* delete handler */);
     m_nPush--;
 
+#if wxUSE_STATUSBAR
     SetStatusText(wxString::Format(_T("Push count: %u"), m_nPush), Status_Push);
+#endif // wxUSE_STATUSBAR
 }
 
 void MyFrame::OnTest(wxCommandEvent& WXUNUSED(event))