Search in sources :

Example 1 with FileLocationPane

use of apps.FileLocationPane in project JMRI by JMRI.

the class FileLocationPaneXml method load.

@Override
public boolean load(Element shared, Element perNode) {
    boolean result = true;
    //Attribute scriptLocation = shared.getAttribute("defaultScriptLocation");
    //if (scriptLocation!=null)
    //FileUtil.setPythonScriptsPath(scriptLocation.getValue());
    /*Attribute userLocation = shared.getAttribute("defaultUserLocation");
         if (userLocation!=null)
         FileUtil.setUserFilesPath(userLocation.getValue());*/
    String value = loadUserLocations(shared, "defaultUserLocation");
    if (value != null) {
        FileUtil.setUserFilesPath(value);
    }
    value = loadUserLocations(shared, "defaultScriptLocation");
    if (value != null) {
        FileUtil.setScriptsPath(value);
    }
    ConfigureManager cm = jmri.InstanceManager.getNullableDefault(jmri.ConfigureManager.class);
    if (cm != null) {
        cm.registerPref(new FileLocationPane());
    }
    return result;
}
Also used : ConfigureManager(jmri.ConfigureManager) FileLocationPane(apps.FileLocationPane)

Aggregations

FileLocationPane (apps.FileLocationPane)1 ConfigureManager (jmri.ConfigureManager)1