From 376881f77c46af43cd6062b391fa017c571b223f Mon Sep 17 00:00:00 2001 From: Reinhard Pointner Date: Sun, 29 Nov 2015 09:43:23 +0000 Subject: [PATCH] * n00b counter measures: sample file not set issue --- source/net/filebot/format/MediaBindingBean.java | 2 +- source/net/filebot/ui/rename/FormatDialog.java | 7 ++++--- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/source/net/filebot/format/MediaBindingBean.java b/source/net/filebot/format/MediaBindingBean.java index 5d2d80d8..4b1d0253 100644 --- a/source/net/filebot/format/MediaBindingBean.java +++ b/source/net/filebot/format/MediaBindingBean.java @@ -746,7 +746,7 @@ public class MediaBindingBean { public File getMediaFile() { // make sure file is not null, and that it is an existing file if (mediaFile == null) { - throw new IllegalStateException("Path to media file not set. Click \"Change Sample\" and select a sample file."); + throw new IllegalStateException("Sample file has not been set. Click \"Change Sample\" to select a sample file."); } return mediaFile; diff --git a/source/net/filebot/ui/rename/FormatDialog.java b/source/net/filebot/ui/rename/FormatDialog.java index ccad03c3..3c0a56d3 100644 --- a/source/net/filebot/ui/rename/FormatDialog.java +++ b/source/net/filebot/ui/rename/FormatDialog.java @@ -271,7 +271,7 @@ public class FormatDialog extends JDialog { // initialize window properties setDefaultCloseOperation(DO_NOTHING_ON_CLOSE); - setMinimumSize(new Dimension(650, 470)); + setMinimumSize(new Dimension(715, 470)); // initialize data setState(initMode, lockOnBinding != null ? lockOnBinding : restoreSample(initMode), lockOnBinding != null); @@ -545,8 +545,9 @@ public class FormatDialog extends JDialog { } catch (Exception e) { BindingException issue = findCause(e, BindingException.class); if (issue != null) { - status.setText(getMessage(issue)); - status.setIcon(ResourceManager.getIcon("status.info")); + String msg = getMessage(issue); + status.setText(msg); + status.setIcon(ResourceManager.getIcon(msg.contains("Change Sample") ? "action.variables" : "status.info")); } else { status.setText(String.format("%s: %s", e.getClass().getSimpleName(), e.getMessage())); status.setIcon(ResourceManager.getIcon("status.warning"));