summaryrefslogtreecommitdiffstats
path: root/macosx/tkMacOSXMenu.c
diff options
context:
space:
mode:
Diffstat (limited to 'macosx/tkMacOSXMenu.c')
-rw-r--r--macosx/tkMacOSXMenu.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/macosx/tkMacOSXMenu.c b/macosx/tkMacOSXMenu.c
index 41496a8..f703e59 100644
--- a/macosx/tkMacOSXMenu.c
+++ b/macosx/tkMacOSXMenu.c
@@ -121,7 +121,7 @@ static int ModifierCharWidth(Tk_Font tkfont);
* demo would cause the animation to stop. This was also the case for
* menubuttons.
*
- * The TKBackground object below works around this problem, and allows a Tk
+ * The TKBackgroundLoop object below works around this problem, and allows a Tk
* event loop to run while a menu is open. It is a subclass of NSThread which
* inserts requests to call [NSApp _runBackgroundLoop] onto the queue
* associated with the NSEventTrackingRunLoopMode. One of these threads gets
@@ -235,8 +235,8 @@ TKBackgroundLoop *backgroundLoop = nil;
- (id) initWithTkMenu: (TkMenu *) tkMenu
{
- NSString *title = [[NSString alloc] initWithUTF8String:
- Tk_PathName(tkMenu->tkwin)];
+ NSString *title = [[TKNSString alloc] initWithTclUtfBytes:
+ Tk_PathName(tkMenu->tkwin) length:-1];
self = [self initWithTitle:title];
[title release];
@@ -734,9 +734,9 @@ TkpConfigureMenuEntry(
[menuItem setImage:image];
if ((!image || mePtr->compound != COMPOUND_NONE) && mePtr->labelPtr &&
mePtr->labelLength) {
- title = [[[NSString alloc] initWithBytes:Tcl_GetString(mePtr->labelPtr)
- length:mePtr->labelLength encoding:NSUTF8StringEncoding]
- autorelease];
+ title = [[TKNSString alloc]
+ initWithTclUtfBytes:Tcl_GetString(mePtr->labelPtr)
+ length:mePtr->labelLength];
if ([title hasSuffix:@"..."]) {
title = [NSString stringWithFormat:@"%@%C",
[title substringToIndex:[title length] - 3], 0x2026];
@@ -807,7 +807,7 @@ TkpConfigureMenuEntry(
if ([submenu supermenu] && [menuItem submenu] != submenu) {
/*
* This happens during a clone, where the parent menu is
- * cloned before its children, so just ignore this temprary
+ * cloned before its children, so just ignore this temporary
* setting, it will be changed shortly (c.f. tkMenu.c
* CloneMenu())
*/
@@ -1307,7 +1307,7 @@ ParseAccelerator(
if (ch) {
return [[[NSString alloc] initWithCharacters:&ch length:1] autorelease];
} else {
- return [[[[NSString alloc] initWithUTF8String:accel] autorelease]
+ return [[[[TKNSString alloc] initWithTclUtfBytes:accel length:-1] autorelease]
lowercaseString];
}
}
@@ -1317,7 +1317,7 @@ ParseAccelerator(
*
* ModifierCharWidth --
*
- * Helper mesuring width of command char in given font.
+ * Helper measuring width of command char in given font.
*
* Results:
* Width of command char.