--- hatari/src/gui-osx/CreateFloppyController.m 2019/04/09 08:54:10 1.1.1.5 +++ hatari/src/gui-osx/CreateFloppyController.m 2019/04/09 08:56:37 1.1.1.7 @@ -32,25 +32,25 @@ char szPath[FILENAME_MAX] ; defaultDir = [NSString stringWithCString:ConfigureParams.DiskImage.szDiskImageDirectory encoding:NSASCIIStringEncoding]; // Run the SavePanel, then check if the user clicked OK - newCnf = [NSApp hsavefile:YES defoDir:defaultDir defoFile:nil types:[NSArray arrayWithObjects: allF, nil] ] ; - if ([newCnf length] != 0) + newCnf = [NSApp hsavefile:YES defoDir:defaultDir defoFile:nil types:@[allF] ] ; + if (newCnf.length != 0) { [newCnf getCString:szPath maxLength:FILENAME_MAX-1 encoding:NSASCIIStringEncoding] ; // Get the tracks, sectors and sides values - cTracks = [[tracks selectedCell] tag]; - cSectors = [[sectors selectedCell] tag]; - cSides = [[sides selectedCell] tag]; + cTracks = tracks.selectedCell.tag ; + cSectors = sectors.selectedCell.tag ; + cSides = sides.selectedCell.tag ; // Create the image - cRet=CreateBlankImage_CreateFile(szPath, cTracks, cSectors, cSides); + cRet=CreateBlankImage_CreateFile(szPath, cTracks, cSectors, cSides, NULL); if(cRet==TRUE) - { - ret = NSRunAlertPanel(@"Hatari", localize(@"Insert newly created disk in"), localize(@"Ignore"), @" A: ", @" B: "); - if (ret == NSAlertDefaultReturn) - return ; + { ret = [NSApp myAlerte:NSInformationalAlertStyle Txt:nil firstB:localize(@"Ignore") alternateB:@" A: " + otherB:@" B: " informativeTxt:@""] ; + if (ret == NSAlertFirstButtonReturn) + return ; printf("%d\n",ret); - ret = ret == NSAlertAlternateReturn ? 0 : 1 ; + ret = ret == NSAlertSecondButtonReturn ? 0 : 1 ; Floppy_SetDiskFileName(ret, szPath, NULL); Floppy_InsertDiskIntoDrive(ret); } ; @@ -65,7 +65,7 @@ char szPath[FILENAME_MAX] ; for (i = 40; i <= 85; i++) { [tracks addItemWithTitle:[NSString stringWithFormat:@"%d", i]]; - [[tracks lastItem] setTag:i]; + [tracks.lastItem setTag:i]; } // Select the default value of 80 tracks