mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-01-26 06:38:36 +00:00
use CoreFoundation for setting control text from a unicode string under carbon.
r=saari/sr=hyatt bug# 75653
This commit is contained in:
parent
6dce43a706
commit
5eab426ee5
@ -466,6 +466,14 @@ void nsMacControl::Str255ToString(const Str255& aStr255, nsString& aText)
|
||||
|
||||
void nsMacControl::NSStringSetControlTitle(ControlHandle theControl, nsString title)
|
||||
{
|
||||
#if TARGET_CARBON
|
||||
|
||||
// wow, it sure is nice being able to use core foundation ;)
|
||||
CFStringRef str = CFStringCreateWithCharacters(NULL, title.GetUnicode(), title.Length());
|
||||
SetControlTitleWithCFString(theControl, str);
|
||||
CFRelease(str);
|
||||
|
||||
#else
|
||||
TextStyle theStyle;
|
||||
ScriptCode fontScript;
|
||||
OSErr err;
|
||||
@ -547,7 +555,7 @@ void nsMacControl::NSStringSetControlTitle(ControlHandle theControl, nsString ti
|
||||
//
|
||||
::SetControlTitle(theControl,c2pstr(scriptRunText));
|
||||
delete [] scriptRunText;
|
||||
|
||||
#endif
|
||||
}
|
||||
//-------------------------------------------------------------------------
|
||||
//
|
||||
|
Loading…
x
Reference in New Issue
Block a user