* added help link for naming expression troubles

This commit is contained in:
Reinhard Pointner 2012-02-16 10:45:44 +00:00
parent dcef239966
commit bd2e2fcce2
2 changed files with 15 additions and 1 deletions

View File

@ -10,6 +10,7 @@ import static net.sourceforge.tuned.ui.TunedUtilities.*;
import java.awt.Color; import java.awt.Color;
import java.awt.Component; import java.awt.Component;
import java.awt.Desktop;
import java.awt.Font; import java.awt.Font;
import java.awt.Window; import java.awt.Window;
import java.awt.event.ActionEvent; import java.awt.event.ActionEvent;
@ -18,6 +19,7 @@ import java.awt.event.WindowEvent;
import java.beans.PropertyChangeEvent; import java.beans.PropertyChangeEvent;
import java.beans.PropertyChangeListener; import java.beans.PropertyChangeListener;
import java.io.File; import java.io.File;
import java.net.URI;
import java.text.Format; import java.text.Format;
import java.text.ParseException; import java.text.ParseException;
import java.util.LinkedHashSet; import java.util.LinkedHashSet;
@ -285,7 +287,17 @@ class FormatDialog extends JDialog {
panel.setBackground(new Color(0xFFFFE1)); panel.setBackground(new Color(0xFFFFE1));
panel.setOpaque(true); panel.setOpaque(true);
panel.add(new JLabel(ResourceBundle.getBundle(getClass().getName()).getString(mode.key() + ".syntax"))); panel.add(new LinkButton(new AbstractAction(ResourceBundle.getBundle(FormatDialog.class.getName()).getString(mode.key() + ".syntax")) {
@Override
public void actionPerformed(ActionEvent evt) {
try {
Desktop.getDesktop().browse(URI.create(ResourceBundle.getBundle(FormatDialog.class.getName()).getString("help.url")));
} catch (Exception e) {
throw new RuntimeException(e);
}
}
}));
return panel; return panel;
} }

View File

@ -1,3 +1,5 @@
help.url = http://filebot.sourceforge.net/naming.html
episode.syntax: <html><b>{</b> <b>}</b> \u2026 expression, <b>n</b> \u2026 name, <b>s</b> \u2026 season, <b>e</b> \u2026 episode, <b>t</b> \u2026 title</html> episode.syntax: <html><b>{</b> <b>}</b> \u2026 expression, <b>n</b> \u2026 name, <b>s</b> \u2026 season, <b>e</b> \u2026 episode, <b>t</b> \u2026 title</html>
movie.syntax: <html><b>{</b> <b>}</b> \u2026 expression, <b>n</b> \u2026 name, <b>y</b> \u2026 year</html> movie.syntax: <html><b>{</b> <b>}</b> \u2026 expression, <b>n</b> \u2026 name, <b>y</b> \u2026 year</html>