X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/6466d41e9454208a9b44a7fd2839d60179d2df82..316189733a8b7f28aa7f9f555884bb45da30da33:/src/msw/taskbar.cpp diff --git a/src/msw/taskbar.cpp b/src/msw/taskbar.cpp index 45ec2c6dcc..ac7491bef0 100644 --- a/src/msw/taskbar.cpp +++ b/src/msw/taskbar.cpp @@ -10,10 +10,6 @@ // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////// -#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA) -#pragma implementation "taskbar.h" -#endif - // For compilers that support precompilation, includes "wx.h". #include "wx/wxprec.h" @@ -37,10 +33,6 @@ #include #include "wx/taskbar.h" -#ifdef __GNUWIN32_OLD__ - #include "wx/msw/gnuwin32/extra.h" -#endif - #ifdef __WXWINCE__ #include #include @@ -51,7 +43,7 @@ UINT gs_msgTaskbar = 0; UINT gs_msgRestartTaskbar = 0; #if WXWIN_COMPATIBILITY_2_4 -BEGIN_EVENT_TABLE(wxTaskBarIcon, wxEvtHandler) +BEGIN_EVENT_TABLE(wxTaskBarIcon, wxTaskBarIconBase) EVT_TASKBAR_MOVE (wxTaskBarIcon::_OnMouseMove) EVT_TASKBAR_LEFT_DOWN (wxTaskBarIcon::_OnLButtonDown) EVT_TASKBAR_LEFT_UP (wxTaskBarIcon::_OnLButtonUp) @@ -81,11 +73,11 @@ class wxTaskBarIconWindow : public wxFrame { public: wxTaskBarIconWindow(wxTaskBarIcon *icon) - : wxFrame(NULL, -1, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0), + : wxFrame(NULL, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0), m_icon(icon) { } - + WXLRESULT MSWWindowProc(WXUINT msg, WXWPARAM wParam, WXLPARAM lParam) { @@ -103,7 +95,7 @@ private: wxTaskBarIcon *m_icon; }; - + // ---------------------------------------------------------------------------- // NotifyIconData: wrapper around NOTIFYICONDATA // ---------------------------------------------------------------------------- @@ -147,8 +139,8 @@ wxTaskBarIcon::~wxTaskBarIcon() // Operations bool wxTaskBarIcon::SetIcon(const wxIcon& icon, const wxString& tooltip) { - // NB: we have to create the window lazily because of backward compatiblity, - // old aplications may create wxTaskBarIcon instance before wxApp + // NB: we have to create the window lazily because of backward compatibility, + // old applications may create a wxTaskBarIcon instance before wxApp // is initialized (as samples/taskbar used to do) if (!m_win) { @@ -209,7 +201,7 @@ bool wxTaskBarIcon::PopupMenu(wxMenu *menu) wxGetMousePosition(&x, &y); m_win->Move(x, y); - + m_win->PushEventHandler(this); menu->UpdateUI(); @@ -231,13 +223,13 @@ bool wxTaskBarIcon::PopupMenu(wxMenu *menu) #if WXWIN_COMPATIBILITY_2_4 // Overridables -void wxTaskBarIcon::OnMouseMove(wxEvent&) {} -void wxTaskBarIcon::OnLButtonDown(wxEvent&) {} -void wxTaskBarIcon::OnLButtonUp(wxEvent&) {} -void wxTaskBarIcon::OnRButtonDown(wxEvent&) {} -void wxTaskBarIcon::OnRButtonUp(wxEvent&) {} -void wxTaskBarIcon::OnLButtonDClick(wxEvent&) {} -void wxTaskBarIcon::OnRButtonDClick(wxEvent&) {} +void wxTaskBarIcon::OnMouseMove(wxEvent& e) { e.Skip(); } +void wxTaskBarIcon::OnLButtonDown(wxEvent& e) { e.Skip(); } +void wxTaskBarIcon::OnLButtonUp(wxEvent& e) { e.Skip(); } +void wxTaskBarIcon::OnRButtonDown(wxEvent& e) { e.Skip(); } +void wxTaskBarIcon::OnRButtonUp(wxEvent& e) { e.Skip(); } +void wxTaskBarIcon::OnLButtonDClick(wxEvent& e) { e.Skip(); } +void wxTaskBarIcon::OnRButtonDClick(wxEvent& e) { e.Skip(); } void wxTaskBarIcon::_OnMouseMove(wxTaskBarIconEvent& e) { OnMouseMove(e); } @@ -260,7 +252,7 @@ void wxTaskBarIcon::RegisterWindowMessages() static bool s_registered = false; if ( !s_registered ) - { + { // Taskbar restart msg will be sent to us if the icon needs to be redrawn gs_msgRestartTaskbar = RegisterWindowMessage(wxT("TaskbarCreated"));