1
0
mirror of https://github.com/esp8266/Arduino.git synced 2025-07-30 16:24:09 +03:00

Removed duplicate version fields in Base class

This commit is contained in:
Cristian Maglie
2014-11-18 14:04:14 +01:00
parent 13fd27704f
commit b0bd52b387
6 changed files with 11 additions and 37 deletions

View File

@ -58,11 +58,6 @@ import static processing.app.I18n._;
* files and images, etc) that comes from that.
*/
public class Base {
public static final int REVISION = BaseNoGui.REVISION;
/** This might be replaced by main() if there's a lib/version.txt file. */
static String VERSION_NAME = BaseNoGui.VERSION_NAME;
/** Set true if this a proper release rather than a numbered revision. */
static public boolean RELEASE = BaseNoGui.RELEASE;
static private boolean commandLine;
@ -104,8 +99,6 @@ public class Base {
BaseNoGui.initParameters(args);
BaseNoGui.initVersion();
VERSION_NAME = BaseNoGui.VERSION_NAME;
RELEASE = BaseNoGui.RELEASE;
// if (System.getProperty("mrj.version") != null) {
// //String jv = System.getProperty("java.version");
@ -1509,7 +1502,7 @@ public class Base {
g.setFont(new Font("SansSerif", Font.PLAIN, 11));
g.setColor(Color.white);
g.drawString(VERSION_NAME, 50, 30);
g.drawString(BaseNoGui.VERSION_NAME, 50, 30);
}
};
window.addMouseListener(new MouseAdapter() {

View File

@ -2208,13 +2208,8 @@ public class Editor extends JFrame implements RunnerListener {
}
header.rebuild();
// Set the title of the window to "sketch_070752a - Processing 0126"
setTitle(
I18n.format(
_("{0} | Arduino {1}"),
sketch.getName(),
Base.VERSION_NAME
)
);
setTitle(I18n.format(_("{0} | Arduino {1}"), sketch.getName(),
BaseNoGui.VERSION_NAME));
// Disable untitled setting from previous document, if any
untitled = false;

View File

@ -464,7 +464,7 @@ public class EditorStatus extends JPanel /*implements ActionListener*/ {
copyErrorButton.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
String message = "";
message += _("Arduino: ") + Base.VERSION_NAME + " (" + System.getProperty("os.name") + "), ";
message += _("Arduino: ") + BaseNoGui.VERSION_NAME + " (" + System.getProperty("os.name") + "), ";
message += _("Board: ") + "\"" + Base.getBoardPreferences().get("name") + "\"\n\n";
message += editor.console.consoleTextPane.getText().trim();
if ((Preferences.getBoolean("build.verbose")) == false) {

View File

@ -79,7 +79,7 @@ public class UpdateCheck implements Runnable {
try {
String info;
info = URLEncoder.encode(id + "\t" +
PApplet.nf(Base.REVISION, 4) + "\t" +
PApplet.nf(BaseNoGui.REVISION, 4) + "\t" +
System.getProperty("java.version") + "\t" +
System.getProperty("java.vendor") + "\t" +
System.getProperty("os.name") + "\t" +
@ -104,7 +104,7 @@ public class UpdateCheck implements Runnable {
"would you like to visit the Arduino download page?");
if (base.activeEditor != null) {
if (latest > Base.REVISION) {
if (latest > BaseNoGui.REVISION) {
Object[] options = { _("Yes"), _("No") };
int result = JOptionPane.showOptionDialog(base.activeEditor,
prompt,