Subversion Repositories filter_foundry

Rev

Rev 388 | Rev 393 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 388 Rev 389
Line 380... Line 380...
380
                        #else
380
                        #else
381
                        (StringPtr)_strdup("\024Save filter settings"),
381
                        (StringPtr)_strdup("\024Save filter settings"),
382
                        #endif
382
                        #endif
383
                        (StringPtr)_strdup("\0"),
383
                        (StringPtr)_strdup("\0"),
384
                        TEXT_FILETYPE,SIG_SIMPLETEXT,&reply,&sfr,
384
                        TEXT_FILETYPE,SIG_SIMPLETEXT,&reply,&sfr,
385
                        "afs","All supported files (.afs, .txt, *.pff)\0*.afs;*.txt;*.pff\0Filter Factory Settings (*.afs, *.txt)\0*.afs;*.txt\0Premiere TF/FF Settings (*.pff)\0*.pff\0All files (*.*)\0*.*\0\0",1
385
                        "afs","All supported files (.afs, *.pff, .txt)\0*.afs;*.pff;*.txt\0Filter Factory Settings (*.afs)\0*.afs\0Premiere TF/FF Settings (*.pff)\0*.pff\0PluginCommander TXT file (*.txt)\0*.txt\0All files (*.*)\0*.*\0\0",1
386
                        #ifdef _WIN32
386
                        #ifdef _WIN32
387
                        ,gdata->hWndMainDlg
387
                        ,gdata->hWndMainDlg
388
                        #endif /* _WIN32 */
388
                        #endif /* _WIN32 */
389
                )){
389
                )){
390
                        if(savefile_afs_pff(&sfr))
390
                        if(savefile_afs_pff_picotxt(&sfr)) {
391
                                completesave(&reply);
391
                                completesave(&reply);
-
 
392
 
-
 
393
                                showmessage(_strdup("The file was successfully saved in the \"PluginCommander\" TXT format. The file will now be opened in a text editor, so that you can fill in the missing data: Category, Title, Copyright, Author, Filename, Slider/Map names."));
-
 
394
 
-
 
395
                                if (fileHasExtension(&sfr, ".txt")) {
-
 
396
                                        #ifdef MAC_ENV
-
 
397
                                        // TODO: Open text file instead
-
 
398
                                        showmessage(_strdup("Please edit the file manually to enter the title, category, authorname, copyright, slidernames etc."));
-
 
399
                                        #else
-
 
400
                                        char filename[MAX_PATH];
-
 
401
                                        myp2cstrcpy(filename, sfr.sfFile.name);
-
 
402
                                        hShellRes = ShellExecuteA(
-
 
403
                                                gdata->hWndMainDlg,
-
 
404
                                                "open",
-
 
405
                                                filename,
-
 
406
                                                NULL,
-
 
407
                                                NULL,
-
 
408
                                                SW_SHOWNORMAL
-
 
409
                                        );
-
 
410
                                        if (hShellRes <= (HINSTANCE)32) {
-
 
411
                                                // MSDN states: "If the function succeeds, it returns a value greater than 32."
-
 
412
 
-
 
413
                                                char s[100];
-
 
414
                                                strcpy(s, "ShellExecuteA failed: ");
-
 
415
                                                FormatMessage(FORMAT_MESSAGE_FROM_SYSTEM, NULL, GetLastError(), 0, s + strlen(s), 0x100, NULL);
-
 
416
                                                dbg(s);
-
 
417
 
-
 
418
                                                showmessage(_strdup("Please edit the file manually to enter the title, category, author, copyright, filename, slidernames etc."));
-
 
419
                                        }
-
 
420
                                        #endif
-
 
421
                                }
-
 
422
 
-
 
423
                        }
392
                }
424
                }
393
                break;
425
                break;
394
        case MAKEITEM:
426
        case MAKEITEM:
395
                if (gdata->standalone) return true; // should not happen since the button should be grayed out
427
                if (gdata->standalone) return true; // should not happen since the button should be grayed out
396
 
428