]> git.saurik.com Git - wxWidgets.git/blobdiff - src/unix/taskbarx11.cpp
native apple event support for osx cocoa
[wxWidgets.git] / src / unix / taskbarx11.cpp
index 55e11e8bdfb5c23cf308e97a2caf406da3aedc4a..d1dfc5e746e42ac97fb649e464542202139d6b13 100644 (file)
@@ -66,7 +66,7 @@
                       wxDEFAULT_FRAME_STYLE | wxFRAME_NO_TASKBAR |
                       wxSIMPLE_BORDER | wxFRAME_SHAPED) {}
 
-        bool IsProtocolSupported() const { return false; }
+        static bool IsProtocolSupported() { return false; }
     };
 #endif
 
@@ -250,6 +250,15 @@ void wxTaskBarIconArea::OnMenuEvent(wxCommandEvent& event)
     m_icon->ProcessEvent(event);
 }
 
+// ----------------------------------------------------------------------------
+// wxTaskBarIconBase class:
+// ----------------------------------------------------------------------------
+
+bool wxTaskBarIconBase::IsAvailable()
+{
+    return wxTaskBarIconArea::IsProtocolSupported();
+}
+
 // ----------------------------------------------------------------------------
 // wxTaskBarIcon class:
 // ----------------------------------------------------------------------------
@@ -263,7 +272,11 @@ wxTaskBarIcon::wxTaskBarIcon() : m_iconWnd(NULL)
 wxTaskBarIcon::~wxTaskBarIcon()
 {
     if (m_iconWnd)
+    {
+        m_iconWnd->Disconnect(
+            wxEVT_DESTROY, wxObjectEventFunction(NULL), NULL, this);
         RemoveIcon();
+    }
 }
 
 bool wxTaskBarIcon::IsOk() const