Rev 103 | Rev 122 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 103 | Rev 106 | ||
---|---|---|---|
Line 287... | Line 287... | ||
287 | // during advanceState. To prevent this problem, zoom in until we aren't |
287 | // during advanceState. To prevent this problem, zoom in until we aren't |
288 | // previewing more than say 10% of Photoshop's indicated maxSpace. |
288 | // previewing more than say 10% of Photoshop's indicated maxSpace. |
289 | // (e.g., on a 1GB WinXP system, PS CS2 reports 520MB maxSpace, so this will let us |
289 | // (e.g., on a 1GB WinXP system, PS CS2 reports 520MB maxSpace, so this will let us |
290 | // preview about 50MB of image data.) |
290 | // preview about 50MB of image data.) |
291 | 291 | ||
292 | zoomfactor = sqrt(maxSpace/(10.*preview_w*preview_h*nplanes)); |
292 | zoomfactor = sqrt(gpb->maxSpace/(10.*preview_w*preview_h*nplanes)); |
293 | if(zoomfactor > fitzoom) |
293 | if(zoomfactor > fitzoom) |
294 | zoomfactor = fitzoom; |
294 | zoomfactor = fitzoom; |
295 | if(zoomfactor < 1.) |
295 | if(zoomfactor < 1.) |
296 | zoomfactor = 1.; |
296 | zoomfactor = 1.; |
297 | 297 | ||
Line 330... | Line 330... | ||
330 | case IDCANCEL: |
330 | case IDCANCEL: |
331 | dispose_preview(); |
331 | dispose_preview(); |
332 | return false; // end dialog |
332 | return false; // end dialog |
333 | case OPENITEM: |
333 | case OPENITEM: |
334 | if(!gdata->standalone && choosefiletypes("\pChoose filter settings",&sfr,&reply,types,2, |
334 | if(!gdata->standalone && choosefiletypes("\pChoose filter settings",&sfr,&reply,types,2, |
335 | "All supported files (.afs, .8bf, .txt)\0*.afs;*.8bf;*.txt\0All files (*.*)\0*.*\0\0")){ |
335 | "All supported files (.afs, .8bf, .txt)\0*.afs;*.8bf;*.txt\0All files (*.*)\0*.*\0\0" |
- | 336 | #ifdef _WIN32 |
|
- | 337 | ,gdata->hWndMainDlg |
|
- | 338 | #endif /* _WIN32 */ |
|
- | 339 | )){ |
|
336 | if(loadfile(&sfr,&reason)){ |
340 | if(loadfile(&sfr,&reason)){ |
337 | updatedialog(dp); |
341 | updatedialog(dp); |
338 | maindlgupdate(dp); |
342 | maindlgupdate(dp); |
339 | }else |
343 | }else |
340 | alertuser("Cannot load settings.",reason); |
344 | alertuser("Cannot load settings.",reason); |
341 | } |
345 | } |
342 | break; |
346 | break; |
343 | case SAVEITEM: |
347 | case SAVEITEM: |
344 | if(!gdata->standalone && putfile("\pSave filter settings",(StringPtr)"", |
348 | if(!gdata->standalone && putfile("\pSave filter settings",(StringPtr)"", |
345 | TEXT_FILETYPE,SIG_SIMPLETEXT,&reply,&sfr, |
349 | TEXT_FILETYPE,SIG_SIMPLETEXT,&reply,&sfr, |
346 | "afs","Settings file (.afs, .txt)\0*.afs;*.txt\0\0",1)){ |
350 | "afs","Settings file (.afs, .txt)\0*.afs;*.txt\0\0",1 |
- | 351 | #ifdef _WIN32 |
|
- | 352 | ,gdata->hWndMainDlg |
|
- | 353 | #endif /* _WIN32 */ |
|
- | 354 | )){ |
|
347 | if(savefile(&sfr)) |
355 | if(savefile(&sfr)) |
348 | completesave(&reply); |
356 | completesave(&reply); |
349 | } |
357 | } |
350 | break; |
358 | break; |
351 | case MAKEITEM: |
359 | case MAKEITEM: |
Line 354... | Line 362... | ||
354 | #ifdef MACMACHO |
362 | #ifdef MACMACHO |
355 | PLstrcat(fname,(StringPtr)"\p.plugin"); |
363 | PLstrcat(fname,(StringPtr)"\p.plugin"); |
356 | #endif |
364 | #endif |
357 | if( putfile("\pMake standalone filter",fname, |
365 | if( putfile("\pMake standalone filter",fname, |
358 | PS_FILTER_FILETYPE,kPhotoshopSignature,&reply,&sfr, |
366 | PS_FILTER_FILETYPE,kPhotoshopSignature,&reply,&sfr, |
359 | "8bf","Filter plugin file (.8bf)\0*.8bf\0\0",1) ) |
367 | "8bf","Filter plugin file (.8bf)\0*.8bf\0\0",1 |
- | 368 | #ifdef _WIN32 |
|
- | 369 | ,gdata->hWndMainDlg |
|
- | 370 | #endif /* _WIN32 */ |
|
- | 371 | )) |
|
360 | make_standalone(&sfr); |
372 | make_standalone(&sfr); |
361 | } |
373 | } |
362 | break; |
374 | break; |
363 | case ZOOMINITEM: |
375 | case ZOOMINITEM: |
364 | zoomfactor = zoomfactor > 2. ? zoomfactor/2. : 1.; |
376 | zoomfactor = zoomfactor > 2. ? zoomfactor/2. : 1.; |