/[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.60 by jasonr, Fri Jun 10 23:02:56 2005 UTC revision 1.61 by lektu, Thu Jun 23 16:12:25 2005 UTC
# Line 208  check_x_frame (frame) Line 208  check_x_frame (frame)
208    CHECK_LIVE_FRAME (frame);    CHECK_LIVE_FRAME (frame);
209    f = XFRAME (frame);    f = XFRAME (frame);
210    if (! FRAME_MAC_P (f))    if (! FRAME_MAC_P (f))
211      error ("non-mac frame used");      error ("Non-Mac frame used");
212    return f;    return f;
213  }  }
214    
# Line 4241  If ONLY-DIR-P is non-nil, the user can o Line 4241  If ONLY-DIR-P is non-nil, the user can o
4241      NavTypeListHandle fileTypes = NULL;      NavTypeListHandle fileTypes = NULL;
4242      NavUserAction userAction;      NavUserAction userAction;
4243      CFStringRef message=NULL, saveName = NULL;      CFStringRef message=NULL, saveName = NULL;
4244        
4245      BLOCK_INPUT;      BLOCK_INPUT;
4246      /* No need for a callback function because we are modal */      /* No need for a callback function because we are modal */
4247      NavGetDefaultDialogCreationOptions(&options);      NavGetDefaultDialogCreationOptions(&options);
# Line 4265  If ONLY-DIR-P is non-nil, the user can o Line 4265  If ONLY-DIR-P is non-nil, the user can o
4265      if (!NILP (only_dir_p))      if (!NILP (only_dir_p))
4266        status = NavCreateChooseFolderDialog(&options, mac_nav_event_callbackUPP,        status = NavCreateChooseFolderDialog(&options, mac_nav_event_callbackUPP,
4267                                             NULL, NULL, &dialogRef);                                             NULL, NULL, &dialogRef);
4268      else if (NILP (mustmatch))      else if (NILP (mustmatch))
4269        {        {
4270          /* This is a save dialog */          /* This is a save dialog */
4271          options.optionFlags |= kNavDontConfirmReplacement;          options.optionFlags |= kNavDontConfirmReplacement;
4272          options.actionButtonLabel = CFSTR ("Ok");          options.actionButtonLabel = CFSTR ("Ok");
# Line 4283  If ONLY-DIR-P is non-nil, the user can o Line 4283  If ONLY-DIR-P is non-nil, the user can o
4283              options.saveFileName = saveName;              options.saveFileName = saveName;
4284              options.optionFlags |= kNavSelectDefaultLocation;              options.optionFlags |= kNavSelectDefaultLocation;
4285            }            }
4286            status = NavCreatePutFileDialog(&options,            status = NavCreatePutFileDialog(&options,
4287                                            'TEXT', kNavGenericSignature,                                            'TEXT', kNavGenericSignature,
4288                                            mac_nav_event_callbackUPP, NULL,                                            mac_nav_event_callbackUPP, NULL,
4289                                            &dialogRef);                                            &dialogRef);
# Line 4295  If ONLY-DIR-P is non-nil, the user can o Line 4295  If ONLY-DIR-P is non-nil, the user can o
4295                                             mac_nav_event_callbackUPP, NULL,                                             mac_nav_event_callbackUPP, NULL,
4296                                             NULL, NULL, &dialogRef);                                             NULL, NULL, &dialogRef);
4297        }        }
4298        
4299      /* Set the default location and continue*/      /* Set the default location and continue*/
4300      if (status == noErr)      if (status == noErr)
4301        {        {
# Line 4307  If ONLY-DIR-P is non-nil, the user can o Line 4307  If ONLY-DIR-P is non-nil, the user can o
4307          FSSpec defLoc;          FSSpec defLoc;
4308          status = posix_pathname_to_fsspec (SDATA (ENCODE_FILE (dir)), &defLoc);          status = posix_pathname_to_fsspec (SDATA (ENCODE_FILE (dir)), &defLoc);
4309  #endif  #endif
4310          if (status == noErr)          if (status == noErr)
4311            {            {
4312  #ifdef MAC_OSX  #ifdef MAC_OSX
4313              AECreateDesc(typeFSRef, &defLoc, sizeof(FSRef), &defLocAed);              AECreateDesc(typeFSRef, &defLoc, sizeof(FSRef), &defLocAed);
# Line 4359  If ONLY-DIR-P is non-nil, the user can o Line 4359  If ONLY-DIR-P is non-nil, the user can o
4359                  int len = strlen(filename);                  int len = strlen(filename);
4360                  if (len && filename[len-1] != '/')                  if (len && filename[len-1] != '/')
4361                    filename[len++] = '/';                    filename[len++] = '/';
4362                  CFStringGetCString(reply.saveFileName, filename+len,                  CFStringGetCString(reply.saveFileName, filename+len,
4363                                     sizeof (filename) - len,                                     sizeof (filename) - len,
4364  #if MAC_OSX  #if MAC_OSX
4365                                     kCFStringEncodingUTF8                                     kCFStringEncodingUTF8
# Line 4387  If ONLY-DIR-P is non-nil, the user can o Line 4387  If ONLY-DIR-P is non-nil, the user can o
4387    }    }
4388    
4389    UNGCPRO;    UNGCPRO;
4390      
4391    /* Make "Cancel" equivalent to C-g.  */    /* Make "Cancel" equivalent to C-g.  */
4392    if (NILP (file))    if (NILP (file))
4393      Fsignal (Qquit, Qnil);      Fsignal (Qquit, Qnil);
4394      
4395    return unbind_to (count, file);    return unbind_to (count, file);
4396  }  }
4397    

Legend:
Removed from v.1.60  
changed lines
  Added in v.1.61

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