]> git.saurik.com Git - wxWidgets.git/commitdiff
Use wxLogTrace instead of wxLogDebug for trace messages
authorDavid Elliott <dfe@tgwbd.org>
Sun, 8 Feb 2004 07:07:04 +0000 (07:07 +0000)
committerDavid Elliott <dfe@tgwbd.org>
Sun, 8 Feb 2004 07:07:04 +0000 (07:07 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@25599 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

23 files changed:
src/cocoa/NSControl.mm
src/cocoa/NSWindow.mm
src/cocoa/app.mm
src/cocoa/bitmap.mm
src/cocoa/bmpbuttn.mm
src/cocoa/button.mm
src/cocoa/checkbox.mm
src/cocoa/choice.mm
src/cocoa/control.mm
src/cocoa/dc.mm
src/cocoa/dcclient.mm
src/cocoa/dcmemory.mm
src/cocoa/dialog.mm
src/cocoa/evtloop.mm
src/cocoa/frame.mm
src/cocoa/mbarman.mm
src/cocoa/mdi.mm
src/cocoa/menu.mm
src/cocoa/menuitem.mm
src/cocoa/radiobut.mm
src/cocoa/toolbar.mm
src/cocoa/toplevel.mm
src/cocoa/window.mm

index 2f601e3b6b5e228b01569afc6a57cbea0b9b1b3a..39981e4dbda41613fcbc2526b6a33b62a82eec1d 100644 (file)
@@ -40,7 +40,7 @@
 
 - (void)wxNSControlAction: (id)sender
 {
-    wxLogDebug(wxT("wxNSControlAction"));
+    wxLogTrace(wxTRACE_COCOA,wxT("wxNSControlAction"));
     wxCocoaNSControl *wxcontrol = wxCocoaNSControl::GetFromCocoa(sender);
     wxCHECK_RET(wxcontrol,wxT("wxNSControlAction received but no wxCocoaNSControl exists!"));
     wxcontrol->CocoaTarget_action();
index ca5960caf0c4fadb333351539679792731ac80b0..7032045d68c51b3a3ff0513600624fb5a35865c8 100644 (file)
 
 - (BOOL)windowShouldClose: (id)sender
 {
-    wxLogDebug(wxT("windowShouldClose"));
+    wxLogTrace(wxTRACE_COCOA,wxT("windowShouldClose"));
     wxCocoaNSWindow *tlw = wxCocoaNSWindow::GetFromCocoa(sender);
     if(tlw && !tlw->CocoaDelegate_windowShouldClose())
     {
-        wxLogDebug(wxT("Window will not be closed"));
+        wxLogTrace(wxTRACE_COCOA,wxT("Window will not be closed"));
         return NO;
     }
-    wxLogDebug(wxT("Window will be closed"));
+    wxLogTrace(wxTRACE_COCOA,wxT("Window will be closed"));
     return YES;
 }
 
index 909b71fe4fd43317334c61e80cc5b731c19d1939..3fcbd3b162f54a47545802463fcb4255efdec7e1 100644 (file)
@@ -89,7 +89,7 @@ WX_IMPLEMENT_POSER(wxPoserNSApplication);
         && ([NSDefaultRunLoopMode isEqualToString:mode] || [NSModalPanelRunLoopMode isEqualToString:mode]))
     {
         sg_needIdle = false;
-        wxLogDebug(wxT("Processing idle events"));
+        wxLogTrace(wxTRACE_COCOA,wxT("Processing idle events"));
         while(wxTheApp->ProcessIdle())
         {
             // Get the same events except don't block
@@ -98,19 +98,19 @@ WX_IMPLEMENT_POSER(wxPoserNSApplication);
             if(event)
                 return event;
             // we didn't get one, do some idle work
-            wxLogDebug(wxT("Looping idle events"));
+            wxLogTrace(wxTRACE_COCOA,wxT("Looping idle events"));
         }
         // No more idle work requested, block
-        wxLogDebug(wxT("Finished idle processing"));
+        wxLogTrace(wxTRACE_COCOA,wxT("Finished idle processing"));
     }
     else
-        wxLogDebug(wxT("Avoiding idle processing sg_needIdle=%d"),sg_needIdle);
+        wxLogTrace(wxTRACE_COCOA,wxT("Avoiding idle processing sg_needIdle=%d"),sg_needIdle);
     return [super nextEventMatchingMask:mask untilDate:expiration inMode:mode dequeue:flag];
 }
 
 - (void)sendEvent: (NSEvent*)anEvent
 {
-    wxLogDebug(wxT("SendEvent"));
+    wxLogTrace(wxTRACE_COCOA,wxT("SendEvent"));
     sg_needIdle = true;
     [super sendEvent: anEvent];
 }
index bb7302cf8e9d685a836b8e6275bed365a9279c5c..2b13a11ef6d1588c6b3e5fea01f59cb7d8f39cc8 100644 (file)
@@ -296,7 +296,7 @@ bool wxBitmap::Create(int w, int h, int d)
             bytesPerRow: 0
             bitsPerPixel: 0];
 
-    wxLogDebug(wxT("M_BITMAPDATA=%p NSBitmapImageRep bitmapData=%p"), M_BITMAPDATA, [M_BITMAPDATA->m_cocoaNSBitmapImageRep bitmapData]);
+    wxLogTrace(wxTRACE_COCOA,wxT("M_BITMAPDATA=%p NSBitmapImageRep bitmapData=%p"), M_BITMAPDATA, [M_BITMAPDATA->m_cocoaNSBitmapImageRep bitmapData]);
     M_BITMAPDATA->m_ok = true;
     M_BITMAPDATA->m_numColors = 0;
     M_BITMAPDATA->m_quality = 0;
index 7933e5dffa9ecc426e85d2bc5fdb4ca92abbc5f1..50da8d7cdcac74332055904b1c94ea95a37173a5 100644 (file)
@@ -32,10 +32,10 @@ bool wxBitmapButton::Create(wxWindow *parent, wxWindowID winid,
             const wxValidator& validator, const wxString& name)
 {
     wxAutoNSAutoreleasePool pool;
-    wxLogDebug(wxT("Creating control with id=%d"),winid);
+    wxLogTrace(wxTRACE_COCOA,wxT("Creating control with id=%d"),winid);
     if(!CreateControl(parent,winid,pos,size,style,validator,name))
         return false;
-    wxLogDebug(wxT("Created control with id=%d"),GetId());
+    wxLogTrace(wxTRACE_COCOA,wxT("Created control with id=%d"),GetId());
     m_cocoaNSView = NULL;
     SetNSButton([[NSButton alloc] initWithFrame: MakeDefaultNSRect(size)]);
     // NOTE: YES we want to release this (to match the alloc).
@@ -60,7 +60,7 @@ wxBitmapButton::~wxBitmapButton()
 
 void wxBitmapButton::Cocoa_wxNSButtonAction(void)
 {
-    wxLogDebug(wxT("YAY!"));
+    wxLogTrace(wxTRACE_COCOA,wxT("YAY!"));
     wxCommandEvent event(wxEVT_COMMAND_BUTTON_CLICKED, GetId());
     InitCommandEvent(event); //    event.SetEventObject(this);
     Command(event);
index f9d006b3a72232f41f5bf565a172441736645c99..6e7603190b036c6043c1cbd10e76e0cc02333045 100644 (file)
@@ -32,10 +32,10 @@ bool wxButton::Create(wxWindow *parent, wxWindowID winid,
             const wxValidator& validator, const wxString& name)
 {
     wxAutoNSAutoreleasePool pool;
-    wxLogDebug(wxT("Creating control with id=%d"),winid);
+    wxLogTrace(wxTRACE_COCOA,wxT("Creating control with id=%d"),winid);
     if(!CreateControl(parent,winid,pos,size,style,validator,name))
         return false;
-    wxLogDebug(wxT("Created control with id=%d"),GetId());
+    wxLogTrace(wxTRACE_COCOA,wxT("Created control with id=%d"),GetId());
     m_cocoaNSView = NULL;
     SetNSButton([[NSButton alloc] initWithFrame: MakeDefaultNSRect(size)]);
     // NOTE: YES we want to release this (to match the alloc).
@@ -60,7 +60,7 @@ wxButton::~wxButton()
 
 void wxButton::Cocoa_wxNSButtonAction(void)
 {
-    wxLogDebug(wxT("YAY!"));
+    wxLogTrace(wxTRACE_COCOA,wxT("YAY!"));
     wxCommandEvent event(wxEVT_COMMAND_BUTTON_CLICKED, GetId());
     InitCommandEvent(event); //    event.SetEventObject(this);
     Command(event);
index 659025be55798e1683bdf8c1ce00dae1bb14c887..7b96b3ca0fd9305b032c0a80e417414bb9ec5238 100644 (file)
@@ -113,7 +113,7 @@ wxCheckBoxState wxCheckBox::DoGet3StateValue() const
 
 void wxCheckBox::Cocoa_wxNSButtonAction(void)
 {
-    wxLogDebug(wxT("Checkbox"));
+    wxLogTrace(wxTRACE_COCOA,wxT("Checkbox"));
     // What we really want to do is override [NSCell -nextState] to return
     // NSOnState in lieu of NSMixedState but this works (aside from the
     // very slightly noticeable drawing of - and then a check) -DE
index 91ca7a94b93a7eda3c144ad3841093b660cf9016..578cbec40c3aa13640b9fbe6ee618db2c84c575a 100644 (file)
@@ -122,7 +122,7 @@ void wxChoice::CocoaNotification_menuDidSendAction(WX_NSNotification notificatio
     NSMenuItem *menuitem = [userInfo objectForKey:@"MenuItem"];
     int index = [[(NSPopUpButton*)m_cocoaNSView menu] indexOfItem: menuitem];
     int selectedItem = [(NSPopUpButton*)m_cocoaNSView indexOfSelectedItem];
-    wxLogDebug(wxT("menuDidSendAction, index=%d, selectedItem=%d"), index, selectedItem);
+    wxLogTrace(wxTRACE_COCOA,wxT("menuDidSendAction, index=%d, selectedItem=%d"), index, selectedItem);
     wxCommandEvent event(wxEVT_COMMAND_CHOICE_SELECTED, m_windowId);
     event.SetInt(index);
     event.SetEventObject(this);
index c8215a75f50cbfcabf55ff9cc189b23bcd49a12c..d43d8a11127a5967ecae17a8a5d6208e2bf2157d 100644 (file)
@@ -45,10 +45,10 @@ bool wxControl::Create(wxWindow *parent, wxWindowID winid,
             const wxPoint& pos, const wxSize& size, long style,
             const wxValidator& validator, const wxString& name)
 {
-    wxLogDebug(wxT("Creating control with id=%d"),winid);
+    wxLogTrace(wxTRACE_COCOA,wxT("Creating control with id=%d"),winid);
     if(!CreateControl(parent,winid,pos,size,style,validator,name))
         return false;
-    wxLogDebug(wxT("Created control with id=%d"),GetId());
+    wxLogTrace(wxTRACE_COCOA,wxT("Created control with id=%d"),GetId());
     m_cocoaNSView = NULL;
     SetNSControl([[wxNonControlNSControl alloc] initWithFrame: MakeDefaultNSRect(size)]);
     // NOTE: YES we want to release this (to match the alloc).
@@ -78,7 +78,7 @@ wxSize wxControl::DoGetBestSize() const
     NSRect cocoaRect = [m_cocoaNSView frame];
     wxSize size((int)cocoaRect.size.width+10,(int)cocoaRect.size.height);
     [m_cocoaNSView setFrame: storedRect];
-    wxLogDebug(wxT("wxControl=%p::DoGetBestSize()==(%d,%d)"),this,size.x,size.y);
+    wxLogTrace(wxTRACE_COCOA_Window_Size,wxT("wxControl=%p::DoGetBestSize()==(%d,%d)"),this,size.x,size.y);
     return size;
 }
 
index 660658dadc06c76c6a31078b2e394fbf3dfcfd99..3a0e7c3657ba2697880805b198a6453eed4ab387 100644 (file)
@@ -275,7 +275,7 @@ void wxDC::DoDrawText(const wxString& text, wxCoord x, wxCoord y)
     [flipTransform concat];
     #if 0
     // Draw+fill a rectangle so we can see where the shit is supposed to be.
-    wxLogDebug(wxT("(%f,%f) (%fx%f)"),usedRect.origin.x,usedRect.origin.y,usedRect.size.width,usedRect.size.height);
+    wxLogTrace(wxTRACE_COCOA,wxT("(%f,%f) (%fx%f)"),usedRect.origin.x,usedRect.origin.y,usedRect.size.width,usedRect.size.height);
     NSBezierPath *bezpath = [NSBezierPath bezierPathWithRect:NSMakeRect(0,0,usedRect.size.width,usedRect.size.height)];
     [[NSColor blackColor] set];
     [bezpath stroke];
@@ -455,7 +455,7 @@ void wxDC::DoDrawBitmap(const wxBitmap &bmp, wxCoord x, wxCoord y, bool useMask)
 
 #if 0
     // Draw a rect so we can see where it's supposed to be
-    wxLogDebug(wxT("image at (%d,%d) size %dx%d"),x,y,bmp.GetWidth(),bmp.GetHeight());
+    wxLogTrace(wxTRACE_COCOA,wxT("image at (%d,%d) size %dx%d"),x,y,bmp.GetWidth(),bmp.GetHeight());
     NSBezierPath *bezpath = [NSBezierPath bezierPathWithRect:NSMakeRect(x,y,bmp.GetWidth(),bmp.GetHeight())];
     [[NSColor blackColor] set];
     [bezpath stroke];
index 56c9b7f7c184f43c9ab0de420935ca538d89e9ca..2f2f8ddf59a053efed8285d05ade0260b2d5dda0 100644 (file)
@@ -71,13 +71,13 @@ bool wxWindowDC::CocoaUnlockFocusOnNSView()
 
 bool wxWindowDC::CocoaLockFocus()
 {
-    wxLogDebug(wxT("Locking focus on wxWindowDC=%p, NSView=%p"),this, m_window->GetNonClientNSView());
+    wxLogTrace(wxTRACE_COCOA,wxT("Locking focus on wxWindowDC=%p, NSView=%p"),this, m_window->GetNonClientNSView());
     return CocoaLockFocusOnNSView(m_window->GetNonClientNSView());
 }
 
 bool wxWindowDC::CocoaUnlockFocus()
 {
-    wxLogDebug(wxT("Unlocking focus on wxWindowDC=%p, NSView=%p"),this, m_window->GetNonClientNSView());
+    wxLogTrace(wxTRACE_COCOA,wxT("Unlocking focus on wxWindowDC=%p, NSView=%p"),this, m_window->GetNonClientNSView());
     return CocoaUnlockFocusOnNSView();
 }
 
@@ -115,13 +115,13 @@ wxClientDC::~wxClientDC(void)
 
 bool wxClientDC::CocoaLockFocus()
 {
-    wxLogDebug(wxT("Locking focus on wxClientDC=%p, NSView=%p"),this, m_window->GetNSView());
+    wxLogTrace(wxTRACE_COCOA,wxT("Locking focus on wxClientDC=%p, NSView=%p"),this, m_window->GetNSView());
     return CocoaLockFocusOnNSView(m_window->GetNSView());
 }
 
 bool wxClientDC::CocoaUnlockFocus()
 {
-    wxLogDebug(wxT("Unlocking focus on wxClientDC=%p, NSView=%p"),this, m_window->GetNSView());
+    wxLogTrace(wxTRACE_COCOA,wxT("Unlocking focus on wxClientDC=%p, NSView=%p"),this, m_window->GetNSView());
     return CocoaUnlockFocusOnNSView();
 }
 
index 3e8d16339cd3224ecee54e3cbede9bae7c16be93..dc526fba9c8d8702efbb43cbfea5a3a561ad01dd 100644 (file)
@@ -135,7 +135,7 @@ bool wxMemoryDC::CocoaDoBlitOnFocusedDC(wxCoord xdest, wxCoord ydest,
     [transform concat];
     [flipTransform concat];
 
-    wxLogDebug(wxT("[m_cocoaNSImage isFlipped]=%d"), [m_cocoaNSImage isFlipped]);
+    wxLogTrace(wxTRACE_COCOA,wxT("[m_cocoaNSImage isFlipped]=%d"), [m_cocoaNSImage isFlipped]);
     [m_cocoaNSImage drawAtPoint: NSMakePoint(0,0)
         fromRect: NSMakeRect(xsrc,
             m_selectedBitmap.GetHeight()-height-ysrc,
index 4a13a49a957cff55426deeafbe34e386845e75d4..d490c8edc58daee2285f6b59a1568492f5879834 100644 (file)
@@ -75,7 +75,7 @@ bool wxDialog::Create(wxWindow *parent, wxWindowID winid,
     // Because we do not release on close, the following release matches the
     // above alloc and thus the retain count will be 1.
     [m_cocoaNSWindow release];
-    wxLogDebug(wxT("wxDialog m_cocoaNSWindow retainCount=%d"),[m_cocoaNSWindow retainCount]);
+    wxLogTrace(wxTRACE_COCOA_RetainRelease,wxT("wxDialog m_cocoaNSWindow retainCount=%d"),[m_cocoaNSWindow retainCount]);
     [m_cocoaNSWindow setTitle:wxNSStringWithWxString(title)];
     [m_cocoaNSWindow setHidesOnDeactivate:NO];
 
@@ -84,7 +84,7 @@ bool wxDialog::Create(wxWindow *parent, wxWindowID winid,
 
 wxDialog::~wxDialog()
 {
-    wxLogDebug(wxT("Destroying"));
+    wxLogTrace(wxTRACE_COCOA,wxT("Destroying"));
     // setReleasedWhenClosed: NO
     [m_cocoaNSWindow close];
     DisassociateNSPanel(GetNSPanel());
@@ -94,7 +94,7 @@ void wxDialog::CocoaDelegate_windowWillClose(void)
 {
     m_closed = true;
     /* Actually, this isn't true anymore */
-    wxLogDebug(wxT("Woah: Dialogs are not generally closed"));
+    wxLogTrace(wxTRACE_COCOA,wxT("Woah: Dialogs are not generally closed"));
 }
 
 void wxDialog::SetModal(bool flag)
@@ -124,7 +124,7 @@ bool wxDialog::Show(bool show)
         {
             wxAutoNSAutoreleasePool pool;
             wxModalDialogs.Append(this);
-            wxLogDebug(wxT("runModal"));
+            wxLogTrace(wxTRACE_COCOA,wxT("runModal"));
             NSApplication *theNSApp = wxTheApp->GetNSApplication();
             // If the app hasn't started, flush the event queue
             // If we don't do this, the Dock doesn't get the message that
@@ -141,11 +141,11 @@ bool wxDialog::Show(bool show)
                 }
             }
             [wxTheApp->GetNSApplication() runModalForWindow:m_cocoaNSWindow];
-            wxLogDebug(wxT("runModal END"));
+            wxLogTrace(wxTRACE_COCOA,wxT("runModal END"));
         }
         else
         {
-            wxLogDebug(wxT("abortModal"));
+            wxLogTrace(wxTRACE_COCOA,wxT("abortModal"));
             [wxTheApp->GetNSApplication() abortModal];
             wxModalDialogs.DeleteObject(this);
         }
@@ -204,7 +204,7 @@ void wxDialog::OnCloseWindow(wxCloseEvent& event)
     
     closing.Append(this);
     
-    wxLogDebug(wxT("Sending Cancel Event"));
+    wxLogTrace(wxTRACE_COCOA,wxT("Sending Cancel Event"));
     wxCommandEvent cancelEvent(wxEVT_COMMAND_BUTTON_CLICKED, wxID_CANCEL);
     cancelEvent.SetEventObject( this );
     GetEventHandler()->ProcessEvent(cancelEvent); // This may close the dialog
@@ -230,7 +230,7 @@ void wxDialog::OnApply(wxCommandEvent& event)
 
 void wxDialog::OnCancel(wxCommandEvent& event)
 {
-    wxLogDebug(wxT("Cancelled!"));
+    wxLogTrace(wxTRACE_COCOA,wxT("Cancelled!"));
     EndModal(wxID_CANCEL);
 }
 
index 00e19abb629d5a1e9f2c77203e0d2bd5efe9053d..32f9ccbfa13bc4c8a897e9386a6e2a2aaeab7e54 100644 (file)
@@ -88,7 +88,7 @@ void wxEventLoop::Exit(int rc)
     m_impl->SetExitCode(rc);
 
     NSApplication *cocoaApp = [NSApplication sharedApplication];
-    wxLogDebug(wxT("wxEventLoop::Exit isRunning=%d"), (int)[cocoaApp isRunning]);
+    wxLogTrace(wxTRACE_COCOA,wxT("wxEventLoop::Exit isRunning=%d"), (int)[cocoaApp isRunning]);
     wxTheApp->WakeUpIdle();
     /* Notes:
     If we're being called from idle time (which occurs while checking the
index ca12e36e2932fbf22bf794372aa52b36e41f6ab2..7ed2c50c8f809595dc1427bef11a855eeb28caad 100644 (file)
@@ -165,7 +165,7 @@ void wxFrame::UpdateFrameNSView()
         [sbarNSView setAutoresizingMask: NSViewWidthSizable|NSViewMaxYMargin];
         sbarheight = sbarRect.size.height;
     }
-    wxLogDebug(wxT("frame height=%f, tbar=%f, sbar=%f"),frameRect.size.height,tbarheight,sbarheight);
+    wxLogTrace(wxTRACE_COCOA,wxT("frame height=%f, tbar=%f, sbar=%f"),frameRect.size.height,tbarheight,sbarheight);
     NSRect innerRect = [m_cocoaNSView frame];
     innerRect.size.height = frameRect.size.height - tbarheight - sbarheight;
     innerRect.origin.y = sbarheight;
index 0935ec6e97a7a7df004439dbbbbc8c0a042b73f6..77fea84ec692bc105817d0b8441596b440d5c5e8 100644 (file)
@@ -273,7 +273,7 @@ void wxMenuBarManager::InstallMenuBarForWindow(wxCocoaNSWindow *win)
     wxASSERT(win);
     m_windowCurrent = win;
     wxMenuBar *menubar = win->GetAppMenuBar(win);
-    wxLogDebug(wxT("Found menubar=%p for window=%p."),menubar,win);
+    wxLogTrace(wxTRACE_COCOA,wxT("Found menubar=%p for window=%p."),menubar,win);
     SetMenuBar(menubar);
 }
 
index 7a3f68a8f1e4ba09128fa0a5e89d363b8418157b..fdac990686ca5cf50f77ba2a8eb1a26f4e6021f2 100644 (file)
@@ -158,7 +158,7 @@ wxMenuBar *wxMDIParentFrame::GetAppMenuBar(wxCocoaNSWindow *win)
 
 void wxMDIParentFrame::CocoaDelegate_windowDidBecomeKey(void)
 {
-    wxLogDebug(wxT("wxMDIParentFrame=%p::CocoaDelegate_windowDidBecomeKey"),this);
+    wxLogTrace(wxTRACE_COCOA,wxT("wxMDIParentFrame=%p::CocoaDelegate_windowDidBecomeKey"),this);
     if(sm_cocoaDeactivateWindow && sm_cocoaDeactivateWindow==m_currentChild)
     {
         sm_cocoaDeactivateWindow = NULL;
@@ -183,7 +183,7 @@ void wxMDIParentFrame::CocoaDelegate_windowDidBecomeKey(void)
 
 void wxMDIParentFrame::CocoaDelegate_windowDidResignKey(void)
 {
-    wxLogDebug(wxT("wxMDIParentFrame=%p::CocoaDelegate_windowDidResignKey"),this);
+    wxLogTrace(wxTRACE_COCOA,wxT("wxMDIParentFrame=%p::CocoaDelegate_windowDidResignKey"),this);
     if(m_closed)
         wxFrame::CocoaDelegate_windowDidResignKey();
     else
@@ -280,7 +280,7 @@ void wxMDIChildFrame::Activate()
 
 void wxMDIChildFrame::CocoaDelegate_windowDidBecomeKey(void)
 {
-    wxLogDebug(wxT("wxMDIChildFrame=%p::CocoaDelegate_windowDidBecomeKey"),this);
+    wxLogTrace(wxTRACE_COCOA,wxT("wxMDIChildFrame=%p::CocoaDelegate_windowDidBecomeKey"),this);
     if(sm_cocoaDeactivateWindow && sm_cocoaDeactivateWindow==m_mdiParent)
     {
         sm_cocoaDeactivateWindow = NULL;
@@ -299,7 +299,7 @@ void wxMDIChildFrame::CocoaDelegate_windowDidBecomeMain(void)
 
 void wxMDIChildFrame::CocoaDelegate_windowDidResignKey(void)
 {
-    wxLogDebug(wxT("wxMDIChildFrame=%p::CocoaDelegate_windowDidResignKey"),this);
+    wxLogTrace(wxTRACE_COCOA,wxT("wxMDIChildFrame=%p::CocoaDelegate_windowDidResignKey"),this);
     sm_cocoaDeactivateWindow = this;
 }
 
index d8ed61c0a7037cfa2e809129c1e0cd4299ce406b..2d662e4111e0b52a2a3e0751ddf2388defb6dd29 100644 (file)
@@ -106,7 +106,7 @@ wxMenuBar::~wxMenuBar()
 bool wxMenuBar::Append( wxMenu *menu, const wxString &title )
 {
     wxAutoNSAutoreleasePool pool;
-    wxLogDebug(wxT("append menu=%p, title=%s"),menu,title.c_str());
+    wxLogTrace(wxTRACE_COCOA,wxT("append menu=%p, title=%s"),menu,title.c_str());
     if(!wxMenuBarBase::Append(menu,title))
         return false;
     wxASSERT(menu);
@@ -126,7 +126,7 @@ bool wxMenuBar::Append( wxMenu *menu, const wxString &title )
 bool wxMenuBar::Insert(size_t pos, wxMenu *menu, const wxString& title)
 {
     wxAutoNSAutoreleasePool pool;
-    wxLogDebug(wxT("insert pos=%lu, menu=%p, title=%s"),pos,menu,title.c_str());
+    wxLogTrace(wxTRACE_COCOA,wxT("insert pos=%lu, menu=%p, title=%s"),pos,menu,title.c_str());
     // Get the current menu at this position
     wxMenu *nextmenu = GetMenu(pos);
     if(!wxMenuBarBase::Insert(pos,menu,title))
index a8795fe0534e70e311e328132009967fb9d203da..fdc0620a3e7d1ee6e412cb268a97617952d6c3f8 100644 (file)
@@ -55,7 +55,7 @@
 
 - (void)wxMenuItemAction: (id)sender
 {
-    wxLogDebug(wxT("wxMenuItemAction"));
+    wxLogTrace(wxTRACE_COCOA,wxT("wxMenuItemAction"));
     wxMenuItem *item = wxMenuItem::GetFromCocoa(sender);
     wxCHECK_RET(item,wxT("wxMenuItemAction received but no wxMenuItem exists!"));
 
@@ -73,7 +73,7 @@
 - (BOOL)validateMenuItem: (id)menuItem
 {
     // TODO: Do wxWindows validation here and avoid sending during idle time
-    wxLogDebug(wxT("wxMenuItemAction"));
+    wxLogTrace(wxTRACE_COCOA,wxT("wxMenuItemAction"));
     wxMenuItem *item = wxMenuItem::GetFromCocoa(menuItem);
     wxCHECK_MSG(item,NO,wxT("validateMenuItem received but no wxMenuItem exists!"));
     return item->IsEnabled();
index 5ceef75f9911f50d33225404bd875d1496a90346..ab8197bd6001bc66af289b373108866af2aa07ad 100644 (file)
@@ -140,7 +140,7 @@ bool wxRadioButton::GetValue() const
 
 void wxRadioButton::Cocoa_wxNSButtonAction(void)
 {
-    wxLogDebug(wxT("wxRadioButton"));
+    wxLogTrace(wxTRACE_COCOA,wxT("wxRadioButton"));
     if(m_radioMaster && ([GetNSButton() state] == NSOnState))
     {
         for(wxRadioButtonList::compatibility_iterator slaveNode =
index 0f7e02c01dd37cb9ab8287c8eb34a8c8c5e7dc47..94407fff8e02913e77c3bbc5f2124ed1802d0411 100644 (file)
@@ -71,7 +71,7 @@ protected:
 
 - (void)wxNSActionCellAction: (id)sender
 {
-    wxLogDebug(wxT("wxNSActionCellAction"));
+    wxLogTrace(wxTRACE_COCOA,wxT("wxNSActionCellAction"));
     wxCocoaNSActionCell *wxcontrol = wxCocoaNSActionCell::GetFromCocoa(sender);
     wxCHECK_RET(wxcontrol,wxT("wxNSActionCellAction received but no wxCocoaNSActionCell exists!"));
     wxcontrol->CocoaTarget_wxNSActionCellAction();
@@ -297,7 +297,7 @@ bool wxToolBar::Cocoa_mouseDragged(WX_NSEvent theEvent)
                 untilMouseUp:NO])
             {
                 m_mouseDownTool = NULL;
-                wxLogDebug(wxT("Button was clicked after drag!"));
+                wxLogTrace(wxTRACE_COCOA,wxT("Button was clicked after drag!"));
             }
             [buttonCell setHighlighted: NO];
         }
@@ -320,7 +320,7 @@ bool wxToolBar::Cocoa_mouseDown(WX_NSEvent theEvent)
                 untilMouseUp:NO])
             {
                 m_mouseDownTool = NULL;
-                wxLogDebug(wxT("Button was clicked!"));
+                wxLogTrace(wxTRACE_COCOA,wxT("Button was clicked!"));
             }
             [buttonCell setHighlighted: NO];
         }
index 9bb32c828a466cb0eb497025a61b868cc845d378..9cdfa7a7835bbc7186307c8cfb50f13aa2a1af71 100644 (file)
@@ -168,7 +168,7 @@ wxMenuBar* wxTopLevelWindowCocoa::GetAppMenuBar(wxCocoaNSWindow *win)
 void wxTopLevelWindowCocoa::SetNSWindow(WX_NSWindow cocoaNSWindow)
 {
     bool need_debug = cocoaNSWindow || m_cocoaNSWindow;
-    if(need_debug) wxLogDebug(wxT("wxTopLevelWindowCocoa=%p::SetNSWindow [m_cocoaNSWindow=%p retainCount]=%d"),this,m_cocoaNSWindow,[m_cocoaNSWindow retainCount]);
+    if(need_debug) wxLogTrace(wxTRACE_COCOA_RetainRelease,wxT("wxTopLevelWindowCocoa=%p::SetNSWindow [m_cocoaNSWindow=%p retainCount]=%d"),this,m_cocoaNSWindow,[m_cocoaNSWindow retainCount]);
     DisassociateNSWindow(m_cocoaNSWindow);
     [cocoaNSWindow retain];
     [m_cocoaNSWindow release];
@@ -178,7 +178,7 @@ void wxTopLevelWindowCocoa::SetNSWindow(WX_NSWindow cocoaNSWindow)
     else
         SetNSView(NULL);
     AssociateNSWindow(m_cocoaNSWindow);
-    if(need_debug) wxLogDebug(wxT("wxTopLevelWindowCocoa=%p::SetNSWindow [cocoaNSWindow=%p retainCount]=%d"),this,cocoaNSWindow,[cocoaNSWindow retainCount]);
+    if(need_debug) wxLogTrace(wxTRACE_COCOA_RetainRelease,wxT("wxTopLevelWindowCocoa=%p::SetNSWindow [cocoaNSWindow=%p retainCount]=%d"),this,cocoaNSWindow,[cocoaNSWindow retainCount]);
 }
 
 void wxTopLevelWindowCocoa::CocoaReplaceView(WX_NSView oldView, WX_NSView newView)
@@ -197,7 +197,7 @@ void wxTopLevelWindowCocoa::CocoaReplaceView(WX_NSView oldView, WX_NSView newVie
 void wxTopLevelWindowCocoa::CocoaDelegate_windowDidBecomeKey(void)
 {
     DeactivatePendingWindow();
-    wxLogDebug(wxT("wxTopLevelWindowCocoa=%p::CocoaDelegate_windowDidBecomeKey"),this);
+    wxLogTrace(wxTRACE_COCOA,wxT("wxTopLevelWindowCocoa=%p::CocoaDelegate_windowDidBecomeKey"),this);
     wxActivateEvent event(wxEVT_ACTIVATE, TRUE, GetId());
     event.SetEventObject(this);
     GetEventHandler()->ProcessEvent(event);
@@ -205,7 +205,7 @@ void wxTopLevelWindowCocoa::CocoaDelegate_windowDidBecomeKey(void)
 
 void wxTopLevelWindowCocoa::CocoaDelegate_windowDidResignKey(void)
 {
-    wxLogDebug(wxT("wxTopLevelWindowCocoa=%p::CocoaDelegate_windowDidResignKey"),this);
+    wxLogTrace(wxTRACE_COCOA,wxT("wxTopLevelWindowCocoa=%p::CocoaDelegate_windowDidResignKey"),this);
     wxActivateEvent event(wxEVT_ACTIVATE, FALSE, GetId());
     event.SetEventObject(this);
     GetEventHandler()->ProcessEvent(event);
@@ -213,12 +213,12 @@ void wxTopLevelWindowCocoa::CocoaDelegate_windowDidResignKey(void)
 
 void wxTopLevelWindowCocoa::CocoaDelegate_windowDidBecomeMain(void)
 {
-    wxLogDebug(wxT("wxTopLevelWindowCocoa=%p::CocoaDelegate_windowDidBecomeMain"),this);
+    wxLogTrace(wxTRACE_COCOA,wxT("wxTopLevelWindowCocoa=%p::CocoaDelegate_windowDidBecomeMain"),this);
 }
 
 void wxTopLevelWindowCocoa::CocoaDelegate_windowDidResignMain(void)
 {
-    wxLogDebug(wxT("wxTopLevelWindowCocoa=%p::CocoaDelegate_windowDidResignMain"),this);
+    wxLogTrace(wxTRACE_COCOA,wxT("wxTopLevelWindowCocoa=%p::CocoaDelegate_windowDidResignMain"),this);
 }
 
 void wxTopLevelWindowCocoa::CocoaDelegate_windowWillClose(void)
@@ -336,7 +336,7 @@ void wxTopLevelWindowCocoa::CocoaSetWxWindowSize(int width, int height)
 
 void wxTopLevelWindowCocoa::DoMoveWindow(int x, int y, int width, int height)
 {
-//    wxLogDebug("wxTopLevelWindow=%p::DoMoveWindow(%d,%d,%d,%d)",this,x,y,width,height);
+    wxLogTrace(wxTRACE_COCOA_TopLevelWindow_Size,"wxTopLevelWindow=%p::DoMoveWindow(%d,%d,%d,%d)",this,x,y,width,height);
 
     NSRect cocoaRect = NSMakeRect(x,y,width,height);
     [m_cocoaNSWindow setFrame: cocoaRect display:NO];
@@ -349,7 +349,7 @@ void wxTopLevelWindowCocoa::DoGetSize(int *w, int *h) const
         *w=(int)cocoaRect.size.width;
     if(h)
         *h=(int)cocoaRect.size.height;
-//    wxLogDebug("wxTopLevelWindow=%p::DoGetSize = (%d,%d)",this,(int)cocoaRect.size.width,(int)cocoaRect.size.height);
+    wxLogTrace(wxTRACE_COCOA_TopLevelWindow_Size,"wxTopLevelWindow=%p::DoGetSize = (%d,%d)",this,(int)cocoaRect.size.width,(int)cocoaRect.size.height);
 }
 
 void wxTopLevelWindowCocoa::DoGetPosition(int *x, int *y) const
@@ -359,6 +359,6 @@ void wxTopLevelWindowCocoa::DoGetPosition(int *x, int *y) const
         *x=(int)cocoaRect.origin.x;
     if(y)
         *y=(int)cocoaRect.origin.y;
-//    wxLogDebug("wxTopLevelWindow=%p::DoGetPosition = (%d,%d)",this,(int)cocoaRect.origin.x,(int)cocoaRect.origin.y);
+    wxLogTrace(wxTRACE_COCOA_TopLevelWindow_Size,"wxTopLevelWindow=%p::DoGetPosition = (%d,%d)",this,(int)cocoaRect.origin.x,(int)cocoaRect.origin.y);
 }
 
index 7ae5fdf02ae8ef8e0f6359cd8935cd71648cccdc..2bcdeb8c73ee34229eb40ee4665f75414e53dd13 100644 (file)
@@ -216,7 +216,7 @@ void wxWindowCocoaScroller::DoGetClientSize(int *x, int *y) const
 
 void wxWindowCocoaScroller::Cocoa_FrameChanged(void)
 {
-    wxLogDebug(wxT("Cocoa_FrameChanged"));
+    wxLogTrace(wxTRACE_COCOA,wxT("Cocoa_FrameChanged"));
     wxSizeEvent event(m_owner->GetSize(), m_owner->GetId());
     event.SetEventObject(m_owner);
     m_owner->GetEventHandler()->ProcessEvent(event);
@@ -302,13 +302,13 @@ void wxWindowCocoa::CocoaRemoveFromParent(void)
 void wxWindowCocoa::SetNSView(WX_NSView cocoaNSView)
 {
     bool need_debug = cocoaNSView || m_cocoaNSView;
-    if(need_debug) wxLogDebug(wxT("wxWindowCocoa=%p::SetNSView [m_cocoaNSView=%p retainCount]=%d"),this,m_cocoaNSView,[m_cocoaNSView retainCount]);
+    if(need_debug) wxLogTrace(wxTRACE_COCOA_RetainRelease,wxT("wxWindowCocoa=%p::SetNSView [m_cocoaNSView=%p retainCount]=%d"),this,m_cocoaNSView,[m_cocoaNSView retainCount]);
     DisassociateNSView(m_cocoaNSView);
     [cocoaNSView retain];
     [m_cocoaNSView release];
     m_cocoaNSView = cocoaNSView;
     AssociateNSView(m_cocoaNSView);
-    if(need_debug) wxLogDebug(wxT("wxWindowCocoa=%p::SetNSView [cocoaNSView=%p retainCount]=%d"),this,cocoaNSView,[cocoaNSView retainCount]);
+    if(need_debug) wxLogTrace(wxTRACE_COCOA_RetainRelease,wxT("wxWindowCocoa=%p::SetNSView [cocoaNSView=%p retainCount]=%d"),this,cocoaNSView,[cocoaNSView retainCount]);
 }
 
 WX_NSView wxWindowCocoa::GetNSViewForSuperview() const
@@ -329,7 +329,7 @@ WX_NSView wxWindowCocoa::GetNSViewForHiding() const
 
 bool wxWindowCocoa::Cocoa_drawRect(const NSRect &rect)
 {
-    wxLogDebug(wxT("Cocoa_drawRect"));
+    wxLogTrace(wxTRACE_COCOA,wxT("Cocoa_drawRect"));
     // Recursion can happen if the event loop runs from within the paint
     // handler.  For instance, if an assertion dialog is shown.
     // FIXME: This seems less than ideal.
@@ -370,7 +370,7 @@ bool wxWindowCocoa::Cocoa_mouseMoved(WX_NSEvent theEvent)
 {
     wxMouseEvent event(wxEVT_MOTION);
     InitMouseEvent(event,theEvent);
-    wxLogDebug(wxT("Mouse Drag @%d,%d"),event.m_x,event.m_y);
+    wxLogTrace(wxTRACE_COCOA,wxT("Mouse Drag @%d,%d"),event.m_x,event.m_y);
     return GetEventHandler()->ProcessEvent(event);
 }
 
@@ -388,7 +388,7 @@ bool wxWindowCocoa::Cocoa_mouseDown(WX_NSEvent theEvent)
 {
     wxMouseEvent event([theEvent clickCount]<2?wxEVT_LEFT_DOWN:wxEVT_LEFT_DCLICK);
     InitMouseEvent(event,theEvent);
-    wxLogDebug(wxT("Mouse Down @%d,%d num clicks=%d"),event.m_x,event.m_y,[theEvent clickCount]);
+    wxLogTrace(wxTRACE_COCOA,wxT("Mouse Down @%d,%d num clicks=%d"),event.m_x,event.m_y,[theEvent clickCount]);
     return GetEventHandler()->ProcessEvent(event);
 }
 
@@ -397,7 +397,7 @@ bool wxWindowCocoa::Cocoa_mouseDragged(WX_NSEvent theEvent)
     wxMouseEvent event(wxEVT_MOTION);
     InitMouseEvent(event,theEvent);
     event.m_leftDown = true;
-    wxLogDebug(wxT("Mouse Drag @%d,%d"),event.m_x,event.m_y);
+    wxLogTrace(wxTRACE_COCOA,wxT("Mouse Drag @%d,%d"),event.m_x,event.m_y);
     return GetEventHandler()->ProcessEvent(event);
 }
 
@@ -405,7 +405,7 @@ bool wxWindowCocoa::Cocoa_mouseUp(WX_NSEvent theEvent)
 {
     wxMouseEvent event(wxEVT_LEFT_UP);
     InitMouseEvent(event,theEvent);
-    wxLogDebug(wxT("Mouse Up @%d,%d"),event.m_x,event.m_y);
+    wxLogTrace(wxTRACE_COCOA,wxT("Mouse Up @%d,%d"),event.m_x,event.m_y);
     return GetEventHandler()->ProcessEvent(event);
 }
 
@@ -441,7 +441,7 @@ bool wxWindowCocoa::Cocoa_otherMouseUp(WX_NSEvent theEvent)
 
 void wxWindowCocoa::Cocoa_FrameChanged(void)
 {
-    wxLogDebug(wxT("Cocoa_FrameChanged"));
+    wxLogTrace(wxTRACE_COCOA,wxT("Cocoa_FrameChanged"));
     wxSizeEvent event(GetSize(), m_windowId);
     event.SetEventObject(this);
     GetEventHandler()->ProcessEvent(event);
@@ -528,7 +528,7 @@ bool wxWindow::Show(bool show)
 
 void wxWindowCocoa::DoSetSize(int x, int y, int width, int height, int sizeFlags)
 {
-//    wxLogDebug("wxWindow=%p::DoSetSizeWindow(%d,%d,%d,%d,Auto: %s%s)",this,x,y,width,height,(sizeFlags&wxSIZE_AUTO_WIDTH)?"W":".",sizeFlags&wxSIZE_AUTO_HEIGHT?"H":".");
+    wxLogTrace(wxTRACE_COCOA_Window_Size,"wxWindow=%p::DoSetSizeWindow(%d,%d,%d,%d,Auto: %s%s)",this,x,y,width,height,(sizeFlags&wxSIZE_AUTO_WIDTH)?"W":".",sizeFlags&wxSIZE_AUTO_HEIGHT?"H":".");
     int currentX, currentY;
     int currentW, currentH;
     DoGetPosition(&currentX, &currentY);
@@ -569,7 +569,7 @@ void wxWindowCocoa::DoSetSize(int x, int y, int width, int height, int sizeFlags
 void wxWindowCocoa::DoMoveWindow(int x, int y, int width, int height)
 {
     wxAutoNSAutoreleasePool pool;
-//    wxLogDebug("wxWindow=%p::DoMoveWindow(%d,%d,%d,%d)",this,x,y,width,height);
+    wxLogTrace(wxTRACE_COCOA_Window_Size,"wxWindow=%p::DoMoveWindow(%d,%d,%d,%d)",this,x,y,width,height);
 
     NSView *nsview = GetNSViewForSuperview();
     NSView *superview = [nsview superview];
@@ -614,7 +614,7 @@ void wxWindow::DoGetSize(int *w, int *h) const
         *w=(int)cocoaRect.size.width;
     if(h)
         *h=(int)cocoaRect.size.height;
-//    wxLogDebug("wxWindow=%p::DoGetSize = (%d,%d)",this,(int)cocoaRect.size.width,(int)cocoaRect.size.height);
+    wxLogTrace(wxTRACE_COCOA_Window_Size,"wxWindow=%p::DoGetSize = (%d,%d)",this,(int)cocoaRect.size.width,(int)cocoaRect.size.height);
 }
 
 void wxWindow::DoGetPosition(int *x, int *y) const
@@ -629,7 +629,7 @@ void wxWindow::DoGetPosition(int *x, int *y) const
         *x=(int)cocoaRect.origin.x;
     if(y)
         *y=(int)(parentRect.size.height-(cocoaRect.origin.y+cocoaRect.size.height));
-//    wxLogDebug("wxWindow=%p::DoGetPosition = (%d,%d)",this,(int)cocoaRect.origin.x,(int)cocoaRect.origin.y);
+    wxLogTrace(wxTRACE_COCOA_Window_Size,"wxWindow=%p::DoGetPosition = (%d,%d)",this,(int)cocoaRect.origin.x,(int)cocoaRect.origin.y);
 }
 
 WXWidget wxWindow::GetHandle() const
@@ -672,7 +672,7 @@ void wxWindow::DoClientToScreen(int *x, int *y) const
 // Get size *available for subwindows* i.e. excluding menu bar etc.
 void wxWindow::DoGetClientSize(int *x, int *y) const
 {
-    wxLogDebug(wxT("DoGetClientSize:"));
+    wxLogTrace(wxTRACE_COCOA,wxT("DoGetClientSize:"));
     if(m_cocoaScroller)
         m_cocoaScroller->DoGetClientSize(x,y);
     else
@@ -681,7 +681,7 @@ void wxWindow::DoGetClientSize(int *x, int *y) const
 
 void wxWindow::DoSetClientSize(int width, int height)
 {
-    wxLogDebug(wxT("DoSetClientSize=(%d,%d)"),width,height);
+    wxLogTrace(wxTRACE_COCOA_Window_Size,wxT("DoSetClientSize=(%d,%d)"),width,height);
     if(m_cocoaScroller)
         m_cocoaScroller->ClientSizeToSize(width,height);
     CocoaSetWxWindowSize(width,height);