Subversion Repositories svn.mios

Compare Revisions

Ignore whitespace Rev 761 → Rev 762

/trunk/java/MIOSStudioSID.java
31,7 → 31,6
import javax.swing.JFrame;
import javax.swing.JMenuItem;
 
import org.midibox.apps.miosstudio.gui.MIOSStudioGUI;
import org.midibox.apps.miosstudiosid.gui.MIOSStudioSIDGUI;
import org.midibox.apps.miosstudiosid.gui.xml.MIOSStudioSIDGUIXML;
import org.midibox.utils.gui.DialogOwner;
49,8 → 48,12
 
public class MIOSStudioSID extends JApplet {
 
protected static String configFileName = ".miosstudiosid";
protected static String oldConfigFileName = ".miosstudiosid";
 
protected static String configDirectoryName = ".midibox";
 
protected static String configFileName = "miosstudiosid.xml";
 
protected static String frameTitle = "MIOS Studio + SID V2 Editor";
 
protected static String splashTitle = "MIOS Studio beta 9.2 + SID V2 Editor";
67,9 → 70,11
 
this.miosStudioSID = new org.midibox.apps.miosstudiosid.MIOSStudioSID();
 
File configFile = new File(System.getProperty("user.home"),
configFileName);
File configDirectory = new File(System.getProperty("user.home"),
configDirectoryName);
 
File configFile = new File(configDirectory, configFileName);
 
if (configFile.exists()) {
 
MIOSStudioSIDGUIXML miosStudioSIDGUIXML = new MIOSStudioSIDGUIXML(
81,6 → 86,26
this.miosStudioSIDGUI = (MIOSStudioSIDGUI) miosStudioSIDGUIXML
.getMiosStudioGUI();
 
} else {
 
// check for old config file
 
configFile = new File(System.getProperty("user.home"),
oldConfigFileName);
 
if (configFile.exists()) {
 
MIOSStudioSIDGUIXML miosStudioSIDGUIXML = new MIOSStudioSIDGUIXML(
miosStudioSID, MIOSStudioSIDGUIXML.TAG_ROOT_ELEMENT,
true, true, true, true, true);
 
miosStudioSIDGUIXML.loadXML(configFile);
 
this.miosStudioSIDGUI = (MIOSStudioSIDGUI) miosStudioSIDGUIXML
.getMiosStudioGUI();
 
configFile.delete();
}
}
 
if (miosStudioSIDGUI == null) {
101,9 → 126,23
 
public void destroy() {
 
File configFile = new File(System.getProperty("user.home"),
configFileName);
File configDirectory = new File(System.getProperty("user.home"),
configDirectoryName);
 
File configFile = new File(configDirectory, configFileName);
 
if (!configDirectory.exists()) {
 
try {
 
configDirectory.mkdir();
 
} catch (Exception e) {
 
e.printStackTrace();
}
}
 
if (!configFile.exists()) {
 
try {