]> git.saurik.com Git - wxWidgets.git/blobdiff - samples/taskbar/tbtest.cpp
fix the definition of many static functions marked as 'const' or functions which...
[wxWidgets.git] / samples / taskbar / tbtest.cpp
index 397a438fc27c6366ba4f1ad7433048b01bd21028..9256009cdd99e75ab814c25c40dd526fff4f54c2 100644 (file)
@@ -60,6 +60,16 @@ bool MyApp::OnInit()
     if ( !wxApp::OnInit() )
         return false;
 
+    if ( !wxTaskBarIcon::IsAvailable() )
+    {
+        wxMessageBox
+        (
+            "There appears to be no system tray support in your current environment. This sample may not behave as expected.",
+            "Warning",
+            wxOK | wxICON_EXCLAMATION
+        );
+    }
+
     // Create the main window
     gs_dialog = new MyDialog(wxT("wxTaskBarIcon Test Dialog"));
 
@@ -151,7 +161,7 @@ void MyDialog::OnAbout(wxCommandEvent& WXUNUSED(event))
 #if defined(__WXMSW__) && wxUSE_TASKBARICON_BALLOONS
     m_taskBarIcon->ShowBalloon(title, message, 15000, wxICON_INFORMATION);
 #else // !__WXMSW__
-    wxMessageBox(message, title, wxICON_INFORMATION, this);
+    wxMessageBox(message, title, wxICON_INFORMATION|wxOK, this);
 #endif // __WXMSW__/!__WXMSW__
 }