]> git.saurik.com Git - wxWidgets.git/blobdiff - src/cocoa/checkbox.mm
Do not allow events to fire after socket is closed (fixes crash on GTK with GDK_Input...
[wxWidgets.git] / src / cocoa / checkbox.mm
index 659025be55798e1683bdf8c1ce00dae1bb14c887..13ee14009c8362f256cfa43490eea272ef9631e5 100644 (file)
@@ -6,10 +6,13 @@
 // Created:     2003/03/16
 // RCS-ID:      $Id: 
 // Copyright:   (c) 2003 David Elliott
-// Licence:    wxWindows license
+// Licence:    wxWidgets licence
 /////////////////////////////////////////////////////////////////////////////
 
 #include "wx/wxprec.h"
+
+#if wxUSE_CHECKBOX
+
 #ifndef WX_PRECOMP
     #include "wx/log.h"
     #include "wx/app.h"
@@ -113,7 +116,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
@@ -133,3 +136,9 @@ void wxCheckBox::Cocoa_wxNSButtonAction(void)
     Command(event);
 }
 
+void wxCheckBox::SetLabel(const wxString& s)
+{
+    wxAutoNSAutoreleasePool pool;
+    [GetNSButton() setTitle:wxNSStringWithWxString(s)];
+}
+#endif