* use wait-cursor for when loading xattr takes a while
This commit is contained in:
parent
7799f25a3a
commit
5a8bcba4f1
@ -305,16 +305,20 @@ public class RenamePanel extends JComponent {
|
||||
public void actionPerformed(ActionEvent evt) {
|
||||
try {
|
||||
if (namesList.getModel().isEmpty()) {
|
||||
try {
|
||||
getWindow(evt.getSource()).setCursor(Cursor.getPredefinedCursor(Cursor.WAIT_CURSOR));
|
||||
|
||||
ArrayList<File> files = new ArrayList<File>(renameModel.files());
|
||||
ArrayList<Object> objects = new ArrayList<Object>(files.size());
|
||||
|
||||
for (File file : files) {
|
||||
Object metaObject = MediaDetection.readMetaInfo(file);
|
||||
objects.add(metaObject != null ? metaObject : file);
|
||||
}
|
||||
|
||||
renameModel.clear();
|
||||
renameModel.addAll(objects, files);
|
||||
} finally {
|
||||
getWindow(evt.getSource()).setCursor(Cursor.getDefaultCursor());
|
||||
}
|
||||
} else {
|
||||
int index = namesList.getListComponent().getSelectedIndex();
|
||||
File file = (File) filesList.getListComponent().getModel().getElementAt(index);
|
||||
|
Loading…
Reference in New Issue
Block a user