1 |
/* |
/* |
2 |
* JSampler - a java front-end for LinuxSampler |
* JSampler - a java front-end for LinuxSampler |
3 |
* |
* |
4 |
* Copyright (C) 2005-2007 Grigor Iliev <grigor@grigoriliev.com> |
* Copyright (C) 2005-2008 Grigor Iliev <grigor@grigoriliev.com> |
5 |
* |
* |
6 |
* This file is part of JSampler. |
* This file is part of JSampler. |
7 |
* |
* |
422 |
actionPerformed(ActionEvent e) { |
actionPerformed(ActionEvent e) { |
423 |
DbDirectoryTreeNode n = instrumentsDbTree.getSelectedDirectoryNode(); |
DbDirectoryTreeNode n = instrumentsDbTree.getSelectedDirectoryNode(); |
424 |
if(n == null) return; |
if(n == null) return; |
425 |
instrumentsDbTree.refreshDirectoryContent(n.getInfo().getDirectoryPath()); |
final String path = n.getInfo().getDirectoryPath(); |
426 |
|
instrumentsDbTree.refreshDirectoryContent(path); |
427 |
|
CC.scheduleInTaskQueue(new Runnable() { |
428 |
|
public void |
429 |
|
run() { instrumentsDbTree.setSelectedDirectory(path); } |
430 |
|
}); |
431 |
} |
} |
432 |
|
|
433 |
public void |
public void |
626 |
|
|
627 |
LoadInstrumentAction(SamplerChannelModel model) { |
LoadInstrumentAction(SamplerChannelModel model) { |
628 |
String s = "instrumentsdb.actions.loadInstrument.onChannel"; |
String s = "instrumentsdb.actions.loadInstrument.onChannel"; |
629 |
putValue(Action.NAME, i18n.getMenuLabel(s, model.getChannelId())); |
int i = CC.getSamplerModel().getChannelIndex(model) + 1; |
630 |
|
putValue(Action.NAME, i18n.getMenuLabel(s, i)); |
631 |
channelModel = model; |
channelModel = model; |
632 |
} |
} |
633 |
|
|
1029 |
|
|
1030 |
public void |
public void |
1031 |
channelAdded(SamplerChannelListEvent e) { |
channelAdded(SamplerChannelListEvent e) { |
1032 |
|
if(CC.getSamplerModel().getChannelListIsAdjusting()) return; |
1033 |
updateLoadInstrumentMenus(); |
updateLoadInstrumentMenus(); |
1034 |
} |
} |
1035 |
|
|