diff --git a/src/tools/trackeditor/gui/EditorFrame.java b/src/tools/trackeditor/gui/EditorFrame.java index 8cca005c9..46fe27a0b 100644 --- a/src/tools/trackeditor/gui/EditorFrame.java +++ b/src/tools/trackeditor/gui/EditorFrame.java @@ -58,6 +58,7 @@ import javax.swing.JPanel; import javax.swing.JScrollPane; import javax.swing.JToggleButton; import javax.swing.JToolBar; +import javax.swing.filechooser.FileNameExtensionFilter; import plugin.Plugin; import plugin.torcs.TorcsPlugin; @@ -1312,8 +1313,11 @@ public class EditorFrame extends JFrame fc.setSelectedFile(null); fc.rescanCurrentDirectory(); fc.setApproveButtonMnemonic(0); - fc.setDialogTitle("Background image selection"); + fc.setDialogTitle("Background image file selection"); fc.setVisible(true); + fc.setAcceptAllFileFilterUsed(false); + FileNameExtensionFilter filter = new FileNameExtensionFilter("RGB and PNG images", "rgb", "png"); + fc.addChoosableFileFilter(filter); fc.setCurrentDirectory(new File(System.getProperty("user.dir") + "/tracks")); int result = fc.showOpenDialog(this); if (result == JFileChooser.APPROVE_OPTION) diff --git a/src/tools/trackeditor/gui/properties/ImageProperties.java b/src/tools/trackeditor/gui/properties/ImageProperties.java index 1a1db782f..adb4b1477 100644 --- a/src/tools/trackeditor/gui/properties/ImageProperties.java +++ b/src/tools/trackeditor/gui/properties/ImageProperties.java @@ -112,7 +112,7 @@ public class ImageProperties extends PropertyPanel fc.setSelectedFile(null); fc.rescanCurrentDirectory(); fc.setApproveButtonMnemonic(0); - fc.setDialogTitle("Background image selection"); + fc.setDialogTitle("Background image file selection"); fc.setVisible(true); if(Editor.getProperties().getImage().equals("")) {