setting to incluse characterid in export filename

This commit is contained in:
honfika@gmail.com
2015-01-20 22:29:56 +01:00
parent 939ccc4bbb
commit 2d41288a38
4 changed files with 22 additions and 5 deletions

View File

@@ -330,6 +330,10 @@ public class Configuration {
@ConfigurationCategory("export")
public static final ConfigurationItem<String> textExportSingleFileRecordSeparator = null;
@ConfigurationDefaultBoolean(true)
@ConfigurationCategory("export")
public static final ConfigurationItem<Boolean> addCharacterIdToExportFileName = null;
@ConfigurationCategory("import")
public static final ConfigurationItem<TextImportResizeTextBoundsMode> textImportResizeTextBoundsMode = null;

View File

@@ -1,21 +1,23 @@
/*
* Copyright (C) 2010-2015 JPEXS, All rights reserved.
*
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 3.0 of the License, or (at your option) any later version.
*
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library.
* License along with this library.
*/
package com.jpexs.decompiler.flash.tags.base;
import com.jpexs.decompiler.flash.SWF;
import com.jpexs.decompiler.flash.configuration.Configuration;
import com.jpexs.decompiler.flash.tags.Tag;
import com.jpexs.helpers.ByteArrayRange;
@@ -57,7 +59,12 @@ public abstract class CharacterIdTag extends Tag {
@Override
public String getExportFileName() {
public String getExportFileName() {
String result = super.getName();
if (Configuration.addCharacterIdToExportFileName.get()) {
result += "_" + getCharacterId();
}
return result + (exportName != null ? "_" + exportName : "");
}
public String getCharacterExportFileName() {