Reinhard Pointner 2017-01-17 22:46:03 +08:00
parent 899a4f836e
commit e41540341c
2 changed files with 22 additions and 1 deletions

View File

@ -142,6 +142,27 @@ public enum StandardRenameAction implements RenameAction {
} }
} }
public String getDisplayVerb() {
switch (this) {
case MOVE:
return "Moving";
case COPY:
return "Copying";
case KEEPLINK:
return "Moving and symlinking";
case SYMLINK:
return "Symlinking";
case HARDLINK:
return "Hardlinking";
case DUPLICATE:
return "Duplicating";
case REFLINK:
return "Reflinking";
default:
return "Testing";
}
}
public static StandardRenameAction forName(String action) { public static StandardRenameAction forName(String action) {
for (StandardRenameAction it : values()) { for (StandardRenameAction it : values()) {
if (it.name().equalsIgnoreCase(action)) if (it.name().equalsIgnoreCase(action))

View File

@ -87,7 +87,7 @@ class RenameAction extends AbstractAction {
} else { } else {
// call and wait // call and wait
StandardRenameWorker worker = new StandardRenameWorker(renameMap, renameLog, action); StandardRenameWorker worker = new StandardRenameWorker(renameMap, renameLog, action);
String message = String.format("%sing %d %s. This may take a while.", action.getDisplayName(), renameMap.size(), renameMap.size() == 1 ? "file" : "files"); String message = String.format("%s %d %s. This may take a while.", action.getDisplayVerb(), renameMap.size(), renameMap.size() == 1 ? "file" : "files");
ProgressMonitor.runTask(action.getDisplayName(), message, worker).get(); ProgressMonitor.runTask(action.getDisplayName(), message, worker).get();
} }
} catch (CancellationException e) { } catch (CancellationException e) {