]> git.saurik.com Git - wxWidgets.git/blobdiff - src/cocoa/checkbox.mm
check that the version of __sync_sub_and_fetch that returns a value is supported...
[wxWidgets.git] / src / cocoa / checkbox.mm
index dccffa0053262cfc3d605e8278179e595b970598..ec2915a257832a808b0075318c5eb438f1ef8711 100644 (file)
@@ -47,7 +47,7 @@ bool wxCheckBox::Create(wxWindow *parent, wxWindowID winid,
     [m_cocoaNSView release];
     [GetNSButton() setButtonType: NSSwitchButton];
     [GetNSButton() setAllowsMixedState: Is3State()];
-    [GetNSButton() setTitle:wxNSStringWithWxString(wxStripMenuCodes(label))];
+    CocoaSetLabelForObject(label, GetNSButton());
     [GetNSControl() sizeToFit];
 
     if(m_parent)
@@ -140,6 +140,14 @@ void wxCheckBox::Cocoa_wxNSButtonAction(void)
 void wxCheckBox::SetLabel(const wxString& s)
 {
     wxAutoNSAutoreleasePool pool;
-    [GetNSButton() setTitle:wxNSStringWithWxString(s)];
+    CocoaSetLabelForObject(s, GetNSButton());
 }
-#endif
+
+wxString wxCheckBox::GetLabel() const
+{
+    wxAutoNSAutoreleasePool pool;
+    return wxStringWithNSString([GetNSButton() title]);
+
+}
+
+#endif // wxUSE_CHECKBOX