/[emacs]/emacs/src/macfns.c
ViewVC logotype

Diff of /emacs/src/macfns.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.43 by tamm, Tue Nov 30 05:57:27 2004 UTC revision 1.44 by tamm, Fri Dec 3 17:00:11 2004 UTC
# Line 1932  x_set_name (f, name, explicit) Line 1932  x_set_name (f, name, explicit)
1932        {        {
1933  #if TARGET_API_MAC_CARBON  #if TARGET_API_MAC_CARBON
1934          CFStringRef windowTitle =          CFStringRef windowTitle =
1935            CFStringCreateWithCString (NULL, SDATA (name),            cfstring_create_with_utf8_cstring (SDATA (name));
                                      kCFStringEncodingUTF8);  
1936    
1937          SetWindowTitleWithCFString (FRAME_MAC_WINDOW (f), windowTitle);          SetWindowTitleWithCFString (FRAME_MAC_WINDOW (f), windowTitle);
1938          CFRelease (windowTitle);          CFRelease (windowTitle);
# Line 2015  x_set_title (f, name, old_name) Line 2014  x_set_title (f, name, old_name)
2014        {        {
2015  #if TARGET_API_MAC_CARBON  #if TARGET_API_MAC_CARBON
2016          CFStringRef windowTitle =          CFStringRef windowTitle =
2017            CFStringCreateWithCString (NULL, SDATA (name),            cfstring_create_with_utf8_cstring (SDATA (name));
                                      kCFStringEncodingUTF8);  
2018    
2019          SetWindowTitleWithCFString (FRAME_MAC_WINDOW (f), windowTitle);          SetWindowTitleWithCFString (FRAME_MAC_WINDOW (f), windowTitle);
2020          CFRelease (windowTitle);          CFRelease (windowTitle);
# Line 4246  If ONLY-DIR-P is non-nil, the user can o Line 4244  If ONLY-DIR-P is non-nil, the user can o
4244      NavDialogRef dialogRef;      NavDialogRef dialogRef;
4245      NavTypeListHandle fileTypes = NULL;      NavTypeListHandle fileTypes = NULL;
4246      NavUserAction userAction;      NavUserAction userAction;
4247      CFStringRef message=NULL, client=NULL, saveName = NULL, ok = NULL;      CFStringRef message=NULL, saveName = NULL;
     CFStringRef title = NULL;  
4248            
4249      BLOCK_INPUT;      BLOCK_INPUT;
4250      /* No need for a callback function because we are modal */      /* No need for a callback function because we are modal */
# Line 4259  If ONLY-DIR-P is non-nil, the user can o Line 4256  If ONLY-DIR-P is non-nil, the user can o
4256      options.optionFlags |= kNavSelectAllReadableItem;      options.optionFlags |= kNavSelectAllReadableItem;
4257      if (!NILP(prompt))      if (!NILP(prompt))
4258        {        {
4259          message = CFStringCreateWithCStringNoCopy(NULL, SDATA(prompt),          message = cfstring_create_with_utf8_cstring (SDATA (prompt));
                                                   kCFStringEncodingUTF8,  
                                                   kCFAllocatorNull);  
4260          options.message = message;          options.message = message;
4261        }        }
4262      /* Don't set the application, let it use default.      /* Don't set the application, let it use default.
4263      client = CFStringCreateWithCStringNoCopy(NULL, "Emacs",      options.clientName = CFSTR ("Emacs");
                                              kCFStringEncodingMacRoman, NULL);  
     options.clientName = client;  
4264      */      */
4265    
4266      if (!NILP (only_dir_p))      if (!NILP (only_dir_p))
# Line 4276  If ONLY-DIR-P is non-nil, the user can o Line 4269  If ONLY-DIR-P is non-nil, the user can o
4269      else if (NILP (mustmatch))      else if (NILP (mustmatch))
4270        {        {
4271          /* This is a save dialog */          /* This is a save dialog */
         ok = CFStringCreateWithCString (NULL, "Ok", kCFStringEncodingUTF8);  
         title = CFStringCreateWithCString (NULL, "Enter name",  
                                            kCFStringEncodingUTF8);  
4272          options.optionFlags |= kNavDontConfirmReplacement;          options.optionFlags |= kNavDontConfirmReplacement;
4273          options.actionButtonLabel = ok;          options.actionButtonLabel = CFSTR ("Ok");
4274          options.windowTitle = title;          options.windowTitle = CFSTR ("Enter name");
4275    
4276          if (!NILP(default_filename))          if (!NILP(default_filename))
4277            {            {
4278              saveName = CFStringCreateWithCString(NULL, SDATA(default_filename),              saveName =
4279                                                   kCFStringEncodingUTF8);                cfstring_create_with_utf8_cstring (SDATA (default_filename));
4280              options.saveFileName = saveName;              options.saveFileName = saveName;
4281              options.optionFlags |= kNavSelectDefaultLocation;              options.optionFlags |= kNavSelectDefaultLocation;
4282            }            }
# Line 4320  If ONLY-DIR-P is non-nil, the user can o Line 4310  If ONLY-DIR-P is non-nil, the user can o
4310      }      }
4311    
4312      if (saveName) CFRelease(saveName);      if (saveName) CFRelease(saveName);
     if (client) CFRelease(client);  
4313      if (message) CFRelease(message);      if (message) CFRelease(message);
     if (ok) CFRelease(ok);  
     if (title) CFRelease(title);  
4314    
4315      if (status == noErr) {      if (status == noErr) {
4316        userAction = NavDialogGetUserAction(dialogRef);        userAction = NavDialogGetUserAction(dialogRef);

Legend:
Removed from v.1.43  
changed lines
  Added in v.1.44

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26