This should clean up all the `TextBundle#format` with array references.
#36
This commit is contained in:
parent
d54b14f797
commit
f1202a1c66
|
@ -528,9 +528,9 @@ public class ac {
|
||||||
showFiles(files, "", display); //$NON-NLS-1$
|
showFiles(files, "", display); //$NON-NLS-1$
|
||||||
}
|
}
|
||||||
System.out.println(textBundle.format("CommandLineStatus", //$NON-NLS-1$
|
System.out.println(textBundle.format("CommandLineStatus", //$NON-NLS-1$
|
||||||
new Object[] { formattedDisk.getFormat(),
|
formattedDisk.getFormat(),
|
||||||
new Integer(formattedDisk.getFreeSpace()),
|
formattedDisk.getFreeSpace(),
|
||||||
new Integer(formattedDisk.getUsedSpace()) }));
|
formattedDisk.getUsedSpace()));
|
||||||
System.out.println();
|
System.out.println();
|
||||||
}
|
}
|
||||||
} catch (DiskException e) {
|
} catch (DiskException e) {
|
||||||
|
|
|
@ -206,34 +206,11 @@ public class SwingAppleCommander extends JFrame implements ActionListener {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
|
||||||
fileDialog.setFilterNames(names);
|
|
||||||
fileDialog.setFilterExtensions(extensions);
|
|
||||||
fileDialog.setFilterPath(userPreferences.getDiskImageDirectory());
|
|
||||||
String fullpath = fileDialog.open();
|
|
||||||
|
|
||||||
if (fullpath != null) {
|
|
||||||
userPreferences.setDiskImageDirectory(fileDialog.getFilterPath());
|
|
||||||
try {
|
|
||||||
Disk disk = new Disk(fullpath);
|
|
||||||
FormattedDisk[] formattedDisks = disk.getFormattedDisks();
|
|
||||||
if (formattedDisks != null) {
|
|
||||||
DiskWindow window = new DiskWindow(shell, formattedDisks, imageManager);
|
|
||||||
window.open();
|
|
||||||
} else {
|
|
||||||
showUnrecognizedDiskFormatMessage(fullpath);
|
|
||||||
}
|
|
||||||
} catch (Exception ignored) {
|
|
||||||
ignored.printStackTrace();
|
|
||||||
showUnrecognizedDiskFormatMessage(fullpath);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
|
|
||||||
public void showAboutAppleCommander() {
|
public void showAboutAppleCommander() {
|
||||||
JOptionPane.showMessageDialog(null,
|
JOptionPane.showMessageDialog(null,
|
||||||
textBundle.format("SwtAppleCommander.AboutMessage", //$NON-NLS-1$
|
textBundle.format("SwtAppleCommander.AboutMessage", //$NON-NLS-1$
|
||||||
new Object[] { AppleCommander.VERSION, textBundle.get("Copyright") }), textBundle.get("SwtAppleCommander.AboutTitle"), //$NON-NLS-1$
|
AppleCommander.VERSION, textBundle.get("Copyright")),
|
||||||
|
textBundle.get("SwtAppleCommander.AboutTitle"), //$NON-NLS-1$
|
||||||
JOptionPane.INFORMATION_MESSAGE);
|
JOptionPane.INFORMATION_MESSAGE);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1882,7 +1882,7 @@ public class DiskExplorerTab {
|
||||||
}
|
}
|
||||||
protected void printFooter() {
|
protected void printFooter() {
|
||||||
TextBundle textBundle = UiBundle.getInstance();
|
TextBundle textBundle = UiBundle.getInstance();
|
||||||
String text = textBundle.format("PageNumberText", Integer.toString(page)); //$NON-NLS-1$
|
String text = textBundle.format("PageNumberText", page); //$NON-NLS-1$
|
||||||
Point point = gc.stringExtent(text);
|
Point point = gc.stringExtent(text);
|
||||||
gc.drawString(text,
|
gc.drawString(text,
|
||||||
clientArea.x + (clientArea.width - point.x)/2,
|
clientArea.x + (clientArea.width - point.x)/2,
|
||||||
|
|
|
@ -98,9 +98,8 @@ public class DiskMapTab {
|
||||||
labels[0].toLowerCase()));
|
labels[0].toLowerCase()));
|
||||||
} else {
|
} else {
|
||||||
buf.append(textBundle.format("DiskMapTab.TrackAndSectorDecriptiveLabel", //$NON-NLS-1$
|
buf.append(textBundle.format("DiskMapTab.TrackAndSectorDecriptiveLabel", //$NON-NLS-1$
|
||||||
new Object[] {
|
labels[0].toLowerCase(),
|
||||||
labels[0].toLowerCase(),
|
labels[1].toLowerCase()));
|
||||||
labels[1].toLowerCase() }));
|
|
||||||
}
|
}
|
||||||
title.setText(buf.toString());
|
title.setText(buf.toString());
|
||||||
title.setLayoutData(data);
|
title.setLayoutData(data);
|
||||||
|
|
|
@ -120,8 +120,7 @@ public class DiskWindow {
|
||||||
box.setText(textBundle.get("SwtAppleCommander.DiskException.Title")); //$NON-NLS-1$
|
box.setText(textBundle.get("SwtAppleCommander.DiskException.Title")); //$NON-NLS-1$
|
||||||
box.setMessage(
|
box.setMessage(
|
||||||
textBundle.format("SwtAppleCommander.DiskException.Message", //$NON-NLS-1$
|
textBundle.format("SwtAppleCommander.DiskException.Message", //$NON-NLS-1$
|
||||||
new Object[]{e.imagepath, e.toString()}
|
e.imagepath, e.toString()));
|
||||||
));
|
|
||||||
box.open();
|
box.open();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -310,7 +310,7 @@ public class SwtAppleCommander implements Listener {
|
||||||
box.setText(textBundle.get("SwtAppleCommander.AboutTitle")); //$NON-NLS-1$
|
box.setText(textBundle.get("SwtAppleCommander.AboutTitle")); //$NON-NLS-1$
|
||||||
box.setMessage(
|
box.setMessage(
|
||||||
textBundle.format("SwtAppleCommander.AboutMessage", //$NON-NLS-1$
|
textBundle.format("SwtAppleCommander.AboutMessage", //$NON-NLS-1$
|
||||||
new Object[] { AppleCommander.VERSION, textBundle.get("Copyright") })); //$NON-NLS-1$
|
AppleCommander.VERSION, textBundle.get("Copyright"))); //$NON-NLS-1$
|
||||||
box.open();
|
box.open();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue