]> git.saurik.com Git - wxWidgets.git/blobdiff - src/msw/notifmsg.cpp
restore tabg.cpp for wxMotif's wxNotebook implementation
[wxWidgets.git] / src / msw / notifmsg.cpp
index 136a1bc9c79221c72b5b47cc1e0f501da2f24e2a..748445e3ae8f1f810d46df60f3f81cc94fcd6bc2 100644 (file)
     #pragma hdrstop
 #endif
 
-#if wxUSE_NOTIFICATION_MESSAGE && wxUSE_TASKBARICON
+// we can only use the native implementation if we have a working
+// wxTaskBarIcon::ShowBalloon() method
+#if wxUSE_NOTIFICATION_MESSAGE && \
+        wxUSE_TASKBARICON && wxUSE_TASKBARICON_BALLOONS
+
+#include "wx/notifmsg.h"
 
 #ifndef WX_PRECOMP
+    #include "wx/toplevel.h"
+    #include "wx/app.h"
     #include "wx/string.h"
 #endif // WX_PRECOMP
 
-#include "wx/notifmsg.h"
 #include "wx/generic/notifmsg.h"
 
 #include "wx/taskbar.h"
@@ -203,7 +209,7 @@ wxNotificationIconEvtHandler::wxNotificationIconEvtHandler(wxTaskBarIcon *icon)
     m_icon->Connect
             (
               wxEVT_TASKBAR_BALLOON_CLICK,
-              wxTaskBarIconEventHandler(wxNotificationIconEvtHandler::OnTimeout),
+              wxTaskBarIconEventHandler(wxNotificationIconEvtHandler::OnClick),
               NULL,
               this
             );
@@ -311,7 +317,7 @@ wxManualNotifMsgImpl::~wxManualNotifMsgImpl()
 bool
 wxManualNotifMsgImpl::DoShow(const wxString& title,
                              const wxString& message,
-                             int timeout,
+                             int WXUNUSED_UNLESS_DEBUG(timeout),
                              int flags)
 {
     wxASSERT_MSG( timeout == wxNotificationMessage::Timeout_Never,
@@ -377,6 +383,9 @@ wxAutoNotifMsgImpl::DoShow(const wxString& title,
 // wxNotificationMessage
 // ----------------------------------------------------------------------------
 
+/* static */
+bool wxNotificationMessage::ms_alwaysUseGeneric = false;
+
 /* static */
 wxTaskBarIcon *wxNotificationMessage::UseTaskBarIcon(wxTaskBarIcon *icon)
 {
@@ -387,7 +396,7 @@ bool wxNotificationMessage::Show(int timeout)
 {
     if ( !m_impl )
     {
-        if ( wxTheApp->GetShell32Version() >= 500 )
+        if ( !ms_alwaysUseGeneric && wxTheApp->GetShell32Version() >= 500 )
         {
             if ( timeout == Timeout_Never )
                 m_impl = new wxManualNotifMsgImpl(GetParent());