79 |
/** |
/** |
80 |
* Changes the JSampler's home directory and moves all files from |
* Changes the JSampler's home directory and moves all files from |
81 |
* the old JSampler's home directory to the new one. If all files are |
* the old JSampler's home directory to the new one. If all files are |
82 |
* moved succesfully, the old directory is deleted. |
* moved successfully, the old directory is deleted. |
83 |
* @param path The location of the new JSampler's home directory. If |
* @param path The location of the new JSampler's home directory. If |
84 |
* the last directory in the path doesn't exist, it is created. |
* the last directory in the path doesn't exist, it is created. |
85 |
*/ |
*/ |
87 |
changeJSamplerHome(String path) { |
changeJSamplerHome(String path) { |
88 |
File fNew = new File(path); |
File fNew = new File(path); |
89 |
if(fNew.exists() && fNew.isFile()) { |
if(fNew.exists() && fNew.isFile()) { |
90 |
HF.showErrorMessage(i18n.getError("CC.JSamplerHomeIsNotDir!")); |
CC.getViewConfig().showErrorMessage(i18n.getError("CC.JSamplerHomeIsNotDir!")); |
91 |
return; |
return; |
92 |
} |
} |
93 |
|
|
94 |
if(!fNew.exists()) { |
if(!fNew.exists()) { |
95 |
if(!fNew.mkdir()) { |
if(!fNew.mkdir()) { |
96 |
String s = fNew.getAbsolutePath(); |
String s = fNew.getAbsolutePath(); |
97 |
HF.showErrorMessage(i18n.getError("CC.mkdirFailed", s)); |
CC.getViewConfig().showErrorMessage(i18n.getError("CC.mkdirFailed", s)); |
98 |
return; |
return; |
99 |
} |
} |
100 |
} |
} |
150 |
} |
} |
151 |
} catch(Exception e) { |
} catch(Exception e) { |
152 |
CC.getLogger().log(Level.FINE, HF.getErrorMessage(e), e); |
CC.getLogger().log(Level.FINE, HF.getErrorMessage(e), e); |
153 |
HF.showErrorMessage(e); |
CC.getViewConfig().showErrorMessage(e); |
154 |
} |
} |
155 |
} |
} |
156 |
|
|
443 |
} |
} |
444 |
|
|
445 |
int chnId = 0; |
int chnId = 0; |
446 |
for(JSChannelsPane cp : CC.getMainFrame().getChannelsPaneList()) { |
for(Object cp : CC.getMainFrame().getChannelsPaneList()) { |
447 |
for(JSChannel chn : cp.getChannels()) { |
for(JSChannel chn : ((JSChannelsPane)cp).getChannels()) { |
448 |
SamplerChannelModel scm; |
SamplerChannelModel scm; |
449 |
scm = CC.getSamplerModel().getChannelById(chn.getChannelId()); |
scm = CC.getSamplerModel().getChannelById(chn.getChannelId()); |
450 |
exportChannelToLscpScript(scm.getChannelInfo(), chnId, lscpClient); |
exportChannelToLscpScript(scm.getChannelInfo(), chnId, lscpClient); |