From da182e1c619f2999ae241eefb031a5b29f700436 Mon Sep 17 00:00:00 2001 From: Andy McFadden Date: Fri, 1 Dec 2017 13:48:50 -0800 Subject: [PATCH] Change file extraction extension handling When extracting files, you can ask CiderPress to add a file extension by checking the "add file extension" box. Whether or not this box is checked, files that undergo a format conversion (e.g. AWP to RTF, or SHR to BMP) have a file extension added to identify the file's new format. This turned out to be confusing and inconvenient at times, notably when working with Merlin source files. See issues #10 and #26 on github for details. CiderPress no longer adds file extensions to format-converted files unless the "add file extension" box is checked. (The "Configure for easy access in Windows" button checks this box for you, so the default behavior is still "safe".) Also, fix a minor visual glitch in the extract dialog. Also, update to version 4.0.3-a3. --- DIST/with-mdc.deploy | 6 +++--- app/Actions.cpp | 10 ++++++++++ app/CiderPress.rc | 2 +- app/MyApp.h | 2 +- 4 files changed, 15 insertions(+), 5 deletions(-) diff --git a/DIST/with-mdc.deploy b/DIST/with-mdc.deploy index c9bdf2e..aa56cb5 100644 --- a/DIST/with-mdc.deploy +++ b/DIST/with-mdc.deploy @@ -4,8 +4,8 @@ faddenSoft http://www.faddensoft.com/ CiderPress http://a2ciderpress.com/ -4.0.3-a2 -43052 +4.0.3-a3 +43070 C:\DATA\faddenSoft\fs.ico Copyright © 2017 CiderPress project authors. All rights reserved. C:\Src\CiderPress\DIST\ReadMe.txt @@ -357,7 +357,7 @@ FALSE 4095 -Setup403-a2.exe +Setup403-a3.exe FALSE diff --git a/app/Actions.cpp b/app/Actions.cpp index 78f8b8d..1bd1a0b 100644 --- a/app/Actions.cpp +++ b/app/Actions.cpp @@ -912,6 +912,16 @@ bool MainWindow::ExtractEntry(GenericEntry* pEntry, int thread, break; } + /* + * Issue #26: if "add type extension" is not checked, don't add + * the format converter extension. This is useful for Merlin + * source files where you want to do the text conversion but still + * want the file to end with ".S". + */ + if (!pExtOpts->fAddExtension) { + noChangePath = true; + } + if (goodReformat) { if (!noChangePath) outputPath = tmpPath; diff --git a/app/CiderPress.rc b/app/CiderPress.rc index 128e14d..4289d2b 100644 --- a/app/CiderPress.rc +++ b/app/CiderPress.rc @@ -484,7 +484,7 @@ BEGIN EDITTEXT IDC_EXT_PATH,8,18,263,14,ES_AUTOHSCROLL | WS_GROUP PUSHBUTTON "",IDC_EXT_CHOOSE_FOLDER,296,18,16,14,BS_BITMAP | BS_CENTER | BS_VCENTER | WS_GROUP GROUPBOX "Files to extract",IDC_STATIC,8,40,150,35 - CONTROL ">Extract 65536 selected files<",IDC_EXT_SELECTED,"Button",BS_AUTORADIOBUTTON | WS_GROUP | WS_TABSTOP,16,50,142,10 + CONTROL ">Extract 65536 selected files<",IDC_EXT_SELECTED,"Button",BS_AUTORADIOBUTTON | WS_GROUP | WS_TABSTOP,16,50,135,10 CONTROL "Extract &all files",IDC_EXT_ALL,"Button",BS_AUTORADIOBUTTON | WS_TABSTOP,16,61,124,10 GROUPBOX "Parts to extract",IDC_STATIC,162,40,150,47,WS_GROUP CONTROL "&Data forks",IDC_EXT_DATAFORK,"Button",BS_AUTOCHECKBOX | WS_GROUP | WS_TABSTOP,170,50,128,10 diff --git a/app/MyApp.h b/app/MyApp.h index 091644d..ea8972a 100644 --- a/app/MyApp.h +++ b/app/MyApp.h @@ -15,7 +15,7 @@ #define kAppMajorVersion 4 #define kAppMinorVersion 0 #define kAppBugVersion 3 -#define kAppDevString L"-a2" +#define kAppDevString L"-a3" /* * Windows application object.