X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/7dafb55fdec4ef71567ee1ccbf16d4461df8198f..0966d1fe2639772efab156387f95f63ce766bf17:/src/cocoa/toolbar.mm diff --git a/src/cocoa/toolbar.mm b/src/cocoa/toolbar.mm index 03b84d6b63..94407fff8e 100644 --- a/src/cocoa/toolbar.mm +++ b/src/cocoa/toolbar.mm @@ -71,9 +71,9 @@ protected: - (void)wxNSActionCellAction: (id)sender { - wxLogDebug("wxNSActionCellAction"); + wxLogTrace(wxTRACE_COCOA,wxT("wxNSActionCellAction")); wxCocoaNSActionCell *wxcontrol = wxCocoaNSActionCell::GetFromCocoa(sender); - wxCHECK_RET(wxcontrol,"wxNSActionCellAction received but no wxCocoaNSActionCell exists!"); + wxCHECK_RET(wxcontrol,wxT("wxNSActionCellAction received but no wxCocoaNSActionCell exists!")); wxcontrol->CocoaTarget_wxNSActionCellAction(); } @@ -147,6 +147,8 @@ wxToolBarTool::~wxToolBarTool() bool wxToolBarTool::CreateButtonCell() { + wxAutoNSAutoreleasePool pool; + NSImage *nsimage = [m_bmpNormal.GetNSImage(true) retain]; m_cocoaNSButtonCell = [[NSButtonCell alloc] initTextCell:nil]; [m_cocoaNSButtonCell setImage:nsimage]; @@ -205,6 +207,7 @@ IMPLEMENT_DYNAMIC_CLASS(wxToolBar, wxControl) void wxToolBar::Init() { m_owningFrame = NULL; + m_mouseDownTool = NULL; } wxToolBar::~wxToolBar() @@ -294,7 +297,7 @@ bool wxToolBar::Cocoa_mouseDragged(WX_NSEvent theEvent) untilMouseUp:NO]) { m_mouseDownTool = NULL; - wxLogDebug("Button was clicked after drag!"); + wxLogTrace(wxTRACE_COCOA,wxT("Button was clicked after drag!")); } [buttonCell setHighlighted: NO]; } @@ -317,7 +320,7 @@ bool wxToolBar::Cocoa_mouseDown(WX_NSEvent theEvent) untilMouseUp:NO]) { m_mouseDownTool = NULL; - wxLogDebug("Button was clicked!"); + wxLogTrace(wxTRACE_COCOA,wxT("Button was clicked!")); } [buttonCell setHighlighted: NO]; } @@ -327,6 +330,8 @@ bool wxToolBar::Cocoa_mouseDown(WX_NSEvent theEvent) bool wxToolBar::Realize() { + wxAutoNSAutoreleasePool pool; + wxToolBarToolsList::compatibility_iterator node; NSSize totalSize = NSZeroSize; // This is for horizontal, TODO: vertical