projects
/
wxWidgets.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Add wxTLW::SetModified to allow apps to set the TLW's dirty state. On Mac this gives...
[wxWidgets.git]
/
src
/
msw
/
notifmsg.cpp
diff --git
a/src/msw/notifmsg.cpp
b/src/msw/notifmsg.cpp
index dbbc098ad2ce5ecd3494d5278ebfdb914d73edbe..a864e76371331641f192218476d7c808ebe2834b 100644
(file)
--- a/
src/msw/notifmsg.cpp
+++ b/
src/msw/notifmsg.cpp
@@
-23,13
+23,19
@@
#pragma hdrstop
#endif
#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
#ifndef WX_PRECOMP
+ #include "wx/toplevel.h"
+ #include "wx/app.h"
#include "wx/string.h"
#endif // WX_PRECOMP
#include "wx/string.h"
#endif // WX_PRECOMP
-#include "wx/notifmsg.h"
#include "wx/generic/notifmsg.h"
#include "wx/taskbar.h"
#include "wx/generic/notifmsg.h"
#include "wx/taskbar.h"
@@
-52,7
+58,7
@@
public:
virtual bool DoClose() = 0;
private:
virtual bool DoClose() = 0;
private:
- DECLARE_NO_COPY_CLASS(wxNotifMsgImpl)
+ wxDECLARE_NO_COPY_CLASS(wxNotifMsgImpl);
};
// implementation which is simply a bridge to wxGenericNotificationMessage
};
// implementation which is simply a bridge to wxGenericNotificationMessage
@@
-178,7
+184,7
@@
private:
wxTaskBarIcon * const m_icon;
wxTaskBarIcon * const m_icon;
- DECLARE_NO_COPY_CLASS(wxNotificationIconEvtHandler)
+ wxDECLARE_NO_COPY_CLASS(wxNotificationIconEvtHandler);
};
// ============================================================================
};
// ============================================================================
@@
-274,7
+280,7
@@
void wxBalloonNotifMsgImpl::SetUpIcon(wxWindow *win)
if ( !icon.IsOk() )
{
// we really must have some icon
if ( !icon.IsOk() )
{
// we really must have some icon
- icon = wxIcon(
_
T("wxICON_AAA"));
+ icon = wxIcon(
wx
T("wxICON_AAA"));
}
m_icon->SetIcon(icon);
}
m_icon->SetIcon(icon);
@@
-311,11
+317,11
@@
wxManualNotifMsgImpl::~wxManualNotifMsgImpl()
bool
wxManualNotifMsgImpl::DoShow(const wxString& title,
const wxString& message,
bool
wxManualNotifMsgImpl::DoShow(const wxString& title,
const wxString& message,
- int
timeout
,
+ int
WXUNUSED_UNLESS_DEBUG(timeout)
,
int flags)
{
wxASSERT_MSG( timeout == wxNotificationMessage::Timeout_Never,
int flags)
{
wxASSERT_MSG( timeout == wxNotificationMessage::Timeout_Never,
-
_
T("shouldn't be used") );
+
wx
T("shouldn't be used") );
// base class creates the icon for us initially but we could have destroyed
// it in DoClose(), recreate it if this was the case
// base class creates the icon for us initially but we could have destroyed
// it in DoClose(), recreate it if this was the case
@@
-362,7
+368,7
@@
wxAutoNotifMsgImpl::DoShow(const wxString& title,
int flags)
{
wxASSERT_MSG( timeout != wxNotificationMessage::Timeout_Never,
int flags)
{
wxASSERT_MSG( timeout != wxNotificationMessage::Timeout_Never,
-
_
T("shouldn't be used") );
+
wx
T("shouldn't be used") );
if ( timeout == wxNotificationMessage::Timeout_Auto )
{
if ( timeout == wxNotificationMessage::Timeout_Auto )
{
@@
-377,6
+383,9
@@
wxAutoNotifMsgImpl::DoShow(const wxString& title,
// wxNotificationMessage
// ----------------------------------------------------------------------------
// wxNotificationMessage
// ----------------------------------------------------------------------------
+/* static */
+bool wxNotificationMessage::ms_alwaysUseGeneric = false;
+
/* static */
wxTaskBarIcon *wxNotificationMessage::UseTaskBarIcon(wxTaskBarIcon *icon)
{
/* static */
wxTaskBarIcon *wxNotificationMessage::UseTaskBarIcon(wxTaskBarIcon *icon)
{
@@
-387,7
+396,7
@@
bool wxNotificationMessage::Show(int timeout)
{
if ( !m_impl )
{
{
if ( !m_impl )
{
- if ( wxTheApp->GetShell32Version() >= 500 )
+ if (
!ms_alwaysUseGeneric &&
wxTheApp->GetShell32Version() >= 500 )
{
if ( timeout == Timeout_Never )
m_impl = new wxManualNotifMsgImpl(GetParent());
{
if ( timeout == Timeout_Never )
m_impl = new wxManualNotifMsgImpl(GetParent());