diff src/macfns.c @ 90054:f2ebccfa87d4

Revision: miles@gnu.org--gnu-2004/emacs--unicode--0--patch-74 Merge from emacs--cvs-trunk--0 Patches applied: * miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-709 Update from CVS: src/indent.c (Fvertical_motion): Fix last change. * miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-710 - miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-715 Update from CVS * miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-716 Merge from gnus--rel--5.10 * miles@gnu.org--gnu-2004/gnus--rel--5.10--patch-74 Update from CVS
author Miles Bader <miles@gnu.org>
date Wed, 08 Dec 2004 05:02:30 +0000
parents e24e2e78deda 4ad0594e1ac4
children 95879cc1ed20
line wrap: on
line diff
--- a/src/macfns.c	Mon Dec 06 12:38:25 2004 +0000
+++ b/src/macfns.c	Wed Dec 08 05:02:30 2004 +0000
@@ -1932,8 +1932,7 @@
       {
 #if TARGET_API_MAC_CARBON
 	CFStringRef windowTitle =
-	  CFStringCreateWithCString (NULL, SDATA (name),
-				     kCFStringEncodingUTF8);
+	  cfstring_create_with_utf8_cstring (SDATA (name));
 
 	SetWindowTitleWithCFString (FRAME_MAC_WINDOW (f), windowTitle);
 	CFRelease (windowTitle);
@@ -2015,8 +2014,7 @@
       {
 #if TARGET_API_MAC_CARBON
 	CFStringRef windowTitle =
-	  CFStringCreateWithCString (NULL, SDATA (name),
-				     kCFStringEncodingUTF8);
+	  cfstring_create_with_utf8_cstring (SDATA (name));
 
 	SetWindowTitleWithCFString (FRAME_MAC_WINDOW (f), windowTitle);
 	CFRelease (windowTitle);
@@ -4246,8 +4244,7 @@
     NavDialogRef dialogRef;
     NavTypeListHandle fileTypes = NULL;
     NavUserAction userAction;
-    CFStringRef message=NULL, client=NULL, saveName = NULL, ok = NULL;
-    CFStringRef title = NULL;
+    CFStringRef message=NULL, saveName = NULL;
     
     BLOCK_INPUT;
     /* No need for a callback function because we are modal */
@@ -4259,15 +4256,11 @@
     options.optionFlags |= kNavSelectAllReadableItem;
     if (!NILP(prompt))
       {
-	message = CFStringCreateWithCStringNoCopy(NULL, SDATA(prompt),
-						  kCFStringEncodingUTF8, 
-						  kCFAllocatorNull);
+	message = cfstring_create_with_utf8_cstring (SDATA (prompt));
 	options.message = message;
       }
     /* Don't set the application, let it use default.
-    client = CFStringCreateWithCStringNoCopy(NULL, "Emacs", 
-					     kCFStringEncodingMacRoman, NULL);
-    options.clientName = client;
+    options.clientName = CFSTR ("Emacs");
     */
 
     if (!NILP (only_dir_p))
@@ -4276,17 +4269,14 @@
     else if (NILP (mustmatch)) 
       { 
 	/* This is a save dialog */
-	ok = CFStringCreateWithCString (NULL, "Ok", kCFStringEncodingUTF8);
-	title = CFStringCreateWithCString (NULL, "Enter name",
-	                                   kCFStringEncodingUTF8);
 	options.optionFlags |= kNavDontConfirmReplacement;
-	options.actionButtonLabel = ok;
-	options.windowTitle = title;
+	options.actionButtonLabel = CFSTR ("Ok");
+	options.windowTitle = CFSTR ("Enter name");
 
 	if (!NILP(default_filename))
 	  {
-	    saveName = CFStringCreateWithCString(NULL, SDATA(default_filename),
-						 kCFStringEncodingUTF8);
+	    saveName =
+	      cfstring_create_with_utf8_cstring (SDATA (default_filename));
 	    options.saveFileName = saveName;
 	    options.optionFlags |= kNavSelectDefaultLocation;
 	  }
@@ -4320,10 +4310,7 @@
     }
 
     if (saveName) CFRelease(saveName);
-    if (client) CFRelease(client);
     if (message) CFRelease(message);
-    if (ok) CFRelease(ok);
-    if (title) CFRelease(title);
 
     if (status == noErr) {
       userAction = NavDialogGetUserAction(dialogRef);
@@ -4415,8 +4402,8 @@
   0, /* MAC_TODO: x_set_scroll_bar_background, */
   x_set_screen_gamma,
   x_set_line_spacing,
-  0, /* MAC_TODO: x_set_fringe_width, */
-  0, /* MAC_TODO: x_set_fringe_width, */
+  x_set_fringe_width,
+  x_set_fringe_width,
   0, /* x_set_wait_for_wm, */
   0, /* MAC_TODO: x_set_fullscreen, */
 };