Use the new wxNSStringWithWxString conversion function
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@21131 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -17,7 +17,7 @@
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
#import <AppKit/NSButton.h>
|
#import <AppKit/NSButton.h>
|
||||||
#import <Foundation/NSString.h>
|
#include "wx/cocoa/string.h"
|
||||||
|
|
||||||
IMPLEMENT_DYNAMIC_CLASS(wxButton, wxControl)
|
IMPLEMENT_DYNAMIC_CLASS(wxButton, wxControl)
|
||||||
BEGIN_EVENT_TABLE(wxButton, wxButtonBase)
|
BEGIN_EVENT_TABLE(wxButton, wxButtonBase)
|
||||||
@@ -41,7 +41,7 @@ bool wxButton::Create(wxWindow *parent, wxWindowID winid,
|
|||||||
[m_cocoaNSView release];
|
[m_cocoaNSView release];
|
||||||
|
|
||||||
[GetNSButton() setBezelStyle:NSRoundedBezelStyle];
|
[GetNSButton() setBezelStyle:NSRoundedBezelStyle];
|
||||||
[GetNSButton() setTitle:[NSString stringWithCString: label.c_str()]];
|
[GetNSButton() setTitle:wxNSStringWithWxString(label)];
|
||||||
[GetNSControl() sizeToFit];
|
[GetNSControl() sizeToFit];
|
||||||
|
|
||||||
if(m_parent)
|
if(m_parent)
|
||||||
|
@@ -14,7 +14,7 @@
|
|||||||
#include "wx/log.h"
|
#include "wx/log.h"
|
||||||
|
|
||||||
#import <AppKit/NSButton.h>
|
#import <AppKit/NSButton.h>
|
||||||
#import <Foundation/NSString.h>
|
#include "wx/cocoa/string.h"
|
||||||
|
|
||||||
IMPLEMENT_DYNAMIC_CLASS(wxRadioButton, wxControl)
|
IMPLEMENT_DYNAMIC_CLASS(wxRadioButton, wxControl)
|
||||||
// wxRadioButtonBase == wxControl
|
// wxRadioButtonBase == wxControl
|
||||||
@@ -37,7 +37,7 @@ bool wxRadioButton::Create(wxWindow *parent, wxWindowID winid,
|
|||||||
SetNSButton([[NSButton alloc] initWithFrame: cocoaRect]);
|
SetNSButton([[NSButton alloc] initWithFrame: cocoaRect]);
|
||||||
[m_cocoaNSView release];
|
[m_cocoaNSView release];
|
||||||
[GetNSButton() setButtonType: NSRadioButton];
|
[GetNSButton() setButtonType: NSRadioButton];
|
||||||
[GetNSButton() setTitle:[NSString stringWithCString: label.c_str()]];
|
[GetNSButton() setTitle:wxNSStringWithWxString(label)];
|
||||||
[GetNSControl() sizeToFit];
|
[GetNSControl() sizeToFit];
|
||||||
|
|
||||||
if(m_parent)
|
if(m_parent)
|
||||||
|
Reference in New Issue
Block a user