mirror of
https://github.com/mitb-archive/filebot
synced 2025-03-10 06:20:27 -04:00
* more user messages telling DAUs what to do
This commit is contained in:
parent
0b4fcc19a1
commit
edc0c2417a
@ -166,6 +166,11 @@ abstract class SubtitleDropTarget extends JButton {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected boolean handleDrop(List<File> input) {
|
protected boolean handleDrop(List<File> input) {
|
||||||
|
if (getQueryLanguage() == null) {
|
||||||
|
UILogger.info("Please select a specific subtitle language.");
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
// perform a drop action depending on the given files
|
// perform a drop action depending on the given files
|
||||||
final Collection<File> videoFiles = new TreeSet<File>();
|
final Collection<File> videoFiles = new TreeSet<File>();
|
||||||
|
|
||||||
@ -234,15 +239,17 @@ abstract class SubtitleDropTarget extends JButton {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected DropAction getDropAction(List<File> input) {
|
protected DropAction getDropAction(List<File> input) {
|
||||||
if (getSubtitleService().isAnonymous())
|
|
||||||
return DropAction.Cancel;
|
|
||||||
|
|
||||||
// accept video files and folders
|
// accept video files and folders
|
||||||
return (filter(input, VIDEO_FILES).size() > 0 && filter(input, SUBTITLE_FILES).size() > 0) || filter(input, FOLDERS).size() > 0 ? DropAction.Accept : DropAction.Cancel;
|
return (filter(input, VIDEO_FILES).size() > 0 && filter(input, SUBTITLE_FILES).size() > 0) || filter(input, FOLDERS).size() > 0 ? DropAction.Accept : DropAction.Cancel;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected boolean handleDrop(List<File> input) {
|
protected boolean handleDrop(List<File> input) {
|
||||||
|
if (getSubtitleService().isAnonymous()) {
|
||||||
|
UILogger.info("Please login. Anonymous user is not allowed to upload subtitles.");
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
setCursor(Cursor.getPredefinedCursor(Cursor.WAIT_CURSOR));
|
setCursor(Cursor.getPredefinedCursor(Cursor.WAIT_CURSOR));
|
||||||
|
|
||||||
// perform a drop action depending on the given files
|
// perform a drop action depending on the given files
|
||||||
@ -310,14 +317,11 @@ abstract class SubtitleDropTarget extends JButton {
|
|||||||
}
|
}
|
||||||
|
|
||||||
protected Icon getIcon(DropAction dropAction) {
|
protected Icon getIcon(DropAction dropAction) {
|
||||||
switch (dropAction) {
|
if (dropAction == DropAction.Accept)
|
||||||
case Accept:
|
|
||||||
return ResourceManager.getIcon("subtitle.exact.upload");
|
return ResourceManager.getIcon("subtitle.exact.upload");
|
||||||
default:
|
|
||||||
return ResourceManager.getIcon("message.error");
|
return ResourceManager.getIcon("message.error");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user