]> git.saurik.com Git - wxWidgets.git/blobdiff - src/mac/carbon/taskbar.cpp
RTTI and exceptions settings for WinCE are restored.
[wxWidgets.git] / src / mac / carbon / taskbar.cpp
index a38447a3e44367b48122c8a9553e1bf9a7dd6f71..a37330054691de5caf9b4a58decd2ed45587bd17 100644 (file)
@@ -143,6 +143,8 @@ wxTaskBarIcon::wxTaskBarIcon(const wxTaskBarIconType& nType)
             this, (&(EventHandlerRef&)m_pEventHandlerRef));
             
     wxASSERT(err == noErr);
+    
+    Connect(wxEVT_TASKBAR_RIGHT_DOWN, wxTaskBarIconEventHandler(wxTaskBarIcon::OnRightDown));
 }
 
 wxTaskBarIcon::~wxTaskBarIcon()
@@ -181,7 +183,7 @@ bool wxTaskBarIcon::SetIcon(const wxIcon& icon, const wxString& tooltip)
 
     CGImageRef pImage;
     
-#if wxMAC_USE_CORE_GRAPHICS        
+#if 0 // is always available under OSX now -- crashes on 10.2 in CFRetain() - RN
     pImage = (CGImageRef) bmp.CGImageCreate() ;
 #else
     WXHBITMAP iconport ;
@@ -279,7 +281,7 @@ bool wxTaskBarIcon::PopupMenu(wxMenu *menu)
                                         theItem->GetId(), //id
                                         theItem->GetText(), //text label
                                         theItem->GetHelp(), //status bar help string
-                                        theItem->GetKind(), //menu flags - checkable, seperator, etc.
+                                        theItem->GetKind(), //menu flags - checkable, separator, etc.
                                         theItem->GetSubMenu() //submenu
                                         ));
         theNode = theNode->GetNext();
@@ -289,4 +291,10 @@ bool wxTaskBarIcon::PopupMenu(wxMenu *menu)
     return true;
 }
 
+//Skip the event so that popupmenu isn't called in parent, avoiding double-creation of the menus
+void wxTaskBarIcon::OnRightDown(wxTaskBarIconEvent& evt)
+{
+    evt.Skip();
+}
+
 #endif //wxHAS_TASK_BAR_ICON