Skip to content

Commit 3946293

Browse files
committed
Add "All Files" filter to ImageAnalyzer
It allows to select more file types that are not supported on all platforms (e.g. webp).
1 parent a9598b8 commit 3946293

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

examples/org.eclipse.swt.examples/src/examples_images.properties

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,7 @@ Alpha = Alpha
8484
OpenURLDialog = Open URL
8585
EnterURL = Enter the URL for an image (bmp, gif, ico, jfif, jpeg, jpg, png, tif, tiff):
8686
All_images = All Image Files
87+
All_files = All Files
8788
Loading_lc = loading
8889
Saving_lc = saving
8990
Unknown_extension = Unknown file extension: {0}\nPlease use bmp, gif, ico, jfif, jpeg, jpg, png, tif, or tiff.

examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/imageanalyzer/ImageAnalyzer.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -119,11 +119,11 @@ public class ImageAnalyzer {
119119
static final int ALPHA_Y = 2;
120120
static final String[] OPEN_FILTER_EXTENSIONS = new String[] {
121121
"*.bmp;*.gif;*.ico;*.jfif;*.jpeg;*.jpg;*.png;*.svg;*.tif;*.tiff",
122-
"*.bmp", "*.gif", "*.ico", "*.jpg;*.jpeg;*.jfif", "*.png", "*.svg","*.tif;*.tiff" };
122+
"*.bmp", "*.gif", "*.ico", "*.jpg;*.jpeg;*.jfif", "*.png", "*.svg","*.tif;*.tiff", "*.*" };
123123
static final String[] OPEN_FILTER_NAMES = new String[] {
124124
bundle.getString("All_images") + " (bmp, gif, ico, jfif, jpeg, jpg, png, tif, tiff)",
125125
"BMP (*.bmp)", "GIF (*.gif)", "ICO (*.ico)", "JPEG (*.jpg, *.jpeg, *.jfif)",
126-
"PNG (*.png)", "SVG (*.svg)","TIFF (*.tif, *.tiff)" };
126+
"PNG (*.png)", "SVG (*.svg)","TIFF (*.tif, *.tiff)", bundle.getString("All_files") };
127127
static final String[] SAVE_FILTER_EXTENSIONS = new String[] {
128128
"*.bmp", "*.bmp", "*.gif", "*.ico", "*.jpg", "*.png", "*.tif", "*.bmp" };
129129
static final String[] SAVE_FILTER_NAMES = new String[] {

0 commit comments

Comments
 (0)